@ankhorage/runtime 0.3.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/README.md +2 -2
- package/dist/RuntimeRenderer.d.ts +4 -1
- package/dist/RuntimeRenderer.d.ts.map +1 -1
- package/dist/RuntimeRenderer.js +32 -13
- package/dist/RuntimeRenderer.js.map +1 -1
- package/dist/RuntimeRendererConfig.d.ts +4 -1
- package/dist/RuntimeRendererConfig.d.ts.map +1 -1
- package/dist/RuntimeRendererConfig.js +2 -0
- package/dist/RuntimeRendererConfig.js.map +1 -1
- package/dist/RuntimeScreen.d.ts.map +1 -1
- package/dist/RuntimeScreen.js +5 -43
- package/dist/RuntimeScreen.js.map +1 -1
- package/dist/index.d.ts +2 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -3
- package/dist/index.js.map +1 -1
- package/dist/readme-usage.js +1 -1
- package/dist/readme-usage.js.map +1 -1
- package/dist/runtimeDataSourceOperations.d.ts +3 -1
- package/dist/runtimeDataSourceOperations.d.ts.map +1 -1
- package/dist/runtimeDataSourceOperations.js +31 -26
- package/dist/runtimeDataSourceOperations.js.map +1 -1
- package/dist/runtimeDatabaseOperationExecutor.d.ts +9 -0
- package/dist/runtimeDatabaseOperationExecutor.d.ts.map +1 -0
- package/dist/runtimeDatabaseOperationExecutor.js +228 -0
- package/dist/runtimeDatabaseOperationExecutor.js.map +1 -0
- package/dist/runtimeMedia.d.ts +13 -0
- package/dist/runtimeMedia.d.ts.map +1 -0
- package/dist/runtimeMedia.js +80 -0
- package/dist/runtimeMedia.js.map +1 -0
- package/dist/runtimeMediaCache.d.ts +8 -0
- package/dist/runtimeMediaCache.d.ts.map +1 -0
- package/dist/runtimeMediaCache.js +14 -0
- package/dist/runtimeMediaCache.js.map +1 -0
- package/dist/runtimeScreenLoaders.d.ts +1 -2
- package/dist/runtimeScreenLoaders.d.ts.map +1 -1
- package/dist/runtimeScreenLoaders.js +1 -4
- package/dist/runtimeScreenLoaders.js.map +1 -1
- package/dist/useRuntimeMediaProps.d.ts +9 -0
- package/dist/useRuntimeMediaProps.d.ts.map +1 -0
- package/dist/useRuntimeMediaProps.js +61 -0
- package/dist/useRuntimeMediaProps.js.map +1 -0
- package/package.json +5 -4
- package/paradox/badges/npm.svg +3 -3
- package/paradox/components.md +5 -3
- package/paradox/diagrams/architecture-overview.mmd +23 -9
- package/paradox/diagrams/export-graph.mmd +14 -47
- package/paradox/diagrams/module-relationships.mmd +17 -7
- package/paradox/diagrams/sequences/runtime-screen.mmd +0 -3
- package/paradox/exports.json +136 -496
- package/paradox/exports.md +136 -278
- package/paradox/index.html +991 -1119
- package/paradox/paradox.json +1405 -1254
- package/dist/runtimeApiLoaders.d.ts +0 -35
- package/dist/runtimeApiLoaders.d.ts.map +0 -1
- package/dist/runtimeApiLoaders.js +0 -218
- package/dist/runtimeApiLoaders.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtimeScreenLoaders.js","sourceRoot":"","sources":["../src/runtimeScreenLoaders.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EACL,gCAAgC,EAChC,0BAA0B,EAC1B,uCAAuC,GAIxC,MAAM,mBAAmB,CAAC;AAoB3B,MAAM,iDAAiD,GAAG,MAAM,CAAC,MAAM,CACrE,EAAE,CACgC,CAAC;AACrC,MAAM,sCAAsC,GAAG,MAAM,CAAC,MAAM,CAC1D,EAAE,CACmC,CAAC;AAExC,MAAM,UAAU,uBAAuB,CACrC,MAAkB;IAElB,OAAO,CAAC,MAAM,CAAC,WAAW,IAAI,EAAE,CAAC,CAAC,MAAM,CACtC,CAAC,MAAM,EAA2C,EAAE,CAAC,MAAM,CAAC,IAAI,KAAK,KAAK,CAC3E,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,6BAA6B,CAC3C,MAAkB;IAElB,OAAO,CAAC,MAAM,CA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AAU,EAAE,MAAM,CAAC,SAAS,CAAC,UAAU;QACvC,WAAW,EAAE,MAAM,CAAC,SAAS,CAAC,WAAW;QACzC,OAAO;QACP,QAAQ,EAAE,OAAO;KAClB,CAAC;AACJ,CAAC;AAED,SAAS,yCAAyC,CAAC,QAAgB;IACjE,OAAO,UAAU,QAAQ,uBAAuB,CAAC;AACnD,CAAC;AAED,SAAS,eAAe,CAAC,KAAc;IACrC,OAAO,IAAI,CAAC,SAAS,CAAC,qBAAqB,CAAC,KAAK,CAAC,CAAC,CAAC;AACtD,CAAC;AAED,SAAS,qBAAqB,CAAC,KAAc;IAC3C,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACzB,OAAO,KAAK,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;IAC1C,CAAC;IAED,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;QAChD,OAAO,KAAK,CAAC;IACf,CAAC;IAED,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC;SACtB,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;SAChD,MAAM,CAA0B,CAAC,MAAM,EAAE,GAAG,EAAE,EAAE;QAC/C,MAAM,CAAC,GAAG,CAAC,GAAG,qBAAqB,CAAE,KAAiC,CAAC,GAAG,CAAC,CAAC,CAAC;QAC7E,OAAO,MAAM,CAAC;IAChB,CAAC,EAAE,EAAE,CAAC,CAAC;AACX,CAAC","sourcesContent":["import type {\n ApiScreenDataLoaderDefinition,\n BindingValue,\n DataSourceDiagnostic,\n OperationScreenDataLoaderDefinition,\n ScreenSpec,\n} from '@ankhorage/contracts';\nimport React from 'react';\n\nimport {\n createRuntimeBindingOperationKey,\n resolveBindingInputMapSync,\n resolveRuntimeBindingOperationSelection,\n type RuntimeBindingOperationExecutor,\n type RuntimeBindingOperationResultCache,\n type RuntimeBindingResolutionContext,\n} from './runtimeBindings';\n\nexport interface RuntimeScreenOperationLoaderState {\n readonly dependencyKey: string;\n readonly diagnostics: readonly DataSourceDiagnostic[];\n readonly operationResults: RuntimeBindingOperationResultCache;\n readonly renderVersion: number;\n}\n\nexport interface RuntimeScreenOperationLoaderExecutionResult {\n readonly dependencyKey: string;\n readonly diagnostics: readonly DataSourceDiagnostic[];\n readonly operationResults: RuntimeBindingOperationResultCache;\n}\n\nexport interface RuntimeScreenOperationLoaderLifecycle {\n readonly activeRequestId: number;\n readonly activeRequestKey: string | null;\n}\n\nconst EMPTY_RUNTIME_SCREEN_OPERATION_LOADER_DIAGNOSTICS = Object.freeze(\n [],\n) as readonly DataSourceDiagnostic[];\nconst EMPTY_RUNTIME_SCREEN_OPERATION_RESULTS = Object.freeze(\n {},\n) as RuntimeBindingOperationResultCache;\n\nexport function resolveScreenApiLoaders(\n screen: ScreenSpec,\n): readonly ApiScreenDataLoaderDefinition[] {\n return (screen.dataLoaders ?? []).filter(\n (loader): loader is ApiScreenDataLoaderDefinition => loader.kind === 'api',\n );\n}\n\nexport function resolveScreenOperationLoaders(\n screen: ScreenSpec,\n): readonly OperationScreenDataLoaderDefinition[] {\n return (screen.dataLoaders ?? []).filter(\n (loader): loader is OperationScreenDataLoaderDefinition => loader.kind === 'operation',\n );\n}\n\nexport function createRuntimeScreenLoaderRequestKey(args: {\n readonly screenId: string;\n readonly loaders: readonly OperationScreenDataLoaderDefinition[];\n readonly bindingContext?: Record<string, unknown>;\n readonly operationResults?: RuntimeBindingOperationResultCache;\n}): string {\n return createRuntimeScreenOperationLoaderPlan({\n bindingContext: args.bindingContext,\n loaders: args.loaders,\n operationResults: args.operationResults,\n screenId: args.screenId,\n }).requestKey;\n}\n\nexport function createRuntimeScreenOperationLoaderLifecycle(): RuntimeScreenOperationLoaderLifecycle {\n return {\n activeRequestId: 0,\n activeRequestKey: null,\n };\n}\n\nexport function createIdleRuntimeScreenOperationLoaderState(args: {\n readonly dependencyKey: string;\n readonly previousState?: RuntimeScreenOperationLoaderState;\n}): RuntimeScreenOperationLoaderState {\n return {\n dependencyKey: args.dependencyKey,\n diagnostics: EMPTY_RUNTIME_SCREEN_OPERATION_LOADER_DIAGNOSTICS,\n operationResults: EMPTY_RUNTIME_SCREEN_OPERATION_RESULTS,\n renderVersion: args.previousState?.renderVersion ?? 0,\n };\n}\n\nexport function createPendingRuntimeScreenOperationLoaderState(args: {\n readonly dependencyKey: string;\n readonly previousState?: RuntimeScreenOperationLoaderState;\n}): RuntimeScreenOperationLoaderState {\n return {\n dependencyKey: args.dependencyKey,\n diagnostics: [],\n operationResults: {},\n renderVersion: (args.previousState?.renderVersion ?? -1) + 1,\n };\n}\n\nexport function beginRuntimeScreenOperationLoaderRequest(args: {\n readonly hasLoaders: boolean;\n readonly lifecycle: RuntimeScreenOperationLoaderLifecycle;\n readonly requestKey: string;\n readonly state: RuntimeScreenOperationLoaderState;\n}): {\n readonly lifecycle: RuntimeScreenOperationLoaderLifecycle;\n readonly requestId?: number;\n readonly shouldExecute: boolean;\n readonly state: RuntimeScreenOperationLoaderState;\n} {\n if (!args.hasLoaders) {\n if (args.lifecycle.activeRequestKey === null) {\n return {\n lifecycle: args.lifecycle,\n shouldExecute: false,\n state: args.state,\n };\n }\n\n return {\n lifecycle: {\n activeRequestId: args.lifecycle.activeRequestId + 1,\n activeRequestKey: null,\n },\n shouldExecute: false,\n state: args.state,\n };\n }\n\n if (args.lifecycle.activeRequestKey === args.requestKey) {\n return {\n lifecycle: args.lifecycle,\n shouldExecute: false,\n state: args.state,\n };\n }\n\n const requestId = args.lifecycle.activeRequestId + 1;\n\n return {\n lifecycle: {\n activeRequestId: requestId,\n activeRequestKey: args.requestKey,\n },\n requestId,\n shouldExecute: true,\n state:\n args.state.dependencyKey === args.requestKey\n ? args.state\n : createPendingRuntimeScreenOperationLoaderState({\n dependencyKey: args.requestKey,\n previousState: args.state,\n }),\n };\n}\n\nexport function completeRuntimeScreenOperationLoaderRequest(args: {\n readonly lifecycle: RuntimeScreenOperationLoaderLifecycle;\n readonly requestId: number;\n readonly result: RuntimeScreenOperationLoaderExecutionResult;\n readonly state: RuntimeScreenOperationLoaderState;\n}): {\n readonly accepted: boolean;\n readonly state: RuntimeScreenOperationLoaderState;\n} {\n if (args.lifecycle.activeRequestId !== args.requestId) {\n return {\n accepted: false,\n state: args.state,\n };\n }\n\n return {\n accepted: true,\n state: {\n dependencyKey: args.result.dependencyKey,\n diagnostics: args.result.diagnostics,\n operationResults: args.result.operationResults,\n renderVersion: args.state.renderVersion,\n },\n };\n}\n\nexport async function executeRuntimeScreenOperationLoaders(args: {\n readonly bindingContext?: Record<string, unknown>;\n readonly dataSources?: RuntimeBindingResolutionContext['dataSources'];\n readonly executeOperation?: RuntimeBindingOperationExecutor;\n readonly operationResults?: RuntimeBindingOperationResultCache;\n readonly screen: ScreenSpec;\n readonly loaders: readonly OperationScreenDataLoaderDefinition[];\n}): Promise<RuntimeScreenOperationLoaderExecutionResult> {\n const plan = createRuntimeScreenOperationLoaderPlan({\n bindingContext: args.bindingContext,\n loaders: args.loaders,\n operationResults: args.operationResults,\n screenId: args.screen.id,\n });\n\n return executePreparedRuntimeScreenOperationLoaders({\n dataSources: args.dataSources,\n executeOperation: args.executeOperation,\n plan,\n screen: args.screen,\n });\n}\n\nfunction executePreparedRuntimeScreenOperationLoaders(args: {\n readonly dataSources?: RuntimeBindingResolutionContext['dataSources'];\n readonly executeOperation?: RuntimeBindingOperationExecutor;\n readonly plan: RuntimeScreenOperationLoaderPlan;\n readonly screen: ScreenSpec;\n}): Promise<RuntimeScreenOperationLoaderExecutionResult> {\n const diagnostics: DataSourceDiagnostic[] = [...args.plan.diagnostics];\n\n if (args.plan.loaders.length === 0) {\n return Promise.resolve({\n dependencyKey: args.plan.requestKey,\n diagnostics,\n operationResults: {},\n });\n }\n\n if (args.executeOperation === undefined) {\n diagnostics.push(\n ...args.plan.loaders.map((preparedLoader) =>\n createScreenOperationLoaderDiagnostic(\n preparedLoader.loader,\n 'missing-adapter',\n 'Screen operation loader requires an injected operation executor.',\n ),\n ),\n );\n\n return Promise.resolve({\n dependencyKey: args.plan.requestKey,\n diagnostics,\n operationResults: {},\n });\n }\n const { executeOperation } = args;\n\n return (async () => {\n const operationResults: Record<string, BindingValue | undefined> = {};\n\n for (const preparedLoader of args.plan.loaders) {\n const selection = resolveRuntimeBindingOperationSelection(\n preparedLoader.loader.operation,\n args.dataSources,\n diagnostics,\n );\n if (selection === undefined) {\n continue;\n }\n\n const result = await executeOperation({\n dataSource: selection.dataSource,\n endpoint: selection.endpoint,\n input: preparedLoader.input,\n node: args.screen.root,\n operation: preparedLoader.loader.operation,\n });\n diagnostics.push(...(result.diagnostics ?? []));\n\n if (!result.ok) {\n continue;\n }\n\n operationResults[preparedLoader.operationKey] = result.data;\n }\n\n return {\n dependencyKey: args.plan.requestKey,\n diagnostics,\n operationResults,\n };\n })();\n}\n\nexport function useRuntimeScreenOperationLoaders(args: {\n readonly bindingContext?: Record<string, unknown>;\n readonly dataSources?: RuntimeBindingResolutionContext['dataSources'];\n readonly executeOperation?: RuntimeBindingOperationExecutor;\n readonly operationResults?: RuntimeBindingOperationResultCache;\n readonly onDiagnostics?: (diagnostics: readonly DataSourceDiagnostic[]) => void;\n readonly screen: ScreenSpec;\n}): RuntimeScreenOperationLoaderState {\n const loaders = React.useMemo(() => resolveScreenOperationLoaders(args.screen), [args.screen]);\n const hasLoaders = loaders.length > 0;\n const plan = React.useMemo(\n () =>\n createRuntimeScreenOperationLoaderPlan({\n bindingContext: args.bindingContext,\n loaders,\n operationResults: args.operationResults,\n screenId: args.screen.id,\n }),\n [args.bindingContext, args.operationResults, args.screen.id, loaders],\n );\n const { requestKey } = plan;\n const emptyState = React.useMemo(\n () =>\n createIdleRuntimeScreenOperationLoaderState({\n dependencyKey: requestKey,\n }),\n [requestKey],\n );\n const [state, setState] = React.useState<RuntimeScreenOperationLoaderState>(() =>\n hasLoaders\n ? createPendingRuntimeScreenOperationLoaderState({ dependencyKey: requestKey })\n : emptyState,\n );\n const effectiveState = hasLoaders ? state : emptyState;\n const lastDiagnosticsKeyRef = React.useRef<string | null>(null);\n const latestStateRef = React.useRef(state);\n const lifecycleRef = React.useRef<RuntimeScreenOperationLoaderLifecycle>(\n createRuntimeScreenOperationLoaderLifecycle(),\n );\n const executionArgsByRequestKeyRef = React.useRef<\n Record<string, RuntimeScreenPreparedExecutionArgs>\n >({});\n\n executionArgsByRequestKeyRef.current[requestKey] = {\n dataSources: args.dataSources,\n executeOperation: args.executeOperation,\n plan,\n screen: args.screen,\n };\n latestStateRef.current = state;\n\n React.useEffect(() => {\n const request = beginRuntimeScreenOperationLoaderRequest({\n hasLoaders,\n lifecycle: lifecycleRef.current,\n requestKey,\n state: latestStateRef.current,\n });\n\n lifecycleRef.current = request.lifecycle;\n\n if (request.state !== latestStateRef.current) {\n setState(request.state);\n }\n\n if (!request.shouldExecute || request.requestId === undefined) {\n return;\n }\n const { requestId } = request;\n\n void (async () => {\n const executionArgs = executionArgsByRequestKeyRef.current[requestKey];\n if (executionArgs === undefined) {\n return;\n }\n\n const result = await executePreparedRuntimeScreenOperationLoaders(executionArgs);\n\n setState((currentState) => {\n const completion = completeRuntimeScreenOperationLoaderRequest({\n lifecycle: lifecycleRef.current,\n requestId,\n result,\n state: currentState,\n });\n\n return completion.accepted ? completion.state : currentState;\n });\n })();\n }, [hasLoaders, requestKey]);\n\n React.useEffect(() => {\n if (effectiveState.diagnostics.length === 0) {\n return;\n }\n\n const diagnosticsKey = stableSerialize(effectiveState.diagnostics);\n if (lastDiagnosticsKeyRef.current === diagnosticsKey) {\n return;\n }\n\n lastDiagnosticsKeyRef.current = diagnosticsKey;\n args.onDiagnostics?.(effectiveState.diagnostics);\n }, [args.onDiagnostics, effectiveState.diagnostics]);\n\n return effectiveState;\n}\n\ninterface PreparedRuntimeScreenOperationLoader {\n readonly input?: BindingValue;\n readonly loader: OperationScreenDataLoaderDefinition;\n readonly operationKey: string;\n}\n\ninterface RuntimeScreenOperationLoaderPlan {\n readonly diagnostics: readonly DataSourceDiagnostic[];\n readonly loaders: readonly PreparedRuntimeScreenOperationLoader[];\n readonly requestKey: string;\n}\n\ninterface RuntimeScreenPreparedExecutionArgs {\n readonly dataSources?: RuntimeBindingResolutionContext['dataSources'];\n readonly executeOperation?: RuntimeBindingOperationExecutor;\n readonly plan: RuntimeScreenOperationLoaderPlan;\n readonly screen: ScreenSpec;\n}\n\nfunction createRuntimeScreenOperationLoaderPlan(args: {\n readonly bindingContext?: Record<string, unknown>;\n readonly loaders: readonly OperationScreenDataLoaderDefinition[];\n readonly operationResults?: RuntimeBindingOperationResultCache;\n readonly screenId: string;\n}): RuntimeScreenOperationLoaderPlan {\n if (args.loaders.length === 0) {\n return {\n diagnostics: EMPTY_RUNTIME_SCREEN_OPERATION_LOADER_DIAGNOSTICS,\n loaders: [],\n requestKey: createRuntimeScreenOperationLoaderIdleKey(args.screenId),\n };\n }\n\n const diagnostics: DataSourceDiagnostic[] = [];\n const preparedLoaders: PreparedRuntimeScreenOperationLoader[] = [];\n const operationKeys = new Set<string>();\n\n for (const loader of args.loaders) {\n const input = resolveBindingInputMapSync(\n loader.input,\n {\n context: args.bindingContext,\n operationResults: args.operationResults,\n },\n diagnostics,\n );\n const operationKey = createRuntimeBindingOperationKey(loader.operation);\n if (operationKeys.has(operationKey)) {\n diagnostics.push(\n createScreenOperationLoaderDiagnostic(\n loader,\n 'duplicate-operation-id',\n `Screen operation loaders must not reuse operation key '${operationKey}' on the same screen.`,\n ),\n );\n continue;\n }\n\n operationKeys.add(operationKey);\n preparedLoaders.push({\n input,\n loader,\n operationKey,\n });\n }\n\n return {\n diagnostics,\n loaders: preparedLoaders,\n requestKey: createRuntimeScreenOperationLoaderPlanRequestKey({\n loaders: preparedLoaders,\n screenId: args.screenId,\n }),\n };\n}\n\nfunction createRuntimeScreenOperationLoaderPlanRequestKey(args: {\n readonly loaders: readonly PreparedRuntimeScreenOperationLoader[];\n readonly screenId: string;\n}): string {\n return stableSerialize({\n loaders: args.loaders.map((loader) => ({\n id: loader.loader.id,\n input: loader.input,\n operation: loader.loader.operation,\n operationKey: loader.operationKey,\n })),\n screenId: args.screenId,\n });\n}\n\nfunction createScreenOperationLoaderDiagnostic(\n loader: OperationScreenDataLoaderDefinition,\n code: DataSourceDiagnostic['code'],\n message: string,\n): DataSourceDiagnostic {\n return {\n code,\n dataSourceId: loader.operation.dataSourceId,\n endpointId: loader.operation.endpointId,\n operationId: loader.operation.operationId,\n message,\n severity: 'error',\n };\n}\n\nfunction createRuntimeScreenOperationLoaderIdleKey(screenId: string): string {\n return `screen:${screenId}:no-operation-loaders`;\n}\n\nfunction stableSerialize(value: unknown): string {\n return JSON.stringify(sortSerializableValue(value));\n}\n\nfunction sortSerializableValue(value: unknown): unknown {\n if (Array.isArray(value)) {\n return value.map(sortSerializableValue);\n }\n\n if (typeof value !== 'object' || value === null) {\n return value;\n }\n\n return Object.keys(value)\n .sort((left, right) => left.localeCompare(right))\n .reduce<Record<string, unknown>>((result, key) => {\n result[key] = sortSerializableValue((value as Record<string, unknown>)[key]);\n return result;\n }, {});\n}\n"]}
|
|
1
|
+
{"version":3,"file":"runtimeScreenLoaders.js","sourceRoot":"","sources":["../src/runtimeScreenLoaders.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EACL,gCAAgC,EAChC,0BAA0B,EAC1B,uCAAuC,GAIxC,MAAM,mBAAmB,CAAC;AAoB3B,MAAM,iDAAiD,GAAG,MAAM,CAAC,MAAM,CACrE,EAAE,CACgC,CAAC;AACrC,MAAM,sCAAsC,GAAG,MAAM,CAAC,MAAM,CAC1D,EAAE,CACmC,CAAC;AAExC,MAAM,UAAU,6BAA6B,CAC3C,MAAkB;IAElB,OAAO,MAAM,CAAC,WAAW,IAAI,EAAE,CAAC;AAClC,CAAC;AAED,MAAM,UAAU,mCAAmC,CAAC,IAKnD;IACC,OAAO,sCAAsC,CAAC;QAC5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QAAQ,uBAAuB,CAAC;AACnD,CAAC;AAED,SAAS,eAAe,CAAC,KAAc;IACrC,OAAO,IAAI,CAAC,SAAS,CAAC,qBAAqB,CAAC,KAAK,CAAC,CAAC,CAAC;AACtD,CAAC;AAED,SAAS,qBAAqB,CAAC,KAAc;IAC3C,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACzB,OAAO,KAAK,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;IAC1C,CAAC;IAED,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;QAChD,OAAO,KAAK,CAAC;IACf,CAAC;IAED,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC;SACtB,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;SAChD,MAAM,CAA0B,CAAC,MAAM,EAAE,GAAG,EAAE,EAAE;QAC/C,MAAM,CAAC,GAAG,CAAC,GAAG,qBAAqB,CAAE,KAAiC,CAAC,GAAG,CAAC,CAAC,CAAC;QAC7E,OAAO,MAAM,CAAC;IAChB,CAAC,EAAE,EAAE,CAAC,CAAC;AACX,CAAC","sourcesContent":["import type {\n BindingValue,\n DataSourceDiagnostic,\n OperationScreenDataLoaderDefinition,\n ScreenSpec,\n} from '@ankhorage/contracts';\nimport React from 'react';\n\nimport {\n createRuntimeBindingOperationKey,\n resolveBindingInputMapSync,\n resolveRuntimeBindingOperationSelection,\n type RuntimeBindingOperationExecutor,\n type RuntimeBindingOperationResultCache,\n type RuntimeBindingResolutionContext,\n} from './runtimeBindings';\n\nexport interface RuntimeScreenOperationLoaderState {\n readonly dependencyKey: string;\n readonly diagnostics: readonly DataSourceDiagnostic[];\n readonly operationResults: RuntimeBindingOperationResultCache;\n readonly renderVersion: number;\n}\n\nexport interface RuntimeScreenOperationLoaderExecutionResult {\n readonly dependencyKey: string;\n readonly diagnostics: readonly DataSourceDiagnostic[];\n readonly operationResults: RuntimeBindingOperationResultCache;\n}\n\nexport interface RuntimeScreenOperationLoaderLifecycle {\n readonly activeRequestId: number;\n readonly activeRequestKey: string | null;\n}\n\nconst EMPTY_RUNTIME_SCREEN_OPERATION_LOADER_DIAGNOSTICS = Object.freeze(\n [],\n) as readonly DataSourceDiagnostic[];\nconst EMPTY_RUNTIME_SCREEN_OPERATION_RESULTS = Object.freeze(\n {},\n) as RuntimeBindingOperationResultCache;\n\nexport function resolveScreenOperationLoaders(\n screen: ScreenSpec,\n): readonly OperationScreenDataLoaderDefinition[] {\n return screen.dataLoaders ?? [];\n}\n\nexport function createRuntimeScreenLoaderRequestKey(args: {\n readonly screenId: string;\n readonly loaders: readonly OperationScreenDataLoaderDefinition[];\n readonly bindingContext?: Record<string, unknown>;\n readonly operationResults?: RuntimeBindingOperationResultCache;\n}): string {\n return createRuntimeScreenOperationLoaderPlan({\n bindingContext: args.bindingContext,\n loaders: args.loaders,\n operationResults: args.operationResults,\n screenId: args.screenId,\n }).requestKey;\n}\n\nexport function createRuntimeScreenOperationLoaderLifecycle(): RuntimeScreenOperationLoaderLifecycle {\n return {\n activeRequestId: 0,\n activeRequestKey: null,\n };\n}\n\nexport function createIdleRuntimeScreenOperationLoaderState(args: {\n readonly dependencyKey: string;\n readonly previousState?: RuntimeScreenOperationLoaderState;\n}): RuntimeScreenOperationLoaderState {\n return {\n dependencyKey: args.dependencyKey,\n diagnostics: EMPTY_RUNTIME_SCREEN_OPERATION_LOADER_DIAGNOSTICS,\n operationResults: EMPTY_RUNTIME_SCREEN_OPERATION_RESULTS,\n renderVersion: args.previousState?.renderVersion ?? 0,\n };\n}\n\nexport function createPendingRuntimeScreenOperationLoaderState(args: {\n readonly dependencyKey: string;\n readonly previousState?: RuntimeScreenOperationLoaderState;\n}): RuntimeScreenOperationLoaderState {\n return {\n dependencyKey: args.dependencyKey,\n diagnostics: [],\n operationResults: {},\n renderVersion: (args.previousState?.renderVersion ?? -1) + 1,\n };\n}\n\nexport function beginRuntimeScreenOperationLoaderRequest(args: {\n readonly hasLoaders: boolean;\n readonly lifecycle: RuntimeScreenOperationLoaderLifecycle;\n readonly requestKey: string;\n readonly state: RuntimeScreenOperationLoaderState;\n}): {\n readonly lifecycle: RuntimeScreenOperationLoaderLifecycle;\n readonly requestId?: number;\n readonly shouldExecute: boolean;\n readonly state: RuntimeScreenOperationLoaderState;\n} {\n if (!args.hasLoaders) {\n if (args.lifecycle.activeRequestKey === null) {\n return {\n lifecycle: args.lifecycle,\n shouldExecute: false,\n state: args.state,\n };\n }\n\n return {\n lifecycle: {\n activeRequestId: args.lifecycle.activeRequestId + 1,\n activeRequestKey: null,\n },\n shouldExecute: false,\n state: args.state,\n };\n }\n\n if (args.lifecycle.activeRequestKey === args.requestKey) {\n return {\n lifecycle: args.lifecycle,\n shouldExecute: false,\n state: args.state,\n };\n }\n\n const requestId = args.lifecycle.activeRequestId + 1;\n\n return {\n lifecycle: {\n activeRequestId: requestId,\n activeRequestKey: args.requestKey,\n },\n requestId,\n shouldExecute: true,\n state:\n args.state.dependencyKey === args.requestKey\n ? args.state\n : createPendingRuntimeScreenOperationLoaderState({\n dependencyKey: args.requestKey,\n previousState: args.state,\n }),\n };\n}\n\nexport function completeRuntimeScreenOperationLoaderRequest(args: {\n readonly lifecycle: RuntimeScreenOperationLoaderLifecycle;\n readonly requestId: number;\n readonly result: RuntimeScreenOperationLoaderExecutionResult;\n readonly state: RuntimeScreenOperationLoaderState;\n}): {\n readonly accepted: boolean;\n readonly state: RuntimeScreenOperationLoaderState;\n} {\n if (args.lifecycle.activeRequestId !== args.requestId) {\n return {\n accepted: false,\n state: args.state,\n };\n }\n\n return {\n accepted: true,\n state: {\n dependencyKey: args.result.dependencyKey,\n diagnostics: args.result.diagnostics,\n operationResults: args.result.operationResults,\n renderVersion: args.state.renderVersion,\n },\n };\n}\n\nexport async function executeRuntimeScreenOperationLoaders(args: {\n readonly bindingContext?: Record<string, unknown>;\n readonly dataSources?: RuntimeBindingResolutionContext['dataSources'];\n readonly executeOperation?: RuntimeBindingOperationExecutor;\n readonly operationResults?: RuntimeBindingOperationResultCache;\n readonly screen: ScreenSpec;\n readonly loaders: readonly OperationScreenDataLoaderDefinition[];\n}): Promise<RuntimeScreenOperationLoaderExecutionResult> {\n const plan = createRuntimeScreenOperationLoaderPlan({\n bindingContext: args.bindingContext,\n loaders: args.loaders,\n operationResults: args.operationResults,\n screenId: args.screen.id,\n });\n\n return executePreparedRuntimeScreenOperationLoaders({\n dataSources: args.dataSources,\n executeOperation: args.executeOperation,\n plan,\n screen: args.screen,\n });\n}\n\nfunction executePreparedRuntimeScreenOperationLoaders(args: {\n readonly dataSources?: RuntimeBindingResolutionContext['dataSources'];\n readonly executeOperation?: RuntimeBindingOperationExecutor;\n readonly plan: RuntimeScreenOperationLoaderPlan;\n readonly screen: ScreenSpec;\n}): Promise<RuntimeScreenOperationLoaderExecutionResult> {\n const diagnostics: DataSourceDiagnostic[] = [...args.plan.diagnostics];\n\n if (args.plan.loaders.length === 0) {\n return Promise.resolve({\n dependencyKey: args.plan.requestKey,\n diagnostics,\n operationResults: {},\n });\n }\n\n if (args.executeOperation === undefined) {\n diagnostics.push(\n ...args.plan.loaders.map((preparedLoader) =>\n createScreenOperationLoaderDiagnostic(\n preparedLoader.loader,\n 'missing-adapter',\n 'Screen operation loader requires an injected operation executor.',\n ),\n ),\n );\n\n return Promise.resolve({\n dependencyKey: args.plan.requestKey,\n diagnostics,\n operationResults: {},\n });\n }\n const { executeOperation } = args;\n\n return (async () => {\n const operationResults: Record<string, BindingValue | undefined> = {};\n\n for (const preparedLoader of args.plan.loaders) {\n const selection = resolveRuntimeBindingOperationSelection(\n preparedLoader.loader.operation,\n args.dataSources,\n diagnostics,\n );\n if (selection === undefined) {\n continue;\n }\n\n const result = await executeOperation({\n dataSource: selection.dataSource,\n endpoint: selection.endpoint,\n input: preparedLoader.input,\n node: args.screen.root,\n operation: preparedLoader.loader.operation,\n });\n diagnostics.push(...(result.diagnostics ?? []));\n\n if (!result.ok) {\n continue;\n }\n\n operationResults[preparedLoader.operationKey] = result.data;\n }\n\n return {\n dependencyKey: args.plan.requestKey,\n diagnostics,\n operationResults,\n };\n })();\n}\n\nexport function useRuntimeScreenOperationLoaders(args: {\n readonly bindingContext?: Record<string, unknown>;\n readonly dataSources?: RuntimeBindingResolutionContext['dataSources'];\n readonly executeOperation?: RuntimeBindingOperationExecutor;\n readonly operationResults?: RuntimeBindingOperationResultCache;\n readonly onDiagnostics?: (diagnostics: readonly DataSourceDiagnostic[]) => void;\n readonly screen: ScreenSpec;\n}): RuntimeScreenOperationLoaderState {\n const loaders = React.useMemo(() => resolveScreenOperationLoaders(args.screen), [args.screen]);\n const hasLoaders = loaders.length > 0;\n const plan = React.useMemo(\n () =>\n createRuntimeScreenOperationLoaderPlan({\n bindingContext: args.bindingContext,\n loaders,\n operationResults: args.operationResults,\n screenId: args.screen.id,\n }),\n [args.bindingContext, args.operationResults, args.screen.id, loaders],\n );\n const { requestKey } = plan;\n const emptyState = React.useMemo(\n () =>\n createIdleRuntimeScreenOperationLoaderState({\n dependencyKey: requestKey,\n }),\n [requestKey],\n );\n const [state, setState] = React.useState<RuntimeScreenOperationLoaderState>(() =>\n hasLoaders\n ? createPendingRuntimeScreenOperationLoaderState({ dependencyKey: requestKey })\n : emptyState,\n );\n const effectiveState = hasLoaders ? state : emptyState;\n const lastDiagnosticsKeyRef = React.useRef<string | null>(null);\n const latestStateRef = React.useRef(state);\n const lifecycleRef = React.useRef<RuntimeScreenOperationLoaderLifecycle>(\n createRuntimeScreenOperationLoaderLifecycle(),\n );\n const executionArgsByRequestKeyRef = React.useRef<\n Record<string, RuntimeScreenPreparedExecutionArgs>\n >({});\n\n executionArgsByRequestKeyRef.current[requestKey] = {\n dataSources: args.dataSources,\n executeOperation: args.executeOperation,\n plan,\n screen: args.screen,\n };\n latestStateRef.current = state;\n\n React.useEffect(() => {\n const request = beginRuntimeScreenOperationLoaderRequest({\n hasLoaders,\n lifecycle: lifecycleRef.current,\n requestKey,\n state: latestStateRef.current,\n });\n\n lifecycleRef.current = request.lifecycle;\n\n if (request.state !== latestStateRef.current) {\n setState(request.state);\n }\n\n if (!request.shouldExecute || request.requestId === undefined) {\n return;\n }\n const { requestId } = request;\n\n void (async () => {\n const executionArgs = executionArgsByRequestKeyRef.current[requestKey];\n if (executionArgs === undefined) {\n return;\n }\n\n const result = await executePreparedRuntimeScreenOperationLoaders(executionArgs);\n\n setState((currentState) => {\n const completion = completeRuntimeScreenOperationLoaderRequest({\n lifecycle: lifecycleRef.current,\n requestId,\n result,\n state: currentState,\n });\n\n return completion.accepted ? completion.state : currentState;\n });\n })();\n }, [hasLoaders, requestKey]);\n\n React.useEffect(() => {\n if (effectiveState.diagnostics.length === 0) {\n return;\n }\n\n const diagnosticsKey = stableSerialize(effectiveState.diagnostics);\n if (lastDiagnosticsKeyRef.current === diagnosticsKey) {\n return;\n }\n\n lastDiagnosticsKeyRef.current = diagnosticsKey;\n args.onDiagnostics?.(effectiveState.diagnostics);\n }, [args.onDiagnostics, effectiveState.diagnostics]);\n\n return effectiveState;\n}\n\ninterface PreparedRuntimeScreenOperationLoader {\n readonly input?: BindingValue;\n readonly loader: OperationScreenDataLoaderDefinition;\n readonly operationKey: string;\n}\n\ninterface RuntimeScreenOperationLoaderPlan {\n readonly diagnostics: readonly DataSourceDiagnostic[];\n readonly loaders: readonly PreparedRuntimeScreenOperationLoader[];\n readonly requestKey: string;\n}\n\ninterface RuntimeScreenPreparedExecutionArgs {\n readonly dataSources?: RuntimeBindingResolutionContext['dataSources'];\n readonly executeOperation?: RuntimeBindingOperationExecutor;\n readonly plan: RuntimeScreenOperationLoaderPlan;\n readonly screen: ScreenSpec;\n}\n\nfunction createRuntimeScreenOperationLoaderPlan(args: {\n readonly bindingContext?: Record<string, unknown>;\n readonly loaders: readonly OperationScreenDataLoaderDefinition[];\n readonly operationResults?: RuntimeBindingOperationResultCache;\n readonly screenId: string;\n}): RuntimeScreenOperationLoaderPlan {\n if (args.loaders.length === 0) {\n return {\n diagnostics: EMPTY_RUNTIME_SCREEN_OPERATION_LOADER_DIAGNOSTICS,\n loaders: [],\n requestKey: createRuntimeScreenOperationLoaderIdleKey(args.screenId),\n };\n }\n\n const diagnostics: DataSourceDiagnostic[] = [];\n const preparedLoaders: PreparedRuntimeScreenOperationLoader[] = [];\n const operationKeys = new Set<string>();\n\n for (const loader of args.loaders) {\n const input = resolveBindingInputMapSync(\n loader.input,\n {\n context: args.bindingContext,\n operationResults: args.operationResults,\n },\n diagnostics,\n );\n const operationKey = createRuntimeBindingOperationKey(loader.operation);\n if (operationKeys.has(operationKey)) {\n diagnostics.push(\n createScreenOperationLoaderDiagnostic(\n loader,\n 'duplicate-operation-id',\n `Screen operation loaders must not reuse operation key '${operationKey}' on the same screen.`,\n ),\n );\n continue;\n }\n\n operationKeys.add(operationKey);\n preparedLoaders.push({\n input,\n loader,\n operationKey,\n });\n }\n\n return {\n diagnostics,\n loaders: preparedLoaders,\n requestKey: createRuntimeScreenOperationLoaderPlanRequestKey({\n loaders: preparedLoaders,\n screenId: args.screenId,\n }),\n };\n}\n\nfunction createRuntimeScreenOperationLoaderPlanRequestKey(args: {\n readonly loaders: readonly PreparedRuntimeScreenOperationLoader[];\n readonly screenId: string;\n}): string {\n return stableSerialize({\n loaders: args.loaders.map((loader) => ({\n id: loader.loader.id,\n input: loader.input,\n operation: loader.loader.operation,\n operationKey: loader.operationKey,\n })),\n screenId: args.screenId,\n });\n}\n\nfunction createScreenOperationLoaderDiagnostic(\n loader: OperationScreenDataLoaderDefinition,\n code: DataSourceDiagnostic['code'],\n message: string,\n): DataSourceDiagnostic {\n return {\n code,\n dataSourceId: loader.operation.dataSourceId,\n endpointId: loader.operation.endpointId,\n operationId: loader.operation.operationId,\n message,\n severity: 'error',\n };\n}\n\nfunction createRuntimeScreenOperationLoaderIdleKey(screenId: string): string {\n return `screen:${screenId}:no-operation-loaders`;\n}\n\nfunction stableSerialize(value: unknown): string {\n return JSON.stringify(sortSerializableValue(value));\n}\n\nfunction sortSerializableValue(value: unknown): unknown {\n if (Array.isArray(value)) {\n return value.map(sortSerializableValue);\n }\n\n if (typeof value !== 'object' || value === null) {\n return value;\n }\n\n return Object.keys(value)\n .sort((left, right) => left.localeCompare(right))\n .reduce<Record<string, unknown>>((result, key) => {\n result[key] = sortSerializableValue((value as Record<string, unknown>)[key]);\n return result;\n }, {});\n}\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { MediaAssetRegistry } from '@ankhorage/contracts';
|
|
2
|
+
import { type RuntimeMediaAssetResolver, type RuntimeMediaResolutionCache } from './runtimeMedia';
|
|
3
|
+
export declare function useRuntimeMediaProps(args: {
|
|
4
|
+
readonly props: Record<string, unknown>;
|
|
5
|
+
readonly mediaAssets?: MediaAssetRegistry;
|
|
6
|
+
readonly resolveMediaAsset?: RuntimeMediaAssetResolver;
|
|
7
|
+
readonly cache: RuntimeMediaResolutionCache;
|
|
8
|
+
}): Record<string, unknown>;
|
|
9
|
+
//# sourceMappingURL=useRuntimeMediaProps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useRuntimeMediaProps.d.ts","sourceRoot":"","sources":["../src/useRuntimeMediaProps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAG/D,OAAO,EAKL,KAAK,yBAAyB,EAC9B,KAAK,2BAA2B,EAEjC,MAAM,gBAAgB,CAAC;AAExB,wBAAgB,oBAAoB,CAAC,IAAI,EAAE;IACzC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACxC,QAAQ,CAAC,WAAW,CAAC,EAAE,kBAAkB,CAAC;IAC1C,QAAQ,CAAC,iBAAiB,CAAC,EAAE,yBAAyB,CAAC;IACvD,QAAQ,CAAC,KAAK,EAAE,2BAA2B,CAAC;CAC7C,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAyC1B"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { collectRuntimeMediaReferenceIds, createSyncRuntimeMediaResolutionMap, replaceRuntimeMediaReferences, resolveRuntimeMediaAsset, } from './runtimeMedia';
|
|
3
|
+
export function useRuntimeMediaProps(args) {
|
|
4
|
+
const ids = collectRuntimeMediaReferenceIds(args.props);
|
|
5
|
+
const idsKey = ids.join('\u0000');
|
|
6
|
+
const [asyncResolved, setAsyncResolved] = React.useState(() => new Map());
|
|
7
|
+
React.useEffect(() => {
|
|
8
|
+
let active = true;
|
|
9
|
+
const effectIds = idsKey.length === 0 ? [] : idsKey.split('\u0000');
|
|
10
|
+
const currentIds = new Set(effectIds);
|
|
11
|
+
setAsyncResolved((current) => filterResolvedValues(current, currentIds));
|
|
12
|
+
for (const id of effectIds) {
|
|
13
|
+
const asset = args.mediaAssets?.[id];
|
|
14
|
+
if (!asset || asset.source.kind === 'url')
|
|
15
|
+
continue;
|
|
16
|
+
void resolveRuntimeMediaAsset(asset, args.resolveMediaAsset, args.cache).then((value) => {
|
|
17
|
+
if (!active || value === null)
|
|
18
|
+
return;
|
|
19
|
+
setAsyncResolved((current) => {
|
|
20
|
+
if (current.get(id) === value)
|
|
21
|
+
return current;
|
|
22
|
+
const next = new Map(current);
|
|
23
|
+
next.set(id, value);
|
|
24
|
+
return next;
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
return () => {
|
|
29
|
+
active = false;
|
|
30
|
+
};
|
|
31
|
+
}, [args.cache, args.mediaAssets, args.resolveMediaAsset, idsKey]);
|
|
32
|
+
const resolved = createSyncRuntimeMediaResolutionMap(ids, args.mediaAssets);
|
|
33
|
+
const currentIds = new Set(ids);
|
|
34
|
+
asyncResolved.forEach((value, id) => {
|
|
35
|
+
if (currentIds.has(id))
|
|
36
|
+
resolved.set(id, value);
|
|
37
|
+
});
|
|
38
|
+
const replaced = replaceRuntimeMediaReferences(args.props, resolved);
|
|
39
|
+
return isRecord(replaced) ? replaced : {};
|
|
40
|
+
}
|
|
41
|
+
function filterResolvedValues(current, ids) {
|
|
42
|
+
const next = new Map();
|
|
43
|
+
current.forEach((value, id) => {
|
|
44
|
+
if (ids.has(id))
|
|
45
|
+
next.set(id, value);
|
|
46
|
+
});
|
|
47
|
+
return mapsEqual(current, next) ? current : next;
|
|
48
|
+
}
|
|
49
|
+
function mapsEqual(left, right) {
|
|
50
|
+
if (left.size !== right.size)
|
|
51
|
+
return false;
|
|
52
|
+
for (const [key, value] of left) {
|
|
53
|
+
if (right.get(key) !== value)
|
|
54
|
+
return false;
|
|
55
|
+
}
|
|
56
|
+
return true;
|
|
57
|
+
}
|
|
58
|
+
function isRecord(value) {
|
|
59
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=useRuntimeMediaProps.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useRuntimeMediaProps.js","sourceRoot":"","sources":["../src/useRuntimeMediaProps.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EACL,+BAA+B,EAC/B,mCAAmC,EACnC,6BAA6B,EAC7B,wBAAwB,GAIzB,MAAM,gBAAgB,CAAC;AAExB,MAAM,UAAU,oBAAoB,CAAC,IAKpC;IACC,MAAM,GAAG,GAAG,+BAA+B,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACxD,MAAM,MAAM,GAAG,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAClC,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,KAAK,CAAC,QAAQ,CACtD,GAAG,EAAE,CAAC,IAAI,GAAG,EAAqC,CACnD,CAAC;IAEF,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,IAAI,MAAM,GAAG,IAAI,CAAC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IAC7C,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC","sourcesContent":["import type { MediaAssetRegistry } from '@ankhorage/contracts';\nimport React from 'react';\n\nimport {\n collectRuntimeMediaReferenceIds,\n createSyncRuntimeMediaResolutionMap,\n replaceRuntimeMediaReferences,\n resolveRuntimeMediaAsset,\n type RuntimeMediaAssetResolver,\n type RuntimeMediaResolutionCache,\n type RuntimeResolvedMediaValue,\n} from './runtimeMedia';\n\nexport function useRuntimeMediaProps(args: {\n readonly props: Record<string, unknown>;\n readonly mediaAssets?: MediaAssetRegistry;\n readonly resolveMediaAsset?: RuntimeMediaAssetResolver;\n readonly cache: RuntimeMediaResolutionCache;\n}): Record<string, unknown> {\n const ids = collectRuntimeMediaReferenceIds(args.props);\n const idsKey = ids.join('\\u0000');\n const [asyncResolved, setAsyncResolved] = React.useState(\n () => new Map<string, RuntimeResolvedMediaValue>(),\n );\n\n React.useEffect(() => {\n let active = true;\n const effectIds = idsKey.length === 0 ? [] : idsKey.split('\\u0000');\n const currentIds = new Set(effectIds);\n setAsyncResolved((current) => filterResolvedValues(current, currentIds));\n\n for (const id of effectIds) {\n const asset = args.mediaAssets?.[id];\n if (!asset || asset.source.kind === 'url') continue;\n\n void resolveRuntimeMediaAsset(asset, args.resolveMediaAsset, args.cache).then((value) => {\n if (!active || value === null) return;\n setAsyncResolved((current) => {\n if (current.get(id) === value) return current;\n const next = new Map(current);\n next.set(id, value);\n return next;\n });\n });\n }\n\n return () => {\n active = false;\n };\n }, [args.cache, args.mediaAssets, args.resolveMediaAsset, idsKey]);\n\n const resolved = createSyncRuntimeMediaResolutionMap(ids, args.mediaAssets);\n const currentIds = new Set(ids);\n asyncResolved.forEach((value, id) => {\n if (currentIds.has(id)) resolved.set(id, value);\n });\n\n const replaced = replaceRuntimeMediaReferences(args.props, resolved);\n return isRecord(replaced) ? replaced : {};\n}\n\nfunction filterResolvedValues(\n current: Map<string, RuntimeResolvedMediaValue>,\n ids: ReadonlySet<string>,\n): Map<string, RuntimeResolvedMediaValue> {\n const next = new Map<string, RuntimeResolvedMediaValue>();\n current.forEach((value, id) => {\n if (ids.has(id)) next.set(id, value);\n });\n return mapsEqual(current, next) ? current : next;\n}\n\nfunction mapsEqual(\n left: ReadonlyMap<string, RuntimeResolvedMediaValue>,\n right: ReadonlyMap<string, RuntimeResolvedMediaValue>,\n): boolean {\n if (left.size !== right.size) return false;\n for (const [key, value] of left) {\n if (right.get(key) !== value) return false;\n }\n return true;\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ankhorage/runtime",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Platform-neutral runtime renderer, contracts, and helpers for Ankhorage generated apps.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
"runtime",
|
|
20
20
|
"manifest",
|
|
21
21
|
"bindings",
|
|
22
|
+
"media",
|
|
22
23
|
"adapters",
|
|
23
24
|
"typescript"
|
|
24
25
|
],
|
|
@@ -59,8 +60,8 @@
|
|
|
59
60
|
"version-packages": "changeset version"
|
|
60
61
|
},
|
|
61
62
|
"dependencies": {
|
|
62
|
-
"@ankhorage/contracts": "^
|
|
63
|
-
"@ankhorage/data-sources": "^0.
|
|
63
|
+
"@ankhorage/contracts": "^7.4.0",
|
|
64
|
+
"@ankhorage/data-sources": "^1.0.0"
|
|
64
65
|
},
|
|
65
66
|
"peerDependencies": {
|
|
66
67
|
"react": "19.1.0",
|
|
@@ -68,7 +69,7 @@
|
|
|
68
69
|
},
|
|
69
70
|
"devDependencies": {
|
|
70
71
|
"@ankhorage/devtools": "^1.0.6",
|
|
71
|
-
"@ankhorage/paradox": "^0.1.
|
|
72
|
+
"@ankhorage/paradox": "^0.1.21",
|
|
72
73
|
"@changesets/cli": "^2.31.0",
|
|
73
74
|
"@types/bun": "^1.3.13",
|
|
74
75
|
"@types/node": "^25.6.0",
|
package/paradox/badges/npm.svg
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="90" height="20" role="img" aria-label="npm:
|
|
2
|
-
<title>npm:
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="90" height="20" role="img" aria-label="npm: v1.0.0">
|
|
2
|
+
<title>npm: v1.0.0</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">
|
|
6
|
+
<text x="64" y="14" fill="#ffffff" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" font-size="11" text-anchor="middle">v1.0.0</text>
|
|
7
7
|
</svg>
|
package/paradox/components.md
CHANGED
|
@@ -26,7 +26,7 @@ Export paths: `src/index.ts`
|
|
|
26
26
|
|
|
27
27
|
## RuntimeRenderer
|
|
28
28
|
|
|
29
|
-
Source: `src/RuntimeRenderer.tsx:
|
|
29
|
+
Source: `src/RuntimeRenderer.tsx:76:1`
|
|
30
30
|
|
|
31
31
|
Export paths: `src/index.ts`
|
|
32
32
|
|
|
@@ -41,16 +41,18 @@ Export paths: `src/index.ts`
|
|
|
41
41
|
| executeAction | `RuntimeActionExecutor \| undefined` | no | — | |
|
|
42
42
|
| executeOperation | `RuntimeBindingOperationExecutor \| undefined` | no | — | |
|
|
43
43
|
| isRoot | `boolean \| undefined` | no | — | |
|
|
44
|
+
| mediaAssets | `MediaAssetRegistry \| undefined` | no | — | |
|
|
44
45
|
| node | `UiNode` | yes | — | |
|
|
45
46
|
| onDiagnostics | `(diagnostics: readonly DataSourceDiagnostic[]) => void \| undefined` | no | — | |
|
|
46
47
|
| operationResults | `RuntimeBindingOperationResultCache \| undefined` | no | — | |
|
|
47
48
|
| registry | `ComponentRegistry \| undefined` | no | — | |
|
|
49
|
+
| resolveMediaAsset | `RuntimeMediaAssetResolver \| undefined` | no | — | |
|
|
48
50
|
| stateAdapter | `StateAdapter \| undefined` | no | — | |
|
|
49
51
|
| wrapNode | `(args: RuntimeRendererWrapArgs) => React.ReactNode \| undefined` | no | — | |
|
|
50
52
|
|
|
51
53
|
## RuntimeRendererConfigProvider
|
|
52
54
|
|
|
53
|
-
Source: `src/RuntimeRendererConfig.tsx:
|
|
55
|
+
Source: `src/RuntimeRendererConfig.tsx:158:1`
|
|
54
56
|
|
|
55
57
|
Export paths: `src/index.ts`
|
|
56
58
|
|
|
@@ -61,7 +63,7 @@ Export paths: `src/index.ts`
|
|
|
61
63
|
|
|
62
64
|
## RuntimeScreen
|
|
63
65
|
|
|
64
|
-
Source: `src/RuntimeScreen.tsx:
|
|
66
|
+
Source: `src/RuntimeScreen.tsx:17:1`
|
|
65
67
|
|
|
66
68
|
Export paths: `src/index.ts`
|
|
67
69
|
|
|
@@ -29,26 +29,22 @@ graph TD
|
|
|
29
29
|
package__ankhorage_runtime -.-> module_src_runtimeActionRegistry_ts
|
|
30
30
|
module_src_runtimeActionRegistry_ts --> module_src_runtimeBindings_ts
|
|
31
31
|
module_src_runtimeActionRegistry_ts --> module_src_RuntimeRendererConfig_tsx
|
|
32
|
-
module_src_runtimeApiLoaders_test_ts["src/runtimeApiLoaders.test.ts"]
|
|
33
|
-
package__ankhorage_runtime -.-> module_src_runtimeApiLoaders_test_ts
|
|
34
|
-
module_src_runtimeApiLoaders_test_ts --> module_src_runtimeApiLoaders_ts
|
|
35
|
-
module_src_runtimeApiLoaders_test_ts --> module_src_runtimeBindings_ts
|
|
36
|
-
module_src_runtimeApiLoaders_test_ts --> module_src_runtimeStateAdapter_ts
|
|
37
|
-
module_src_runtimeApiLoaders_ts["src/runtimeApiLoaders.ts"]
|
|
38
|
-
package__ankhorage_runtime -.-> module_src_runtimeApiLoaders_ts
|
|
39
|
-
module_src_runtimeApiLoaders_ts --> module_src_runtimeStateAdapter_ts
|
|
40
32
|
module_src_runtimeBindings_test_ts["src/runtimeBindings.test.ts"]
|
|
41
33
|
package__ankhorage_runtime -.-> module_src_runtimeBindings_test_ts
|
|
42
34
|
module_src_runtimeBindings_test_ts --> module_src_runtimeBindings_ts
|
|
43
35
|
module_src_runtimeBindings_test_ts --> module_src_runtimeNodeProps_ts
|
|
44
36
|
module_src_runtimeBindings_ts["src/runtimeBindings.ts"]
|
|
45
37
|
package__ankhorage_runtime -.-> module_src_runtimeBindings_ts
|
|
38
|
+
module_src_runtimeDatabaseOperationExecutor_ts["src/runtimeDatabaseOperationExecutor.ts"]
|
|
39
|
+
package__ankhorage_runtime -.-> module_src_runtimeDatabaseOperationExecutor_ts
|
|
40
|
+
module_src_runtimeDatabaseOperationExecutor_ts --> module_src_runtimeBindings_ts
|
|
46
41
|
module_src_runtimeDataSourceOperations_test_ts["src/runtimeDataSourceOperations.test.ts"]
|
|
47
42
|
package__ankhorage_runtime -.-> module_src_runtimeDataSourceOperations_test_ts
|
|
48
43
|
module_src_runtimeDataSourceOperations_test_ts --> module_src_runtimeDataSourceOperations_ts
|
|
49
44
|
module_src_runtimeDataSourceOperations_ts["src/runtimeDataSourceOperations.ts"]
|
|
50
45
|
package__ankhorage_runtime -.-> module_src_runtimeDataSourceOperations_ts
|
|
51
46
|
module_src_runtimeDataSourceOperations_ts --> module_src_runtimeBindings_ts
|
|
47
|
+
module_src_runtimeDataSourceOperations_ts --> module_src_runtimeDatabaseOperationExecutor_ts
|
|
52
48
|
module_src_runtimeDbPersist_test_ts["src/runtimeDbPersist.test.ts"]
|
|
53
49
|
package__ankhorage_runtime -.-> module_src_runtimeDbPersist_test_ts
|
|
54
50
|
module_src_runtimeDbPersist_test_ts --> module_src_runtimeActionRegistry_ts
|
|
@@ -65,6 +61,17 @@ graph TD
|
|
|
65
61
|
module_src_runtimeEventExecution_ts --> module_src_RuntimeRendererConfig_tsx
|
|
66
62
|
module_src_runtimeManifest_ts["src/runtimeManifest.ts"]
|
|
67
63
|
package__ankhorage_runtime -.-> module_src_runtimeManifest_ts
|
|
64
|
+
module_src_runtimeMedia_test_ts["src/runtimeMedia.test.ts"]
|
|
65
|
+
package__ankhorage_runtime -.-> module_src_runtimeMedia_test_ts
|
|
66
|
+
module_src_runtimeMedia_test_ts --> module_src_runtimeMedia_ts
|
|
67
|
+
module_src_runtimeMedia_ts["src/runtimeMedia.ts"]
|
|
68
|
+
package__ankhorage_runtime -.-> module_src_runtimeMedia_ts
|
|
69
|
+
module_src_runtimeMediaCache_tsx["src/runtimeMediaCache.tsx"]
|
|
70
|
+
package__ankhorage_runtime -.-> module_src_runtimeMediaCache_tsx
|
|
71
|
+
module_src_runtimeMediaCache_tsx --> module_src_runtimeMedia_ts
|
|
72
|
+
module_src_runtimeMediaConfig_test_ts["src/runtimeMediaConfig.test.ts"]
|
|
73
|
+
package__ankhorage_runtime -.-> module_src_runtimeMediaConfig_test_ts
|
|
74
|
+
module_src_runtimeMediaConfig_test_ts --> module_src_RuntimeRendererConfig_tsx
|
|
68
75
|
module_src_runtimeNodeProps_test_ts["src/runtimeNodeProps.test.ts"]
|
|
69
76
|
package__ankhorage_runtime -.-> module_src_runtimeNodeProps_test_ts
|
|
70
77
|
module_src_runtimeNodeProps_test_ts --> module_src_runtimeNodeProps_ts
|
|
@@ -85,11 +92,14 @@ graph TD
|
|
|
85
92
|
module_src_RuntimeRenderer_tsx --> module_src_runtimeBindings_ts
|
|
86
93
|
module_src_RuntimeRenderer_tsx --> module_src_runtimeDbPersist_ts
|
|
87
94
|
module_src_RuntimeRenderer_tsx --> module_src_runtimeEventExecution_ts
|
|
95
|
+
module_src_RuntimeRenderer_tsx --> module_src_runtimeMedia_ts
|
|
96
|
+
module_src_RuntimeRenderer_tsx --> module_src_runtimeMediaCache_tsx
|
|
88
97
|
module_src_RuntimeRenderer_tsx --> module_src_runtimeNodeProps_ts
|
|
89
98
|
module_src_RuntimeRenderer_tsx --> module_src_RuntimeRendererConfig_tsx
|
|
90
99
|
module_src_RuntimeRenderer_tsx --> module_src_runtimeRepeat_ts
|
|
91
100
|
module_src_RuntimeRenderer_tsx --> module_src_runtimeRepeatDiagnostics_ts
|
|
92
101
|
module_src_RuntimeRenderer_tsx --> module_src_runtimeRepeatEmptyState_ts
|
|
102
|
+
module_src_RuntimeRenderer_tsx --> module_src_useRuntimeMediaProps_ts
|
|
93
103
|
module_src_RuntimeRendererConfig_test_tsx["src/RuntimeRendererConfig.test.tsx"]
|
|
94
104
|
package__ankhorage_runtime -.-> module_src_RuntimeRendererConfig_test_tsx
|
|
95
105
|
module_src_RuntimeRendererConfig_test_tsx --> module_src_RuntimeRendererConfig_tsx
|
|
@@ -97,6 +107,7 @@ graph TD
|
|
|
97
107
|
package__ankhorage_runtime -.-> module_src_RuntimeRendererConfig_tsx
|
|
98
108
|
module_src_RuntimeRendererConfig_tsx --> module_src_registry_tsx
|
|
99
109
|
module_src_RuntimeRendererConfig_tsx --> module_src_runtimeBindings_ts
|
|
110
|
+
module_src_RuntimeRendererConfig_tsx --> module_src_runtimeMedia_ts
|
|
100
111
|
module_src_runtimeRepeat_test_ts["src/runtimeRepeat.test.ts"]
|
|
101
112
|
package__ankhorage_runtime -.-> module_src_runtimeRepeat_test_ts
|
|
102
113
|
module_src_runtimeRepeat_test_ts --> module_src_runtimeActionRegistry_ts
|
|
@@ -112,10 +123,10 @@ graph TD
|
|
|
112
123
|
module_src_RuntimeScreen_tsx["src/RuntimeScreen.tsx"]
|
|
113
124
|
package__ankhorage_runtime -.-> module_src_RuntimeScreen_tsx
|
|
114
125
|
module_src_RuntimeScreen_tsx --> module_src_registry_tsx
|
|
115
|
-
module_src_RuntimeScreen_tsx --> module_src_runtimeApiLoaders_ts
|
|
116
126
|
module_src_RuntimeScreen_tsx --> module_src_RuntimeRenderer_tsx
|
|
117
127
|
module_src_RuntimeScreen_tsx --> module_src_RuntimeRendererConfig_tsx
|
|
118
128
|
module_src_RuntimeScreen_tsx --> module_src_runtimeScreenLoaders_ts
|
|
129
|
+
module_src_RuntimeScreen_tsx --> module_src_runtimeStateAdapter_ts
|
|
119
130
|
module_src_runtimeScreenLoaders_arrayPath_test_ts["src/runtimeScreenLoaders.arrayPath.test.ts"]
|
|
120
131
|
package__ankhorage_runtime -.-> module_src_runtimeScreenLoaders_arrayPath_test_ts
|
|
121
132
|
module_src_runtimeScreenLoaders_arrayPath_test_ts --> module_src_runtimeBindings_ts
|
|
@@ -134,6 +145,9 @@ graph TD
|
|
|
134
145
|
module_src_runtimeStateAdapterConfig_test_ts --> module_src_runtimeBindings_ts
|
|
135
146
|
module_src_runtimeStateAdapterConfig_test_ts --> module_src_runtimeNodeProps_ts
|
|
136
147
|
module_src_runtimeStateAdapterConfig_test_ts --> module_src_RuntimeRendererConfig_tsx
|
|
148
|
+
module_src_useRuntimeMediaProps_ts["src/useRuntimeMediaProps.ts"]
|
|
149
|
+
package__ankhorage_runtime -.-> module_src_useRuntimeMediaProps_ts
|
|
150
|
+
module_src_useRuntimeMediaProps_ts --> module_src_runtimeMedia_ts
|
|
137
151
|
module_tests_runtime_test_ts["tests/runtime.test.ts"]
|
|
138
152
|
package__ankhorage_runtime -.-> module_tests_runtime_test_ts
|
|
139
153
|
module_tests_runtime_test_ts --> module_src_runtimeManifest_ts
|
|
@@ -9,10 +9,9 @@ graph LR
|
|
|
9
9
|
module_src_rendering_ts["src/rendering.ts"]
|
|
10
10
|
module_src_runtimeActionRegistry_test_ts["src/runtimeActionRegistry.test.ts"]
|
|
11
11
|
module_src_runtimeActionRegistry_ts["src/runtimeActionRegistry.ts"]
|
|
12
|
-
module_src_runtimeApiLoaders_test_ts["src/runtimeApiLoaders.test.ts"]
|
|
13
|
-
module_src_runtimeApiLoaders_ts["src/runtimeApiLoaders.ts"]
|
|
14
12
|
module_src_runtimeBindings_test_ts["src/runtimeBindings.test.ts"]
|
|
15
13
|
module_src_runtimeBindings_ts["src/runtimeBindings.ts"]
|
|
14
|
+
module_src_runtimeDatabaseOperationExecutor_ts["src/runtimeDatabaseOperationExecutor.ts"]
|
|
16
15
|
module_src_runtimeDataSourceOperations_test_ts["src/runtimeDataSourceOperations.test.ts"]
|
|
17
16
|
module_src_runtimeDataSourceOperations_ts["src/runtimeDataSourceOperations.ts"]
|
|
18
17
|
module_src_runtimeDbPersist_test_ts["src/runtimeDbPersist.test.ts"]
|
|
@@ -20,6 +19,10 @@ graph LR
|
|
|
20
19
|
module_src_runtimeEventExecution_test_ts["src/runtimeEventExecution.test.ts"]
|
|
21
20
|
module_src_runtimeEventExecution_ts["src/runtimeEventExecution.ts"]
|
|
22
21
|
module_src_runtimeManifest_ts["src/runtimeManifest.ts"]
|
|
22
|
+
module_src_runtimeMedia_test_ts["src/runtimeMedia.test.ts"]
|
|
23
|
+
module_src_runtimeMedia_ts["src/runtimeMedia.ts"]
|
|
24
|
+
module_src_runtimeMediaCache_tsx["src/runtimeMediaCache.tsx"]
|
|
25
|
+
module_src_runtimeMediaConfig_test_ts["src/runtimeMediaConfig.test.ts"]
|
|
23
26
|
module_src_runtimeNodeProps_test_ts["src/runtimeNodeProps.test.ts"]
|
|
24
27
|
module_src_runtimeNodeProps_ts["src/runtimeNodeProps.ts"]
|
|
25
28
|
module_src_runtimePackageIsolation_test_ts["src/runtimePackageIsolation.test.ts"]
|
|
@@ -37,6 +40,7 @@ graph LR
|
|
|
37
40
|
module_src_runtimeScreenLoaders_ts["src/runtimeScreenLoaders.ts"]
|
|
38
41
|
module_src_runtimeStateAdapter_ts["src/runtimeStateAdapter.ts"]
|
|
39
42
|
module_src_runtimeStateAdapterConfig_test_ts["src/runtimeStateAdapterConfig.test.ts"]
|
|
43
|
+
module_src_useRuntimeMediaProps_ts["src/useRuntimeMediaProps.ts"]
|
|
40
44
|
module_tests_runtime_test_ts["tests/runtime.test.ts"]
|
|
41
45
|
export_ComponentRegistry["ComponentRegistry"]
|
|
42
46
|
module_src_componentRegistry_ts --> export_ComponentRegistry
|
|
@@ -74,25 +78,12 @@ graph LR
|
|
|
74
78
|
module_src_runtimeDataSourceOperations_ts --> export_createRuntimeDataSourceOperationExecutor
|
|
75
79
|
export_createRuntimeDataSourceOperationExecutor -.-> export_RuntimeBindingOperationExecutor
|
|
76
80
|
export_createRuntimeDataSourceOperationExecutor -.-> export_RuntimeDataSourceOperationExecutorOptions
|
|
77
|
-
export_createRuntimeManifest["createRuntimeManifest"]
|
|
78
|
-
module_src_runtimeManifest_ts --> export_createRuntimeManifest
|
|
79
|
-
export_createRuntimeManifest -.-> export_RuntimeManifest
|
|
80
|
-
export_createRuntimeManifest -.-> export_RuntimeManifestInput
|
|
81
81
|
export_createRuntimeMemoryStateAdapter["createRuntimeMemoryStateAdapter"]
|
|
82
82
|
module_src_runtimeStateAdapter_ts --> export_createRuntimeMemoryStateAdapter
|
|
83
83
|
export_createRuntimeMemoryStateAdapter -.-> export_RuntimeMemoryStateAdapterOptions
|
|
84
84
|
export_createRuntimeScreenLoaderRequestKey["createRuntimeScreenLoaderRequestKey"]
|
|
85
85
|
module_src_runtimeScreenLoaders_ts --> export_createRuntimeScreenLoaderRequestKey
|
|
86
86
|
export_createRuntimeScreenLoaderRequestKey -.-> export_RuntimeBindingOperationResultCache
|
|
87
|
-
export_defineRuntimeAction["defineRuntimeAction"]
|
|
88
|
-
module_src_runtimeManifest_ts --> export_defineRuntimeAction
|
|
89
|
-
export_defineRuntimeAction -.-> export_RuntimeActionDescriptor
|
|
90
|
-
export_defineRuntimeAdapter["defineRuntimeAdapter"]
|
|
91
|
-
module_src_runtimeManifest_ts --> export_defineRuntimeAdapter
|
|
92
|
-
export_defineRuntimeAdapter -.-> export_RuntimeAdapterDescriptor
|
|
93
|
-
export_defineRuntimeBinding["defineRuntimeBinding"]
|
|
94
|
-
module_src_runtimeManifest_ts --> export_defineRuntimeBinding
|
|
95
|
-
export_defineRuntimeBinding -.-> export_RuntimeBindingDescriptor
|
|
96
87
|
export_dispatchRuntimeComponentEvent["dispatchRuntimeComponentEvent"]
|
|
97
88
|
module_src_runtimeActionRegistry_ts --> export_dispatchRuntimeComponentEvent
|
|
98
89
|
export_dispatchRuntimeComponentEvent -.-> export_RuntimeActionHandlers
|
|
@@ -106,26 +97,16 @@ graph LR
|
|
|
106
97
|
module_src_runtimeDbPersist_ts --> export_executeDbPersistAction
|
|
107
98
|
export_executeDbPersistAction -.-> export_RuntimeActionHandlerArgs
|
|
108
99
|
export_executeDbPersistAction -.-> export_RuntimeDbPersistExecutionResult
|
|
109
|
-
export_executeRuntimeApiLoaders["executeRuntimeApiLoaders"]
|
|
110
|
-
module_src_runtimeApiLoaders_ts --> export_executeRuntimeApiLoaders
|
|
111
|
-
export_executeRuntimeApiLoaders -.-> export_RuntimeApiLoaderDefinition
|
|
112
|
-
export_executeRuntimeApiLoaders -.-> export_RuntimeApiLoaderExecutionResult
|
|
113
100
|
export_executeRuntimeScreenOperationLoaders["executeRuntimeScreenOperationLoaders"]
|
|
114
101
|
module_src_runtimeScreenLoaders_ts --> export_executeRuntimeScreenOperationLoaders
|
|
115
102
|
export_executeRuntimeScreenOperationLoaders -.-> export_RuntimeBindingOperationExecutor
|
|
116
103
|
export_executeRuntimeScreenOperationLoaders -.-> export_RuntimeBindingOperationResultCache
|
|
117
104
|
export_executeRuntimeScreenOperationLoaders -.-> export_RuntimeBindingResolutionContext
|
|
118
105
|
export_executeRuntimeScreenOperationLoaders -.-> export_RuntimeScreenOperationLoaderExecutionResult
|
|
119
|
-
export_listRuntimeCapabilities["listRuntimeCapabilities"]
|
|
120
|
-
module_src_runtimeManifest_ts --> export_listRuntimeCapabilities
|
|
121
106
|
export_ManifestContext["ManifestContext"]
|
|
122
107
|
module_src_ManifestContext_tsx --> export_ManifestContext
|
|
123
108
|
export_ManifestProvider["ManifestProvider"]
|
|
124
109
|
module_src_ManifestContext_tsx --> export_ManifestProvider
|
|
125
|
-
export_materializeRuntimeApiLoaderState["materializeRuntimeApiLoaderState"]
|
|
126
|
-
module_src_runtimeApiLoaders_ts --> export_materializeRuntimeApiLoaderState
|
|
127
|
-
export_materializeRuntimeApiLoaderState -.-> export_RuntimeApiLoaderDefinition
|
|
128
|
-
export_materializeRuntimeApiLoaderState -.-> export_RuntimeApiLoaderMaterializationResult
|
|
129
110
|
export_mergeRuntimeRendererConfig["mergeRuntimeRendererConfig"]
|
|
130
111
|
module_src_RuntimeRendererConfig_tsx --> export_mergeRuntimeRendererConfig
|
|
131
112
|
export_mergeRuntimeRendererConfig -.-> export_RuntimeRendererConfig
|
|
@@ -155,14 +136,8 @@ graph LR
|
|
|
155
136
|
export_resolveRuntimeBindingValueSync["resolveRuntimeBindingValueSync"]
|
|
156
137
|
module_src_runtimeBindings_ts --> export_resolveRuntimeBindingValueSync
|
|
157
138
|
export_resolveRuntimeBindingValueSync -.-> export_RuntimeBindingResolutionContext
|
|
158
|
-
export_resolveScreenApiLoaders["resolveScreenApiLoaders"]
|
|
159
|
-
module_src_runtimeScreenLoaders_ts --> export_resolveScreenApiLoaders
|
|
160
139
|
export_resolveScreenOperationLoaders["resolveScreenOperationLoaders"]
|
|
161
140
|
module_src_runtimeScreenLoaders_ts --> export_resolveScreenOperationLoaders
|
|
162
|
-
export_RUNTIME_CAPABILITIES["RUNTIME_CAPABILITIES"]
|
|
163
|
-
module_src_runtimeManifest_ts --> export_RUNTIME_CAPABILITIES
|
|
164
|
-
export_RUNTIME_MANIFEST_KIND["RUNTIME_MANIFEST_KIND"]
|
|
165
|
-
module_src_runtimeManifest_ts --> export_RUNTIME_MANIFEST_KIND
|
|
166
141
|
export_RuntimeAction["RuntimeAction"]
|
|
167
142
|
module_src_RuntimeRendererConfig_tsx --> export_RuntimeAction
|
|
168
143
|
export_RuntimeActionDescriptor["RuntimeActionDescriptor"]
|
|
@@ -186,18 +161,6 @@ graph LR
|
|
|
186
161
|
module_src_runtimeActionRegistry_ts --> export_RuntimeActionResolutionScope
|
|
187
162
|
export_RuntimeAdapterDescriptor["RuntimeAdapterDescriptor"]
|
|
188
163
|
module_src_runtimeManifest_ts --> export_RuntimeAdapterDescriptor
|
|
189
|
-
export_RuntimeApiLoaderDefinition["RuntimeApiLoaderDefinition"]
|
|
190
|
-
module_src_runtimeApiLoaders_ts --> export_RuntimeApiLoaderDefinition
|
|
191
|
-
export_RuntimeApiLoaderDiagnostic["RuntimeApiLoaderDiagnostic"]
|
|
192
|
-
module_src_runtimeApiLoaders_ts --> export_RuntimeApiLoaderDiagnostic
|
|
193
|
-
export_RuntimeApiLoaderExecutionResult["RuntimeApiLoaderExecutionResult"]
|
|
194
|
-
module_src_runtimeApiLoaders_ts --> export_RuntimeApiLoaderExecutionResult
|
|
195
|
-
export_RuntimeApiLoaderExecutionResult -.-> export_RuntimeApiLoaderDiagnostic
|
|
196
|
-
export_RuntimeApiLoaderMaterializationResult["RuntimeApiLoaderMaterializationResult"]
|
|
197
|
-
module_src_runtimeApiLoaders_ts --> export_RuntimeApiLoaderMaterializationResult
|
|
198
|
-
export_RuntimeApiLoaderMaterializationResult -.-> export_RuntimeApiLoaderDiagnostic
|
|
199
|
-
export_RuntimeApiLoaderMode["RuntimeApiLoaderMode"]
|
|
200
|
-
module_src_runtimeApiLoaders_ts --> export_RuntimeApiLoaderMode
|
|
201
164
|
export_RuntimeBindingDescriptor["RuntimeBindingDescriptor"]
|
|
202
165
|
module_src_runtimeManifest_ts --> export_RuntimeBindingDescriptor
|
|
203
166
|
export_RuntimeBindingOperationExecutionArgs["RuntimeBindingOperationExecutionArgs"]
|
|
@@ -258,6 +221,10 @@ graph LR
|
|
|
258
221
|
export_RuntimeManifestInput -.-> export_RuntimeBindingDescriptor
|
|
259
222
|
export_RuntimeManifestInput -.-> export_RuntimeDiagnostic
|
|
260
223
|
export_RuntimeManifestInput -.-> export_RuntimeManifestConfig
|
|
224
|
+
export_RuntimeMediaAssetResolver["RuntimeMediaAssetResolver"]
|
|
225
|
+
module_src_runtimeMedia_ts --> export_RuntimeMediaAssetResolver
|
|
226
|
+
export_RuntimeMediaAssetResolverArgs["RuntimeMediaAssetResolverArgs"]
|
|
227
|
+
module_src_runtimeMedia_ts --> export_RuntimeMediaAssetResolverArgs
|
|
261
228
|
export_RuntimeMemoryStateAdapterOptions["RuntimeMemoryStateAdapterOptions"]
|
|
262
229
|
module_src_runtimeStateAdapter_ts --> export_RuntimeMemoryStateAdapterOptions
|
|
263
230
|
export_RuntimeNodePropsResolver["RuntimeNodePropsResolver"]
|
|
@@ -271,6 +238,7 @@ graph LR
|
|
|
271
238
|
export_RuntimeRendererConfig -.-> export_RuntimeActionHandlers
|
|
272
239
|
export_RuntimeRendererConfig -.-> export_RuntimeBindingOperationExecutor
|
|
273
240
|
export_RuntimeRendererConfig -.-> export_RuntimeBindingOperationResultWriter
|
|
241
|
+
export_RuntimeRendererConfig -.-> export_RuntimeMediaAssetResolver
|
|
274
242
|
export_RuntimeRendererConfig -.-> export_RuntimeNodePropsResolver
|
|
275
243
|
export_RuntimeRendererConfig -.-> export_RuntimeRendererWrapArgs
|
|
276
244
|
export_RuntimeRendererConfigProvider["RuntimeRendererConfigProvider"]
|
|
@@ -280,10 +248,13 @@ graph LR
|
|
|
280
248
|
module_src_RuntimeRenderer_tsx --> export_RuntimeRendererProps
|
|
281
249
|
export_RuntimeRendererProps -.-> export_RuntimeActionHandler
|
|
282
250
|
export_RuntimeRendererProps -.-> export_RuntimeBindingOperationExecutor
|
|
251
|
+
export_RuntimeRendererProps -.-> export_RuntimeMediaAssetResolver
|
|
283
252
|
export_RuntimeRendererProps -.-> export_RuntimeRendererConfig
|
|
284
253
|
export_RuntimeRendererProps -.-> export_RuntimeRendererWrapArgs
|
|
285
254
|
export_RuntimeRendererWrapArgs["RuntimeRendererWrapArgs"]
|
|
286
255
|
module_src_RuntimeRendererConfig_tsx --> export_RuntimeRendererWrapArgs
|
|
256
|
+
export_RuntimeResolvedMediaValue["RuntimeResolvedMediaValue"]
|
|
257
|
+
module_src_runtimeMedia_ts --> export_RuntimeResolvedMediaValue
|
|
287
258
|
export_RuntimeResolveNodePropsArgs["RuntimeResolveNodePropsArgs"]
|
|
288
259
|
module_node_modules__ankhorage_contracts_dist_runtimeCallbacks_d_ts --> export_RuntimeResolveNodePropsArgs
|
|
289
260
|
export_RuntimeScreen["RuntimeScreen"]
|
|
@@ -303,10 +274,6 @@ graph LR
|
|
|
303
274
|
module_src_ManifestContext_tsx --> export_useManifestContext
|
|
304
275
|
export_useOptionalManifestContext["useOptionalManifestContext"]
|
|
305
276
|
module_src_ManifestContext_tsx --> export_useOptionalManifestContext
|
|
306
|
-
export_useRuntimeApiStateLoaders["useRuntimeApiStateLoaders"]
|
|
307
|
-
module_src_runtimeApiLoaders_ts --> export_useRuntimeApiStateLoaders
|
|
308
|
-
export_useRuntimeApiStateLoaders -.-> export_RuntimeApiLoaderDefinition
|
|
309
|
-
export_useRuntimeApiStateLoaders -.-> export_RuntimeApiLoaderDiagnostic
|
|
310
277
|
export_useRuntimeRendererConfig["useRuntimeRendererConfig"]
|
|
311
278
|
module_src_RuntimeRendererConfig_tsx --> export_useRuntimeRendererConfig
|
|
312
279
|
export_useRuntimeRendererConfig -.-> export_RuntimeRendererConfig
|