@puckeditor/field-contentful 0.23.0 → 0.24.0-canary.03e660bb

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) The Puck Contributors.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/dist/index.d.mts CHANGED
@@ -218,6 +218,10 @@ interface RadioField extends BaseField {
218
218
  type: "radio";
219
219
  options: FieldOptions;
220
220
  }
221
+ interface CheckboxField extends BaseField {
222
+ type: "checkbox";
223
+ options: FieldOptions;
224
+ }
221
225
  interface RichtextField<UserSelector extends RichTextSelector = RichTextSelector> extends BaseField {
222
226
  type: "richtext";
223
227
  contentEditable?: boolean;
@@ -260,6 +264,7 @@ interface ObjectField<Props extends any = {
260
264
  [key: string]: any;
261
265
  }, UserField extends {} = {}> extends BaseField {
262
266
  type: "object";
267
+ expandable?: boolean;
263
268
  objectFields: {
264
269
  [SubPropName in keyof Props]: UserField extends {
265
270
  type: PropertyKey;
@@ -324,7 +329,7 @@ interface SlotField extends BaseField {
324
329
  allow?: string[];
325
330
  disallow?: string[];
326
331
  }
327
- type Field<ValueType = any, UserField extends {} = {}> = TextField | RichtextField | NumberField | TextareaField | SelectField | RadioField | ArrayField<ValueType extends {
332
+ type Field<ValueType = any, UserField extends {} = {}> = TextField | RichtextField | NumberField | TextareaField | SelectField | RadioField | CheckboxField | ArrayField<ValueType extends {
328
333
  [key: string]: any;
329
334
  }[] ? ValueType : never, UserField> | ObjectField<ValueType, UserField> | ExternalField<ValueType> | ExternalFieldWithAdaptor<ValueType> | CustomField<ValueType> | SlotField;
330
335
 
@@ -369,6 +374,7 @@ type UiState = {
369
374
  controlsVisible: boolean;
370
375
  options: Viewport[];
371
376
  };
377
+ expandedFieldGroups: Record<string, boolean>;
372
378
  field: {
373
379
  focus?: string | null;
374
380
  metadata?: Record<string, any>;
package/dist/index.d.ts CHANGED
@@ -218,6 +218,10 @@ interface RadioField extends BaseField {
218
218
  type: "radio";
219
219
  options: FieldOptions;
220
220
  }
221
+ interface CheckboxField extends BaseField {
222
+ type: "checkbox";
223
+ options: FieldOptions;
224
+ }
221
225
  interface RichtextField<UserSelector extends RichTextSelector = RichTextSelector> extends BaseField {
222
226
  type: "richtext";
223
227
  contentEditable?: boolean;
@@ -260,6 +264,7 @@ interface ObjectField<Props extends any = {
260
264
  [key: string]: any;
261
265
  }, UserField extends {} = {}> extends BaseField {
262
266
  type: "object";
267
+ expandable?: boolean;
263
268
  objectFields: {
264
269
  [SubPropName in keyof Props]: UserField extends {
265
270
  type: PropertyKey;
@@ -324,7 +329,7 @@ interface SlotField extends BaseField {
324
329
  allow?: string[];
325
330
  disallow?: string[];
326
331
  }
327
- type Field<ValueType = any, UserField extends {} = {}> = TextField | RichtextField | NumberField | TextareaField | SelectField | RadioField | ArrayField<ValueType extends {
332
+ type Field<ValueType = any, UserField extends {} = {}> = TextField | RichtextField | NumberField | TextareaField | SelectField | RadioField | CheckboxField | ArrayField<ValueType extends {
328
333
  [key: string]: any;
329
334
  }[] ? ValueType : never, UserField> | ObjectField<ValueType, UserField> | ExternalField<ValueType> | ExternalFieldWithAdaptor<ValueType> | CustomField<ValueType> | SlotField;
330
335
 
@@ -369,6 +374,7 @@ type UiState = {
369
374
  controlsVisible: boolean;
370
375
  options: Viewport[];
371
376
  };
377
+ expandedFieldGroups: Record<string, boolean>;
372
378
  field: {
373
379
  focus?: string | null;
374
380
  metadata?: Record<string, any>;
package/package.json CHANGED
@@ -1,8 +1,11 @@
1
1
  {
2
2
  "name": "@puckeditor/field-contentful",
3
- "version": "0.23.0",
3
+ "version": "0.24.0-canary.03e660bb",
4
4
  "author": "Chris Villa <chris@puckeditor.com>",
5
- "repository": "puckeditor/puck",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "puckeditor/puck"
8
+ },
6
9
  "bugs": "https://github.com/puckeditor/puck/issues",
7
10
  "homepage": "https://puckeditor.com",
8
11
  "private": false,
@@ -13,27 +16,27 @@
13
16
  "types": "./dist/index.d.ts"
14
17
  },
15
18
  "license": "MIT",
16
- "scripts": {
17
- "lint": "eslint \"**/*.ts*\"",
18
- "build": "rm -rf dist && tsup index.ts",
19
- "prepare": "yarn build"
20
- },
21
19
  "files": [
22
20
  "dist"
23
21
  ],
24
22
  "devDependencies": {
25
- "@puckeditor/core": "^0.23.0",
23
+ "@puckeditor/core": "^0.24.0-canary.03e660bb",
26
24
  "@types/react": "^19.2.7",
27
25
  "@types/react-dom": "^19.2.3",
28
26
  "contentful": "^10.8.6",
29
27
  "eslint": "^9.0.0",
30
- "eslint-config-custom": "*",
31
- "tsconfig": "*",
32
- "tsup-config": "*",
28
+ "eslint-config-custom": "0.0.0",
29
+ "tsconfig": "0.0.0",
30
+ "tsup": "^8.2.4",
31
+ "tsup-config": "0.0.0",
33
32
  "typescript": "^5.5.4"
34
33
  },
35
34
  "peerDependencies": {
36
35
  "contentful": "^10.0.0",
37
36
  "react": "^17.0.0 || ^18.0.0 || ^19.0.0"
37
+ },
38
+ "scripts": {
39
+ "lint": "eslint \"**/*.ts*\"",
40
+ "build": "rm -rf dist && tsup index.ts"
38
41
  }
39
- }
42
+ }