@syntrologie/runtime-sdk 2.4.0-canary.20 → 2.4.0-canary.21

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.
@@ -1,113 +1,18 @@
1
1
  import {
2
- ActivationConfigZ
3
- } from "../chunk-P5G4KT2U.js";
4
-
5
- // src/config/schema.ts
6
- import { z } from "zod";
7
- var NotificationDeepLinkZ = z.object({
8
- tileId: z.string(),
9
- itemId: z.string().optional()
10
- }).strict();
11
- var TileNotificationRuleZ = z.object({
12
- on: z.string(),
13
- title: z.string(),
14
- body: z.string().optional(),
15
- icon: z.string().optional(),
16
- ttl: z.number().optional(),
17
- cooldown: z.number().optional(),
18
- deepLink: NotificationDeepLinkZ.optional()
19
- }).strict();
20
- var TileZ = z.object({
21
- id: z.string(),
22
- title: z.string().optional(),
23
- priority: z.number().optional(),
24
- widget: z.string(),
25
- props: z.record(z.unknown()).optional(),
26
- activation: ActivationConfigZ.optional(),
27
- notifications: z.array(TileNotificationRuleZ).optional()
28
- }).strict();
29
- var CanvasElementConfigZ = z.object({
30
- position: z.enum(["left", "right"]).optional(),
31
- background: z.string().optional(),
32
- blur: z.string().optional(),
33
- border: z.string().optional(),
34
- width: z.string().optional()
35
- });
36
- var LauncherElementConfigZ = z.object({
37
- background: z.string().optional(),
38
- backgroundHover: z.string().optional(),
39
- color: z.string().optional(),
40
- size: z.string().optional(),
41
- shadow: z.string().optional()
42
- });
43
- var TileElementConfigZ = z.object({
44
- background: z.string().optional(),
45
- backgroundHover: z.string().optional(),
46
- border: z.string().optional(),
47
- borderRadius: z.string().optional(),
48
- shadow: z.string().optional(),
49
- titleColor: z.string().optional(),
50
- textColor: z.string().optional(),
51
- iconBackground: z.string().optional(),
52
- iconShadow: z.string().optional()
53
- });
54
- var OverlayElementConfigZ = z.object({
55
- background: z.string().optional(),
56
- textColor: z.string().optional(),
57
- border: z.string().optional(),
58
- borderRadius: z.string().optional(),
59
- scrimOpacity: z.string().optional(),
60
- highlightRing: z.string().optional()
61
- });
62
- var NotificationElementConfigZ = z.object({
63
- background: z.string().optional(),
64
- textColor: z.string().optional(),
65
- textSecondaryColor: z.string().optional(),
66
- border: z.string().optional(),
67
- borderRadius: z.string().optional(),
68
- successColor: z.string().optional(),
69
- warningColor: z.string().optional(),
70
- errorColor: z.string().optional(),
71
- iconBackground: z.string().optional(),
72
- progressGradient: z.string().optional()
73
- });
74
- var CanvasThemeConfigZ = z.object({
75
- mode: z.enum(["dark", "light"]).optional(),
76
- fontFamily: z.string().optional(),
77
- colorPrimary: z.string().optional(),
78
- colorPrimaryHover: z.string().optional(),
79
- borderRadius: z.string().optional(),
80
- canvas: CanvasElementConfigZ.optional(),
81
- launcher: LauncherElementConfigZ.optional(),
82
- tile: TileElementConfigZ.optional(),
83
- overlay: OverlayElementConfigZ.optional(),
84
- notification: NotificationElementConfigZ.optional()
85
- }).strict();
86
- var LauncherConfigZ = z.object({
87
- enabled: z.boolean().optional(),
88
- label: z.string().optional(),
89
- position: z.string().optional(),
90
- animate: z.boolean().optional(),
91
- animationStyle: z.enum(["pulse", "bounce", "glow"]).optional(),
92
- notificationCount: z.number().optional()
93
- }).strict();
94
- var CanvasConfigResponseZ = z.object({
95
- schemaVersion: z.string().optional(),
96
- fetchedAt: z.string().datetime(),
97
- configVersion: z.string().optional(),
98
- canvasTitle: z.string().optional(),
99
- tiles: z.array(TileZ),
100
- actions: z.array(z.any()),
101
- theme: CanvasThemeConfigZ.optional(),
102
- launcher: LauncherConfigZ.optional(),
103
- verificationSteps: z.array(z.string()).optional()
104
- }).strict();
105
- var configSchemas = [
106
- { defName: "tile", schema: TileZ },
107
- { defName: "themeConfig", schema: CanvasThemeConfigZ },
108
- { defName: "launcherConfig", schema: LauncherConfigZ },
109
- { defName: "canvasConfigResponse", schema: CanvasConfigResponseZ }
110
- ];
2
+ CanvasConfigResponseZ,
3
+ CanvasElementConfigZ,
4
+ CanvasThemeConfigZ,
5
+ LauncherConfigZ,
6
+ LauncherElementConfigZ,
7
+ NotificationDeepLinkZ,
8
+ NotificationElementConfigZ,
9
+ OverlayElementConfigZ,
10
+ TileElementConfigZ,
11
+ TileNotificationRuleZ,
12
+ TileZ,
13
+ configSchemas
14
+ } from "../chunk-2UYZ5DWI.js";
15
+ import "../chunk-P5G4KT2U.js";
111
16
  export {
112
17
  CanvasConfigResponseZ,
113
18
  CanvasElementConfigZ,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../src/config/schema.ts"],
4
- "sourcesContent": ["/**\n * Zod schemas for canvas configuration types.\n *\n * Single source of truth for tile, theme, launcher, and top-level\n * CanvasConfigResponse shapes. These schemas are converted to JSON Schema\n * during build and merged into the unified canvas-config.schema.json.\n *\n * Design decisions:\n * - `.strict()` on top-level objects \u2192 `additionalProperties: false` in JSON Schema\n * - Element sub-schemas (canvas, tile, etc.) are NOT strict to allow future expansion\n */\n\nimport { z } from 'zod';\nimport { ActivationConfigZ } from '../decisions/schema';\n\n// ============================================================================\n// Tile Notification Sub-Types\n// ============================================================================\n\nconst NotificationDeepLinkZ = z\n .object({\n tileId: z.string(),\n itemId: z.string().optional(),\n })\n .strict();\n\nconst TileNotificationRuleZ = z\n .object({\n on: z.string(),\n title: z.string(),\n body: z.string().optional(),\n icon: z.string().optional(),\n ttl: z.number().optional(),\n cooldown: z.number().optional(),\n deepLink: NotificationDeepLinkZ.optional(),\n })\n .strict();\n\n// ============================================================================\n// Tile\n// ============================================================================\n\nexport const TileZ = z\n .object({\n id: z.string(),\n title: z.string().optional(),\n priority: z.number().optional(),\n widget: z.string(),\n props: z.record(z.unknown()).optional(),\n activation: ActivationConfigZ.optional(),\n notifications: z.array(TileNotificationRuleZ).optional(),\n })\n .strict();\n\n// ============================================================================\n// Theme Config \u2014 Element Sub-Schemas\n// ============================================================================\n\nexport const CanvasElementConfigZ = z.object({\n position: z.enum(['left', 'right']).optional(),\n background: z.string().optional(),\n blur: z.string().optional(),\n border: z.string().optional(),\n width: z.string().optional(),\n});\n\nexport const LauncherElementConfigZ = z.object({\n background: z.string().optional(),\n backgroundHover: z.string().optional(),\n color: z.string().optional(),\n size: z.string().optional(),\n shadow: z.string().optional(),\n});\n\nexport const TileElementConfigZ = z.object({\n background: z.string().optional(),\n backgroundHover: z.string().optional(),\n border: z.string().optional(),\n borderRadius: z.string().optional(),\n shadow: z.string().optional(),\n titleColor: z.string().optional(),\n textColor: z.string().optional(),\n iconBackground: z.string().optional(),\n iconShadow: z.string().optional(),\n});\n\nexport const OverlayElementConfigZ = z.object({\n background: z.string().optional(),\n textColor: z.string().optional(),\n border: z.string().optional(),\n borderRadius: z.string().optional(),\n scrimOpacity: z.string().optional(),\n highlightRing: z.string().optional(),\n});\n\nexport const NotificationElementConfigZ = z.object({\n background: z.string().optional(),\n textColor: z.string().optional(),\n textSecondaryColor: z.string().optional(),\n border: z.string().optional(),\n borderRadius: z.string().optional(),\n successColor: z.string().optional(),\n warningColor: z.string().optional(),\n errorColor: z.string().optional(),\n iconBackground: z.string().optional(),\n progressGradient: z.string().optional(),\n});\n\n// ============================================================================\n// Theme Config \u2014 Top-Level\n// ============================================================================\n\nexport const CanvasThemeConfigZ = z\n .object({\n mode: z.enum(['dark', 'light']).optional(),\n fontFamily: z.string().optional(),\n colorPrimary: z.string().optional(),\n colorPrimaryHover: z.string().optional(),\n borderRadius: z.string().optional(),\n canvas: CanvasElementConfigZ.optional(),\n launcher: LauncherElementConfigZ.optional(),\n tile: TileElementConfigZ.optional(),\n overlay: OverlayElementConfigZ.optional(),\n notification: NotificationElementConfigZ.optional(),\n })\n .strict();\n\n// ============================================================================\n// Launcher Config\n// ============================================================================\n\nexport const LauncherConfigZ = z\n .object({\n enabled: z.boolean().optional(),\n label: z.string().optional(),\n position: z.string().optional(),\n animate: z.boolean().optional(),\n animationStyle: z.enum(['pulse', 'bounce', 'glow']).optional(),\n notificationCount: z.number().optional(),\n })\n .strict();\n\n// ============================================================================\n// Canvas Config Response (top-level)\n// ============================================================================\n\nexport const CanvasConfigResponseZ = z\n .object({\n schemaVersion: z.string().optional(),\n fetchedAt: z.string().datetime(),\n configVersion: z.string().optional(),\n canvasTitle: z.string().optional(),\n tiles: z.array(TileZ),\n actions: z.array(z.any()),\n theme: CanvasThemeConfigZ.optional(),\n launcher: LauncherConfigZ.optional(),\n verificationSteps: z.array(z.string()).optional(),\n })\n .strict();\n\n// ============================================================================\n// Export: Array for unified schema generation\n// ============================================================================\n\n/**\n * Config schemas for unified JSON Schema generation.\n * The generator imports this array and converts each to a JSON Schema $def.\n */\nexport const configSchemas = [\n { defName: 'tile', schema: TileZ },\n { defName: 'themeConfig', schema: CanvasThemeConfigZ },\n { defName: 'launcherConfig', schema: LauncherConfigZ },\n { defName: 'canvasConfigResponse', schema: CanvasConfigResponseZ },\n];\n\n// ============================================================================\n// Named Exports\n// ============================================================================\n\nexport { NotificationDeepLinkZ, TileNotificationRuleZ };\n"],
5
- "mappings": ";;;;;AAYA,SAAS,SAAS;AAOlB,IAAM,wBAAwB,EAC3B,OAAO;AAAA,EACN,QAAQ,EAAE,OAAO;AAAA,EACjB,QAAQ,EAAE,OAAO,EAAE,SAAS;AAC9B,CAAC,EACA,OAAO;AAEV,IAAM,wBAAwB,EAC3B,OAAO;AAAA,EACN,IAAI,EAAE,OAAO;AAAA,EACb,OAAO,EAAE,OAAO;AAAA,EAChB,MAAM,EAAE,OAAO,EAAE,SAAS;AAAA,EAC1B,MAAM,EAAE,OAAO,EAAE,SAAS;AAAA,EAC1B,KAAK,EAAE,OAAO,EAAE,SAAS;AAAA,EACzB,UAAU,EAAE,OAAO,EAAE,SAAS;AAAA,EAC9B,UAAU,sBAAsB,SAAS;AAC3C,CAAC,EACA,OAAO;AAMH,IAAM,QAAQ,EAClB,OAAO;AAAA,EACN,IAAI,EAAE,OAAO;AAAA,EACb,OAAO,EAAE,OAAO,EAAE,SAAS;AAAA,EAC3B,UAAU,EAAE,OAAO,EAAE,SAAS;AAAA,EAC9B,QAAQ,EAAE,OAAO;AAA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AA,EAC9B,OAAO,EAAE,OAAO,EAAE,SAAS;AAAA,EAC3B,UAAU,EAAE,OAAO,EAAE,SAAS;AAAA,EAC9B,SAAS,EAAE,QAAQ,EAAE,SAAS;AAAA,EAC9B,gBAAgB,EAAE,KAAK,CAAC,SAAS,UAAU,MAAM,CAAC,EAAE,SAAS;AAAA,EAC7D,mBAAmB,EAAE,OAAO,EAAE,SAAS;AACzC,CAAC,EACA,OAAO;AAMH,IAAM,wBAAwB,EAClC,OAAO;AAAA,EACN,eAAe,EAAE,OAAO,EAAE,SAAS;AAAA,EACnC,WAAW,EAAE,OAAO,EAAE,SAAS;AAAA,EAC/B,eAAe,EAAE,OAAO,EAAE,SAAS;AAAA,EACnC,aAAa,EAAE,OAAO,EAAE,SAAS;AAAA,EACjC,OAAO,EAAE,MAAM,KAAK;AAAA,EACpB,SAAS,EAAE,MAAM,EAAE,IAAI,CAAC;AAAA,EACxB,OAAO,mBAAmB,SAAS;AAAA,EACnC,UAAU,gBAAgB,SAAS;AAAA,EACnC,mBAAmB,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,SAAS;AAClD,CAAC,EACA,OAAO;AAUH,IAAM,gBAAgB;AAAA,EAC3B,EAAE,SAAS,QAAQ,QAAQ,MAAM;AAAA,EACjC,EAAE,SAAS,eAAe,QAAQ,mBAAmB;AAAA,EACrD,EAAE,SAAS,kBAAkB,QAAQ,gBAAgB;AAAA,EACrD,EAAE,SAAS,wBAAwB,QAAQ,sBAAsB;AACnE;",
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
6
  "names": []
7
7
  }
@@ -10,15 +10,15 @@ export declare const NormalizedEventZ: z.ZodObject<{
10
10
  props: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
11
11
  schemaVersion: z.ZodString;
12
12
  }, "strip", z.ZodTypeAny, {
13
+ schemaVersion: string;
13
14
  source: "canvas" | "posthog" | "derived";
14
15
  name: string;
15
- schemaVersion: string;
16
16
  ts: number;
17
17
  props?: Record<string, unknown> | undefined;
18
18
  }, {
19
+ schemaVersion: string;
19
20
  source: "canvas" | "posthog" | "derived";
20
21
  name: string;
21
- schemaVersion: string;
22
22
  ts: number;
23
23
  props?: Record<string, unknown> | undefined;
24
24
  }>;
@@ -39,15 +39,15 @@ export declare const EventFilterZ: z.ZodObject<{
39
39
  * Validate a NormalizedEvent object.
40
40
  */
41
41
  export declare function validateNormalizedEvent(data: unknown): z.SafeParseReturnType<{
42
+ schemaVersion: string;
42
43
  source: "canvas" | "posthog" | "derived";
43
44
  name: string;
44
- schemaVersion: string;
45
45
  ts: number;
46
46
  props?: Record<string, unknown> | undefined;
47
47
  }, {
48
+ schemaVersion: string;
48
49
  source: "canvas" | "posthog" | "derived";
49
50
  name: string;
50
- schemaVersion: string;
51
51
  ts: number;
52
52
  props?: Record<string, unknown> | undefined;
53
53
  }>;
package/dist/index.js CHANGED
@@ -100,7 +100,7 @@ import {
100
100
  validateAction,
101
101
  validateActions,
102
102
  widgetRegistry
103
- } from "./chunk-OJA7NRHL.js";
103
+ } from "./chunk-IPU3WVPY.js";
104
104
  import {
105
105
  AddClassZ,
106
106
  AnchorIdZ,
@@ -134,7 +134,8 @@ import {
134
134
  WaitZ,
135
135
  WidgetConfigZ,
136
136
  coreActionStepSchemas
137
- } from "./chunk-LR5AA5SE.js";
137
+ } from "./chunk-HF3D7YFQ.js";
138
+ import "./chunk-2UYZ5DWI.js";
138
139
  import {
139
140
  ActivationConfigZ,
140
141
  AnchorVisibleConditionZ,
@@ -842,14 +843,18 @@ var themeStyles = {
842
843
  }
843
844
  }
844
845
  };
845
- function FAQItem({ item, isExpanded, onToggle, theme, feedbackConfig, feedbackValue, onFeedback }) {
846
+ function FAQItem({ item, isExpanded, isHighlighted, onToggle, theme, feedbackConfig, feedbackValue, onFeedback }) {
846
847
  const [isHovered, setIsHovered] = useState2(false);
847
848
  const colors = themeStyles[theme];
848
849
  const { question, answer } = item.config;
849
850
  const itemStyle = {
850
851
  ...baseStyles.item,
851
852
  ...colors.item,
852
- ...isExpanded ? colors.itemExpanded : {}
853
+ ...isExpanded ? colors.itemExpanded : {},
854
+ ...isHighlighted ? {
855
+ boxShadow: "0 0 0 2px #6366f1, 0 0 12px rgba(99, 102, 241, 0.4)",
856
+ transition: "box-shadow 0.3s ease"
857
+ } : {}
853
858
  };
854
859
  const questionStyle = {
855
860
  ...baseStyles.question,
@@ -881,6 +886,7 @@ function FAQItem({ item, isExpanded, onToggle, theme, feedbackConfig, feedbackVa
881
886
  function FAQWidget({ config, runtime: runtime7, instanceId }) {
882
887
  const [renderTick, forceUpdate] = useReducer((x) => x + 1, 0);
883
888
  const [expandedIds, setExpandedIds] = useState2(/* @__PURE__ */ new Set());
889
+ const [highlightId, setHighlightId] = useState2(null);
884
890
  const [searchQuery, setSearchQuery] = useState2("");
885
891
  const [feedbackState, setFeedbackState] = useState2(/* @__PURE__ */ new Map());
886
892
  const feedbackConfig = useMemo(() => resolveFeedbackConfig(config.feedback), [config.feedback]);
@@ -934,6 +940,39 @@ function FAQWidget({ config, runtime: runtime7, instanceId }) {
934
940
  });
935
941
  return unsubscribe;
936
942
  }, [runtime7]);
943
+ useEffect2(() => {
944
+ if (!runtime7.events.subscribe)
945
+ return;
946
+ const handleDeepLink = (event) => {
947
+ var _a, _b;
948
+ const tileId = (_a = event.props) == null ? void 0 : _a.tileId;
949
+ const itemId = (_b = event.props) == null ? void 0 : _b.itemId;
950
+ if (tileId !== instanceId)
951
+ return;
952
+ if (!itemId)
953
+ return;
954
+ setExpandedIds(/* @__PURE__ */ new Set([itemId]));
955
+ setHighlightId(itemId);
956
+ setTimeout(() => setHighlightId(null), 1500);
957
+ requestAnimationFrame(() => {
958
+ const el = document.querySelector(`[data-faq-item-id="${itemId}"]`);
959
+ if (el)
960
+ el.scrollIntoView({ behavior: "smooth", block: "center" });
961
+ });
962
+ };
963
+ if (runtime7.events.getRecent) {
964
+ const recent = runtime7.events.getRecent({ names: ["notification.deep_link"] }, 5);
965
+ const pending = recent.filter((e) => {
966
+ var _a, _b;
967
+ return ((_a = e.props) == null ? void 0 : _a.tileId) === instanceId && ((_b = e.props) == null ? void 0 : _b.itemId);
968
+ }).pop();
969
+ if (pending && Date.now() - pending.ts < 1e4) {
970
+ handleDeepLink(pending);
971
+ }
972
+ }
973
+ const unsubscribe = runtime7.events.subscribe({ names: ["notification.deep_link"] }, handleDeepLink);
974
+ return unsubscribe;
975
+ }, [runtime7, instanceId]);
937
976
  const visibleQuestions = useMemo(() => config.actions.filter((q) => {
938
977
  if (!q.triggerWhen)
939
978
  return true;
@@ -1031,7 +1070,7 @@ function FAQWidget({ config, runtime: runtime7, instanceId }) {
1031
1070
  ...baseStyles.categoryHeader,
1032
1071
  ...themeStyles[resolvedTheme].categoryHeader
1033
1072
  };
1034
- const renderItems = (items) => items.map((q) => _jsx2(FAQItem, { item: q, isExpanded: expandedIds.has(q.config.id), onToggle: () => handleToggle(q.config.id), theme: resolvedTheme, feedbackConfig, feedbackValue: feedbackState.get(q.config.id), onFeedback: handleFeedback }, q.config.id));
1073
+ const renderItems = (items) => items.map((q) => _jsx2(FAQItem, { item: q, isExpanded: expandedIds.has(q.config.id), isHighlighted: highlightId === q.config.id, onToggle: () => handleToggle(q.config.id), theme: resolvedTheme, feedbackConfig, feedbackValue: feedbackState.get(q.config.id), onFeedback: handleFeedback }, q.config.id));
1035
1074
  if (visibleQuestions.length === 0) {
1036
1075
  return _jsx2("div", { style: containerStyle, "data-adaptive-id": instanceId, "data-adaptive-type": "adaptive-faq", children: _jsx2("div", { style: emptyStateStyle, children: "No FAQ questions available." }) });
1037
1076
  }
@@ -1445,7 +1484,9 @@ function NavWidget({ config, runtime: runtime7, instanceId }) {
1445
1484
  if (external) {
1446
1485
  window.open(href, "_blank", "noopener,noreferrer");
1447
1486
  } else {
1448
- window.location.href = href;
1487
+ const url = new URL(href, window.location.origin);
1488
+ url.search = window.location.search;
1489
+ window.location.href = url.toString();
1449
1490
  }
1450
1491
  }, [runtime7.events, instanceId]);
1451
1492
  const containerStyle = {