@syntrologie/runtime-sdk 2.8.0-canary.141 → 2.8.0-canary.143

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.
@@ -31,9 +31,9 @@ import {
31
31
  WaitZ,
32
32
  WidgetConfigZ,
33
33
  coreActionStepSchemas
34
- } from "../chunk-NVSX6GGM.js";
35
- import "../chunk-YBZ66SNB.js";
36
- import "../chunk-4HXPGXUC.js";
34
+ } from "../chunk-DCFZHHJB.js";
35
+ import "../chunk-WE5NMYP6.js";
36
+ import "../chunk-FCZRGPTY.js";
37
37
  import "../chunk-5Z66FT5C.js";
38
38
  export {
39
39
  AddClassZ,
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  NotificationDeepLinkZ
3
- } from "./chunk-YBZ66SNB.js";
3
+ } from "./chunk-WE5NMYP6.js";
4
4
  import {
5
5
  TriggerWhenZ
6
- } from "./chunk-4HXPGXUC.js";
6
+ } from "./chunk-FCZRGPTY.js";
7
7
 
8
8
  // src/actions/schema.ts
9
9
  import { z } from "zod";
@@ -249,4 +249,4 @@ export {
249
249
  TourZ,
250
250
  coreActionStepSchemas
251
251
  };
252
- //# sourceMappingURL=chunk-NVSX6GGM.js.map
252
+ //# sourceMappingURL=chunk-DCFZHHJB.js.map
@@ -1,6 +1,135 @@
1
1
  // src/decisions/schema.ts
2
2
  import { z as z2 } from "zod";
3
3
 
4
+ // ../sdk-contracts/dist/icons.js
5
+ var PREFIX = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"';
6
+ var EMOJI_SVG_PATHS = {
7
+ // ── existing in adaptive-nav ─────────────────────────────────────────────
8
+ "\u{1F4B5}": [
9
+ '<rect width="20" height="12" x="2" y="6" rx="2"/>',
10
+ '<circle cx="12" cy="12" r="2"/>',
11
+ '<path d="M6 12h.01M18 12h.01"/>'
12
+ ],
13
+ "\u{1F3DB}\uFE0F": [
14
+ '<line x1="3" x2="21" y1="22" y2="22"/>',
15
+ '<line x1="6" x2="6" y1="18" y2="11"/>',
16
+ '<line x1="10" x2="10" y1="18" y2="11"/>',
17
+ '<line x1="14" x2="14" y1="18" y2="11"/>',
18
+ '<line x1="18" x2="18" y1="18" y2="11"/>',
19
+ '<polygon points="12 2 20 7 4 7"/>'
20
+ ],
21
+ "\u23ED\uFE0F": ['<polygon points="5 4 15 12 5 20 5 4"/>', '<line x1="19" x2="19" y1="5" y2="19"/>'],
22
+ "\u27A1\uFE0F": ['<path d="M5 12h14"/>', '<path d="m12 5 7 7-7 7"/>'],
23
+ "\u{1F4A1}": [
24
+ '<path d="M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5"/>',
25
+ '<path d="M9 18h6"/>',
26
+ '<path d="M10 22h4"/>'
27
+ ],
28
+ "\u{1F4B0}": [
29
+ '<rect width="20" height="12" x="2" y="6" rx="2"/>',
30
+ '<circle cx="12" cy="12" r="2"/>',
31
+ '<path d="M6 12h.01M18 12h.01"/>'
32
+ ],
33
+ "\u{1F4CB}": [
34
+ '<rect width="8" height="4" x="8" y="2" rx="1" ry="1"/>',
35
+ '<path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"/>',
36
+ '<path d="M12 11h4"/>',
37
+ '<path d="M12 16h4"/>',
38
+ '<path d="M8 11h.01"/>',
39
+ '<path d="M8 16h.01"/>'
40
+ ],
41
+ "\u2705": ['<path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"/>', '<path d="m9 11 3 3L22 4"/>'],
42
+ "\u26A0\uFE0F": [
43
+ '<path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"/>',
44
+ '<path d="M12 9v4"/>',
45
+ '<path d="M12 17h.01"/>'
46
+ ],
47
+ // ── added for healthmaxxer action_plans ──────────────────────────────────
48
+ "\u{1F6E1}\uFE0F": [
49
+ '<path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"/>'
50
+ ],
51
+ "\u{1F4C8}": [
52
+ '<polyline points="22 7 13.5 15.5 8.5 10.5 2 17"/>',
53
+ '<polyline points="16 7 22 7 22 13"/>'
54
+ ],
55
+ "\u{1F52C}": [
56
+ '<path d="M6 18h8"/>',
57
+ '<path d="M3 22h18"/>',
58
+ '<path d="M14 22a7 7 0 1 0 0-14h-1"/>',
59
+ '<path d="M9 14h2"/>',
60
+ '<path d="M9 12a2 2 0 0 1-2-2V6h6v4a2 2 0 0 1-2 2Z"/>',
61
+ '<path d="M12 6V3a1 1 0 0 0-1-1H9a1 1 0 0 0-1 1v3"/>'
62
+ ],
63
+ "\u{1F48A}": [
64
+ '<path d="m10.5 20.5 10-10a4.95 4.95 0 1 0-7-7l-10 10a4.95 4.95 0 1 0 7 7Z"/>',
65
+ '<path d="m8.5 8.5 7 7"/>'
66
+ ],
67
+ "\u{1F4C4}": [
68
+ '<path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"/>',
69
+ '<path d="M14 2v4a2 2 0 0 0 2 2h4"/>',
70
+ '<path d="M10 9H8"/>',
71
+ '<path d="M16 13H8"/>',
72
+ '<path d="M16 17H8"/>'
73
+ ],
74
+ "\u{1F9EA}": [
75
+ '<path d="M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2"/>',
76
+ '<path d="M6.453 15h11.094"/>',
77
+ '<path d="M8.5 2h7"/>'
78
+ ],
79
+ "\u{1F501}": [
80
+ '<path d="m17 2 4 4-4 4"/>',
81
+ '<path d="M3 11v-1a4 4 0 0 1 4-4h14"/>',
82
+ '<path d="m7 22-4-4 4-4"/>',
83
+ '<path d="M21 13v1a4 4 0 0 1-4 4H3"/>'
84
+ ],
85
+ "\u{1F9E0}": [
86
+ '<path d="M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z"/>',
87
+ '<path d="M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z"/>',
88
+ '<path d="M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4"/>',
89
+ '<path d="M17.599 6.5a3 3 0 0 0 .399-1.375"/>',
90
+ '<path d="M6.003 5.125A3 3 0 0 0 6.401 6.5"/>',
91
+ '<path d="M3.477 10.896a4 4 0 0 1 .585-.396"/>',
92
+ '<path d="M19.938 10.5a4 4 0 0 1 .585.396"/>',
93
+ '<path d="M6 18a4 4 0 0 1-1.967-.516"/>',
94
+ '<path d="M19.967 17.484A4 4 0 0 1 18 18"/>'
95
+ ],
96
+ "\u{1F319}": ['<path d="M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"/>'],
97
+ "\u{1F4E6}": [
98
+ '<path d="M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z"/>',
99
+ '<path d="M12 22V12"/>',
100
+ '<path d="m3.3 7 8.7 5 8.7-5"/>',
101
+ '<path d="m7.5 4.27 9 5.15"/>'
102
+ ],
103
+ "\u{1F331}": [
104
+ '<path d="M7 20h10"/>',
105
+ '<path d="M10 20c5.5-2.5.8-6.4 3-10"/>',
106
+ '<path d="M9.5 9.4c1.1.8 1.8 2.2 2.3 3.7-2 .4-3.5.4-4.8-.3-1.2-.6-2.3-1.9-3-4.2 2.8-.5 4.4 0 5.5.8z"/>',
107
+ '<path d="M14.1 6a7 7 0 0 0-1.1 4c1.9-.1 3.3-.6 4.3-1.4 1-1 1.6-2.3 1.7-4.6-2.7.1-4 1-4.9 2z"/>'
108
+ ],
109
+ "\u26A1": [
110
+ '<path d="M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z"/>'
111
+ ],
112
+ "\u{1F333}": [
113
+ '<path d="M12 22V8"/>',
114
+ '<path d="m17 8-5-6-5 6"/>',
115
+ '<path d="M12 12c-2-2-4-2-4-2 0 0 0 4 2 6 1.5 1.5 3 1 4 0"/>',
116
+ '<path d="M12 12c2-2 4-2 4-2 0 0 0 4-2 6-1.5 1.5-3 1-4 0"/>'
117
+ ],
118
+ "\u{1F33F}": [
119
+ '<path d="M11 20A7 7 0 0 1 9.8 6.1C15.5 5 17 4.48 19.2 2.96a1 1 0 0 1 1.8.5c0 6-2 11-9 16.5"/>',
120
+ '<path d="M2 21c0-3 1.85-5.36 5.08-6"/>'
121
+ ]
122
+ };
123
+ function renderIcon(emoji, options = {}) {
124
+ var _a, _b;
125
+ const paths = EMOJI_SVG_PATHS[emoji];
126
+ if (!paths)
127
+ return "";
128
+ const size = (_a = options.size) != null ? _a : 14;
129
+ const stroke = (_b = options.color) != null ? _b : "currentColor";
130
+ return `${PREFIX} width="${size}" height="${size}" stroke="${stroke}">${paths.join("")}</svg>`;
131
+ }
132
+
4
133
  // ../sdk-contracts/dist/schemas.js
5
134
  import { z } from "zod";
6
135
  var AnchorIdZ = z.object({
@@ -195,6 +324,7 @@ var decisionSchemas = [
195
324
  ];
196
325
 
197
326
  export {
327
+ renderIcon,
198
328
  PageUrlConditionZ,
199
329
  RouteConditionZ,
200
330
  AnchorVisibleConditionZ,
@@ -223,4 +353,4 @@ export {
223
353
  validateActivationConfig,
224
354
  decisionSchemas
225
355
  };
226
- //# sourceMappingURL=chunk-4HXPGXUC.js.map
356
+ //# sourceMappingURL=chunk-FCZRGPTY.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/decisions/schema.ts", "../../sdk-contracts/dist/icons.js", "../../sdk-contracts/dist/schemas.js"],
4
+ "sourcesContent": ["/**\n * Zod schemas for decision strategy validation.\n *\n * Condition and strategy schemas are canonical in @syntrologie/sdk-contracts.\n * This module re-exports them and adds runtime-specific schemas\n * (ActivationConfig, RouteFilter) plus the decisionSchemas array for\n * unified JSON Schema generation.\n */\nimport { z } from 'zod';\n\n// Re-export all condition + strategy schemas from the single source of truth\nexport {\n AnchorVisibleConditionZ,\n type ConditionSchema,\n ConditionZ,\n CooldownActiveConditionZ,\n CounterDefZ,\n type DecisionStrategySchema,\n DecisionStrategyZ,\n DismissedConditionZ,\n EventCountConditionZ,\n EventOccurredConditionZ,\n ExternalStrategyZ,\n FrequencyLimitConditionZ,\n MatchOpZ,\n ModelStrategyZ,\n PageUrlConditionZ,\n RouteConditionZ,\n type RuleSchema,\n RuleStrategyZ,\n RuleZ,\n ScoreStrategyZ,\n SessionMetricConditionZ,\n StateEqualsConditionZ,\n TriggerWhenZ,\n ViewportConditionZ,\n} from '@syntrologie/sdk-contracts';\n\nimport {\n ConditionZ,\n CounterDefZ,\n DecisionStrategyZ,\n ExternalStrategyZ,\n MatchOpZ,\n ModelStrategyZ,\n RuleStrategyZ,\n RuleZ,\n ScoreStrategyZ,\n} from '@syntrologie/sdk-contracts';\n\n// =============================================================================\n// ACTIVATION CONFIG SCHEMA (runtime-specific)\n// =============================================================================\n\nexport const RouteFilterZ = z.object({\n include: z\n .array(z.string())\n .optional()\n .describe(\n 'URL patterns where this tile appears. Supports *, **, :param wildcards. ' +\n 'Use sparingly \u2014 mostly to isolate to specific webapp functionality. ' +\n 'Omit to appear on all routes.'\n ),\n exclude: z\n .array(z.string())\n .optional()\n .describe('URL patterns where this tile should NOT appear. Evaluated before include.'),\n});\n\nexport const ActivationConfigZ = z.object({\n routes: RouteFilterZ,\n onlyIfPopulated: z\n .boolean()\n .optional()\n .describe(\n 'When true, tile is hidden if none of its props.actions[] have an active triggerWhen. ' +\n 'Useful for tiles with all-deferred FAQ questions or nav tips. Default: false.'\n ),\n});\n\n// =============================================================================\n// VALIDATION FUNCTIONS\n// =============================================================================\n\n/**\n * Validate a Condition object.\n */\nexport function validateCondition(data: unknown) {\n return ConditionZ.safeParse(data);\n}\n\n/**\n * Validate a DecisionStrategy object.\n */\nexport function validateStrategy(data: unknown) {\n return DecisionStrategyZ.safeParse(data);\n}\n\n/**\n * Validate an ActivationConfig object.\n */\nexport function validateActivationConfig(data: unknown) {\n return ActivationConfigZ.safeParse(data);\n}\n\n// =============================================================================\n// Export: Array for unified schema generation\n// =============================================================================\n\n/**\n * Decision schemas for unified JSON Schema generation.\n * The generator imports this array and converts each to a JSON Schema $def.\n *\n * Note: `decisionStrategy` is NOT included here \u2014 it's a oneOf wrapper that\n * the generator builds from $refs to the four strategy defs.\n */\nexport const decisionSchemas = [\n { defName: 'matchOp', schema: MatchOpZ },\n { defName: 'counterDef', schema: CounterDefZ },\n { defName: 'activationConfig', schema: ActivationConfigZ },\n { defName: 'routeFilter', schema: RouteFilterZ },\n { defName: 'ruleStrategy', schema: RuleStrategyZ },\n { defName: 'scoreStrategy', schema: ScoreStrategyZ },\n { defName: 'modelStrategy', schema: ModelStrategyZ },\n { defName: 'externalStrategy', schema: ExternalStrategyZ },\n { defName: 'rule', schema: RuleZ },\n { defName: 'condition', schema: ConditionZ },\n];\n\n// =============================================================================\n// TYPE INFERENCE\n// =============================================================================\n\nexport type ActivationConfigSchema = z.infer<typeof ActivationConfigZ>;\n", "/**\n * Centralized emoji \u2192 Lucide SVG icon mapping.\n *\n * Adaptives and the runtime can render config-supplied emoji icons as inline\n * Lucide SVGs without depending on `lucide-react`. Sourced from\n * https://lucide.dev (ISC license).\n *\n * Each entry is an array of inner SVG elements (`<path>`, `<polygon>`,\n * `<circle>`, etc.) for the canonical 24\u00D724 viewBox. `renderIcon()` wraps\n * them in a `<svg>` of the requested size + colour.\n *\n * If you add a new emoji to a config (action plan icon, FAQ icon, nav tip\n * icon, \u2026) add a matching entry here so it renders as a Lucide SVG instead\n * of falling back to the raw glyph.\n *\n * NOTE: `runtime-sdk/src/notifications/SyntroToastStack.ts` and\n * `runtime-sdk/src/components/SyntroTileCard.ts` still hold local copies of\n * a subset of these mappings. Those should be migrated to import from here\n * in a follow-up PR.\n */\nconst PREFIX = '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"';\n/** Inner-SVG path/shape data keyed by emoji character. */\nexport const EMOJI_SVG_PATHS = {\n // \u2500\u2500 existing in adaptive-nav \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n '\uD83D\uDCB5': [\n '<rect width=\"20\" height=\"12\" x=\"2\" y=\"6\" rx=\"2\"/>',\n '<circle cx=\"12\" cy=\"12\" r=\"2\"/>',\n '<path d=\"M6 12h.01M18 12h.01\"/>',\n ],\n '\uD83C\uDFDB\uFE0F': [\n '<line x1=\"3\" x2=\"21\" y1=\"22\" y2=\"22\"/>',\n '<line x1=\"6\" x2=\"6\" y1=\"18\" y2=\"11\"/>',\n '<line x1=\"10\" x2=\"10\" y1=\"18\" y2=\"11\"/>',\n '<line x1=\"14\" x2=\"14\" y1=\"18\" y2=\"11\"/>',\n '<line x1=\"18\" x2=\"18\" y1=\"18\" y2=\"11\"/>',\n '<polygon points=\"12 2 20 7 4 7\"/>',\n ],\n '\u23ED\uFE0F': ['<polygon points=\"5 4 15 12 5 20 5 4\"/>', '<line x1=\"19\" x2=\"19\" y1=\"5\" y2=\"19\"/>'],\n '\u27A1\uFE0F': ['<path d=\"M5 12h14\"/>', '<path d=\"m12 5 7 7-7 7\"/>'],\n '\uD83D\uDCA1': [\n '<path d=\"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5\"/>',\n '<path d=\"M9 18h6\"/>',\n '<path d=\"M10 22h4\"/>',\n ],\n '\uD83D\uDCB0': [\n '<rect width=\"20\" height=\"12\" x=\"2\" y=\"6\" rx=\"2\"/>',\n '<circle cx=\"12\" cy=\"12\" r=\"2\"/>',\n '<path d=\"M6 12h.01M18 12h.01\"/>',\n ],\n '\uD83D\uDCCB': [\n '<rect width=\"8\" height=\"4\" x=\"8\" y=\"2\" rx=\"1\" ry=\"1\"/>',\n '<path d=\"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2\"/>',\n '<path d=\"M12 11h4\"/>',\n '<path d=\"M12 16h4\"/>',\n '<path d=\"M8 11h.01\"/>',\n '<path d=\"M8 16h.01\"/>',\n ],\n '\u2705': ['<path d=\"M22 11.08V12a10 10 0 1 1-5.93-9.14\"/>', '<path d=\"m9 11 3 3L22 4\"/>'],\n '\u26A0\uFE0F': [\n '<path d=\"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3\"/>',\n '<path d=\"M12 9v4\"/>',\n '<path d=\"M12 17h.01\"/>',\n ],\n // \u2500\u2500 added for healthmaxxer action_plans \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n '\uD83D\uDEE1\uFE0F': [\n '<path d=\"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z\"/>',\n ],\n '\uD83D\uDCC8': [\n '<polyline points=\"22 7 13.5 15.5 8.5 10.5 2 17\"/>',\n '<polyline points=\"16 7 22 7 22 13\"/>',\n ],\n '\uD83D\uDD2C': [\n '<path d=\"M6 18h8\"/>',\n '<path d=\"M3 22h18\"/>',\n '<path d=\"M14 22a7 7 0 1 0 0-14h-1\"/>',\n '<path d=\"M9 14h2\"/>',\n '<path d=\"M9 12a2 2 0 0 1-2-2V6h6v4a2 2 0 0 1-2 2Z\"/>',\n '<path d=\"M12 6V3a1 1 0 0 0-1-1H9a1 1 0 0 0-1 1v3\"/>',\n ],\n '\uD83D\uDC8A': [\n '<path d=\"m10.5 20.5 10-10a4.95 4.95 0 1 0-7-7l-10 10a4.95 4.95 0 1 0 7 7Z\"/>',\n '<path d=\"m8.5 8.5 7 7\"/>',\n ],\n '\uD83D\uDCC4': [\n '<path d=\"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z\"/>',\n '<path d=\"M14 2v4a2 2 0 0 0 2 2h4\"/>',\n '<path d=\"M10 9H8\"/>',\n '<path d=\"M16 13H8\"/>',\n '<path d=\"M16 17H8\"/>',\n ],\n '\uD83E\uDDEA': [\n '<path d=\"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2\"/>',\n '<path d=\"M6.453 15h11.094\"/>',\n '<path d=\"M8.5 2h7\"/>',\n ],\n '\uD83D\uDD01': [\n '<path d=\"m17 2 4 4-4 4\"/>',\n '<path d=\"M3 11v-1a4 4 0 0 1 4-4h14\"/>',\n '<path d=\"m7 22-4-4 4-4\"/>',\n '<path d=\"M21 13v1a4 4 0 0 1-4 4H3\"/>',\n ],\n '\uD83E\uDDE0': [\n '<path d=\"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z\"/>',\n '<path d=\"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z\"/>',\n '<path d=\"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4\"/>',\n '<path d=\"M17.599 6.5a3 3 0 0 0 .399-1.375\"/>',\n '<path d=\"M6.003 5.125A3 3 0 0 0 6.401 6.5\"/>',\n '<path d=\"M3.477 10.896a4 4 0 0 1 .585-.396\"/>',\n '<path d=\"M19.938 10.5a4 4 0 0 1 .585.396\"/>',\n '<path d=\"M6 18a4 4 0 0 1-1.967-.516\"/>',\n '<path d=\"M19.967 17.484A4 4 0 0 1 18 18\"/>',\n ],\n '\uD83C\uDF19': ['<path d=\"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z\"/>'],\n '\uD83D\uDCE6': [\n '<path d=\"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z\"/>',\n '<path d=\"M12 22V12\"/>',\n '<path d=\"m3.3 7 8.7 5 8.7-5\"/>',\n '<path d=\"m7.5 4.27 9 5.15\"/>',\n ],\n '\uD83C\uDF31': [\n '<path d=\"M7 20h10\"/>',\n '<path d=\"M10 20c5.5-2.5.8-6.4 3-10\"/>',\n '<path d=\"M9.5 9.4c1.1.8 1.8 2.2 2.3 3.7-2 .4-3.5.4-4.8-.3-1.2-.6-2.3-1.9-3-4.2 2.8-.5 4.4 0 5.5.8z\"/>',\n '<path d=\"M14.1 6a7 7 0 0 0-1.1 4c1.9-.1 3.3-.6 4.3-1.4 1-1 1.6-2.3 1.7-4.6-2.7.1-4 1-4.9 2z\"/>',\n ],\n '\u26A1': [\n '<path d=\"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z\"/>',\n ],\n '\uD83C\uDF33': [\n '<path d=\"M12 22V8\"/>',\n '<path d=\"m17 8-5-6-5 6\"/>',\n '<path d=\"M12 12c-2-2-4-2-4-2 0 0 0 4 2 6 1.5 1.5 3 1 4 0\"/>',\n '<path d=\"M12 12c2-2 4-2 4-2 0 0 0 4-2 6-1.5 1.5-3 1-4 0\"/>',\n ],\n '\uD83C\uDF3F': [\n '<path d=\"M11 20A7 7 0 0 1 9.8 6.1C15.5 5 17 4.48 19.2 2.96a1 1 0 0 1 1.8.5c0 6-2 11-9 16.5\"/>',\n '<path d=\"M2 21c0-3 1.85-5.36 5.08-6\"/>',\n ],\n};\n/**\n * Render a Lucide SVG for the given emoji. Returns the inline `<svg>` string.\n * If the emoji isn't mapped, returns an empty string \u2014 caller should fall back\n * to rendering the raw emoji glyph (e.g. via text or HTML escape).\n */\nexport function renderIcon(emoji, options = {}) {\n const paths = EMOJI_SVG_PATHS[emoji];\n if (!paths)\n return '';\n const size = options.size ?? 14;\n const stroke = options.color ?? 'currentColor';\n return `${PREFIX} width=\"${size}\" height=\"${size}\" stroke=\"${stroke}\">${paths.join('')}</svg>`;\n}\n/** Whether an emoji has a Lucide SVG mapping. */\nexport function hasIcon(emoji) {\n // biome-ignore lint/suspicious/noPrototypeBuiltins: tsconfig target ES2020 doesn't include Object.hasOwn\n return Object.prototype.hasOwnProperty.call(EMOJI_SVG_PATHS, emoji);\n}\n", "/**\n * Shared Zod schemas for decision strategies, conditions, and event scoping.\n *\n * These are the canonical definitions \u2014 runtime-sdk and all adaptive packages\n * should import from here instead of duplicating.\n */\nimport { z } from 'zod';\n// =============================================================================\n// ANCHOR ID SCHEMA\n// =============================================================================\nexport const AnchorIdZ = z\n .object({\n selector: z.string(),\n route: z.union([z.string(), z.array(z.string())]),\n})\n .strict();\n// =============================================================================\n// TRIGGER VOCABULARY \u2014 canonical lists of valid event names, metric keys, etc.\n// These flow through to the JSON schema as enums and are used by the LLM prompt.\n// =============================================================================\n/** Events that can be counted in event_count conditions. */\nexport const COUNTABLE_EVENTS = [\n // User interactions (from PostHog autocapture normalization)\n 'ui.click',\n 'ui.scroll',\n 'ui.input',\n 'ui.change',\n 'ui.submit',\n // Behavioral detectors (from event-processor)\n 'ui.hover',\n 'ui.idle',\n 'ui.scroll_thrash',\n 'ui.focus_bounce',\n // Navigation\n 'nav.page_view',\n 'nav.page_leave',\n // Derived behavioral signals\n 'behavior.rage_click',\n 'behavior.hesitation',\n 'behavior.confusion',\n];\nexport const CountableEventZ = z\n .enum(COUNTABLE_EVENTS)\n .describe('Event name to count. ui.* = user interactions and behavioral detectors, nav.* = page navigation, behavior.* = derived behavioral signals.');\n/** Valid session metric keys. */\nexport const SESSION_METRIC_KEYS = ['time_on_page', 'page_views', 'scroll_depth'];\nexport const SessionMetricKeyZ = z\n .enum(SESSION_METRIC_KEYS)\n .describe('Session metric key. time_on_page = seconds on current page, page_views = pages visited this session, scroll_depth = 0-100 percentage.');\n/** Element chain match field prefixes for counter filters. */\nexport const ELEMENT_MATCH_FIELDS = ['tag_name', '$el_text'];\n// Note: attr__* is a dynamic prefix (attr__data-id, attr__class, attr__href, etc.)\n// and cannot be enumerated. The match key is either one of ELEMENT_MATCH_FIELDS\n// or starts with \"attr__\".\n// =============================================================================\n// CONDITION SCHEMAS\n// =============================================================================\nexport const PageUrlConditionZ = z\n .object({\n type: z.literal('page_url'),\n url: z.string().describe('URL path to match (e.g. \"/pricing\", \"/dashboard\")'),\n})\n .describe('Fires when the current page URL matches. Use for page-specific actions. ' +\n 'Example: {\"type\": \"page_url\", \"url\": \"/pricing\"}');\nexport const RouteConditionZ = z\n .object({\n type: z.literal('route'),\n routeId: z.string().describe('Named route ID from the route filter'),\n})\n .describe('Fires when the current route matches a named route ID.');\nexport const AnchorVisibleConditionZ = z\n .object({\n type: z.literal('anchor_visible'),\n anchorId: z.string().describe('CSS selector of the anchor element'),\n state: z\n .enum(['visible', 'present', 'absent'])\n .describe('\"visible\" = in viewport, \"present\" = in DOM, \"absent\" = not in DOM'),\n})\n .describe(\"Fires based on a DOM element's visibility state. \" +\n 'Example: {\"type\": \"anchor_visible\", \"anchorId\": \"#cta-button\", \"state\": \"visible\"}');\nexport const EventOccurredConditionZ = z\n .object({\n type: z.literal('event_occurred'),\n eventName: z.string().describe('Event name (e.g. \"ui.click\", \"$pageview\")'),\n withinMs: z.number().optional().describe('Time window in ms. Omit = any time this session.'),\n})\n .describe('Fires when a specific event has occurred during this session. ' +\n 'Example: {\"type\": \"event_occurred\", \"eventName\": \"ui.click\", \"withinMs\": 5000}');\nexport const StateEqualsConditionZ = z\n .object({\n type: z.literal('state_equals'),\n key: z\n .string()\n .describe('Key in the SDK persistent state store (localStorage). Only valid for keys the host app explicitly sets via syntro.state.set().'),\n value: z.unknown().describe('Expected value to match against'),\n})\n .describe('Checks the SDK persistent state store (localStorage). ONLY for host-app state set via syntro.state.set() \u2014 ' +\n 'NOT for user attributes like region, device, or UTM params (those are handled by segment targeting). ' +\n 'Do NOT use this for targeting. If you do not know the valid state keys, do not use this condition type.');\nexport const ViewportConditionZ = z\n .object({\n type: z.literal('viewport'),\n minWidth: z.number().optional().describe('Minimum viewport width in pixels'),\n maxWidth: z.number().optional().describe('Maximum viewport width in pixels'),\n minHeight: z.number().optional().describe('Minimum viewport height in pixels'),\n maxHeight: z.number().optional().describe('Maximum viewport height in pixels'),\n})\n .describe('Fires based on viewport (screen) size. Use for responsive behavior. ' +\n 'Example: {\"type\": \"viewport\", \"minWidth\": 768} \u2014 fires on tablet and larger.');\nexport const SessionMetricConditionZ = z\n .object({\n type: z.literal('session_metric'),\n key: SessionMetricKeyZ,\n operator: z.enum(['gte', 'lte', 'eq', 'gt', 'lt']),\n threshold: z.number().describe('Numeric threshold to compare against'),\n})\n .describe('Fires when a session metric crosses a threshold. Valid keys: \"time_on_page\" (seconds), ' +\n '\"page_views\" (count), \"scroll_depth\" (0-100). ' +\n 'Example: {\"type\": \"session_metric\", \"key\": \"time_on_page\", \"operator\": \"gte\", \"threshold\": 30}');\nexport const DismissedConditionZ = z\n .object({\n type: z.literal('dismissed'),\n key: z.string().describe('Dismissal key (usually a tile or action ID)'),\n inverted: z\n .boolean()\n .optional()\n .describe('When true, fires if NOT dismissed (default behavior)'),\n})\n .describe('Checks if an item has been dismissed by the user. Use with inverted: true to show only if not dismissed.');\nexport const CooldownActiveConditionZ = z\n .object({\n type: z.literal('cooldown_active'),\n key: z.string().describe('Cooldown key'),\n inverted: z.boolean().optional().describe('When true, fires if cooldown is NOT active'),\n})\n .describe('Checks if a cooldown timer is currently active. Use to prevent showing the same intervention too frequently.');\nexport const FrequencyLimitConditionZ = z\n .object({\n type: z.literal('frequency_limit'),\n key: z.string().describe('Frequency counter key'),\n limit: z.number().describe('Maximum allowed count'),\n inverted: z.boolean().optional().describe('When true, fires if limit NOT reached'),\n})\n .describe('Checks if a frequency limit has been reached. Use to cap how many times an action fires per session.');\nexport const MatchOpZ = z\n .object({\n equals: z.union([z.string(), z.number(), z.boolean()]).optional(),\n contains: z.string().optional(),\n})\n .describe('Match operator for counter filters. Exactly one of equals or contains must be specified.');\nexport const CounterDefZ = z\n .object({\n events: z\n .array(CountableEventZ)\n .min(1)\n .describe('Event names to count. Use values from the countable events enum.'),\n match: z\n .record(z.string(), MatchOpZ)\n .optional()\n .describe('Property filters. Keys are event prop names or element-chain fields ' +\n '(tag_name, $el_text, attr__*). All entries AND together.'),\n})\n .describe('Defines what events to count. Registered as an accumulator predicate at config-load time.');\nexport const EventCountConditionZ = z\n .object({\n type: z.literal('event_count'),\n key: z.string().describe('Unique key for this counter (used for accumulator registration)'),\n operator: z.enum(['gte', 'lte', 'eq', 'gt', 'lt']),\n count: z.number().int().min(0).describe('Target count threshold'),\n withinMs: z\n .number()\n .positive()\n .optional()\n .describe('Time window in ms. Omit = count across entire session.'),\n counter: CounterDefZ.optional().describe('Inline counter definition. Defines what events to count.'),\n})\n .describe('Fires when accumulated event count crosses a threshold. Most powerful trigger type. ' +\n 'Example: {\"type\": \"event_count\", \"key\": \"pricing-clicks\", \"operator\": \"gte\", \"count\": 3, ' +\n '\"counter\": {\"events\": [\"ui.click\"], \"match\": {\"attr__data-cta\": {\"contains\": \"pricing\"}}}}');\nexport const ConditionZ = z.discriminatedUnion('type', [\n PageUrlConditionZ,\n RouteConditionZ,\n AnchorVisibleConditionZ,\n EventOccurredConditionZ,\n StateEqualsConditionZ,\n ViewportConditionZ,\n SessionMetricConditionZ,\n DismissedConditionZ,\n CooldownActiveConditionZ,\n FrequencyLimitConditionZ,\n EventCountConditionZ,\n]);\n// =============================================================================\n// STRATEGY SCHEMAS\n// =============================================================================\nexport const RuleZ = z\n .object({\n conditions: z\n .array(ConditionZ)\n .describe('Array of conditions \u2014 ALL must match (AND logic) for this rule to fire.'),\n value: z\n .unknown()\n .describe('Value returned when all conditions match. For triggerWhen: true = fire the action.'),\n})\n .describe('A single rule. ALL conditions must match (AND logic). Rules in a strategy are evaluated ' +\n 'top-to-bottom \u2014 first rule where all conditions match wins and returns its value.');\nexport const RuleStrategyZ = z\n .object({\n type: z.literal('rules'),\n rules: z\n .array(RuleZ)\n .describe('Ordered list of rules. Evaluated top-to-bottom \u2014 first match wins.'),\n default: z\n .unknown()\n .describe('Fallback value when no rule matches. For triggerWhen: false = do not fire by default.'),\n})\n .describe('Rule-based strategy. Evaluates rules top-to-bottom. First rule where ALL conditions match ' +\n 'returns its value. If no rule matches, returns default. ' +\n 'For triggerWhen: set value=true on matching rules, default=false.');\nexport const ScoreStrategyZ = z\n .object({\n type: z.literal('score'),\n field: z.string(),\n threshold: z.number(),\n above: z.unknown(),\n below: z.unknown(),\n})\n .describe('Score-based strategy. Compares a field value against a threshold.');\nexport const ModelStrategyZ = z\n .object({\n type: z.literal('model'),\n modelId: z.string(),\n inputs: z.array(z.string()),\n outputMapping: z.record(z.string(), z.unknown()),\n default: z.unknown(),\n})\n .describe('ML model strategy. Sends inputs to a model and maps outputs.');\nexport const ExternalStrategyZ = z\n .object({\n type: z.literal('external'),\n endpoint: z.string(),\n method: z.enum(['GET', 'POST']).optional(),\n default: z.unknown(),\n timeoutMs: z.number().optional(),\n})\n .describe('External API strategy. Calls an endpoint to determine the value.');\nexport const DecisionStrategyZ = z.discriminatedUnion('type', [\n RuleStrategyZ,\n ScoreStrategyZ,\n ModelStrategyZ,\n ExternalStrategyZ,\n]);\n/** Canonical Zod schema for the optional triggerWhen field on actions and adaptive items. */\nexport const TriggerWhenZ = DecisionStrategyZ.nullable().optional();\n// =============================================================================\n// TRIGGER DOCUMENTATION \u2014 examples and match field docs\n// Exported as constants so the schema generator can inject them into the\n// JSON schema. The Python prompt builder reads them from the schema.\n// =============================================================================\n/** Complete triggerWhen examples showing the full rules wrapper structure. */\nexport const TRIGGER_EXAMPLES = [\n {\n name: 'Click count on a specific element',\n description: 'Fire when user clicks an element with data-id=\"hero-cta\" 2+ times',\n triggerWhen: {\n type: 'rules',\n rules: [\n {\n conditions: [\n {\n type: 'event_count',\n key: 'cta-clicks',\n operator: 'gte',\n count: 2,\n counter: {\n events: ['ui.click'],\n match: { 'attr__data-id': { equals: 'hero-cta' } },\n },\n },\n ],\n value: true,\n },\n ],\n default: false,\n },\n },\n {\n name: 'Time on page threshold',\n description: 'Fire after user spends 30+ seconds on the page',\n triggerWhen: {\n type: 'rules',\n rules: [\n {\n conditions: [\n {\n type: 'session_metric',\n key: 'time_on_page',\n operator: 'gte',\n threshold: 30,\n },\n ],\n value: true,\n },\n ],\n default: false,\n },\n },\n {\n name: 'Element visible in viewport',\n description: 'Fire when a DOM element becomes visible',\n triggerWhen: {\n type: 'rules',\n rules: [\n {\n conditions: [\n {\n type: 'anchor_visible',\n anchorId: '#pricing-section',\n state: 'visible',\n },\n ],\n value: true,\n },\n ],\n default: false,\n },\n },\n {\n name: 'No trigger (fire immediately)',\n description: 'Action fires as soon as the segment matches \u2014 no in-session condition needed',\n triggerWhen: null,\n },\n];\n/** Documentation for counter.match field keys. */\nexport const MATCH_FIELD_DOCS = {\n tag_name: 'HTML tag name (e.g. \"button\", \"a\", \"input\")',\n $el_text: 'Visible text content of the element',\n 'attr__*': 'HTML attribute prefixed with attr__. Example: attr__data-id matches the data-id attribute, ' +\n 'attr__class matches the class attribute, attr__href matches the href attribute.',\n};\n// =============================================================================\n// EVENT SCOPE SCHEMA\n// =============================================================================\n/** Scopes a widget to specific events/URLs. */\nexport const EventScopeZ = z.object({\n events: z.array(z.string()),\n urlContains: z.string().optional(),\n props: z.record(z.union([z.string(), z.number(), z.boolean()])).optional(),\n});\n// =============================================================================\n// NOTIFY SCHEMA\n// =============================================================================\n/** Toast notification config for triggerWhen transitions. */\nexport const NotifyZ = z\n .object({\n title: z.string().optional(),\n body: z.string().optional(),\n icon: z.string().optional(),\n})\n .nullable()\n .optional();\n"],
5
+ "mappings": ";AAQA,SAAS,KAAAA,UAAS;;;ACYlB,IAAM,SAAS;AAER,IAAM,kBAAkB;AAAA;AAAA,EAE3B,aAAM;AAAA,IACF;AAAA,IACA;AAAA,IACA;AAAA,EACJ;AAAA,EACA,mBAAO;AAAA,IACH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACJ;AAAA,EACA,gBAAM,CAAC,0CAA0C,wCAAwC;AAAA,EACzF,gBAAM,CAAC,wBAAwB,2BAA2B;AAAA,EAC1D,aAAM;AAAA,IACF;AAAA,IACA;AAAA,IACA;AAAA,EACJ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,EACR,SAAS,EACT;AAAA,IACC;AAAA,EAEF;AACJ,CAAC;AASM,SAAS,kBAAkB,MAAe;AAC/C,SAAO,WAAW,UAAU,IAAI;AAClC;AAKO,SAAS,iBAAiB,MAAe;AAC9C,SAAO,kBAAkB,UAAU,IAAI;AACzC;AAKO,SAAS,yBAAyB,MAAe;AACtD,SAAO,kBAAkB,UAAU,IAAI;AACzC;AAaO,IAAM,kBAAkB;AAAA,EAC7B,EAAE,SAAS,WAAW,QAAQ,SAAS;AAAA,EACvC,EAAE,SAAS,cAAc,QAAQ,YAAY;AAAA,EAC7C,EAAE,SAAS,oBAAoB,QAAQ,kBAAkB;AAAA,EACzD,EAAE,SAAS,eAAe,QAAQ,aAAa;AAAA,EAC/C,EAAE,SAAS,gBAAgB,QAAQ,cAAc;AAAA,EACjD,EAAE,SAAS,iBAAiB,QAAQ,eAAe;AAAA,EACnD,EAAE,SAAS,iBAAiB,QAAQ,eAAe;AAAA,EACnD,EAAE,SAAS,oBAAoB,QAAQ,kBAAkB;AAAA,EACzD,EAAE,SAAS,QAAQ,QAAQ,MAAM;AAAA,EACjC,EAAE,SAAS,aAAa,QAAQ,WAAW;AAC7C;",
6
+ "names": ["z", "z"]
7
+ }
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ActivationConfigZ,
3
3
  ConditionZ
4
- } from "./chunk-4HXPGXUC.js";
4
+ } from "./chunk-FCZRGPTY.js";
5
5
 
6
6
  // src/config/schema.ts
7
7
  import { z } from "zod";
@@ -178,4 +178,4 @@ export {
178
178
  CanvasConfigResponseZ,
179
179
  configSchemas
180
180
  };
181
- //# sourceMappingURL=chunk-YBZ66SNB.js.map
181
+ //# sourceMappingURL=chunk-WE5NMYP6.js.map
@@ -12,8 +12,8 @@ import {
12
12
  TileNotificationRuleZ,
13
13
  TileZ,
14
14
  configSchemas
15
- } from "../chunk-YBZ66SNB.js";
16
- import "../chunk-4HXPGXUC.js";
15
+ } from "../chunk-WE5NMYP6.js";
16
+ import "../chunk-FCZRGPTY.js";
17
17
  import "../chunk-5Z66FT5C.js";
18
18
  export {
19
19
  CanvasConfigResponseZ,
@@ -26,7 +26,7 @@ import {
26
26
  validateActivationConfig,
27
27
  validateCondition,
28
28
  validateStrategy
29
- } from "../chunk-4HXPGXUC.js";
29
+ } from "../chunk-FCZRGPTY.js";
30
30
  import "../chunk-5Z66FT5C.js";
31
31
  export {
32
32
  ActivationConfigZ,
package/dist/index.js CHANGED
@@ -39,8 +39,8 @@ import {
39
39
  WaitZ,
40
40
  WidgetConfigZ,
41
41
  coreActionStepSchemas
42
- } from "./chunk-NVSX6GGM.js";
43
- import "./chunk-YBZ66SNB.js";
42
+ } from "./chunk-DCFZHHJB.js";
43
+ import "./chunk-WE5NMYP6.js";
44
44
  import {
45
45
  ActivationConfigZ,
46
46
  AnchorVisibleConditionZ,
@@ -66,10 +66,11 @@ import {
66
66
  TriggerWhenZ,
67
67
  ViewportConditionZ,
68
68
  decisionSchemas,
69
+ renderIcon,
69
70
  validateActivationConfig,
70
71
  validateCondition,
71
72
  validateStrategy
72
- } from "./chunk-4HXPGXUC.js";
73
+ } from "./chunk-FCZRGPTY.js";
73
74
  import {
74
75
  __privateAdd,
75
76
  __privateGet,
@@ -5518,23 +5519,11 @@ var _NavWidgetLit_renderTipItem;
5518
5519
  var TOKEN_PURPLE_4 = "#6a59ce";
5519
5520
  var TOKEN_SLATE_GREY_7 = "#677384";
5520
5521
  var TOKEN_SLATE_GREY_8 = "#87919f";
5521
- var EMOJI_SVG_MAP = {
5522
- "\u{1F4B5}": '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="20" height="12" x="2" y="6" rx="2"/><circle cx="12" cy="12" r="2"/><path d="M6 12h.01M18 12h.01"/></svg>',
5523
- "\u{1F3DB}\uFE0F": '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="3" x2="21" y1="22" y2="22"/><line x1="6" x2="6" y1="18" y2="11"/><line x1="10" x2="10" y1="18" y2="11"/><line x1="14" x2="14" y1="18" y2="11"/><line x1="18" x2="18" y1="18" y2="11"/><polygon points="12 2 20 7 4 7"/></svg>',
5524
- "\u23ED\uFE0F": '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polygon points="5 4 15 12 5 20 5 4"/><line x1="19" x2="19" y1="5" y2="19"/></svg>',
5525
- "\u27A1\uFE0F": '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14"/><path d="m12 5 7 7-7 7"/></svg>',
5526
- "\u{1F4A1}": '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5"/><path d="M9 18h6"/><path d="M10 22h4"/></svg>',
5527
- "\u{1F4B0}": '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="20" height="12" x="2" y="6" rx="2"/><circle cx="12" cy="12" r="2"/><path d="M6 12h.01M18 12h.01"/></svg>',
5528
- "\u{1F4CB}": '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="8" height="4" x="8" y="2" rx="1" ry="1"/><path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"/><path d="M12 11h4"/><path d="M12 16h4"/><path d="M8 11h.01"/><path d="M8 16h.01"/></svg>',
5529
- "\u2705": '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"/><path d="m9 11 3 3L22 4"/></svg>',
5530
- "\u26A0\uFE0F": '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"/><path d="M12 9v4"/><path d="M12 17h.01"/></svg>'
5531
- };
5532
5522
  function escapeHtml(str) {
5533
5523
  return str.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
5534
5524
  }
5535
- function renderIcon(emoji) {
5536
- var _a3;
5537
- return (_a3 = EMOJI_SVG_MAP[emoji]) != null ? _a3 : escapeHtml(emoji);
5525
+ function renderIcon2(emoji) {
5526
+ return renderIcon(emoji) || escapeHtml(emoji);
5538
5527
  }
5539
5528
  function routeMatchesCurrent(routes) {
5540
5529
  if (typeof window === "undefined")
@@ -5884,7 +5873,7 @@ _NavWidgetLit_contextUnsub = /* @__PURE__ */ new WeakMap(), _NavWidgetLit_accumu
5884
5873
  this._hoveredId = null;
5885
5874
  }}
5886
5875
  >
5887
- ${icon ? html3`<span style=${iconStyle}>${unsafeHTML2(renderIcon(icon))}</span>` : nothing3}
5876
+ ${icon ? html3`<span style=${iconStyle}>${unsafeHTML2(renderIcon2(icon))}</span>` : nothing3}
5888
5877
  <span>${title}</span>
5889
5878
  <span style=${chevronStyle}>${"\u203A"}</span>
5890
5879
  </button>
@@ -7359,7 +7348,7 @@ var EMOJI_SVG_PATHS = {
7359
7348
  '<path d="M10.3 21a1.94 1.94 0 0 0 3.4 0"/>'
7360
7349
  ]
7361
7350
  };
7362
- function renderIcon2(emoji, size, color = "currentColor") {
7351
+ function renderIcon3(emoji, size, color = "currentColor") {
7363
7352
  const paths = EMOJI_SVG_PATHS[emoji];
7364
7353
  if (!paths) {
7365
7354
  return html5`<span style=${styleMap4({ fontSize: `${size}px`, lineHeight: "1" })}>${emoji}</span>`;
@@ -7654,7 +7643,7 @@ var SyntroTileCard = class extends LitElement5 {
7654
7643
  <!-- Header -->
7655
7644
  <div style=${styleMap4(headerStyles)}>
7656
7645
  <div style=${styleMap4(iconStyles)}>
7657
- ${renderIcon2(resolvedIcon, iconSize)}
7646
+ ${renderIcon3(resolvedIcon, iconSize)}
7658
7647
  </div>
7659
7648
  <div style=${styleMap4({ flex: "1", minWidth: "0" })}>
7660
7649
  <h3 style=${styleMap4(titleStyles)}>
@@ -7891,7 +7880,7 @@ function error(prefix, message, data) {
7891
7880
  }
7892
7881
 
7893
7882
  // src/version.ts
7894
- var SDK_VERSION = "2.8.0-canary.141";
7883
+ var SDK_VERSION = "2.8.0-canary.143";
7895
7884
 
7896
7885
  // src/types.ts
7897
7886
  var SDK_SCHEMA_VERSION = "2.0";