@syntrologie/runtime-sdk 2.0.0 → 2.0.1-canary.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/CAPABILITIES.md +232 -138
- package/README.md +76 -57
- package/dist/RuntimeProvider.d.ts +6 -6
- package/dist/RuntimeProvider.js +2 -3
- package/dist/RuntimeProvider.js.map +1 -1
- package/dist/SmartCanvasApp.d.ts +8 -8
- package/dist/SmartCanvasApp.js +16 -18
- package/dist/SmartCanvasApp.js.map +1 -1
- package/dist/SmartCanvasElement.d.ts +5 -5
- package/dist/SmartCanvasElement.js +13 -13
- package/dist/SmartCanvasElement.js.map +1 -1
- package/dist/SmartCanvasPortal.d.ts +2 -2
- package/dist/SmartCanvasPortal.js +2 -2
- package/dist/actions/ActionEngine.d.ts +1 -1
- package/dist/actions/ActionEngine.js +24 -24
- package/dist/actions/ActionEngine.js.map +1 -1
- package/dist/actions/executors/index.d.ts +6 -6
- package/dist/actions/executors/index.js +22 -22
- package/dist/actions/executors/index.js.map +1 -1
- package/dist/actions/executors/tour.d.ts +1 -1
- package/dist/actions/executors/tour.js +19 -19
- package/dist/actions/executors/tour.js.map +1 -1
- package/dist/actions/index.d.ts +5 -5
- package/dist/actions/index.js +3 -3
- package/dist/actions/index.js.map +1 -1
- package/dist/actions/types.d.ts +37 -37
- package/dist/actions/validation.d.ts +1 -1
- package/dist/actions/validation.js +195 -196
- package/dist/actions/validation.js.map +1 -1
- package/dist/antiFlicker.js +1 -1
- package/dist/api.d.ts +10 -10
- package/dist/api.js +11 -11
- package/dist/api.js.map +1 -1
- package/dist/apps/AppContext.d.ts +2 -2
- package/dist/apps/AppContext.js +1 -1
- package/dist/apps/AppContext.js.map +1 -1
- package/dist/apps/AppLoader.d.ts +2 -2
- package/dist/apps/AppLoader.js +24 -24
- package/dist/apps/AppLoader.js.map +1 -1
- package/dist/apps/AppRegistry.d.ts +2 -2
- package/dist/apps/AppRegistry.js +28 -28
- package/dist/apps/AppRegistry.js.map +1 -1
- package/dist/apps/adaptive-chatbot/index.js +7 -0
- package/dist/apps/adaptive-chatbot/index.js.map +7 -0
- package/dist/apps/examples/gamification-app.example.d.ts +3 -3
- package/dist/apps/examples/gamification-app.example.js +94 -94
- package/dist/apps/examples/gamification-app.example.js.map +1 -1
- package/dist/apps/faq/index.js.map +3 -3
- package/dist/apps/gamification/index.js.map +3 -3
- package/dist/apps/index.d.ts +10 -10
- package/dist/apps/index.js +6 -6
- package/dist/apps/nav/index.js.map +3 -3
- package/dist/apps/types.d.ts +10 -10
- package/dist/blocks/data/ComparisonBlock.d.ts +1 -1
- package/dist/blocks/data/ComparisonBlock.js +40 -40
- package/dist/blocks/data/ComparisonBlock.js.map +1 -1
- package/dist/blocks/data/StatsBlock.d.ts +1 -1
- package/dist/blocks/data/StatsBlock.js +41 -41
- package/dist/blocks/data/StatsBlock.js.map +1 -1
- package/dist/blocks/data/index.d.ts +2 -2
- package/dist/blocks/data/index.js +2 -2
- package/dist/blocks/index.d.ts +5 -5
- package/dist/blocks/index.js +29 -29
- package/dist/blocks/index.js.map +1 -1
- package/dist/blocks/interactive/ChecklistBlock.d.ts +1 -1
- package/dist/blocks/interactive/ChecklistBlock.js +60 -60
- package/dist/blocks/interactive/ChecklistBlock.js.map +1 -1
- package/dist/blocks/interactive/RatingBlock.d.ts +1 -1
- package/dist/blocks/interactive/RatingBlock.js +75 -65
- package/dist/blocks/interactive/RatingBlock.js.map +1 -1
- package/dist/blocks/interactive/index.d.ts +2 -2
- package/dist/blocks/interactive/index.js +2 -2
- package/dist/blocks/notification/NotificationBlock.d.ts +2 -2
- package/dist/blocks/notification/NotificationBlock.js +67 -63
- package/dist/blocks/notification/NotificationBlock.js.map +1 -1
- package/dist/blocks/notification/index.d.ts +1 -1
- package/dist/blocks/notification/index.js +1 -1
- package/dist/bootstrap.d.ts +10 -10
- package/dist/bootstrap.js +54 -40
- package/dist/bootstrap.js.map +1 -1
- package/dist/components/ShadowCanvasOverlay.d.ts +6 -6
- package/dist/components/ShadowCanvasOverlay.js +117 -107
- package/dist/components/ShadowCanvasOverlay.js.map +1 -1
- package/dist/components/TileCard.d.ts +5 -5
- package/dist/components/TileCard.js +174 -143
- package/dist/components/TileCard.js.map +1 -1
- package/dist/components/TileWheel.d.ts +3 -3
- package/dist/components/TileWheel.js +7 -7
- package/dist/components/TileWheel.js.map +1 -1
- package/dist/configFetcher.d.ts +2 -2
- package/dist/configFetcher.js +10 -7
- package/dist/configFetcher.js.map +1 -1
- package/dist/context/ContextManager.d.ts +3 -3
- package/dist/context/ContextManager.js +15 -15
- package/dist/context/ContextManager.js.map +1 -1
- package/dist/context/index.d.ts +4 -4
- package/dist/context/index.js +3 -3
- package/dist/context/schema.d.ts +1 -1
- package/dist/context/schema.js +1 -1
- package/dist/decisions/engine.d.ts +5 -5
- package/dist/decisions/engine.js +13 -13
- package/dist/decisions/index.d.ts +6 -6
- package/dist/decisions/index.js +5 -5
- package/dist/decisions/schema.d.ts +1 -1
- package/dist/decisions/schema.js +20 -20
- package/dist/decisions/strategies/rules.d.ts +1 -1
- package/dist/decisions/strategies/rules.js +24 -24
- package/dist/decisions/strategies/rules.js.map +1 -1
- package/dist/decisions/strategies/score.d.ts +1 -1
- package/dist/decisions/strategies/score.js +3 -3
- package/dist/decisions/types.d.ts +19 -19
- package/dist/editorLoader.js +20 -20
- package/dist/editorLoader.js.map +1 -1
- package/dist/events/EventBus.d.ts +3 -3
- package/dist/events/EventBus.js +5 -7
- package/dist/events/EventBus.js.map +1 -1
- package/dist/events/index.d.ts +6 -6
- package/dist/events/index.js +5 -5
- package/dist/events/normalizers/canvas.d.ts +2 -2
- package/dist/events/normalizers/canvas.js +3 -3
- package/dist/events/normalizers/canvas.js.map +1 -1
- package/dist/events/normalizers/posthog.d.ts +1 -1
- package/dist/events/normalizers/posthog.js +34 -27
- package/dist/events/normalizers/posthog.js.map +1 -1
- package/dist/events/schema.d.ts +1 -1
- package/dist/events/schema.js +2 -2
- package/dist/events/types.d.ts +1 -1
- package/dist/events/types.js +27 -27
- package/dist/experiments/adapters/growthbook.d.ts +4 -4
- package/dist/experiments/adapters/growthbook.js +5 -5
- package/dist/experiments/adapters/growthbook.js.map +1 -1
- package/dist/experiments/index.d.ts +3 -3
- package/dist/experiments/index.js +1 -1
- package/dist/experiments/registry.d.ts +2 -2
- package/dist/experiments/registry.js +2 -2
- package/dist/experiments/types.d.ts +5 -1
- package/dist/fetchers/cdnFetcher.d.ts +1 -1
- package/dist/fetchers/cdnFetcher.js +4 -8
- package/dist/fetchers/cdnFetcher.js.map +1 -1
- package/dist/fetchers/experimentsFetcher.d.ts +2 -2
- package/dist/fetchers/experimentsFetcher.js +7 -7
- package/dist/fetchers/experimentsFetcher.js.map +1 -1
- package/dist/fetchers/index.d.ts +3 -3
- package/dist/fetchers/index.js +2 -2
- package/dist/fetchers/index.js.map +1 -1
- package/dist/fetchers/registry.d.ts +1 -1
- package/dist/fetchers/registry.js +4 -4
- package/dist/fetchers/types.d.ts +1 -1
- package/dist/hooks/useCanvasOverlays.d.ts +5 -5
- package/dist/hooks/useCanvasOverlays.js +15 -13
- package/dist/hooks/useCanvasOverlays.js.map +1 -1
- package/dist/hooks/useHostPatches.d.ts +2 -2
- package/dist/hooks/useHostPatches.js +8 -8
- package/dist/hooks/useHostPatches.js.map +1 -1
- package/dist/hooks/useShadowCanvasConfig.d.ts +3 -3
- package/dist/hooks/useShadowCanvasConfig.js +5 -2
- package/dist/hooks/useShadowCanvasConfig.js.map +1 -1
- package/dist/hostPatcher/core/patcher.d.ts +1 -1
- package/dist/hostPatcher/core/patcher.js +18 -9
- package/dist/hostPatcher/core/patcher.js.map +1 -1
- package/dist/hostPatcher/core/sanitizer.js +24 -3
- package/dist/hostPatcher/core/sanitizer.js.map +1 -1
- package/dist/hostPatcher/policy/defaultPolicy.js +15 -5
- package/dist/hostPatcher/policy/defaultPolicy.js.map +1 -1
- package/dist/hostPatcher/utils/anchors.js +4 -6
- package/dist/hostPatcher/utils/anchors.js.map +1 -1
- package/dist/index.d.ts +32 -32
- package/dist/index.js +29 -29
- package/dist/index.js.map +1 -1
- package/dist/metrics/index.d.ts +1 -1
- package/dist/metrics/index.js +1 -1
- package/dist/metrics/sessionMetrics.d.ts +1 -1
- package/dist/metrics/sessionMetrics.js +6 -6
- package/dist/overlays/fetcher.d.ts +2 -2
- package/dist/overlays/fetcher.js +4 -4
- package/dist/overlays/recipeRegistry.js +2 -2
- package/dist/overlays/recipeRegistry.js.map +1 -1
- package/dist/overlays/runtime/anchor/resolve.js +1 -1
- package/dist/overlays/runtime/anchor/resolve.js.map +1 -1
- package/dist/overlays/runtime/index.d.ts +7 -7
- package/dist/overlays/runtime/index.js +7 -7
- package/dist/overlays/runtime/overlay/highlight.js +39 -39
- package/dist/overlays/runtime/overlay/highlight.js.map +1 -1
- package/dist/overlays/runtime/overlay/modal.js +5 -5
- package/dist/overlays/runtime/overlay/modal.js.map +1 -1
- package/dist/overlays/runtime/overlay/root.js +1 -1
- package/dist/overlays/runtime/overlay/runner.js +70 -23
- package/dist/overlays/runtime/overlay/runner.js.map +1 -1
- package/dist/overlays/runtime/overlay/tooltip.d.ts +1 -1
- package/dist/overlays/runtime/overlay/tooltip.js +10 -10
- package/dist/overlays/runtime/overlay/tooltip.js.map +1 -1
- package/dist/overlays/runtime/utils/dom.js +4 -1
- package/dist/overlays/runtime/utils/dom.js.map +1 -1
- package/dist/overlays/schema.js +12 -8
- package/dist/overlays/schema.js.map +1 -1
- package/dist/react.d.ts +7 -7
- package/dist/react.js +4 -4
- package/dist/react.js.map +1 -1
- package/dist/render/RenderContext.d.ts +2 -2
- package/dist/render/RenderContext.js +5 -5
- package/dist/render/RenderContext.js.map +1 -1
- package/dist/render/index.d.ts +3 -3
- package/dist/render/index.js +1 -1
- package/dist/render/types.d.ts +4 -4
- package/dist/runtime.d.ts +12 -12
- package/dist/runtime.js +20 -20
- package/dist/runtime.js.map +1 -1
- package/dist/smart-canvas.esm.js +16 -16
- package/dist/smart-canvas.esm.js.map +4 -4
- package/dist/smart-canvas.js +644 -491
- package/dist/smart-canvas.js.map +4 -4
- package/dist/smart-canvas.min.js +15 -15
- package/dist/smart-canvas.min.js.map +4 -4
- package/dist/state/StateStore.d.ts +1 -1
- package/dist/state/StateStore.js +9 -9
- package/dist/state/StateStore.js.map +1 -1
- package/dist/state/helpers/cooldowns.d.ts +1 -1
- package/dist/state/helpers/cooldowns.js +1 -1
- package/dist/state/helpers/dismissals.d.ts +1 -1
- package/dist/state/helpers/dismissals.js +1 -1
- package/dist/state/helpers/frequency.d.ts +1 -1
- package/dist/state/helpers/frequency.js +1 -1
- package/dist/state/index.d.ts +4 -4
- package/dist/state/index.js +3 -3
- package/dist/state/schema.d.ts +1 -1
- package/dist/state/schema.js +1 -1
- package/dist/store/example.js +13 -13
- package/dist/store/example.js.map +1 -1
- package/dist/store/mini-effector.js +6 -8
- package/dist/store/mini-effector.js.map +1 -1
- package/dist/surfaces/Surfaces.d.ts +1 -1
- package/dist/surfaces/Surfaces.js +25 -25
- package/dist/surfaces/Surfaces.js.map +1 -1
- package/dist/surfaces/index.d.ts +4 -4
- package/dist/surfaces/index.js +3 -3
- package/dist/surfaces/positioning.d.ts +2 -2
- package/dist/surfaces/positioning.js +74 -77
- package/dist/surfaces/positioning.js.map +1 -1
- package/dist/surfaces/types.d.ts +9 -9
- package/dist/surfaces/types.js +7 -7
- package/dist/surfaces/types.js.map +1 -1
- package/dist/telemetry/adapters/noop.d.ts +12 -0
- package/dist/telemetry/adapters/noop.js +42 -0
- package/dist/telemetry/adapters/noop.js.map +1 -0
- package/dist/telemetry/adapters/posthog.d.ts +2 -2
- package/dist/telemetry/adapters/posthog.js +29 -16
- package/dist/telemetry/adapters/posthog.js.map +1 -1
- package/dist/telemetry/index.d.ts +4 -3
- package/dist/telemetry/index.js +3 -2
- package/dist/telemetry/index.js.map +1 -1
- package/dist/telemetry/registry.d.ts +2 -2
- package/dist/telemetry/registry.js +4 -2
- package/dist/telemetry/registry.js.map +1 -1
- package/dist/telemetry/types.d.ts +1 -1
- package/dist/theme/ThemeProvider.d.ts +2 -2
- package/dist/theme/ThemeProvider.js +21 -21
- package/dist/theme/ThemeProvider.js.map +1 -1
- package/dist/theme/defaultTheme.d.ts +2 -2
- package/dist/theme/defaultTheme.js +111 -111
- package/dist/theme/defaultTheme.js.map +1 -1
- package/dist/theme/extractHostTheme.d.ts +1 -1
- package/dist/theme/extractHostTheme.js +42 -44
- package/dist/theme/extractHostTheme.js.map +1 -1
- package/dist/theme/index.d.ts +5 -5
- package/dist/theme/index.js +3 -3
- package/dist/theme/index.js.map +1 -1
- package/dist/theme/types.d.ts +2 -2
- package/dist/token.js +3 -6
- package/dist/token.js.map +1 -1
- package/dist/types-only.d.ts +1 -1
- package/dist/types.d.ts +43 -43
- package/dist/widgets/WidgetRegistry.d.ts +2 -2
- package/dist/widgets/WidgetRegistry.js +11 -11
- package/dist/widgets/WidgetRegistry.js.map +1 -1
- package/dist/widgets/index.d.ts +2 -2
- package/dist/widgets/index.js +1 -1
- package/dist/widgets/index.js.map +1 -1
- package/package.json +4 -2
- package/schema/canvas-config.schema.json +51 -7
- package/schema/runtime-context.schema.json +1 -5
package/dist/actions/types.d.ts
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
* Defines the types for the unified execution layer for interventions
|
|
5
5
|
* (highlight, tooltip, badge, DOM modifications, navigation).
|
|
6
6
|
*/
|
|
7
|
-
import type { Placement } from
|
|
7
|
+
import type { Placement } from '@floating-ui/dom';
|
|
8
8
|
/** Static surface slots with fixed positioning */
|
|
9
|
-
export type StaticSurfaceSlot =
|
|
9
|
+
export type StaticSurfaceSlot = 'drawer_right' | 'drawer_left' | 'drawer_bottom' | 'overlay_center' | 'overlay_corner_br' | 'overlay_corner_bl' | 'toast_top' | 'toast_bottom';
|
|
10
10
|
/** Dynamic inline slot (rendered inside anchor) */
|
|
11
11
|
export type InlineSurfaceSlot = `inline:${string}`;
|
|
12
12
|
/** Dynamic adjacent slot (positioned near anchor) */
|
|
@@ -25,7 +25,7 @@ export interface HighlightStyle {
|
|
|
25
25
|
radiusPx?: number;
|
|
26
26
|
}
|
|
27
27
|
/** Badge position relative to anchor */
|
|
28
|
-
export type BadgePosition =
|
|
28
|
+
export type BadgePosition = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
29
29
|
/** CTA button configuration for tooltips/modals */
|
|
30
30
|
export interface CtaButton {
|
|
31
31
|
label: string;
|
|
@@ -48,9 +48,9 @@ export interface TooltipContent {
|
|
|
48
48
|
ctaButtons?: CtaButton[];
|
|
49
49
|
}
|
|
50
50
|
/** Tooltip trigger mode */
|
|
51
|
-
export type TooltipTrigger =
|
|
51
|
+
export type TooltipTrigger = 'immediate' | 'hover' | 'click';
|
|
52
52
|
/** Position where HTML/content should be inserted */
|
|
53
|
-
export type InsertPosition =
|
|
53
|
+
export type InsertPosition = 'before' | 'after' | 'prepend' | 'append' | 'replace';
|
|
54
54
|
/** Widget configuration for surface mounting */
|
|
55
55
|
export interface WidgetConfig {
|
|
56
56
|
widgetId: string;
|
|
@@ -64,7 +64,7 @@ interface BaseAction {
|
|
|
64
64
|
}
|
|
65
65
|
/** Highlight an anchor element with spotlight effect */
|
|
66
66
|
export interface HighlightAction extends BaseAction {
|
|
67
|
-
kind:
|
|
67
|
+
kind: 'overlays:highlight';
|
|
68
68
|
anchorId: string;
|
|
69
69
|
style?: HighlightStyle;
|
|
70
70
|
/** Duration in ms before auto-cleanup (for use in sequences) */
|
|
@@ -72,22 +72,22 @@ export interface HighlightAction extends BaseAction {
|
|
|
72
72
|
}
|
|
73
73
|
/** Pulse animation on an anchor element */
|
|
74
74
|
export interface PulseAction extends BaseAction {
|
|
75
|
-
kind:
|
|
75
|
+
kind: 'overlays:pulse';
|
|
76
76
|
anchorId: string;
|
|
77
77
|
duration?: number;
|
|
78
78
|
}
|
|
79
79
|
/** Add a badge near an anchor element */
|
|
80
80
|
export interface BadgeAction extends BaseAction {
|
|
81
|
-
kind:
|
|
81
|
+
kind: 'overlays:badge';
|
|
82
82
|
anchorId: string;
|
|
83
83
|
content: string;
|
|
84
84
|
position?: BadgePosition;
|
|
85
85
|
}
|
|
86
86
|
/** Tooltip lifecycle - when the action completes (for sequences) */
|
|
87
|
-
export type TooltipWaitFor =
|
|
87
|
+
export type TooltipWaitFor = 'dismissed' | 'cta-click' | `timeout:${number}`;
|
|
88
88
|
/** Show a tooltip near an anchor element */
|
|
89
89
|
export interface TooltipAction extends BaseAction {
|
|
90
|
-
kind:
|
|
90
|
+
kind: 'overlays:tooltip';
|
|
91
91
|
anchorId: string;
|
|
92
92
|
content: TooltipContent;
|
|
93
93
|
trigger?: TooltipTrigger;
|
|
@@ -96,12 +96,12 @@ export interface TooltipAction extends BaseAction {
|
|
|
96
96
|
waitFor?: TooltipWaitFor;
|
|
97
97
|
}
|
|
98
98
|
/** Modal lifecycle - when the action completes (for sequences) */
|
|
99
|
-
export type ModalWaitFor =
|
|
99
|
+
export type ModalWaitFor = 'dismissed' | 'cta-click' | `timeout:${number}`;
|
|
100
100
|
/** Show a centered modal dialog */
|
|
101
101
|
export interface ModalAction extends BaseAction {
|
|
102
|
-
kind:
|
|
102
|
+
kind: 'overlays:modal';
|
|
103
103
|
content: ModalContent;
|
|
104
|
-
size?:
|
|
104
|
+
size?: 'sm' | 'md' | 'lg';
|
|
105
105
|
blocking?: boolean;
|
|
106
106
|
scrim?: {
|
|
107
107
|
opacity?: number;
|
|
@@ -117,51 +117,51 @@ export interface ModalAction extends BaseAction {
|
|
|
117
117
|
}
|
|
118
118
|
/** Insert HTML content relative to anchor */
|
|
119
119
|
export interface InsertHtmlAction extends BaseAction {
|
|
120
|
-
kind:
|
|
120
|
+
kind: 'content:insertHtml';
|
|
121
121
|
anchorId: string;
|
|
122
122
|
html: string;
|
|
123
123
|
position: InsertPosition;
|
|
124
124
|
}
|
|
125
125
|
/** Set text content of an anchor */
|
|
126
126
|
export interface SetTextAction extends BaseAction {
|
|
127
|
-
kind:
|
|
127
|
+
kind: 'content:setText';
|
|
128
128
|
anchorId: string;
|
|
129
129
|
text: string;
|
|
130
130
|
}
|
|
131
131
|
/** Set an attribute on an anchor */
|
|
132
132
|
export interface SetAttrAction extends BaseAction {
|
|
133
|
-
kind:
|
|
133
|
+
kind: 'content:setAttr';
|
|
134
134
|
anchorId: string;
|
|
135
135
|
attr: string;
|
|
136
136
|
value: string;
|
|
137
137
|
}
|
|
138
138
|
/** Add a CSS class to an anchor */
|
|
139
139
|
export interface AddClassAction extends BaseAction {
|
|
140
|
-
kind:
|
|
140
|
+
kind: 'content:addClass';
|
|
141
141
|
anchorId: string;
|
|
142
142
|
className: string;
|
|
143
143
|
}
|
|
144
144
|
/** Remove a CSS class from an anchor */
|
|
145
145
|
export interface RemoveClassAction extends BaseAction {
|
|
146
|
-
kind:
|
|
146
|
+
kind: 'content:removeClass';
|
|
147
147
|
anchorId: string;
|
|
148
148
|
className: string;
|
|
149
149
|
}
|
|
150
150
|
/** Set inline styles on an anchor */
|
|
151
151
|
export interface SetStyleAction extends BaseAction {
|
|
152
|
-
kind:
|
|
152
|
+
kind: 'content:setStyle';
|
|
153
153
|
anchorId: string;
|
|
154
154
|
styles: Record<string, string>;
|
|
155
155
|
}
|
|
156
156
|
/** Mount a widget to a surface slot */
|
|
157
157
|
export interface MountWidgetAction extends BaseAction {
|
|
158
|
-
kind:
|
|
158
|
+
kind: 'core:mountWidget';
|
|
159
159
|
slot: SurfaceSlot;
|
|
160
160
|
widget: WidgetConfig;
|
|
161
161
|
}
|
|
162
162
|
/** Scroll to an anchor element */
|
|
163
163
|
export interface ScrollToAction extends BaseAction {
|
|
164
|
-
kind:
|
|
164
|
+
kind: 'navigation:scrollTo';
|
|
165
165
|
anchorId: string;
|
|
166
166
|
behavior?: ScrollBehavior;
|
|
167
167
|
block?: ScrollLogicalPosition;
|
|
@@ -169,13 +169,13 @@ export interface ScrollToAction extends BaseAction {
|
|
|
169
169
|
}
|
|
170
170
|
/** Navigate to a URL */
|
|
171
171
|
export interface NavigateAction extends BaseAction {
|
|
172
|
-
kind:
|
|
172
|
+
kind: 'navigation:navigate';
|
|
173
173
|
url: string;
|
|
174
|
-
target?:
|
|
174
|
+
target?: '_self' | '_blank';
|
|
175
175
|
}
|
|
176
176
|
/** Wait for a duration or an event on the EventBus */
|
|
177
177
|
export interface WaitAction extends BaseAction {
|
|
178
|
-
kind:
|
|
178
|
+
kind: 'core:wait';
|
|
179
179
|
/** Wait for a specific duration in milliseconds */
|
|
180
180
|
durationMs?: number;
|
|
181
181
|
/** Wait for an event on the EventBus */
|
|
@@ -183,26 +183,26 @@ export interface WaitAction extends BaseAction {
|
|
|
183
183
|
}
|
|
184
184
|
/** Execute actions in sequence, awaiting each one's completion */
|
|
185
185
|
export interface SequenceAction extends BaseAction {
|
|
186
|
-
kind:
|
|
186
|
+
kind: 'core:sequence';
|
|
187
187
|
actions: ActionStep[];
|
|
188
188
|
}
|
|
189
189
|
/** Execute actions in parallel */
|
|
190
190
|
export interface ParallelAction extends BaseAction {
|
|
191
|
-
kind:
|
|
191
|
+
kind: 'core:parallel';
|
|
192
192
|
actions: ActionStep[];
|
|
193
193
|
/** How to determine completion: "all" waits for all, "any" completes when first finishes */
|
|
194
|
-
waitFor?:
|
|
194
|
+
waitFor?: 'all' | 'any';
|
|
195
195
|
}
|
|
196
196
|
/** Tour step with route + action mapping */
|
|
197
197
|
export interface TourStep {
|
|
198
198
|
id: string;
|
|
199
199
|
action: ActionStep;
|
|
200
200
|
route?: string;
|
|
201
|
-
onAction?: Record<string, string |
|
|
201
|
+
onAction?: Record<string, string | 'end'>;
|
|
202
202
|
}
|
|
203
203
|
/** Orchestrate sequential steps with cross-page state */
|
|
204
204
|
export interface TourAction extends BaseAction {
|
|
205
|
-
kind:
|
|
205
|
+
kind: 'core:tour';
|
|
206
206
|
tourId: string;
|
|
207
207
|
steps: TourStep[];
|
|
208
208
|
startStep?: string;
|
|
@@ -211,9 +211,9 @@ export interface TourAction extends BaseAction {
|
|
|
211
211
|
/** Union of all action step types */
|
|
212
212
|
export type ActionStep = HighlightAction | PulseAction | BadgeAction | TooltipAction | ModalAction | InsertHtmlAction | SetTextAction | SetAttrAction | AddClassAction | RemoveClassAction | SetStyleAction | MountWidgetAction | ScrollToAction | NavigateAction | WaitAction | SequenceAction | ParallelAction | TourAction;
|
|
213
213
|
/** Extract action kind literal types */
|
|
214
|
-
export type ActionKind = ActionStep[
|
|
214
|
+
export type ActionKind = ActionStep['kind'];
|
|
215
215
|
/** State of an action */
|
|
216
|
-
export type ActionState =
|
|
216
|
+
export type ActionState = 'pending' | 'applied' | 'reverted' | 'failed';
|
|
217
217
|
/** Handle returned when an action is applied */
|
|
218
218
|
export interface ActionHandle {
|
|
219
219
|
/** Unique ID for this action instance */
|
|
@@ -353,27 +353,27 @@ export interface ActionEngine {
|
|
|
353
353
|
}
|
|
354
354
|
/** Renderable content types for surfaces */
|
|
355
355
|
export type RenderableContent = {
|
|
356
|
-
type:
|
|
356
|
+
type: 'react';
|
|
357
357
|
component: unknown;
|
|
358
358
|
props?: Record<string, unknown>;
|
|
359
359
|
} | {
|
|
360
|
-
type:
|
|
360
|
+
type: 'html';
|
|
361
361
|
content: string;
|
|
362
362
|
} | {
|
|
363
|
-
type:
|
|
363
|
+
type: 'widget';
|
|
364
364
|
widgetId: string;
|
|
365
365
|
config?: Record<string, unknown>;
|
|
366
366
|
} | {
|
|
367
|
-
type:
|
|
367
|
+
type: 'custom';
|
|
368
368
|
mount: (container: HTMLElement) => () => void;
|
|
369
369
|
};
|
|
370
370
|
/** Mount options for surfaces */
|
|
371
371
|
export interface MountOptions {
|
|
372
372
|
priority?: number;
|
|
373
373
|
exclusive?: boolean;
|
|
374
|
-
animation?:
|
|
374
|
+
animation?: 'fade' | 'slide' | 'scale' | 'none';
|
|
375
375
|
position?: {
|
|
376
|
-
placement: Placement |
|
|
376
|
+
placement: Placement | 'auto';
|
|
377
377
|
offset?: {
|
|
378
378
|
x: number;
|
|
379
379
|
y: number;
|