@measured/puck-plugin-heading-analyzer 0.19.0-canary.a281c342 → 0.19.0-canary.a60c81eb
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/README.md +1 -1
- package/dist/index.d.mts +18 -9
- package/dist/index.d.ts +18 -9
- package/dist/index.js +974 -637
- package/dist/index.mjs +974 -637
- package/package.json +3 -3
package/README.md
CHANGED
package/dist/index.d.mts
CHANGED
@@ -13,6 +13,8 @@ type FieldOptions = Array<FieldOption> | ReadonlyArray<FieldOption>;
|
|
13
13
|
type BaseField = {
|
14
14
|
label?: string;
|
15
15
|
labelIcon?: ReactElement;
|
16
|
+
metadata?: Metadata;
|
17
|
+
visible?: boolean;
|
16
18
|
};
|
17
19
|
type TextField = BaseField & {
|
18
20
|
type: "text";
|
@@ -99,19 +101,22 @@ type ExternalField<Props extends {
|
|
99
101
|
filterFields?: Record<string, Field>;
|
100
102
|
initialFilters?: Record<string, any>;
|
101
103
|
};
|
102
|
-
type
|
104
|
+
type CustomFieldRender<Value extends any> = (props: {
|
105
|
+
field: CustomField<Value>;
|
106
|
+
name: string;
|
107
|
+
id: string;
|
108
|
+
value: Value;
|
109
|
+
onChange: (value: Value) => void;
|
110
|
+
readOnly?: boolean;
|
111
|
+
}) => ReactElement;
|
112
|
+
type CustomField<Value extends any> = BaseField & {
|
103
113
|
type: "custom";
|
104
|
-
render:
|
105
|
-
field: CustomField<Props>;
|
106
|
-
name: string;
|
107
|
-
id: string;
|
108
|
-
value: Props;
|
109
|
-
onChange: (value: Props) => void;
|
110
|
-
readOnly?: boolean;
|
111
|
-
}) => ReactElement;
|
114
|
+
render: CustomFieldRender<Value>;
|
112
115
|
};
|
113
116
|
type SlotField = BaseField & {
|
114
117
|
type: "slot";
|
118
|
+
allow?: string[];
|
119
|
+
disallow?: string[];
|
115
120
|
};
|
116
121
|
type Field<Props extends any = any> = TextField | NumberField | TextareaField | SelectField | RadioField | ArrayField<Props extends {
|
117
122
|
[key: string]: any;
|
@@ -130,6 +135,10 @@ type FieldProps<F = Field<any>, ValueType = any> = {
|
|
130
135
|
readOnly?: boolean;
|
131
136
|
};
|
132
137
|
|
138
|
+
type Metadata = {
|
139
|
+
[key: string]: any;
|
140
|
+
};
|
141
|
+
|
133
142
|
type ItemWithId = {
|
134
143
|
_arrayId: string;
|
135
144
|
_originalIndex: number;
|
package/dist/index.d.ts
CHANGED
@@ -13,6 +13,8 @@ type FieldOptions = Array<FieldOption> | ReadonlyArray<FieldOption>;
|
|
13
13
|
type BaseField = {
|
14
14
|
label?: string;
|
15
15
|
labelIcon?: ReactElement;
|
16
|
+
metadata?: Metadata;
|
17
|
+
visible?: boolean;
|
16
18
|
};
|
17
19
|
type TextField = BaseField & {
|
18
20
|
type: "text";
|
@@ -99,19 +101,22 @@ type ExternalField<Props extends {
|
|
99
101
|
filterFields?: Record<string, Field>;
|
100
102
|
initialFilters?: Record<string, any>;
|
101
103
|
};
|
102
|
-
type
|
104
|
+
type CustomFieldRender<Value extends any> = (props: {
|
105
|
+
field: CustomField<Value>;
|
106
|
+
name: string;
|
107
|
+
id: string;
|
108
|
+
value: Value;
|
109
|
+
onChange: (value: Value) => void;
|
110
|
+
readOnly?: boolean;
|
111
|
+
}) => ReactElement;
|
112
|
+
type CustomField<Value extends any> = BaseField & {
|
103
113
|
type: "custom";
|
104
|
-
render:
|
105
|
-
field: CustomField<Props>;
|
106
|
-
name: string;
|
107
|
-
id: string;
|
108
|
-
value: Props;
|
109
|
-
onChange: (value: Props) => void;
|
110
|
-
readOnly?: boolean;
|
111
|
-
}) => ReactElement;
|
114
|
+
render: CustomFieldRender<Value>;
|
112
115
|
};
|
113
116
|
type SlotField = BaseField & {
|
114
117
|
type: "slot";
|
118
|
+
allow?: string[];
|
119
|
+
disallow?: string[];
|
115
120
|
};
|
116
121
|
type Field<Props extends any = any> = TextField | NumberField | TextareaField | SelectField | RadioField | ArrayField<Props extends {
|
117
122
|
[key: string]: any;
|
@@ -130,6 +135,10 @@ type FieldProps<F = Field<any>, ValueType = any> = {
|
|
130
135
|
readOnly?: boolean;
|
131
136
|
};
|
132
137
|
|
138
|
+
type Metadata = {
|
139
|
+
[key: string]: any;
|
140
|
+
};
|
141
|
+
|
133
142
|
type ItemWithId = {
|
134
143
|
_arrayId: string;
|
135
144
|
_originalIndex: number;
|