@niscorp/nova 0.5.1 → 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 +124 -0
- package/DESIGN.md +50 -29
- 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 +6 -3
- package/dist/adapters/vue/components/index.d.ts +6 -3
- 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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/shared/errors.ts","../src/shared/bindings/paths.ts","../src/action/mutations/ops/set.ts","../src/action/mutations/ops/toggle.ts","../src/action/mutations/ops/increment.ts","../src/action/mutations/ops/decrement.ts","../src/action/mutations/ops/push.ts","../src/action/mutations/ops/pop.ts","../src/action/mutations/ops/remove-at.ts","../src/action/mutations/ops/move.ts","../src/action/mutations/ops/clear.ts","../src/action/mutations/ops/reset.ts","../src/action/mutations/ops/index.ts","../src/action/mutations/registry.ts","../src/action/schemas/endpoints.ts","../src/action/schemas/effects.ts","../src/action/schemas/lifecycle.ts","../src/action/schemas/triggers.ts","../src/action/schemas/index.ts"],"names":["z","next"],"mappings":";;;;;AAEO,IAAM,UAAA,GAAa;AAAA,EACxB,MAAA,EAAQ,cAAA;AAAA,EACR,iBAAA,EAAmB,qBAAA;AAAA,EACnB,iBAAA,EAAmB,sBAAA;AAAA,EACnB,oBAAA,EAAsB,6BAAA;AAAA,EACtB,aAAA,EAAe,gBAAA;AAAA,EACf,eAAA,EAAiB,kBAAA;AAAA,EACjB,eAAA,EAAiB,kBAAA;AAAA,EACjB,aAAA,EAAe,gBAAA;AAAA,EACf,SAAA,EAAW,iBAAA;AAAA,EACX,QAAA,EAAU,gBAAA;AAAA,EACV,OAAA,EAAS,eAAA;AAAA,EACT,cAAA,EAAgB,iBAAA;AAAA,EAChB,aAAA,EAAe;AACjB;AAMO,IAAM,SAAA,GAAN,cAAwB,KAAA,CAAM;AAAA,EAC1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AGA,CAAAA,CAAE,OAAA,EAAS,CAAA,CAAE,QAAA,EAAS,CAAE,SAAS,iLAAoL,CAAA;AAAA,EAChP,QAAA,EAAUA,EAAE,KAAA,CAAM,mBAAmB,EAAE,QAAA,EAAS,CAAE,SAAS,8FAAgG,CAAA;AAAA,EAC3J,SAAA,EAAWA,CAAAA,CACR,MAAA,CAAOA,CAAAA,CAAE,MAAA,EAAO,EAAG,oBAAoB,CAAA,CACvC,QAAA,EAAS,CACT,QAAA,CAAS,6EAA6E,CAAA;AAAA,EACzF,SAAA,EAAW,qBAAA,CAAsB,QAAA,EAAS,CAAE,SAAS,0DAA2D;AAClH,CAAC,CAAA,CACA,MAAA,EAAO,CACP,QAAA,CAAS,yKAA+J","file":"chunk-WDTSKRH5.js","sourcesContent":["import type { z } from 'zod';\n\nexport const ErrorCodes = {\n render: 'RENDER_ERROR',\n componentNotFound: 'COMPONENT_NOT_FOUND',\n layoutRefNotFound: 'LAYOUT_REF_NOT_FOUND',\n definitionValidation: 'DEFINITION_VALIDATION_ERROR',\n unknownAction: 'UNKNOWN_ACTION',\n unknownFragment: 'UNKNOWN_FRAGMENT',\n unknownFunction: 'UNKNOWN_FUNCTION',\n shellDisposed: 'SHELL_DISPOSED',\n lifecycle: 'LIFECYCLE_ERROR',\n mutation: 'MUTATION_ERROR',\n runaway: 'RUNAWAY_CHAIN',\n endpointFailed: 'ENDPOINT_FAILED',\n handlerFailed: 'HANDLER_FAILED',\n} as const;\n\nexport type ErrorCode = (typeof ErrorCodes)[keyof typeof ErrorCodes];\n\nexport type NovaErrorContext = Record<string, unknown>;\n\nexport class NovaError extends Error {\n readonly code: ErrorCode;\n readonly context: NovaErrorContext | undefined;\n\n constructor(\n code: ErrorCode,\n message: string,\n context?: NovaErrorContext,\n options?: { cause?: unknown },\n ) {\n super(message, options);\n this.name = 'NovaError';\n this.code = code;\n this.context = context;\n }\n}\n\nexport class RenderError extends NovaError {\n constructor(message: string, context?: NovaErrorContext, options?: { cause?: unknown }) {\n super(ErrorCodes.render, message, context, options);\n this.name = 'RenderError';\n }\n}\n\nexport type ComponentNotFoundContext = NovaErrorContext & { name: string };\n\nexport class ComponentNotFoundError extends NovaError {\n constructor(\n message: string,\n context: ComponentNotFoundContext,\n options?: { cause?: unknown },\n ) {\n super(ErrorCodes.componentNotFound, message, context, options);\n this.name = 'ComponentNotFoundError';\n }\n}\n\nexport type LayoutRefNotFoundContext = NovaErrorContext & { ref: string };\n\nexport class LayoutRefNotFoundError extends NovaError {\n constructor(\n message: string,\n context: LayoutRefNotFoundContext,\n options?: { cause?: unknown },\n ) {\n super(ErrorCodes.layoutRefNotFound, message, context, options);\n this.name = 'LayoutRefNotFoundError';\n }\n}\n\nexport type DefinitionValidationFailure = {\n id: string;\n issues: z.core.$ZodIssue[];\n};\n\nexport type DefinitionValidationContext = NovaErrorContext & {\n failures: DefinitionValidationFailure[];\n};\n\nexport class DefinitionValidationError extends NovaError {\n constructor(\n message: string,\n context: DefinitionValidationContext,\n options?: { cause?: unknown },\n ) {\n super(ErrorCodes.definitionValidation, message, context, options);\n this.name = 'DefinitionValidationError';\n }\n}\n\nexport type UnknownActionContext = NovaErrorContext & { actionId: string };\n\nexport class UnknownActionError extends NovaError {\n constructor(\n message: string,\n context: UnknownActionContext,\n options?: { cause?: unknown },\n ) {\n super(ErrorCodes.unknownAction, message, context, options);\n this.name = 'UnknownActionError';\n }\n}\n\nexport type UnknownFragmentContext = NovaErrorContext & { fragmentId: string };\n\nexport class UnknownFragmentError extends NovaError {\n constructor(\n message: string,\n context: UnknownFragmentContext,\n options?: { cause?: unknown },\n ) {\n super(ErrorCodes.unknownFragment, message, context, options);\n this.name = 'UnknownFragmentError';\n }\n}\n\nexport class ShellDisposedError extends NovaError {\n constructor(message: string, context?: NovaErrorContext, options?: { cause?: unknown }) {\n super(ErrorCodes.shellDisposed, message, context, options);\n this.name = 'ShellDisposedError';\n }\n}\n\nexport type UnknownFunctionContext = NovaErrorContext & { name: string };\n\nexport class UnknownFunctionError extends NovaError {\n constructor(name: string, options?: { cause?: unknown }) {\n super(\n ErrorCodes.unknownFunction,\n `Unknown function: \"${name}\". Is it registered in shell config's \\`functions\\` map?`,\n { name },\n options,\n );\n this.name = 'UnknownFunctionError';\n }\n}\n\nexport type LifecycleHook = 'mount' | 'unmount' | 'suspend' | 'resume';\n\nexport type LifecycleErrorContext = NovaErrorContext & {\n hook?: LifecycleHook;\n instanceId?: string;\n};\n\nexport class LifecycleError extends NovaError {\n constructor(\n message: string,\n context?: LifecycleErrorContext,\n options?: { cause?: unknown },\n ) {\n super(ErrorCodes.lifecycle, message, context, options);\n this.name = 'LifecycleError';\n }\n}\n\nexport type MutationErrorContext = NovaErrorContext & {\n op: string;\n path: string;\n reason: 'missing' | 'wrong-type';\n};\n\nexport class MutationError extends NovaError {\n constructor(\n message: string,\n context: MutationErrorContext,\n options?: { cause?: unknown },\n ) {\n super(ErrorCodes.mutation, message, context, options);\n this.name = 'MutationError';\n }\n}\n\nexport const toHandlerFailed = (err: unknown): NovaError =>\n new NovaError(ErrorCodes.handlerFailed, err instanceof Error ? err.message : String(err), {}, { cause: err });\n\n// A report never changes what runs: what an `onError` throws goes no further.\nexport const reportWithoutThrowing = (onError: (error: NovaError) => void, error: NovaError): void => {\n try {\n onError(error);\n } catch {}\n};\n","import { isArray, isEntry, isObject } from '../common';\n\nconst splitPath = (path: string): string[] => {\n if (path.length === 0) return [];\n return path.split('.');\n};\n\nconst isIndex = (segment: string): boolean => /^\\d+$/.test(segment);\n\ntype Container = Record<string, unknown> | unknown[];\n\nconst cloneContainer = (value: unknown, nextSegment: string | undefined): Container => {\n if (isArray(value)) return value.slice();\n if (isObject(value)) return { ...value };\n if (nextSegment !== undefined && isIndex(nextSegment)) return [];\n return {};\n};\n\nconst writeSegment = (container: Container, segment: string, value: unknown): void => {\n if (isArray(container)) {\n if (isIndex(segment)) {\n const index = Number.parseInt(segment, 10);\n container[index] = value;\n }\n return;\n }\n container[segment] = value;\n};\n\nconst readSegment = (container: Container, segment: string): unknown => {\n if (isArray(container)) {\n if (!isIndex(segment)) return undefined;\n const index = Number.parseInt(segment, 10);\n return container[index];\n }\n return container[segment];\n};\n\nexport const getPath = (data: unknown, path: string): unknown => {\n const segments = splitPath(path);\n let current: unknown = data;\n for (const segment of segments) {\n if (current === undefined || current === null) return undefined;\n if (isArray(current)) {\n if (isIndex(segment)) {\n const index = Number.parseInt(segment, 10);\n current = current[index];\n continue;\n }\n if (segment === 'length') {\n current = current.length;\n continue;\n }\n return undefined;\n }\n if (isObject(current)) {\n if (isEntry(current, segment)) {\n current = current[segment];\n continue;\n }\n return undefined;\n }\n return undefined;\n }\n return current;\n};\n\nexport const setPath = (data: unknown, path: string, value: unknown): unknown => {\n const segments = splitPath(path);\n if (segments.length === 0) return value;\n\n const root = cloneContainer(data, segments[0]);\n let parent: Container = root;\n\n for (let i = 0; i < segments.length - 1; i += 1) {\n const segment = segments[i];\n const nextSegment = segments[i + 1];\n if (segment === undefined) continue;\n const existing = readSegment(parent, segment);\n const cloned = cloneContainer(existing, nextSegment);\n writeSegment(parent, segment, cloned);\n parent = cloned;\n }\n\n const last = segments[segments.length - 1];\n if (last !== undefined) writeSegment(parent, last, value);\n return root;\n};\n\nexport const deletePath = (data: unknown, path: string): unknown => {\n const segments = splitPath(path);\n if (segments.length === 0) return undefined;\n\n const root = cloneContainer(data, segments[0]);\n let parent: Container = root;\n\n for (let i = 0; i < segments.length - 1; i += 1) {\n const segment = segments[i];\n const nextSegment = segments[i + 1];\n if (segment === undefined) continue;\n const existing = readSegment(parent, segment);\n if (existing === undefined || existing === null) return root;\n const cloned = cloneContainer(existing, nextSegment);\n writeSegment(parent, segment, cloned);\n parent = cloned;\n }\n\n const last = segments[segments.length - 1];\n if (last === undefined) return root;\n if (isArray(parent)) {\n if (isIndex(last)) {\n const index = Number.parseInt(last, 10);\n parent.splice(index, 1);\n }\n } else {\n delete parent[last];\n }\n return root;\n};\n","import { z } from 'zod';\nimport { getPath, setPath } from '@shared/bindings/paths';\nimport { hasKey, isObject } from '@shared/common';\nimport type { MutationOp } from '../types';\n\nexport const SetByValueSchema = z\n .object({\n set: z.string().describe('Data path to write to, e.g. \"user.name\" or \"items.0.title\".'),\n value: z.unknown().describe('Literal value to write at the path.'),\n })\n .strict()\n .describe('Set a field at a path to a literal value.');\n\nexport type SetByValueMutation = z.infer<typeof SetByValueSchema>;\n\nexport const SetByFromSchema = z\n .object({\n set: z.string().describe('Data path to write to.'),\n from: z.string().describe('Data path (or template path) to read the value from.'),\n })\n .strict()\n .describe('Set a field at a path by copying from another path.');\n\nexport type SetByFromMutation = z.infer<typeof SetByFromSchema>;\n\nexport const setValueOp: MutationOp<SetByValueMutation> = {\n key: 'set',\n schema: SetByValueSchema,\n match: (mutation) => hasKey(mutation, 'set') && hasKey(mutation, 'value'),\n apply: (data, mutation) => {\n const next = setPath(data, mutation.set, mutation.value);\n return isObject(next) ? next : data;\n },\n};\n\nexport const setFromOp: MutationOp<SetByFromMutation> = {\n key: 'set',\n schema: SetByFromSchema,\n match: (mutation) => hasKey(mutation, 'set') && hasKey(mutation, 'from'),\n apply: (data, mutation) => {\n const value = getPath(data, mutation.from);\n const next = setPath(data, mutation.set, value);\n return isObject(next) ? next : data;\n },\n};\n","import { z } from 'zod';\nimport { getPath, setPath } from '@shared/bindings/paths';\nimport { isObject } from '@shared/common';\nimport type { MutationOp } from '../types';\n\nexport const ToggleSchema = z\n .object({\n toggle: z.string().describe('Boolean data path to flip.'),\n })\n .strict()\n .describe('Flip a boolean at the given path.');\n\nexport type ToggleMutation = z.infer<typeof ToggleSchema>;\n\nexport const toggleOp: MutationOp<ToggleMutation> = {\n key: 'toggle',\n schema: ToggleSchema,\n apply: (data, mutation) => {\n const current = getPath(data, mutation.toggle);\n const flipped = !(current === true);\n const next = setPath(data, mutation.toggle, flipped);\n return isObject(next) ? next : data;\n },\n};\n","import { z } from 'zod';\nimport { getPath, setPath } from '@shared/bindings/paths';\nimport { isObject } from '@shared/common';\nimport type { MutationOp } from '../types';\n\nexport const IncrementSchema = z\n .object({\n increment: z.string().describe('Numeric data path to increment.'),\n by: z.number().optional().describe('Amount to increment by; defaults to 1.'),\n })\n .strict()\n .describe('Increment a numeric field.');\n\nexport type IncrementMutation = z.infer<typeof IncrementSchema>;\n\nexport const incrementOp: MutationOp<IncrementMutation> = {\n key: 'increment',\n schema: IncrementSchema,\n apply: (data, mutation) => {\n const current = getPath(data, mutation.increment);\n const base = typeof current === 'number' ? current : 0;\n const by = mutation.by ?? 1;\n const next = setPath(data, mutation.increment, base + by);\n return isObject(next) ? next : data;\n },\n};\n","import { z } from 'zod';\nimport { getPath, setPath } from '@shared/bindings/paths';\nimport { isObject } from '@shared/common';\nimport type { MutationOp } from '../types';\n\nexport const DecrementSchema = z\n .object({\n decrement: z.string().describe('Numeric data path to decrement.'),\n by: z.number().optional().describe('Amount to decrement by; defaults to 1.'),\n })\n .strict()\n .describe('Decrement a numeric field.');\n\nexport type DecrementMutation = z.infer<typeof DecrementSchema>;\n\nexport const decrementOp: MutationOp<DecrementMutation> = {\n key: 'decrement',\n schema: DecrementSchema,\n apply: (data, mutation) => {\n const current = getPath(data, mutation.decrement);\n const base = typeof current === 'number' ? current : 0;\n const by = mutation.by ?? 1;\n const next = setPath(data, mutation.decrement, base - by);\n return isObject(next) ? next : data;\n },\n};\n","import { z } from 'zod';\nimport { getPath, setPath } from '@shared/bindings/paths';\nimport { isArray, isObject } from '@shared/common';\nimport { MutationError } from '@shared/errors';\nimport type { MutationOp } from '../types';\n\nexport const PushSchema = z\n .object({\n push: z.string().describe('Array data path to append to.'),\n value: z.unknown().optional().describe('Value to append.'),\n })\n .strict()\n .describe('Append a value to an array field.');\n\nexport type PushMutation = z.infer<typeof PushSchema>;\n\nexport const pushOp: MutationOp<PushMutation> = {\n key: 'push',\n schema: PushSchema,\n // The navigation effect shares the key: its `push` is an object, not a path.\n match: (mutation) => typeof mutation.push === 'string',\n apply: (data, mutation, ctx) => {\n const current = getPath(data, mutation.push);\n if (current !== undefined && !isArray(current)) {\n if (ctx.strict) {\n throw new MutationError(\n `push: path \"${mutation.push}\" is not an array`,\n { op: 'push', path: mutation.push, reason: 'wrong-type' },\n );\n }\n return data;\n }\n if (current === undefined && ctx.strict) {\n throw new MutationError(\n `push: path \"${mutation.push}\" does not exist`,\n { op: 'push', path: mutation.push, reason: 'missing' },\n );\n }\n const arr = isArray(current) ? current.slice() : [];\n arr.push(mutation.value);\n const next = setPath(data, mutation.push, arr);\n return isObject(next) ? next : data;\n },\n};\n","import { z } from 'zod';\nimport { getPath, setPath } from '@shared/bindings/paths';\nimport { isArray, isObject } from '@shared/common';\nimport { MutationError } from '@shared/errors';\nimport type { MutationOp } from '../types';\n\nexport const PopSchema = z\n .object({\n pop: z.string().describe('Array data path to remove the last element from.'),\n })\n .strict()\n .describe('Remove the last element from an array field.');\n\nexport type PopMutation = z.infer<typeof PopSchema>;\n\nexport const popOp: MutationOp<PopMutation> = {\n key: 'pop',\n schema: PopSchema,\n // The navigation effect shares the key: its `pop` is `true`, not a path.\n match: (mutation) => typeof mutation.pop === 'string',\n apply: (data, mutation, ctx) => {\n const current = getPath(data, mutation.pop);\n if (!isArray(current)) {\n if (ctx.strict) {\n throw new MutationError(\n `pop: path \"${mutation.pop}\" ${current === undefined ? 'does not exist' : 'is not an array'}`,\n { op: 'pop', path: mutation.pop, reason: current === undefined ? 'missing' : 'wrong-type' },\n );\n }\n return data;\n }\n const arr = current.slice();\n arr.pop();\n const next = setPath(data, mutation.pop, arr);\n return isObject(next) ? next : data;\n },\n};\n","import { z } from 'zod';\nimport { getPath, setPath } from '@shared/bindings/paths';\nimport { isArray, isObject } from '@shared/common';\nimport { MutationError } from '@shared/errors';\nimport type { MutationOp } from '../types';\n\nexport const RemoveAtSchema = z\n .object({\n removeAt: z.string().describe('Array data path to remove an element from.'),\n index: z\n .union([z.number().int(), z.string()])\n .describe('Index to remove. A string is a template (e.g. \"{{@event.payload}}\") resolved before applying.'),\n })\n .strict()\n .describe('Remove an element at a specific index of an array field.');\n\nexport type RemoveAtMutation = z.infer<typeof RemoveAtSchema>;\n\nexport const removeAtOp: MutationOp<RemoveAtMutation> = {\n key: 'removeAt',\n schema: RemoveAtSchema,\n apply: (data, mutation, ctx) => {\n const current = getPath(data, mutation.removeAt);\n if (!isArray(current)) {\n if (ctx.strict) {\n throw new MutationError(\n `removeAt: path \"${mutation.removeAt}\" ${current === undefined ? 'does not exist' : 'is not an array'}`,\n {\n op: 'removeAt',\n path: mutation.removeAt,\n reason: current === undefined ? 'missing' : 'wrong-type',\n },\n );\n }\n return data;\n }\n const index = Number(mutation.index);\n if (!Number.isInteger(index)) return data;\n const arr = current.slice();\n arr.splice(index, 1);\n const next = setPath(data, mutation.removeAt, arr);\n return isObject(next) ? next : data;\n },\n};\n","import { z } from 'zod';\nimport { getPath, setPath } from '@shared/bindings/paths';\nimport { isArray, isObject } from '@shared/common';\nimport { MutationError } from '@shared/errors';\nimport type { MutationOp } from '../types';\n\nexport const MoveSchema = z\n .object({\n move: z.string().describe('Array data path to reorder within.'),\n from: z\n .union([z.number().int(), z.string()])\n .describe('Index to move. A string is a template (e.g. \"{{@event.payload}}\") resolved before applying.'),\n to: z\n .union([z.number().int(), z.string()])\n .describe('Destination index. A string is a template resolved before applying.'),\n })\n .strict()\n .describe('Move an array element from one index to another.');\n\nexport type MoveMutation = z.infer<typeof MoveSchema>;\n\nexport const moveOp: MutationOp<MoveMutation> = {\n key: 'move',\n schema: MoveSchema,\n apply: (data, mutation, ctx) => {\n const current = getPath(data, mutation.move);\n if (!isArray(current)) {\n if (ctx.strict) {\n throw new MutationError(\n `move: path \"${mutation.move}\" ${current === undefined ? 'does not exist' : 'is not an array'}`,\n {\n op: 'move',\n path: mutation.move,\n reason: current === undefined ? 'missing' : 'wrong-type',\n },\n );\n }\n return data;\n }\n const from = Number(mutation.from);\n const to = Number(mutation.to);\n if (!Number.isInteger(from) || !Number.isInteger(to)) return data;\n if (from < 0 || from >= current.length) return data;\n const arr = current.slice();\n const [item] = arr.splice(from, 1);\n arr.splice(Math.max(0, Math.min(to, arr.length)), 0, item);\n const next = setPath(data, mutation.move, arr);\n return isObject(next) ? next : data;\n },\n};\n","import { z } from 'zod';\nimport { deletePath, getPath, setPath } from '@shared/bindings/paths';\nimport { isArray, isObject } from '@shared/common';\nimport { MutationError } from '@shared/errors';\nimport type { MutationOp } from '../types';\n\nexport const ClearSchema = z\n .object({\n clear: z.string().describe('Array or object data path to clear.'),\n })\n .strict()\n .describe('Clear an array or object field.');\n\nexport type ClearMutation = z.infer<typeof ClearSchema>;\n\nexport const clearOp: MutationOp<ClearMutation> = {\n key: 'clear',\n schema: ClearSchema,\n apply: (data, mutation, ctx) => {\n const current = getPath(data, mutation.clear);\n if (isArray(current)) {\n const next = setPath(data, mutation.clear, []);\n return isObject(next) ? next : data;\n }\n if (isObject(current)) {\n const next = setPath(data, mutation.clear, {});\n return isObject(next) ? next : data;\n }\n if (ctx.strict) {\n throw new MutationError(\n `clear: path \"${mutation.clear}\" ${current === undefined ? 'does not exist' : 'is not an array or object'}`,\n {\n op: 'clear',\n path: mutation.clear,\n reason: current === undefined ? 'missing' : 'wrong-type',\n },\n );\n }\n const next = deletePath(data, mutation.clear);\n return isObject(next) ? next : data;\n },\n};\n","import { z } from 'zod';\nimport { getPath, setPath } from '@shared/bindings/paths';\nimport { isObject } from '@shared/common';\nimport type { MutationOp } from '../types';\n\nexport const ResetSchema = z\n .object({\n reset: z.string().describe('Data path to reset to its initial (definition.data) value.'),\n })\n .strict()\n .describe('Reset a field to its initial value from the action definition.');\n\nexport type ResetMutation = z.infer<typeof ResetSchema>;\n\nexport const resetOp: MutationOp<ResetMutation> = {\n key: 'reset',\n schema: ResetSchema,\n apply: (data, mutation, ctx) => {\n const initialValue = getPath(ctx.initial, mutation.reset);\n const next = setPath(data, mutation.reset, initialValue);\n return isObject(next) ? next : data;\n },\n};\n","import { z } from 'zod';\nimport { setValueOp, setFromOp } from './set';\nimport { toggleOp } from './toggle';\nimport { incrementOp } from './increment';\nimport { decrementOp } from './decrement';\nimport { pushOp } from './push';\nimport { popOp } from './pop';\nimport { removeAtOp } from './remove-at';\nimport { moveOp } from './move';\nimport { clearOp } from './clear';\nimport { resetOp } from './reset';\nimport type { MutationOp } from '../types';\n\nexport const OPS = [\n setValueOp,\n setFromOp,\n toggleOp,\n incrementOp,\n decrementOp,\n pushOp,\n popOp,\n removeAtOp,\n moveOp,\n clearOp,\n resetOp,\n] as const;\n\ntype MutationOf<O> = O extends MutationOp<infer T> ? T : never;\nexport type Mutation = MutationOf<(typeof OPS)[number]>;\n\nexport const MutationSchema = z\n .union(\n OPS.map((op) => op.schema) as [z.ZodType<Mutation>, z.ZodType<Mutation>, ...z.ZodType<Mutation>[]],\n )\n .describe('A single immutable mutation applied to the action data.');\n","import { hasKey, isObject } from '@shared/common';\nimport { OPS, type Mutation } from './ops';\nimport type { MutationContext, MutationData, MutationOp } from './types';\n\ntype DispatchOp = {\n key: string;\n match: (mutation: Record<string, unknown>) => boolean;\n run: (data: MutationData, mutation: Record<string, unknown>, ctx: MutationContext) => MutationData;\n};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any -- erasure boundary\nconst toDispatchOp = (op: MutationOp<any>): DispatchOp => ({\n key: op.key,\n match: op.match ?? ((mutation) => hasKey(mutation, op.key)),\n run: (data, mutation, ctx) => op.apply(data, op.schema.parse(mutation), ctx),\n});\n\nconst DISPATCH: readonly DispatchOp[] = OPS.map(toDispatchOp);\n\nconst findOp = (mutation: Record<string, unknown>): DispatchOp | undefined => {\n for (const op of DISPATCH) {\n if (op.match(mutation)) return op;\n }\n return undefined;\n};\n\nexport type ApplyMutationOptions = {\n initial?: MutationData;\n strict?: boolean;\n};\n\nconst buildCtx = (opts: ApplyMutationOptions): MutationContext => ({\n initial: opts.initial ?? {},\n strict: opts.strict ?? false,\n});\n\nexport const applyMutation = (\n data: MutationData,\n mutation: Mutation,\n opts: ApplyMutationOptions = {},\n): MutationData => {\n if (!isObject(mutation)) return data;\n const op = findOp(mutation);\n if (op === undefined) return data;\n return op.run(data, mutation, buildCtx(opts));\n};\n\nexport const applyMutations = (\n data: MutationData,\n mutations: readonly Mutation[],\n opts: ApplyMutationOptions = {},\n): MutationData => {\n if (mutations.length === 0) return data;\n const ctx = buildCtx(opts);\n let current = data;\n for (const mutation of mutations) {\n if (!isObject(mutation)) continue;\n const op = findOp(mutation);\n if (op === undefined) continue;\n current = op.run(current, mutation, ctx);\n }\n return current;\n};\n","import { z } from 'zod';\n\nconst HttpEndpointSchema = z\n .object({\n url: z.string().describe('Template URL, e.g. \"/api/users/{{$.userId}}\".'),\n method: z.enum(['GET', 'POST', 'PUT', 'PATCH', 'DELETE']).describe('HTTP method.'),\n headers: z.record(z.string(), z.string()).optional().describe('Static request headers.'),\n request: z\n .unknown()\n .optional()\n .describe(\n 'Transform config run by the injected evaluator over the ACTION DATA to build the ' +\n 'request body — EVALUATED ON EVERY CALL, so body values can follow screen state. ' +\n 'Static parts are literal JSON; a dynamic part is an evaluator op over the data root, ' +\n 'e.g. { \"q\": { \"$ref\": \"$.search\" } } makes body field q carry the current $.search each call. ' +\n 'Requires an injected transform. ' +\n 'Not on a GET: fetch sends no body with a GET, so the shell reports such an endpoint to onError once when the definition loads, and every call of it fails.',\n ),\n response: z\n .unknown()\n .optional()\n .describe(\n 'Transform config run by the injected evaluator over the reply as received ' +\n '(`$` is the reply — object, array, or scalar) to produce the value stored at `target`. ' +\n 'Requires an injected transform.',\n ),\n target: z.string().optional().describe('Data path to store the result at on success.'),\n errorTarget: z.string().optional().describe('Data path to store the error at on failure.'),\n timeoutMs: z\n .number()\n .int()\n .positive()\n .optional()\n .describe('How long to wait for the reply, in ms, before the call fails to onError. Defaults to the shell default (30000). Set it on an endpoint that is slow by nature — a model call that may take minutes.'),\n })\n .strict()\n .describe('A named HTTP call. `request`/`response` shape the body/reply via the injected transform.');\n\nconst FunctionEndpointSchema = z\n .object({\n fn: z\n .string()\n .describe(\n 'Name of a function registered in `ShellConfig.functions`; the host registers it before the action runs. ' +\n 'Read as a binding first: a `{{…}}` template, a `$` path into the action\\'s data (`$.which`), or an `@event` path (in a trigger\\'s steps) ' +\n 'or `@error` path (in an `onError` list) supplies the name; any other string is the name itself.',\n ),\n target: z.string().optional().describe('Data path to store the return value at on success.'),\n errorTarget: z.string().optional().describe('Data path to store the error at on failure.'),\n timeoutMs: z\n .number()\n .int()\n .positive()\n .optional()\n .describe('How long to wait for the reply, in ms, before the call fails to onError. Defaults to the shell default (30000). Set it on an endpoint that is slow by nature — a model call that may take minutes.'),\n })\n .strict()\n .describe('A named local function call. Handler is provided via `ShellConfig.functions`.');\n\nexport const EndpointConfigSchema = z\n .union([HttpEndpointSchema, FunctionEndpointSchema])\n .describe('An endpoint — either an HTTP call or a local function.');\n\nexport type EndpointConfig = z.infer<typeof EndpointConfigSchema>;\nexport type HttpEndpointConfig = z.infer<typeof HttpEndpointSchema>;\nexport type FunctionEndpointConfig = z.infer<typeof FunctionEndpointSchema>;\n","import { z } from 'zod';\nimport { MutationSchema } from '../mutations';\nimport type { Mutation } from '../mutations';\n\nexport type Step = Mutation | Effect;\n\nexport type CallEffect = {\n call: string;\n onSuccess?: Step[];\n onError?: Step[];\n};\n\nexport type EmitEffect = {\n emit: { channel: string; payload?: unknown };\n};\n\nexport type PushEffect = {\n push: { action: string; canvas?: string; input?: Record<string, unknown>; with?: string[] };\n};\n\nexport type PopEffect = { pop: true };\n\nexport type ReplaceEffect = {\n replace: { action: string; canvas?: string; input?: Record<string, unknown>; with?: string[] };\n};\n\nexport type PopToEffect = { popTo: { canvas?: string; instance: string } };\n\nexport type ResetToEffect = {\n resetTo: { action: string; canvas?: string; input?: Record<string, unknown>; with?: string[] };\n};\n\nexport type RemoveInstanceEffect = { removeInstance: { canvas?: string; instance: string } };\n\nexport type RemoveSelfEffect = { removeSelf: true };\n\nexport type ReconcileEffect = {\n reconcile: { to: string; action: string; input?: string; canvas?: string; own?: 'pushed' | 'canvas'; with?: string[] };\n};\nexport type ReloadEffect = { reload: true };\n\nexport type Effect =\n | CallEffect\n | EmitEffect\n | PushEffect\n | PopEffect\n | ReplaceEffect\n | PopToEffect\n | ResetToEffect\n | RemoveInstanceEffect\n | RemoveSelfEffect\n | ReconcileEffect\n | ReloadEffect;\n\nexport const StepSchema: z.ZodType<Step> = z.lazy(() =>\n z.union([MutationSchema, EffectSchema]).describe('A step is either a mutation or an effect.'),\n);\n\nconst CallEffectSchema: z.ZodType<CallEffect> = z.lazy(() =>\n z\n .object({\n call: z.string().describe('Name of the endpoint to invoke.'),\n onSuccess: z.array(StepSchema).optional().describe('Steps to run after a successful response.'),\n onError: z\n .array(StepSchema)\n .optional()\n .describe('Steps to run after an error response (with @error scope available).'),\n })\n .strict()\n .describe('Invoke a named endpoint with optional success/error step branches.'),\n);\n\nconst EmitEffectSchema = z\n .object({\n emit: z\n .object({\n channel: z.string().describe('Channel name to publish on.'),\n payload: z\n .unknown()\n .optional()\n .describe('Payload to publish; templates are resolved against the current data.'),\n })\n .strict()\n .describe('Channel + payload to publish.'),\n })\n .strict()\n .describe('Publish a payload to a message channel.');\n\nconst PushEffectSchema = z\n .object({\n push: z\n .object({\n action: z\n .string()\n .describe('Definition id of the action to push onto a canvas — MUST be an id that actually exists (an unknown id fails at click time, invisible to a mount check).'),\n canvas: z.string().optional().describe('Canvas id to push onto; defaults to the current canvas.'),\n input: z\n .record(z.string(), z.unknown())\n .optional()\n .describe('Initial input merged into the new action data. Keys must belong to the target action\\'s declared input contract — invented keys are silently useless.'),\n with: z\n .array(z.string())\n .optional()\n .describe('Fragment ids to compose the action with before it is instantiated. Each wraps the action (the action fills its `{ slot }`) and contributes its triggers/data; the action wins on conflict. See ActionFragment.'),\n })\n .strict()\n .describe('Push parameters.'),\n })\n .strict()\n .describe('Push a new action onto a canvas (escapes via onNavigate callback).');\n\nconst PopEffectSchema = z\n .object({\n pop: z.literal(true).describe('Sentinel literal — must be true.'),\n })\n .strict()\n .describe('Pop the current action (escapes via onNavigate callback).');\n\nconst ReplaceEffectSchema = z\n .object({\n replace: z\n .object({\n action: z.string().describe('Definition id of the replacement action.'),\n canvas: z\n .string()\n .optional()\n .describe('Canvas id to replace on; defaults to the current canvas.'),\n input: z\n .record(z.string(), z.unknown())\n .optional()\n .describe('Initial input merged into the new action data.'),\n with: z\n .array(z.string())\n .optional()\n .describe('Fragment ids to compose the action with before it is instantiated. Each wraps the action (the action fills its `{ slot }`) and contributes its triggers/data; the action wins on conflict. See ActionFragment.'),\n })\n .strict()\n .describe('Replace parameters.'),\n })\n .strict()\n .describe('Replace the current action (escapes via onNavigate callback).');\n\nconst PopToEffectSchema = z\n .object({\n popTo: z\n .object({\n canvas: z.string().optional().describe('Canvas id to pop on; defaults to the current canvas.'),\n instance: z.string().describe('Pop the canvas until this instance id is on top (no-op if absent).'),\n })\n .strict()\n .describe('Pop-to-instance parameters.'),\n })\n .strict()\n .describe('Pop a canvas down to a given instance (escapes via onNavigate callback).');\n\nconst ResetToEffectSchema = z\n .object({\n resetTo: z\n .object({\n action: z.string().describe('Definition id of the new root action.'),\n canvas: z.string().optional().describe('Canvas id to reset; defaults to the current canvas.'),\n input: z.record(z.string(), z.unknown()).optional().describe('Initial input merged into the new root action.'),\n with: z.array(z.string()).optional().describe('Fragment ids to compose the action with. See ActionFragment.'),\n })\n .strict()\n .describe('Reset parameters.'),\n })\n .strict()\n .describe('Clear a canvas and push a single new root action (escapes via onNavigate callback).');\n\nconst RemoveInstanceEffectSchema = z\n .object({\n removeInstance: z\n .object({\n canvas: z.string().optional().describe('Canvas id to remove from; defaults to the current canvas.'),\n instance: z.string().describe('Instance id to unmount and drop from the stack (no-op if absent).'),\n })\n .strict()\n .describe('Remove-instance parameters.'),\n })\n .strict()\n .describe('Remove one instance anywhere in a canvas stack (escapes via onNavigate callback).');\n\nconst RemoveSelfEffectSchema = z\n .object({\n removeSelf: z.literal(true).describe('Sentinel literal — must be true. Removes the firing instance (desugars to removeInstance).'),\n })\n .strict()\n .describe('Close the firing instance — the list-card X (escapes via onNavigate callback).');\n\nconst ReconcileEffectSchema = z\n .object({\n reconcile: z\n .object({\n to: z.string().describe('Binding to the desired list, e.g. \"$.tools\" — an array of rows; anything else is an empty list.'),\n action: z.string().describe('The row field naming the action to place, e.g. \"tool_id\". Rows without it are skipped.'),\n input: z.string().optional().describe('The row field holding that action\\'s input (an object), if any.'),\n canvas: z.string().optional().describe('Canvas id to reconcile; defaults to the current canvas.'),\n own: z\n .enum(['pushed', 'canvas'])\n .optional()\n .describe('What this step may remove: \"pushed\" (default) only what this action placed there; \"canvas\" everything on it — for an action that owns the canvas outright.'),\n with: z.array(z.string()).optional().describe('Fragment ids to compose each placed action with. See ActionFragment.'),\n })\n .strict()\n .describe('Reconcile parameters.'),\n })\n .strict()\n .describe('Make a canvas hold exactly the actions a list names: push the missing, remove the unlisted, keep the rest mounted (escapes via onNavigate callback).');\n\nconst ReloadEffectSchema = z\n .object({\n reload: z.literal(true).describe('Sentinel literal — must be true. Re-runs this instance\\'s mount hook.'),\n })\n .strict()\n .describe('Re-read the firing instance in place — the list-card open.');\n\nexport const EffectSchema: z.ZodType<Effect> = z.lazy(() =>\n z\n .union([CallEffectSchema, EmitEffectSchema, PushEffectSchema, PopEffectSchema, ReplaceEffectSchema, PopToEffectSchema, ResetToEffectSchema, RemoveInstanceEffectSchema, RemoveSelfEffectSchema, ReconcileEffectSchema, ReloadEffectSchema])\n .describe('An effect that touches the outside world.'),\n);\n","import { z } from 'zod';\nimport { StepSchema } from './effects';\n\nexport const LifecycleConfigSchema = z\n .object({\n mount: z.array(StepSchema).optional().describe('Steps to run when the action mounts.'),\n unmount: z.array(StepSchema).optional().describe('Steps to run when the action unmounts.'),\n suspend: z.array(StepSchema).optional().describe('Steps to run when the action is suspended.'),\n resume: z.array(StepSchema).optional().describe('Steps to run when the action resumes.'),\n })\n .strict()\n .describe('Lifecycle hooks for the action runtime state machine.');\n\nexport type LifecycleConfig = z.infer<typeof LifecycleConfigSchema>;\n","import { z } from 'zod';\nimport { StepSchema } from './effects';\n\nexport const TriggerConfigSchema = z\n .object({\n event: z\n .string()\n .optional()\n .describe('UI event type to listen for: \"ui:click\" (activations, incl. table rows), \"ui:model\" (an input\\'s value changed), \"ui:key\".'),\n message: z.string().optional().describe('Message bus channel name to listen on (fired by an `emit` step, possibly from another action).'),\n ref: z\n .string()\n .optional()\n .describe('Component ref to filter events by — MUST match a `ref` carried by a node in this action\\'s layout; a trigger on a ref no layout node carries never fires.'),\n key: z.string().optional().describe('Key to filter \"ui:key\" events by, e.g. \"ArrowDown\".'),\n do: z\n .array(StepSchema)\n .describe('Ordered steps to execute when the trigger fires. Steps may reference the firing event as \"@event\" — \"@event.payload\" is the fired value (a table row click: the row\\'s clickKey/rowKey field; an input\\'s ui:model: the typed text).'),\n })\n .strict()\n .refine((trigger) => trigger.event !== undefined || trigger.message !== undefined, {\n message: 'A trigger must specify either \"event\" or \"message\".',\n })\n .describe('Binds an event or message source to an ordered sequence of steps.');\n\nexport type TriggerConfig = z.infer<typeof TriggerConfigSchema>;\n","import { z } from 'zod';\nimport { LayoutNodeSchema } from '@layout/schemas';\nimport { MutationSchema } from '../mutations';\nimport { EndpointConfigSchema } from './endpoints';\nimport { LifecycleConfigSchema } from './lifecycle';\nimport { TriggerConfigSchema } from './triggers';\n\nexport const ActionDefinitionSchema = z\n .object({\n id: z.string().describe('Stable definition id.'),\n name: z.string().optional().describe('Human-readable name.'),\n description: z.string().optional().describe('Free-form description.'),\n title: z\n .string()\n .optional()\n .describe(\n \"A resolvable label for this instance, evaluated against its own data (e.g. '{{$.view.record.name}}'). Exposed as `instance.title` on a canvas's actionLayout scope so stack-nav chrome can label crumbs/tabs; falls back to `name` then the action id.\",\n ),\n layout: z\n .union([z.string(), LayoutNodeSchema])\n .optional()\n .describe('Either a layout id stored in the layout store, or an inline LayoutNode.'),\n data: z.record(z.string(), z.unknown()).optional().describe('Static default data merged with input on mount.'),\n input: z\n .record(z.string(), z.unknown())\n .optional()\n .describe(\n 'JSON Schema of the data keys an opener may seed when loading this action — its public, openable-input contract (author in Zod, convert with z.toJSONSchema). Fields must be a subset of `data`. Descriptive only: the runtime does not validate loads against it.',\n ),\n triggers: z.array(TriggerConfigSchema).optional().describe('Event/message triggers.'),\n endpoints: z\n .record(z.string(), EndpointConfigSchema)\n .optional()\n .describe('Named endpoints — HTTP calls or local functions.'),\n lifecycle: LifecycleConfigSchema.optional().describe('Lifecycle hooks.'),\n })\n .strict()\n .describe('Definition of an action: layout + data + behavior.');\n\nexport type ActionDefinition = z.infer<typeof ActionDefinitionSchema>;\n\nexport const ActionFragmentSchema = z\n .object({\n kind: z.literal('fragment').describe('Discriminator — marks this as an abstract, merge-only fragment.'),\n id: z.string().describe('Stable fragment id, referenced from a push/replace `with: [...]`.'),\n name: z.string().optional().describe('Human-readable name.'),\n description: z.string().optional().describe('Free-form description.'),\n layout: z\n .union([z.string(), LayoutNodeSchema])\n .optional()\n .describe('The wrapping (chrome) layout: put a `{ slot: \"body\" }` node where the layout composed so far (the action\\'s own, inside any earlier fragment\\'s) goes. When the layout composed so far is inline, it renders there as it is; when it is a layout id, the stored layout it names renders there. A layout id given here instead replaces the layout composed so far (the action\\'s own and any earlier fragment\\'s): composition does not read the layout store, so nothing is put into a stored layout\\'s slots.'),\n data: z.record(z.string(), z.unknown()).optional().describe('Partial default data, merged under the action\\'s data one top-level key at a time: on a key both set, the action\\'s value replaces the fragment\\'s whole, nested objects included.'),\n triggers: z.array(TriggerConfigSchema).optional().describe('Pre-wired triggers (e.g. a modal\\'s close/cancel). Concatenated before the action\\'s triggers.'),\n endpoints: z\n .record(z.string(), EndpointConfigSchema)\n .optional()\n .describe('Named endpoints, merged under the action (the action wins on a name clash).'),\n lifecycle: LifecycleConfigSchema.optional().describe('Lifecycle hooks; per-hook steps run before the action\\'s.'),\n })\n .strict()\n .describe('A reusable partial action — layout + wired behavior — merged into a concrete action at a push `with`. Abstract: only exists merged, never instantiated alone.');\n\nexport type ActionFragment = z.infer<typeof ActionFragmentSchema>;\n\nexport { MutationSchema };\nexport type { Mutation } from '../mutations';\n\nexport { EffectSchema, StepSchema } from './effects';\nexport type { Effect, Step, CallEffect, EmitEffect, PushEffect, PopEffect, ReplaceEffect, PopToEffect, ResetToEffect, RemoveInstanceEffect, RemoveSelfEffect, ReconcileEffect, ReloadEffect } from './effects';\nexport { TriggerConfigSchema } from './triggers';\nexport type { TriggerConfig } from './triggers';\nexport { EndpointConfigSchema } from './endpoints';\nexport type { EndpointConfig, HttpEndpointConfig, FunctionEndpointConfig } from './endpoints';\nexport { LifecycleConfigSchema } from './lifecycle';\nexport type { LifecycleConfig } from './lifecycle';\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkNBXZ3RAC_cjs = require('./chunk-NBXZ3RAC.cjs');
|
|
4
|
-
var
|
|
4
|
+
var chunkBA77UJOE_cjs = require('./chunk-BA77UJOE.cjs');
|
|
5
5
|
var zod = require('zod');
|
|
6
6
|
|
|
7
7
|
// src/shared/errors.ts
|
|
@@ -16,7 +16,9 @@ var ErrorCodes = {
|
|
|
16
16
|
shellDisposed: "SHELL_DISPOSED",
|
|
17
17
|
lifecycle: "LIFECYCLE_ERROR",
|
|
18
18
|
mutation: "MUTATION_ERROR",
|
|
19
|
-
runaway: "RUNAWAY_CHAIN"
|
|
19
|
+
runaway: "RUNAWAY_CHAIN",
|
|
20
|
+
endpointFailed: "ENDPOINT_FAILED",
|
|
21
|
+
handlerFailed: "HANDLER_FAILED"
|
|
20
22
|
};
|
|
21
23
|
var NovaError = class extends Error {
|
|
22
24
|
code;
|
|
@@ -93,6 +95,13 @@ var MutationError = class extends NovaError {
|
|
|
93
95
|
this.name = "MutationError";
|
|
94
96
|
}
|
|
95
97
|
};
|
|
98
|
+
var toHandlerFailed = (err) => new NovaError(ErrorCodes.handlerFailed, err instanceof Error ? err.message : String(err), {}, { cause: err });
|
|
99
|
+
var reportWithoutThrowing = (onError, error) => {
|
|
100
|
+
try {
|
|
101
|
+
onError(error);
|
|
102
|
+
} catch {
|
|
103
|
+
}
|
|
104
|
+
};
|
|
96
105
|
|
|
97
106
|
// src/shared/bindings/paths.ts
|
|
98
107
|
var splitPath = (path) => {
|
|
@@ -101,13 +110,13 @@ var splitPath = (path) => {
|
|
|
101
110
|
};
|
|
102
111
|
var isIndex = (segment) => /^\d+$/.test(segment);
|
|
103
112
|
var cloneContainer = (value, nextSegment) => {
|
|
104
|
-
if (
|
|
105
|
-
if (
|
|
113
|
+
if (chunkBA77UJOE_cjs.isArray(value)) return value.slice();
|
|
114
|
+
if (chunkBA77UJOE_cjs.isObject(value)) return { ...value };
|
|
106
115
|
if (nextSegment !== void 0 && isIndex(nextSegment)) return [];
|
|
107
116
|
return {};
|
|
108
117
|
};
|
|
109
118
|
var writeSegment = (container, segment, value) => {
|
|
110
|
-
if (
|
|
119
|
+
if (chunkBA77UJOE_cjs.isArray(container)) {
|
|
111
120
|
if (isIndex(segment)) {
|
|
112
121
|
const index = Number.parseInt(segment, 10);
|
|
113
122
|
container[index] = value;
|
|
@@ -117,7 +126,7 @@ var writeSegment = (container, segment, value) => {
|
|
|
117
126
|
container[segment] = value;
|
|
118
127
|
};
|
|
119
128
|
var readSegment = (container, segment) => {
|
|
120
|
-
if (
|
|
129
|
+
if (chunkBA77UJOE_cjs.isArray(container)) {
|
|
121
130
|
if (!isIndex(segment)) return void 0;
|
|
122
131
|
const index = Number.parseInt(segment, 10);
|
|
123
132
|
return container[index];
|
|
@@ -129,7 +138,7 @@ var getPath = (data, path) => {
|
|
|
129
138
|
let current = data;
|
|
130
139
|
for (const segment of segments) {
|
|
131
140
|
if (current === void 0 || current === null) return void 0;
|
|
132
|
-
if (
|
|
141
|
+
if (chunkBA77UJOE_cjs.isArray(current)) {
|
|
133
142
|
if (isIndex(segment)) {
|
|
134
143
|
const index = Number.parseInt(segment, 10);
|
|
135
144
|
current = current[index];
|
|
@@ -141,8 +150,8 @@ var getPath = (data, path) => {
|
|
|
141
150
|
}
|
|
142
151
|
return void 0;
|
|
143
152
|
}
|
|
144
|
-
if (
|
|
145
|
-
if (segment
|
|
153
|
+
if (chunkBA77UJOE_cjs.isObject(current)) {
|
|
154
|
+
if (chunkBA77UJOE_cjs.isEntry(current, segment)) {
|
|
146
155
|
current = current[segment];
|
|
147
156
|
continue;
|
|
148
157
|
}
|
|
@@ -187,7 +196,7 @@ var deletePath = (data, path) => {
|
|
|
187
196
|
}
|
|
188
197
|
const last = segments[segments.length - 1];
|
|
189
198
|
if (last === void 0) return root;
|
|
190
|
-
if (
|
|
199
|
+
if (chunkBA77UJOE_cjs.isArray(parent)) {
|
|
191
200
|
if (isIndex(last)) {
|
|
192
201
|
const index = Number.parseInt(last, 10);
|
|
193
202
|
parent.splice(index, 1);
|
|
@@ -208,20 +217,20 @@ var SetByFromSchema = zod.z.object({
|
|
|
208
217
|
var setValueOp = {
|
|
209
218
|
key: "set",
|
|
210
219
|
schema: SetByValueSchema,
|
|
211
|
-
match: (mutation) =>
|
|
220
|
+
match: (mutation) => chunkBA77UJOE_cjs.hasKey(mutation, "set") && chunkBA77UJOE_cjs.hasKey(mutation, "value"),
|
|
212
221
|
apply: (data, mutation) => {
|
|
213
222
|
const next = setPath(data, mutation.set, mutation.value);
|
|
214
|
-
return
|
|
223
|
+
return chunkBA77UJOE_cjs.isObject(next) ? next : data;
|
|
215
224
|
}
|
|
216
225
|
};
|
|
217
226
|
var setFromOp = {
|
|
218
227
|
key: "set",
|
|
219
228
|
schema: SetByFromSchema,
|
|
220
|
-
match: (mutation) =>
|
|
229
|
+
match: (mutation) => chunkBA77UJOE_cjs.hasKey(mutation, "set") && chunkBA77UJOE_cjs.hasKey(mutation, "from"),
|
|
221
230
|
apply: (data, mutation) => {
|
|
222
231
|
const value = getPath(data, mutation.from);
|
|
223
232
|
const next = setPath(data, mutation.set, value);
|
|
224
|
-
return
|
|
233
|
+
return chunkBA77UJOE_cjs.isObject(next) ? next : data;
|
|
225
234
|
}
|
|
226
235
|
};
|
|
227
236
|
var ToggleSchema = zod.z.object({
|
|
@@ -234,7 +243,7 @@ var toggleOp = {
|
|
|
234
243
|
const current = getPath(data, mutation.toggle);
|
|
235
244
|
const flipped = !(current === true);
|
|
236
245
|
const next = setPath(data, mutation.toggle, flipped);
|
|
237
|
-
return
|
|
246
|
+
return chunkBA77UJOE_cjs.isObject(next) ? next : data;
|
|
238
247
|
}
|
|
239
248
|
};
|
|
240
249
|
var IncrementSchema = zod.z.object({
|
|
@@ -249,7 +258,7 @@ var incrementOp = {
|
|
|
249
258
|
const base = typeof current === "number" ? current : 0;
|
|
250
259
|
const by = mutation.by ?? 1;
|
|
251
260
|
const next = setPath(data, mutation.increment, base + by);
|
|
252
|
-
return
|
|
261
|
+
return chunkBA77UJOE_cjs.isObject(next) ? next : data;
|
|
253
262
|
}
|
|
254
263
|
};
|
|
255
264
|
var DecrementSchema = zod.z.object({
|
|
@@ -264,7 +273,7 @@ var decrementOp = {
|
|
|
264
273
|
const base = typeof current === "number" ? current : 0;
|
|
265
274
|
const by = mutation.by ?? 1;
|
|
266
275
|
const next = setPath(data, mutation.decrement, base - by);
|
|
267
|
-
return
|
|
276
|
+
return chunkBA77UJOE_cjs.isObject(next) ? next : data;
|
|
268
277
|
}
|
|
269
278
|
};
|
|
270
279
|
var PushSchema = zod.z.object({
|
|
@@ -278,7 +287,7 @@ var pushOp = {
|
|
|
278
287
|
match: (mutation) => typeof mutation.push === "string",
|
|
279
288
|
apply: (data, mutation, ctx) => {
|
|
280
289
|
const current = getPath(data, mutation.push);
|
|
281
|
-
if (current !== void 0 && !
|
|
290
|
+
if (current !== void 0 && !chunkBA77UJOE_cjs.isArray(current)) {
|
|
282
291
|
if (ctx.strict) {
|
|
283
292
|
throw new MutationError(
|
|
284
293
|
`push: path "${mutation.push}" is not an array`,
|
|
@@ -293,10 +302,10 @@ var pushOp = {
|
|
|
293
302
|
{ op: "push", path: mutation.push, reason: "missing" }
|
|
294
303
|
);
|
|
295
304
|
}
|
|
296
|
-
const arr =
|
|
305
|
+
const arr = chunkBA77UJOE_cjs.isArray(current) ? current.slice() : [];
|
|
297
306
|
arr.push(mutation.value);
|
|
298
307
|
const next = setPath(data, mutation.push, arr);
|
|
299
|
-
return
|
|
308
|
+
return chunkBA77UJOE_cjs.isObject(next) ? next : data;
|
|
300
309
|
}
|
|
301
310
|
};
|
|
302
311
|
var PopSchema = zod.z.object({
|
|
@@ -309,7 +318,7 @@ var popOp = {
|
|
|
309
318
|
match: (mutation) => typeof mutation.pop === "string",
|
|
310
319
|
apply: (data, mutation, ctx) => {
|
|
311
320
|
const current = getPath(data, mutation.pop);
|
|
312
|
-
if (!
|
|
321
|
+
if (!chunkBA77UJOE_cjs.isArray(current)) {
|
|
313
322
|
if (ctx.strict) {
|
|
314
323
|
throw new MutationError(
|
|
315
324
|
`pop: path "${mutation.pop}" ${current === void 0 ? "does not exist" : "is not an array"}`,
|
|
@@ -321,7 +330,7 @@ var popOp = {
|
|
|
321
330
|
const arr = current.slice();
|
|
322
331
|
arr.pop();
|
|
323
332
|
const next = setPath(data, mutation.pop, arr);
|
|
324
|
-
return
|
|
333
|
+
return chunkBA77UJOE_cjs.isObject(next) ? next : data;
|
|
325
334
|
}
|
|
326
335
|
};
|
|
327
336
|
var RemoveAtSchema = zod.z.object({
|
|
@@ -333,7 +342,7 @@ var removeAtOp = {
|
|
|
333
342
|
schema: RemoveAtSchema,
|
|
334
343
|
apply: (data, mutation, ctx) => {
|
|
335
344
|
const current = getPath(data, mutation.removeAt);
|
|
336
|
-
if (!
|
|
345
|
+
if (!chunkBA77UJOE_cjs.isArray(current)) {
|
|
337
346
|
if (ctx.strict) {
|
|
338
347
|
throw new MutationError(
|
|
339
348
|
`removeAt: path "${mutation.removeAt}" ${current === void 0 ? "does not exist" : "is not an array"}`,
|
|
@@ -351,7 +360,7 @@ var removeAtOp = {
|
|
|
351
360
|
const arr = current.slice();
|
|
352
361
|
arr.splice(index, 1);
|
|
353
362
|
const next = setPath(data, mutation.removeAt, arr);
|
|
354
|
-
return
|
|
363
|
+
return chunkBA77UJOE_cjs.isObject(next) ? next : data;
|
|
355
364
|
}
|
|
356
365
|
};
|
|
357
366
|
var MoveSchema = zod.z.object({
|
|
@@ -364,7 +373,7 @@ var moveOp = {
|
|
|
364
373
|
schema: MoveSchema,
|
|
365
374
|
apply: (data, mutation, ctx) => {
|
|
366
375
|
const current = getPath(data, mutation.move);
|
|
367
|
-
if (!
|
|
376
|
+
if (!chunkBA77UJOE_cjs.isArray(current)) {
|
|
368
377
|
if (ctx.strict) {
|
|
369
378
|
throw new MutationError(
|
|
370
379
|
`move: path "${mutation.move}" ${current === void 0 ? "does not exist" : "is not an array"}`,
|
|
@@ -385,7 +394,7 @@ var moveOp = {
|
|
|
385
394
|
const [item] = arr.splice(from, 1);
|
|
386
395
|
arr.splice(Math.max(0, Math.min(to, arr.length)), 0, item);
|
|
387
396
|
const next = setPath(data, mutation.move, arr);
|
|
388
|
-
return
|
|
397
|
+
return chunkBA77UJOE_cjs.isObject(next) ? next : data;
|
|
389
398
|
}
|
|
390
399
|
};
|
|
391
400
|
var ClearSchema = zod.z.object({
|
|
@@ -396,13 +405,13 @@ var clearOp = {
|
|
|
396
405
|
schema: ClearSchema,
|
|
397
406
|
apply: (data, mutation, ctx) => {
|
|
398
407
|
const current = getPath(data, mutation.clear);
|
|
399
|
-
if (
|
|
408
|
+
if (chunkBA77UJOE_cjs.isArray(current)) {
|
|
400
409
|
const next2 = setPath(data, mutation.clear, []);
|
|
401
|
-
return
|
|
410
|
+
return chunkBA77UJOE_cjs.isObject(next2) ? next2 : data;
|
|
402
411
|
}
|
|
403
|
-
if (
|
|
412
|
+
if (chunkBA77UJOE_cjs.isObject(current)) {
|
|
404
413
|
const next2 = setPath(data, mutation.clear, {});
|
|
405
|
-
return
|
|
414
|
+
return chunkBA77UJOE_cjs.isObject(next2) ? next2 : data;
|
|
406
415
|
}
|
|
407
416
|
if (ctx.strict) {
|
|
408
417
|
throw new MutationError(
|
|
@@ -415,7 +424,7 @@ var clearOp = {
|
|
|
415
424
|
);
|
|
416
425
|
}
|
|
417
426
|
const next = deletePath(data, mutation.clear);
|
|
418
|
-
return
|
|
427
|
+
return chunkBA77UJOE_cjs.isObject(next) ? next : data;
|
|
419
428
|
}
|
|
420
429
|
};
|
|
421
430
|
var ResetSchema = zod.z.object({
|
|
@@ -427,7 +436,7 @@ var resetOp = {
|
|
|
427
436
|
apply: (data, mutation, ctx) => {
|
|
428
437
|
const initialValue = getPath(ctx.initial, mutation.reset);
|
|
429
438
|
const next = setPath(data, mutation.reset, initialValue);
|
|
430
|
-
return
|
|
439
|
+
return chunkBA77UJOE_cjs.isObject(next) ? next : data;
|
|
431
440
|
}
|
|
432
441
|
};
|
|
433
442
|
|
|
@@ -452,7 +461,7 @@ var MutationSchema = zod.z.union(
|
|
|
452
461
|
// src/action/mutations/registry.ts
|
|
453
462
|
var toDispatchOp = (op) => ({
|
|
454
463
|
key: op.key,
|
|
455
|
-
match: op.match ?? ((mutation) =>
|
|
464
|
+
match: op.match ?? ((mutation) => chunkBA77UJOE_cjs.hasKey(mutation, op.key)),
|
|
456
465
|
run: (data, mutation, ctx) => op.apply(data, op.schema.parse(mutation), ctx)
|
|
457
466
|
});
|
|
458
467
|
var DISPATCH = OPS.map(toDispatchOp);
|
|
@@ -471,7 +480,7 @@ var applyMutations = (data, mutations, opts = {}) => {
|
|
|
471
480
|
const ctx = buildCtx(opts);
|
|
472
481
|
let current = data;
|
|
473
482
|
for (const mutation of mutations) {
|
|
474
|
-
if (!
|
|
483
|
+
if (!chunkBA77UJOE_cjs.isObject(mutation)) continue;
|
|
475
484
|
const op = findOp(mutation);
|
|
476
485
|
if (op === void 0) continue;
|
|
477
486
|
current = op.run(current, mutation, ctx);
|
|
@@ -483,7 +492,7 @@ var HttpEndpointSchema = zod.z.object({
|
|
|
483
492
|
method: zod.z.enum(["GET", "POST", "PUT", "PATCH", "DELETE"]).describe("HTTP method."),
|
|
484
493
|
headers: zod.z.record(zod.z.string(), zod.z.string()).optional().describe("Static request headers."),
|
|
485
494
|
request: zod.z.unknown().optional().describe(
|
|
486
|
-
'Transform config run by the injected evaluator over the ACTION DATA to build the request body \u2014 EVALUATED ON EVERY CALL, so body values can follow screen state. Static parts are literal JSON; a dynamic part is an evaluator op over the data root, e.g. { "q": { "$ref": "$.search" } } makes body field q carry the current $.search each call. Requires an injected transform.'
|
|
495
|
+
'Transform config run by the injected evaluator over the ACTION DATA to build the request body \u2014 EVALUATED ON EVERY CALL, so body values can follow screen state. Static parts are literal JSON; a dynamic part is an evaluator op over the data root, e.g. { "q": { "$ref": "$.search" } } makes body field q carry the current $.search each call. Requires an injected transform. Not on a GET: fetch sends no body with a GET, so the shell reports such an endpoint to onError once when the definition loads, and every call of it fails.'
|
|
487
496
|
),
|
|
488
497
|
response: zod.z.unknown().optional().describe(
|
|
489
498
|
"Transform config run by the injected evaluator over the reply as received (`$` is the reply \u2014 object, array, or scalar) to produce the value stored at `target`. Requires an injected transform."
|
|
@@ -494,7 +503,7 @@ var HttpEndpointSchema = zod.z.object({
|
|
|
494
503
|
}).strict().describe("A named HTTP call. `request`/`response` shape the body/reply via the injected transform.");
|
|
495
504
|
var FunctionEndpointSchema = zod.z.object({
|
|
496
505
|
fn: zod.z.string().describe(
|
|
497
|
-
"
|
|
506
|
+
"Name of a function registered in `ShellConfig.functions`; the host registers it before the action runs. Read as a binding first: a `{{\u2026}}` template, a `$` path into the action's data (`$.which`), or an `@event` path (in a trigger's steps) or `@error` path (in an `onError` list) supplies the name; any other string is the name itself."
|
|
498
507
|
),
|
|
499
508
|
target: zod.z.string().optional().describe("Data path to store the return value at on success."),
|
|
500
509
|
errorTarget: zod.z.string().optional().describe("Data path to store the error at on failure."),
|
|
@@ -611,8 +620,8 @@ var ActionFragmentSchema = zod.z.object({
|
|
|
611
620
|
id: zod.z.string().describe("Stable fragment id, referenced from a push/replace `with: [...]`."),
|
|
612
621
|
name: zod.z.string().optional().describe("Human-readable name."),
|
|
613
622
|
description: zod.z.string().optional().describe("Free-form description."),
|
|
614
|
-
layout: zod.z.union([zod.z.string(), chunkNBXZ3RAC_cjs.LayoutNodeSchema]).optional().describe(
|
|
615
|
-
data: zod.z.record(zod.z.string(), zod.z.unknown()).optional().describe("Partial default data
|
|
623
|
+
layout: zod.z.union([zod.z.string(), chunkNBXZ3RAC_cjs.LayoutNodeSchema]).optional().describe("The wrapping (chrome) layout: put a `{ slot: \"body\" }` node where the layout composed so far (the action's own, inside any earlier fragment's) goes. When the layout composed so far is inline, it renders there as it is; when it is a layout id, the stored layout it names renders there. A layout id given here instead replaces the layout composed so far (the action's own and any earlier fragment's): composition does not read the layout store, so nothing is put into a stored layout's slots."),
|
|
624
|
+
data: zod.z.record(zod.z.string(), zod.z.unknown()).optional().describe("Partial default data, merged under the action's data one top-level key at a time: on a key both set, the action's value replaces the fragment's whole, nested objects included."),
|
|
616
625
|
triggers: zod.z.array(TriggerConfigSchema).optional().describe("Pre-wired triggers (e.g. a modal's close/cancel). Concatenated before the action's triggers."),
|
|
617
626
|
endpoints: zod.z.record(zod.z.string(), EndpointConfigSchema).optional().describe("Named endpoints, merged under the action (the action wins on a name clash)."),
|
|
618
627
|
lifecycle: LifecycleConfigSchema.optional().describe("Lifecycle hooks; per-hook steps run before the action's.")
|
|
@@ -641,6 +650,8 @@ exports.UnknownFragmentError = UnknownFragmentError;
|
|
|
641
650
|
exports.UnknownFunctionError = UnknownFunctionError;
|
|
642
651
|
exports.applyMutations = applyMutations;
|
|
643
652
|
exports.getPath = getPath;
|
|
653
|
+
exports.reportWithoutThrowing = reportWithoutThrowing;
|
|
644
654
|
exports.setPath = setPath;
|
|
645
|
-
|
|
646
|
-
//# sourceMappingURL=chunk-
|
|
655
|
+
exports.toHandlerFailed = toHandlerFailed;
|
|
656
|
+
//# sourceMappingURL=chunk-XBTAEOKJ.cjs.map
|
|
657
|
+
//# sourceMappingURL=chunk-XBTAEOKJ.cjs.map
|