@syntrologie/runtime-sdk 2.2.0-canary.1 → 2.2.0-canary.11

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 (33) hide show
  1. package/dist/SmartCanvasApp.d.ts +4 -1
  2. package/dist/actions/executors/core-flow.d.ts +19 -0
  3. package/dist/actions/executors/index.d.ts +1 -0
  4. package/dist/api.d.ts +2 -0
  5. package/dist/apps/builtinRuntimeModules.generated.d.ts +20 -0
  6. package/dist/{chunk-HJKAXD5S.js → chunk-3OPUMTCE.js} +2869 -1524
  7. package/dist/chunk-3OPUMTCE.js.map +7 -0
  8. package/dist/index.js +1545 -12
  9. package/dist/index.js.map +4 -4
  10. package/dist/react.js +1 -1
  11. package/dist/smart-canvas.esm.js +62 -33
  12. package/dist/smart-canvas.esm.js.map +4 -4
  13. package/dist/smart-canvas.js +2077 -327
  14. package/dist/smart-canvas.js.map +4 -4
  15. package/dist/smart-canvas.min.js +62 -33
  16. package/dist/smart-canvas.min.js.map +4 -4
  17. package/dist/telemetry/types.d.ts +5 -0
  18. package/dist/version.d.ts +1 -1
  19. package/package.json +9 -4
  20. package/schema/canvas-config.schema.json +124 -22
  21. package/dist/adaptives/adaptive-chatbot/index.js +0 -9
  22. package/dist/adaptives/adaptive-chatbot/index.js.map +0 -7
  23. package/dist/adaptives/adaptive-content/index.js +0 -22
  24. package/dist/adaptives/adaptive-content/index.js.map +0 -7
  25. package/dist/adaptives/adaptive-faq/index.js +0 -28
  26. package/dist/adaptives/adaptive-faq/index.js.map +0 -7
  27. package/dist/adaptives/adaptive-gamification/index.js +0 -2
  28. package/dist/adaptives/adaptive-gamification/index.js.map +0 -7
  29. package/dist/adaptives/adaptive-nav/index.js +0 -27
  30. package/dist/adaptives/adaptive-nav/index.js.map +0 -7
  31. package/dist/adaptives/adaptive-overlays/index.js +0 -94
  32. package/dist/adaptives/adaptive-overlays/index.js.map +0 -7
  33. package/dist/chunk-HJKAXD5S.js.map +0 -7
@@ -1,4 +1,5 @@
1
1
  import { type ReactNode } from 'react';
2
+ import type { BatchActionHandle } from './actions/types';
2
3
  import { type CanvasTheme } from './components/ShadowCanvasOverlay';
3
4
  import type { SmartCanvasController } from './controller';
4
5
  import type { ExperimentClient } from './experiments/types';
@@ -29,5 +30,7 @@ export interface SmartCanvasAppProps {
29
30
  launcherLabel?: string;
30
31
  canvasHost?: HTMLElement | null;
31
32
  theme?: Partial<CanvasTheme>;
33
+ /** Batch handle from eager action application in createSmartCanvas(). Prevents double-apply. */
34
+ initialBatchHandle?: BatchActionHandle | null;
32
35
  }
33
- export declare function SmartCanvasApp({ controller, fetcher, configUri, configUriFeatureKey, configFeatureKey, fetchCredentials, pollIntervalMs, experiments, telemetry, runtime, overlayFetcher, overlayConfigUri, overlayConfigFeatureKey, overlayFetchCredentials, footerSlot, launcherLabel, canvasHost, theme, }: SmartCanvasAppProps): import("react/jsx-runtime").JSX.Element;
36
+ export declare function SmartCanvasApp({ controller, fetcher, configUri, configUriFeatureKey, configFeatureKey, fetchCredentials, pollIntervalMs, experiments, telemetry, runtime, overlayFetcher, overlayConfigUri, overlayConfigFeatureKey, overlayFetchCredentials, footerSlot, launcherLabel, canvasHost, theme, initialBatchHandle, }: SmartCanvasAppProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Core Flow Executors
3
+ *
4
+ * Executors for core:sequence, core:parallel, and core:wait action kinds.
5
+ * These enable composing actions into ordered/parallel flows with waits.
6
+ */
7
+ import type { ActionExecutor, ParallelAction, SequenceAction, WaitAction } from '../types';
8
+ /**
9
+ * Execute actions in sequence, awaiting each one's completion.
10
+ */
11
+ export declare const executeSequence: ActionExecutor<SequenceAction>;
12
+ /**
13
+ * Execute actions in parallel.
14
+ */
15
+ export declare const executeParallel: ActionExecutor<ParallelAction>;
16
+ /**
17
+ * Wait for a duration or an event on the EventBus.
18
+ */
19
+ export declare const executeWait: ActionExecutor<WaitAction>;
@@ -113,4 +113,5 @@ export declare function getExecutor(kind: ActionKind | string): ActionExecutor<A
113
113
  export declare function hasExecutor(kind: ActionKind | string): boolean;
114
114
  export { executeAddClass, executeInsertHtml, executeRemoveClass, executeSetAttr, executeSetStyle, executeSetText, } from '@syntrologie/adapt-content/runtime';
115
115
  export { executeBadge, executeHighlight, executeModal, executePulse, executeTooltip, } from '@syntrologie/adapt-overlays/runtime';
116
+ export { executeParallel, executeSequence, executeWait } from './core-flow';
116
117
  export { executeTour } from './tour';
package/dist/api.d.ts CHANGED
@@ -73,6 +73,8 @@ export interface SmartCanvasHandle {
73
73
  registerTelemetryProperties(properties: Record<string, unknown>): void;
74
74
  getSessionId(): string | undefined;
75
75
  startSessionRecording(): void;
76
+ /** Track a custom event. Returns true if telemetry is available and event was sent. */
77
+ track(eventName: string, properties?: Record<string, unknown>): boolean;
76
78
  /**
77
79
  * v2 Runtime instance for context, events, state, and decisions.
78
80
  */
@@ -0,0 +1,20 @@
1
+ export declare const builtinAdaptiveManifests: {
2
+ id: any;
3
+ version: any;
4
+ name: any;
5
+ description: any;
6
+ runtime: {
7
+ actions: any;
8
+ widgets: any;
9
+ notifyWatchers: any;
10
+ events: any;
11
+ };
12
+ editor: undefined;
13
+ metadata: {
14
+ isBuiltIn: boolean;
15
+ };
16
+ }[];
17
+ export declare function registerBuiltinRuntimeModules(registry: {
18
+ has: (id: string) => boolean;
19
+ register: (manifest: any) => void;
20
+ }): void;