@syntrologie/adapt-faq 2.55.1 → 2.56.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn.js +3 -3
- package/dist/{chunk-7DTOSQNC.js → chunk-3WN6VOBL.js} +6 -1
- package/dist/chunk-MB4RKLMM.js +4681 -0
- package/dist/chunk-MB4RKLMM.js.map +7 -0
- package/dist/{chunk-HFZ7IJOG.js → chunk-OO4KIOJB.js} +8 -9
- package/dist/chunk-OO4KIOJB.js.map +7 -0
- package/dist/editor.js +1 -1
- package/dist/editor.js.map +2 -2
- package/dist/faq-styles.d.ts +1 -1
- package/dist/faq-styles.d.ts.map +1 -1
- package/dist/runtime.js +3 -3
- package/dist/schema.d.ts +208 -208
- package/dist/schema.js +77 -77
- package/dist/schema.js.map +1 -1
- package/package.json +2 -3
- package/dist/chunk-HFZ7IJOG.js.map +0 -7
- package/dist/chunk-UA7CGG6F.js +0 -465
- package/dist/chunk-UA7CGG6F.js.map +0 -7
- /package/dist/{chunk-7DTOSQNC.js.map → chunk-3WN6VOBL.js.map} +0 -0
package/dist/schema.js
CHANGED
|
@@ -3,102 +3,102 @@ import {
|
|
|
3
3
|
AuthoringFieldsZ,
|
|
4
4
|
DecisionStrategyZ,
|
|
5
5
|
NotifyZ,
|
|
6
|
-
TriggerWhenZ
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
TriggerWhenZ,
|
|
7
|
+
external_exports
|
|
8
|
+
} from "./chunk-MB4RKLMM.js";
|
|
9
|
+
import "./chunk-3WN6VOBL.js";
|
|
9
10
|
|
|
10
11
|
// src/schema.ts
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
height: z.number().optional().describe("Optional display height in pixels.")
|
|
12
|
+
var AssetZ = external_exports.object({
|
|
13
|
+
id: external_exports.string().describe("Unique asset ID referenced inside the markdown content via `asset:<id>`."),
|
|
14
|
+
type: external_exports.enum(["image", "video"]).describe('"image" for static images, "video" for embeddable video clips.'),
|
|
15
|
+
src: external_exports.string().describe("Absolute URL of the media asset."),
|
|
16
|
+
alt: external_exports.string().optional().describe("Optional alt text for images (accessibility)."),
|
|
17
|
+
width: external_exports.number().optional().describe("Optional display width in pixels."),
|
|
18
|
+
height: external_exports.number().optional().describe("Optional display height in pixels.")
|
|
19
19
|
}).describe(
|
|
20
20
|
"A single embedded media asset (image or video) referenced by ID in the markdown content."
|
|
21
21
|
);
|
|
22
|
-
var RichHTMLAnswerZ =
|
|
23
|
-
type:
|
|
22
|
+
var RichHTMLAnswerZ = external_exports.object({
|
|
23
|
+
type: external_exports.literal("rich").describe(
|
|
24
24
|
"Last-resort variant. Only use when the answer needs HTML elements markdown cannot produce: a real <button>, an embedded <iframe>, a <form>, or a structural <table> with attributes. Otherwise use a plain string with markdown."
|
|
25
25
|
),
|
|
26
|
-
html:
|
|
26
|
+
html: external_exports.string().describe("Sanitized HTML string rendered directly as the answer body.")
|
|
27
27
|
}).describe(
|
|
28
28
|
"Rich HTML answer. Use only when the answer needs HTML markdown cannot produce \u2014 buttons, iframes, forms, structural tables. Plain text, bold/italic, links, and lists all belong in a plain string with markdown."
|
|
29
29
|
);
|
|
30
|
-
var EnhancedMarkdownAnswerZ =
|
|
31
|
-
type:
|
|
30
|
+
var EnhancedMarkdownAnswerZ = external_exports.object({
|
|
31
|
+
type: external_exports.literal("markdown").describe(
|
|
32
32
|
"Markdown answer with a sidecar `assets` array. Renders identically to a plain-string answer \u2014 the only reason to choose this shape is to attach named media (images, video) with metadata (alt, width, height) and reference them via `asset:<id>` URIs. For inline images with raw URLs, a plain string is simpler."
|
|
33
33
|
),
|
|
34
|
-
content:
|
|
34
|
+
content: external_exports.string().describe(
|
|
35
35
|
"Markdown string. Reference assets using the `asset:<id>` URI scheme, e.g. ``."
|
|
36
36
|
),
|
|
37
|
-
assets:
|
|
37
|
+
assets: external_exports.array(AssetZ).optional().describe("Optional media assets referenced in the markdown via `asset:<id>` URIs.")
|
|
38
38
|
}).describe(
|
|
39
39
|
"Markdown answer with a named-assets sidecar. Same renderer as a plain-string answer; the only difference is that media is referenced by id with metadata instead of inlined as raw URLs."
|
|
40
40
|
);
|
|
41
|
-
var FAQAnswerZ =
|
|
41
|
+
var FAQAnswerZ = external_exports.union([external_exports.string(), RichHTMLAnswerZ, EnhancedMarkdownAnswerZ]).describe(
|
|
42
42
|
'Answer content. DEFAULT: a plain string with markdown \u2014 paragraphs, **bold**, *italic*, `code`, [links](url), and bulleted/numbered lists all render via GFM. Use "rich" HTML ONLY when the answer needs HTML markdown cannot produce (buttons, iframes, forms, structural tables) \u2014 there must be a real reason. Use "markdown" (the object form) only when you need named media assets with metadata; otherwise a plain string is simpler.'
|
|
43
43
|
);
|
|
44
|
-
var FeedbackConfigZ =
|
|
45
|
-
style:
|
|
46
|
-
prompt:
|
|
44
|
+
var FeedbackConfigZ = external_exports.object({
|
|
45
|
+
style: external_exports.enum(["thumbs", "rating"]).describe('"thumbs" shows a thumbs-up/down pair; "rating" shows a numeric scale.'),
|
|
46
|
+
prompt: external_exports.string().optional().describe(
|
|
47
47
|
'Optional prompt text shown above the feedback controls (e.g. "Was this helpful?").'
|
|
48
48
|
)
|
|
49
49
|
}).describe("Detailed feedback widget configuration specifying style and optional prompt text.");
|
|
50
|
-
var FeedbackZ =
|
|
50
|
+
var FeedbackZ = external_exports.union([external_exports.boolean(), FeedbackConfigZ]).describe(
|
|
51
51
|
"Per-item feedback widget. Pass true for default thumbs feedback, false to disable, or a FeedbackConfig object for custom style and prompt."
|
|
52
52
|
);
|
|
53
|
-
var SegmentOrderingZ =
|
|
54
|
-
type:
|
|
55
|
-
segmentWeights:
|
|
53
|
+
var SegmentOrderingZ = external_exports.object({
|
|
54
|
+
type: external_exports.literal("segment").describe("Segment-based ordering: item order varies per user segment."),
|
|
55
|
+
segmentWeights: external_exports.record(external_exports.array(external_exports.string())).describe(
|
|
56
56
|
"Map of segment ID \u2192 ordered list of question IDs. Each segment gets its own item order."
|
|
57
57
|
)
|
|
58
58
|
}).describe(
|
|
59
59
|
"Segment-based ordering strategy. Each key is a segment ID and the value is the ordered list of item IDs shown to users in that segment."
|
|
60
60
|
);
|
|
61
|
-
var OrderingStrategyZ =
|
|
61
|
+
var OrderingStrategyZ = external_exports.union([external_exports.enum(["static", "priority"]), SegmentOrderingZ]).describe(
|
|
62
62
|
'"static" = config order, "priority" = sort by item priority field descending, or a segment object for per-segment ordering.'
|
|
63
63
|
);
|
|
64
|
-
var AnswerStrategyZ =
|
|
65
|
-
endpoint:
|
|
66
|
-
context:
|
|
67
|
-
cache:
|
|
64
|
+
var AnswerStrategyZ = external_exports.object({
|
|
65
|
+
endpoint: external_exports.string().min(1).describe("Backend endpoint URL that generates the AI answer for this question."),
|
|
66
|
+
context: external_exports.array(external_exports.string()).optional().describe("Optional list of context keys passed to the endpoint to ground the answer."),
|
|
67
|
+
cache: external_exports.enum(["session", "none"]).optional().describe(
|
|
68
68
|
`"session" caches the generated answer for the user's session; "none" regenerates on each expand.`
|
|
69
69
|
),
|
|
70
|
-
fallback:
|
|
70
|
+
fallback: external_exports.string().optional().describe("Static fallback answer text shown if the AI endpoint fails or times out.")
|
|
71
71
|
}).describe(
|
|
72
72
|
"AI answer generation strategy. When present, the answer is generated dynamically by calling the specified endpoint."
|
|
73
73
|
);
|
|
74
|
-
var InjectionRuleZ =
|
|
74
|
+
var InjectionRuleZ = external_exports.object({
|
|
75
75
|
trigger: DecisionStrategyZ.describe(
|
|
76
76
|
"Decision strategy that evaluates to true when the items should be injected (e.g. page URL matches checkout)."
|
|
77
77
|
),
|
|
78
|
-
items:
|
|
79
|
-
position:
|
|
80
|
-
once:
|
|
78
|
+
items: external_exports.array(external_exports.lazy(() => FAQQuestionSchema)).describe("FAQ question items to inject when the trigger fires."),
|
|
79
|
+
position: external_exports.enum(["prepend", "append"]).optional().describe('"prepend" inserts injected items at the top; "append" adds them at the bottom.'),
|
|
80
|
+
once: external_exports.boolean().optional().describe("When true, items are injected only on the first trigger match and not again.")
|
|
81
81
|
}).describe(
|
|
82
82
|
"Dynamic injection rule: adds contextual FAQ items when a trigger condition is met (e.g. user is on the checkout page)."
|
|
83
83
|
);
|
|
84
|
-
var FAQQuestionSchema =
|
|
84
|
+
var FAQQuestionSchema = external_exports.object({
|
|
85
85
|
...AuthoringFieldsZ,
|
|
86
|
-
kind:
|
|
86
|
+
kind: external_exports.literal("faq:question").describe(
|
|
87
87
|
"Compositional action type for a single FAQ accordion item. Rendered by the adaptive-faq:accordion widget."
|
|
88
88
|
),
|
|
89
|
-
config:
|
|
89
|
+
config: external_exports.object({
|
|
90
90
|
/** Unique identifier for this question */
|
|
91
|
-
id:
|
|
91
|
+
id: external_exports.string().min(1, "ID is required"),
|
|
92
92
|
/** The question text */
|
|
93
|
-
question:
|
|
93
|
+
question: external_exports.string().min(1, "Question is required").describe("The question text shown in the accordion header."),
|
|
94
94
|
/** The answer content (plain string, rich HTML, or enhanced markdown) */
|
|
95
95
|
answer: FAQAnswerZ,
|
|
96
96
|
/** Optional category for grouping */
|
|
97
|
-
category:
|
|
97
|
+
category: external_exports.string().optional().describe(
|
|
98
98
|
"Optional grouping label. Questions with the same category are collapsible under a shared section header."
|
|
99
99
|
),
|
|
100
100
|
/** Optional priority for ordering */
|
|
101
|
-
priority:
|
|
101
|
+
priority: external_exports.number().optional().describe(
|
|
102
102
|
'Numeric priority used when ordering="priority". Higher values appear first. Omit for equal priority.'
|
|
103
103
|
),
|
|
104
104
|
/** Optional AI answer generation strategy */
|
|
@@ -119,29 +119,29 @@ var FAQQuestionSchema = z.object({
|
|
|
119
119
|
}).refine((data) => !data.triggerWhen || data.notify !== void 0, {
|
|
120
120
|
message: "notify is required when triggerWhen is present (use null to opt out of notifications)"
|
|
121
121
|
});
|
|
122
|
-
var configSchema =
|
|
122
|
+
var configSchema = external_exports.object({
|
|
123
123
|
/** Display title for the FAQ widget */
|
|
124
|
-
title:
|
|
124
|
+
title: external_exports.string().optional().describe("Optional header text shown above the accordion list."),
|
|
125
125
|
/** Whether only one or multiple questions can be expanded at once */
|
|
126
|
-
expandBehavior:
|
|
126
|
+
expandBehavior: external_exports.enum(["single", "multiple"]).default("single").describe(
|
|
127
127
|
'"single" collapses any open item before expanding another; "multiple" allows any number open at once.'
|
|
128
128
|
),
|
|
129
129
|
/** Whether to show a search/filter input */
|
|
130
|
-
searchable:
|
|
130
|
+
searchable: external_exports.boolean().default(false).describe("When true, renders a text input that filters questions by keyword."),
|
|
131
131
|
/** Color theme */
|
|
132
|
-
theme:
|
|
132
|
+
theme: external_exports.enum(["light", "dark", "auto"]).default("auto").describe(
|
|
133
133
|
`"auto" follows the user's OS preference; use "light" or "dark" to pin the theme.`
|
|
134
134
|
),
|
|
135
135
|
/** FAQ questions (compositional actions) */
|
|
136
|
-
actions:
|
|
136
|
+
actions: external_exports.array(FAQQuestionSchema).default([]).describe(
|
|
137
137
|
"The FAQ items rendered by the accordion. Each item is a faq:question compositional action \u2014 these are configuration data rendered by the widget, not actions executed by the runtime. Empty arrays are accepted at the SDK runtime layer (LLM-driven mounts start empty and append items in subsequent tool calls); empty-FAQ rejection lives in the publish-time validator, not here."
|
|
138
138
|
),
|
|
139
139
|
/** Atomically-authored FAQ rows (the struct_list path). */
|
|
140
|
-
questions:
|
|
141
|
-
|
|
142
|
-
question:
|
|
143
|
-
answer:
|
|
144
|
-
category:
|
|
140
|
+
questions: external_exports.array(
|
|
141
|
+
external_exports.object({
|
|
142
|
+
question: external_exports.string(),
|
|
143
|
+
answer: external_exports.string(),
|
|
144
|
+
category: external_exports.string().optional()
|
|
145
145
|
})
|
|
146
146
|
).optional().describe(
|
|
147
147
|
"Atomically-authored FAQ rows: the LLM mounts the whole FAQ \u2014 container plus every row \u2014 in ONE mount_element call (backed by the struct_list template field), so the tile is born complete and never renders empty. Each row is a plain {question, answer, category}. Merged with `actions` at render; prefer this over the compositional-append path for LLM-driven FAQs."
|
|
@@ -155,49 +155,49 @@ var configSchema = z.object({
|
|
|
155
155
|
'Controls the display order of items. Omit for static (config) order, "priority" to sort by priority field, or a segment object for per-segment ordering.'
|
|
156
156
|
),
|
|
157
157
|
/** Dynamic FAQ injection rules */
|
|
158
|
-
injections:
|
|
158
|
+
injections: external_exports.array(InjectionRuleZ).optional().describe(
|
|
159
159
|
"Optional injection rules that dynamically add FAQ items when trigger conditions are met (e.g. inject checkout FAQs on the checkout page)."
|
|
160
160
|
)
|
|
161
161
|
}).describe(
|
|
162
162
|
"Props for the adaptive-faq:accordion tile widget. Configures the FAQ accordion including items, expand behavior, search, feedback, and ordering."
|
|
163
163
|
);
|
|
164
|
-
var ScrollToFaqSchema =
|
|
164
|
+
var ScrollToFaqSchema = external_exports.object({
|
|
165
165
|
...AuthoringFieldsZ,
|
|
166
|
-
kind:
|
|
167
|
-
itemId:
|
|
168
|
-
itemQuestion:
|
|
166
|
+
kind: external_exports.literal("faq:scroll_to").describe("Scrolls the viewport to a specific FAQ item and optionally expands it."),
|
|
167
|
+
itemId: external_exports.string().optional().describe("Target question ID. Use this or itemQuestion (at least one required)."),
|
|
168
|
+
itemQuestion: external_exports.string().optional().describe(
|
|
169
169
|
"Target question text for fuzzy matching. Use this or itemId (at least one required)."
|
|
170
170
|
),
|
|
171
|
-
expand:
|
|
172
|
-
behavior:
|
|
171
|
+
expand: external_exports.boolean().optional().describe("When true (default), expands the item after scrolling into view."),
|
|
172
|
+
behavior: external_exports.enum(["smooth", "instant", "auto"]).optional().describe('"smooth" animates the scroll; "instant" jumps; "auto" defers to browser default.')
|
|
173
173
|
}).refine((data) => data.itemId || data.itemQuestion, {
|
|
174
174
|
message: "Either itemId or itemQuestion is required"
|
|
175
175
|
});
|
|
176
|
-
var ToggleFaqItemSchema =
|
|
176
|
+
var ToggleFaqItemSchema = external_exports.object({
|
|
177
177
|
...AuthoringFieldsZ,
|
|
178
|
-
kind:
|
|
179
|
-
itemId:
|
|
180
|
-
itemQuestion:
|
|
178
|
+
kind: external_exports.literal("faq:toggle_item").describe("Opens, closes, or toggles the expanded state of a specific FAQ item."),
|
|
179
|
+
itemId: external_exports.string().optional().describe("Target question ID. Use this or itemQuestion (at least one required)."),
|
|
180
|
+
itemQuestion: external_exports.string().optional().describe(
|
|
181
181
|
"Target question text for fuzzy matching. Use this or itemId (at least one required)."
|
|
182
182
|
),
|
|
183
|
-
state:
|
|
183
|
+
state: external_exports.enum(["open", "closed", "toggle"]).default("toggle").describe('"open" expands, "closed" collapses, "toggle" flips the current state.')
|
|
184
184
|
}).refine((data) => data.itemId || data.itemQuestion, {
|
|
185
185
|
message: "Either itemId or itemQuestion is required"
|
|
186
186
|
});
|
|
187
|
-
var UpdateFaqSchema =
|
|
187
|
+
var UpdateFaqSchema = external_exports.object({
|
|
188
188
|
...AuthoringFieldsZ,
|
|
189
|
-
kind:
|
|
190
|
-
operation:
|
|
189
|
+
kind: external_exports.literal("faq:update").describe("Dynamically adds, removes, reorders, or replaces FAQ items at runtime."),
|
|
190
|
+
operation: external_exports.enum(["add", "remove", "reorder", "replace"]).describe(
|
|
191
191
|
'"add" inserts items, "remove" deletes one by ID, "reorder" applies a new ID order, "replace" swaps all items.'
|
|
192
192
|
),
|
|
193
|
-
items:
|
|
193
|
+
items: external_exports.array(FAQQuestionSchema).optional().describe(
|
|
194
194
|
'Items to act on. Required for "add" (the items to insert) and "replace" (the full replacement set; pass [] to intentionally clear all items).'
|
|
195
195
|
),
|
|
196
|
-
itemId:
|
|
197
|
-
order:
|
|
196
|
+
itemId: external_exports.string().optional().describe('ID of the item to remove. Required for "remove".'),
|
|
197
|
+
order: external_exports.array(external_exports.string()).optional().describe(
|
|
198
198
|
'New display order as an ordered list of item IDs. Required for "reorder". To intentionally clear the list, use operation "replace" with items: [].'
|
|
199
199
|
),
|
|
200
|
-
position:
|
|
200
|
+
position: external_exports.enum(["prepend", "append", "before", "after"]).optional().describe("Where to insert new items relative to existing ones or relative to anchorId."),
|
|
201
201
|
anchorId: AnchorIdZ.optional().describe(
|
|
202
202
|
'Reference item for "before" or "after" positioning. Identifies an existing FAQ item as the insertion anchor.'
|
|
203
203
|
)
|
|
@@ -208,7 +208,7 @@ var UpdateFaqSchema = z.object({
|
|
|
208
208
|
case "add":
|
|
209
209
|
if (data.items === void 0) {
|
|
210
210
|
ctx.addIssue({
|
|
211
|
-
code:
|
|
211
|
+
code: external_exports.ZodIssueCode.custom,
|
|
212
212
|
path: ["items"],
|
|
213
213
|
message: 'items is required when operation is "add"'
|
|
214
214
|
});
|
|
@@ -217,7 +217,7 @@ var UpdateFaqSchema = z.object({
|
|
|
217
217
|
case "remove":
|
|
218
218
|
if (data.itemId === void 0) {
|
|
219
219
|
ctx.addIssue({
|
|
220
|
-
code:
|
|
220
|
+
code: external_exports.ZodIssueCode.custom,
|
|
221
221
|
path: ["itemId"],
|
|
222
222
|
message: 'itemId is required when operation is "remove"'
|
|
223
223
|
});
|
|
@@ -226,7 +226,7 @@ var UpdateFaqSchema = z.object({
|
|
|
226
226
|
case "reorder":
|
|
227
227
|
if (data.order === void 0) {
|
|
228
228
|
ctx.addIssue({
|
|
229
|
-
code:
|
|
229
|
+
code: external_exports.ZodIssueCode.custom,
|
|
230
230
|
path: ["order"],
|
|
231
231
|
message: 'order is required when operation is "reorder" (use operation "replace" with items: [] to intentionally clear the list)'
|
|
232
232
|
});
|
|
@@ -235,7 +235,7 @@ var UpdateFaqSchema = z.object({
|
|
|
235
235
|
case "replace":
|
|
236
236
|
if (data.items === void 0) {
|
|
237
237
|
ctx.addIssue({
|
|
238
|
-
code:
|
|
238
|
+
code: external_exports.ZodIssueCode.custom,
|
|
239
239
|
path: ["items"],
|
|
240
240
|
message: 'items is required when operation is "replace" (pass [] to clear the list)'
|
|
241
241
|
});
|
package/dist/schema.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/schema.ts"],
|
|
4
4
|
"sourcesContent": ["/**\n * Adaptive FAQ - Config Schema\n *\n * Zod schema for validating FAQ accordion configuration.\n * Demonstrates compositional action pattern with per-item triggerWhen.\n */\n\nimport {\n AnchorIdZ,\n AuthoringFieldsZ,\n DecisionStrategyZ,\n NotifyZ,\n TriggerWhenZ,\n} from '@syntrologie/sdk-contracts';\nimport { z } from 'zod';\n\n// ============================================================================\n// Rich Answer Content Schemas\n// ============================================================================\n\n/** Schema for media assets embedded in enhanced markdown answers. */\nconst AssetZ = z\n .object({\n id: z\n .string()\n .describe('Unique asset ID referenced inside the markdown content via `asset:<id>`.'),\n type: z\n .enum(['image', 'video'])\n .describe('\"image\" for static images, \"video\" for embeddable video clips.'),\n src: z.string().describe('Absolute URL of the media asset.'),\n alt: z.string().optional().describe('Optional alt text for images (accessibility).'),\n width: z.number().optional().describe('Optional display width in pixels.'),\n height: z.number().optional().describe('Optional display height in pixels.'),\n })\n .describe(\n 'A single embedded media asset (image or video) referenced by ID in the markdown content.'\n );\n\n/** Schema for rich HTML answer content. */\nconst RichHTMLAnswerZ = z\n .object({\n type: z\n .literal('rich')\n .describe(\n 'Last-resort variant. Only use when the answer needs HTML elements markdown cannot produce: a real <button>, an embedded <iframe>, a <form>, or a structural <table> with attributes. Otherwise use a plain string with markdown.'\n ),\n html: z.string().describe('Sanitized HTML string rendered directly as the answer body.'),\n })\n .describe(\n 'Rich HTML answer. Use only when the answer needs HTML markdown cannot produce \u2014 buttons, iframes, forms, structural tables. Plain text, bold/italic, links, and lists all belong in a plain string with markdown.'\n );\n\n/** Schema for enhanced markdown answer content with optional assets. */\nconst EnhancedMarkdownAnswerZ = z\n .object({\n type: z\n .literal('markdown')\n .describe(\n 'Markdown answer with a sidecar `assets` array. Renders identically to a plain-string answer \u2014 the only reason to choose this shape is to attach named media (images, video) with metadata (alt, width, height) and reference them via `asset:<id>` URIs. For inline images with raw URLs, a plain string is simpler.'\n ),\n content: z\n .string()\n .describe(\n 'Markdown string. Reference assets using the `asset:<id>` URI scheme, e.g. ``.'\n ),\n assets: z\n .array(AssetZ)\n .optional()\n .describe('Optional media assets referenced in the markdown via `asset:<id>` URIs.'),\n })\n .describe(\n 'Markdown answer with a named-assets sidecar. Same renderer as a plain-string answer; the only difference is that media is referenced by id with metadata instead of inlined as raw URLs.'\n );\n\n/** Union of all FAQ answer types: plain string, rich HTML, or enhanced markdown. */\nconst FAQAnswerZ = z\n .union([z.string(), RichHTMLAnswerZ, EnhancedMarkdownAnswerZ])\n .describe(\n 'Answer content. DEFAULT: a plain string with markdown \u2014 paragraphs, **bold**, *italic*, `code`, [links](url), and bulleted/numbered lists all render via GFM. Use \"rich\" HTML ONLY when the answer needs HTML markdown cannot produce (buttons, iframes, forms, structural tables) \u2014 there must be a real reason. Use \"markdown\" (the object form) only when you need named media assets with metadata; otherwise a plain string is simpler.'\n );\n\n// ============================================================================\n// Feedback Schemas\n// ============================================================================\n\n/** Schema for feedback widget configuration. */\nconst FeedbackConfigZ = z\n .object({\n style: z\n .enum(['thumbs', 'rating'])\n .describe('\"thumbs\" shows a thumbs-up/down pair; \"rating\" shows a numeric scale.'),\n prompt: z\n .string()\n .optional()\n .describe(\n 'Optional prompt text shown above the feedback controls (e.g. \"Was this helpful?\").'\n ),\n })\n .describe('Detailed feedback widget configuration specifying style and optional prompt text.');\n\n/** Feedback can be a boolean (enable/disable) or a detailed config object. */\nconst FeedbackZ = z\n .union([z.boolean(), FeedbackConfigZ])\n .describe(\n 'Per-item feedback widget. Pass true for default thumbs feedback, false to disable, or a FeedbackConfig object for custom style and prompt.'\n );\n\n// ============================================================================\n// Ordering Schemas\n// ============================================================================\n\n/** Schema for segment-based ordering strategy. */\nconst SegmentOrderingZ = z\n .object({\n type: z\n .literal('segment')\n .describe('Segment-based ordering: item order varies per user segment.'),\n segmentWeights: z\n .record(z.array(z.string()))\n .describe(\n 'Map of segment ID \u2192 ordered list of question IDs. Each segment gets its own item order.'\n ),\n })\n .describe(\n 'Segment-based ordering strategy. Each key is a segment ID and the value is the ordered list of item IDs shown to users in that segment.'\n );\n\n/** Ordering strategy: static order, priority-based, or segment-based. */\nconst OrderingStrategyZ = z\n .union([z.enum(['static', 'priority']), SegmentOrderingZ])\n .describe(\n '\"static\" = config order, \"priority\" = sort by item priority field descending, or a segment object for per-segment ordering.'\n );\n\n// ============================================================================\n// AI Answer Strategy Schema\n// ============================================================================\n\n/** Schema for AI-generated answer configuration. */\nconst AnswerStrategyZ = z\n .object({\n endpoint: z\n .string()\n .min(1)\n .describe('Backend endpoint URL that generates the AI answer for this question.'),\n context: z\n .array(z.string())\n .optional()\n .describe('Optional list of context keys passed to the endpoint to ground the answer.'),\n cache: z\n .enum(['session', 'none'])\n .optional()\n .describe(\n '\"session\" caches the generated answer for the user\\'s session; \"none\" regenerates on each expand.'\n ),\n fallback: z\n .string()\n .optional()\n .describe('Static fallback answer text shown if the AI endpoint fails or times out.'),\n })\n .describe(\n 'AI answer generation strategy. When present, the answer is generated dynamically by calling the specified endpoint.'\n );\n\n// ============================================================================\n// Injection Rule Schema\n// ============================================================================\n\n/** Schema for dynamic FAQ injection rules. */\nconst InjectionRuleZ = z\n .object({\n trigger: DecisionStrategyZ.describe(\n 'Decision strategy that evaluates to true when the items should be injected (e.g. page URL matches checkout).'\n ),\n items: z\n .array(z.lazy(() => FAQQuestionSchema))\n .describe('FAQ question items to inject when the trigger fires.'),\n position: z\n .enum(['prepend', 'append'])\n .optional()\n .describe('\"prepend\" inserts injected items at the top; \"append\" adds them at the bottom.'),\n once: z\n .boolean()\n .optional()\n .describe('When true, items are injected only on the first trigger match and not again.'),\n })\n .describe(\n 'Dynamic injection rule: adds contextual FAQ items when a trigger condition is met (e.g. user is on the checkout page).'\n );\n\n// ============================================================================\n// FAQ Question Schema\n// ============================================================================\n\n/**\n * Schema for a single FAQ question (compositional action).\n */\nexport const FAQQuestionSchema = z\n .object({\n ...AuthoringFieldsZ,\n kind: z\n .literal('faq:question')\n .describe(\n 'Compositional action type for a single FAQ accordion item. Rendered by the adaptive-faq:accordion widget.'\n ),\n config: z\n .object({\n /** Unique identifier for this question */\n id: z.string().min(1, 'ID is required'),\n /** The question text */\n question: z\n .string()\n .min(1, 'Question is required')\n .describe('The question text shown in the accordion header.'),\n /** The answer content (plain string, rich HTML, or enhanced markdown) */\n answer: FAQAnswerZ,\n /** Optional category for grouping */\n category: z\n .string()\n .optional()\n .describe(\n 'Optional grouping label. Questions with the same category are collapsible under a shared section header.'\n ),\n /** Optional priority for ordering */\n priority: z\n .number()\n .optional()\n .describe(\n 'Numeric priority used when ordering=\"priority\". Higher values appear first. Omit for equal priority.'\n ),\n /** Optional AI answer generation strategy */\n answerStrategy: AnswerStrategyZ.optional().describe(\n 'Optional AI answer generation config. When set, the answer field is used as a fallback only.'\n ),\n })\n .describe(\n 'Per-question configuration including the question text, answer content, and optional metadata.'\n ),\n /** Per-item activation strategy (null = always show) */\n triggerWhen: TriggerWhenZ.describe(\n 'Conditional visibility strategy. When null or omitted, the question is always shown. Use a rules strategy to show/hide based on page URL, event counts, or session metrics.'\n ),\n /** Toast config when triggerWhen transitions false \u2192 true. Required when triggerWhen is set (use null to opt out). */\n notify: NotifyZ.describe(\n 'Toast notification shown when triggerWhen transitions false \u2192 true. Required when triggerWhen is set \u2014 pass null to opt out of the toast.'\n ),\n })\n .refine((data) => !data.triggerWhen || data.notify !== undefined, {\n message:\n 'notify is required when triggerWhen is present (use null to opt out of notifications)',\n });\n\nexport type FAQQuestionSchemaType = z.infer<typeof FAQQuestionSchema>;\n\n// ============================================================================\n// FAQ Config Schema\n// ============================================================================\n\n/**\n * Full configuration schema for adaptive-faq.\n */\nexport const configSchema = z\n .object({\n /** Display title for the FAQ widget */\n title: z.string().optional().describe('Optional header text shown above the accordion list.'),\n /** Whether only one or multiple questions can be expanded at once */\n expandBehavior: z\n .enum(['single', 'multiple'])\n .default('single')\n .describe(\n '\"single\" collapses any open item before expanding another; \"multiple\" allows any number open at once.'\n ),\n /** Whether to show a search/filter input */\n searchable: z\n .boolean()\n .default(false)\n .describe('When true, renders a text input that filters questions by keyword.'),\n /** Color theme */\n theme: z\n .enum(['light', 'dark', 'auto'])\n .default('auto')\n .describe(\n '\"auto\" follows the user\\'s OS preference; use \"light\" or \"dark\" to pin the theme.'\n ),\n /** FAQ questions (compositional actions) */\n actions: z\n .array(FAQQuestionSchema)\n .default([])\n .describe(\n 'The FAQ items rendered by the accordion. Each item is a faq:question compositional action \u2014 these are configuration data rendered by the widget, not actions executed by the runtime. Empty arrays are accepted at the SDK runtime layer (LLM-driven mounts start empty and append items in subsequent tool calls); empty-FAQ rejection lives in the publish-time validator, not here.'\n ),\n /** Atomically-authored FAQ rows (the struct_list path). */\n questions: z\n .array(\n z.object({\n question: z.string(),\n answer: z.string(),\n category: z.string().optional(),\n })\n )\n .optional()\n .describe(\n 'Atomically-authored FAQ rows: the LLM mounts the whole FAQ \u2014 container plus every row \u2014 in ONE mount_element call (backed by the struct_list template field), so the tile is born complete and never renders empty. Each row is a plain {question, answer, category}. Merged with `actions` at render; prefer this over the compositional-append path for LLM-driven FAQs.'\n ),\n /** Feedback widget configuration */\n feedback: FeedbackZ.optional().describe(\n 'Optional per-item feedback widget. Enable with true (default thumbs style) or a FeedbackConfig for custom style.'\n ),\n /** Question ordering strategy */\n ordering: OrderingStrategyZ.optional().describe(\n 'Controls the display order of items. Omit for static (config) order, \"priority\" to sort by priority field, or a segment object for per-segment ordering.'\n ),\n /** Dynamic FAQ injection rules */\n injections: z\n .array(InjectionRuleZ)\n .optional()\n .describe(\n 'Optional injection rules that dynamically add FAQ items when trigger conditions are met (e.g. inject checkout FAQs on the checkout page).'\n ),\n })\n .describe(\n 'Props for the adaptive-faq:accordion tile widget. Configures the FAQ accordion including items, expand behavior, search, feedback, and ordering.'\n );\n\nexport type FAQConfig = z.infer<typeof configSchema>;\n\n// ============================================================================\n// Executor Action Schemas\n// ============================================================================\n\n/**\n * Schema for scrolling to a specific FAQ item.\n * Requires either itemId or itemQuestion to identify the target.\n */\nexport const ScrollToFaqSchema = z\n .object({\n ...AuthoringFieldsZ,\n kind: z\n .literal('faq:scroll_to')\n .describe('Scrolls the viewport to a specific FAQ item and optionally expands it.'),\n itemId: z\n .string()\n .optional()\n .describe('Target question ID. Use this or itemQuestion (at least one required).'),\n itemQuestion: z\n .string()\n .optional()\n .describe(\n 'Target question text for fuzzy matching. Use this or itemId (at least one required).'\n ),\n expand: z\n .boolean()\n .optional()\n .describe('When true (default), expands the item after scrolling into view.'),\n behavior: z\n .enum(['smooth', 'instant', 'auto'])\n .optional()\n .describe('\"smooth\" animates the scroll; \"instant\" jumps; \"auto\" defers to browser default.'),\n })\n .refine((data) => data.itemId || data.itemQuestion, {\n message: 'Either itemId or itemQuestion is required',\n });\n\n/**\n * Schema for toggling a FAQ item open/closed.\n * Requires either itemId or itemQuestion to identify the target.\n */\nexport const ToggleFaqItemSchema = z\n .object({\n ...AuthoringFieldsZ,\n kind: z\n .literal('faq:toggle_item')\n .describe('Opens, closes, or toggles the expanded state of a specific FAQ item.'),\n itemId: z\n .string()\n .optional()\n .describe('Target question ID. Use this or itemQuestion (at least one required).'),\n itemQuestion: z\n .string()\n .optional()\n .describe(\n 'Target question text for fuzzy matching. Use this or itemId (at least one required).'\n ),\n state: z\n .enum(['open', 'closed', 'toggle'])\n .default('toggle')\n .describe('\"open\" expands, \"closed\" collapses, \"toggle\" flips the current state.'),\n })\n .refine((data) => data.itemId || data.itemQuestion, {\n message: 'Either itemId or itemQuestion is required',\n });\n\n/**\n * Schema for updating FAQ items (add, remove, reorder, replace).\n *\n * Per-operation field requirements are enforced via .superRefine() so the\n * validator rejects shapes that would silently no-op or destructively clear\n * the list at the executor level (e.g. `operation: 'reorder'` with no\n * `order` array would have wiped all items).\n */\nexport const UpdateFaqSchema = z\n .object({\n ...AuthoringFieldsZ,\n kind: z\n .literal('faq:update')\n .describe('Dynamically adds, removes, reorders, or replaces FAQ items at runtime.'),\n operation: z\n .enum(['add', 'remove', 'reorder', 'replace'])\n .describe(\n '\"add\" inserts items, \"remove\" deletes one by ID, \"reorder\" applies a new ID order, \"replace\" swaps all items.'\n ),\n items: z\n .array(FAQQuestionSchema)\n .optional()\n .describe(\n 'Items to act on. Required for \"add\" (the items to insert) and \"replace\" (the full replacement set; pass [] to intentionally clear all items).'\n ),\n itemId: z.string().optional().describe('ID of the item to remove. Required for \"remove\".'),\n order: z\n .array(z.string())\n .optional()\n .describe(\n 'New display order as an ordered list of item IDs. Required for \"reorder\". To intentionally clear the list, use operation \"replace\" with items: [].'\n ),\n position: z\n .enum(['prepend', 'append', 'before', 'after'])\n .optional()\n .describe('Where to insert new items relative to existing ones or relative to anchorId.'),\n anchorId: AnchorIdZ.optional().describe(\n 'Reference item for \"before\" or \"after\" positioning. Identifies an existing FAQ item as the insertion anchor.'\n ),\n })\n .describe(\n 'Runtime mutation action for the FAQ item list. Use to add contextual questions, remove outdated ones, or reorder by priority.'\n )\n .superRefine((data, ctx) => {\n switch (data.operation) {\n case 'add':\n if (data.items === undefined) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['items'],\n message: 'items is required when operation is \"add\"',\n });\n }\n break;\n case 'remove':\n if (data.itemId === undefined) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['itemId'],\n message: 'itemId is required when operation is \"remove\"',\n });\n }\n break;\n case 'reorder':\n if (data.order === undefined) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['order'],\n message:\n 'order is required when operation is \"reorder\" (use operation \"replace\" with items: [] to intentionally clear the list)',\n });\n }\n break;\n case 'replace':\n if (data.items === undefined) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['items'],\n message: 'items is required when operation is \"replace\" (pass [] to clear the list)',\n });\n }\n break;\n }\n });\n\n// ============================================================================\n// Validation Helpers\n// ============================================================================\n\n/**\n * Validate a FAQ question action.\n */\nexport function validateFAQQuestion(data: unknown) {\n return FAQQuestionSchema.safeParse(data);\n}\n\n/**\n * Validate the full FAQ config.\n */\nexport function validateFAQConfig(data: unknown) {\n return configSchema.safeParse(data);\n}\n\n// ============================================================================\n// Unified Schema Export\n// ============================================================================\n\n/**\n * Action step schemas for unified JSON Schema generation.\n * The build script reads this array to merge adaptive actions into the\n * unified canvas-config.schema.json.\n *\n * Note: `.innerType()` strips the `.refine()` wrapper since JSON Schema\n * cannot express cross-field refinements; runtime Zod handles that.\n */\nexport const actionStepSchemas = [\n { defName: 'faqQuestion', schema: FAQQuestionSchema.innerType() },\n { defName: 'faqScrollTo', schema: ScrollToFaqSchema.innerType() },\n { defName: 'faqToggleItem', schema: ToggleFaqItemSchema.innerType() },\n { defName: 'faqUpdate', schema: UpdateFaqSchema.innerType() },\n];\n\n// ============================================================================\n// Tile Widget Props Export\n// ============================================================================\n\n/**\n * Tile widget definitions for unified JSON Schema generation.\n * Maps widget IDs to their props validation schema so the build script\n * can inject if/then constraints on tile.props.\n */\nexport const tileWidgets = [\n { widget: 'adaptive-faq:accordion', defName: 'faqAccordionProps', propsSchema: configSchema },\n];\n\n// ============================================================================\n// Capabilities Documentation (injected into JSON Schema for LLM prompts)\n// ============================================================================\n\nexport const CAPABILITIES_DOCUMENTATION = {\n packageId: 'adaptive-faq',\n plannerSummary:\n 'A grouping (or one) of focused Q&A to educate the user on information they need given their segment/behavior.',\n description:\n 'Collapsible Q&A accordion with actions, rich content, feedback, and personalization.',\n whenToUse: [\n {\n goal: 'Add an FAQ accordion widget',\n action: 'Add a tile with widget: \"adaptive-faq:accordion\"',\n },\n { goal: 'Scroll to and expand a specific FAQ item', action: 'faq:scroll_to' },\n { goal: 'Open, close, or toggle a FAQ item', action: 'faq:toggle_item' },\n { goal: 'Add, remove, reorder, or replace FAQ items', action: 'faq:update' },\n ],\n conventions: [\n {\n name: 'Compositional action pattern',\n description:\n 'faq:question actions are configuration data rendered by the accordion widget, not actions executed by the runtime. This allows per-item conditional visibility via triggerWhen, category grouping under collapsible section headers, and dynamic injection of contextual items.',\n },\n {\n name: 'Answer format \u2014 always prefer markdown',\n description:\n 'Always use a plain string with markdown for FAQ answers. The only real reason to reach for the \"rich\" HTML variant is when the answer needs an HTML element markdown cannot produce \u2014 a real <button>, an <iframe>, a <form>, or a structural <table>. Bold/italic, links, lists, code blocks, and inline images all render fine from a plain string. The \"markdown\" object variant exists only for named-asset references with metadata; otherwise a plain string is simpler.',\n },\n {\n name: 'Feedback events',\n description:\n 'When feedback is enabled, user feedback events are published via context.publishEvent for analytics integration.',\n },\n ],\n events: [\n {\n name: 'faq:feedback_submitted',\n when: 'User submits feedback on a FAQ answer',\n props: '{ questionId, style, value }',\n },\n ],\n};\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;AAqBA,IAAM,SAAS,iBACZ,OAAO;AAAA,EACN,IAAI,iBACD,OAAO,EACP,SAAS,0EAA0E;AAAA,EACtF,MAAM,iBACH,KAAK,CAAC,SAAS,OAAO,CAAC,EACvB,SAAS,gEAAgE;AAAA,EAC5E,KAAK,iBAAE,OAAO,EAAE,SAAS,kCAAkC;AAAA,EAC3D,KAAK,iBAAE,OAAO,EAAE,SAAS,EAAE,SAAS,+CAA+C;AAAA,EACnF,OAAO,iBAAE,OAAO,EAAE,SAAS,EAAE,SAAS,mCAAmC;AAAA,EACzE,QAAQ,iBAAE,OAAO,EAAE,SAAS,EAAE,SAAS,oCAAoC;AAC7E,CAAC,EACA;AAAA,EACC;AACF;AAGF,IAAM,kBAAkB,iBACrB,OAAO;AAAA,EACN,MAAM,iBACH,QAAQ,MAAM,EACd;AAAA,IACC;AAAA,EACF;AAAA,EACF,MAAM,iBAAE,OAAO,EAAE,SAAS,6DAA6D;AACzF,CAAC,EACA;AAAA,EACC;AACF;AAGF,IAAM,0BAA0B,iBAC7B,OAAO;AAAA,EACN,MAAM,iBACH,QAAQ,UAAU,EAClB;AAAA,IACC;AAAA,EACF;AAAA,EACF,SAAS,iBACN,OAAO,EACP;AAAA,IACC;AAAA,EACF;AAAA,EACF,QAAQ,iBACL,MAAM,MAAM,EACZ,SAAS,EACT,SAAS,yEAAyE;AACvF,CAAC,EACA;AAAA,EACC;AACF;AAGF,IAAM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4CAA4C,QAAQ,gBAAgB;AAAA,IAC5E,EAAE,MAAM,qCAAqC,QAAQ,kBAAkB;AAAA,IACvE,EAAE,MAAM,8CAA8C,QAAQ,aAAa;AAAA,EAC7E;AAAA,EACA,aAAa;AAAA,IACX;AAAA,MACE,MAAM;AAAA,MACN,aACE;AAAA,IACJ;AAAA,IACA;AAAA,MACE,MAAM;AAAA,MACN,aACE;AAAA,IACJ;AAAA,IACA;AAAA,MACE,MAAM;AAAA,MACN,aACE;AAAA,IACJ;AAAA,EACF;AAAA,EACA,QAAQ;AAAA,IACN;AAAA,MACE,MAAM;AAAA,MACN,MAAM;AAAA,MACN,OAAO;AAAA,IACT;AAAA,EACF;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@syntrologie/adapt-faq",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.56.0",
|
|
4
4
|
"description": "Adaptive FAQ - Collapsible Q&A accordion with per-item conditional visibility",
|
|
5
5
|
"license": "Proprietary",
|
|
6
6
|
"private": false,
|
|
@@ -51,8 +51,7 @@
|
|
|
51
51
|
"test:watch": "vitest"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
|
-
"lit": "^3.0.0"
|
|
55
|
-
"zod": "^3.0.0"
|
|
54
|
+
"lit": "^3.0.0"
|
|
56
55
|
},
|
|
57
56
|
"dependencies": {
|
|
58
57
|
"marked": "17.0.4"
|