@syntrologie/runtime-sdk 2.4.1 → 2.6.0-canary.1

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 (62) hide show
  1. package/CAPABILITIES.md +66 -1
  2. package/dist/SmartCanvasApp.d.ts +5 -3
  3. package/dist/actions/executors/index.d.ts +1 -2
  4. package/dist/actions/index.d.ts +2 -2
  5. package/dist/actions/schema.d.ts +19111 -20709
  6. package/dist/actions/schema.js +5 -2
  7. package/dist/actions/types.d.ts +45 -48
  8. package/dist/anchor/AnchorResolver.d.ts +18 -0
  9. package/dist/anchor/index.d.ts +2 -0
  10. package/dist/api.d.ts +3 -8
  11. package/dist/apps/examples/gamification-app.example.d.ts +8 -8
  12. package/dist/{chunk-4NYS7GAW.js → chunk-BU4Z6PD7.js} +45 -7
  13. package/dist/chunk-BU4Z6PD7.js.map +7 -0
  14. package/dist/{chunk-QGWATS3Z.js → chunk-Q4WGXNKC.js} +2775 -1052
  15. package/dist/chunk-Q4WGXNKC.js.map +7 -0
  16. package/dist/{chunk-OGTCFYR3.js → chunk-R5DNAIRI.js} +45 -34
  17. package/dist/chunk-R5DNAIRI.js.map +7 -0
  18. package/dist/chunk-XDYJ64IN.js +178 -0
  19. package/dist/chunk-XDYJ64IN.js.map +7 -0
  20. package/dist/components/ShadowCanvasOverlay.d.ts +2 -20
  21. package/dist/components/TileIcon.d.ts +14 -0
  22. package/dist/config/schema.d.ts +5529 -3620
  23. package/dist/config/schema.js +21 -61
  24. package/dist/config/schema.js.map +3 -3
  25. package/dist/context/schema.d.ts +16 -16
  26. package/dist/decisions/schema.d.ts +357 -2789
  27. package/dist/decisions/schema.js +7 -1
  28. package/dist/decisions/types.d.ts +24 -2
  29. package/dist/events/registerConfigPredicates.d.ts +7 -10
  30. package/dist/events/schema.d.ts +12 -12
  31. package/dist/experiments/adapters/growthbook.d.ts +2 -0
  32. package/dist/experiments/types.d.ts +7 -0
  33. package/dist/hooks/useShadowCanvasConfig.d.ts +6 -4
  34. package/dist/index.d.ts +1 -0
  35. package/dist/index.js +154 -186
  36. package/dist/index.js.map +3 -3
  37. package/dist/overlays/schema.d.ts +70 -70
  38. package/dist/react.js +4 -3
  39. package/dist/react.js.map +1 -1
  40. package/dist/runtime.d.ts +3 -0
  41. package/dist/smart-canvas.esm.js +123 -84
  42. package/dist/smart-canvas.esm.js.map +4 -4
  43. package/dist/smart-canvas.js +3271 -1210
  44. package/dist/smart-canvas.js.map +4 -4
  45. package/dist/smart-canvas.min.js +123 -84
  46. package/dist/smart-canvas.min.js.map +4 -4
  47. package/dist/surfaces/types.d.ts +2 -1
  48. package/dist/theme/ThemeProvider.d.ts +11 -16
  49. package/dist/theme/defaultTheme.d.ts +6 -1
  50. package/dist/theme/index.d.ts +3 -4
  51. package/dist/theme/types.d.ts +11 -0
  52. package/dist/version.d.ts +1 -1
  53. package/dist/widgets/WidgetRegistry.d.ts +1 -0
  54. package/package.json +9 -8
  55. package/schema/canvas-config.schema.json +10583 -1049
  56. package/scripts/validate-config.mjs +180 -0
  57. package/dist/actions/executors/tour.d.ts +0 -18
  58. package/dist/chunk-4NYS7GAW.js.map +0 -7
  59. package/dist/chunk-OGTCFYR3.js.map +0 -7
  60. package/dist/chunk-QGWATS3Z.js.map +0 -7
  61. package/dist/hooks/useHostPatches.d.ts +0 -9
  62. package/dist/theme/extractHostTheme.d.ts +0 -14
package/CAPABILITIES.md CHANGED
@@ -855,7 +855,7 @@ Navigates to a URL.
855
855
 
856
856
  # @syntrologie/adapt-overlays
857
857
 
858
- Visual overlay capabilities including highlights, tooltips, badges, and pulse animations.
858
+ Visual overlay capabilities including highlights, tooltips, badges, pulse animations, and celebrations.
859
859
 
860
860
  ## Actions
861
861
 
@@ -1029,6 +1029,71 @@ Shows a centered modal dialog with optional CTA buttons.
1029
1029
  }
1030
1030
  ```
1031
1031
 
1032
+ ### celebrate
1033
+
1034
+ Renders a fullscreen Canvas 2D celebration effect. One action kind with a pluggable `effect` parameter supporting multiple visual presets.
1035
+
1036
+ | Property | Type | Required | Default | Description |
1037
+ | ----------- | ---------------------------------- | -------- | -------------------------- | --------------------------------------------- |
1038
+ | `kind` | `"overlays:celebrate"` | Yes | | Action type |
1039
+ | `effect` | string | Yes | | Effect name (see presets below) |
1040
+ | `duration` | number | No | `3000` | Animation duration in ms |
1041
+ | `intensity` | `"light"` \| `"medium"` \| `"heavy"` | No | `"medium"` | Particle density |
1042
+ | `colors` | string[] | No | Rainbow palette | Color palette for particles |
1043
+ | `props` | object | No | | Effect-specific properties (see presets below) |
1044
+
1045
+ **Available effect presets:**
1046
+
1047
+ - **`confetti`** — Falling rectangular/circular confetti pieces with gravity, air resistance, and rotation
1048
+ - **`fireworks`** — Multiple burst centers with radiating particles, deceleration, and glow effect
1049
+ - **`sparkles`** — Diamond shapes that twinkle via sine-wave opacity oscillation and float gently upward
1050
+ - **`emoji-rain`** — Emoji characters falling from the top with horizontal sine-wave wobble. Use `props.emoji` to set the character (default: `"🎉"`)
1051
+
1052
+ **Confetti:**
1053
+
1054
+ ```json
1055
+ {
1056
+ "kind": "overlays:celebrate",
1057
+ "effect": "confetti",
1058
+ "duration": 4000,
1059
+ "intensity": "heavy",
1060
+ "colors": ["#ff0000", "#00ff00", "#0000ff", "#ffff00"]
1061
+ }
1062
+ ```
1063
+
1064
+ **Fireworks:**
1065
+
1066
+ ```json
1067
+ {
1068
+ "kind": "overlays:celebrate",
1069
+ "effect": "fireworks",
1070
+ "duration": 3000,
1071
+ "intensity": "medium"
1072
+ }
1073
+ ```
1074
+
1075
+ **Sparkles:**
1076
+
1077
+ ```json
1078
+ {
1079
+ "kind": "overlays:celebrate",
1080
+ "effect": "sparkles",
1081
+ "duration": 5000,
1082
+ "colors": ["#ffd700", "#ffffff", "#fffacd"]
1083
+ }
1084
+ ```
1085
+
1086
+ **Emoji rain:**
1087
+
1088
+ ```json
1089
+ {
1090
+ "kind": "overlays:celebrate",
1091
+ "effect": "emoji-rain",
1092
+ "duration": 3000,
1093
+ "props": { "emoji": "🔥" }
1094
+ }
1095
+ ```
1096
+
1032
1097
 
1033
1098
  ---
1034
1099
 
@@ -1,10 +1,10 @@
1
1
  import { type ReactNode } from 'react';
2
2
  import type { BatchActionHandle } from './actions/types';
3
- import { type CanvasTheme } from './components/ShadowCanvasOverlay';
4
3
  import type { SmartCanvasController } from './controller';
5
4
  import type { ExperimentClient } from './experiments/types';
6
5
  import type { SmartCanvasRuntime } from './runtime';
7
6
  import type { TelemetryClient } from './telemetry/types';
7
+ import type { CanvasThemeConfig } from './theme';
8
8
  import type { CanvasConfigFetcher } from './types';
9
9
  export interface SmartCanvasAppProps {
10
10
  controller: SmartCanvasController;
@@ -13,6 +13,7 @@ export interface SmartCanvasAppProps {
13
13
  configUriFeatureKey?: string;
14
14
  configFeatureKey?: string;
15
15
  fetchCredentials?: RequestCredentials;
16
+ /** @deprecated No longer used — config updates are event-driven via ExperimentClient.onFeaturesChanged */
16
17
  pollIntervalMs?: number;
17
18
  experiments?: ExperimentClient;
18
19
  telemetry?: TelemetryClient;
@@ -29,8 +30,9 @@ export interface SmartCanvasAppProps {
29
30
  footerSlot?: ReactNode;
30
31
  launcherLabel?: string;
31
32
  canvasHost?: HTMLElement | null;
32
- theme?: Partial<CanvasTheme>;
33
33
  /** Batch handle from eager action application in createSmartCanvas(). Prevents double-apply. */
34
34
  initialBatchHandle?: BatchActionHandle | null;
35
+ /** Workspace-level theme for 3-layer inheritance (defaults → workspace → config) */
36
+ workspaceTheme?: CanvasThemeConfig;
35
37
  }
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;
38
+ export declare function SmartCanvasApp({ controller, fetcher, configUri, configUriFeatureKey, configFeatureKey, fetchCredentials, pollIntervalMs, experiments, telemetry, runtime, overlayFetcher, overlayConfigUri, overlayConfigFeatureKey, overlayFetchCredentials, footerSlot, launcherLabel, canvasHost, initialBatchHandle, workspaceTheme, }: SmartCanvasAppProps): import("react/jsx-runtime").JSX.Element;
@@ -112,6 +112,5 @@ export declare function getExecutor(kind: ActionKind | string): ActionExecutor<A
112
112
  */
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
- export { executeBadge, executeHighlight, executeModal, executePulse, executeTooltip, } from '@syntrologie/adapt-overlays/runtime';
115
+ export { executeBadge, executeHighlight, executeModal, executePulse, executeTooltip, executeTour, } from '@syntrologie/adapt-overlays/runtime';
116
116
  export { executeParallel, executeSequence, executeWait } from './core-flow';
117
- export { executeTour } from './tour';
@@ -6,6 +6,6 @@
6
6
  export { createActionEngine } from './ActionEngine';
7
7
  export type { ExecutorRegistration } from './executors';
8
8
  export { ExecutorRegistry, executorRegistry, getExecutor, hasExecutor } from './executors';
9
- export { AddClassZ, BadgePositionZ, BadgeZ, CtaButtonZ, coreActionStepSchemas, HighlightStyleZ, HighlightZ, InsertHtmlZ, InsertPositionZ, ModalContentZ, ModalZ, MountWidgetZ, NavigateZ, ParallelZ, PlacementZ, PulseZ, RemoveClassZ, ScrollBehaviorZ, ScrollLogicalPositionZ, ScrollToZ, SequenceZ, SetAttrZ, SetStyleZ, SetTextZ, TooltipContentZ, TooltipTriggerZ, TooltipZ, TourStepForSchemaZ, TourZ, WaitZ, WidgetConfigZ, } from './schema';
10
- export type { ActionEngine, ActionEngineExecutorRegistry, ActionEngineOptions, ActionExecutor, ActionHandle, ActionKind, ActionState, ActionStep, ActiveAction, AddClassAction, BadgeAction, BadgePosition, BatchActionHandle, ExecutorCleanup, ExecutorContext, ExecutorResult, ExecutorUpdate, HighlightAction, HighlightStyle, InsertHtmlAction, InsertPosition, MountWidgetAction, NavigateAction, PulseAction, RemoveClassAction, ScrollToAction, SetAttrAction, SetStyleAction, SetTextAction, TooltipAction, TooltipContent, TooltipTrigger, ValidationError, ValidationResult, ValidationWarning, WidgetConfig, } from './types';
9
+ export { AddClassZ, AnchorIdZ, BadgePositionZ, BadgeZ, CtaButtonZ, coreActionStepSchemas, HighlightStyleZ, HighlightZ, InsertHtmlZ, InsertPositionZ, ModalContentZ, ModalZ, MountWidgetZ, NavigateZ, ParallelZ, PlacementZ, PulseZ, RemoveClassZ, ScrollBehaviorZ, ScrollLogicalPositionZ, ScrollToZ, SequenceZ, SetAttrZ, SetStyleZ, SetTextZ, TooltipContentZ, TooltipTriggerZ, TooltipZ, TourStepForSchemaZ, TourZ, WaitZ, WidgetConfigZ, } from './schema';
10
+ export type { ActionEngine, ActionEngineExecutorRegistry, ActionEngineOptions, ActionExecutor, ActionHandle, ActionKind, ActionState, ActionStep, ActiveAction, AddClassAction, AnchorId, BadgeAction, BadgePosition, BatchActionHandle, ExecutorCleanup, ExecutorContext, ExecutorResult, ExecutorUpdate, HighlightAction, HighlightStyle, InsertHtmlAction, InsertPosition, MountWidgetAction, NavigateAction, PulseAction, RemoveClassAction, ScrollToAction, SetAttrAction, SetStyleAction, SetTextAction, TooltipAction, TooltipContent, TooltipTrigger, TourAction, TourStep, ValidationError, ValidationResult, ValidationWarning, WidgetConfig, } from './types';
11
11
  export { validateAction, validateActions } from './validation';