@opentui/solid 0.3.4 → 0.4.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/components.js +106 -4
- package/components.js.map +10 -0
- package/index.bun.js +1609 -0
- package/index.bun.js.map +22 -0
- package/index.d.ts +1 -1
- package/index.js +146 -72
- package/index.js.map +22 -0
- package/jsx-dev-runtime.d.ts +1 -0
- package/jsx-dev-runtime.js +2 -0
- package/jsx-dev-runtime.js.map +1 -0
- package/jsx-runtime.d.ts +9 -6
- package/jsx-runtime.js +31 -0
- package/jsx-runtime.js.map +1 -0
- package/package.json +27 -9
- package/scripts/preload.js +3 -0
- package/scripts/preload.js.map +1 -0
- package/scripts/preload.node.js +9 -0
- package/scripts/runtime-plugin-support-configure.js +67 -0
- package/scripts/runtime-plugin-support-configure.js.map +1 -0
- package/scripts/runtime-plugin-support-configure.node.js +11 -0
- package/scripts/runtime-plugin-support.js +4 -0
- package/scripts/runtime-plugin-support.js.map +1 -0
- package/scripts/runtime-plugin-support.node.js +11 -0
- package/scripts/solid-plugin.d.ts +1 -1
- package/scripts/solid-plugin.js +76 -0
- package/scripts/solid-plugin.js.map +1 -0
- package/scripts/solid-plugin.node.js +21 -0
- package/scripts/solid-transform.d.ts +10 -0
- package/scripts/solid-transform.js +66 -0
- package/scripts/solid-transform.js.map +1 -0
- package/src/elements/extras.d.ts +2 -2
- package/src/testing/bun-test-node.d.ts +12 -0
- package/src/types/elements.d.ts +1 -1
- package/chunk-7fkmdv3h.js +0 -110
- package/dist/chunk-7fkmdv3h.d.ts +0 -81
- package/dist/index.d.ts +0 -118
- package/scripts/preload.ts +0 -3
- package/scripts/runtime-plugin-support-configure.ts +0 -109
- package/scripts/runtime-plugin-support.ts +0 -6
- package/scripts/solid-plugin.ts +0 -148
package/index.js.map
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["index.ts", "src/elements/catalogue.ts", "src/elements/hooks.ts", "src/elements/extras.ts", "src/reconciler.ts", "src/renderer/universal.js", "src/renderer/index.ts", "src/utils/id-counter.ts", "src/utils/log.ts", "src/elements/slot.ts", "src/scrollback.ts", "src/time-to-first-draw.tsx", "src/plugins/slot.tsx"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"import { CliRenderer, createCliRenderer, engine } from \"@opentui/core\";\nimport { createTestRenderer } from \"@opentui/core/testing\";\nimport { RendererContext } from \"./src/elements/index.js\";\nimport { _render as renderInternal, createComponent } from \"./src/reconciler.js\";\nconst mountSolidRoot = (renderer, node) => {\n let dispose;\n let disposeRequested = false;\n let disposed = false;\n let mounting = true;\n let destroyRequested = false;\n const originalDestroy = renderer.destroy.bind(renderer);\n const runDispose = () => {\n if (disposed) {\n return;\n }\n if (!dispose) {\n disposeRequested = true;\n return;\n }\n disposed = true;\n dispose();\n };\n renderer.once(\"destroy\", runDispose);\n renderer.destroy = () => {\n if (mounting) {\n destroyRequested = true;\n return;\n }\n originalDestroy();\n };\n try {\n dispose = renderInternal(() => createComponent(RendererContext.Provider, {\n get value() {\n return renderer;\n },\n get children() {\n return createComponent(node, {});\n }\n }), renderer.root);\n } finally {\n mounting = false;\n renderer.destroy = originalDestroy;\n }\n if (disposeRequested) {\n runDispose();\n }\n if (destroyRequested) {\n originalDestroy();\n }\n};\nexport const render = async (node, rendererOrConfig = {}) => {\n const renderer = rendererOrConfig instanceof CliRenderer ? rendererOrConfig : await createCliRenderer({\n ...rendererOrConfig,\n onDestroy: () => {\n rendererOrConfig.onDestroy?.();\n }\n });\n engine.attach(renderer);\n mountSolidRoot(renderer, node);\n};\nexport const testRender = async (node, renderConfig = {}) => {\n const testSetup = await createTestRenderer({\n ...renderConfig,\n onDestroy: () => {\n renderConfig.onDestroy?.();\n }\n });\n engine.attach(testSetup.renderer);\n mountSolidRoot(testSetup.renderer, node);\n return testSetup;\n};\nexport * from \"./src/reconciler.js\";\nexport * from \"./src/elements/index.js\";\nexport * from \"./src/scrollback.js\";\nexport * from \"./src/time-to-first-draw.js\";\nexport * from \"./src/plugins/slot.js\";\nexport * from \"./src/types/elements.js\";",
|
|
6
|
+
"import { ASCIIFontRenderable, BoxRenderable, CodeRenderable, DiffRenderable, InputRenderable, LineNumberRenderable, MarkdownRenderable, ScrollBoxRenderable, SelectRenderable, TabSelectRenderable, TextareaRenderable, TextAttributes, TextNodeRenderable, TextRenderable } from \"@opentui/core\";\nclass SpanRenderable extends TextNodeRenderable {\n constructor(_ctx, options) {\n super(options);\n this._ctx = _ctx;\n }\n}\nexport const textNodeKeys = [\"span\", \"b\", \"strong\", \"i\", \"em\", \"u\", \"a\"];\nclass TextModifierRenderable extends SpanRenderable {\n constructor(options, modifier) {\n super(null, options);\n\n // Set appropriate attributes based on modifier type\n if (modifier === \"b\" || modifier === \"strong\") {\n this.attributes = (this.attributes || 0) | TextAttributes.BOLD;\n } else if (modifier === \"i\" || modifier === \"em\") {\n this.attributes = (this.attributes || 0) | TextAttributes.ITALIC;\n } else if (modifier === \"u\") {\n this.attributes = (this.attributes || 0) | TextAttributes.UNDERLINE;\n }\n }\n}\nexport class BoldSpanRenderable extends TextModifierRenderable {\n constructor(options) {\n super(options, \"b\");\n }\n}\nexport class ItalicSpanRenderable extends TextModifierRenderable {\n constructor(options) {\n super(options, \"i\");\n }\n}\nexport class UnderlineSpanRenderable extends TextModifierRenderable {\n constructor(options) {\n super(options, \"u\");\n }\n}\nexport class LineBreakRenderable extends SpanRenderable {\n constructor(_ctx, options) {\n super(null, options);\n this.add();\n }\n add() {\n return super.add(\"\\n\");\n }\n}\nexport class LinkRenderable extends SpanRenderable {\n constructor(_ctx, options) {\n const linkOptions = {\n ...options,\n link: {\n url: options.href\n }\n };\n super(null, linkOptions);\n }\n}\nexport const baseComponents = {\n box: BoxRenderable,\n text: TextRenderable,\n input: InputRenderable,\n select: SelectRenderable,\n textarea: TextareaRenderable,\n ascii_font: ASCIIFontRenderable,\n tab_select: TabSelectRenderable,\n scrollbox: ScrollBoxRenderable,\n code: CodeRenderable,\n diff: DiffRenderable,\n line_number: LineNumberRenderable,\n markdown: MarkdownRenderable,\n span: SpanRenderable,\n strong: BoldSpanRenderable,\n b: BoldSpanRenderable,\n em: ItalicSpanRenderable,\n i: ItalicSpanRenderable,\n u: UnderlineSpanRenderable,\n br: LineBreakRenderable,\n a: LinkRenderable\n};\nexport const componentCatalogue = {\n ...baseComponents\n};\n\n/**\n * Extend the component catalogue with new renderable components\n *\n * @example\n * ```tsx\n * // Extend with an object of components\n * extend({\n * consoleButton: ButtonRenderable,\n * customBox: CustomBoxRenderable\n * })\n * ```\n */\nexport function extend(objects) {\n Object.assign(componentCatalogue, objects);\n}\nexport function getComponentCatalogue() {\n return componentCatalogue;\n}",
|
|
7
|
+
"import { engine, Timeline } from \"@opentui/core\";\nimport { createContext, createSignal, onCleanup, onMount, useContext } from \"solid-js/dist/solid.js\";\nexport const RendererContext = createContext();\nexport const useRenderer = () => {\n const renderer = useContext(RendererContext);\n if (!renderer) {\n throw new Error(\"No renderer found\");\n }\n return renderer;\n};\nexport const onResize = callback => {\n const renderer = useRenderer();\n onMount(() => {\n renderer.on(\"resize\", callback);\n });\n onCleanup(() => {\n renderer.off(\"resize\", callback);\n });\n};\nexport const useTerminalDimensions = () => {\n const renderer = useRenderer();\n const [terminalDimensions, setTerminalDimensions] = createSignal({\n width: renderer.width,\n height: renderer.height\n });\n const callback = (width, height) => {\n setTerminalDimensions({\n width,\n height\n });\n };\n onResize(callback);\n return terminalDimensions;\n};\n/**\n * Subscribe to keyboard events.\n *\n * By default, only receives press events (including key repeats with `repeated: true`).\n * Use `options.release` to also receive release events.\n *\n * @example\n * // Basic press handling (includes repeats)\n * useKeyboard((e) => console.log(e.name, e.repeated ? \"(repeat)\" : \"\"))\n *\n * // With release events\n * useKeyboard((e) => {\n * if (e.eventType === \"release\") keys.delete(e.name)\n * else keys.add(e.name)\n * }, { release: true })\n */\nexport const useKeyboard = (callback, options) => {\n const renderer = useRenderer();\n const keyHandler = renderer.keyInput;\n onMount(() => {\n keyHandler.on(\"keypress\", callback);\n if (options?.release) {\n keyHandler.on(\"keyrelease\", callback);\n }\n });\n onCleanup(() => {\n keyHandler.off(\"keypress\", callback);\n if (options?.release) {\n keyHandler.off(\"keyrelease\", callback);\n }\n });\n};\nexport const usePaste = callback => {\n const renderer = useRenderer();\n const keyHandler = renderer.keyInput;\n onMount(() => {\n keyHandler.on(\"paste\", callback);\n });\n onCleanup(() => {\n keyHandler.off(\"paste\", callback);\n });\n};\n\n/**\n * @deprecated renamed to useKeyboard\n */\nexport const useKeyHandler = useKeyboard;\nexport const onFocus = callback => {\n const renderer = useRenderer();\n onMount(() => {\n renderer.on(\"focus\", callback);\n });\n onCleanup(() => {\n renderer.off(\"focus\", callback);\n });\n};\nexport const onBlur = callback => {\n const renderer = useRenderer();\n onMount(() => {\n renderer.on(\"blur\", callback);\n });\n onCleanup(() => {\n renderer.off(\"blur\", callback);\n });\n};\nexport const useSelectionHandler = callback => {\n const renderer = useRenderer();\n onMount(() => {\n renderer.on(\"selection\", callback);\n });\n onCleanup(() => {\n renderer.off(\"selection\", callback);\n });\n};\nexport const useTimeline = (options = {}) => {\n const timeline = new Timeline(options);\n onMount(() => {\n if (options.autoplay !== false) {\n timeline.play();\n }\n engine.register(timeline);\n });\n onCleanup(() => {\n timeline.pause();\n engine.unregister(timeline);\n });\n return timeline;\n};",
|
|
8
|
+
"import { createEffect, createMemo, getOwner, onCleanup, runWithOwner, splitProps, untrack } from \"solid-js/dist/solid.js\";\nimport { createSlotNode, createElement, insert, spread } from \"../reconciler.js\";\nimport { useRenderer } from \"./hooks.js\";\n\n/**\n * Renders components somewhere else in the DOM\n *\n * Useful for inserting modals and tooltips outside of an cropping layout. If no mount point is given, the portal is inserted on the root renderable; it is wrapped in a `<box>`\n *\n * @description https://docs.solidjs.com/reference/components/portal\n */\nexport function Portal(props) {\n const renderer = useRenderer();\n const marker = createSlotNode(),\n mount = () => props.mount || renderer.root,\n owner = getOwner();\n let content;\n createEffect(() => {\n // basically we backdoor into a sort of renderEffect here\n content || (content = runWithOwner(owner, () => createMemo(() => props.children)));\n const el = mount();\n const container = createElement(\"box\"),\n renderRoot = container;\n Object.defineProperty(container, \"_$host\", {\n get() {\n return marker.parent;\n },\n configurable: true\n });\n insert(renderRoot, content);\n el.add(container);\n props.ref && props.ref(container);\n onCleanup(() => el.remove(container.id));\n }, undefined, {\n render: true\n });\n // The reconciler consumes this marker as the runtime representation of the portal JSX node.\n return marker;\n}\n/**\n * Renders an arbitrary component or element with the given props\n *\n * This is a lower level version of the `Dynamic` component, useful for\n * performance optimizations in libraries. Do not use this unless you know\n * what you are doing.\n * ```typescript\n * const element = () => multiline() ? 'textarea' : 'input';\n * createDynamic(element, { value: value() });\n * ```\n * @description https://docs.solidjs.com/reference/components/dynamic\n */\nexport function createDynamic(component, props) {\n const cached = createMemo(component);\n return createMemo(() => {\n const component = cached();\n switch (typeof component) {\n case \"function\":\n // if (isDev) Object.assign(component, { [$DEVCOMP]: true })\n return untrack(() => component(props));\n case \"string\":\n const el = createElement(component);\n spread(el, props);\n return el;\n default:\n break;\n }\n });\n}\n\n/**\n * Renders an arbitrary custom or native component and passes the other props\n * ```typescript\n * <Dynamic component={multiline() ? 'textarea' : 'input'} value={value()} />\n * ```\n * @description https://docs.solidjs.com/reference/components/dynamic\n */\nexport function Dynamic(props) {\n const [, others] = splitProps(props, [\"component\"]);\n return createDynamic(() => props.component, others);\n}",
|
|
9
|
+
"/* @refresh skip */\nimport { BaseRenderable, createTextAttributes, InputRenderable, InputRenderableEvents, isTextNodeRenderable, parseColor, Renderable, RootTextNodeRenderable, ScrollBoxRenderable, SelectRenderable, SelectRenderableEvents, TabSelectRenderable, TabSelectRenderableEvents, TextNodeRenderable, TextRenderable } from \"@opentui/core\";\nimport { decodeHTML } from \"entities\";\nimport { useContext } from \"solid-js/dist/solid.js\";\nimport { createRenderer } from \"./renderer/index.js\";\nimport { getComponentCatalogue, RendererContext, SlotRenderable } from \"./elements/index.js\";\nimport { getNextId } from \"./utils/id-counter.js\";\nimport { log } from \"./utils/log.js\";\nclass TextNode extends TextNodeRenderable {\n static fromString(text, options = {}) {\n const node = new TextNode(options);\n node.add(text);\n return node;\n }\n}\n/**\n * Gets the id of a node, or content if it's a text chunk.\n * Intended for use in logging.\n * @param node The node to get the id of.\n * @returns Log-friendly id of the node.\n */\nconst logId = node => {\n if (!node) return undefined;\n return node.id;\n};\nconst getNodeChildren = node => {\n let children;\n if (node instanceof TextRenderable) {\n children = node.getTextChildren();\n } else {\n children = node.getChildren();\n }\n return children;\n};\nfunction _insertNode(parent, node, anchor) {\n log(\"Inserting node:\", logId(node), \"into parent:\", logId(parent), \"with anchor:\", logId(anchor), node instanceof TextNode);\n if (node instanceof SlotRenderable) {\n node.parent = parent;\n node = node.getSlotChild(parent);\n }\n if (anchor && anchor instanceof SlotRenderable) {\n anchor = anchor.getSlotChild(parent);\n }\n if (isTextNodeRenderable(node)) {\n if (!(parent instanceof TextRenderable) && !isTextNodeRenderable(parent)) {\n throw new Error(`Orphan text error: \"${node.toChunks().map(c => c.text).join(\"\")}\" must have a <text> as a parent: ${parent.id} above ${node.id}`);\n }\n }\n\n // Renderable nodes\n if (!(parent instanceof BaseRenderable)) {\n console.error(\"[INSERT]\", \"Tried to mount a non base renderable\");\n // Can't be a noop, have to panic\n throw new Error(\"Tried to mount a non base renderable\");\n }\n if (!anchor) {\n parent.add(node);\n return;\n }\n const children = getNodeChildren(parent);\n const anchorIndex = children.findIndex(el => el.id === anchor.id);\n if (anchorIndex === -1) {\n log(\"[INSERT]\", \"Could not find anchor\", logId(parent), logId(anchor), \"[children]\", ...children.map(c => c.id));\n }\n parent.add(node, anchorIndex);\n}\nfunction _removeNode(parent, node) {\n log(\"Removing node:\", logId(node), \"from parent:\", logId(parent));\n let slotParent;\n if (node instanceof SlotRenderable) {\n slotParent = node;\n const slotChild = slotParent.getSlotChildForRemoval(parent);\n if (!slotChild) {\n if (slotParent.parent === parent) {\n slotParent.parent = null;\n }\n return;\n }\n node = slotChild;\n }\n parent.remove(node.id);\n slotParent?.didRemoveSlotChild(parent, node);\n process.nextTick(() => {\n if (node instanceof BaseRenderable && !node.parent) {\n node.destroyRecursively();\n return;\n }\n });\n}\nfunction _createTextNode(value) {\n log(\"Creating text node:\", value);\n const id = getNextId(\"text-node\");\n if (typeof value === \"number\") {\n value = value.toString();\n }\n return TextNode.fromString(decodeHTML(value), {\n id\n });\n}\nexport function createSlotNode() {\n const id = getNextId(\"slot-node\");\n log(\"Creating slot node\", id);\n return new SlotRenderable(id);\n}\nfunction _getParentNode(childNode) {\n log(\"Getting parent of node:\", logId(childNode));\n let parent = childNode.parent ?? undefined;\n if (parent instanceof RootTextNodeRenderable) {\n parent = parent.textParent ?? undefined;\n }\n // ScrollBox delegates add/remove to its internal `content` wrapper\n // (scrollbox → wrapper → viewport → content), so children report\n // `content` as their parent. Return the ScrollBox so the identity\n // check in cleanChildren (getParentNode(el) === parent) succeeds.\n const scrollBoxCandidate = parent?.parent?.parent?.parent;\n if (scrollBoxCandidate instanceof ScrollBoxRenderable && scrollBoxCandidate.content === parent) {\n parent = scrollBoxCandidate;\n }\n return parent;\n}\nexport const {\n render: _render,\n effect,\n memo,\n createComponent,\n createElement,\n createTextNode,\n insertNode,\n insert,\n spread,\n setProp,\n mergeProps,\n use\n} = createRenderer({\n createElement(tagName) {\n log(\"Creating element:\", tagName);\n const id = getNextId(tagName);\n const solidRenderer = useContext(RendererContext);\n if (!solidRenderer) {\n throw new Error(\"No renderer found\");\n }\n const elements = getComponentCatalogue();\n if (!elements[tagName]) {\n throw new Error(`[Reconciler] Unknown component type: ${tagName}`);\n }\n const element = new elements[tagName](solidRenderer, {\n id\n });\n log(\"Element created with id:\", id);\n return element;\n },\n createTextNode: _createTextNode,\n createSlotNode,\n replaceText(textNode, value) {\n log(\"Replacing text:\", value, \"in node:\", logId(textNode));\n if (!(textNode instanceof TextNode)) return;\n textNode.replace(decodeHTML(value), 0);\n },\n setProperty(node, name, value, prev) {\n if (name.startsWith(\"on:\")) {\n const eventName = name.slice(3);\n if (value) {\n node.on(eventName, value);\n }\n if (prev) {\n node.off(eventName, prev);\n }\n return;\n }\n if (isTextNodeRenderable(node)) {\n if (name === \"href\") {\n node.link = {\n url: value\n };\n return;\n }\n if (name === \"style\") {\n node.attributes |= createTextAttributes(value);\n node.fg = value.fg ? parseColor(value.fg) : node.fg;\n node.bg = value.bg ? parseColor(value.bg) : node.bg;\n return;\n }\n return;\n }\n switch (name) {\n case \"id\":\n log(\"Id mapped\", node.id, \"=\", value);\n node[name] = value;\n break;\n case \"focused\":\n if (!(node instanceof Renderable)) return;\n if (value) {\n node.focus();\n } else {\n node.blur();\n }\n break;\n case \"onChange\":\n let event = undefined;\n if (node instanceof SelectRenderable) {\n event = SelectRenderableEvents.SELECTION_CHANGED;\n } else if (node instanceof TabSelectRenderable) {\n event = TabSelectRenderableEvents.SELECTION_CHANGED;\n } else if (node instanceof InputRenderable) {\n event = InputRenderableEvents.CHANGE;\n }\n if (!event) break;\n if (value) {\n node.on(event, value);\n }\n if (prev) {\n node.off(event, prev);\n }\n break;\n case \"onInput\":\n if (node instanceof InputRenderable) {\n if (value) {\n node.on(InputRenderableEvents.INPUT, value);\n }\n if (prev) {\n node.off(InputRenderableEvents.INPUT, prev);\n }\n }\n break;\n case \"onSubmit\":\n if (node instanceof InputRenderable) {\n if (value) {\n node.on(InputRenderableEvents.ENTER, value);\n }\n if (prev) {\n node.off(InputRenderableEvents.ENTER, prev);\n }\n } else {\n // @ts-expect-error todo validate if prop is actually settable\n node[name] = value;\n }\n break;\n case \"onSelect\":\n if (node instanceof SelectRenderable) {\n if (value) {\n node.on(SelectRenderableEvents.ITEM_SELECTED, value);\n }\n if (prev) {\n node.off(SelectRenderableEvents.ITEM_SELECTED, prev);\n }\n } else if (node instanceof TabSelectRenderable) {\n if (value) {\n node.on(TabSelectRenderableEvents.ITEM_SELECTED, value);\n }\n if (prev) {\n node.off(TabSelectRenderableEvents.ITEM_SELECTED, prev);\n }\n }\n break;\n case \"style\":\n for (const prop in value) {\n const propVal = value[prop];\n if (prev !== undefined && propVal === prev[prop]) continue;\n // @ts-expect-error todo validate if prop is actually settable\n node[prop] = propVal;\n }\n break;\n case \"text\":\n case \"content\":\n {\n const textValue = typeof value === \"string\" ? value : Array.isArray(value) ? value.join(\"\") : `${value}`;\n // @ts-expect-error todo validate if prop is actually settable\n node[name] = decodeHTML(textValue);\n break;\n }\n default:\n // @ts-expect-error todo validate if prop is actually settable\n node[name] = value;\n }\n },\n isTextNode(node) {\n return node instanceof TextNode;\n },\n insertNode: _insertNode,\n removeNode: _removeNode,\n getParentNode: _getParentNode,\n getFirstChild(node) {\n log(\"Getting first child of node:\", logId(node));\n const firstChild = getNodeChildren(node)[0];\n if (!firstChild) {\n log(\"No first child found for node:\", logId(node));\n return undefined;\n }\n log(\"First child found:\", logId(firstChild), \"for node:\", logId(node));\n return firstChild;\n },\n getNextSibling(node) {\n log(\"Getting next sibling of node:\", logId(node));\n const parent = _getParentNode(node);\n if (!parent) {\n log(\"No parent found for node:\", logId(node));\n return undefined;\n }\n if (node instanceof SlotRenderable) {\n const layoutSlotNode = node.getSlotChildForRemoval(parent);\n if (layoutSlotNode) {\n node = layoutSlotNode;\n }\n }\n const siblings = getNodeChildren(parent);\n const index = siblings.indexOf(node);\n if (index === -1 || index === siblings.length - 1) {\n log(\"No next sibling found for node:\", logId(node));\n return undefined;\n }\n const nextSibling = siblings[index + 1];\n if (!nextSibling) {\n log(\"Next sibling is null for node:\", logId(node));\n return undefined;\n }\n log(\"Next sibling found:\", logId(nextSibling), \"for node:\", logId(node));\n return nextSibling;\n }\n});",
|
|
10
|
+
"import { createRoot, createRenderEffect, createMemo, createComponent, untrack, mergeProps } from \"solid-js/dist/solid.js\";\nconst memo = fn => createMemo(() => fn());\nexport function createRenderer({\n createElement,\n createTextNode,\n createSlotNode,\n isTextNode,\n replaceText,\n insertNode,\n removeNode,\n setProperty,\n getParentNode,\n getFirstChild,\n getNextSibling\n}) {\n function insert(parent, accessor, marker, initial) {\n if (marker !== undefined && !initial) initial = [];\n if (typeof accessor !== \"function\") return insertExpression(parent, accessor, initial, marker);\n createRenderEffect(current => insertExpression(parent, accessor(), current, marker), initial);\n }\n function insertExpression(parent, value, current, marker, unwrapArray) {\n while (typeof current === \"function\") current = current();\n if (value === current) return current;\n const t = typeof value,\n multi = marker !== undefined;\n if (t === \"string\" || t === \"number\") {\n if (t === \"number\") value = value.toString();\n if (multi) {\n let node = current[0];\n if (node && isTextNode(node)) {\n replaceText(node, value);\n } else node = createTextNode(value);\n current = cleanChildren(parent, current, marker, node);\n } else {\n if (current !== \"\" && typeof current === \"string\") {\n replaceText(getFirstChild(parent), current = value);\n } else {\n cleanChildren(parent, current, marker, createTextNode(value));\n current = value;\n }\n }\n } else if (value == null || t === \"boolean\") {\n current = cleanChildren(parent, current, marker);\n } else if (t === \"function\") {\n createRenderEffect(() => {\n let v = value();\n while (typeof v === \"function\") v = v();\n current = insertExpression(parent, v, current, marker);\n });\n return () => current;\n } else if (Array.isArray(value)) {\n const array = [];\n if (normalizeIncomingArray(array, value, unwrapArray)) {\n createRenderEffect(() => current = insertExpression(parent, array, current, marker, true));\n return () => current;\n }\n if (array.length === 0) {\n const replacement = cleanChildren(parent, current, marker);\n if (multi) return current = replacement;\n } else {\n if (Array.isArray(current)) {\n if (current.length === 0) {\n appendNodes(parent, array, marker);\n } else reconcileArrays(parent, current, array);\n } else if (current == null || current === \"\") {\n appendNodes(parent, array);\n } else {\n reconcileArrays(parent, multi && current || [getFirstChild(parent)], array);\n }\n }\n current = array;\n } else {\n if (Array.isArray(current)) {\n if (multi) return current = cleanChildren(parent, current, marker, value);\n cleanChildren(parent, current, null, value);\n } else if (current == null || current === \"\" || !getFirstChild(parent)) {\n insertNode(parent, value);\n } else replaceNode(parent, value, getFirstChild(parent));\n current = value;\n }\n return current;\n }\n function normalizeIncomingArray(normalized, array, unwrap) {\n let dynamic = false;\n for (let i = 0, len = array.length; i < len; i++) {\n let item = array[i],\n t;\n if (item == null || item === true || item === false) ;else if (Array.isArray(item)) {\n dynamic = normalizeIncomingArray(normalized, item) || dynamic;\n } else if ((t = typeof item) === \"string\" || t === \"number\") {\n normalized.push(createTextNode(item));\n } else if (t === \"function\") {\n if (unwrap) {\n while (typeof item === \"function\") item = item();\n dynamic = normalizeIncomingArray(normalized, Array.isArray(item) ? item : [item]) || dynamic;\n } else {\n normalized.push(item);\n dynamic = true;\n }\n } else normalized.push(item);\n }\n return dynamic;\n }\n function reconcileArrays(parentNode, a, b) {\n let bLength = b.length,\n aEnd = a.length,\n bEnd = bLength,\n aStart = 0,\n bStart = 0,\n after = getNextSibling(a[aEnd - 1]),\n map = null;\n while (aStart < aEnd || bStart < bEnd) {\n if (a[aStart] === b[bStart]) {\n aStart++;\n bStart++;\n continue;\n }\n while (a[aEnd - 1] === b[bEnd - 1]) {\n aEnd--;\n bEnd--;\n }\n if (aEnd === aStart) {\n const node = bEnd < bLength ? bStart ? getNextSibling(b[bStart - 1]) : b[bEnd - bStart] : after;\n while (bStart < bEnd) insertNode(parentNode, b[bStart++], node);\n } else if (bEnd === bStart) {\n while (aStart < aEnd) {\n if (!map || !map.has(a[aStart])) removeNode(parentNode, a[aStart]);\n aStart++;\n }\n } else if (a[aStart] === b[bEnd - 1] && b[bStart] === a[aEnd - 1]) {\n const node = getNextSibling(a[--aEnd]);\n insertNode(parentNode, b[bStart++], getNextSibling(a[aStart++]));\n insertNode(parentNode, b[--bEnd], node);\n a[aEnd] = b[bEnd];\n } else {\n if (!map) {\n map = new Map();\n let i = bStart;\n while (i < bEnd) map.set(b[i], i++);\n }\n const index = map.get(a[aStart]);\n if (index != null) {\n if (bStart < index && index < bEnd) {\n let i = aStart,\n sequence = 1,\n t;\n while (++i < aEnd && i < bEnd) {\n if ((t = map.get(a[i])) == null || t !== index + sequence) break;\n sequence++;\n }\n if (sequence > index - bStart) {\n const node = a[aStart];\n while (bStart < index) insertNode(parentNode, b[bStart++], node);\n } else replaceNode(parentNode, b[bStart++], a[aStart++]);\n } else aStart++;\n } else removeNode(parentNode, a[aStart++]);\n }\n }\n }\n function cleanChildren(parent, current, marker, replacement) {\n if (marker === undefined) {\n let removed;\n while (removed = getFirstChild(parent)) removeNode(parent, removed);\n replacement && insertNode(parent, replacement);\n return replacement ?? \"\";\n }\n const node = replacement || createSlotNode();\n if (current.length) {\n let inserted = false;\n for (let i = current.length - 1; i >= 0; i--) {\n const el = current[i];\n if (node !== el) {\n const isParent = getParentNode(el) === parent;\n if (!inserted && !i) isParent ? replaceNode(parent, node, el) : insertNode(parent, node, marker);else isParent && removeNode(parent, el);\n } else inserted = true;\n }\n } else insertNode(parent, node, marker);\n return [node];\n }\n function appendNodes(parent, array, marker) {\n for (let i = 0, len = array.length; i < len; i++) insertNode(parent, array[i], marker);\n }\n function replaceNode(parent, newNode, oldNode) {\n insertNode(parent, newNode, oldNode);\n removeNode(parent, oldNode);\n }\n function spreadExpression(node, props, prevProps = {}, skipChildren) {\n props || (props = {});\n if (!skipChildren) {\n createRenderEffect(() => prevProps.children = insertExpression(node, props.children, prevProps.children));\n }\n createRenderEffect(() => props.ref && props.ref(node));\n createRenderEffect(() => {\n for (const prop in props) {\n if (prop === \"children\" || prop === \"ref\") continue;\n const value = props[prop];\n if (value === prevProps[prop]) continue;\n setProperty(node, prop, value, prevProps[prop]);\n prevProps[prop] = value;\n }\n });\n return prevProps;\n }\n return {\n render(code, element) {\n let disposer;\n createRoot(dispose => {\n disposer = dispose;\n insert(element, code());\n });\n return disposer;\n },\n insert,\n spread(node, accessor, skipChildren) {\n if (typeof accessor === \"function\") {\n createRenderEffect(current => spreadExpression(node, accessor(), current, skipChildren));\n } else spreadExpression(node, accessor, undefined, skipChildren);\n },\n createElement,\n createTextNode,\n insertNode,\n setProp(node, name, value, prev) {\n setProperty(node, name, value, prev);\n return value;\n },\n mergeProps,\n effect: createRenderEffect,\n memo,\n createComponent,\n use(fn, element, arg) {\n return untrack(() => fn(element, arg));\n }\n };\n}",
|
|
11
|
+
"import { createRenderer as createRendererDX } from \"./universal.js\";\nimport { mergeProps } from \"solid-js/dist/solid.js\";\nexport function createRenderer(options) {\n const renderer = createRendererDX(options);\n renderer.mergeProps = mergeProps;\n return renderer;\n}",
|
|
12
|
+
"const idCounter = new Map();\nexport function getNextId(elementType) {\n if (!idCounter.has(elementType)) {\n idCounter.set(elementType, 0);\n }\n const value = idCounter.get(elementType) + 1;\n idCounter.set(elementType, value);\n return `${elementType}-${value}`;\n}",
|
|
13
|
+
"export const log = (...args) => {\n if (process.env.DEBUG) {\n console.log(\"[Reconciler]\", ...args);\n }\n};",
|
|
14
|
+
"import { BaseRenderable, isTextNodeRenderable, TextNodeRenderable, TextRenderable, Yoga } from \"@opentui/core\";\nfunction getLayoutNodeConstructor(parent) {\n const parentLayoutNode = parent?.getLayoutNode?.();\n return parentLayoutNode?.constructor;\n}\nfunction createLayoutSlotYogaNode(parentNodeConstructor) {\n return parentNodeConstructor?.create?.() ?? Yoga.default.Node.create();\n}\nclass SlotBaseRenderable extends BaseRenderable {\n constructor(id) {\n super({\n id\n });\n }\n add(obj, index) {\n throw new Error(\"Can't add children on an Slot renderable\");\n }\n getChildren() {\n return [];\n }\n remove(id) {}\n insertBefore(obj, anchor) {\n throw new Error(\"Can't add children on an Slot renderable\");\n }\n getRenderable(id) {\n return undefined;\n }\n getChildrenCount() {\n return 0;\n }\n requestRender() {}\n findDescendantById(id) {\n return undefined;\n }\n}\nexport class TextSlotRenderable extends TextNodeRenderable {\n destroyed = false;\n constructor(id, parent) {\n super({\n id: id\n });\n this._visible = false;\n this.slotParent = parent;\n }\n detachFromSlot() {\n this.slotParent = undefined;\n }\n disposeWithoutSlotCascade() {\n if (this.destroyed) {\n return;\n }\n this.destroyed = true;\n this.detachFromSlot();\n }\n destroy() {\n if (this.destroyed) {\n return;\n }\n this.destroyed = true;\n const slotParent = this.slotParent;\n this.slotParent = undefined;\n slotParent?.destroy();\n super.destroy();\n }\n}\nexport class LayoutSlotRenderable extends SlotBaseRenderable {\n destroyed = false;\n yogaNodeFreed = false;\n constructor(id, parent, layoutParent) {\n super(id);\n this._visible = false;\n this.slotParent = parent;\n this.yogaNodeConstructor = getLayoutNodeConstructor(layoutParent);\n this.yogaNode = createLayoutSlotYogaNode(this.yogaNodeConstructor);\n this.yogaNode.setDisplay(Yoga.Display.None);\n }\n getLayoutNode() {\n return this.yogaNode;\n }\n updateFromLayout() {}\n updateLayout() {}\n onRemove() {}\n isCompatibleWith(layoutParent) {\n return this.yogaNodeConstructor === getLayoutNodeConstructor(layoutParent);\n }\n detachFromSlot() {\n this.slotParent = undefined;\n }\n freeYogaNode() {\n if (this.yogaNodeFreed) {\n return;\n }\n this.yogaNodeFreed = true;\n try {\n this.yogaNode.free();\n } catch {}\n }\n disposeWithoutSlotCascade() {\n if (this.destroyed) {\n return;\n }\n this.destroyed = true;\n this.detachFromSlot();\n this.freeYogaNode();\n }\n destroy() {\n if (this.destroyed) {\n return;\n }\n this.destroyed = true;\n const slotParent = this.slotParent;\n this.slotParent = undefined;\n this.freeYogaNode();\n slotParent?.destroy();\n }\n}\nexport class SlotRenderable extends SlotBaseRenderable {\n destroyed = false;\n layoutNodesByParent = new Map();\n textNodesByParent = new Map();\n layoutNodeCount = 0;\n textNodeCount = 0;\n constructor(id) {\n super(id);\n this._visible = false;\n }\n get layoutNode() {\n return this.getCurrentSlotChild(this.layoutNodesByParent);\n }\n get textNode() {\n return this.getCurrentSlotChild(this.textNodesByParent);\n }\n isTextSlotParent(parent) {\n return isTextNodeRenderable(parent) || parent instanceof TextRenderable;\n }\n getCurrentSlotChild(nodesByParent) {\n for (const node of nodesByParent.values()) {\n if (node.parent) {\n return node;\n }\n }\n return nodesByParent.values().next().value;\n }\n getTextNodeForParent(parent) {\n const mappedNode = this.textNodesByParent.get(parent);\n if (mappedNode) {\n return mappedNode;\n }\n for (const [mappedParent, textNode] of this.textNodesByParent) {\n if (textNode.parent !== parent) {\n continue;\n }\n this.textNodesByParent.delete(mappedParent);\n this.textNodesByParent.set(parent, textNode);\n return textNode;\n }\n }\n getLayoutNodeForParent(parent) {\n const mappedNode = this.layoutNodesByParent.get(parent);\n if (mappedNode) {\n return mappedNode;\n }\n for (const [mappedParent, layoutNode] of this.layoutNodesByParent) {\n if (layoutNode.parent !== parent) {\n continue;\n }\n this.layoutNodesByParent.delete(mappedParent);\n this.layoutNodesByParent.set(parent, layoutNode);\n return layoutNode;\n }\n }\n takeReusableTextNode(parent) {\n for (const [mappedParent, textNode] of this.textNodesByParent) {\n if (textNode.parent) {\n continue;\n }\n this.textNodesByParent.delete(mappedParent);\n this.textNodesByParent.set(parent, textNode);\n return textNode;\n }\n }\n takeReusableLayoutNode(parent) {\n for (const [mappedParent, layoutNode] of this.layoutNodesByParent) {\n if (layoutNode.parent) {\n continue;\n }\n if (!layoutNode.isCompatibleWith(parent)) {\n continue;\n }\n this.layoutNodesByParent.delete(mappedParent);\n this.layoutNodesByParent.set(parent, layoutNode);\n return layoutNode;\n }\n }\n disposeDetachedTextNodes() {\n for (const [parent, textNode] of this.textNodesByParent) {\n if (textNode.parent) {\n continue;\n }\n this.textNodesByParent.delete(parent);\n textNode.disposeWithoutSlotCascade();\n }\n }\n disposeDetachedIncompatibleLayoutNodes(parent) {\n for (const [mappedParent, layoutNode] of this.layoutNodesByParent) {\n if (layoutNode.parent || layoutNode.isCompatibleWith(parent)) {\n continue;\n }\n this.layoutNodesByParent.delete(mappedParent);\n layoutNode.disposeWithoutSlotCascade();\n }\n }\n\n // A slot can have multiple placeholder children attached transiently while a\n // move is in flight. Portal host tracking relies on `slot.parent` pointing at\n // one of the still-live hosts, not necessarily the most recently inserted one.\n getAttachedSlotParent(excludedNode) {\n for (const textNode of this.textNodesByParent.values()) {\n if (textNode !== excludedNode && textNode.parent) {\n return textNode.parent;\n }\n }\n for (const layoutNode of this.layoutNodesByParent.values()) {\n if (layoutNode !== excludedNode && layoutNode.parent) {\n return layoutNode.parent;\n }\n }\n return null;\n }\n hasOtherAttachedSlotChildren(excludedNode) {\n return this.getAttachedSlotParent(excludedNode) !== null;\n }\n getSlotChild(parent) {\n if (this.isTextSlotParent(parent)) {\n const existingTextNode = this.getTextNodeForParent(parent);\n if (existingTextNode) {\n return existingTextNode;\n }\n const reusableTextNode = this.takeReusableTextNode(parent);\n if (reusableTextNode) {\n return reusableTextNode;\n }\n this.disposeDetachedIncompatibleLayoutNodes(parent);\n const textNode = new TextSlotRenderable(`slot-text-${this.id}-${++this.textNodeCount}`, this);\n this.textNodesByParent.set(parent, textNode);\n return textNode;\n }\n const existingLayoutNode = this.getLayoutNodeForParent(parent);\n if (existingLayoutNode) {\n return existingLayoutNode;\n }\n const reusableLayoutNode = this.takeReusableLayoutNode(parent);\n if (reusableLayoutNode) {\n return reusableLayoutNode;\n }\n this.disposeDetachedTextNodes();\n this.disposeDetachedIncompatibleLayoutNodes(parent);\n const layoutNode = new LayoutSlotRenderable(`slot-layout-${this.id}-${++this.layoutNodeCount}`, this, parent);\n this.layoutNodesByParent.set(parent, layoutNode);\n return layoutNode;\n }\n getSlotChildForRemoval(parent) {\n if (this.isTextSlotParent(parent)) {\n return this.getTextNodeForParent(parent);\n }\n return this.getLayoutNodeForParent(parent);\n }\n didRemoveSlotChild(parent, child) {\n const hasOtherAttachedSlotChildren = this.hasOtherAttachedSlotChildren(child);\n if (hasOtherAttachedSlotChildren && child instanceof TextSlotRenderable && this.getTextNodeForParent(parent) === child) {\n this.textNodesByParent.delete(parent);\n child.disposeWithoutSlotCascade();\n }\n if (hasOtherAttachedSlotChildren && child instanceof LayoutSlotRenderable && this.getLayoutNodeForParent(parent) === child) {\n this.layoutNodesByParent.delete(parent);\n child.disposeWithoutSlotCascade();\n }\n if (this.parent === parent) {\n this.parent = this.getAttachedSlotParent(child);\n }\n }\n destroy() {\n if (this.destroyed) {\n return;\n }\n this.destroyed = true;\n const layoutNodes = new Set(this.layoutNodesByParent.values());\n this.layoutNodesByParent.clear();\n for (const layoutNode of layoutNodes) {\n layoutNode.destroy();\n }\n const textNodes = new Set(this.textNodesByParent.values());\n this.textNodesByParent.clear();\n for (const textNode of textNodes) {\n textNode.destroy();\n }\n }\n}",
|
|
15
|
+
"import { BoxRenderable, RootRenderable } from \"@opentui/core\";\nimport { createSignal } from \"solid-js/dist/solid.js\";\nimport { RendererContext } from \"./elements/index.js\";\nimport { _render as renderInternal, createComponent } from \"./reconciler.js\";\nlet solidScrollbackRootCounter = 0;\nconst MAX_AUTO_HEIGHT_PASSES = 4;\nfunction normalizeSnapshotDimension(value, axis) {\n if (value === undefined) {\n return undefined;\n }\n if (!Number.isFinite(value)) {\n throw new Error(`createScrollbackWriter requires a finite ${axis}`);\n }\n return Math.max(1, Math.trunc(value));\n}\nfunction createSnapshotRendererValue(renderContext, root, width, height, firstLineOffset) {\n const [snapshotWidth] = createSignal(width);\n const [snapshotHeight, setSnapshotHeight] = createSignal(height);\n const renderer = Object.create(renderContext);\n let offset = firstLineOffset;\n Object.defineProperties(renderer, {\n root: {\n value: root,\n enumerable: true,\n configurable: true\n },\n width: {\n get: snapshotWidth,\n enumerable: true,\n configurable: true\n },\n height: {\n get: snapshotHeight,\n enumerable: true,\n configurable: true\n },\n claimFirstLineOffset: {\n value: () => {\n const out = offset;\n offset = 0;\n return out;\n },\n enumerable: true,\n configurable: true\n }\n });\n return {\n renderer,\n getHeight: snapshotHeight,\n setHeight(nextHeight) {\n setSnapshotHeight(nextHeight);\n renderer.emit(\"resize\", snapshotWidth(), nextHeight);\n }\n };\n}\nfunction runLifecyclePasses(renderContext) {\n for (const renderable of renderContext.getLifecyclePasses()) {\n renderable.onLifecyclePass?.call(renderable);\n }\n}\nfunction clearLifecyclePasses(renderContext) {\n for (const renderable of [...renderContext.getLifecyclePasses()]) {\n renderContext.unregisterLifecyclePass(renderable);\n }\n}\nfunction measureSnapshotHeight(renderContext, root) {\n const measureRoot = new RootRenderable(renderContext);\n try {\n measureRoot.add(root);\n runLifecyclePasses(renderContext);\n measureRoot.calculateLayout();\n return Math.max(1, Math.trunc(root.getLayoutNode().getComputedLayout().height));\n } finally {\n if (root.parent === measureRoot) {\n measureRoot.remove(root.id);\n }\n measureRoot.destroyRecursively();\n }\n}\nfunction resolveSnapshotHeight(renderContext, root, snapshotRenderer) {\n for (let pass = 0; pass < MAX_AUTO_HEIGHT_PASSES; pass++) {\n const measuredHeight = measureSnapshotHeight(renderContext, root);\n if (measuredHeight === snapshotRenderer.getHeight()) {\n clearLifecyclePasses(renderContext);\n return measuredHeight;\n }\n snapshotRenderer.setHeight(measuredHeight);\n }\n\n // Give up on converging the synthetic height and let the final render rerun\n // lifecycle passes against the last consistent tree state.\n return measureSnapshotHeight(renderContext, root);\n}\nexport function createScrollbackWriter(node, options = {}) {\n return ctx => {\n const width = normalizeSnapshotDimension(options.width, \"width\") ?? Math.max(1, Math.trunc(ctx.width));\n const height = normalizeSnapshotDimension(options.height, \"height\");\n const startOnNewLine = options.startOnNewLine ?? true;\n const firstLineWidth = !startOnNewLine && ctx.tailColumn > 0 && ctx.tailColumn < ctx.width ? Math.min(width, ctx.width - ctx.tailColumn) : width;\n const firstLineOffset = width - firstLineWidth;\n const root = new BoxRenderable(ctx.renderContext, {\n id: `solid-scrollback-root-${solidScrollbackRootCounter++}`,\n position: \"absolute\",\n left: 0,\n top: 0,\n width,\n height: height ?? \"auto\",\n border: false,\n backgroundColor: \"transparent\",\n shouldFill: false,\n flexDirection: \"column\"\n });\n const snapshotRenderer = createSnapshotRendererValue(ctx.renderContext, root, width, height ?? Math.max(1, ctx.renderContext.height), firstLineOffset);\n let dispose;\n let disposed = false;\n const teardown = () => {\n if (disposed) {\n return;\n }\n disposed = true;\n dispose?.();\n };\n try {\n dispose = renderInternal(() => createComponent(RendererContext.Provider, {\n get value() {\n return snapshotRenderer.renderer;\n },\n get children() {\n return node(ctx);\n }\n }), root);\n return {\n root,\n width,\n height: height ?? resolveSnapshotHeight(ctx.renderContext, root, snapshotRenderer),\n rowColumns: options.rowColumns,\n startOnNewLine,\n trailingNewline: options.trailingNewline,\n teardown\n };\n } catch (error) {\n teardown();\n root.destroyRecursively();\n throw error;\n }\n };\n}\nexport function writeSolidToScrollback(renderer, node, options = {}) {\n renderer.writeToScrollback(createScrollbackWriter(node, options));\n}",
|
|
16
|
+
"import { spread as _$spread } from \"@opentui/solid\";\nimport { createElement as _$createElement } from \"@opentui/solid\";\nimport { TimeToFirstDrawRenderable } from \"@opentui/core\";\nimport { extend } from \"./elements/index.js\";\nextend({\n time_to_first_draw: TimeToFirstDrawRenderable\n});\nexport const TimeToFirstDraw = props => {\n return (() => {\n var _el$ = _$createElement(\"time_to_first_draw\");\n _$spread(_el$, props, false);\n return _el$;\n })();\n};",
|
|
17
|
+
"import { memo as _$memo } from \"@opentui/solid\";\nimport { createComponent as _$createComponent } from \"@opentui/solid\";\nimport { mergeProps as _$mergeProps } from \"@opentui/solid\";\nimport { createSlotRegistry } from \"@opentui/core\";\nimport { children, createMemo, createSignal, ErrorBoundary, For, onCleanup, splitProps } from \"solid-js/dist/solid.js\";\nconst EMPTY_ENTRY_IDS = [];\nexport function createSolidSlotRegistry(renderer, context, options = {}) {\n // Solid slots intentionally use one registry key per renderer instance.\n // Use createSlotRegistry from @opentui/core with a custom key for independent registries.\n return createSlotRegistry(renderer, \"solid:slot-registry\", context, options);\n}\nexport function createSlot(registry, options = {}) {\n return function BoundSlot(props) {\n return _$createComponent(Slot, _$mergeProps(props, {\n registry: registry,\n get pluginFailurePlaceholder() {\n return options.pluginFailurePlaceholder;\n }\n }));\n };\n}\nexport function Slot(props) {\n const [local, slotProps] = splitProps(props, [\"registry\", \"name\", \"mode\", \"children\", \"pluginFailurePlaceholder\"]);\n const registry = () => local.registry;\n const pluginFailurePlaceholder = () => local.pluginFailurePlaceholder;\n const [version, setVersion] = createSignal(0);\n let queued = false;\n let disposed = false;\n const unsubscribe = registry().subscribe(() => {\n if (queued) return;\n queued = true;\n setVersion(current => current + 1);\n queueMicrotask(() => {\n queued = false;\n if (disposed) return;\n });\n });\n onCleanup(() => {\n disposed = true;\n unsubscribe();\n });\n const entries = createMemo((previousEntries = []) => {\n version();\n const resolvedEntries = registry().resolveEntries(local.name);\n if (resolvedEntries.length === 0) {\n if (previousEntries.length === 0) return previousEntries;\n return [];\n }\n const previousById = new Map(previousEntries.map(entry => [entry.id, entry]));\n const nextEntries = resolvedEntries.map(entry => {\n const previousEntry = previousById.get(entry.id);\n if (previousEntry && previousEntry.renderer === entry.renderer) {\n return previousEntry;\n }\n return entry;\n });\n const unchanged = nextEntries.length === previousEntries.length && nextEntries.every((entry, index) => entry === previousEntries[index]);\n if (unchanged) return previousEntries;\n return nextEntries;\n });\n const entryIds = createMemo(() => entries().map(entry => entry.id));\n const entriesById = createMemo(() => new Map(entries().map(entry => [entry.id, entry])));\n const slotName = () => String(local.name);\n const renderFallback = () => {\n const value = children(() => local.children)();\n return value ?? null;\n };\n const resolveFallback = fallbackValue => fallbackValue?.() ?? null;\n const renderPluginFailurePlaceholder = (failure, fallbackValue) => {\n if (!pluginFailurePlaceholder()) {\n return resolveFallback(fallbackValue);\n }\n try {\n return pluginFailurePlaceholder()(failure);\n } catch (error) {\n registry().reportPluginError({\n pluginId: failure.pluginId,\n slot: failure.slot ?? slotName(),\n phase: \"error_placeholder\",\n source: \"solid\",\n error\n });\n return resolveFallback(fallbackValue);\n }\n };\n const renderEntry = (entry, fallbackOnError) => {\n let initialRender;\n try {\n initialRender = entry.renderer(registry().context, slotProps);\n } catch (error) {\n const failure = registry().reportPluginError({\n pluginId: entry.id,\n slot: slotName(),\n phase: \"render\",\n source: \"solid\",\n error\n });\n return renderPluginFailurePlaceholder(failure, fallbackOnError);\n }\n const resolvedInitialRender = children(() => initialRender);\n const hasInitialOutput = resolvedInitialRender.toArray().some(node => node !== null && node !== undefined && node !== false);\n if (!hasInitialOutput) {\n return resolveFallback(fallbackOnError);\n }\n return _$createComponent(ErrorBoundary, {\n fallback: error => {\n const failure = registry().reportPluginError({\n pluginId: entry.id,\n slot: slotName(),\n phase: \"render\",\n source: \"solid\",\n error\n });\n return renderPluginFailurePlaceholder(failure, fallbackOnError);\n },\n get children() {\n return resolvedInitialRender();\n }\n });\n };\n const AppendEntry = appendProps => {\n const entry = createMemo(() => entriesById().get(appendProps.entryId));\n return _$memo(() => {\n const resolvedEntry = entry();\n if (!resolvedEntry) {\n return null;\n }\n return renderEntry(resolvedEntry);\n });\n };\n const appendEntryIds = createMemo(() => {\n const mode = local.mode ?? \"append\";\n if (mode !== \"append\") {\n return EMPTY_ENTRY_IDS;\n }\n return entryIds();\n });\n const appendView = [renderFallback, _$createComponent(For, {\n get each() {\n return appendEntryIds();\n },\n children: entryId => _$createComponent(AppendEntry, {\n entryId: entryId\n })\n })];\n return _$memo(() => {\n const resolvedEntries = entries();\n const mode = local.mode ?? \"append\";\n if (resolvedEntries.length === 0) {\n return renderFallback();\n }\n if (mode === \"single_winner\") {\n const winner = resolvedEntries[0];\n if (!winner) {\n return renderFallback();\n }\n return renderEntry(winner, renderFallback);\n }\n if (mode === \"replace\") {\n const renderedEntries = resolvedEntries.map(entry => renderEntry(entry));\n const hasPluginOutput = renderedEntries.some(entry => entry !== null && entry !== undefined && entry !== false);\n if (!hasPluginOutput) {\n return renderFallback();\n }\n return renderedEntries;\n }\n return appendView;\n });\n}"
|
|
18
|
+
],
|
|
19
|
+
"mappings": ";AAAA,mDAAyC;AACzC;;;ACDA;AAAA;AACA,MAAM,uBAAuB,mBAAmB;AAAA,EAC9C,WAAW,CAAC,MAAM,SAAS;AAAA,IACzB,MAAM,OAAO;AAAA,IACb,KAAK,OAAO;AAAA;AAEhB;AACO,IAAM,eAAe,CAAC,QAAQ,KAAK,UAAU,KAAK,MAAM,KAAK,GAAG;AAAA;AACvE,MAAM,+BAA+B,eAAe;AAAA,EAClD,WAAW,CAAC,SAAS,UAAU;AAAA,IAC7B,MAAM,MAAM,OAAO;AAAA,IAGnB,IAAI,aAAa,OAAO,aAAa,UAAU;AAAA,MAC7C,KAAK,cAAc,KAAK,cAA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AA,YACjB;AAAA,IACA,WAAW;AAAA,IACX,SAAS,UAAU;AAAA;AAAA,EAErB,IAAI,kBAAkB;AAAA,IACpB,WAAW;AAAA,EACb;AAAA,EACA,IAAI,kBAAkB;AAAA,IACpB,gBAAgB;AAAA,EAClB;AAAA;AAEK,IAAM,SAAS,OAAO,MAAM,mBAAmB,CAAC,MAAM;AAAA,EAC3D,MAAM,WAAW,4BAA4B,cAAc,mBAAmB,MAAM,kBAAkB;AAAA,OACjG;AAAA,IACH,WAAW,MAAM;AAAA,MACf,iBAAiB,YAAY;AAAA;AAAA,EAEjC,CAAC;AAAA,EACD,QAAO,OAAO,QAAQ;AAAA,EACtB,eAAe,UAAU,IAAI;AAAA;AAExB,IAAM,aAAa,OAAO,MAAM,eAAe,CAAC,MAAM;AAAA,EAC3D,MAAM,YAAY,MAAM,mBAAmB;AAAA,OACtC;AAAA,IACH,WAAW,MAAM;AAAA,MACf,aAAa,YAAY;AAAA;AAAA,EAE7B,CAAC;AAAA,EACD,QAAO,OAAO,UAAU,QAAQ;AAAA,EAChC,eAAe,UAAU,UAAU,IAAI;AAAA,EACvC,OAAO;AAAA;",
|
|
20
|
+
"debugId": "11EF7868D3A4CD2A64756E2164756E21",
|
|
21
|
+
"names": []
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Fragment, jsxDEV, type JSX } from "./jsx-runtime.js"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsx-dev-runtime.js","sourceRoot":"","sources":["jsx-dev-runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA"}
|
package/jsx-runtime.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Renderable } from "@opentui/core"
|
|
2
1
|
import type {
|
|
3
2
|
AsciiFontProps,
|
|
4
3
|
BoxProps,
|
|
@@ -15,13 +14,17 @@ import type {
|
|
|
15
14
|
TextareaProps,
|
|
16
15
|
TextProps,
|
|
17
16
|
} from "./src/types/elements.js"
|
|
18
|
-
import type {
|
|
17
|
+
import type { JSX as SolidJSX } from "solid-js"
|
|
19
18
|
|
|
20
|
-
|
|
21
|
-
// Replace Node with Renderable
|
|
22
|
-
type Element = DomNode | ArrayElement | string | number | boolean | null | undefined
|
|
19
|
+
type JsxComponent = (props: Record<string, unknown>) => unknown
|
|
23
20
|
|
|
24
|
-
|
|
21
|
+
export declare function jsx(type: string | JsxComponent, props?: Record<string, unknown> | null): JSX.Element
|
|
22
|
+
export declare const jsxs: typeof jsx
|
|
23
|
+
export declare function jsxDEV(type: string | JsxComponent, props?: Record<string, unknown> | null): JSX.Element
|
|
24
|
+
export declare function Fragment(props: { children?: JSX.Element }): JSX.Element
|
|
25
|
+
|
|
26
|
+
export declare namespace JSX {
|
|
27
|
+
type Element = SolidJSX.Element
|
|
25
28
|
|
|
26
29
|
interface IntrinsicElements extends ExtendedIntrinsicElements<OpenTUIComponents> {
|
|
27
30
|
box: BoxProps
|
package/jsx-runtime.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { createComponent, createElement, spread } from "@opentui/solid";
|
|
2
|
+
function normalizeProps(props) {
|
|
3
|
+
if (!props) {
|
|
4
|
+
return {};
|
|
5
|
+
}
|
|
6
|
+
if (!("key" in props)) {
|
|
7
|
+
return props;
|
|
8
|
+
}
|
|
9
|
+
const { key: _key, ...rest } = props;
|
|
10
|
+
return rest;
|
|
11
|
+
}
|
|
12
|
+
function createIntrinsicElement(type, props) {
|
|
13
|
+
const element = createElement(type);
|
|
14
|
+
spread(element, props);
|
|
15
|
+
return element;
|
|
16
|
+
}
|
|
17
|
+
export function jsx(type, props = {}) {
|
|
18
|
+
const normalizedProps = normalizeProps(props);
|
|
19
|
+
if (typeof type === "function") {
|
|
20
|
+
return createComponent(type, normalizedProps);
|
|
21
|
+
}
|
|
22
|
+
return createIntrinsicElement(type, normalizedProps);
|
|
23
|
+
}
|
|
24
|
+
export const jsxs = jsx;
|
|
25
|
+
export function jsxDEV(type, props = {}) {
|
|
26
|
+
return jsx(type, props);
|
|
27
|
+
}
|
|
28
|
+
export function Fragment(props) {
|
|
29
|
+
return props.children ?? null;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=jsx-runtime.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsx-runtime.js","sourceRoot":"","sources":["jsx-runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AA2BvE,SAAS,cAAc,CAAC,KAAkC;IACxD,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO,EAAE,CAAA;IACX,CAAC;IAED,IAAI,CAAC,CAAC,KAAK,IAAI,KAAK,CAAC,EAAE,CAAC;QACtB,OAAO,KAAK,CAAA;IACd,CAAC;IAED,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,CAAA;IACpC,OAAO,IAAI,CAAA;AACb,CAAC;AAED,SAAS,sBAAsB,CAAC,IAAY,EAAE,KAA8B;IAC1E,MAAM,OAAO,GAAG,aAAa,CAAC,IAAI,CAAC,CAAA;IACnC,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,CAAA;IACtB,OAAO,OAAO,CAAA;AAChB,CAAC;AAED,MAAM,UAAU,GAAG,CAAC,IAA6B,EAAE,QAAyB,EAAE;IAC5E,MAAM,eAAe,GAAG,cAAc,CAAC,KAAK,CAAC,CAAA;IAE7C,IAAI,OAAO,IAAI,KAAK,UAAU,EAAE,CAAC;QAC/B,OAAQ,eAAuB,CAAC,IAAI,EAAE,eAAe,CAAC,CAAA;IACxD,CAAC;IAED,OAAO,sBAAsB,CAAC,IAAI,EAAE,eAAe,CAAC,CAAA;AACtD,CAAC;AAED,MAAM,CAAC,MAAM,IAAI,GAAG,GAAG,CAAA;AAEvB,MAAM,UAAU,MAAM,CAAC,IAA6B,EAAE,QAAyB,EAAE;IAC/E,OAAO,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;AACzB,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,KAA6B;IACpD,OAAO,KAAK,CAAC,QAAQ,IAAI,IAAI,CAAA;AAC/B,CAAC"}
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"types": "index.d.ts",
|
|
6
6
|
"type": "module",
|
|
7
|
-
"version": "0.
|
|
7
|
+
"version": "0.4.1",
|
|
8
8
|
"description": "SolidJS renderer for OpenTUI",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"repository": {
|
|
@@ -15,36 +15,54 @@
|
|
|
15
15
|
"exports": {
|
|
16
16
|
".": {
|
|
17
17
|
"types": "./index.d.ts",
|
|
18
|
+
"bun": "./index.bun.js",
|
|
19
|
+
"node": "./index.js",
|
|
18
20
|
"import": "./index.js",
|
|
19
|
-
"
|
|
21
|
+
"default": "./index.js"
|
|
20
22
|
},
|
|
21
23
|
"./preload": {
|
|
22
|
-
"
|
|
24
|
+
"bun": "./scripts/preload.js",
|
|
25
|
+
"node": "./scripts/preload.node.js",
|
|
26
|
+
"default": "./scripts/preload.node.js"
|
|
23
27
|
},
|
|
24
28
|
"./bun-plugin": {
|
|
25
29
|
"types": "./scripts/solid-plugin.d.ts",
|
|
26
|
-
"
|
|
30
|
+
"bun": "./scripts/solid-plugin.js",
|
|
31
|
+
"node": "./scripts/solid-plugin.node.js",
|
|
32
|
+
"default": "./scripts/solid-plugin.node.js"
|
|
27
33
|
},
|
|
28
34
|
"./runtime-plugin-support": {
|
|
29
35
|
"types": "./scripts/runtime-plugin-support.d.ts",
|
|
30
|
-
"
|
|
36
|
+
"bun": "./scripts/runtime-plugin-support.js",
|
|
37
|
+
"node": "./scripts/runtime-plugin-support.node.js",
|
|
38
|
+
"default": "./scripts/runtime-plugin-support.node.js"
|
|
31
39
|
},
|
|
32
40
|
"./runtime-plugin-support/configure": {
|
|
33
41
|
"types": "./scripts/runtime-plugin-support-configure.d.ts",
|
|
34
|
-
"
|
|
42
|
+
"bun": "./scripts/runtime-plugin-support-configure.js",
|
|
43
|
+
"node": "./scripts/runtime-plugin-support-configure.node.js",
|
|
44
|
+
"default": "./scripts/runtime-plugin-support-configure.node.js"
|
|
35
45
|
},
|
|
36
46
|
"./components": {
|
|
37
47
|
"types": "./components.d.ts",
|
|
38
48
|
"import": "./components.js",
|
|
39
49
|
"require": "./components.js"
|
|
40
50
|
},
|
|
41
|
-
"./jsx-runtime":
|
|
42
|
-
|
|
51
|
+
"./jsx-runtime": {
|
|
52
|
+
"types": "./jsx-runtime.d.ts",
|
|
53
|
+
"import": "./jsx-runtime.js",
|
|
54
|
+
"default": "./jsx-runtime.js"
|
|
55
|
+
},
|
|
56
|
+
"./jsx-dev-runtime": {
|
|
57
|
+
"types": "./jsx-dev-runtime.d.ts",
|
|
58
|
+
"import": "./jsx-dev-runtime.js",
|
|
59
|
+
"default": "./jsx-dev-runtime.js"
|
|
60
|
+
}
|
|
43
61
|
},
|
|
44
62
|
"dependencies": {
|
|
45
63
|
"@babel/core": "7.28.0",
|
|
46
64
|
"@babel/preset-typescript": "7.27.1",
|
|
47
|
-
"@opentui/core": "0.
|
|
65
|
+
"@opentui/core": "0.4.1",
|
|
48
66
|
"babel-plugin-module-resolver": "5.0.2",
|
|
49
67
|
"babel-preset-solid": "1.9.12",
|
|
50
68
|
"entities": "7.0.1",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preload.js","sourceRoot":"","sources":["preload.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAA;AAE9D,0BAA0B,EAAE,CAAA"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { plugin as registerBunPlugin } from "bun";
|
|
2
|
+
import * as coreRuntime from "@opentui/core";
|
|
3
|
+
import { createRuntimePlugin, isCoreRuntimeModuleSpecifier, runtimeModuleIdForSpecifier, } from "@opentui/core/runtime-plugin";
|
|
4
|
+
import * as solidJsRuntime from "solid-js";
|
|
5
|
+
import * as solidJsStoreRuntime from "solid-js/store";
|
|
6
|
+
import * as solidRuntime from "@opentui/solid";
|
|
7
|
+
import { ensureSolidTransformPlugin } from "./solid-plugin.js";
|
|
8
|
+
const runtimePluginSupportInstalledKey = Symbol.for("opentui.solid.runtime-plugin-support");
|
|
9
|
+
const defaultRuntimeModules = {
|
|
10
|
+
"@opentui/solid": solidRuntime,
|
|
11
|
+
"solid-js": solidJsRuntime,
|
|
12
|
+
"solid-js/store": solidJsStoreRuntime,
|
|
13
|
+
};
|
|
14
|
+
function normalizeRewriteKey(rewrite) {
|
|
15
|
+
return `${rewrite?.nodeModulesRuntimeSpecifiers ?? true}:${rewrite?.nodeModulesBareSpecifiers ?? false}`;
|
|
16
|
+
}
|
|
17
|
+
function createRuntimeModules(options) {
|
|
18
|
+
return {
|
|
19
|
+
...defaultRuntimeModules,
|
|
20
|
+
...(options?.additional ?? {}),
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
function assertCompatibleInstall(install, modules, options) {
|
|
24
|
+
for (const specifier of Object.keys(modules)) {
|
|
25
|
+
if (!install.specifiers.has(specifier)) {
|
|
26
|
+
throw new Error(`OpenTUI Solid runtime plugin support is already installed without ${specifier}. Call ensureRuntimePluginSupport({ additional }) from @opentui/solid/runtime-plugin-support/configure before importing @opentui/solid/runtime-plugin-support.`);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
if (options?.core && options.core !== install.core) {
|
|
30
|
+
throw new Error("OpenTUI Solid runtime plugin support is already installed with a different core runtime module.");
|
|
31
|
+
}
|
|
32
|
+
if (options?.rewrite && normalizeRewriteKey(options.rewrite) !== install.rewriteKey) {
|
|
33
|
+
throw new Error("OpenTUI Solid runtime plugin support is already installed with different rewrite options.");
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
export function ensureRuntimePluginSupport(options = {}) {
|
|
37
|
+
const state = globalThis;
|
|
38
|
+
const modules = createRuntimeModules(options);
|
|
39
|
+
const core = options.core ?? coreRuntime;
|
|
40
|
+
const rewriteKey = normalizeRewriteKey(options.rewrite);
|
|
41
|
+
const install = state[runtimePluginSupportInstalledKey];
|
|
42
|
+
if (install) {
|
|
43
|
+
assertCompatibleInstall(install, modules, options);
|
|
44
|
+
return false;
|
|
45
|
+
}
|
|
46
|
+
ensureSolidTransformPlugin({
|
|
47
|
+
moduleName: runtimeModuleIdForSpecifier("@opentui/solid"),
|
|
48
|
+
resolvePath(specifier) {
|
|
49
|
+
if (!isCoreRuntimeModuleSpecifier(specifier) && !modules[specifier]) {
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
52
|
+
return runtimeModuleIdForSpecifier(specifier);
|
|
53
|
+
},
|
|
54
|
+
});
|
|
55
|
+
registerBunPlugin(createRuntimePlugin({
|
|
56
|
+
core,
|
|
57
|
+
additional: modules,
|
|
58
|
+
rewrite: options.rewrite,
|
|
59
|
+
}));
|
|
60
|
+
state[runtimePluginSupportInstalledKey] = {
|
|
61
|
+
specifiers: new Set(Object.keys(modules)),
|
|
62
|
+
core,
|
|
63
|
+
rewriteKey,
|
|
64
|
+
};
|
|
65
|
+
return true;
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=runtime-plugin-support-configure.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-plugin-support-configure.js","sourceRoot":"","sources":["runtime-plugin-support-configure.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,iBAAiB,EAAE,MAAM,KAAK,CAAA;AACjD,OAAO,KAAK,WAAW,MAAM,eAAe,CAAA;AAC5C,OAAO,EACL,mBAAmB,EACnB,4BAA4B,EAC5B,2BAA2B,GAG5B,MAAM,8BAA8B,CAAA;AACrC,OAAO,KAAK,cAAc,MAAM,UAAU,CAAA;AAC1C,OAAO,KAAK,mBAAm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,CAAC;AACH,CAAC;AAED,MAAM,UAAU,0BAA0B,CAAC,UAA4C,EAAE;IACvF,MAAM,KAAK,GAAG,UAAuC,CAAA;IACrD,MAAM,OAAO,GAAG,oBAAoB,CAAC,OAAO,CAAC,CAAA;IAC7C,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,IAAK,WAAuC,CAAA;IACrE,MAAM,UAAU,GAAG,mBAAmB,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;IAEvD,MAAM,OAAO,GAAG,KAAK,CAAC,gCAAgC,CAAC,CAAA;IACvD,IAAI,OAAO,EAAE,CAAC;QACZ,uBAAuB,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,CAAA;QAClD,OAAO,KAAK,CAAA;IACd,CAAC;IAED,0BAA0B,CAAC;QACzB,UAAU,EAAE,2BAA2B,CAAC,gBAAgB,CAAC;QACzD,WAAW,CAAC,SAAS;YACnB,IAAI,CAAC,4BAA4B,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC;gBACpE,OAAO,IAAI,CAAA;YACb,CAAC;YAED,OAAO,2BAA2B,CAAC,SAAS,CAAC,CAAA;QAC/C,CAAC;KACF,CAAC,CAAA;IAEF,iBAAiB,CACf,mBAAmB,CAAC;QAClB,IAAI;QACJ,UAAU,EAAE,OAAO;QACnB,OAAO,EAAE,OAAO,CAAC,OAAO;KACzB,CAAC,CACH,CAAA;IAED,KAAK,CAAC,gCAAgC,CAAC,GAAG;QACxC,UAAU,EAAE,IAAI,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACzC,IAAI;QACJ,UAAU;KACX,CAAA;IACD,OAAO,IAAI,CAAA;AACb,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const errorMessage = "@opentui/solid/runtime-plugin-support/configure is Bun-only and is not available in Node.js. Use Bun to import this entrypoint."
|
|
2
|
+
|
|
3
|
+
function unavailable() {
|
|
4
|
+
throw new Error(errorMessage)
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export function ensureRuntimePluginSupport() {
|
|
8
|
+
return unavailable()
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
unavailable()
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-plugin-support.js","sourceRoot":"","sources":["runtime-plugin-support.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,uCAAuC,CAAA;AAElF,OAAO,EAAE,0BAA0B,EAAE,CAAA;AAGrC,0BAA0B,EAAE,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const errorMessage = "@opentui/solid/runtime-plugin-support is Bun-only and is not available in Node.js. Use Bun to import this entrypoint."
|
|
2
|
+
|
|
3
|
+
function unavailable() {
|
|
4
|
+
throw new Error(errorMessage)
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export function ensureRuntimePluginSupport() {
|
|
8
|
+
return unavailable()
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
unavailable()
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type BunPlugin } from "bun";
|
|
2
|
-
|
|
2
|
+
import { type ResolveImportPath } from "./solid-transform.js";
|
|
3
3
|
export interface CreateSolidTransformPluginOptions {
|
|
4
4
|
moduleName?: string;
|
|
5
5
|
resolvePath?: ResolveImportPath;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { plugin as registerBunPlugin } from "bun";
|
|
2
|
+
import { stripQueryAndHash, transformSolidSource } from "./solid-transform.js";
|
|
3
|
+
const solidTransformStateKey = Symbol.for("opentui.solid.transform");
|
|
4
|
+
const getSolidTransformState = () => {
|
|
5
|
+
const state = globalThis;
|
|
6
|
+
state[solidTransformStateKey] ??= { installed: false };
|
|
7
|
+
return state[solidTransformStateKey];
|
|
8
|
+
};
|
|
9
|
+
const getSolidTransformRuntime = () => {
|
|
10
|
+
return getSolidTransformState().runtime ?? {};
|
|
11
|
+
};
|
|
12
|
+
const hasSolidTransformRuntime = (input) => {
|
|
13
|
+
return input.moduleName !== undefined || input.resolvePath !== undefined;
|
|
14
|
+
};
|
|
15
|
+
export function ensureSolidTransformPlugin(input = {}) {
|
|
16
|
+
const state = getSolidTransformState();
|
|
17
|
+
if (hasSolidTransformRuntime(input)) {
|
|
18
|
+
state.runtime = {
|
|
19
|
+
moduleName: input.moduleName,
|
|
20
|
+
resolvePath: input.resolvePath,
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
if (state.installed) {
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
registerBunPlugin(createSolidTransformPlugin());
|
|
27
|
+
state.installed = true;
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
export function resetSolidTransformPluginState() {
|
|
31
|
+
const state = getSolidTransformState();
|
|
32
|
+
state.installed = false;
|
|
33
|
+
delete state.runtime;
|
|
34
|
+
}
|
|
35
|
+
export function createSolidTransformPlugin(input = {}) {
|
|
36
|
+
const sourceFilter = input.resolvePath
|
|
37
|
+
? /^(?!.*[/\\]node_modules[/\\]).*\.[cm]?[jt]sx?(?:[?#].*)?$/
|
|
38
|
+
: /^(?!.*[/\\]node_modules[/\\]).*\.[cm]?[jt]sx(?:[?#].*)?$/;
|
|
39
|
+
return {
|
|
40
|
+
name: "bun-plugin-solid",
|
|
41
|
+
setup: (build) => {
|
|
42
|
+
build.onLoad({ filter: /[/\\]node_modules[/\\]solid-js[/\\]dist[/\\]server\.js(?:[?#].*)?$/ }, async (args) => {
|
|
43
|
+
const path = stripQueryAndHash(args.path).replace("server.js", "solid.js");
|
|
44
|
+
const file = Bun.file(path);
|
|
45
|
+
const code = await file.text();
|
|
46
|
+
return { contents: code, loader: "js" };
|
|
47
|
+
});
|
|
48
|
+
build.onLoad({ filter: /[/\\]node_modules[/\\]solid-js[/\\]store[/\\]dist[/\\]server\.js(?:[?#].*)?$/ }, async (args) => {
|
|
49
|
+
const path = stripQueryAndHash(args.path).replace("server.js", "store.js");
|
|
50
|
+
const file = Bun.file(path);
|
|
51
|
+
const code = await file.text();
|
|
52
|
+
return { contents: code, loader: "js" };
|
|
53
|
+
});
|
|
54
|
+
build.onLoad({ filter: sourceFilter }, async (args) => {
|
|
55
|
+
const path = stripQueryAndHash(args.path);
|
|
56
|
+
const file = Bun.file(path);
|
|
57
|
+
const code = await file.text();
|
|
58
|
+
const runtime = getSolidTransformRuntime();
|
|
59
|
+
const moduleName = input.moduleName ?? runtime.moduleName ?? "@opentui/solid";
|
|
60
|
+
const resolvePath = input.resolvePath ?? runtime.resolvePath;
|
|
61
|
+
const contents = await transformSolidSource(code, {
|
|
62
|
+
filename: path,
|
|
63
|
+
moduleName,
|
|
64
|
+
resolvePath,
|
|
65
|
+
});
|
|
66
|
+
return {
|
|
67
|
+
contents,
|
|
68
|
+
loader: "js",
|
|
69
|
+
};
|
|
70
|
+
});
|
|
71
|
+
},
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
const solidTransformPlugin = createSolidTransformPlugin();
|
|
75
|
+
export default solidTransformPlugin;
|
|
76
|
+
//# sourceMappingURL=solid-plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"solid-plugin.js","sourceRoot":"","sources":["solid-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,iBAAiB,EAAkB,MAAM,KAAK,CAAA;AACjE,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAA0B,MAAM,sBAAsB,CAAA;AAEtG,MAAM,sBAAsB,GAAG,MAAM,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAA;AAqBpE,MAAM,sBAAsB,GAAG,GAAwB,EAAE;IACvD,MAAM,KAAK,GAAG,UAAuC,CAAA;IACrD,KAAK,CAAC,sBAAsB,CAAC,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,CAAA;IACtD,OAAO,KAAK,CAAC,sBAAsB,CAAC,CAAA;AACtC,CAAC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,GAAG,KAAK,CAAC,WAAW,IAAI,OAAO,CAAC,WAAW,CAAA;gBAC5D,MAAM,QAAQ,GAAG,MAAM,oBAAoB,CAAC,IAAI,EAAE;oBAChD,QAAQ,EAAE,IAAI;oBACd,UAAU;oBACV,WAAW;iBACZ,CAAC,CAAA;gBAEF,OAAO;oBACL,QAAQ;oBACR,MAAM,EAAE,IAAI;iBACb,CAAA;YACH,CAAC,CAAC,CAAA;QACJ,CAAC;KACF,CAAA;AACH,CAAC;AAED,MAAM,oBAAoB,GAAG,0BAA0B,EAAE,CAAA;AAEzD,eAAe,oBAAoB,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const errorMessage = "@opentui/solid/bun-plugin is Bun-only and is not available in Node.js. Use Bun to import this entrypoint."
|
|
2
|
+
|
|
3
|
+
function unavailable() {
|
|
4
|
+
throw new Error(errorMessage)
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export function ensureSolidTransformPlugin() {
|
|
8
|
+
return unavailable()
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export function resetSolidTransformPluginState() {
|
|
12
|
+
return unavailable()
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function createSolidTransformPlugin() {
|
|
16
|
+
return unavailable()
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export default unavailable()
|
|
20
|
+
|
|
21
|
+
unavailable()
|