@stonecrop/code-editor 0.13.14 → 0.15.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.
Files changed (44) hide show
  1. package/dist/code-editor.css +1 -1
  2. package/dist/code-editor.js +265 -251
  3. package/dist/code-editor.js.map +1 -1
  4. package/dist/src/utils/serialization.d.ts +1 -1
  5. package/dist/src/utils/serialization.d.ts.map +1 -1
  6. package/dist/src/utils/serialization.js +1 -1
  7. package/package.json +28 -26
  8. package/src/components/ACodeEditor.vue +56 -5
  9. package/src/utils/serialization.ts +1 -1
  10. package/dist/assets/editor.worker-Be8ye1pW.js.map +0 -1
  11. package/dist/assets/json.worker-DKiEKt88.js +0 -59
  12. package/dist/assets/json.worker-DKiEKt88.js.map +0 -1
  13. package/dist/code-editor.umd.cjs +0 -12
  14. package/dist/code-editor.umd.cjs.map +0 -1
  15. package/dist/cssWorker-l0sNRNKZ.js +0 -2
  16. package/dist/cssWorker-l0sNRNKZ.js.map +0 -1
  17. package/dist/editor.worker-DwCTOaYH.js +0 -24
  18. package/dist/editor.worker-DwCTOaYH.js.map +0 -1
  19. package/dist/editorWorker-l0sNRNKZ.js +0 -2
  20. package/dist/editorWorker-l0sNRNKZ.js.map +0 -1
  21. package/dist/graphql-DWkL3f8U.js +0 -152
  22. package/dist/graphql-DWkL3f8U.js.map +0 -1
  23. package/dist/graphqlMode-0MXNK8Fk.js +0 -6758
  24. package/dist/graphqlMode-0MXNK8Fk.js.map +0 -1
  25. package/dist/htmlWorker-l0sNRNKZ.js +0 -2
  26. package/dist/htmlWorker-l0sNRNKZ.js.map +0 -1
  27. package/dist/index-DH1yIu_w.js +0 -124799
  28. package/dist/index-DH1yIu_w.js.map +0 -1
  29. package/dist/index.js +0 -10
  30. package/dist/jsonMode-DycJAYy-.js +0 -2066
  31. package/dist/jsonMode-DycJAYy-.js.map +0 -1
  32. package/dist/jsonWorker-l0sNRNKZ.js +0 -2
  33. package/dist/jsonWorker-l0sNRNKZ.js.map +0 -1
  34. package/dist/src/tsdoc-metadata.json +0 -11
  35. package/dist/src/utils/graphql.d.ts +0 -44
  36. package/dist/src/utils/graphql.d.ts.map +0 -1
  37. package/dist/src/utils/graphql.js +0 -38
  38. package/dist/src/utils/language.d.ts +0 -11
  39. package/dist/src/utils/language.d.ts.map +0 -1
  40. package/dist/src/utils/language.js +0 -16
  41. package/dist/theme/code_editor/agritheory.js +0 -350
  42. package/dist/tsWorker-l0sNRNKZ.js +0 -2
  43. package/dist/tsWorker-l0sNRNKZ.js.map +0 -1
  44. package/src/utils/language.ts +0 -14
@@ -1 +0,0 @@
1
- {"version":3,"file":"jsonWorker-l0sNRNKZ.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,11 +0,0 @@
1
- // This file is read by tools that parse documentation comments conforming to the TSDoc standard.
2
- // It should be published with your NPM package. It should not be tracked by Git.
3
- {
4
- "tsdocVersion": "0.12",
5
- "toolPackages": [
6
- {
7
- "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.57.0"
9
- }
10
- ]
11
- }
@@ -1,44 +0,0 @@
1
- import type { SchemaConfig } from 'monaco-graphql';
2
- /**
3
- * Initializes the GraphQL language mode for Monaco. Safe to call multiple
4
- * times — initialization only runs once. Subsequent calls with a schema
5
- * update the active schema.
6
- *
7
- * Consumers must configure `globalThis.MonacoEnvironment.getWorker` before
8
- * creating a GraphQL editor so that the language service worker is available.
9
- * @internal
10
- */
11
- export declare function configureGraphQL(schemaConfig?: SchemaConfig): Promise<void>;
12
- /**
13
- * Lazily loads and returns the Monaco instance from monaco-graphql/monaco-editor.
14
- * @internal
15
- */
16
- export declare function getMonaco(): Promise<{
17
- default: typeof import("monaco-graphql/esm/monaco-editor.js");
18
- CancellationTokenSource: typeof import("monaco-editor").CancellationTokenSource;
19
- Emitter: typeof import("monaco-editor").Emitter;
20
- KeyCode: typeof import("monaco-editor").KeyCode;
21
- KeyMod: typeof import("monaco-editor").KeyMod;
22
- MarkerSeverity: typeof import("monaco-editor").MarkerSeverity;
23
- MarkerTag: typeof import("monaco-editor").MarkerTag;
24
- Position: typeof import("monaco-editor").Position;
25
- Range: typeof import("monaco-editor").Range;
26
- Selection: typeof import("monaco-editor").Selection;
27
- SelectionDirection: typeof import("monaco-editor").SelectionDirection;
28
- Token: typeof import("monaco-editor").Token;
29
- languages: typeof import("monaco-editor").languages;
30
- Uri: typeof import("monaco-editor").Uri;
31
- createWebWorker: typeof import("monaco-editor").createWebWorker;
32
- css: typeof import("monaco-editor").css;
33
- editor: typeof import("monaco-editor").editor;
34
- html: typeof import("monaco-editor").html;
35
- json: typeof import("monaco-editor").json;
36
- lsp: typeof import("monaco-editor").lsp;
37
- typescript: typeof import("monaco-editor").typescript;
38
- }>;
39
- /**
40
- * Lazily loads and returns the Monaco editor loader.
41
- * @internal
42
- */
43
- export declare function getLoader(): Promise<typeof import("@monaco-editor/loader").default>;
44
- //# sourceMappingURL=graphql.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"graphql.d.ts","sourceRoot":"","sources":["../../../src/utils/graphql.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAIlD;;;;;;;;GAQG;AACH,wBAAsB,gBAAgB,CAAC,YAAY,CAAC,EAAE,YAAY,iBAajE;AAED;;;GAGG;AACH,wBAAsB,SAAS;;;;;;;;;;;;;;;;;;;;;;GAE9B;AAED;;;GAGG;AACH,wBAAsB,SAAS,4DAG9B"}
@@ -1,38 +0,0 @@
1
- let graphqlInitialized = false;
2
- /**
3
- * Initializes the GraphQL language mode for Monaco. Safe to call multiple
4
- * times — initialization only runs once. Subsequent calls with a schema
5
- * update the active schema.
6
- *
7
- * Consumers must configure `globalThis.MonacoEnvironment.getWorker` before
8
- * creating a GraphQL editor so that the language service worker is available.
9
- * @internal
10
- */
11
- export async function configureGraphQL(schemaConfig) {
12
- if (!graphqlInitialized) {
13
- const { initializeMode } = await import('monaco-graphql/initializeMode');
14
- initializeMode(schemaConfig ? { schemas: [schemaConfig] } : undefined);
15
- graphqlInitialized = true;
16
- }
17
- else if (schemaConfig) {
18
- const monaco = await import('monaco-graphql/monaco-editor');
19
- const { languages } = monaco;
20
- const api = languages.graphql;
21
- api?.api?.setSchemaConfig([schemaConfig]);
22
- }
23
- }
24
- /**
25
- * Lazily loads and returns the Monaco instance from monaco-graphql/monaco-editor.
26
- * @internal
27
- */
28
- export async function getMonaco() {
29
- return import('monaco-graphql/monaco-editor');
30
- }
31
- /**
32
- * Lazily loads and returns the Monaco editor loader.
33
- * @internal
34
- */
35
- export async function getLoader() {
36
- const { default: loader } = await import('@monaco-editor/loader');
37
- return loader;
38
- }
@@ -1,11 +0,0 @@
1
- /**
2
- * Resolves the Monaco language identifier from a Stonecrop fieldtype and an
3
- * optional explicit language override.
4
- *
5
- * - JSON fieldtype always maps to 'json' regardless of the explicit language.
6
- * - Code fieldtype defaults to 'typescript'; the explicit language overrides it.
7
- * - All other fieldtypes use the explicit language, falling back to 'plaintext'.
8
- * @public
9
- */
10
- export declare function detectLanguage(fieldtype?: string, explicitLanguage?: string): string;
11
- //# sourceMappingURL=language.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"language.d.ts","sourceRoot":"","sources":["../../../src/utils/language.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,gBAAgB,CAAC,EAAE,MAAM,GAAG,MAAM,CAIpF"}
@@ -1,16 +0,0 @@
1
- /**
2
- * Resolves the Monaco language identifier from a Stonecrop fieldtype and an
3
- * optional explicit language override.
4
- *
5
- * - JSON fieldtype always maps to 'json' regardless of the explicit language.
6
- * - Code fieldtype defaults to 'typescript'; the explicit language overrides it.
7
- * - All other fieldtypes use the explicit language, falling back to 'plaintext'.
8
- * @public
9
- */
10
- export function detectLanguage(fieldtype, explicitLanguage) {
11
- if (fieldtype === 'JSON')
12
- return 'json';
13
- if (fieldtype === 'Code')
14
- return explicitLanguage ?? 'typescript';
15
- return explicitLanguage ?? 'plaintext';
16
- }
@@ -1,350 +0,0 @@
1
- // picked from https://bitwiser.in/monaco-themes/
2
- // currently set to: Github Light
3
- export const theme = {
4
- base: 'vs',
5
- inherit: true,
6
- colors: {
7
- 'editor.foreground': '#24292e',
8
- 'editor.background': '#ffffff',
9
- 'editor.selectionBackground': '#c8c8fa',
10
- 'editor.inactiveSelectionBackground': '#fafbfc',
11
- 'editor.lineHighlightBackground': '#fafbfc',
12
- 'editorCursor.foreground': '#24292e',
13
- 'editorWhitespace.foreground': '#959da5',
14
- 'editorIndentGuide.background': '#959da5',
15
- 'editorIndentGuide.activeBackground': '#24292e',
16
- 'editor.selectionHighlightBorder': '#fafbfc',
17
- },
18
- rules: [
19
- {
20
- background: 'ffffff',
21
- token: '',
22
- },
23
- {
24
- foreground: '6a737d',
25
- token: 'comment',
26
- },
27
- {
28
- foreground: '6a737d',
29
- token: 'punctuation.definition.comment',
30
- },
31
- {
32
- foreground: '6a737d',
33
- token: 'string.comment',
34
- },
35
- {
36
- foreground: '005cc5',
37
- token: 'constant',
38
- },
39
- {
40
- foreground: '005cc5',
41
- token: 'entity.name.constant',
42
- },
43
- {
44
- foreground: '005cc5',
45
- token: 'variable.other.constant',
46
- },
47
- {
48
- foreground: '005cc5',
49
- token: 'variable.language',
50
- },
51
- {
52
- foreground: '6f42c1',
53
- token: 'entity',
54
- },
55
- {
56
- foreground: '6f42c1',
57
- token: 'entity.name',
58
- },
59
- {
60
- foreground: '24292e',
61
- token: 'variable.parameter.function',
62
- },
63
- {
64
- foreground: '22863a',
65
- token: 'entity.name.tag',
66
- },
67
- {
68
- foreground: 'd73a49',
69
- token: 'keyword',
70
- },
71
- {
72
- foreground: 'd73a49',
73
- token: 'storage',
74
- },
75
- {
76
- foreground: 'd73a49',
77
- token: 'storage.type',
78
- },
79
- {
80
- foreground: '24292e',
81
- token: 'storage.modifier.package',
82
- },
83
- {
84
- foreground: '24292e',
85
- token: 'storage.modifier.import',
86
- },
87
- {
88
- foreground: '24292e',
89
- token: 'storage.type.java',
90
- },
91
- {
92
- foreground: '032f62',
93
- token: 'string',
94
- },
95
- {
96
- foreground: '032f62',
97
- token: 'punctuation.definition.string',
98
- },
99
- {
100
- foreground: '032f62',
101
- token: 'string punctuation.section.embedded source',
102
- },
103
- {
104
- foreground: '005cc5',
105
- token: 'support',
106
- },
107
- {
108
- foreground: '005cc5',
109
- token: 'meta.property-name',
110
- },
111
- {
112
- foreground: 'e36209',
113
- token: 'variable',
114
- },
115
- {
116
- foreground: '24292e',
117
- token: 'variable.other',
118
- },
119
- {
120
- foreground: 'b31d28',
121
- fontStyle: 'bold italic underline',
122
- token: 'invalid.broken',
123
- },
124
- {
125
- foreground: 'b31d28',
126
- fontStyle: 'bold italic underline',
127
- token: 'invalid.deprecated',
128
- },
129
- {
130
- foreground: 'fafbfc',
131
- background: 'b31d28',
132
- fontStyle: 'italic underline',
133
- token: 'invalid.illegal',
134
- },
135
- {
136
- foreground: 'fafbfc',
137
- background: 'd73a49',
138
- fontStyle: 'italic underline',
139
- token: 'carriage-return',
140
- },
141
- {
142
- foreground: 'b31d28',
143
- fontStyle: 'bold italic underline',
144
- token: 'invalid.unimplemented',
145
- },
146
- {
147
- foreground: 'b31d28',
148
- token: 'message.error',
149
- },
150
- {
151
- foreground: '24292e',
152
- token: 'string source',
153
- },
154
- {
155
- foreground: '005cc5',
156
- token: 'string variable',
157
- },
158
- {
159
- foreground: '032f62',
160
- token: 'source.regexp',
161
- },
162
- {
163
- foreground: '032f62',
164
- token: 'string.regexp',
165
- },
166
- {
167
- foreground: '032f62',
168
- token: 'string.regexp.character-class',
169
- },
170
- {
171
- foreground: '032f62',
172
- token: 'string.regexp constant.character.escape',
173
- },
174
- {
175
- foreground: '032f62',
176
- token: 'string.regexp source.ruby.embedded',
177
- },
178
- {
179
- foreground: '032f62',
180
- token: 'string.regexp string.regexp.arbitrary-repitition',
181
- },
182
- {
183
- foreground: '22863a',
184
- fontStyle: 'bold',
185
- token: 'string.regexp constant.character.escape',
186
- },
187
- {
188
- foreground: '005cc5',
189
- token: 'support.constant',
190
- },
191
- {
192
- foreground: '005cc5',
193
- token: 'support.variable',
194
- },
195
- {
196
- foreground: '005cc5',
197
- token: 'meta.module-reference',
198
- },
199
- {
200
- foreground: '735c0f',
201
- token: 'markup.list',
202
- },
203
- {
204
- foreground: '005cc5',
205
- fontStyle: 'bold',
206
- token: 'markup.heading',
207
- },
208
- {
209
- foreground: '005cc5',
210
- fontStyle: 'bold',
211
- token: 'markup.heading entity.name',
212
- },
213
- {
214
- foreground: '22863a',
215
- token: 'markup.quote',
216
- },
217
- {
218
- foreground: '24292e',
219
- fontStyle: 'italic',
220
- token: 'markup.italic',
221
- },
222
- {
223
- foreground: '24292e',
224
- fontStyle: 'bold',
225
- token: 'markup.bold',
226
- },
227
- {
228
- foreground: '005cc5',
229
- token: 'markup.raw',
230
- },
231
- {
232
- foreground: 'b31d28',
233
- background: 'ffeef0',
234
- token: 'markup.deleted',
235
- },
236
- {
237
- foreground: 'b31d28',
238
- background: 'ffeef0',
239
- token: 'meta.diff.header.from-file',
240
- },
241
- {
242
- foreground: 'b31d28',
243
- background: 'ffeef0',
244
- token: 'punctuation.definition.deleted',
245
- },
246
- {
247
- foreground: '22863a',
248
- background: 'f0fff4',
249
- token: 'markup.inserted',
250
- },
251
- {
252
- foreground: '22863a',
253
- background: 'f0fff4',
254
- token: 'meta.diff.header.to-file',
255
- },
256
- {
257
- foreground: '22863a',
258
- background: 'f0fff4',
259
- token: 'punctuation.definition.inserted',
260
- },
261
- {
262
- foreground: 'e36209',
263
- background: 'ffebda',
264
- token: 'markup.changed',
265
- },
266
- {
267
- foreground: 'e36209',
268
- background: 'ffebda',
269
- token: 'punctuation.definition.changed',
270
- },
271
- {
272
- foreground: 'f6f8fa',
273
- background: '005cc5',
274
- token: 'markup.ignored',
275
- },
276
- {
277
- foreground: 'f6f8fa',
278
- background: '005cc5',
279
- token: 'markup.untracked',
280
- },
281
- {
282
- foreground: '6f42c1',
283
- fontStyle: 'bold',
284
- token: 'meta.diff.range',
285
- },
286
- {
287
- foreground: '005cc5',
288
- token: 'meta.diff.header',
289
- },
290
- {
291
- foreground: '005cc5',
292
- fontStyle: 'bold',
293
- token: 'meta.separator',
294
- },
295
- {
296
- foreground: '005cc5',
297
- token: 'meta.output',
298
- },
299
- {
300
- foreground: '586069',
301
- token: 'brackethighlighter.tag',
302
- },
303
- {
304
- foreground: '586069',
305
- token: 'brackethighlighter.curly',
306
- },
307
- {
308
- foreground: '586069',
309
- token: 'brackethighlighter.round',
310
- },
311
- {
312
- foreground: '586069',
313
- token: 'brackethighlighter.square',
314
- },
315
- {
316
- foreground: '586069',
317
- token: 'brackethighlighter.angle',
318
- },
319
- {
320
- foreground: '586069',
321
- token: 'brackethighlighter.quote',
322
- },
323
- {
324
- foreground: 'b31d28',
325
- token: 'brackethighlighter.unmatched',
326
- },
327
- {
328
- foreground: 'b31d28',
329
- token: 'sublimelinter.mark.error',
330
- },
331
- {
332
- foreground: 'e36209',
333
- token: 'sublimelinter.mark.warning',
334
- },
335
- {
336
- foreground: '959da5',
337
- token: 'sublimelinter.gutter-mark',
338
- },
339
- {
340
- foreground: '032f62',
341
- fontStyle: 'underline',
342
- token: 'constant.other.reference.link',
343
- },
344
- {
345
- foreground: '032f62',
346
- fontStyle: 'underline',
347
- token: 'string.other.link',
348
- },
349
- ],
350
- };
@@ -1,2 +0,0 @@
1
-
2
- //# sourceMappingURL=tsWorker-l0sNRNKZ.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tsWorker-l0sNRNKZ.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,14 +0,0 @@
1
- /**
2
- * Resolves the Monaco language identifier from a Stonecrop fieldtype and an
3
- * optional explicit language override.
4
- *
5
- * - JSON fieldtype always maps to 'json' regardless of the explicit language.
6
- * - Code fieldtype defaults to 'typescript'; the explicit language overrides it.
7
- * - All other fieldtypes use the explicit language, falling back to 'plaintext'.
8
- * @public
9
- */
10
- export function detectLanguage(fieldtype?: string, explicitLanguage?: string): string {
11
- if (fieldtype === 'JSON') return 'json'
12
- if (fieldtype === 'Code') return explicitLanguage ?? 'typescript'
13
- return explicitLanguage ?? 'plaintext'
14
- }