@puckeditor/plugin-emotion-cache 0.24.0-canary.10b39dc7 → 0.24.0-canary.13d862e3
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/index.d.mts +18 -2
- package/dist/index.d.ts +18 -2
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -53,7 +53,7 @@ type NonForwardableProps = {
|
|
|
53
53
|
/**
|
|
54
54
|
* Keys internally consumed by Puck and never forwarded to `as`.
|
|
55
55
|
*/
|
|
56
|
-
type ConsumedPropKey = keyof DropZoneOwnProps | "as" | "content" | "config" | "metadata";
|
|
56
|
+
type ConsumedPropKey = keyof DropZoneOwnProps | "as" | "content" | "config" | "metadata" | "fieldTransforms";
|
|
57
57
|
/**
|
|
58
58
|
* Additional props forwarded to the element or component provided via `as`,
|
|
59
59
|
* typed against it.
|
|
@@ -272,6 +272,10 @@ interface RadioField extends BaseField {
|
|
|
272
272
|
type: "radio";
|
|
273
273
|
options: FieldOptions;
|
|
274
274
|
}
|
|
275
|
+
interface CheckboxField extends BaseField {
|
|
276
|
+
type: "checkbox";
|
|
277
|
+
options: FieldOptions;
|
|
278
|
+
}
|
|
275
279
|
interface RichtextField<UserSelector extends RichTextSelector = RichTextSelector> extends BaseField {
|
|
276
280
|
type: "richtext";
|
|
277
281
|
contentEditable?: boolean;
|
|
@@ -314,6 +318,8 @@ interface ObjectField<Props extends any = {
|
|
|
314
318
|
[key: string]: any;
|
|
315
319
|
}, UserField extends {} = {}> extends BaseField {
|
|
316
320
|
type: "object";
|
|
321
|
+
collapsible?: boolean;
|
|
322
|
+
defaultExpanded?: boolean;
|
|
317
323
|
objectFields: {
|
|
318
324
|
[SubPropName in keyof Props]: UserField extends {
|
|
319
325
|
type: PropertyKey;
|
|
@@ -378,7 +384,7 @@ interface SlotField extends BaseField {
|
|
|
378
384
|
allow?: string[];
|
|
379
385
|
disallow?: string[];
|
|
380
386
|
}
|
|
381
|
-
type Field<ValueType = any, UserField extends {} = {}> = TextField | RichtextField | NumberField | TextareaField | SelectField | RadioField | ArrayField<ValueType extends {
|
|
387
|
+
type Field<ValueType = any, UserField extends {} = {}> = TextField | RichtextField | NumberField | TextareaField | SelectField | RadioField | CheckboxField | ArrayField<ValueType extends {
|
|
382
388
|
[key: string]: any;
|
|
383
389
|
}[] ? ValueType : never, UserField> | ObjectField<ValueType, UserField> | ExternalField<ValueType> | ExternalFieldWithAdaptor<ValueType> | CustomField<ValueType> | SlotField;
|
|
384
390
|
type Fields<ComponentProps extends DefaultComponentProps = DefaultComponentProps, UserField extends {} = {}> = {
|
|
@@ -460,6 +466,9 @@ UserField extends BaseField = {}> = {
|
|
|
460
466
|
label?: string;
|
|
461
467
|
defaultProps?: FieldProps;
|
|
462
468
|
fields?: Fields<FieldProps, UserField>;
|
|
469
|
+
renderFields?: RenderFunc<{
|
|
470
|
+
fields: Partial<Record<keyof FieldProps, ReactNode>>;
|
|
471
|
+
}>;
|
|
463
472
|
permissions?: Partial<Permissions>;
|
|
464
473
|
inline?: boolean;
|
|
465
474
|
resolveFields?: (data: DataShape, params: {
|
|
@@ -608,10 +617,13 @@ type UiState = {
|
|
|
608
617
|
controlsVisible: boolean;
|
|
609
618
|
options: Viewport[];
|
|
610
619
|
};
|
|
620
|
+
expandedFieldGroups: Record<string, boolean>;
|
|
611
621
|
field: {
|
|
612
622
|
focus?: string | null;
|
|
613
623
|
metadata?: Record<string, any>;
|
|
614
624
|
};
|
|
625
|
+
/** The selected field tab. Shows the first available tab when `null`. */
|
|
626
|
+
fieldTab?: string | number | null;
|
|
615
627
|
plugin: {
|
|
616
628
|
current: string | null;
|
|
617
629
|
};
|
|
@@ -701,6 +713,8 @@ type Overrides<UserConfig extends Config = Config> = OverridesGeneric<{
|
|
|
701
713
|
label?: string;
|
|
702
714
|
children: ReactNode;
|
|
703
715
|
parentAction: ReactNode;
|
|
716
|
+
dragHandle?: ReactNode;
|
|
717
|
+
dragHandleRef?: (element: Element | null) => void;
|
|
704
718
|
}>;
|
|
705
719
|
headerActions: RenderFunc<{
|
|
706
720
|
children: ReactNode;
|
|
@@ -710,10 +724,12 @@ type Overrides<UserConfig extends Config = Config> = OverridesGeneric<{
|
|
|
710
724
|
children: ReactNode;
|
|
711
725
|
isLoading: boolean;
|
|
712
726
|
itemSelector?: ItemSelector | null;
|
|
727
|
+
fields: Partial<Record<string, ReactNode>>;
|
|
713
728
|
}>;
|
|
714
729
|
fieldLabel: RenderFunc<{
|
|
715
730
|
children?: ReactNode;
|
|
716
731
|
icon?: ReactNode;
|
|
732
|
+
endIcon?: ReactNode;
|
|
717
733
|
label: string;
|
|
718
734
|
el?: "label" | "div";
|
|
719
735
|
readOnly?: boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -53,7 +53,7 @@ type NonForwardableProps = {
|
|
|
53
53
|
/**
|
|
54
54
|
* Keys internally consumed by Puck and never forwarded to `as`.
|
|
55
55
|
*/
|
|
56
|
-
type ConsumedPropKey = keyof DropZoneOwnProps | "as" | "content" | "config" | "metadata";
|
|
56
|
+
type ConsumedPropKey = keyof DropZoneOwnProps | "as" | "content" | "config" | "metadata" | "fieldTransforms";
|
|
57
57
|
/**
|
|
58
58
|
* Additional props forwarded to the element or component provided via `as`,
|
|
59
59
|
* typed against it.
|
|
@@ -272,6 +272,10 @@ interface RadioField extends BaseField {
|
|
|
272
272
|
type: "radio";
|
|
273
273
|
options: FieldOptions;
|
|
274
274
|
}
|
|
275
|
+
interface CheckboxField extends BaseField {
|
|
276
|
+
type: "checkbox";
|
|
277
|
+
options: FieldOptions;
|
|
278
|
+
}
|
|
275
279
|
interface RichtextField<UserSelector extends RichTextSelector = RichTextSelector> extends BaseField {
|
|
276
280
|
type: "richtext";
|
|
277
281
|
contentEditable?: boolean;
|
|
@@ -314,6 +318,8 @@ interface ObjectField<Props extends any = {
|
|
|
314
318
|
[key: string]: any;
|
|
315
319
|
}, UserField extends {} = {}> extends BaseField {
|
|
316
320
|
type: "object";
|
|
321
|
+
collapsible?: boolean;
|
|
322
|
+
defaultExpanded?: boolean;
|
|
317
323
|
objectFields: {
|
|
318
324
|
[SubPropName in keyof Props]: UserField extends {
|
|
319
325
|
type: PropertyKey;
|
|
@@ -378,7 +384,7 @@ interface SlotField extends BaseField {
|
|
|
378
384
|
allow?: string[];
|
|
379
385
|
disallow?: string[];
|
|
380
386
|
}
|
|
381
|
-
type Field<ValueType = any, UserField extends {} = {}> = TextField | RichtextField | NumberField | TextareaField | SelectField | RadioField | ArrayField<ValueType extends {
|
|
387
|
+
type Field<ValueType = any, UserField extends {} = {}> = TextField | RichtextField | NumberField | TextareaField | SelectField | RadioField | CheckboxField | ArrayField<ValueType extends {
|
|
382
388
|
[key: string]: any;
|
|
383
389
|
}[] ? ValueType : never, UserField> | ObjectField<ValueType, UserField> | ExternalField<ValueType> | ExternalFieldWithAdaptor<ValueType> | CustomField<ValueType> | SlotField;
|
|
384
390
|
type Fields<ComponentProps extends DefaultComponentProps = DefaultComponentProps, UserField extends {} = {}> = {
|
|
@@ -460,6 +466,9 @@ UserField extends BaseField = {}> = {
|
|
|
460
466
|
label?: string;
|
|
461
467
|
defaultProps?: FieldProps;
|
|
462
468
|
fields?: Fields<FieldProps, UserField>;
|
|
469
|
+
renderFields?: RenderFunc<{
|
|
470
|
+
fields: Partial<Record<keyof FieldProps, ReactNode>>;
|
|
471
|
+
}>;
|
|
463
472
|
permissions?: Partial<Permissions>;
|
|
464
473
|
inline?: boolean;
|
|
465
474
|
resolveFields?: (data: DataShape, params: {
|
|
@@ -608,10 +617,13 @@ type UiState = {
|
|
|
608
617
|
controlsVisible: boolean;
|
|
609
618
|
options: Viewport[];
|
|
610
619
|
};
|
|
620
|
+
expandedFieldGroups: Record<string, boolean>;
|
|
611
621
|
field: {
|
|
612
622
|
focus?: string | null;
|
|
613
623
|
metadata?: Record<string, any>;
|
|
614
624
|
};
|
|
625
|
+
/** The selected field tab. Shows the first available tab when `null`. */
|
|
626
|
+
fieldTab?: string | number | null;
|
|
615
627
|
plugin: {
|
|
616
628
|
current: string | null;
|
|
617
629
|
};
|
|
@@ -701,6 +713,8 @@ type Overrides<UserConfig extends Config = Config> = OverridesGeneric<{
|
|
|
701
713
|
label?: string;
|
|
702
714
|
children: ReactNode;
|
|
703
715
|
parentAction: ReactNode;
|
|
716
|
+
dragHandle?: ReactNode;
|
|
717
|
+
dragHandleRef?: (element: Element | null) => void;
|
|
704
718
|
}>;
|
|
705
719
|
headerActions: RenderFunc<{
|
|
706
720
|
children: ReactNode;
|
|
@@ -710,10 +724,12 @@ type Overrides<UserConfig extends Config = Config> = OverridesGeneric<{
|
|
|
710
724
|
children: ReactNode;
|
|
711
725
|
isLoading: boolean;
|
|
712
726
|
itemSelector?: ItemSelector | null;
|
|
727
|
+
fields: Partial<Record<string, ReactNode>>;
|
|
713
728
|
}>;
|
|
714
729
|
fieldLabel: RenderFunc<{
|
|
715
730
|
children?: ReactNode;
|
|
716
731
|
icon?: ReactNode;
|
|
732
|
+
endIcon?: ReactNode;
|
|
717
733
|
label: string;
|
|
718
734
|
el?: "label" | "div";
|
|
719
735
|
readOnly?: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@puckeditor/plugin-emotion-cache",
|
|
3
|
-
"version": "0.24.0-canary.
|
|
3
|
+
"version": "0.24.0-canary.13d862e3",
|
|
4
4
|
"author": "Chris Villa <chris@puckeditor.com>",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
],
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@emotion/react": "^11.13.3",
|
|
25
|
-
"@puckeditor/core": "^0.24.0-canary.
|
|
25
|
+
"@puckeditor/core": "^0.24.0-canary.13d862e3",
|
|
26
26
|
"@types/minimatch": "3.0.5",
|
|
27
27
|
"@types/react": "^19.2.7",
|
|
28
28
|
"@types/react-dom": "^19.0.2",
|