@niscorp/nova 0.5.2 → 0.6.0
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/ACTION_DOCS.md +17 -10
- package/ADAPTER.md +22 -2
- package/CHANGELOG.md +116 -0
- package/DESIGN.md +36 -17
- package/I18N_DOCS.md +8 -3
- package/LAYOUT_DOCS.md +16 -4
- package/REACT_DOCS.md +3 -3
- package/README.md +22 -7
- package/SHELL_DOCS.md +10 -6
- package/dist/adapters/dom/components/index.cjs +46 -63
- package/dist/adapters/dom/components/index.cjs.map +1 -1
- package/dist/adapters/dom/components/index.d.cts +2 -2
- package/dist/adapters/dom/components/index.d.ts +2 -2
- package/dist/adapters/dom/components/index.js +11 -28
- package/dist/adapters/dom/components/index.js.map +1 -1
- package/dist/adapters/dom/index.cjs +10 -9
- package/dist/adapters/dom/index.d.cts +2 -2
- package/dist/adapters/dom/index.d.ts +2 -2
- package/dist/adapters/dom/index.js +8 -7
- package/dist/adapters/dom/server.cjs +9 -8
- package/dist/adapters/dom/server.cjs.map +1 -1
- package/dist/adapters/dom/server.d.cts +2 -2
- package/dist/adapters/dom/server.d.ts +2 -2
- package/dist/adapters/dom/server.js +8 -7
- package/dist/adapters/dom/server.js.map +1 -1
- package/dist/adapters/ink/index.js +49 -6
- package/dist/adapters/ink/index.js.map +1 -1
- package/dist/adapters/react/components/index.cjs +28 -27
- package/dist/adapters/react/components/index.d.cts +4 -4
- package/dist/adapters/react/components/index.d.ts +4 -4
- package/dist/adapters/react/components/index.js +9 -8
- package/dist/adapters/react/index.cjs +31 -30
- package/dist/adapters/react/index.d.cts +4 -4
- package/dist/adapters/react/index.d.ts +4 -4
- package/dist/adapters/react/index.js +9 -8
- package/dist/adapters/tty/components/index.cjs +35 -40
- package/dist/adapters/tty/components/index.cjs.map +1 -1
- package/dist/adapters/tty/components/index.d.cts +3 -2
- package/dist/adapters/tty/components/index.d.ts +3 -2
- package/dist/adapters/tty/components/index.js +6 -22
- package/dist/adapters/tty/components/index.js.map +1 -1
- package/dist/adapters/tty/index.cjs +11 -10
- package/dist/adapters/tty/index.cjs.map +1 -1
- package/dist/adapters/tty/index.d.cts +2 -2
- package/dist/adapters/tty/index.d.ts +2 -2
- package/dist/adapters/tty/index.js +9 -8
- package/dist/adapters/tty/index.js.map +1 -1
- package/dist/adapters/vue/components/index.cjs +28 -27
- package/dist/adapters/vue/components/index.d.cts +15 -12
- package/dist/adapters/vue/components/index.d.ts +15 -12
- package/dist/adapters/vue/components/index.js +9 -8
- package/dist/adapters/vue/index.cjs +37 -36
- package/dist/adapters/vue/index.cjs.map +1 -1
- package/dist/adapters/vue/index.d.cts +4 -4
- package/dist/adapters/vue/index.d.ts +4 -4
- package/dist/adapters/vue/index.js +10 -9
- package/dist/adapters/vue/index.js.map +1 -1
- package/dist/agent/index.d.cts +2 -2
- package/dist/agent/index.d.ts +2 -2
- package/dist/{chunk-57PZEPIK.js → chunk-2USXK2G4.js} +30 -9
- package/dist/chunk-2USXK2G4.js.map +1 -0
- package/dist/{chunk-RVU6YEHO.cjs → chunk-3TBQ2KGZ.cjs} +12 -12
- package/dist/chunk-3TBQ2KGZ.cjs.map +1 -0
- package/dist/{chunk-ZR54IVVS.cjs → chunk-67LZ6PTU.cjs} +21 -21
- package/dist/chunk-67LZ6PTU.cjs.map +1 -0
- package/dist/{chunk-QTJ4ZQRM.cjs → chunk-7BRC4PL4.cjs} +4 -3
- package/dist/chunk-7BRC4PL4.cjs.map +1 -0
- package/dist/{chunk-M2ZZUSH3.js → chunk-AXRTJAXB.js} +8 -8
- package/dist/chunk-AXRTJAXB.js.map +1 -0
- package/dist/chunk-BA77UJOE.cjs +21 -0
- package/dist/chunk-BA77UJOE.cjs.map +1 -0
- package/dist/{chunk-OY7SCFTJ.js → chunk-BRJ333QF.js} +138 -70
- package/dist/chunk-BRJ333QF.js.map +1 -0
- package/dist/{chunk-5T26T2EJ.cjs → chunk-F2DZ4JMO.cjs} +34 -14
- package/dist/chunk-F2DZ4JMO.cjs.map +1 -0
- package/dist/{chunk-A4GK3PLP.js → chunk-F2OEWTK6.js} +5 -5
- package/dist/chunk-F2OEWTK6.js.map +1 -0
- package/dist/chunk-GAWBA53C.js +20 -0
- package/dist/chunk-GAWBA53C.js.map +1 -0
- package/dist/{chunk-UIWTFU3M.cjs → chunk-J4HGCXLB.cjs} +49 -28
- package/dist/chunk-J4HGCXLB.cjs.map +1 -0
- package/dist/chunk-JAVBIVKK.js +27 -0
- package/dist/chunk-JAVBIVKK.js.map +1 -0
- package/dist/{chunk-VDB7VHFS.cjs → chunk-L63PCZNQ.cjs} +75 -60
- package/dist/chunk-L63PCZNQ.cjs.map +1 -0
- package/dist/{chunk-ITSVPZS5.cjs → chunk-LFKF2PMZ.cjs} +53 -29
- package/dist/chunk-LFKF2PMZ.cjs.map +1 -0
- package/dist/chunk-LMCCIFCH.js +15 -0
- package/dist/chunk-LMCCIFCH.js.map +1 -0
- package/dist/{chunk-E2PXYR3H.js → chunk-OT5M3N76.js} +43 -28
- package/dist/chunk-OT5M3N76.js.map +1 -0
- package/dist/{chunk-OWA5Z3WT.cjs → chunk-OWUKAB6M.cjs} +212 -144
- package/dist/chunk-OWUKAB6M.cjs.map +1 -0
- package/dist/{chunk-BML7HQPE.cjs → chunk-P6J3V26J.cjs} +7 -7
- package/dist/{chunk-BML7HQPE.cjs.map → chunk-P6J3V26J.cjs.map} +1 -1
- package/dist/{chunk-C63CBYD5.js → chunk-QERVED37.js} +4 -3
- package/dist/chunk-QERVED37.js.map +1 -0
- package/dist/{chunk-3XZODV7S.cjs → chunk-SB3MKJH2.cjs} +10 -7
- package/dist/chunk-SB3MKJH2.cjs.map +1 -0
- package/dist/{chunk-T33VE5XQ.js → chunk-SVL6SPO6.js} +28 -8
- package/dist/chunk-SVL6SPO6.js.map +1 -0
- package/dist/chunk-SYKWLQJZ.cjs +22 -0
- package/dist/chunk-SYKWLQJZ.cjs.map +1 -0
- package/dist/{chunk-G4OQ4PEO.js → chunk-WDTSKRH5.js} +19 -10
- package/dist/chunk-WDTSKRH5.js.map +1 -0
- package/dist/{chunk-CQZH3L3W.cjs → chunk-XBTAEOKJ.cjs} +51 -40
- package/dist/chunk-XBTAEOKJ.cjs.map +1 -0
- package/dist/{chunk-LAVCNLL3.js → chunk-Y4EE5XF3.js} +33 -9
- package/dist/chunk-Y4EE5XF3.js.map +1 -0
- package/dist/chunk-Y6DTXVKS.cjs +32 -0
- package/dist/chunk-Y6DTXVKS.cjs.map +1 -0
- package/dist/{chunk-GY3KNTNK.js → chunk-Y6UT7WA3.js} +3 -3
- package/dist/{chunk-GY3KNTNK.js.map → chunk-Y6UT7WA3.js.map} +1 -1
- package/dist/{chunk-6VHOMWNF.js → chunk-YMXFBHWZ.js} +8 -5
- package/dist/chunk-YMXFBHWZ.js.map +1 -0
- package/dist/devtools/index.cjs +8 -8
- package/dist/devtools/index.d.cts +2 -2
- package/dist/devtools/index.d.ts +2 -2
- package/dist/devtools/index.js +5 -5
- package/dist/document/index.cjs +4 -3
- package/dist/document/index.d.cts +4 -4
- package/dist/document/index.d.ts +4 -4
- package/dist/document/index.js +2 -1
- package/dist/examples/index.cjs +4 -4
- package/dist/examples/index.d.cts +2 -2
- package/dist/examples/index.d.ts +2 -2
- package/dist/examples/index.js +3 -3
- package/dist/{head-zznJvVEE.d.cts → head-HDTpptl2.d.cts} +2 -2
- package/dist/{head-CVjtToF8.d.ts → head-R4Jx_OVM.d.ts} +2 -2
- package/dist/i18n/index.cjs +13 -13
- package/dist/i18n/index.d.cts +2 -2
- package/dist/i18n/index.d.ts +2 -2
- package/dist/i18n/index.js +3 -3
- package/dist/index.cjs +69 -69
- package/dist/index.d.cts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +6 -6
- package/dist/migrations/index.cjs +4 -4
- package/dist/migrations/index.js +2 -2
- package/dist/{palette-CCxWSi3C.d.cts → palette-BTn4IRXK.d.cts} +1 -1
- package/dist/{palette-BZujb2rm.d.ts → palette-BmDclrlr.d.ts} +1 -1
- package/dist/{primitive-props-Cl5jiC8g.d.ts → primitive-props-BI8aHvma.d.cts} +1 -0
- package/dist/{primitive-props-Cl5jiC8g.d.cts → primitive-props-BI8aHvma.d.ts} +1 -0
- package/dist/reflect/index.cjs +23 -23
- package/dist/reflect/index.d.cts +2 -2
- package/dist/reflect/index.d.ts +2 -2
- package/dist/reflect/index.js +5 -5
- package/dist/{types-CJC8mnzl.d.ts → types-B5-GtEik.d.ts} +2 -0
- package/dist/{types-DOm2MKDk.d.ts → types-BEbjstbo.d.ts} +2 -1
- package/dist/{types-DzB3TAQj.d.cts → types-BLESXdu0.d.cts} +1 -1
- package/dist/{types-CWOom_fv.d.cts → types-C8OoE1EM.d.cts} +2 -1
- package/dist/{types-pbBIUNxw.d.ts → types-CbKiEDDH.d.ts} +1 -1
- package/dist/{types-D0x56Ya-.d.cts → types-CmIg-D2q.d.cts} +1 -1
- package/dist/{types-LXw2RJfH.d.ts → types-Lld1eifz.d.ts} +1 -1
- package/dist/{types-CR56luN7.d.cts → types-Wze4IlEM.d.cts} +2 -0
- package/package.json +7 -7
- package/dist/chunk-3XZODV7S.cjs.map +0 -1
- package/dist/chunk-57PZEPIK.js.map +0 -1
- package/dist/chunk-5T26T2EJ.cjs.map +0 -1
- package/dist/chunk-6VHOMWNF.js.map +0 -1
- package/dist/chunk-A4GK3PLP.js.map +0 -1
- package/dist/chunk-C63CBYD5.js.map +0 -1
- package/dist/chunk-CQZH3L3W.cjs.map +0 -1
- package/dist/chunk-E2PXYR3H.js.map +0 -1
- package/dist/chunk-G4OQ4PEO.js.map +0 -1
- package/dist/chunk-GQVJ5UAS.js +0 -8
- package/dist/chunk-GQVJ5UAS.js.map +0 -1
- package/dist/chunk-ITGR7P2B.cjs +0 -12
- package/dist/chunk-ITGR7P2B.cjs.map +0 -1
- package/dist/chunk-ITSVPZS5.cjs.map +0 -1
- package/dist/chunk-LAVCNLL3.js.map +0 -1
- package/dist/chunk-M2ZZUSH3.js.map +0 -1
- package/dist/chunk-OWA5Z3WT.cjs.map +0 -1
- package/dist/chunk-OY7SCFTJ.js.map +0 -1
- package/dist/chunk-QTJ4ZQRM.cjs.map +0 -1
- package/dist/chunk-RVU6YEHO.cjs.map +0 -1
- package/dist/chunk-T33VE5XQ.js.map +0 -1
- package/dist/chunk-UIWTFU3M.cjs.map +0 -1
- package/dist/chunk-VDB7VHFS.cjs.map +0 -1
- package/dist/chunk-ZR54IVVS.cjs.map +0 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import '../../chunk-
|
|
2
|
-
import { isHeadNode } from '../../chunk-
|
|
3
|
-
import '../../chunk-
|
|
1
|
+
import '../../chunk-BRJ333QF.js';
|
|
2
|
+
import { isHeadNode } from '../../chunk-QERVED37.js';
|
|
3
|
+
import '../../chunk-OT5M3N76.js';
|
|
4
4
|
import '../../chunk-A3IIJF4E.js';
|
|
5
|
-
import '../../chunk-
|
|
5
|
+
import '../../chunk-AXRTJAXB.js';
|
|
6
6
|
import '../../chunk-Y3UKAJJX.js';
|
|
7
|
-
import '../../chunk-
|
|
7
|
+
import '../../chunk-WDTSKRH5.js';
|
|
8
8
|
import '../../chunk-JKULAG53.js';
|
|
9
|
-
import '../../chunk-GQVJ5UAS.js';
|
|
10
9
|
import '../../chunk-SVWDKXSH.js';
|
|
10
|
+
import '../../chunk-LMCCIFCH.js';
|
|
11
11
|
import '../../chunk-PZ5AY32C.js';
|
|
12
12
|
|
|
13
13
|
// src/adapters/tty/index.ts
|
|
@@ -31,10 +31,11 @@ var renderNode = (node, ctx) => {
|
|
|
31
31
|
if (node.name === CANVAS_SLOT) {
|
|
32
32
|
const canvasId = typeof node.props["canvasId"] === "string" ? node.props["canvasId"] : "";
|
|
33
33
|
if (canvasId === "") return { lines: [] };
|
|
34
|
+
if (ctx.openCanvases.has(canvasId)) return errorBlock("RENDER_ERROR", `canvas "${canvasId}" is placed inside itself`);
|
|
34
35
|
const tree = ctx.api.canvasTree(canvasId);
|
|
35
36
|
if (tree.length === 0) return { lines: [] };
|
|
36
37
|
const { origin: _outer, ...outside } = ctx;
|
|
37
|
-
const canvasCtx = { ...outside, canvas: canvasId };
|
|
38
|
+
const canvasCtx = { ...outside, canvas: canvasId, openCanvases: /* @__PURE__ */ new Set([...ctx.openCanvases, canvasId]) };
|
|
38
39
|
return { lines: [canvasRule(canvasId), ...tree.flatMap((child) => renderNode(child, canvasCtx).lines), ""] };
|
|
39
40
|
}
|
|
40
41
|
const entry = ctx.registry.get(node.name);
|
|
@@ -75,7 +76,7 @@ var tidy = (lines) => {
|
|
|
75
76
|
var createTtyView = (registry, api, options = {}) => {
|
|
76
77
|
const render = () => {
|
|
77
78
|
const out = [];
|
|
78
|
-
const ctx = { registry, canvas: "", api, out, ...options.fallback !== void 0 ? { fallback: options.fallback } : {} };
|
|
79
|
+
const ctx = { registry, canvas: "", api, out, openCanvases: /* @__PURE__ */ new Set(), ...options.fallback !== void 0 ? { fallback: options.fallback } : {} };
|
|
79
80
|
const lines = api.frame().flatMap((node) => renderNode(node, ctx).lines);
|
|
80
81
|
return { text: tidy(lines).join("\n"), interactives: out };
|
|
81
82
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/adapters/tty/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAqCA,IAAM,WAAA,GAAc,YAAA;AACpB,IAAM,WAAA,GAAc,YAAA;AACpB,IAAM,UAAA,GAAa,EAAA;AAWnB,IAAM,UAAA,GAAa,CAAC,IAAA,EAAc,OAAA,MAA+B,EAAE,KAAA,EAAO,CAAC,CAAA,GAAA,EAAM,IAAI,CAAA,EAAA,EAAK,OAAO,CAAA,CAAE,CAAA,EAAE,CAAA;AAErG,IAAM,OAAA,GAAU,CAAC,KAAA,EAAiB,GAAA,KAAwB;AACxD,EAAA,MAAM,QAAQ,KAAA,CAAM,KAAA,CAAM,CAAC,CAAA,EAAG,MAAK,IAAK,EAAA;AACxC,EAAA,OAAO,UAAU,EAAA,GAAK,GAAA,GAA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AM,CAAE,OAAA,CAAQ,CAAC,IAAA,KAAS,UAAA,CAAW,IAAA,EAAM,GAAG,CAAA,CAAE,KAAK,CAAA;AACvE,IAAA,OAAO,EAAE,MAAM,IAAA,CAAK,KAAK,EAAE,IAAA,CAAK,IAAI,CAAA,EAAG,YAAA,EAAc,GAAA,EAAI;AAAA,EAC3D,CAAA;AACA,EAAA,OAAO,EAAE,MAAA,EAAO;AAClB","file":"index.js","sourcesContent":["import type { ComponentRegistry, RenderNode } from '@layout/types';\nimport { isHeadNode } from '@shell';\nimport type { RenderApi } from '@shell';\n\nexport type TtyBlock = { lines: string[] };\n\nexport type TtyInteractiveKind = 'click' | 'row' | 'model' | 'toggle';\n\nexport type TtyInteractive = {\n index: number;\n kind: TtyInteractiveKind;\n ref: string;\n // '' is the frame, which dispatches nothing.\n canvas: string;\n origin?: string;\n label: string;\n // click and row: the dispatch payload. model and toggle: the current value.\n value?: unknown;\n path?: string;\n};\n\nexport type TtyComponentContext = {\n props: Record<string, unknown>;\n children: TtyBlock[];\n register: (entry: { kind: TtyInteractiveKind; ref: string; label: string; value?: unknown; path?: string }) => number;\n};\n\nexport type TtyComponent = (ctx: TtyComponentContext) => TtyBlock;\n\nexport type TtyRenderApi = RenderApi;\n\nexport type TtyFrame = { text: string; interactives: TtyInteractive[] };\n\nexport type TtyView = {\n render: () => TtyFrame;\n};\n\nconst CANVAS_SLOT = 'CanvasSlot';\nconst ACTION_SLOT = 'ActionSlot';\nconst RULE_WIDTH = 60;\n\ntype Ctx = {\n registry: ComponentRegistry<TtyComponent>;\n canvas: string;\n origin?: string;\n api: TtyRenderApi;\n out: TtyInteractive[];\n fallback?: TtyComponent;\n};\n\nconst errorBlock = (code: string, message: string): TtyBlock => ({ lines: [`!! ${code}: ${message}`] });\n\nconst labelOf = (block: TtyBlock, ref: string): string => {\n const first = block.lines[0]?.trim() ?? '';\n return first === '' ? ref : first.slice(0, 48);\n};\n\nconst canvasRule = (id: string): string => {\n const head = `── ${id} `;\n return head + '─'.repeat(Math.max(0, RULE_WIDTH - head.length));\n};\n\nconst renderNode = (node: RenderNode, ctx: Ctx): TtyBlock => {\n if (node.type === 'text') return { lines: node.value.split('\\n') };\n if (node.type === 'fragment') return { lines: node.children.flatMap((child) => renderNode(child, ctx).lines) };\n if (node.type === 'error') return errorBlock(node.code, node.message);\n\n if (isHeadNode(node)) return { lines: [] };\n if (node.name === CANVAS_SLOT) {\n const canvasId = typeof node.props['canvasId'] === 'string' ? (node.props['canvasId'] as string) : '';\n if (canvasId === '') return { lines: [] };\n const tree = ctx.api.canvasTree(canvasId);\n if (tree.length === 0) return { lines: [] };\n // A canvas starts outside any instance, even when an instance's layout placed it.\n const { origin: _outer, ...outside } = ctx;\n const canvasCtx: Ctx = { ...outside, canvas: canvasId };\n return { lines: [canvasRule(canvasId), ...tree.flatMap((child) => renderNode(child, canvasCtx).lines), ''] };\n }\n\n const entry = ctx.registry.get(node.name);\n const build = entry !== undefined ? entry.component : ctx.fallback;\n if (build === undefined) return errorBlock('COMPONENT_NOT_FOUND', node.name);\n\n const instanceId = node.name === ACTION_SLOT ? node.props['instanceId'] : undefined;\n const inner: Ctx = typeof instanceId === 'string' && instanceId !== '' ? { ...ctx, origin: instanceId } : ctx;\n const children = node.children.filter((child) => !isHeadNode(child)).map((child) => renderNode(child, inner));\n const register: TtyComponentContext['register'] = (item) => {\n const interactive: TtyInteractive = { index: ctx.out.length + 1, canvas: ctx.canvas, ...(ctx.origin !== undefined ? { origin: ctx.origin } : {}), ...item };\n ctx.out.push(interactive);\n return interactive.index;\n };\n const block = build({ props: node.props, children, register });\n\n if (node.model !== undefined) {\n const current = node.props['value'] ?? node.props['checked'];\n const kind: TtyInteractiveKind = typeof current === 'boolean' ? 'toggle' : 'model';\n const index = register({ kind, ref: node.model.ref, label: labelOf(block, node.model.ref), value: current, path: node.model.path });\n return { lines: [`[${index}] ${block.lines[0] ?? ''}`, ...block.lines.slice(1)] };\n }\n if (node.ref !== undefined) {\n const value = node.props['value'];\n const index = register({ kind: 'click', ref: node.ref, label: labelOf(block, node.ref), ...(value !== undefined ? { value } : {}) });\n return { lines: [`[${index}] ${block.lines[0] ?? ''}`, ...block.lines.slice(1)] };\n }\n return block;\n};\n\nconst tidy = (lines: string[]): string[] => {\n const out: string[] = [];\n for (const line of lines) {\n if (line.trim() === '' && out[out.length - 1]?.trim() === '') continue;\n out.push(line);\n }\n while (out[0]?.trim() === '') out.shift();\n while (out[out.length - 1]?.trim() === '') out.pop();\n return out;\n};\n\nexport const createTtyView = (\n registry: ComponentRegistry<TtyComponent>,\n api: TtyRenderApi,\n options: { fallback?: TtyComponent } = {},\n): TtyView => {\n const render = (): TtyFrame => {\n const out: TtyInteractive[] = [];\n const ctx: Ctx = { registry, canvas: '', api, out, ...(options.fallback !== undefined ? { fallback: options.fallback } : {}) };\n const lines = api.frame().flatMap((node) => renderNode(node, ctx).lines);\n return { text: tidy(lines).join('\\n'), interactives: out };\n };\n return { render };\n};\n"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/adapters/tty/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAqCA,IAAM,WAAA,GAAc,YAAA;AACpB,IAAM,WAAA,GAAc,YAAA;AACpB,IAAM,UAAA,GAAa,EAAA;AAYnB,IAAM,UAAA,GAAa,CAAC,IAAA,EAAc,OAAA,MAA+B,EAAE,KAAA,EAAO,CAAC,CAAA,GAAA,EAAM,IAAI,CAAA,EAAA,EAAK,OAAO,CAAA,CAAE,CAAA,EAAE,CAAA;AAErG,IAAM,OAAA,GAAU,CAAC,KAAA,EAAiB,GAAA,KAAwB;AACxD,EAAA,MAAM,QAAQ,KAAA,CAAM,KAAA,CAAM,CAAC,CAAA,EAAG,MAAK,IAAK,EAAA;AACxC,EAAA,OAAO,UAAU,EAAA,GAAK,GAAA,GAAM,KAAA,CAAM,KAAA,CAAM,GAAG,EAAE,CAAA;AAC/C,CAAA;AAEA,IAAM,UAAA,GAAa,CAAC,EAAA,KAAuB;AACzC,EAAA,MAAM,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AAA,IAAO,GAAI,OAAA,CAAQ,aAAa,MAAA,GAAY,EAAE,UAAU,OAAA,CAAQ,QAAA,EAAS,GAAI,EAAC,EAAG;AACtJ,IAAA,MAAM,KAAA,GAAQ,GAAA,CAAI,KAAA,EAAM,CAAE,OAAA,CAAQ,CAAC,IAAA,KAAS,UAAA,CAAW,IAAA,EAAM,GAAG,CAAA,CAAE,KAAK,CAAA;AACvE,IAAA,OAAO,EAAE,MAAM,IAAA,CAAK,KAAK,EAAE,IAAA,CAAK,IAAI,CAAA,EAAG,YAAA,EAAc,GAAA,EAAI;AAAA,EAC3D,CAAA;AACA,EAAA,OAAO,EAAE,MAAA,EAAO;AAClB","file":"index.js","sourcesContent":["import type { ComponentRegistry, RenderNode } from '@layout/types';\nimport { isHeadNode } from '@shell';\nimport type { RenderApi } from '@shell';\n\nexport type TtyBlock = { lines: string[] };\n\nexport type TtyInteractiveKind = 'click' | 'row' | 'model' | 'toggle';\n\nexport type TtyInteractive = {\n index: number;\n kind: TtyInteractiveKind;\n ref: string;\n // '' is the frame, which dispatches nothing.\n canvas: string;\n origin?: string;\n label: string;\n // click and row: the dispatch payload. model and toggle: the current value.\n value?: unknown;\n path?: string;\n};\n\nexport type TtyComponentContext = {\n props: Record<string, unknown>;\n children: TtyBlock[];\n register: (entry: { kind: TtyInteractiveKind; ref: string; label: string; value?: unknown; path?: string }) => number;\n};\n\nexport type TtyComponent = (ctx: TtyComponentContext) => TtyBlock;\n\nexport type TtyRenderApi = RenderApi;\n\nexport type TtyFrame = { text: string; interactives: TtyInteractive[] };\n\nexport type TtyView = {\n render: () => TtyFrame;\n};\n\nconst CANVAS_SLOT = 'CanvasSlot';\nconst ACTION_SLOT = 'ActionSlot';\nconst RULE_WIDTH = 60;\n\ntype Ctx = {\n registry: ComponentRegistry<TtyComponent>;\n canvas: string;\n origin?: string;\n api: TtyRenderApi;\n out: TtyInteractive[];\n fallback?: TtyComponent;\n openCanvases: ReadonlySet<string>;\n};\n\nconst errorBlock = (code: string, message: string): TtyBlock => ({ lines: [`!! ${code}: ${message}`] });\n\nconst labelOf = (block: TtyBlock, ref: string): string => {\n const first = block.lines[0]?.trim() ?? '';\n return first === '' ? ref : first.slice(0, 48);\n};\n\nconst canvasRule = (id: string): string => {\n const head = `── ${id} `;\n return head + '─'.repeat(Math.max(0, RULE_WIDTH - head.length));\n};\n\nconst renderNode = (node: RenderNode, ctx: Ctx): TtyBlock => {\n if (node.type === 'text') return { lines: node.value.split('\\n') };\n if (node.type === 'fragment') return { lines: node.children.flatMap((child) => renderNode(child, ctx).lines) };\n if (node.type === 'error') return errorBlock(node.code, node.message);\n\n if (isHeadNode(node)) return { lines: [] };\n if (node.name === CANVAS_SLOT) {\n const canvasId = typeof node.props['canvasId'] === 'string' ? (node.props['canvasId'] as string) : '';\n if (canvasId === '') return { lines: [] };\n if (ctx.openCanvases.has(canvasId)) return errorBlock('RENDER_ERROR', `canvas \"${canvasId}\" is placed inside itself`);\n const tree = ctx.api.canvasTree(canvasId);\n if (tree.length === 0) return { lines: [] };\n // A canvas starts outside any instance, even when an instance's layout placed it.\n const { origin: _outer, ...outside } = ctx;\n const canvasCtx: Ctx = { ...outside, canvas: canvasId, openCanvases: new Set([...ctx.openCanvases, canvasId]) };\n return { lines: [canvasRule(canvasId), ...tree.flatMap((child) => renderNode(child, canvasCtx).lines), ''] };\n }\n\n const entry = ctx.registry.get(node.name);\n const build = entry !== undefined ? entry.component : ctx.fallback;\n if (build === undefined) return errorBlock('COMPONENT_NOT_FOUND', node.name);\n\n const instanceId = node.name === ACTION_SLOT ? node.props['instanceId'] : undefined;\n const inner: Ctx = typeof instanceId === 'string' && instanceId !== '' ? { ...ctx, origin: instanceId } : ctx;\n const children = node.children.filter((child) => !isHeadNode(child)).map((child) => renderNode(child, inner));\n const register: TtyComponentContext['register'] = (item) => {\n const interactive: TtyInteractive = { index: ctx.out.length + 1, canvas: ctx.canvas, ...(ctx.origin !== undefined ? { origin: ctx.origin } : {}), ...item };\n ctx.out.push(interactive);\n return interactive.index;\n };\n const block = build({ props: node.props, children, register });\n\n if (node.model !== undefined) {\n const current = node.props['value'] ?? node.props['checked'];\n const kind: TtyInteractiveKind = typeof current === 'boolean' ? 'toggle' : 'model';\n const index = register({ kind, ref: node.model.ref, label: labelOf(block, node.model.ref), value: current, path: node.model.path });\n return { lines: [`[${index}] ${block.lines[0] ?? ''}`, ...block.lines.slice(1)] };\n }\n if (node.ref !== undefined) {\n const value = node.props['value'];\n const index = register({ kind: 'click', ref: node.ref, label: labelOf(block, node.ref), ...(value !== undefined ? { value } : {}) });\n return { lines: [`[${index}] ${block.lines[0] ?? ''}`, ...block.lines.slice(1)] };\n }\n return block;\n};\n\nconst tidy = (lines: string[]): string[] => {\n const out: string[] = [];\n for (const line of lines) {\n if (line.trim() === '' && out[out.length - 1]?.trim() === '') continue;\n out.push(line);\n }\n while (out[0]?.trim() === '') out.shift();\n while (out[out.length - 1]?.trim() === '') out.pop();\n return out;\n};\n\nexport const createTtyView = (\n registry: ComponentRegistry<TtyComponent>,\n api: TtyRenderApi,\n options: { fallback?: TtyComponent } = {},\n): TtyView => {\n const render = (): TtyFrame => {\n const out: TtyInteractive[] = [];\n const ctx: Ctx = { registry, canvas: '', api, out, openCanvases: new Set(), ...(options.fallback !== undefined ? { fallback: options.fallback } : {}) };\n const lines = api.frame().flatMap((node) => renderNode(node, ctx).lines);\n return { text: tidy(lines).join('\\n'), interactives: out };\n };\n return { render };\n};\n"]}
|
|
@@ -1,97 +1,98 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkJ4HGCXLB_cjs = require('../../../chunk-J4HGCXLB.cjs');
|
|
4
|
+
var chunkSB3MKJH2_cjs = require('../../../chunk-SB3MKJH2.cjs');
|
|
5
|
+
require('../../../chunk-SYKWLQJZ.cjs');
|
|
5
6
|
require('../../../chunk-QHX3VA55.cjs');
|
|
6
|
-
require('../../../chunk-
|
|
7
|
-
require('../../../chunk-
|
|
8
|
-
require('../../../chunk-
|
|
7
|
+
require('../../../chunk-OWUKAB6M.cjs');
|
|
8
|
+
require('../../../chunk-7BRC4PL4.cjs');
|
|
9
|
+
require('../../../chunk-L63PCZNQ.cjs');
|
|
9
10
|
require('../../../chunk-OM2HY2GE.cjs');
|
|
10
|
-
require('../../../chunk-
|
|
11
|
+
require('../../../chunk-3TBQ2KGZ.cjs');
|
|
11
12
|
require('../../../chunk-MEZCO7ND.cjs');
|
|
12
|
-
require('../../../chunk-
|
|
13
|
+
require('../../../chunk-XBTAEOKJ.cjs');
|
|
13
14
|
require('../../../chunk-NBXZ3RAC.cjs');
|
|
14
|
-
require('../../../chunk-ITGR7P2B.cjs');
|
|
15
15
|
require('../../../chunk-3XFQI5P2.cjs');
|
|
16
|
+
require('../../../chunk-BA77UJOE.cjs');
|
|
16
17
|
require('../../../chunk-Q7SFCCGT.cjs');
|
|
17
18
|
|
|
18
19
|
|
|
19
20
|
|
|
20
21
|
Object.defineProperty(exports, "ActionSlot", {
|
|
21
22
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
23
|
+
get: function () { return chunkJ4HGCXLB_cjs.ActionSlot; }
|
|
23
24
|
});
|
|
24
25
|
Object.defineProperty(exports, "Box", {
|
|
25
26
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
27
|
+
get: function () { return chunkJ4HGCXLB_cjs.Box; }
|
|
27
28
|
});
|
|
28
29
|
Object.defineProperty(exports, "Button", {
|
|
29
30
|
enumerable: true,
|
|
30
|
-
get: function () { return
|
|
31
|
+
get: function () { return chunkJ4HGCXLB_cjs.Button; }
|
|
31
32
|
});
|
|
32
33
|
Object.defineProperty(exports, "CanvasSlot", {
|
|
33
34
|
enumerable: true,
|
|
34
|
-
get: function () { return
|
|
35
|
+
get: function () { return chunkJ4HGCXLB_cjs.CanvasSlot; }
|
|
35
36
|
});
|
|
36
37
|
Object.defineProperty(exports, "Input", {
|
|
37
38
|
enumerable: true,
|
|
38
|
-
get: function () { return
|
|
39
|
+
get: function () { return chunkJ4HGCXLB_cjs.Input; }
|
|
39
40
|
});
|
|
40
41
|
Object.defineProperty(exports, "JsonTree", {
|
|
41
42
|
enumerable: true,
|
|
42
|
-
get: function () { return
|
|
43
|
+
get: function () { return chunkJ4HGCXLB_cjs.JsonTree; }
|
|
43
44
|
});
|
|
44
45
|
Object.defineProperty(exports, "Panel", {
|
|
45
46
|
enumerable: true,
|
|
46
|
-
get: function () { return
|
|
47
|
+
get: function () { return chunkJ4HGCXLB_cjs.Panel; }
|
|
47
48
|
});
|
|
48
49
|
Object.defineProperty(exports, "Stack", {
|
|
49
50
|
enumerable: true,
|
|
50
|
-
get: function () { return
|
|
51
|
+
get: function () { return chunkJ4HGCXLB_cjs.Stack; }
|
|
51
52
|
});
|
|
52
53
|
Object.defineProperty(exports, "Text", {
|
|
53
54
|
enumerable: true,
|
|
54
|
-
get: function () { return
|
|
55
|
+
get: function () { return chunkJ4HGCXLB_cjs.Text; }
|
|
55
56
|
});
|
|
56
57
|
Object.defineProperty(exports, "registerNovaVueComponents", {
|
|
57
58
|
enumerable: true,
|
|
58
|
-
get: function () { return
|
|
59
|
+
get: function () { return chunkJ4HGCXLB_cjs.registerNovaVueComponents; }
|
|
59
60
|
});
|
|
60
61
|
Object.defineProperty(exports, "ActionSlotPropsSchema", {
|
|
61
62
|
enumerable: true,
|
|
62
|
-
get: function () { return
|
|
63
|
+
get: function () { return chunkSB3MKJH2_cjs.ActionSlotPropsSchema; }
|
|
63
64
|
});
|
|
64
65
|
Object.defineProperty(exports, "BoxPropsSchema", {
|
|
65
66
|
enumerable: true,
|
|
66
|
-
get: function () { return
|
|
67
|
+
get: function () { return chunkSB3MKJH2_cjs.BoxPropsSchema; }
|
|
67
68
|
});
|
|
68
69
|
Object.defineProperty(exports, "ButtonPropsSchema", {
|
|
69
70
|
enumerable: true,
|
|
70
|
-
get: function () { return
|
|
71
|
+
get: function () { return chunkSB3MKJH2_cjs.ButtonPropsSchema; }
|
|
71
72
|
});
|
|
72
73
|
Object.defineProperty(exports, "CanvasSlotPropsSchema", {
|
|
73
74
|
enumerable: true,
|
|
74
|
-
get: function () { return
|
|
75
|
+
get: function () { return chunkSB3MKJH2_cjs.CanvasSlotPropsSchema; }
|
|
75
76
|
});
|
|
76
77
|
Object.defineProperty(exports, "InputPropsSchema", {
|
|
77
78
|
enumerable: true,
|
|
78
|
-
get: function () { return
|
|
79
|
+
get: function () { return chunkSB3MKJH2_cjs.InputPropsSchema; }
|
|
79
80
|
});
|
|
80
81
|
Object.defineProperty(exports, "JsonTreePropsSchema", {
|
|
81
82
|
enumerable: true,
|
|
82
|
-
get: function () { return
|
|
83
|
+
get: function () { return chunkSB3MKJH2_cjs.JsonTreePropsSchema; }
|
|
83
84
|
});
|
|
84
85
|
Object.defineProperty(exports, "PanelPropsSchema", {
|
|
85
86
|
enumerable: true,
|
|
86
|
-
get: function () { return
|
|
87
|
+
get: function () { return chunkSB3MKJH2_cjs.PanelPropsSchema; }
|
|
87
88
|
});
|
|
88
89
|
Object.defineProperty(exports, "StackPropsSchema", {
|
|
89
90
|
enumerable: true,
|
|
90
|
-
get: function () { return
|
|
91
|
+
get: function () { return chunkSB3MKJH2_cjs.StackPropsSchema; }
|
|
91
92
|
});
|
|
92
93
|
Object.defineProperty(exports, "TextPropsSchema", {
|
|
93
94
|
enumerable: true,
|
|
94
|
-
get: function () { return
|
|
95
|
+
get: function () { return chunkSB3MKJH2_cjs.TextPropsSchema; }
|
|
95
96
|
});
|
|
96
97
|
//# sourceMappingURL=index.cjs.map
|
|
97
98
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { C as ComponentRegistry } from '../../../types-
|
|
1
|
+
import { C as ComponentRegistry } from '../../../types-Wze4IlEM.cjs';
|
|
2
2
|
import * as zod_v4_core from 'zod/v4/core';
|
|
3
3
|
import * as zod from 'zod';
|
|
4
4
|
import * as vue from 'vue';
|
|
5
|
-
import { c as NovaComponentProps } from '../../../types-
|
|
6
|
-
export { A as ActionSlotProps, b as ActionSlotPropsSchema, a as BoxProps, c as BoxPropsSchema, B as ButtonProps, d as ButtonPropsSchema, C as CanvasSlotProps, e as CanvasSlotPropsSchema, I as InputProps, f as InputPropsSchema, J as JsonTreeProps, g as JsonTreePropsSchema, P as PanelProps, h as PanelPropsSchema, S as StackProps, i as StackPropsSchema, T as TextProps, j as TextPropsSchema } from '../../../primitive-props-
|
|
5
|
+
import { c as NovaComponentProps } from '../../../types-BLESXdu0.cjs';
|
|
6
|
+
export { A as ActionSlotProps, b as ActionSlotPropsSchema, a as BoxProps, c as BoxPropsSchema, B as ButtonProps, d as ButtonPropsSchema, C as CanvasSlotProps, e as CanvasSlotPropsSchema, I as InputProps, f as InputPropsSchema, J as JsonTreeProps, g as JsonTreePropsSchema, P as PanelProps, h as PanelPropsSchema, S as StackProps, i as StackPropsSchema, T as TextProps, j as TextPropsSchema } from '../../../primitive-props-BI8aHvma.cjs';
|
|
7
7
|
import '../../../schemas-DPdeFlCT.cjs';
|
|
8
8
|
import '../../../schemas-pMyyuXV7.cjs';
|
|
9
9
|
|
|
10
10
|
declare const Stack: vue.DefineSetupFnComponent<{
|
|
11
11
|
direction?: "row" | "column" | undefined;
|
|
12
12
|
gap?: number | undefined;
|
|
13
|
-
align?: "
|
|
14
|
-
justify?: "
|
|
13
|
+
align?: "center" | "start" | "end" | "stretch" | undefined;
|
|
14
|
+
justify?: "center" | "start" | "end" | "between" | "around" | undefined;
|
|
15
15
|
padding?: number | undefined;
|
|
16
16
|
wrap?: boolean | undefined;
|
|
17
17
|
}, {}, {}, {
|
|
18
18
|
direction?: "row" | "column" | undefined;
|
|
19
19
|
gap?: number | undefined;
|
|
20
|
-
align?: "
|
|
21
|
-
justify?: "
|
|
20
|
+
align?: "center" | "start" | "end" | "stretch" | undefined;
|
|
21
|
+
justify?: "center" | "start" | "end" | "between" | "around" | undefined;
|
|
22
22
|
padding?: number | undefined;
|
|
23
23
|
wrap?: boolean | undefined;
|
|
24
24
|
} & {}, vue.PublicProps> & {
|
|
@@ -31,14 +31,14 @@ declare const Stack: vue.DefineSetupFnComponent<{
|
|
|
31
31
|
}>>;
|
|
32
32
|
gap: zod.ZodOptional<zod.ZodNumber>;
|
|
33
33
|
align: zod.ZodOptional<zod.ZodEnum<{
|
|
34
|
-
start: "start";
|
|
35
34
|
center: "center";
|
|
35
|
+
start: "start";
|
|
36
36
|
end: "end";
|
|
37
37
|
stretch: "stretch";
|
|
38
38
|
}>>;
|
|
39
39
|
justify: zod.ZodOptional<zod.ZodEnum<{
|
|
40
|
-
start: "start";
|
|
41
40
|
center: "center";
|
|
41
|
+
start: "start";
|
|
42
42
|
end: "end";
|
|
43
43
|
between: "between";
|
|
44
44
|
around: "around";
|
|
@@ -72,12 +72,12 @@ declare const Box: vue.DefineSetupFnComponent<{
|
|
|
72
72
|
declare const Text: vue.DefineSetupFnComponent<{
|
|
73
73
|
as?: "h1" | "h2" | "h3" | "h4" | "p" | "span" | undefined;
|
|
74
74
|
size?: "sm" | "md" | "lg" | "xl" | "2xl" | undefined;
|
|
75
|
-
weight?: "
|
|
75
|
+
weight?: "bold" | "normal" | "medium" | undefined;
|
|
76
76
|
color?: string | undefined;
|
|
77
77
|
}, {}, {}, {
|
|
78
78
|
as?: "h1" | "h2" | "h3" | "h4" | "p" | "span" | undefined;
|
|
79
79
|
size?: "sm" | "md" | "lg" | "xl" | "2xl" | undefined;
|
|
80
|
-
weight?: "
|
|
80
|
+
weight?: "bold" | "normal" | "medium" | undefined;
|
|
81
81
|
color?: string | undefined;
|
|
82
82
|
} & {}, vue.PublicProps> & {
|
|
83
83
|
meta: {
|
|
@@ -99,9 +99,9 @@ declare const Text: vue.DefineSetupFnComponent<{
|
|
|
99
99
|
"2xl": "2xl";
|
|
100
100
|
}>>;
|
|
101
101
|
weight: zod.ZodOptional<zod.ZodEnum<{
|
|
102
|
+
bold: "bold";
|
|
102
103
|
normal: "normal";
|
|
103
104
|
medium: "medium";
|
|
104
|
-
bold: "bold";
|
|
105
105
|
}>>;
|
|
106
106
|
color: zod.ZodOptional<zod.ZodString>;
|
|
107
107
|
}, zod_v4_core.$strict>;
|
|
@@ -136,12 +136,14 @@ declare const Input: vue.DefineSetupFnComponent<NovaComponentProps & {
|
|
|
136
136
|
disabled?: boolean | undefined;
|
|
137
137
|
value?: string | undefined;
|
|
138
138
|
debounce?: number | undefined;
|
|
139
|
+
replaceDraftOnWrite?: boolean | undefined;
|
|
139
140
|
}, {}, {}, NovaComponentProps & {
|
|
140
141
|
type?: "number" | "text" | "email" | "password" | undefined;
|
|
141
142
|
placeholder?: string | undefined;
|
|
142
143
|
disabled?: boolean | undefined;
|
|
143
144
|
value?: string | undefined;
|
|
144
145
|
debounce?: number | undefined;
|
|
146
|
+
replaceDraftOnWrite?: boolean | undefined;
|
|
145
147
|
} & {}, vue.PublicProps> & {
|
|
146
148
|
meta: {
|
|
147
149
|
description: string;
|
|
@@ -156,6 +158,7 @@ declare const Input: vue.DefineSetupFnComponent<NovaComponentProps & {
|
|
|
156
158
|
disabled: zod.ZodOptional<zod.ZodBoolean>;
|
|
157
159
|
value: zod.ZodOptional<zod.ZodString>;
|
|
158
160
|
debounce: zod.ZodOptional<zod.ZodNumber>;
|
|
161
|
+
replaceDraftOnWrite: zod.ZodOptional<zod.ZodBoolean>;
|
|
159
162
|
}, zod_v4_core.$strict>;
|
|
160
163
|
};
|
|
161
164
|
};
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { C as ComponentRegistry } from '../../../types-
|
|
1
|
+
import { C as ComponentRegistry } from '../../../types-B5-GtEik.js';
|
|
2
2
|
import * as zod_v4_core from 'zod/v4/core';
|
|
3
3
|
import * as zod from 'zod';
|
|
4
4
|
import * as vue from 'vue';
|
|
5
|
-
import { c as NovaComponentProps } from '../../../types-
|
|
6
|
-
export { A as ActionSlotProps, b as ActionSlotPropsSchema, a as BoxProps, c as BoxPropsSchema, B as ButtonProps, d as ButtonPropsSchema, C as CanvasSlotProps, e as CanvasSlotPropsSchema, I as InputProps, f as InputPropsSchema, J as JsonTreeProps, g as JsonTreePropsSchema, P as PanelProps, h as PanelPropsSchema, S as StackProps, i as StackPropsSchema, T as TextProps, j as TextPropsSchema } from '../../../primitive-props-
|
|
5
|
+
import { c as NovaComponentProps } from '../../../types-Lld1eifz.js';
|
|
6
|
+
export { A as ActionSlotProps, b as ActionSlotPropsSchema, a as BoxProps, c as BoxPropsSchema, B as ButtonProps, d as ButtonPropsSchema, C as CanvasSlotProps, e as CanvasSlotPropsSchema, I as InputProps, f as InputPropsSchema, J as JsonTreeProps, g as JsonTreePropsSchema, P as PanelProps, h as PanelPropsSchema, S as StackProps, i as StackPropsSchema, T as TextProps, j as TextPropsSchema } from '../../../primitive-props-BI8aHvma.js';
|
|
7
7
|
import '../../../schemas-DPdeFlCT.js';
|
|
8
8
|
import '../../../schemas-pMyyuXV7.js';
|
|
9
9
|
|
|
10
10
|
declare const Stack: vue.DefineSetupFnComponent<{
|
|
11
11
|
direction?: "row" | "column" | undefined;
|
|
12
12
|
gap?: number | undefined;
|
|
13
|
-
align?: "
|
|
14
|
-
justify?: "
|
|
13
|
+
align?: "center" | "start" | "end" | "stretch" | undefined;
|
|
14
|
+
justify?: "center" | "start" | "end" | "between" | "around" | undefined;
|
|
15
15
|
padding?: number | undefined;
|
|
16
16
|
wrap?: boolean | undefined;
|
|
17
17
|
}, {}, {}, {
|
|
18
18
|
direction?: "row" | "column" | undefined;
|
|
19
19
|
gap?: number | undefined;
|
|
20
|
-
align?: "
|
|
21
|
-
justify?: "
|
|
20
|
+
align?: "center" | "start" | "end" | "stretch" | undefined;
|
|
21
|
+
justify?: "center" | "start" | "end" | "between" | "around" | undefined;
|
|
22
22
|
padding?: number | undefined;
|
|
23
23
|
wrap?: boolean | undefined;
|
|
24
24
|
} & {}, vue.PublicProps> & {
|
|
@@ -31,14 +31,14 @@ declare const Stack: vue.DefineSetupFnComponent<{
|
|
|
31
31
|
}>>;
|
|
32
32
|
gap: zod.ZodOptional<zod.ZodNumber>;
|
|
33
33
|
align: zod.ZodOptional<zod.ZodEnum<{
|
|
34
|
-
start: "start";
|
|
35
34
|
center: "center";
|
|
35
|
+
start: "start";
|
|
36
36
|
end: "end";
|
|
37
37
|
stretch: "stretch";
|
|
38
38
|
}>>;
|
|
39
39
|
justify: zod.ZodOptional<zod.ZodEnum<{
|
|
40
|
-
start: "start";
|
|
41
40
|
center: "center";
|
|
41
|
+
start: "start";
|
|
42
42
|
end: "end";
|
|
43
43
|
between: "between";
|
|
44
44
|
around: "around";
|
|
@@ -72,12 +72,12 @@ declare const Box: vue.DefineSetupFnComponent<{
|
|
|
72
72
|
declare const Text: vue.DefineSetupFnComponent<{
|
|
73
73
|
as?: "h1" | "h2" | "h3" | "h4" | "p" | "span" | undefined;
|
|
74
74
|
size?: "sm" | "md" | "lg" | "xl" | "2xl" | undefined;
|
|
75
|
-
weight?: "
|
|
75
|
+
weight?: "bold" | "normal" | "medium" | undefined;
|
|
76
76
|
color?: string | undefined;
|
|
77
77
|
}, {}, {}, {
|
|
78
78
|
as?: "h1" | "h2" | "h3" | "h4" | "p" | "span" | undefined;
|
|
79
79
|
size?: "sm" | "md" | "lg" | "xl" | "2xl" | undefined;
|
|
80
|
-
weight?: "
|
|
80
|
+
weight?: "bold" | "normal" | "medium" | undefined;
|
|
81
81
|
color?: string | undefined;
|
|
82
82
|
} & {}, vue.PublicProps> & {
|
|
83
83
|
meta: {
|
|
@@ -99,9 +99,9 @@ declare const Text: vue.DefineSetupFnComponent<{
|
|
|
99
99
|
"2xl": "2xl";
|
|
100
100
|
}>>;
|
|
101
101
|
weight: zod.ZodOptional<zod.ZodEnum<{
|
|
102
|
+
bold: "bold";
|
|
102
103
|
normal: "normal";
|
|
103
104
|
medium: "medium";
|
|
104
|
-
bold: "bold";
|
|
105
105
|
}>>;
|
|
106
106
|
color: zod.ZodOptional<zod.ZodString>;
|
|
107
107
|
}, zod_v4_core.$strict>;
|
|
@@ -136,12 +136,14 @@ declare const Input: vue.DefineSetupFnComponent<NovaComponentProps & {
|
|
|
136
136
|
disabled?: boolean | undefined;
|
|
137
137
|
value?: string | undefined;
|
|
138
138
|
debounce?: number | undefined;
|
|
139
|
+
replaceDraftOnWrite?: boolean | undefined;
|
|
139
140
|
}, {}, {}, NovaComponentProps & {
|
|
140
141
|
type?: "number" | "text" | "email" | "password" | undefined;
|
|
141
142
|
placeholder?: string | undefined;
|
|
142
143
|
disabled?: boolean | undefined;
|
|
143
144
|
value?: string | undefined;
|
|
144
145
|
debounce?: number | undefined;
|
|
146
|
+
replaceDraftOnWrite?: boolean | undefined;
|
|
145
147
|
} & {}, vue.PublicProps> & {
|
|
146
148
|
meta: {
|
|
147
149
|
description: string;
|
|
@@ -156,6 +158,7 @@ declare const Input: vue.DefineSetupFnComponent<NovaComponentProps & {
|
|
|
156
158
|
disabled: zod.ZodOptional<zod.ZodBoolean>;
|
|
157
159
|
value: zod.ZodOptional<zod.ZodString>;
|
|
158
160
|
debounce: zod.ZodOptional<zod.ZodNumber>;
|
|
161
|
+
replaceDraftOnWrite: zod.ZodOptional<zod.ZodBoolean>;
|
|
159
162
|
}, zod_v4_core.$strict>;
|
|
160
163
|
};
|
|
161
164
|
};
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
export { ActionSlot, Box, Button, CanvasSlot, Input, JsonTree, Panel, Stack, Text, registerNovaVueComponents } from '../../../chunk-
|
|
2
|
-
export { ActionSlotPropsSchema, BoxPropsSchema, ButtonPropsSchema, CanvasSlotPropsSchema, InputPropsSchema, JsonTreePropsSchema, PanelPropsSchema, StackPropsSchema, TextPropsSchema } from '../../../chunk-
|
|
1
|
+
export { ActionSlot, Box, Button, CanvasSlot, Input, JsonTree, Panel, Stack, Text, registerNovaVueComponents } from '../../../chunk-2USXK2G4.js';
|
|
2
|
+
export { ActionSlotPropsSchema, BoxPropsSchema, ButtonPropsSchema, CanvasSlotPropsSchema, InputPropsSchema, JsonTreePropsSchema, PanelPropsSchema, StackPropsSchema, TextPropsSchema } from '../../../chunk-YMXFBHWZ.js';
|
|
3
|
+
import '../../../chunk-GAWBA53C.js';
|
|
3
4
|
import '../../../chunk-SCXYAXMO.js';
|
|
4
|
-
import '../../../chunk-
|
|
5
|
-
import '../../../chunk-
|
|
6
|
-
import '../../../chunk-
|
|
5
|
+
import '../../../chunk-BRJ333QF.js';
|
|
6
|
+
import '../../../chunk-QERVED37.js';
|
|
7
|
+
import '../../../chunk-OT5M3N76.js';
|
|
7
8
|
import '../../../chunk-A3IIJF4E.js';
|
|
8
|
-
import '../../../chunk-
|
|
9
|
+
import '../../../chunk-AXRTJAXB.js';
|
|
9
10
|
import '../../../chunk-Y3UKAJJX.js';
|
|
10
|
-
import '../../../chunk-
|
|
11
|
+
import '../../../chunk-WDTSKRH5.js';
|
|
11
12
|
import '../../../chunk-JKULAG53.js';
|
|
12
|
-
import '../../../chunk-GQVJ5UAS.js';
|
|
13
13
|
import '../../../chunk-SVWDKXSH.js';
|
|
14
|
+
import '../../../chunk-LMCCIFCH.js';
|
|
14
15
|
import '../../../chunk-PZ5AY32C.js';
|
|
15
16
|
//# sourceMappingURL=index.js.map
|
|
16
17
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../../chunk-
|
|
3
|
+
var chunkJ4HGCXLB_cjs = require('../../chunk-J4HGCXLB.cjs');
|
|
4
|
+
require('../../chunk-SB3MKJH2.cjs');
|
|
5
|
+
require('../../chunk-SYKWLQJZ.cjs');
|
|
5
6
|
require('../../chunk-QHX3VA55.cjs');
|
|
6
|
-
require('../../chunk-
|
|
7
|
-
var
|
|
8
|
-
require('../../chunk-
|
|
7
|
+
require('../../chunk-OWUKAB6M.cjs');
|
|
8
|
+
var chunk7BRC4PL4_cjs = require('../../chunk-7BRC4PL4.cjs');
|
|
9
|
+
require('../../chunk-L63PCZNQ.cjs');
|
|
9
10
|
require('../../chunk-OM2HY2GE.cjs');
|
|
10
|
-
require('../../chunk-
|
|
11
|
+
require('../../chunk-3TBQ2KGZ.cjs');
|
|
11
12
|
require('../../chunk-MEZCO7ND.cjs');
|
|
12
|
-
require('../../chunk-
|
|
13
|
+
require('../../chunk-XBTAEOKJ.cjs');
|
|
13
14
|
require('../../chunk-NBXZ3RAC.cjs');
|
|
14
|
-
require('../../chunk-ITGR7P2B.cjs');
|
|
15
15
|
require('../../chunk-3XFQI5P2.cjs');
|
|
16
|
+
require('../../chunk-BA77UJOE.cjs');
|
|
16
17
|
require('../../chunk-Q7SFCCGT.cjs');
|
|
17
18
|
var vue = require('vue');
|
|
18
19
|
|
|
@@ -39,7 +40,7 @@ var NovaRenderProvider = vue.defineComponent(
|
|
|
39
40
|
return props.fallback;
|
|
40
41
|
}
|
|
41
42
|
};
|
|
42
|
-
vue.provide(
|
|
43
|
+
vue.provide(chunkJ4HGCXLB_cjs.NovaRenderKey, value);
|
|
43
44
|
return () => slots.default?.();
|
|
44
45
|
},
|
|
45
46
|
{ name: "NovaRenderProvider", props: ["registry", "dispatch", "publish", "slotWrapper", "fallback"] }
|
|
@@ -51,8 +52,8 @@ var NovaShellProvider = vue.defineComponent(
|
|
|
51
52
|
return props.shell;
|
|
52
53
|
}
|
|
53
54
|
};
|
|
54
|
-
vue.provide(
|
|
55
|
-
|
|
55
|
+
vue.provide(chunkJ4HGCXLB_cjs.NovaShellKey, source);
|
|
56
|
+
chunkJ4HGCXLB_cjs.provideShellHead(() => props.shell);
|
|
56
57
|
const dispatch = (event) => props.shell.dispatch(event);
|
|
57
58
|
const publish = (channel, payload) => props.shell.publish(channel, payload);
|
|
58
59
|
return () => vue.h(
|
|
@@ -82,13 +83,13 @@ var NovaErrorBoundary = vue.defineComponent(
|
|
|
82
83
|
{ name: "NovaErrorBoundary", props: ["fallback", "onError"] }
|
|
83
84
|
);
|
|
84
85
|
var ensureVueBuiltins = (registry) => {
|
|
85
|
-
if (registry.has(
|
|
86
|
-
|
|
86
|
+
if (registry.has(chunk7BRC4PL4_cjs.CANVAS_SLOT_NAME)) return;
|
|
87
|
+
chunkJ4HGCXLB_cjs.registerNovaVueComponents(registry);
|
|
87
88
|
};
|
|
88
89
|
var ShellRenderTreeView = vue.defineComponent(
|
|
89
90
|
() => {
|
|
90
|
-
const nodes =
|
|
91
|
-
return () => vue.h(
|
|
91
|
+
const nodes = chunkJ4HGCXLB_cjs.useShellRenderTree();
|
|
92
|
+
return () => vue.h(chunkJ4HGCXLB_cjs.RenderTree, { nodes: nodes.value });
|
|
92
93
|
},
|
|
93
94
|
{ name: "NovaShellRenderTree" }
|
|
94
95
|
);
|
|
@@ -105,9 +106,9 @@ var NovaShell = vue.defineComponent(
|
|
|
105
106
|
);
|
|
106
107
|
var CanvasRenderTreeView = vue.defineComponent(
|
|
107
108
|
(props) => {
|
|
108
|
-
|
|
109
|
-
const nodes =
|
|
110
|
-
return () => vue.h(
|
|
109
|
+
chunkJ4HGCXLB_cjs.useShell();
|
|
110
|
+
const nodes = chunkJ4HGCXLB_cjs.useCanvasRenderTree(() => props.canvasId);
|
|
111
|
+
return () => vue.h(chunkJ4HGCXLB_cjs.RenderTree, { nodes: nodes.value });
|
|
111
112
|
},
|
|
112
113
|
{ name: "NovaCanvasRenderTree", props: ["canvasId"] }
|
|
113
114
|
);
|
|
@@ -126,75 +127,75 @@ var NovaCanvas = vue.defineComponent(
|
|
|
126
127
|
|
|
127
128
|
Object.defineProperty(exports, "ErrorMarker", {
|
|
128
129
|
enumerable: true,
|
|
129
|
-
get: function () { return
|
|
130
|
+
get: function () { return chunkJ4HGCXLB_cjs.ErrorMarker; }
|
|
130
131
|
});
|
|
131
132
|
Object.defineProperty(exports, "NovaRenderKey", {
|
|
132
133
|
enumerable: true,
|
|
133
|
-
get: function () { return
|
|
134
|
+
get: function () { return chunkJ4HGCXLB_cjs.NovaRenderKey; }
|
|
134
135
|
});
|
|
135
136
|
Object.defineProperty(exports, "NovaShellKey", {
|
|
136
137
|
enumerable: true,
|
|
137
|
-
get: function () { return
|
|
138
|
+
get: function () { return chunkJ4HGCXLB_cjs.NovaShellKey; }
|
|
138
139
|
});
|
|
139
140
|
Object.defineProperty(exports, "RenderNodeView", {
|
|
140
141
|
enumerable: true,
|
|
141
|
-
get: function () { return
|
|
142
|
+
get: function () { return chunkJ4HGCXLB_cjs.RenderNodeView; }
|
|
142
143
|
});
|
|
143
144
|
Object.defineProperty(exports, "RenderTree", {
|
|
144
145
|
enumerable: true,
|
|
145
|
-
get: function () { return
|
|
146
|
+
get: function () { return chunkJ4HGCXLB_cjs.RenderTree; }
|
|
146
147
|
});
|
|
147
148
|
Object.defineProperty(exports, "isNovaComponent", {
|
|
148
149
|
enumerable: true,
|
|
149
|
-
get: function () { return
|
|
150
|
+
get: function () { return chunkJ4HGCXLB_cjs.isNovaComponent; }
|
|
150
151
|
});
|
|
151
152
|
Object.defineProperty(exports, "useActionData", {
|
|
152
153
|
enumerable: true,
|
|
153
|
-
get: function () { return
|
|
154
|
+
get: function () { return chunkJ4HGCXLB_cjs.useActionData; }
|
|
154
155
|
});
|
|
155
156
|
Object.defineProperty(exports, "useActionStatus", {
|
|
156
157
|
enumerable: true,
|
|
157
|
-
get: function () { return
|
|
158
|
+
get: function () { return chunkJ4HGCXLB_cjs.useActionStatus; }
|
|
158
159
|
});
|
|
159
160
|
Object.defineProperty(exports, "useCanvas", {
|
|
160
161
|
enumerable: true,
|
|
161
|
-
get: function () { return
|
|
162
|
+
get: function () { return chunkJ4HGCXLB_cjs.useCanvas; }
|
|
162
163
|
});
|
|
163
164
|
Object.defineProperty(exports, "useCanvasRenderTree", {
|
|
164
165
|
enumerable: true,
|
|
165
|
-
get: function () { return
|
|
166
|
+
get: function () { return chunkJ4HGCXLB_cjs.useCanvasRenderTree; }
|
|
166
167
|
});
|
|
167
168
|
Object.defineProperty(exports, "useNovaDispatch", {
|
|
168
169
|
enumerable: true,
|
|
169
|
-
get: function () { return
|
|
170
|
+
get: function () { return chunkJ4HGCXLB_cjs.useNovaDispatch; }
|
|
170
171
|
});
|
|
171
172
|
Object.defineProperty(exports, "useNovaPublish", {
|
|
172
173
|
enumerable: true,
|
|
173
|
-
get: function () { return
|
|
174
|
+
get: function () { return chunkJ4HGCXLB_cjs.useNovaPublish; }
|
|
174
175
|
});
|
|
175
176
|
Object.defineProperty(exports, "useNovaRegistry", {
|
|
176
177
|
enumerable: true,
|
|
177
|
-
get: function () { return
|
|
178
|
+
get: function () { return chunkJ4HGCXLB_cjs.useNovaRegistry; }
|
|
178
179
|
});
|
|
179
180
|
Object.defineProperty(exports, "useRenderTree", {
|
|
180
181
|
enumerable: true,
|
|
181
|
-
get: function () { return
|
|
182
|
+
get: function () { return chunkJ4HGCXLB_cjs.useRenderTree; }
|
|
182
183
|
});
|
|
183
184
|
Object.defineProperty(exports, "useShell", {
|
|
184
185
|
enumerable: true,
|
|
185
|
-
get: function () { return
|
|
186
|
+
get: function () { return chunkJ4HGCXLB_cjs.useShell; }
|
|
186
187
|
});
|
|
187
188
|
Object.defineProperty(exports, "useShellRenderTree", {
|
|
188
189
|
enumerable: true,
|
|
189
|
-
get: function () { return
|
|
190
|
+
get: function () { return chunkJ4HGCXLB_cjs.useShellRenderTree; }
|
|
190
191
|
});
|
|
191
192
|
Object.defineProperty(exports, "useShellState", {
|
|
192
193
|
enumerable: true,
|
|
193
|
-
get: function () { return
|
|
194
|
+
get: function () { return chunkJ4HGCXLB_cjs.useShellState; }
|
|
194
195
|
});
|
|
195
196
|
Object.defineProperty(exports, "useSlotWrapper", {
|
|
196
197
|
enumerable: true,
|
|
197
|
-
get: function () { return
|
|
198
|
+
get: function () { return chunkJ4HGCXLB_cjs.useSlotWrapper; }
|
|
198
199
|
});
|
|
199
200
|
exports.NovaCanvas = NovaCanvas;
|
|
200
201
|
exports.NovaErrorBoundary = NovaErrorBoundary;
|