@panneau/core 4.0.14 → 4.0.17

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.
@@ -52,75 +52,75 @@ declare const ComponentsContext: react.Context<ComponentsManager>;
52
52
  /**
53
53
  * Hooks
54
54
  */
55
- declare const useComponentsManager: (namespace?: string | null) => ComponentsManager;
56
- declare const useComponents: (namespace?: string | null, defaultComponents?: Record<string, unknown>) => Record<string, unknown>;
57
- declare const useComponent: (name: unknown, defaultComponent?: unknown, namespace?: string | null) => unknown;
55
+ declare function useComponentsManager(namespace?: string | null): ComponentsManager;
56
+ declare function useComponents(namespace?: string | null, defaultComponents?: Record<string, unknown>): Record<string, unknown>;
57
+ declare function useComponent(name: unknown, defaultComponent?: unknown, namespace?: string | null): unknown;
58
58
  /**
59
59
  * Fields hooks
60
60
  */
61
- declare const useFieldsComponentsManager: () => ComponentsManager;
62
- declare const useFieldsComponents: (defaultComponents?: Record<string, unknown>) => Record<string, unknown>;
63
- declare const useFieldComponent: (name: unknown, defaultComponent?: unknown) => unknown;
61
+ declare function useFieldsComponentsManager(): ComponentsManager;
62
+ declare function useFieldsComponents(defaultComponents?: Record<string, unknown>): Record<string, unknown>;
63
+ declare function useFieldComponent(name: unknown, defaultComponent?: unknown): unknown;
64
64
  /**
65
65
  * Forms hooks
66
66
  */
67
- declare const useFormsComponentsManager: () => ComponentsManager;
68
- declare const useFormsComponents: (defaultComponents?: Record<string, unknown>) => Record<string, unknown>;
69
- declare const useFormComponent: (name: unknown, defaultComponent?: unknown) => unknown;
67
+ declare function useFormsComponentsManager(): ComponentsManager;
68
+ declare function useFormsComponents(defaultComponents?: Record<string, unknown>): Record<string, unknown>;
69
+ declare function useFormComponent(name: unknown, defaultComponent?: unknown): unknown;
70
70
  /**
71
71
  * Modals hooks
72
72
  */
73
- declare const useModalsComponentsManager: () => ComponentsManager;
74
- declare const useModalsComponents: (defaultComponents?: Record<string, unknown>) => Record<string, unknown>;
75
- declare const useModalComponent: (name: unknown, defaultComponent?: unknown) => unknown;
73
+ declare function useModalsComponentsManager(): ComponentsManager;
74
+ declare function useModalsComponents(defaultComponents?: Record<string, unknown>): Record<string, unknown>;
75
+ declare function useModalComponent(name: unknown, defaultComponent?: unknown): unknown;
76
76
  /**
77
77
  * Filters hooks
78
78
  */
79
- declare const useFiltersComponentsManager: () => ComponentsManager;
80
- declare const useFiltersComponents: (defaultComponents?: Record<string, unknown>) => Record<string, unknown>;
81
- declare const useFilterComponent: (name: unknown, defaultComponent?: unknown) => unknown;
79
+ declare function useFiltersComponentsManager(): ComponentsManager;
80
+ declare function useFiltersComponents(defaultComponents?: Record<string, unknown>): Record<string, unknown>;
81
+ declare function useFilterComponent(name: unknown, defaultComponent?: unknown): unknown;
82
82
  /**
83
83
  * Lists hooks
84
84
  */
85
- declare const useListsComponentsManager: () => ComponentsManager;
86
- declare const useListsComponents: (defaultComponents?: Record<string, unknown>) => Record<string, unknown>;
87
- declare const useListComponent: (name: unknown, defaultComponent?: unknown) => unknown;
85
+ declare function useListsComponentsManager(): ComponentsManager;
86
+ declare function useListsComponents(defaultComponents?: Record<string, unknown>): Record<string, unknown>;
87
+ declare function useListComponent(name: unknown, defaultComponent?: unknown): unknown;
88
88
  /**
89
89
  * Displays hooks
90
90
  */
91
- declare const useDisplaysComponentsManager: () => ComponentsManager;
92
- declare const useDisplaysComponents: (defaultComponents?: Record<string, unknown>) => Record<string, unknown>;
93
- declare const useDisplayComponent: (name: unknown, defaultComponent?: unknown) => unknown;
91
+ declare function useDisplaysComponentsManager(): ComponentsManager;
92
+ declare function useDisplaysComponents(defaultComponents?: Record<string, unknown>): Record<string, unknown>;
93
+ declare function useDisplayComponent(name: unknown, defaultComponent?: unknown): unknown;
94
94
  /**
95
95
  * Actions hooks
96
96
  */
97
- declare const useActionsComponentsManager: () => ComponentsManager;
98
- declare const useActionsComponents: (defaultComponents?: Record<string, unknown>) => Record<string, unknown>;
99
- declare const useActionComponent: (name: unknown, defaultComponent?: unknown) => unknown;
97
+ declare function useActionsComponentsManager(): ComponentsManager;
98
+ declare function useActionsComponents(defaultComponents?: Record<string, unknown>): Record<string, unknown>;
99
+ declare function useActionComponent(name: unknown, defaultComponent?: unknown): unknown;
100
100
  /**
101
101
  * Buttons hooks
102
102
  */
103
- declare const useButtonsComponentsManager: () => ComponentsManager;
104
- declare const useButtonsComponents: (defaultComponents?: Record<string, unknown>) => Record<string, unknown>;
105
- declare const useButtonComponent: (name: unknown, defaultComponent?: unknown) => unknown;
103
+ declare function useButtonsComponentsManager(): ComponentsManager;
104
+ declare function useButtonsComponents(defaultComponents?: Record<string, unknown>): Record<string, unknown>;
105
+ declare function useButtonComponent(name: unknown, defaultComponent?: unknown): unknown;
106
106
  /**
107
107
  * Pages hooks
108
108
  */
109
- declare const usePagesComponentsManager: () => ComponentsManager;
110
- declare const usePagesComponents: (defaultComponents?: Record<string, unknown>) => Record<string, unknown>;
111
- declare const usePageComponent: (name: unknown, defaultComponent?: unknown) => unknown;
109
+ declare function usePagesComponentsManager(): ComponentsManager;
110
+ declare function usePagesComponents(defaultComponents?: Record<string, unknown>): Record<string, unknown>;
111
+ declare function usePageComponent(name: unknown, defaultComponent?: unknown): unknown;
112
112
  /**
113
113
  * Previews hooks
114
114
  */
115
- declare const usePreviewsComponentsManager: () => ComponentsManager;
116
- declare const usePreviewsComponents: (defaultComponents?: Record<string, unknown>) => Record<string, unknown>;
117
- declare const usePreviewComponent: (name: unknown, defaultComponent?: unknown) => unknown;
115
+ declare function usePreviewsComponentsManager(): ComponentsManager;
116
+ declare function usePreviewsComponents(defaultComponents?: Record<string, unknown>): Record<string, unknown>;
117
+ declare function usePreviewComponent(name: unknown, defaultComponent?: unknown): unknown;
118
118
  /**
119
119
  * App hooks
120
120
  */
121
- declare const useAppComponentsManager: () => ComponentsManager;
122
- declare const useAppComponents: (defaultComponents?: Record<string, unknown>) => Record<string, unknown>;
123
- declare const useAppComponent: (name: unknown, defaultComponent?: unknown) => unknown;
121
+ declare function useAppComponentsManager(): ComponentsManager;
122
+ declare function useAppComponents(defaultComponents?: Record<string, unknown>): Record<string, unknown>;
123
+ declare function useAppComponent(name: unknown, defaultComponent?: unknown): unknown;
124
124
  /**
125
125
  * Provider
126
126
  */
@@ -261,8 +261,8 @@ interface Definition {
261
261
  [key: string]: unknown;
262
262
  }
263
263
 
264
- declare const useDefinitionContext: () => Definition | null;
265
- declare const useDefinition: () => Definition | null;
264
+ declare function useDefinitionContext(): Definition | null;
265
+ declare function useDefinition(): Definition | null;
266
266
  interface DefinitionProviderProps {
267
267
  definition: Definition;
268
268
  children: ReactNode;
@@ -270,9 +270,9 @@ interface DefinitionProviderProps {
270
270
  declare function DefinitionProvider({ definition, children }: DefinitionProviderProps): react_jsx_runtime.JSX.Element;
271
271
 
272
272
  declare const FieldsContext: react.Context<FieldsManager>;
273
- declare const useFieldsManager: () => FieldsManager | null;
274
- declare const useField: (id: string) => Field | null;
275
- declare const useFields: () => Field[];
273
+ declare function useFieldsManager(): FieldsManager | null;
274
+ declare function useField(id: string): Field | null;
275
+ declare function useFields(): Field[];
276
276
  interface FieldsProviderProps {
277
277
  fields?: Field[] | null;
278
278
  manager?: FieldsManager | null;
@@ -287,13 +287,13 @@ interface FontsContextValue {
287
287
  setGoogleFonts?: ((fonts: Font[]) => void) | null;
288
288
  }
289
289
  declare const FontsContext: react.Context<FontsContextValue>;
290
- declare const useGoogleFonts: ({ disabled, setFonts, }?: {
290
+ declare function useGoogleFonts({ disabled, setFonts, }?: {
291
291
  disabled?: boolean;
292
292
  setFonts?: ((fonts: Font[]) => void) | null;
293
- }) => Font[] | null;
294
- declare const useFonts: ({ withoutGoogleFonts, }?: {
293
+ }): Font[] | null;
294
+ declare function useFonts({ withoutGoogleFonts, }?: {
295
295
  withoutGoogleFonts?: boolean;
296
- }) => FontsContextValue;
296
+ }): FontsContextValue;
297
297
  interface FontsProviderProps {
298
298
  children: ReactNode;
299
299
  systemFonts?: (Font | string)[] | null;
@@ -305,9 +305,9 @@ interface FormContextValue {
305
305
  value: Record<string, unknown>;
306
306
  setValue: (value: Record<string, unknown>) => void;
307
307
  }
308
- declare const useFormContext: () => FormContextValue | null;
309
- declare const useFormValue: () => Record<string, unknown>;
310
- declare const useFormSetValue: () => ((value: Record<string, unknown>) => void);
308
+ declare function useFormContext(): FormContextValue | null;
309
+ declare function useFormValue(): Record<string, unknown>;
310
+ declare function useFormSetValue(): (value: Record<string, unknown>) => void;
311
311
  interface FormProviderProps {
312
312
  value: Record<string, unknown>;
313
313
  setValue: (value: Record<string, unknown>) => void;
@@ -316,8 +316,8 @@ interface FormProviderProps {
316
316
  declare function FormProvider({ value, setValue, children }: FormProviderProps): react_jsx_runtime.JSX.Element;
317
317
 
318
318
  declare const GoogleApiClientContext: react.Context<any>;
319
- declare const useGoogleApiClient: () => any | null;
320
- declare const withGoogleApiClient: (WrappedComponent: ComponentType<any>) => {
319
+ declare function useGoogleApiClient(): any | null;
320
+ declare function withGoogleApiClient(WrappedComponent: ComponentType<any>): {
321
321
  (props: any): react_jsx_runtime.JSX.Element;
322
322
  displayName: string;
323
323
  };
@@ -330,7 +330,7 @@ interface GoogleKeysContextValue {
330
330
  apiKey: string | null;
331
331
  }
332
332
  declare const GoogleKeysContext: react.Context<GoogleKeysContextValue>;
333
- declare const useGoogleKeys: () => GoogleKeysContextValue;
333
+ declare function useGoogleKeys(): GoogleKeysContextValue;
334
334
  interface GoogleKeysProviderProps {
335
335
  children: ReactNode;
336
336
  apiKey?: string | null;
@@ -338,8 +338,8 @@ interface GoogleKeysProviderProps {
338
338
  declare function GoogleKeysProvider({ children, apiKey }: GoogleKeysProviderProps): react_jsx_runtime.JSX.Element;
339
339
 
340
340
  declare const GoogleMapsClientContext: react.Context<any>;
341
- declare const useGoogleMapsClient: () => any | null;
342
- declare const withGoogleMapsClient: (WrappedComponent: ComponentType<any>) => {
341
+ declare function useGoogleMapsClient(): any | null;
342
+ declare function withGoogleMapsClient(WrappedComponent: ComponentType<any>): {
343
343
  (props: any): react_jsx_runtime.JSX.Element;
344
344
  displayName: string;
345
345
  };
@@ -354,9 +354,9 @@ interface LocalesContextValue {
354
354
  locales: string[];
355
355
  }
356
356
  declare const LocalesContext: react.Context<LocalesContextValue>;
357
- declare const useLocalesContext: () => LocalesContextValue;
358
- declare const useLocales: () => string[];
359
- declare const useOtherLocales: () => string[];
357
+ declare function useLocalesContext(): LocalesContextValue;
358
+ declare function useLocales(): string[];
359
+ declare function useOtherLocales(): string[];
360
360
  interface LocalesProviderProps {
361
361
  locales?: string[];
362
362
  children: ReactNode;
@@ -378,7 +378,7 @@ interface ModalContextValue {
378
378
  getModalById: (modalId: string) => ModalData | null;
379
379
  }
380
380
  declare const ModalContext: react.Context<ModalContextValue>;
381
- declare const useModal: () => ModalContextValue;
381
+ declare function useModal(): ModalContextValue;
382
382
  interface ModalProviderProps {
383
383
  children: ReactNode;
384
384
  container?: unknown | null;
@@ -397,8 +397,8 @@ interface PanelsContextValue {
397
397
  unregister: (id: string) => void;
398
398
  }
399
399
  declare const PanelsContext: react.Context<PanelsContextValue>;
400
- declare const usePanels: () => PanelsContextValue;
401
- declare const withPanels: (WrappedComponent: ComponentType<any>) => {
400
+ declare function usePanels(): PanelsContextValue;
401
+ declare function withPanels(WrappedComponent: ComponentType<any>): {
402
402
  (props: any): react_jsx_runtime.JSX.Element;
403
403
  displayName: string;
404
404
  };
@@ -408,39 +408,39 @@ interface PanelsProviderProps {
408
408
  }
409
409
  declare function PanelsProvider({ children, container: initialContainer }: PanelsProviderProps): react_jsx_runtime.JSX.Element;
410
410
 
411
- declare const usePanneau: () => PanneauDefinition | null;
412
- declare const usePanneauResources: () => Resource[];
413
- declare const usePanneauResource: (id: string) => Resource | null;
414
- declare const usePanneauColorScheme: () => {
411
+ declare function usePanneau(): PanneauDefinition | null;
412
+ declare function usePanneauResources(): Resource[];
413
+ declare function usePanneauResource(id: string): Resource | null;
414
+ declare function usePanneauColorScheme(): {
415
415
  theme: string;
416
416
  background: string | null;
417
417
  text: string | null;
418
418
  sidebarPosition?: string | null;
419
419
  };
420
- declare const usePanneauComponents: () => Record<string, unknown>;
421
- declare const usePanneauComponent: (namespace: string | null, name: string) => string | null;
422
- declare const usePanneauAuth: () => Record<string, unknown>;
423
- declare const usePanneauSettings: () => Record<string, unknown>;
420
+ declare function usePanneauComponents(): Record<string, unknown>;
421
+ declare function usePanneauComponent(namespace: string | null, name: string): string | null;
422
+ declare function usePanneauAuth(): Record<string, unknown>;
423
+ declare function usePanneauSettings(): Record<string, unknown>;
424
424
  interface PanneauProviderProps {
425
425
  definition: PanneauDefinition;
426
426
  children: ReactNode;
427
427
  }
428
428
  declare function PanneauProvider({ definition, children }: PanneauProviderProps): react_jsx_runtime.JSX.Element;
429
429
 
430
- declare const useResource: () => Resource | null;
430
+ declare function useResource(): Resource | null;
431
431
  interface ResourceProviderProps {
432
432
  resource: Resource;
433
433
  children: ReactNode;
434
434
  }
435
435
  declare function ResourceProvider({ resource, children }: ResourceProviderProps): react_jsx_runtime.JSX.Element;
436
436
 
437
- declare const useRoutePush: () => ((route: string | {
437
+ declare function useRoutePush(): (route: string | {
438
438
  pathname?: string | null;
439
439
  search?: string | null;
440
- }, data?: unknown, ...args: unknown[]) => void);
441
- declare const useRouteBack: () => (() => void);
440
+ }, data?: unknown, ...args: unknown[]) => void;
441
+ declare function useRouteBack(): () => void;
442
442
 
443
- declare const useTracking: () => any;
443
+ declare function useTracking(): any;
444
444
  interface TrackingProviderProps {
445
445
  children: ReactNode;
446
446
  variables?: TrackingVariables | null;