datocms-plugin-sdk 0.3.34 → 0.5.0-alpha.0

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.
@@ -111,7 +111,7 @@ var buildRenderUtils = function (parent) {
111
111
  function connect(configuration) {
112
112
  if (configuration === void 0) { configuration = {}; }
113
113
  return __awaiter(this, void 0, void 0, function () {
114
- var assetSources, mainNavigationTabs, settingsAreaSidebarItemGroups, contentAreaSidebarItems, manualFieldExtensions, itemFormSidebarPanels, listener, penpalConnection, parent, initialSettings, render, render, renderUtils_1, render, renderUtils_2, render, renderUtils_3, render, renderUtils_4, render, renderUtils_5, render, renderUtils_6, render;
114
+ var assetSources, mainNavigationTabs, settingsAreaSidebarItemGroups, contentAreaSidebarItems, manualFieldExtensions, itemFormSidebarPanels, listener, penpalConnection, parent, initialSettings, render, render, renderUtils_1, render, renderUtils_2, render, renderUtils_3, render, renderUtils_4, render, renderUtils_5, render, renderUtils_6, render, renderUtils_7, render;
115
115
  return __generator(this, function (_a) {
116
116
  switch (_a.label) {
117
117
  case 0:
@@ -136,6 +136,8 @@ function connect(configuration) {
136
136
  manualFieldExtensions: manualFieldExtensions,
137
137
  itemFormSidebarPanels: itemFormSidebarPanels,
138
138
  overrideFieldExtensions: toMultifield(configuration.overrideFieldExtensions),
139
+ customMarksForStructuredTextField: toMultifield(configuration.customMarksForStructuredTextField),
140
+ customBlockStylesForStructuredTextField: toMultifield(configuration.customBlockStylesForStructuredTextField),
139
141
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
140
142
  onChange: function (newSettings) {
141
143
  if (listener) {
@@ -206,7 +208,7 @@ function connect(configuration) {
206
208
  listener = render;
207
209
  render(initialSettings);
208
210
  }
209
- if ((0, guards_1.isRenderSidebarPaneParent)(parent, initialSettings)) {
211
+ if ((0, guards_1.isRenderSidebarPanelParent)(parent, initialSettings)) {
210
212
  renderUtils_4 = buildRenderUtils(parent);
211
213
  render = function (settings) {
212
214
  if (!configuration.renderItemFormSidebarPanel) {
@@ -217,24 +219,35 @@ function connect(configuration) {
217
219
  listener = render;
218
220
  render(initialSettings);
219
221
  }
220
- if ((0, guards_1.isRenderFieldExtensionParent)(parent, initialSettings)) {
222
+ if ((0, guards_1.isRenderItemFormOutletParent)(parent, initialSettings)) {
221
223
  renderUtils_5 = buildRenderUtils(parent);
224
+ render = function (settings) {
225
+ if (!configuration.renderItemFormOutlet) {
226
+ return;
227
+ }
228
+ configuration.renderItemFormOutlet(settings.itemFormOutletId, __assign(__assign(__assign({}, parent), settings), renderUtils_5));
229
+ };
230
+ listener = render;
231
+ render(initialSettings);
232
+ }
233
+ if ((0, guards_1.isRenderFieldExtensionParent)(parent, initialSettings)) {
234
+ renderUtils_6 = buildRenderUtils(parent);
222
235
  render = function (settings) {
223
236
  if (!configuration.renderFieldExtension) {
224
237
  return;
225
238
  }
226
- configuration.renderFieldExtension(settings.fieldExtensionId, __assign(__assign(__assign({}, parent), settings), renderUtils_5));
239
+ configuration.renderFieldExtension(settings.fieldExtensionId, __assign(__assign(__assign({}, parent), settings), renderUtils_6));
227
240
  };
228
241
  listener = render;
229
242
  render(initialSettings);
230
243
  }
231
244
  if ((0, guards_1.isRenderManualFieldExtensionConfigScreenParent)(parent, initialSettings)) {
232
- renderUtils_6 = buildRenderUtils(parent);
245
+ renderUtils_7 = buildRenderUtils(parent);
233
246
  render = function (settings) {
234
247
  if (!configuration.renderManualFieldExtensionConfigScreen) {
235
248
  return;
236
249
  }
237
- configuration.renderManualFieldExtensionConfigScreen(settings.fieldExtensionId, __assign(__assign(__assign({}, parent), settings), renderUtils_6));
250
+ configuration.renderManualFieldExtensionConfigScreen(settings.fieldExtensionId, __assign(__assign(__assign({}, parent), settings), renderUtils_7));
238
251
  };
239
252
  listener = render;
240
253
  render(initialSettings);
@@ -1 +1 @@
1
- {"version":3,"file":"connect.js","sourceRoot":"","sources":["../../src/connect.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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", { value: true });
3
- exports.isRenderAssetSourceParent = exports.isRenderManualFieldExtensionConfigScreenParent = exports.isRenderFieldExtensionParent = exports.isRenderSidebarPaneParent = exports.isRenderModalParent = exports.isRenderConfigScreenParent = exports.isRenderPageParent = exports.isOnBootParent = exports.isInitParent = void 0;
3
+ exports.isRenderAssetSourceParent = exports.isRenderManualFieldExtensionConfigScreenParent = exports.isRenderFieldExtensionParent = exports.isRenderItemFormOutletParent = exports.isRenderSidebarPanelParent = exports.isRenderModalParent = exports.isRenderConfigScreenParent = exports.isRenderPageParent = exports.isOnBootParent = exports.isInitParent = void 0;
4
4
  function buildGuard(mode) {
5
5
  return function (parent, settings) {
6
6
  return settings.mode === mode;
@@ -11,7 +11,8 @@ exports.isOnBootParent = buildGuard('onBoot');
11
11
  exports.isRenderPageParent = buildGuard('renderPage');
12
12
  exports.isRenderConfigScreenParent = buildGuard('renderConfigScreen');
13
13
  exports.isRenderModalParent = buildGuard('renderModal');
14
- exports.isRenderSidebarPaneParent = buildGuard('renderItemFormSidebarPanel');
14
+ exports.isRenderSidebarPanelParent = buildGuard('renderItemFormSidebarPanel');
15
+ exports.isRenderItemFormOutletParent = buildGuard('renderItemFormOutlet');
15
16
  exports.isRenderFieldExtensionParent = buildGuard('renderFieldExtension');
16
17
  exports.isRenderManualFieldExtensionConfigScreenParent = buildGuard('renderManualFieldExtensionConfigScreen');
17
18
  exports.isRenderAssetSourceParent = buildGuard('renderAssetSource');
@@ -1 +1 @@
1
- {"version":3,"file":"guards.js","sourceRoot":"","sources":["../../src/guards.ts"],"names":[],"mappings":";;;AAcA,SAAS,UAAU,CAAmB,IAAY;IAChD,OAAO,UAAC,MAAc,EAAE,QAA0B;QAChD,OAAA,QAAQ,CAAC,IAAI,KAAK,IAAI;IAAtB,CAAsB,CAAC;AAC3B,CAAC;AAEY,QAAA,YAAY,GAAG,UAAU,CAAc,MAAM,CAAC,CAAC;AAE/C,QAAA,cAAc,GAAG,UAAU,CAAgB,QAAQ,CAAC,CAA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
1
1
  import { Field, ModelBlock } from './SiteApiSchema';
2
- import { AssetSource, ContentAreaSidebarItem, FieldExtensionOverride, InitPropertiesAndMethods, ItemFormSidebarPanel, MainNavigationTab, ManualFieldExtension, OnBootPropertiesAndMethods, RenderAssetSourcePropertiesAndMethods, RenderConfigScreenPropertiesAndMethods, RenderFieldExtensionPropertiesAndMethods, RenderManualFieldExtensionConfigScreenPropertiesAndMethods, RenderModalPropertiesAndMethods, RenderPagePropertiesAndMethods, RenderSidebarPanePropertiesAndMethods, SettingsAreaSidebarItemGroup } from './types';
2
+ import { AssetSource, ContentAreaSidebarItem, FieldExtensionOverride, InitPropertiesAndMethods, ItemFormSidebarPanel, MainNavigationTab, ManualFieldExtension, OnBootPropertiesAndMethods, RenderAssetSourcePropertiesAndMethods, RenderConfigScreenPropertiesAndMethods, RenderFieldExtensionPropertiesAndMethods, RenderManualFieldExtensionConfigScreenPropertiesAndMethods, RenderModalPropertiesAndMethods, RenderPagePropertiesAndMethods, RenderSidebarPanelPropertiesAndMethods, SettingsAreaSidebarItemGroup } from './types';
3
+ import { ItemFormOutlet, RenderItemFormOutletPropertiesAndMethods, StructuredTextCustomBlockStyle, StructuredTextCustomMark } from '.';
3
4
  export declare type SizingUtilities = {
4
5
  /**
5
6
  * Listens for DOM changes and automatically calls `setHeight` when it detects
@@ -25,7 +26,8 @@ export declare type FieldIntentCtx = InitPropertiesAndMethods & {
25
26
  export declare type RenderPageCtx = RenderPagePropertiesAndMethods;
26
27
  export declare type RenderModalCtx = RenderModalPropertiesAndMethods & SizingUtilities;
27
28
  export declare type RenderAssetSourceCtx = RenderAssetSourcePropertiesAndMethods & SizingUtilities;
28
- export declare type RenderItemFormSidebarPanelCtx = RenderSidebarPanePropertiesAndMethods & SizingUtilities;
29
+ export declare type RenderItemFormSidebarPanelCtx = RenderSidebarPanelPropertiesAndMethods & SizingUtilities;
30
+ export declare type RenderItemFormOutletCtx = RenderItemFormOutletPropertiesAndMethods & SizingUtilities;
29
31
  export declare type RenderFieldExtensionCtx = RenderFieldExtensionPropertiesAndMethods & SizingUtilities;
30
32
  export declare type RenderManualFieldExtensionConfigScreenCtx = RenderManualFieldExtensionConfigScreenPropertiesAndMethods & SizingUtilities;
31
33
  export declare type RenderConfigScreenCtx = RenderConfigScreenPropertiesAndMethods & SizingUtilities;
@@ -77,6 +79,13 @@ export declare type FullConnectParameters = {
77
79
  * @group sidebarPanels
78
80
  */
79
81
  itemFormSidebarPanels: (itemType: ModelBlock, ctx: IntentCtx) => ItemFormSidebarPanel[];
82
+ /**
83
+ * Use this function to declare custom outlets to be shown at the top of the
84
+ * record's editing page
85
+ *
86
+ * @group sidebarPanels
87
+ */
88
+ itemFormOutlets: (itemType: ModelBlock, ctx: IntentCtx) => ItemFormOutlet[];
80
89
  /**
81
90
  * Use this function to automatically force one or more field extensions to a
82
91
  * particular field
@@ -84,6 +93,20 @@ export declare type FullConnectParameters = {
84
93
  * @group forcedFieldExtensions
85
94
  */
86
95
  overrideFieldExtensions: (field: Field, ctx: FieldIntentCtx) => FieldExtensionOverride | void;
96
+ /**
97
+ * Use this function to define a number of custom marks for a specific
98
+ * Structured Text field
99
+ *
100
+ * @group structuredText
101
+ */
102
+ customMarksForStructuredTextField: (field: Field, ctx: FieldIntentCtx) => StructuredTextCustomMark[] | void;
103
+ /**
104
+ * Use this function to define a number of custom block styles for a specific
105
+ * Structured Text field
106
+ *
107
+ * @group structuredText
108
+ */
109
+ customBlockStylesForStructuredTextField: (field: Field, ctx: FieldIntentCtx) => StructuredTextCustomBlockStyle[] | void;
87
110
  /**
88
111
  * This function will be called when the plugin needs to render the plugin's
89
112
  * configuration form
@@ -113,6 +136,13 @@ export declare type FullConnectParameters = {
113
136
  * @group sidebarPanels
114
137
  */
115
138
  renderItemFormSidebarPanel: (sidebarPaneId: string, ctx: RenderItemFormSidebarPanelCtx) => void;
139
+ /**
140
+ * This function will be called when the plugin needs to render an outlet (see
141
+ * the `itemFormOutlets` function)
142
+ *
143
+ * @group sidebarPanels
144
+ */
145
+ renderItemFormOutlet: (itemFormOutletId: string, ctx: RenderItemFormOutletCtx) => void;
116
146
  /**
117
147
  * This function will be called when the user selects one of the plugin's
118
148
  * asset sources to upload a new media file.
@@ -46,7 +46,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
46
46
  }
47
47
  };
48
48
  import connectToParent from 'penpal/lib/connectToParent';
49
- import { isInitParent, isOnBootParent, isRenderAssetSourceParent, isRenderConfigScreenParent, isRenderFieldExtensionParent, isRenderManualFieldExtensionConfigScreenParent, isRenderModalParent, isRenderPageParent, isRenderSidebarPaneParent, } from './guards';
49
+ import { isInitParent, isOnBootParent, isRenderAssetSourceParent, isRenderConfigScreenParent, isRenderFieldExtensionParent, isRenderItemFormOutletParent, isRenderManualFieldExtensionConfigScreenParent, isRenderModalParent, isRenderPageParent, isRenderSidebarPanelParent, } from './guards';
50
50
  function toMultifield(fn) {
51
51
  return function (fields, ctx) {
52
52
  if (!fn) {
@@ -105,7 +105,7 @@ var buildRenderUtils = function (parent) {
105
105
  export function connect(configuration) {
106
106
  if (configuration === void 0) { configuration = {}; }
107
107
  return __awaiter(this, void 0, void 0, function () {
108
- var assetSources, mainNavigationTabs, settingsAreaSidebarItemGroups, contentAreaSidebarItems, manualFieldExtensions, itemFormSidebarPanels, listener, penpalConnection, parent, initialSettings, render, render, renderUtils_1, render, renderUtils_2, render, renderUtils_3, render, renderUtils_4, render, renderUtils_5, render, renderUtils_6, render;
108
+ var assetSources, mainNavigationTabs, settingsAreaSidebarItemGroups, contentAreaSidebarItems, manualFieldExtensions, itemFormSidebarPanels, listener, penpalConnection, parent, initialSettings, render, render, renderUtils_1, render, renderUtils_2, render, renderUtils_3, render, renderUtils_4, render, renderUtils_5, render, renderUtils_6, render, renderUtils_7, render;
109
109
  return __generator(this, function (_a) {
110
110
  switch (_a.label) {
111
111
  case 0:
@@ -130,6 +130,8 @@ export function connect(configuration) {
130
130
  manualFieldExtensions: manualFieldExtensions,
131
131
  itemFormSidebarPanels: itemFormSidebarPanels,
132
132
  overrideFieldExtensions: toMultifield(configuration.overrideFieldExtensions),
133
+ customMarksForStructuredTextField: toMultifield(configuration.customMarksForStructuredTextField),
134
+ customBlockStylesForStructuredTextField: toMultifield(configuration.customBlockStylesForStructuredTextField),
133
135
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
134
136
  onChange: function (newSettings) {
135
137
  if (listener) {
@@ -200,7 +202,7 @@ export function connect(configuration) {
200
202
  listener = render;
201
203
  render(initialSettings);
202
204
  }
203
- if (isRenderSidebarPaneParent(parent, initialSettings)) {
205
+ if (isRenderSidebarPanelParent(parent, initialSettings)) {
204
206
  renderUtils_4 = buildRenderUtils(parent);
205
207
  render = function (settings) {
206
208
  if (!configuration.renderItemFormSidebarPanel) {
@@ -211,24 +213,35 @@ export function connect(configuration) {
211
213
  listener = render;
212
214
  render(initialSettings);
213
215
  }
214
- if (isRenderFieldExtensionParent(parent, initialSettings)) {
216
+ if (isRenderItemFormOutletParent(parent, initialSettings)) {
215
217
  renderUtils_5 = buildRenderUtils(parent);
218
+ render = function (settings) {
219
+ if (!configuration.renderItemFormOutlet) {
220
+ return;
221
+ }
222
+ configuration.renderItemFormOutlet(settings.itemFormOutletId, __assign(__assign(__assign({}, parent), settings), renderUtils_5));
223
+ };
224
+ listener = render;
225
+ render(initialSettings);
226
+ }
227
+ if (isRenderFieldExtensionParent(parent, initialSettings)) {
228
+ renderUtils_6 = buildRenderUtils(parent);
216
229
  render = function (settings) {
217
230
  if (!configuration.renderFieldExtension) {
218
231
  return;
219
232
  }
220
- configuration.renderFieldExtension(settings.fieldExtensionId, __assign(__assign(__assign({}, parent), settings), renderUtils_5));
233
+ configuration.renderFieldExtension(settings.fieldExtensionId, __assign(__assign(__assign({}, parent), settings), renderUtils_6));
221
234
  };
222
235
  listener = render;
223
236
  render(initialSettings);
224
237
  }
225
238
  if (isRenderManualFieldExtensionConfigScreenParent(parent, initialSettings)) {
226
- renderUtils_6 = buildRenderUtils(parent);
239
+ renderUtils_7 = buildRenderUtils(parent);
227
240
  render = function (settings) {
228
241
  if (!configuration.renderManualFieldExtensionConfigScreen) {
229
242
  return;
230
243
  }
231
- configuration.renderManualFieldExtensionConfigScreen(settings.fieldExtensionId, __assign(__assign(__assign({}, parent), settings), renderUtils_6));
244
+ configuration.renderManualFieldExtensionConfigScreen(settings.fieldExtensionId, __assign(__assign(__assign({}, parent), settings), renderUtils_7));
232
245
  };
233
246
  listener = render;
234
247
  render(initialSettings);
@@ -1 +1 @@
1
- {"version":3,"file":"connect.js","sourceRoot":"","sources":["../../src/connect.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,eAAe,MAAM,4BAA4B,CAAC;AA4BzD,OAAO,EACL,YAAY,EACZ,cAAc,EACd,yBAAyB,EACzB,0BAA0B,EAC1B,4BAA4B,EAC5B,8CAA8C,EAC9C,mBAAmB,EACnB,kBAAkB,EAClB,yBAAyB,GAE1B,MAAM,UAAU,CAAC;AA6KlB,SAAS,YAAY,CACnB,EAA+D;IAE/D,OAAO,UACL,MAAe,EACf,GAA6B;QAE7B,IAAI,CAAC,EAAE,EAAE;YACP,OAAO,EAAE,CAAC;SACX;QAED,IAAM,MAAM,GAA2B,EAAE,CAAC;QAE1C,KAAoB,UAAM,EAAN,iBAAM,EAAN,oBAAM,EAAN,IAAM,EAAE;YAAvB,IAAM,KAAK,eAAA;YACd,IAAM,QAAQ,GAAG,GAAG,CAAC,SAAS,CAC5B,KAAK,CAAC,aAAa,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CACxB,CAAC;YAChB,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,wBAAO,GAAG,KAAE,QAAQ,UAAA,IAAG,CAAC;SACpD;QAED,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC;AACJ,CAAC;AAcD,IAAM,gBAAgB,GAAG,UAAC,MAA+C;IACvE,IAAI,SAAS,G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GACN,QAAQ,GACR,aAAW,EACd,CAAC;wBACL,CAAC,CAAC;wBAEF,QAAQ,GAAG,MAAM,CAAC;wBAClB,MAAM,CAAC,eAA2B,CAAC,CAAC;qBACrC;oBAED,IAAI,8CAA8C,CAAC,MAAM,EAAE,eAAe,CAAC,EAAE;wBAKrE,gBAAc,gBAAgB,CAAC,MAAM,CAAC,CAAC;wBAEvC,MAAM,GAAG,UAAC,QAAkB;4BAChC,IAAI,CAAC,aAAa,CAAC,sCAAsC,EAAE;gCACzD,OAAO;6BACR;4BAED,aAAa,CAAC,sCAAsC,CAClD,QAAQ,CAAC,gBAAgB,iCAEpB,MAAM,GACN,QAAQ,GACR,aAAW,EAEjB,CAAC;wBACJ,CAAC,CAAC;wBAEF,QAAQ,GAAG,MAAM,CAAC;wBAClB,MAAM,CAAC,eAA2B,CAAC,CAAC;qBACrC;;;;;CACF"}
@@ -1,3 +1,4 @@
1
+ import { RenderItemFormOutletMethods } from '.';
1
2
  import { InitMethods, OnBootMethods, RenderPageMethods, RenderFieldExtensionMethods, RenderConfigScreenMethods, RenderManualFieldExtensionConfigScreenMethods, RenderSidebarPanelMethods, RenderModalMethods, RenderAssetSourceMethods } from './types';
2
3
  export declare type Parent = {
3
4
  getSettings: () => Promise<{
@@ -19,9 +20,12 @@ export declare const isRenderConfigScreenParent: (parent: Parent, settings: {
19
20
  export declare const isRenderModalParent: (parent: Parent, settings: {
20
21
  mode: string;
21
22
  }) => parent is RenderModalMethods;
22
- export declare const isRenderSidebarPaneParent: (parent: Parent, settings: {
23
+ export declare const isRenderSidebarPanelParent: (parent: Parent, settings: {
23
24
  mode: string;
24
25
  }) => parent is RenderSidebarPanelMethods;
26
+ export declare const isRenderItemFormOutletParent: (parent: Parent, settings: {
27
+ mode: string;
28
+ }) => parent is RenderItemFormOutletMethods;
25
29
  export declare const isRenderFieldExtensionParent: (parent: Parent, settings: {
26
30
  mode: string;
27
31
  }) => parent is RenderFieldExtensionMethods;
@@ -8,7 +8,8 @@ export var isOnBootParent = buildGuard('onBoot');
8
8
  export var isRenderPageParent = buildGuard('renderPage');
9
9
  export var isRenderConfigScreenParent = buildGuard('renderConfigScreen');
10
10
  export var isRenderModalParent = buildGuard('renderModal');
11
- export var isRenderSidebarPaneParent = buildGuard('renderItemFormSidebarPanel');
11
+ export var isRenderSidebarPanelParent = buildGuard('renderItemFormSidebarPanel');
12
+ export var isRenderItemFormOutletParent = buildGuard('renderItemFormOutlet');
12
13
  export var isRenderFieldExtensionParent = buildGuard('renderFieldExtension');
13
14
  export var isRenderManualFieldExtensionConfigScreenParent = buildGuard('renderManualFieldExtensionConfigScreen');
14
15
  export var isRenderAssetSourceParent = buildGuard('renderAssetSource');
@@ -1 +1 @@
1
- {"version":3,"file":"guards.js","sourceRoot":"","sources":["../../src/guards.ts"],"names":[],"mappings":"AAcA,SAAS,UAAU,CAAmB,IAAY;IAChD,OAAO,UAAC,MAAc,EAAE,QAA0B;QAChD,OAAA,QAAQ,CAAC,IAAI,KAAK,IAAI;IAAtB,CAAsB,CAAC;AAC3B,CAAC;AAED,MAAM,CAAC,IAAM,YAAY,GAAG,UAAU,CAAc,MAAM,CAAC,CAAC;AAE5D,MAAM,CAAC,IAAM,cAAc,GAAG,UAAU,CAAgB,QAAQ,CAAC,CAAC;AAElE,MAAM,CAAC,IAAM,kBAAkB,GAAG,UAAU,CAAoB,YAAY,CAAC,CAAC;AAE9E,MAAM,CAAC,IAAM,0BAA0B,GAAG,UAAU,CAClD,oBAAoB,CACrB,CAAC;AAEF,MAAM,CAAC,IAAM,mBAAmB,GAAG,UAAU,CAC3C,aAAa,CACd,CAAC;AAEF,MAAM,CAAC,IAAM,yBAAyB,GAAG,UAAU,CACjD,4BAA4B,CAC7B,CAAC;AAEF,MAAM,CAAC,IAAM,4BAA4B,GAAG,UAAU,CACpD,sBAAsB,CACvB,CAAC;AAEF,MAAM,CAAC,IAAM,8CAA8C,GAAG,UAAU,CACtE,wCAAwC,CACzC,CAAC;AAEF,MAAM,CAAC,IAAM,yBAAyB,GAAG,UAAU,CACjD,mBAAmB,CACpB,CAAC"}
1
+ {"version":3,"file":"guards.js","sourceRoot":"","sources":["../../src/guards.ts"],"names":[],"mappings":"AAeA,SAAS,UAAU,CAAmB,IAAY;IAChD,OAAO,UAAC,MAAc,EAAE,QAA0B;QAChD,OAAA,QAAQ,CAAC,IAAI,KAAK,IAAI;IAAtB,CAAsB,CAAC;AAC3B,CAAC;AAED,MAAM,CAAC,IAAM,YAAY,GAAG,UAAU,CAAc,MAAM,CAAC,CAAC;AAE5D,MAAM,CAAC,IAAM,cAAc,GAAG,UAAU,CAAgB,QAAQ,CAAC,CAAC;AAElE,MAAM,CAAC,IAAM,kBAAkB,GAAG,UAAU,CAAoB,YAAY,CAAC,CAAC;AAE9E,MAAM,CAAC,IAAM,0BAA0B,GAAG,UAAU,CAClD,oBAAoB,CACrB,CAAC;AAEF,MAAM,CAAC,IAAM,mBAAmB,GAAG,UAAU,CAC3C,aAAa,CACd,CAAC;AAEF,MAAM,CAAC,IAAM,0BAA0B,GAAG,UAAU,CAClD,4BAA4B,CAC7B,CAAC;AAEF,MAAM,CAAC,IAAM,4BAA4B,GAAG,UAAU,CACpD,sBAAsB,CACvB,CAAC;AAEF,MAAM,CAAC,IAAM,4BAA4B,GAAG,UAAU,CACpD,sBAAsB,CACvB,CAAC;AAEF,MAAM,CAAC,IAAM,8CAA8C,GAAG,UAAU,CACtE,wCAAwC,CACzC,CAAC;AAEF,MAAM,CAAC,IAAM,yBAAyB,GAAG,UAAU,CACjD,mBAAmB,CACpB,CAAC"}
@@ -1,3 +1,5 @@
1
+ /// <reference types="react" />
2
+ import { BlockNodeTypeWithCustomStyle } from 'datocms-structured-text-utils';
1
3
  import { Account, Field, Fieldset, Item, ModelBlock, Plugin, Role, Site, SsoUser, Upload, User } from './SiteApiSchema';
2
4
  export declare type Icon = string | {
3
5
  type: 'svg';
@@ -32,7 +34,7 @@ export declare type MainNavigationTab = {
32
34
  * be displayed by ascending `rank`. If you want to specify an explicit value
33
35
  * for `rank`, make sure to offer a way for final users to customize it inside
34
36
  * the plugin's settings form, otherwise the hardcoded value you choose might
35
- * clash with the one of another plugin! *
37
+ * clash with the one of another plugin!
36
38
  */
37
39
  rank?: number;
38
40
  };
@@ -76,7 +78,7 @@ export declare type SettingsAreaSidebarItemGroup = {
76
78
  * will be displayed by ascending `rank`. If you want to specify an explicit
77
79
  * value for `rank`, make sure to offer a way for final users to customize it
78
80
  * inside the plugin's settings form, otherwise the hardcoded value you choose
79
- * might clash with the one of another plugin! *
81
+ * might clash with the one of another plugin!
80
82
  */
81
83
  rank?: number;
82
84
  };
@@ -109,7 +111,7 @@ export declare type ContentAreaSidebarItem = {
109
111
  * will be displayed by ascending `rank`. If you want to specify an explicit
110
112
  * value for `rank`, make sure to offer a way for final users to customize it
111
113
  * inside the plugin's settings form, otherwise the hardcoded value you choose
112
- * might clash with the one of another plugin! *
114
+ * might clash with the one of another plugin!
113
115
  */
114
116
  rank?: number;
115
117
  };
@@ -190,7 +192,21 @@ export declare type ItemFormSidebarPanel = {
190
192
  * sorted by ascending `rank`. If you want to specify an explicit value for
191
193
  * `rank`, make sure to offer a way for final users to customize it inside the
192
194
  * plugin's settings form, otherwise the hardcoded value you choose might
193
- * clash with the one of another plugin! *
195
+ * clash with the one of another plugin!
196
+ */
197
+ rank?: number;
198
+ /** The initial height to set for the iframe that will render the sidebar panel */
199
+ initialHeight?: number;
200
+ };
201
+ /** An outlet to be shown at the top of a record's editing page */
202
+ export declare type ItemFormOutlet = {
203
+ /** ID of the outlet. Will be the first argument for the `renderItemFormOutlet` function */
204
+ id: string;
205
+ /**
206
+ * Multiple outlets will be sorted by ascending `rank`. If you want to specify
207
+ * an explicit value for `rank`, make sure to offer a way for final users to
208
+ * customize it inside the plugin's settings form, otherwise the hardcoded
209
+ * value you choose might clash with the one of another plugin!
194
210
  */
195
211
  rank?: number;
196
212
  /** The initial height to set for the iframe that will render the sidebar panel */
@@ -218,7 +234,7 @@ export declare type EditorOverride = {
218
234
  * win. If you want to specify an explicit value for `rank`, make sure to
219
235
  * offer a way for final users to customize it inside the plugin's settings
220
236
  * form, otherwise the hardcoded value you choose might clash with the one of
221
- * another plugin! *
237
+ * another plugin!
222
238
  */
223
239
  rank?: number;
224
240
  /** The initial height to set for the iframe that will render the field extension */
@@ -241,12 +257,69 @@ export declare type AddonOverride = {
241
257
  * ascending `rank`. If you want to specify an explicit value for `rank`, make
242
258
  * sure to offer a way for final users to customize it inside the plugin's
243
259
  * settings form, otherwise the hardcoded value you choose might clash with
244
- * the one of another plugin! *
260
+ * the one of another plugin!
245
261
  */
246
262
  rank?: number;
247
263
  /** The initial height to set for the iframe that will render the field extension */
248
264
  initialHeight?: number;
249
265
  };
266
+ export declare type StructuredTextCustomMarkPlacement = [
267
+ 'before' | 'after',
268
+ 'strong' | 'emphasis' | 'underline' | 'code' | 'highlight' | 'strikethrough'
269
+ ];
270
+ /** An object expressing a custom mark for a Structured Text field */
271
+ export declare type StructuredTextCustomMark = {
272
+ /** ID of mark */
273
+ id: string;
274
+ /** Label representing the custom mark */
275
+ label: string;
276
+ /**
277
+ * Icon to be shown alongside the label. Can be a FontAwesome icon name (ie.
278
+ * `"address-book"`) or a custom SVG definition. To maintain visual
279
+ * consistency with the rest of the interface, try to use FontAwesome icons
280
+ * whenever possible
281
+ */
282
+ icon: Icon;
283
+ /**
284
+ * Expresses where you want the custom mark button to be placed inside the
285
+ * toolbar. If not specified, the item will be placed after the standard marks
286
+ * provided by DatoCMS itself.
287
+ */
288
+ placement?: StructuredTextCustomMarkPlacement;
289
+ /**
290
+ * If multiple custom marks specify the same `placement` for their toolbar
291
+ * button, they will be sorted by ascending `rank`. If you want to specify an
292
+ * explicit value for `rank`, make sure to offer a way for final users to
293
+ * customize it inside the plugin's settings form, otherwise the hardcoded
294
+ * value you choose might clash with the one of another plugin!
295
+ */
296
+ rank?: number;
297
+ /**
298
+ * Keyboard shortcut associated with the custom mark, expressed using the
299
+ * https://github.com/ianstormtaylor/is-hotkey syntax (ie. `mod+shift+x`)
300
+ */
301
+ keyboardShortcut?: string;
302
+ /** How the custom mark will be styled inside the editor */
303
+ appliedStyle: React.CSSProperties;
304
+ };
305
+ /** An object expressing a custom block style for a Structured Text field */
306
+ export declare type StructuredTextCustomBlockStyle = {
307
+ /** ID of custom block style */
308
+ id: string;
309
+ /** The block node that can apply this style */
310
+ node: BlockNodeTypeWithCustomStyle;
311
+ /** ID of custom block style */
312
+ label: string;
313
+ /** How the block will be styled inside the editor to represent the style */
314
+ appliedStyle: React.CSSProperties;
315
+ /**
316
+ * Custom styles for a block node will be sorted by ascending `rank`. If you
317
+ * want to specify an explicit value for `rank`, make sure to offer a way for
318
+ * final users to customize it inside the plugin's settings form, otherwise
319
+ * the hardcoded value you choose might clash with the one of another plugin!
320
+ */
321
+ rank?: number;
322
+ };
250
323
  /** An object expressing some field extensions you want to force on a particular field */
251
324
  export declare type FieldExtensionOverride = {
252
325
  /** Force a field editor/sidebar extension on a field */
@@ -1043,7 +1116,21 @@ export declare type RenderSidebarPanelAdditionalMethods = {
1043
1116
  getSettings: () => Promise<RenderSidebarPanelProperties>;
1044
1117
  };
1045
1118
  export declare type RenderSidebarPanelMethods = ItemFormMethods & RenderSidebarPanelAdditionalMethods;
1046
- export declare type RenderSidebarPanePropertiesAndMethods = RenderSidebarPanelMethods & RenderSidebarPanelProperties;
1119
+ export declare type RenderSidebarPanelPropertiesAndMethods = RenderSidebarPanelMethods & RenderSidebarPanelProperties;
1120
+ /** Information regarding the specific outlet that you need to render */
1121
+ export declare type RenderItemFormOutletAdditionalProperties = {
1122
+ mode: 'renderItemFormItemFormOutlet';
1123
+ /** The ID of the outlet that needs to be rendered */
1124
+ itemFormOutletId: string;
1125
+ /** The arbitrary `parameters` of the panel declared in the `itemFormOutlets` function */
1126
+ parameters: Record<string, unknown>;
1127
+ };
1128
+ export declare type RenderItemFormOutletProperties = ItemFormProperties & RenderItemFormOutletAdditionalProperties;
1129
+ export declare type RenderItemFormOutletAdditionalMethods = {
1130
+ getSettings: () => Promise<RenderItemFormOutletProperties>;
1131
+ };
1132
+ export declare type RenderItemFormOutletMethods = ItemFormMethods & RenderItemFormOutletAdditionalMethods;
1133
+ export declare type RenderItemFormOutletPropertiesAndMethods = RenderItemFormOutletMethods & RenderItemFormOutletProperties;
1047
1134
  /**
1048
1135
  * Information regarding the state of a specific field where you need to render
1049
1136
  * the field extension
@@ -1,5 +1,6 @@
1
1
  import { Field, ModelBlock } from './SiteApiSchema';
2
- import { AssetSource, ContentAreaSidebarItem, FieldExtensionOverride, InitPropertiesAndMethods, ItemFormSidebarPanel, MainNavigationTab, ManualFieldExtension, OnBootPropertiesAndMethods, RenderAssetSourcePropertiesAndMethods, RenderConfigScreenPropertiesAndMethods, RenderFieldExtensionPropertiesAndMethods, RenderManualFieldExtensionConfigScreenPropertiesAndMethods, RenderModalPropertiesAndMethods, RenderPagePropertiesAndMethods, RenderSidebarPanePropertiesAndMethods, SettingsAreaSidebarItemGroup } from './types';
2
+ import { AssetSource, ContentAreaSidebarItem, FieldExtensionOverride, InitPropertiesAndMethods, ItemFormSidebarPanel, MainNavigationTab, ManualFieldExtension, OnBootPropertiesAndMethods, RenderAssetSourcePropertiesAndMethods, RenderConfigScreenPropertiesAndMethods, RenderFieldExtensionPropertiesAndMethods, RenderManualFieldExtensionConfigScreenPropertiesAndMethods, RenderModalPropertiesAndMethods, RenderPagePropertiesAndMethods, RenderSidebarPanelPropertiesAndMethods, SettingsAreaSidebarItemGroup } from './types';
3
+ import { ItemFormOutlet, RenderItemFormOutletPropertiesAndMethods, StructuredTextCustomBlockStyle, StructuredTextCustomMark } from '.';
3
4
  export declare type SizingUtilities = {
4
5
  /**
5
6
  * Listens for DOM changes and automatically calls `setHeight` when it detects
@@ -25,7 +26,8 @@ export declare type FieldIntentCtx = InitPropertiesAndMethods & {
25
26
  export declare type RenderPageCtx = RenderPagePropertiesAndMethods;
26
27
  export declare type RenderModalCtx = RenderModalPropertiesAndMethods & SizingUtilities;
27
28
  export declare type RenderAssetSourceCtx = RenderAssetSourcePropertiesAndMethods & SizingUtilities;
28
- export declare type RenderItemFormSidebarPanelCtx = RenderSidebarPanePropertiesAndMethods & SizingUtilities;
29
+ export declare type RenderItemFormSidebarPanelCtx = RenderSidebarPanelPropertiesAndMethods & SizingUtilities;
30
+ export declare type RenderItemFormOutletCtx = RenderItemFormOutletPropertiesAndMethods & SizingUtilities;
29
31
  export declare type RenderFieldExtensionCtx = RenderFieldExtensionPropertiesAndMethods & SizingUtilities;
30
32
  export declare type RenderManualFieldExtensionConfigScreenCtx = RenderManualFieldExtensionConfigScreenPropertiesAndMethods & SizingUtilities;
31
33
  export declare type RenderConfigScreenCtx = RenderConfigScreenPropertiesAndMethods & SizingUtilities;
@@ -77,6 +79,13 @@ export declare type FullConnectParameters = {
77
79
  * @group sidebarPanels
78
80
  */
79
81
  itemFormSidebarPanels: (itemType: ModelBlock, ctx: IntentCtx) => ItemFormSidebarPanel[];
82
+ /**
83
+ * Use this function to declare custom outlets to be shown at the top of the
84
+ * record's editing page
85
+ *
86
+ * @group sidebarPanels
87
+ */
88
+ itemFormOutlets: (itemType: ModelBlock, ctx: IntentCtx) => ItemFormOutlet[];
80
89
  /**
81
90
  * Use this function to automatically force one or more field extensions to a
82
91
  * particular field
@@ -84,6 +93,20 @@ export declare type FullConnectParameters = {
84
93
  * @group forcedFieldExtensions
85
94
  */
86
95
  overrideFieldExtensions: (field: Field, ctx: FieldIntentCtx) => FieldExtensionOverride | void;
96
+ /**
97
+ * Use this function to define a number of custom marks for a specific
98
+ * Structured Text field
99
+ *
100
+ * @group structuredText
101
+ */
102
+ customMarksForStructuredTextField: (field: Field, ctx: FieldIntentCtx) => StructuredTextCustomMark[] | void;
103
+ /**
104
+ * Use this function to define a number of custom block styles for a specific
105
+ * Structured Text field
106
+ *
107
+ * @group structuredText
108
+ */
109
+ customBlockStylesForStructuredTextField: (field: Field, ctx: FieldIntentCtx) => StructuredTextCustomBlockStyle[] | void;
87
110
  /**
88
111
  * This function will be called when the plugin needs to render the plugin's
89
112
  * configuration form
@@ -113,6 +136,13 @@ export declare type FullConnectParameters = {
113
136
  * @group sidebarPanels
114
137
  */
115
138
  renderItemFormSidebarPanel: (sidebarPaneId: string, ctx: RenderItemFormSidebarPanelCtx) => void;
139
+ /**
140
+ * This function will be called when the plugin needs to render an outlet (see
141
+ * the `itemFormOutlets` function)
142
+ *
143
+ * @group sidebarPanels
144
+ */
145
+ renderItemFormOutlet: (itemFormOutletId: string, ctx: RenderItemFormOutletCtx) => void;
116
146
  /**
117
147
  * This function will be called when the user selects one of the plugin's
118
148
  * asset sources to upload a new media file.
@@ -1,3 +1,4 @@
1
+ import { RenderItemFormOutletMethods } from '.';
1
2
  import { InitMethods, OnBootMethods, RenderPageMethods, RenderFieldExtensionMethods, RenderConfigScreenMethods, RenderManualFieldExtensionConfigScreenMethods, RenderSidebarPanelMethods, RenderModalMethods, RenderAssetSourceMethods } from './types';
2
3
  export declare type Parent = {
3
4
  getSettings: () => Promise<{
@@ -19,9 +20,12 @@ export declare const isRenderConfigScreenParent: (parent: Parent, settings: {
19
20
  export declare const isRenderModalParent: (parent: Parent, settings: {
20
21
  mode: string;
21
22
  }) => parent is RenderModalMethods;
22
- export declare const isRenderSidebarPaneParent: (parent: Parent, settings: {
23
+ export declare const isRenderSidebarPanelParent: (parent: Parent, settings: {
23
24
  mode: string;
24
25
  }) => parent is RenderSidebarPanelMethods;
26
+ export declare const isRenderItemFormOutletParent: (parent: Parent, settings: {
27
+ mode: string;
28
+ }) => parent is RenderItemFormOutletMethods;
25
29
  export declare const isRenderFieldExtensionParent: (parent: Parent, settings: {
26
30
  mode: string;
27
31
  }) => parent is RenderFieldExtensionMethods;