@lattice-php/lattice 0.15.0 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/action/components/action-form.js +1 -1
- package/dist/action/use-action.js +1 -1
- package/dist/chat/types.d.ts +2 -10
- package/dist/core/components/button.js +34 -18
- package/dist/core/components/button.js.map +1 -1
- package/dist/core/components/chart.js +49 -2
- package/dist/core/components/chart.js.map +1 -1
- package/dist/core/components/control.d.ts +1 -3
- package/dist/core/components/control.js.map +1 -1
- package/dist/core/components/link.js +25 -29
- package/dist/core/components/link.js.map +1 -1
- package/dist/core/types.d.ts +22 -42
- package/dist/core/use-click-behavior.d.ts +42 -0
- package/dist/core/use-click-behavior.js +46 -0
- package/dist/core/use-click-behavior.js.map +1 -0
- package/dist/create-app.d.ts +8 -2
- package/dist/create-app.js +4 -2
- package/dist/create-app.js.map +1 -1
- package/dist/effects/registry.d.ts +9 -20
- package/dist/effects/registry.js +4 -6
- package/dist/effects/registry.js.map +1 -1
- package/dist/events/event-bridge.d.ts +1 -1
- package/dist/events/event-bridge.js +1 -1
- package/dist/events/event-bridge.js.map +1 -1
- package/dist/form/components/base/input-otp.d.ts +2 -1
- package/dist/form/components/base/input-otp.js.map +1 -1
- package/dist/form/components/conditions.d.ts +1 -1
- package/dist/form/components/conditions.js.map +1 -1
- package/dist/form/components/field-props.d.ts +2 -1
- package/dist/form/components/field-props.js.map +1 -1
- package/dist/form/components/field-scope.d.ts +2 -1
- package/dist/form/components/field-scope.js.map +1 -1
- package/dist/form/components/fields/date-picker-control.js +11 -13
- package/dist/form/components/fields/date-picker-control.js.map +1 -1
- package/dist/form/components/fields/row-action-menu.d.ts +2 -1
- package/dist/form/components/fields/row-action-menu.js.map +1 -1
- package/dist/form/components/fields/row-item.d.ts +2 -1
- package/dist/form/components/fields/row-item.js.map +1 -1
- package/dist/form/components/fields/table-rows.d.ts +2 -1
- package/dist/form/components/fields/table-rows.js.map +1 -1
- package/dist/form/components/fields/time-input.js +54 -15
- package/dist/form/components/fields/time-input.js.map +1 -1
- package/dist/form/components/fields/time-picker-columns.d.ts +24 -0
- package/dist/form/components/fields/time-picker-columns.js +76 -0
- package/dist/form/components/fields/time-picker-columns.js.map +1 -0
- package/dist/form/components/fields/time-picker.d.ts +18 -0
- package/dist/form/components/fields/time-picker.js +132 -0
- package/dist/form/components/fields/time-picker.js.map +1 -0
- package/dist/form/components/fields/use-row-collection.d.ts +2 -1
- package/dist/form/components/fields/use-row-collection.js.map +1 -1
- package/dist/form/components/form-path.d.ts +0 -1
- package/dist/form/components/form-path.js +1 -1
- package/dist/form/components/form-path.js.map +1 -1
- package/dist/form/components/prefill-targets.d.ts +1 -1
- package/dist/form/components/prefill-targets.js.map +1 -1
- package/dist/form/components/types.d.ts +5 -1
- package/dist/form/components/use-field-commit.d.ts +2 -1
- package/dist/form/components/use-field-commit.js.map +1 -1
- package/dist/form/components/use-form-resolver.d.ts +2 -1
- package/dist/form/components/use-form-resolver.js.map +1 -1
- package/dist/format/date-time.d.ts +12 -0
- package/dist/format/date-time.js +30 -0
- package/dist/format/date-time.js.map +1 -0
- package/dist/format/number.d.ts +2 -0
- package/dist/format/number.js +23 -0
- package/dist/format/number.js.map +1 -0
- package/dist/{table/components/cells → format}/numeric.js +1 -1
- package/dist/format/numeric.js.map +1 -0
- package/dist/format/value.d.ts +6 -0
- package/dist/format/value.js +17 -0
- package/dist/format/value.js.map +1 -0
- package/dist/i18n/config.d.ts +2 -1
- package/dist/i18n/config.js.map +1 -1
- package/dist/i18n/date-time.js +1 -1
- package/dist/i18n/date-time.js.map +1 -1
- package/dist/i18n/instance.d.ts +1 -1
- package/dist/i18n/instance.js.map +1 -1
- package/dist/i18n/locale-reload.d.ts +2 -1
- package/dist/i18n/locale-reload.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/layout/components.js +1 -1
- package/dist/layout/menu-item.js +43 -49
- package/dist/layout/menu-item.js.map +1 -1
- package/dist/notifications/api.d.ts +6 -0
- package/dist/notifications/api.js +21 -0
- package/dist/notifications/api.js.map +1 -0
- package/dist/notifications/components/empty-state.d.ts +1 -0
- package/dist/notifications/components/empty-state.js +21 -0
- package/dist/notifications/components/empty-state.js.map +1 -0
- package/dist/notifications/components/notification-item.d.ts +6 -0
- package/dist/notifications/components/notification-item.js +65 -0
- package/dist/notifications/components/notification-item.js.map +1 -0
- package/dist/notifications/components/notification-list.d.ts +10 -0
- package/dist/notifications/components/notification-list.js +38 -0
- package/dist/notifications/components/notification-list.js.map +1 -0
- package/dist/notifications/components/notifications-echo.d.ts +5 -0
- package/dist/notifications/components/notifications-echo.js +22 -0
- package/dist/notifications/components/notifications-echo.js.map +1 -0
- package/dist/notifications/components/notifications.d.ts +3 -0
- package/dist/notifications/components/notifications.js +109 -0
- package/dist/notifications/components/notifications.js.map +1 -0
- package/dist/notifications/index.d.ts +1 -0
- package/dist/notifications/index.js +11 -0
- package/dist/notifications/index.js.map +1 -0
- package/dist/notifications/store.d.ts +25 -0
- package/dist/notifications/store.js +100 -0
- package/dist/notifications/store.js.map +1 -0
- package/dist/notifications/types.d.ts +10 -0
- package/dist/notifications/types.js +0 -0
- package/dist/realtime/build-effects.d.ts +2 -1
- package/dist/realtime/build-effects.js.map +1 -1
- package/dist/realtime/subscriptions.js.map +1 -1
- package/dist/registry/eager.js +2 -1
- package/dist/registry/eager.js.map +1 -1
- package/dist/registry/lazy.js +2 -1
- package/dist/registry/lazy.js.map +1 -1
- package/dist/table/bulk.d.ts +2 -1
- package/dist/table/bulk.js.map +1 -1
- package/dist/table/components/bulk-bar.js +2 -2
- package/dist/table/components/cells/money-cell.js +11 -12
- package/dist/table/components/cells/money-cell.js.map +1 -1
- package/dist/table/components/cells/number-cell.js +11 -11
- package/dist/table/components/cells/number-cell.js.map +1 -1
- package/dist/table/components/cells/text-cell.js +1 -1
- package/dist/table/components/filter-controls.d.ts +0 -4
- package/dist/table/components/filter-controls.js.map +1 -1
- package/dist/table/components/table-cell.js.map +1 -1
- package/dist/table/format.d.ts +1 -10
- package/dist/table/format.js +2 -24
- package/dist/table/format.js.map +1 -1
- package/dist/table/types.d.ts +7 -17
- package/dist/types/generated.d.ts +137 -290
- package/dist/types/index.d.ts +1 -1
- package/dist/vite-client.d.ts +8 -0
- package/dist/vite.d.ts +35 -1
- package/dist/vite.js +60 -2
- package/dist/vite.js.map +1 -1
- package/package.json +13 -2
- package/resources/icons/bell.svg +16 -0
- package/resources/icons/clock.svg +16 -0
- package/dist/table/components/cells/numeric.js.map +0 -1
- /package/dist/{table/components/cells → format}/numeric.d.ts +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export type Action = {
|
|
2
2
|
confirmation: Confirmation | null;
|
|
3
3
|
endpoint: string | null;
|
|
4
|
-
form:
|
|
4
|
+
form: WireNode | null;
|
|
5
5
|
icon: string | null;
|
|
6
6
|
label: string | null;
|
|
7
7
|
lazyForm: boolean | null;
|
|
@@ -14,23 +14,7 @@ export type ActionGroup = {
|
|
|
14
14
|
orientation: Orientation | null;
|
|
15
15
|
ref: string | null;
|
|
16
16
|
};
|
|
17
|
-
export type
|
|
18
|
-
type: "action";
|
|
19
|
-
key?: string;
|
|
20
|
-
id?: string;
|
|
21
|
-
props: Action;
|
|
22
|
-
} | {
|
|
23
|
-
type: "action.group";
|
|
24
|
-
key?: string;
|
|
25
|
-
id?: string;
|
|
26
|
-
props: ActionGroup;
|
|
27
|
-
schema?: Node[];
|
|
28
|
-
} | {
|
|
29
|
-
type: "bulkAction";
|
|
30
|
-
key?: string;
|
|
31
|
-
id?: string;
|
|
32
|
-
props: BulkAction;
|
|
33
|
-
};
|
|
17
|
+
export type ActionNodeType = "action" | "action.group" | "bulkAction";
|
|
34
18
|
export type ActionResult = {
|
|
35
19
|
readonly ok: boolean;
|
|
36
20
|
readonly data: Record<string, unknown>;
|
|
@@ -91,7 +75,7 @@ export type Builder = {
|
|
|
91
75
|
export type BulkAction = {
|
|
92
76
|
confirmation: Confirmation | null;
|
|
93
77
|
endpoint: string | null;
|
|
94
|
-
form:
|
|
78
|
+
form: WireNode | null;
|
|
95
79
|
icon: string | null;
|
|
96
80
|
label: string | null;
|
|
97
81
|
lazyForm: boolean | null;
|
|
@@ -100,11 +84,13 @@ export type BulkAction = {
|
|
|
100
84
|
variant: ButtonVariant | null;
|
|
101
85
|
};
|
|
102
86
|
export type Button = {
|
|
87
|
+
action: WireNode | null;
|
|
103
88
|
buttonType: ButtonType;
|
|
104
89
|
effects: Effect[];
|
|
105
90
|
href: string | null;
|
|
106
91
|
icon: string | null;
|
|
107
92
|
label: string;
|
|
93
|
+
method: HttpMethod | null;
|
|
108
94
|
variant: ButtonVariant | null;
|
|
109
95
|
};
|
|
110
96
|
export type ButtonType = "button" | "submit" | "reset";
|
|
@@ -112,7 +98,7 @@ export type ButtonVariant = "default" | "destructive" | "ghost" | "info" | "link
|
|
|
112
98
|
export type Callout = {
|
|
113
99
|
title: string | null;
|
|
114
100
|
dismissible: boolean;
|
|
115
|
-
action:
|
|
101
|
+
action: WireNode | null;
|
|
116
102
|
variant: Variant;
|
|
117
103
|
message: string;
|
|
118
104
|
};
|
|
@@ -127,6 +113,7 @@ export type Card = {
|
|
|
127
113
|
};
|
|
128
114
|
export type ChannelVisibility = "public" | "private" | "presence";
|
|
129
115
|
export type Chart = {
|
|
116
|
+
categoryFormat: NumberFormat | DateFormat | null;
|
|
130
117
|
categoryKey: string | null;
|
|
131
118
|
data: Record<string, unknown>[];
|
|
132
119
|
description: string | null;
|
|
@@ -136,6 +123,7 @@ export type Chart = {
|
|
|
136
123
|
series: ChartSeries[];
|
|
137
124
|
title: string | null;
|
|
138
125
|
tooltip: boolean;
|
|
126
|
+
valueFormat: NumberFormat | null;
|
|
139
127
|
xAxis: boolean;
|
|
140
128
|
yAxis: boolean;
|
|
141
129
|
};
|
|
@@ -159,20 +147,7 @@ export type ChatBox = {
|
|
|
159
147
|
export type ChatMessage = {
|
|
160
148
|
readonly id: string;
|
|
161
149
|
readonly role: ChatRole;
|
|
162
|
-
readonly parts:
|
|
163
|
-
};
|
|
164
|
-
export type ChatNode = {
|
|
165
|
-
type: "chat.box";
|
|
166
|
-
key?: string;
|
|
167
|
-
props: ChatBox;
|
|
168
|
-
} | {
|
|
169
|
-
type: "chat.part.text";
|
|
170
|
-
key?: string;
|
|
171
|
-
props: TextPart;
|
|
172
|
-
} | {
|
|
173
|
-
type: "chat.part.tool-call";
|
|
174
|
-
key?: string;
|
|
175
|
-
props: ToolCallPart;
|
|
150
|
+
readonly parts: WireNode[];
|
|
176
151
|
};
|
|
177
152
|
export type ChatRole = "user" | "assistant" | "system";
|
|
178
153
|
export type Checkbox = {
|
|
@@ -233,7 +208,7 @@ export type Collapsible = {
|
|
|
233
208
|
collapsed: boolean;
|
|
234
209
|
rememberState: boolean;
|
|
235
210
|
tooltip: string | null;
|
|
236
|
-
trigger:
|
|
211
|
+
trigger: WireNode[];
|
|
237
212
|
};
|
|
238
213
|
export type Color = "default" | "muted" | "primary" | "success" | "info" | "warning" | "danger";
|
|
239
214
|
export type ColumnAlign = "start" | "center" | "end";
|
|
@@ -281,6 +256,63 @@ export type ColumnPropsMap = {
|
|
|
281
256
|
};
|
|
282
257
|
export type ColumnType = "column.text" | "column.boolean" | "column.number" | "column.money" | "column.stack" | "column.badge" | "column.icon" | "column.image";
|
|
283
258
|
export type ColumnWidth = "xs" | "sm" | "md" | "lg" | "xl";
|
|
259
|
+
export type ComponentPropsMap = {
|
|
260
|
+
action: Action;
|
|
261
|
+
"action.group": ActionGroup;
|
|
262
|
+
badge: Badge;
|
|
263
|
+
breadcrumbs: Breadcrumbs;
|
|
264
|
+
bulkAction: BulkAction;
|
|
265
|
+
button: Button;
|
|
266
|
+
callouts: Callouts;
|
|
267
|
+
card: Card;
|
|
268
|
+
chart: Chart;
|
|
269
|
+
"chat.box": ChatBox;
|
|
270
|
+
"chat.part.text": TextPart;
|
|
271
|
+
"chat.part.tool-call": ToolCallPart;
|
|
272
|
+
collapsible: Collapsible;
|
|
273
|
+
dropdown: Dropdown;
|
|
274
|
+
"field.builder": Builder;
|
|
275
|
+
"field.checkbox": Checkbox;
|
|
276
|
+
"field.choice": Choice;
|
|
277
|
+
"field.date-input": DateInput;
|
|
278
|
+
"field.date-time-input": DateTimeInput;
|
|
279
|
+
"field.file-upload": FileUpload;
|
|
280
|
+
"field.hidden-input": HiddenInput;
|
|
281
|
+
"field.number-input": NumberInput;
|
|
282
|
+
"field.otp": OtpInput;
|
|
283
|
+
"field.password-input": PasswordInput;
|
|
284
|
+
"field.repeater": Repeater;
|
|
285
|
+
"field.rich-editor": RichEditor;
|
|
286
|
+
"field.select": Select;
|
|
287
|
+
"field.text-input": TextInput;
|
|
288
|
+
"field.textarea": Textarea;
|
|
289
|
+
"field.time-input": TimeInput;
|
|
290
|
+
"field.toggle": Toggle;
|
|
291
|
+
"floating-panel": FloatingPanel;
|
|
292
|
+
form: Form;
|
|
293
|
+
fragment: Fragment;
|
|
294
|
+
grid: Grid;
|
|
295
|
+
heading: Heading;
|
|
296
|
+
icon: Icon;
|
|
297
|
+
link: Link;
|
|
298
|
+
menu: Menu;
|
|
299
|
+
"menu-item": MenuItem;
|
|
300
|
+
modal: Modal;
|
|
301
|
+
notifications: Notifications;
|
|
302
|
+
outlet: Outlet;
|
|
303
|
+
"raw-block": RawBlock;
|
|
304
|
+
"remote.data-list": DataList;
|
|
305
|
+
section: Section;
|
|
306
|
+
"segmented-control": SegmentedControl;
|
|
307
|
+
sidebar: Sidebar;
|
|
308
|
+
stack: Stack;
|
|
309
|
+
tab: Tab;
|
|
310
|
+
table: Table;
|
|
311
|
+
tabs: Tabs;
|
|
312
|
+
text: Text;
|
|
313
|
+
tooltip: Tooltip;
|
|
314
|
+
topbar: Topbar;
|
|
315
|
+
};
|
|
284
316
|
export type Condition = {
|
|
285
317
|
readonly field: string;
|
|
286
318
|
readonly operator: Op;
|
|
@@ -292,98 +324,18 @@ export type Confirmation = {
|
|
|
292
324
|
readonly confirmLabel: string | null;
|
|
293
325
|
readonly cancelLabel: string | null;
|
|
294
326
|
};
|
|
295
|
-
export type CoreNode = {
|
|
296
|
-
type: "badge";
|
|
297
|
-
key?: string;
|
|
298
|
-
props: Badge;
|
|
299
|
-
} | {
|
|
300
|
-
type: "button";
|
|
301
|
-
key?: string;
|
|
302
|
-
props: Button;
|
|
303
|
-
} | {
|
|
304
|
-
type: "card";
|
|
305
|
-
key?: string;
|
|
306
|
-
props: Card;
|
|
307
|
-
schema?: Node[];
|
|
308
|
-
} | {
|
|
309
|
-
type: "chart";
|
|
310
|
-
key?: string;
|
|
311
|
-
props: Chart;
|
|
312
|
-
} | {
|
|
313
|
-
type: "collapsible";
|
|
314
|
-
key?: string;
|
|
315
|
-
props: Collapsible;
|
|
316
|
-
schema?: Node[];
|
|
317
|
-
} | {
|
|
318
|
-
type: "floating-panel";
|
|
319
|
-
key?: string;
|
|
320
|
-
props: FloatingPanel;
|
|
321
|
-
schema?: Node[];
|
|
322
|
-
} | {
|
|
323
|
-
type: "grid";
|
|
324
|
-
key?: string;
|
|
325
|
-
props: Grid;
|
|
326
|
-
schema?: Node[];
|
|
327
|
-
} | {
|
|
328
|
-
type: "heading";
|
|
329
|
-
key?: string;
|
|
330
|
-
props: Heading;
|
|
331
|
-
} | {
|
|
332
|
-
type: "icon";
|
|
333
|
-
key?: string;
|
|
334
|
-
props: Icon;
|
|
335
|
-
} | {
|
|
336
|
-
type: "link";
|
|
337
|
-
key?: string;
|
|
338
|
-
props: Link;
|
|
339
|
-
} | {
|
|
340
|
-
type: "modal";
|
|
341
|
-
key?: string;
|
|
342
|
-
id?: string;
|
|
343
|
-
props: Modal;
|
|
344
|
-
schema?: Node[];
|
|
345
|
-
} | {
|
|
346
|
-
type: "raw-block";
|
|
347
|
-
key?: string;
|
|
348
|
-
props: RawBlock;
|
|
349
|
-
} | {
|
|
350
|
-
type: "section";
|
|
351
|
-
key?: string;
|
|
352
|
-
props: Section;
|
|
353
|
-
schema?: Node[];
|
|
354
|
-
} | {
|
|
355
|
-
type: "segmented-control";
|
|
356
|
-
key?: string;
|
|
357
|
-
props: SegmentedControl;
|
|
358
|
-
} | {
|
|
359
|
-
type: "stack";
|
|
360
|
-
key?: string;
|
|
361
|
-
props: Stack;
|
|
362
|
-
schema?: Node[];
|
|
363
|
-
} | {
|
|
364
|
-
type: "tab";
|
|
365
|
-
key?: string;
|
|
366
|
-
props: Tab;
|
|
367
|
-
schema?: Node[];
|
|
368
|
-
} | {
|
|
369
|
-
type: "tabs";
|
|
370
|
-
key?: string;
|
|
371
|
-
props: Tabs;
|
|
372
|
-
schema?: Node[];
|
|
373
|
-
} | {
|
|
374
|
-
type: "text";
|
|
375
|
-
key?: string;
|
|
376
|
-
props: Text;
|
|
377
|
-
} | {
|
|
378
|
-
type: "tooltip";
|
|
379
|
-
key?: string;
|
|
380
|
-
props: Tooltip;
|
|
381
|
-
};
|
|
382
327
|
export type DataList = {
|
|
383
328
|
dataEndpoint: string | null;
|
|
384
329
|
emptyLabel: string | null;
|
|
385
330
|
remote: RemoteAccess | null;
|
|
386
331
|
};
|
|
332
|
+
export type DateFormat = {
|
|
333
|
+
kind: string;
|
|
334
|
+
dateStyle: string | null;
|
|
335
|
+
timeStyle: string | null;
|
|
336
|
+
month: string | null;
|
|
337
|
+
year: string | null;
|
|
338
|
+
};
|
|
387
339
|
export type DateInput = {
|
|
388
340
|
autoFocus: boolean;
|
|
389
341
|
columnWidth: ColumnWidth;
|
|
@@ -447,31 +399,24 @@ export type DownloadEffect = {
|
|
|
447
399
|
};
|
|
448
400
|
export type Dropdown = {
|
|
449
401
|
placement: Placement;
|
|
450
|
-
trigger:
|
|
451
|
-
};
|
|
452
|
-
export type Effect =
|
|
453
|
-
type:
|
|
454
|
-
} &
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
} & ReloadPageEffect) | ({
|
|
469
|
-
type: "resetForm";
|
|
470
|
-
} & ResetFormEffect) | ({
|
|
471
|
-
type: "toast";
|
|
472
|
-
} & ToastEffect) | ({
|
|
473
|
-
type: "toggleSidebar";
|
|
474
|
-
} & ToggleSidebarEffect);
|
|
402
|
+
trigger: WireNode[];
|
|
403
|
+
};
|
|
404
|
+
export type Effect = {
|
|
405
|
+
type: string;
|
|
406
|
+
} & Record<string, unknown>;
|
|
407
|
+
export type EffectPropsMap = {
|
|
408
|
+
callout: CalloutEffect;
|
|
409
|
+
closeModal: CloseModalEffect;
|
|
410
|
+
download: DownloadEffect;
|
|
411
|
+
localeChange: LocaleChangeEffect;
|
|
412
|
+
openModal: OpenModalEffect;
|
|
413
|
+
redirect: RedirectEffect;
|
|
414
|
+
reloadComponent: ReloadComponentEffect;
|
|
415
|
+
reloadPage: ReloadPageEffect;
|
|
416
|
+
resetForm: ResetFormEffect;
|
|
417
|
+
toast: ToastEffect;
|
|
418
|
+
toggleSidebar: ToggleSidebarEffect;
|
|
419
|
+
};
|
|
475
420
|
export type FieldType = "field.builder" | "field.checkbox" | "field.choice" | "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.textarea" | "field.text-input" | "field.time-input" | "field.toggle";
|
|
476
421
|
export type FileUpload = {
|
|
477
422
|
accept: string | null;
|
|
@@ -526,7 +471,7 @@ export type FloatingPanel = {
|
|
|
526
471
|
label: string | null;
|
|
527
472
|
offset: number;
|
|
528
473
|
placement: FloatingPlacement;
|
|
529
|
-
trigger:
|
|
474
|
+
trigger: WireNode[];
|
|
530
475
|
};
|
|
531
476
|
export type FloatingPlacement = "bottom-end" | "bottom-start" | "top-end" | "top-start";
|
|
532
477
|
export type Form = {
|
|
@@ -544,96 +489,14 @@ export type Form = {
|
|
|
544
489
|
validationSummaryLabel: string;
|
|
545
490
|
validationTimeout: number | null;
|
|
546
491
|
};
|
|
547
|
-
export type
|
|
548
|
-
|
|
549
|
-
key?: string;
|
|
550
|
-
props: Builder;
|
|
551
|
-
} | {
|
|
552
|
-
type: "field.checkbox";
|
|
553
|
-
key?: string;
|
|
554
|
-
props: Checkbox;
|
|
555
|
-
} | {
|
|
556
|
-
type: "field.choice";
|
|
557
|
-
key?: string;
|
|
558
|
-
props: Choice;
|
|
559
|
-
} | {
|
|
560
|
-
type: "field.date-input";
|
|
561
|
-
key?: string;
|
|
562
|
-
props: DateInput;
|
|
563
|
-
} | {
|
|
564
|
-
type: "field.date-time-input";
|
|
565
|
-
key?: string;
|
|
566
|
-
props: DateTimeInput;
|
|
567
|
-
} | {
|
|
568
|
-
type: "field.file-upload";
|
|
569
|
-
key?: string;
|
|
570
|
-
props: FileUpload;
|
|
571
|
-
} | {
|
|
572
|
-
type: "field.hidden-input";
|
|
573
|
-
key?: string;
|
|
574
|
-
props: HiddenInput;
|
|
575
|
-
} | {
|
|
576
|
-
type: "field.number-input";
|
|
577
|
-
key?: string;
|
|
578
|
-
props: NumberInput;
|
|
579
|
-
} | {
|
|
580
|
-
type: "field.otp";
|
|
581
|
-
key?: string;
|
|
582
|
-
props: OtpInput;
|
|
583
|
-
} | {
|
|
584
|
-
type: "field.password-input";
|
|
585
|
-
key?: string;
|
|
586
|
-
props: PasswordInput;
|
|
587
|
-
} | {
|
|
588
|
-
type: "field.repeater";
|
|
589
|
-
key?: string;
|
|
590
|
-
props: Repeater;
|
|
591
|
-
} | {
|
|
592
|
-
type: "field.rich-editor";
|
|
593
|
-
key?: string;
|
|
594
|
-
props: RichEditor;
|
|
595
|
-
} | {
|
|
596
|
-
type: "field.select";
|
|
597
|
-
key?: string;
|
|
598
|
-
props: Select;
|
|
599
|
-
} | {
|
|
600
|
-
type: "field.text-input";
|
|
601
|
-
key?: string;
|
|
602
|
-
props: TextInput;
|
|
603
|
-
} | {
|
|
604
|
-
type: "field.textarea";
|
|
605
|
-
key?: string;
|
|
606
|
-
props: Textarea;
|
|
607
|
-
} | {
|
|
608
|
-
type: "field.time-input";
|
|
609
|
-
key?: string;
|
|
610
|
-
props: TimeInput;
|
|
611
|
-
} | {
|
|
612
|
-
type: "field.toggle";
|
|
613
|
-
key?: string;
|
|
614
|
-
props: Toggle;
|
|
615
|
-
};
|
|
616
|
-
export type FormNode = FormFieldNode | {
|
|
617
|
-
type: "form";
|
|
618
|
-
key?: string;
|
|
619
|
-
id?: string;
|
|
620
|
-
props: Form;
|
|
621
|
-
schema?: Node[];
|
|
622
|
-
};
|
|
623
|
-
export type FormNodeType = FormNode["type"];
|
|
492
|
+
export type FormFieldNodeType = "field.builder" | "field.checkbox" | "field.choice" | "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";
|
|
493
|
+
export type FormNodeType = "field.builder" | "field.checkbox" | "field.choice" | "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" | "form";
|
|
624
494
|
export type Fragment = {
|
|
625
495
|
endpoint: string | null;
|
|
626
496
|
lazy: boolean | null;
|
|
627
497
|
ref: string | null;
|
|
628
498
|
size: Size;
|
|
629
499
|
};
|
|
630
|
-
export type FragmentNode = {
|
|
631
|
-
type: "fragment";
|
|
632
|
-
key?: string;
|
|
633
|
-
id?: string;
|
|
634
|
-
props: Fragment;
|
|
635
|
-
schema?: Node[];
|
|
636
|
-
};
|
|
637
500
|
export type Gap = "none" | "xs" | "sm" | "md" | "lg" | "xl";
|
|
638
501
|
export type Grid = {
|
|
639
502
|
columns: number | null;
|
|
@@ -691,46 +554,9 @@ export type ImageColumn = {
|
|
|
691
554
|
size: number | null;
|
|
692
555
|
};
|
|
693
556
|
export type Justify = "start" | "center" | "end" | "between" | "around" | "evenly";
|
|
694
|
-
export type LayoutNode = {
|
|
695
|
-
type: "breadcrumbs";
|
|
696
|
-
key?: string;
|
|
697
|
-
props: Breadcrumbs;
|
|
698
|
-
} | {
|
|
699
|
-
type: "callouts";
|
|
700
|
-
key?: string;
|
|
701
|
-
props: Callouts;
|
|
702
|
-
} | {
|
|
703
|
-
type: "dropdown";
|
|
704
|
-
key?: string;
|
|
705
|
-
props: Dropdown;
|
|
706
|
-
schema?: Node[];
|
|
707
|
-
} | {
|
|
708
|
-
type: "menu";
|
|
709
|
-
key?: string;
|
|
710
|
-
props: Menu;
|
|
711
|
-
schema?: Node[];
|
|
712
|
-
} | {
|
|
713
|
-
type: "menu-item";
|
|
714
|
-
key?: string;
|
|
715
|
-
props: MenuItem;
|
|
716
|
-
schema?: Node[];
|
|
717
|
-
} | {
|
|
718
|
-
type: "outlet";
|
|
719
|
-
key?: string;
|
|
720
|
-
props: Outlet;
|
|
721
|
-
} | {
|
|
722
|
-
type: "sidebar";
|
|
723
|
-
key?: string;
|
|
724
|
-
props: Sidebar;
|
|
725
|
-
schema?: Node[];
|
|
726
|
-
} | {
|
|
727
|
-
type: "topbar";
|
|
728
|
-
key?: string;
|
|
729
|
-
props: Topbar;
|
|
730
|
-
schema?: Node[];
|
|
731
|
-
};
|
|
732
557
|
export type Link = {
|
|
733
|
-
action:
|
|
558
|
+
action: WireNode | null;
|
|
559
|
+
effects: Effect[];
|
|
734
560
|
href: string | null;
|
|
735
561
|
icon: string | null;
|
|
736
562
|
label: string;
|
|
@@ -750,7 +576,8 @@ export type LocaleChangeEffect = {
|
|
|
750
576
|
};
|
|
751
577
|
export type Menu = Record<string, never>;
|
|
752
578
|
export type MenuItem = {
|
|
753
|
-
action:
|
|
579
|
+
action: WireNode | null;
|
|
580
|
+
effects: Effect[];
|
|
754
581
|
href: string | null;
|
|
755
582
|
icon: string | null;
|
|
756
583
|
label: string;
|
|
@@ -771,13 +598,38 @@ export type MoneyColumn = {
|
|
|
771
598
|
maximumFractionDigits: number | null;
|
|
772
599
|
minimumFractionDigits: number | null;
|
|
773
600
|
};
|
|
774
|
-
export type
|
|
775
|
-
export type
|
|
601
|
+
export type NodeType = "action" | "action.group" | "badge" | "breadcrumbs" | "bulkAction" | "button" | "callouts" | "card" | "chart" | "chat.box" | "chat.part.text" | "chat.part.tool-call" | "collapsible" | "dropdown" | "field.builder" | "field.checkbox" | "field.choice" | "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" | "link" | "menu" | "menu-item" | "modal" | "notifications" | "outlet" | "raw-block" | "remote.data-list" | "section" | "segmented-control" | "sidebar" | "stack" | "tab" | "table" | "tabs" | "text" | "tooltip" | "topbar";
|
|
602
|
+
export type NotificationItem = {
|
|
603
|
+
readonly id: string;
|
|
604
|
+
readonly title: string | null;
|
|
605
|
+
readonly body: string | null;
|
|
606
|
+
readonly icon: string | null;
|
|
607
|
+
readonly variant: Variant | null;
|
|
608
|
+
readonly href: string | null;
|
|
609
|
+
readonly isRead: boolean;
|
|
610
|
+
readonly createdAt: string | null;
|
|
611
|
+
readonly actions: WireNode[];
|
|
612
|
+
};
|
|
613
|
+
export type Notifications = {
|
|
614
|
+
channel: string;
|
|
615
|
+
endpoint: string;
|
|
616
|
+
pollingInterval: number | null;
|
|
617
|
+
slideOut: boolean;
|
|
618
|
+
};
|
|
776
619
|
export type NumberColumn = {
|
|
620
|
+
compact: boolean;
|
|
777
621
|
maximumFractionDigits: number | null;
|
|
778
622
|
minimumFractionDigits: number | null;
|
|
779
623
|
unit: NumberFormatUnit | null;
|
|
780
624
|
};
|
|
625
|
+
export type NumberFormat = {
|
|
626
|
+
kind: string;
|
|
627
|
+
notation: string;
|
|
628
|
+
minimumFractionDigits: number | null;
|
|
629
|
+
maximumFractionDigits: number | null;
|
|
630
|
+
currency: string | null;
|
|
631
|
+
unit: NumberFormatUnit | null;
|
|
632
|
+
};
|
|
781
633
|
export type NumberFormatUnit = "percent" | "kilogram" | "gram" | "kilometer" | "meter" | "byte" | "kilobyte" | "megabyte" | "gigabyte" | "millisecond" | "second" | "minute" | "hour" | "celsius" | "fahrenheit";
|
|
782
634
|
export type NumberInput = {
|
|
783
635
|
autoFocus: boolean;
|
|
@@ -909,12 +761,6 @@ export type RemoteAccess = {
|
|
|
909
761
|
readonly tokenEndpoint: string;
|
|
910
762
|
readonly ref: string;
|
|
911
763
|
};
|
|
912
|
-
export type RemoteNode = {
|
|
913
|
-
type: "remote.data-list";
|
|
914
|
-
key?: string;
|
|
915
|
-
props: DataList;
|
|
916
|
-
schema?: Node[];
|
|
917
|
-
};
|
|
918
764
|
export type Repeater = {
|
|
919
765
|
addLabel: string | null;
|
|
920
766
|
columnWidth: ColumnWidth;
|
|
@@ -988,7 +834,7 @@ export type Section = {
|
|
|
988
834
|
collapsed: boolean;
|
|
989
835
|
collapsible: boolean;
|
|
990
836
|
description: string | null;
|
|
991
|
-
headerActions:
|
|
837
|
+
headerActions: WireNode[];
|
|
992
838
|
rememberState: boolean;
|
|
993
839
|
title: string | null;
|
|
994
840
|
tooltip: string | null;
|
|
@@ -1058,7 +904,7 @@ export type Tab = {
|
|
|
1058
904
|
};
|
|
1059
905
|
export type Table = {
|
|
1060
906
|
actionsLabel: string;
|
|
1061
|
-
bulkActions:
|
|
907
|
+
bulkActions: WireNode[];
|
|
1062
908
|
columns: ColumnData[];
|
|
1063
909
|
emptyLabel: string;
|
|
1064
910
|
endpoint: string | null;
|
|
@@ -1070,12 +916,6 @@ export type Table = {
|
|
|
1070
916
|
resizeIndicator: boolean;
|
|
1071
917
|
striped: boolean | null;
|
|
1072
918
|
};
|
|
1073
|
-
export type TableNode = {
|
|
1074
|
-
type: "table";
|
|
1075
|
-
key?: string;
|
|
1076
|
-
id?: string;
|
|
1077
|
-
props: Table;
|
|
1078
|
-
};
|
|
1079
919
|
export type TablePagination = {
|
|
1080
920
|
readonly mode: PaginationType;
|
|
1081
921
|
readonly currentPage: number | null;
|
|
@@ -1223,7 +1063,7 @@ export type ToastMessage = {
|
|
|
1223
1063
|
duration: number | null;
|
|
1224
1064
|
persistent: boolean;
|
|
1225
1065
|
dismissible: boolean;
|
|
1226
|
-
action:
|
|
1066
|
+
action: WireNode | null;
|
|
1227
1067
|
variant: Variant;
|
|
1228
1068
|
message: Translatable | string;
|
|
1229
1069
|
};
|
|
@@ -1261,7 +1101,7 @@ export type ToolCallPart = {
|
|
|
1261
1101
|
};
|
|
1262
1102
|
export type Tooltip = {
|
|
1263
1103
|
content: string | null;
|
|
1264
|
-
trigger:
|
|
1104
|
+
trigger: WireNode[];
|
|
1265
1105
|
};
|
|
1266
1106
|
export type Topbar = {
|
|
1267
1107
|
sticky: boolean;
|
|
@@ -1273,3 +1113,10 @@ export type Translatable = {
|
|
|
1273
1113
|
};
|
|
1274
1114
|
export type Variant = "success" | "info" | "warning" | "error";
|
|
1275
1115
|
export type Width = "full" | "auto" | "sm" | "md" | "lg" | "fill";
|
|
1116
|
+
export type WireNode = {
|
|
1117
|
+
id?: string;
|
|
1118
|
+
key?: string;
|
|
1119
|
+
type: string;
|
|
1120
|
+
props?: Record<string, unknown>;
|
|
1121
|
+
schema?: WireNode[];
|
|
1122
|
+
};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type { ComponentProps, Node, NodeProps, PageContainer, PageBreadcrumb, PagePayload, PropsOf, RendererComponent, } from '..';
|
|
1
|
+
export type { ComponentProps, DateFormat, Node, NodeProps, NumberFormat, PageContainer, PageBreadcrumb, PagePayload, PropsOf, RendererComponent, } from '..';
|
|
2
2
|
export type { Method } from '@inertiajs/core';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
declare module "virtual:lattice/plugins" {
|
|
2
|
+
import type { Plugin } from "@lattice-php/lattice";
|
|
3
|
+
|
|
4
|
+
/** Plugins for the Composer-installed Lattice component packages the `lattice()` Vite plugin discovered. */
|
|
5
|
+
const plugins: Plugin[];
|
|
6
|
+
|
|
7
|
+
export default plugins;
|
|
8
|
+
}
|
package/dist/vite.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SvgSpriteOptions } from '@lattice-php/vite-svg-sprite';
|
|
2
|
-
import { PluginOption, UserConfig } from 'vite';
|
|
2
|
+
import { Plugin, PluginOption, UserConfig } from 'vite';
|
|
3
3
|
type InlineDependency = string | RegExp;
|
|
4
4
|
type ConfigWithTest = UserConfig & {
|
|
5
5
|
test?: {
|
|
@@ -21,5 +21,39 @@ export type LatticeViteOptions = {
|
|
|
21
21
|
source?: boolean;
|
|
22
22
|
};
|
|
23
23
|
export declare function lattice(options?: LatticeViteOptions): PluginOption[];
|
|
24
|
+
/** A Composer package that contributes a Lattice component plugin. */
|
|
25
|
+
export type LatticeComponentPackage = {
|
|
26
|
+
name: string;
|
|
27
|
+
/** Absolute path to the package's installed directory. */
|
|
28
|
+
dir: string;
|
|
29
|
+
/** Absolute path to the package's JS plugin entry (its `createPlugin(...)`). */
|
|
30
|
+
plugin: string;
|
|
31
|
+
};
|
|
32
|
+
type InstalledPackage = {
|
|
33
|
+
name: string;
|
|
34
|
+
"install-path"?: string;
|
|
35
|
+
extra?: {
|
|
36
|
+
lattice?: {
|
|
37
|
+
plugin?: string;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Resolve every Composer package that declares `extra.lattice.plugin` into an
|
|
43
|
+
* absolute plugin-entry path. `installPathsRelativeTo` is `vendor/composer` (the
|
|
44
|
+
* dir `installed.json` records its `install-path`s against).
|
|
45
|
+
*/
|
|
46
|
+
export declare function collectComponentPackages(installed: {
|
|
47
|
+
packages?: InstalledPackage[];
|
|
48
|
+
} | InstalledPackage[], installPathsRelativeTo: string): LatticeComponentPackage[];
|
|
49
|
+
/** Read `<appRoot>/vendor/composer/installed.json` and collect component packages. */
|
|
50
|
+
export declare function discoverComponentPackages(appRoot: string): LatticeComponentPackage[];
|
|
51
|
+
/**
|
|
52
|
+
* Exposes the discovered component packages as `virtual:lattice/plugins` — a
|
|
53
|
+
* module whose default export is the array of their `createPlugin(...)` results,
|
|
54
|
+
* ready for `extendRegistry(registry, ...plugins)`. Also grants Vite filesystem
|
|
55
|
+
* access to each package dir so its source compiles from `vendor/` (or a symlink).
|
|
56
|
+
*/
|
|
57
|
+
export declare function componentPackagesPlugin(packages: LatticeComponentPackage[]): Plugin;
|
|
24
58
|
export declare function latticeConfig(options?: LatticeViteOptions): ConfigWithTest;
|
|
25
59
|
export {};
|