This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { render } from "solid-js/web"; | |
import { | |
type JSX, | |
type ComponentProps, | |
type Component, | |
splitProps, | |
createSignal, | |
Show, | |
createResource, | |
onCleanup, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* slopped together with bolt.new */ | |
// Type definition for the proxy handler | |
type DeepProxyHandler<T extends object> = ProxyHandler<T>; | |
// Function to check if a value is an object that can be proxied | |
const canBeProxied = (value: any): boolean => { | |
return value !== null && typeof value === 'object' && !isProxyIgnored(value); | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { render } from "solid-js/web"; | |
import { createSignal, Index, For, type JSX } from "solid-js"; | |
import { createStore, type SetStoreFunction } from "solid-js/store"; | |
import "./index.css"; | |
function getNodeAndOffsetAtIndex(element: Node, index: number) { | |
const nodes = element.childNodes; | |
let accumulator = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const referenceCount = createReferenceCount(); | |
function createReferenceCount() { | |
const map = new WeakMap< | |
object, | |
{ count: number; dispose: () => void; result: unknown } | |
>(); | |
return function <T>(object: object, cb: () => T, debug?: string) { | |
try { | |
const node = map.get(object); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// v-dom driven by signals | |
import { | |
createSignal, | |
createMemo, | |
} from "solid-js"; | |
interface TextNode { | |
text: string; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
createSignal, | |
type Accessor, | |
type Setter, | |
createResource, | |
type Resource, | |
} from "solid-js"; | |
import { createStore, produce } from "solid-js/store"; | |
/**********************************************************************************/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { createSignal, batch } from "solid-js"; | |
const $LENGTH = Symbol(); | |
const PROXIES = new WeakMap(); | |
function createMutable<T extends object>(root: T) { | |
function signal<T>(initialValue: T) { | |
const [get, set] = createSignal(initialValue); | |
return { get, set }; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Patch = { | |
op: "add" | "update" | "delete"; | |
path: string[]; | |
value?: any; | |
}; | |
const $PATCH = Symbol(); | |
function createPatchProxy<T extends object>( | |
target: T, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Generated by dts-bundle-generator v9.5.1 | |
declare class AudioSampleEntry extends SampleEntry { | |
channel_count: number; | |
samplesize: number; | |
samplerate: number; | |
constructor(type: string, size?: number); | |
parse(stream: MultiBufferStream): void; | |
/** @bundle box-codecs.js */ | |
isAudio(): boolean; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { render } from "solid-js/web"; | |
function format(source: string) { | |
if (source.endsWith("\n")) { | |
return source + "\n"; | |
} | |
return source; | |
} | |
function unformat(source: string) { | |
if (source.endsWith("\n")) { |
NewerOlder