@syntrologie/adapt-overlays 2.19.0 → 2.20.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/dist/schema.d.ts CHANGED
@@ -90,17 +90,23 @@ export declare const configSchema: z.ZodObject<{
90
90
  action?: unknown;
91
91
  }>>;
92
92
  ctaButtons: z.ZodOptional<z.ZodArray<z.ZodObject<{
93
+ href: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
94
+ target: z.ZodOptional<z.ZodEnum<["_self", "_blank"]>>;
93
95
  label: z.ZodString;
94
96
  actionId: z.ZodString;
95
97
  primary: z.ZodOptional<z.ZodBoolean>;
96
98
  }, "strip", z.ZodTypeAny, {
97
99
  label: string;
98
100
  actionId: string;
101
+ href?: string | undefined;
99
102
  primary?: boolean | undefined;
103
+ target?: "_self" | "_blank" | undefined;
100
104
  }, {
101
105
  label: string;
102
106
  actionId: string;
107
+ href?: string | undefined;
103
108
  primary?: boolean | undefined;
109
+ target?: "_self" | "_blank" | undefined;
104
110
  }>, "many">>;
105
111
  }, "strip", z.ZodTypeAny, {
106
112
  body: string;
@@ -108,7 +114,9 @@ export declare const configSchema: z.ZodObject<{
108
114
  ctaButtons?: {
109
115
  label: string;
110
116
  actionId: string;
117
+ href?: string | undefined;
111
118
  primary?: boolean | undefined;
119
+ target?: "_self" | "_blank" | undefined;
112
120
  }[] | undefined;
113
121
  cta?: {
114
122
  label: string;
@@ -120,7 +128,9 @@ export declare const configSchema: z.ZodObject<{
120
128
  ctaButtons?: {
121
129
  label: string;
122
130
  actionId: string;
131
+ href?: string | undefined;
123
132
  primary?: boolean | undefined;
133
+ target?: "_self" | "_blank" | undefined;
124
134
  }[] | undefined;
125
135
  cta?: {
126
136
  label: string;
@@ -141,7 +151,9 @@ export declare const configSchema: z.ZodObject<{
141
151
  ctaButtons?: {
142
152
  label: string;
143
153
  actionId: string;
154
+ href?: string | undefined;
144
155
  primary?: boolean | undefined;
156
+ target?: "_self" | "_blank" | undefined;
145
157
  }[] | undefined;
146
158
  cta?: {
147
159
  label: string;
@@ -162,7 +174,9 @@ export declare const configSchema: z.ZodObject<{
162
174
  ctaButtons?: {
163
175
  label: string;
164
176
  actionId: string;
177
+ href?: string | undefined;
165
178
  primary?: boolean | undefined;
179
+ target?: "_self" | "_blank" | undefined;
166
180
  }[] | undefined;
167
181
  cta?: {
168
182
  label: string;
@@ -269,17 +283,23 @@ export declare const configSchema: z.ZodObject<{
269
283
  timeoutMs?: number | undefined;
270
284
  }>>;
271
285
  ctaButtons: z.ZodOptional<z.ZodArray<z.ZodObject<{
286
+ href: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
287
+ target: z.ZodOptional<z.ZodEnum<["_self", "_blank"]>>;
272
288
  label: z.ZodString;
273
289
  actionId: z.ZodString;
274
290
  primary: z.ZodOptional<z.ZodBoolean>;
275
291
  }, "strip", z.ZodTypeAny, {
276
292
  label: string;
277
293
  actionId: string;
294
+ href?: string | undefined;
278
295
  primary?: boolean | undefined;
296
+ target?: "_self" | "_blank" | undefined;
279
297
  }, {
280
298
  label: string;
281
299
  actionId: string;
300
+ href?: string | undefined;
282
301
  primary?: boolean | undefined;
302
+ target?: "_self" | "_blank" | undefined;
283
303
  }>, "many">>;
284
304
  }, "strip", z.ZodTypeAny, {
285
305
  summary: string;
@@ -287,20 +307,22 @@ export declare const configSchema: z.ZodObject<{
287
307
  body: string;
288
308
  title?: string | undefined;
289
309
  };
290
- blocking?: boolean | undefined;
291
- size?: "sm" | "md" | "lg" | undefined;
292
- scrim?: {
293
- opacity?: number | undefined;
294
- } | undefined;
295
310
  dismiss?: {
296
311
  onEsc?: boolean | undefined;
297
312
  closeButton?: boolean | undefined;
298
313
  timeoutMs?: number | undefined;
299
314
  } | undefined;
315
+ blocking?: boolean | undefined;
316
+ size?: "sm" | "md" | "lg" | undefined;
317
+ scrim?: {
318
+ opacity?: number | undefined;
319
+ } | undefined;
300
320
  ctaButtons?: {
301
321
  label: string;
302
322
  actionId: string;
323
+ href?: string | undefined;
303
324
  primary?: boolean | undefined;
325
+ target?: "_self" | "_blank" | undefined;
304
326
  }[] | undefined;
305
327
  }, {
306
328
  summary: string;
@@ -308,20 +330,22 @@ export declare const configSchema: z.ZodObject<{
308
330
  body: string;
309
331
  title?: string | undefined;
310
332
  };
311
- blocking?: boolean | undefined;
312
- size?: "sm" | "md" | "lg" | undefined;
313
- scrim?: {
314
- opacity?: number | undefined;
315
- } | undefined;
316
333
  dismiss?: {
317
334
  onEsc?: boolean | undefined;
318
335
  closeButton?: boolean | undefined;
319
336
  timeoutMs?: number | undefined;
320
337
  } | undefined;
338
+ blocking?: boolean | undefined;
339
+ size?: "sm" | "md" | "lg" | undefined;
340
+ scrim?: {
341
+ opacity?: number | undefined;
342
+ } | undefined;
321
343
  ctaButtons?: {
322
344
  label: string;
323
345
  actionId: string;
346
+ href?: string | undefined;
324
347
  primary?: boolean | undefined;
348
+ target?: "_self" | "_blank" | undefined;
325
349
  }[] | undefined;
326
350
  }>, "many">>;
327
351
  /** Tour configurations */
@@ -395,7 +419,9 @@ export declare const configSchema: z.ZodObject<{
395
419
  ctaButtons?: {
396
420
  label: string;
397
421
  actionId: string;
422
+ href?: string | undefined;
398
423
  primary?: boolean | undefined;
424
+ target?: "_self" | "_blank" | undefined;
399
425
  }[] | undefined;
400
426
  cta?: {
401
427
  label: string;
@@ -428,20 +454,22 @@ export declare const configSchema: z.ZodObject<{
428
454
  body: string;
429
455
  title?: string | undefined;
430
456
  };
431
- blocking?: boolean | undefined;
432
- size?: "sm" | "md" | "lg" | undefined;
433
- scrim?: {
434
- opacity?: number | undefined;
435
- } | undefined;
436
457
  dismiss?: {
437
458
  onEsc?: boolean | undefined;
438
459
  closeButton?: boolean | undefined;
439
460
  timeoutMs?: number | undefined;
440
461
  } | undefined;
462
+ blocking?: boolean | undefined;
463
+ size?: "sm" | "md" | "lg" | undefined;
464
+ scrim?: {
465
+ opacity?: number | undefined;
466
+ } | undefined;
441
467
  ctaButtons?: {
442
468
  label: string;
443
469
  actionId: string;
470
+ href?: string | undefined;
444
471
  primary?: boolean | undefined;
472
+ target?: "_self" | "_blank" | undefined;
445
473
  }[] | undefined;
446
474
  }[] | undefined;
447
475
  tours?: {
@@ -482,7 +510,9 @@ export declare const configSchema: z.ZodObject<{
482
510
  ctaButtons?: {
483
511
  label: string;
484
512
  actionId: string;
513
+ href?: string | undefined;
485
514
  primary?: boolean | undefined;
515
+ target?: "_self" | "_blank" | undefined;
486
516
  }[] | undefined;
487
517
  cta?: {
488
518
  label: string;
@@ -515,20 +545,22 @@ export declare const configSchema: z.ZodObject<{
515
545
  body: string;
516
546
  title?: string | undefined;
517
547
  };
518
- blocking?: boolean | undefined;
519
- size?: "sm" | "md" | "lg" | undefined;
520
- scrim?: {
521
- opacity?: number | undefined;
522
- } | undefined;
523
548
  dismiss?: {
524
549
  onEsc?: boolean | undefined;
525
550
  closeButton?: boolean | undefined;
526
551
  timeoutMs?: number | undefined;
527
552
  } | undefined;
553
+ blocking?: boolean | undefined;
554
+ size?: "sm" | "md" | "lg" | undefined;
555
+ scrim?: {
556
+ opacity?: number | undefined;
557
+ } | undefined;
528
558
  ctaButtons?: {
529
559
  label: string;
530
560
  actionId: string;
561
+ href?: string | undefined;
531
562
  primary?: boolean | undefined;
563
+ target?: "_self" | "_blank" | undefined;
532
564
  }[] | undefined;
533
565
  }[] | undefined;
534
566
  tours?: {
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;GAGG;AACH,eAAO,MAAM,YAAY;IAErB,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAgD/B,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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2BAAyC,CAAC;;6BAAsS,CAAC;kCAA6C,CAAC;oCAAqE,CAAC;;;;qBAA4G,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BAAttH,CAAC;;;;yBAAgH,CAAC;;;4BAA2E,CAAC;4BAA0C,CAAC;6BAA2C,CAAC;6BAA2C,CAAC;;;;;;;;;4BAA4T,CAAC;;;;4BAAuH,CAAC;;;;;4BAAkJ,CAAC;;;;;;4BAAwM,CAAC;2BAAyC,CAAC;;6BAAsS,CAAC;kCAA6C,CAAC;oCAAqE,CAAC;;;;qBAA4G,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BAA8c,CAAC;;;;yBAAgH,CAAC;;;4BAA2E,CAAC;4BAA0C,CAAC;6BAA2C,CAAC;6BAA2C,CAAC;;;;;;;;;4BAA4T,CAAC;;;;4BAAuH,CAAC;;;;;4BAAkJ,CAAC;;;;;;4BAAwM,CAAC;2BAAyC,CAAC;;6BAAsS,CAAC;kCAA6C,CAAC;oCAAqE,CAAC;;;;qBAA4G,CAAC;;;;;;;;;;;;;;;;;;;;;;;;GAzE7t1D,CAAC;AAMtF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;CA+CtC,CAAC;AAaF,eAAO,MAAM,WAAW;;;;GAMvB,CAAC"}
package/dist/schema.js CHANGED
@@ -165,6 +165,28 @@ var NotifyZ = z.object({
165
165
 
166
166
  // src/schema.ts
167
167
  import { z as z2 } from "zod";
168
+ var SAFE_HREF_PATTERN = /^(?:[/.#?]|[hH][tT][tT][pP][sS]?:\/\/|[mM][aA][iI][lL][tT][oO]:|[tT][eE][lL]:)/;
169
+ var HrefZ = z2.string().min(1).regex(SAFE_HREF_PATTERN, {
170
+ message: "href must start with /, ./, ../, #, ?, http(s)://, mailto:, or tel: \u2014 javascript:, data:, and vbscript: are not allowed"
171
+ }).refine(
172
+ (s) => {
173
+ try {
174
+ const parsed = new URL(s, "https://syntro.local/");
175
+ return ["http:", "https:", "mailto:", "tel:"].includes(parsed.protocol);
176
+ } catch {
177
+ return false;
178
+ }
179
+ },
180
+ { message: "href resolves to an unsupported protocol" }
181
+ );
182
+ var CtaButtonNavZ = {
183
+ href: HrefZ.optional().describe(
184
+ 'Optional URL to navigate to when the button is clicked. Relative paths ("/product/x"), fragments ("#section"), and absolute http(s) URLs are allowed. javascript:/data:/vbscript: are rejected. When actionId is "dismiss", the overlay closes without navigating regardless of href.'
185
+ ),
186
+ target: z2.enum(["_self", "_blank"]).optional().describe(
187
+ 'Navigation target. "_self" (default) replaces the current tab; "_blank" opens a new tab with rel=noopener,noreferrer.'
188
+ )
189
+ };
168
190
  var configSchema = z2.object({
169
191
  /** Highlight configurations */
170
192
  highlights: z2.array(
@@ -219,10 +241,11 @@ var configSchema = z2.object({
219
241
  ),
220
242
  primary: z2.boolean().optional().describe(
221
243
  "When true, renders as the primary (filled) button style. Defaults to false."
222
- )
244
+ ),
245
+ ...CtaButtonNavZ
223
246
  })
224
247
  ).optional().describe(
225
- "Optional multi-button CTA row. Preferred over the single cta shorthand when more than one action is needed. Each button publishes action.tooltip_cta_clicked with its actionId."
248
+ 'Optional multi-button CTA row. Preferred over the single cta shorthand when more than one action is needed. Each button publishes action.tooltip_cta_clicked with its actionId, and navigates to its href when one is set (unless actionId === "dismiss").'
226
249
  )
227
250
  }).describe("Tooltip content including body text and optional title and CTA."),
228
251
  trigger: z2.enum(["immediate", "hover", "click"]).optional().describe(
@@ -317,9 +340,12 @@ var configSchema = z2.object({
317
340
  ),
318
341
  primary: z2.boolean().optional().describe(
319
342
  "When true, renders as the primary (filled) button style. Defaults to false."
320
- )
343
+ ),
344
+ ...CtaButtonNavZ
321
345
  })
322
- ).optional().describe("Optional CTA buttons shown at the bottom of the modal.")
346
+ ).optional().describe(
347
+ 'Optional CTA buttons shown at the bottom of the modal. Each button navigates to its href when one is set (unless actionId === "dismiss").'
348
+ )
323
349
  }).describe(
324
350
  "A centered dialog modal. Use for announcements, onboarding prompts, or required confirmations."
325
351
  )
@@ -404,7 +430,11 @@ var CAPABILITIES_DOCUMENTATION = {
404
430
  conventions: [
405
431
  {
406
432
  name: 'Tooltip actionId: "dismiss"',
407
- description: 'The special actionId "dismiss" closes the tooltip immediately without publishing an event. Use for "close" or "not now" buttons.'
433
+ description: 'The special actionId "dismiss" closes the tooltip immediately without publishing an event or navigating (even if href is set). Use for "close" or "not now" buttons.'
434
+ },
435
+ {
436
+ name: "CTA navigation via href",
437
+ description: 'To send users to a specific URL when they click a tooltip or modal CTA button, set the button\'s `href` field (and optionally `target: "_blank"` to open a new tab). The runtime publishes the click event first, then navigates via window.location.assign / window.open. Do NOT try to drive navigation by setting data-href via content:setAttr \u2014 that does nothing on non-anchor elements. Example: { label: "Shop GLP-3 (R)", actionId: "shop", href: "/product/glpiii", primary: true }.'
408
438
  },
409
439
  {
410
440
  name: "Companion FAQ tooltips (faq:open:<questionId>)",
@@ -419,12 +449,12 @@ var CAPABILITIES_DOCUMENTATION = {
419
449
  {
420
450
  name: "action.tooltip_cta_clicked",
421
451
  when: "User clicks a tooltip CTA button",
422
- props: "{ actionId }"
452
+ props: "{ anchorId, actionId, label, href? }"
423
453
  },
424
454
  {
425
455
  name: "action.modal_cta_clicked",
426
456
  when: "User clicks a modal CTA button",
427
- props: "{ actionId }"
457
+ props: "{ actionId, href? }"
428
458
  }
429
459
  ]
430
460
  };
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../sdk-contracts/dist/schemas.js", "../src/schema.ts"],
4
- "sourcesContent": ["/**\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// AUTHORING FIELDS \u2014 title / description / validation\n//\n// These live on every action *during authoring* (LLM produces them; dashboard\n// displays them; reviewers QA-verify with them) but are stripped before the\n// runtime SDK receives the config. Stripping happens server-side in\n// `to_runtime_config` (platform/backend/app/domains/experiments/helpers.py).\n// They appear in the JSON Schema (and therefore in the tactician's prompt)\n// because the LLM needs to know they are valid action properties \u2014 otherwise\n// schema validation would reject what the prompt commands.\n//\n// Each action variant should `.extend(AuthoringFieldsZ)` alongside any\n// triggerWhen/condition extensions. Validation is an ordered list of\n// human-readable step strings \u2014 reviewers scan it as a checklist.\n// =============================================================================\nexport const AuthoringFieldsZ = {\n title: z\n .string()\n .max(200)\n .optional()\n .describe('Authoring-only: short label shown on the action plan dashboard. Stripped before serving to the runtime SDK.'),\n description: z\n .string()\n .max(1000)\n .optional()\n .describe('Authoring-only: one-sentence explanation of what this action does and why. Stripped before serving to the runtime SDK.'),\n validation: z\n .array(z.string().max(500))\n .max(10)\n .optional()\n .describe('Authoring-only: ordered steps a reviewer can follow to trigger this action and visually confirm it works. Each entry is one step. Stripped before serving to the runtime SDK.'),\n};\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", "/**\n * Adaptive Overlays - Config Schema\n *\n * Zod schema for validating overlays app configuration.\n */\n\nimport { AnchorIdZ, AuthoringFieldsZ, TriggerWhenZ } from '@syntrologie/sdk-contracts';\nimport { z } from 'zod';\n\n/**\n * Overlays app config schema.\n * Defines the structure for overlay configurations in a canvas config.\n */\nexport const configSchema = z\n .object({\n /** Highlight configurations */\n highlights: z\n .array(\n z\n .object({\n anchorId: AnchorIdZ.describe('Route and CSS selector of the element to spotlight.'),\n summary: z\n .string()\n .describe(\n 'Human-readable description of this highlight, used for logging and debugging.'\n ),\n style: z\n .object({\n color: z\n .string()\n .optional()\n .describe(\n 'Ring color as a CSS color string (e.g. \"#5b8cff\"). Defaults to brand blue.'\n ),\n paddingPx: z\n .number()\n .optional()\n .describe(\n 'Space in pixels between the element edge and the spotlight ring. Defaults to 12.'\n ),\n radiusPx: z\n .number()\n .optional()\n .describe('Corner radius of the spotlight ring in pixels. Defaults to 12.'),\n scrimOpacity: z\n .number()\n .optional()\n .describe(\n 'Opacity of the dark backdrop behind the spotlight (0\u20131). Set to 0 to show the ring without dimming the page. Defaults to 0.55.'\n ),\n })\n .optional()\n .describe('Optional visual style overrides for the spotlight ring and backdrop.'),\n })\n .describe(\n 'A spotlight highlight that dims the page and draws a ring around a target element.'\n )\n )\n .optional()\n .describe(\n 'Spotlight highlights: draw attention to specific elements by ringing them with a colored border and dimming the rest of the page.'\n ),\n\n /** Tooltip configurations */\n tooltips: z\n .array(\n z\n .object({\n anchorId: AnchorIdZ.describe(\n 'Route and CSS selector of the element the tooltip is anchored to.'\n ),\n summary: z\n .string()\n .describe(\n 'Human-readable description of this tooltip, used for logging and debugging.'\n ),\n content: z\n .object({\n title: z\n .string()\n .optional()\n .describe('Optional heading shown at the top of the tooltip.'),\n body: z\n .string()\n .describe(\n 'Main tooltip text (required). Explains the feature or provides guidance.'\n ),\n cta: z\n .object({\n label: z.string().describe('Button label text for the single CTA.'),\n action: z.unknown().describe('Action step to execute when the CTA is clicked.'),\n })\n .optional()\n .describe(\n 'Optional single CTA button shorthand. Use ctaButtons for multiple actions.'\n ),\n ctaButtons: z\n .array(\n z.object({\n label: z.string().describe('Button label text.'),\n actionId: z\n .string()\n .describe(\n 'Action identifier published with the action.tooltip_cta_clicked event. Special values: \"dismiss\" closes the tooltip without publishing an event; \"faq:open:<questionId>\" opens the corresponding FAQ question in an adaptive-faq:accordion widget (companion tooltip pattern). Any other value publishes action.tooltip_cta_clicked with the actionId in event props for custom handling.'\n ),\n primary: z\n .boolean()\n .optional()\n .describe(\n 'When true, renders as the primary (filled) button style. Defaults to false.'\n ),\n })\n )\n .optional()\n .describe(\n 'Optional multi-button CTA row. Preferred over the single cta shorthand when more than one action is needed. Each button publishes action.tooltip_cta_clicked with its actionId.'\n ),\n })\n .describe('Tooltip content including body text and optional title and CTA.'),\n trigger: z\n .enum(['immediate', 'hover', 'click'])\n .optional()\n .describe(\n '\"immediate\" shows on mount; \"hover\" shows when the user hovers the anchor; \"click\" shows on click. Defaults to \"immediate\".'\n ),\n placement: z\n .enum([\n 'top',\n 'top-start',\n 'top-end',\n 'bottom',\n 'bottom-start',\n 'bottom-end',\n 'left',\n 'left-start',\n 'left-end',\n 'right',\n 'right-start',\n 'right-end',\n ])\n .optional()\n .describe(\n 'Preferred placement of the tooltip relative to the anchor element. The SDK flips to the opposite side if there is not enough space. Defaults to \"top\".'\n ),\n })\n .describe(\n 'A tooltip anchored to a DOM element. Use for contextual help, feature discovery, or CTA prompts near specific UI elements.'\n )\n )\n .optional()\n .describe(\n 'Tooltips anchored to DOM elements. Use for contextual help, upsell prompts, or feature discovery near specific UI elements.'\n ),\n\n /** Badge configurations */\n badges: z\n .array(\n z\n .object({\n anchorId: AnchorIdZ.describe(\n 'Route and CSS selector of the element to attach the badge to.'\n ),\n summary: z\n .string()\n .describe(\n 'Human-readable description of this badge, used for logging and debugging.'\n ),\n content: z\n .string()\n .describe(\n 'Badge text (e.g. \"NEW\", \"3\", \"!\"). Keep short \u2014 typically 1\u20134 characters.'\n ),\n position: z\n .enum(['top-left', 'top-right', 'bottom-left', 'bottom-right'])\n .optional()\n .describe(\n 'Corner of the anchor element where the badge is positioned. Defaults to \"top-right\".'\n ),\n })\n .describe('A small badge indicator positioned at a corner of a target element.')\n )\n .optional()\n .describe(\n 'Badge indicators overlaid on DOM elements. Use for notification counts (\"3\"), status labels (\"NEW\"), or attention markers (\"!\").'\n ),\n\n /** Pulse configurations */\n pulses: z\n .array(\n z\n .object({\n anchorId: AnchorIdZ.describe('Route and CSS selector of the element to animate.'),\n summary: z\n .string()\n .describe(\n 'Human-readable description of this pulse, used for logging and debugging.'\n ),\n duration: z\n .number()\n .optional()\n .describe('Animation duration in milliseconds. Defaults to 2000ms.'),\n })\n .describe(\n 'A pulsing animation applied to a DOM element to draw subtle attention without blocking interaction.'\n )\n )\n .optional()\n .describe(\n 'Pulse animations on DOM elements. Use for subtle attention-grabbing when highlights would be too intrusive.'\n ),\n\n /** Modal configurations */\n modals: z\n .array(\n z\n .object({\n summary: z\n .string()\n .describe(\n 'Human-readable description of this modal, used for logging and debugging.'\n ),\n content: z\n .object({\n title: z\n .string()\n .optional()\n .describe('Optional modal heading shown at the top of the dialog.'),\n body: z.string().describe('Main modal body text (required).'),\n })\n .describe('Modal content including body text and optional heading.'),\n size: z\n .enum(['sm', 'md', 'lg'])\n .optional()\n .describe(\n 'Dialog width: \"sm\" is narrow, \"md\" is standard, \"lg\" is wide. Defaults to \"md\".'\n ),\n blocking: z\n .boolean()\n .optional()\n .describe(\n 'When true, the modal blocks all page interaction until dismissed. Use sparingly \u2014 only for critical confirmations.'\n ),\n scrim: z\n .object({\n opacity: z\n .number()\n .optional()\n .describe('Backdrop opacity behind the modal (0\u20131). Defaults to 0.6.'),\n })\n .optional()\n .describe('Scrim (backdrop) configuration for the modal overlay.'),\n dismiss: z\n .object({\n onEsc: z\n .boolean()\n .optional()\n .describe('When true (default), pressing Escape closes the modal.'),\n closeButton: z\n .boolean()\n .optional()\n .describe('When true (default), an X close button is shown in the modal header.'),\n timeoutMs: z\n .number()\n .optional()\n .describe(\n 'Optional auto-close timeout in milliseconds. Omit to require explicit dismissal.'\n ),\n })\n .optional()\n .describe('Controls how the modal can be dismissed by the user.'),\n ctaButtons: z\n .array(\n z.object({\n label: z.string().describe('Button label text.'),\n actionId: z\n .string()\n .describe(\n 'Action identifier published with the action.modal_cta_clicked event. Use \"dismiss\" to close the modal without publishing an event.'\n ),\n primary: z\n .boolean()\n .optional()\n .describe(\n 'When true, renders as the primary (filled) button style. Defaults to false.'\n ),\n })\n )\n .optional()\n .describe('Optional CTA buttons shown at the bottom of the modal.'),\n })\n .describe(\n 'A centered dialog modal. Use for announcements, onboarding prompts, or required confirmations.'\n )\n )\n .optional()\n .describe(\n 'Modal dialogs overlaid on the page. Use for announcements, onboarding prompts, or confirmations that require explicit user acknowledgement.'\n ),\n\n /** Tour configurations */\n tours: z\n .array(\n z\n .object({\n tourId: z\n .string()\n .describe(\n 'Unique identifier for this tour, used to start/resume it via action or deeplink.'\n ),\n summary: z\n .string()\n .describe('Human-readable description of this tour, used for logging and debugging.'),\n steps: z\n .array(\n z.object({\n id: z.string().describe('Unique step identifier within this tour.'),\n action: z\n .record(z.unknown())\n .describe(\n 'Action step config to execute for this tour step (e.g. a tooltip or highlight).'\n ),\n route: z\n .string()\n .optional()\n .describe('Optional route the user must be on before this step executes.'),\n onAction: z\n .record(z.string())\n .optional()\n .describe(\n 'Map of action event \u2192 next step ID. Defines transitions between steps based on user interaction.'\n ),\n })\n )\n .min(\n 1,\n 'Tour must have at least one step \u2014 the executor throws Error(\\'Tour \"...\" has no steps\\') when steps is empty.'\n )\n .describe(\n 'Ordered list of tour steps. Each step executes one action and optionally transitions to the next.'\n ),\n startStep: z\n .string()\n .optional()\n .describe(\n 'ID of the step to begin the tour on. Defaults to the first step in the array.'\n ),\n autoStart: z\n .boolean()\n .optional()\n .describe(\n 'When true, the tour starts automatically when the config loads. Omit to require explicit triggering.'\n ),\n })\n .describe(\n 'A multi-step product tour. Steps execute sequentially (or via onAction transitions) to guide the user through a feature.'\n )\n )\n .optional()\n .describe(\n 'Multi-step product tours. Each tour chains overlay actions (tooltips, highlights) into a guided walkthrough of a feature or workflow.'\n ),\n })\n .describe(\n 'Props for adaptive-overlays visual overlay operations. Each field targets a list of overlay instances by type: highlights (spotlight), tooltips, badges, pulses, modals, and tours.'\n );\n\nexport type OverlaysConfig = z.infer<typeof configSchema>;\n\n// ============================================================================\n// Celebrate Action Schema\n// ============================================================================\n\nconst CelebrateActionZ = z\n .object({\n ...AuthoringFieldsZ,\n kind: z\n .literal('overlays:celebrate')\n .describe(\n 'Renders a fullscreen Canvas 2D celebration effect. Use to reward a user achievement (e.g. completing onboarding, first purchase).'\n ),\n effect: z\n .enum(['confetti', 'fireworks', 'sparkles', 'emoji-rain'])\n .describe(\n 'Effect preset name: \"confetti\" (falling pieces), \"fireworks\" (burst particles), \"sparkles\" (twinkling diamonds), \"emoji-rain\" (falling emoji).'\n ),\n duration: z\n .number()\n .optional()\n .describe('Animation duration in milliseconds. Defaults to 3000ms.'),\n intensity: z\n .enum(['light', 'medium', 'heavy'])\n .optional()\n .describe('Particle density: \"light\" is subtle, \"heavy\" is exuberant. Defaults to \"medium\".'),\n colors: z\n .array(z.string())\n .optional()\n .describe(\n 'Optional color palette as CSS color strings (e.g. [\"#ff0000\", \"#00ff00\"]). Defaults to a rainbow palette.'\n ),\n props: z\n .record(z.unknown())\n .optional()\n .describe(\n 'Effect-specific properties. For \"emoji-rain\", use {\"emoji\": \"\uD83D\uDD25\"} to set the falling character.'\n ),\n label: z\n .string()\n .optional()\n .describe('Optional accessible label for the celebration (used for screen readers).'),\n triggerWhen: TriggerWhenZ.describe(\n 'Conditional trigger strategy. When null, the celebration fires immediately. Use a rules strategy to fire on a specific behavioral event.'\n ),\n })\n .strict()\n .describe(\n 'Fullscreen celebration effect action. Use to celebrate a user milestone. Pick an effect preset and optionally customize duration, intensity, and colors.'\n );\n\n// ============================================================================\n// Unified Schema Export\n// ============================================================================\n\nexport const actionStepSchemas = [{ defName: 'celebrate', schema: CelebrateActionZ }];\n\n// ============================================================================\n// Capabilities Documentation (injected into JSON Schema for LLM prompts)\n// ============================================================================\n\nexport const CAPABILITIES_DOCUMENTATION = {\n packageId: 'adaptive-overlays',\n description:\n 'Visual overlay capabilities including highlights, tooltips, badges, pulse animations, modals, tours, and celebrations.',\n whenToUse: [\n { goal: 'Draw attention to an element (spotlight)', action: 'overlays:highlight' },\n { goal: 'Show contextual help or guidance near an element', action: 'overlays:tooltip' },\n { goal: 'Add a notification indicator (count, \"NEW\")', action: 'overlays:badge' },\n { goal: 'Subtle attention-grab animation', action: 'overlays:pulse' },\n { goal: 'Show a blocking or non-blocking dialog', action: 'overlays:modal' },\n { goal: 'Celebrate a user achievement', action: 'overlays:celebrate' },\n { goal: 'Multi-step guided walkthrough', action: 'overlays:tour' },\n ],\n conventions: [\n {\n name: 'Tooltip actionId: \"dismiss\"',\n description:\n 'The special actionId \"dismiss\" closes the tooltip immediately without publishing an event. Use for \"close\" or \"not now\" buttons.',\n },\n {\n name: 'Companion FAQ tooltips (faq:open:<questionId>)',\n description:\n 'A tooltip CTA with actionId \"faq:open:<questionId>\" publishes action.tooltip_cta_clicked, which the adaptive-faq:accordion widget listens for. The matching FAQ question expands and scrolls into view. If the FAQ widget mounts after the click (e.g. canvas was closed), it checks EventBus history for recent faq:open:* events (within 10 seconds) and auto-expands on mount. The widget also publishes canvas.requestOpen to open the canvas panel if needed.',\n },\n {\n name: 'Celebrate effect presets',\n description:\n 'Available effects: \"confetti\" (falling rectangular/circular pieces with gravity and rotation), \"fireworks\" (burst centers with radiating particles and glow), \"sparkles\" (diamond shapes with sine-wave opacity and upward float), \"emoji-rain\" (emoji characters falling with horizontal wobble \u2014 set props.emoji to customize the character).',\n },\n ],\n events: [\n {\n name: 'action.tooltip_cta_clicked',\n when: 'User clicks a tooltip CTA button',\n props: '{ actionId }',\n },\n {\n name: 'action.modal_cta_clicked',\n when: 'User clicks a modal CTA button',\n props: '{ actionId }',\n },\n ],\n};\n\n// ============================================================================\n// Tile Widget Definitions\n// ============================================================================\n\n/**\n * Tile widget definitions for unified JSON Schema generation.\n * Maps widget IDs to their props validation schema so the build script\n * can inject if/then constraints on tile.props.\n */\nconst WorkflowTrackerPropsZ = z.object({}).passthrough();\n\nexport const tileWidgets = [\n {\n widget: 'adaptive-overlays:workflow-tracker',\n defName: 'workflowTrackerProps',\n propsSchema: WorkflowTrackerPropsZ,\n },\n];\n"],
5
- "mappings": ";;;AAMA,SAAS,SAAS;AAIX,IAAM,YAAY,EACpB,OAAO;AAAA,EACR,UAAU,EAAE,OAAO;AAAA,EACnB,OAAO,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AACpD,CAAC,EACI,OAAO;AAgBL,IAAM,mBAAmB;AAAA,EAC5B,OAAO,EACF,OAAO,EACP,IAAI,GAAG,EACP,SAAS,EACT,SAAS,6GAA6G;AAAA,EAC3H,aAAa,EACR,OAAO,EACP,IAAI,GAAI,EACR,SAAS,EACT,SAAS,wHAAwH;AAAA,EACtI,YAAY,EACP,MAAM,EAAE,OAAO,EAAE,IAAI,GAAG,CAAC,EACzB,IAAI,EAAE,EACN,SAAS,EACT,SAAS,+KAA+K;AACjM;AAMO,IAAM,mBAAmB;AAAA;AAAA,EAE5B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AACJ;AACO,IAAM,kBAAkB,EAC1B,KAAK,gBAAgB,EACrB,SAAS,2IAA2I;AAElJ,IAAM,sBAAsB,CAAC,gBAAgB,cAAc,cAAc;AACzE,IAAM,oBAAoB,EAC5B,K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AAA,MACE,MAAM;AAAA,MACN,MAAM;AAAA,MACN,OAAO;AAAA,IACT;AAAA,IACA;AAAA,MACE,MAAM;AAAA,MACN,MAAM;AAAA,MACN,OAAO;AAAA,IACT;AAAA,EACF;AACF;AAWA,IAAM,wBAAwBA,GAAE,OAAO,CAAC,CAAC,EAAE,YAAY;AAEhD,IAAM,cAAc;AAAA,EACzB;AAAA,IACE,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,aAAa;AAAA,EACf;AACF;",
4
+ "sourcesContent": ["/**\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// AUTHORING FIELDS \u2014 title / description / validation\n//\n// These live on every action *during authoring* (LLM produces them; dashboard\n// displays them; reviewers QA-verify with them) but are stripped before the\n// runtime SDK receives the config. Stripping happens server-side in\n// `to_runtime_config` (platform/backend/app/domains/experiments/helpers.py).\n// They appear in the JSON Schema (and therefore in the tactician's prompt)\n// because the LLM needs to know they are valid action properties \u2014 otherwise\n// schema validation would reject what the prompt commands.\n//\n// Each action variant should `.extend(AuthoringFieldsZ)` alongside any\n// triggerWhen/condition extensions. Validation is an ordered list of\n// human-readable step strings \u2014 reviewers scan it as a checklist.\n// =============================================================================\nexport const AuthoringFieldsZ = {\n title: z\n .string()\n .max(200)\n .optional()\n .describe('Authoring-only: short label shown on the action plan dashboard. Stripped before serving to the runtime SDK.'),\n description: z\n .string()\n .max(1000)\n .optional()\n .describe('Authoring-only: one-sentence explanation of what this action does and why. Stripped before serving to the runtime SDK.'),\n validation: z\n .array(z.string().max(500))\n .max(10)\n .optional()\n .describe('Authoring-only: ordered steps a reviewer can follow to trigger this action and visually confirm it works. Each entry is one step. Stripped before serving to the runtime SDK.'),\n};\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", "/**\n * Adaptive Overlays - Config Schema\n *\n * Zod schema for validating overlays app configuration.\n */\n\nimport { AnchorIdZ, AuthoringFieldsZ, TriggerWhenZ } from '@syntrologie/sdk-contracts';\nimport { z } from 'zod';\n\n/**\n * Validates a CTA button href. See `runtime-sdk/src/actions/schema.ts` for\n * the canonical version \u2014 kept in sync. Two layers: a positive-allowlist\n * regex (serializes to JSON Schema `pattern`) and a URL-parse refine that\n * catches embedded-control-character bypasses.\n */\nconst SAFE_HREF_PATTERN =\n /^(?:[/.#?]|[hH][tT][tT][pP][sS]?:\\/\\/|[mM][aA][iI][lL][tT][oO]:|[tT][eE][lL]:)/;\n\nconst HrefZ = z\n .string()\n .min(1)\n .regex(SAFE_HREF_PATTERN, {\n message:\n 'href must start with /, ./, ../, #, ?, http(s)://, mailto:, or tel: \u2014 javascript:, data:, and vbscript: are not allowed',\n })\n .refine(\n (s) => {\n try {\n const parsed = new URL(s, 'https://syntro.local/');\n return ['http:', 'https:', 'mailto:', 'tel:'].includes(parsed.protocol);\n } catch {\n return false;\n }\n },\n { message: 'href resolves to an unsupported protocol' }\n );\n\nconst CtaButtonNavZ = {\n href: HrefZ.optional().describe(\n 'Optional URL to navigate to when the button is clicked. Relative paths (\"/product/x\"), fragments (\"#section\"), and absolute http(s) URLs are allowed. javascript:/data:/vbscript: are rejected. When actionId is \"dismiss\", the overlay closes without navigating regardless of href.'\n ),\n target: z\n .enum(['_self', '_blank'])\n .optional()\n .describe(\n 'Navigation target. \"_self\" (default) replaces the current tab; \"_blank\" opens a new tab with rel=noopener,noreferrer.'\n ),\n};\n\n/**\n * Overlays app config schema.\n * Defines the structure for overlay configurations in a canvas config.\n */\nexport const configSchema = z\n .object({\n /** Highlight configurations */\n highlights: z\n .array(\n z\n .object({\n anchorId: AnchorIdZ.describe('Route and CSS selector of the element to spotlight.'),\n summary: z\n .string()\n .describe(\n 'Human-readable description of this highlight, used for logging and debugging.'\n ),\n style: z\n .object({\n color: z\n .string()\n .optional()\n .describe(\n 'Ring color as a CSS color string (e.g. \"#5b8cff\"). Defaults to brand blue.'\n ),\n paddingPx: z\n .number()\n .optional()\n .describe(\n 'Space in pixels between the element edge and the spotlight ring. Defaults to 12.'\n ),\n radiusPx: z\n .number()\n .optional()\n .describe('Corner radius of the spotlight ring in pixels. Defaults to 12.'),\n scrimOpacity: z\n .number()\n .optional()\n .describe(\n 'Opacity of the dark backdrop behind the spotlight (0\u20131). Set to 0 to show the ring without dimming the page. Defaults to 0.55.'\n ),\n })\n .optional()\n .describe('Optional visual style overrides for the spotlight ring and backdrop.'),\n })\n .describe(\n 'A spotlight highlight that dims the page and draws a ring around a target element.'\n )\n )\n .optional()\n .describe(\n 'Spotlight highlights: draw attention to specific elements by ringing them with a colored border and dimming the rest of the page.'\n ),\n\n /** Tooltip configurations */\n tooltips: z\n .array(\n z\n .object({\n anchorId: AnchorIdZ.describe(\n 'Route and CSS selector of the element the tooltip is anchored to.'\n ),\n summary: z\n .string()\n .describe(\n 'Human-readable description of this tooltip, used for logging and debugging.'\n ),\n content: z\n .object({\n title: z\n .string()\n .optional()\n .describe('Optional heading shown at the top of the tooltip.'),\n body: z\n .string()\n .describe(\n 'Main tooltip text (required). Explains the feature or provides guidance.'\n ),\n cta: z\n .object({\n label: z.string().describe('Button label text for the single CTA.'),\n action: z.unknown().describe('Action step to execute when the CTA is clicked.'),\n })\n .optional()\n .describe(\n 'Optional single CTA button shorthand. Use ctaButtons for multiple actions.'\n ),\n ctaButtons: z\n .array(\n z.object({\n label: z.string().describe('Button label text.'),\n actionId: z\n .string()\n .describe(\n 'Action identifier published with the action.tooltip_cta_clicked event. Special values: \"dismiss\" closes the tooltip without publishing an event; \"faq:open:<questionId>\" opens the corresponding FAQ question in an adaptive-faq:accordion widget (companion tooltip pattern). Any other value publishes action.tooltip_cta_clicked with the actionId in event props for custom handling.'\n ),\n primary: z\n .boolean()\n .optional()\n .describe(\n 'When true, renders as the primary (filled) button style. Defaults to false.'\n ),\n ...CtaButtonNavZ,\n })\n )\n .optional()\n .describe(\n 'Optional multi-button CTA row. Preferred over the single cta shorthand when more than one action is needed. Each button publishes action.tooltip_cta_clicked with its actionId, and navigates to its href when one is set (unless actionId === \"dismiss\").'\n ),\n })\n .describe('Tooltip content including body text and optional title and CTA.'),\n trigger: z\n .enum(['immediate', 'hover', 'click'])\n .optional()\n .describe(\n '\"immediate\" shows on mount; \"hover\" shows when the user hovers the anchor; \"click\" shows on click. Defaults to \"immediate\".'\n ),\n placement: z\n .enum([\n 'top',\n 'top-start',\n 'top-end',\n 'bottom',\n 'bottom-start',\n 'bottom-end',\n 'left',\n 'left-start',\n 'left-end',\n 'right',\n 'right-start',\n 'right-end',\n ])\n .optional()\n .describe(\n 'Preferred placement of the tooltip relative to the anchor element. The SDK flips to the opposite side if there is not enough space. Defaults to \"top\".'\n ),\n })\n .describe(\n 'A tooltip anchored to a DOM element. Use for contextual help, feature discovery, or CTA prompts near specific UI elements.'\n )\n )\n .optional()\n .describe(\n 'Tooltips anchored to DOM elements. Use for contextual help, upsell prompts, or feature discovery near specific UI elements.'\n ),\n\n /** Badge configurations */\n badges: z\n .array(\n z\n .object({\n anchorId: AnchorIdZ.describe(\n 'Route and CSS selector of the element to attach the badge to.'\n ),\n summary: z\n .string()\n .describe(\n 'Human-readable description of this badge, used for logging and debugging.'\n ),\n content: z\n .string()\n .describe(\n 'Badge text (e.g. \"NEW\", \"3\", \"!\"). Keep short \u2014 typically 1\u20134 characters.'\n ),\n position: z\n .enum(['top-left', 'top-right', 'bottom-left', 'bottom-right'])\n .optional()\n .describe(\n 'Corner of the anchor element where the badge is positioned. Defaults to \"top-right\".'\n ),\n })\n .describe('A small badge indicator positioned at a corner of a target element.')\n )\n .optional()\n .describe(\n 'Badge indicators overlaid on DOM elements. Use for notification counts (\"3\"), status labels (\"NEW\"), or attention markers (\"!\").'\n ),\n\n /** Pulse configurations */\n pulses: z\n .array(\n z\n .object({\n anchorId: AnchorIdZ.describe('Route and CSS selector of the element to animate.'),\n summary: z\n .string()\n .describe(\n 'Human-readable description of this pulse, used for logging and debugging.'\n ),\n duration: z\n .number()\n .optional()\n .describe('Animation duration in milliseconds. Defaults to 2000ms.'),\n })\n .describe(\n 'A pulsing animation applied to a DOM element to draw subtle attention without blocking interaction.'\n )\n )\n .optional()\n .describe(\n 'Pulse animations on DOM elements. Use for subtle attention-grabbing when highlights would be too intrusive.'\n ),\n\n /** Modal configurations */\n modals: z\n .array(\n z\n .object({\n summary: z\n .string()\n .describe(\n 'Human-readable description of this modal, used for logging and debugging.'\n ),\n content: z\n .object({\n title: z\n .string()\n .optional()\n .describe('Optional modal heading shown at the top of the dialog.'),\n body: z.string().describe('Main modal body text (required).'),\n })\n .describe('Modal content including body text and optional heading.'),\n size: z\n .enum(['sm', 'md', 'lg'])\n .optional()\n .describe(\n 'Dialog width: \"sm\" is narrow, \"md\" is standard, \"lg\" is wide. Defaults to \"md\".'\n ),\n blocking: z\n .boolean()\n .optional()\n .describe(\n 'When true, the modal blocks all page interaction until dismissed. Use sparingly \u2014 only for critical confirmations.'\n ),\n scrim: z\n .object({\n opacity: z\n .number()\n .optional()\n .describe('Backdrop opacity behind the modal (0\u20131). Defaults to 0.6.'),\n })\n .optional()\n .describe('Scrim (backdrop) configuration for the modal overlay.'),\n dismiss: z\n .object({\n onEsc: z\n .boolean()\n .optional()\n .describe('When true (default), pressing Escape closes the modal.'),\n closeButton: z\n .boolean()\n .optional()\n .describe('When true (default), an X close button is shown in the modal header.'),\n timeoutMs: z\n .number()\n .optional()\n .describe(\n 'Optional auto-close timeout in milliseconds. Omit to require explicit dismissal.'\n ),\n })\n .optional()\n .describe('Controls how the modal can be dismissed by the user.'),\n ctaButtons: z\n .array(\n z.object({\n label: z.string().describe('Button label text.'),\n actionId: z\n .string()\n .describe(\n 'Action identifier published with the action.modal_cta_clicked event. Use \"dismiss\" to close the modal without publishing an event.'\n ),\n primary: z\n .boolean()\n .optional()\n .describe(\n 'When true, renders as the primary (filled) button style. Defaults to false.'\n ),\n ...CtaButtonNavZ,\n })\n )\n .optional()\n .describe(\n 'Optional CTA buttons shown at the bottom of the modal. Each button navigates to its href when one is set (unless actionId === \"dismiss\").'\n ),\n })\n .describe(\n 'A centered dialog modal. Use for announcements, onboarding prompts, or required confirmations.'\n )\n )\n .optional()\n .describe(\n 'Modal dialogs overlaid on the page. Use for announcements, onboarding prompts, or confirmations that require explicit user acknowledgement.'\n ),\n\n /** Tour configurations */\n tours: z\n .array(\n z\n .object({\n tourId: z\n .string()\n .describe(\n 'Unique identifier for this tour, used to start/resume it via action or deeplink.'\n ),\n summary: z\n .string()\n .describe('Human-readable description of this tour, used for logging and debugging.'),\n steps: z\n .array(\n z.object({\n id: z.string().describe('Unique step identifier within this tour.'),\n action: z\n .record(z.unknown())\n .describe(\n 'Action step config to execute for this tour step (e.g. a tooltip or highlight).'\n ),\n route: z\n .string()\n .optional()\n .describe('Optional route the user must be on before this step executes.'),\n onAction: z\n .record(z.string())\n .optional()\n .describe(\n 'Map of action event \u2192 next step ID. Defines transitions between steps based on user interaction.'\n ),\n })\n )\n .min(\n 1,\n 'Tour must have at least one step \u2014 the executor throws Error(\\'Tour \"...\" has no steps\\') when steps is empty.'\n )\n .describe(\n 'Ordered list of tour steps. Each step executes one action and optionally transitions to the next.'\n ),\n startStep: z\n .string()\n .optional()\n .describe(\n 'ID of the step to begin the tour on. Defaults to the first step in the array.'\n ),\n autoStart: z\n .boolean()\n .optional()\n .describe(\n 'When true, the tour starts automatically when the config loads. Omit to require explicit triggering.'\n ),\n })\n .describe(\n 'A multi-step product tour. Steps execute sequentially (or via onAction transitions) to guide the user through a feature.'\n )\n )\n .optional()\n .describe(\n 'Multi-step product tours. Each tour chains overlay actions (tooltips, highlights) into a guided walkthrough of a feature or workflow.'\n ),\n })\n .describe(\n 'Props for adaptive-overlays visual overlay operations. Each field targets a list of overlay instances by type: highlights (spotlight), tooltips, badges, pulses, modals, and tours.'\n );\n\nexport type OverlaysConfig = z.infer<typeof configSchema>;\n\n// ============================================================================\n// Celebrate Action Schema\n// ============================================================================\n\nconst CelebrateActionZ = z\n .object({\n ...AuthoringFieldsZ,\n kind: z\n .literal('overlays:celebrate')\n .describe(\n 'Renders a fullscreen Canvas 2D celebration effect. Use to reward a user achievement (e.g. completing onboarding, first purchase).'\n ),\n effect: z\n .enum(['confetti', 'fireworks', 'sparkles', 'emoji-rain'])\n .describe(\n 'Effect preset name: \"confetti\" (falling pieces), \"fireworks\" (burst particles), \"sparkles\" (twinkling diamonds), \"emoji-rain\" (falling emoji).'\n ),\n duration: z\n .number()\n .optional()\n .describe('Animation duration in milliseconds. Defaults to 3000ms.'),\n intensity: z\n .enum(['light', 'medium', 'heavy'])\n .optional()\n .describe('Particle density: \"light\" is subtle, \"heavy\" is exuberant. Defaults to \"medium\".'),\n colors: z\n .array(z.string())\n .optional()\n .describe(\n 'Optional color palette as CSS color strings (e.g. [\"#ff0000\", \"#00ff00\"]). Defaults to a rainbow palette.'\n ),\n props: z\n .record(z.unknown())\n .optional()\n .describe(\n 'Effect-specific properties. For \"emoji-rain\", use {\"emoji\": \"\uD83D\uDD25\"} to set the falling character.'\n ),\n label: z\n .string()\n .optional()\n .describe('Optional accessible label for the celebration (used for screen readers).'),\n triggerWhen: TriggerWhenZ.describe(\n 'Conditional trigger strategy. When null, the celebration fires immediately. Use a rules strategy to fire on a specific behavioral event.'\n ),\n })\n .strict()\n .describe(\n 'Fullscreen celebration effect action. Use to celebrate a user milestone. Pick an effect preset and optionally customize duration, intensity, and colors.'\n );\n\n// ============================================================================\n// Unified Schema Export\n// ============================================================================\n\nexport const actionStepSchemas = [{ defName: 'celebrate', schema: CelebrateActionZ }];\n\n// ============================================================================\n// Capabilities Documentation (injected into JSON Schema for LLM prompts)\n// ============================================================================\n\nexport const CAPABILITIES_DOCUMENTATION = {\n packageId: 'adaptive-overlays',\n description:\n 'Visual overlay capabilities including highlights, tooltips, badges, pulse animations, modals, tours, and celebrations.',\n whenToUse: [\n { goal: 'Draw attention to an element (spotlight)', action: 'overlays:highlight' },\n { goal: 'Show contextual help or guidance near an element', action: 'overlays:tooltip' },\n { goal: 'Add a notification indicator (count, \"NEW\")', action: 'overlays:badge' },\n { goal: 'Subtle attention-grab animation', action: 'overlays:pulse' },\n { goal: 'Show a blocking or non-blocking dialog', action: 'overlays:modal' },\n { goal: 'Celebrate a user achievement', action: 'overlays:celebrate' },\n { goal: 'Multi-step guided walkthrough', action: 'overlays:tour' },\n ],\n conventions: [\n {\n name: 'Tooltip actionId: \"dismiss\"',\n description:\n 'The special actionId \"dismiss\" closes the tooltip immediately without publishing an event or navigating (even if href is set). Use for \"close\" or \"not now\" buttons.',\n },\n {\n name: 'CTA navigation via href',\n description:\n 'To send users to a specific URL when they click a tooltip or modal CTA button, set the button\\'s `href` field (and optionally `target: \"_blank\"` to open a new tab). The runtime publishes the click event first, then navigates via window.location.assign / window.open. Do NOT try to drive navigation by setting data-href via content:setAttr \u2014 that does nothing on non-anchor elements. Example: { label: \"Shop GLP-3 (R)\", actionId: \"shop\", href: \"/product/glpiii\", primary: true }.',\n },\n {\n name: 'Companion FAQ tooltips (faq:open:<questionId>)',\n description:\n 'A tooltip CTA with actionId \"faq:open:<questionId>\" publishes action.tooltip_cta_clicked, which the adaptive-faq:accordion widget listens for. The matching FAQ question expands and scrolls into view. If the FAQ widget mounts after the click (e.g. canvas was closed), it checks EventBus history for recent faq:open:* events (within 10 seconds) and auto-expands on mount. The widget also publishes canvas.requestOpen to open the canvas panel if needed.',\n },\n {\n name: 'Celebrate effect presets',\n description:\n 'Available effects: \"confetti\" (falling rectangular/circular pieces with gravity and rotation), \"fireworks\" (burst centers with radiating particles and glow), \"sparkles\" (diamond shapes with sine-wave opacity and upward float), \"emoji-rain\" (emoji characters falling with horizontal wobble \u2014 set props.emoji to customize the character).',\n },\n ],\n events: [\n {\n name: 'action.tooltip_cta_clicked',\n when: 'User clicks a tooltip CTA button',\n props: '{ anchorId, actionId, label, href? }',\n },\n {\n name: 'action.modal_cta_clicked',\n when: 'User clicks a modal CTA button',\n props: '{ actionId, href? }',\n },\n ],\n};\n\n// ============================================================================\n// Tile Widget Definitions\n// ============================================================================\n\n/**\n * Tile widget definitions for unified JSON Schema generation.\n * Maps widget IDs to their props validation schema so the build script\n * can inject if/then constraints on tile.props.\n */\nconst WorkflowTrackerPropsZ = z.object({}).passthrough();\n\nexport const tileWidgets = [\n {\n widget: 'adaptive-overlays:workflow-tracker',\n defName: 'workflowTrackerProps',\n propsSchema: WorkflowTrackerPropsZ,\n },\n];\n"],
5
+ "mappings": ";;;AAMA,SAAS,SAAS;AAIX,IAAM,YAAY,EACpB,OAAO;AAAA,EACR,UAAU,EAAE,OAAO;AAAA,EACnB,OAAO,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AACpD,CAAC,EACI,OAAO;AAgBL,IAAM,mBAAmB;AAAA,EAC5B,OAAO,EACF,OAAO,EACP,IAAI,GAAG,EACP,SAAS,EACT,SAAS,6GAA6G;AAAA,EAC3H,aAAa,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AAM;AAAA,MACN,MAAM;AAAA,MACN,OAAO;AAAA,IACT;AAAA,EACF;AACF;AAWA,IAAM,wBAAwBA,GAAE,OAAO,CAAC,CAAC,EAAE,YAAY;AAEhD,IAAM,cAAc;AAAA,EACzB;AAAA,IACE,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,aAAa;AAAA,EACf;AACF;",
6
6
  "names": ["z"]
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@syntrologie/adapt-overlays",
3
- "version": "2.19.0",
3
+ "version": "2.20.0",
4
4
  "description": "Adaptive Overlays app - Visual overlays for tooltips, highlights, badges, and pulses",
5
5
  "license": "Proprietary",
6
6
  "private": false,