@sanity/code-input 3.0.0-v3-studio.6 → 3.0.0-v3-studio-async-test.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.
@@ -0,0 +1,717 @@
1
+ var $5uAVv$reactace = require("react-ace");
2
+ require("ace-builds/src-noconflict/mode-batchfile");
3
+ require("ace-builds/src-noconflict/mode-csharp");
4
+ require("ace-builds/src-noconflict/mode-css");
5
+ require("ace-builds/src-noconflict/mode-golang");
6
+ require("ace-builds/src-noconflict/mode-html");
7
+ require("ace-builds/src-noconflict/mode-java");
8
+ require("ace-builds/src-noconflict/mode-javascript");
9
+ require("ace-builds/src-noconflict/mode-json");
10
+ require("ace-builds/src-noconflict/mode-jsx");
11
+ require("ace-builds/src-noconflict/mode-markdown");
12
+ require("ace-builds/src-noconflict/mode-mysql");
13
+ require("ace-builds/src-noconflict/mode-php");
14
+ require("ace-builds/src-noconflict/mode-python");
15
+ require("ace-builds/src-noconflict/mode-ruby");
16
+ require("ace-builds/src-noconflict/mode-sass");
17
+ require("ace-builds/src-noconflict/mode-scss");
18
+ require("ace-builds/src-noconflict/mode-sh");
19
+ require("ace-builds/src-noconflict/mode-text");
20
+ require("ace-builds/src-noconflict/mode-tsx");
21
+ require("ace-builds/src-noconflict/mode-typescript");
22
+ require("ace-builds/src-noconflict/mode-xml");
23
+ require("ace-builds/src-noconflict/mode-yaml");
24
+ require("ace-builds/src-noconflict/theme-github");
25
+ require("ace-builds/src-noconflict/theme-monokai");
26
+ require("ace-builds/src-noconflict/theme-terminal");
27
+ require("ace-builds/src-noconflict/theme-tomorrow");
28
+
29
+ function $parcel$interopDefault(a) {
30
+ return a && a.__esModule ? a.default : a;
31
+ }
32
+ function $parcel$defineInteropFlag(a) {
33
+ Object.defineProperty(a, '__esModule', {value: true, configurable: true});
34
+ }
35
+ function $parcel$export(e, n, v, s) {
36
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
37
+ }
38
+ var $parcel$global =
39
+ typeof globalThis !== 'undefined'
40
+ ? globalThis
41
+ : typeof self !== 'undefined'
42
+ ? self
43
+ : typeof window !== 'undefined'
44
+ ? window
45
+ : typeof global !== 'undefined'
46
+ ? global
47
+ : {};
48
+ var parcelRequire = $parcel$global["parcelRequire07ce"];
49
+ parcelRequire.register("lMYyH", function(module, exports) {
50
+
51
+ $parcel$defineInteropFlag(module.exports);
52
+
53
+ $parcel$export(module.exports, "default", () => $b9b128b60a9c7418$export$2e2bcd8739ae039);
54
+
55
+ parcelRequire("kmEYb");
56
+
57
+
58
+
59
+
60
+
61
+
62
+
63
+
64
+
65
+
66
+
67
+
68
+
69
+
70
+
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+
81
+
82
+ var $b9b128b60a9c7418$export$2e2bcd8739ae039 = (0, ($parcel$interopDefault($5uAVv$reactace)));
83
+
84
+ });
85
+ parcelRequire.register("kmEYb", function(module, exports) {
86
+ // Grammar from https://github.com/sanity-io/vscode-sanity
87
+ const $8261c675491bb30c$var$rules = {
88
+ start: [
89
+ {
90
+ include: "#query"
91
+ },
92
+ {
93
+ include: "#value"
94
+ },
95
+ {
96
+ include: "#pair"
97
+ },
98
+ ],
99
+ "#query": [
100
+ {
101
+ include: "#nullary-access-operator"
102
+ },
103
+ {
104
+ include: "#arraylike"
105
+ },
106
+ {
107
+ include: "#pipe"
108
+ },
109
+ {
110
+ include: "#sort-order"
111
+ },
112
+ {
113
+ include: "#filter"
114
+ },
115
+ ],
116
+ "#variable": [
117
+ {
118
+ token: "variable.other.groq",
119
+ regex: /\$[_A-Za-z][_0-9A-Za-z]*/
120
+ },
121
+ ],
122
+ "#keyword": [
123
+ {
124
+ token: "keyword.other.groq",
125
+ regex: /\b(?:asc|desc|in|match)\b/
126
+ },
127
+ ],
128
+ "#comparison": [
129
+ {
130
+ token: "keyword.operator.comparison.groq",
131
+ // eslint-disable-next-line no-div-regex
132
+ regex: /==|!=|>=|<=|<!=>|<|>/
133
+ },
134
+ ],
135
+ "#operator": [
136
+ {
137
+ token: "keyword.operator.arithmetic.groq",
138
+ regex: /\+|-|\*{1,2}|\/|%/
139
+ },
140
+ ],
141
+ "#pipe": [
142
+ {
143
+ token: "keyword.operator.pipe.groq",
144
+ regex: /\|/
145
+ },
146
+ ],
147
+ "#logical": [
148
+ {
149
+ token: "keyword.operator.logical.groq",
150
+ regex: /!|&&|\|\|/
151
+ },
152
+ ],
153
+ "#reference": [
154
+ {
155
+ token: "keyword.operator.reference.groq",
156
+ regex: /->/
157
+ },
158
+ ],
159
+ "#pair": [
160
+ {
161
+ include: "#identifier"
162
+ },
163
+ {
164
+ include: "#value"
165
+ },
166
+ {
167
+ include: "#filter"
168
+ },
169
+ {
170
+ token: "keyword.operator.pair.groq",
171
+ regex: /[=]>/
172
+ },
173
+ ],
174
+ "#arraylike": [
175
+ {
176
+ token: "punctuation.definition.bracket.begin.groq",
177
+ regex: /\[/,
178
+ push: [
179
+ {
180
+ token: [
181
+ "text",
182
+ "keyword.operator.descendant.groq"
183
+ ],
184
+ regex: /(\])((?:\s*\.)?)/,
185
+ next: "pop"
186
+ },
187
+ {
188
+ include: "#range"
189
+ },
190
+ {
191
+ include: "#filter"
192
+ },
193
+ {
194
+ include: "#array-values"
195
+ },
196
+ ]
197
+ },
198
+ ],
199
+ "#array": [
200
+ {
201
+ token: "punctuation.definition.bracket.begin.groq",
202
+ regex: /\[/,
203
+ push: [
204
+ {
205
+ token: "punctuation.definition.bracket.end.groq",
206
+ regex: /\]/,
207
+ next: "pop"
208
+ },
209
+ {
210
+ include: "#array-values"
211
+ },
212
+ {
213
+ defaultToken: "meta.structure.array.groq"
214
+ },
215
+ ]
216
+ },
217
+ ],
218
+ "#range": [
219
+ {
220
+ token: [
221
+ "meta.structure.range.groq",
222
+ "constant.numeric.groq",
223
+ "meta.structure.range.groq",
224
+ "keyword.operator.range.groq",
225
+ "meta.structure.range.groq",
226
+ "constant.numeric.groq",
227
+ "meta.structure.range.groq",
228
+ ],
229
+ regex: /(\s*)(\d+)(\s*)(\.{2,3})(\s*)(\d+)(\s*)/
230
+ },
231
+ ],
232
+ "#spread": [
233
+ {
234
+ token: "punctuation.definition.spread.begin.groq",
235
+ regex: /\.\.\./,
236
+ push: [
237
+ {
238
+ include: "#array"
239
+ },
240
+ {
241
+ include: "#function-call"
242
+ },
243
+ {
244
+ include: "#projection"
245
+ },
246
+ {
247
+ token: "punctuation.definition.spread.end.groq",
248
+ regex: /(?=.)/,
249
+ next: "pop"
250
+ },
251
+ {
252
+ defaultToken: "meta.structure.spread.groq"
253
+ },
254
+ ]
255
+ },
256
+ ],
257
+ "#array-values": [
258
+ {
259
+ include: "#value"
260
+ },
261
+ {
262
+ include: "#spread"
263
+ },
264
+ {
265
+ token: "punctuation.separator.array.groq",
266
+ regex: /,/
267
+ },
268
+ {
269
+ token: "invalid.illegal.expected-array-separator.groq",
270
+ regex: /[^\s\]]/
271
+ },
272
+ ],
273
+ "#filter": [
274
+ {
275
+ include: "#function-call"
276
+ },
277
+ {
278
+ include: "#keyword"
279
+ },
280
+ {
281
+ include: "#constant"
282
+ },
283
+ {
284
+ include: "#identifier"
285
+ },
286
+ {
287
+ include: "#value"
288
+ },
289
+ {
290
+ include: "#comparison"
291
+ },
292
+ {
293
+ include: "#operator"
294
+ },
295
+ {
296
+ include: "#logical"
297
+ },
298
+ ],
299
+ "#comments": [
300
+ {
301
+ token: [
302
+ "punctuation.definition.comment.groq",
303
+ "comment.line.double-slash.js"
304
+ ],
305
+ regex: /(\/\/)(.*$)/
306
+ },
307
+ ],
308
+ "#nullary-access-operator": [
309
+ {
310
+ token: "constant.language.groq",
311
+ regex: /[*@^]/
312
+ },
313
+ ],
314
+ "#constant": [
315
+ {
316
+ token: "constant.language.groq",
317
+ regex: /\b(?:true|false|null)\b/
318
+ },
319
+ ],
320
+ "#number": [
321
+ {
322
+ token: "constant.numeric.groq",
323
+ regex: /-?(?:0|[1-9]\d*)(?:(?:\.\d+)?(?:[eE][+-]?\d+)?)?/
324
+ },
325
+ ],
326
+ "#named-projection": [
327
+ {
328
+ include: "#identifier"
329
+ },
330
+ {
331
+ include: "#objectkey"
332
+ },
333
+ {
334
+ include: "#projection"
335
+ },
336
+ ],
337
+ "#projection": [
338
+ {
339
+ token: "punctuation.definition.projection.begin.groq",
340
+ regex: /\{/,
341
+ push: [
342
+ {
343
+ token: "punctuation.definition.projection.end.groq",
344
+ regex: /\}/,
345
+ next: "pop"
346
+ },
347
+ {
348
+ include: "#identifier"
349
+ },
350
+ {
351
+ include: "#objectkey"
352
+ },
353
+ {
354
+ include: "#named-projection"
355
+ },
356
+ {
357
+ include: "#comments"
358
+ },
359
+ {
360
+ include: "#spread"
361
+ },
362
+ {
363
+ include: "#pair"
364
+ },
365
+ {
366
+ token: "punctuation.separator.projection.key-value.groq",
367
+ regex: /:/,
368
+ push: [
369
+ {
370
+ token: "punctuation.separator.projection.pair.groq",
371
+ regex: /,|(?=\})/,
372
+ next: "pop"
373
+ },
374
+ {
375
+ include: "#nullary-access-operator"
376
+ },
377
+ {
378
+ include: "#arraylike"
379
+ },
380
+ {
381
+ include: "#value"
382
+ },
383
+ {
384
+ include: "#spread"
385
+ },
386
+ {
387
+ include: "#identifier"
388
+ },
389
+ {
390
+ include: "#operator"
391
+ },
392
+ {
393
+ include: "#comparison"
394
+ },
395
+ {
396
+ include: "#pair"
397
+ },
398
+ {
399
+ token: "invalid.illegal.expected-projection-separator.groq",
400
+ regex: /[^\s,]/
401
+ },
402
+ {
403
+ defaultToken: "meta.structure.projection.value.groq"
404
+ },
405
+ ]
406
+ },
407
+ {
408
+ token: "invalid.illegal.expected-projection-separator.groq",
409
+ regex: /[^\s},]/
410
+ },
411
+ {
412
+ defaultToken: "meta.structure.projection.groq"
413
+ },
414
+ ]
415
+ },
416
+ ],
417
+ "#string": [
418
+ {
419
+ include: "#single-string"
420
+ },
421
+ {
422
+ include: "#double-string"
423
+ },
424
+ ],
425
+ "#double-string": [
426
+ {
427
+ token: "punctuation.definition.string.begin.groq",
428
+ regex: /"/,
429
+ push: [
430
+ {
431
+ token: "punctuation.definition.string.end.groq",
432
+ regex: /"/,
433
+ next: "pop"
434
+ },
435
+ {
436
+ include: "#stringcontent"
437
+ },
438
+ {
439
+ defaultToken: "string.quoted.double.groq"
440
+ },
441
+ ]
442
+ },
443
+ ],
444
+ "#single-string": [
445
+ {
446
+ token: "punctuation.definition.string.single.begin.groq",
447
+ regex: /'/,
448
+ push: [
449
+ {
450
+ token: "punctuation.definition.string.single.end.groq",
451
+ regex: /'/,
452
+ next: "pop"
453
+ },
454
+ {
455
+ include: "#stringcontent"
456
+ },
457
+ {
458
+ defaultToken: "string.quoted.single.groq"
459
+ },
460
+ ]
461
+ },
462
+ ],
463
+ "#objectkey": [
464
+ {
465
+ include: "#string"
466
+ },
467
+ ],
468
+ "#stringcontent": [
469
+ {
470
+ token: "constant.character.escape.groq",
471
+ regex: /\\(?:["\\/bfnrt]|u[0-9a-fA-F]{4})/
472
+ },
473
+ {
474
+ token: "invalid.illegal.unrecognized-string-escape.groq",
475
+ regex: /\\./
476
+ },
477
+ ],
478
+ "#sort-pair": [
479
+ {
480
+ token: [
481
+ "variable.other.readwrite.groq",
482
+ "text",
483
+ "keyword.other.groq"
484
+ ],
485
+ regex: /([_A-Za-z][_0-9A-Za-z]*)(?:(\s*)(asc|desc))?/
486
+ },
487
+ {
488
+ token: [
489
+ "constant.language.groq",
490
+ "punctuation.definition.bracket.begin.groq"
491
+ ],
492
+ regex: /(@)(\[)/,
493
+ push: [
494
+ {
495
+ token: [
496
+ "punctuation.definition.bracket.begin.groq",
497
+ "text",
498
+ "keyword.other.groq"
499
+ ],
500
+ regex: /(\])(?:(\s*)(asc|desc))?/,
501
+ next: "pop"
502
+ },
503
+ {
504
+ include: "#string"
505
+ },
506
+ ]
507
+ },
508
+ ],
509
+ "#sort-order": [
510
+ {
511
+ token: "support.function.sortorder.begin.groq",
512
+ regex: /\border\s*\(/,
513
+ push: [
514
+ {
515
+ token: "support.function.sortorder.end.groq",
516
+ regex: /\)/,
517
+ next: "pop"
518
+ },
519
+ {
520
+ include: "#sort-pair"
521
+ },
522
+ {
523
+ token: "punctuation.separator.array.groq",
524
+ regex: /,/
525
+ },
526
+ {
527
+ token: "invalid.illegal.expected-sort-separator.groq",
528
+ regex: /[^\s\]]/
529
+ },
530
+ {
531
+ defaultToken: "support.function.sortorder.groq"
532
+ },
533
+ ]
534
+ },
535
+ ],
536
+ "#function-call": [
537
+ {
538
+ include: "#function-var-arg"
539
+ },
540
+ {
541
+ include: "#function-single-arg"
542
+ },
543
+ {
544
+ include: "#function-round"
545
+ },
546
+ ],
547
+ "#function-var-arg": [
548
+ {
549
+ token: "support.function.vararg.begin.groq",
550
+ regex: /\b(?:coalesce|select)\s*\(/,
551
+ push: [
552
+ {
553
+ token: "support.function.vararg.end.groq",
554
+ regex: /\)/,
555
+ next: "pop"
556
+ },
557
+ {
558
+ include: "#value"
559
+ },
560
+ {
561
+ include: "#identifier"
562
+ },
563
+ {
564
+ include: "#filter"
565
+ },
566
+ {
567
+ include: "#pair"
568
+ },
569
+ {
570
+ token: "punctuation.separator.array.groq",
571
+ regex: /,/
572
+ },
573
+ {
574
+ defaultToken: "support.function.vararg.groq"
575
+ },
576
+ ]
577
+ },
578
+ ],
579
+ "#function-single-arg": [
580
+ {
581
+ token: "support.function.singlearg.begin.groq",
582
+ regex: /\b(?:count|defined|length|path|references)\s*\(/,
583
+ push: [
584
+ {
585
+ token: "support.function.singlearg.end.groq",
586
+ regex: /\)/,
587
+ next: "pop"
588
+ },
589
+ {
590
+ include: "#query"
591
+ },
592
+ {
593
+ include: "#identifier"
594
+ },
595
+ {
596
+ include: "#value"
597
+ },
598
+ {
599
+ include: "#pair"
600
+ },
601
+ {
602
+ defaultToken: "support.function.singlearg.groq"
603
+ },
604
+ ]
605
+ },
606
+ ],
607
+ "#identifier": [
608
+ {
609
+ token: [
610
+ "variable.other.readwrite.groq",
611
+ "text",
612
+ "punctuation.definition.block.js",
613
+ "text",
614
+ "keyword.operator.reference.groq",
615
+ ],
616
+ regex: /([_A-Za-z][_0-9A-Za-z]*)(\s*)((?:\[\s*\])?)(\s*)(->)/
617
+ },
618
+ {
619
+ token: [
620
+ "variable.other.readwrite.groq",
621
+ "constant.language.groq",
622
+ "text",
623
+ "punctuation.definition.block.js",
624
+ "text",
625
+ "keyword.operator.descendant.groq",
626
+ ],
627
+ regex: /(?:([_A-Za-z][_0-9A-Za-z]*)|([@^]))(\s*)((?:\[\s*\])?)(\s*)(\.)/
628
+ },
629
+ {
630
+ token: "variable.other.readwrite.groq",
631
+ regex: /[_A-Za-z][_0-9A-Za-z]*/
632
+ },
633
+ ],
634
+ "#value": [
635
+ {
636
+ include: "#constant"
637
+ },
638
+ {
639
+ include: "#number"
640
+ },
641
+ {
642
+ include: "#string"
643
+ },
644
+ {
645
+ include: "#array"
646
+ },
647
+ {
648
+ include: "#variable"
649
+ },
650
+ {
651
+ include: "#projection"
652
+ },
653
+ {
654
+ include: "#comments"
655
+ },
656
+ {
657
+ include: "#function-call"
658
+ },
659
+ ]
660
+ };
661
+ ace.define("ace/mode/groq_highlight_rules", [
662
+ "require",
663
+ "exports",
664
+ "module",
665
+ "ace/lib/oop",
666
+ "ace/mode/text_highlight_rules"
667
+ ], (acequire, exports, _module)=>{
668
+ const oop = acequire("../lib/oop");
669
+ const TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules;
670
+ const GroqHighlightRules = function() {
671
+ /* eslint-disable @typescript-eslint/ban-ts-comment */ // @ts-ignore
672
+ this.$rules = $8261c675491bb30c$var$rules;
673
+ // @ts-ignore
674
+ this.normalizeRules();
675
+ /* eslint-enable @typescript-eslint/ban-ts-comment */ };
676
+ oop.inherits(GroqHighlightRules, TextHighlightRules);
677
+ exports.GroqHighlightRules = GroqHighlightRules;
678
+ });
679
+ ace.define("ace/mode/groq", [
680
+ "require",
681
+ "exports",
682
+ "module",
683
+ "ace/lib/oop",
684
+ "ace/mode/text",
685
+ "ace/tokenizer",
686
+ "ace/mode/groq_highlight_rules",
687
+ "ace/mode/folding/cstyle",
688
+ ], (acequire, exports, _module)=>{
689
+ // eslint-disable-next-line strict
690
+ "use strict";
691
+ const oop = acequire("../lib/oop");
692
+ const TextMode = acequire("./text").Mode;
693
+ const Tokenizer = acequire("../tokenizer").Tokenizer;
694
+ const GroqHighlightRules = acequire("./groq_highlight_rules").GroqHighlightRules;
695
+ const FoldMode = acequire("./folding/cstyle").FoldMode;
696
+ const Mode = function() {
697
+ /* eslint-disable @typescript-eslint/ban-ts-comment */ const highlighter = new GroqHighlightRules();
698
+ // @ts-ignore
699
+ this.foldingRules = new FoldMode();
700
+ // @ts-ignore
701
+ this.$tokenizer = new Tokenizer(highlighter.getRules());
702
+ // @ts-ignore
703
+ this.$keywordList = highlighter.$keywordList;
704
+ /* eslint-enable @typescript-eslint/ban-ts-comment */ };
705
+ oop.inherits(Mode, TextMode);
706
+ (function() {
707
+ /* eslint-disable @typescript-eslint/ban-ts-comment */ // @ts-ignore
708
+ this.lineCommentStart = "'";
709
+ /* eslint-enable @typescript-eslint/ban-ts-comment */ }).call(Mode.prototype);
710
+ exports.Mode = Mode;
711
+ });
712
+
713
+ });
714
+
715
+
716
+
717
+ //# sourceMappingURL=editorSupport.bbd31eae.js.map