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
|
@@ -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
|
-
|
|
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
|
* 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
|
|
44
|
+
* Type alias for parameter or method in context.
|
|
71
45
|
*/
|
|
72
|
-
export type
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
110
|
-
|
|
111
|
-
|
|
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
|
-
|
|
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
|
};
|