@lattice-php/lattice 0.20.0 → 0.22.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 (212) hide show
  1. package/README.md +10 -0
  2. package/dist/action/components/action-form.d.ts +6 -1
  3. package/dist/action/components/action-form.js +48 -58
  4. package/dist/action/components/action-form.js.map +1 -1
  5. package/dist/action/components/action-trigger-provider.d.ts +1 -1
  6. package/dist/action/components/action-trigger-provider.js.map +1 -1
  7. package/dist/action/components/action.js +2 -1
  8. package/dist/action/components/action.js.map +1 -1
  9. package/dist/action/hooks/use-action.d.ts +1 -1
  10. package/dist/action/hooks/use-action.js +42 -33
  11. package/dist/action/hooks/use-action.js.map +1 -1
  12. package/dist/action/index.d.ts +0 -2
  13. package/dist/action/index.js +1 -2
  14. package/dist/action/lib/action-label.d.ts +2 -0
  15. package/dist/action/lib/action-label.js +9 -0
  16. package/dist/action/lib/action-label.js.map +1 -0
  17. package/dist/action/lib/run-action.d.ts +7 -7
  18. package/dist/action/lib/run-action.js +8 -7
  19. package/dist/action/lib/run-action.js.map +1 -1
  20. package/dist/chat/plugin.d.ts +0 -1
  21. package/dist/chat/plugin.js.map +1 -1
  22. package/dist/clipboard/index.d.ts +0 -4
  23. package/dist/clipboard/index.js +1 -15
  24. package/dist/{events → core}/event-names.js +1 -1
  25. package/dist/core/event-names.js.map +1 -0
  26. package/dist/core/hooks/use-window-event.d.ts +8 -0
  27. package/dist/core/hooks/use-window-event.js +22 -0
  28. package/dist/core/hooks/use-window-event.js.map +1 -0
  29. package/dist/core/index.js +3 -3
  30. package/dist/core/types.d.ts +8 -73
  31. package/dist/create-app.js +1 -1
  32. package/dist/effects/dispatch.js +1 -1
  33. package/dist/effects/dispatch.js.map +1 -1
  34. package/dist/effects/registry.d.ts +2 -18
  35. package/dist/effects/registry.js +4 -8
  36. package/dist/effects/registry.js.map +1 -1
  37. package/dist/event-bridge.js +10 -23
  38. package/dist/event-bridge.js.map +1 -1
  39. package/dist/form/components/fields/date-picker-field.js +1 -1
  40. package/dist/form/components/fields/file-upload.js +4 -6
  41. package/dist/form/components/fields/file-upload.js.map +1 -1
  42. package/dist/form/components/fields/select.js +2 -2
  43. package/dist/form/components/fields/select.js.map +1 -1
  44. package/dist/form/components/fields/table-rows.js +3 -15
  45. package/dist/form/components/fields/table-rows.js.map +1 -1
  46. package/dist/form/components/form.js +11 -24
  47. package/dist/form/components/form.js.map +1 -1
  48. package/dist/form/embed.d.ts +4 -0
  49. package/dist/form/embed.js +3 -1
  50. package/dist/form/lib/collect-fields.d.ts +7 -0
  51. package/dist/form/lib/collect-fields.js +19 -0
  52. package/dist/form/lib/collect-fields.js.map +1 -0
  53. package/dist/form/lib/field-errors.d.ts +3 -0
  54. package/dist/form/lib/field-errors.js +11 -0
  55. package/dist/form/lib/field-errors.js.map +1 -0
  56. package/dist/format/format-context.d.ts +6 -0
  57. package/dist/format/format-context.js +17 -0
  58. package/dist/format/format-context.js.map +1 -0
  59. package/dist/format/number.d.ts +1 -1
  60. package/dist/format/number.js.map +1 -1
  61. package/dist/format/value.d.ts +1 -1
  62. package/dist/format/value.js.map +1 -1
  63. package/dist/i18n/backend.js +1 -1
  64. package/dist/i18n/index.js +2 -2
  65. package/dist/i18n/instance.js +1 -1
  66. package/dist/i18n/locale-reload.d.ts +1 -1
  67. package/dist/i18n/locale-reload.js +7 -6
  68. package/dist/i18n/locale-reload.js.map +1 -1
  69. package/dist/i18n/locale.js +1 -1
  70. package/dist/i18n/locale.js.map +1 -1
  71. package/dist/i18n/page-props.js +1 -1
  72. package/dist/i18n/shared-props.js +1 -3
  73. package/dist/i18n/shared-props.js.map +1 -1
  74. package/dist/i18n/timezone.js +1 -1
  75. package/dist/i18n/timezone.js.map +1 -1
  76. package/dist/index.d.ts +6 -7
  77. package/dist/index.js +7 -8
  78. package/dist/lattice.css +105 -0
  79. package/dist/layout/components/callouts.js +1 -1
  80. package/dist/layout/components/sidebar.js +15 -48
  81. package/dist/layout/components/sidebar.js.map +1 -1
  82. package/dist/layout/plugin.d.ts +0 -1
  83. package/dist/layout/plugin.js.map +1 -1
  84. package/dist/lib/is-truthy.d.ts +2 -0
  85. package/dist/lib/is-truthy.js +9 -0
  86. package/dist/lib/is-truthy.js.map +1 -0
  87. package/dist/lib/use-debounced-callback.d.ts +10 -0
  88. package/dist/lib/use-debounced-callback.js +34 -0
  89. package/dist/lib/use-debounced-callback.js.map +1 -0
  90. package/dist/lib/use-media-query.d.ts +5 -0
  91. package/dist/lib/use-media-query.js +26 -0
  92. package/dist/lib/use-media-query.js.map +1 -0
  93. package/dist/lib/use-persistent-state.d.ts +13 -0
  94. package/dist/lib/use-persistent-state.js +62 -0
  95. package/dist/lib/use-persistent-state.js.map +1 -0
  96. package/dist/notifications/components/notifications.js +4 -1
  97. package/dist/notifications/components/notifications.js.map +1 -1
  98. package/dist/notifications/plugin.d.ts +0 -1
  99. package/dist/notifications/plugin.js.map +1 -1
  100. package/dist/provider-base.js +1 -1
  101. package/dist/realtime/listeners.d.ts +1 -1
  102. package/dist/realtime/listeners.js +1 -1
  103. package/dist/realtime/listeners.js.map +1 -1
  104. package/dist/registry.d.ts +5 -0
  105. package/dist/registry.js.map +1 -1
  106. package/dist/remote/components/data-list.js +1 -1
  107. package/dist/remote/plugin.d.ts +0 -1
  108. package/dist/remote/plugin.js.map +1 -1
  109. package/dist/table/components/bulk-bar.js +18 -15
  110. package/dist/table/components/bulk-bar.js.map +1 -1
  111. package/dist/table/components/cells/boolean-cell.js +1 -3
  112. package/dist/table/components/cells/boolean-cell.js.map +1 -1
  113. package/dist/table/components/cells/copyable-cell.d.ts +9 -0
  114. package/dist/table/components/cells/copyable-cell.js +17 -0
  115. package/dist/table/components/cells/copyable-cell.js.map +1 -0
  116. package/dist/table/components/cells/money-cell.js +7 -18
  117. package/dist/table/components/cells/money-cell.js.map +1 -1
  118. package/dist/table/components/cells/number-cell.js +14 -27
  119. package/dist/table/components/cells/number-cell.js.map +1 -1
  120. package/dist/table/components/cells/numeric-cell.d.ts +10 -0
  121. package/dist/table/components/cells/numeric-cell.js +25 -0
  122. package/dist/table/components/cells/numeric-cell.js.map +1 -0
  123. package/dist/table/components/cells/stack-cell.js +1 -1
  124. package/dist/table/components/cells/text-cell.js +4 -5
  125. package/dist/table/components/cells/text-cell.js.map +1 -1
  126. package/dist/table/components/filter-controls.js +1 -3
  127. package/dist/table/components/filter-controls.js.map +1 -1
  128. package/dist/table/components/table-cell.js.map +1 -1
  129. package/dist/table/components/table-search.js +4 -7
  130. package/dist/table/components/table-search.js.map +1 -1
  131. package/dist/table/components/table.js +2 -3
  132. package/dist/table/components/table.js.map +1 -1
  133. package/dist/table/hooks/use-column-visibility.js +29 -58
  134. package/dist/table/hooks/use-column-visibility.js.map +1 -1
  135. package/dist/table/hooks/use-table.js +5 -13
  136. package/dist/table/hooks/use-table.js.map +1 -1
  137. package/dist/table/lib/bulk.d.ts +2 -0
  138. package/dist/table/lib/bulk.js +5 -2
  139. package/dist/table/lib/bulk.js.map +1 -1
  140. package/dist/table/lib/query.js +1 -1
  141. package/dist/table/lib/query.js.map +1 -1
  142. package/dist/table/plugin.d.ts +0 -1
  143. package/dist/table/plugin.js.map +1 -1
  144. package/dist/table/types.d.ts +4 -57
  145. package/dist/toast/callout.js +1 -1
  146. package/dist/toast/callout.js.map +1 -1
  147. package/dist/toast/index.d.ts +1 -1
  148. package/dist/toast/index.js +2 -2
  149. package/dist/toast/toast.d.ts +0 -2
  150. package/dist/toast/toast.js +3 -10
  151. package/dist/toast/toast.js.map +1 -1
  152. package/dist/toast/toaster.js +2 -2
  153. package/dist/types/generated.d.ts +224 -80
  154. package/dist/types/index.d.ts +1 -1
  155. package/dist/ui/button.d.ts +2 -2
  156. package/dist/ui/chart-view.js +7 -30
  157. package/dist/ui/chart-view.js.map +1 -1
  158. package/dist/ui/click-behavior.d.ts +4 -4
  159. package/dist/ui/click-behavior.js.map +1 -1
  160. package/dist/ui/collapsible.js +3 -15
  161. package/dist/ui/collapsible.js.map +1 -1
  162. package/dist/ui/combobox.js +6 -3
  163. package/dist/ui/combobox.js.map +1 -1
  164. package/dist/ui/confirm-dialog.js +1 -1
  165. package/dist/ui/confirm-dialog.js.map +1 -1
  166. package/dist/ui/control.d.ts +1 -1
  167. package/dist/ui/dialog.d.ts +6 -2
  168. package/dist/ui/dialog.js +29 -5
  169. package/dist/ui/dialog.js.map +1 -1
  170. package/dist/ui/fragment.js +1 -1
  171. package/dist/ui/fragment.js.map +1 -1
  172. package/dist/ui/icon-button.d.ts +1 -1
  173. package/dist/ui/image-preview.js +1 -1
  174. package/dist/ui/image-preview.js.map +1 -1
  175. package/dist/ui/modal.js +6 -3
  176. package/dist/ui/modal.js.map +1 -1
  177. package/dist/ui/pill.d.ts +2 -0
  178. package/dist/ui/pill.js +10 -0
  179. package/dist/ui/pill.js.map +1 -0
  180. package/dist/ui/plugin.js.map +1 -1
  181. package/dist/ui/progress.js +1 -1
  182. package/dist/ui/section.js +2 -15
  183. package/dist/ui/section.js.map +1 -1
  184. package/dist/ui/segmented-pills.js +2 -1
  185. package/dist/ui/segmented-pills.js.map +1 -1
  186. package/dist/ui/tabs.js +12 -10
  187. package/dist/ui/tabs.js.map +1 -1
  188. package/dist/ui/tree-context.js +11 -13
  189. package/dist/ui/tree-context.js.map +1 -1
  190. package/dist/ui/tree.js +1 -1
  191. package/dist/ui/tree.js.map +1 -1
  192. package/dist/ui/use-collapsible-state.d.ts +7 -0
  193. package/dist/ui/use-collapsible-state.js +21 -0
  194. package/dist/ui/use-collapsible-state.js.map +1 -0
  195. package/dist-standalone/chunks/chart-view-C6R5iPra.js +36 -0
  196. package/dist-standalone/chunks/{date-picker-field-VbH9xrQO.js → date-picker-field-DhhEB-Mh.js} +1 -1
  197. package/dist-standalone/chunks/{page-props-AIa5UR6n.js → page-props-DOfg30l5.js} +1 -1
  198. package/dist-standalone/chunks/{rich-editor-field-DLQTyt36.js → rich-editor-field-DORXTHPw.js} +2 -2
  199. package/dist-standalone/chunks/{subscriptions-DY2tj9Im.js → subscriptions-DK_s_F2g.js} +1 -1
  200. package/dist-standalone/chunks/use-effect-dispatcher-EVZxmfoo.js +97 -0
  201. package/dist-standalone/lattice.css +1 -1
  202. package/dist-standalone/lattice.js +15 -15
  203. package/dist-standalone/manifest.json +8 -8
  204. package/package.json +3 -3
  205. package/dist/clipboard/index.js.map +0 -1
  206. package/dist/events/event-names.js.map +0 -1
  207. package/dist/table/components/table-action-node.d.ts +0 -4
  208. package/dist/table/components/table-action-node.js +0 -24
  209. package/dist/table/components/table-action-node.js.map +0 -1
  210. package/dist-standalone/chunks/chart-view-wJmnVu7L.js +0 -36
  211. package/dist-standalone/chunks/use-effect-dispatcher-feEs0GCP.js +0 -97
  212. /package/dist/{events → core}/event-names.d.ts +0 -0
@@ -1,4 +1,106 @@
1
- import { Node } from '../core/types.js';
1
+ export type NodeProps = Record<string, unknown>;
2
+ export type CommonNodeProps = {
3
+ dataBindings?: Record<string, string> | null;
4
+ hideWhenCollapsed?: boolean | null;
5
+ };
6
+ /**
7
+ * Augmentable map of wire `type` string → props for consumer components. Apps
8
+ * extend it via `declare module "@lattice-php/lattice"` so their custom components
9
+ * gain strong prop types; the entries are generated by `php artisan lattice:typescript`.
10
+ * Built-in components resolve through the generated `ComponentPropsMap` below.
11
+ * Types in neither fall back to a loose bag.
12
+ */
13
+ export interface ComponentProps {
14
+ }
15
+ /** The column counterpart of `ComponentProps`. */
16
+ export interface ColumnProps {
17
+ }
18
+ /** The filter counterpart of `ComponentProps`. */
19
+ export interface FilterProps {
20
+ }
21
+ /** The effect counterpart of `ComponentProps`. */
22
+ export interface EffectProps {
23
+ }
24
+ /**
25
+ * Resolves a `type` string to its payload: consumer augmentations (`TAugment`)
26
+ * win over generated built-ins (`TBuiltins`), then a loose fallback. The one
27
+ * resolver behind the component, column, filter and effect maps.
28
+ */
29
+ export type ResolveProps<TAugment, TBuiltins, TType extends string, TFallback> = TType extends keyof TAugment ? TAugment[TType] : TType extends keyof TBuiltins ? TBuiltins[TType] : TFallback;
30
+ export type ComponentPropsOf<TType extends string> = ResolveProps<ComponentProps, ComponentPropsMap, TType, NodeProps> & CommonNodeProps;
31
+ /**
32
+ * The loose wire node an unknown/untyped `type` resolves to: the shape every node
33
+ * shares, with a loose `props` bag. The single source of the wire-node shape —
34
+ * `Node` (i.e. `Node<string>`) is this.
35
+ */
36
+ type LooseNode = {
37
+ id?: string;
38
+ key?: string;
39
+ type: string;
40
+ props?: NodeProps;
41
+ schema?: Schema;
42
+ };
43
+ /**
44
+ * Built-in `props` is required, not optional — the wire serializes the full prop
45
+ * object, so reads need no optional chaining. Unknown types fall back to `LooseNode`.
46
+ */
47
+ export type Node<TType extends string = string> = string extends TType ? LooseNode : {
48
+ id?: string;
49
+ key?: string;
50
+ props: ComponentPropsOf<TType>;
51
+ schema?: Schema;
52
+ type: TType;
53
+ };
54
+ /**
55
+ * Distributes so `NodeUnionOf<"a" | "b">` is `Node<"a"> | Node<"b">` — a
56
+ * discriminated union where `node.type` narrows `node.props`. Domains build
57
+ * their node union from a generated `…NodeType` string union with this.
58
+ */
59
+ export type NodeUnionOf<TTypes extends string> = TTypes extends string ? Node<TTypes> : never;
60
+ export type Schema = Node[];
61
+ /**
62
+ * The generated `Column` base props (serialized by every column regardless of
63
+ * type) back the fallback, so even an unaugmented custom column keeps its
64
+ * common concerns typed.
65
+ */
66
+ export type ColumnPropsOf<TType extends string> = ResolveProps<ColumnProps, ColumnPropsMap, TType, Column & Record<string, unknown>>;
67
+ export type CommonColumnProps = Column;
68
+ /**
69
+ * A column node, authored and consumed like a field/component: `key`/`type`
70
+ * stay top-level, every common concern (`label`/`width`/`filter`/…) lives in
71
+ * `props` on each generated column type. `schema` is only present for a
72
+ * container column: the bound component nodes rendered per row. The column
73
+ * counterpart of `Node`.
74
+ */
75
+ export type ColumnNode<TType extends string = string> = {
76
+ type: TType;
77
+ key: string;
78
+ props: ColumnPropsOf<TType>;
79
+ schema?: Schema;
80
+ };
81
+ export type FilterPropsOf<TType extends string> = ResolveProps<FilterProps, FilterPropsMap, TType, Filter & Record<string, unknown>>;
82
+ /**
83
+ * A dedicated table filter, authored and consumed like a field/component:
84
+ * `key`/`type` stay top-level, `props` carries `label` plus whatever the
85
+ * filter type contributes. `schema` is the bound field(s) rendering the
86
+ * filter's control and is absent when empty. The filter counterpart of
87
+ * `ColumnNode`.
88
+ */
89
+ export type FilterNode<TType extends string = string> = {
90
+ type: TType;
91
+ key: string;
92
+ props: FilterPropsOf<TType>;
93
+ schema?: Schema;
94
+ };
95
+ export type EffectPropsOf<TType extends string> = ResolveProps<EffectProps, EffectPropsMap, TType, Record<string, unknown>>;
96
+ /**
97
+ * Deliberate exception to the `XNode` naming: an effect is a `{type, props}`
98
+ * envelope without id/key/schema — it is not a node.
99
+ */
100
+ export type EffectOf<TType extends string> = string extends TType ? Effect : {
101
+ type: TType;
102
+ props: EffectPropsOf<TType>;
103
+ };
2
104
  export type Action = {
3
105
  confirmation: Confirmation | null;
4
106
  endpoint: string | null;
@@ -7,6 +109,8 @@ export type Action = {
7
109
  label: string | null;
8
110
  lazyForm: boolean;
9
111
  method: HttpMethod | null;
112
+ modalSide: Side | null;
113
+ modalWidth: ModalWidth | null;
10
114
  ref: string | null;
11
115
  variant: ButtonVariant | null;
12
116
  };
@@ -17,7 +121,6 @@ export type ActionGroup = {
17
121
  };
18
122
  export type ActionNodeType = "action" | "action.bulk" | "action.group";
19
123
  export type ActionResult = {
20
- readonly ok: boolean;
21
124
  readonly data: Record<string, unknown>;
22
125
  readonly effects: Effect[];
23
126
  };
@@ -53,13 +156,17 @@ export type BooleanColumn = {
53
156
  toggleable: boolean;
54
157
  width: ColumnWidth;
55
158
  };
159
+ export type Breadcrumb = {
160
+ readonly href: string;
161
+ readonly title: string;
162
+ };
56
163
  export type Breadcrumbs = Record<string, never>;
57
164
  export type BrowserToken = {
58
165
  readonly accessToken: string;
59
- readonly tokenType: string;
60
- readonly expiresIn: number;
61
166
  readonly audience: string;
167
+ readonly expiresIn: number;
62
168
  readonly scopes: string[];
169
+ readonly tokenType: string;
63
170
  };
64
171
  export type Builder = {
65
172
  addLabel: string | null;
@@ -95,11 +202,13 @@ export type BulkAction = {
95
202
  label: string | null;
96
203
  lazyForm: boolean;
97
204
  method: HttpMethod | null;
205
+ modalSide: Side | null;
206
+ modalWidth: ModalWidth | null;
98
207
  ref: string | null;
99
208
  variant: ButtonVariant | null;
100
209
  };
101
210
  export type Button = {
102
- action: Node<"action"> | null;
211
+ action: Node<"action"> | Node<"action.bulk"> | null;
103
212
  buttonType: ButtonType;
104
213
  effects: Effect[];
105
214
  href: string | null;
@@ -111,11 +220,11 @@ export type Button = {
111
220
  export type ButtonType = "button" | "submit" | "reset";
112
221
  export type ButtonVariant = "default" | "destructive" | "ghost" | "info" | "link" | "outline" | "secondary" | "success";
113
222
  export type Callout = {
114
- variant: Variant;
223
+ action: Node | null;
224
+ dismissible: boolean;
115
225
  message: string;
116
226
  title: string | null;
117
- dismissible: boolean;
118
- action: Node | null;
227
+ variant: Variant;
119
228
  };
120
229
  export type Callouts = Record<string, never>;
121
230
  export type Card = {
@@ -140,14 +249,14 @@ export type Chart = {
140
249
  yAxis: boolean;
141
250
  };
142
251
  export type ChartSeries = {
143
- readonly type: ChartSeriesType;
144
- readonly dataKey: string;
145
- readonly name: string;
146
252
  readonly color: Color | null;
147
- readonly stackId: string | null;
148
- readonly nameKey: string | null;
253
+ readonly dataKey: string;
149
254
  readonly innerRadius: string;
150
255
  readonly maxValue: number | null;
256
+ readonly name: string;
257
+ readonly nameKey: string | null;
258
+ readonly stackId: string | null;
259
+ readonly type: ChartSeriesType;
151
260
  };
152
261
  export type ChartSeriesType = "area" | "bar" | "distribution" | "gauge" | "line" | "pie";
153
262
  export type ChatBox = {
@@ -160,9 +269,10 @@ export type ChatBox = {
160
269
  };
161
270
  export type ChatMessage = {
162
271
  readonly id: string;
163
- readonly role: ChatRole;
164
272
  readonly parts: Node[];
273
+ readonly role: ChatRole;
165
274
  };
275
+ export type ChatNodeType = "chat.box" | "chat.part.text" | "chat.part.tool-call";
166
276
  export type ChatRole = "user" | "assistant" | "system";
167
277
  export type Checkbox = {
168
278
  autoFocus: boolean;
@@ -213,9 +323,9 @@ export type Collapsible = {
213
323
  trigger: Node[];
214
324
  };
215
325
  export type Color = {
326
+ readonly dark: string | null;
216
327
  readonly kind: ColorKind;
217
328
  readonly value: string;
218
- readonly dark: string | null;
219
329
  };
220
330
  export type ColorKind = "named" | "css";
221
331
  export type ColorName = "default" | "muted" | "primary" | "success" | "info" | "warning" | "danger" | "gray" | "red" | "orange" | "yellow" | "green" | "blue" | "purple";
@@ -238,26 +348,36 @@ export type ColorPicker = {
238
348
  tooltip: string | null;
239
349
  value: unknown;
240
350
  };
351
+ export type Column = {
352
+ align: ColumnAlign;
353
+ filter: ColumnFilter | null;
354
+ hiddenByDefault: boolean;
355
+ label: string | null;
356
+ sortable: boolean;
357
+ toggleable: boolean;
358
+ width: ColumnWidth;
359
+ };
241
360
  export type ColumnAlign = "start" | "center" | "end";
242
361
  export type ColumnFilter = {
243
- readonly type: FilterType;
244
- readonly operators: Op[];
245
- readonly defaultOperator: Op;
362
+ readonly clauseOptions: ColumnFilterOption[];
246
363
  readonly control: FilterControl | null;
247
- readonly options: Option[];
364
+ readonly defaultOperator: Op;
248
365
  readonly multiple: boolean;
366
+ readonly operators: Op[];
367
+ readonly options: Option[];
249
368
  readonly searchable: boolean;
250
- readonly clauseOptions: ColumnFilterOption[];
369
+ readonly type: FilterType;
251
370
  };
252
371
  export type ColumnFilterOption = {
372
+ readonly clauses: ColumnFilterOptionClause[];
253
373
  readonly label: string;
254
374
  readonly value: string;
255
- readonly clauses: ColumnFilterOptionClause[];
256
375
  };
257
376
  export type ColumnFilterOptionClause = {
258
377
  readonly operator: Op;
259
378
  readonly value: string;
260
379
  };
380
+ export type ColumnNodeType = "column.badge" | "column.boolean" | "column.icon" | "column.image" | "column.money" | "column.number" | "column.stack" | "column.text";
261
381
  export type ColumnPropsMap = {
262
382
  "column.badge": BadgeColumn;
263
383
  "column.boolean": BooleanColumn;
@@ -268,7 +388,6 @@ export type ColumnPropsMap = {
268
388
  "column.stack": StackColumn;
269
389
  "column.text": TextColumn;
270
390
  };
271
- export type ColumnType = "column.text" | "column.boolean" | "column.number" | "column.money" | "column.stack" | "column.badge" | "column.icon" | "column.image";
272
391
  export type ColumnWidth = "xs" | "sm" | "md" | "lg" | "xl";
273
392
  export type ComponentPropsMap = {
274
393
  action: Action;
@@ -339,10 +458,10 @@ export type Condition = {
339
458
  readonly value: unknown;
340
459
  };
341
460
  export type Confirmation = {
342
- readonly title: string;
343
- readonly description: string | null;
344
- readonly confirmLabel: string | null;
345
461
  readonly cancelLabel: string | null;
462
+ readonly confirmLabel: string | null;
463
+ readonly description: string | null;
464
+ readonly title: string | null;
346
465
  };
347
466
  export type DataList = {
348
467
  dataEndpoint: string | null;
@@ -350,10 +469,10 @@ export type DataList = {
350
469
  remote: RemoteAccess | null;
351
470
  };
352
471
  export type DateFormat = {
353
- kind: string;
354
472
  dateStyle: DateTimeStyle | null;
355
- timeStyle: DateTimeStyle | null;
473
+ kind: string;
356
474
  month: string | null;
475
+ timeStyle: DateTimeStyle | null;
357
476
  year: string | null;
358
477
  };
359
478
  export type DateInput = {
@@ -451,14 +570,14 @@ export type EditorHighlight = Record<string, never>;
451
570
  export type EditorHorizontalRule = Record<string, never>;
452
571
  export type EditorItalic = Record<string, never>;
453
572
  export type EditorLink = {
454
- protocols: string[];
455
573
  openOnClick: boolean;
574
+ protocols: string[];
456
575
  };
457
576
  export type EditorOrderedList = Record<string, never>;
458
577
  export type EditorStrike = Record<string, never>;
459
578
  export type EditorTable = {
460
- rows: number;
461
579
  cols: number;
580
+ rows: number;
462
581
  withHeaderRow: boolean;
463
582
  };
464
583
  export type EditorTextAlign = {
@@ -483,10 +602,10 @@ export type EffectPropsMap = {
483
602
  "toggle-sidebar": ToggleSidebar;
484
603
  };
485
604
  export type FieldConditions = {
486
- readonly visible: Condition[];
487
- readonly required: Condition[];
488
- readonly readOnly: Condition[];
489
605
  readonly disabled: Condition[];
606
+ readonly readOnly: Condition[];
607
+ readonly required: Condition[];
608
+ readonly visible: Condition[];
490
609
  };
491
610
  export type FileUpload = {
492
611
  accept: string | null;
@@ -518,6 +637,9 @@ export type FileUpload = {
518
637
  tooltip: string | null;
519
638
  value: unknown;
520
639
  };
640
+ export type Filter = {
641
+ label: string | null;
642
+ };
521
643
  export type FilterClause = {
522
644
  readonly field: string;
523
645
  readonly operator: Op;
@@ -529,6 +651,7 @@ export type FilterIndicator = {
529
651
  readonly label: string;
530
652
  readonly value: string;
531
653
  };
654
+ export type FilterNodeType = "filter.date-range" | "filter.select" | "filter.ternary" | "filter.toggle";
532
655
  export type FilterPropsMap = {
533
656
  "filter.date-range": DateRangeFilter;
534
657
  "filter.select": SelectFilter;
@@ -566,6 +689,7 @@ export type Fragment = {
566
689
  ref: string | null;
567
690
  size: Size;
568
691
  };
692
+ export type FragmentNodeType = "fragment";
569
693
  export type FragmentResponse = {
570
694
  readonly schema: Node[];
571
695
  };
@@ -600,9 +724,9 @@ export type HiddenInput = {
600
724
  export type HttpMethod = import('@inertiajs/core').Method;
601
725
  export type I18nConfig = {
602
726
  readonly enabled: boolean;
603
- readonly saveMissing: boolean;
604
727
  readonly locales: string[];
605
728
  readonly preloadLocales: string[];
729
+ readonly saveMissing: boolean;
606
730
  readonly timezone: string | null;
607
731
  };
608
732
  export type Icon = {
@@ -648,8 +772,9 @@ export type LabelAction = {
648
772
  readonly label: string;
649
773
  readonly tabIndex: number | null;
650
774
  };
775
+ export type LayoutNodeType = "breadcrumbs" | "callouts" | "dropdown" | "menu" | "menu-item" | "outlet" | "sidebar" | "topbar";
651
776
  export type Link = {
652
- action: Node<"action"> | null;
777
+ action: Node<"action"> | Node<"action.bulk"> | null;
653
778
  effects: Effect[];
654
779
  href: string | null;
655
780
  icon: string | null;
@@ -661,16 +786,16 @@ export type Link = {
661
786
  };
662
787
  export type Listen = {
663
788
  readonly channel: string;
664
- readonly visibility: ChannelVisibility;
665
- events: string[];
666
789
  effects: Effect[];
790
+ events: string[];
791
+ readonly visibility: ChannelVisibility;
667
792
  };
668
793
  export type LocaleChange = {
669
794
  readonly locale: string;
670
795
  };
671
796
  export type Menu = Record<string, never>;
672
797
  export type MenuItem = {
673
- action: Node<"action"> | null;
798
+ action: Node<"action"> | Node<"action.bulk"> | null;
674
799
  effects: Effect[];
675
800
  href: string | null;
676
801
  icon: string | null;
@@ -684,8 +809,11 @@ export type Modal = {
684
809
  description: string | null;
685
810
  open: boolean;
686
811
  ref: string | null;
812
+ side: Side | null;
687
813
  title: string | null;
814
+ width: ModalWidth;
688
815
  };
816
+ export type ModalWidth = "sm" | "md" | "lg" | "xl" | "2xl" | "3xl";
689
817
  export type MoneyColumn = {
690
818
  align: ColumnAlign;
691
819
  copyable: boolean;
@@ -702,21 +830,22 @@ export type MoneyColumn = {
702
830
  };
703
831
  export type NodeType = "action" | "action.bulk" | "action.group" | "avatar" | "badge" | "breadcrumbs" | "button" | "callouts" | "card" | "chart" | "chat.box" | "chat.part.text" | "chat.part.tool-call" | "collapsible" | "dropdown" | "field.builder" | "field.checkbox" | "field.choice" | "field.color-picker" | "field.date-input" | "field.date-time-input" | "field.file-upload" | "field.hidden-input" | "field.number-input" | "field.otp" | "field.password-input" | "field.repeater" | "field.rich-editor" | "field.select" | "field.text-input" | "field.textarea" | "field.time-input" | "field.toggle" | "floating-panel" | "form" | "fragment" | "grid" | "heading" | "icon" | "image" | "link" | "menu" | "menu-item" | "modal" | "notifications" | "outlet" | "progress" | "raw-block" | "remote.data-list" | "section" | "segmented-control" | "separator" | "sidebar" | "stack" | "tab" | "table" | "tabs" | "text" | "tooltip" | "topbar" | "tree";
704
832
  export type NotificationItem = {
705
- readonly id: string;
706
- readonly title: string | null;
833
+ readonly actions: Node[];
707
834
  readonly body: string | null;
708
- readonly icon: string | null;
709
- readonly variant: Variant | null;
835
+ readonly createdAt: string | null;
710
836
  readonly href: string | null;
837
+ readonly icon: string | null;
838
+ readonly id: string;
711
839
  readonly isRead: boolean;
712
- readonly createdAt: string | null;
713
- readonly actions: Node[];
840
+ readonly title: string | null;
841
+ readonly variant: Variant | null;
714
842
  };
715
843
  export type NotificationList = {
844
+ readonly hasMore: boolean;
716
845
  readonly notifications: NotificationItem[];
717
846
  readonly unreadCount: number;
718
- readonly hasMore: boolean;
719
847
  };
848
+ export type NotificationNodeType = "notifications";
720
849
  export type Notifications = {
721
850
  channel: string;
722
851
  endpoint: string;
@@ -738,11 +867,11 @@ export type NumberColumn = {
738
867
  width: ColumnWidth;
739
868
  };
740
869
  export type NumberFormat = {
870
+ currency: string | null;
741
871
  kind: string;
742
- notation: string;
743
- minimumFractionDigits: number | null;
744
872
  maximumFractionDigits: number | null;
745
- currency: string | null;
873
+ minimumFractionDigits: number | null;
874
+ notation: string;
746
875
  unit: NumberFormatUnit | null;
747
876
  };
748
877
  export type NumberFormatUnit = "percent" | "kilogram" | "gram" | "kilometer" | "meter" | "byte" | "kilobyte" | "megabyte" | "gigabyte" | "millisecond" | "second" | "minute" | "hour" | "celsius" | "fahrenheit";
@@ -777,9 +906,9 @@ export type OpenModal = {
777
906
  readonly modal: string;
778
907
  };
779
908
  export type Option = {
909
+ readonly data: Record<string, unknown> | null;
780
910
  readonly label: string;
781
911
  readonly value: string;
782
- readonly data: Record<string, unknown> | null;
783
912
  };
784
913
  export type Orientation = "horizontal" | "vertical";
785
914
  export type OtpInput = {
@@ -804,6 +933,18 @@ export type OtpInput = {
804
933
  export type Outlet = Record<string, never>;
805
934
  export type PageContainer = "centered" | "default";
806
935
  export type PageLayout = "app" | "auth" | "none";
936
+ export type PageLayoutPayload = {
937
+ readonly key: string;
938
+ readonly schema: Node[];
939
+ };
940
+ export type PagePayload = {
941
+ readonly breadcrumbs: Breadcrumb[];
942
+ readonly container: string;
943
+ readonly layout: PageLayoutPayload | null;
944
+ readonly listeners: Listen[];
945
+ readonly schema: Node[];
946
+ readonly title: string | null;
947
+ };
807
948
  export type PaginationType = "none" | "simple" | "table" | "infinite";
808
949
  export type PasswordInput = {
809
950
  autoComplete: string | null;
@@ -856,14 +997,15 @@ export type ReloadComponent = {
856
997
  };
857
998
  export type ReloadPage = Record<string, never>;
858
999
  export type RemoteAccess = {
859
- readonly source: string;
860
1000
  readonly audience: string;
861
- readonly scopes: string[];
862
1001
  readonly nodeId: string;
863
1002
  readonly nodeType: string;
864
- readonly tokenEndpoint: string;
865
1003
  readonly ref: string;
1004
+ readonly scopes: string[];
1005
+ readonly source: string;
1006
+ readonly tokenEndpoint: string;
866
1007
  };
1008
+ export type RemoteNodeType = "remote.data-list";
867
1009
  export type Repeater = {
868
1010
  addLabel: string | null;
869
1011
  columnWidth: ColumnWidth;
@@ -896,8 +1038,8 @@ export type ResetForm = {
896
1038
  };
897
1039
  export type ResolveResponse = {
898
1040
  readonly fields: Record<string, Node>;
899
- readonly values: Record<string, unknown>;
900
1041
  readonly prefill: Record<string, unknown>;
1042
+ readonly values: Record<string, unknown>;
901
1043
  };
902
1044
  export type RichEditor = {
903
1045
  columnWidth: ColumnWidth;
@@ -919,11 +1061,11 @@ export type RichEditor = {
919
1061
  value: unknown;
920
1062
  };
921
1063
  export type RowAction = {
922
- type: RowActionType;
923
- key: string;
924
1064
  destructive: boolean;
925
1065
  icon: string | null;
1066
+ key: string;
926
1067
  label: string | null;
1068
+ type: RowActionType;
927
1069
  };
928
1070
  export type RowActionType = "duplicate" | "remove";
929
1071
  export type RowLayout = "stack" | "table";
@@ -985,10 +1127,10 @@ export type Sidebar = {
985
1127
  rememberState: boolean;
986
1128
  };
987
1129
  export type SignedUpload = {
988
- readonly key: string;
989
- readonly url: string;
990
1130
  readonly headers: Record<string, unknown>;
1131
+ readonly key: string;
991
1132
  readonly method: HttpMethod;
1133
+ readonly url: string;
992
1134
  };
993
1135
  export type Size = "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl";
994
1136
  export type SortDirection = "asc" | "desc";
@@ -1022,11 +1164,11 @@ export type Tab = {
1022
1164
  };
1023
1165
  export type Table = {
1024
1166
  actionsLabel: string | null;
1025
- bulkActions: Node<"action">[];
1026
- columns: Node[];
1167
+ bulkActions: (Node<"action"> | Node<"action.bulk">)[];
1168
+ columns: ColumnNode[];
1027
1169
  emptyLabel: string | null;
1028
1170
  endpoint: string | null;
1029
- filters: Node[];
1171
+ filters: FilterNode[];
1030
1172
  layout: string | null;
1031
1173
  lazy: boolean;
1032
1174
  ref: string | null;
@@ -1035,34 +1177,35 @@ export type Table = {
1035
1177
  searchable: boolean;
1036
1178
  striped: boolean;
1037
1179
  };
1180
+ export type TableNodeType = "table";
1038
1181
  export type TablePagination = {
1039
- readonly mode: PaginationType;
1040
1182
  readonly currentPage: number | null;
1041
- readonly lastPage: number | null;
1042
- readonly perPage: number | null;
1043
- readonly total: number | null;
1044
1183
  readonly from: number | null;
1045
- readonly to: number | null;
1046
1184
  readonly hasMore: boolean;
1185
+ readonly lastPage: number | null;
1186
+ readonly mode: PaginationType;
1047
1187
  readonly nextPage: number | null;
1188
+ readonly perPage: number | null;
1189
+ readonly to: number | null;
1190
+ readonly total: number | null;
1048
1191
  };
1049
1192
  export type TableQuery = {
1050
1193
  readonly filters: FilterClause[];
1051
- readonly sorts: TableSort[];
1052
1194
  readonly page: number;
1053
1195
  readonly perPage: number;
1054
- readonly tableFilters: Record<string, Record<string, unknown>>;
1055
- readonly tableFilterIndicators: FilterIndicator[];
1056
1196
  readonly search: string;
1197
+ readonly sorts: TableSort[];
1198
+ readonly tableFilterIndicators: FilterIndicator[];
1199
+ readonly tableFilters: Record<string, Record<string, unknown>>;
1057
1200
  };
1058
1201
  export type TableResult = {
1059
- readonly query: TableQuery;
1060
1202
  readonly data: Record<string, unknown>[];
1061
1203
  readonly pagination: TablePagination | null;
1204
+ readonly query: TableQuery;
1062
1205
  };
1063
1206
  export type TableSort = {
1064
- readonly key: string;
1065
1207
  readonly direction: SortDirection;
1208
+ readonly key: string;
1066
1209
  };
1067
1210
  export type Tabs = {
1068
1211
  activeValue: string;
@@ -1179,12 +1322,12 @@ export type TimeInput = {
1179
1322
  value: unknown;
1180
1323
  };
1181
1324
  export type Toast = {
1182
- variant: Variant;
1183
- message: Translatable | string;
1325
+ action: Node | null;
1326
+ dismissible: boolean;
1184
1327
  duration: number | null;
1328
+ message: Translatable | string;
1185
1329
  persistent: boolean;
1186
- dismissible: boolean;
1187
- action: Node | null;
1330
+ variant: Variant;
1188
1331
  };
1189
1332
  export type Toggle = {
1190
1333
  autoFocus: boolean;
@@ -1223,9 +1366,9 @@ export type Topbar = {
1223
1366
  sticky: boolean;
1224
1367
  };
1225
1368
  export type Translatable = {
1369
+ key: string;
1226
1370
  payload: Record<string, string>;
1227
1371
  replacements: Record<string, string | number | boolean>;
1228
- key: string;
1229
1372
  };
1230
1373
  export type Tree = {
1231
1374
  activeId: string | null;
@@ -1233,19 +1376,20 @@ export type Tree = {
1233
1376
  rememberState: boolean;
1234
1377
  };
1235
1378
  export type TreeNode = {
1236
- icon: string | null;
1379
+ actions: Node<"action"> | Node<"action.bulk"> | Node<"action.group"> | null;
1237
1380
  badge: string | null;
1238
- href: string | null;
1239
- actions: Node<"action"> | Node<"action.group"> | null;
1240
1381
  children: TreeNode[];
1241
- hasChildren: boolean;
1242
1382
  disabled: boolean;
1243
- readonly label: string;
1383
+ hasChildren: boolean;
1384
+ href: string | null;
1385
+ icon: string | null;
1244
1386
  readonly id: string;
1387
+ readonly label: string;
1245
1388
  };
1389
+ export type UiNodeType = "avatar" | "badge" | "button" | "card" | "chart" | "collapsible" | "floating-panel" | "grid" | "heading" | "icon" | "image" | "link" | "modal" | "progress" | "raw-block" | "section" | "segmented-control" | "separator" | "stack" | "tab" | "tabs" | "text" | "tooltip" | "tree";
1246
1390
  export type UnreadCount = {
1247
1391
  readonly unreadCount: number;
1248
1392
  };
1249
1393
  export type Variant = "success" | "info" | "warning" | "error";
1250
1394
  export type Width = "full" | "auto" | "sm" | "md" | "lg" | "fill";
1251
- export type WireNode = Node;
1395
+ export {};
@@ -1,2 +1,2 @@
1
- export type { ComponentProps, DateFormat, Node, NodeProps, NumberFormat, PageContainer, PageBreadcrumb, PagePayload, PropsOf, RendererComponent, } from '../index.js';
1
+ export type { ComponentProps, DateFormat, Node, NodeProps, NumberFormat, PageContainer, PageBreadcrumb, PagePayload, ComponentPropsOf, RendererComponent, } from '../index.js';
2
2
  export type { Method } from '@inertiajs/core';
@@ -4,8 +4,8 @@ import { ButtonVariant } from '../types/generated.js';
4
4
  import * as React from "react";
5
5
  export type { ButtonVariant };
6
6
  declare const buttonVariants: (props?: ({
7
- variant?: "default" | "destructive" | "ghost" | "info" | "link" | "outline" | "secondary" | "success" | null | undefined;
8
- size?: "default" | "sm" | "lg" | "icon" | null | undefined;
7
+ variant?: "link" | "default" | "destructive" | "ghost" | "info" | "outline" | "secondary" | "success" | null | undefined;
8
+ size?: "sm" | "lg" | "default" | "icon" | null | undefined;
9
9
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
10
10
  declare function Button({ className, variant, size, asChild, icon, children, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
11
11
  asChild?: boolean;