datocms-plugin-sdk 2.0.1 → 2.0.3

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.
Files changed (40) hide show
  1. package/dist/cjs/manifest.js +376 -303
  2. package/dist/cjs/manifest.js.map +1 -1
  3. package/dist/esm/ctx/base.d.ts +1 -1
  4. package/dist/esm/ctx/commonExtras/field.d.ts +4 -0
  5. package/dist/esm/ctx/commonExtras/itemForm.d.ts +14 -12
  6. package/dist/esm/ctx/commonExtras/sizing.d.ts +1 -0
  7. package/dist/esm/hooks/renderItemFormSidebar.d.ts +1 -1
  8. package/dist/esm/hooks/renderItemFormSidebarPanel.d.ts +1 -1
  9. package/dist/esm/hooks/renderManualFieldExtensionConfigScreen.d.ts +2 -2
  10. package/dist/esm/hooks/renderModal.d.ts +1 -1
  11. package/dist/esm/hooks/renderUploadSidebar.d.ts +1 -1
  12. package/dist/esm/hooks/renderUploadSidebarPanel.d.ts +1 -1
  13. package/dist/esm/manifest.js +376 -303
  14. package/dist/esm/manifest.js.map +1 -1
  15. package/dist/esm/manifestTypes.d.ts +39 -91
  16. package/dist/types/ctx/base.d.ts +1 -1
  17. package/dist/types/ctx/commonExtras/field.d.ts +4 -0
  18. package/dist/types/ctx/commonExtras/itemForm.d.ts +14 -12
  19. package/dist/types/ctx/commonExtras/sizing.d.ts +1 -0
  20. package/dist/types/hooks/renderItemFormSidebar.d.ts +1 -1
  21. package/dist/types/hooks/renderItemFormSidebarPanel.d.ts +1 -1
  22. package/dist/types/hooks/renderManualFieldExtensionConfigScreen.d.ts +2 -2
  23. package/dist/types/hooks/renderModal.d.ts +1 -1
  24. package/dist/types/hooks/renderUploadSidebar.d.ts +1 -1
  25. package/dist/types/hooks/renderUploadSidebarPanel.d.ts +1 -1
  26. package/dist/types/manifestTypes.d.ts +39 -91
  27. package/manifest.json +376 -303
  28. package/package.json +2 -2
  29. package/src/ctx/base.ts +1 -1
  30. package/src/ctx/commonExtras/field.ts +4 -0
  31. package/src/ctx/commonExtras/itemForm.ts +15 -12
  32. package/src/ctx/commonExtras/sizing.ts +1 -0
  33. package/src/hooks/renderItemFormSidebar.ts +1 -1
  34. package/src/hooks/renderItemFormSidebarPanel.ts +1 -1
  35. package/src/hooks/renderManualFieldExtensionConfigScreen.ts +2 -2
  36. package/src/hooks/renderModal.ts +1 -1
  37. package/src/hooks/renderUploadSidebar.ts +1 -1
  38. package/src/hooks/renderUploadSidebarPanel.ts +1 -1
  39. package/src/manifest.ts +533 -401
  40. package/src/manifestTypes.ts +39 -91
@@ -2,145 +2,93 @@
2
2
  * Type representing a manifest.
3
3
  */
4
4
  export type Manifest = {
5
- /**
6
- * Hooks and their respective information.
7
- */
5
+ /** Hooks and their respective information. */
8
6
  hooks: Record<string, HookInfo>;
9
- /**
10
- * Base properties and methods available on every context argument.
11
- */
7
+ /** Base properties and methods available on every context argument. */
12
8
  baseCtx: {
13
- /**
14
- * Properties in the base context.
15
- */
16
- properties: AdditionalPropertiesOrMethodsGroup[];
17
- /**
18
- * Methods in the base context.
19
- */
20
- methods: AdditionalPropertiesOrMethodsGroup[];
9
+ /** Properties in the base context. */
10
+ properties: PropertiesOrMethodsGroup[];
11
+ /** Methods in the base context. */
12
+ methods: PropertiesOrMethodsGroup[];
21
13
  };
22
- /**
23
- * Extra properties and methods available on every SelfResizingPluginFrameCtx context argument
24
- */
25
- selfResizingPluginFrameCtxSizingUtilities: AdditionalPropertiesOrMethodsGroup;
14
+ /** Extra properties and methods available on every SelfResizingPluginFrameCtx context argument */
15
+ selfResizingPluginFrameCtxSizingUtilities: PropertiesOrMethodsGroup;
26
16
  };
27
17
  /**
28
18
  * Type representing hook information.
29
19
  */
30
20
  export type HookInfo = {
31
- /**
32
- * Name of the hook.
33
- */
21
+ /** Name of the hook. */
34
22
  name: string;
35
- /**
36
- * JSDoc comment and tag for the hook.
37
- */
23
+ /** JSDoc comment and tag for the hook. */
38
24
  comment?: Comment;
39
- /**
40
- * Non-context arguments for the hook.
41
- */
25
+ /** Non-context arguments for the hook. */
42
26
  nonCtxArguments: NonCtxArgument[];
43
- /**
44
- * Context argument for the hook, if any.
45
- */
27
+ /** Context argument for the hook, if any. */
46
28
  ctxArgument?: CtxArgument;
47
- /**
48
- * Return type of the hook function.
49
- */
29
+ /** Return type of the hook function. */
50
30
  returnType: string;
51
- /**
52
- * Code location where the hook is defined.
53
- */
31
+ /** Code location where the hook is defined. */
54
32
  location: CodeLocation;
55
33
  };
56
34
  /**
57
35
  * Type representing a code location.
58
36
  */
59
37
  export type CodeLocation = {
60
- /**
61
- * File path where the code is defined.
62
- */
38
+ /** File path where the code is defined. */
63
39
  filePath: string;
64
- /**
65
- * Line number in the file where the hook is defined.
66
- */
40
+ /** Line number in the file where the hook is defined. */
67
41
  lineNumber: number;
68
42
  };
69
43
  /**
70
- * Type alias for additional parameters or methods in context.
44
+ * Type alias for parameter or method in context.
71
45
  */
72
- export type AdditionalPropertyOrMethod = {
73
- /**
74
- * Description of the parameter or method.
75
- */
46
+ export type PropertyOrMethod = {
47
+ /** Description of the parameter or method. */
76
48
  comment?: Comment;
77
- /**
78
- * Code location where the parameter or method is defined.
79
- */
49
+ /** Code location where the parameter or method is defined. */
80
50
  location: CodeLocation;
81
- /**
82
- * Type of the parameter or method.
83
- */
51
+ /** Type of the parameter or method. */
84
52
  type: string;
85
53
  };
86
- export type AdditionalPropertiesOrMethodsGroup = {
87
- /**
88
- * Name of the group
89
- */
54
+ export type PropertiesOrMethodsGroup = {
55
+ /** Name of the group */
90
56
  name?: string;
91
- /**
92
- * Description of the group
93
- */
57
+ /** Description of the group */
94
58
  comment?: Comment;
95
- /**
96
- * Type of the parameter or method.
97
- */
98
- items: Record<string, AdditionalPropertyOrMethod>;
59
+ /** Type of the parameter or method. */
60
+ items: Record<string, PropertyOrMethod>;
99
61
  };
100
62
  /**
101
63
  * Type alias for the context argument extracted from hook type.
102
64
  */
103
65
  export type CtxArgument = {
104
- /**
105
- * Type of the context argument.
106
- */
66
+ /** Type of the context argument. */
107
67
  type: string;
108
- /**
109
- * Additional properties in the context argument, if any.
110
- */
111
- additionalProperties?: AdditionalPropertiesOrMethodsGroup[];
112
- /**
113
- * Additional methods in the context argument, if any.
114
- */
115
- additionalMethods?: AdditionalPropertiesOrMethodsGroup[];
68
+ /** Additional properties in the context argument, if any. */
69
+ additionalProperties?: PropertiesOrMethodsGroup[];
70
+ /** Additional methods in the context argument, if any. */
71
+ additionalMethods?: PropertiesOrMethodsGroup[];
116
72
  };
117
73
  /**
118
74
  * Type alias for non-context arguments.
119
75
  */
120
76
  export type NonCtxArgument = {
121
- /**
122
- * Name of the non-context argument.
123
- */
77
+ /** Name of the non-context argument. */
124
78
  name: string;
125
- /**
126
- * Type name of the non-context argument.
127
- */
79
+ /** Type name of the non-context argument. */
128
80
  typeName: string;
129
81
  };
130
82
  /**
131
83
  * Type representing a comment.
132
84
  */
133
85
  export type Comment = {
134
- /**
135
- * The comment itself.
136
- */
137
- comment: string;
138
- /**
139
- * JSDoc tag for the comment, if any.
140
- */
86
+ /** The comment itself. */
87
+ markdownText: string;
88
+ /** JSDoc tag, if any. */
141
89
  tag?: string;
142
- /**
143
- * Example or example code for the comment, if any.
144
- */
90
+ /** Example or example code, if any. */
145
91
  example?: string;
92
+ /** Info about deprecation, if any. */
93
+ deprecatedMarkdownText?: string;
146
94
  };