@lankajs/solid 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,5 +1,3 @@
1
- import "./chunk-5WRI5ZAA.js";
2
-
3
1
  // src/to-lanka-solid-vm/toLankaSolidVM.ts
4
2
  import { createSignal, getOwner, onCleanup } from "solid-js";
5
3
  import { createLankaViewSubscription } from "lanka/extend";
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/to-lanka-solid-vm/toLankaSolidVM.ts","../src/use-lanka-vm/useLankaVM.ts"],"sourcesContent":["import { createSignal, getOwner, onCleanup } from \"solid-js\";\nimport { createLankaViewSubscription } from \"lanka/extend\";\nimport type { ILankaReadableVM } from \"lanka/viewmodel\";\n\n/**\n * A ViewModel read the way Solid reads shared state.\n *\n * The state's own members, directly, plus the one meta member a caller needs.\n * `$`-prefixed so it cannot collide with a state key, which is the same reason\n * Solid's own stores keep their helpers off the object.\n *\n * Called a ViewModel and not a store, deliberately: `createStore` is Solid's\n * noun for the shape, and what holds the state, the actions and the scenario\n * bindings is the ViewModel.\n */\nexport type TLankaSolidVM<TState extends object> = TState & {\n\t/** Releases the subscription. Rarely needed: an owner does it. */\n\t$stop: () => void;\n};\n\n/**\n * How the store answers for the ViewModel behind it.\n *\n * Its own function, because the traps are the whole mechanism and the factory\n * above is then the subscription and the Proxy. Read together they were sixty\n * lines whose shape said \"a function doing two things\", which is what the\n * composition canon calls it.\n */\nconst readsTheViewModel = <TState extends object, TStore extends object>(\n\tcurrent: () => TState,\n\tstop: () => void,\n): ProxyHandler<TStore> => ({\n\tget: (_target, key) => (key === \"$stop\" ? stop : Reflect.get(current(), key)),\n\n\thas: (_target, key) => key === \"$stop\" || key in current(),\n\n\townKeys: () => Reflect.ownKeys(current()),\n\n\t/*\n\t * Reported as configurable, always.\n\t *\n\t * A Proxy must not claim a non-configurable descriptor its target lacks — the\n\t * runtime throws. The target here is a bare object while the keys live on the\n\t * state, so every descriptor this hands back is invented and must say it can be\n\t * redefined. Without it `{ ...store }` and `Object.keys(store)` throw rather\n\t * than read, and a devtool does one of them on sight.\n\t */\n\tgetOwnPropertyDescriptor: (_target, key) =>\n\t\tkey === \"$stop\"\n\t\t\t? { value: stop, configurable: true, enumerable: false, writable: false }\n\t\t\t: { ...Reflect.getOwnPropertyDescriptor(current(), key), configurable: true },\n});\n\n/**\n * Reads a ViewModel the way Solid reads an object, with no call on the outside.\n *\n * ```tsx\n * const todos = toLankaSolidVM(todosVM);\n *\n * <For each={todos.rows}>{(row) => <li>{row}</li>}</For>\n * ```\n *\n * ## Why this exists beside `useLankaVM`\n *\n * `useLankaVM` answers an `Accessor`, which is Solid's own shape for a value and\n * the one every other binding on the shelf parallels: `state().rows`. It is also\n * not how Solid holds an OBJECT. `createStore` gives a proxy read as `state.rows`\n * — no call, and the read itself is the subscription — and that is what a Solid\n * codebase has in it. A consumer with that habit writes `todos.rows`, gets\n * `undefined`, and learns that lanka is a foreign object.\n *\n * ## The read is the subscription, in both graphs at once\n *\n * A read goes through the access tracker, which records the key, AND through the\n * signal, which registers the surrounding computation with Solid. One access,\n * two graphs — the same alignment the Svelte binding gets from getters, and the\n * reason neither of them needs a diff.\n *\n * The signal holds a VERSION rather than the state. A tracked read hands back the\n * same proxy while the state object is unchanged, and Solid compares by identity,\n * so a signal holding the state would be a no-op exactly when the tracker did its\n * job — and a signal holding the state is also a SNAPSHOT, which is wrong for\n * something read from ordinary code at arbitrary moments. `store.load()` followed\n * by `store.rows` is the shape that settles it.\n *\n * ## What it is not\n *\n * Not `createStore`. Solid's store is a write path as well as a read one, and a\n * ViewModel's writes belong to its actions — `setStore` beside them would be a\n * second place state changes. This is the read half, which is the half a screen\n * has.\n */\nexport const toLankaSolidVM = <TState extends object>(\n\tviewModel: ILankaReadableVM<TState>,\n): TLankaSolidVM<TState> => {\n\tconst [version, setVersion] = createSignal(0);\n\n\tconst view = createLankaViewSubscription(viewModel, () => {\n\t\tsetVersion((seen) => seen + 1);\n\t});\n\n\t// An owner is a component or a `createRoot`. Outside one there is nothing to\n\t// attach to and `onCleanup` would warn, so the caller keeps `$stop`.\n\tif (getOwner()) onCleanup(view.stop);\n\n\tconst current = (): TState => {\n\t\t// Read for the DEPENDENCY, discard the number. A computation reading\n\t\t// `store.rows` must re-run when the version moves, and the version is the\n\t\t// only signal in here.\n\t\tvoid version();\n\n\t\treturn view.read();\n\t};\n\n\treturn new Proxy({} as TLankaSolidVM<TState>, readsTheViewModel(current, view.stop));\n};\n","import { createSignal, getOwner, onCleanup } from \"solid-js\";\nimport { createLankaAccessTracker } from \"lanka/extend\";\nimport type { Accessor } from \"solid-js\";\nimport type { ILankaReadableVM } from \"lanka/viewmodel\";\n\n/** A ViewModel read from Solid: an accessor, and a way to stop reading it. */\nexport type TLankaVMAccessor<TValue> = Accessor<TValue> & {\n\t/**\n\t * Releases the subscription.\n\t *\n\t * Called for you by `onCleanup` inside a component or a root. It is published\n\t * because a read made where there is no owner — module level, a test — has\n\t * nobody to call it, and Solid warns about that case rather than handling it.\n\t */\n\tstop: () => void;\n};\n\n/**\n * Reads a ViewModel from Solid.\n *\n * ```tsx\n * export const TodoScreen = () => {\n * \tconst state = useLankaVM(todoVM);\n *\n * \treturn <For each={state().todos}>{(todo) => <li>{todo.title}</li>}</For>;\n * };\n * ```\n *\n * Without a selector the accessor answers a Proxy that records which keys were\n * read, and the signal changes only when one of THOSE moves. With a selector the\n * selector decides and tracking is bypassed.\n *\n * ## Why tracking still earns its place here\n *\n * Solid already skips work a signal did not feed, so a coarse binding would be\n * less wrong here than elsewhere. It would still be wrong: without tracking every\n * change writes a new object into the signal, and every effect reading ANY part\n * of it re-runs. The tracker is what keeps the signal UNCHANGED when nothing a\n * reader looked at moved — and an unchanged signal is work Solid never starts.\n *\n * ## What \"a render\" means in a framework that has none\n *\n * A Solid component runs once; what updates is the DOM node that read the signal.\n * So there is nothing here that corresponds to a re-render, and the conformance\n * suite's `renders()` counts the reading effect's runs instead — which is the\n * closest question this framework can be asked.\n *\n * ## What this function does NOT contain\n *\n * The recording, the comparison and the blind-spot warning are in core. If this\n * file ever needs more than the port gives it, the port has the defect.\n */\nexport function useLankaVM<TState extends object>(\n\tviewModel: ILankaReadableVM<TState>,\n): TLankaVMAccessor<TState>;\n\nexport function useLankaVM<TState extends object, TSelected>(\n\tviewModel: ILankaReadableVM<TState>,\n\tselector: (state: TState) => TSelected,\n): TLankaVMAccessor<TSelected>;\n\nexport function useLankaVM<TState extends object, TSelected>(\n\tviewModel: ILankaReadableVM<TState>,\n\tselector?: (state: TState) => TSelected,\n): TLankaVMAccessor<TState | TSelected> {\n\tconst tracker = createLankaAccessTracker(viewModel);\n\tconst read = (): TState | TSelected =>\n\t\tselector ? selector(viewModel.getState()) : tracker.read();\n\n\t// `equals: false` because a tracked read hands back the SAME proxy while the\n\t// state object is unchanged, and Solid compares by identity — so setting it\n\t// would be a no-op exactly when the tracker did its job. What decides whether\n\t// anything happens is `shouldNotify` below, which is the framework's answer\n\t// rather than the signal's.\n\tconst [state, setState] = createSignal<TState | TSelected>(read(), { equals: false });\n\n\tconst stop = viewModel.subscribe((next, prev) => {\n\t\tif (selector) {\n\t\t\tconst picked = read();\n\n\t\t\t// Only when the SELECTION moved. The signal is `equals: false`, so\n\t\t\t// setting it always wakes — which is right for a tracked read and wrong\n\t\t\t// for a selected one, and is what the suite's selector scenes refuse.\n\t\t\tif (Object.is(picked, state())) return;\n\n\t\t\tsetState(() => picked);\n\n\t\t\treturn;\n\t\t}\n\n\t\tif (!tracker.shouldNotify(next, prev)) {\n\t\t\t// No update will follow. If the changed key is linked to this reader\n\t\t\t// through a getter it read, the screen froze — and in development core\n\t\t\t// says so by name.\n\t\t\ttracker.reportSkipped(next, prev);\n\t\t\treturn;\n\t\t}\n\n\t\tsetState(() => read());\n\t});\n\tconst accessor = state as TLankaVMAccessor<TState | TSelected>;\n\taccessor.stop = stop;\n\n\t// Inside a component or a root, Solid owns the lifetime and the subscription\n\t// goes with it. Outside one there is no owner, and `onCleanup` would warn —\n\t// so the caller keeps `stop`.\n\tif (getOwner()) onCleanup(stop);\n\n\treturn accessor;\n}\n"],"mappings":";;;AAAA,SAAS,cAAc,UAAU,iBAAiB;AAClD,SAAS,mCAAmC;AA2B5C,IAAM,oBAAoB,CACzB,SACA,UAC2B;AAAA,EAC3B,KAAK,CAAC,SAAS,QAAS,QAAQ,UAAU,OAAO,QAAQ,IAAI,QAAQ,GAAG,GAAG;AAAA,EAE3E,KAAK,CAAC,SAAS,QAAQ,QAAQ,WAAW,OAAO,QAAQ;AAAA,EAEzD,SAAS,MAAM,QAAQ,QAAQ,QAAQ,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWxC,0BAA0B,CAAC,SAAS,QACnC,QAAQ,UACL,EAAE,OAAO,MAAM,cAAc,MAAM,YAAY,OAAO,UAAU,MAAM,IACtE,EAAE,GAAG,QAAQ,yBAAyB,QAAQ,GAAG,GAAG,GAAG,cAAc,KAAK;AAC/E;AAyCO,IAAM,iBAAiB,CAC7B,cAC2B;AAC3B,QAAM,CAAC,SAAS,UAAU,IAAI,aAAa,CAAC;AAE5C,QAAM,OAAO,4BAA4B,WAAW,MAAM;AACzD,eAAW,CAAC,SAAS,OAAO,CAAC;AAAA,EAC9B,CAAC;AAID,MAAI,SAAS,EAAG,WAAU,KAAK,IAAI;AAEnC,QAAM,UAAU,MAAc;AAI7B,SAAK,QAAQ;AAEb,WAAO,KAAK,KAAK;AAAA,EAClB;AAEA,SAAO,IAAI,MAAM,CAAC,GAA4B,kBAAkB,SAAS,KAAK,IAAI,CAAC;AACpF;;;ACnHA,SAAS,gBAAAA,eAAc,YAAAC,WAAU,aAAAC,kBAAiB;AAClD,SAAS,gCAAgC;AA4DlC,SAAS,WACf,WACA,UACuC;AACvC,QAAM,UAAU,yBAAyB,SAAS;AAClD,QAAM,OAAO,MACZ,WAAW,SAAS,UAAU,SAAS,CAAC,IAAI,QAAQ,KAAK;AAO1D,QAAM,CAAC,OAAO,QAAQ,IAAIF,cAAiC,KAAK,GAAG,EAAE,QAAQ,MAAM,CAAC;AAEpF,QAAM,OAAO,UAAU,UAAU,CAAC,MAAM,SAAS;AAChD,QAAI,UAAU;AACb,YAAM,SAAS,KAAK;AAKpB,UAAI,OAAO,GAAG,QAAQ,MAAM,CAAC,EAAG;AAEhC,eAAS,MAAM,MAAM;AAErB;AAAA,IACD;AAEA,QAAI,CAAC,QAAQ,aAAa,MAAM,IAAI,GAAG;AAItC,cAAQ,cAAc,MAAM,IAAI;AAChC;AAAA,IACD;AAEA,aAAS,MAAM,KAAK,CAAC;AAAA,EACtB,CAAC;AACD,QAAM,WAAW;AACjB,WAAS,OAAO;AAKhB,MAAIC,UAAS,EAAG,CAAAC,WAAU,IAAI;AAE9B,SAAO;AACR;","names":["createSignal","getOwner","onCleanup"]}
1
+ {"version":3,"sources":["../src/to-lanka-solid-vm/toLankaSolidVM.ts","../src/use-lanka-vm/useLankaVM.ts"],"sourcesContent":["import { createSignal, getOwner, onCleanup } from \"solid-js\";\nimport { createLankaViewSubscription } from \"lanka/extend\";\nimport type { ILankaReadableVM } from \"lanka/viewmodel\";\n\n/**\n * A ViewModel read the way Solid reads shared state.\n *\n * The state's own members, directly, plus the one meta member a caller needs.\n * `$`-prefixed so it cannot collide with a state key, which is the same reason\n * Solid's own stores keep their helpers off the object.\n *\n * Called a ViewModel and not a store, deliberately: `createStore` is Solid's\n * noun for the shape, and what holds the state, the actions and the scenario\n * bindings is the ViewModel.\n */\nexport type TLankaSolidVM<TState extends object> = TState & {\n\t/** Releases the subscription. Rarely needed: an owner does it. */\n\t$stop: () => void;\n};\n\n/**\n * How the store answers for the ViewModel behind it.\n *\n * Its own function, because the traps are the whole mechanism and the factory\n * above is then the subscription and the Proxy. Read together they were sixty\n * lines whose shape said \"a function doing two things\", which is what the\n * composition canon calls it.\n */\nconst readsTheViewModel = <TState extends object, TStore extends object>(\n\tcurrent: () => TState,\n\tstop: () => void,\n): ProxyHandler<TStore> => ({\n\tget: (_target, key) => (key === \"$stop\" ? stop : Reflect.get(current(), key)),\n\n\thas: (_target, key) => key === \"$stop\" || key in current(),\n\n\townKeys: () => Reflect.ownKeys(current()),\n\n\t/*\n\t * Reported as configurable, always.\n\t *\n\t * A Proxy must not claim a non-configurable descriptor its target lacks — the\n\t * runtime throws. The target here is a bare object while the keys live on the\n\t * state, so every descriptor this hands back is invented and must say it can be\n\t * redefined. Without it `{ ...store }` and `Object.keys(store)` throw rather\n\t * than read, and a devtool does one of them on sight.\n\t */\n\tgetOwnPropertyDescriptor: (_target, key) =>\n\t\tkey === \"$stop\"\n\t\t\t? { value: stop, configurable: true, enumerable: false, writable: false }\n\t\t\t: { ...Reflect.getOwnPropertyDescriptor(current(), key), configurable: true },\n});\n\n/**\n * Reads a ViewModel the way Solid reads an object, with no call on the outside.\n *\n * ```tsx\n * const todos = toLankaSolidVM(todosVM);\n *\n * <For each={todos.rows}>{(row) => <li>{row}</li>}</For>\n * ```\n *\n * ## Why this exists beside `useLankaVM`\n *\n * `useLankaVM` answers an `Accessor`, which is Solid's own shape for a value and\n * the one every other binding on the shelf parallels: `state().rows`. It is also\n * not how Solid holds an OBJECT. `createStore` gives a proxy read as `state.rows`\n * — no call, and the read itself is the subscription — and that is what a Solid\n * codebase has in it. A consumer with that habit writes `todos.rows`, gets\n * `undefined`, and learns that lanka is a foreign object.\n *\n * ## The read is the subscription, in both graphs at once\n *\n * A read goes through the access tracker, which records the key, AND through the\n * signal, which registers the surrounding computation with Solid. One access,\n * two graphs — the same alignment the Svelte binding gets from getters, and the\n * reason neither of them needs a diff.\n *\n * The signal holds a VERSION rather than the state. A tracked read hands back the\n * same proxy while the state object is unchanged, and Solid compares by identity,\n * so a signal holding the state would be a no-op exactly when the tracker did its\n * job — and a signal holding the state is also a SNAPSHOT, which is wrong for\n * something read from ordinary code at arbitrary moments. `store.load()` followed\n * by `store.rows` is the shape that settles it.\n *\n * ## What it is not\n *\n * Not `createStore`. Solid's store is a write path as well as a read one, and a\n * ViewModel's writes belong to its actions — `setStore` beside them would be a\n * second place state changes. This is the read half, which is the half a screen\n * has.\n */\nexport const toLankaSolidVM = <TState extends object>(\n\tviewModel: ILankaReadableVM<TState>,\n): TLankaSolidVM<TState> => {\n\tconst [version, setVersion] = createSignal(0);\n\n\tconst view = createLankaViewSubscription(viewModel, () => {\n\t\tsetVersion((seen) => seen + 1);\n\t});\n\n\t// An owner is a component or a `createRoot`. Outside one there is nothing to\n\t// attach to and `onCleanup` would warn, so the caller keeps `$stop`.\n\tif (getOwner()) onCleanup(view.stop);\n\n\tconst current = (): TState => {\n\t\t// Read for the DEPENDENCY, discard the number. A computation reading\n\t\t// `store.rows` must re-run when the version moves, and the version is the\n\t\t// only signal in here.\n\t\tvoid version();\n\n\t\treturn view.read();\n\t};\n\n\treturn new Proxy({} as TLankaSolidVM<TState>, readsTheViewModel(current, view.stop));\n};\n","import { createSignal, getOwner, onCleanup } from \"solid-js\";\nimport { createLankaAccessTracker } from \"lanka/extend\";\nimport type { Accessor } from \"solid-js\";\nimport type { ILankaReadableVM } from \"lanka/viewmodel\";\n\n/** A ViewModel read from Solid: an accessor, and a way to stop reading it. */\nexport type TLankaVMAccessor<TValue> = Accessor<TValue> & {\n\t/**\n\t * Releases the subscription.\n\t *\n\t * Called for you by `onCleanup` inside a component or a root. It is published\n\t * because a read made where there is no owner — module level, a test — has\n\t * nobody to call it, and Solid warns about that case rather than handling it.\n\t */\n\tstop: () => void;\n};\n\n/**\n * Reads a ViewModel from Solid.\n *\n * ```tsx\n * export const TodoScreen = () => {\n * \tconst state = useLankaVM(todoVM);\n *\n * \treturn <For each={state().todos}>{(todo) => <li>{todo.title}</li>}</For>;\n * };\n * ```\n *\n * Without a selector the accessor answers a Proxy that records which keys were\n * read, and the signal changes only when one of THOSE moves. With a selector the\n * selector decides and tracking is bypassed.\n *\n * ## Why tracking still earns its place here\n *\n * Solid already skips work a signal did not feed, so a coarse binding would be\n * less wrong here than elsewhere. It would still be wrong: without tracking every\n * change writes a new object into the signal, and every effect reading ANY part\n * of it re-runs. The tracker is what keeps the signal UNCHANGED when nothing a\n * reader looked at moved — and an unchanged signal is work Solid never starts.\n *\n * ## What \"a render\" means in a framework that has none\n *\n * A Solid component runs once; what updates is the DOM node that read the signal.\n * So there is nothing here that corresponds to a re-render, and the conformance\n * suite's `renders()` counts the reading effect's runs instead — which is the\n * closest question this framework can be asked.\n *\n * ## What this function does NOT contain\n *\n * The recording, the comparison and the blind-spot warning are in core. If this\n * file ever needs more than the port gives it, the port has the defect.\n */\nexport function useLankaVM<TState extends object>(\n\tviewModel: ILankaReadableVM<TState>,\n): TLankaVMAccessor<TState>;\n\nexport function useLankaVM<TState extends object, TSelected>(\n\tviewModel: ILankaReadableVM<TState>,\n\tselector: (state: TState) => TSelected,\n): TLankaVMAccessor<TSelected>;\n\nexport function useLankaVM<TState extends object, TSelected>(\n\tviewModel: ILankaReadableVM<TState>,\n\tselector?: (state: TState) => TSelected,\n): TLankaVMAccessor<TState | TSelected> {\n\tconst tracker = createLankaAccessTracker(viewModel);\n\tconst read = (): TState | TSelected =>\n\t\tselector ? selector(viewModel.getState()) : tracker.read();\n\n\t// `equals: false` because a tracked read hands back the SAME proxy while the\n\t// state object is unchanged, and Solid compares by identity — so setting it\n\t// would be a no-op exactly when the tracker did its job. What decides whether\n\t// anything happens is `shouldNotify` below, which is the framework's answer\n\t// rather than the signal's.\n\tconst [state, setState] = createSignal<TState | TSelected>(read(), { equals: false });\n\n\tconst stop = viewModel.subscribe((next, prev) => {\n\t\tif (selector) {\n\t\t\tconst picked = read();\n\n\t\t\t// Only when the SELECTION moved. The signal is `equals: false`, so\n\t\t\t// setting it always wakes — which is right for a tracked read and wrong\n\t\t\t// for a selected one, and is what the suite's selector scenes refuse.\n\t\t\tif (Object.is(picked, state())) return;\n\n\t\t\tsetState(() => picked);\n\n\t\t\treturn;\n\t\t}\n\n\t\tif (!tracker.shouldNotify(next, prev)) {\n\t\t\t// No update will follow. If the changed key is linked to this reader\n\t\t\t// through a getter it read, the screen froze — and in development core\n\t\t\t// says so by name.\n\t\t\ttracker.reportSkipped(next, prev);\n\t\t\treturn;\n\t\t}\n\n\t\tsetState(() => read());\n\t});\n\tconst accessor = state as TLankaVMAccessor<TState | TSelected>;\n\taccessor.stop = stop;\n\n\t// Inside a component or a root, Solid owns the lifetime and the subscription\n\t// goes with it. Outside one there is no owner, and `onCleanup` would warn —\n\t// so the caller keeps `stop`.\n\tif (getOwner()) onCleanup(stop);\n\n\treturn accessor;\n}\n"],"mappings":";AAAA,SAAS,cAAc,UAAU,iBAAiB;AAClD,SAAS,mCAAmC;AA2B5C,IAAM,oBAAoB,CACzB,SACA,UAC2B;AAAA,EAC3B,KAAK,CAAC,SAAS,QAAS,QAAQ,UAAU,OAAO,QAAQ,IAAI,QAAQ,GAAG,GAAG;AAAA,EAE3E,KAAK,CAAC,SAAS,QAAQ,QAAQ,WAAW,OAAO,QAAQ;AAAA,EAEzD,SAAS,MAAM,QAAQ,QAAQ,QAAQ,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWxC,0BAA0B,CAAC,SAAS,QACnC,QAAQ,UACL,EAAE,OAAO,MAAM,cAAc,MAAM,YAAY,OAAO,UAAU,MAAM,IACtE,EAAE,GAAG,QAAQ,yBAAyB,QAAQ,GAAG,GAAG,GAAG,cAAc,KAAK;AAC/E;AAyCO,IAAM,iBAAiB,CAC7B,cAC2B;AAC3B,QAAM,CAAC,SAAS,UAAU,IAAI,aAAa,CAAC;AAE5C,QAAM,OAAO,4BAA4B,WAAW,MAAM;AACzD,eAAW,CAAC,SAAS,OAAO,CAAC;AAAA,EAC9B,CAAC;AAID,MAAI,SAAS,EAAG,WAAU,KAAK,IAAI;AAEnC,QAAM,UAAU,MAAc;AAI7B,SAAK,QAAQ;AAEb,WAAO,KAAK,KAAK;AAAA,EAClB;AAEA,SAAO,IAAI,MAAM,CAAC,GAA4B,kBAAkB,SAAS,KAAK,IAAI,CAAC;AACpF;;;ACnHA,SAAS,gBAAAA,eAAc,YAAAC,WAAU,aAAAC,kBAAiB;AAClD,SAAS,gCAAgC;AA4DlC,SAAS,WACf,WACA,UACuC;AACvC,QAAM,UAAU,yBAAyB,SAAS;AAClD,QAAM,OAAO,MACZ,WAAW,SAAS,UAAU,SAAS,CAAC,IAAI,QAAQ,KAAK;AAO1D,QAAM,CAAC,OAAO,QAAQ,IAAIF,cAAiC,KAAK,GAAG,EAAE,QAAQ,MAAM,CAAC;AAEpF,QAAM,OAAO,UAAU,UAAU,CAAC,MAAM,SAAS;AAChD,QAAI,UAAU;AACb,YAAM,SAAS,KAAK;AAKpB,UAAI,OAAO,GAAG,QAAQ,MAAM,CAAC,EAAG;AAEhC,eAAS,MAAM,MAAM;AAErB;AAAA,IACD;AAEA,QAAI,CAAC,QAAQ,aAAa,MAAM,IAAI,GAAG;AAItC,cAAQ,cAAc,MAAM,IAAI;AAChC;AAAA,IACD;AAEA,aAAS,MAAM,KAAK,CAAC;AAAA,EACtB,CAAC;AACD,QAAM,WAAW;AACjB,WAAS,OAAO;AAKhB,MAAIC,UAAS,EAAG,CAAAC,WAAU,IAAI;AAE9B,SAAO;AACR;","names":["createSignal","getOwner","onCleanup"]}