@ankhorage/runtime 5.8.2 → 5.8.4
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/CHANGELOG.md +12 -0
- package/README.md +1 -1
- package/dist/runtimeActionRegistry.js +2 -0
- package/dist/runtimeActionRegistry.js.map +1 -1
- package/package.json +4 -4
- package/paradox/badges/npm.svg +3 -3
- package/paradox/diagrams/architecture-overview.mmd +1 -0
- package/paradox/diagrams/module-relationships.mmd +1 -0
- package/paradox/index.html +11 -7
- package/paradox/paradox.json +24 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @ankhorage/runtime
|
|
2
2
|
|
|
3
|
+
## 5.8.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- d5a45f4: Update dependencies: `@ankhorage/contracts`.
|
|
8
|
+
|
|
9
|
+
## 5.8.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- c51dba5: Preserve `openChange` boolean event payloads for Runtime state bindings.
|
|
14
|
+
|
|
3
15
|
## 5.8.2
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
# Ankhorage Runtime
|
|
5
5
|
|
|
6
|
-
         
|
|
7
7
|
|
|
8
8
|
Renders Ankhorage application manifests and resolves their runtime bindings, capabilities, events, media, screens, and state.
|
|
9
9
|
|
|
@@ -123,6 +123,8 @@ function createPayloadForEvent(eventName, args) {
|
|
|
123
123
|
return { value: args[0] };
|
|
124
124
|
if (eventName === 'checkedChange')
|
|
125
125
|
return { checked: args[0] };
|
|
126
|
+
if (eventName === 'openChange')
|
|
127
|
+
return { open: args[0] };
|
|
126
128
|
if (eventName === 'itemPress') {
|
|
127
129
|
const item = asRecord(args[0]) ?? {};
|
|
128
130
|
return typeof item.id === 'string' || typeof item.id === 'number'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CAAC,IAAI,SAAS,CAAC;AAClD,CAAC;AAED,SAAS,uBAAuB,CAAC,SAAiB;IAChD,OAAO,KAAK,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;AACvE,CAAC;AAED,SAAS,qBAAqB,CAAC,KAAc;IAC3C,OAAO,OAAO,KAAK,KAAK,UAAU,CAAC;AACrC,CAAC;AAED,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;AAC7C,CAAC","sourcesContent":["import type {\n BindingCondition,\n BindingExpression,\n BindingValue,\n ComponentDataBindingRegistry,\n ComponentEventDto,\n DataSourceDiagnostic,\n UiNode,\n} from '@ankhorage/contracts';\nimport type { Capability } from '@ankhorage/contracts/capability';\nimport { isRecord } from '@ankhorage/utility/object';\n\nimport {\n executeRuntimeBindingInvocation,\n resolveRuntimeBindingExpressionSync,\n type RuntimeBindingResolutionContext,\n type RuntimeBindingResultCache,\n type RuntimeBindingResultWriter,\n type RuntimeCapabilityExecutor,\n} from './runtimeBindings.js';\nimport {\n resolveRuntimeEventOperationErrorMessage,\n type RuntimeEventOperationLifecycle,\n} from './runtimeEventOperationLifecycle.js';\n\ntype RuntimeEventPayload = Record<string, unknown>;\ntype RuntimeEventHandler = (...args: unknown[]) => unknown;\n\nexport type RuntimeEventCapabilityResolver = (args: {\n readonly eventName: string;\n readonly node: UiNode;\n}) => Capability['id'] | undefined;\n\nexport interface RuntimeActionRegistry {\n dispatchComponentEvent(args: RuntimeComponentEventDispatchArgs): Promise<void>;\n}\n\nexport interface RuntimeActionResolutionScope {\n readonly context?: Record<string, unknown>;\n readonly resultSlots?: RuntimeBindingResultCache;\n readonly state?: Record<string, unknown>;\n}\n\nexport interface RuntimeActionResolutionArgs extends RuntimeActionResolutionScope {\n readonly event: ComponentEventDto<string, object>;\n}\n\nexport interface RuntimeComponentEventDispatchArgs extends RuntimeActionResolutionScope {\n readonly node: UiNode;\n readonly event: ComponentEventDto<string, object>;\n readonly eventName?: string;\n readonly dataBindings?: ComponentDataBindingRegistry;\n readonly executeCapability?: RuntimeCapabilityExecutor;\n readonly stateAdapter?: RuntimeBindingResolutionContext['stateAdapter'];\n readonly writeResultSlot?: RuntimeBindingResultWriter;\n readonly eventOperationLifecycle?: RuntimeEventOperationLifecycle;\n}\n\nexport interface RuntimeEventPropWrapArgs extends RuntimeActionResolutionScope {\n readonly node: UiNode;\n readonly props: Record<string, unknown>;\n readonly disableActions: boolean;\n readonly dataBindings?: ComponentDataBindingRegistry;\n readonly dispatchComponentEvent: (\n args: RuntimeComponentEventDispatchArgs,\n ) => Promise<void> | void;\n readonly resolveEventCapability?: RuntimeEventCapabilityResolver;\n}\n\n/*** Creates a registry that dispatches every authored event through one capability executor. */\nexport function createRuntimeActionRegistry(\n options: Pick<\n RuntimeComponentEventDispatchArgs,\n | 'dataBindings'\n | 'eventOperationLifecycle'\n | 'executeCapability'\n | 'resultSlots'\n | 'stateAdapter'\n | 'writeResultSlot'\n > = {},\n): RuntimeActionRegistry {\n return {\n async dispatchComponentEvent(args) {\n await dispatchRuntimeComponentEvent({ ...options, ...args });\n },\n };\n}\n\n/*** Executes every matching event invocation through the canonical capability path. */\nexport async function dispatchRuntimeComponentEvent(\n args: RuntimeComponentEventDispatchArgs,\n): Promise<readonly DataSourceDiagnostic[]> {\n const eventName = args.eventName ?? inferLocalEventName(args.event.type);\n const bindings =\n args.dataBindings?.[args.node.id]?.events?.[eventName] ??\n args.dataBindings?.[args.node.id]?.events?.[args.event.type] ??\n [];\n const diagnostics: DataSourceDiagnostic[] = [];\n const resultSlots: Record<string, BindingValue | undefined> = { ...(args.resultSlots ?? {}) };\n\n for (const binding of bindings) {\n const context = {\n context: args.context,\n event: args.event,\n executeCapability: args.executeCapability,\n resultSlots,\n stateAdapter: args.stateAdapter,\n writeResultSlot: (slot: string, value: BindingValue | undefined) => {\n resultSlots[slot] = value;\n args.writeResultSlot?.(slot, value);\n },\n };\n if (!matchesBindingCondition(binding.when, context)) continue;\n\n if (binding.target.result !== undefined) {\n context.writeResultSlot(binding.target.result, undefined);\n }\n\n const lifecycle = args.eventOperationLifecycle?.start({\n capability: binding.target.capability,\n nodeId: args.node.id,\n });\n if (args.eventOperationLifecycle !== undefined && lifecycle === undefined) break;\n\n try {\n const result = await executeRuntimeBindingInvocation(\n binding.target,\n context,\n { event: args.event, node: args.node },\n diagnostics,\n );\n if (lifecycle !== undefined && result?.ok) args.eventOperationLifecycle?.succeed(lifecycle);\n else if (lifecycle !== undefined)\n args.eventOperationLifecycle?.fail(\n lifecycle,\n resolveRuntimeEventOperationErrorMessage(diagnostics),\n );\n } catch {\n diagnostics.push({\n code: 'adapter-error',\n message: `Capability '${binding.target.capability}' could not be completed. Please try again.`,\n severity: 'error',\n });\n if (lifecycle !== undefined)\n args.eventOperationLifecycle?.fail(\n lifecycle,\n resolveRuntimeEventOperationErrorMessage(diagnostics),\n );\n break;\n }\n }\n\n return diagnostics;\n}\n\n/*** Wraps component callbacks so manifest event bindings retain the original callback behavior. */\nexport function wrapRuntimeEventProps(args: RuntimeEventPropWrapArgs): Record<string, unknown> {\n const props = { ...args.props };\n if (args.disableActions || args.dataBindings?.[args.node.id]?.events === undefined) return props;\n\n for (const eventName of Object.keys(args.dataBindings[args.node.id]?.events ?? {})) {\n const propName = eventNameToCallbackProp(eventName);\n const existing = props[propName];\n props[propName] = (...handlerArgs: unknown[]) => {\n const result = isRuntimeEventHandler(existing) ? existing(...handlerArgs) : undefined;\n void args.dispatchComponentEvent({\n context: args.context,\n dataBindings: args.dataBindings,\n event: createComponentEventFromHandlerArgs({\n capability: args.resolveEventCapability?.({ eventName, node: args.node }),\n eventName,\n handlerArgs,\n node: args.node,\n }),\n eventName,\n node: args.node,\n resultSlots: args.resultSlots,\n state: args.state,\n });\n return result;\n };\n }\n return props;\n}\n\n/*** Maps a platform callback invocation to the portable component event representation. */\nexport function createComponentEventFromHandlerArgs(args: {\n readonly capability?: Capability['id'];\n readonly node: UiNode;\n readonly eventName: string;\n readonly handlerArgs: readonly unknown[];\n}): ComponentEventDto<string, RuntimeEventPayload> {\n return {\n payload: createPayloadForEvent(args.eventName, args.handlerArgs),\n sourceNodeId: args.node.id,\n type: args.capability ?? args.eventName,\n };\n}\n\n/*** Resolves an authored expression-shaped payload for imperative consumers. */\nexport function resolveRuntimeActionValue(\n value: BindingExpression,\n args: RuntimeActionResolutionArgs,\n): BindingValue | undefined {\n return resolveRuntimeBindingExpressionSync(value, args);\n}\n\nfunction matchesBindingCondition(\n condition: BindingCondition | undefined,\n context: Parameters<typeof resolveRuntimeBindingExpressionSync>[1],\n): boolean {\n if (condition === undefined) return true;\n const source = resolveRuntimeBindingExpressionSync(condition.source, context);\n const value =\n condition.value === undefined\n ? undefined\n : resolveRuntimeBindingExpressionSync(condition.value, context);\n if (condition.operator === 'exists') return source !== undefined;\n if (condition.operator === 'notExists') return source === undefined;\n if (condition.operator === 'eq') return source === value;\n return source !== value;\n}\n\nfunction createPayloadForEvent(eventName: string, args: readonly unknown[]): RuntimeEventPayload {\n if (eventName === 'submit') return { values: asRecord(args[0]) ?? {} };\n if (eventName === 'changeText' || eventName === 'valueChange' || eventName === 'searchChange')\n return { value: args[0] };\n if (eventName === 'checkedChange') return { checked: args[0] };\n if (eventName === 'itemPress') {\n const item = asRecord(args[0]) ?? {};\n return typeof item.id === 'string' || typeof item.id === 'number'\n ? { item, itemId: item.id }\n : { item };\n }\n return asRecord(args[0]) ?? {};\n}\n\nfunction inferLocalEventName(eventType: string): string {\n return eventType.split('.').at(-1) ?? eventType;\n}\n\nfunction eventNameToCallbackProp(eventName: string): string {\n return `on${eventName.charAt(0).toUpperCase()}${eventName.slice(1)}`;\n}\n\nfunction isRuntimeEventHandler(value: unknown): value is RuntimeEventHandler {\n return typeof value === 'function';\n}\n\nfunction asRecord(value: unknown): Record<string, unknown> | undefined {\n return isRecord(value) ? value : undefined;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"runtimeActionRegistry.js","sourceRoot":"","sources":["../src/runtimeActionRegistry.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAErD,OAAO,EACL,+BAA+B,EAC/B,mCAAmC,GAKpC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,wCAAwC,GAEzC,MAAM,qCAAqC,CAAC;AA8C7C,gGAAgG;AAChG,MAAM,UAAU,2BAA2B,CACzC,UAQI,EAAE;IAEN,OAAO;QACL,KAAK,CAAC,sBAAsB,CAAC,IAAI;YAC/B,MAAM,6BAA6B,CAAC,EAAE,GAAG,OAAO,EAAE,GAAG,IAAI,EAAE,CAAC,CAAC;QAC/D,CAAC;KACF,CAAC;AACJ,CAAC;AAED,uFAAuF;AACvF,MAAM,CAAC,KAAK,UAAU,6BAA6B,CACjD,IAAuC;IAEvC,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,IAAI,mBAAmB,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACzE,MAAM,QAAQ,GACZ,IAAI,CAAC,YAAY,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,SAAS,CAAC;QACtD,IAAI,CAAC,YAAY,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC;QAC5D,EAAE,CAAC;IACL,MAAM,WAAW,GAA2B,EAAE,CAAC;IAC/C,MAAM,WAAW,GAA6C,EAAE,GAAG,CAAC,IAAI,CAAC,WAAW,IAAI,EAAE,CAAC,EAAE,CAAC;IAE9F,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;QAC/B,MAAM,OAAO,GAAG;YACd,OAAO,EAAE,IAAI,CAAC,OAA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;AACjC,CAAC;AAED,SAAS,mBAAmB,CAAC,SAAiB;IAC5C,OAAO,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,SAAS,CAAC;AAClD,CAAC;AAED,SAAS,uBAAuB,CAAC,SAAiB;IAChD,OAAO,KAAK,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;AACvE,CAAC;AAED,SAAS,qBAAqB,CAAC,KAAc;IAC3C,OAAO,OAAO,KAAK,KAAK,UAAU,CAAC;AACrC,CAAC;AAED,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;AAC7C,CAAC","sourcesContent":["import type {\n BindingCondition,\n BindingExpression,\n BindingValue,\n ComponentDataBindingRegistry,\n ComponentEventDto,\n DataSourceDiagnostic,\n UiNode,\n} from '@ankhorage/contracts';\nimport type { Capability } from '@ankhorage/contracts/capability';\nimport { isRecord } from '@ankhorage/utility/object';\n\nimport {\n executeRuntimeBindingInvocation,\n resolveRuntimeBindingExpressionSync,\n type RuntimeBindingResolutionContext,\n type RuntimeBindingResultCache,\n type RuntimeBindingResultWriter,\n type RuntimeCapabilityExecutor,\n} from './runtimeBindings.js';\nimport {\n resolveRuntimeEventOperationErrorMessage,\n type RuntimeEventOperationLifecycle,\n} from './runtimeEventOperationLifecycle.js';\n\ntype RuntimeEventPayload = Record<string, unknown>;\ntype RuntimeEventHandler = (...args: unknown[]) => unknown;\n\nexport type RuntimeEventCapabilityResolver = (args: {\n readonly eventName: string;\n readonly node: UiNode;\n}) => Capability['id'] | undefined;\n\nexport interface RuntimeActionRegistry {\n dispatchComponentEvent(args: RuntimeComponentEventDispatchArgs): Promise<void>;\n}\n\nexport interface RuntimeActionResolutionScope {\n readonly context?: Record<string, unknown>;\n readonly resultSlots?: RuntimeBindingResultCache;\n readonly state?: Record<string, unknown>;\n}\n\nexport interface RuntimeActionResolutionArgs extends RuntimeActionResolutionScope {\n readonly event: ComponentEventDto<string, object>;\n}\n\nexport interface RuntimeComponentEventDispatchArgs extends RuntimeActionResolutionScope {\n readonly node: UiNode;\n readonly event: ComponentEventDto<string, object>;\n readonly eventName?: string;\n readonly dataBindings?: ComponentDataBindingRegistry;\n readonly executeCapability?: RuntimeCapabilityExecutor;\n readonly stateAdapter?: RuntimeBindingResolutionContext['stateAdapter'];\n readonly writeResultSlot?: RuntimeBindingResultWriter;\n readonly eventOperationLifecycle?: RuntimeEventOperationLifecycle;\n}\n\nexport interface RuntimeEventPropWrapArgs extends RuntimeActionResolutionScope {\n readonly node: UiNode;\n readonly props: Record<string, unknown>;\n readonly disableActions: boolean;\n readonly dataBindings?: ComponentDataBindingRegistry;\n readonly dispatchComponentEvent: (\n args: RuntimeComponentEventDispatchArgs,\n ) => Promise<void> | void;\n readonly resolveEventCapability?: RuntimeEventCapabilityResolver;\n}\n\n/*** Creates a registry that dispatches every authored event through one capability executor. */\nexport function createRuntimeActionRegistry(\n options: Pick<\n RuntimeComponentEventDispatchArgs,\n | 'dataBindings'\n | 'eventOperationLifecycle'\n | 'executeCapability'\n | 'resultSlots'\n | 'stateAdapter'\n | 'writeResultSlot'\n > = {},\n): RuntimeActionRegistry {\n return {\n async dispatchComponentEvent(args) {\n await dispatchRuntimeComponentEvent({ ...options, ...args });\n },\n };\n}\n\n/*** Executes every matching event invocation through the canonical capability path. */\nexport async function dispatchRuntimeComponentEvent(\n args: RuntimeComponentEventDispatchArgs,\n): Promise<readonly DataSourceDiagnostic[]> {\n const eventName = args.eventName ?? inferLocalEventName(args.event.type);\n const bindings =\n args.dataBindings?.[args.node.id]?.events?.[eventName] ??\n args.dataBindings?.[args.node.id]?.events?.[args.event.type] ??\n [];\n const diagnostics: DataSourceDiagnostic[] = [];\n const resultSlots: Record<string, BindingValue | undefined> = { ...(args.resultSlots ?? {}) };\n\n for (const binding of bindings) {\n const context = {\n context: args.context,\n event: args.event,\n executeCapability: args.executeCapability,\n resultSlots,\n stateAdapter: args.stateAdapter,\n writeResultSlot: (slot: string, value: BindingValue | undefined) => {\n resultSlots[slot] = value;\n args.writeResultSlot?.(slot, value);\n },\n };\n if (!matchesBindingCondition(binding.when, context)) continue;\n\n if (binding.target.result !== undefined) {\n context.writeResultSlot(binding.target.result, undefined);\n }\n\n const lifecycle = args.eventOperationLifecycle?.start({\n capability: binding.target.capability,\n nodeId: args.node.id,\n });\n if (args.eventOperationLifecycle !== undefined && lifecycle === undefined) break;\n\n try {\n const result = await executeRuntimeBindingInvocation(\n binding.target,\n context,\n { event: args.event, node: args.node },\n diagnostics,\n );\n if (lifecycle !== undefined && result?.ok) args.eventOperationLifecycle?.succeed(lifecycle);\n else if (lifecycle !== undefined)\n args.eventOperationLifecycle?.fail(\n lifecycle,\n resolveRuntimeEventOperationErrorMessage(diagnostics),\n );\n } catch {\n diagnostics.push({\n code: 'adapter-error',\n message: `Capability '${binding.target.capability}' could not be completed. Please try again.`,\n severity: 'error',\n });\n if (lifecycle !== undefined)\n args.eventOperationLifecycle?.fail(\n lifecycle,\n resolveRuntimeEventOperationErrorMessage(diagnostics),\n );\n break;\n }\n }\n\n return diagnostics;\n}\n\n/*** Wraps component callbacks so manifest event bindings retain the original callback behavior. */\nexport function wrapRuntimeEventProps(args: RuntimeEventPropWrapArgs): Record<string, unknown> {\n const props = { ...args.props };\n if (args.disableActions || args.dataBindings?.[args.node.id]?.events === undefined) return props;\n\n for (const eventName of Object.keys(args.dataBindings[args.node.id]?.events ?? {})) {\n const propName = eventNameToCallbackProp(eventName);\n const existing = props[propName];\n props[propName] = (...handlerArgs: unknown[]) => {\n const result = isRuntimeEventHandler(existing) ? existing(...handlerArgs) : undefined;\n void args.dispatchComponentEvent({\n context: args.context,\n dataBindings: args.dataBindings,\n event: createComponentEventFromHandlerArgs({\n capability: args.resolveEventCapability?.({ eventName, node: args.node }),\n eventName,\n handlerArgs,\n node: args.node,\n }),\n eventName,\n node: args.node,\n resultSlots: args.resultSlots,\n state: args.state,\n });\n return result;\n };\n }\n return props;\n}\n\n/*** Maps a platform callback invocation to the portable component event representation. */\nexport function createComponentEventFromHandlerArgs(args: {\n readonly capability?: Capability['id'];\n readonly node: UiNode;\n readonly eventName: string;\n readonly handlerArgs: readonly unknown[];\n}): ComponentEventDto<string, RuntimeEventPayload> {\n return {\n payload: createPayloadForEvent(args.eventName, args.handlerArgs),\n sourceNodeId: args.node.id,\n type: args.capability ?? args.eventName,\n };\n}\n\n/*** Resolves an authored expression-shaped payload for imperative consumers. */\nexport function resolveRuntimeActionValue(\n value: BindingExpression,\n args: RuntimeActionResolutionArgs,\n): BindingValue | undefined {\n return resolveRuntimeBindingExpressionSync(value, args);\n}\n\nfunction matchesBindingCondition(\n condition: BindingCondition | undefined,\n context: Parameters<typeof resolveRuntimeBindingExpressionSync>[1],\n): boolean {\n if (condition === undefined) return true;\n const source = resolveRuntimeBindingExpressionSync(condition.source, context);\n const value =\n condition.value === undefined\n ? undefined\n : resolveRuntimeBindingExpressionSync(condition.value, context);\n if (condition.operator === 'exists') return source !== undefined;\n if (condition.operator === 'notExists') return source === undefined;\n if (condition.operator === 'eq') return source === value;\n return source !== value;\n}\n\nfunction createPayloadForEvent(eventName: string, args: readonly unknown[]): RuntimeEventPayload {\n if (eventName === 'submit') return { values: asRecord(args[0]) ?? {} };\n if (eventName === 'changeText' || eventName === 'valueChange' || eventName === 'searchChange')\n return { value: args[0] };\n if (eventName === 'checkedChange') return { checked: args[0] };\n if (eventName === 'openChange') return { open: args[0] };\n if (eventName === 'itemPress') {\n const item = asRecord(args[0]) ?? {};\n return typeof item.id === 'string' || typeof item.id === 'number'\n ? { item, itemId: item.id }\n : { item };\n }\n return asRecord(args[0]) ?? {};\n}\n\nfunction inferLocalEventName(eventType: string): string {\n return eventType.split('.').at(-1) ?? eventType;\n}\n\nfunction eventNameToCallbackProp(eventName: string): string {\n return `on${eventName.charAt(0).toUpperCase()}${eventName.slice(1)}`;\n}\n\nfunction isRuntimeEventHandler(value: unknown): value is RuntimeEventHandler {\n return typeof value === 'function';\n}\n\nfunction asRecord(value: unknown): Record<string, unknown> | undefined {\n return isRecord(value) ? value : undefined;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ankhorage/runtime",
|
|
3
|
-
"version": "5.8.
|
|
3
|
+
"version": "5.8.4",
|
|
4
4
|
"description": "Platform-neutral runtime renderer, contracts, and helpers for Ankhorage generated apps.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"engines": {
|
|
@@ -400,7 +400,7 @@
|
|
|
400
400
|
},
|
|
401
401
|
"dependencies": {
|
|
402
402
|
"@ankhorage/capability": "^0.2.3",
|
|
403
|
-
"@ankhorage/contracts": "^28.
|
|
403
|
+
"@ankhorage/contracts": "^28.1.0",
|
|
404
404
|
"@ankhorage/data-sources": "^2.4.0",
|
|
405
405
|
"@ankhorage/flow": "^0.12.0",
|
|
406
406
|
"@ankhorage/utility": "^1.11.0"
|
|
@@ -416,8 +416,8 @@
|
|
|
416
416
|
}
|
|
417
417
|
},
|
|
418
418
|
"devDependencies": {
|
|
419
|
-
"@ankhorage/devtools": "^2.
|
|
420
|
-
"@ankhorage/paradox": "^0.
|
|
419
|
+
"@ankhorage/devtools": "^2.13.1",
|
|
420
|
+
"@ankhorage/paradox": "^0.7.0",
|
|
421
421
|
"@types/bun": "^1.4.5",
|
|
422
422
|
"@types/node": "^26.6.4",
|
|
423
423
|
"@types/react": "^19.3.0",
|
package/paradox/badges/npm.svg
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="90" height="20" role="img" aria-label="npm: v5.8.
|
|
2
|
-
<title>npm: v5.8.
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="90" height="20" role="img" aria-label="npm: v5.8.4">
|
|
2
|
+
<title>npm: v5.8.4</title>
|
|
3
3
|
<rect width="38" height="20" fill="#374151"/>
|
|
4
4
|
<rect x="38" width="52" height="20" fill="#cb3837"/>
|
|
5
5
|
<text x="19" y="14" fill="#ffffff" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" font-size="11" text-anchor="middle">npm</text>
|
|
6
|
-
<text x="64" y="14" fill="#ffffff" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" font-size="11" text-anchor="middle">v5.8.
|
|
6
|
+
<text x="64" y="14" fill="#ffffff" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" font-size="11" text-anchor="middle">v5.8.4</text>
|
|
7
7
|
</svg>
|
|
@@ -59,6 +59,7 @@ graph TD
|
|
|
59
59
|
module_src_runtimeActionRegistry_test_ts["src/runtimeActionRegistry.test.ts"]
|
|
60
60
|
package__ankhorage_runtime -.-> module_src_runtimeActionRegistry_test_ts
|
|
61
61
|
module_src_runtimeActionRegistry_test_ts --> module_src_runtimeActionRegistry_ts
|
|
62
|
+
module_src_runtimeActionRegistry_test_ts --> module_src_runtimeCapabilityExecutor_ts
|
|
62
63
|
module_src_runtimeActionRegistry_test_ts --> module_src_runtimeStateAdapter_ts
|
|
63
64
|
module_src_runtimeActionRegistry_ts["src/runtimeActionRegistry.ts"]
|
|
64
65
|
package__ankhorage_runtime -.-> module_src_runtimeActionRegistry_ts
|
|
@@ -90,6 +90,7 @@ graph LR
|
|
|
90
90
|
module_src_rendering_test_ts --> module_src_rendering_ts
|
|
91
91
|
module_src_rendering_ts --> module_src_registry_tsx
|
|
92
92
|
module_src_runtimeActionRegistry_test_ts --> module_src_runtimeActionRegistry_ts
|
|
93
|
+
module_src_runtimeActionRegistry_test_ts --> module_src_runtimeCapabilityExecutor_ts
|
|
93
94
|
module_src_runtimeActionRegistry_test_ts --> module_src_runtimeStateAdapter_ts
|
|
94
95
|
module_src_runtimeActionRegistry_ts --> module_src_runtimeBindings_ts
|
|
95
96
|
module_src_runtimeActionRegistry_ts --> module_src_runtimeEventOperationLifecycle_ts
|
package/paradox/index.html
CHANGED
|
@@ -559,10 +559,10 @@ inject it at the runtime boundary.</p>
|
|
|
559
559
|
<p class="muted">Referenced module</p>
|
|
560
560
|
<p><strong>Dependencies:</strong> <code>src/registry.tsx</code></p>
|
|
561
561
|
<p><strong>Exports:</strong> <code>getUnknownComponentDiagnostic</code>, <code>resolveRenderedChildren</code>, <code>resolveRuntimeRegistry</code></p>
|
|
562
|
-
</article><article class="item" data-search="src/runtimeActionRegistry.test.ts src/runtimeActionRegistry.ts src/runtimeStateAdapter.ts">
|
|
562
|
+
</article><article class="item" data-search="src/runtimeActionRegistry.test.ts src/runtimeActionRegistry.ts src/runtimeCapabilityExecutor.ts src/runtimeStateAdapter.ts">
|
|
563
563
|
<h3>src/runtimeActionRegistry.test.ts</h3>
|
|
564
564
|
<p class="muted">Referenced module</p>
|
|
565
|
-
<p><strong>Dependencies:</strong> <code>src/runtimeActionRegistry.ts</code>, <code>src/runtimeStateAdapter.ts</code></p>
|
|
565
|
+
<p><strong>Dependencies:</strong> <code>src/runtimeActionRegistry.ts</code>, <code>src/runtimeCapabilityExecutor.ts</code>, <code>src/runtimeStateAdapter.ts</code></p>
|
|
566
566
|
<p><strong>Exports:</strong> <span class="empty">None</span></p>
|
|
567
567
|
</article><article class="item" data-search="src/runtimeActionRegistry.ts src/runtimeBindings.ts src/runtimeEventOperationLifecycle.ts createComponentEventFromHandlerArgs createRuntimeActionRegistry dispatchRuntimeComponentEvent resolveRuntimeActionValue RuntimeActionRegistry RuntimeActionResolutionArgs RuntimeActionResolutionScope RuntimeComponentEventDispatchArgs RuntimeEventCapabilityResolver RuntimeEventPropWrapArgs wrapRuntimeEventProps">
|
|
568
568
|
<h3>src/runtimeActionRegistry.ts</h3>
|
|
@@ -4332,6 +4332,7 @@ must not provide credential resolution.</td>
|
|
|
4332
4332
|
module_src_runtimeActionRegistry_test_ts["src/runtimeActionRegistry.test.ts"]
|
|
4333
4333
|
package__ankhorage_runtime -.-> module_src_runtimeActionRegistry_test_ts
|
|
4334
4334
|
module_src_runtimeActionRegistry_test_ts --> module_src_runtimeActionRegistry_ts
|
|
4335
|
+
module_src_runtimeActionRegistry_test_ts --> module_src_runtimeCapabilityExecutor_ts
|
|
4335
4336
|
module_src_runtimeActionRegistry_test_ts --> module_src_runtimeStateAdapter_ts
|
|
4336
4337
|
module_src_runtimeActionRegistry_ts["src/runtimeActionRegistry.ts"]
|
|
4337
4338
|
package__ankhorage_runtime -.-> module_src_runtimeActionRegistry_ts
|
|
@@ -4603,6 +4604,7 @@ must not provide credential resolution.</td>
|
|
|
4603
4604
|
module_src_runtimeActionRegistry_test_ts["src/runtimeActionRegistry.test.ts"]
|
|
4604
4605
|
package__ankhorage_runtime -.-> module_src_runtimeActionRegistry_test_ts
|
|
4605
4606
|
module_src_runtimeActionRegistry_test_ts --> module_src_runtimeActionRegistry_ts
|
|
4607
|
+
module_src_runtimeActionRegistry_test_ts --> module_src_runtimeCapabilityExecutor_ts
|
|
4606
4608
|
module_src_runtimeActionRegistry_test_ts --> module_src_runtimeStateAdapter_ts
|
|
4607
4609
|
module_src_runtimeActionRegistry_ts["src/runtimeActionRegistry.ts"]
|
|
4608
4610
|
package__ankhorage_runtime -.-> module_src_runtimeActionRegistry_ts
|
|
@@ -4907,6 +4909,7 @@ must not provide credential resolution.</td>
|
|
|
4907
4909
|
module_src_rendering_test_ts --> module_src_rendering_ts
|
|
4908
4910
|
module_src_rendering_ts --> module_src_registry_tsx
|
|
4909
4911
|
module_src_runtimeActionRegistry_test_ts --> module_src_runtimeActionRegistry_ts
|
|
4912
|
+
module_src_runtimeActionRegistry_test_ts --> module_src_runtimeCapabilityExecutor_ts
|
|
4910
4913
|
module_src_runtimeActionRegistry_test_ts --> module_src_runtimeStateAdapter_ts
|
|
4911
4914
|
module_src_runtimeActionRegistry_ts --> module_src_runtimeBindings_ts
|
|
4912
4915
|
module_src_runtimeActionRegistry_ts --> module_src_runtimeEventOperationLifecycle_ts
|
|
@@ -5103,6 +5106,7 @@ must not provide credential resolution.</td>
|
|
|
5103
5106
|
module_src_rendering_test_ts --> module_src_rendering_ts
|
|
5104
5107
|
module_src_rendering_ts --> module_src_registry_tsx
|
|
5105
5108
|
module_src_runtimeActionRegistry_test_ts --> module_src_runtimeActionRegistry_ts
|
|
5109
|
+
module_src_runtimeActionRegistry_test_ts --> module_src_runtimeCapabilityExecutor_ts
|
|
5106
5110
|
module_src_runtimeActionRegistry_test_ts --> module_src_runtimeStateAdapter_ts
|
|
5107
5111
|
module_src_runtimeActionRegistry_ts --> module_src_runtimeBindings_ts
|
|
5108
5112
|
module_src_runtimeActionRegistry_ts --> module_src_runtimeEventOperationLifecycle_ts
|
|
@@ -6684,7 +6688,7 @@ must not provide credential resolution.</td>
|
|
|
6684
6688
|
<h2>src/runtimeActionRegistry.test.ts</h2>
|
|
6685
6689
|
<article class="item" data-search="dispatch src/runtimeActionRegistry.test.ts ">
|
|
6686
6690
|
<h3>dispatch</h3>
|
|
6687
|
-
<p class="muted"><code>src/runtimeActionRegistry.test.ts:
|
|
6691
|
+
<p class="muted"><code>src/runtimeActionRegistry.test.ts:62:9</code></p>
|
|
6688
6692
|
<p class="empty">No description available.</p>
|
|
6689
6693
|
</article>
|
|
6690
6694
|
</section>
|
|
@@ -6721,19 +6725,19 @@ must not provide credential resolution.</td>
|
|
|
6721
6725
|
<p class="empty">No description available.</p>
|
|
6722
6726
|
</article><article class="item" data-search="inferLocalEventName src/runtimeActionRegistry.ts ">
|
|
6723
6727
|
<h3>inferLocalEventName</h3>
|
|
6724
|
-
<p class="muted"><code>src/runtimeActionRegistry.ts:
|
|
6728
|
+
<p class="muted"><code>src/runtimeActionRegistry.ts:239:1</code></p>
|
|
6725
6729
|
<p class="empty">No description available.</p>
|
|
6726
6730
|
</article><article class="item" data-search="eventNameToCallbackProp src/runtimeActionRegistry.ts ">
|
|
6727
6731
|
<h3>eventNameToCallbackProp</h3>
|
|
6728
|
-
<p class="muted"><code>src/runtimeActionRegistry.ts:
|
|
6732
|
+
<p class="muted"><code>src/runtimeActionRegistry.ts:243:1</code></p>
|
|
6729
6733
|
<p class="empty">No description available.</p>
|
|
6730
6734
|
</article><article class="item" data-search="isRuntimeEventHandler src/runtimeActionRegistry.ts ">
|
|
6731
6735
|
<h3>isRuntimeEventHandler</h3>
|
|
6732
|
-
<p class="muted"><code>src/runtimeActionRegistry.ts:
|
|
6736
|
+
<p class="muted"><code>src/runtimeActionRegistry.ts:247:1</code></p>
|
|
6733
6737
|
<p class="empty">No description available.</p>
|
|
6734
6738
|
</article><article class="item" data-search="asRecord src/runtimeActionRegistry.ts ">
|
|
6735
6739
|
<h3>asRecord</h3>
|
|
6736
|
-
<p class="muted"><code>src/runtimeActionRegistry.ts:
|
|
6740
|
+
<p class="muted"><code>src/runtimeActionRegistry.ts:251:1</code></p>
|
|
6737
6741
|
<p class="empty">No description available.</p>
|
|
6738
6742
|
</article>
|
|
6739
6743
|
</section>
|
package/paradox/paradox.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
{
|
|
19
19
|
"id": "npm",
|
|
20
20
|
"label": "npm",
|
|
21
|
-
"value": "v5.8.
|
|
21
|
+
"value": "v5.8.4",
|
|
22
22
|
"color": "cb3837"
|
|
23
23
|
},
|
|
24
24
|
{
|
|
@@ -493,6 +493,7 @@
|
|
|
493
493
|
"isEntrypoint": false,
|
|
494
494
|
"dependencies": [
|
|
495
495
|
"src/runtimeActionRegistry.ts",
|
|
496
|
+
"src/runtimeCapabilityExecutor.ts",
|
|
496
497
|
"src/runtimeStateAdapter.ts"
|
|
497
498
|
],
|
|
498
499
|
"exports": []
|
|
@@ -6490,7 +6491,7 @@
|
|
|
6490
6491
|
"security": [],
|
|
6491
6492
|
"sourceLocation": {
|
|
6492
6493
|
"filePath": "src/runtimeActionRegistry.test.ts",
|
|
6493
|
-
"line":
|
|
6494
|
+
"line": 62,
|
|
6494
6495
|
"column": 9
|
|
6495
6496
|
}
|
|
6496
6497
|
},
|
|
@@ -6578,7 +6579,7 @@
|
|
|
6578
6579
|
"security": [],
|
|
6579
6580
|
"sourceLocation": {
|
|
6580
6581
|
"filePath": "src/runtimeActionRegistry.ts",
|
|
6581
|
-
"line":
|
|
6582
|
+
"line": 239,
|
|
6582
6583
|
"column": 1
|
|
6583
6584
|
}
|
|
6584
6585
|
},
|
|
@@ -6589,7 +6590,7 @@
|
|
|
6589
6590
|
"security": [],
|
|
6590
6591
|
"sourceLocation": {
|
|
6591
6592
|
"filePath": "src/runtimeActionRegistry.ts",
|
|
6592
|
-
"line":
|
|
6593
|
+
"line": 243,
|
|
6593
6594
|
"column": 1
|
|
6594
6595
|
}
|
|
6595
6596
|
},
|
|
@@ -6600,7 +6601,7 @@
|
|
|
6600
6601
|
"security": [],
|
|
6601
6602
|
"sourceLocation": {
|
|
6602
6603
|
"filePath": "src/runtimeActionRegistry.ts",
|
|
6603
|
-
"line":
|
|
6604
|
+
"line": 247,
|
|
6604
6605
|
"column": 1
|
|
6605
6606
|
}
|
|
6606
6607
|
},
|
|
@@ -6611,7 +6612,7 @@
|
|
|
6611
6612
|
"security": [],
|
|
6612
6613
|
"sourceLocation": {
|
|
6613
6614
|
"filePath": "src/runtimeActionRegistry.ts",
|
|
6614
|
-
"line":
|
|
6615
|
+
"line": 251,
|
|
6615
6616
|
"column": 1
|
|
6616
6617
|
}
|
|
6617
6618
|
},
|
|
@@ -9169,6 +9170,11 @@
|
|
|
9169
9170
|
"toPath": "src/runtimeActionRegistry.ts",
|
|
9170
9171
|
"sourcePath": "src/runtimeActionRegistry.test.ts"
|
|
9171
9172
|
},
|
|
9173
|
+
{
|
|
9174
|
+
"fromPath": "src/runtimeActionRegistry.test.ts",
|
|
9175
|
+
"toPath": "src/runtimeCapabilityExecutor.ts",
|
|
9176
|
+
"sourcePath": "src/runtimeActionRegistry.test.ts"
|
|
9177
|
+
},
|
|
9172
9178
|
{
|
|
9173
9179
|
"fromPath": "src/runtimeActionRegistry.test.ts",
|
|
9174
9180
|
"toPath": "src/runtimeStateAdapter.ts",
|
|
@@ -10208,6 +10214,18 @@
|
|
|
10208
10214
|
"callExpression": "dispatch",
|
|
10209
10215
|
"sourcePath": "src/runtimeActionRegistry.test.ts"
|
|
10210
10216
|
},
|
|
10217
|
+
{
|
|
10218
|
+
"fromSymbol": "src/runtimeActionRegistry.test.ts",
|
|
10219
|
+
"toSymbol": "composeRuntimeCapabilityExecutor",
|
|
10220
|
+
"callExpression": "composeRuntimeCapabilityExecutor",
|
|
10221
|
+
"sourcePath": "src/runtimeActionRegistry.test.ts"
|
|
10222
|
+
},
|
|
10223
|
+
{
|
|
10224
|
+
"fromSymbol": "src/runtimeActionRegistry.test.ts",
|
|
10225
|
+
"toSymbol": "dispatchRuntimeComponentEvent",
|
|
10226
|
+
"callExpression": "dispatchRuntimeComponentEvent",
|
|
10227
|
+
"sourcePath": "src/runtimeActionRegistry.test.ts"
|
|
10228
|
+
},
|
|
10211
10229
|
{
|
|
10212
10230
|
"fromSymbol": "dispatchComponentEvent",
|
|
10213
10231
|
"toSymbol": "dispatchRuntimeComponentEvent",
|