@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.
Files changed (36) hide show
  1. package/dist/actions/schema.d.ts +7256 -384
  2. package/dist/actions/schema.js +2 -2
  3. package/dist/actions/types.d.ts +7 -0
  4. package/dist/anchor/AnchorResolver.d.ts +18 -0
  5. package/dist/anchor/index.d.ts +2 -0
  6. package/dist/{chunk-LZLDT5DA.js → chunk-LR5AA5SE.js} +2 -2
  7. package/dist/{chunk-VIGV46CB.js → chunk-LRN3K2VD.js} +284 -102
  8. package/dist/chunk-LRN3K2VD.js.map +7 -0
  9. package/dist/{chunk-4NYS7GAW.js → chunk-P5G4KT2U.js} +39 -6
  10. package/dist/chunk-P5G4KT2U.js.map +7 -0
  11. package/dist/config/schema.d.ts +448 -40
  12. package/dist/config/schema.js +1 -1
  13. package/dist/context/schema.d.ts +8 -8
  14. package/dist/decisions/schema.d.ts +424 -1408
  15. package/dist/decisions/schema.js +5 -1
  16. package/dist/decisions/types.d.ts +22 -0
  17. package/dist/events/registerConfigPredicates.d.ts +6 -10
  18. package/dist/events/schema.d.ts +8 -8
  19. package/dist/index.d.ts +1 -0
  20. package/dist/index.js +9 -77
  21. package/dist/index.js.map +3 -3
  22. package/dist/overlays/schema.d.ts +22 -22
  23. package/dist/react.js +3 -3
  24. package/dist/runtime.d.ts +3 -0
  25. package/dist/smart-canvas.esm.js +36 -37
  26. package/dist/smart-canvas.esm.js.map +4 -4
  27. package/dist/smart-canvas.js +320 -179
  28. package/dist/smart-canvas.js.map +4 -4
  29. package/dist/smart-canvas.min.js +36 -37
  30. package/dist/smart-canvas.min.js.map +4 -4
  31. package/dist/version.d.ts +1 -1
  32. package/package.json +7 -7
  33. package/schema/canvas-config.schema.json +996 -56
  34. package/dist/chunk-4NYS7GAW.js.map +0 -7
  35. package/dist/chunk-VIGV46CB.js.map +0 -7
  36. /package/dist/{chunk-LZLDT5DA.js.map → chunk-LR5AA5SE.js.map} +0 -0
@@ -31,8 +31,8 @@ import {
31
31
  WaitZ,
32
32
  WidgetConfigZ,
33
33
  coreActionStepSchemas
34
- } from "../chunk-LZLDT5DA.js";
35
- import "../chunk-4NYS7GAW.js";
34
+ } from "../chunk-LR5AA5SE.js";
35
+ import "../chunk-P5G4KT2U.js";
36
36
  export {
37
37
  AddClassZ,
38
38
  AnchorIdZ,
@@ -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;
@@ -0,0 +1,2 @@
1
+ export type { AnchorResolver, AnchorResolverOptions } from './AnchorResolver';
2
+ export { createAnchorResolver } from './AnchorResolver';
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ActivationConfigZ,
3
3
  DecisionStrategyZ
4
- } from "./chunk-4NYS7GAW.js";
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-LZLDT5DA.js.map
250
+ //# sourceMappingURL=chunk-LR5AA5SE.js.map