datocms-plugin-sdk 2.0.0 → 2.0.1
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/hooks/renderItemCollectionOutlet.js.map +1 -1
- package/dist/cjs/manifest.js +2373 -2110
- package/dist/cjs/manifest.js.map +1 -1
- package/dist/esm/ctx/base.d.ts +43 -29
- package/dist/esm/hooks/assetSources.d.ts +2 -1
- package/dist/esm/hooks/buildItemPresentationInfo.d.ts +2 -1
- package/dist/esm/hooks/contentAreaSidebarItems.d.ts +2 -1
- package/dist/esm/hooks/customBlockStylesForStructuredTextField.d.ts +2 -2
- package/dist/esm/hooks/customMarksForStructuredTextField.d.ts +2 -2
- package/dist/esm/hooks/executeFieldDropdownAction.d.ts +9 -1
- package/dist/esm/hooks/executeItemFormDropdownAction.d.ts +9 -1
- package/dist/esm/hooks/executeItemsDropdownAction.d.ts +11 -1
- package/dist/esm/hooks/executeUploadsDropdownAction.d.ts +11 -1
- package/dist/esm/hooks/fieldDropdownActions.d.ts +9 -0
- package/dist/esm/hooks/initialLocationQueryForItemSelector.d.ts +2 -1
- package/dist/esm/hooks/itemCollectionOutlets.d.ts +8 -1
- package/dist/esm/hooks/itemFormDropdownActions.d.ts +9 -0
- package/dist/esm/hooks/itemFormOutlets.d.ts +3 -2
- package/dist/esm/hooks/itemFormSidebarPanels.d.ts +2 -1
- package/dist/esm/hooks/itemFormSidebars.d.ts +2 -1
- package/dist/esm/hooks/itemsDropdownActions.d.ts +12 -0
- package/dist/esm/hooks/mainNavigationTabs.d.ts +2 -1
- package/dist/esm/hooks/manualFieldExtensions.d.ts +2 -1
- package/dist/esm/hooks/onBeforeItemUpsert.d.ts +2 -1
- package/dist/esm/hooks/onBeforeItemsDestroy.d.ts +2 -1
- package/dist/esm/hooks/onBeforeItemsPublish.d.ts +2 -1
- package/dist/esm/hooks/onBeforeItemsUnpublish.d.ts +2 -1
- package/dist/esm/hooks/overrideFieldExtensions.d.ts +2 -2
- package/dist/esm/hooks/renderItemCollectionOutlet.d.ts +6 -0
- package/dist/esm/hooks/renderItemCollectionOutlet.js.map +1 -1
- package/dist/esm/hooks/renderItemFormOutlet.d.ts +3 -3
- package/dist/esm/hooks/settingsAreaSidebarItemGroups.d.ts +2 -1
- package/dist/esm/hooks/uploadSidebarPanels.d.ts +2 -1
- package/dist/esm/hooks/uploadSidebars.d.ts +2 -1
- package/dist/esm/hooks/uploadsDropdownActions.d.ts +15 -1
- package/dist/esm/manifest.js +2373 -2110
- package/dist/esm/manifest.js.map +1 -1
- package/dist/esm/manifestTypes.d.ts +117 -22
- package/dist/types/ctx/base.d.ts +43 -29
- package/dist/types/hooks/assetSources.d.ts +2 -1
- package/dist/types/hooks/buildItemPresentationInfo.d.ts +2 -1
- package/dist/types/hooks/contentAreaSidebarItems.d.ts +2 -1
- package/dist/types/hooks/customBlockStylesForStructuredTextField.d.ts +2 -2
- package/dist/types/hooks/customMarksForStructuredTextField.d.ts +2 -2
- package/dist/types/hooks/executeFieldDropdownAction.d.ts +9 -1
- package/dist/types/hooks/executeItemFormDropdownAction.d.ts +9 -1
- package/dist/types/hooks/executeItemsDropdownAction.d.ts +11 -1
- package/dist/types/hooks/executeUploadsDropdownAction.d.ts +11 -1
- package/dist/types/hooks/fieldDropdownActions.d.ts +9 -0
- package/dist/types/hooks/initialLocationQueryForItemSelector.d.ts +2 -1
- package/dist/types/hooks/itemCollectionOutlets.d.ts +8 -1
- package/dist/types/hooks/itemFormDropdownActions.d.ts +9 -0
- package/dist/types/hooks/itemFormOutlets.d.ts +3 -2
- package/dist/types/hooks/itemFormSidebarPanels.d.ts +2 -1
- package/dist/types/hooks/itemFormSidebars.d.ts +2 -1
- package/dist/types/hooks/itemsDropdownActions.d.ts +12 -0
- package/dist/types/hooks/mainNavigationTabs.d.ts +2 -1
- package/dist/types/hooks/manualFieldExtensions.d.ts +2 -1
- package/dist/types/hooks/onBeforeItemUpsert.d.ts +2 -1
- package/dist/types/hooks/onBeforeItemsDestroy.d.ts +2 -1
- package/dist/types/hooks/onBeforeItemsPublish.d.ts +2 -1
- package/dist/types/hooks/onBeforeItemsUnpublish.d.ts +2 -1
- package/dist/types/hooks/overrideFieldExtensions.d.ts +2 -2
- package/dist/types/hooks/renderItemCollectionOutlet.d.ts +6 -0
- package/dist/types/hooks/renderItemFormOutlet.d.ts +3 -3
- package/dist/types/hooks/settingsAreaSidebarItemGroups.d.ts +2 -1
- package/dist/types/hooks/uploadSidebarPanels.d.ts +2 -1
- package/dist/types/hooks/uploadSidebars.d.ts +2 -1
- package/dist/types/hooks/uploadsDropdownActions.d.ts +15 -1
- package/dist/types/manifestTypes.d.ts +117 -22
- package/manifest.json +2283 -2020
- package/package.json +4 -4
- package/src/ctx/base.ts +62 -30
- package/src/hooks/assetSources.ts +3 -1
- package/src/hooks/buildItemPresentationInfo.ts +3 -1
- package/src/hooks/contentAreaSidebarItems.ts +5 -1
- package/src/hooks/customBlockStylesForStructuredTextField.ts +2 -2
- package/src/hooks/customMarksForStructuredTextField.ts +2 -2
- package/src/hooks/executeFieldDropdownAction.ts +7 -0
- package/src/hooks/executeItemFormDropdownAction.ts +7 -0
- package/src/hooks/executeItemsDropdownAction.ts +8 -0
- package/src/hooks/executeUploadsDropdownAction.ts +9 -0
- package/src/hooks/fieldDropdownActions.ts +9 -0
- package/src/hooks/initialLocationQueryForItemSelector.ts +3 -1
- package/src/hooks/itemCollectionOutlets.ts +9 -1
- package/src/hooks/itemFormDropdownActions.ts +9 -0
- package/src/hooks/itemFormOutlets.ts +7 -2
- package/src/hooks/itemFormSidebarPanels.ts +3 -1
- package/src/hooks/itemFormSidebars.ts +6 -1
- package/src/hooks/itemsDropdownActions.ts +12 -0
- package/src/hooks/mainNavigationTabs.ts +3 -1
- package/src/hooks/manualFieldExtensions.ts +5 -1
- package/src/hooks/onBeforeItemUpsert.ts +3 -1
- package/src/hooks/onBeforeItemsDestroy.ts +6 -1
- package/src/hooks/onBeforeItemsPublish.ts +6 -1
- package/src/hooks/onBeforeItemsUnpublish.ts +6 -1
- package/src/hooks/overrideFieldExtensions.ts +2 -2
- package/src/hooks/renderItemCollectionOutlet.ts +6 -0
- package/src/hooks/renderItemFormOutlet.ts +3 -3
- package/src/hooks/settingsAreaSidebarItemGroups.ts +5 -1
- package/src/hooks/uploadSidebarPanels.ts +3 -1
- package/src/hooks/uploadSidebars.ts +3 -1
- package/src/hooks/uploadsDropdownActions.ts +15 -1
- package/src/manifest.ts +2487 -2174
- package/src/manifestTypes.ts +125 -28
package/src/manifestTypes.ts
CHANGED
|
@@ -1,56 +1,153 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type representing a manifest.
|
|
3
|
+
*/
|
|
1
4
|
export type Manifest = {
|
|
5
|
+
/**
|
|
6
|
+
* Hooks and their respective information.
|
|
7
|
+
*/
|
|
2
8
|
hooks: Record<string, HookInfo>;
|
|
9
|
+
/**
|
|
10
|
+
* Base properties and methods available on every context argument.
|
|
11
|
+
*/
|
|
3
12
|
baseCtx: {
|
|
4
|
-
|
|
5
|
-
|
|
13
|
+
/**
|
|
14
|
+
* Properties in the base context.
|
|
15
|
+
*/
|
|
16
|
+
properties: AdditionalPropertiesOrMethodsGroup[];
|
|
17
|
+
/**
|
|
18
|
+
* Methods in the base context.
|
|
19
|
+
*/
|
|
20
|
+
methods: AdditionalPropertiesOrMethodsGroup[];
|
|
6
21
|
};
|
|
7
|
-
|
|
22
|
+
/**
|
|
23
|
+
* Extra properties and methods available on every SelfResizingPluginFrameCtx context argument
|
|
24
|
+
*/
|
|
25
|
+
selfResizingPluginFrameCtxSizingUtilities: AdditionalPropertiesOrMethodsGroup;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Type representing hook information.
|
|
30
|
+
*/
|
|
31
|
+
export type HookInfo = {
|
|
32
|
+
/**
|
|
33
|
+
* Name of the hook.
|
|
34
|
+
*/
|
|
35
|
+
name: string;
|
|
36
|
+
/**
|
|
37
|
+
* JSDoc comment and tag for the hook.
|
|
38
|
+
*/
|
|
39
|
+
comment?: Comment;
|
|
40
|
+
/**
|
|
41
|
+
* Non-context arguments for the hook.
|
|
42
|
+
*/
|
|
43
|
+
nonCtxArguments: NonCtxArgument[];
|
|
44
|
+
/**
|
|
45
|
+
* Context argument for the hook, if any.
|
|
46
|
+
*/
|
|
47
|
+
ctxArgument?: CtxArgument;
|
|
48
|
+
/**
|
|
49
|
+
* Return type of the hook function.
|
|
50
|
+
*/
|
|
51
|
+
returnType: string;
|
|
52
|
+
/**
|
|
53
|
+
* Code location where the hook is defined.
|
|
54
|
+
*/
|
|
55
|
+
location: CodeLocation;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Type representing a code location.
|
|
60
|
+
*/
|
|
61
|
+
export type CodeLocation = {
|
|
62
|
+
/**
|
|
63
|
+
* File path where the code is defined.
|
|
64
|
+
*/
|
|
65
|
+
filePath: string;
|
|
66
|
+
/**
|
|
67
|
+
* Line number in the file where the hook is defined.
|
|
68
|
+
*/
|
|
69
|
+
lineNumber: number;
|
|
8
70
|
};
|
|
9
71
|
|
|
10
72
|
/**
|
|
11
73
|
* Type alias for additional parameters or methods in context.
|
|
12
74
|
*/
|
|
13
75
|
export type AdditionalPropertyOrMethod = {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
76
|
+
/**
|
|
77
|
+
* Description of the parameter or method.
|
|
78
|
+
*/
|
|
79
|
+
comment?: Comment;
|
|
80
|
+
/**
|
|
81
|
+
* Code location where the parameter or method is defined.
|
|
82
|
+
*/
|
|
83
|
+
location: CodeLocation;
|
|
84
|
+
/**
|
|
85
|
+
* Type of the parameter or method.
|
|
86
|
+
*/
|
|
87
|
+
type: string;
|
|
20
88
|
};
|
|
21
89
|
|
|
22
|
-
export type
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
90
|
+
export type AdditionalPropertiesOrMethodsGroup = {
|
|
91
|
+
/**
|
|
92
|
+
* Name of the group
|
|
93
|
+
*/
|
|
94
|
+
name?: string;
|
|
95
|
+
/**
|
|
96
|
+
* Description of the group
|
|
97
|
+
*/
|
|
98
|
+
comment?: Comment;
|
|
99
|
+
/**
|
|
100
|
+
* Type of the parameter or method.
|
|
101
|
+
*/
|
|
102
|
+
items: Record<string, AdditionalPropertyOrMethod>;
|
|
103
|
+
};
|
|
26
104
|
|
|
27
105
|
/**
|
|
28
106
|
* Type alias for the context argument extracted from hook type.
|
|
29
107
|
*/
|
|
30
108
|
export type CtxArgument = {
|
|
109
|
+
/**
|
|
110
|
+
* Type of the context argument.
|
|
111
|
+
*/
|
|
31
112
|
type: string;
|
|
32
|
-
|
|
33
|
-
|
|
113
|
+
/**
|
|
114
|
+
* Additional properties in the context argument, if any.
|
|
115
|
+
*/
|
|
116
|
+
additionalProperties?: AdditionalPropertiesOrMethodsGroup[];
|
|
117
|
+
/**
|
|
118
|
+
* Additional methods in the context argument, if any.
|
|
119
|
+
*/
|
|
120
|
+
additionalMethods?: AdditionalPropertiesOrMethodsGroup[];
|
|
34
121
|
};
|
|
35
122
|
|
|
36
123
|
/**
|
|
37
124
|
* Type alias for non-context arguments.
|
|
38
125
|
*/
|
|
39
126
|
export type NonCtxArgument = {
|
|
127
|
+
/**
|
|
128
|
+
* Name of the non-context argument.
|
|
129
|
+
*/
|
|
40
130
|
name: string;
|
|
131
|
+
/**
|
|
132
|
+
* Type name of the non-context argument.
|
|
133
|
+
*/
|
|
41
134
|
typeName: string;
|
|
42
135
|
};
|
|
43
136
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
137
|
+
/**
|
|
138
|
+
* Type representing a comment.
|
|
139
|
+
*/
|
|
140
|
+
export type Comment = {
|
|
141
|
+
/**
|
|
142
|
+
* The comment itself.
|
|
143
|
+
*/
|
|
144
|
+
comment: string;
|
|
145
|
+
/**
|
|
146
|
+
* JSDoc tag for the comment, if any.
|
|
147
|
+
*/
|
|
148
|
+
tag?: string;
|
|
149
|
+
/**
|
|
150
|
+
* Example or example code for the comment, if any.
|
|
151
|
+
*/
|
|
152
|
+
example?: string;
|
|
153
|
+
};
|