@measured/puck-plugin-heading-analyzer 0.19.0-canary.b9add22 → 0.19.0-canary.c79f5db8

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 CHANGED
@@ -31,4 +31,4 @@ export function Page() {
31
31
 
32
32
  ## License
33
33
 
34
- MIT © [Measured Corporation Ltd](https://measured.co)
34
+ MIT © [The Puck Contributors](https://github.com/measuredco/puck/graphs/contributors)
package/dist/index.d.mts CHANGED
@@ -12,17 +12,23 @@ type FieldOption = {
12
12
  type FieldOptions = Array<FieldOption> | ReadonlyArray<FieldOption>;
13
13
  type BaseField = {
14
14
  label?: string;
15
+ labelIcon?: ReactElement;
16
+ metadata?: Metadata;
15
17
  };
16
18
  type TextField = BaseField & {
17
19
  type: "text";
20
+ placeholder?: string;
18
21
  };
19
22
  type NumberField = BaseField & {
20
23
  type: "number";
24
+ placeholder?: string;
21
25
  min?: number;
22
26
  max?: number;
27
+ step?: number;
23
28
  };
24
29
  type TextareaField = BaseField & {
25
30
  type: "textarea";
31
+ placeholder?: string;
26
32
  };
27
33
  type SelectField = BaseField & {
28
34
  type: "select";
@@ -105,6 +111,11 @@ type CustomField<Props extends any = {}> = BaseField & {
105
111
  readOnly?: boolean;
106
112
  }) => ReactElement;
107
113
  };
114
+ type SlotField = BaseField & {
115
+ type: "slot";
116
+ allow?: string[];
117
+ disallow?: string[];
118
+ };
108
119
  type Field<Props extends any = any> = TextField | NumberField | TextareaField | SelectField | RadioField | ArrayField<Props extends {
109
120
  [key: string]: any;
110
121
  } ? Props : any> | ObjectField<Props extends {
@@ -113,7 +124,7 @@ type Field<Props extends any = any> = TextField | NumberField | TextareaField |
113
124
  [key: string]: any;
114
125
  } ? Props : any> | ExternalFieldWithAdaptor<Props extends {
115
126
  [key: string]: any;
116
- } ? Props : any> | CustomField<Props>;
127
+ } ? Props : any> | CustomField<Props> | SlotField;
117
128
  type FieldProps<F = Field<any>, ValueType = any> = {
118
129
  field: F;
119
130
  value: ValueType;
@@ -122,6 +133,10 @@ type FieldProps<F = Field<any>, ValueType = any> = {
122
133
  readOnly?: boolean;
123
134
  };
124
135
 
136
+ type Metadata = {
137
+ [key: string]: any;
138
+ };
139
+
125
140
  type ItemWithId = {
126
141
  _arrayId: string;
127
142
  _originalIndex: number;
package/dist/index.d.ts CHANGED
@@ -12,17 +12,23 @@ type FieldOption = {
12
12
  type FieldOptions = Array<FieldOption> | ReadonlyArray<FieldOption>;
13
13
  type BaseField = {
14
14
  label?: string;
15
+ labelIcon?: ReactElement;
16
+ metadata?: Metadata;
15
17
  };
16
18
  type TextField = BaseField & {
17
19
  type: "text";
20
+ placeholder?: string;
18
21
  };
19
22
  type NumberField = BaseField & {
20
23
  type: "number";
24
+ placeholder?: string;
21
25
  min?: number;
22
26
  max?: number;
27
+ step?: number;
23
28
  };
24
29
  type TextareaField = BaseField & {
25
30
  type: "textarea";
31
+ placeholder?: string;
26
32
  };
27
33
  type SelectField = BaseField & {
28
34
  type: "select";
@@ -105,6 +111,11 @@ type CustomField<Props extends any = {}> = BaseField & {
105
111
  readOnly?: boolean;
106
112
  }) => ReactElement;
107
113
  };
114
+ type SlotField = BaseField & {
115
+ type: "slot";
116
+ allow?: string[];
117
+ disallow?: string[];
118
+ };
108
119
  type Field<Props extends any = any> = TextField | NumberField | TextareaField | SelectField | RadioField | ArrayField<Props extends {
109
120
  [key: string]: any;
110
121
  } ? Props : any> | ObjectField<Props extends {
@@ -113,7 +124,7 @@ type Field<Props extends any = any> = TextField | NumberField | TextareaField |
113
124
  [key: string]: any;
114
125
  } ? Props : any> | ExternalFieldWithAdaptor<Props extends {
115
126
  [key: string]: any;
116
- } ? Props : any> | CustomField<Props>;
127
+ } ? Props : any> | CustomField<Props> | SlotField;
117
128
  type FieldProps<F = Field<any>, ValueType = any> = {
118
129
  field: F;
119
130
  value: ValueType;
@@ -122,6 +133,10 @@ type FieldProps<F = Field<any>, ValueType = any> = {
122
133
  readOnly?: boolean;
123
134
  };
124
135
 
136
+ type Metadata = {
137
+ [key: string]: any;
138
+ };
139
+
125
140
  type ItemWithId = {
126
141
  _arrayId: string;
127
142
  _originalIndex: number;