@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.
package/lib/cjs/index.js CHANGED
@@ -1,30 +1,3 @@
1
- var $k7rGe$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
1
  var $k7rGe$sanity = require("sanity");
29
2
  var $k7rGe$sanityicons = require("@sanity/icons");
30
3
  var $k7rGe$reactjsxruntime = require("react/jsx-runtime");
@@ -33,15 +6,12 @@ var $k7rGe$sanityform = require("sanity/form");
33
6
  var $k7rGe$sanityui = require("@sanity/ui");
34
7
  var $k7rGe$styledcomponents = require("styled-components");
35
8
 
36
- function $parcel$interopDefault(a) {
37
- return a && a.__esModule ? a.default : a;
38
- }
39
- function $parcel$defineInteropFlag(a) {
40
- Object.defineProperty(a, '__esModule', {value: true, configurable: true});
41
- }
42
9
  function $parcel$export(e, n, v, s) {
43
10
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
44
11
  }
12
+ function $parcel$interopDefault(a) {
13
+ return a && a.__esModule ? a.default : a;
14
+ }
45
15
  var $parcel$global =
46
16
  typeof globalThis !== 'undefined'
47
17
  ? globalThis
@@ -80,674 +50,12 @@ if (parcelRequire == null) {
80
50
 
81
51
  $parcel$global["parcelRequire07ce"] = parcelRequire;
82
52
  }
83
- parcelRequire.register("lMYyH", function(module, exports) {
84
-
85
- $parcel$defineInteropFlag(module.exports);
86
-
87
- $parcel$export(module.exports, "default", () => $b9b128b60a9c7418$export$2e2bcd8739ae039);
88
-
89
- parcelRequire("kmEYb");
90
-
91
-
92
-
93
-
94
-
95
-
96
-
97
-
98
-
99
-
100
-
101
-
102
-
103
-
104
-
105
-
106
-
107
-
108
-
109
-
110
-
111
-
112
-
113
-
114
-
115
-
116
- var $b9b128b60a9c7418$export$2e2bcd8739ae039 = (0, ($parcel$interopDefault($k7rGe$reactace)));
117
-
118
- });
119
- parcelRequire.register("kmEYb", function(module, exports) {
120
- // Grammar from https://github.com/sanity-io/vscode-sanity
121
- const $8261c675491bb30c$var$rules = {
122
- start: [
123
- {
124
- include: "#query"
125
- },
126
- {
127
- include: "#value"
128
- },
129
- {
130
- include: "#pair"
131
- },
132
- ],
133
- "#query": [
134
- {
135
- include: "#nullary-access-operator"
136
- },
137
- {
138
- include: "#arraylike"
139
- },
140
- {
141
- include: "#pipe"
142
- },
143
- {
144
- include: "#sort-order"
145
- },
146
- {
147
- include: "#filter"
148
- },
149
- ],
150
- "#variable": [
151
- {
152
- token: "variable.other.groq",
153
- regex: /\$[_A-Za-z][_0-9A-Za-z]*/
154
- },
155
- ],
156
- "#keyword": [
157
- {
158
- token: "keyword.other.groq",
159
- regex: /\b(?:asc|desc|in|match)\b/
160
- },
161
- ],
162
- "#comparison": [
163
- {
164
- token: "keyword.operator.comparison.groq",
165
- // eslint-disable-next-line no-div-regex
166
- regex: /==|!=|>=|<=|<!=>|<|>/
167
- },
168
- ],
169
- "#operator": [
170
- {
171
- token: "keyword.operator.arithmetic.groq",
172
- regex: /\+|-|\*{1,2}|\/|%/
173
- },
174
- ],
175
- "#pipe": [
176
- {
177
- token: "keyword.operator.pipe.groq",
178
- regex: /\|/
179
- },
180
- ],
181
- "#logical": [
182
- {
183
- token: "keyword.operator.logical.groq",
184
- regex: /!|&&|\|\|/
185
- },
186
- ],
187
- "#reference": [
188
- {
189
- token: "keyword.operator.reference.groq",
190
- regex: /->/
191
- },
192
- ],
193
- "#pair": [
194
- {
195
- include: "#identifier"
196
- },
197
- {
198
- include: "#value"
199
- },
200
- {
201
- include: "#filter"
202
- },
203
- {
204
- token: "keyword.operator.pair.groq",
205
- regex: /[=]>/
206
- },
207
- ],
208
- "#arraylike": [
209
- {
210
- token: "punctuation.definition.bracket.begin.groq",
211
- regex: /\[/,
212
- push: [
213
- {
214
- token: [
215
- "text",
216
- "keyword.operator.descendant.groq"
217
- ],
218
- regex: /(\])((?:\s*\.)?)/,
219
- next: "pop"
220
- },
221
- {
222
- include: "#range"
223
- },
224
- {
225
- include: "#filter"
226
- },
227
- {
228
- include: "#array-values"
229
- },
230
- ]
231
- },
232
- ],
233
- "#array": [
234
- {
235
- token: "punctuation.definition.bracket.begin.groq",
236
- regex: /\[/,
237
- push: [
238
- {
239
- token: "punctuation.definition.bracket.end.groq",
240
- regex: /\]/,
241
- next: "pop"
242
- },
243
- {
244
- include: "#array-values"
245
- },
246
- {
247
- defaultToken: "meta.structure.array.groq"
248
- },
249
- ]
250
- },
251
- ],
252
- "#range": [
253
- {
254
- token: [
255
- "meta.structure.range.groq",
256
- "constant.numeric.groq",
257
- "meta.structure.range.groq",
258
- "keyword.operator.range.groq",
259
- "meta.structure.range.groq",
260
- "constant.numeric.groq",
261
- "meta.structure.range.groq",
262
- ],
263
- regex: /(\s*)(\d+)(\s*)(\.{2,3})(\s*)(\d+)(\s*)/
264
- },
265
- ],
266
- "#spread": [
267
- {
268
- token: "punctuation.definition.spread.begin.groq",
269
- regex: /\.\.\./,
270
- push: [
271
- {
272
- include: "#array"
273
- },
274
- {
275
- include: "#function-call"
276
- },
277
- {
278
- include: "#projection"
279
- },
280
- {
281
- token: "punctuation.definition.spread.end.groq",
282
- regex: /(?=.)/,
283
- next: "pop"
284
- },
285
- {
286
- defaultToken: "meta.structure.spread.groq"
287
- },
288
- ]
289
- },
290
- ],
291
- "#array-values": [
292
- {
293
- include: "#value"
294
- },
295
- {
296
- include: "#spread"
297
- },
298
- {
299
- token: "punctuation.separator.array.groq",
300
- regex: /,/
301
- },
302
- {
303
- token: "invalid.illegal.expected-array-separator.groq",
304
- regex: /[^\s\]]/
305
- },
306
- ],
307
- "#filter": [
308
- {
309
- include: "#function-call"
310
- },
311
- {
312
- include: "#keyword"
313
- },
314
- {
315
- include: "#constant"
316
- },
317
- {
318
- include: "#identifier"
319
- },
320
- {
321
- include: "#value"
322
- },
323
- {
324
- include: "#comparison"
325
- },
326
- {
327
- include: "#operator"
328
- },
329
- {
330
- include: "#logical"
331
- },
332
- ],
333
- "#comments": [
334
- {
335
- token: [
336
- "punctuation.definition.comment.groq",
337
- "comment.line.double-slash.js"
338
- ],
339
- regex: /(\/\/)(.*$)/
340
- },
341
- ],
342
- "#nullary-access-operator": [
343
- {
344
- token: "constant.language.groq",
345
- regex: /[*@^]/
346
- },
347
- ],
348
- "#constant": [
349
- {
350
- token: "constant.language.groq",
351
- regex: /\b(?:true|false|null)\b/
352
- },
353
- ],
354
- "#number": [
355
- {
356
- token: "constant.numeric.groq",
357
- regex: /-?(?:0|[1-9]\d*)(?:(?:\.\d+)?(?:[eE][+-]?\d+)?)?/
358
- },
359
- ],
360
- "#named-projection": [
361
- {
362
- include: "#identifier"
363
- },
364
- {
365
- include: "#objectkey"
366
- },
367
- {
368
- include: "#projection"
369
- },
370
- ],
371
- "#projection": [
372
- {
373
- token: "punctuation.definition.projection.begin.groq",
374
- regex: /\{/,
375
- push: [
376
- {
377
- token: "punctuation.definition.projection.end.groq",
378
- regex: /\}/,
379
- next: "pop"
380
- },
381
- {
382
- include: "#identifier"
383
- },
384
- {
385
- include: "#objectkey"
386
- },
387
- {
388
- include: "#named-projection"
389
- },
390
- {
391
- include: "#comments"
392
- },
393
- {
394
- include: "#spread"
395
- },
396
- {
397
- include: "#pair"
398
- },
399
- {
400
- token: "punctuation.separator.projection.key-value.groq",
401
- regex: /:/,
402
- push: [
403
- {
404
- token: "punctuation.separator.projection.pair.groq",
405
- regex: /,|(?=\})/,
406
- next: "pop"
407
- },
408
- {
409
- include: "#nullary-access-operator"
410
- },
411
- {
412
- include: "#arraylike"
413
- },
414
- {
415
- include: "#value"
416
- },
417
- {
418
- include: "#spread"
419
- },
420
- {
421
- include: "#identifier"
422
- },
423
- {
424
- include: "#operator"
425
- },
426
- {
427
- include: "#comparison"
428
- },
429
- {
430
- include: "#pair"
431
- },
432
- {
433
- token: "invalid.illegal.expected-projection-separator.groq",
434
- regex: /[^\s,]/
435
- },
436
- {
437
- defaultToken: "meta.structure.projection.value.groq"
438
- },
439
- ]
440
- },
441
- {
442
- token: "invalid.illegal.expected-projection-separator.groq",
443
- regex: /[^\s},]/
444
- },
445
- {
446
- defaultToken: "meta.structure.projection.groq"
447
- },
448
- ]
449
- },
450
- ],
451
- "#string": [
452
- {
453
- include: "#single-string"
454
- },
455
- {
456
- include: "#double-string"
457
- },
458
- ],
459
- "#double-string": [
460
- {
461
- token: "punctuation.definition.string.begin.groq",
462
- regex: /"/,
463
- push: [
464
- {
465
- token: "punctuation.definition.string.end.groq",
466
- regex: /"/,
467
- next: "pop"
468
- },
469
- {
470
- include: "#stringcontent"
471
- },
472
- {
473
- defaultToken: "string.quoted.double.groq"
474
- },
475
- ]
476
- },
477
- ],
478
- "#single-string": [
479
- {
480
- token: "punctuation.definition.string.single.begin.groq",
481
- regex: /'/,
482
- push: [
483
- {
484
- token: "punctuation.definition.string.single.end.groq",
485
- regex: /'/,
486
- next: "pop"
487
- },
488
- {
489
- include: "#stringcontent"
490
- },
491
- {
492
- defaultToken: "string.quoted.single.groq"
493
- },
494
- ]
495
- },
496
- ],
497
- "#objectkey": [
498
- {
499
- include: "#string"
500
- },
501
- ],
502
- "#stringcontent": [
503
- {
504
- token: "constant.character.escape.groq",
505
- regex: /\\(?:["\\/bfnrt]|u[0-9a-fA-F]{4})/
506
- },
507
- {
508
- token: "invalid.illegal.unrecognized-string-escape.groq",
509
- regex: /\\./
510
- },
511
- ],
512
- "#sort-pair": [
513
- {
514
- token: [
515
- "variable.other.readwrite.groq",
516
- "text",
517
- "keyword.other.groq"
518
- ],
519
- regex: /([_A-Za-z][_0-9A-Za-z]*)(?:(\s*)(asc|desc))?/
520
- },
521
- {
522
- token: [
523
- "constant.language.groq",
524
- "punctuation.definition.bracket.begin.groq"
525
- ],
526
- regex: /(@)(\[)/,
527
- push: [
528
- {
529
- token: [
530
- "punctuation.definition.bracket.begin.groq",
531
- "text",
532
- "keyword.other.groq"
533
- ],
534
- regex: /(\])(?:(\s*)(asc|desc))?/,
535
- next: "pop"
536
- },
537
- {
538
- include: "#string"
539
- },
540
- ]
541
- },
542
- ],
543
- "#sort-order": [
544
- {
545
- token: "support.function.sortorder.begin.groq",
546
- regex: /\border\s*\(/,
547
- push: [
548
- {
549
- token: "support.function.sortorder.end.groq",
550
- regex: /\)/,
551
- next: "pop"
552
- },
553
- {
554
- include: "#sort-pair"
555
- },
556
- {
557
- token: "punctuation.separator.array.groq",
558
- regex: /,/
559
- },
560
- {
561
- token: "invalid.illegal.expected-sort-separator.groq",
562
- regex: /[^\s\]]/
563
- },
564
- {
565
- defaultToken: "support.function.sortorder.groq"
566
- },
567
- ]
568
- },
569
- ],
570
- "#function-call": [
571
- {
572
- include: "#function-var-arg"
573
- },
574
- {
575
- include: "#function-single-arg"
576
- },
577
- {
578
- include: "#function-round"
579
- },
580
- ],
581
- "#function-var-arg": [
582
- {
583
- token: "support.function.vararg.begin.groq",
584
- regex: /\b(?:coalesce|select)\s*\(/,
585
- push: [
586
- {
587
- token: "support.function.vararg.end.groq",
588
- regex: /\)/,
589
- next: "pop"
590
- },
591
- {
592
- include: "#value"
593
- },
594
- {
595
- include: "#identifier"
596
- },
597
- {
598
- include: "#filter"
599
- },
600
- {
601
- include: "#pair"
602
- },
603
- {
604
- token: "punctuation.separator.array.groq",
605
- regex: /,/
606
- },
607
- {
608
- defaultToken: "support.function.vararg.groq"
609
- },
610
- ]
611
- },
612
- ],
613
- "#function-single-arg": [
614
- {
615
- token: "support.function.singlearg.begin.groq",
616
- regex: /\b(?:count|defined|length|path|references)\s*\(/,
617
- push: [
618
- {
619
- token: "support.function.singlearg.end.groq",
620
- regex: /\)/,
621
- next: "pop"
622
- },
623
- {
624
- include: "#query"
625
- },
626
- {
627
- include: "#identifier"
628
- },
629
- {
630
- include: "#value"
631
- },
632
- {
633
- include: "#pair"
634
- },
635
- {
636
- defaultToken: "support.function.singlearg.groq"
637
- },
638
- ]
639
- },
640
- ],
641
- "#identifier": [
642
- {
643
- token: [
644
- "variable.other.readwrite.groq",
645
- "text",
646
- "punctuation.definition.block.js",
647
- "text",
648
- "keyword.operator.reference.groq",
649
- ],
650
- regex: /([_A-Za-z][_0-9A-Za-z]*)(\s*)((?:\[\s*\])?)(\s*)(->)/
651
- },
652
- {
653
- token: [
654
- "variable.other.readwrite.groq",
655
- "constant.language.groq",
656
- "text",
657
- "punctuation.definition.block.js",
658
- "text",
659
- "keyword.operator.descendant.groq",
660
- ],
661
- regex: /(?:([_A-Za-z][_0-9A-Za-z]*)|([@^]))(\s*)((?:\[\s*\])?)(\s*)(\.)/
662
- },
663
- {
664
- token: "variable.other.readwrite.groq",
665
- regex: /[_A-Za-z][_0-9A-Za-z]*/
666
- },
667
- ],
668
- "#value": [
669
- {
670
- include: "#constant"
671
- },
672
- {
673
- include: "#number"
674
- },
675
- {
676
- include: "#string"
677
- },
678
- {
679
- include: "#array"
680
- },
681
- {
682
- include: "#variable"
683
- },
684
- {
685
- include: "#projection"
686
- },
687
- {
688
- include: "#comments"
689
- },
690
- {
691
- include: "#function-call"
692
- },
693
- ]
694
- };
695
- ace.define("ace/mode/groq_highlight_rules", [
696
- "require",
697
- "exports",
698
- "module",
699
- "ace/lib/oop",
700
- "ace/mode/text_highlight_rules"
701
- ], (acequire, exports, _module)=>{
702
- const oop = acequire("../lib/oop");
703
- const TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules;
704
- const GroqHighlightRules = function() {
705
- /* eslint-disable @typescript-eslint/ban-ts-comment */ // @ts-ignore
706
- this.$rules = $8261c675491bb30c$var$rules;
707
- // @ts-ignore
708
- this.normalizeRules();
709
- /* eslint-enable @typescript-eslint/ban-ts-comment */ };
710
- oop.inherits(GroqHighlightRules, TextHighlightRules);
711
- exports.GroqHighlightRules = GroqHighlightRules;
712
- });
713
- ace.define("ace/mode/groq", [
714
- "require",
715
- "exports",
716
- "module",
717
- "ace/lib/oop",
718
- "ace/mode/text",
719
- "ace/tokenizer",
720
- "ace/mode/groq_highlight_rules",
721
- "ace/mode/folding/cstyle",
722
- ], (acequire, exports, _module)=>{
723
- // eslint-disable-next-line strict
724
- "use strict";
725
- const oop = acequire("../lib/oop");
726
- const TextMode = acequire("./text").Mode;
727
- const Tokenizer = acequire("../tokenizer").Tokenizer;
728
- const GroqHighlightRules = acequire("./groq_highlight_rules").GroqHighlightRules;
729
- const FoldMode = acequire("./folding/cstyle").FoldMode;
730
- const Mode = function() {
731
- /* eslint-disable @typescript-eslint/ban-ts-comment */ const highlighter = new GroqHighlightRules();
732
- // @ts-ignore
733
- this.foldingRules = new FoldMode();
734
- // @ts-ignore
735
- this.$tokenizer = new Tokenizer(highlighter.getRules());
736
- // @ts-ignore
737
- this.$keywordList = highlighter.$keywordList;
738
- /* eslint-enable @typescript-eslint/ban-ts-comment */ };
739
- oop.inherits(Mode, TextMode);
740
- (function() {
741
- /* eslint-disable @typescript-eslint/ban-ts-comment */ // @ts-ignore
742
- this.lineCommentStart = "'";
743
- /* eslint-enable @typescript-eslint/ban-ts-comment */ }).call(Mode.prototype);
744
- exports.Mode = Mode;
745
- });
53
+ parcelRequire.register("6yFRo", function(module, exports) {
54
+ module.exports = Promise.resolve(require("./editorSupport.bbd31eae.js")).then(()=>parcelRequire("lMYyH"));
746
55
 
747
56
  });
748
57
 
749
58
 
750
-
751
59
  $parcel$export(module.exports, "codeInput", () => $244e63ca53592e4d$export$d18430c17c97a000);
752
60
  $parcel$export(module.exports, "PreviewCode", () => $15530f24e7c40879$export$2e2bcd8739ae039);
753
61
 
@@ -906,7 +214,7 @@ const $8fdae771dbccc774$export$4f74600301fa25db = [
906
214
 
907
215
 
908
216
 
909
- const $8b53187504760ea8$export$476686f2cdb5577f = /*#__PURE__*/ (0, ($parcel$interopDefault($k7rGe$react))).lazy(()=>Promise.resolve((parcelRequire("lMYyH"))));
217
+ const $8b53187504760ea8$export$476686f2cdb5577f = /*#__PURE__*/ (0, ($parcel$interopDefault($k7rGe$react))).lazy(()=>(parcelRequire("6yFRo")));
910
218
  function $8b53187504760ea8$export$99999bc9085b44fd() {
911
219
  const [mounted, setMounted] = (0, $k7rGe$react.useState)(false);
912
220
  (0, $k7rGe$react.useEffect)(()=>{
@@ -1088,32 +396,28 @@ function $293e4fb68be52bc5$export$20d4ca75cb144ab0(props) {
1088
396
  radius: 1,
1089
397
  shadow: 1,
1090
398
  readOnly: readOnly,
1091
- children: AceEditor && /*#__PURE__*/ (0, $k7rGe$reactjsxruntime.jsxs)((0, $k7rGe$react.Suspense), {
399
+ children: AceEditor && /*#__PURE__*/ (0, $k7rGe$reactjsxruntime.jsx)((0, $k7rGe$react.Suspense), {
1092
400
  fallback: /*#__PURE__*/ (0, $k7rGe$reactjsxruntime.jsx)("div", {
1093
401
  children: "Loading code editor..."
1094
402
  }),
1095
- children: [
1096
- "(",
1097
- /*#__PURE__*/ (0, $k7rGe$reactjsxruntime.jsx)(AceEditor, {
1098
- ref: aceEditorRef,
1099
- mode: mode1,
1100
- theme: theme,
1101
- width: "100%",
1102
- onChange: handleCodeChange,
1103
- name: inputProps.id,
1104
- value: inputProps.value,
1105
- markers: value && value.highlightedLines ? (0, $470a71f5fffbba1a$export$2e2bcd8739ae039)(value.highlightedLines) : undefined,
1106
- onLoad: handleEditorLoad,
1107
- readOnly: readOnly,
1108
- tabSize: 2,
1109
- wrapEnabled: true,
1110
- setOptions: (0, $8fdae771dbccc774$export$1d910bb34606e145),
1111
- editorProps: (0, $8fdae771dbccc774$export$24aa1be5d8c3cd08),
1112
- onFocus: handleCodeFocus,
1113
- onBlur: onBlur
1114
- }),
1115
- ")"
1116
- ]
403
+ children: /*#__PURE__*/ (0, $k7rGe$reactjsxruntime.jsx)(AceEditor, {
404
+ ref: aceEditorRef,
405
+ mode: mode1,
406
+ theme: theme,
407
+ width: "100%",
408
+ onChange: handleCodeChange,
409
+ name: inputProps.id,
410
+ value: inputProps.value,
411
+ markers: value && value.highlightedLines ? (0, $470a71f5fffbba1a$export$2e2bcd8739ae039)(value.highlightedLines) : undefined,
412
+ onLoad: handleEditorLoad,
413
+ readOnly: readOnly,
414
+ tabSize: 2,
415
+ wrapEnabled: true,
416
+ setOptions: (0, $8fdae771dbccc774$export$1d910bb34606e145),
417
+ editorProps: (0, $8fdae771dbccc774$export$24aa1be5d8c3cd08),
418
+ onFocus: handleCodeFocus,
419
+ onBlur: onBlur
420
+ })
1117
421
  })
1118
422
  });
1119
423
  }, [
@@ -1163,7 +467,6 @@ function $293e4fb68be52bc5$export$20d4ca75cb144ab0(props) {
1163
467
 
1164
468
 
1165
469
 
1166
- parcelRequire("lMYyH");
1167
470
  const $15530f24e7c40879$var$PreviewContainer = (0, ($parcel$interopDefault($k7rGe$styledcomponents)))((0, $k7rGe$sanityui.Box))`
1168
471
  position: relative;
1169
472
  `;
@@ -1198,28 +501,34 @@ function $15530f24e7c40879$export$2e2bcd8739ae039(props) {
1198
501
  const { value: value , type: type } = props;
1199
502
  const fixedLanguage = type?.options?.language;
1200
503
  const mode = value?.language || fixedLanguage || "text";
504
+ const AceEditor = (0, $8b53187504760ea8$export$99999bc9085b44fd)();
1201
505
  return /*#__PURE__*/ (0, $k7rGe$reactjsxruntime.jsx)($15530f24e7c40879$var$PreviewContainer, {
1202
506
  children: /*#__PURE__*/ (0, $k7rGe$reactjsxruntime.jsx)($15530f24e7c40879$var$PreviewInner, {
1203
507
  padding: 4,
1204
- children: /*#__PURE__*/ (0, $k7rGe$reactjsxruntime.jsx)((0, ($parcel$interopDefault($k7rGe$reactace))), {
1205
- ref: aceEditorRef,
1206
- focus: false,
1207
- mode: mode,
1208
- theme: "monokai",
1209
- width: "100%",
1210
- onChange: handleEditorChange,
1211
- maxLines: 200,
1212
- readOnly: true,
1213
- wrapEnabled: true,
1214
- showPrintMargin: false,
1215
- highlightActiveLine: false,
1216
- cursorStart: -1,
1217
- value: value && value.code || "",
1218
- markers: value && value.highlightedLines ? (0, $470a71f5fffbba1a$export$2e2bcd8739ae039)(value.highlightedLines) : undefined,
1219
- tabSize: 2,
1220
- showGutter: false,
1221
- setOptions: (0, $8fdae771dbccc774$export$1d910bb34606e145),
1222
- editorProps: (0, $8fdae771dbccc774$export$24aa1be5d8c3cd08)
508
+ children: AceEditor && /*#__PURE__*/ (0, $k7rGe$reactjsxruntime.jsx)((0, $k7rGe$react.Suspense), {
509
+ fallback: /*#__PURE__*/ (0, $k7rGe$reactjsxruntime.jsx)("div", {
510
+ children: "Loading code editor..."
511
+ }),
512
+ children: /*#__PURE__*/ (0, $k7rGe$reactjsxruntime.jsx)(AceEditor, {
513
+ ref: aceEditorRef,
514
+ focus: false,
515
+ mode: mode,
516
+ theme: "monokai",
517
+ width: "100%",
518
+ onChange: handleEditorChange,
519
+ maxLines: 200,
520
+ readOnly: true,
521
+ wrapEnabled: true,
522
+ showPrintMargin: false,
523
+ highlightActiveLine: false,
524
+ cursorStart: -1,
525
+ value: value && value.code || "",
526
+ markers: value && value.highlightedLines ? (0, $470a71f5fffbba1a$export$2e2bcd8739ae039)(value.highlightedLines) : undefined,
527
+ tabSize: 2,
528
+ showGutter: false,
529
+ setOptions: (0, $8fdae771dbccc774$export$1d910bb34606e145),
530
+ editorProps: (0, $8fdae771dbccc774$export$24aa1be5d8c3cd08)
531
+ })
1223
532
  })
1224
533
  })
1225
534
  });