@valkyrianlabs/payload-markdown 1.3.1 → 1.3.2

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 (33) hide show
  1. package/package.json +1 -1
  2. package/dist/blocks/MarkdownBlock/types.d.js +0 -3
  3. package/dist/blocks/MarkdownBlock/types.d.js.map +0 -1
  4. package/dist/components/MarkdownRenderer/index.module.css +0 -45
  5. package/dist/components/MarkdownRenderer/index.module.scss +0 -43
  6. package/dist/components/MarkdownRenderer/types.d.js +0 -5
  7. package/dist/components/MarkdownRenderer/types.d.js.map +0 -1
  8. package/dist/core/plugins/remarkLayoutSentinels.d.ts +0 -3
  9. package/dist/core/plugins/remarkLayoutSentinels.js +0 -184
  10. package/dist/core/plugins/remarkLayoutSentinels.js.map +0 -1
  11. package/dist/core/plugins/remarkNormalizeLayoutSyntax.d.ts +0 -3
  12. package/dist/core/types.d.js +0 -7
  13. package/dist/core/types.d.js.map +0 -1
  14. package/dist/core/types.d.ts +0 -238
  15. package/dist/core/types.js +0 -5
  16. package/dist/core/types.js.map +0 -1
  17. package/dist/editor/MarkdownCodeMirror.d.ts +0 -8
  18. package/dist/editor/MarkdownCodeMirror.js +0 -74
  19. package/dist/editor/MarkdownCodeMirror.js.map +0 -1
  20. package/dist/field/BlocksParams/config.d.ts +0 -7
  21. package/dist/field/BlocksParams/config.js +0 -149
  22. package/dist/field/BlocksParams/config.js.map +0 -1
  23. package/dist/field/CodeBlock/config.d.ts +0 -7
  24. package/dist/field/CodeBlock/config.js +0 -321
  25. package/dist/field/CodeBlock/config.js.map +0 -1
  26. package/dist/field/CodeBlockParams/config.d.ts +0 -7
  27. package/dist/field/CodeBlockParams/config.js +0 -321
  28. package/dist/field/CodeBlockParams/config.js.map +0 -1
  29. package/dist/field/TailwindField/config.d.ts +0 -9
  30. package/dist/field/TailwindField/config.js +0 -13
  31. package/dist/field/TailwindField/config.js.map +0 -1
  32. package/dist/types.d.js +0 -3
  33. package/dist/types.d.js.map +0 -1
@@ -1,321 +0,0 @@
1
- export function codeBlockParams(options = {}) {
2
- const { name = 'code_params', admin, label = 'Code Block Options' } = options;
3
- return {
4
- name,
5
- type: 'group',
6
- admin,
7
- fields: [
8
- {
9
- name: 'theme',
10
- type: 'select',
11
- admin: {
12
- description: 'The Shiki theme to use for syntax highlighting this code block. ' + 'Defaults to "github-dark". Note that this plugin is optimized around themes that ' + 'still look good when block backgrounds are removed or reduced. ' + 'Some light themes may require additional customization ' + 'to maintain good contrast and readability.'
13
- },
14
- defaultValue: 'github-dark',
15
- options: [
16
- {
17
- label: 'Andromeeda',
18
- value: 'andromeeda'
19
- },
20
- {
21
- label: 'Aurora X',
22
- value: 'aurora-x'
23
- },
24
- {
25
- label: 'Ayu Dark',
26
- value: 'ayu-dark'
27
- },
28
- {
29
- label: 'Ayu Light',
30
- value: 'ayu-light'
31
- },
32
- {
33
- label: 'Ayu Mirage',
34
- value: 'ayu-mirage'
35
- },
36
- {
37
- label: 'Catppuccin Frappé',
38
- value: 'catppuccin-frappe'
39
- },
40
- {
41
- label: 'Catppuccin Latte',
42
- value: 'catppuccin-latte'
43
- },
44
- {
45
- label: 'Catppuccin Macchiato',
46
- value: 'catppuccin-macchiato'
47
- },
48
- {
49
- label: 'Catppuccin Mocha',
50
- value: 'catppuccin-mocha'
51
- },
52
- {
53
- label: 'Dark Plus',
54
- value: 'dark-plus'
55
- },
56
- {
57
- label: 'Dracula Theme',
58
- value: 'dracula'
59
- },
60
- {
61
- label: 'Dracula Theme Soft',
62
- value: 'dracula-soft'
63
- },
64
- {
65
- label: 'Everforest Dark',
66
- value: 'everforest-dark'
67
- },
68
- {
69
- label: 'Everforest Light',
70
- value: 'everforest-light'
71
- },
72
- {
73
- label: 'GitHub Dark',
74
- value: 'github-dark'
75
- },
76
- {
77
- label: 'GitHub Dark Default',
78
- value: 'github-dark-default'
79
- },
80
- {
81
- label: 'GitHub Dark Dimmed',
82
- value: 'github-dark-dimmed'
83
- },
84
- {
85
- label: 'GitHub Dark High Contrast',
86
- value: 'github-dark-high-contrast'
87
- },
88
- {
89
- label: 'GitHub Light',
90
- value: 'github-light'
91
- },
92
- {
93
- label: 'GitHub Light Default',
94
- value: 'github-light-default'
95
- },
96
- {
97
- label: 'GitHub Light High Contrast',
98
- value: 'github-light-high-contrast'
99
- },
100
- {
101
- label: 'Gruvbox Dark Hard',
102
- value: 'gruvbox-dark-hard'
103
- },
104
- {
105
- label: 'Gruvbox Dark Medium',
106
- value: 'gruvbox-dark-medium'
107
- },
108
- {
109
- label: 'Gruvbox Dark Soft',
110
- value: 'gruvbox-dark-soft'
111
- },
112
- {
113
- label: 'Gruvbox Light Hard',
114
- value: 'gruvbox-light-hard'
115
- },
116
- {
117
- label: 'Gruvbox Light Medium',
118
- value: 'gruvbox-light-medium'
119
- },
120
- {
121
- label: 'Gruvbox Light Soft',
122
- value: 'gruvbox-light-soft'
123
- },
124
- {
125
- label: 'Horizon',
126
- value: 'horizon'
127
- },
128
- {
129
- label: 'Horizon Bright',
130
- value: 'horizon-bright'
131
- },
132
- {
133
- label: 'Houston',
134
- value: 'houston'
135
- },
136
- {
137
- label: 'Kanagawa Dragon',
138
- value: 'kanagawa-dragon'
139
- },
140
- {
141
- label: 'Kanagawa Lotus',
142
- value: 'kanagawa-lotus'
143
- },
144
- {
145
- label: 'Kanagawa Wave',
146
- value: 'kanagawa-wave'
147
- },
148
- {
149
- label: 'LaserWave',
150
- value: 'laserwave'
151
- },
152
- {
153
- label: 'Light Plus',
154
- value: 'light-plus'
155
- },
156
- {
157
- label: 'Material Theme',
158
- value: 'material-theme'
159
- },
160
- {
161
- label: 'Material Theme Darker',
162
- value: 'material-theme-darker'
163
- },
164
- {
165
- label: 'Material Theme Lighter',
166
- value: 'material-theme-lighter'
167
- },
168
- {
169
- label: 'Material Theme Ocean',
170
- value: 'material-theme-ocean'
171
- },
172
- {
173
- label: 'Material Theme Palenight',
174
- value: 'material-theme-palenight'
175
- },
176
- {
177
- label: 'Min Dark',
178
- value: 'min-dark'
179
- },
180
- {
181
- label: 'Min Light',
182
- value: 'min-light'
183
- },
184
- {
185
- label: 'Monokai',
186
- value: 'monokai'
187
- },
188
- {
189
- label: 'Night Owl',
190
- value: 'night-owl'
191
- },
192
- {
193
- label: 'Night Owl Light',
194
- value: 'night-owl-light'
195
- },
196
- {
197
- label: 'Nord',
198
- value: 'nord'
199
- },
200
- {
201
- label: 'One Dark Pro',
202
- value: 'one-dark-pro'
203
- },
204
- {
205
- label: 'One Light',
206
- value: 'one-light'
207
- },
208
- {
209
- label: 'Plastic',
210
- value: 'plastic'
211
- },
212
- {
213
- label: 'Poimandres',
214
- value: 'poimandres'
215
- },
216
- {
217
- label: 'Red',
218
- value: 'red'
219
- },
220
- {
221
- label: 'Rosé Pine',
222
- value: 'rose-pine'
223
- },
224
- {
225
- label: 'Rosé Pine Dawn',
226
- value: 'rose-pine-dawn'
227
- },
228
- {
229
- label: 'Rosé Pine Moon',
230
- value: 'rose-pine-moon'
231
- },
232
- {
233
- label: 'Slack Dark',
234
- value: 'slack-dark'
235
- },
236
- {
237
- label: 'Slack Ochin',
238
- value: 'slack-ochin'
239
- },
240
- {
241
- label: 'Snazzy Light',
242
- value: 'snazzy-light'
243
- },
244
- {
245
- label: 'Solarized Dark',
246
- value: 'solarized-dark'
247
- },
248
- {
249
- label: 'Solarized Light',
250
- value: 'solarized-light'
251
- },
252
- {
253
- label: "Synthwave '84",
254
- value: 'synthwave-84'
255
- },
256
- {
257
- label: 'Tokyo Night',
258
- value: 'tokyo-night'
259
- },
260
- {
261
- label: 'Vesper',
262
- value: 'vesper'
263
- },
264
- {
265
- label: 'Vitesse Black',
266
- value: 'vitesse-black'
267
- },
268
- {
269
- label: 'Vitesse Dark',
270
- value: 'vitesse-dark'
271
- },
272
- {
273
- label: 'Vitesse Light',
274
- value: 'vitesse-light'
275
- }
276
- ]
277
- },
278
- {
279
- name: 'langs',
280
- type: 'array',
281
- admin: {
282
- description: 'The list of languages to load for syntax highlighting this code block. ' + 'Defaults to a common set of popular languages. ' + 'Note that loading many languages may impact performance, so it\'s best to only include the ones you need.'
283
- },
284
- fields: [
285
- {
286
- name: 'lang',
287
- type: 'text',
288
- label: 'Language'
289
- }
290
- ],
291
- label: 'Shiki Languages'
292
- },
293
- {
294
- type: 'row',
295
- fields: [
296
- {
297
- name: 'showLineNumbers',
298
- type: 'checkbox',
299
- admin: {
300
- description: 'Whether to show line numbers in the code block.'
301
- },
302
- defaultValue: true,
303
- label: 'Show Line Numbers'
304
- },
305
- {
306
- name: 'enhancedCodeBlocks',
307
- type: 'checkbox',
308
- admin: {
309
- description: 'Whether to apply the plugin\'s enhanced code block formatting. ' + 'When enabled, the renderer normalizes Shiki output for better integration with ' + 'markdown prose styling. This includes adjustments such as background removal, ' + 'spacing cleanup, line layout normalization, and other structural fixes needed ' + 'for features like line numbers and consistent empty-line rendering. ' + 'Set this to false if you want to preserve raw Shiki block styling as much as possible.'
310
- },
311
- defaultValue: true,
312
- label: 'Enhanced Code Blocks'
313
- }
314
- ]
315
- }
316
- ],
317
- label
318
- };
319
- }
320
-
321
- //# sourceMappingURL=config.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/field/CodeBlockParams/config.ts"],"sourcesContent":["import type { Field, GroupField } from 'payload'\n\nexport type CodeBlockParams = {\n admin?: Partial<GroupField['admin']>\n label?: string\n name?: string\n}\n\nexport function codeBlockParams(options: CodeBlockParams = {}): Field {\n const {\n name = 'code_params',\n admin,\n label = 'Code Block Options',\n } = options\n\n return {\n name,\n type: 'group',\n admin,\n fields: [\n {\n name: 'theme',\n type: 'select',\n admin: {\n description: 'The Shiki theme to use for syntax highlighting this code block. ' +\n 'Defaults to \"github-dark\". Note that this plugin is optimized around themes that ' +\n 'still look good when block backgrounds are removed or reduced. ' +\n 'Some light themes may require additional customization ' +\n 'to maintain good contrast and readability.',\n },\n defaultValue: 'github-dark',\n options: [\n { label: 'Andromeeda', value: 'andromeeda' },\n { label: 'Aurora X', value: 'aurora-x' },\n { label: 'Ayu Dark', value: 'ayu-dark' },\n { label: 'Ayu Light', value: 'ayu-light' },\n { label: 'Ayu Mirage', value: 'ayu-mirage' },\n { label: 'Catppuccin Frappé', value: 'catppuccin-frappe' },\n { label: 'Catppuccin Latte', value: 'catppuccin-latte' },\n { label: 'Catppuccin Macchiato', value: 'catppuccin-macchiato' },\n { label: 'Catppuccin Mocha', value: 'catppuccin-mocha' },\n { label: 'Dark Plus', value: 'dark-plus' },\n { label: 'Dracula Theme', value: 'dracula' },\n { label: 'Dracula Theme Soft', value: 'dracula-soft' },\n { label: 'Everforest Dark', value: 'everforest-dark' },\n { label: 'Everforest Light', value: 'everforest-light' },\n { label: 'GitHub Dark', value: 'github-dark' },\n { label: 'GitHub Dark Default', value: 'github-dark-default' },\n { label: 'GitHub Dark Dimmed', value: 'github-dark-dimmed' },\n { label: 'GitHub Dark High Contrast', value: 'github-dark-high-contrast' },\n { label: 'GitHub Light', value: 'github-light' },\n { label: 'GitHub Light Default', value: 'github-light-default' },\n { label: 'GitHub Light High Contrast', value: 'github-light-high-contrast' },\n { label: 'Gruvbox Dark Hard', value: 'gruvbox-dark-hard' },\n { label: 'Gruvbox Dark Medium', value: 'gruvbox-dark-medium' },\n { label: 'Gruvbox Dark Soft', value: 'gruvbox-dark-soft' },\n { label: 'Gruvbox Light Hard', value: 'gruvbox-light-hard' },\n { label: 'Gruvbox Light Medium', value: 'gruvbox-light-medium' },\n { label: 'Gruvbox Light Soft', value: 'gruvbox-light-soft' },\n { label: 'Horizon', value: 'horizon' },\n { label: 'Horizon Bright', value: 'horizon-bright' },\n { label: 'Houston', value: 'houston' },\n { label: 'Kanagawa Dragon', value: 'kanagawa-dragon' },\n { label: 'Kanagawa Lotus', value: 'kanagawa-lotus' },\n { label: 'Kanagawa Wave', value: 'kanagawa-wave' },\n { label: 'LaserWave', value: 'laserwave' },\n { label: 'Light Plus', value: 'light-plus' },\n { label: 'Material Theme', value: 'material-theme' },\n { label: 'Material Theme Darker', value: 'material-theme-darker' },\n { label: 'Material Theme Lighter', value: 'material-theme-lighter' },\n { label: 'Material Theme Ocean', value: 'material-theme-ocean' },\n { label: 'Material Theme Palenight', value: 'material-theme-palenight' },\n { label: 'Min Dark', value: 'min-dark' },\n { label: 'Min Light', value: 'min-light' },\n { label: 'Monokai', value: 'monokai' },\n { label: 'Night Owl', value: 'night-owl' },\n { label: 'Night Owl Light', value: 'night-owl-light' },\n { label: 'Nord', value: 'nord' },\n { label: 'One Dark Pro', value: 'one-dark-pro' },\n { label: 'One Light', value: 'one-light' },\n { label: 'Plastic', value: 'plastic' },\n { label: 'Poimandres', value: 'poimandres' },\n { label: 'Red', value: 'red' },\n { label: 'Rosé Pine', value: 'rose-pine' },\n { label: 'Rosé Pine Dawn', value: 'rose-pine-dawn' },\n { label: 'Rosé Pine Moon', value: 'rose-pine-moon' },\n { label: 'Slack Dark', value: 'slack-dark' },\n { label: 'Slack Ochin', value: 'slack-ochin' },\n { label: 'Snazzy Light', value: 'snazzy-light' },\n { label: 'Solarized Dark', value: 'solarized-dark' },\n { label: 'Solarized Light', value: 'solarized-light' },\n { label: \"Synthwave '84\", value: 'synthwave-84' },\n { label: 'Tokyo Night', value: 'tokyo-night' },\n { label: 'Vesper', value: 'vesper' },\n { label: 'Vitesse Black', value: 'vitesse-black' },\n { label: 'Vitesse Dark', value: 'vitesse-dark' },\n { label: 'Vitesse Light', value: 'vitesse-light' },\n ],\n },\n {\n name: 'langs',\n type: 'array',\n admin: {\n description: 'The list of languages to load for syntax highlighting this code block. ' +\n 'Defaults to a common set of popular languages. ' +\n 'Note that loading many languages may impact performance, so it\\'s best to only include the ones you need.',\n },\n fields: [\n {\n name: 'lang',\n type: 'text',\n label: 'Language',\n }\n ],\n label: 'Shiki Languages'\n },\n {\n type: 'row',\n fields: [\n {\n name: 'showLineNumbers',\n type: 'checkbox',\n admin: {\n description: 'Whether to show line numbers in the code block.',\n },\n defaultValue: true,\n label: 'Show Line Numbers'\n },\n {\n name: 'enhancedCodeBlocks',\n type: 'checkbox',\n admin: {\n description: 'Whether to apply the plugin\\'s enhanced code block formatting. ' +\n 'When enabled, the renderer normalizes Shiki output for better integration with ' +\n 'markdown prose styling. This includes adjustments such as background removal, ' +\n 'spacing cleanup, line layout normalization, and other structural fixes needed ' +\n 'for features like line numbers and consistent empty-line rendering. ' +\n 'Set this to false if you want to preserve raw Shiki block styling as much as possible.',\n },\n defaultValue: true,\n label: 'Enhanced Code Blocks',\n },\n ]\n }\n ],\n label,\n }\n}\n"],"names":["codeBlockParams","options","name","admin","label","type","fields","description","defaultValue","value"],"mappings":"AAQA,OAAO,SAASA,gBAAgBC,UAA2B,CAAC,CAAC;IAC3D,MAAM,EACJC,OAAO,aAAa,EACpBC,KAAK,EACLC,QAAQ,oBAAoB,EAC7B,GAAGH;IAEJ,OAAO;QACLC;QACAG,MAAM;QACNF;QACAG,QAAQ;YACN;gBACEJ,MAAM;gBACNG,MAAM;gBACNF,OAAO;oBACLI,aAAa,qEACX,sFACA,oEACA,4DACA;gBACJ;gBACAC,cAAc;gBACdP,SAAS;oBACP;wBAAEG,OAAO;wBAAcK,OAAO;oBAAa;oBAC3C;wBAAEL,OAAO;wBAAYK,OAAO;oBAAW;oBACvC;wBAAEL,OAAO;wBAAYK,OAAO;oBAAW;oBACvC;wBAAEL,OAAO;wBAAaK,OAAO;oBAAY;oBACzC;wBAAEL,OAAO;wBAAcK,OAAO;oBAAa;oBAC3C;wBAAEL,OAAO;wBAAqBK,OAAO;oBAAoB;oBACzD;wBAAEL,OAAO;wBAAoBK,OAAO;oBAAmB;oBACvD;wBAAEL,OAAO;wBAAwBK,OAAO;oBAAuB;oBAC/D;wBAAEL,OAAO;wBAAoBK,OAAO;oBAAmB;oBACvD;wBAAEL,OAAO;wBAAaK,OAAO;oBAAY;oBACzC;wBAAEL,OAAO;wBAAiBK,OAAO;oBAAU;oBAC3C;wBAAEL,OAAO;wBAAsBK,OAAO;oBAAe;oBACrD;wBAAEL,OAAO;wBAAm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,QAAQ;oBACN;wBACEJ,MAAM;wBACNG,MAAM;wBACND,OAAO;oBACT;iBACD;gBACDA,OAAO;YACT;YACA;gBACEC,MAAM;gBACNC,QAAQ;oBACN;wBACEJ,MAAM;wBACNG,MAAM;wBACNF,OAAO;4BACLI,aAAa;wBACf;wBACAC,cAAc;wBACdJ,OAAO;oBACT;oBACA;wBACEF,MAAM;wBACNG,MAAM;wBACNF,OAAO;4BACLI,aAAa,oEACX,oFACA,mFACA,mFACA,yEACA;wBACJ;wBACAC,cAAc;wBACdJ,OAAO;oBACT;iBACD;YACH;SACD;QACDA;IACF;AACF"}
@@ -1,9 +0,0 @@
1
- import type { Field, TextField } from 'payload';
2
- export type TailwindFieldOptions = {
3
- admin?: Partial<TextField['admin']>;
4
- defaultValue?: string;
5
- label?: string;
6
- name?: string;
7
- required?: boolean;
8
- };
9
- export declare function tailwindField(options?: TailwindFieldOptions): Field;
@@ -1,13 +0,0 @@
1
- export function tailwindField(options = {}) {
2
- const { name = 'vlTailwindsField', admin, defaultValue, label = 'Tailwinds', required = false } = options;
3
- return {
4
- name,
5
- type: 'text',
6
- admin,
7
- defaultValue,
8
- label,
9
- required
10
- };
11
- }
12
-
13
- //# sourceMappingURL=config.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/field/TailwindField/config.ts"],"sourcesContent":["import type { Field, TextField } from 'payload'\n\nexport type TailwindFieldOptions = {\n admin?: Partial<TextField['admin']>\n defaultValue?: string\n label?: string\n name?: string\n required?: boolean\n}\n\nexport function tailwindField(options: TailwindFieldOptions = {}): Field {\n const {\n name = 'vlTailwindsField',\n admin,\n defaultValue,\n label = 'Tailwinds',\n required = false\n } = options\n\n return {\n name,\n type: 'text',\n admin,\n defaultValue,\n label,\n required,\n }\n}\n"],"names":["tailwindField","options","name","admin","defaultValue","label","required","type"],"mappings":"AAUA,OAAO,SAASA,cAAcC,UAAgC,CAAC,CAAC;IAC9D,MAAM,EACJC,OAAO,kBAAkB,EACzBC,KAAK,EACLC,YAAY,EACZC,QAAQ,WAAW,EACnBC,WAAW,KAAK,EACjB,GAAGL;IAEJ,OAAO;QACLC;QACAK,MAAM;QACNJ;QACAC;QACAC;QACAC;IACF;AACF"}
package/dist/types.d.js DELETED
@@ -1,3 +0,0 @@
1
- export { };
2
-
3
- //# sourceMappingURL=types.d.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/types.d.ts"],"sourcesContent":["import type { CollectionSlug } from 'payload'\n\nimport type { MarkdownConfig } from './core/types.d.js'\n\nexport type DualMarkdownFieldConfig = {\n blocks?: MarkdownConfig\n field?: MarkdownConfig\n}\n\nexport type ConfigOptions = DualMarkdownFieldConfig | MarkdownConfig\n\nexport type PayloadMarkdownCollectionConfig = {\n /**\n * Styling options for markdown fields added to the collection, and/or markdown fields added within blocks to the collection.\n */\n config?: ConfigOptions\n\n /**\n * Options for the markdown field.\n */\n field?: Omit<MarkdownFieldOptions, 'name'>\n\n /**\n * The name of the markdown field to add to the collection. Defaults to 'content'.\n */\n fieldName?: string\n\n /**\n * Whether to add a standalone markdown field to the collection.\n *\n * If not specified, this is inferred automatically:\n * - `true` when the collection does not contain any `blocks` fields\n * - `false` when the collection does contain `blocks` fields\n */\n installField?: boolean\n\n /**\n * Whether to install the markdown block into any `blocks` fields in the collection.\n *\n * If not specified, this is inferred automatically:\n * - `true` when the collection contains one or more `blocks` fields\n * - `false` when the collection does not contain any `blocks` fields\n *\n * Note: You must still add the MarkdownBlockComponent to your RenderBlocks.tsx\n * or equivalent for the block to render properly.\n */\n installIntoBlocks?: boolean\n}\n\nexport interface PayloadMarkdownConfig {\n /**\n * Add markdown field to collections.\n * Set to `true` to add a field with default options, or an object to configure the field.\n */\n collections?: Partial<Record<CollectionSlug, PayloadMarkdownCollectionConfig | true>>\n\n /**\n * Add a global for markdown block settings, which can be used to provide default configuration values for all markdown in the project.\n */\n config?: ConfigOptions\n\n /**\n * Enable or disable plugin\n * @default false\n */\n enabled?: boolean\n}\n"],"names":[],"mappings":"AAiDA,WAiBC"}