@panneau/core 4.1.0 → 5.0.0-alpha.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 (75) hide show
  1. package/README.md +83 -0
  2. package/dist/definition/abilities.d.ts +21 -0
  3. package/dist/definition/abilities.d.ts.map +1 -0
  4. package/dist/definition/abilities.js +47 -0
  5. package/dist/definition/abilities.js.map +1 -0
  6. package/dist/definition/form.d.ts +31 -0
  7. package/dist/definition/form.d.ts.map +1 -0
  8. package/dist/definition/form.js +54 -0
  9. package/dist/definition/form.js.map +1 -0
  10. package/dist/definition/list.d.ts +44 -0
  11. package/dist/definition/list.d.ts.map +1 -0
  12. package/dist/definition/list.js +70 -0
  13. package/dist/definition/list.js.map +1 -0
  14. package/dist/definition/resource.d.ts +21 -0
  15. package/dist/definition/resource.d.ts.map +1 -0
  16. package/dist/definition/resource.js +24 -0
  17. package/dist/definition/resource.js.map +1 -0
  18. package/dist/form/form.d.ts +148 -0
  19. package/dist/form/form.d.ts.map +1 -0
  20. package/dist/form/form.js +239 -0
  21. package/dist/form/form.js.map +1 -0
  22. package/dist/form/messages.d.ts +7 -0
  23. package/dist/form/messages.d.ts.map +1 -0
  24. package/dist/form/messages.js +25 -0
  25. package/dist/form/messages.js.map +1 -0
  26. package/dist/form/problem.d.ts +16 -0
  27. package/dist/form/problem.d.ts.map +1 -0
  28. package/dist/form/problem.js +34 -0
  29. package/dist/form/problem.js.map +1 -0
  30. package/dist/form/selectors.d.ts +16 -0
  31. package/dist/form/selectors.d.ts.map +1 -0
  32. package/dist/form/selectors.js +27 -0
  33. package/dist/form/selectors.js.map +1 -0
  34. package/dist/form/store.d.ts +19 -0
  35. package/dist/form/store.d.ts.map +1 -0
  36. package/dist/form/store.js +29 -0
  37. package/dist/form/store.js.map +1 -0
  38. package/dist/index.d.ts +17 -651
  39. package/dist/index.d.ts.map +1 -0
  40. package/dist/index.js +17 -536
  41. package/dist/list/list.d.ts +68 -0
  42. package/dist/list/list.d.ts.map +1 -0
  43. package/dist/list/list.js +191 -0
  44. package/dist/list/list.js.map +1 -0
  45. package/dist/list/router.d.ts +26 -0
  46. package/dist/list/router.d.ts.map +1 -0
  47. package/dist/list/router.js +54 -0
  48. package/dist/list/router.js.map +1 -0
  49. package/dist/plugins.d.ts +73 -0
  50. package/dist/plugins.d.ts.map +1 -0
  51. package/dist/plugins.js +54 -0
  52. package/dist/plugins.js.map +1 -0
  53. package/dist/react/provider.d.ts +38 -0
  54. package/dist/react/provider.d.ts.map +1 -0
  55. package/dist/react/provider.js +63 -0
  56. package/dist/react/provider.js.map +1 -0
  57. package/dist/react/useForm.d.ts +26 -0
  58. package/dist/react/useForm.d.ts.map +1 -0
  59. package/dist/react/useForm.js +115 -0
  60. package/dist/react/useForm.js.map +1 -0
  61. package/dist/react/useList.d.ts +11 -0
  62. package/dist/react/useList.d.ts.map +1 -0
  63. package/dist/react/useList.js +47 -0
  64. package/dist/react/useList.js.map +1 -0
  65. package/dist/values.d.ts +12 -0
  66. package/dist/values.d.ts.map +1 -0
  67. package/dist/values.js +44 -0
  68. package/dist/values.js.map +1 -0
  69. package/package.json +19 -81
  70. package/dist/contexts.d.ts +0 -638
  71. package/dist/contexts.js +0 -1754
  72. package/dist/hooks.d.ts +0 -492
  73. package/dist/hooks.js +0 -2146
  74. package/dist/utils.d.ts +0 -322
  75. package/dist/utils.js +0 -530
package/dist/index.d.ts CHANGED
@@ -1,651 +1,17 @@
1
- import { ReactNode, MouseEvent, ElementType, ComponentProps } from 'react';
2
- import { MessageDescriptor, FormattedMessage } from 'react-intl';
3
- import EventEmitter from 'wolfy87-eventemitter';
4
- import { Tracking as Tracking$1 } from '@folklore/tracking';
5
-
6
- /**
7
- * User definition
8
- */
9
- interface User {
10
- id?: number | string;
11
- [key: string]: unknown;
12
- }
13
-
14
- /**
15
- * Core UI Types
16
- */
17
-
18
- /**
19
- * Internationalization message definition
20
- */
21
- type Message = MessageDescriptor;
22
- /**
23
- * Values that can be interpolated in an internationalization message
24
- * (the `values` prop of FormattedMessage)
25
- */
26
- type MessageValues = NonNullable<ComponentProps<typeof FormattedMessage>['values']>;
27
- type MessageValue = MessageValues[string];
28
- /**
29
- * Label can be either a message object or any React node
30
- */
31
- type Label = Message | ReactNode;
32
- /**
33
- * Map of components, can be nested by namespace (ex: { fields: { text: TextField } })
34
- */
35
- interface ComponentsMap {
36
- [name: string]: ElementType | ComponentsMap;
37
- }
38
- /**
39
- * HTTP status code (number or string)
40
- */
41
- type StatusCode = number | string;
42
- /**
43
- * Menu item definition
44
- */
45
- interface MenuItem {
46
- id?: number | string;
47
- label?: Label;
48
- url?: string;
49
- href?: string | null;
50
- external?: boolean;
51
- active?: boolean;
52
- type?: string;
53
- component?: string;
54
- className?: string | null;
55
- linkClassName?: string | null;
56
- onClick?: ((e: MouseEvent) => void) | null;
57
- items?: MenuItem[] | null;
58
- dropdown?: MenuItem[] | null;
59
- }
60
- /**
61
- * Button definition
62
- */
63
- type ButtonElement = HTMLButtonElement | HTMLAnchorElement;
64
- interface Button {
65
- id?: string;
66
- name?: string;
67
- label?: Label;
68
- onClick?: (e: MouseEvent<ButtonElement>, button?: Button, index?: number) => void;
69
- href?: string;
70
- target?: string;
71
- theme?: ButtonTheme;
72
- size?: ButtonSize;
73
- type?: ButtonType;
74
- disabled?: boolean;
75
- external?: boolean;
76
- className?: string;
77
- component?: string | ElementType;
78
- renderButton?: (button: Button, index: number, fixedProps: Record<string, unknown>) => ReactNode;
79
- }
80
- /**
81
- * Button theme variants (Bootstrap 5)
82
- */
83
- type ButtonTheme = 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'light' | 'dark' | null;
84
- /**
85
- * Breakpoints size variants
86
- */
87
- type BreakpointsSize = 'xxl' | 'xl' | 'lg' | 'md' | 'sm' | null;
88
- /**
89
- * Button size variants
90
- */
91
- type ButtonSize = 'lg' | 'sm' | null;
92
- /**
93
- * Button type attribute
94
- */
95
- type ButtonType = 'button' | 'submit';
96
- /**
97
- * Dropdown alignment
98
- */
99
- type DropdownAlign = 'start' | 'end';
100
- /**
101
- * Form control size
102
- */
103
- type ControlSize = 'lg' | 'sm' | null;
104
- /**
105
- * Dialog size
106
- */
107
- type DialogSize = 'xl' | 'lg' | 'sm' | null;
108
- /**
109
- * Form status states
110
- */
111
- type FormStatus = 'loading' | 'success' | 'error' | null;
112
- /**
113
- * Form feedback states
114
- */
115
- type Feedback = 'valid' | 'invalid' | 'loading' | null;
116
- /**
117
- * Form error object
118
- */
119
- interface FormError {
120
- message?: string;
121
- }
122
- /**
123
- * Toggle definition
124
- */
125
- interface Toggle {
126
- key?: string;
127
- label?: string;
128
- }
129
- /**
130
- * Breadcrumb definition
131
- */
132
- interface Breadcrumb {
133
- url?: string;
134
- }
135
- /**
136
- * Font definition
137
- */
138
- interface Font$1 {
139
- name: string;
140
- }
141
- /**
142
- * Trigger update identifier
143
- */
144
- type TriggerUpdate = string;
145
- interface Pagination {
146
- page: number;
147
- count: number;
148
- total: number;
149
- last_page: number;
150
- }
151
- /**
152
- * Generic item (base interface for data items)
153
- */
154
- interface Item {
155
- id: string;
156
- [key: string]: unknown;
157
- }
158
- /**
159
- * Generic definition
160
- */
161
- interface Definition$1 {
162
- id: string;
163
- component?: string | ElementType;
164
- [key: string]: unknown;
165
- }
166
- interface RouteDefinition {
167
- path?: string;
168
- route?: string;
169
- component: string | ElementType;
170
- [key: string]: unknown;
171
- }
172
- interface PageDefinition {
173
- component: string | ElementType;
174
- }
175
-
176
- /**
177
- * Form Types
178
- * TypeScript interfaces for form-related components
179
- */
180
-
181
- /**
182
- * Field option for select/radio inputs
183
- */
184
- interface FieldOption {
185
- value?: string;
186
- label?: string;
187
- }
188
- /**
189
- * Select option (more flexible than FieldOption)
190
- */
191
- type SelectOption = string | number | {
192
- value?: unknown;
193
- label?: Label | string;
194
- } | Record<string, unknown>;
195
- /**
196
- * Field definition
197
- */
198
- interface Field$2 {
199
- name?: string;
200
- type?: string;
201
- label?: Label;
202
- component?: string;
203
- size?: ControlSize;
204
- [key: string]: unknown;
205
- }
206
- interface FieldDefinition extends Omit<Field$2, 'component'>, Definition$1 {
207
- }
208
- /**
209
- * Form definition
210
- */
211
- interface Form {
212
- title?: ReactNode;
213
- fields?: Field$2[];
214
- method?: string | null;
215
- action?: string | null;
216
- submitButtonLabel?: Label | null;
217
- [key: string]: unknown;
218
- }
219
- interface FormDefinition extends Form, Definition$1 {
220
- }
221
-
222
- type MediaType = 'audio' | 'image' | 'video' | 'document' | 'font';
223
- interface MediaFile {
224
- url: string;
225
- type: string;
226
- }
227
- /**
228
- * Media file definition
229
- */
230
- interface Media$2 extends Item {
231
- id: string;
232
- name: string;
233
- type: string;
234
- thumbnail_url?: string;
235
- thumbnailUrl?: string;
236
- url?: string;
237
- provider?: string;
238
- deletedAt?: string | null;
239
- [key: string]: unknown;
240
- files?: Record<string, MediaFile> | null;
241
- }
242
- interface VideoMedia extends Media$2 {
243
- type: 'video';
244
- iframeUrl?: string;
245
- width?: number | null;
246
- height?: number | null;
247
- duration?: number | null;
248
- }
249
- interface AudioMedia extends Media$2 {
250
- type: 'audio';
251
- duration?: number | null;
252
- }
253
- interface ImageMedia extends Media$2 {
254
- type: 'image';
255
- }
256
-
257
- /**
258
- * Resource Types
259
- * TypeScript interfaces for resources, items, users, media, and other entities
260
- */
261
-
262
- /**
263
- * Table column definition
264
- */
265
- type TableColumn = string | Column;
266
- interface Column extends Record<string, unknown> {
267
- id?: string | null;
268
- name?: string | null;
269
- label?: unknown;
270
- path?: string;
271
- valueKey?: string;
272
- component?: string | ElementType | null;
273
- field?: Field$2 | string | null;
274
- actions?: ActionDefinition[] | null;
275
- }
276
- interface Action {
277
- id?: string;
278
- component?: string;
279
- label?: string | null;
280
- icon?: string | null;
281
- href?: string | null;
282
- external?: boolean;
283
- theme?: string;
284
- target?: string;
285
- onClick?: (() => void) | null;
286
- endpoint?: string | null;
287
- withoutConfirmation?: boolean;
288
- [key: string]: unknown;
289
- }
290
- type ActionDefinition = string | Action;
291
- type ActionValue = Item | Item[] | null;
292
- interface ResourceIntlValues {
293
- a_singular?: string;
294
- a_plural?: string;
295
- [key: string]: MessageValue;
296
- }
297
- /**
298
- * Internationalization configuration
299
- */
300
- interface ResourceIntl {
301
- messages?: Record<string, string>;
302
- values?: ResourceIntlValues;
303
- }
304
- /**
305
- * Resource definition
306
- */
307
- interface ResourceIndex {
308
- filters?: Filter[];
309
- columns?: TableColumn[];
310
- actions?: ActionDefinition[];
311
- fields?: Field$2[];
312
- [key: string]: unknown;
313
- }
314
- interface ResourcePages {
315
- index?: PageDefinition;
316
- show?: PageDefinition;
317
- create?: PageDefinition;
318
- edit?: PageDefinition;
319
- delete?: PageDefinition;
320
- duplicate?: PageDefinition;
321
- [key: string]: PageDefinition | undefined;
322
- }
323
- /**
324
- * Form definition of a resource (the id is optional, the form is identified by its key)
325
- */
326
- interface ResourceForm extends Form {
327
- id?: string;
328
- component?: string | ElementType;
329
- }
330
- interface ResourceForms {
331
- default?: ResourceForm | null;
332
- create?: ResourceForm | null;
333
- edit?: ResourceForm | null;
334
- delete?: ResourceForm | null;
335
- modal?: ResourceForm | null;
336
- [key: string]: ResourceForm | null | undefined;
337
- }
338
- /**
339
- * Resource type (sub-type of a resource, ex: page types)
340
- */
341
- interface ResourceType {
342
- id?: string;
343
- name?: string;
344
- fields?: Field$2[];
345
- settings?: {
346
- canCreate?: boolean;
347
- [key: string]: unknown;
348
- };
349
- }
350
- interface Resource {
351
- id: string;
352
- name: string;
353
- intl?: ResourceIntl;
354
- fields?: Field$2[];
355
- index?: ResourceIndex;
356
- forms?: ResourceForms;
357
- settings?: Record<string, unknown>;
358
- extraRoutes?: RouteDefinition[];
359
- pages?: ResourcePages;
360
- types?: ResourceType[];
361
- }
362
- interface ResourceItem extends Item {
363
- type?: string;
364
- }
365
- /**
366
- * Preview definition
367
- */
368
- interface Preview {
369
- id?: string;
370
- [key: string]: unknown;
371
- }
372
- /**
373
- * Modal definition
374
- */
375
- interface Modal {
376
- name?: string;
377
- [key: string]: unknown;
378
- }
379
- /**
380
- * Filter definition
381
- */
382
- interface Filter {
383
- id?: string;
384
- component?: string;
385
- [key: string]: unknown;
386
- }
387
- /**
388
- * Uppy configuration
389
- */
390
- interface Uppy {
391
- tus?: Record<string, unknown>;
392
- [key: string]: unknown;
393
- }
394
- /**
395
- * Uppy instance
396
- */
397
- interface uppy {
398
- [key: string]: unknown;
399
- }
400
-
401
- /**
402
- * Panneau Definition Types
403
- * TypeScript interfaces for main Panneau configuration and definitions
404
- */
405
-
406
- /**
407
- * Panneau route configuration
408
- */
409
- interface Routes {
410
- 'resources.index'?: RouteDefinition | string;
411
- 'resources.create'?: RouteDefinition | string;
412
- 'resources.store'?: RouteDefinition | string;
413
- 'resources.show'?: RouteDefinition | string;
414
- 'resources.edit'?: RouteDefinition | string;
415
- 'resources.update'?: RouteDefinition | string;
416
- 'resources.delete'?: RouteDefinition | string;
417
- 'resources.destroy'?: RouteDefinition | string;
418
- 'resources.duplicate'?: RouteDefinition | string;
419
- 'resources.clone'?: RouteDefinition | string;
420
- 'resources.restore'?: RouteDefinition | string;
421
- [key: string]: RouteDefinition | string;
422
- }
423
- interface PanneauTheme {
424
- colorScheme?: string | null;
425
- [key: string]: unknown;
426
- }
427
- interface PanneauComponents {
428
- [key: string]: string | {
429
- component: string;
430
- [key: string]: unknown;
431
- };
432
- }
433
- interface PanneauIntlValues {
434
- [key: string]: string;
435
- }
436
- interface PanneauIntl {
437
- locale?: string;
438
- locales?: string[];
439
- messages?: Record<string, string>;
440
- values?: PanneauIntlValues;
441
- }
442
- interface PanneauPages extends ResourcePages {
443
- home?: PageDefinition;
444
- login?: PageDefinition;
445
- account?: PageDefinition;
446
- error?: PageDefinition;
447
- }
448
- /**
449
- * Menu item in a Panneau menu: a menu item definition or a special item id
450
- * (ex: 'resources', 'account', 'separator')
451
- */
452
- type PanneauMenuItem = MenuItem | string;
453
- interface PanneauMenus {
454
- main?: PanneauMenuItem[] | null;
455
- guest?: PanneauMenuItem[] | null;
456
- [key: string]: PanneauMenuItem[] | null | undefined;
457
- }
458
- interface PanneauAuth {
459
- forgotPassword?: boolean;
460
- register?: boolean;
461
- [key: string]: unknown;
462
- }
463
- /**
464
- * Panneau definition (main configuration)
465
- */
466
- interface PanneauDefinition {
467
- name?: string;
468
- resources?: Resource[];
469
- routes?: Routes;
470
- pages?: PanneauPages;
471
- intl?: PanneauIntl;
472
- theme?: PanneauTheme;
473
- components?: PanneauComponents;
474
- settings?: Record<string, unknown>;
475
- forms?: FormDefinition[];
476
- fields?: FieldDefinition[];
477
- menus?: PanneauMenus;
478
- auth?: PanneauAuth;
479
- }
480
- /**
481
- * Tracking variables
482
- */
483
- type TrackingVariables = Record<string, unknown>;
484
-
485
- declare class ComponentsManager {
486
- components: Record<string, ElementType>;
487
- constructor(components?: ComponentsMap);
488
- addComponent(name: string, component: ElementType, namespace?: string | null): this;
489
- addComponents(components: Record<string, ElementType>, namespace?: string | null): this;
490
- merge(manager: ComponentsManager, namespace?: string | null): this;
491
- addNamespace(namespace: string | null): this;
492
- getComponent(name: string | ElementType, namespace?: string | null): ElementType | null;
493
- getComponents(namespace?: string | null): Record<string, ElementType> | null;
494
- hasComponent(name: string, namespace?: string | null): boolean;
495
- }
496
-
497
- interface Definition {
498
- id: string;
499
- component?: unknown;
500
- [key: string]: unknown;
501
- }
502
- declare class DefinitionsManager<T extends Definition = Definition> {
503
- definitions: T[];
504
- constructor(definitions?: T[]);
505
- addDefinition(definition: T | T[]): this;
506
- addDefinitions(definitions: T[]): this;
507
- merge(manager: DefinitionsManager<T>): this;
508
- getDefinition(id: string | null): T | null;
509
- getDefinitions(): T[];
510
- hasDefinition(id: string): boolean;
511
- getComponent(id: string): unknown;
512
- getComponents(): Record<string, unknown>;
513
- }
514
-
515
- type EventCallback = (...args: unknown[]) => void;
516
- declare class EventsManager extends EventEmitter {
517
- element: EventTarget;
518
- events: Record<string, EventCallback[]>;
519
- listeners: Record<string, EventListener>;
520
- constructor(element: EventTarget);
521
- subscribe(event: string, callback: EventCallback): void;
522
- unsubscribe(event: string, callback: EventCallback): void;
523
- addEventListener(event: string): void;
524
- removeEventListener(event: string): void;
525
- }
526
-
527
- declare class FieldsManager extends DefinitionsManager<FieldDefinition> {
528
- }
529
-
530
- interface Manager$1 {
531
- getDefinition: (type: string) => Record<string, unknown> | null;
532
- }
533
- interface FontsParserOptions {
534
- fieldsManager: Manager$1;
535
- screensManager: Manager$1;
536
- }
537
- interface Font {
538
- name?: string;
539
- type?: string;
540
- [key: string]: unknown;
541
- }
542
- interface Field$1 {
543
- id?: string | null;
544
- name?: string | null;
545
- type?: string | null;
546
- fields?: Field$1[];
547
- itemsField?: Field$1 | null;
548
- settings?: Field$1[];
549
- [key: string]: unknown;
550
- }
551
- interface Screen$2 {
552
- type: string;
553
- [key: string]: unknown;
554
- }
555
- interface Story$1 {
556
- theme?: Story$1 | null;
557
- components?: Screen$2[];
558
- fonts?: Font[];
559
- [key: string]: unknown;
560
- }
561
- declare class FontsParser {
562
- fieldsManager: Manager$1;
563
- screensManager: Manager$1;
564
- constructor({ fieldsManager, screensManager }: FontsParserOptions);
565
- parse(story: Story$1 | null): Story$1 | null;
566
- getFieldsPattern(fields: Field$1[], namePrefix?: string | null): RegExp[];
567
- static fieldIsFontFamily({ id }: Field$1): boolean;
568
- static valueIsFont({ type }: {
569
- type?: unknown;
570
- }): boolean;
571
- static extractFontsWithPaths(data: unknown, patterns: RegExp[], keyPrefix?: string | null): Font[];
572
- }
573
-
574
- declare class FormsManager extends DefinitionsManager<FormDefinition> {
575
- }
576
-
577
- interface Manager {
578
- getDefinition: (type: string) => Record<string, unknown> | null;
579
- }
580
- interface MediasParserOptions {
581
- fieldsManager: Manager;
582
- screensManager?: Manager | null;
583
- }
584
- interface Media$1 {
585
- id?: string | null;
586
- [key: string]: unknown;
587
- }
588
- interface Field {
589
- id?: string | null;
590
- name?: string | null;
591
- type?: string | null;
592
- media?: boolean;
593
- fields?: Field[];
594
- itemsField?: Field | null;
595
- settings?: Field[];
596
- [key: string]: unknown;
597
- }
598
- interface Screen$1 {
599
- type: string;
600
- [key: string]: unknown;
601
- }
602
- interface Story {
603
- theme?: Story | null;
604
- components?: Screen$1[];
605
- medias?: Record<string, Media$1> | null;
606
- [key: string]: unknown;
607
- }
608
- declare class MediasParser {
609
- fieldsManager: Manager;
610
- screensManager: Manager | null;
611
- constructor({ fieldsManager, screensManager }: MediasParserOptions);
612
- toPath(story: Story | null): Story | null;
613
- fromPath(story: Story | null, defaultMedias?: Record<string, Media$1> | null): Story | null;
614
- getMediaFieldsPattern(fields: Field[], namePrefix?: string | null): RegExp[];
615
- static fieldIsMedia({ media }: Field): boolean;
616
- static fieldIsFontFamily({ id }: Field): boolean;
617
- static replacePathsWithMedias(data: unknown, medias: Record<string, Media$1>, patterns: RegExp[], keyPrefix?: string | null): unknown;
618
- static getMediaPath({ id }: Media$1): string | null;
619
- static replaceMediasWithPaths(data: unknown, patterns: RegExp[], medias?: Record<string, Media$1> | null, keyPrefix?: string | null): {
620
- data: unknown;
621
- medias: Record<string, Media$1> | null;
622
- };
623
- }
624
-
625
- interface Screen {
626
- id?: string | null;
627
- type?: string | null;
628
- [key: string]: unknown;
629
- }
630
- interface Media {
631
- id?: string | null;
632
- name?: string | null;
633
- duration?: number | null;
634
- currentTime?: number | null;
635
- [key: string]: unknown;
636
- }
637
- interface TrackingEventOptions {
638
- value?: string | number | null;
639
- [key: string]: unknown;
640
- }
641
- declare class Tracking extends Tracking$1 {
642
- variables: Record<string, unknown> | null;
643
- setVariables(variables: Record<string, unknown> | null): void;
644
- getVariables(): Record<string, unknown> | null;
645
- trackScreenView(screen: Screen | null, screenIndex: number): void;
646
- trackEvent(category: string, action: string, label?: string | null, options?: TrackingEventOptions | string | number | null): void;
647
- trackMedia(type: string, media: Media | null, action: string, { value, ...opts }?: TrackingEventOptions): void;
648
- }
649
-
650
- export { ComponentsManager, DefinitionsManager, EventsManager, FieldsManager, FontsParser, FormsManager, MediasParser, Tracking };
651
- export type { Action, ActionDefinition, ActionValue, AudioMedia, Breadcrumb, BreakpointsSize, Button, ButtonElement, ButtonSize, ButtonTheme, ButtonType, Column, ComponentsMap, ControlSize, Definition$1 as Definition, DialogSize, DropdownAlign, Feedback, Field$2 as Field, FieldDefinition, FieldOption, Filter, Font$1 as Font, Form, FormDefinition, FormError, FormStatus, ImageMedia, Item, Label, Media$2 as Media, MediaFile, MediaType, MenuItem, Message, MessageValue, MessageValues, Modal, PageDefinition, Pagination, PanneauAuth, PanneauComponents, PanneauDefinition, PanneauIntl, PanneauIntlValues, PanneauMenuItem, PanneauMenus, PanneauPages, PanneauTheme, Preview, Resource, ResourceForm, ResourceForms, ResourceIndex, ResourceIntl, ResourceIntlValues, ResourceItem, ResourcePages, ResourceType, RouteDefinition, Routes, SelectOption, StatusCode, TableColumn, Toggle, TrackingVariables, TriggerUpdate, Uppy, User, VideoMedia, uppy };
1
+ export { can, canRunAction, getActionPlacements, isActionAllowedOn, partitionByAction, } from './definition/abilities';
2
+ export { type FormMode, type ResolveFormOptions, type ResolvedForm, getLayoutFieldNames, resolveFields, resolveForm, } from './definition/form';
3
+ export { DEFAULT_PER_PAGE, type ResolvedColumn, type ResolvedList, groupActions, resolveList, } from './definition/list';
4
+ export { type ResolvedResource, type ResourceAbilities, findResource, resolveResource, } from './definition/resource';
5
+ export { type Form, type FormConflict, type FormOptions, type FormState, type FormStatus, type GetErrorsOptions, type SubmitContext, type SubmitResult, type UpdatableFormOptions, createForm, getDefaultValues, } from './form/form';
6
+ export { formatRuleFailure } from './form/messages';
7
+ export { getItemValues, getProblem, isItem } from './form/problem';
8
+ export { selectErrorCount, selectErrors, selectValue, selectVisible } from './form/selectors';
9
+ export { type FormStore, createLocalStore } from './form/store';
10
+ export { type List, type ListDefaults, type ListOptions, type ListSelection, type ListState, createList, } from './list/list';
11
+ export { type MemoryRouter, type Router, createHistoryRouter, createMemoryRouter, } from './list/router';
12
+ export { type Messages, type MessagesLoader, type PanneauPlugin, type PluginComponent, type PluginComponentKind, type PluginRegistry, type Theme, createPluginRegistry, definePlugin, loadMessages, } from './plugins';
13
+ export { PanneauProvider, type PanneauContextValue, type PanneauProviderProps, usePanneau, usePlugins, useResource, } from './react/provider';
14
+ export { type UseFormFieldResult, type UseFormResult, useForm, useFormField, } from './react/useForm';
15
+ export { type UseListResult, useList } from './react/useList';
16
+ export { type Values, isEqual, setValue } from './values';
17
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,GAAG,EACH,YAAY,EACZ,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,GACpB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACH,KAAK,QAAQ,EACb,KAAK,kBAAkB,EACvB,KAAK,YAAY,EACjB,mBAAmB,EACnB,aAAa,EACb,WAAW,GACd,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACH,gBAAgB,EAChB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,YAAY,EACZ,WAAW,GACd,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACH,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,YAAY,EACZ,eAAe,GAClB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACH,KAAK,IAAI,EACT,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,KAAK,UAAU,EACf,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,oBAAoB,EACzB,UAAU,EACV,gBAAgB,GACnB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAC9F,OAAO,EAAE,KAAK,SAAS,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EACH,KAAK,IAAI,EACT,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,SAAS,EACd,UAAU,GACb,MAAM,aAAa,CAAC;AACrB,OAAO,EACH,KAAK,YAAY,EACjB,KAAK,MAAM,EACX,mBAAmB,EACnB,kBAAkB,GACrB,MAAM,eAAe,CAAC;AACvB,OAAO,EACH,KAAK,QAAQ,EACb,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,cAAc,EACnB,KAAK,KAAK,EACV,oBAAoB,EACpB,YAAY,EACZ,YAAY,GACf,MAAM,WAAW,CAAC;AACnB,OAAO,EACH,eAAe,EACf,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,UAAU,EACV,UAAU,EACV,WAAW,GACd,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACH,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,OAAO,EACP,YAAY,GACf,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,KAAK,aAAa,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EAAE,KAAK,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC"}