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