datocms-plugin-sdk 2.0.1 → 2.0.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "datocms-plugin-sdk",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "description": "DatoCMS Plugin SDK",
5
5
  "keywords": [
6
6
  "datocms",
@@ -45,5 +45,5 @@
45
45
  "glob": "^11.0.0",
46
46
  "typescript": "^5.6.2"
47
47
  },
48
- "gitHead": "8db42fb5778d563908adb0e06c334f49bb207cd4"
48
+ "gitHead": "ba6263cc54345109ef3a4d4e60726e49888a70b2"
49
49
  }
@@ -3,6 +3,10 @@ import type { SchemaTypes } from '@datocms/cma-client';
3
3
  type Field = SchemaTypes.Field;
4
4
  type ItemType = SchemaTypes.ItemType;
5
5
 
6
+ /**
7
+ * These information describe the current state of the field where this plugin
8
+ * is applied to.
9
+ */
6
10
  export type FieldAdditionalProperties = {
7
11
  /** Whether the field is currently disabled or not */
8
12
  disabled: boolean;
@@ -25,19 +25,22 @@ export type ItemFormAdditionalProperties = {
25
25
  isSubmitting: boolean;
26
26
  /** Whether the form has some non-persisted changes or not */
27
27
  isFormDirty: boolean;
28
- /** Current number of blocks present in form state */
29
- blocksAnalysis: {
30
- usage: {
31
- /** Total number of blocks present in form state */
32
- total: number;
33
- /** Total number of blocks present in non-localized fields */
34
- nonLocalized: number;
35
- /** Total number of blocks present in localized fields, per locale */
36
- perLocale: Record<string, number>;
37
- };
38
- /** Maximum number of blocks per item */
39
- maximumPerItem: number;
28
+ /** Provides information on how many blocks are currently present in the form */
29
+ blocksAnalysis: BlocksAnalysis;
30
+ };
31
+
32
+ /** Current number of blocks present in form state */
33
+ export type BlocksAnalysis = {
34
+ usage: {
35
+ /** Total number of blocks present in form state */
36
+ total: number;
37
+ /** Total number of blocks present in non-localized fields */
38
+ nonLocalized: number;
39
+ /** Total number of blocks present in localized fields, per locale */
40
+ perLocale: Record<string, number>;
40
41
  };
42
+ /** Maximum number of blocks per item */
43
+ maximumPerItem: number;
41
44
  };
42
45
 
43
46
  /**
@@ -1,3 +1,4 @@
1
+ /** A number of methods that you can use to control the size of the plugin frame */
1
2
  export type SizingUtilities = {
2
3
  /**
3
4
  * Listens for DOM changes and automatically calls `setHeight` when it detects