@syntrologie/adapt-faq 2.8.0-canary.35 → 2.8.0-canary.351
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/FAQWidgetLit.d.ts +116 -0
- package/dist/FAQWidgetLit.d.ts.map +1 -0
- package/dist/FAQWidgetLit.editable.d.ts +154 -0
- package/dist/FAQWidgetLit.editable.d.ts.map +1 -0
- package/dist/answerRendering.d.ts +4 -0
- package/dist/answerRendering.d.ts.map +1 -0
- package/dist/chunk-5WRI5ZAA.js +31 -0
- package/dist/chunk-5WRI5ZAA.js.map +7 -0
- package/dist/chunk-IGCYULL7.js +223 -0
- package/dist/chunk-IGCYULL7.js.map +7 -0
- package/dist/chunk-KRKRB4OL.js +598 -0
- package/dist/chunk-KRKRB4OL.js.map +7 -0
- package/dist/editor.d.ts +60 -33
- package/dist/editor.d.ts.map +1 -1
- package/dist/editor.js +5054 -313
- package/dist/editor.js.map +7 -0
- package/dist/faq-item-editor.d.ts +33 -0
- package/dist/faq-item-editor.d.ts.map +1 -0
- package/dist/faq-styles.d.ts +3 -1
- package/dist/faq-styles.d.ts.map +1 -1
- package/dist/faq-types.d.ts +4 -0
- package/dist/faq-types.d.ts.map +1 -1
- package/dist/runtime.d.ts +17 -5
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +956 -64
- package/dist/runtime.js.map +7 -0
- package/dist/schema.d.ts +1232 -555
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +300 -207
- package/dist/schema.js.map +7 -0
- package/dist/types.d.ts +36 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +7 -12
- package/dist/FAQWidget.d.ts +0 -33
- package/dist/FAQWidget.d.ts.map +0 -1
- package/dist/FAQWidget.js +0 -388
- package/dist/cdn.d.ts +0 -70
- package/dist/cdn.d.ts.map +0 -1
- package/dist/cdn.js +0 -46
- package/dist/executors.js +0 -150
- package/dist/faq-styles.js +0 -204
- package/dist/faq-types.js +0 -7
- package/dist/state.js +0 -132
- package/dist/summarize.js +0 -62
- package/dist/types.js +0 -17
- package/node_modules/@syntrologie/sdk-contracts/dist/index.d.ts +0 -129
- package/node_modules/@syntrologie/sdk-contracts/dist/index.js +0 -15
- package/node_modules/@syntrologie/sdk-contracts/dist/schemas.d.ts +0 -2225
- package/node_modules/@syntrologie/sdk-contracts/dist/schemas.js +0 -162
- package/node_modules/@syntrologie/sdk-contracts/package.json +0 -33
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Adaptive FAQ - FAQWidgetLit
|
|
3
|
+
*
|
|
4
|
+
* Lit web component equivalent of FAQWidget.tsx.
|
|
5
|
+
* Renders a collapsible Q&A accordion with search, category grouping,
|
|
6
|
+
* feedback, and markdown rendering — all as a custom element with no
|
|
7
|
+
* Shadow DOM (light DOM via createRenderRoot).
|
|
8
|
+
*
|
|
9
|
+
* Tag name: <syntro-faq-accordion>
|
|
10
|
+
*
|
|
11
|
+
* Decorator-free: uses `static override properties` (tsconfig has no
|
|
12
|
+
* experimentalDecorators).
|
|
13
|
+
*/
|
|
14
|
+
import { LitElement, nothing } from 'lit';
|
|
15
|
+
import type { FAQWidgetRuntime } from './faq-types';
|
|
16
|
+
import type { FAQConfig, FeedbackValue } from './types';
|
|
17
|
+
/**
|
|
18
|
+
* <syntro-faq-accordion> — light-DOM Lit web component.
|
|
19
|
+
*
|
|
20
|
+
* Set properties imperatively (no attribute serialisation for objects):
|
|
21
|
+
* el.faqConfig = { expandBehavior: 'single', ... };
|
|
22
|
+
* el.runtime = runtimeInstance;
|
|
23
|
+
* el.instanceId = 'my-faq';
|
|
24
|
+
*/
|
|
25
|
+
export declare class FAQAccordionElement extends LitElement {
|
|
26
|
+
static properties: {
|
|
27
|
+
faqConfig: {
|
|
28
|
+
attribute: boolean;
|
|
29
|
+
};
|
|
30
|
+
runtime: {
|
|
31
|
+
attribute: boolean;
|
|
32
|
+
};
|
|
33
|
+
instanceId: {
|
|
34
|
+
type: StringConstructor;
|
|
35
|
+
};
|
|
36
|
+
_expandedIds: {
|
|
37
|
+
state: boolean;
|
|
38
|
+
};
|
|
39
|
+
_highlightId: {
|
|
40
|
+
state: boolean;
|
|
41
|
+
};
|
|
42
|
+
_searchQuery: {
|
|
43
|
+
state: boolean;
|
|
44
|
+
};
|
|
45
|
+
_feedbackState: {
|
|
46
|
+
state: boolean;
|
|
47
|
+
};
|
|
48
|
+
_hoveredId: {
|
|
49
|
+
state: boolean;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
faqConfig: FAQConfig;
|
|
53
|
+
runtime: FAQWidgetRuntime | null;
|
|
54
|
+
instanceId: string;
|
|
55
|
+
_expandedIds: Set<string>;
|
|
56
|
+
_highlightId: string | null;
|
|
57
|
+
_searchQuery: string;
|
|
58
|
+
_feedbackState: Map<string, FeedbackValue>;
|
|
59
|
+
_hoveredId: string | null;
|
|
60
|
+
private _unsubContext;
|
|
61
|
+
private _unsubAccumulator;
|
|
62
|
+
private _unsubCta;
|
|
63
|
+
private _unsubDeepLink;
|
|
64
|
+
private _unsubSessionMetrics;
|
|
65
|
+
private _highlightTimer;
|
|
66
|
+
private _unsubCompositional;
|
|
67
|
+
private _tileId;
|
|
68
|
+
/** Instance ids already appended via the compositional bus — dedups
|
|
69
|
+
* the subscribe-then-replay path (and re-subscribes on runtime change). */
|
|
70
|
+
private _llmAppendedIds;
|
|
71
|
+
createRenderRoot(): this;
|
|
72
|
+
connectedCallback(): void;
|
|
73
|
+
disconnectedCallback(): void;
|
|
74
|
+
updated(changedProps: Map<string, unknown>): void;
|
|
75
|
+
private _subscribeAll;
|
|
76
|
+
/**
|
|
77
|
+
* Subscribe to `element.compositional_*` events targeting this accordion's
|
|
78
|
+
* tile, and ask the element store to replay any items it already holds for
|
|
79
|
+
* us (covers the case where the accordion mounts AFTER the item did — the
|
|
80
|
+
* inline-slot hydration race that otherwise silently drops the question).
|
|
81
|
+
*/
|
|
82
|
+
private _subscribeCompositional;
|
|
83
|
+
/** Tile id for compositional filtering: the enclosing tile card's
|
|
84
|
+
* `data-tile-id` (set by SyntroTileCard), falling back to `instanceId`
|
|
85
|
+
* when the accordion is mounted outside a tile card. */
|
|
86
|
+
private _resolveTileId;
|
|
87
|
+
/** Append (or prepend) a faq:question the LLM mounted. The wire shape is a
|
|
88
|
+
* fully-formed `{kind, config}` envelope, so we store it verbatim. */
|
|
89
|
+
private _insertItem;
|
|
90
|
+
/** Replace an existing question's content (full replacement). */
|
|
91
|
+
private _patchItem;
|
|
92
|
+
/** Remove a question by instance id. */
|
|
93
|
+
private _removeItem;
|
|
94
|
+
private _unsubscribeAll;
|
|
95
|
+
private _handleToggle;
|
|
96
|
+
private _handleFeedback;
|
|
97
|
+
/**
|
|
98
|
+
* Unified render list. Merges compositionally-appended rows
|
|
99
|
+
* (`faqConfig.actions`, the container-then-stream path) with atomically
|
|
100
|
+
* authored rows (`faqConfig.questions`, the struct_list path) normalized
|
|
101
|
+
* into the same `FAQQuestionAction` shape. The atomic path is how the LLM
|
|
102
|
+
* mounts a complete FAQ in one call — so it renders whole, never empty.
|
|
103
|
+
*/
|
|
104
|
+
private _allQuestions;
|
|
105
|
+
private _visibleQuestions;
|
|
106
|
+
private _orderedQuestions;
|
|
107
|
+
private _filteredQuestions;
|
|
108
|
+
private _categoryGroups;
|
|
109
|
+
private _renderAnswer;
|
|
110
|
+
private _renderFeedback;
|
|
111
|
+
private _renderItem;
|
|
112
|
+
private _renderItems;
|
|
113
|
+
render(): import("lit-html").TemplateResult<1> | typeof nothing;
|
|
114
|
+
}
|
|
115
|
+
export default FAQAccordionElement;
|
|
116
|
+
//# sourceMappingURL=FAQWidgetLit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FAQWidgetLit.d.ts","sourceRoot":"","sources":["../src/FAQWidgetLit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,EAAQ,UAAU,EAAE,OAAO,EAAE,MAAM,KAA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ASnB,OAAO,CAAC,eAAe;IAmBvB,OAAO,CAAC,aAAa;IA0BrB,OAAO,CAAC,eAAe;IAYvB;;;;;;OAMG;IACH,OAAO,CAAC,aAAa;IA4BrB,OAAO,CAAC,iBAAiB;IASzB,OAAO,CAAC,iBAAiB;IAOzB,OAAO,CAAC,kBAAkB;IAW1B,OAAO,CAAC,eAAe;IAgBvB,OAAO,CAAC,aAAa;IAKrB,OAAO,CAAC,eAAe;IAsCvB,OAAO,CAAC,WAAW;IAmFnB,OAAO,CAAC,YAAY;IAcX,MAAM;CA6HhB;AAUD,eAAe,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Adaptive FAQ - FAQWidgetLit.editable
|
|
3
|
+
*
|
|
4
|
+
* Editable variant of the FAQ accordion for the canvas editor surface.
|
|
5
|
+
* Renders the same Q&A rows as <syntro-faq-accordion> but adds:
|
|
6
|
+
* - Pencil button per row (shows on hover, calls controller.editItem on click)
|
|
7
|
+
* - Click on question text expands/collapses to show the answer (normal FAQ behavior)
|
|
8
|
+
* - Drag handle per row when items.length >= 2
|
|
9
|
+
* - Drag-and-drop reorder via the sortable utility (injected via mount config)
|
|
10
|
+
* - Read-only fallback when controller is null
|
|
11
|
+
*
|
|
12
|
+
* Tag name: <syntro-faq-accordion-editable>
|
|
13
|
+
*
|
|
14
|
+
* Decorator-free: uses `static override properties` (matches codebase convention).
|
|
15
|
+
* Light DOM: inherits host-page CSS variables (same as <syntro-faq-accordion>).
|
|
16
|
+
*
|
|
17
|
+
* Cross-package import safety:
|
|
18
|
+
* The controller is typed as a structural `ControllerLike` interface defined
|
|
19
|
+
* locally — NOT imported from @syntrologie/editor-sdk. This prevents a
|
|
20
|
+
* dependency cycle (editor-sdk imports adapt-faq's editable; adapt-faq cannot
|
|
21
|
+
* import editor-sdk). The real EditModeController satisfies ControllerLike
|
|
22
|
+
* structurally.
|
|
23
|
+
*
|
|
24
|
+
* Similarly, `makeSortable` is passed in as a `SortableFn` option rather than
|
|
25
|
+
* imported directly. The editor-sdk bootstrap (setupEditModeBootstrap.ts) threads
|
|
26
|
+
* the real makeSortable through the FAQWidgetLitEditableMountable.mount() call.
|
|
27
|
+
* This is Alternative C from the architecture decision log, and matches the
|
|
28
|
+
* structural-interface pattern already used for the controller.
|
|
29
|
+
*/
|
|
30
|
+
import { LitElement } from 'lit';
|
|
31
|
+
import type { FAQConfig } from './types';
|
|
32
|
+
/**
|
|
33
|
+
* Structural interface — describes only the methods the editable widget needs.
|
|
34
|
+
* The real EditModeController satisfies this by structural subtyping.
|
|
35
|
+
*
|
|
36
|
+
* `tileId` (the host tile's id, threaded in via `instanceId` at mount) scopes
|
|
37
|
+
* controller calls to the active tile when a canvas has multiple FAQ tiles.
|
|
38
|
+
* It is optional so single-tile and v2 actions-shape canvases continue to work.
|
|
39
|
+
*/
|
|
40
|
+
export interface ControllerLike {
|
|
41
|
+
editItem(adaptive: string, itemId: string, tileId?: string): void;
|
|
42
|
+
editContainer(adaptive: string, tileId?: string): void;
|
|
43
|
+
isModalOpen(): boolean;
|
|
44
|
+
reorderItems(adaptive: string, newOrder: string[], tileId?: string): void;
|
|
45
|
+
}
|
|
46
|
+
/** Return value from makeSortable. */
|
|
47
|
+
export interface SortableHandle {
|
|
48
|
+
destroy(): void;
|
|
49
|
+
}
|
|
50
|
+
/** Options subset that FAQAccordionEditableElement passes into the sortable. */
|
|
51
|
+
export interface SortableOptions {
|
|
52
|
+
itemSelector: string;
|
|
53
|
+
handleSelector: string;
|
|
54
|
+
getItems: () => string[];
|
|
55
|
+
onReorder: (newOrder: string[]) => void;
|
|
56
|
+
liveRegion: HTMLElement;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Structural type matching `makeSortable` from editor-sdk's sortable.ts.
|
|
60
|
+
* Injected at mount time by FAQWidgetLitEditableMountable.
|
|
61
|
+
*/
|
|
62
|
+
export type SortableFn = (host: HTMLElement, opts: SortableOptions) => SortableHandle;
|
|
63
|
+
/**
|
|
64
|
+
* <syntro-faq-accordion-editable> — light-DOM Lit element.
|
|
65
|
+
*
|
|
66
|
+
* Set properties imperatively (no attribute serialisation for objects):
|
|
67
|
+
* el.faqConfig = { ... };
|
|
68
|
+
* el.controller = editModeControllerInstance; // null → read-only
|
|
69
|
+
*/
|
|
70
|
+
export declare class FAQAccordionEditableElement extends LitElement {
|
|
71
|
+
static properties: {
|
|
72
|
+
faqConfig: {
|
|
73
|
+
attribute: boolean;
|
|
74
|
+
};
|
|
75
|
+
controller: {
|
|
76
|
+
attribute: boolean;
|
|
77
|
+
};
|
|
78
|
+
tileId: {
|
|
79
|
+
attribute: boolean;
|
|
80
|
+
};
|
|
81
|
+
_hoveredId: {
|
|
82
|
+
state: boolean;
|
|
83
|
+
};
|
|
84
|
+
_expandedId: {
|
|
85
|
+
state: boolean;
|
|
86
|
+
};
|
|
87
|
+
_containerHovered: {
|
|
88
|
+
state: boolean;
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
faqConfig: FAQConfig;
|
|
92
|
+
/** Null when loaded without an editor context — renders read-only accordion. */
|
|
93
|
+
controller: ControllerLike | null;
|
|
94
|
+
/**
|
|
95
|
+
* Host tile id, threaded in via the mountable's `instanceId`. Scopes every
|
|
96
|
+
* controller call so the right tile is targeted when the canvas has more
|
|
97
|
+
* than one FAQ tile (per-route FAQs). Empty string when unknown.
|
|
98
|
+
*/
|
|
99
|
+
tileId: string;
|
|
100
|
+
/**
|
|
101
|
+
* The `makeSortable` factory to use. Injected by FAQWidgetLitEditableMountable
|
|
102
|
+
* from the editor-sdk bootstrap so there is no direct import from editor-sdk
|
|
103
|
+
* into this package (which would create a circular dependency).
|
|
104
|
+
*
|
|
105
|
+
* Null when running without the editor context (read-only mode).
|
|
106
|
+
*/
|
|
107
|
+
sortable: SortableFn | null;
|
|
108
|
+
/**
|
|
109
|
+
* Shared aria-live region from the modal host, threaded in via mount config.
|
|
110
|
+
* Falls back to a detached element when running outside the editor context.
|
|
111
|
+
*
|
|
112
|
+
* TODO(phase-2-a11y): wire shared live region from modal host for real a11y.
|
|
113
|
+
*/
|
|
114
|
+
liveRegion: HTMLElement | null;
|
|
115
|
+
_hoveredId: string | null;
|
|
116
|
+
_expandedId: string | null;
|
|
117
|
+
_containerHovered: boolean;
|
|
118
|
+
private _sortableHandle;
|
|
119
|
+
createRenderRoot(): this;
|
|
120
|
+
connectedCallback(): void;
|
|
121
|
+
/**
|
|
122
|
+
* Wire (or re-wire) the sortable whenever the properties it depends on change.
|
|
123
|
+
* `updated()` fires after every render, including the first, so we don't need
|
|
124
|
+
* a separate `firstUpdated()` call — using `updated()` alone avoids a double
|
|
125
|
+
* attach on mount (firstUpdated + updated both fire on first render).
|
|
126
|
+
*/
|
|
127
|
+
protected updated(changed: Map<string, unknown>): void;
|
|
128
|
+
disconnectedCallback(): void;
|
|
129
|
+
private _attachSortable;
|
|
130
|
+
private _handleEdit;
|
|
131
|
+
private _handlePencilClick;
|
|
132
|
+
private _handleContainerEdit;
|
|
133
|
+
private _toggleExpand;
|
|
134
|
+
private _renderRow;
|
|
135
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Mountable for <syntro-faq-accordion-editable>.
|
|
139
|
+
*
|
|
140
|
+
* Follows the same mount pattern as FAQWidgetLitMountable in runtime.ts.
|
|
141
|
+
* Accepts a `controller` in addition to `faqConfig` so the editor can
|
|
142
|
+
* wire up the EditModeController at mount time.
|
|
143
|
+
*/
|
|
144
|
+
export declare const FAQWidgetLitEditableMountable: {
|
|
145
|
+
mount(container: HTMLElement, config?: FAQConfig & {
|
|
146
|
+
instanceId?: string;
|
|
147
|
+
controller?: ControllerLike | null;
|
|
148
|
+
/** makeSortable factory injected by editor-sdk bootstrap. Null → drag disabled. */
|
|
149
|
+
sortable?: SortableFn | null;
|
|
150
|
+
/** Shared aria-live region from the modal host for sortable announcements. */
|
|
151
|
+
liveRegion?: HTMLElement | null;
|
|
152
|
+
}): () => void;
|
|
153
|
+
};
|
|
154
|
+
//# sourceMappingURL=FAQWidgetLit.editable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FAQWidgetLit.editable.d.ts","sourceRoot":"","sources":["../src/FAQWidgetLit.editable.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,EAAQ,UAAU,EAAW,MAAM,KAAK,CAAC;AAIhD,OAAO,KAAK,EAAE,SAAS,EAAqB,MAAM,SAAS,CAAC;AAM5D;;;;;;;GAOG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClE,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvD,WAAW,IAAI,OAAO,CAAC;IACvB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3E;AAMD,sCAAsC;AACtC,MAAM,WAAW,cAAc;IAC7B,OAAO,IAAI,IAAI,CAAC;CACjB;AAED,gFAAgF;AAChF,MAAM,WAAW,eAAe;IAC9B,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,MAAM,MAAM,EAAE,CAAC;IACzB,SAAS,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACxC,UAAU,EAAE,WAAW,CAAC;CACzB;AAED;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,eAAe,KAAK,cAAc,CAAC;AAuJtF;;;;;;GAMG;AACH,qBAAa,2BAA4B,SAAQ,UAAU;IAKz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,SAAS,CAAC;AAIzC,wBAAgB,aAAa,CAAC,MAAM,EAAE,SAAS,GAAG,MAAM,CAIvD;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,SAAS,GAAG,MAAM,CAQ1D"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
8
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
19
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
20
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
21
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
22
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
23
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
24
|
+
mod
|
|
25
|
+
));
|
|
26
|
+
|
|
27
|
+
export {
|
|
28
|
+
__commonJS,
|
|
29
|
+
__toESM
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=chunk-5WRI5ZAA.js.map
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
// ../../sdk-contracts/dist/mount-plumbing.js
|
|
2
|
+
var MOUNT_PLUMBING_KEYS = ["instanceId", "runtime", "tileId"];
|
|
3
|
+
function stripMountPlumbing(config) {
|
|
4
|
+
if (!config || typeof config !== "object") {
|
|
5
|
+
return {};
|
|
6
|
+
}
|
|
7
|
+
const out = { ...config };
|
|
8
|
+
for (const key of MOUNT_PLUMBING_KEYS) {
|
|
9
|
+
delete out[key];
|
|
10
|
+
}
|
|
11
|
+
return out;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
// ../../sdk-contracts/dist/schemas.js
|
|
15
|
+
import { z } from "zod";
|
|
16
|
+
var AnchorIdZ = z.object({
|
|
17
|
+
selector: z.string(),
|
|
18
|
+
route: z.union([z.string(), z.array(z.string())])
|
|
19
|
+
}).strict();
|
|
20
|
+
var AuthoringFieldsZ = {
|
|
21
|
+
id: z.string().optional().describe('Stable action identifier (e.g. "act_3db6a14d2ab0").'),
|
|
22
|
+
title: z.string().max(200).optional().describe("Authoring-only: short label shown on the action plan dashboard. Stripped before serving to the runtime SDK."),
|
|
23
|
+
description: z.string().max(1e3).optional().describe("Authoring-only: one-sentence explanation of what this action does and why. Stripped before serving to the runtime SDK."),
|
|
24
|
+
validation: z.array(z.string().max(500)).max(10).optional().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.")
|
|
25
|
+
};
|
|
26
|
+
var COUNTABLE_EVENTS = [
|
|
27
|
+
// User interactions (from PostHog autocapture normalization)
|
|
28
|
+
"ui.click",
|
|
29
|
+
"ui.scroll",
|
|
30
|
+
"ui.input",
|
|
31
|
+
"ui.change",
|
|
32
|
+
"ui.submit",
|
|
33
|
+
// Behavioral detectors (from event-processor)
|
|
34
|
+
"ui.hover",
|
|
35
|
+
"ui.idle",
|
|
36
|
+
"ui.scroll_thrash",
|
|
37
|
+
"ui.focus_bounce",
|
|
38
|
+
"ui.hesitate",
|
|
39
|
+
"ui.rage_click",
|
|
40
|
+
// Navigation
|
|
41
|
+
"nav.page_view",
|
|
42
|
+
"nav.page_leave"
|
|
43
|
+
];
|
|
44
|
+
var CountableEventZ = z.enum(COUNTABLE_EVENTS).describe("Event name to count. ui.* = user interactions and behavioral detectors (hesitate, rage_click, scroll_thrash, focus_bounce, idle, hover); nav.* = page navigation.");
|
|
45
|
+
var SESSION_METRIC_KEYS = ["time_on_page", "page_views", "scroll_depth"];
|
|
46
|
+
var SessionMetricKeyZ = z.enum(SESSION_METRIC_KEYS).describe("Session metric key. time_on_page = seconds on current page, page_views = pages visited this session, scroll_depth = 0-100 percentage.");
|
|
47
|
+
var PageUrlConditionZ = z.object({
|
|
48
|
+
type: z.literal("page_url"),
|
|
49
|
+
url: z.string().describe('URL path to match (e.g. "/pricing", "/dashboard")')
|
|
50
|
+
}).describe('Fires when the current page URL matches. Use for page-specific actions. Example: {"type": "page_url", "url": "/pricing"}');
|
|
51
|
+
var RouteConditionZ = z.object({
|
|
52
|
+
type: z.literal("route"),
|
|
53
|
+
routeId: z.string().describe("Named route ID from the route filter")
|
|
54
|
+
}).describe("Fires when the current route matches a named route ID.");
|
|
55
|
+
var AnchorVisibleConditionZ = z.object({
|
|
56
|
+
type: z.literal("anchor_visible"),
|
|
57
|
+
anchorId: z.string().describe("CSS selector of the anchor element"),
|
|
58
|
+
state: z.enum(["visible", "present", "absent"]).describe('"visible" = in viewport, "present" = in DOM, "absent" = not in DOM')
|
|
59
|
+
}).describe(`Fires based on a DOM element's visibility state. Example: {"type": "anchor_visible", "anchorId": "#cta-button", "state": "visible"}`);
|
|
60
|
+
var EventOccurredConditionZ = z.object({
|
|
61
|
+
type: z.literal("event_occurred"),
|
|
62
|
+
eventName: z.string().describe('Event name (e.g. "ui.click", "$pageview")'),
|
|
63
|
+
withinMs: z.number().optional().describe("Time window in ms. Omit = any time this session.")
|
|
64
|
+
}).describe('Fires when a specific event has occurred during this session. Example: {"type": "event_occurred", "eventName": "ui.click", "withinMs": 5000}');
|
|
65
|
+
var StateEqualsConditionZ = z.object({
|
|
66
|
+
type: z.literal("state_equals"),
|
|
67
|
+
key: z.string().describe("Key in the SDK persistent state store (localStorage). Only valid for keys the host app explicitly sets via syntro.state.set()."),
|
|
68
|
+
value: z.unknown().describe("Expected value to match against")
|
|
69
|
+
}).describe("Checks the SDK persistent state store (localStorage). ONLY for host-app state set via syntro.state.set() \u2014 NOT for user attributes like region, device, or UTM params (those are handled by segment targeting). Do NOT use this for targeting. If you do not know the valid state keys, do not use this condition type.");
|
|
70
|
+
var ViewportConditionZ = z.object({
|
|
71
|
+
type: z.literal("viewport"),
|
|
72
|
+
minWidth: z.number().optional().describe("Minimum viewport width in pixels"),
|
|
73
|
+
maxWidth: z.number().optional().describe("Maximum viewport width in pixels"),
|
|
74
|
+
minHeight: z.number().optional().describe("Minimum viewport height in pixels"),
|
|
75
|
+
maxHeight: z.number().optional().describe("Maximum viewport height in pixels")
|
|
76
|
+
}).describe('Fires based on viewport (screen) size. Use for responsive behavior. Example: {"type": "viewport", "minWidth": 768} \u2014 fires on tablet and larger.');
|
|
77
|
+
var SessionMetricConditionZ = z.object({
|
|
78
|
+
type: z.literal("session_metric"),
|
|
79
|
+
key: SessionMetricKeyZ,
|
|
80
|
+
operator: z.enum(["gte", "lte", "eq", "gt", "lt"]),
|
|
81
|
+
threshold: z.number().describe("Numeric threshold to compare against")
|
|
82
|
+
}).describe('Fires when a session metric crosses a threshold. Valid keys: "time_on_page" (seconds), "page_views" (count), "scroll_depth" (0-100). Example: {"type": "session_metric", "key": "time_on_page", "operator": "gte", "threshold": 30}');
|
|
83
|
+
var DismissedConditionZ = z.object({
|
|
84
|
+
type: z.literal("dismissed"),
|
|
85
|
+
key: z.string().describe("Dismissal key (usually a tile or action ID)"),
|
|
86
|
+
inverted: z.boolean().optional().describe("When true, fires if NOT dismissed (default behavior)")
|
|
87
|
+
}).describe("Checks if an item has been dismissed by the user. Use with inverted: true to show only if not dismissed.");
|
|
88
|
+
var CooldownActiveConditionZ = z.object({
|
|
89
|
+
type: z.literal("cooldown_active"),
|
|
90
|
+
key: z.string().describe("Cooldown key"),
|
|
91
|
+
inverted: z.boolean().optional().describe("When true, fires if cooldown is NOT active")
|
|
92
|
+
}).describe("Checks if a cooldown timer is currently active. Use to prevent showing the same intervention too frequently.");
|
|
93
|
+
var FrequencyLimitConditionZ = z.object({
|
|
94
|
+
type: z.literal("frequency_limit"),
|
|
95
|
+
key: z.string().describe("Frequency counter key"),
|
|
96
|
+
limit: z.number().describe("Maximum allowed count"),
|
|
97
|
+
inverted: z.boolean().optional().describe("When true, fires if limit NOT reached")
|
|
98
|
+
}).describe("Checks if a frequency limit has been reached. Use to cap how many times an action fires per session.");
|
|
99
|
+
var MatchOpZ = z.object({
|
|
100
|
+
equals: z.union([z.string(), z.number(), z.boolean()]).optional(),
|
|
101
|
+
contains: z.string().optional()
|
|
102
|
+
}).describe("Match operator for counter filters. Exactly one of equals or contains must be specified.");
|
|
103
|
+
var CounterDefZ = z.object({
|
|
104
|
+
events: z.array(CountableEventZ).min(1).describe("Event names to count. Use values from the countable events enum."),
|
|
105
|
+
match: z.record(z.string(), MatchOpZ).optional().describe("Property filters. Keys are event prop names or element-chain fields (tag_name, $el_text, attr__*). All entries AND together.")
|
|
106
|
+
}).describe("Defines what events to count. Registered as an accumulator predicate at config-load time.");
|
|
107
|
+
var EventCountConditionZ = z.object({
|
|
108
|
+
type: z.literal("event_count"),
|
|
109
|
+
key: z.string().describe("Unique key for this counter (used for accumulator registration)"),
|
|
110
|
+
operator: z.enum(["gte", "lte", "eq", "gt", "lt"]),
|
|
111
|
+
count: z.number().int().min(0).describe("Target count threshold"),
|
|
112
|
+
withinMs: z.number().positive().optional().describe("Time window in ms. Omit = count across entire session."),
|
|
113
|
+
counter: CounterDefZ.optional().describe("Inline counter definition. Defines what events to count.")
|
|
114
|
+
}).describe('Fires when accumulated event count crosses a threshold. Most powerful trigger type. Example: {"type": "event_count", "key": "pricing-clicks", "operator": "gte", "count": 3, "counter": {"events": ["ui.click"], "match": {"attr__data-cta": {"contains": "pricing"}}}}');
|
|
115
|
+
var ConditionZ = z.discriminatedUnion("type", [
|
|
116
|
+
PageUrlConditionZ,
|
|
117
|
+
RouteConditionZ,
|
|
118
|
+
AnchorVisibleConditionZ,
|
|
119
|
+
EventOccurredConditionZ,
|
|
120
|
+
StateEqualsConditionZ,
|
|
121
|
+
ViewportConditionZ,
|
|
122
|
+
SessionMetricConditionZ,
|
|
123
|
+
DismissedConditionZ,
|
|
124
|
+
CooldownActiveConditionZ,
|
|
125
|
+
FrequencyLimitConditionZ,
|
|
126
|
+
EventCountConditionZ
|
|
127
|
+
]);
|
|
128
|
+
var RuleZ = z.object({
|
|
129
|
+
conditions: z.array(ConditionZ).describe("Array of conditions \u2014 ALL must match (AND logic) for this rule to fire."),
|
|
130
|
+
value: z.unknown().describe("Value returned when all conditions match. For triggerWhen: true = fire the action.")
|
|
131
|
+
}).describe("A single rule. ALL conditions must match (AND logic). Rules in a strategy are evaluated top-to-bottom \u2014 first rule where all conditions match wins and returns its value.");
|
|
132
|
+
var RuleStrategyZ = z.object({
|
|
133
|
+
type: z.literal("rules"),
|
|
134
|
+
rules: z.array(RuleZ).describe("Ordered list of rules. Evaluated top-to-bottom \u2014 first match wins."),
|
|
135
|
+
default: z.unknown().describe("Fallback value when no rule matches. For triggerWhen: false = do not fire by default.")
|
|
136
|
+
}).describe("Rule-based strategy. Evaluates rules top-to-bottom. First rule where ALL conditions match returns its value. If no rule matches, returns default. For triggerWhen: set value=true on matching rules, default=false.");
|
|
137
|
+
var ScoreStrategyZ = z.object({
|
|
138
|
+
type: z.literal("score"),
|
|
139
|
+
field: z.string(),
|
|
140
|
+
threshold: z.number(),
|
|
141
|
+
above: z.unknown(),
|
|
142
|
+
below: z.unknown()
|
|
143
|
+
}).describe("Score-based strategy. Compares a field value against a threshold.");
|
|
144
|
+
var ModelStrategyZ = z.object({
|
|
145
|
+
type: z.literal("model"),
|
|
146
|
+
modelId: z.string(),
|
|
147
|
+
inputs: z.array(z.string()),
|
|
148
|
+
outputMapping: z.record(z.string(), z.unknown()),
|
|
149
|
+
default: z.unknown()
|
|
150
|
+
}).describe("ML model strategy. Sends inputs to a model and maps outputs.");
|
|
151
|
+
var ExternalStrategyZ = z.object({
|
|
152
|
+
type: z.literal("external"),
|
|
153
|
+
endpoint: z.string(),
|
|
154
|
+
method: z.enum(["GET", "POST"]).optional(),
|
|
155
|
+
default: z.unknown(),
|
|
156
|
+
timeoutMs: z.number().optional()
|
|
157
|
+
}).describe("External API strategy. Calls an endpoint to determine the value.");
|
|
158
|
+
var DecisionStrategyZ = z.discriminatedUnion("type", [
|
|
159
|
+
RuleStrategyZ,
|
|
160
|
+
ScoreStrategyZ,
|
|
161
|
+
ModelStrategyZ,
|
|
162
|
+
ExternalStrategyZ
|
|
163
|
+
]);
|
|
164
|
+
var TriggerWhenZ = DecisionStrategyZ.nullable().optional();
|
|
165
|
+
var EventScopeZ = z.object({
|
|
166
|
+
events: z.array(z.string()),
|
|
167
|
+
urlContains: z.string().optional(),
|
|
168
|
+
props: z.record(z.union([z.string(), z.number(), z.boolean()])).optional()
|
|
169
|
+
});
|
|
170
|
+
var NotifyZ = z.object({
|
|
171
|
+
title: z.string().optional(),
|
|
172
|
+
body: z.string().optional(),
|
|
173
|
+
icon: z.string().optional()
|
|
174
|
+
}).nullable().optional();
|
|
175
|
+
|
|
176
|
+
// ../../../node_modules/@lit/context/lib/create-context.js
|
|
177
|
+
function n(n2) {
|
|
178
|
+
return n2;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
// ../../sdk-contracts/dist/canvas-context.js
|
|
182
|
+
var canvasRuntimeContext = n("syntrologie:canvas-runtime");
|
|
183
|
+
|
|
184
|
+
// ../../sdk-contracts/dist/routes.js
|
|
185
|
+
var utf8Decoder = new TextDecoder("utf-8", { fatal: false });
|
|
186
|
+
|
|
187
|
+
export {
|
|
188
|
+
stripMountPlumbing,
|
|
189
|
+
AnchorIdZ,
|
|
190
|
+
AuthoringFieldsZ,
|
|
191
|
+
DecisionStrategyZ,
|
|
192
|
+
TriggerWhenZ,
|
|
193
|
+
NotifyZ
|
|
194
|
+
};
|
|
195
|
+
/*! Bundled license information:
|
|
196
|
+
|
|
197
|
+
@lit/context/lib/context-request-event.js:
|
|
198
|
+
@lit/context/lib/create-context.js:
|
|
199
|
+
@lit/context/lib/controllers/context-consumer.js:
|
|
200
|
+
@lit/context/lib/value-notifier.js:
|
|
201
|
+
@lit/context/lib/controllers/context-provider.js:
|
|
202
|
+
@lit/context/lib/context-root.js:
|
|
203
|
+
(**
|
|
204
|
+
* @license
|
|
205
|
+
* Copyright 2021 Google LLC
|
|
206
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
207
|
+
*)
|
|
208
|
+
|
|
209
|
+
@lit/context/lib/decorators/provide.js:
|
|
210
|
+
(**
|
|
211
|
+
* @license
|
|
212
|
+
* Copyright 2017 Google LLC
|
|
213
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
214
|
+
*)
|
|
215
|
+
|
|
216
|
+
@lit/context/lib/decorators/consume.js:
|
|
217
|
+
(**
|
|
218
|
+
* @license
|
|
219
|
+
* Copyright 2022 Google LLC
|
|
220
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
221
|
+
*)
|
|
222
|
+
*/
|
|
223
|
+
//# sourceMappingURL=chunk-IGCYULL7.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../sdk-contracts/dist/mount-plumbing.js", "../../../sdk-contracts/dist/schemas.js", "../../../../node_modules/@lit/context/src/lib/create-context.ts", "../../../sdk-contracts/dist/canvas-context.js", "../../../sdk-contracts/dist/routes.js"],
|
|
4
|
+
"sourcesContent": ["/**\n * Mount contract types and helper for adaptive widget mountables.\n *\n * The `WidgetRegistry` in `@syntrologie/runtime-sdk` delivers props to each\n * mountable as `{ ...tile.props, instanceId, runtime, tileId? }` spread flat\n * (see `MountableContract.test.ts` in runtime-sdk for the end-to-end lockdown).\n *\n * Adaptives that strip plumbing manually maintain private blacklists that\n * silently drift when the contract grows (PR #2234 and #2238 documented this).\n * `stripMountPlumbing` centralizes the list so adding a new plumbing key in\n * the future is a one-line change here that every adaptive picks up automatically.\n *\n * Adaptives whose widget schemas use Zod `.strict()` MUST call this before\n * validating, or strict-mode will reject the runtime-injected keys and the\n * widget will silently render its empty/error state.\n */\nexport const MOUNT_PLUMBING_KEYS = ['instanceId', 'runtime', 'tileId'];\nexport function stripMountPlumbing(config) {\n if (!config || typeof config !== 'object') {\n return {};\n }\n const out = { ...config };\n for (const key of MOUNT_PLUMBING_KEYS) {\n delete out[key];\n }\n return out;\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// AUTHORING FIELDS \u2014 id / title / description / validation\n//\n// Shared fields every action carries. `id` is the action identifier the\n// runtime uses to dispatch, dedupe, and drop/replace actions \u2014 it is NOT\n// stripped before serving. `title` / `description` / `validation` are\n// authoring-only metadata stripped server-side in `to_runtime_config`\n// (platform/backend/app/domains/experiments/helpers.py).\n//\n// They all appear in the JSON Schema (and therefore in the tactician's\n// prompt) because the LLM needs to know they are valid action properties \u2014\n// otherwise schema validation would reject what the prompt commands.\n//\n// Each action variant should `.extend(AuthoringFieldsZ)` alongside any\n// triggerWhen/condition extensions.\n// =============================================================================\nexport const AuthoringFieldsZ = {\n id: z.string().optional().describe('Stable action identifier (e.g. \"act_3db6a14d2ab0\").'),\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.\n *\n * Every value here must be an event the runtime actually emits \u2014 either a\n * PostHog-autocapture normalization (ui.click/scroll/input/change/submit) or\n * an event-processor detector (ui.hover/idle/scroll_thrash/focus_bounce/\n * hesitate/rage_click). Do not add aspirational names; a trigger counting an\n * event nothing emits never fires.\n */\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 'ui.hesitate',\n 'ui.rage_click',\n // Navigation\n 'nav.page_view',\n 'nav.page_leave',\n];\nexport const CountableEventZ = z\n .enum(COUNTABLE_EVENTS)\n .describe('Event name to count. ui.* = user interactions and behavioral detectors (hesitate, rage_click, scroll_thrash, focus_bounce, idle, hover); nav.* = page navigation.');\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 * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/**\n * The Context type defines a type brand to associate a key value with the context value type\n */\nexport type Context<KeyType, ValueType> = KeyType & {__context__: ValueType};\n\n/**\n * @deprecated use Context instead\n */\nexport type ContextKey<KeyType, ValueType> = Context<KeyType, ValueType>;\n\n/**\n * A helper type which can extract a Context value type from a Context type\n */\nexport type ContextType<Key extends Context<unknown, unknown>> =\n Key extends Context<unknown, infer ValueType> ? ValueType : never;\n\n/**\n * Creates a typed Context.\n *\n * Contexts are compared with strict equality.\n *\n * If you want two separate `createContext()` calls to referer to the same\n * context, then use a key that will by equal under strict equality like a\n * string for `Symbol.for()`:\n *\n * ```ts\n * // true\n * createContext('my-context') === createContext('my-context')\n * // true\n * createContext(Symbol.for('my-context')) === createContext(Symbol.for('my-context'))\n * ```\n *\n * If you want a context to be unique so that it's guaranteed to not collide\n * with other contexts, use a key that's unique under strict equality, like\n * a `Symbol()` or object.:\n *\n * ```\n * // false\n * createContext({}) === createContext({})\n * // false\n * createContext(Symbol('my-context')) === createContext(Symbol('my-context'))\n * ```\n *\n * @param key a context key value\n * @template ValueType the type of value that can be provided by this context.\n * @returns the context key value cast to `Context<K, ValueType>`\n */\nexport function createContext<ValueType, K = unknown>(key: K) {\n return key as Context<K, ValueType>;\n}\n", "/**\n * Canvas runtime context \u2014 the shared @lit/context symbol both\n * runtime-sdk (the provider) and canvas-sdk / canvas authors (the\n * consumers) use to thread a narrow runtime handle through the canvas\n * element tree.\n *\n * Living here keeps the symbol identity stable across both packages.\n * If canvas-sdk created its own symbol with `createContext(...)`, it\n * would never match the one runtime-sdk publishes, and `<sc-mount>`\n * would silently see `undefined` instead of the widget registry.\n *\n * The shape declared here is a NARROW VIEW of `SmartCanvasRuntime`.\n * Canvas-side code reads only this subset. The runtime-sdk's\n * `SmartCanvasRuntime` type is a structural superset.\n */\nimport { createContext } from '@lit/context';\n/**\n * The @lit/context symbol. Both runtime-sdk's ContextProvider and\n * canvas-sdk's ContextConsumer must import THIS exact symbol \u2014 not a\n * symbol with the same string name \u2014 for context propagation to work.\n */\nexport const canvasRuntimeContext = createContext('syntrologie:canvas-runtime');\n", "/**\n * Canonical route normalization. See `routes.md` for rules and\n * `normalize-route.cases.json` for the parity corpus shared with the\n * Python implementation in syntrologie_common/sdk/routing.py.\n *\n * Two exports \u2014 `normalizeRoute` for literal paths, `normalizeRoutePattern`\n * for activation patterns containing `*`, `**`, `:param`. Today they share\n * an implementation because the rules happen to be wildcard-safe (no\n * lowercase, unreserved-only decode, slash collapse preserves `**`).\n * The seam is preserved as separate exports so the API can diverge\n * without consumer churn if rules change.\n */\n// RFC 3986 reserved characters (gen-delims + sub-delims). When a `%XX`\n// sequence decodes to one of these bytes, we keep the percent-encoded\n// form \u2014 decoding would re-segment the path or change its meaning.\nconst RESERVED_BYTES = new Set([\n 0x21, // !\n 0x23, // #\n 0x24, // $\n 0x26, // &\n 0x27, // '\n 0x28, // (\n 0x29, // )\n 0x2a, // *\n 0x2b, // +\n 0x2c, // ,\n 0x2f, // /\n 0x3a, // :\n 0x3b, // ;\n 0x3d, // =\n 0x3f, // ?\n 0x40, // @\n 0x5b, // [\n 0x5d, // ]\n]);\nconst utf8Decoder = new TextDecoder('utf-8', { fatal: false });\n/** Decode `%XX` sequences for unreserved bytes only. Collapses\n * adjacent `%XX` runs into a UTF-8 decode so `%C3%A9` \u2192 `\u00E9`. */\nfunction decodeUnreservedOnly(input) {\n let out = '';\n let pending = [];\n const flushPending = () => {\n if (pending.length === 0)\n return;\n const bytes = new Uint8Array(pending);\n out += utf8Decoder.decode(bytes);\n pending = [];\n };\n let i = 0;\n while (i < input.length) {\n const ch = input[i];\n if (ch === '%' && i + 2 < input.length && isHex(input[i + 1]) && isHex(input[i + 2])) {\n const byte = parseInt(input.slice(i + 1, i + 3), 16);\n if (RESERVED_BYTES.has(byte)) {\n flushPending();\n // Keep raw, but normalize hex case to uppercase so the\n // canonical form is stable across input casing.\n out += `%${input.slice(i + 1, i + 3).toUpperCase()}`;\n i += 3;\n }\n else {\n pending.push(byte);\n i += 3;\n }\n }\n else {\n flushPending();\n out += ch;\n i += 1;\n }\n }\n flushPending();\n return out;\n}\nfunction isHex(c) {\n return (c >= '0' && c <= '9') || (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F');\n}\n/** Strip query string and hash fragment. */\nfunction stripQueryAndHash(s) {\n const q = s.indexOf('?');\n if (q !== -1)\n s = s.slice(0, q);\n const h = s.indexOf('#');\n if (h !== -1)\n s = s.slice(0, h);\n return s;\n}\n/**\n * Normalize a literal path (e.g. `window.location.pathname`, an\n * action's `route` field, a wiki route key).\n *\n * Throws `TypeError` if the input is not an absolute path. Callers\n * that want a soft API should use {@link normalizeRouteWithChange}.\n */\nexport function normalizeRoute(path) {\n if (typeof path !== 'string' || path.length === 0) {\n throw new TypeError('normalizeRoute: input must be a non-empty string');\n }\n if (!path.startsWith('/')) {\n throw new TypeError(`normalizeRoute: input must be absolute (start with '/'); got ${JSON.stringify(path)}`);\n }\n let s = stripQueryAndHash(path);\n s = decodeUnreservedOnly(s);\n s = s.replace(/\\/+/g, '/');\n if (s.length > 1 && s.endsWith('/'))\n s = s.slice(0, -1);\n return s;\n}\n/**\n * Normalize an activation route pattern. Preserves `*`, `**`,\n * `:param` exactly. Today equivalent to {@link normalizeRoute} \u2014 kept\n * as a separate export so rules can diverge later without API churn.\n */\nexport function normalizeRoutePattern(pattern) {\n return normalizeRoute(pattern);\n}\n/**\n * Normalize a route and report whether the input was already\n * canonical. Used by authoring tools to decide whether to emit a\n * warning to the LLM.\n */\nexport function normalizeRouteWithChange(path) {\n const canonical = normalizeRoute(path);\n return { canonical, changed: canonical !== path };\n}\n/** Pattern-side counterpart of {@link normalizeRouteWithChange}. */\nexport function normalizeRoutePatternWithChange(pattern) {\n const canonical = normalizeRoutePattern(pattern);\n return { canonical, changed: canonical !== pattern };\n}\n/**\n * Case-insensitive comparison of two already-canonical paths. Use\n * this anywhere two routes are compared for equality (wiki lookups,\n * non-pattern action route gates) \u2014 preserves casing in the inputs\n * while honoring case-insensitive routing on the customer's site.\n */\nexport function routesMatch(a, b) {\n return a.toLowerCase() === b.toLowerCase();\n}\n"],
|
|
5
|
+
"mappings": ";AAgBO,IAAM,sBAAsB,CAAC,cAAc,WAAW,QAAQ;AAC9D,SAAS,mBAAmB,QAAQ;AACvC,M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