@dyrected/admin 2.5.28 → 2.5.30

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.
@@ -0,0 +1,7 @@
1
+ import { ComponentType } from 'react';
2
+ export declare function AdminComponentSlot<Props extends object>({ componentKeys, registry, slot, componentProps, }: {
3
+ componentKeys?: string[];
4
+ registry?: Record<string, ComponentType<Props>>;
5
+ slot: string;
6
+ componentProps: Props;
7
+ }): import("react/jsx-runtime").JSX.Element[];
@@ -1,4 +1,7 @@
1
+ import { icons } from 'lucide-react';
1
2
  import { Field as FieldSchema } from '@dyrected/sdk';
3
+ type IconName = keyof typeof icons;
4
+ export declare const availableIconNames: IconName[];
2
5
  interface IconPickerProps {
3
6
  schema: FieldSchema;
4
7
  field: {
@@ -0,0 +1 @@
1
+ export {};
@@ -6,7 +6,7 @@ declare const Command: React.ForwardRefExoticComponent<Omit<{
6
6
  ref?: React.Ref<HTMLDivElement>;
7
7
  } & {
8
8
  asChild?: boolean;
9
- }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & {
9
+ }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
10
10
  label?: string;
11
11
  shouldFilter?: boolean;
12
12
  filter?: (value: string, search: string, keywords?: string[]) => number;
@@ -32,7 +32,7 @@ declare const CommandList: React.ForwardRefExoticComponent<Omit<{
32
32
  ref?: React.Ref<HTMLDivElement>;
33
33
  } & {
34
34
  asChild?: boolean;
35
- }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & {
35
+ }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
36
36
  label?: string;
37
37
  } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
38
38
  declare const CommandEmpty: React.ForwardRefExoticComponent<Omit<{
@@ -41,14 +41,14 @@ declare const CommandEmpty: React.ForwardRefExoticComponent<Omit<{
41
41
  ref?: React.Ref<HTMLDivElement>;
42
42
  } & {
43
43
  asChild?: boolean;
44
- }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
44
+ }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
45
45
  declare const CommandGroup: React.ForwardRefExoticComponent<Omit<{
46
46
  children?: React.ReactNode;
47
47
  } & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
48
48
  ref?: React.Ref<HTMLDivElement>;
49
49
  } & {
50
50
  asChild?: boolean;
51
- }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>>, "value" | "heading"> & {
51
+ }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild">, "value" | "heading"> & {
52
52
  heading?: React.ReactNode;
53
53
  value?: string;
54
54
  forceMount?: boolean;
@@ -57,7 +57,7 @@ declare const CommandSeparator: React.ForwardRefExoticComponent<Omit<Pick<Pick<R
57
57
  ref?: React.Ref<HTMLDivElement>;
58
58
  } & {
59
59
  asChild?: boolean;
60
- }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & {
60
+ }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
61
61
  alwaysRender?: boolean;
62
62
  } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
63
63
  declare const CommandItem: React.ForwardRefExoticComponent<Omit<{
@@ -66,7 +66,7 @@ declare const CommandItem: React.ForwardRefExoticComponent<Omit<{
66
66
  ref?: React.Ref<HTMLDivElement>;
67
67
  } & {
68
68
  asChild?: boolean;
69
- }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>>, "value" | "onSelect" | "disabled"> & {
69
+ }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild">, "value" | "onSelect" | "disabled"> & {
70
70
  disabled?: boolean;
71
71
  onSelect?: (value: string) => void;
72
72
  value?: string;
@@ -0,0 +1,31 @@
1
+ import { WorkflowMetadata } from '@dyrected/core';
2
+ interface WorkflowState {
3
+ name: string;
4
+ label: string;
5
+ color?: "neutral" | "warning" | "success" | "danger" | "info";
6
+ published?: boolean;
7
+ }
8
+ interface WorkflowTransition {
9
+ name: string;
10
+ label: string;
11
+ from: string | string[];
12
+ to: string;
13
+ requiredCapabilities?: string[];
14
+ requireComment?: boolean;
15
+ unpublish?: boolean;
16
+ }
17
+ interface WorkflowConfig {
18
+ initialState: string;
19
+ states: WorkflowState[];
20
+ transitions: WorkflowTransition[];
21
+ }
22
+ interface WorkflowPanelProps {
23
+ collection: string;
24
+ documentId: string;
25
+ workflowMeta: WorkflowMetadata & {
26
+ availableTransitions?: string[];
27
+ };
28
+ workflowConfig: WorkflowConfig;
29
+ }
30
+ export declare function WorkflowPanel({ collection, documentId, workflowMeta, workflowConfig, }: WorkflowPanelProps): import("react/jsx-runtime").JSX.Element;
31
+ export {};
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { DyrectedProviderProps } from './providers/dyrected-provider';
2
+ export type { AdminComponents, AdminSchemas, CollectionListSlotProps, DashboardSlotProps, } from './types/admin-components';
2
3
  export interface AdminUIProps {
3
4
  apiKey?: string;
4
5
  baseUrl?: string;