@helpai/elements 0.12.0 → 0.12.1
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/configurator.mjs +7 -18
- package/elements-web-component.esm.js +15 -15
- package/elements-web-component.esm.js.map +3 -3
- package/elements.cjs.js +2 -2
- package/elements.cjs.js.map +3 -3
- package/elements.esm.js +2 -2
- package/elements.esm.js.map +3 -3
- package/elements.js +23 -23
- package/elements.js.map +3 -3
- package/index.d.ts +18 -22
- package/index.mjs +9 -31
- package/package.json +1 -1
- package/schema.d.ts +22 -47
- package/schema.json +84 -234
- package/schema.mjs +7 -18
- package/web-component.mjs +11 -42
package/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as Asset, B as BlocksConfig, C as ConnectionConfig, a as ConnectionConfigPartial, L as Link, S as ServerConfig, b as SiteConfig, c as StartSessionResponse, W as WidgetConfig, d as WidgetConfigPartial, e as WidgetSettings, f as WidgetSettingsPartial } from './deployment-
|
|
1
|
+
export { A as Asset, B as BlocksConfig, C as ConnectionConfig, a as ConnectionConfigPartial, L as Link, S as ServerConfig, b as SiteConfig, c as StartSessionResponse, W as WidgetConfig, d as WidgetConfigPartial, e as WidgetSettings, f as WidgetSettingsPartial } from './deployment-JVnkJNsR.js';
|
|
2
2
|
import 'zod';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -284,32 +284,28 @@ interface WelcomeOptions {
|
|
|
284
284
|
speed?: number;
|
|
285
285
|
}
|
|
286
286
|
/**
|
|
287
|
-
* Identifiers for every header action the widget can render.
|
|
288
|
-
* `HeaderActionsOption.main` / `.overflow` lists is preserved in the UI.
|
|
287
|
+
* Identifiers for every header action the widget can render.
|
|
289
288
|
*
|
|
290
|
-
*
|
|
289
|
+
* `history` + `close` render as dedicated header buttons; the rest appear in
|
|
290
|
+
* the ⋯ overflow menu. The enabled set is a flat {@link ActionList}; order is
|
|
291
|
+
* irrelevant (the menu has a fixed layout). Unlisted actions are hidden.
|
|
292
|
+
*
|
|
293
|
+
* - `clear` — Start a new conversation (compose icon).
|
|
291
294
|
* - `expand` — Toggle `normal` ↔ `expanded` (1.5× panel).
|
|
292
295
|
* - `fullscreen` — Toggle `normal` ↔ `fullscreen` (viewport fill).
|
|
293
296
|
* - `popOut` — Open the conversation in a new browser tab.
|
|
294
297
|
* - `sound` — Toggle notification sounds + haptics on/off (switch-style).
|
|
295
|
-
* - `language` —
|
|
296
|
-
* - `theme` —
|
|
298
|
+
* - `language` — Switch the UI locale at runtime.
|
|
299
|
+
* - `theme` — Cycle `auto` / `light` / `dark`.
|
|
297
300
|
* - `close` — Close the floating panel.
|
|
298
301
|
*/
|
|
299
302
|
type ActionName = "clear" | "expand" | "fullscreen" | "popOut" | "sound" | "history" | "language" | "theme" | "close";
|
|
300
303
|
/**
|
|
301
|
-
*
|
|
302
|
-
*
|
|
303
|
-
*
|
|
304
|
-
* - `overflow` — rendered as icon + label rows under the 3-dot menu.
|
|
305
|
-
*
|
|
306
|
-
* Unlisted actions are **hidden**. Order is preserved. Per-mode defaults
|
|
307
|
-
* (`DEFAULT_ACTIONS_BY_MODE`) pick sensible placements for each mode.
|
|
304
|
+
* The header's enabled actions. Unlisted actions are hidden; order is
|
|
305
|
+
* irrelevant. Per-mode defaults (`DEFAULT_ACTIONS_BY_MODE`) pick a sensible
|
|
306
|
+
* set for each mode; a deployment can replace the whole list.
|
|
308
307
|
*/
|
|
309
|
-
|
|
310
|
-
main?: ActionName[];
|
|
311
|
-
overflow?: ActionName[];
|
|
312
|
-
}
|
|
308
|
+
type ActionList = ActionName[];
|
|
313
309
|
|
|
314
310
|
/**
|
|
315
311
|
* Composer + features. The send-button skin, attachment limits, voice
|
|
@@ -677,11 +673,11 @@ interface BehaviorOptions {
|
|
|
677
673
|
popOutUrl?: string;
|
|
678
674
|
}
|
|
679
675
|
/**
|
|
680
|
-
* Section: panel header actions —
|
|
681
|
-
*
|
|
676
|
+
* Section: panel header actions — the enabled set (`history`/`close` buttons +
|
|
677
|
+
* ⋯ menu). Unlisted actions are hidden.
|
|
682
678
|
*/
|
|
683
679
|
interface HeaderOptions {
|
|
684
|
-
actions?:
|
|
680
|
+
actions?: ActionList;
|
|
685
681
|
}
|
|
686
682
|
/**
|
|
687
683
|
* Section: locale resolution + per-instance string overrides.
|
|
@@ -914,11 +910,11 @@ interface ResolvedOptions {
|
|
|
914
910
|
locale: string;
|
|
915
911
|
/**
|
|
916
912
|
* Locales offered in the language switcher. Empty array hides the
|
|
917
|
-
*
|
|
913
|
+
* language action even when it's enabled.
|
|
918
914
|
*/
|
|
919
915
|
availableLocales: string[];
|
|
920
916
|
startMinimized: boolean;
|
|
921
|
-
actions:
|
|
917
|
+
actions: ActionList;
|
|
922
918
|
size: SizeOptions;
|
|
923
919
|
launcher: Required<Omit<LauncherOptions, "callout" | "label">> & {
|
|
924
920
|
/** Label is optional even after resolution (`circle` variant has no label). */
|
package/index.mjs
CHANGED
|
@@ -322,30 +322,12 @@ var DEFAULT_LAUNCHER = {
|
|
|
322
322
|
hidden: false
|
|
323
323
|
};
|
|
324
324
|
var DEFAULT_ACTIONS_BY_MODE = {
|
|
325
|
-
floating:
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
overflow: ["clear", "fullscreen", "popOut", "sound", "language"]
|
|
332
|
-
},
|
|
333
|
-
standalone: {
|
|
334
|
-
main: ["theme", "history"],
|
|
335
|
-
overflow: ["clear", "sound", "language"]
|
|
336
|
-
},
|
|
337
|
-
page: {
|
|
338
|
-
main: ["theme", "history"],
|
|
339
|
-
overflow: ["clear", "sound", "language"]
|
|
340
|
-
},
|
|
341
|
-
modal: {
|
|
342
|
-
main: ["theme", "history", "close"],
|
|
343
|
-
overflow: ["clear", "fullscreen", "popOut", "sound", "language"]
|
|
344
|
-
},
|
|
345
|
-
drawer: {
|
|
346
|
-
main: ["theme", "history", "close"],
|
|
347
|
-
overflow: ["clear", "fullscreen", "popOut", "sound", "language"]
|
|
348
|
-
}
|
|
325
|
+
floating: ["theme", "history", "close", "clear", "expand", "fullscreen", "popOut", "sound", "language"],
|
|
326
|
+
inline: ["theme", "history", "close", "clear", "fullscreen", "popOut", "sound", "language"],
|
|
327
|
+
standalone: ["theme", "history", "clear", "sound", "language"],
|
|
328
|
+
page: ["theme", "history", "clear", "sound", "language"],
|
|
329
|
+
modal: ["theme", "history", "close", "clear", "fullscreen", "popOut", "sound", "language"],
|
|
330
|
+
drawer: ["theme", "history", "close", "clear", "fullscreen", "popOut", "sound", "language"]
|
|
349
331
|
};
|
|
350
332
|
var DEFAULT_SOUND = {
|
|
351
333
|
enabled: true,
|
|
@@ -434,11 +416,7 @@ function resolveDefaultLocale(input) {
|
|
|
434
416
|
return typeof navigator !== "undefined" && navigator.language ? navigator.language : "en";
|
|
435
417
|
}
|
|
436
418
|
function resolveActions(mode, overrides) {
|
|
437
|
-
|
|
438
|
-
return {
|
|
439
|
-
main: overrides?.main ?? defaults.main,
|
|
440
|
-
overflow: overrides?.overflow ?? defaults.overflow
|
|
441
|
-
};
|
|
419
|
+
return overrides ?? DEFAULT_ACTIONS_BY_MODE[mode];
|
|
442
420
|
}
|
|
443
421
|
function resolveSound(overrides) {
|
|
444
422
|
return {
|
|
@@ -2759,7 +2737,7 @@ function isActionVisible(name, mode, panelSize, ctx) {
|
|
|
2759
2737
|
}
|
|
2760
2738
|
function canShowClose(mode, panelSize, actions) {
|
|
2761
2739
|
if (!isActionVisible("close", mode, panelSize)) return false;
|
|
2762
|
-
return actions.
|
|
2740
|
+
return actions.includes("close");
|
|
2763
2741
|
}
|
|
2764
2742
|
function resolveCloseAction(mode, panelSize) {
|
|
2765
2743
|
if (mode === "inline" && panelSize === "fullscreen") return "exit-fullscreen";
|
|
@@ -3459,7 +3437,7 @@ function HeaderActions({ panelProps, variant }) {
|
|
|
3459
3437
|
const mode = options.mode;
|
|
3460
3438
|
const isChat = variant === "chat";
|
|
3461
3439
|
const muted = useComputed(() => feedback.mutedSig.value).value;
|
|
3462
|
-
const enabled =
|
|
3440
|
+
const enabled = new Set(options.actions);
|
|
3463
3441
|
const has = (name) => enabled.has(name);
|
|
3464
3442
|
const visible = (name) => isActionVisible(name, mode, panelSize, { popOutUrl: options.popOutUrl });
|
|
3465
3443
|
const themeMode = options.themeMode;
|
package/package.json
CHANGED
package/schema.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as Asset, B as BlocksConfig, C as ConnectionConfig, a as ConnectionConfigPartial, E as Endpoints, L as Link, P as PAGE_AREA_SUGGESTIONS, g as PageContext, S as ServerConfig, b as SiteConfig, c as StartSessionResponse, U as UserContext, W as WidgetConfig, d as WidgetConfigPartial, e as WidgetSettings, f as WidgetSettingsPartial, h as assetSchema, i as blocksConfigSchema, j as connectionConfigPartialSchema, k as connectionConfigSchema, l as cssColorSchema, m as cssLengthSchema, n as endpointsSchema, o as linkSchema, p as localeSchema, q as pageContextSchema, s as serverConfigSchema, r as siteConfigSchema, t as startSessionResponseSchema, u as userContextSchema, v as uuid7Schema, w as widgetConfigPartialSchema, x as widgetConfigSchema, y as widgetSettingsPartialSchema, z as widgetSettingsSchema } from './deployment-
|
|
1
|
+
export { A as Asset, B as BlocksConfig, C as ConnectionConfig, a as ConnectionConfigPartial, E as Endpoints, L as Link, P as PAGE_AREA_SUGGESTIONS, g as PageContext, S as ServerConfig, b as SiteConfig, c as StartSessionResponse, U as UserContext, W as WidgetConfig, d as WidgetConfigPartial, e as WidgetSettings, f as WidgetSettingsPartial, h as assetSchema, i as blocksConfigSchema, j as connectionConfigPartialSchema, k as connectionConfigSchema, l as cssColorSchema, m as cssLengthSchema, n as endpointsSchema, o as linkSchema, p as localeSchema, q as pageContextSchema, s as serverConfigSchema, r as siteConfigSchema, t as startSessionResponseSchema, u as userContextSchema, v as uuid7Schema, w as widgetConfigPartialSchema, x as widgetConfigSchema, y as widgetSettingsPartialSchema, z as widgetSettingsSchema } from './deployment-JVnkJNsR.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -310,14 +310,15 @@ declare const featureFlagsSchema: z.ZodObject<{
|
|
|
310
310
|
type FeatureFlags = z.infer<typeof featureFlagsSchema>;
|
|
311
311
|
|
|
312
312
|
/**
|
|
313
|
-
* Header section
|
|
314
|
-
* bar and where (main row of icons vs. the ⋯ overflow menu).
|
|
313
|
+
* Header section schema — which actions the panel header exposes.
|
|
315
314
|
*
|
|
315
|
+
* `history` + `close` render as dedicated buttons; everything else lives in the
|
|
316
|
+
* ⋯ overflow menu (fixed layout, so list order is irrelevant — it's a set).
|
|
316
317
|
* Per-mode defaults live in `core/config/defaults.ts`
|
|
317
318
|
* (`DEFAULT_ACTIONS_BY_MODE`). The `isActionVisible(...)` helper in
|
|
318
|
-
* `ui/action-visibility.ts` filters at render time so a listed action
|
|
319
|
-
*
|
|
320
|
-
*
|
|
319
|
+
* `ui/action-visibility.ts` filters at render time so a listed action can still
|
|
320
|
+
* be hidden in a state where it would no-op (e.g. `close` in inline-normal,
|
|
321
|
+
* `popOut` in standalone).
|
|
321
322
|
*/
|
|
322
323
|
|
|
323
324
|
declare const actionNameSchema: z.ZodEnum<{
|
|
@@ -332,19 +333,21 @@ declare const actionNameSchema: z.ZodEnum<{
|
|
|
332
333
|
sound: "sound";
|
|
333
334
|
}>;
|
|
334
335
|
type ActionName = z.infer<typeof actionNameSchema>;
|
|
335
|
-
declare const headerActionsSchema: z.
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
336
|
+
declare const headerActionsSchema: z.ZodArray<z.ZodEnum<{
|
|
337
|
+
close: "close";
|
|
338
|
+
expand: "expand";
|
|
339
|
+
fullscreen: "fullscreen";
|
|
340
|
+
popOut: "popOut";
|
|
341
|
+
clear: "clear";
|
|
342
|
+
theme: "theme";
|
|
343
|
+
language: "language";
|
|
344
|
+
history: "history";
|
|
345
|
+
sound: "sound";
|
|
346
|
+
}>>;
|
|
347
|
+
type HeaderActions = z.infer<typeof headerActionsSchema>;
|
|
348
|
+
/** Section wrapper — `actions` list wrapped under `header` in the dashboard form. */
|
|
349
|
+
declare const headerSchema: z.ZodObject<{
|
|
350
|
+
actions: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
348
351
|
close: "close";
|
|
349
352
|
expand: "expand";
|
|
350
353
|
fullscreen: "fullscreen";
|
|
@@ -356,34 +359,6 @@ declare const headerActionsSchema: z.ZodObject<{
|
|
|
356
359
|
sound: "sound";
|
|
357
360
|
}>>>;
|
|
358
361
|
}, z.core.$loose>;
|
|
359
|
-
type HeaderActions = z.infer<typeof headerActionsSchema>;
|
|
360
|
-
/** Section wrapper — same shape, wrapped under `header` in the dashboard form. */
|
|
361
|
-
declare const headerSchema: z.ZodObject<{
|
|
362
|
-
actions: z.ZodOptional<z.ZodObject<{
|
|
363
|
-
main: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
364
|
-
close: "close";
|
|
365
|
-
expand: "expand";
|
|
366
|
-
fullscreen: "fullscreen";
|
|
367
|
-
popOut: "popOut";
|
|
368
|
-
clear: "clear";
|
|
369
|
-
theme: "theme";
|
|
370
|
-
language: "language";
|
|
371
|
-
history: "history";
|
|
372
|
-
sound: "sound";
|
|
373
|
-
}>>>;
|
|
374
|
-
overflow: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
375
|
-
close: "close";
|
|
376
|
-
expand: "expand";
|
|
377
|
-
fullscreen: "fullscreen";
|
|
378
|
-
popOut: "popOut";
|
|
379
|
-
clear: "clear";
|
|
380
|
-
theme: "theme";
|
|
381
|
-
language: "language";
|
|
382
|
-
history: "history";
|
|
383
|
-
sound: "sound";
|
|
384
|
-
}>>>;
|
|
385
|
-
}, z.core.$loose>>;
|
|
386
|
-
}, z.core.$loose>;
|
|
387
362
|
type HeaderOptions = z.infer<typeof headerSchema>;
|
|
388
363
|
|
|
389
364
|
/**
|
package/schema.json
CHANGED
|
@@ -707,114 +707,43 @@
|
|
|
707
707
|
"type": "object",
|
|
708
708
|
"properties": {
|
|
709
709
|
"actions": {
|
|
710
|
-
"description": "
|
|
711
|
-
"
|
|
712
|
-
"
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
"
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
],
|
|
727
|
-
[
|
|
728
|
-
"close"
|
|
729
|
-
]
|
|
730
|
-
],
|
|
731
|
-
"maxItems": 8,
|
|
732
|
-
"type": "array",
|
|
733
|
-
"items": {
|
|
734
|
-
"type": "string",
|
|
735
|
-
"enum": [
|
|
736
|
-
"clear",
|
|
737
|
-
"expand",
|
|
738
|
-
"fullscreen",
|
|
739
|
-
"popOut",
|
|
740
|
-
"sound",
|
|
741
|
-
"history",
|
|
742
|
-
"language",
|
|
743
|
-
"theme",
|
|
744
|
-
"close"
|
|
745
|
-
]
|
|
746
|
-
}
|
|
747
|
-
},
|
|
748
|
-
"overflow": {
|
|
749
|
-
"default": [],
|
|
750
|
-
"description": "Actions tucked under the 3-dot ⋯ menu (icon + label rows). Same list of ids as `main`. Promote items to `main` to make them always-visible icons; demote them back here to hide them behind the menu.",
|
|
751
|
-
"examples": [
|
|
752
|
-
[
|
|
753
|
-
"clear",
|
|
754
|
-
"expand",
|
|
755
|
-
"fullscreen",
|
|
756
|
-
"popOut",
|
|
757
|
-
"sound",
|
|
758
|
-
"language"
|
|
759
|
-
],
|
|
760
|
-
[
|
|
761
|
-
"clear",
|
|
762
|
-
"popOut",
|
|
763
|
-
"sound"
|
|
764
|
-
],
|
|
765
|
-
[]
|
|
766
|
-
],
|
|
767
|
-
"maxItems": 8,
|
|
768
|
-
"type": "array",
|
|
769
|
-
"items": {
|
|
770
|
-
"type": "string",
|
|
771
|
-
"enum": [
|
|
772
|
-
"clear",
|
|
773
|
-
"expand",
|
|
774
|
-
"fullscreen",
|
|
775
|
-
"popOut",
|
|
776
|
-
"sound",
|
|
777
|
-
"history",
|
|
778
|
-
"language",
|
|
779
|
-
"theme",
|
|
780
|
-
"close"
|
|
781
|
-
]
|
|
782
|
-
}
|
|
783
|
-
}
|
|
710
|
+
"description": "Which header actions are enabled (history/✕ buttons + ⋯ menu).",
|
|
711
|
+
"maxItems": 9,
|
|
712
|
+
"type": "array",
|
|
713
|
+
"items": {
|
|
714
|
+
"type": "string",
|
|
715
|
+
"enum": [
|
|
716
|
+
"clear",
|
|
717
|
+
"expand",
|
|
718
|
+
"fullscreen",
|
|
719
|
+
"popOut",
|
|
720
|
+
"sound",
|
|
721
|
+
"history",
|
|
722
|
+
"language",
|
|
723
|
+
"theme",
|
|
724
|
+
"close"
|
|
725
|
+
]
|
|
784
726
|
},
|
|
785
|
-
"required": [
|
|
786
|
-
"main",
|
|
787
|
-
"overflow"
|
|
788
|
-
],
|
|
789
|
-
"additionalProperties": {},
|
|
790
727
|
"examples": [
|
|
791
|
-
|
|
792
|
-
"
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
"
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
"clear",
|
|
811
|
-
"theme"
|
|
812
|
-
]
|
|
813
|
-
},
|
|
814
|
-
{
|
|
815
|
-
"main": [],
|
|
816
|
-
"overflow": []
|
|
817
|
-
}
|
|
728
|
+
[
|
|
729
|
+
"theme",
|
|
730
|
+
"history",
|
|
731
|
+
"close",
|
|
732
|
+
"clear",
|
|
733
|
+
"fullscreen",
|
|
734
|
+
"popOut",
|
|
735
|
+
"sound",
|
|
736
|
+
"language"
|
|
737
|
+
],
|
|
738
|
+
[
|
|
739
|
+
"theme",
|
|
740
|
+
"history",
|
|
741
|
+
"clear",
|
|
742
|
+
"language"
|
|
743
|
+
],
|
|
744
|
+
[
|
|
745
|
+
"close"
|
|
746
|
+
]
|
|
818
747
|
]
|
|
819
748
|
}
|
|
820
749
|
},
|
|
@@ -822,17 +751,13 @@
|
|
|
822
751
|
"description": "Panel-header configuration.",
|
|
823
752
|
"examples": [
|
|
824
753
|
{
|
|
825
|
-
"actions":
|
|
826
|
-
"
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
"clear",
|
|
833
|
-
"fullscreen"
|
|
834
|
-
]
|
|
835
|
-
}
|
|
754
|
+
"actions": [
|
|
755
|
+
"theme",
|
|
756
|
+
"history",
|
|
757
|
+
"close",
|
|
758
|
+
"clear",
|
|
759
|
+
"fullscreen"
|
|
760
|
+
]
|
|
836
761
|
}
|
|
837
762
|
]
|
|
838
763
|
},
|
|
@@ -2179,114 +2104,43 @@
|
|
|
2179
2104
|
"type": "object",
|
|
2180
2105
|
"properties": {
|
|
2181
2106
|
"actions": {
|
|
2182
|
-
"description": "
|
|
2183
|
-
"
|
|
2184
|
-
"
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
"
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
],
|
|
2199
|
-
[
|
|
2200
|
-
"close"
|
|
2201
|
-
]
|
|
2202
|
-
],
|
|
2203
|
-
"maxItems": 8,
|
|
2204
|
-
"type": "array",
|
|
2205
|
-
"items": {
|
|
2206
|
-
"type": "string",
|
|
2207
|
-
"enum": [
|
|
2208
|
-
"clear",
|
|
2209
|
-
"expand",
|
|
2210
|
-
"fullscreen",
|
|
2211
|
-
"popOut",
|
|
2212
|
-
"sound",
|
|
2213
|
-
"history",
|
|
2214
|
-
"language",
|
|
2215
|
-
"theme",
|
|
2216
|
-
"close"
|
|
2217
|
-
]
|
|
2218
|
-
}
|
|
2219
|
-
},
|
|
2220
|
-
"overflow": {
|
|
2221
|
-
"default": [],
|
|
2222
|
-
"description": "Actions tucked under the 3-dot ⋯ menu (icon + label rows). Same list of ids as `main`. Promote items to `main` to make them always-visible icons; demote them back here to hide them behind the menu.",
|
|
2223
|
-
"examples": [
|
|
2224
|
-
[
|
|
2225
|
-
"clear",
|
|
2226
|
-
"expand",
|
|
2227
|
-
"fullscreen",
|
|
2228
|
-
"popOut",
|
|
2229
|
-
"sound",
|
|
2230
|
-
"language"
|
|
2231
|
-
],
|
|
2232
|
-
[
|
|
2233
|
-
"clear",
|
|
2234
|
-
"popOut",
|
|
2235
|
-
"sound"
|
|
2236
|
-
],
|
|
2237
|
-
[]
|
|
2238
|
-
],
|
|
2239
|
-
"maxItems": 8,
|
|
2240
|
-
"type": "array",
|
|
2241
|
-
"items": {
|
|
2242
|
-
"type": "string",
|
|
2243
|
-
"enum": [
|
|
2244
|
-
"clear",
|
|
2245
|
-
"expand",
|
|
2246
|
-
"fullscreen",
|
|
2247
|
-
"popOut",
|
|
2248
|
-
"sound",
|
|
2249
|
-
"history",
|
|
2250
|
-
"language",
|
|
2251
|
-
"theme",
|
|
2252
|
-
"close"
|
|
2253
|
-
]
|
|
2254
|
-
}
|
|
2255
|
-
}
|
|
2107
|
+
"description": "Which header actions are enabled (history/✕ buttons + ⋯ menu).",
|
|
2108
|
+
"maxItems": 9,
|
|
2109
|
+
"type": "array",
|
|
2110
|
+
"items": {
|
|
2111
|
+
"type": "string",
|
|
2112
|
+
"enum": [
|
|
2113
|
+
"clear",
|
|
2114
|
+
"expand",
|
|
2115
|
+
"fullscreen",
|
|
2116
|
+
"popOut",
|
|
2117
|
+
"sound",
|
|
2118
|
+
"history",
|
|
2119
|
+
"language",
|
|
2120
|
+
"theme",
|
|
2121
|
+
"close"
|
|
2122
|
+
]
|
|
2256
2123
|
},
|
|
2257
|
-
"required": [
|
|
2258
|
-
"main",
|
|
2259
|
-
"overflow"
|
|
2260
|
-
],
|
|
2261
|
-
"additionalProperties": {},
|
|
2262
2124
|
"examples": [
|
|
2263
|
-
|
|
2264
|
-
"
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
"
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
"clear",
|
|
2283
|
-
"theme"
|
|
2284
|
-
]
|
|
2285
|
-
},
|
|
2286
|
-
{
|
|
2287
|
-
"main": [],
|
|
2288
|
-
"overflow": []
|
|
2289
|
-
}
|
|
2125
|
+
[
|
|
2126
|
+
"theme",
|
|
2127
|
+
"history",
|
|
2128
|
+
"close",
|
|
2129
|
+
"clear",
|
|
2130
|
+
"fullscreen",
|
|
2131
|
+
"popOut",
|
|
2132
|
+
"sound",
|
|
2133
|
+
"language"
|
|
2134
|
+
],
|
|
2135
|
+
[
|
|
2136
|
+
"theme",
|
|
2137
|
+
"history",
|
|
2138
|
+
"clear",
|
|
2139
|
+
"language"
|
|
2140
|
+
],
|
|
2141
|
+
[
|
|
2142
|
+
"close"
|
|
2143
|
+
]
|
|
2290
2144
|
]
|
|
2291
2145
|
}
|
|
2292
2146
|
},
|
|
@@ -2294,17 +2148,13 @@
|
|
|
2294
2148
|
"description": "Panel-header configuration.",
|
|
2295
2149
|
"examples": [
|
|
2296
2150
|
{
|
|
2297
|
-
"actions":
|
|
2298
|
-
"
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
"clear",
|
|
2305
|
-
"fullscreen"
|
|
2306
|
-
]
|
|
2307
|
-
}
|
|
2151
|
+
"actions": [
|
|
2152
|
+
"theme",
|
|
2153
|
+
"history",
|
|
2154
|
+
"close",
|
|
2155
|
+
"clear",
|
|
2156
|
+
"fullscreen"
|
|
2157
|
+
]
|
|
2308
2158
|
}
|
|
2309
2159
|
]
|
|
2310
2160
|
},
|
package/schema.mjs
CHANGED
|
@@ -247,30 +247,19 @@ var actionNameSchema = z8.enum([
|
|
|
247
247
|
"theme",
|
|
248
248
|
"close"
|
|
249
249
|
]);
|
|
250
|
-
var headerActionsSchema = z8.
|
|
251
|
-
|
|
252
|
-
"Actions rendered as icon buttons in the panel's top bar (left-to-right). Always visible. Order is preserved. Pick from: `clear`, `expand`, `fullscreen`, `popOut`, `sound`, `history`, `language`, `theme`, `close`. Anything not listed in `main` or `overflow` is hidden."
|
|
253
|
-
).meta({
|
|
254
|
-
examples: [["theme", "history", "close"], ["language", "theme", "close"], ["close"]]
|
|
255
|
-
}),
|
|
256
|
-
overflow: z8.array(actionNameSchema).max(8).default([]).describe(
|
|
257
|
-
"Actions tucked under the 3-dot \u22EF menu (icon + label rows). Same list of ids as `main`. Promote items to `main` to make them always-visible icons; demote them back here to hide them behind the menu."
|
|
258
|
-
).meta({
|
|
259
|
-
examples: [["clear", "expand", "fullscreen", "popOut", "sound", "language"], ["clear", "popOut", "sound"], []]
|
|
260
|
-
})
|
|
261
|
-
}).loose().describe(
|
|
262
|
-
"Which actions appear in the panel header and where. `main` = always-visible icon buttons; `overflow` = items under the \u22EF menu. Anything not listed is hidden. Per-mode defaults live in `DEFAULT_ACTIONS_BY_MODE`."
|
|
250
|
+
var headerActionsSchema = z8.array(actionNameSchema).max(9).describe(
|
|
251
|
+
"Which actions the header exposes. `history` + `close` are dedicated buttons; the rest appear in the \u22EF menu. Unlisted actions are hidden; order is irrelevant. Pick from: `clear`, `expand`, `fullscreen`, `popOut`, `sound`, `history`, `language`, `theme`, `close`. Per-mode defaults live in `DEFAULT_ACTIONS_BY_MODE`."
|
|
263
252
|
).meta({
|
|
264
253
|
examples: [
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
254
|
+
["theme", "history", "close", "clear", "fullscreen", "popOut", "sound", "language"],
|
|
255
|
+
["theme", "history", "clear", "language"],
|
|
256
|
+
["close"]
|
|
268
257
|
]
|
|
269
258
|
});
|
|
270
259
|
var headerSchema = z8.object({
|
|
271
|
-
actions: headerActionsSchema.optional().describe("
|
|
260
|
+
actions: headerActionsSchema.optional().describe("Which header actions are enabled (history/\u2715 buttons + \u22EF menu).")
|
|
272
261
|
}).loose().describe("Panel-header configuration.").meta({
|
|
273
|
-
examples: [{ actions:
|
|
262
|
+
examples: [{ actions: ["theme", "history", "close", "clear", "fullscreen"] }]
|
|
274
263
|
});
|
|
275
264
|
|
|
276
265
|
// src/schema/widget/feedback.ts
|