@helpai/elements 0.11.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/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-B4_b3Sjy.js';
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 schemas — which actions appear in the panel's top
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
- * can still be hidden in a state where it would no-op (e.g. `close`
320
- * in inline-normal, `popOut` in standalone).
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.ZodObject<{
336
- main: z.ZodDefault<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
- overflow: z.ZodDefault<z.ZodArray<z.ZodEnum<{
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": "Action layout main row vs.overflow menu.",
711
- "type": "object",
712
- "properties": {
713
- "main": {
714
- "default": [],
715
- "description": "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.",
716
- "examples": [
717
- [
718
- "theme",
719
- "history",
720
- "close"
721
- ],
722
- [
723
- "language",
724
- "theme",
725
- "close"
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
- "main": [
793
- "theme",
794
- "history",
795
- "close"
796
- ],
797
- "overflow": [
798
- "clear",
799
- "fullscreen",
800
- "popOut",
801
- "sound",
802
- "language"
803
- ]
804
- },
805
- {
806
- "main": [
807
- "close"
808
- ],
809
- "overflow": [
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
- "main": [
827
- "theme",
828
- "history",
829
- "close"
830
- ],
831
- "overflow": [
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": "Action layout main row vs.overflow menu.",
2183
- "type": "object",
2184
- "properties": {
2185
- "main": {
2186
- "default": [],
2187
- "description": "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.",
2188
- "examples": [
2189
- [
2190
- "theme",
2191
- "history",
2192
- "close"
2193
- ],
2194
- [
2195
- "language",
2196
- "theme",
2197
- "close"
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
- "main": [
2265
- "theme",
2266
- "history",
2267
- "close"
2268
- ],
2269
- "overflow": [
2270
- "clear",
2271
- "fullscreen",
2272
- "popOut",
2273
- "sound",
2274
- "language"
2275
- ]
2276
- },
2277
- {
2278
- "main": [
2279
- "close"
2280
- ],
2281
- "overflow": [
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
- "main": [
2299
- "theme",
2300
- "history",
2301
- "close"
2302
- ],
2303
- "overflow": [
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.object({
251
- main: z8.array(actionNameSchema).max(8).default([]).describe(
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
- { main: ["theme", "history", "close"], overflow: ["clear", "fullscreen", "popOut", "sound", "language"] },
266
- { main: ["close"], overflow: ["clear", "theme"] },
267
- { main: [], overflow: [] }
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("Action layout \u2014 main row vs. \u22EF overflow menu.")
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: { main: ["theme", "history", "close"], overflow: ["clear", "fullscreen"] } }]
262
+ examples: [{ actions: ["theme", "history", "close", "clear", "fullscreen"] }]
274
263
  });
275
264
 
276
265
  // src/schema/widget/feedback.ts