@syntrologie/adapt-chatbot 2.26.0 → 2.28.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.
Files changed (99) hide show
  1. package/dist/AdaptiveChatBar.d.ts +76 -0
  2. package/dist/AdaptiveChatBar.d.ts.map +1 -0
  3. package/dist/AdaptiveChatBar.js +10 -0
  4. package/dist/AdaptiveChatBar.js.map +7 -0
  5. package/dist/AdaptiveChatBarMountable.d.ts +35 -0
  6. package/dist/AdaptiveChatBarMountable.d.ts.map +1 -0
  7. package/dist/AdaptiveChatTrail.d.ts +77 -0
  8. package/dist/AdaptiveChatTrail.d.ts.map +1 -0
  9. package/dist/AdaptiveChatTrail.js +9 -0
  10. package/dist/AdaptiveChatTrail.js.map +7 -0
  11. package/dist/AdaptiveChipsStrip.d.ts +1150 -0
  12. package/dist/AdaptiveChipsStrip.d.ts.map +1 -0
  13. package/dist/AdaptiveChipsStrip.js +11 -0
  14. package/dist/AdaptiveChipsStrip.js.map +7 -0
  15. package/dist/AdaptiveChipsStripMountable.d.ts +24 -0
  16. package/dist/AdaptiveChipsStripMountable.d.ts.map +1 -0
  17. package/dist/ChatAssistantLit.d.ts +23 -21
  18. package/dist/ChatAssistantLit.d.ts.map +1 -1
  19. package/dist/ChatAssistantLit.js +5 -3
  20. package/dist/ChatSession.d.ts +178 -0
  21. package/dist/ChatSession.d.ts.map +1 -0
  22. package/dist/ChatTransport.d.ts +283 -0
  23. package/dist/ChatTransport.d.ts.map +1 -0
  24. package/dist/NavLinkMountable.d.ts +25 -0
  25. package/dist/NavLinkMountable.d.ts.map +1 -0
  26. package/dist/NavLinkMountable.test.d.ts +2 -0
  27. package/dist/NavLinkMountable.test.d.ts.map +1 -0
  28. package/dist/TextAnswerMountable.d.ts +17 -0
  29. package/dist/TextAnswerMountable.d.ts.map +1 -0
  30. package/dist/Turnstile.d.ts +83 -0
  31. package/dist/Turnstile.d.ts.map +1 -0
  32. package/dist/chunk-435KJD27.js +192 -0
  33. package/dist/chunk-435KJD27.js.map +7 -0
  34. package/dist/chunk-AUER7ZCK.js +634 -0
  35. package/dist/chunk-AUER7ZCK.js.map +7 -0
  36. package/dist/chunk-DOMEUJR7.js +382 -0
  37. package/dist/chunk-DOMEUJR7.js.map +7 -0
  38. package/dist/{chunk-O7RWNUVU.js → chunk-KUO67E2W.js} +1573 -4079
  39. package/dist/chunk-KUO67E2W.js.map +7 -0
  40. package/dist/chunk-QELVKBQV.js +214 -0
  41. package/dist/chunk-QELVKBQV.js.map +7 -0
  42. package/dist/chunk-UC4XU6GH.js +3306 -0
  43. package/dist/chunk-UC4XU6GH.js.map +7 -0
  44. package/dist/elements/ActionHandler.d.ts +34 -0
  45. package/dist/elements/ActionHandler.d.ts.map +1 -0
  46. package/dist/elements/ElementInstanceStore.d.ts +155 -0
  47. package/dist/elements/ElementInstanceStore.d.ts.map +1 -0
  48. package/dist/elements/ElementInstanceStore.test.d.ts +2 -0
  49. package/dist/elements/ElementInstanceStore.test.d.ts.map +1 -0
  50. package/dist/elements/ElementTypeHandler.d.ts +77 -0
  51. package/dist/elements/ElementTypeHandler.d.ts.map +1 -0
  52. package/dist/elements/ItemHandler.d.ts +60 -0
  53. package/dist/elements/ItemHandler.d.ts.map +1 -0
  54. package/dist/elements/ItemHandler.test.d.ts +2 -0
  55. package/dist/elements/ItemHandler.test.d.ts.map +1 -0
  56. package/dist/elements/TileHandler.d.ts +52 -0
  57. package/dist/elements/TileHandler.d.ts.map +1 -0
  58. package/dist/elements/blockRenderer.d.ts +46 -0
  59. package/dist/elements/blockRenderer.d.ts.map +1 -0
  60. package/dist/elements/blockRenderer.test.d.ts +13 -0
  61. package/dist/elements/blockRenderer.test.d.ts.map +1 -0
  62. package/dist/elements/blocks.d.ts +58 -0
  63. package/dist/elements/blocks.d.ts.map +1 -0
  64. package/dist/elements/envelope.d.ts +24 -0
  65. package/dist/elements/envelope.d.ts.map +1 -0
  66. package/dist/elements/fetcher.d.ts +40 -0
  67. package/dist/elements/fetcher.d.ts.map +1 -0
  68. package/dist/elements/index.d.ts +32 -0
  69. package/dist/elements/index.d.ts.map +1 -0
  70. package/dist/elements/types.d.ts +106 -0
  71. package/dist/elements/types.d.ts.map +1 -0
  72. package/dist/observer/__tests__/allowlist.test.d.ts +9 -0
  73. package/dist/observer/__tests__/allowlist.test.d.ts.map +1 -0
  74. package/dist/observer/__tests__/observer-isolation.test.d.ts +13 -0
  75. package/dist/observer/__tests__/observer-isolation.test.d.ts.map +1 -0
  76. package/dist/observer/__tests__/queue.test.d.ts +2 -0
  77. package/dist/observer/__tests__/queue.test.d.ts.map +1 -0
  78. package/dist/observer/__tests__/transport.test.d.ts +2 -0
  79. package/dist/observer/__tests__/transport.test.d.ts.map +1 -0
  80. package/dist/observer/allowlist.d.ts +32 -0
  81. package/dist/observer/allowlist.d.ts.map +1 -0
  82. package/dist/observer/index.d.ts +35 -0
  83. package/dist/observer/index.d.ts.map +1 -0
  84. package/dist/observer/queue.d.ts +57 -0
  85. package/dist/observer/queue.d.ts.map +1 -0
  86. package/dist/observer/transport.d.ts +26 -0
  87. package/dist/observer/transport.d.ts.map +1 -0
  88. package/dist/runtime.d.ts +7 -0
  89. package/dist/runtime.d.ts.map +1 -1
  90. package/dist/runtime.js +1617 -2
  91. package/dist/runtime.js.map +4 -4
  92. package/dist/schema.d.ts +3120 -7
  93. package/dist/schema.d.ts.map +1 -1
  94. package/dist/schema.js +40 -0
  95. package/dist/schema.js.map +2 -2
  96. package/dist/types.d.ts +30 -2
  97. package/dist/types.d.ts.map +1 -1
  98. package/package.json +13 -1
  99. package/dist/chunk-O7RWNUVU.js.map +0 -7
@@ -0,0 +1,1150 @@
1
+ /**
2
+ * AdaptiveChipsStrip — the suggested-chips tile kind.
3
+ *
4
+ * A horizontally scrollable strip of chips. Each chip carries a title
5
+ * and a typed payload. Clicking a chip mounts its payload widget in a
6
+ * chromed drawer directly below the strip; clicking again (or the
7
+ * payload's close button) collapses it. Only one chip is open at a
8
+ * time per strip.
9
+ *
10
+ * Payload rendering goes through the runtime widget registry — the
11
+ * payload is a `{ widget, props? }` reference (same shape as
12
+ * `slots.drawer.lid`). Click → strip looks the widget id up in
13
+ * `runtime.widgets`, mounts it into the drawer body, unmounts on
14
+ * close. No resolver map, no per-customer JS — the same registry
15
+ * that mounts tile widgets handles chip payloads.
16
+ *
17
+ * Built-in payload widgets (registered by this adaptive):
18
+ * - `adaptive-chatbot:text-answer` — single paragraph of text
19
+ *
20
+ * Customers ship their own widgets through the standard adaptive
21
+ * registration path (each adaptive's `runtime.widgets` list). LLM-
22
+ * authored configs reference them by id; the widget owns its props
23
+ * schema. No new vocabulary per chip — same as every other widget
24
+ * in the SDK.
25
+ *
26
+ * Light DOM. The strip itself is chromeless per the PRD; the payload
27
+ * drawer below is *always* chromed (PRD §6.7) — the chromed boundary
28
+ * is what visually links the open chip to its content.
29
+ *
30
+ * See PRD §4.5 (the suggested-chips pattern) for the canonical UX.
31
+ */
32
+ import { LitElement, type TemplateResult } from 'lit';
33
+ import { z } from 'zod';
34
+ /**
35
+ * Structural type for just the runtime surfaces this strip uses.
36
+ * Avoids a hard dependency on @syntrologie/runtime-sdk while staying
37
+ * compatible with the real `SmartCanvasRuntime` shape.
38
+ *
39
+ * `events.subscribe` is optional — present when running inside the full
40
+ * canvas runtime where the chips strip wants to receive LLM-authored
41
+ * chips via `element.compositional_append`. Absent in standalone test
42
+ * harnesses; the strip falls back to hand-authored chips only.
43
+ */
44
+ interface ChipsStripRuntime {
45
+ widgets: {
46
+ has: (id: string) => boolean;
47
+ mount: (id: string, container: HTMLElement, props?: Record<string, unknown>) => {
48
+ unmount: () => void;
49
+ update?: (props?: Record<string, unknown>) => void;
50
+ };
51
+ };
52
+ events?: {
53
+ /** Used to ping the store with a replay request when the chip strip
54
+ * (re)mounts — see `_subscribeCompositional`. */
55
+ publish?: (name: string, props?: Record<string, unknown>) => void;
56
+ subscribe?: (handler: (event: {
57
+ name: string;
58
+ props?: Record<string, unknown>;
59
+ }) => void) => () => void;
60
+ };
61
+ }
62
+ declare const ChipPayloadZ: z.ZodObject<{
63
+ widget: z.ZodString;
64
+ props: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
65
+ }, "strict", z.ZodTypeAny, {
66
+ widget: string;
67
+ props?: Record<string, unknown> | undefined;
68
+ }, {
69
+ widget: string;
70
+ props?: Record<string, unknown> | undefined;
71
+ }>;
72
+ /**
73
+ * Schema for a single suggestion chip (compositional action).
74
+ *
75
+ * Mirrors the `faq:question` pattern: discriminated by `kind`, body in
76
+ * `config`, optional `triggerWhen` for per-chip conditional visibility,
77
+ * optional `notify` for a toast when the chip first becomes relevant,
78
+ * plus the standard `AuthoringFieldsZ` (id/title/description/validation —
79
+ * stripped server-side before serving to the runtime).
80
+ */
81
+ export declare const SuggestionChipSchema: z.ZodEffects<z.ZodObject<{
82
+ kind: z.ZodLiteral<"suggestions:chip">;
83
+ config: z.ZodObject<{
84
+ id: z.ZodString;
85
+ title: z.ZodString;
86
+ payload: z.ZodObject<{
87
+ widget: z.ZodString;
88
+ props: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
89
+ }, "strict", z.ZodTypeAny, {
90
+ widget: string;
91
+ props?: Record<string, unknown> | undefined;
92
+ }, {
93
+ widget: string;
94
+ props?: Record<string, unknown> | undefined;
95
+ }>;
96
+ }, "strip", z.ZodTypeAny, {
97
+ title: string;
98
+ id: string;
99
+ payload: {
100
+ widget: string;
101
+ props?: Record<string, unknown> | undefined;
102
+ };
103
+ }, {
104
+ title: string;
105
+ id: string;
106
+ payload: {
107
+ widget: string;
108
+ props?: Record<string, unknown> | undefined;
109
+ };
110
+ }>;
111
+ triggerWhen: z.ZodOptional<z.ZodNullable<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
112
+ type: z.ZodLiteral<"rules">;
113
+ rules: z.ZodArray<z.ZodObject<{
114
+ conditions: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
115
+ type: z.ZodLiteral<"page_url">;
116
+ url: z.ZodString;
117
+ }, "strip", z.ZodTypeAny, {
118
+ type: "page_url";
119
+ url: string;
120
+ }, {
121
+ type: "page_url";
122
+ url: string;
123
+ }>, z.ZodObject<{
124
+ type: z.ZodLiteral<"route">;
125
+ routeId: z.ZodString;
126
+ }, "strip", z.ZodTypeAny, {
127
+ type: "route";
128
+ routeId: string;
129
+ }, {
130
+ type: "route";
131
+ routeId: string;
132
+ }>, z.ZodObject<{
133
+ type: z.ZodLiteral<"anchor_visible">;
134
+ anchorId: z.ZodString;
135
+ state: z.ZodEnum<["visible", "present", "absent"]>;
136
+ }, "strip", z.ZodTypeAny, {
137
+ type: "anchor_visible";
138
+ anchorId: string;
139
+ state: "visible" | "present" | "absent";
140
+ }, {
141
+ type: "anchor_visible";
142
+ anchorId: string;
143
+ state: "visible" | "present" | "absent";
144
+ }>, z.ZodObject<{
145
+ type: z.ZodLiteral<"event_occurred">;
146
+ eventName: z.ZodString;
147
+ withinMs: z.ZodOptional<z.ZodNumber>;
148
+ }, "strip", z.ZodTypeAny, {
149
+ type: "event_occurred";
150
+ eventName: string;
151
+ withinMs?: number | undefined;
152
+ }, {
153
+ type: "event_occurred";
154
+ eventName: string;
155
+ withinMs?: number | undefined;
156
+ }>, z.ZodObject<{
157
+ type: z.ZodLiteral<"state_equals">;
158
+ key: z.ZodString;
159
+ value: z.ZodUnknown;
160
+ }, "strip", z.ZodTypeAny, {
161
+ type: "state_equals";
162
+ key: string;
163
+ value?: unknown;
164
+ }, {
165
+ type: "state_equals";
166
+ key: string;
167
+ value?: unknown;
168
+ }>, z.ZodObject<{
169
+ type: z.ZodLiteral<"viewport">;
170
+ minWidth: z.ZodOptional<z.ZodNumber>;
171
+ maxWidth: z.ZodOptional<z.ZodNumber>;
172
+ minHeight: z.ZodOptional<z.ZodNumber>;
173
+ maxHeight: z.ZodOptional<z.ZodNumber>;
174
+ }, "strip", z.ZodTypeAny, {
175
+ type: "viewport";
176
+ minWidth?: number | undefined;
177
+ maxWidth?: number | undefined;
178
+ minHeight?: number | undefined;
179
+ maxHeight?: number | undefined;
180
+ }, {
181
+ type: "viewport";
182
+ minWidth?: number | undefined;
183
+ maxWidth?: number | undefined;
184
+ minHeight?: number | undefined;
185
+ maxHeight?: number | undefined;
186
+ }>, z.ZodObject<{
187
+ type: z.ZodLiteral<"session_metric">;
188
+ key: z.ZodEnum<["time_on_page", "page_views", "scroll_depth"]>;
189
+ operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
190
+ threshold: z.ZodNumber;
191
+ }, "strip", z.ZodTypeAny, {
192
+ type: "session_metric";
193
+ key: "time_on_page" | "page_views" | "scroll_depth";
194
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
195
+ threshold: number;
196
+ }, {
197
+ type: "session_metric";
198
+ key: "time_on_page" | "page_views" | "scroll_depth";
199
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
200
+ threshold: number;
201
+ }>, z.ZodObject<{
202
+ type: z.ZodLiteral<"dismissed">;
203
+ key: z.ZodString;
204
+ inverted: z.ZodOptional<z.ZodBoolean>;
205
+ }, "strip", z.ZodTypeAny, {
206
+ type: "dismissed";
207
+ key: string;
208
+ inverted?: boolean | undefined;
209
+ }, {
210
+ type: "dismissed";
211
+ key: string;
212
+ inverted?: boolean | undefined;
213
+ }>, z.ZodObject<{
214
+ type: z.ZodLiteral<"cooldown_active">;
215
+ key: z.ZodString;
216
+ inverted: z.ZodOptional<z.ZodBoolean>;
217
+ }, "strip", z.ZodTypeAny, {
218
+ type: "cooldown_active";
219
+ key: string;
220
+ inverted?: boolean | undefined;
221
+ }, {
222
+ type: "cooldown_active";
223
+ key: string;
224
+ inverted?: boolean | undefined;
225
+ }>, z.ZodObject<{
226
+ type: z.ZodLiteral<"frequency_limit">;
227
+ key: z.ZodString;
228
+ limit: z.ZodNumber;
229
+ inverted: z.ZodOptional<z.ZodBoolean>;
230
+ }, "strip", z.ZodTypeAny, {
231
+ type: "frequency_limit";
232
+ key: string;
233
+ limit: number;
234
+ inverted?: boolean | undefined;
235
+ }, {
236
+ type: "frequency_limit";
237
+ key: string;
238
+ limit: number;
239
+ inverted?: boolean | undefined;
240
+ }>, z.ZodObject<{
241
+ type: z.ZodLiteral<"event_count">;
242
+ key: z.ZodString;
243
+ operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
244
+ count: z.ZodNumber;
245
+ withinMs: z.ZodOptional<z.ZodNumber>;
246
+ counter: z.ZodOptional<z.ZodObject<{
247
+ events: z.ZodArray<z.ZodEnum<["ui.click", "ui.scroll", "ui.input", "ui.change", "ui.submit", "ui.hover", "ui.idle", "ui.scroll_thrash", "ui.focus_bounce", "ui.hesitate", "ui.rage_click", "nav.page_view", "nav.page_leave"]>, "many">;
248
+ match: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
249
+ equals: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
250
+ contains: z.ZodOptional<z.ZodString>;
251
+ }, "strip", z.ZodTypeAny, {
252
+ equals?: string | number | boolean | undefined;
253
+ contains?: string | undefined;
254
+ }, {
255
+ equals?: string | number | boolean | undefined;
256
+ contains?: string | undefined;
257
+ }>>>;
258
+ }, "strip", z.ZodTypeAny, {
259
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
260
+ match?: Record<string, {
261
+ equals?: string | number | boolean | undefined;
262
+ contains?: string | undefined;
263
+ }> | undefined;
264
+ }, {
265
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
266
+ match?: Record<string, {
267
+ equals?: string | number | boolean | undefined;
268
+ contains?: string | undefined;
269
+ }> | undefined;
270
+ }>>;
271
+ }, "strip", z.ZodTypeAny, {
272
+ type: "event_count";
273
+ key: string;
274
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
275
+ count: number;
276
+ withinMs?: number | undefined;
277
+ counter?: {
278
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
279
+ match?: Record<string, {
280
+ equals?: string | number | boolean | undefined;
281
+ contains?: string | undefined;
282
+ }> | undefined;
283
+ } | undefined;
284
+ }, {
285
+ type: "event_count";
286
+ key: string;
287
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
288
+ count: number;
289
+ withinMs?: number | undefined;
290
+ counter?: {
291
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
292
+ match?: Record<string, {
293
+ equals?: string | number | boolean | undefined;
294
+ contains?: string | undefined;
295
+ }> | undefined;
296
+ } | undefined;
297
+ }>]>, "many">;
298
+ value: z.ZodUnknown;
299
+ }, "strip", z.ZodTypeAny, {
300
+ conditions: ({
301
+ type: "page_url";
302
+ url: string;
303
+ } | {
304
+ type: "route";
305
+ routeId: string;
306
+ } | {
307
+ type: "anchor_visible";
308
+ anchorId: string;
309
+ state: "visible" | "present" | "absent";
310
+ } | {
311
+ type: "event_occurred";
312
+ eventName: string;
313
+ withinMs?: number | undefined;
314
+ } | {
315
+ type: "state_equals";
316
+ key: string;
317
+ value?: unknown;
318
+ } | {
319
+ type: "viewport";
320
+ minWidth?: number | undefined;
321
+ maxWidth?: number | undefined;
322
+ minHeight?: number | undefined;
323
+ maxHeight?: number | undefined;
324
+ } | {
325
+ type: "session_metric";
326
+ key: "time_on_page" | "page_views" | "scroll_depth";
327
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
328
+ threshold: number;
329
+ } | {
330
+ type: "dismissed";
331
+ key: string;
332
+ inverted?: boolean | undefined;
333
+ } | {
334
+ type: "cooldown_active";
335
+ key: string;
336
+ inverted?: boolean | undefined;
337
+ } | {
338
+ type: "frequency_limit";
339
+ key: string;
340
+ limit: number;
341
+ inverted?: boolean | undefined;
342
+ } | {
343
+ type: "event_count";
344
+ key: string;
345
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
346
+ count: number;
347
+ withinMs?: number | undefined;
348
+ counter?: {
349
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
350
+ match?: Record<string, {
351
+ equals?: string | number | boolean | undefined;
352
+ contains?: string | undefined;
353
+ }> | undefined;
354
+ } | undefined;
355
+ })[];
356
+ value?: unknown;
357
+ }, {
358
+ conditions: ({
359
+ type: "page_url";
360
+ url: string;
361
+ } | {
362
+ type: "route";
363
+ routeId: string;
364
+ } | {
365
+ type: "anchor_visible";
366
+ anchorId: string;
367
+ state: "visible" | "present" | "absent";
368
+ } | {
369
+ type: "event_occurred";
370
+ eventName: string;
371
+ withinMs?: number | undefined;
372
+ } | {
373
+ type: "state_equals";
374
+ key: string;
375
+ value?: unknown;
376
+ } | {
377
+ type: "viewport";
378
+ minWidth?: number | undefined;
379
+ maxWidth?: number | undefined;
380
+ minHeight?: number | undefined;
381
+ maxHeight?: number | undefined;
382
+ } | {
383
+ type: "session_metric";
384
+ key: "time_on_page" | "page_views" | "scroll_depth";
385
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
386
+ threshold: number;
387
+ } | {
388
+ type: "dismissed";
389
+ key: string;
390
+ inverted?: boolean | undefined;
391
+ } | {
392
+ type: "cooldown_active";
393
+ key: string;
394
+ inverted?: boolean | undefined;
395
+ } | {
396
+ type: "frequency_limit";
397
+ key: string;
398
+ limit: number;
399
+ inverted?: boolean | undefined;
400
+ } | {
401
+ type: "event_count";
402
+ key: string;
403
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
404
+ count: number;
405
+ withinMs?: number | undefined;
406
+ counter?: {
407
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
408
+ match?: Record<string, {
409
+ equals?: string | number | boolean | undefined;
410
+ contains?: string | undefined;
411
+ }> | undefined;
412
+ } | undefined;
413
+ })[];
414
+ value?: unknown;
415
+ }>, "many">;
416
+ default: z.ZodUnknown;
417
+ }, "strip", z.ZodTypeAny, {
418
+ type: "rules";
419
+ rules: {
420
+ conditions: ({
421
+ type: "page_url";
422
+ url: string;
423
+ } | {
424
+ type: "route";
425
+ routeId: string;
426
+ } | {
427
+ type: "anchor_visible";
428
+ anchorId: string;
429
+ state: "visible" | "present" | "absent";
430
+ } | {
431
+ type: "event_occurred";
432
+ eventName: string;
433
+ withinMs?: number | undefined;
434
+ } | {
435
+ type: "state_equals";
436
+ key: string;
437
+ value?: unknown;
438
+ } | {
439
+ type: "viewport";
440
+ minWidth?: number | undefined;
441
+ maxWidth?: number | undefined;
442
+ minHeight?: number | undefined;
443
+ maxHeight?: number | undefined;
444
+ } | {
445
+ type: "session_metric";
446
+ key: "time_on_page" | "page_views" | "scroll_depth";
447
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
448
+ threshold: number;
449
+ } | {
450
+ type: "dismissed";
451
+ key: string;
452
+ inverted?: boolean | undefined;
453
+ } | {
454
+ type: "cooldown_active";
455
+ key: string;
456
+ inverted?: boolean | undefined;
457
+ } | {
458
+ type: "frequency_limit";
459
+ key: string;
460
+ limit: number;
461
+ inverted?: boolean | undefined;
462
+ } | {
463
+ type: "event_count";
464
+ key: string;
465
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
466
+ count: number;
467
+ withinMs?: number | undefined;
468
+ counter?: {
469
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
470
+ match?: Record<string, {
471
+ equals?: string | number | boolean | undefined;
472
+ contains?: string | undefined;
473
+ }> | undefined;
474
+ } | undefined;
475
+ })[];
476
+ value?: unknown;
477
+ }[];
478
+ default?: unknown;
479
+ }, {
480
+ type: "rules";
481
+ rules: {
482
+ conditions: ({
483
+ type: "page_url";
484
+ url: string;
485
+ } | {
486
+ type: "route";
487
+ routeId: string;
488
+ } | {
489
+ type: "anchor_visible";
490
+ anchorId: string;
491
+ state: "visible" | "present" | "absent";
492
+ } | {
493
+ type: "event_occurred";
494
+ eventName: string;
495
+ withinMs?: number | undefined;
496
+ } | {
497
+ type: "state_equals";
498
+ key: string;
499
+ value?: unknown;
500
+ } | {
501
+ type: "viewport";
502
+ minWidth?: number | undefined;
503
+ maxWidth?: number | undefined;
504
+ minHeight?: number | undefined;
505
+ maxHeight?: number | undefined;
506
+ } | {
507
+ type: "session_metric";
508
+ key: "time_on_page" | "page_views" | "scroll_depth";
509
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
510
+ threshold: number;
511
+ } | {
512
+ type: "dismissed";
513
+ key: string;
514
+ inverted?: boolean | undefined;
515
+ } | {
516
+ type: "cooldown_active";
517
+ key: string;
518
+ inverted?: boolean | undefined;
519
+ } | {
520
+ type: "frequency_limit";
521
+ key: string;
522
+ limit: number;
523
+ inverted?: boolean | undefined;
524
+ } | {
525
+ type: "event_count";
526
+ key: string;
527
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
528
+ count: number;
529
+ withinMs?: number | undefined;
530
+ counter?: {
531
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
532
+ match?: Record<string, {
533
+ equals?: string | number | boolean | undefined;
534
+ contains?: string | undefined;
535
+ }> | undefined;
536
+ } | undefined;
537
+ })[];
538
+ value?: unknown;
539
+ }[];
540
+ default?: unknown;
541
+ }>, z.ZodObject<{
542
+ type: z.ZodLiteral<"score">;
543
+ field: z.ZodString;
544
+ threshold: z.ZodNumber;
545
+ above: z.ZodUnknown;
546
+ below: z.ZodUnknown;
547
+ }, "strip", z.ZodTypeAny, {
548
+ type: "score";
549
+ threshold: number;
550
+ field: string;
551
+ above?: unknown;
552
+ below?: unknown;
553
+ }, {
554
+ type: "score";
555
+ threshold: number;
556
+ field: string;
557
+ above?: unknown;
558
+ below?: unknown;
559
+ }>, z.ZodObject<{
560
+ type: z.ZodLiteral<"model">;
561
+ modelId: z.ZodString;
562
+ inputs: z.ZodArray<z.ZodString, "many">;
563
+ outputMapping: z.ZodRecord<z.ZodString, z.ZodUnknown>;
564
+ default: z.ZodUnknown;
565
+ }, "strip", z.ZodTypeAny, {
566
+ type: "model";
567
+ modelId: string;
568
+ inputs: string[];
569
+ outputMapping: Record<string, unknown>;
570
+ default?: unknown;
571
+ }, {
572
+ type: "model";
573
+ modelId: string;
574
+ inputs: string[];
575
+ outputMapping: Record<string, unknown>;
576
+ default?: unknown;
577
+ }>, z.ZodObject<{
578
+ type: z.ZodLiteral<"external">;
579
+ endpoint: z.ZodString;
580
+ method: z.ZodOptional<z.ZodEnum<["GET", "POST"]>>;
581
+ default: z.ZodUnknown;
582
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
583
+ }, "strip", z.ZodTypeAny, {
584
+ type: "external";
585
+ endpoint: string;
586
+ default?: unknown;
587
+ method?: "GET" | "POST" | undefined;
588
+ timeoutMs?: number | undefined;
589
+ }, {
590
+ type: "external";
591
+ endpoint: string;
592
+ default?: unknown;
593
+ method?: "GET" | "POST" | undefined;
594
+ timeoutMs?: number | undefined;
595
+ }>]>>>;
596
+ notify: z.ZodOptional<z.ZodNullable<z.ZodObject<{
597
+ title: z.ZodOptional<z.ZodString>;
598
+ body: z.ZodOptional<z.ZodString>;
599
+ icon: z.ZodOptional<z.ZodString>;
600
+ }, "strip", z.ZodTypeAny, {
601
+ title?: string | undefined;
602
+ body?: string | undefined;
603
+ icon?: string | undefined;
604
+ }, {
605
+ title?: string | undefined;
606
+ body?: string | undefined;
607
+ icon?: string | undefined;
608
+ }>>>;
609
+ id: z.ZodOptional<z.ZodString>;
610
+ title: z.ZodOptional<z.ZodString>;
611
+ description: z.ZodOptional<z.ZodString>;
612
+ validation: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
613
+ }, "strip", z.ZodTypeAny, {
614
+ config: {
615
+ title: string;
616
+ id: string;
617
+ payload: {
618
+ widget: string;
619
+ props?: Record<string, unknown> | undefined;
620
+ };
621
+ };
622
+ kind: "suggestions:chip";
623
+ title?: string | undefined;
624
+ id?: string | undefined;
625
+ validation?: string[] | undefined;
626
+ triggerWhen?: {
627
+ type: "rules";
628
+ rules: {
629
+ conditions: ({
630
+ type: "page_url";
631
+ url: string;
632
+ } | {
633
+ type: "route";
634
+ routeId: string;
635
+ } | {
636
+ type: "anchor_visible";
637
+ anchorId: string;
638
+ state: "visible" | "present" | "absent";
639
+ } | {
640
+ type: "event_occurred";
641
+ eventName: string;
642
+ withinMs?: number | undefined;
643
+ } | {
644
+ type: "state_equals";
645
+ key: string;
646
+ value?: unknown;
647
+ } | {
648
+ type: "viewport";
649
+ minWidth?: number | undefined;
650
+ maxWidth?: number | undefined;
651
+ minHeight?: number | undefined;
652
+ maxHeight?: number | undefined;
653
+ } | {
654
+ type: "session_metric";
655
+ key: "time_on_page" | "page_views" | "scroll_depth";
656
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
657
+ threshold: number;
658
+ } | {
659
+ type: "dismissed";
660
+ key: string;
661
+ inverted?: boolean | undefined;
662
+ } | {
663
+ type: "cooldown_active";
664
+ key: string;
665
+ inverted?: boolean | undefined;
666
+ } | {
667
+ type: "frequency_limit";
668
+ key: string;
669
+ limit: number;
670
+ inverted?: boolean | undefined;
671
+ } | {
672
+ type: "event_count";
673
+ key: string;
674
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
675
+ count: number;
676
+ withinMs?: number | undefined;
677
+ counter?: {
678
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
679
+ match?: Record<string, {
680
+ equals?: string | number | boolean | undefined;
681
+ contains?: string | undefined;
682
+ }> | undefined;
683
+ } | undefined;
684
+ })[];
685
+ value?: unknown;
686
+ }[];
687
+ default?: unknown;
688
+ } | {
689
+ type: "score";
690
+ threshold: number;
691
+ field: string;
692
+ above?: unknown;
693
+ below?: unknown;
694
+ } | {
695
+ type: "model";
696
+ modelId: string;
697
+ inputs: string[];
698
+ outputMapping: Record<string, unknown>;
699
+ default?: unknown;
700
+ } | {
701
+ type: "external";
702
+ endpoint: string;
703
+ default?: unknown;
704
+ method?: "GET" | "POST" | undefined;
705
+ timeoutMs?: number | undefined;
706
+ } | null | undefined;
707
+ notify?: {
708
+ title?: string | undefined;
709
+ body?: string | undefined;
710
+ icon?: string | undefined;
711
+ } | null | undefined;
712
+ description?: string | undefined;
713
+ }, {
714
+ config: {
715
+ title: string;
716
+ id: string;
717
+ payload: {
718
+ widget: string;
719
+ props?: Record<string, unknown> | undefined;
720
+ };
721
+ };
722
+ kind: "suggestions:chip";
723
+ title?: string | undefined;
724
+ id?: string | undefined;
725
+ validation?: string[] | undefined;
726
+ triggerWhen?: {
727
+ type: "rules";
728
+ rules: {
729
+ conditions: ({
730
+ type: "page_url";
731
+ url: string;
732
+ } | {
733
+ type: "route";
734
+ routeId: string;
735
+ } | {
736
+ type: "anchor_visible";
737
+ anchorId: string;
738
+ state: "visible" | "present" | "absent";
739
+ } | {
740
+ type: "event_occurred";
741
+ eventName: string;
742
+ withinMs?: number | undefined;
743
+ } | {
744
+ type: "state_equals";
745
+ key: string;
746
+ value?: unknown;
747
+ } | {
748
+ type: "viewport";
749
+ minWidth?: number | undefined;
750
+ maxWidth?: number | undefined;
751
+ minHeight?: number | undefined;
752
+ maxHeight?: number | undefined;
753
+ } | {
754
+ type: "session_metric";
755
+ key: "time_on_page" | "page_views" | "scroll_depth";
756
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
757
+ threshold: number;
758
+ } | {
759
+ type: "dismissed";
760
+ key: string;
761
+ inverted?: boolean | undefined;
762
+ } | {
763
+ type: "cooldown_active";
764
+ key: string;
765
+ inverted?: boolean | undefined;
766
+ } | {
767
+ type: "frequency_limit";
768
+ key: string;
769
+ limit: number;
770
+ inverted?: boolean | undefined;
771
+ } | {
772
+ type: "event_count";
773
+ key: string;
774
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
775
+ count: number;
776
+ withinMs?: number | undefined;
777
+ counter?: {
778
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
779
+ match?: Record<string, {
780
+ equals?: string | number | boolean | undefined;
781
+ contains?: string | undefined;
782
+ }> | undefined;
783
+ } | undefined;
784
+ })[];
785
+ value?: unknown;
786
+ }[];
787
+ default?: unknown;
788
+ } | {
789
+ type: "score";
790
+ threshold: number;
791
+ field: string;
792
+ above?: unknown;
793
+ below?: unknown;
794
+ } | {
795
+ type: "model";
796
+ modelId: string;
797
+ inputs: string[];
798
+ outputMapping: Record<string, unknown>;
799
+ default?: unknown;
800
+ } | {
801
+ type: "external";
802
+ endpoint: string;
803
+ default?: unknown;
804
+ method?: "GET" | "POST" | undefined;
805
+ timeoutMs?: number | undefined;
806
+ } | null | undefined;
807
+ notify?: {
808
+ title?: string | undefined;
809
+ body?: string | undefined;
810
+ icon?: string | undefined;
811
+ } | null | undefined;
812
+ description?: string | undefined;
813
+ }>, {
814
+ config: {
815
+ title: string;
816
+ id: string;
817
+ payload: {
818
+ widget: string;
819
+ props?: Record<string, unknown> | undefined;
820
+ };
821
+ };
822
+ kind: "suggestions:chip";
823
+ title?: string | undefined;
824
+ id?: string | undefined;
825
+ validation?: string[] | undefined;
826
+ triggerWhen?: {
827
+ type: "rules";
828
+ rules: {
829
+ conditions: ({
830
+ type: "page_url";
831
+ url: string;
832
+ } | {
833
+ type: "route";
834
+ routeId: string;
835
+ } | {
836
+ type: "anchor_visible";
837
+ anchorId: string;
838
+ state: "visible" | "present" | "absent";
839
+ } | {
840
+ type: "event_occurred";
841
+ eventName: string;
842
+ withinMs?: number | undefined;
843
+ } | {
844
+ type: "state_equals";
845
+ key: string;
846
+ value?: unknown;
847
+ } | {
848
+ type: "viewport";
849
+ minWidth?: number | undefined;
850
+ maxWidth?: number | undefined;
851
+ minHeight?: number | undefined;
852
+ maxHeight?: number | undefined;
853
+ } | {
854
+ type: "session_metric";
855
+ key: "time_on_page" | "page_views" | "scroll_depth";
856
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
857
+ threshold: number;
858
+ } | {
859
+ type: "dismissed";
860
+ key: string;
861
+ inverted?: boolean | undefined;
862
+ } | {
863
+ type: "cooldown_active";
864
+ key: string;
865
+ inverted?: boolean | undefined;
866
+ } | {
867
+ type: "frequency_limit";
868
+ key: string;
869
+ limit: number;
870
+ inverted?: boolean | undefined;
871
+ } | {
872
+ type: "event_count";
873
+ key: string;
874
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
875
+ count: number;
876
+ withinMs?: number | undefined;
877
+ counter?: {
878
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
879
+ match?: Record<string, {
880
+ equals?: string | number | boolean | undefined;
881
+ contains?: string | undefined;
882
+ }> | undefined;
883
+ } | undefined;
884
+ })[];
885
+ value?: unknown;
886
+ }[];
887
+ default?: unknown;
888
+ } | {
889
+ type: "score";
890
+ threshold: number;
891
+ field: string;
892
+ above?: unknown;
893
+ below?: unknown;
894
+ } | {
895
+ type: "model";
896
+ modelId: string;
897
+ inputs: string[];
898
+ outputMapping: Record<string, unknown>;
899
+ default?: unknown;
900
+ } | {
901
+ type: "external";
902
+ endpoint: string;
903
+ default?: unknown;
904
+ method?: "GET" | "POST" | undefined;
905
+ timeoutMs?: number | undefined;
906
+ } | null | undefined;
907
+ notify?: {
908
+ title?: string | undefined;
909
+ body?: string | undefined;
910
+ icon?: string | undefined;
911
+ } | null | undefined;
912
+ description?: string | undefined;
913
+ }, {
914
+ config: {
915
+ title: string;
916
+ id: string;
917
+ payload: {
918
+ widget: string;
919
+ props?: Record<string, unknown> | undefined;
920
+ };
921
+ };
922
+ kind: "suggestions:chip";
923
+ title?: string | undefined;
924
+ id?: string | undefined;
925
+ validation?: string[] | undefined;
926
+ triggerWhen?: {
927
+ type: "rules";
928
+ rules: {
929
+ conditions: ({
930
+ type: "page_url";
931
+ url: string;
932
+ } | {
933
+ type: "route";
934
+ routeId: string;
935
+ } | {
936
+ type: "anchor_visible";
937
+ anchorId: string;
938
+ state: "visible" | "present" | "absent";
939
+ } | {
940
+ type: "event_occurred";
941
+ eventName: string;
942
+ withinMs?: number | undefined;
943
+ } | {
944
+ type: "state_equals";
945
+ key: string;
946
+ value?: unknown;
947
+ } | {
948
+ type: "viewport";
949
+ minWidth?: number | undefined;
950
+ maxWidth?: number | undefined;
951
+ minHeight?: number | undefined;
952
+ maxHeight?: number | undefined;
953
+ } | {
954
+ type: "session_metric";
955
+ key: "time_on_page" | "page_views" | "scroll_depth";
956
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
957
+ threshold: number;
958
+ } | {
959
+ type: "dismissed";
960
+ key: string;
961
+ inverted?: boolean | undefined;
962
+ } | {
963
+ type: "cooldown_active";
964
+ key: string;
965
+ inverted?: boolean | undefined;
966
+ } | {
967
+ type: "frequency_limit";
968
+ key: string;
969
+ limit: number;
970
+ inverted?: boolean | undefined;
971
+ } | {
972
+ type: "event_count";
973
+ key: string;
974
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
975
+ count: number;
976
+ withinMs?: number | undefined;
977
+ counter?: {
978
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
979
+ match?: Record<string, {
980
+ equals?: string | number | boolean | undefined;
981
+ contains?: string | undefined;
982
+ }> | undefined;
983
+ } | undefined;
984
+ })[];
985
+ value?: unknown;
986
+ }[];
987
+ default?: unknown;
988
+ } | {
989
+ type: "score";
990
+ threshold: number;
991
+ field: string;
992
+ above?: unknown;
993
+ below?: unknown;
994
+ } | {
995
+ type: "model";
996
+ modelId: string;
997
+ inputs: string[];
998
+ outputMapping: Record<string, unknown>;
999
+ default?: unknown;
1000
+ } | {
1001
+ type: "external";
1002
+ endpoint: string;
1003
+ default?: unknown;
1004
+ method?: "GET" | "POST" | undefined;
1005
+ timeoutMs?: number | undefined;
1006
+ } | null | undefined;
1007
+ notify?: {
1008
+ title?: string | undefined;
1009
+ body?: string | undefined;
1010
+ icon?: string | undefined;
1011
+ } | null | undefined;
1012
+ description?: string | undefined;
1013
+ }>;
1014
+ /** A widget-reference payload that mounts in the drawer when its chip is opened. */
1015
+ export type ChipPayload = z.infer<typeof ChipPayloadZ>;
1016
+ /** Declarative chip data. Inferred from `SuggestionChipSchema`. */
1017
+ export type SuggestionChip = z.infer<typeof SuggestionChipSchema>;
1018
+ export declare class AdaptiveChipsStrip extends LitElement {
1019
+ static properties: {
1020
+ chips: {
1021
+ attribute: boolean;
1022
+ };
1023
+ runtimeRef: {
1024
+ attribute: boolean;
1025
+ };
1026
+ chromeless: {
1027
+ type: BooleanConstructor;
1028
+ reflect: boolean;
1029
+ };
1030
+ _openId: {
1031
+ state: boolean;
1032
+ };
1033
+ _canScrollLeft: {
1034
+ state: boolean;
1035
+ };
1036
+ _canScrollRight: {
1037
+ state: boolean;
1038
+ };
1039
+ };
1040
+ chips: SuggestionChip[];
1041
+ /**
1042
+ * Runtime reference — provides `widgets.has(id)` and
1043
+ * `widgets.mount(id, container, props)` so the strip can render
1044
+ * chip payloads through the same registry that mounts tile widgets.
1045
+ * Null until the host wires it (the AdaptiveChipsStripMountable
1046
+ * passes it in from the runtime).
1047
+ */
1048
+ runtimeRef: ChipsStripRuntime | null;
1049
+ /**
1050
+ * Strip-level chrome toggle — applies uniformly to all chips +
1051
+ * the payload drawer. Resolved upstream from `tile.chromeless`
1052
+ * (which itself defaults from `slot.theme.chromeless`). Per-chip
1053
+ * inconsistency would break the mini-canvas visual rhythm so
1054
+ * there's no per-chip flag — one strip, one style.
1055
+ */
1056
+ chromeless: boolean;
1057
+ _openId: string | null;
1058
+ /**
1059
+ * Horizontal-scroll affordance state. The strip is a single row that
1060
+ * overflows horizontally when there are more chips than the panel
1061
+ * width can hold; the left/right chevron buttons are visible only
1062
+ * when the user can actually scroll in that direction. ResizeObserver
1063
+ * + scroll listener keep these in sync.
1064
+ */
1065
+ _canScrollLeft: boolean;
1066
+ _canScrollRight: boolean;
1067
+ private _stripResizeObserver;
1068
+ /** Unsubscribe handle for the compositional-append/patch/remove event
1069
+ * subscription on `runtime.events`. Null when the strip hasn't yet
1070
+ * resolved its tile id (no parent container yet) or the runtime
1071
+ * doesn't expose an event bus. */
1072
+ private _compositionalUnsub;
1073
+ /** Tile id this strip occupies. Resolved on first `updated()` pass by
1074
+ * walking the DOM ancestor chain for `data-tile-id`. Cached because
1075
+ * the lookup is stable for the lifetime of the mount. Null while
1076
+ * unresolved (or when not running inside a SyntroTileCard, e.g.
1077
+ * in standalone test fixtures). */
1078
+ private _tileId;
1079
+ /** Instance ids of chips appended by LLM mounts (vs. authored chip
1080
+ * configs from `props.chips`). Tracked so `removeItem(instance_id)`
1081
+ * can find and prune by id. */
1082
+ private _llmAppendedIds;
1083
+ /**
1084
+ * Tracks the currently-mounted payload widget so we can swap on chip
1085
+ * change + unmount on close. Same lifecycle pattern as
1086
+ * `SyntroCanvasOverlay._lidMountHandle`.
1087
+ */
1088
+ private _payloadMount;
1089
+ createRenderRoot(): HTMLElement;
1090
+ disconnectedCallback(): void;
1091
+ updated(changed: Map<string, unknown>): void;
1092
+ private _resolveTileId;
1093
+ /**
1094
+ * Subscribe to the runtime's event bus for compositional-item events
1095
+ * targeting this strip's tile id. The subscription survives until
1096
+ * disconnect; when an event arrives with a non-matching tile_id, it's
1097
+ * a no-op (the same subscription handles all strips on the page —
1098
+ * filter is just per-event check).
1099
+ */
1100
+ private _subscribeCompositional;
1101
+ /** Append (or prepend) a new chip authored by the LLM. */
1102
+ insertItem(instanceId: string, item: Record<string, unknown>, position: 'append' | 'prepend'): void;
1103
+ /** Replace the existing chip's content. v1: full replacement (no
1104
+ * in-place merge); the chip widget already re-renders on chip data
1105
+ * changes. */
1106
+ patchItem(instanceId: string, item: Record<string, unknown>): void;
1107
+ /** Remove a chip by instance id. Closes the payload drawer if the
1108
+ * removed chip was the open one. */
1109
+ removeItem(instanceId: string): void;
1110
+ /**
1111
+ * Attach a ResizeObserver to the scroll container so we recompute
1112
+ * left/right arrow visibility when chips are added/removed or the
1113
+ * panel width changes. The scroll listener on the strip element
1114
+ * handles user-driven scrolls.
1115
+ */
1116
+ private _syncStripObserver;
1117
+ /**
1118
+ * Recompute whether the left/right scroll arrows should be visible.
1119
+ * Left arrow ⇐ scrollLeft > 0. Right arrow ⇐ there are more chips
1120
+ * to the right (scrollLeft + clientWidth < scrollWidth). Threshold
1121
+ * of 1px tolerance handles sub-pixel rounding on scaled displays.
1122
+ */
1123
+ private _updateScrollAffordances;
1124
+ private _onStripScroll;
1125
+ /**
1126
+ * Scroll the strip by ~80% of its visible width, so each arrow click
1127
+ * advances the user past most-but-not-all of the current chips
1128
+ * (a small overlap helps the user keep their place in the row).
1129
+ */
1130
+ private _scrollBy;
1131
+ private _unmountPayload;
1132
+ /**
1133
+ * Reconcile the payload mount with the current `_openId`:
1134
+ * - drawer closed / no runtime / widget id unknown → tear down
1135
+ * - same chip + same widget id → no-op (or props update)
1136
+ * - different chip → unmount old, mount new
1137
+ */
1138
+ private _syncPayloadMount;
1139
+ private _onChipClick;
1140
+ private _onChipDismiss;
1141
+ private _onPayloadClose;
1142
+ render(): TemplateResult;
1143
+ }
1144
+ declare global {
1145
+ interface HTMLElementTagNameMap {
1146
+ 'adaptive-chips-strip': AdaptiveChipsStrip;
1147
+ }
1148
+ }
1149
+ export {};
1150
+ //# sourceMappingURL=AdaptiveChipsStrip.d.ts.map