@ankhorage/runtime 5.7.6 → 5.7.8
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/RuntimeRenderer.d.ts.map +1 -1
- package/dist/RuntimeRenderer.js +1 -0
- package/dist/RuntimeRenderer.js.map +1 -1
- package/dist/runtimeActionRegistry.d.ts +3 -2
- package/dist/runtimeActionRegistry.d.ts.map +1 -1
- package/dist/runtimeActionRegistry.js +1 -0
- package/dist/runtimeActionRegistry.js.map +1 -1
- package/package.json +3 -3
- 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/exports.json +20 -13
- package/paradox/exports.md +14 -13
- package/paradox/index.html +51 -27
- package/paradox/paradox.json +73 -26
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @ankhorage/runtime
|
|
2
2
|
|
|
3
|
+
## 5.7.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- cf2c43e: Update dependencies: `@ankhorage/flow`.
|
|
8
|
+
|
|
9
|
+
## 5.7.7
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- d732ea5: Preserve the renderer's state adapter during event invocation and condition resolution so state-backed event inputs resolve at dispatch time.
|
|
14
|
+
|
|
3
15
|
## 5.7.6
|
|
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
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RuntimeRenderer.d.ts","source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AO,CAAC,CAAC;IACzC,gBAAgB,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,YAAY,GAAG,SAAS,CAAC,CAAC,CAAC;IACtE,YAAY,CAAC,EAAE,4BAA4B,CAAC;IAC5C,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC,iBAAiB,CAAC,EAAE,yBAAyB,CAAC;IAC9C,WAAW,CAAC,EAAE,yBAAyB,CAAC;IACxC,iBAAiB,CAAC,EAAE,yBAAyB,CAAC;IAC9C,sBAAsB,CAAC,EAAE,8BAA8B,CAAC;IACxD,aAAa,CAAC,EAAE,CAAC,WAAW,EAAE,SAAS,oBAAoB,EAAE,KAAK,IAAI,CAAC;CACxE;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,qBAsW1D"}
|
package/dist/RuntimeRenderer.js
CHANGED
|
@@ -97,6 +97,7 @@ export function RuntimeRenderer(props) {
|
|
|
97
97
|
executeCapability: eventArgs.executeCapability ?? effectiveConfig.executeCapability,
|
|
98
98
|
onDiagnostics: effectiveConfig.onDiagnostics,
|
|
99
99
|
resultSlots: eventArgs.resultSlots ?? effectiveConfig.resultSlots,
|
|
100
|
+
stateAdapter: eventArgs.stateAdapter ?? effectiveConfig.stateAdapter,
|
|
100
101
|
writeResultSlot: eventArgs.writeResultSlot ?? effectiveConfig.writeResultSlot,
|
|
101
102
|
eventOperationLifecycle: eventArgs.eventOperationLifecycle ?? effectiveConfig.eventOperationLifecycle,
|
|
102
103
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RuntimeRenderer.js","sourceRoot":"","sources":["../src/RuntimeRenderer.tsx"],"names":[],"mappings":";AAUA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAGtD,OAAO,EACL,6BAA6B,EAC7B,uBAAuB,EACvB,sBAAsB,GACvB,MAAM,gBAAgB,CAA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QAC5C,IAAI;QACJ,WAAW,EAAE,eAAe,CAAC,WAAW;QACxC,sBAAsB,EAAE,eAAe,CAAC,sBAAsB;KAC/D,CAAC,CAAC;IAEH,MAAM,iBAAiB,GAAG,uBAAuB,CAAC;QAChD,YAAY,EAAE,eAAe,CAAC,QAA2B;QACzD,gBAAgB;KACjB,CAAC,CAAC;IAEH,IAAI,OAAO,GAAoB,KAAC,SAAS,OAAK,eAAe,YAAG,iBAAiB,GAAa,CAAC;IAC/F,IAAI,eAAe,CAAC,QAAQ,EAAE,CAAC;QAC7B,OAAO,GAAG,eAAe,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC;IAC1E,CAAC;IAED,OAAO,CACL,KAAC,mCAAmC,IAAC,KAAK,EAAE,oBAAoB,YAC9D,KAAC,6BAA6B,IAAC,KAAK,EAAE,cAAc,YACjD,OAAO,GACsB,GACI,CACvC,CAAC;AACJ,CAAC;AAED,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,QAAQ,EAAE;QACR,WAAW,EAAE,SAAS;QACtB,YAAY,EAAE,CAAC;QACf,WAAW,EAAE,CAAC;QACd,MAAM,EAAE,CAAC;QACT,OAAO,EAAE,CAAC;KACX;IACD,UAAU,EAAE;QACV,KAAK,EAAE,SAAS;QAChB,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,KAAK;QACjB,YAAY,EAAE,CAAC;KAChB;IACD,SAAS,EAAE;QACT,KAAK,EAAE,SAAS;QAChB,UAAU,EAAE,KAAK;KAClB;IACD,SAAS,EAAE;QACT,KAAK,EAAE,SAAS;QAChB,QAAQ,EAAE,EAAE;QACZ,SAAS,EAAE,CAAC;KACb;CACF,CAAC,CAAC","sourcesContent":["import type {\n BindingValue,\n ComponentDataBindingRegistry,\n DataSourceDiagnostic,\n DbAdapter,\n DbRealtimeAdapter,\n MediaAssetRegistry,\n StateAdapter,\n UiNode,\n} from '@ankhorage/contracts';\nimport React from 'react';\nimport { StyleSheet, Text, View } from 'react-native';\n\nimport type { ComponentRegistry } from './registry.js';\nimport {\n getUnknownComponentDiagnostic,\n resolveRenderedChildren,\n resolveRuntimeRegistry,\n} from './rendering.js';\nimport {\n type RuntimeComponentEventDispatchArgs,\n type RuntimeEventCapabilityResolver,\n wrapRuntimeEventProps,\n} from './runtimeActionRegistry.js';\nimport type { RuntimeBindingResultCache, RuntimeCapabilityExecutor } from './runtimeBindings.js';\nimport { dispatchRuntimeComponentEventWithReporting } from './runtimeEventExecution.js';\nimport {\n createRuntimeEventOperationBindingContext,\n createRuntimeEventOperationLifecycle,\n IDLE_RUNTIME_EVENT_OPERATION_STATE,\n} from './runtimeEventOperationLifecycle.js';\nimport type { RuntimeMediaAssetResolver } from './runtimeMedia.js';\nimport {\n RuntimeMediaResolutionCacheProvider,\n useRuntimeMediaResolutionCache,\n} from './runtimeMediaCache.js';\nimport { resolveRuntimeNodeProps } from './runtimeNodeProps.js';\nimport {\n mergeRuntimeRendererConfig,\n RuntimeRendererConfigProvider,\n type RuntimeRendererWrapArgs,\n useRuntimeRendererConfig,\n} from './RuntimeRendererConfig.js';\nimport {\n createRuntimeRepeatBindingContext,\n resolveRuntimeRepeatItemKey,\n resolveRuntimeRepeatItemsAsync,\n resolveRuntimeRepeatItemsSync,\n} from './runtimeRepeat.js';\nimport { createRepeatDiagnosticsKey } from './runtimeRepeatDiagnostics.js';\nimport { shouldRenderRuntimeRepeatEmptyState } from './runtimeRepeatEmptyState.js';\nimport { useRuntimeMediaProps } from './useRuntimeMediaProps.js';\nimport { useRuntimeStateBindings } from './useRuntimeStateBindings.js';\n\nexport interface RuntimeRendererProps {\n node: UiNode;\n isRoot?: boolean;\n registry?: ComponentRegistry;\n disableActions?: boolean;\n wrapNode?: (args: RuntimeRendererWrapArgs) => React.ReactNode;\n dbAdapter?: DbAdapter;\n dbRealtimeAdapter?: DbRealtimeAdapter;\n stateAdapter?: StateAdapter;\n bindingContext?: Record<string, unknown>;\n capabilityValues?: Readonly<Record<string, BindingValue | undefined>>;\n dataBindings?: ComponentDataBindingRegistry;\n mediaAssets?: MediaAssetRegistry;\n resolveMediaAsset?: RuntimeMediaAssetResolver;\n resultSlots?: RuntimeBindingResultCache;\n executeCapability?: RuntimeCapabilityExecutor;\n resolveEventCapability?: RuntimeEventCapabilityResolver;\n onDiagnostics?: (diagnostics: readonly DataSourceDiagnostic[]) => void;\n}\n\nexport function RuntimeRenderer(props: RuntimeRendererProps) {\n const {\n node,\n isRoot = false,\n registry,\n disableActions = false,\n wrapNode,\n dbAdapter,\n dbRealtimeAdapter,\n stateAdapter,\n bindingContext,\n capabilityValues,\n dataBindings,\n mediaAssets,\n resolveMediaAsset,\n resultSlots,\n executeCapability,\n resolveEventCapability,\n onDiagnostics,\n } = props;\n const inheritedConfig = useRuntimeRendererConfig();\n const [rootEventOperationState, setRootEventOperationState] = React.useState(\n IDLE_RUNTIME_EVENT_OPERATION_STATE,\n );\n const rootEventOperationLifecycle = React.useMemo(\n () => createRuntimeEventOperationLifecycle(setRootEventOperationState),\n [],\n );\n const eventOperationState = isRoot\n ? rootEventOperationState\n : inheritedConfig.eventOperationState;\n const rootBindingContext = React.useMemo(\n () =>\n mergeRuntimeRendererConfig(\n { bindingContext },\n { bindingContext: inheritedConfig.bindingContext },\n ).bindingContext,\n [bindingContext, inheritedConfig.bindingContext],\n );\n const effectiveBindingContext = React.useMemo(\n () =>\n isRoot && eventOperationState !== undefined\n ? createRuntimeEventOperationBindingContext(rootBindingContext, eventOperationState)\n : bindingContext,\n [bindingContext, eventOperationState, isRoot, rootBindingContext],\n );\n const mediaResolutionCache = useRuntimeMediaResolutionCache();\n const inheritedResultSlots = inheritedConfig.resultSlots;\n const [localResultSlots, setLocalResultSlots] = React.useState<RuntimeBindingResultCache>({});\n const writeLocalResultSlot = React.useCallback((key: string, value: BindingValue | undefined) => {\n setLocalResultSlots((currentResults) => ({\n ...currentResults,\n [key]: value,\n }));\n }, []);\n const effectiveResultSlots = React.useMemo(\n () => ({\n ...(inheritedResultSlots ?? {}),\n ...(resultSlots ?? {}),\n ...localResultSlots,\n }),\n [inheritedResultSlots, localResultSlots, resultSlots],\n );\n const explicitConfig = React.useMemo(\n () => ({\n bindingContext: effectiveBindingContext,\n capabilityValues,\n dataBindings,\n dbAdapter,\n dbRealtimeAdapter,\n disableActions,\n executeCapability,\n resolveEventCapability,\n mediaAssets,\n resultSlots: effectiveResultSlots,\n onDiagnostics,\n registry,\n resolveMediaAsset,\n stateAdapter,\n wrapNode,\n writeResultSlot: inheritedConfig.writeResultSlot ?? writeLocalResultSlot,\n eventOperationLifecycle: isRoot\n ? rootEventOperationLifecycle\n : inheritedConfig.eventOperationLifecycle,\n eventOperationState,\n }),\n [\n effectiveBindingContext,\n capabilityValues,\n dataBindings,\n dbAdapter,\n dbRealtimeAdapter,\n disableActions,\n executeCapability,\n resolveEventCapability,\n effectiveResultSlots,\n inheritedConfig.writeResultSlot,\n inheritedConfig.eventOperationLifecycle,\n isRoot,\n mediaAssets,\n onDiagnostics,\n registry,\n resolveMediaAsset,\n stateAdapter,\n wrapNode,\n writeLocalResultSlot,\n eventOperationState,\n rootEventOperationLifecycle,\n ],\n );\n const effectiveConfig = React.useMemo(\n () => mergeRuntimeRendererConfig(explicitConfig, inheritedConfig),\n [explicitConfig, inheritedConfig],\n );\n useRuntimeStateBindings({\n dataBindings: effectiveConfig.dataBindings,\n nodeId: node.id,\n repeatSource: node.repeat?.source,\n stateAdapter: effectiveConfig.stateAdapter,\n });\n const dispatchRuntimeEvent = React.useCallback(\n async (eventArgs: RuntimeComponentEventDispatchArgs) => {\n await dispatchRuntimeComponentEventWithReporting({\n ...eventArgs,\n dataBindings: eventArgs.dataBindings ?? effectiveConfig.dataBindings,\n executeCapability: eventArgs.executeCapability ?? effectiveConfig.executeCapability,\n onDiagnostics: effectiveConfig.onDiagnostics,\n resultSlots: eventArgs.resultSlots ?? effectiveConfig.resultSlots,\n writeResultSlot: eventArgs.writeResultSlot ?? effectiveConfig.writeResultSlot,\n eventOperationLifecycle:\n eventArgs.eventOperationLifecycle ?? effectiveConfig.eventOperationLifecycle,\n });\n },\n [effectiveConfig],\n );\n const effectiveRegistry = React.useMemo(\n () =>\n resolveRuntimeRegistry({\n propRegistry: registry,\n configRegistry: effectiveConfig.registry,\n }),\n [effectiveConfig.registry, registry],\n );\n const Component = effectiveRegistry[node.type];\n\n const repeatSyncResult = (() => {\n const { repeat } = node;\n if (!repeat) {\n return null;\n }\n\n return resolveRuntimeRepeatItemsSync(repeat, {\n capabilityValues: effectiveConfig.capabilityValues,\n context: effectiveConfig.bindingContext,\n dataBindings: effectiveConfig.dataBindings,\n executeCapability: effectiveConfig.executeCapability,\n node,\n resultSlots: effectiveConfig.resultSlots,\n stateAdapter: effectiveConfig.stateAdapter,\n writeResultSlot: effectiveConfig.writeResultSlot,\n });\n })();\n const repeatRequest = React.useMemo(\n () =>\n node.repeat && repeatSyncResult?.status === 'pending'\n ? {\n context: effectiveConfig.bindingContext,\n capabilityValues: effectiveConfig.capabilityValues,\n dataBindings: effectiveConfig.dataBindings,\n executeCapability: effectiveConfig.executeCapability,\n node,\n repeat: node.repeat,\n resultSlots: effectiveConfig.resultSlots,\n stateAdapter: effectiveConfig.stateAdapter,\n writeResultSlot: effectiveConfig.writeResultSlot,\n }\n : null,\n [\n node,\n repeatSyncResult?.status,\n effectiveConfig.bindingContext,\n effectiveConfig.capabilityValues,\n effectiveConfig.dataBindings,\n effectiveConfig.executeCapability,\n effectiveConfig.resultSlots,\n effectiveConfig.stateAdapter,\n effectiveConfig.writeResultSlot,\n ],\n );\n const repeatRequestToken = React.useMemo(() => (repeatRequest ? {} : null), [repeatRequest]);\n const [asyncRepeatResult, setAsyncRepeatResult] = React.useState<{\n readonly requestToken: object;\n readonly items: readonly BindingValue[];\n readonly diagnostics: readonly DataSourceDiagnostic[];\n } | null>(null);\n const repeatRequestIdRef = React.useRef(0);\n const lastRepeatDiagnosticsKeyRef = React.useRef<string | null>(null);\n\n React.useEffect(() => {\n repeatRequestIdRef.current += 1;\n const requestId = repeatRequestIdRef.current;\n if (repeatRequest === null || repeatRequestToken === null) {\n return undefined;\n }\n\n void (async () => {\n const result = await resolveRuntimeRepeatItemsAsync(repeatRequest.repeat, {\n capabilityValues: repeatRequest.capabilityValues,\n context: repeatRequest.context,\n dataBindings: repeatRequest.dataBindings,\n executeCapability: repeatRequest.executeCapability,\n node: repeatRequest.node,\n resultSlots: repeatRequest.resultSlots,\n stateAdapter: repeatRequest.stateAdapter,\n writeResultSlot: repeatRequest.writeResultSlot,\n });\n\n if (repeatRequestIdRef.current !== requestId) {\n return;\n }\n\n setAsyncRepeatResult({ ...result, requestToken: repeatRequestToken });\n })();\n\n return () => {\n repeatRequestIdRef.current += 1;\n };\n }, [repeatRequest, repeatRequestToken]);\n const currentAsyncRepeatResult =\n asyncRepeatResult?.requestToken === repeatRequestToken ? asyncRepeatResult : null;\n const repeatDiagnostics =\n repeatSyncResult?.status === 'ready'\n ? repeatSyncResult.diagnostics\n : currentAsyncRepeatResult?.diagnostics;\n\n React.useEffect(() => {\n if (!node.repeat || repeatDiagnostics === undefined) {\n return;\n }\n\n const diagnosticsKey = createRepeatDiagnosticsKey(node.id, repeatDiagnostics);\n if (lastRepeatDiagnosticsKeyRef.current === diagnosticsKey) {\n return;\n }\n\n lastRepeatDiagnosticsKeyRef.current = diagnosticsKey;\n effectiveConfig.onDiagnostics?.(repeatDiagnostics);\n }, [effectiveConfig, node, repeatDiagnostics]);\n\n const bindingResolvedProps = resolveRuntimeNodeProps({\n bindingContext: effectiveConfig.bindingContext,\n capabilityValues: effectiveConfig.capabilityValues,\n dataBindings: effectiveConfig.dataBindings,\n dbAdapter: effectiveConfig.dbAdapter,\n dbRealtimeAdapter: effectiveConfig.dbRealtimeAdapter,\n node,\n resultSlots: effectiveConfig.resultSlots,\n stateAdapter: effectiveConfig.stateAdapter,\n });\n const mediaResolvedProps = useRuntimeMediaProps({\n cache: mediaResolutionCache,\n mediaAssets: effectiveConfig.mediaAssets,\n props: bindingResolvedProps,\n resolveMediaAsset: effectiveConfig.resolveMediaAsset,\n });\n const resolvedProps = effectiveConfig.resolveNodeProps\n ? effectiveConfig.resolveNodeProps({ node, props: mediaResolvedProps })\n : mediaResolvedProps;\n\n if (!Component) {\n const diagnostic = getUnknownComponentDiagnostic(node.type, effectiveRegistry);\n return (\n <View style={styles.errorBox}>\n <Text style={styles.errorTitle}>{diagnostic.title}</Text>\n <Text style={styles.errorText}>{diagnostic.suggestion}</Text>\n <Text style={styles.errorMeta}>{diagnostic.detail}</Text>\n </View>\n );\n }\n\n const repeatItems =\n repeatSyncResult?.status === 'ready' ? repeatSyncResult.items : currentAsyncRepeatResult?.items;\n const shouldRenderRepeatEmptyState = shouldRenderRuntimeRepeatEmptyState({\n diagnostics: repeatDiagnostics,\n items: repeatItems,\n status:\n repeatSyncResult?.status === 'ready'\n ? 'ready'\n : repeatSyncResult?.status === 'pending'\n ? 'pending'\n : currentAsyncRepeatResult\n ? 'ready'\n : undefined,\n });\n const renderedChildren = node.repeat\n ? repeatItems && repeatItems.length > 0\n ? repeatItems.flatMap((item, itemIndex) =>\n (node.children ?? []).map((child) => {\n const itemAlias = node.repeat?.itemAlias ?? 'item';\n const repeatKey = resolveRuntimeRepeatItemKey({\n item,\n itemAlias,\n index: itemIndex,\n keyPath: node.repeat?.keyPath,\n });\n\n return (\n <RuntimeRenderer\n key={`${child.id}:${String(repeatKey)}`}\n node={child}\n registry={effectiveRegistry}\n bindingContext={createRuntimeRepeatBindingContext({\n baseContext: effectiveConfig.bindingContext,\n item,\n itemAlias,\n })}\n />\n );\n }),\n )\n : shouldRenderRepeatEmptyState\n ? node.repeat.empty?.map((child) => (\n <RuntimeRenderer key={child.id} node={child} registry={effectiveRegistry} />\n ))\n : undefined\n : node.children?.map((child) => (\n <RuntimeRenderer key={child.id} node={child} registry={effectiveRegistry} />\n ));\n\n const propsWithEvents = wrapRuntimeEventProps({\n context: effectiveConfig.bindingContext,\n dataBindings: effectiveConfig.dataBindings,\n props: resolvedProps,\n disableActions: effectiveConfig.disableActions === true,\n dispatchComponentEvent: dispatchRuntimeEvent,\n node,\n resultSlots: effectiveConfig.resultSlots,\n resolveEventCapability: effectiveConfig.resolveEventCapability,\n });\n\n const componentChildren = resolveRenderedChildren({\n propChildren: propsWithEvents.children as React.ReactNode,\n renderedChildren,\n });\n\n let content: React.ReactNode = <Component {...propsWithEvents}>{componentChildren}</Component>;\n if (effectiveConfig.wrapNode) {\n content = effectiveConfig.wrapNode({ node, rendered: content, isRoot });\n }\n\n return (\n <RuntimeMediaResolutionCacheProvider value={mediaResolutionCache}>\n <RuntimeRendererConfigProvider value={explicitConfig}>\n {content}\n </RuntimeRendererConfigProvider>\n </RuntimeMediaResolutionCacheProvider>\n );\n}\n\nconst styles = StyleSheet.create({\n errorBox: {\n borderColor: '#ef4444',\n borderRadius: 8,\n borderWidth: 1,\n margin: 8,\n padding: 8,\n },\n errorTitle: {\n color: '#991b1b',\n fontSize: 13,\n fontWeight: '700',\n marginBottom: 4,\n },\n errorText: {\n color: '#ef4444',\n fontWeight: '600',\n },\n errorMeta: {\n color: '#7f1d1d',\n fontSize: 12,\n marginTop: 4,\n },\n});\n"]}
|
|
1
|
+
{"version":3,"file":"RuntimeRenderer.js","sourceRoot":"","sources":["../src/RuntimeRenderer.tsx"],"names":[],"mappings":";AAUA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAGtD,OAAO,EACL,6BAA6B,EAC7B,uBAAuB,EACvB,sBAAsB,GACvB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAGL,qBAAqB,GACtB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,0CAA0C,EAAE,MAAM,4BAA4B,CAAC;AACxF,OAAO,EACL,yCAAyC,EACzC,oCAAoC,EACpC,kCAAkC,GACnC,MAAM,qCAAqC,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AAiB,GAAG,uBAAuB,CAAC;QAChD,YAAY,EAAE,eAAe,CAAC,QAA2B;QACzD,gBAAgB;KACjB,CAAC,CAAC;IAEH,IAAI,OAAO,GAAoB,KAAC,SAAS,OAAK,eAAe,YAAG,iBAAiB,GAAa,CAAC;IAC/F,IAAI,eAAe,CAAC,QAAQ,EAAE,CAAC;QAC7B,OAAO,GAAG,eAAe,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC;IAC1E,CAAC;IAED,OAAO,CACL,KAAC,mCAAmC,IAAC,KAAK,EAAE,oBAAoB,YAC9D,KAAC,6BAA6B,IAAC,KAAK,EAAE,cAAc,YACjD,OAAO,GACsB,GACI,CACvC,CAAC;AACJ,CAAC;AAED,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,QAAQ,EAAE;QACR,WAAW,EAAE,SAAS;QACtB,YAAY,EAAE,CAAC;QACf,WAAW,EAAE,CAAC;QACd,MAAM,EAAE,CAAC;QACT,OAAO,EAAE,CAAC;KACX;IACD,UAAU,EAAE;QACV,KAAK,EAAE,SAAS;QAChB,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,KAAK;QACjB,YAAY,EAAE,CAAC;KAChB;IACD,SAAS,EAAE;QACT,KAAK,EAAE,SAAS;QAChB,UAAU,EAAE,KAAK;KAClB;IACD,SAAS,EAAE;QACT,KAAK,EAAE,SAAS;QAChB,QAAQ,EAAE,EAAE;QACZ,SAAS,EAAE,CAAC;KACb;CACF,CAAC,CAAC","sourcesContent":["import type {\n BindingValue,\n ComponentDataBindingRegistry,\n DataSourceDiagnostic,\n DbAdapter,\n DbRealtimeAdapter,\n MediaAssetRegistry,\n StateAdapter,\n UiNode,\n} from '@ankhorage/contracts';\nimport React from 'react';\nimport { StyleSheet, Text, View } from 'react-native';\n\nimport type { ComponentRegistry } from './registry.js';\nimport {\n getUnknownComponentDiagnostic,\n resolveRenderedChildren,\n resolveRuntimeRegistry,\n} from './rendering.js';\nimport {\n type RuntimeComponentEventDispatchArgs,\n type RuntimeEventCapabilityResolver,\n wrapRuntimeEventProps,\n} from './runtimeActionRegistry.js';\nimport type { RuntimeBindingResultCache, RuntimeCapabilityExecutor } from './runtimeBindings.js';\nimport { dispatchRuntimeComponentEventWithReporting } from './runtimeEventExecution.js';\nimport {\n createRuntimeEventOperationBindingContext,\n createRuntimeEventOperationLifecycle,\n IDLE_RUNTIME_EVENT_OPERATION_STATE,\n} from './runtimeEventOperationLifecycle.js';\nimport type { RuntimeMediaAssetResolver } from './runtimeMedia.js';\nimport {\n RuntimeMediaResolutionCacheProvider,\n useRuntimeMediaResolutionCache,\n} from './runtimeMediaCache.js';\nimport { resolveRuntimeNodeProps } from './runtimeNodeProps.js';\nimport {\n mergeRuntimeRendererConfig,\n RuntimeRendererConfigProvider,\n type RuntimeRendererWrapArgs,\n useRuntimeRendererConfig,\n} from './RuntimeRendererConfig.js';\nimport {\n createRuntimeRepeatBindingContext,\n resolveRuntimeRepeatItemKey,\n resolveRuntimeRepeatItemsAsync,\n resolveRuntimeRepeatItemsSync,\n} from './runtimeRepeat.js';\nimport { createRepeatDiagnosticsKey } from './runtimeRepeatDiagnostics.js';\nimport { shouldRenderRuntimeRepeatEmptyState } from './runtimeRepeatEmptyState.js';\nimport { useRuntimeMediaProps } from './useRuntimeMediaProps.js';\nimport { useRuntimeStateBindings } from './useRuntimeStateBindings.js';\n\nexport interface RuntimeRendererProps {\n node: UiNode;\n isRoot?: boolean;\n registry?: ComponentRegistry;\n disableActions?: boolean;\n wrapNode?: (args: RuntimeRendererWrapArgs) => React.ReactNode;\n dbAdapter?: DbAdapter;\n dbRealtimeAdapter?: DbRealtimeAdapter;\n stateAdapter?: StateAdapter;\n bindingContext?: Record<string, unknown>;\n capabilityValues?: Readonly<Record<string, BindingValue | undefined>>;\n dataBindings?: ComponentDataBindingRegistry;\n mediaAssets?: MediaAssetRegistry;\n resolveMediaAsset?: RuntimeMediaAssetResolver;\n resultSlots?: RuntimeBindingResultCache;\n executeCapability?: RuntimeCapabilityExecutor;\n resolveEventCapability?: RuntimeEventCapabilityResolver;\n onDiagnostics?: (diagnostics: readonly DataSourceDiagnostic[]) => void;\n}\n\nexport function RuntimeRenderer(props: RuntimeRendererProps) {\n const {\n node,\n isRoot = false,\n registry,\n disableActions = false,\n wrapNode,\n dbAdapter,\n dbRealtimeAdapter,\n stateAdapter,\n bindingContext,\n capabilityValues,\n dataBindings,\n mediaAssets,\n resolveMediaAsset,\n resultSlots,\n executeCapability,\n resolveEventCapability,\n onDiagnostics,\n } = props;\n const inheritedConfig = useRuntimeRendererConfig();\n const [rootEventOperationState, setRootEventOperationState] = React.useState(\n IDLE_RUNTIME_EVENT_OPERATION_STATE,\n );\n const rootEventOperationLifecycle = React.useMemo(\n () => createRuntimeEventOperationLifecycle(setRootEventOperationState),\n [],\n );\n const eventOperationState = isRoot\n ? rootEventOperationState\n : inheritedConfig.eventOperationState;\n const rootBindingContext = React.useMemo(\n () =>\n mergeRuntimeRendererConfig(\n { bindingContext },\n { bindingContext: inheritedConfig.bindingContext },\n ).bindingContext,\n [bindingContext, inheritedConfig.bindingContext],\n );\n const effectiveBindingContext = React.useMemo(\n () =>\n isRoot && eventOperationState !== undefined\n ? createRuntimeEventOperationBindingContext(rootBindingContext, eventOperationState)\n : bindingContext,\n [bindingContext, eventOperationState, isRoot, rootBindingContext],\n );\n const mediaResolutionCache = useRuntimeMediaResolutionCache();\n const inheritedResultSlots = inheritedConfig.resultSlots;\n const [localResultSlots, setLocalResultSlots] = React.useState<RuntimeBindingResultCache>({});\n const writeLocalResultSlot = React.useCallback((key: string, value: BindingValue | undefined) => {\n setLocalResultSlots((currentResults) => ({\n ...currentResults,\n [key]: value,\n }));\n }, []);\n const effectiveResultSlots = React.useMemo(\n () => ({\n ...(inheritedResultSlots ?? {}),\n ...(resultSlots ?? {}),\n ...localResultSlots,\n }),\n [inheritedResultSlots, localResultSlots, resultSlots],\n );\n const explicitConfig = React.useMemo(\n () => ({\n bindingContext: effectiveBindingContext,\n capabilityValues,\n dataBindings,\n dbAdapter,\n dbRealtimeAdapter,\n disableActions,\n executeCapability,\n resolveEventCapability,\n mediaAssets,\n resultSlots: effectiveResultSlots,\n onDiagnostics,\n registry,\n resolveMediaAsset,\n stateAdapter,\n wrapNode,\n writeResultSlot: inheritedConfig.writeResultSlot ?? writeLocalResultSlot,\n eventOperationLifecycle: isRoot\n ? rootEventOperationLifecycle\n : inheritedConfig.eventOperationLifecycle,\n eventOperationState,\n }),\n [\n effectiveBindingContext,\n capabilityValues,\n dataBindings,\n dbAdapter,\n dbRealtimeAdapter,\n disableActions,\n executeCapability,\n resolveEventCapability,\n effectiveResultSlots,\n inheritedConfig.writeResultSlot,\n inheritedConfig.eventOperationLifecycle,\n isRoot,\n mediaAssets,\n onDiagnostics,\n registry,\n resolveMediaAsset,\n stateAdapter,\n wrapNode,\n writeLocalResultSlot,\n eventOperationState,\n rootEventOperationLifecycle,\n ],\n );\n const effectiveConfig = React.useMemo(\n () => mergeRuntimeRendererConfig(explicitConfig, inheritedConfig),\n [explicitConfig, inheritedConfig],\n );\n useRuntimeStateBindings({\n dataBindings: effectiveConfig.dataBindings,\n nodeId: node.id,\n repeatSource: node.repeat?.source,\n stateAdapter: effectiveConfig.stateAdapter,\n });\n const dispatchRuntimeEvent = React.useCallback(\n async (eventArgs: RuntimeComponentEventDispatchArgs) => {\n await dispatchRuntimeComponentEventWithReporting({\n ...eventArgs,\n dataBindings: eventArgs.dataBindings ?? effectiveConfig.dataBindings,\n executeCapability: eventArgs.executeCapability ?? effectiveConfig.executeCapability,\n onDiagnostics: effectiveConfig.onDiagnostics,\n resultSlots: eventArgs.resultSlots ?? effectiveConfig.resultSlots,\n stateAdapter: eventArgs.stateAdapter ?? effectiveConfig.stateAdapter,\n writeResultSlot: eventArgs.writeResultSlot ?? effectiveConfig.writeResultSlot,\n eventOperationLifecycle:\n eventArgs.eventOperationLifecycle ?? effectiveConfig.eventOperationLifecycle,\n });\n },\n [effectiveConfig],\n );\n const effectiveRegistry = React.useMemo(\n () =>\n resolveRuntimeRegistry({\n propRegistry: registry,\n configRegistry: effectiveConfig.registry,\n }),\n [effectiveConfig.registry, registry],\n );\n const Component = effectiveRegistry[node.type];\n\n const repeatSyncResult = (() => {\n const { repeat } = node;\n if (!repeat) {\n return null;\n }\n\n return resolveRuntimeRepeatItemsSync(repeat, {\n capabilityValues: effectiveConfig.capabilityValues,\n context: effectiveConfig.bindingContext,\n dataBindings: effectiveConfig.dataBindings,\n executeCapability: effectiveConfig.executeCapability,\n node,\n resultSlots: effectiveConfig.resultSlots,\n stateAdapter: effectiveConfig.stateAdapter,\n writeResultSlot: effectiveConfig.writeResultSlot,\n });\n })();\n const repeatRequest = React.useMemo(\n () =>\n node.repeat && repeatSyncResult?.status === 'pending'\n ? {\n context: effectiveConfig.bindingContext,\n capabilityValues: effectiveConfig.capabilityValues,\n dataBindings: effectiveConfig.dataBindings,\n executeCapability: effectiveConfig.executeCapability,\n node,\n repeat: node.repeat,\n resultSlots: effectiveConfig.resultSlots,\n stateAdapter: effectiveConfig.stateAdapter,\n writeResultSlot: effectiveConfig.writeResultSlot,\n }\n : null,\n [\n node,\n repeatSyncResult?.status,\n effectiveConfig.bindingContext,\n effectiveConfig.capabilityValues,\n effectiveConfig.dataBindings,\n effectiveConfig.executeCapability,\n effectiveConfig.resultSlots,\n effectiveConfig.stateAdapter,\n effectiveConfig.writeResultSlot,\n ],\n );\n const repeatRequestToken = React.useMemo(() => (repeatRequest ? {} : null), [repeatRequest]);\n const [asyncRepeatResult, setAsyncRepeatResult] = React.useState<{\n readonly requestToken: object;\n readonly items: readonly BindingValue[];\n readonly diagnostics: readonly DataSourceDiagnostic[];\n } | null>(null);\n const repeatRequestIdRef = React.useRef(0);\n const lastRepeatDiagnosticsKeyRef = React.useRef<string | null>(null);\n\n React.useEffect(() => {\n repeatRequestIdRef.current += 1;\n const requestId = repeatRequestIdRef.current;\n if (repeatRequest === null || repeatRequestToken === null) {\n return undefined;\n }\n\n void (async () => {\n const result = await resolveRuntimeRepeatItemsAsync(repeatRequest.repeat, {\n capabilityValues: repeatRequest.capabilityValues,\n context: repeatRequest.context,\n dataBindings: repeatRequest.dataBindings,\n executeCapability: repeatRequest.executeCapability,\n node: repeatRequest.node,\n resultSlots: repeatRequest.resultSlots,\n stateAdapter: repeatRequest.stateAdapter,\n writeResultSlot: repeatRequest.writeResultSlot,\n });\n\n if (repeatRequestIdRef.current !== requestId) {\n return;\n }\n\n setAsyncRepeatResult({ ...result, requestToken: repeatRequestToken });\n })();\n\n return () => {\n repeatRequestIdRef.current += 1;\n };\n }, [repeatRequest, repeatRequestToken]);\n const currentAsyncRepeatResult =\n asyncRepeatResult?.requestToken === repeatRequestToken ? asyncRepeatResult : null;\n const repeatDiagnostics =\n repeatSyncResult?.status === 'ready'\n ? repeatSyncResult.diagnostics\n : currentAsyncRepeatResult?.diagnostics;\n\n React.useEffect(() => {\n if (!node.repeat || repeatDiagnostics === undefined) {\n return;\n }\n\n const diagnosticsKey = createRepeatDiagnosticsKey(node.id, repeatDiagnostics);\n if (lastRepeatDiagnosticsKeyRef.current === diagnosticsKey) {\n return;\n }\n\n lastRepeatDiagnosticsKeyRef.current = diagnosticsKey;\n effectiveConfig.onDiagnostics?.(repeatDiagnostics);\n }, [effectiveConfig, node, repeatDiagnostics]);\n\n const bindingResolvedProps = resolveRuntimeNodeProps({\n bindingContext: effectiveConfig.bindingContext,\n capabilityValues: effectiveConfig.capabilityValues,\n dataBindings: effectiveConfig.dataBindings,\n dbAdapter: effectiveConfig.dbAdapter,\n dbRealtimeAdapter: effectiveConfig.dbRealtimeAdapter,\n node,\n resultSlots: effectiveConfig.resultSlots,\n stateAdapter: effectiveConfig.stateAdapter,\n });\n const mediaResolvedProps = useRuntimeMediaProps({\n cache: mediaResolutionCache,\n mediaAssets: effectiveConfig.mediaAssets,\n props: bindingResolvedProps,\n resolveMediaAsset: effectiveConfig.resolveMediaAsset,\n });\n const resolvedProps = effectiveConfig.resolveNodeProps\n ? effectiveConfig.resolveNodeProps({ node, props: mediaResolvedProps })\n : mediaResolvedProps;\n\n if (!Component) {\n const diagnostic = getUnknownComponentDiagnostic(node.type, effectiveRegistry);\n return (\n <View style={styles.errorBox}>\n <Text style={styles.errorTitle}>{diagnostic.title}</Text>\n <Text style={styles.errorText}>{diagnostic.suggestion}</Text>\n <Text style={styles.errorMeta}>{diagnostic.detail}</Text>\n </View>\n );\n }\n\n const repeatItems =\n repeatSyncResult?.status === 'ready' ? repeatSyncResult.items : currentAsyncRepeatResult?.items;\n const shouldRenderRepeatEmptyState = shouldRenderRuntimeRepeatEmptyState({\n diagnostics: repeatDiagnostics,\n items: repeatItems,\n status:\n repeatSyncResult?.status === 'ready'\n ? 'ready'\n : repeatSyncResult?.status === 'pending'\n ? 'pending'\n : currentAsyncRepeatResult\n ? 'ready'\n : undefined,\n });\n const renderedChildren = node.repeat\n ? repeatItems && repeatItems.length > 0\n ? repeatItems.flatMap((item, itemIndex) =>\n (node.children ?? []).map((child) => {\n const itemAlias = node.repeat?.itemAlias ?? 'item';\n const repeatKey = resolveRuntimeRepeatItemKey({\n item,\n itemAlias,\n index: itemIndex,\n keyPath: node.repeat?.keyPath,\n });\n\n return (\n <RuntimeRenderer\n key={`${child.id}:${String(repeatKey)}`}\n node={child}\n registry={effectiveRegistry}\n bindingContext={createRuntimeRepeatBindingContext({\n baseContext: effectiveConfig.bindingContext,\n item,\n itemAlias,\n })}\n />\n );\n }),\n )\n : shouldRenderRepeatEmptyState\n ? node.repeat.empty?.map((child) => (\n <RuntimeRenderer key={child.id} node={child} registry={effectiveRegistry} />\n ))\n : undefined\n : node.children?.map((child) => (\n <RuntimeRenderer key={child.id} node={child} registry={effectiveRegistry} />\n ));\n\n const propsWithEvents = wrapRuntimeEventProps({\n context: effectiveConfig.bindingContext,\n dataBindings: effectiveConfig.dataBindings,\n props: resolvedProps,\n disableActions: effectiveConfig.disableActions === true,\n dispatchComponentEvent: dispatchRuntimeEvent,\n node,\n resultSlots: effectiveConfig.resultSlots,\n resolveEventCapability: effectiveConfig.resolveEventCapability,\n });\n\n const componentChildren = resolveRenderedChildren({\n propChildren: propsWithEvents.children as React.ReactNode,\n renderedChildren,\n });\n\n let content: React.ReactNode = <Component {...propsWithEvents}>{componentChildren}</Component>;\n if (effectiveConfig.wrapNode) {\n content = effectiveConfig.wrapNode({ node, rendered: content, isRoot });\n }\n\n return (\n <RuntimeMediaResolutionCacheProvider value={mediaResolutionCache}>\n <RuntimeRendererConfigProvider value={explicitConfig}>\n {content}\n </RuntimeRendererConfigProvider>\n </RuntimeMediaResolutionCacheProvider>\n );\n}\n\nconst styles = StyleSheet.create({\n errorBox: {\n borderColor: '#ef4444',\n borderRadius: 8,\n borderWidth: 1,\n margin: 8,\n padding: 8,\n },\n errorTitle: {\n color: '#991b1b',\n fontSize: 13,\n fontWeight: '700',\n marginBottom: 4,\n },\n errorText: {\n color: '#ef4444',\n fontWeight: '600',\n },\n errorMeta: {\n color: '#7f1d1d',\n fontSize: 12,\n marginTop: 4,\n },\n});\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { BindingExpression, BindingValue, ComponentDataBindingRegistry, ComponentEventDto, DataSourceDiagnostic, UiNode } from '@ankhorage/contracts';
|
|
2
2
|
import type { Capability } from '@ankhorage/contracts/capability';
|
|
3
|
-
import { type RuntimeBindingResultCache, type RuntimeBindingResultWriter, type RuntimeCapabilityExecutor } from './runtimeBindings.js';
|
|
3
|
+
import { type RuntimeBindingResolutionContext, type RuntimeBindingResultCache, type RuntimeBindingResultWriter, type RuntimeCapabilityExecutor } from './runtimeBindings.js';
|
|
4
4
|
import { type RuntimeEventOperationLifecycle } from './runtimeEventOperationLifecycle.js';
|
|
5
5
|
type RuntimeEventPayload = Record<string, unknown>;
|
|
6
6
|
export type RuntimeEventCapabilityResolver = (args: {
|
|
@@ -24,6 +24,7 @@ export interface RuntimeComponentEventDispatchArgs extends RuntimeActionResoluti
|
|
|
24
24
|
readonly eventName?: string;
|
|
25
25
|
readonly dataBindings?: ComponentDataBindingRegistry;
|
|
26
26
|
readonly executeCapability?: RuntimeCapabilityExecutor;
|
|
27
|
+
readonly stateAdapter?: RuntimeBindingResolutionContext['stateAdapter'];
|
|
27
28
|
readonly writeResultSlot?: RuntimeBindingResultWriter;
|
|
28
29
|
readonly eventOperationLifecycle?: RuntimeEventOperationLifecycle;
|
|
29
30
|
}
|
|
@@ -36,7 +37,7 @@ export interface RuntimeEventPropWrapArgs extends RuntimeActionResolutionScope {
|
|
|
36
37
|
readonly resolveEventCapability?: RuntimeEventCapabilityResolver;
|
|
37
38
|
}
|
|
38
39
|
/*** Creates a registry that dispatches every authored event through one capability executor. */
|
|
39
|
-
export declare function createRuntimeActionRegistry(options?: Pick<RuntimeComponentEventDispatchArgs, 'dataBindings' | 'eventOperationLifecycle' | 'executeCapability' | 'resultSlots' | 'writeResultSlot'>): RuntimeActionRegistry;
|
|
40
|
+
export declare function createRuntimeActionRegistry(options?: Pick<RuntimeComponentEventDispatchArgs, 'dataBindings' | 'eventOperationLifecycle' | 'executeCapability' | 'resultSlots' | 'stateAdapter' | 'writeResultSlot'>): RuntimeActionRegistry;
|
|
40
41
|
/*** Executes every matching event invocation through the canonical capability path. */
|
|
41
42
|
export declare function dispatchRuntimeComponentEvent(args: RuntimeComponentEventDispatchArgs): Promise<readonly DataSourceDiagnostic[]>;
|
|
42
43
|
/*** Wraps component callbacks so manifest event bindings retain the original callback behavior. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtimeActionRegistry.d.ts","sourceRoot":"","sources":["../src/runtimeActionRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,iBAAiB,EACjB,YAAY,EACZ,4BAA4B,EAC5B,iBAAiB,EACjB,oBAAoB,EACpB,MAAM,EACP,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAA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AgB,yBAAyB,CACvC,KAAK,EAAE,iBAAiB,EACxB,IAAI,EAAE,2BAA2B,GAChC,YAAY,GAAG,SAAS,CAE1B"}
|
|
@@ -23,6 +23,7 @@ export async function dispatchRuntimeComponentEvent(args) {
|
|
|
23
23
|
event: args.event,
|
|
24
24
|
executeCapability: args.executeCapability,
|
|
25
25
|
resultSlots,
|
|
26
|
+
stateAdapter: args.stateAdapter,
|
|
26
27
|
writeResultSlot: (slot, value) => {
|
|
27
28
|
resultSlots[slot] = value;
|
|
28
29
|
args.writeResultSlot?.(slot, value);
|
|
@@ -1 +1 @@
|
|
|
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,GAIpC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,wCAAwC,GAEzC,MAAM,qCAAqC,CAAC;AA6C7C,gGAAgG;AAChG,MAAM,UAAU,2BAA2B,CACzC,UAOI,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,C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C,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,EAAE;YAC3B,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC;IACf,CAAC;IACD,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;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 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 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 | '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 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,E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AC,CAAC,EAAE,IAAI,EAAE,CAAC;IACf,CAAC;IACD,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;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 === '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.7.
|
|
3
|
+
"version": "5.7.8",
|
|
4
4
|
"description": "Platform-neutral runtime renderer, contracts, and helpers for Ankhorage generated apps.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"engines": {
|
|
@@ -334,7 +334,7 @@
|
|
|
334
334
|
"@ankhorage/capability": "^0.2.3",
|
|
335
335
|
"@ankhorage/contracts": "^27.0.1",
|
|
336
336
|
"@ankhorage/data-sources": "^2.4.0",
|
|
337
|
-
"@ankhorage/flow": "^0.
|
|
337
|
+
"@ankhorage/flow": "^0.12.0",
|
|
338
338
|
"@ankhorage/utility": "^1.11.0"
|
|
339
339
|
},
|
|
340
340
|
"peerDependencies": {
|
|
@@ -348,7 +348,7 @@
|
|
|
348
348
|
}
|
|
349
349
|
},
|
|
350
350
|
"devDependencies": {
|
|
351
|
-
"@ankhorage/devtools": "^2.12.
|
|
351
|
+
"@ankhorage/devtools": "^2.12.18",
|
|
352
352
|
"@ankhorage/paradox": "^0.6.2",
|
|
353
353
|
"@types/bun": "^1.4.5",
|
|
354
354
|
"@types/node": "^26.6.4",
|
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.7.
|
|
2
|
-
<title>npm: v5.7.
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="90" height="20" role="img" aria-label="npm: v5.7.8">
|
|
2
|
+
<title>npm: v5.7.8</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.7.
|
|
6
|
+
<text x="64" y="14" fill="#ffffff" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" font-size="11" text-anchor="middle">v5.7.8</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_runtimeStateAdapter_ts
|
|
62
63
|
module_src_runtimeActionRegistry_ts["src/runtimeActionRegistry.ts"]
|
|
63
64
|
package__ankhorage_runtime -.-> module_src_runtimeActionRegistry_ts
|
|
64
65
|
module_src_runtimeActionRegistry_ts --> module_src_runtimeBindings_ts
|
|
@@ -86,6 +86,7 @@ graph LR
|
|
|
86
86
|
module_src_rendering_test_ts --> module_src_rendering_ts
|
|
87
87
|
module_src_rendering_ts --> module_src_registry_tsx
|
|
88
88
|
module_src_runtimeActionRegistry_test_ts --> module_src_runtimeActionRegistry_ts
|
|
89
|
+
module_src_runtimeActionRegistry_test_ts --> module_src_runtimeStateAdapter_ts
|
|
89
90
|
module_src_runtimeActionRegistry_ts --> module_src_runtimeBindings_ts
|
|
90
91
|
module_src_runtimeActionRegistry_ts --> module_src_runtimeEventOperationLifecycle_ts
|
|
91
92
|
module_src_runtimeApiCapabilities_test_ts --> module_src_runtimeApiCapabilities_ts
|
package/paradox/exports.json
CHANGED
|
@@ -293,7 +293,7 @@
|
|
|
293
293
|
"modulePath": "src/runtimeActionRegistry.ts",
|
|
294
294
|
"sourceLocation": {
|
|
295
295
|
"filePath": "src/runtimeActionRegistry.ts",
|
|
296
|
-
"line":
|
|
296
|
+
"line": 187,
|
|
297
297
|
"column": 1
|
|
298
298
|
},
|
|
299
299
|
"exportPaths": [
|
|
@@ -403,7 +403,7 @@
|
|
|
403
403
|
"modulePath": "src/runtimeActionRegistry.ts",
|
|
404
404
|
"sourceLocation": {
|
|
405
405
|
"filePath": "src/runtimeActionRegistry.ts",
|
|
406
|
-
"line":
|
|
406
|
+
"line": 71,
|
|
407
407
|
"column": 1
|
|
408
408
|
},
|
|
409
409
|
"exportPaths": [
|
|
@@ -415,11 +415,11 @@
|
|
|
415
415
|
],
|
|
416
416
|
"signatures": [
|
|
417
417
|
{
|
|
418
|
-
"label": "(options?: Pick<RuntimeComponentEventDispatchArgs, \"dataBindings\" | \"eventOperationLifecycle\" | \"executeCapability\" | \"resultSlots\" | \"writeResultSlot\">) => RuntimeActionRegistry",
|
|
418
|
+
"label": "(options?: Pick<RuntimeComponentEventDispatchArgs, \"stateAdapter\" | \"dataBindings\" | \"eventOperationLifecycle\" | \"executeCapability\" | \"resultSlots\" | \"writeResultSlot\">) => RuntimeActionRegistry",
|
|
419
419
|
"parameters": [
|
|
420
420
|
{
|
|
421
421
|
"name": "options",
|
|
422
|
-
"type": "Pick<RuntimeComponentEventDispatchArgs, \"dataBindings\" | \"eventOperationLifecycle\" | \"executeCapability\" | \"resultSlots\" | \"writeResultSlot\">",
|
|
422
|
+
"type": "Pick<RuntimeComponentEventDispatchArgs, \"stateAdapter\" | \"dataBindings\" | \"eventOperationLifecycle\" | \"executeCapability\" | \"resultSlots\" | \"writeResultSlot\">",
|
|
423
423
|
"required": false,
|
|
424
424
|
"description": null
|
|
425
425
|
}
|
|
@@ -708,7 +708,7 @@
|
|
|
708
708
|
"modulePath": "src/runtimeActionRegistry.ts",
|
|
709
709
|
"sourceLocation": {
|
|
710
710
|
"filePath": "src/runtimeActionRegistry.ts",
|
|
711
|
-
"line":
|
|
711
|
+
"line": 90,
|
|
712
712
|
"column": 1
|
|
713
713
|
},
|
|
714
714
|
"exportPaths": [
|
|
@@ -1143,7 +1143,7 @@
|
|
|
1143
1143
|
"modulePath": "src/runtimeActionRegistry.ts",
|
|
1144
1144
|
"sourceLocation": {
|
|
1145
1145
|
"filePath": "src/runtimeActionRegistry.ts",
|
|
1146
|
-
"line":
|
|
1146
|
+
"line": 201,
|
|
1147
1147
|
"column": 1
|
|
1148
1148
|
},
|
|
1149
1149
|
"exportPaths": [
|
|
@@ -1626,7 +1626,7 @@
|
|
|
1626
1626
|
"modulePath": "src/runtimeActionRegistry.ts",
|
|
1627
1627
|
"sourceLocation": {
|
|
1628
1628
|
"filePath": "src/runtimeActionRegistry.ts",
|
|
1629
|
-
"line":
|
|
1629
|
+
"line": 34,
|
|
1630
1630
|
"column": 1
|
|
1631
1631
|
},
|
|
1632
1632
|
"exportPaths": [
|
|
@@ -1658,7 +1658,7 @@
|
|
|
1658
1658
|
"modulePath": "src/runtimeActionRegistry.ts",
|
|
1659
1659
|
"sourceLocation": {
|
|
1660
1660
|
"filePath": "src/runtimeActionRegistry.ts",
|
|
1661
|
-
"line":
|
|
1661
|
+
"line": 44,
|
|
1662
1662
|
"column": 1
|
|
1663
1663
|
},
|
|
1664
1664
|
"exportPaths": [
|
|
@@ -1709,7 +1709,7 @@
|
|
|
1709
1709
|
"modulePath": "src/runtimeActionRegistry.ts",
|
|
1710
1710
|
"sourceLocation": {
|
|
1711
1711
|
"filePath": "src/runtimeActionRegistry.ts",
|
|
1712
|
-
"line":
|
|
1712
|
+
"line": 38,
|
|
1713
1713
|
"column": 1
|
|
1714
1714
|
},
|
|
1715
1715
|
"exportPaths": [
|
|
@@ -2668,7 +2668,7 @@
|
|
|
2668
2668
|
"modulePath": "src/runtimeActionRegistry.ts",
|
|
2669
2669
|
"sourceLocation": {
|
|
2670
2670
|
"filePath": "src/runtimeActionRegistry.ts",
|
|
2671
|
-
"line":
|
|
2671
|
+
"line": 48,
|
|
2672
2672
|
"column": 1
|
|
2673
2673
|
},
|
|
2674
2674
|
"exportPaths": [
|
|
@@ -2744,6 +2744,13 @@
|
|
|
2744
2744
|
"required": false,
|
|
2745
2745
|
"description": null
|
|
2746
2746
|
},
|
|
2747
|
+
{
|
|
2748
|
+
"name": "stateAdapter",
|
|
2749
|
+
"kind": "property",
|
|
2750
|
+
"type": "import(\"@ankhorage/contracts\").StateAdapter | undefined",
|
|
2751
|
+
"required": false,
|
|
2752
|
+
"description": null
|
|
2753
|
+
},
|
|
2747
2754
|
{
|
|
2748
2755
|
"name": "writeResultSlot",
|
|
2749
2756
|
"kind": "property",
|
|
@@ -2853,7 +2860,7 @@
|
|
|
2853
2860
|
"modulePath": "src/runtimeActionRegistry.ts",
|
|
2854
2861
|
"sourceLocation": {
|
|
2855
2862
|
"filePath": "src/runtimeActionRegistry.ts",
|
|
2856
|
-
"line":
|
|
2863
|
+
"line": 29,
|
|
2857
2864
|
"column": 1
|
|
2858
2865
|
},
|
|
2859
2866
|
"exportPaths": [
|
|
@@ -3070,7 +3077,7 @@
|
|
|
3070
3077
|
"modulePath": "src/runtimeActionRegistry.ts",
|
|
3071
3078
|
"sourceLocation": {
|
|
3072
3079
|
"filePath": "src/runtimeActionRegistry.ts",
|
|
3073
|
-
"line":
|
|
3080
|
+
"line": 59,
|
|
3074
3081
|
"column": 1
|
|
3075
3082
|
},
|
|
3076
3083
|
"exportPaths": [
|
|
@@ -4439,7 +4446,7 @@
|
|
|
4439
4446
|
"modulePath": "src/runtimeActionRegistry.ts",
|
|
4440
4447
|
"sourceLocation": {
|
|
4441
4448
|
"filePath": "src/runtimeActionRegistry.ts",
|
|
4442
|
-
"line":
|
|
4449
|
+
"line": 157,
|
|
4443
4450
|
"column": 1
|
|
4444
4451
|
},
|
|
4445
4452
|
"exportPaths": [
|
package/paradox/exports.md
CHANGED
|
@@ -97,7 +97,7 @@ Source: `src/RuntimeRendererConfig.tsx:76:1`
|
|
|
97
97
|
|
|
98
98
|
Kind: `function`
|
|
99
99
|
Module: `src/runtimeActionRegistry.ts`
|
|
100
|
-
Source: `src/runtimeActionRegistry.ts:
|
|
100
|
+
Source: `src/runtimeActionRegistry.ts:187:1`
|
|
101
101
|
|
|
102
102
|
Maps a platform callback invocation to the portable component event representation.
|
|
103
103
|
|
|
@@ -137,14 +137,14 @@ Constructs a pending state for capability-backed screen loaders.
|
|
|
137
137
|
|
|
138
138
|
Kind: `function`
|
|
139
139
|
Module: `src/runtimeActionRegistry.ts`
|
|
140
|
-
Source: `src/runtimeActionRegistry.ts:
|
|
140
|
+
Source: `src/runtimeActionRegistry.ts:71:1`
|
|
141
141
|
|
|
142
142
|
Creates a registry that dispatches every authored event through one capability executor.
|
|
143
143
|
|
|
144
144
|
### Signatures
|
|
145
145
|
|
|
146
|
-
- `(options?: Pick<RuntimeComponentEventDispatchArgs, "dataBindings" | "eventOperationLifecycle" | "executeCapability" | "resultSlots" | "writeResultSlot">) => RuntimeActionRegistry`
|
|
147
|
-
- options: `Pick<RuntimeComponentEventDispatchArgs, "dataBindings" | "eventOperationLifecycle" | "executeCapability" | "resultSlots" | "writeResultSlot">` (optional)
|
|
146
|
+
- `(options?: Pick<RuntimeComponentEventDispatchArgs, "stateAdapter" | "dataBindings" | "eventOperationLifecycle" | "executeCapability" | "resultSlots" | "writeResultSlot">) => RuntimeActionRegistry`
|
|
147
|
+
- options: `Pick<RuntimeComponentEventDispatchArgs, "stateAdapter" | "dataBindings" | "eventOperationLifecycle" | "executeCapability" | "resultSlots" | "writeResultSlot">` (optional)
|
|
148
148
|
- returns: `RuntimeActionRegistry`
|
|
149
149
|
|
|
150
150
|
## createRuntimeApiCapabilityExecutor
|
|
@@ -243,7 +243,7 @@ Tracks one active screen-loader request per effective dependency key.
|
|
|
243
243
|
|
|
244
244
|
Kind: `function`
|
|
245
245
|
Module: `src/runtimeActionRegistry.ts`
|
|
246
|
-
Source: `src/runtimeActionRegistry.ts:
|
|
246
|
+
Source: `src/runtimeActionRegistry.ts:90:1`
|
|
247
247
|
|
|
248
248
|
Executes every matching event invocation through the canonical capability path.
|
|
249
249
|
|
|
@@ -385,7 +385,7 @@ Resolves an invocation input map without executing a capability.
|
|
|
385
385
|
|
|
386
386
|
Kind: `function`
|
|
387
387
|
Module: `src/runtimeActionRegistry.ts`
|
|
388
|
-
Source: `src/runtimeActionRegistry.ts:
|
|
388
|
+
Source: `src/runtimeActionRegistry.ts:201:1`
|
|
389
389
|
|
|
390
390
|
Resolves an authored expression-shaped payload for imperative consumers.
|
|
391
391
|
|
|
@@ -549,7 +549,7 @@ Source: `src/runtimeManifest.ts:17:1`
|
|
|
549
549
|
|
|
550
550
|
Kind: `type`
|
|
551
551
|
Module: `src/runtimeActionRegistry.ts`
|
|
552
|
-
Source: `src/runtimeActionRegistry.ts:
|
|
552
|
+
Source: `src/runtimeActionRegistry.ts:34:1`
|
|
553
553
|
|
|
554
554
|
### Members
|
|
555
555
|
|
|
@@ -561,7 +561,7 @@ Source: `src/runtimeActionRegistry.ts:33:1`
|
|
|
561
561
|
|
|
562
562
|
Kind: `type`
|
|
563
563
|
Module: `src/runtimeActionRegistry.ts`
|
|
564
|
-
Source: `src/runtimeActionRegistry.ts:
|
|
564
|
+
Source: `src/runtimeActionRegistry.ts:44:1`
|
|
565
565
|
|
|
566
566
|
### Members
|
|
567
567
|
|
|
@@ -576,7 +576,7 @@ Source: `src/runtimeActionRegistry.ts:43:1`
|
|
|
576
576
|
|
|
577
577
|
Kind: `type`
|
|
578
578
|
Module: `src/runtimeActionRegistry.ts`
|
|
579
|
-
Source: `src/runtimeActionRegistry.ts:
|
|
579
|
+
Source: `src/runtimeActionRegistry.ts:38:1`
|
|
580
580
|
|
|
581
581
|
### Members
|
|
582
582
|
|
|
@@ -842,7 +842,7 @@ Source: `src/runtimeCapabilityExecutor.ts:12:1`
|
|
|
842
842
|
|
|
843
843
|
Kind: `type`
|
|
844
844
|
Module: `src/runtimeActionRegistry.ts`
|
|
845
|
-
Source: `src/runtimeActionRegistry.ts:
|
|
845
|
+
Source: `src/runtimeActionRegistry.ts:48:1`
|
|
846
846
|
|
|
847
847
|
### Members
|
|
848
848
|
|
|
@@ -857,6 +857,7 @@ Source: `src/runtimeActionRegistry.ts:47:1`
|
|
|
857
857
|
| node | property | `UiNode` | yes | |
|
|
858
858
|
| resultSlots | property | `Readonly<Record<string, import("@ankhorage/contracts").SerializableValue \| undefined>> \| undefined` | no | |
|
|
859
859
|
| state | property | `Record<string, unknown> \| undefined` | no | |
|
|
860
|
+
| stateAdapter | property | `import("@ankhorage/contracts").StateAdapter \| undefined` | no | |
|
|
860
861
|
| writeResultSlot | property | `RuntimeBindingResultWriter \| undefined` | no | |
|
|
861
862
|
|
|
862
863
|
## RuntimeContextCapabilityId
|
|
@@ -889,7 +890,7 @@ Source: `src/runtimeManifest.ts:5:1`
|
|
|
889
890
|
|
|
890
891
|
Kind: `unknown`
|
|
891
892
|
Module: `src/runtimeActionRegistry.ts`
|
|
892
|
-
Source: `src/runtimeActionRegistry.ts:
|
|
893
|
+
Source: `src/runtimeActionRegistry.ts:29:1`
|
|
893
894
|
|
|
894
895
|
## RuntimeEventDiagnosticsReporter
|
|
895
896
|
|
|
@@ -956,7 +957,7 @@ Source: `src/runtimeEventOperationLifecycle.ts:5:1`
|
|
|
956
957
|
|
|
957
958
|
Kind: `type`
|
|
958
959
|
Module: `src/runtimeActionRegistry.ts`
|
|
959
|
-
Source: `src/runtimeActionRegistry.ts:
|
|
960
|
+
Source: `src/runtimeActionRegistry.ts:59:1`
|
|
960
961
|
|
|
961
962
|
### Members
|
|
962
963
|
|
|
@@ -1347,7 +1348,7 @@ Runs screen capability invocations when their serialized request input changes.
|
|
|
1347
1348
|
|
|
1348
1349
|
Kind: `function`
|
|
1349
1350
|
Module: `src/runtimeActionRegistry.ts`
|
|
1350
|
-
Source: `src/runtimeActionRegistry.ts:
|
|
1351
|
+
Source: `src/runtimeActionRegistry.ts:157:1`
|
|
1351
1352
|
|
|
1352
1353
|
Wraps component callbacks so manifest event bindings retain the original callback behavior.
|
|
1353
1354
|
|
package/paradox/index.html
CHANGED
|
@@ -182,6 +182,11 @@
|
|
|
182
182
|
src/rendering.ts
|
|
183
183
|
<small>3 functions</small>
|
|
184
184
|
</button>
|
|
185
|
+
</li><li>
|
|
186
|
+
<button class="nav-button" type="button" data-target="src/runtimeActionRegistry.test.ts">
|
|
187
|
+
src/runtimeActionRegistry.test.ts
|
|
188
|
+
<small>1 function</small>
|
|
189
|
+
</button>
|
|
185
190
|
</li><li>
|
|
186
191
|
<button class="nav-button" type="button" data-target="src/runtimeActionRegistry.ts">
|
|
187
192
|
src/runtimeActionRegistry.ts
|
|
@@ -549,10 +554,10 @@ inject it at the runtime boundary.</p>
|
|
|
549
554
|
<p class="muted">Referenced module</p>
|
|
550
555
|
<p><strong>Dependencies:</strong> <code>src/registry.tsx</code></p>
|
|
551
556
|
<p><strong>Exports:</strong> <code>getUnknownComponentDiagnostic</code>, <code>resolveRenderedChildren</code>, <code>resolveRuntimeRegistry</code></p>
|
|
552
|
-
</article><article class="item" data-search="src/runtimeActionRegistry.test.ts src/runtimeActionRegistry.ts">
|
|
557
|
+
</article><article class="item" data-search="src/runtimeActionRegistry.test.ts src/runtimeActionRegistry.ts src/runtimeStateAdapter.ts">
|
|
553
558
|
<h3>src/runtimeActionRegistry.test.ts</h3>
|
|
554
559
|
<p class="muted">Referenced module</p>
|
|
555
|
-
<p><strong>Dependencies:</strong> <code>src/runtimeActionRegistry.ts</code></p>
|
|
560
|
+
<p><strong>Dependencies:</strong> <code>src/runtimeActionRegistry.ts</code>, <code>src/runtimeStateAdapter.ts</code></p>
|
|
556
561
|
<p><strong>Exports:</strong> <span class="empty">None</span></p>
|
|
557
562
|
</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">
|
|
558
563
|
<h3>src/runtimeActionRegistry.ts</h3>
|
|
@@ -1076,7 +1081,7 @@ inject it at the runtime boundary.</p>
|
|
|
1076
1081
|
<article class="item" id="symbol-createcomponenteventfromhandlerargs" data-search="createComponentEventFromHandlerArgs function src/runtimeActionRegistry.ts Maps a platform callback invocation to the portable component event representation. (args: { readonly capability?: Capability["id"]; readonly node: UiNode; readonly eventName: string; readonly handlerArgs: readonly unknown[]; }) => ComponentEventDto<string, RuntimeEventPayload>">
|
|
1077
1082
|
<h4>createComponentEventFromHandlerArgs</h4>
|
|
1078
1083
|
|
|
1079
|
-
<p class="muted">function • <code>src/runtimeActionRegistry.ts:
|
|
1084
|
+
<p class="muted">function • <code>src/runtimeActionRegistry.ts:187:1</code></p>
|
|
1080
1085
|
<p>Maps a platform callback invocation to the portable component event representation.</p>
|
|
1081
1086
|
|
|
1082
1087
|
<p><strong>Export paths:</strong> <code>src/index.ts</code></p>
|
|
@@ -1098,23 +1103,23 @@ inject it at the runtime boundary.</p>
|
|
|
1098
1103
|
<p><strong>Returns:</strong> <code>ComponentEventDto<string, RuntimeEventPayload></code></p>
|
|
1099
1104
|
</div>
|
|
1100
1105
|
|
|
1101
|
-
</article><article class="item" id="symbol-createruntimeactionregistry" data-search="createRuntimeActionRegistry function src/runtimeActionRegistry.ts Creates a registry that dispatches every authored event through one capability executor. RuntimeActionRegistry RuntimeComponentEventDispatchArgs (options?: Pick<RuntimeComponentEventDispatchArgs, "dataBindings" | "eventOperationLifecycle" | "executeCapability" | "resultSlots" | "writeResultSlot">) => RuntimeActionRegistry">
|
|
1106
|
+
</article><article class="item" id="symbol-createruntimeactionregistry" data-search="createRuntimeActionRegistry function src/runtimeActionRegistry.ts Creates a registry that dispatches every authored event through one capability executor. RuntimeActionRegistry RuntimeComponentEventDispatchArgs (options?: Pick<RuntimeComponentEventDispatchArgs, "stateAdapter" | "dataBindings" | "eventOperationLifecycle" | "executeCapability" | "resultSlots" | "writeResultSlot">) => RuntimeActionRegistry">
|
|
1102
1107
|
<h4>createRuntimeActionRegistry</h4>
|
|
1103
1108
|
|
|
1104
|
-
<p class="muted">function • <code>src/runtimeActionRegistry.ts:
|
|
1109
|
+
<p class="muted">function • <code>src/runtimeActionRegistry.ts:71:1</code></p>
|
|
1105
1110
|
<p>Creates a registry that dispatches every authored event through one capability executor.</p>
|
|
1106
1111
|
|
|
1107
1112
|
<p><strong>Export paths:</strong> <code>src/index.ts</code></p>
|
|
1108
1113
|
<div><strong>Related symbols:</strong> <ul class="chips"><li class="chip">RuntimeActionRegistry</li><li class="chip">RuntimeComponentEventDispatchArgs</li></ul></div>
|
|
1109
1114
|
<div>
|
|
1110
1115
|
<h5>Signature</h5>
|
|
1111
|
-
<pre>(options?: Pick<RuntimeComponentEventDispatchArgs, "dataBindings" | "eventOperationLifecycle" | "executeCapability" | "resultSlots" | "writeResultSlot">) => RuntimeActionRegistry</pre>
|
|
1116
|
+
<pre>(options?: Pick<RuntimeComponentEventDispatchArgs, "stateAdapter" | "dataBindings" | "eventOperationLifecycle" | "executeCapability" | "resultSlots" | "writeResultSlot">) => RuntimeActionRegistry</pre>
|
|
1112
1117
|
<table>
|
|
1113
1118
|
<thead><tr><th>Parameter</th><th>Type</th><th>Required</th><th>Description</th></tr></thead>
|
|
1114
1119
|
<tbody>
|
|
1115
1120
|
<tr>
|
|
1116
1121
|
<td><code>options</code></td>
|
|
1117
|
-
<td><code>Pick<RuntimeComponentEventDispatchArgs, "dataBindings" | "eventOperationLifecycle" | "executeCapability" | "resultSlots" | "writeResultSlot"></code></td>
|
|
1122
|
+
<td><code>Pick<RuntimeComponentEventDispatchArgs, "stateAdapter" | "dataBindings" | "eventOperationLifecycle" | "executeCapability" | "resultSlots" | "writeResultSlot"></code></td>
|
|
1118
1123
|
<td>no</td>
|
|
1119
1124
|
<td></td>
|
|
1120
1125
|
</tr>
|
|
@@ -1126,7 +1131,7 @@ inject it at the runtime boundary.</p>
|
|
|
1126
1131
|
</article><article class="item" id="symbol-dispatchruntimecomponentevent" data-search="dispatchRuntimeComponentEvent function src/runtimeActionRegistry.ts Executes every matching event invocation through the canonical capability path. RuntimeComponentEventDispatchArgs (args: RuntimeComponentEventDispatchArgs) => Promise<readonly DataSourceDiagnostic[]>">
|
|
1127
1132
|
<h4>dispatchRuntimeComponentEvent</h4>
|
|
1128
1133
|
|
|
1129
|
-
<p class="muted">function • <code>src/runtimeActionRegistry.ts:
|
|
1134
|
+
<p class="muted">function • <code>src/runtimeActionRegistry.ts:90:1</code></p>
|
|
1130
1135
|
<p>Executes every matching event invocation through the canonical capability path.</p>
|
|
1131
1136
|
|
|
1132
1137
|
<p><strong>Export paths:</strong> <code>src/index.ts</code></p>
|
|
@@ -1151,7 +1156,7 @@ inject it at the runtime boundary.</p>
|
|
|
1151
1156
|
</article><article class="item" id="symbol-resolveruntimeactionvalue" data-search="resolveRuntimeActionValue function src/runtimeActionRegistry.ts Resolves an authored expression-shaped payload for imperative consumers. RuntimeActionResolutionArgs (value: BindingExpression, args: RuntimeActionResolutionArgs) => import("@ankhorage/contracts").SerializableValue | undefined">
|
|
1152
1157
|
<h4>resolveRuntimeActionValue</h4>
|
|
1153
1158
|
|
|
1154
|
-
<p class="muted">function • <code>src/runtimeActionRegistry.ts:
|
|
1159
|
+
<p class="muted">function • <code>src/runtimeActionRegistry.ts:201:1</code></p>
|
|
1155
1160
|
<p>Resolves an authored expression-shaped payload for imperative consumers.</p>
|
|
1156
1161
|
|
|
1157
1162
|
<p><strong>Export paths:</strong> <code>src/index.ts</code></p>
|
|
@@ -1181,7 +1186,7 @@ inject it at the runtime boundary.</p>
|
|
|
1181
1186
|
</article><article class="item" id="symbol-runtimeactionregistry" data-search="RuntimeActionRegistry type src/runtimeActionRegistry.ts RuntimeComponentEventDispatchArgs">
|
|
1182
1187
|
<h4>RuntimeActionRegistry</h4>
|
|
1183
1188
|
|
|
1184
|
-
<p class="muted">type • <code>src/runtimeActionRegistry.ts:
|
|
1189
|
+
<p class="muted">type • <code>src/runtimeActionRegistry.ts:34:1</code></p>
|
|
1185
1190
|
|
|
1186
1191
|
|
|
1187
1192
|
<p><strong>Export paths:</strong> <code>src/index.ts</code></p>
|
|
@@ -1202,7 +1207,7 @@ inject it at the runtime boundary.</p>
|
|
|
1202
1207
|
</article><article class="item" id="symbol-runtimeactionresolutionargs" data-search="RuntimeActionResolutionArgs type src/runtimeActionRegistry.ts ">
|
|
1203
1208
|
<h4>RuntimeActionResolutionArgs</h4>
|
|
1204
1209
|
|
|
1205
|
-
<p class="muted">type • <code>src/runtimeActionRegistry.ts:
|
|
1210
|
+
<p class="muted">type • <code>src/runtimeActionRegistry.ts:44:1</code></p>
|
|
1206
1211
|
|
|
1207
1212
|
|
|
1208
1213
|
<p><strong>Export paths:</strong> <code>src/index.ts</code></p>
|
|
@@ -1241,7 +1246,7 @@ inject it at the runtime boundary.</p>
|
|
|
1241
1246
|
</article><article class="item" id="symbol-runtimeactionresolutionscope" data-search="RuntimeActionResolutionScope type src/runtimeActionRegistry.ts ">
|
|
1242
1247
|
<h4>RuntimeActionResolutionScope</h4>
|
|
1243
1248
|
|
|
1244
|
-
<p class="muted">type • <code>src/runtimeActionRegistry.ts:
|
|
1249
|
+
<p class="muted">type • <code>src/runtimeActionRegistry.ts:38:1</code></p>
|
|
1245
1250
|
|
|
1246
1251
|
|
|
1247
1252
|
<p><strong>Export paths:</strong> <code>src/index.ts</code></p>
|
|
@@ -1274,7 +1279,7 @@ inject it at the runtime boundary.</p>
|
|
|
1274
1279
|
</article><article class="item" id="symbol-runtimecomponenteventdispatchargs" data-search="RuntimeComponentEventDispatchArgs type src/runtimeActionRegistry.ts RuntimeBindingResultWriter RuntimeCapabilityExecutor RuntimeEventOperationLifecycle">
|
|
1275
1280
|
<h4>RuntimeComponentEventDispatchArgs</h4>
|
|
1276
1281
|
|
|
1277
|
-
<p class="muted">type • <code>src/runtimeActionRegistry.ts:
|
|
1282
|
+
<p class="muted">type • <code>src/runtimeActionRegistry.ts:48:1</code></p>
|
|
1278
1283
|
|
|
1279
1284
|
|
|
1280
1285
|
<p><strong>Export paths:</strong> <code>src/index.ts</code></p>
|
|
@@ -1337,6 +1342,12 @@ inject it at the runtime boundary.</p>
|
|
|
1337
1342
|
<td><code>Record<string, unknown> | undefined</code></td>
|
|
1338
1343
|
<td>no</td>
|
|
1339
1344
|
<td></td>
|
|
1345
|
+
</tr><tr>
|
|
1346
|
+
<td><code>stateAdapter</code></td>
|
|
1347
|
+
<td>property</td>
|
|
1348
|
+
<td><code>import("@ankhorage/contracts").StateAdapter | undefined</code></td>
|
|
1349
|
+
<td>no</td>
|
|
1350
|
+
<td></td>
|
|
1340
1351
|
</tr><tr>
|
|
1341
1352
|
<td><code>writeResultSlot</code></td>
|
|
1342
1353
|
<td>property</td>
|
|
@@ -1349,7 +1360,7 @@ inject it at the runtime boundary.</p>
|
|
|
1349
1360
|
</article><article class="item" id="symbol-runtimeeventcapabilityresolver" data-search="RuntimeEventCapabilityResolver unknown src/runtimeActionRegistry.ts ">
|
|
1350
1361
|
<h4>RuntimeEventCapabilityResolver</h4>
|
|
1351
1362
|
|
|
1352
|
-
<p class="muted">unknown • <code>src/runtimeActionRegistry.ts:
|
|
1363
|
+
<p class="muted">unknown • <code>src/runtimeActionRegistry.ts:29:1</code></p>
|
|
1353
1364
|
|
|
1354
1365
|
|
|
1355
1366
|
<p><strong>Export paths:</strong> <code>src/index.ts</code></p>
|
|
@@ -1359,7 +1370,7 @@ inject it at the runtime boundary.</p>
|
|
|
1359
1370
|
</article><article class="item" id="symbol-runtimeeventpropwrapargs" data-search="RuntimeEventPropWrapArgs type src/runtimeActionRegistry.ts RuntimeComponentEventDispatchArgs RuntimeEventCapabilityResolver">
|
|
1360
1371
|
<h4>RuntimeEventPropWrapArgs</h4>
|
|
1361
1372
|
|
|
1362
|
-
<p class="muted">type • <code>src/runtimeActionRegistry.ts:
|
|
1373
|
+
<p class="muted">type • <code>src/runtimeActionRegistry.ts:59:1</code></p>
|
|
1363
1374
|
|
|
1364
1375
|
|
|
1365
1376
|
<p><strong>Export paths:</strong> <code>src/index.ts</code></p>
|
|
@@ -1428,7 +1439,7 @@ inject it at the runtime boundary.</p>
|
|
|
1428
1439
|
</article><article class="item" id="symbol-wrapruntimeeventprops" data-search="wrapRuntimeEventProps function src/runtimeActionRegistry.ts Wraps component callbacks so manifest event bindings retain the original callback behavior. RuntimeEventPropWrapArgs (args: RuntimeEventPropWrapArgs) => Record<string, unknown>">
|
|
1429
1440
|
<h4>wrapRuntimeEventProps</h4>
|
|
1430
1441
|
|
|
1431
|
-
<p class="muted">function • <code>src/runtimeActionRegistry.ts:
|
|
1442
|
+
<p class="muted">function • <code>src/runtimeActionRegistry.ts:157:1</code></p>
|
|
1432
1443
|
<p>Wraps component callbacks so manifest event bindings retain the original callback behavior.</p>
|
|
1433
1444
|
|
|
1434
1445
|
<p><strong>Export paths:</strong> <code>src/index.ts</code></p>
|
|
@@ -4296,6 +4307,7 @@ must not provide credential resolution.</td>
|
|
|
4296
4307
|
module_src_runtimeActionRegistry_test_ts["src/runtimeActionRegistry.test.ts"]
|
|
4297
4308
|
package__ankhorage_runtime -.-> module_src_runtimeActionRegistry_test_ts
|
|
4298
4309
|
module_src_runtimeActionRegistry_test_ts --> module_src_runtimeActionRegistry_ts
|
|
4310
|
+
module_src_runtimeActionRegistry_test_ts --> module_src_runtimeStateAdapter_ts
|
|
4299
4311
|
module_src_runtimeActionRegistry_ts["src/runtimeActionRegistry.ts"]
|
|
4300
4312
|
package__ankhorage_runtime -.-> module_src_runtimeActionRegistry_ts
|
|
4301
4313
|
module_src_runtimeActionRegistry_ts --> module_src_runtimeBindings_ts
|
|
@@ -4549,6 +4561,7 @@ must not provide credential resolution.</td>
|
|
|
4549
4561
|
module_src_runtimeActionRegistry_test_ts["src/runtimeActionRegistry.test.ts"]
|
|
4550
4562
|
package__ankhorage_runtime -.-> module_src_runtimeActionRegistry_test_ts
|
|
4551
4563
|
module_src_runtimeActionRegistry_test_ts --> module_src_runtimeActionRegistry_ts
|
|
4564
|
+
module_src_runtimeActionRegistry_test_ts --> module_src_runtimeStateAdapter_ts
|
|
4552
4565
|
module_src_runtimeActionRegistry_ts["src/runtimeActionRegistry.ts"]
|
|
4553
4566
|
package__ankhorage_runtime -.-> module_src_runtimeActionRegistry_ts
|
|
4554
4567
|
module_src_runtimeActionRegistry_ts --> module_src_runtimeBindings_ts
|
|
@@ -4831,6 +4844,7 @@ must not provide credential resolution.</td>
|
|
|
4831
4844
|
module_src_rendering_test_ts --> module_src_rendering_ts
|
|
4832
4845
|
module_src_rendering_ts --> module_src_registry_tsx
|
|
4833
4846
|
module_src_runtimeActionRegistry_test_ts --> module_src_runtimeActionRegistry_ts
|
|
4847
|
+
module_src_runtimeActionRegistry_test_ts --> module_src_runtimeStateAdapter_ts
|
|
4834
4848
|
module_src_runtimeActionRegistry_ts --> module_src_runtimeBindings_ts
|
|
4835
4849
|
module_src_runtimeActionRegistry_ts --> module_src_runtimeEventOperationLifecycle_ts
|
|
4836
4850
|
module_src_runtimeApiCapabilities_test_ts --> module_src_runtimeApiCapabilities_ts
|
|
@@ -5013,6 +5027,7 @@ must not provide credential resolution.</td>
|
|
|
5013
5027
|
module_src_rendering_test_ts --> module_src_rendering_ts
|
|
5014
5028
|
module_src_rendering_ts --> module_src_registry_tsx
|
|
5015
5029
|
module_src_runtimeActionRegistry_test_ts --> module_src_runtimeActionRegistry_ts
|
|
5030
|
+
module_src_runtimeActionRegistry_test_ts --> module_src_runtimeStateAdapter_ts
|
|
5016
5031
|
module_src_runtimeActionRegistry_ts --> module_src_runtimeBindings_ts
|
|
5017
5032
|
module_src_runtimeActionRegistry_ts --> module_src_runtimeEventOperationLifecycle_ts
|
|
5018
5033
|
module_src_runtimeApiCapabilities_test_ts --> module_src_runtimeApiCapabilities_ts
|
|
@@ -6621,6 +6636,15 @@ must not provide credential resolution.</td>
|
|
|
6621
6636
|
<h3>getUnknownComponentDiagnostic</h3>
|
|
6622
6637
|
<p class="muted"><code>src/rendering.ts:28:1</code></p>
|
|
6623
6638
|
<p class="empty">No description available.</p>
|
|
6639
|
+
</article>
|
|
6640
|
+
</section>
|
|
6641
|
+
</section><section id="view-src-runtimeactionregistry-test-ts" class="view" data-view="src/runtimeActionRegistry.test.ts" hidden>
|
|
6642
|
+
<section class="panel">
|
|
6643
|
+
<h2>src/runtimeActionRegistry.test.ts</h2>
|
|
6644
|
+
<article class="item" data-search="dispatch src/runtimeActionRegistry.test.ts ">
|
|
6645
|
+
<h3>dispatch</h3>
|
|
6646
|
+
<p class="muted"><code>src/runtimeActionRegistry.test.ts:61:9</code></p>
|
|
6647
|
+
<p class="empty">No description available.</p>
|
|
6624
6648
|
</article>
|
|
6625
6649
|
</section>
|
|
6626
6650
|
</section><section id="view-src-runtimeactionregistry-ts" class="view" data-view="src/runtimeActionRegistry.ts" hidden>
|
|
@@ -6628,47 +6652,47 @@ must not provide credential resolution.</td>
|
|
|
6628
6652
|
<h2>src/runtimeActionRegistry.ts</h2>
|
|
6629
6653
|
<article class="item" data-search="createRuntimeActionRegistry src/runtimeActionRegistry.ts Creates a registry that dispatches every authored event through one capability executor.">
|
|
6630
6654
|
<h3>createRuntimeActionRegistry</h3>
|
|
6631
|
-
<p class="muted"><code>src/runtimeActionRegistry.ts:
|
|
6655
|
+
<p class="muted"><code>src/runtimeActionRegistry.ts:71:1</code></p>
|
|
6632
6656
|
<p>Creates a registry that dispatches every authored event through one capability executor.</p>
|
|
6633
6657
|
</article><article class="item" data-search="dispatchRuntimeComponentEvent src/runtimeActionRegistry.ts Executes every matching event invocation through the canonical capability path.">
|
|
6634
6658
|
<h3>dispatchRuntimeComponentEvent</h3>
|
|
6635
|
-
<p class="muted"><code>src/runtimeActionRegistry.ts:
|
|
6659
|
+
<p class="muted"><code>src/runtimeActionRegistry.ts:90:1</code></p>
|
|
6636
6660
|
<p>Executes every matching event invocation through the canonical capability path.</p>
|
|
6637
6661
|
</article><article class="item" data-search="wrapRuntimeEventProps src/runtimeActionRegistry.ts Wraps component callbacks so manifest event bindings retain the original callback behavior.">
|
|
6638
6662
|
<h3>wrapRuntimeEventProps</h3>
|
|
6639
|
-
<p class="muted"><code>src/runtimeActionRegistry.ts:
|
|
6663
|
+
<p class="muted"><code>src/runtimeActionRegistry.ts:157:1</code></p>
|
|
6640
6664
|
<p>Wraps component callbacks so manifest event bindings retain the original callback behavior.</p>
|
|
6641
6665
|
</article><article class="item" data-search="createComponentEventFromHandlerArgs src/runtimeActionRegistry.ts Maps a platform callback invocation to the portable component event representation.">
|
|
6642
6666
|
<h3>createComponentEventFromHandlerArgs</h3>
|
|
6643
|
-
<p class="muted"><code>src/runtimeActionRegistry.ts:
|
|
6667
|
+
<p class="muted"><code>src/runtimeActionRegistry.ts:187:1</code></p>
|
|
6644
6668
|
<p>Maps a platform callback invocation to the portable component event representation.</p>
|
|
6645
6669
|
</article><article class="item" data-search="resolveRuntimeActionValue src/runtimeActionRegistry.ts Resolves an authored expression-shaped payload for imperative consumers.">
|
|
6646
6670
|
<h3>resolveRuntimeActionValue</h3>
|
|
6647
|
-
<p class="muted"><code>src/runtimeActionRegistry.ts:
|
|
6671
|
+
<p class="muted"><code>src/runtimeActionRegistry.ts:201:1</code></p>
|
|
6648
6672
|
<p>Resolves an authored expression-shaped payload for imperative consumers.</p>
|
|
6649
6673
|
</article><article class="item" data-search="matchesBindingCondition src/runtimeActionRegistry.ts ">
|
|
6650
6674
|
<h3>matchesBindingCondition</h3>
|
|
6651
|
-
<p class="muted"><code>src/runtimeActionRegistry.ts:
|
|
6675
|
+
<p class="muted"><code>src/runtimeActionRegistry.ts:208:1</code></p>
|
|
6652
6676
|
<p class="empty">No description available.</p>
|
|
6653
6677
|
</article><article class="item" data-search="createPayloadForEvent src/runtimeActionRegistry.ts ">
|
|
6654
6678
|
<h3>createPayloadForEvent</h3>
|
|
6655
|
-
<p class="muted"><code>src/runtimeActionRegistry.ts:
|
|
6679
|
+
<p class="muted"><code>src/runtimeActionRegistry.ts:224:1</code></p>
|
|
6656
6680
|
<p class="empty">No description available.</p>
|
|
6657
6681
|
</article><article class="item" data-search="inferLocalEventName src/runtimeActionRegistry.ts ">
|
|
6658
6682
|
<h3>inferLocalEventName</h3>
|
|
6659
|
-
<p class="muted"><code>src/runtimeActionRegistry.ts:
|
|
6683
|
+
<p class="muted"><code>src/runtimeActionRegistry.ts:238:1</code></p>
|
|
6660
6684
|
<p class="empty">No description available.</p>
|
|
6661
6685
|
</article><article class="item" data-search="eventNameToCallbackProp src/runtimeActionRegistry.ts ">
|
|
6662
6686
|
<h3>eventNameToCallbackProp</h3>
|
|
6663
|
-
<p class="muted"><code>src/runtimeActionRegistry.ts:
|
|
6687
|
+
<p class="muted"><code>src/runtimeActionRegistry.ts:242:1</code></p>
|
|
6664
6688
|
<p class="empty">No description available.</p>
|
|
6665
6689
|
</article><article class="item" data-search="isRuntimeEventHandler src/runtimeActionRegistry.ts ">
|
|
6666
6690
|
<h3>isRuntimeEventHandler</h3>
|
|
6667
|
-
<p class="muted"><code>src/runtimeActionRegistry.ts:
|
|
6691
|
+
<p class="muted"><code>src/runtimeActionRegistry.ts:246:1</code></p>
|
|
6668
6692
|
<p class="empty">No description available.</p>
|
|
6669
6693
|
</article><article class="item" data-search="asRecord src/runtimeActionRegistry.ts ">
|
|
6670
6694
|
<h3>asRecord</h3>
|
|
6671
|
-
<p class="muted"><code>src/runtimeActionRegistry.ts:
|
|
6695
|
+
<p class="muted"><code>src/runtimeActionRegistry.ts:250:1</code></p>
|
|
6672
6696
|
<p class="empty">No description available.</p>
|
|
6673
6697
|
</article>
|
|
6674
6698
|
</section>
|
package/paradox/paradox.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
{
|
|
19
19
|
"id": "npm",
|
|
20
20
|
"label": "npm",
|
|
21
|
-
"value": "v5.7.
|
|
21
|
+
"value": "v5.7.8",
|
|
22
22
|
"color": "cb3837"
|
|
23
23
|
},
|
|
24
24
|
{
|
|
@@ -492,7 +492,8 @@
|
|
|
492
492
|
"path": "src/runtimeActionRegistry.test.ts",
|
|
493
493
|
"isEntrypoint": false,
|
|
494
494
|
"dependencies": [
|
|
495
|
-
"src/runtimeActionRegistry.ts"
|
|
495
|
+
"src/runtimeActionRegistry.ts",
|
|
496
|
+
"src/runtimeStateAdapter.ts"
|
|
496
497
|
],
|
|
497
498
|
"exports": []
|
|
498
499
|
},
|
|
@@ -1355,7 +1356,7 @@
|
|
|
1355
1356
|
"modulePath": "src/runtimeActionRegistry.ts",
|
|
1356
1357
|
"sourceLocation": {
|
|
1357
1358
|
"filePath": "src/runtimeActionRegistry.ts",
|
|
1358
|
-
"line":
|
|
1359
|
+
"line": 187,
|
|
1359
1360
|
"column": 1
|
|
1360
1361
|
},
|
|
1361
1362
|
"exportPaths": [
|
|
@@ -1465,7 +1466,7 @@
|
|
|
1465
1466
|
"modulePath": "src/runtimeActionRegistry.ts",
|
|
1466
1467
|
"sourceLocation": {
|
|
1467
1468
|
"filePath": "src/runtimeActionRegistry.ts",
|
|
1468
|
-
"line":
|
|
1469
|
+
"line": 71,
|
|
1469
1470
|
"column": 1
|
|
1470
1471
|
},
|
|
1471
1472
|
"exportPaths": [
|
|
@@ -1477,11 +1478,11 @@
|
|
|
1477
1478
|
],
|
|
1478
1479
|
"signatures": [
|
|
1479
1480
|
{
|
|
1480
|
-
"label": "(options?: Pick<RuntimeComponentEventDispatchArgs, \"dataBindings\" | \"eventOperationLifecycle\" | \"executeCapability\" | \"resultSlots\" | \"writeResultSlot\">) => RuntimeActionRegistry",
|
|
1481
|
+
"label": "(options?: Pick<RuntimeComponentEventDispatchArgs, \"stateAdapter\" | \"dataBindings\" | \"eventOperationLifecycle\" | \"executeCapability\" | \"resultSlots\" | \"writeResultSlot\">) => RuntimeActionRegistry",
|
|
1481
1482
|
"parameters": [
|
|
1482
1483
|
{
|
|
1483
1484
|
"name": "options",
|
|
1484
|
-
"type": "Pick<RuntimeComponentEventDispatchArgs, \"dataBindings\" | \"eventOperationLifecycle\" | \"executeCapability\" | \"resultSlots\" | \"writeResultSlot\">",
|
|
1485
|
+
"type": "Pick<RuntimeComponentEventDispatchArgs, \"stateAdapter\" | \"dataBindings\" | \"eventOperationLifecycle\" | \"executeCapability\" | \"resultSlots\" | \"writeResultSlot\">",
|
|
1485
1486
|
"required": false,
|
|
1486
1487
|
"description": null
|
|
1487
1488
|
}
|
|
@@ -1770,7 +1771,7 @@
|
|
|
1770
1771
|
"modulePath": "src/runtimeActionRegistry.ts",
|
|
1771
1772
|
"sourceLocation": {
|
|
1772
1773
|
"filePath": "src/runtimeActionRegistry.ts",
|
|
1773
|
-
"line":
|
|
1774
|
+
"line": 90,
|
|
1774
1775
|
"column": 1
|
|
1775
1776
|
},
|
|
1776
1777
|
"exportPaths": [
|
|
@@ -2205,7 +2206,7 @@
|
|
|
2205
2206
|
"modulePath": "src/runtimeActionRegistry.ts",
|
|
2206
2207
|
"sourceLocation": {
|
|
2207
2208
|
"filePath": "src/runtimeActionRegistry.ts",
|
|
2208
|
-
"line":
|
|
2209
|
+
"line": 201,
|
|
2209
2210
|
"column": 1
|
|
2210
2211
|
},
|
|
2211
2212
|
"exportPaths": [
|
|
@@ -2688,7 +2689,7 @@
|
|
|
2688
2689
|
"modulePath": "src/runtimeActionRegistry.ts",
|
|
2689
2690
|
"sourceLocation": {
|
|
2690
2691
|
"filePath": "src/runtimeActionRegistry.ts",
|
|
2691
|
-
"line":
|
|
2692
|
+
"line": 34,
|
|
2692
2693
|
"column": 1
|
|
2693
2694
|
},
|
|
2694
2695
|
"exportPaths": [
|
|
@@ -2720,7 +2721,7 @@
|
|
|
2720
2721
|
"modulePath": "src/runtimeActionRegistry.ts",
|
|
2721
2722
|
"sourceLocation": {
|
|
2722
2723
|
"filePath": "src/runtimeActionRegistry.ts",
|
|
2723
|
-
"line":
|
|
2724
|
+
"line": 44,
|
|
2724
2725
|
"column": 1
|
|
2725
2726
|
},
|
|
2726
2727
|
"exportPaths": [
|
|
@@ -2771,7 +2772,7 @@
|
|
|
2771
2772
|
"modulePath": "src/runtimeActionRegistry.ts",
|
|
2772
2773
|
"sourceLocation": {
|
|
2773
2774
|
"filePath": "src/runtimeActionRegistry.ts",
|
|
2774
|
-
"line":
|
|
2775
|
+
"line": 38,
|
|
2775
2776
|
"column": 1
|
|
2776
2777
|
},
|
|
2777
2778
|
"exportPaths": [
|
|
@@ -3730,7 +3731,7 @@
|
|
|
3730
3731
|
"modulePath": "src/runtimeActionRegistry.ts",
|
|
3731
3732
|
"sourceLocation": {
|
|
3732
3733
|
"filePath": "src/runtimeActionRegistry.ts",
|
|
3733
|
-
"line":
|
|
3734
|
+
"line": 48,
|
|
3734
3735
|
"column": 1
|
|
3735
3736
|
},
|
|
3736
3737
|
"exportPaths": [
|
|
@@ -3806,6 +3807,13 @@
|
|
|
3806
3807
|
"required": false,
|
|
3807
3808
|
"description": null
|
|
3808
3809
|
},
|
|
3810
|
+
{
|
|
3811
|
+
"name": "stateAdapter",
|
|
3812
|
+
"kind": "property",
|
|
3813
|
+
"type": "import(\"@ankhorage/contracts\").StateAdapter | undefined",
|
|
3814
|
+
"required": false,
|
|
3815
|
+
"description": null
|
|
3816
|
+
},
|
|
3809
3817
|
{
|
|
3810
3818
|
"name": "writeResultSlot",
|
|
3811
3819
|
"kind": "property",
|
|
@@ -3915,7 +3923,7 @@
|
|
|
3915
3923
|
"modulePath": "src/runtimeActionRegistry.ts",
|
|
3916
3924
|
"sourceLocation": {
|
|
3917
3925
|
"filePath": "src/runtimeActionRegistry.ts",
|
|
3918
|
-
"line":
|
|
3926
|
+
"line": 29,
|
|
3919
3927
|
"column": 1
|
|
3920
3928
|
},
|
|
3921
3929
|
"exportPaths": [
|
|
@@ -4132,7 +4140,7 @@
|
|
|
4132
4140
|
"modulePath": "src/runtimeActionRegistry.ts",
|
|
4133
4141
|
"sourceLocation": {
|
|
4134
4142
|
"filePath": "src/runtimeActionRegistry.ts",
|
|
4135
|
-
"line":
|
|
4143
|
+
"line": 59,
|
|
4136
4144
|
"column": 1
|
|
4137
4145
|
},
|
|
4138
4146
|
"exportPaths": [
|
|
@@ -5501,7 +5509,7 @@
|
|
|
5501
5509
|
"modulePath": "src/runtimeActionRegistry.ts",
|
|
5502
5510
|
"sourceLocation": {
|
|
5503
5511
|
"filePath": "src/runtimeActionRegistry.ts",
|
|
5504
|
-
"line":
|
|
5512
|
+
"line": 157,
|
|
5505
5513
|
"column": 1
|
|
5506
5514
|
},
|
|
5507
5515
|
"exportPaths": [
|
|
@@ -6427,6 +6435,17 @@
|
|
|
6427
6435
|
"column": 1
|
|
6428
6436
|
}
|
|
6429
6437
|
},
|
|
6438
|
+
{
|
|
6439
|
+
"name": "dispatch",
|
|
6440
|
+
"description": null,
|
|
6441
|
+
"see": [],
|
|
6442
|
+
"security": [],
|
|
6443
|
+
"sourceLocation": {
|
|
6444
|
+
"filePath": "src/runtimeActionRegistry.test.ts",
|
|
6445
|
+
"line": 61,
|
|
6446
|
+
"column": 9
|
|
6447
|
+
}
|
|
6448
|
+
},
|
|
6430
6449
|
{
|
|
6431
6450
|
"name": "createRuntimeActionRegistry",
|
|
6432
6451
|
"description": "Creates a registry that dispatches every authored event through one capability executor.",
|
|
@@ -6434,7 +6453,7 @@
|
|
|
6434
6453
|
"security": [],
|
|
6435
6454
|
"sourceLocation": {
|
|
6436
6455
|
"filePath": "src/runtimeActionRegistry.ts",
|
|
6437
|
-
"line":
|
|
6456
|
+
"line": 71,
|
|
6438
6457
|
"column": 1
|
|
6439
6458
|
}
|
|
6440
6459
|
},
|
|
@@ -6445,7 +6464,7 @@
|
|
|
6445
6464
|
"security": [],
|
|
6446
6465
|
"sourceLocation": {
|
|
6447
6466
|
"filePath": "src/runtimeActionRegistry.ts",
|
|
6448
|
-
"line":
|
|
6467
|
+
"line": 90,
|
|
6449
6468
|
"column": 1
|
|
6450
6469
|
}
|
|
6451
6470
|
},
|
|
@@ -6456,7 +6475,7 @@
|
|
|
6456
6475
|
"security": [],
|
|
6457
6476
|
"sourceLocation": {
|
|
6458
6477
|
"filePath": "src/runtimeActionRegistry.ts",
|
|
6459
|
-
"line":
|
|
6478
|
+
"line": 157,
|
|
6460
6479
|
"column": 1
|
|
6461
6480
|
}
|
|
6462
6481
|
},
|
|
@@ -6467,7 +6486,7 @@
|
|
|
6467
6486
|
"security": [],
|
|
6468
6487
|
"sourceLocation": {
|
|
6469
6488
|
"filePath": "src/runtimeActionRegistry.ts",
|
|
6470
|
-
"line":
|
|
6489
|
+
"line": 187,
|
|
6471
6490
|
"column": 1
|
|
6472
6491
|
}
|
|
6473
6492
|
},
|
|
@@ -6478,7 +6497,7 @@
|
|
|
6478
6497
|
"security": [],
|
|
6479
6498
|
"sourceLocation": {
|
|
6480
6499
|
"filePath": "src/runtimeActionRegistry.ts",
|
|
6481
|
-
"line":
|
|
6500
|
+
"line": 201,
|
|
6482
6501
|
"column": 1
|
|
6483
6502
|
}
|
|
6484
6503
|
},
|
|
@@ -6489,7 +6508,7 @@
|
|
|
6489
6508
|
"security": [],
|
|
6490
6509
|
"sourceLocation": {
|
|
6491
6510
|
"filePath": "src/runtimeActionRegistry.ts",
|
|
6492
|
-
"line":
|
|
6511
|
+
"line": 208,
|
|
6493
6512
|
"column": 1
|
|
6494
6513
|
}
|
|
6495
6514
|
},
|
|
@@ -6500,7 +6519,7 @@
|
|
|
6500
6519
|
"security": [],
|
|
6501
6520
|
"sourceLocation": {
|
|
6502
6521
|
"filePath": "src/runtimeActionRegistry.ts",
|
|
6503
|
-
"line":
|
|
6522
|
+
"line": 224,
|
|
6504
6523
|
"column": 1
|
|
6505
6524
|
}
|
|
6506
6525
|
},
|
|
@@ -6511,7 +6530,7 @@
|
|
|
6511
6530
|
"security": [],
|
|
6512
6531
|
"sourceLocation": {
|
|
6513
6532
|
"filePath": "src/runtimeActionRegistry.ts",
|
|
6514
|
-
"line":
|
|
6533
|
+
"line": 238,
|
|
6515
6534
|
"column": 1
|
|
6516
6535
|
}
|
|
6517
6536
|
},
|
|
@@ -6522,7 +6541,7 @@
|
|
|
6522
6541
|
"security": [],
|
|
6523
6542
|
"sourceLocation": {
|
|
6524
6543
|
"filePath": "src/runtimeActionRegistry.ts",
|
|
6525
|
-
"line":
|
|
6544
|
+
"line": 242,
|
|
6526
6545
|
"column": 1
|
|
6527
6546
|
}
|
|
6528
6547
|
},
|
|
@@ -6533,7 +6552,7 @@
|
|
|
6533
6552
|
"security": [],
|
|
6534
6553
|
"sourceLocation": {
|
|
6535
6554
|
"filePath": "src/runtimeActionRegistry.ts",
|
|
6536
|
-
"line":
|
|
6555
|
+
"line": 246,
|
|
6537
6556
|
"column": 1
|
|
6538
6557
|
}
|
|
6539
6558
|
},
|
|
@@ -6544,7 +6563,7 @@
|
|
|
6544
6563
|
"security": [],
|
|
6545
6564
|
"sourceLocation": {
|
|
6546
6565
|
"filePath": "src/runtimeActionRegistry.ts",
|
|
6547
|
-
"line":
|
|
6566
|
+
"line": 250,
|
|
6548
6567
|
"column": 1
|
|
6549
6568
|
}
|
|
6550
6569
|
},
|
|
@@ -8816,6 +8835,11 @@
|
|
|
8816
8835
|
"toPath": "src/runtimeActionRegistry.ts",
|
|
8817
8836
|
"sourcePath": "src/runtimeActionRegistry.test.ts"
|
|
8818
8837
|
},
|
|
8838
|
+
{
|
|
8839
|
+
"fromPath": "src/runtimeActionRegistry.test.ts",
|
|
8840
|
+
"toPath": "src/runtimeStateAdapter.ts",
|
|
8841
|
+
"sourcePath": "src/runtimeActionRegistry.test.ts"
|
|
8842
|
+
},
|
|
8819
8843
|
{
|
|
8820
8844
|
"fromPath": "src/runtimeActionRegistry.ts",
|
|
8821
8845
|
"toPath": "src/runtimeBindings.ts",
|
|
@@ -9787,6 +9811,24 @@
|
|
|
9787
9811
|
"callExpression": "createComponentEventFromHandlerArgs",
|
|
9788
9812
|
"sourcePath": "src/runtimeActionRegistry.test.ts"
|
|
9789
9813
|
},
|
|
9814
|
+
{
|
|
9815
|
+
"fromSymbol": "src/runtimeActionRegistry.test.ts",
|
|
9816
|
+
"toSymbol": "createRuntimeMemoryStateAdapter",
|
|
9817
|
+
"callExpression": "createRuntimeMemoryStateAdapter",
|
|
9818
|
+
"sourcePath": "src/runtimeActionRegistry.test.ts"
|
|
9819
|
+
},
|
|
9820
|
+
{
|
|
9821
|
+
"fromSymbol": "dispatch",
|
|
9822
|
+
"toSymbol": "dispatchRuntimeComponentEvent",
|
|
9823
|
+
"callExpression": "dispatchRuntimeComponentEvent",
|
|
9824
|
+
"sourcePath": "src/runtimeActionRegistry.test.ts"
|
|
9825
|
+
},
|
|
9826
|
+
{
|
|
9827
|
+
"fromSymbol": "src/runtimeActionRegistry.test.ts",
|
|
9828
|
+
"toSymbol": "dispatch",
|
|
9829
|
+
"callExpression": "dispatch",
|
|
9830
|
+
"sourcePath": "src/runtimeActionRegistry.test.ts"
|
|
9831
|
+
},
|
|
9790
9832
|
{
|
|
9791
9833
|
"fromSymbol": "dispatchComponentEvent",
|
|
9792
9834
|
"toSymbol": "dispatchRuntimeComponentEvent",
|
|
@@ -12526,6 +12568,11 @@
|
|
|
12526
12568
|
"toType": "SerializableValue",
|
|
12527
12569
|
"sourcePath": "src/runtimeActionRegistry.ts"
|
|
12528
12570
|
},
|
|
12571
|
+
{
|
|
12572
|
+
"fromSymbol": "RuntimeComponentEventDispatchArgs",
|
|
12573
|
+
"toType": "StateAdapter",
|
|
12574
|
+
"sourcePath": "src/runtimeActionRegistry.ts"
|
|
12575
|
+
},
|
|
12529
12576
|
{
|
|
12530
12577
|
"fromSymbol": "RuntimeComponentEventDispatchArgs",
|
|
12531
12578
|
"toType": "UiNode",
|