@puckeditor/plugin-heading-analyzer 0.24.0-canary.148f3cdd → 0.24.0-canary.2f5dc0a0
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 +17 -2
- package/dist/index.d.ts +17 -2
- package/dist/index.js +4 -3
- package/dist/index.mjs +4 -3
- 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,7 @@ interface ObjectField<Props extends any = {
|
|
|
314
318
|
[key: string]: any;
|
|
315
319
|
}, UserField extends {} = {}> extends BaseField {
|
|
316
320
|
type: "object";
|
|
321
|
+
expandable?: boolean;
|
|
317
322
|
objectFields: {
|
|
318
323
|
[SubPropName in keyof Props]: UserField extends {
|
|
319
324
|
type: PropertyKey;
|
|
@@ -378,7 +383,7 @@ interface SlotField extends BaseField {
|
|
|
378
383
|
allow?: string[];
|
|
379
384
|
disallow?: string[];
|
|
380
385
|
}
|
|
381
|
-
type Field<ValueType = any, UserField extends {} = {}> = TextField | RichtextField | NumberField | TextareaField | SelectField | RadioField | ArrayField<ValueType extends {
|
|
386
|
+
type Field<ValueType = any, UserField extends {} = {}> = TextField | RichtextField | NumberField | TextareaField | SelectField | RadioField | CheckboxField | ArrayField<ValueType extends {
|
|
382
387
|
[key: string]: any;
|
|
383
388
|
}[] ? ValueType : never, UserField> | ObjectField<ValueType, UserField> | ExternalField<ValueType> | ExternalFieldWithAdaptor<ValueType> | CustomField<ValueType> | SlotField;
|
|
384
389
|
type Fields<ComponentProps extends DefaultComponentProps = DefaultComponentProps, UserField extends {} = {}> = {
|
|
@@ -460,6 +465,9 @@ UserField extends BaseField = {}> = {
|
|
|
460
465
|
label?: string;
|
|
461
466
|
defaultProps?: FieldProps;
|
|
462
467
|
fields?: Fields<FieldProps, UserField>;
|
|
468
|
+
renderFields?: RenderFunc<{
|
|
469
|
+
fields: Partial<Record<keyof FieldProps, ReactNode>>;
|
|
470
|
+
}>;
|
|
463
471
|
permissions?: Partial<Permissions>;
|
|
464
472
|
inline?: boolean;
|
|
465
473
|
resolveFields?: (data: DataShape, params: {
|
|
@@ -608,10 +616,13 @@ type UiState = {
|
|
|
608
616
|
controlsVisible: boolean;
|
|
609
617
|
options: Viewport[];
|
|
610
618
|
};
|
|
619
|
+
expandedFieldGroups: Record<string, boolean>;
|
|
611
620
|
field: {
|
|
612
621
|
focus?: string | null;
|
|
613
622
|
metadata?: Record<string, any>;
|
|
614
623
|
};
|
|
624
|
+
/** The selected field tab. Shows the first available tab when `null`. */
|
|
625
|
+
fieldTab?: string | number | null;
|
|
615
626
|
plugin: {
|
|
616
627
|
current: string | null;
|
|
617
628
|
};
|
|
@@ -701,6 +712,8 @@ type Overrides<UserConfig extends Config = Config> = OverridesGeneric<{
|
|
|
701
712
|
label?: string;
|
|
702
713
|
children: ReactNode;
|
|
703
714
|
parentAction: ReactNode;
|
|
715
|
+
dragHandle?: ReactNode;
|
|
716
|
+
dragHandleRef?: (element: Element | null) => void;
|
|
704
717
|
}>;
|
|
705
718
|
headerActions: RenderFunc<{
|
|
706
719
|
children: ReactNode;
|
|
@@ -710,10 +723,12 @@ type Overrides<UserConfig extends Config = Config> = OverridesGeneric<{
|
|
|
710
723
|
children: ReactNode;
|
|
711
724
|
isLoading: boolean;
|
|
712
725
|
itemSelector?: ItemSelector | null;
|
|
726
|
+
fields: Partial<Record<string, ReactNode>>;
|
|
713
727
|
}>;
|
|
714
728
|
fieldLabel: RenderFunc<{
|
|
715
729
|
children?: ReactNode;
|
|
716
730
|
icon?: ReactNode;
|
|
731
|
+
endIcon?: ReactNode;
|
|
717
732
|
label: string;
|
|
718
733
|
el?: "label" | "div";
|
|
719
734
|
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,7 @@ interface ObjectField<Props extends any = {
|
|
|
314
318
|
[key: string]: any;
|
|
315
319
|
}, UserField extends {} = {}> extends BaseField {
|
|
316
320
|
type: "object";
|
|
321
|
+
expandable?: boolean;
|
|
317
322
|
objectFields: {
|
|
318
323
|
[SubPropName in keyof Props]: UserField extends {
|
|
319
324
|
type: PropertyKey;
|
|
@@ -378,7 +383,7 @@ interface SlotField extends BaseField {
|
|
|
378
383
|
allow?: string[];
|
|
379
384
|
disallow?: string[];
|
|
380
385
|
}
|
|
381
|
-
type Field<ValueType = any, UserField extends {} = {}> = TextField | RichtextField | NumberField | TextareaField | SelectField | RadioField | ArrayField<ValueType extends {
|
|
386
|
+
type Field<ValueType = any, UserField extends {} = {}> = TextField | RichtextField | NumberField | TextareaField | SelectField | RadioField | CheckboxField | ArrayField<ValueType extends {
|
|
382
387
|
[key: string]: any;
|
|
383
388
|
}[] ? ValueType : never, UserField> | ObjectField<ValueType, UserField> | ExternalField<ValueType> | ExternalFieldWithAdaptor<ValueType> | CustomField<ValueType> | SlotField;
|
|
384
389
|
type Fields<ComponentProps extends DefaultComponentProps = DefaultComponentProps, UserField extends {} = {}> = {
|
|
@@ -460,6 +465,9 @@ UserField extends BaseField = {}> = {
|
|
|
460
465
|
label?: string;
|
|
461
466
|
defaultProps?: FieldProps;
|
|
462
467
|
fields?: Fields<FieldProps, UserField>;
|
|
468
|
+
renderFields?: RenderFunc<{
|
|
469
|
+
fields: Partial<Record<keyof FieldProps, ReactNode>>;
|
|
470
|
+
}>;
|
|
463
471
|
permissions?: Partial<Permissions>;
|
|
464
472
|
inline?: boolean;
|
|
465
473
|
resolveFields?: (data: DataShape, params: {
|
|
@@ -608,10 +616,13 @@ type UiState = {
|
|
|
608
616
|
controlsVisible: boolean;
|
|
609
617
|
options: Viewport[];
|
|
610
618
|
};
|
|
619
|
+
expandedFieldGroups: Record<string, boolean>;
|
|
611
620
|
field: {
|
|
612
621
|
focus?: string | null;
|
|
613
622
|
metadata?: Record<string, any>;
|
|
614
623
|
};
|
|
624
|
+
/** The selected field tab. Shows the first available tab when `null`. */
|
|
625
|
+
fieldTab?: string | number | null;
|
|
615
626
|
plugin: {
|
|
616
627
|
current: string | null;
|
|
617
628
|
};
|
|
@@ -701,6 +712,8 @@ type Overrides<UserConfig extends Config = Config> = OverridesGeneric<{
|
|
|
701
712
|
label?: string;
|
|
702
713
|
children: ReactNode;
|
|
703
714
|
parentAction: ReactNode;
|
|
715
|
+
dragHandle?: ReactNode;
|
|
716
|
+
dragHandleRef?: (element: Element | null) => void;
|
|
704
717
|
}>;
|
|
705
718
|
headerActions: RenderFunc<{
|
|
706
719
|
children: ReactNode;
|
|
@@ -710,10 +723,12 @@ type Overrides<UserConfig extends Config = Config> = OverridesGeneric<{
|
|
|
710
723
|
children: ReactNode;
|
|
711
724
|
isLoading: boolean;
|
|
712
725
|
itemSelector?: ItemSelector | null;
|
|
726
|
+
fields: Partial<Record<string, ReactNode>>;
|
|
713
727
|
}>;
|
|
714
728
|
fieldLabel: RenderFunc<{
|
|
715
729
|
children?: ReactNode;
|
|
716
730
|
icon?: ReactNode;
|
|
731
|
+
endIcon?: ReactNode;
|
|
717
732
|
label: string;
|
|
718
733
|
el?: "label" | "div";
|
|
719
734
|
readOnly?: boolean;
|
package/dist/index.js
CHANGED
|
@@ -581,7 +581,7 @@ var defaultViewports = [
|
|
|
581
581
|
{ width: "100%", height: "auto", icon: "FullWidth", label: "Full-width" }
|
|
582
582
|
];
|
|
583
583
|
|
|
584
|
-
// ../../node_modules/.pnpm/zustand@5.0.13_@types+react@19.2.14_react@19.
|
|
584
|
+
// ../../node_modules/.pnpm/zustand@5.0.13_@types+react@19.2.14_react@19.2.6_use-sync-external-store@1.6.0_react@19.2.6_/node_modules/zustand/esm/vanilla.mjs
|
|
585
585
|
init_react_import();
|
|
586
586
|
var createStoreImpl = (createState) => {
|
|
587
587
|
let state;
|
|
@@ -606,7 +606,7 @@ var createStoreImpl = (createState) => {
|
|
|
606
606
|
};
|
|
607
607
|
var createStore = ((createState) => createState ? createStoreImpl(createState) : createStoreImpl);
|
|
608
608
|
|
|
609
|
-
// ../../node_modules/.pnpm/zustand@5.0.13_@types+react@19.2.14_react@19.
|
|
609
|
+
// ../../node_modules/.pnpm/zustand@5.0.13_@types+react@19.2.14_react@19.2.6_use-sync-external-store@1.6.0_react@19.2.6_/node_modules/zustand/esm/react.mjs
|
|
610
610
|
init_react_import();
|
|
611
611
|
var import_react4 = __toESM(require("react"), 1);
|
|
612
612
|
var identity = (arg) => arg;
|
|
@@ -627,7 +627,7 @@ var createImpl = (createState) => {
|
|
|
627
627
|
};
|
|
628
628
|
var create = ((createState) => createState ? createImpl(createState) : createImpl);
|
|
629
629
|
|
|
630
|
-
// ../../node_modules/.pnpm/zustand@5.0.13_@types+react@19.2.14_react@19.
|
|
630
|
+
// ../../node_modules/.pnpm/zustand@5.0.13_@types+react@19.2.14_react@19.2.6_use-sync-external-store@1.6.0_react@19.2.6_/node_modules/zustand/esm/middleware.mjs
|
|
631
631
|
init_react_import();
|
|
632
632
|
var subscribeWithSelectorImpl = (fn) => (set, get, api) => {
|
|
633
633
|
const origSubscribe = api.subscribe;
|
|
@@ -718,6 +718,7 @@ var defaultAppState = {
|
|
|
718
718
|
options: [],
|
|
719
719
|
controlsVisible: true
|
|
720
720
|
},
|
|
721
|
+
expandedFieldGroups: {},
|
|
721
722
|
field: { focus: null },
|
|
722
723
|
plugin: { current: null }
|
|
723
724
|
},
|
package/dist/index.mjs
CHANGED
|
@@ -569,7 +569,7 @@ var defaultViewports = [
|
|
|
569
569
|
{ width: "100%", height: "auto", icon: "FullWidth", label: "Full-width" }
|
|
570
570
|
];
|
|
571
571
|
|
|
572
|
-
// ../../node_modules/.pnpm/zustand@5.0.13_@types+react@19.2.14_react@19.
|
|
572
|
+
// ../../node_modules/.pnpm/zustand@5.0.13_@types+react@19.2.14_react@19.2.6_use-sync-external-store@1.6.0_react@19.2.6_/node_modules/zustand/esm/vanilla.mjs
|
|
573
573
|
init_react_import();
|
|
574
574
|
var createStoreImpl = (createState) => {
|
|
575
575
|
let state;
|
|
@@ -594,7 +594,7 @@ var createStoreImpl = (createState) => {
|
|
|
594
594
|
};
|
|
595
595
|
var createStore = ((createState) => createState ? createStoreImpl(createState) : createStoreImpl);
|
|
596
596
|
|
|
597
|
-
// ../../node_modules/.pnpm/zustand@5.0.13_@types+react@19.2.14_react@19.
|
|
597
|
+
// ../../node_modules/.pnpm/zustand@5.0.13_@types+react@19.2.14_react@19.2.6_use-sync-external-store@1.6.0_react@19.2.6_/node_modules/zustand/esm/react.mjs
|
|
598
598
|
init_react_import();
|
|
599
599
|
import React2 from "react";
|
|
600
600
|
var identity = (arg) => arg;
|
|
@@ -615,7 +615,7 @@ var createImpl = (createState) => {
|
|
|
615
615
|
};
|
|
616
616
|
var create = ((createState) => createState ? createImpl(createState) : createImpl);
|
|
617
617
|
|
|
618
|
-
// ../../node_modules/.pnpm/zustand@5.0.13_@types+react@19.2.14_react@19.
|
|
618
|
+
// ../../node_modules/.pnpm/zustand@5.0.13_@types+react@19.2.14_react@19.2.6_use-sync-external-store@1.6.0_react@19.2.6_/node_modules/zustand/esm/middleware.mjs
|
|
619
619
|
init_react_import();
|
|
620
620
|
var subscribeWithSelectorImpl = (fn) => (set, get, api) => {
|
|
621
621
|
const origSubscribe = api.subscribe;
|
|
@@ -706,6 +706,7 @@ var defaultAppState = {
|
|
|
706
706
|
options: [],
|
|
707
707
|
controlsVisible: true
|
|
708
708
|
},
|
|
709
|
+
expandedFieldGroups: {},
|
|
709
710
|
field: { focus: null },
|
|
710
711
|
plugin: { current: null }
|
|
711
712
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@puckeditor/plugin-heading-analyzer",
|
|
3
|
-
"version": "0.24.0-canary.
|
|
3
|
+
"version": "0.24.0-canary.2f5dc0a0",
|
|
4
4
|
"author": "Chris Villa <chris@puckeditor.com>",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"dist"
|
|
24
24
|
],
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@puckeditor/core": "^0.24.0-canary.
|
|
26
|
+
"@puckeditor/core": "^0.24.0-canary.2f5dc0a0",
|
|
27
27
|
"@types/minimatch": "3.0.5",
|
|
28
28
|
"@types/react": "^19.0.1",
|
|
29
29
|
"@types/react-dom": "^19.0.2",
|