@tailor-platform/app-shell 1.17.0 → 1.18.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/app-shell-core.css +1 -1
- package/dist/app-shell.d.ts +228 -103
- package/dist/app-shell.js +4236 -3585
- package/dist/{appshell-CahhZy7v.js → appshell-Y1AYCuVJ.js} +10 -10
- package/dist/semantic-contrast.test.ts +73 -0
- package/dist/style-entry.d.ts +102 -102
- package/dist/testing.d.ts +102 -102
- package/dist/testing.js +1 -1
- package/dist/theme-bridge.test.ts +30 -7
- package/dist/theme.bridge.css +127 -40
- package/dist/theme.css +4 -3
- package/dist/themes/_template.css +5 -6
- package/dist/themes/bloom.css +0 -2
- package/dist/themes/cream.css +0 -2
- package/dist/themes/default.css +112 -77
- package/dist/vite-plugin.d.ts +102 -102
- package/package.json +2 -2
- package/skills/app-shell-patterns/SKILL.md +41 -32
- package/skills/app-shell-patterns/references/api/define-i18n-labels.md +123 -91
- package/skills/app-shell-patterns/references/api/define-module.md +2 -4
- package/skills/app-shell-patterns/references/components/data-table.md +332 -25
- package/skills/app-shell-patterns/references/components/sidebar-group.md +6 -6
- package/skills/app-shell-patterns/references/components/text.md +198 -0
- package/skills/app-shell-patterns/references/concepts/styling-theming.md +30 -14
- package/skills/app-shell-patterns/references/migrations.md +22 -1
- package/skills/app-shell-patterns/references/patterns/i18n-labels.md +139 -0
- package/skills/app-shell-patterns/references/patterns/list-dense-scan.md +3 -2
package/dist/vite-plugin.d.ts
CHANGED
|
@@ -56,37 +56,17 @@ declare namespace Root {
|
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
|
|
59
|
-
declare namespace
|
|
60
|
-
var displayName: string;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
declare namespace Body {
|
|
65
|
-
var displayName: string;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
declare namespace Footer {
|
|
70
|
-
var displayName: string;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
declare namespace Row {
|
|
75
|
-
var displayName: string;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
declare namespace Head {
|
|
59
|
+
declare namespace Title {
|
|
80
60
|
var displayName: string;
|
|
81
61
|
}
|
|
82
62
|
|
|
83
63
|
|
|
84
|
-
declare namespace
|
|
64
|
+
declare namespace Description {
|
|
85
65
|
var displayName: string;
|
|
86
66
|
}
|
|
87
67
|
|
|
88
68
|
|
|
89
|
-
declare namespace
|
|
69
|
+
declare namespace Provider {
|
|
90
70
|
var displayName: string;
|
|
91
71
|
}
|
|
92
72
|
|
|
@@ -101,12 +81,12 @@ declare namespace Header {
|
|
|
101
81
|
}
|
|
102
82
|
|
|
103
83
|
|
|
104
|
-
declare namespace
|
|
84
|
+
declare namespace ClearAll {
|
|
105
85
|
var displayName: string;
|
|
106
86
|
}
|
|
107
87
|
|
|
108
88
|
|
|
109
|
-
declare namespace
|
|
89
|
+
declare namespace Sections {
|
|
110
90
|
var displayName: string;
|
|
111
91
|
}
|
|
112
92
|
|
|
@@ -116,12 +96,12 @@ declare namespace Trigger {
|
|
|
116
96
|
}
|
|
117
97
|
|
|
118
98
|
|
|
119
|
-
declare namespace
|
|
99
|
+
declare namespace Settings {
|
|
120
100
|
var displayName: string;
|
|
121
101
|
}
|
|
122
102
|
|
|
123
103
|
|
|
124
|
-
declare namespace
|
|
104
|
+
declare namespace Root {
|
|
125
105
|
var displayName: string;
|
|
126
106
|
}
|
|
127
107
|
|
|
@@ -131,17 +111,7 @@ declare namespace Header {
|
|
|
131
111
|
}
|
|
132
112
|
|
|
133
113
|
|
|
134
|
-
declare namespace
|
|
135
|
-
var displayName: string;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
declare namespace Title {
|
|
140
|
-
var displayName: string;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
declare namespace Description {
|
|
114
|
+
declare namespace Content {
|
|
145
115
|
var displayName: string;
|
|
146
116
|
}
|
|
147
117
|
|
|
@@ -151,122 +121,117 @@ declare namespace Root {
|
|
|
151
121
|
}
|
|
152
122
|
|
|
153
123
|
|
|
154
|
-
declare namespace
|
|
155
|
-
var displayName: string;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
declare namespace ComboboxRoot {
|
|
124
|
+
declare namespace Header {
|
|
160
125
|
var displayName: string;
|
|
161
126
|
}
|
|
162
127
|
|
|
163
128
|
|
|
164
|
-
declare namespace
|
|
129
|
+
declare namespace Body {
|
|
165
130
|
var displayName: string;
|
|
166
131
|
}
|
|
167
132
|
|
|
168
133
|
|
|
169
|
-
declare namespace
|
|
134
|
+
declare namespace Footer {
|
|
170
135
|
var displayName: string;
|
|
171
136
|
}
|
|
172
137
|
|
|
173
138
|
|
|
174
|
-
declare namespace
|
|
139
|
+
declare namespace Row {
|
|
175
140
|
var displayName: string;
|
|
176
141
|
}
|
|
177
142
|
|
|
178
143
|
|
|
179
|
-
declare namespace
|
|
144
|
+
declare namespace Head {
|
|
180
145
|
var displayName: string;
|
|
181
146
|
}
|
|
182
147
|
|
|
183
148
|
|
|
184
|
-
declare namespace
|
|
149
|
+
declare namespace Cell {
|
|
185
150
|
var displayName: string;
|
|
186
151
|
}
|
|
187
152
|
|
|
188
153
|
|
|
189
|
-
declare namespace
|
|
154
|
+
declare namespace Caption {
|
|
190
155
|
var displayName: string;
|
|
191
156
|
}
|
|
192
157
|
|
|
193
158
|
|
|
194
|
-
declare namespace
|
|
159
|
+
declare namespace Root {
|
|
195
160
|
var displayName: string;
|
|
196
161
|
}
|
|
197
162
|
|
|
198
163
|
|
|
199
|
-
declare namespace
|
|
164
|
+
declare namespace Trigger {
|
|
200
165
|
var displayName: string;
|
|
201
166
|
}
|
|
202
167
|
|
|
203
168
|
|
|
204
|
-
declare namespace
|
|
169
|
+
declare namespace Close {
|
|
205
170
|
var displayName: string;
|
|
206
171
|
}
|
|
207
172
|
|
|
208
173
|
|
|
209
|
-
declare namespace
|
|
174
|
+
declare namespace Content {
|
|
210
175
|
var displayName: string;
|
|
211
176
|
}
|
|
212
177
|
|
|
213
178
|
|
|
214
|
-
declare namespace
|
|
179
|
+
declare namespace Header {
|
|
215
180
|
var displayName: string;
|
|
216
181
|
}
|
|
217
182
|
|
|
218
183
|
|
|
219
|
-
declare namespace
|
|
184
|
+
declare namespace Footer {
|
|
220
185
|
var displayName: string;
|
|
221
186
|
}
|
|
222
187
|
|
|
223
188
|
|
|
224
|
-
declare namespace
|
|
189
|
+
declare namespace Title {
|
|
225
190
|
var displayName: string;
|
|
226
191
|
}
|
|
227
192
|
|
|
228
193
|
|
|
229
|
-
declare namespace
|
|
194
|
+
declare namespace Description {
|
|
230
195
|
var displayName: string;
|
|
231
196
|
}
|
|
232
197
|
|
|
233
198
|
|
|
234
|
-
declare namespace
|
|
199
|
+
declare namespace Root {
|
|
235
200
|
var displayName: string;
|
|
236
201
|
}
|
|
237
202
|
|
|
238
203
|
|
|
239
|
-
declare namespace
|
|
204
|
+
declare namespace Label {
|
|
240
205
|
var displayName: string;
|
|
241
206
|
}
|
|
242
207
|
|
|
243
208
|
|
|
244
|
-
declare namespace
|
|
209
|
+
declare namespace Control {
|
|
245
210
|
var displayName: string;
|
|
246
211
|
}
|
|
247
212
|
|
|
248
213
|
|
|
249
|
-
declare namespace
|
|
214
|
+
declare namespace Description {
|
|
250
215
|
var displayName: string;
|
|
251
216
|
}
|
|
252
217
|
|
|
253
218
|
|
|
254
|
-
declare namespace
|
|
219
|
+
declare namespace Error {
|
|
255
220
|
var displayName: string;
|
|
256
221
|
}
|
|
257
222
|
|
|
258
223
|
|
|
259
|
-
declare namespace
|
|
224
|
+
declare namespace Validity {
|
|
260
225
|
var displayName: string;
|
|
261
226
|
}
|
|
262
227
|
|
|
263
228
|
|
|
264
|
-
declare namespace
|
|
229
|
+
declare namespace Root {
|
|
265
230
|
var displayName: string;
|
|
266
231
|
}
|
|
267
232
|
|
|
268
233
|
|
|
269
|
-
declare namespace
|
|
234
|
+
declare namespace Legend {
|
|
270
235
|
var displayName: string;
|
|
271
236
|
}
|
|
272
237
|
|
|
@@ -351,57 +316,57 @@ declare namespace Root {
|
|
|
351
316
|
}
|
|
352
317
|
|
|
353
318
|
|
|
354
|
-
declare namespace
|
|
319
|
+
declare namespace Trigger {
|
|
355
320
|
var displayName: string;
|
|
356
321
|
}
|
|
357
322
|
|
|
358
323
|
|
|
359
|
-
declare namespace
|
|
324
|
+
declare namespace Close {
|
|
360
325
|
var displayName: string;
|
|
361
326
|
}
|
|
362
327
|
|
|
363
328
|
|
|
364
|
-
declare namespace
|
|
329
|
+
declare namespace Content {
|
|
365
330
|
var displayName: string;
|
|
366
331
|
}
|
|
367
332
|
|
|
368
333
|
|
|
369
|
-
declare namespace
|
|
334
|
+
declare namespace Header {
|
|
370
335
|
var displayName: string;
|
|
371
336
|
}
|
|
372
337
|
|
|
373
338
|
|
|
374
|
-
declare namespace
|
|
339
|
+
declare namespace Footer {
|
|
375
340
|
var displayName: string;
|
|
376
341
|
}
|
|
377
342
|
|
|
378
343
|
|
|
379
|
-
declare namespace
|
|
344
|
+
declare namespace Title {
|
|
380
345
|
var displayName: string;
|
|
381
346
|
}
|
|
382
347
|
|
|
383
348
|
|
|
384
|
-
declare namespace
|
|
349
|
+
declare namespace Description {
|
|
385
350
|
var displayName: string;
|
|
386
351
|
}
|
|
387
352
|
|
|
388
353
|
|
|
389
|
-
declare namespace
|
|
354
|
+
declare namespace Root {
|
|
390
355
|
var displayName: string;
|
|
391
356
|
}
|
|
392
357
|
|
|
393
358
|
|
|
394
|
-
declare namespace
|
|
359
|
+
declare namespace List {
|
|
395
360
|
var displayName: string;
|
|
396
361
|
}
|
|
397
362
|
|
|
398
363
|
|
|
399
|
-
declare namespace
|
|
364
|
+
declare namespace Tab {
|
|
400
365
|
var displayName: string;
|
|
401
366
|
}
|
|
402
367
|
|
|
403
368
|
|
|
404
|
-
declare namespace
|
|
369
|
+
declare namespace Panel {
|
|
405
370
|
var displayName: string;
|
|
406
371
|
}
|
|
407
372
|
|
|
@@ -411,42 +376,57 @@ declare namespace Root {
|
|
|
411
376
|
}
|
|
412
377
|
|
|
413
378
|
|
|
414
|
-
declare namespace
|
|
379
|
+
declare namespace Row {
|
|
415
380
|
var displayName: string;
|
|
416
381
|
}
|
|
417
382
|
|
|
418
383
|
|
|
419
|
-
declare namespace
|
|
384
|
+
declare namespace Group {
|
|
420
385
|
var displayName: string;
|
|
421
386
|
}
|
|
422
387
|
|
|
423
388
|
|
|
424
|
-
declare namespace
|
|
389
|
+
declare namespace Separator {
|
|
425
390
|
var displayName: string;
|
|
426
391
|
}
|
|
427
392
|
|
|
428
393
|
|
|
429
|
-
declare namespace
|
|
394
|
+
declare namespace SelectRoot {
|
|
430
395
|
var displayName: string;
|
|
431
396
|
}
|
|
432
397
|
|
|
433
398
|
|
|
434
|
-
declare namespace
|
|
399
|
+
declare namespace SelectTrigger {
|
|
435
400
|
var displayName: string;
|
|
436
401
|
}
|
|
437
402
|
|
|
438
403
|
|
|
439
|
-
declare namespace
|
|
404
|
+
declare namespace SelectValue {
|
|
440
405
|
var displayName: string;
|
|
441
406
|
}
|
|
442
407
|
|
|
443
408
|
|
|
444
|
-
declare namespace
|
|
409
|
+
declare namespace SelectContent {
|
|
445
410
|
var displayName: string;
|
|
446
411
|
}
|
|
447
412
|
|
|
448
413
|
|
|
449
|
-
declare namespace
|
|
414
|
+
declare namespace SelectItem {
|
|
415
|
+
var displayName: string;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
|
|
419
|
+
declare namespace SelectGroup {
|
|
420
|
+
var displayName: string;
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
|
|
424
|
+
declare namespace SelectGroupLabel {
|
|
425
|
+
var displayName: string;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
|
|
429
|
+
declare namespace SelectSeparator {
|
|
450
430
|
var displayName: string;
|
|
451
431
|
}
|
|
452
432
|
|
|
@@ -461,87 +441,97 @@ declare namespace Root {
|
|
|
461
441
|
}
|
|
462
442
|
|
|
463
443
|
|
|
464
|
-
declare namespace
|
|
444
|
+
declare namespace Trigger {
|
|
465
445
|
var displayName: string;
|
|
466
446
|
}
|
|
467
447
|
|
|
468
448
|
|
|
469
|
-
declare namespace
|
|
449
|
+
declare namespace Content {
|
|
470
450
|
var displayName: string;
|
|
471
451
|
}
|
|
472
452
|
|
|
473
453
|
|
|
474
|
-
declare namespace
|
|
454
|
+
declare namespace ComboboxRoot {
|
|
475
455
|
var displayName: string;
|
|
476
456
|
}
|
|
477
457
|
|
|
478
458
|
|
|
479
|
-
declare namespace
|
|
459
|
+
declare namespace ComboboxInput {
|
|
480
460
|
var displayName: string;
|
|
481
461
|
}
|
|
482
462
|
|
|
483
463
|
|
|
484
|
-
declare namespace
|
|
464
|
+
declare namespace ComboboxTrigger {
|
|
485
465
|
var displayName: string;
|
|
486
466
|
}
|
|
487
467
|
|
|
488
468
|
|
|
489
|
-
declare namespace
|
|
469
|
+
declare namespace ComboboxInputGroup {
|
|
490
470
|
var displayName: string;
|
|
491
471
|
}
|
|
492
472
|
|
|
493
473
|
|
|
494
|
-
declare namespace
|
|
474
|
+
declare namespace ComboboxContent {
|
|
495
475
|
var displayName: string;
|
|
496
476
|
}
|
|
497
477
|
|
|
498
478
|
|
|
499
|
-
declare namespace
|
|
479
|
+
declare namespace ComboboxList {
|
|
500
480
|
var displayName: string;
|
|
501
481
|
}
|
|
502
482
|
|
|
503
483
|
|
|
504
|
-
declare namespace
|
|
484
|
+
declare namespace ComboboxItem {
|
|
505
485
|
var displayName: string;
|
|
506
486
|
}
|
|
507
487
|
|
|
508
488
|
|
|
509
|
-
declare namespace
|
|
489
|
+
declare namespace ComboboxEmpty {
|
|
510
490
|
var displayName: string;
|
|
511
491
|
}
|
|
512
492
|
|
|
513
493
|
|
|
514
|
-
declare namespace
|
|
494
|
+
declare namespace ComboboxGroup {
|
|
515
495
|
var displayName: string;
|
|
516
496
|
}
|
|
517
497
|
|
|
518
498
|
|
|
519
|
-
declare namespace
|
|
499
|
+
declare namespace ComboboxGroupLabel {
|
|
520
500
|
var displayName: string;
|
|
521
501
|
}
|
|
522
502
|
|
|
523
503
|
|
|
524
|
-
declare namespace
|
|
504
|
+
declare namespace ComboboxClear {
|
|
525
505
|
var displayName: string;
|
|
526
506
|
}
|
|
527
507
|
|
|
528
508
|
|
|
529
|
-
declare namespace
|
|
509
|
+
declare namespace ComboboxChips {
|
|
530
510
|
var displayName: string;
|
|
531
511
|
}
|
|
532
512
|
|
|
533
513
|
|
|
534
|
-
declare namespace
|
|
514
|
+
declare namespace ComboboxChip {
|
|
535
515
|
var displayName: string;
|
|
536
516
|
}
|
|
537
517
|
|
|
538
518
|
|
|
539
|
-
declare namespace
|
|
519
|
+
declare namespace ComboboxChipRemove {
|
|
540
520
|
var displayName: string;
|
|
541
521
|
}
|
|
542
522
|
|
|
543
523
|
|
|
544
|
-
declare namespace
|
|
524
|
+
declare namespace ComboboxValue {
|
|
525
|
+
var displayName: string;
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
|
|
529
|
+
declare namespace ComboboxStatus {
|
|
530
|
+
var displayName: string;
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
|
|
534
|
+
declare namespace ComboboxCollection {
|
|
545
535
|
var displayName: string;
|
|
546
536
|
}
|
|
547
537
|
|
|
@@ -616,6 +606,16 @@ declare namespace AutocompleteStatus {
|
|
|
616
606
|
}
|
|
617
607
|
|
|
618
608
|
|
|
609
|
+
declare namespace AutocompleteStandalone {
|
|
610
|
+
var displayName: string;
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
|
|
614
|
+
declare namespace AutocompleteAsyncStandalone {
|
|
615
|
+
var displayName: string;
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
|
|
619
619
|
declare namespace DataTableRoot {
|
|
620
620
|
var displayName: string;
|
|
621
621
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tailor-platform/app-shell",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.18.0",
|
|
4
4
|
"description": "An opinionated React application framework for building ERP applications on Tailor Platform",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"app-shell",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"@vitejs/plugin-react": "^6.1.0",
|
|
78
78
|
"@vitest/coverage-v8": "4.1.11",
|
|
79
79
|
"happy-dom": "20.14.5",
|
|
80
|
-
"postcss": "8.5.
|
|
80
|
+
"postcss": "8.5.30",
|
|
81
81
|
"react": "^19.2.7",
|
|
82
82
|
"react-dom": "^19.2.7",
|
|
83
83
|
"react-hook-form": "7.71.2",
|
|
@@ -76,6 +76,7 @@ Every AppShell component, its API surface, and usage guidance. Read the entry fo
|
|
|
76
76
|
| [Spinner](references/components/spinner.md) | Lightweight loading indicator component with accessible defaults and preset sizes |
|
|
77
77
|
| [Table](references/components/table.md) | Semantic HTML table with pre-styled sub-components |
|
|
78
78
|
| [Tabs](references/components/tabs.md) | Tab navigation with a compound component API |
|
|
79
|
+
| [Text](references/components/text.md) | Text with a typography role, rendered as an element you choose |
|
|
79
80
|
| [Textarea](references/components/textarea.md) | Styled multi-line text input sized by rows, with automatic Field / React Hook Form integration |
|
|
80
81
|
| [Timeline](references/components/timeline.md) | Composable primitives for building time-based layouts with axis guides, row backgrounds, intervals, and dependency links |
|
|
81
82
|
| [Toolbar](references/components/toolbar.md) | Full-width action bars with composable rows, grouped controls, and keyboard navigation |
|
|
@@ -86,33 +87,33 @@ Every AppShell component, its API surface, and usage guidance. Read the entry fo
|
|
|
86
87
|
|
|
87
88
|
Hooks, factory functions, guards, and router utilities exported by AppShell.
|
|
88
89
|
|
|
89
|
-
| Name | Description
|
|
90
|
-
| ------------------------------------------------------------------------------------------ |
|
|
91
|
-
| [createAIGatewayClient](references/api/create-ai-gateway-client.md) | Create a low-level AI Gateway client that reuses AppShell authentication
|
|
92
|
-
| [createTypedPaths](references/api/create-typed-paths.md) | Generate type-safe route paths from file-based routing
|
|
93
|
-
| [defineI18nLabels](references/api/define-i18n-labels.md) |
|
|
94
|
-
| [defineModule](references/api/define-module.md) | Define a top-level module that appears in the main navigation
|
|
95
|
-
| [defineResource](references/api/define-resource.md) | Define a nested resource (page) within a module
|
|
96
|
-
| [hidden](references/api/guards/hidden.md) | Guard function that denies access and returns 404 Not Found
|
|
97
|
-
| [Guards Overview](references/api/guards/overview.md) | Access control system for routes and components using guard functions
|
|
98
|
-
| [pass](references/api/guards/pass.md) | Guard function that allows access and continues to the next guard
|
|
99
|
-
| [redirectTo](references/api/guards/redirect-to.md) | Guard function that redirects to another page
|
|
100
|
-
| [useLocation](references/api/router/use-location.md) | Hook to access current location object with pathname, search, and state
|
|
101
|
-
| [useNavigate](references/api/router/use-navigate.md) | Hook for programmatic navigation between routes
|
|
102
|
-
| [useParams](references/api/router/use-params.md) | Hook to access dynamic route parameters
|
|
103
|
-
| [useAIChat](references/api/use-ai-chat.md) | Simple text-only chat hook for AI Gateway
|
|
104
|
-
| [useAppShell](references/api/use-app-shell.md) | Hook to access AppShell context data and configuration
|
|
105
|
-
| [useAppShellConfig](references/api/use-app-shell-config.md) | Hook to access AppShell configuration data
|
|
106
|
-
| [useAppShellData](references/api/use-app-shell-data.md) | Hook to access custom context data passed to AppShell
|
|
107
|
-
| [useAuth](references/api/use-auth.md) | Hook for accessing authentication state and methods
|
|
108
|
-
| [useOverrideBreadcrumb](references/api/use-override-breadcrumb.md) | Hook for dynamically overriding breadcrumb titles from within page components
|
|
109
|
-
| [usePageMeta](references/api/use-page-meta.md) | Hook to resolve page metadata from route path
|
|
110
|
-
| [useRegisterCommandPaletteActions](references/api/use-register-command-palette-actions.md) | Hook for registering contextual page actions into the CommandPalette
|
|
111
|
-
| [useResolvedLocale](references/api/use-resolved-locale.md) | Hook to access the full BCP-47 locale and language code from AppShell context
|
|
112
|
-
| [useRouteError](references/api/use-route-error.md) | Hook to access error details in custom error boundaries
|
|
113
|
-
| [useTheme](references/api/use-theme.md) | Hook for accessing and controlling theme (light/dark mode)
|
|
114
|
-
| [useTimeZone](references/api/use-time-zone.md) | Hook to access the configured IANA timezone from AppShell context
|
|
115
|
-
| [useToast](references/api/use-toast.md) | Hook for displaying toast notifications
|
|
90
|
+
| Name | Description |
|
|
91
|
+
| ------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |
|
|
92
|
+
| [createAIGatewayClient](references/api/create-ai-gateway-client.md) | Create a low-level AI Gateway client that reuses AppShell authentication |
|
|
93
|
+
| [createTypedPaths](references/api/create-typed-paths.md) | Generate type-safe route paths from file-based routing |
|
|
94
|
+
| [defineI18nLabels](references/api/define-i18n-labels.md) | Type-safe locale-first labels for component text and localized navigation metadata |
|
|
95
|
+
| [defineModule](references/api/define-module.md) | Define a top-level module that appears in the main navigation |
|
|
96
|
+
| [defineResource](references/api/define-resource.md) | Define a nested resource (page) within a module |
|
|
97
|
+
| [hidden](references/api/guards/hidden.md) | Guard function that denies access and returns 404 Not Found |
|
|
98
|
+
| [Guards Overview](references/api/guards/overview.md) | Access control system for routes and components using guard functions |
|
|
99
|
+
| [pass](references/api/guards/pass.md) | Guard function that allows access and continues to the next guard |
|
|
100
|
+
| [redirectTo](references/api/guards/redirect-to.md) | Guard function that redirects to another page |
|
|
101
|
+
| [useLocation](references/api/router/use-location.md) | Hook to access current location object with pathname, search, and state |
|
|
102
|
+
| [useNavigate](references/api/router/use-navigate.md) | Hook for programmatic navigation between routes |
|
|
103
|
+
| [useParams](references/api/router/use-params.md) | Hook to access dynamic route parameters |
|
|
104
|
+
| [useAIChat](references/api/use-ai-chat.md) | Simple text-only chat hook for AI Gateway |
|
|
105
|
+
| [useAppShell](references/api/use-app-shell.md) | Hook to access AppShell context data and configuration |
|
|
106
|
+
| [useAppShellConfig](references/api/use-app-shell-config.md) | Hook to access AppShell configuration data |
|
|
107
|
+
| [useAppShellData](references/api/use-app-shell-data.md) | Hook to access custom context data passed to AppShell |
|
|
108
|
+
| [useAuth](references/api/use-auth.md) | Hook for accessing authentication state and methods |
|
|
109
|
+
| [useOverrideBreadcrumb](references/api/use-override-breadcrumb.md) | Hook for dynamically overriding breadcrumb titles from within page components |
|
|
110
|
+
| [usePageMeta](references/api/use-page-meta.md) | Hook to resolve page metadata from route path |
|
|
111
|
+
| [useRegisterCommandPaletteActions](references/api/use-register-command-palette-actions.md) | Hook for registering contextual page actions into the CommandPalette |
|
|
112
|
+
| [useResolvedLocale](references/api/use-resolved-locale.md) | Hook to access the full BCP-47 locale and language code from AppShell context |
|
|
113
|
+
| [useRouteError](references/api/use-route-error.md) | Hook to access error details in custom error boundaries |
|
|
114
|
+
| [useTheme](references/api/use-theme.md) | Hook for accessing and controlling theme (light/dark mode) |
|
|
115
|
+
| [useTimeZone](references/api/use-time-zone.md) | Hook to access the configured IANA timezone from AppShell context |
|
|
116
|
+
| [useToast](references/api/use-toast.md) | Hook for displaying toast notifications |
|
|
116
117
|
|
|
117
118
|
## Available Pages
|
|
118
119
|
|
|
@@ -134,6 +135,12 @@ A page is the shape of a whole screen — the outer choice, made before picking
|
|
|
134
135
|
| [`form/single-page`](references/patterns/form-single-page.md) | Single Page Form | Routed full-page form for moderate field count (6-15) without natural sectioning |
|
|
135
136
|
| [`form/wizard`](references/patterns/form-wizard.md) | Wizard Form | Multi-stage create flow with 3-7 steps and per-step validation gates |
|
|
136
137
|
|
|
138
|
+
### i18n
|
|
139
|
+
|
|
140
|
+
| Slug | Name | Description |
|
|
141
|
+
| --------------------------------------------------- | ----------- | ------------------------------------------------------------------------------------------ |
|
|
142
|
+
| [`i18n/labels`](references/patterns/i18n-labels.md) | i18n Labels | Decide UI language before implementation and keep display labels separate from stable data |
|
|
143
|
+
|
|
137
144
|
### interaction
|
|
138
145
|
|
|
139
146
|
| Slug | Name | Description |
|
|
@@ -151,11 +158,12 @@ A page is the shape of a whole screen — the outer choice, made before picking
|
|
|
151
158
|
## How to Use
|
|
152
159
|
|
|
153
160
|
1. Identify the user's intent (list, detail, form, interaction, screen composition, recipe)
|
|
154
|
-
2.
|
|
155
|
-
3.
|
|
156
|
-
4.
|
|
157
|
-
5. Read the
|
|
158
|
-
6.
|
|
161
|
+
2. Before implementing screen text, read [`i18n/labels`](references/patterns/i18n-labels.md) and establish the app's UI language independently of the specification's language. Use feature label catalogs by default, unless the project explicitly opts out for a single-language app. The API reference is [`defineI18nLabels`](references/api/define-i18n-labels.md).
|
|
162
|
+
3. Building a whole screen? Match it to a **page** entry first and read that. A page fixes the screen's shape — its layout, what goes where, and in what order — before any of the parts inside it are chosen.
|
|
163
|
+
4. Match each part you are building to a **pattern** entry slug from the tables above. A one-off recipe rather than a screen skips straight to this step.
|
|
164
|
+
5. Read the entry's detailed spec: `references/<category>/<slug>.md` (relative to this file)
|
|
165
|
+
6. Read the concept references for styling, design tokens, GraphQL, and custom components: `references/concepts/`; component and hook APIs live in `references/components/` and `references/api/`
|
|
166
|
+
7. Implement using ONLY the imports listed in the selected entries' `requiredImports` — for a page, use those of its patterns; for localization, include the `i18n/labels` entry
|
|
159
167
|
|
|
160
168
|
## Rules
|
|
161
169
|
|
|
@@ -177,3 +185,4 @@ Full rationale in [`styling-theming`](references/concepts/styling-theming.md)
|
|
|
177
185
|
- **Forms default to `form/modal`** — only build a routed full-page form when the design explicitly calls for one.
|
|
178
186
|
- **Forms use AppShell `Form` + `Field`**, submitting via `onFormSubmit` — never a bare `<form onSubmit>` with `FormData`. `onFormSubmit` reads registered `Field.Root`s, so every control (dropdowns included) just needs a wrapping `Field.Root name="…"` — no `name` on the control, no `useState`. React Hook Form is optional, consumer-installed, and only warranted for cross-field validation, field arrays, or a Zod resolver. Details in [`Form`](references/components/form.md) and the `form/*` patterns.
|
|
179
187
|
- **Handle every state:** loading (skeleton), empty (labelled empty state), and error (inline + retry) — never ship only the happy path.
|
|
188
|
+
- **Keep UI language consistent:** apply the chosen language to navigation, component text, accessibility labels, and feedback. Use the catalog's `useT()` for rendered strings and `labels.t()` for `LocalizedString` metadata; keep server codes and comparison values untranslated. See [`i18n/labels`](references/patterns/i18n-labels.md).
|