@antelopejs/interface-dms 0.7.4 → 0.8.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 (227) hide show
  1. package/CHANGELOG.md +107 -0
  2. package/dist/auth/index.d.ts +3 -3
  3. package/dist/auth/index.js +11 -9
  4. package/dist/auth/index.js.map +1 -1
  5. package/dist/auth/internal/jwt-auth-decorator.d.ts +20 -0
  6. package/dist/auth/internal/jwt-auth-decorator.js +51 -0
  7. package/dist/auth/internal/jwt-auth-decorator.js.map +1 -0
  8. package/dist/auth/internal/request-authenticators.d.ts +12 -0
  9. package/dist/auth/internal/request-authenticators.js +22 -0
  10. package/dist/auth/internal/request-authenticators.js.map +1 -1
  11. package/dist/base/activity-feed.d.ts +6 -6
  12. package/dist/base/block-registry/types.d.ts +16 -0
  13. package/dist/base/block-types.d.ts +1 -0
  14. package/dist/base/block-types.js +1 -0
  15. package/dist/base/block-types.js.map +1 -1
  16. package/dist/base/chart-card.d.ts +15 -0
  17. package/dist/base/chart-card.js +4 -0
  18. package/dist/base/chart-card.js.map +1 -1
  19. package/dist/base/chart-schemas.d.ts +26 -26
  20. package/dist/base/code-block.d.ts +3 -3
  21. package/dist/base/data-types/compare-types.js +19 -13
  22. package/dist/base/data-types/compare-types.js.map +1 -1
  23. package/dist/base/data-types/core.d.ts +11 -0
  24. package/dist/base/data-types/core.js +14 -1
  25. package/dist/base/data-types/core.js.map +1 -1
  26. package/dist/base/data-types/default-types.d.ts +112 -2
  27. package/dist/base/data-types/default-types.js +90 -19
  28. package/dist/base/data-types/default-types.js.map +1 -1
  29. package/dist/base/data-types/field-types.d.ts +10 -4
  30. package/dist/base/data-types/field-types.js +12 -2
  31. package/dist/base/data-types/field-types.js.map +1 -1
  32. package/dist/base/data-types/internal/compare-types.d.ts +3 -0
  33. package/dist/base/data-types/internal/compare-types.js +7 -0
  34. package/dist/base/data-types/internal/compare-types.js.map +1 -1
  35. package/dist/base/empty-state.d.ts +4 -4
  36. package/dist/base/form-block-schema.d.ts +59 -3
  37. package/dist/base/form-block-schema.js +12 -2
  38. package/dist/base/form-block-schema.js.map +1 -1
  39. package/dist/base/form-schema.d.ts +46 -1
  40. package/dist/base/form-schema.js.map +1 -1
  41. package/dist/base/form-types.d.ts +56 -13
  42. package/dist/base/form-types.js +12 -4
  43. package/dist/base/form-types.js.map +1 -1
  44. package/dist/base/guard.d.ts +6 -6
  45. package/dist/base/helpers/archive-mode-helpers.js +6 -2
  46. package/dist/base/helpers/archive-mode-helpers.js.map +1 -1
  47. package/dist/base/index.d.ts +1 -0
  48. package/dist/base/index.js +1 -0
  49. package/dist/base/index.js.map +1 -1
  50. package/dist/base/internal/form-schema.js +2 -0
  51. package/dist/base/internal/form-schema.js.map +1 -1
  52. package/dist/base/internal/layouts.d.ts +4 -0
  53. package/dist/base/key-value-list.d.ts +12 -9
  54. package/dist/base/key-value-list.js +1 -1
  55. package/dist/base/key-value-list.js.map +1 -1
  56. package/dist/base/kpi-card.d.ts +39 -5
  57. package/dist/base/kpi-card.js +18 -6
  58. package/dist/base/kpi-card.js.map +1 -1
  59. package/dist/base/layouts.d.ts +24 -0
  60. package/dist/base/layouts.js.map +1 -1
  61. package/dist/base/live-toggle.d.ts +11 -0
  62. package/dist/base/live-toggle.js +8 -1
  63. package/dist/base/live-toggle.js.map +1 -1
  64. package/dist/base/page-toolbar.d.ts +158 -0
  65. package/dist/base/page-toolbar.js +198 -0
  66. package/dist/base/page-toolbar.js.map +1 -0
  67. package/dist/base/period-selector.d.ts +9 -2
  68. package/dist/base/period-selector.js.map +1 -1
  69. package/dist/base/placeholder.d.ts +2 -2
  70. package/dist/base/section.d.ts +2 -2
  71. package/dist/base/stack.d.ts +2 -2
  72. package/dist/base/stat-group.d.ts +18 -6
  73. package/dist/base/stat-group.js +9 -0
  74. package/dist/base/stat-group.js.map +1 -1
  75. package/dist/base/table-view/column-display.d.ts +9 -5
  76. package/dist/base/table-view/column-display.js +1 -1
  77. package/dist/base/table-view/column-display.js.map +1 -1
  78. package/dist/base/table-view/data-functions.d.ts +26 -7
  79. package/dist/base/table-view/data-functions.js +10 -6
  80. package/dist/base/table-view/data-functions.js.map +1 -1
  81. package/dist/base/table-view/factory.js +24 -13
  82. package/dist/base/table-view/factory.js.map +1 -1
  83. package/dist/base/table-view/internal/auth.d.ts +2 -0
  84. package/dist/base/table-view/internal/auth.js +3 -1
  85. package/dist/base/table-view/internal/auth.js.map +1 -1
  86. package/dist/base/table-view/internal/factory-helpers.d.ts +5 -0
  87. package/dist/base/table-view/internal/factory-helpers.js +55 -11
  88. package/dist/base/table-view/internal/factory-helpers.js.map +1 -1
  89. package/dist/base/table-view/internal/guards.js +19 -2
  90. package/dist/base/table-view/internal/guards.js.map +1 -1
  91. package/dist/base/table-view/internal/realtime.js +17 -0
  92. package/dist/base/table-view/internal/realtime.js.map +1 -1
  93. package/dist/base/table-view/internal/resource-form.js +1 -0
  94. package/dist/base/table-view/internal/resource-form.js.map +1 -1
  95. package/dist/base/table-view/internal/row-actions-schema.d.ts +296 -0
  96. package/dist/base/table-view/internal/row-actions-schema.js +62 -0
  97. package/dist/base/table-view/internal/row-actions-schema.js.map +1 -0
  98. package/dist/base/table-view/internal/validation.d.ts +15 -3
  99. package/dist/base/table-view/internal/validation.js +70 -2
  100. package/dist/base/table-view/internal/validation.js.map +1 -1
  101. package/dist/base/table-view/meta.d.ts +8 -0
  102. package/dist/base/table-view/meta.js +25 -3
  103. package/dist/base/table-view/meta.js.map +1 -1
  104. package/dist/base/table-view/options.d.ts +90 -16
  105. package/dist/base/table-view/options.js.map +1 -1
  106. package/dist/base/table-view/realtime.d.ts +8 -0
  107. package/dist/base/table-view/realtime.js.map +1 -1
  108. package/dist/base/table-view/routes.js +5 -2
  109. package/dist/base/table-view/routes.js.map +1 -1
  110. package/dist/base/table-view/schema.d.ts +36 -30
  111. package/dist/base/table-view/schema.js +11 -57
  112. package/dist/base/table-view/schema.js.map +1 -1
  113. package/dist/base/table-view/source.d.ts +1 -1
  114. package/dist/base/table-view/source.js +4 -1
  115. package/dist/base/table-view/source.js.map +1 -1
  116. package/dist/base/table-view.d.ts +2 -2
  117. package/dist/base/table-view.js.map +1 -1
  118. package/dist/base/top-list-card.d.ts +5 -5
  119. package/dist/base/types/action-target.d.ts +77 -20
  120. package/dist/base/types/confirm-dialog.d.ts +5 -1
  121. package/dist/base/types/custom-button.d.ts +5 -3
  122. package/dist/base/types/field-config.d.ts +4 -4
  123. package/dist/base/types/guards.d.ts +10 -0
  124. package/dist/base/types/row-action.d.ts +6 -1
  125. package/dist/base/types/size.d.ts +3 -1
  126. package/dist/client-ip.d.ts +6 -2
  127. package/dist/client-ip.js +4 -2
  128. package/dist/client-ip.js.map +1 -1
  129. package/dist/component.d.ts +8 -0
  130. package/dist/component.js.map +1 -1
  131. package/dist/data-controllers/members.d.ts +0 -3
  132. package/dist/data-controllers/members.js +30 -8
  133. package/dist/data-controllers/members.js.map +1 -1
  134. package/dist/db/internal/tenantLifecycle.model.js +5 -2
  135. package/dist/db/internal/tenantLifecycle.model.js.map +1 -1
  136. package/dist/guards.js +2 -3
  137. package/dist/guards.js.map +1 -1
  138. package/dist/hooks.d.ts +41 -5
  139. package/dist/hooks.js +5 -1
  140. package/dist/hooks.js.map +1 -1
  141. package/dist/index.d.ts +3 -3
  142. package/dist/index.js +3 -2
  143. package/dist/index.js.map +1 -1
  144. package/dist/internal/invite-membership.d.ts +9 -0
  145. package/dist/internal/invite-membership.js +25 -7
  146. package/dist/internal/invite-membership.js.map +1 -1
  147. package/dist/internal/member-changes.d.ts +24 -0
  148. package/dist/internal/member-changes.js +66 -0
  149. package/dist/internal/member-changes.js.map +1 -0
  150. package/dist/internal/tenant-ownership.d.ts +4 -1
  151. package/dist/internal/tenant-ownership.js +4 -10
  152. package/dist/internal/tenant-ownership.js.map +1 -1
  153. package/dist/invite-extensions.d.ts +0 -9
  154. package/dist/invite-extensions.js +1 -36
  155. package/dist/invite-extensions.js.map +1 -1
  156. package/dist/invite-resolution.js +6 -2
  157. package/dist/invite-resolution.js.map +1 -1
  158. package/dist/invites.js +36 -22
  159. package/dist/invites.js.map +1 -1
  160. package/dist/layout-banners.d.ts +40 -4
  161. package/dist/layout-banners.js +25 -3
  162. package/dist/layout-banners.js.map +1 -1
  163. package/dist/notifications/internal.d.ts +2 -2
  164. package/dist/notifications/internal.js.map +1 -1
  165. package/dist/notifications/sendable.d.ts +3 -2
  166. package/dist/notifications/sendable.js +2 -1
  167. package/dist/notifications/sendable.js.map +1 -1
  168. package/dist/notifications/types.d.ts +9 -0
  169. package/dist/page/controllers.d.ts +44 -0
  170. package/dist/page/controllers.js +14 -1
  171. package/dist/page/controllers.js.map +1 -1
  172. package/dist/page/internal/layout-filter.d.ts +2 -1
  173. package/dist/page/internal/layout-filter.js +3 -1
  174. package/dist/page/internal/layout-filter.js.map +1 -1
  175. package/dist/page/internal/metadata-helpers.d.ts +7 -0
  176. package/dist/page/internal/metadata-helpers.js +13 -2
  177. package/dist/page/internal/metadata-helpers.js.map +1 -1
  178. package/dist/page/internal/page-registration.d.ts +2 -0
  179. package/dist/page/internal/page-registration.js.map +1 -1
  180. package/dist/page/layout-filter.js +31 -10
  181. package/dist/page/layout-filter.js.map +1 -1
  182. package/dist/page/metadata.js +29 -24
  183. package/dist/page/metadata.js.map +1 -1
  184. package/dist/page/types.d.ts +39 -4
  185. package/dist/page/types.js.map +1 -1
  186. package/dist/page.d.ts +1 -1
  187. package/dist/page.js +2 -1
  188. package/dist/page.js.map +1 -1
  189. package/dist/permissions-resolver.d.ts +26 -3
  190. package/dist/permissions-resolver.js +2 -1
  191. package/dist/permissions-resolver.js.map +1 -1
  192. package/dist/permissions.d.ts +7 -3
  193. package/dist/permissions.js +8 -6
  194. package/dist/permissions.js.map +1 -1
  195. package/dist/realtime.d.ts +24 -1
  196. package/dist/realtime.js +7 -1
  197. package/dist/realtime.js.map +1 -1
  198. package/dist/request-tenant.d.ts +17 -13
  199. package/dist/request-tenant.js +54 -42
  200. package/dist/request-tenant.js.map +1 -1
  201. package/dist/tenant-members.d.ts +26 -0
  202. package/dist/tenant-members.js +29 -0
  203. package/dist/tenant-members.js.map +1 -0
  204. package/dist/tenant-ownership.d.ts +4 -1
  205. package/dist/tenant-ownership.js +12 -17
  206. package/dist/tenant-ownership.js.map +1 -1
  207. package/dist/tenant-scoped-model.d.ts +2 -1
  208. package/dist/tenant-scoped-model.js +4 -3
  209. package/dist/tenant-scoped-model.js.map +1 -1
  210. package/docs/1.core/10.layout-banners.md +57 -2
  211. package/docs/1.core/2.pages-and-modules.md +20 -11
  212. package/docs/1.core/4.permissions.md +34 -1
  213. package/docs/1.core/5.tenancy.md +37 -6
  214. package/docs/1.core/7.hooks.md +12 -2
  215. package/docs/1.core/8.realtime.md +24 -3
  216. package/docs/2.auth/2.authentication.md +3 -3
  217. package/docs/3.base/1.introduction.md +1 -0
  218. package/docs/3.base/10.display-blocks.md +20 -2
  219. package/docs/3.base/2.types.md +7 -5
  220. package/docs/3.base/3.forms.md +21 -6
  221. package/docs/3.base/4.tables.md +14 -9
  222. package/docs/3.base/5.charts-and-widgets.md +8 -4
  223. package/docs/3.base/6.layout.md +38 -1
  224. package/docs/3.base/8.data-types.md +14 -7
  225. package/docs/4.notifications/3.sending.md +4 -3
  226. package/docs/5.html-render/1.introduction.md +5 -7
  227. package/package.json +3 -7
@@ -11,6 +11,9 @@ export type LiveToggleAlign = (typeof LIVE_TOGGLE_ALIGNS)[number];
11
11
  */
12
12
  export declare const LIVE_TOGGLE_VARIANTS: readonly ["segmented", "pill"];
13
13
  export type LiveToggleVariant = (typeof LIVE_TOGGLE_VARIANTS)[number];
14
+ /** How large the toggle and its texts are drawn. */
15
+ export declare const LIVE_TOGGLE_SIZES: readonly ["xs", "sm", "md"];
16
+ export type LiveToggleSize = (typeof LIVE_TOGGLE_SIZES)[number];
14
17
  export interface LiveToggleProps extends BaseComponentProps {
15
18
  align?: LiveToggleAlign;
16
19
  /**
@@ -20,6 +23,11 @@ export interface LiveToggleProps extends BaseComponentProps {
20
23
  showUpdatedAt?: boolean;
21
24
  /** How the toggle is drawn (see {@link LiveToggleVariant}). Defaults to `segmented`. */
22
25
  variant?: LiveToggleVariant;
26
+ /**
27
+ * How large it is drawn, either variant. Defaults to the size of the
28
+ * `PageToolbar` holding it, else `sm`.
29
+ */
30
+ size?: LiveToggleSize;
23
31
  /**
24
32
  * What the paused toggle calls the events it missed: an i18n key (prefixed
25
33
  * with `$`) or a text, given `{count}` and pluralised on it, e.g.
@@ -54,13 +62,16 @@ export declare const LiveToggleSchema: z.ZodObject<{
54
62
  align: z.ZodOptional<z.ZodEnum<["left", "center", "right"]>>;
55
63
  showUpdatedAt: z.ZodOptional<z.ZodBoolean>;
56
64
  variant: z.ZodOptional<z.ZodEnum<["segmented", "pill"]>>;
65
+ size: z.ZodOptional<z.ZodEnum<["xs", "sm", "md"]>>;
57
66
  missedLabel: z.ZodOptional<z.ZodString>;
58
67
  }, "strip", z.ZodTypeAny, {
68
+ size?: "xs" | "sm" | "md" | undefined;
59
69
  variant?: "segmented" | "pill" | undefined;
60
70
  align?: "left" | "right" | "center" | undefined;
61
71
  showUpdatedAt?: boolean | undefined;
62
72
  missedLabel?: string | undefined;
63
73
  }, {
74
+ size?: "xs" | "sm" | "md" | undefined;
64
75
  variant?: "segmented" | "pill" | undefined;
65
76
  align?: "left" | "right" | "center" | undefined;
66
77
  showUpdatedAt?: boolean | undefined;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.LiveToggleSchema = exports.LIVE_TOGGLE_VARIANTS = exports.LIVE_TOGGLE_ALIGNS = void 0;
3
+ exports.LiveToggleSchema = exports.LIVE_TOGGLE_SIZES = exports.LIVE_TOGGLE_VARIANTS = exports.LIVE_TOGGLE_ALIGNS = void 0;
4
4
  exports.LiveToggle = LiveToggle;
5
5
  const zod_1 = require("zod");
6
6
  const component_1 = require("../component");
@@ -13,6 +13,8 @@ exports.LIVE_TOGGLE_ALIGNS = ["left", "center", "right"];
13
13
  * button, and a Resume button while paused.
14
14
  */
15
15
  exports.LIVE_TOGGLE_VARIANTS = ["segmented", "pill"];
16
+ /** How large the toggle and its texts are drawn. */
17
+ exports.LIVE_TOGGLE_SIZES = ["xs", "sm", "md"];
16
18
  const LIVE_TOGGLE_COMPONENT_NAME = "dms-live-toggle-block";
17
19
  /**
18
20
  * The Live / Pause switch of a page declared with `live` (see
@@ -56,6 +58,11 @@ exports.LiveToggleSchema = zod_1.z.object({
56
58
  group: "appearance",
57
59
  widget: "segmented",
58
60
  }),
61
+ size: (0, block_registry_1.ui)(zod_1.z.enum(exports.LIVE_TOGGLE_SIZES).optional(), {
62
+ label: "Size",
63
+ group: "appearance",
64
+ widget: "segmented",
65
+ }),
59
66
  missedLabel: (0, block_registry_1.ui)(zod_1.z
60
67
  .string()
61
68
  .optional()
@@ -1 +1 @@
1
- {"version":3,"file":"live-toggle.js","sourceRoot":"","sources":["../../src/base/live-toggle.ts"],"names":[],"mappings":";;;AAyDA,gCAMC;AA/DD,6BAAwB;AACxB,4CAAgD;AAChD,qDAA+E;AAG/E,wCAAwC;AAC3B,QAAA,kBAAkB,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAU,CAAC;AAGvE;;;;GAIG;AACU,QAAA,oBAAoB,GAAG,CAAC,WAAW,EAAE,MAAM,CAAU,CAAC;AAoBnE,MAAM,0BAA0B,GAAG,uBAAuB,CAAC;AAE3D;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,SAAgB,UAAU,CACxB,OAAyB;IAEzB,OAAO,IAAI,4BAAgB,CAAkB,0BAA0B,CAAC;SACrE,OAAO,CAAC,EAAE,GAAG,OAAO,EAAE,CAAC;SACvB,IAAI,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,gBAAgB,EAAE,CAAC,CAAC;AAC1D,CAAC;AAED,wCAAwC;AAC3B,QAAA,gBAAgB,GAAG,OAAC,CAAC,MAAM,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QAC7C,KAAK,EAAE,MAAM;QACb,KAAK,EAAE,YAAY;QACnB,MAAM,EAAE,WAAW;KACpB,CAAC;IACF,WAAW,EAAE,IAAA,mBAAE,EACb,OAAC;SACE,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CACP,gEAAgE,CACjE,EACH,EAAE,KAAK,EAAE,qBAAqB,EAAE,KAAK,EAAE,SAAS,EAAE,CACnD;CACF,CAA4C,CAAC;AAE9C,IAAA,kCAAiB,EAAC;IAChB,IAAI,EAAE,YAAY;IAClB,aAAa,EAAE,0BAA0B;IACzC,MAAM,EAAE,wBAAgB;IACxB,IAAI,EAAE;QACJ,IAAI,EAAE,aAAa;QACnB,IAAI,EAAE,gBAAgB;QACtB,WAAW,EACT,0EAA0E;QAC5E,KAAK,EAAE,MAAM;KACd;CACF,CAAC,CAAC"}
@@ -0,0 +1,158 @@
1
+ import { z } from "zod";
2
+ import { type Component, ComponentBuilder, type ComponentMetadata } from "../component";
3
+ import type { MaybePromise } from "../types";
4
+ import { type LiveToggleProps } from "./live-toggle";
5
+ import { type PeriodSelectorProps } from "./period-selector";
6
+ import type { BaseComponentProps } from "./types";
7
+ /** How large the toolbar draws its controls, its children's by default. */
8
+ export declare const PAGE_TOOLBAR_SIZES: readonly ["xs", "sm", "md"];
9
+ export type PageToolbarSize = (typeof PAGE_TOOLBAR_SIZES)[number];
10
+ export interface PageToolbarProps extends BaseComponentProps {
11
+ /**
12
+ * The size of the `LiveToggle` and `PeriodSelector` it holds, and of its
13
+ * own "updated" label, unless a child sets its own. Defaults to `sm`.
14
+ */
15
+ size?: PageToolbarSize;
16
+ /**
17
+ * On a page without `live` (or without a `LiveToggle` in the toolbar),
18
+ * shows how long ago the page last read its data ("updated 12 s ago"),
19
+ * where the toggle would sit. Defaults to true.
20
+ */
21
+ showUpdatedAt?: boolean;
22
+ /**
23
+ * On a page without `live` (or without a `LiveToggle` in the toolbar), a
24
+ * button beside the "updated" label reading every block of the page
25
+ * again. Defaults to true.
26
+ */
27
+ refresh?: boolean;
28
+ }
29
+ /**
30
+ * The context bar of a page with a period or live data, first in its body,
31
+ * under the page header: its own children on the left (a scope chip, a
32
+ * picker), then on the right, whatever order they were added in, the time
33
+ * since the page last read its data, the `LiveToggle` (Direct / Pause) and
34
+ * the `PeriodSelector` (its window, its comparison, its presets), all at one
35
+ * `size`. It wraps onto more lines on a narrow screen.
36
+ *
37
+ * On a page without `live` it shows "updated 12 s ago" and a refresh button
38
+ * where the toggle would be (see `showUpdatedAt`, `refresh`); a `LiveToggle`
39
+ * there draws nothing.
40
+ *
41
+ * Its children are ordinary blocks, with ids of their own: `pageToolbar()`
42
+ * builds one with the usual defaults.
43
+ *
44
+ * ```ts
45
+ * static toolbar = PageToolbar()
46
+ * .child("scope", scopeChip())
47
+ * .child("live", LiveToggle({ variant: "pill" }))
48
+ * .child("period", PeriodSelector({ variant: "segmented" }));
49
+ * ```
50
+ */
51
+ export declare function PageToolbar(options?: PageToolbarProps): ComponentBuilder<PageToolbarProps>;
52
+ /**
53
+ * How `pageToolbar()` places one of its own children (the `LiveToggle`, the
54
+ * `PeriodSelector`), besides the control's options: the child id roles and
55
+ * permissions name it by, and the metadata the roles editor shows for it.
56
+ */
57
+ export interface PageToolbarChildOptions<P = Record<string, unknown>> {
58
+ /**
59
+ * The child id under the toolbar. Defaults to `live` for the toggle and
60
+ * `period` for the selector; set it to keep an id roles already grant
61
+ * (a page that had its toggle under `toggle`).
62
+ */
63
+ childId?: string;
64
+ /** The child's name, description and icon in the roles editor. */
65
+ meta?: Partial<ComponentMetadata>;
66
+ /**
67
+ * Changes the control's options each time the page is registered, as
68
+ * `ComponentBuilder.transformOptions` does: for what is only known once
69
+ * the module is configured (a retention read in `construct()`, after the
70
+ * page class was built). It receives the options over the defaults and
71
+ * returns new ones, without mutating them. The comparison control the
72
+ * helper derived from `comparisons` at build time is not derived again.
73
+ */
74
+ transformOptions?: (options: P | undefined) => MaybePromise<P | undefined>;
75
+ }
76
+ /** The `live` entry of {@link PageToolbarOptions}. */
77
+ export type PageToolbarLiveOptions = LiveToggleProps & PageToolbarChildOptions<LiveToggleProps>;
78
+ /** The `period` entry of {@link PageToolbarOptions}. */
79
+ export type PageToolbarPeriodOptions = PeriodSelectorProps & PageToolbarChildOptions<PeriodSelectorProps>;
80
+ /** What `pageToolbar()` puts in the toolbar. */
81
+ export interface PageToolbarOptions extends PageToolbarProps {
82
+ /**
83
+ * The blocks on the left, keyed by child id, in order: a scope chip, a
84
+ * picker, a badge. Their ids are the ones permissions name them by.
85
+ */
86
+ leading?: Record<string, Component>;
87
+ /**
88
+ * The `LiveToggle` (child id `live`), over the defaults of
89
+ * {@link PAGE_TOOLBAR_LIVE_DEFAULTS}; `false` leaves it out. Kept by
90
+ * default: it draws nothing on a page without `live`. `childId` and `meta`
91
+ * place the child (see {@link PageToolbarChildOptions}).
92
+ */
93
+ live?: PageToolbarLiveOptions | false;
94
+ /**
95
+ * The `PeriodSelector` (child id `period`), over the defaults of
96
+ * {@link PAGE_TOOLBAR_PERIOD_DEFAULTS}; `false` leaves it out, for a page
97
+ * without a period. `childId` and `meta` place the child (see
98
+ * {@link PageToolbarChildOptions}); `id` stays the period scope's id.
99
+ */
100
+ period?: PageToolbarPeriodOptions | false;
101
+ }
102
+ /** The `LiveToggle` of `pageToolbar()` unless its `live` says otherwise. */
103
+ export declare const PAGE_TOOLBAR_LIVE_DEFAULTS: LiveToggleProps;
104
+ /**
105
+ * The `PeriodSelector` of `pageToolbar()` unless its `period` says otherwise:
106
+ * the start of the window from now ("since yesterday 11:29"), then the
107
+ * 1H / 24H / 7D / 30D presets, on the last 24 hours by default. Its
108
+ * comparison control depends on what the period offers: a menu naming the
109
+ * compared window ("vs 16 – 17 Oct ▾") for more than one choice, `none`
110
+ * included, on its first comparison besides `none`; none for a single
111
+ * comparison, which then stays on and reads "vs …" beside the window.
112
+ */
113
+ export declare const PAGE_TOOLBAR_PERIOD_DEFAULTS: PeriodSelectorProps;
114
+ /** The child id of the toolbar's `LiveToggle` unless `live.childId` says otherwise. */
115
+ export declare const PAGE_TOOLBAR_LIVE_CHILD_ID = "live";
116
+ /** The child id of the toolbar's `PeriodSelector` unless `period.childId` says otherwise. */
117
+ export declare const PAGE_TOOLBAR_PERIOD_CHILD_ID = "period";
118
+ /**
119
+ * A `PageToolbar` with its usual children: `leading` on the left, then the
120
+ * `LiveToggle` as a pill (`live`) and the `PeriodSelector` as segmented
121
+ * presets (`period`), each over its defaults. A page puts it first:
122
+ *
123
+ * ```ts
124
+ * static toolbar = pageToolbar({
125
+ * leading: { scope: scopeChip() },
126
+ * live: { missedLabel: "$api.live.new_requests" },
127
+ * period: {
128
+ * id: "api",
129
+ * rememberKey: "api",
130
+ * comparisons: ["previous-period"],
131
+ * },
132
+ * });
133
+ * ```
134
+ *
135
+ * Each control keeps the id and the roles-editor metadata a page gives it:
136
+ *
137
+ * ```ts
138
+ * static toolbar = pageToolbar({
139
+ * live: { childId: "toggle", meta: { name: "$my.permissions.live.name" } },
140
+ * period: { id: "my-scope", meta: { name: "$my.permissions.period.name" } },
141
+ * }).meta({ name: "$my.permissions.toolbar.name" });
142
+ * ```
143
+ */
144
+ export declare function pageToolbar(options?: PageToolbarOptions): ComponentBuilder<PageToolbarProps>;
145
+ /** The options `PageToolbar` accepts. */
146
+ export declare const PageToolbarSchema: z.ZodObject<{
147
+ size: z.ZodOptional<z.ZodEnum<["xs", "sm", "md"]>>;
148
+ showUpdatedAt: z.ZodOptional<z.ZodBoolean>;
149
+ refresh: z.ZodOptional<z.ZodBoolean>;
150
+ }, "strip", z.ZodTypeAny, {
151
+ size?: "xs" | "sm" | "md" | undefined;
152
+ showUpdatedAt?: boolean | undefined;
153
+ refresh?: boolean | undefined;
154
+ }, {
155
+ size?: "xs" | "sm" | "md" | undefined;
156
+ showUpdatedAt?: boolean | undefined;
157
+ refresh?: boolean | undefined;
158
+ }>;
@@ -0,0 +1,198 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PageToolbarSchema = exports.PAGE_TOOLBAR_PERIOD_CHILD_ID = exports.PAGE_TOOLBAR_LIVE_CHILD_ID = exports.PAGE_TOOLBAR_PERIOD_DEFAULTS = exports.PAGE_TOOLBAR_LIVE_DEFAULTS = exports.PAGE_TOOLBAR_SIZES = void 0;
4
+ exports.PageToolbar = PageToolbar;
5
+ exports.pageToolbar = pageToolbar;
6
+ const zod_1 = require("zod");
7
+ const component_1 = require("../component");
8
+ const block_registry_1 = require("./block-registry");
9
+ const live_toggle_1 = require("./live-toggle");
10
+ const period_selector_1 = require("./period-selector");
11
+ /** How large the toolbar draws its controls, its children's by default. */
12
+ exports.PAGE_TOOLBAR_SIZES = ["xs", "sm", "md"];
13
+ const PAGE_TOOLBAR_COMPONENT_NAME = "dms-page-toolbar-block";
14
+ /**
15
+ * The context bar of a page with a period or live data, first in its body,
16
+ * under the page header: its own children on the left (a scope chip, a
17
+ * picker), then on the right, whatever order they were added in, the time
18
+ * since the page last read its data, the `LiveToggle` (Direct / Pause) and
19
+ * the `PeriodSelector` (its window, its comparison, its presets), all at one
20
+ * `size`. It wraps onto more lines on a narrow screen.
21
+ *
22
+ * On a page without `live` it shows "updated 12 s ago" and a refresh button
23
+ * where the toggle would be (see `showUpdatedAt`, `refresh`); a `LiveToggle`
24
+ * there draws nothing.
25
+ *
26
+ * Its children are ordinary blocks, with ids of their own: `pageToolbar()`
27
+ * builds one with the usual defaults.
28
+ *
29
+ * ```ts
30
+ * static toolbar = PageToolbar()
31
+ * .child("scope", scopeChip())
32
+ * .child("live", LiveToggle({ variant: "pill" }))
33
+ * .child("period", PeriodSelector({ variant: "segmented" }));
34
+ * ```
35
+ */
36
+ function PageToolbar(options) {
37
+ return new component_1.ComponentBuilder(PAGE_TOOLBAR_COMPONENT_NAME)
38
+ .options({ ...options })
39
+ .meta({ name: "PageToolbar", icon: "i-ph-sliders-horizontal" });
40
+ }
41
+ /** The `LiveToggle` of `pageToolbar()` unless its `live` says otherwise. */
42
+ exports.PAGE_TOOLBAR_LIVE_DEFAULTS = {
43
+ align: "right",
44
+ variant: "pill",
45
+ };
46
+ const TOOLBAR_PRESETS = [
47
+ "last-hour",
48
+ "last-24h",
49
+ "last-7-days",
50
+ "last-30-days",
51
+ ];
52
+ /**
53
+ * The `PeriodSelector` of `pageToolbar()` unless its `period` says otherwise:
54
+ * the start of the window from now ("since yesterday 11:29"), then the
55
+ * 1H / 24H / 7D / 30D presets, on the last 24 hours by default. Its
56
+ * comparison control depends on what the period offers: a menu naming the
57
+ * compared window ("vs 16 – 17 Oct ▾") for more than one choice, `none`
58
+ * included, on its first comparison besides `none`; none for a single
59
+ * comparison, which then stays on and reads "vs …" beside the window.
60
+ */
61
+ exports.PAGE_TOOLBAR_PERIOD_DEFAULTS = {
62
+ variant: "segmented",
63
+ align: "right",
64
+ rangeLabel: "relative",
65
+ presets: TOOLBAR_PRESETS,
66
+ defaultPreset: "last-24h",
67
+ };
68
+ const NO_COMPARISON = "none";
69
+ // What a `PeriodSelector` offers without `comparisons`.
70
+ const SELECTOR_DEFAULT_COMPARISONS = [
71
+ NO_COMPARISON,
72
+ "previous-period",
73
+ "previous-year",
74
+ ];
75
+ // The comparison control of PAGE_TOOLBAR_PERIOD_DEFAULTS' doc, under what
76
+ // the page's `period` sets itself.
77
+ function toolbarComparisonSetup(period) {
78
+ const offered = period.comparisons ?? SELECTOR_DEFAULT_COMPARISONS;
79
+ if (offered.length <= 1)
80
+ return { comparisonControl: "hidden" };
81
+ const firstComparison = offered.find((comparison) => comparison !== NO_COMPARISON);
82
+ return firstComparison
83
+ ? { comparisonControl: "menu", defaultComparison: firstComparison }
84
+ : { comparisonControl: "menu" };
85
+ }
86
+ /** The child id of the toolbar's `LiveToggle` unless `live.childId` says otherwise. */
87
+ exports.PAGE_TOOLBAR_LIVE_CHILD_ID = "live";
88
+ /** The child id of the toolbar's `PeriodSelector` unless `period.childId` says otherwise. */
89
+ exports.PAGE_TOOLBAR_PERIOD_CHILD_ID = "period";
90
+ // A control built over its defaults, carrying the metadata and the options
91
+ // transform it was given.
92
+ function placed(builder, { meta, transformOptions }) {
93
+ if (meta)
94
+ builder.meta(meta);
95
+ if (transformOptions)
96
+ builder.transformOptions(transformOptions);
97
+ return builder;
98
+ }
99
+ /**
100
+ * A `PageToolbar` with its usual children: `leading` on the left, then the
101
+ * `LiveToggle` as a pill (`live`) and the `PeriodSelector` as segmented
102
+ * presets (`period`), each over its defaults. A page puts it first:
103
+ *
104
+ * ```ts
105
+ * static toolbar = pageToolbar({
106
+ * leading: { scope: scopeChip() },
107
+ * live: { missedLabel: "$api.live.new_requests" },
108
+ * period: {
109
+ * id: "api",
110
+ * rememberKey: "api",
111
+ * comparisons: ["previous-period"],
112
+ * },
113
+ * });
114
+ * ```
115
+ *
116
+ * Each control keeps the id and the roles-editor metadata a page gives it:
117
+ *
118
+ * ```ts
119
+ * static toolbar = pageToolbar({
120
+ * live: { childId: "toggle", meta: { name: "$my.permissions.live.name" } },
121
+ * period: { id: "my-scope", meta: { name: "$my.permissions.period.name" } },
122
+ * }).meta({ name: "$my.permissions.toolbar.name" });
123
+ * ```
124
+ */
125
+ function pageToolbar(options = {}) {
126
+ const { leading, live, period, ...props } = options;
127
+ const toolbar = PageToolbar(props);
128
+ for (const [id, component] of Object.entries(leading ?? {})) {
129
+ toolbar.child(id, component);
130
+ }
131
+ for (const control of toolbarControls(live, period)) {
132
+ toolbar.child(control.id, control.build());
133
+ }
134
+ return toolbar;
135
+ }
136
+ /**
137
+ * The toolbar's default children, in order: the `LiveToggle` then the
138
+ * `PeriodSelector`, each over its defaults. The one source of what a toolbar
139
+ * holds, for `pageToolbar()` and for the catalog's `initialChildren`.
140
+ */
141
+ function toolbarControls(live, period) {
142
+ const controls = [];
143
+ if (live !== false) {
144
+ const { childId, meta, transformOptions, ...liveProps } = live ?? {};
145
+ const liveOptions = { ...exports.PAGE_TOOLBAR_LIVE_DEFAULTS, ...liveProps };
146
+ controls.push({
147
+ id: childId ?? exports.PAGE_TOOLBAR_LIVE_CHILD_ID,
148
+ type: "LiveToggle",
149
+ options: liveOptions,
150
+ build: () => placed((0, live_toggle_1.LiveToggle)(liveOptions), { meta, transformOptions }),
151
+ });
152
+ }
153
+ if (period !== false) {
154
+ const { childId, meta, transformOptions, ...periodProps } = period ?? {};
155
+ const periodOptions = {
156
+ ...exports.PAGE_TOOLBAR_PERIOD_DEFAULTS,
157
+ ...toolbarComparisonSetup(periodProps),
158
+ ...periodProps,
159
+ };
160
+ controls.push({
161
+ id: childId ?? exports.PAGE_TOOLBAR_PERIOD_CHILD_ID,
162
+ type: "PeriodSelector",
163
+ options: periodOptions,
164
+ build: () => placed((0, period_selector_1.PeriodSelector)(periodOptions), { meta, transformOptions }),
165
+ });
166
+ }
167
+ return controls;
168
+ }
169
+ /** The options `PageToolbar` accepts. */
170
+ exports.PageToolbarSchema = zod_1.z.object({
171
+ size: (0, block_registry_1.ui)(zod_1.z
172
+ .enum(exports.PAGE_TOOLBAR_SIZES)
173
+ .optional()
174
+ .describe("The size of the controls the toolbar holds."), { label: "Size", group: "appearance", widget: "segmented" }),
175
+ showUpdatedAt: (0, block_registry_1.ui)(zod_1.z
176
+ .boolean()
177
+ .optional()
178
+ .describe("Without live mode, shows how long ago the page last read its data."), { label: "Show the last update", group: "appearance", widget: "switch" }),
179
+ refresh: (0, block_registry_1.ui)(zod_1.z
180
+ .boolean()
181
+ .optional()
182
+ .describe("Without live mode, offers a button reading the page again."), { label: "Refresh button", group: "behavior", widget: "switch" }),
183
+ });
184
+ (0, block_registry_1.RegisterBlockType)({
185
+ type: "PageToolbar",
186
+ componentName: PAGE_TOOLBAR_COMPONENT_NAME,
187
+ schema: exports.PageToolbarSchema,
188
+ container: true,
189
+ meta: {
190
+ name: "Page toolbar",
191
+ icon: "i-ph-sliders-horizontal",
192
+ description: "Context bar of a page: its scope, the last update, live mode and period.",
193
+ group: "data",
194
+ },
195
+ // What `pageToolbar()` places, for an editor building a toolbar.
196
+ initialChildren: toolbarControls(undefined, undefined).map(({ id, type, options }) => ({ id, type, options })),
197
+ });
198
+ //# sourceMappingURL=page-toolbar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"page-toolbar.js","sourceRoot":"","sources":["../../src/base/page-toolbar.ts"],"names":[],"mappings":";;;AAuEA,kCAMC;AAwKD,kCAYC;AAjQD,6BAAwB;AACxB,4CAIsB;AAEtB,qDAK0B;AAC1B,+CAAiE;AACjE,uDAM2B;AAG3B,2EAA2E;AAC9D,QAAA,kBAAkB,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAU,CAAC;AAuB9D,MAAM,2BAA2B,GAAG,wBAAwB,CAAC;AAE7D;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,SAAgB,WAAW,CACzB,OAA0B;IAE1B,OAAO,IAAI,4BAAgB,CAAmB,2BAA2B,CAAC;SACvE,OAAO,CAAC,EAAE,GAAG,OAAO,EAAE,CAAC;SACvB,IAAI,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,yBAAyB,EAAE,CAAC,CAAC;AACpE,CAAC;AA0DD,4EAA4E;AAC/D,QAAA,0BAA0B,GAAoB;IACzD,KAAK,EAAE,OAAO;IACd,OAAO,EAAE,MAAM;CAChB,CAAC;AAEF,MAAM,eAAe,GAAmB;IACtC,WAAW;IACX,UAAU;IACV,aAAa;IACb,cAAc;CACf,CAAC;AAEF;;;;;;;;GAQG;AACU,QAAA,4BAA4B,GAAwB;IAC/D,OAAO,EAAE,WAAW;IACpB,KAAK,EAAE,OAAO;IACd,UAAU,EAAE,UAAU;IACtB,OAAO,EAAE,eAAe;IACxB,aAAa,EAAE,UAAU;CAC1B,CAAC;AAEF,MAAM,aAAa,GAAqB,MAAM,CAAC;AAC/C,wDAAwD;AACxD,MAAM,4BAA4B,GAAuB;IACvD,aAAa;IACb,iBAAiB;IACjB,eAAe;CAChB,CAAC;AAQF,0EAA0E;AAC1E,mCAAmC;AACnC,SAAS,sBAAsB,CAC7B,MAA2B;IAE3B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E,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CACnD;CACF,CAAC,CAAC"}
@@ -72,6 +72,11 @@ export interface PeriodSelectorProps extends BaseComponentProps {
72
72
  presetLabels?: Partial<Record<PeriodPreset, string>>;
73
73
  comparisonLabels?: Partial<Record<PeriodComparison, string>>;
74
74
  align?: PeriodAlign;
75
+ /**
76
+ * How large the controls are drawn. Defaults to the size of the
77
+ * `PageToolbar` holding the selector, where the window beside them scales
78
+ * with it too, else `sm`.
79
+ */
75
80
  size?: "xs" | "sm" | "md" | "lg" | "xl";
76
81
  showRangeLabel?: boolean;
77
82
  /**
@@ -83,8 +88,10 @@ export interface PeriodSelectorProps extends BaseComponentProps {
83
88
  /**
84
89
  * How the comparisons are offered (see {@link PeriodComparisonControl}).
85
90
  * Defaults to `toggle` when `comparisons` offers a single comparison
86
- * besides `none`, `menu` otherwise. The toggle switches between that
87
- * comparison and `none`; `hidden` keeps the comparison on
91
+ * besides `none`, `menu` otherwise. The menu's trigger names the compared
92
+ * window ("vs 16 – 17 Oct", the option's name in its tooltip), and the
93
+ * window beside it then leaves its "vs …" part out. The toggle switches
94
+ * between that comparison and `none`; `hidden` keeps the comparison on
88
95
  * (`defaultComparison`, else the first one offered besides `none`).
89
96
  */
90
97
  comparisonControl?: PeriodComparisonControl;
@@ -1 +1 @@
1
- {"version":3,"file":"period-selector.js","sourceRoot":"","sources":["../../src/base/period-selector.ts"],"names":[],"mappings":";;;AA2JA,wCAWC;AAtKD,4CAAgD;AAChD,6BAAwB;AACxB,qDAA+E;AAE/E,uCAAqC;AAErC,+CAA+C;AAClC,QAAA,cAAc,GAAG;IAC5B,WAAW;IACX,UAAU;IACV,OAAO;IACP,WAAW;IACX,aAAa;IACb,cAAc;IACd,cAAc;IACd,YAAY;IACZ,YAAY;IACZ,cAAc;IACd,cAAc;IACd,KAAK;IACL,WAAW;IACX,KAAK;IACL,QAAQ;CACA,CAAC;AAGX,+CAA+C;AAClC,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CAAC;AAElD,IAAA,kCAAiB,EAAC;IAChB,IAAI,EAAE,gBAAgB;IACtB,aAAa,EAAE,8BAA8B;IAC7C,MAAM,EAAE,4BAAoB;IAC5B,IAAI,EAAE;QACJ,IAAI,EAAE,iBAAiB;QACvB,IAAI,EAAE,eAAe;QACrB,WAAW,EAAE,2DAA2D;QACxE,KAAK,EAAE,MAAM;KACd;CACF,CAAC,CAAC"}
@@ -26,12 +26,12 @@ export declare const PlaceholderSchema: z.ZodObject<{
26
26
  width: z.ZodOptional<z.ZodString>;
27
27
  }, "strip", z.ZodTypeAny, {
28
28
  label?: string | undefined;
29
- height?: string | undefined;
30
29
  width?: string | undefined;
30
+ height?: string | undefined;
31
31
  }, {
32
32
  label?: string | undefined;
33
- height?: string | undefined;
34
33
  width?: string | undefined;
34
+ height?: string | undefined;
35
35
  }>;
36
36
  /**
37
37
  * Placeholder - Development Placeholder Component
@@ -95,11 +95,11 @@ export declare const FieldRowSchema: z.ZodObject<{
95
95
  required?: boolean | undefined;
96
96
  description?: string | undefined;
97
97
  label?: string | undefined;
98
- layout?: "stack" | "inline" | "form" | undefined;
98
+ layout?: "inline" | "form" | "stack" | undefined;
99
99
  }, {
100
100
  disabled?: boolean | undefined;
101
101
  required?: boolean | undefined;
102
102
  description?: string | undefined;
103
103
  label?: string | undefined;
104
- layout?: "stack" | "inline" | "form" | undefined;
104
+ layout?: "inline" | "form" | "stack" | undefined;
105
105
  }>;
@@ -101,11 +101,11 @@ export declare const HStackSchema: z.ZodObject<{
101
101
  spacing: string;
102
102
  grow?: number | undefined;
103
103
  }, {
104
- grow?: number | undefined;
105
104
  wrap?: boolean | undefined;
106
105
  alignment?: "end" | "start" | "center" | "stretch" | undefined;
107
106
  distribution?: "end" | "start" | "center" | "space-between" | "space-around" | "space-evenly" | undefined;
108
107
  spacing?: string | undefined;
108
+ grow?: number | undefined;
109
109
  }>;
110
110
  /** The options `VStack` accepts. */
111
111
  export declare const VStackSchema: z.ZodObject<{
@@ -119,10 +119,10 @@ export declare const VStackSchema: z.ZodObject<{
119
119
  spacing: string;
120
120
  grow?: number | undefined;
121
121
  }, {
122
- grow?: number | undefined;
123
122
  alignment?: "end" | "start" | "center" | "stretch" | undefined;
124
123
  distribution?: "end" | "start" | "center" | "space-between" | "space-around" | "space-evenly" | undefined;
125
124
  spacing?: string | undefined;
125
+ grow?: number | undefined;
126
126
  }>;
127
127
  /** The options `Spacer` accepts. */
128
128
  export declare const SpacerSchema: z.ZodObject<{
@@ -50,9 +50,18 @@ export interface StatGroupProps extends BaseComponentProps, BlockItemsSource {
50
50
  layout?: StatGroupLayout;
51
51
  /** Columns on wide screens (1–6); defaults to the number of items. */
52
52
  columns?: number;
53
+ /**
54
+ * The group's own width from which all `columns` sit side by side, as a
55
+ * container size: `sm` 24rem, `md` 28rem, `lg` 32rem, `xl` 36rem. Below
56
+ * it, one column (`joined`) or the narrow count of `cards`. Defaults to the
57
+ * group's usual steps for its column count (`xl` for three).
58
+ */
59
+ columnsFrom?: StatGroupColumnsFrom;
53
60
  /** Accessible name of the group. */
54
61
  label?: string;
55
62
  }
63
+ /** The container sizes {@link StatGroupProps.columnsFrom} takes. */
64
+ export type StatGroupColumnsFrom = "sm" | "md" | "lg" | "xl";
56
65
  /**
57
66
  * StatGroup — a row of headline figures, each with its icon, a mono label, a
58
67
  * value and a detail line, optionally linking to where it is managed.
@@ -105,8 +114,8 @@ export declare const StatGroupSchema: z.ZodObject<{
105
114
  id?: string | undefined;
106
115
  icon?: string | undefined;
107
116
  to?: string | undefined;
108
- detail?: BlockText | undefined;
109
117
  tone?: "primary" | "secondary" | "success" | "info" | "warning" | "error" | "neutral" | "muted" | undefined;
118
+ detail?: BlockText | undefined;
110
119
  detailTone?: "primary" | "secondary" | "success" | "info" | "warning" | "error" | "neutral" | undefined;
111
120
  }, {
112
121
  value: number | BlockText;
@@ -114,23 +123,24 @@ export declare const StatGroupSchema: z.ZodObject<{
114
123
  id?: string | undefined;
115
124
  icon?: string | undefined;
116
125
  to?: string | undefined;
117
- detail?: BlockText | undefined;
118
126
  tone?: "primary" | "secondary" | "success" | "info" | "warning" | "error" | "neutral" | "muted" | undefined;
127
+ detail?: BlockText | undefined;
119
128
  detailTone?: "primary" | "secondary" | "success" | "info" | "warning" | "error" | "neutral" | undefined;
120
129
  }>, "many">>;
121
130
  layout: z.ZodDefault<z.ZodEnum<["joined", "cards"]>>;
122
131
  columns: z.ZodOptional<z.ZodNumber>;
132
+ columnsFrom: z.ZodOptional<z.ZodEnum<["sm", "md", "lg", "xl"]>>;
123
133
  label: z.ZodOptional<z.ZodString>;
124
134
  }, "strip", z.ZodTypeAny, {
125
- layout: "cards" | "joined";
135
+ layout: "joined" | "cards";
126
136
  items?: {
127
137
  value: number | BlockText;
128
138
  eyebrow: BlockText;
129
139
  id?: string | undefined;
130
140
  icon?: string | undefined;
131
141
  to?: string | undefined;
132
- detail?: BlockText | undefined;
133
142
  tone?: "primary" | "secondary" | "success" | "info" | "warning" | "error" | "neutral" | "muted" | undefined;
143
+ detail?: BlockText | undefined;
134
144
  detailTone?: "primary" | "secondary" | "success" | "info" | "warning" | "error" | "neutral" | undefined;
135
145
  }[] | undefined;
136
146
  label?: string | undefined;
@@ -144,6 +154,7 @@ export declare const StatGroupSchema: z.ZodObject<{
144
154
  description?: string | undefined;
145
155
  } | undefined;
146
156
  skeletonCount?: number | undefined;
157
+ columnsFrom?: "sm" | "md" | "lg" | "xl" | undefined;
147
158
  }, {
148
159
  items?: {
149
160
  value: number | BlockText;
@@ -151,14 +162,14 @@ export declare const StatGroupSchema: z.ZodObject<{
151
162
  id?: string | undefined;
152
163
  icon?: string | undefined;
153
164
  to?: string | undefined;
154
- detail?: BlockText | undefined;
155
165
  tone?: "primary" | "secondary" | "success" | "info" | "warning" | "error" | "neutral" | "muted" | undefined;
166
+ detail?: BlockText | undefined;
156
167
  detailTone?: "primary" | "secondary" | "success" | "info" | "warning" | "error" | "neutral" | undefined;
157
168
  }[] | undefined;
158
169
  label?: string | undefined;
159
170
  fetchUrl?: string | undefined;
160
171
  fetchUrlMethod?: import("./types").HttpMethod | undefined;
161
- layout?: "cards" | "joined" | undefined;
172
+ layout?: "joined" | "cards" | undefined;
162
173
  periodScope?: string | undefined;
163
174
  columns?: number | undefined;
164
175
  realtimeTopic?: string | string[] | undefined;
@@ -167,4 +178,5 @@ export declare const StatGroupSchema: z.ZodObject<{
167
178
  description?: string | undefined;
168
179
  } | undefined;
169
180
  skeletonCount?: number | undefined;
181
+ columnsFrom?: "sm" | "md" | "lg" | "xl" | undefined;
170
182
  }>;
@@ -82,6 +82,15 @@ exports.StatGroupSchema = zod_1.z.object({
82
82
  .max(6)
83
83
  .optional()
84
84
  .describe("How many columns on a wide screen; by default, one per cell."), { label: "Columns", group: "layout", widget: "number", min: 1, max: 6 }),
85
+ columnsFrom: (0, block_registry_1.ui)(zod_1.z
86
+ .enum(["sm", "md", "lg", "xl"])
87
+ .optional()
88
+ .describe("The group's width from which all columns sit side by side (sm 24rem, md 28rem, lg 32rem, xl 36rem)."), {
89
+ label: "All columns from",
90
+ group: "layout",
91
+ widget: "segmented",
92
+ advanced: true,
93
+ }),
85
94
  label: (0, block_registry_1.ui)(zod_1.z.string().optional().describe("Accessible name of the group."), {
86
95
  label: "Accessible name",
87
96
  group: "advanced",