@syntrologie/runtime-sdk 2.4.0-canary.17 → 2.4.0-canary.19
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/dist/actions/schema.d.ts +7256 -384
- package/dist/actions/schema.js +2 -2
- package/dist/actions/types.d.ts +7 -0
- package/dist/anchor/AnchorResolver.d.ts +18 -0
- package/dist/anchor/index.d.ts +2 -0
- package/dist/{chunk-LZLDT5DA.js → chunk-LR5AA5SE.js} +2 -2
- package/dist/{chunk-VIGV46CB.js → chunk-LRN3K2VD.js} +284 -102
- package/dist/chunk-LRN3K2VD.js.map +7 -0
- package/dist/{chunk-4NYS7GAW.js → chunk-P5G4KT2U.js} +39 -6
- package/dist/chunk-P5G4KT2U.js.map +7 -0
- package/dist/config/schema.d.ts +448 -40
- package/dist/config/schema.js +1 -1
- package/dist/context/schema.d.ts +8 -8
- package/dist/decisions/schema.d.ts +424 -1408
- package/dist/decisions/schema.js +5 -1
- package/dist/decisions/types.d.ts +22 -0
- package/dist/events/registerConfigPredicates.d.ts +6 -10
- package/dist/events/schema.d.ts +8 -8
- package/dist/index.d.ts +1 -0
- package/dist/index.js +9 -77
- package/dist/index.js.map +3 -3
- package/dist/overlays/schema.d.ts +22 -22
- package/dist/react.js +3 -3
- package/dist/runtime.d.ts +3 -0
- package/dist/smart-canvas.esm.js +36 -37
- package/dist/smart-canvas.esm.js.map +4 -4
- package/dist/smart-canvas.js +320 -179
- package/dist/smart-canvas.js.map +4 -4
- package/dist/smart-canvas.min.js +36 -37
- package/dist/smart-canvas.min.js.map +4 -4
- package/dist/version.d.ts +1 -1
- package/package.json +7 -7
- package/schema/canvas-config.schema.json +996 -56
- package/dist/chunk-4NYS7GAW.js.map +0 -7
- package/dist/chunk-VIGV46CB.js.map +0 -7
- /package/dist/{chunk-LZLDT5DA.js.map → chunk-LR5AA5SE.js.map} +0 -0
package/dist/actions/schema.js
CHANGED
package/dist/actions/types.d.ts
CHANGED
|
@@ -275,6 +275,11 @@ export interface ExecutorContext {
|
|
|
275
275
|
publishEvent: (name: string, props?: Record<string, unknown>) => void;
|
|
276
276
|
/** Get the current adaptive ID (if any) */
|
|
277
277
|
adaptiveId?: string;
|
|
278
|
+
/**
|
|
279
|
+
* Async anchor resolver — waits for a DOM element to appear.
|
|
280
|
+
* Returns null on timeout or route mismatch (never throws).
|
|
281
|
+
*/
|
|
282
|
+
waitForAnchor?: (anchorId: AnchorId, timeoutMs?: number) => Promise<HTMLElement | null>;
|
|
278
283
|
/**
|
|
279
284
|
* Execute a nested action (for composite executors like tours).
|
|
280
285
|
* Returns a handle that can be used to revert the action.
|
|
@@ -317,6 +322,8 @@ export interface ActionEngineOptions {
|
|
|
317
322
|
};
|
|
318
323
|
/** Function to resolve anchor IDs to elements */
|
|
319
324
|
anchorResolver: (anchorId: AnchorId) => HTMLElement | null;
|
|
325
|
+
/** Async anchor resolver — waits for a DOM element to appear */
|
|
326
|
+
waitForAnchor?: (anchorId: AnchorId, timeoutMs?: number) => Promise<HTMLElement | null>;
|
|
320
327
|
/** Current adaptive ID for attribution */
|
|
321
328
|
adaptiveId?: string;
|
|
322
329
|
/** Optional executor registry (uses default singleton if not provided) */
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AnchorResolver — Centralized DOM observation for anchor element resolution.
|
|
3
|
+
*
|
|
4
|
+
* Provides a single MutationObserver that multiple callers share to wait for
|
|
5
|
+
* DOM elements to appear. Replaces scattered observation mechanisms.
|
|
6
|
+
*/
|
|
7
|
+
export interface AnchorResolverOptions {
|
|
8
|
+
root?: HTMLElement;
|
|
9
|
+
defaultTimeoutMs?: number;
|
|
10
|
+
}
|
|
11
|
+
export interface AnchorResolver {
|
|
12
|
+
resolve(selector: string): HTMLElement | null;
|
|
13
|
+
waitFor(selector: string, timeoutMs?: number): Promise<HTMLElement>;
|
|
14
|
+
onAppear(selector: string, cb: (el: HTMLElement) => void): () => void;
|
|
15
|
+
pendingCount(): number;
|
|
16
|
+
destroy(): void;
|
|
17
|
+
}
|
|
18
|
+
export declare function createAnchorResolver(opts?: AnchorResolverOptions): AnchorResolver;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ActivationConfigZ,
|
|
3
3
|
DecisionStrategyZ
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-P5G4KT2U.js";
|
|
5
5
|
|
|
6
6
|
// src/actions/schema.ts
|
|
7
7
|
import { z } from "zod";
|
|
@@ -247,4 +247,4 @@ export {
|
|
|
247
247
|
TourZ,
|
|
248
248
|
coreActionStepSchemas
|
|
249
249
|
};
|
|
250
|
-
//# sourceMappingURL=chunk-
|
|
250
|
+
//# sourceMappingURL=chunk-LR5AA5SE.js.map
|