@oxide/design-system 1.7.5--canary.c2c34ee.0 → 1.7.6--canary.20ca776.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.
@@ -112,6 +112,1549 @@ import { jsx as jsx2 } from "react/jsx-runtime";
112
112
  var Table = ({ node }) => /* @__PURE__ */ jsx2("div", { className: "table-wrapper", children: /* @__PURE__ */ jsx2(InnerTable, { node }) });
113
113
  var Table_default = Table;
114
114
 
115
+ // components/src/asciidoc/util.ts
116
+ import asciidoctor from "@asciidoctor/core";
117
+ import {
118
+ prepareDocument,
119
+ processDocument
120
+ } from "@oxide/react-asciidoc";
121
+ import {
122
+ bundledLanguages,
123
+ getHighlighter
124
+ } from "shiki";
125
+
126
+ // components/src/asciidoc/langs/oxql.tmLanguage.json
127
+ var oxql_tmLanguage_default = {
128
+ $schema: "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
129
+ name: "oxql",
130
+ repository: {
131
+ keywords: {
132
+ patterns: [
133
+ {
134
+ name: "keyword.control.oxql",
135
+ match: "\\b(if|while|for|return)\\b"
136
+ }
137
+ ]
138
+ },
139
+ strings: {
140
+ name: "string.quoted.double.oxql",
141
+ begin: '"',
142
+ end: '"',
143
+ patterns: [
144
+ {
145
+ name: "constant.character.escape.oxql",
146
+ match: "\\\\."
147
+ }
148
+ ]
149
+ }
150
+ },
151
+ scopeName: "source.oxql",
152
+ patterns: [
153
+ {
154
+ name: "keyword.control.oxql",
155
+ match: "\\b(get|join|align|filter|group_by)\\b"
156
+ },
157
+ {
158
+ name: "string.quoted.double.oxql",
159
+ begin: '"',
160
+ end: '"',
161
+ patterns: [
162
+ {
163
+ name: "constant.character.escape.oxql",
164
+ match: "\\\\."
165
+ }
166
+ ]
167
+ },
168
+ {
169
+ name: "constant.numeric.oxql",
170
+ match: "\\b\\d+[smhdw]\\b"
171
+ },
172
+ {
173
+ name: "constant.numeric.datetime.oxql",
174
+ match: "@\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}"
175
+ },
176
+ {
177
+ name: "constant.numeric.function.oxql",
178
+ match: "@now\\(\\)"
179
+ },
180
+ {
181
+ name: "constant.numeric.oxql",
182
+ match: "\\b\\d+\\b"
183
+ },
184
+ {
185
+ name: "comment.block.oxql",
186
+ begin: "/\\*",
187
+ end: "\\*/"
188
+ },
189
+ {
190
+ name: "comment.line.double-slash.oxql",
191
+ match: "//.*$"
192
+ },
193
+ {
194
+ name: "keyword.operator.oxql",
195
+ match: "\\|"
196
+ }
197
+ ]
198
+ };
199
+
200
+ // components/src/asciidoc/oxide-dark.json
201
+ var oxide_dark_default = {
202
+ name: "Oxide Dark",
203
+ colors: {
204
+ "editor.background": "#080F11",
205
+ "editor.foreground": "#E7E7E8"
206
+ },
207
+ tokenColors: [
208
+ {
209
+ scope: [
210
+ "text",
211
+ "source",
212
+ "variable.other.readwrite",
213
+ "punctuation.definition.variable"
214
+ ],
215
+ settings: {
216
+ foreground: "#E7E7E8"
217
+ }
218
+ },
219
+ {
220
+ scope: "punctuation",
221
+ settings: {
222
+ foreground: "#A1A4A5",
223
+ fontStyle: ""
224
+ }
225
+ },
226
+ {
227
+ scope: ["comment", "punctuation.definition.comment"],
228
+ settings: {
229
+ foreground: "#A1A4A5"
230
+ }
231
+ },
232
+ {
233
+ scope: ["string", "punctuation.definition.string"],
234
+ settings: {
235
+ foreground: "#68D9A7"
236
+ }
237
+ },
238
+ {
239
+ scope: "constant.character.escape",
240
+ settings: {
241
+ foreground: "#EFB7C2"
242
+ }
243
+ },
244
+ {
245
+ scope: [
246
+ "constant.numeric",
247
+ "variable.other.constant",
248
+ "entity.name.constant",
249
+ "constant.language.boolean",
250
+ "constant.language.false",
251
+ "constant.language.true",
252
+ "keyword.other.unit.user-defined",
253
+ "keyword.other.unit.suffix.floating-point"
254
+ ],
255
+ settings: {
256
+ foreground: "#EDD5A6"
257
+ }
258
+ },
259
+ {
260
+ scope: [
261
+ "keyword",
262
+ "keyword.operator.word",
263
+ "keyword.operator.new",
264
+ "variable.language.super",
265
+ "support.type.primitive",
266
+ "storage.type",
267
+ "storage.modifier",
268
+ "punctuation.definition.keyword"
269
+ ],
270
+ settings: {
271
+ foreground: "#C6A5EA",
272
+ fontStyle: ""
273
+ }
274
+ },
275
+ {
276
+ scope: "entity.name.tag.documentation",
277
+ settings: {
278
+ foreground: "#C6A5EA"
279
+ }
280
+ },
281
+ {
282
+ scope: [
283
+ "keyword.operator",
284
+ "punctuation.accessor",
285
+ "punctuation.definition.generic",
286
+ "meta.function.closure punctuation.section.parameters",
287
+ "punctuation.definition.tag",
288
+ "punctuation.separator.key-value"
289
+ ],
290
+ settings: {
291
+ foreground: "#A7E0C8"
292
+ }
293
+ },
294
+ {
295
+ scope: [
296
+ "entity.name.function",
297
+ "meta.function-call.method",
298
+ "support.function",
299
+ "support.function.misc",
300
+ "variable.function"
301
+ ],
302
+ settings: {
303
+ foreground: "#9DAFFA"
304
+ }
305
+ },
306
+ {
307
+ scope: [
308
+ "entity.name.class",
309
+ "entity.other.inherited-class",
310
+ "support.class",
311
+ "meta.function-call.constructor",
312
+ "entity.name.struct"
313
+ ],
314
+ settings: {
315
+ foreground: "#EDD5A6"
316
+ }
317
+ },
318
+ {
319
+ scope: "entity.name.enum",
320
+ settings: {
321
+ foreground: "#EDD5A6"
322
+ }
323
+ },
324
+ {
325
+ scope: ["meta.enum variable.other.readwrite", "variable.other.enummember"],
326
+ settings: {
327
+ foreground: "#A7E0C8"
328
+ }
329
+ },
330
+ {
331
+ scope: "meta.property.object",
332
+ settings: {
333
+ foreground: "#A7E0C8"
334
+ }
335
+ },
336
+ {
337
+ scope: ["meta.type", "meta.type-alias", "support.type", "entity.name.type"],
338
+ settings: {
339
+ foreground: "#EDD5A6"
340
+ }
341
+ },
342
+ {
343
+ scope: [
344
+ "meta.annotation variable.function",
345
+ "meta.annotation variable.annotation.function",
346
+ "meta.annotation punctuation.definition.annotation",
347
+ "meta.decorator",
348
+ "punctuation.decorator"
349
+ ],
350
+ settings: {
351
+ foreground: "#EDD5A6"
352
+ }
353
+ },
354
+ {
355
+ scope: ["variable.parameter", "meta.function.parameters"],
356
+ settings: {
357
+ foreground: "#F39EAE"
358
+ }
359
+ },
360
+ {
361
+ scope: ["constant.language", "support.function.builtin"],
362
+ settings: {
363
+ foreground: "#F7869B"
364
+ }
365
+ },
366
+ {
367
+ scope: "entity.other.attribute-name.documentation",
368
+ settings: {
369
+ foreground: "#F7869B"
370
+ }
371
+ },
372
+ {
373
+ scope: ["keyword.control.directive", "punctuation.definition.directive"],
374
+ settings: {
375
+ foreground: "#EDD5A6"
376
+ }
377
+ },
378
+ {
379
+ scope: "punctuation.definition.typeparameters",
380
+ settings: {
381
+ foreground: "#9DAFFA"
382
+ }
383
+ },
384
+ {
385
+ scope: "entity.name.namespace",
386
+ settings: {
387
+ foreground: "#EDD5A6"
388
+ }
389
+ },
390
+ {
391
+ scope: "support.type.property-name.css",
392
+ settings: {
393
+ foreground: "#9DAFFA",
394
+ fontStyle: ""
395
+ }
396
+ },
397
+ {
398
+ scope: [
399
+ "variable.language.this",
400
+ "variable.language.this punctuation.definition.variable"
401
+ ],
402
+ settings: {
403
+ foreground: "#F7869B"
404
+ }
405
+ },
406
+ {
407
+ scope: "variable.object.property",
408
+ settings: {
409
+ foreground: "#E7E7E8"
410
+ }
411
+ },
412
+ {
413
+ scope: ["string.template variable", "string variable"],
414
+ settings: {
415
+ foreground: "#E7E7E8"
416
+ }
417
+ },
418
+ {
419
+ scope: "keyword.operator.new",
420
+ settings: {
421
+ fontStyle: "bold"
422
+ }
423
+ },
424
+ {
425
+ scope: "storage.modifier.specifier.extern.cpp",
426
+ settings: {
427
+ foreground: "#C6A5EA"
428
+ }
429
+ },
430
+ {
431
+ scope: [
432
+ "entity.name.scope-resolution.template.call.cpp",
433
+ "entity.name.scope-resolution.parameter.cpp",
434
+ "entity.name.scope-resolution.cpp",
435
+ "entity.name.scope-resolution.function.definition.cpp"
436
+ ],
437
+ settings: {
438
+ foreground: "#EDD5A6"
439
+ }
440
+ },
441
+ {
442
+ scope: "storage.type.class.doxygen",
443
+ settings: {
444
+ fontStyle: ""
445
+ }
446
+ },
447
+ {
448
+ scope: ["storage.modifier.reference.cpp"],
449
+ settings: {
450
+ foreground: "#A7E0C8"
451
+ }
452
+ },
453
+ {
454
+ scope: "meta.interpolation.cs",
455
+ settings: {
456
+ foreground: "#E7E7E8"
457
+ }
458
+ },
459
+ {
460
+ scope: "comment.block.documentation.cs",
461
+ settings: {
462
+ foreground: "#E7E7E8"
463
+ }
464
+ },
465
+ {
466
+ scope: [
467
+ "source.css entity.other.attribute-name.class.css",
468
+ "entity.other.attribute-name.parent-selector.css punctuation.definition.entity.css"
469
+ ],
470
+ settings: {
471
+ foreground: "#EDD5A6"
472
+ }
473
+ },
474
+ {
475
+ scope: "punctuation.separator.operator.css",
476
+ settings: {
477
+ foreground: "#A7E0C8"
478
+ }
479
+ },
480
+ {
481
+ scope: "source.css entity.other.attribute-name.pseudo-class",
482
+ settings: {
483
+ foreground: "#A7E0C8"
484
+ }
485
+ },
486
+ {
487
+ scope: "source.css constant.other.unicode-range",
488
+ settings: {
489
+ foreground: "#EDD5A6"
490
+ }
491
+ },
492
+ {
493
+ scope: "source.css variable.parameter.url",
494
+ settings: {
495
+ foreground: "#88DCB7",
496
+ fontStyle: ""
497
+ }
498
+ },
499
+ {
500
+ scope: ["support.type.vendored.property-name"],
501
+ settings: {
502
+ foreground: "#9DAFFA"
503
+ }
504
+ },
505
+ {
506
+ scope: [
507
+ "source.css meta.property-value variable",
508
+ "source.css meta.property-value variable.other.less",
509
+ "source.css meta.property-value variable.other.less punctuation.definition.variable.less",
510
+ "meta.definition.variable.scss"
511
+ ],
512
+ settings: {
513
+ foreground: "#F39EAE"
514
+ }
515
+ },
516
+ {
517
+ scope: [
518
+ "source.css meta.property-list variable",
519
+ "meta.property-list variable.other.less",
520
+ "meta.property-list variable.other.less punctuation.definition.variable.less"
521
+ ],
522
+ settings: {
523
+ foreground: "#9DAFFA"
524
+ }
525
+ },
526
+ {
527
+ scope: "keyword.other.unit.percentage.css",
528
+ settings: {
529
+ foreground: "#EDD5A6"
530
+ }
531
+ },
532
+ {
533
+ scope: "source.css meta.attribute-selector",
534
+ settings: {
535
+ foreground: "#88DCB7"
536
+ }
537
+ },
538
+ {
539
+ scope: [
540
+ "keyword.other.definition.ini",
541
+ "punctuation.support.type.property-name.json",
542
+ "support.type.property-name.json",
543
+ "punctuation.support.type.property-name.toml",
544
+ "support.type.property-name.toml",
545
+ "entity.name.tag.yaml",
546
+ "punctuation.support.type.property-name.yaml",
547
+ "support.type.property-name.yaml"
548
+ ],
549
+ settings: {
550
+ foreground: "#9DAFFA",
551
+ fontStyle: ""
552
+ }
553
+ },
554
+ {
555
+ scope: ["constant.language.json", "constant.language.yaml"],
556
+ settings: {
557
+ foreground: "#EDD5A6"
558
+ }
559
+ },
560
+ {
561
+ scope: ["entity.name.type.anchor.yaml", "variable.other.alias.yaml"],
562
+ settings: {
563
+ foreground: "#EDD5A6",
564
+ fontStyle: ""
565
+ }
566
+ },
567
+ {
568
+ scope: ["support.type.property-name.table", "entity.name.section.group-title.ini"],
569
+ settings: {
570
+ foreground: "#EDD5A6"
571
+ }
572
+ },
573
+ {
574
+ scope: "constant.other.time.datetime.offset.toml",
575
+ settings: {
576
+ foreground: "#EFB7C2"
577
+ }
578
+ },
579
+ {
580
+ scope: ["punctuation.definition.anchor.yaml", "punctuation.definition.alias.yaml"],
581
+ settings: {
582
+ foreground: "#EFB7C2"
583
+ }
584
+ },
585
+ {
586
+ scope: "entity.other.document.begin.yaml",
587
+ settings: {
588
+ foreground: "#EFB7C2"
589
+ }
590
+ },
591
+ {
592
+ scope: "markup.changed.diff",
593
+ settings: {
594
+ foreground: "#EDD5A6"
595
+ }
596
+ },
597
+ {
598
+ scope: [
599
+ "meta.diff.header.from-file",
600
+ "meta.diff.header.to-file",
601
+ "punctuation.definition.from-file.diff",
602
+ "punctuation.definition.to-file.diff"
603
+ ],
604
+ settings: {
605
+ foreground: "#9DAFFA"
606
+ }
607
+ },
608
+ {
609
+ scope: "markup.inserted.diff",
610
+ settings: {
611
+ foreground: "#88DCB7"
612
+ }
613
+ },
614
+ {
615
+ scope: "markup.deleted.diff",
616
+ settings: {
617
+ foreground: "#F7869B"
618
+ }
619
+ },
620
+ {
621
+ scope: ["variable.other.env"],
622
+ settings: {
623
+ foreground: "#9DAFFA"
624
+ }
625
+ },
626
+ {
627
+ scope: ["string.quoted variable.other.env"],
628
+ settings: {
629
+ foreground: "#E7E7E8"
630
+ }
631
+ },
632
+ {
633
+ scope: "support.function.builtin.gdscript",
634
+ settings: {
635
+ foreground: "#9DAFFA"
636
+ }
637
+ },
638
+ {
639
+ scope: "constant.language.gdscript",
640
+ settings: {
641
+ foreground: "#EDD5A6"
642
+ }
643
+ },
644
+ {
645
+ scope: "comment meta.annotation.go",
646
+ settings: {
647
+ foreground: "#F39EAE"
648
+ }
649
+ },
650
+ {
651
+ scope: "comment meta.annotation.parameters.go",
652
+ settings: {
653
+ foreground: "#EDD5A6"
654
+ }
655
+ },
656
+ {
657
+ scope: "constant.language.go",
658
+ settings: {
659
+ foreground: "#EDD5A6"
660
+ }
661
+ },
662
+ {
663
+ scope: "variable.graphql",
664
+ settings: {
665
+ foreground: "#E7E7E8"
666
+ }
667
+ },
668
+ {
669
+ scope: "string.unquoted.alias.graphql",
670
+ settings: {
671
+ foreground: "#F2CDCD"
672
+ }
673
+ },
674
+ {
675
+ scope: "constant.character.enum.graphql",
676
+ settings: {
677
+ foreground: "#A7E0C8"
678
+ }
679
+ },
680
+ {
681
+ scope: "meta.objectvalues.graphql constant.object.key.graphql string.unquoted.graphql",
682
+ settings: {
683
+ foreground: "#F2CDCD"
684
+ }
685
+ },
686
+ {
687
+ scope: [
688
+ "keyword.other.doctype",
689
+ "meta.tag.sgml.doctype punctuation.definition.tag",
690
+ "meta.tag.metadata.doctype entity.name.tag",
691
+ "meta.tag.metadata.doctype punctuation.definition.tag"
692
+ ],
693
+ settings: {
694
+ foreground: "#C6A5EA"
695
+ }
696
+ },
697
+ {
698
+ scope: ["entity.name.tag"],
699
+ settings: {
700
+ foreground: "#9DAFFA",
701
+ fontStyle: ""
702
+ }
703
+ },
704
+ {
705
+ scope: [
706
+ "text.html constant.character.entity",
707
+ "text.html constant.character.entity punctuation",
708
+ "constant.character.entity.xml",
709
+ "constant.character.entity.xml punctuation",
710
+ "constant.character.entity.js.jsx",
711
+ "constant.charactger.entity.js.jsx punctuation",
712
+ "constant.character.entity.tsx",
713
+ "constant.character.entity.tsx punctuation"
714
+ ],
715
+ settings: {
716
+ foreground: "#F7869B"
717
+ }
718
+ },
719
+ {
720
+ scope: ["entity.other.attribute-name"],
721
+ settings: {
722
+ foreground: "#EDD5A6"
723
+ }
724
+ },
725
+ {
726
+ scope: [
727
+ "support.class.component",
728
+ "support.class.component.jsx",
729
+ "support.class.component.tsx",
730
+ "support.class.component.vue"
731
+ ],
732
+ settings: {
733
+ foreground: "#EFB7C2",
734
+ fontStyle: ""
735
+ }
736
+ },
737
+ {
738
+ scope: ["punctuation.definition.annotation", "storage.type.annotation"],
739
+ settings: {
740
+ foreground: "#EDD5A6"
741
+ }
742
+ },
743
+ {
744
+ scope: "constant.other.enum.java",
745
+ settings: {
746
+ foreground: "#A7E0C8"
747
+ }
748
+ },
749
+ {
750
+ scope: "storage.modifier.import.java",
751
+ settings: {
752
+ foreground: "#E7E7E8"
753
+ }
754
+ },
755
+ {
756
+ scope: "comment.block.javadoc.java keyword.other.documentation.javadoc.java",
757
+ settings: {
758
+ fontStyle: ""
759
+ }
760
+ },
761
+ {
762
+ scope: "meta.export variable.other.readwrite.js",
763
+ settings: {
764
+ foreground: "#F39EAE"
765
+ }
766
+ },
767
+ {
768
+ scope: [
769
+ "variable.other.constant.js",
770
+ "variable.other.constant.ts",
771
+ "variable.other.property.js",
772
+ "variable.other.property.ts"
773
+ ],
774
+ settings: {
775
+ foreground: "#E7E7E8"
776
+ }
777
+ },
778
+ {
779
+ scope: ["variable.other.jsdoc", "comment.block.documentation variable.other"],
780
+ settings: {
781
+ foreground: "#F39EAE",
782
+ fontStyle: ""
783
+ }
784
+ },
785
+ {
786
+ scope: "storage.type.class.jsdoc",
787
+ settings: {
788
+ fontStyle: ""
789
+ }
790
+ },
791
+ {
792
+ scope: "support.type.object.console.js",
793
+ settings: {
794
+ foreground: "#E7E7E8"
795
+ }
796
+ },
797
+ {
798
+ scope: ["support.constant.node", "support.type.object.module.js"],
799
+ settings: {
800
+ foreground: "#C6A5EA"
801
+ }
802
+ },
803
+ {
804
+ scope: "storage.modifier.implements",
805
+ settings: {
806
+ foreground: "#C6A5EA"
807
+ }
808
+ },
809
+ {
810
+ scope: [
811
+ "constant.language.null.js",
812
+ "constant.language.null.ts",
813
+ "constant.language.undefined.js",
814
+ "constant.language.undefined.ts",
815
+ "support.type.builtin.ts"
816
+ ],
817
+ settings: {
818
+ foreground: "#C6A5EA"
819
+ }
820
+ },
821
+ {
822
+ scope: "variable.parameter.generic",
823
+ settings: {
824
+ foreground: "#EDD5A6"
825
+ }
826
+ },
827
+ {
828
+ scope: ["keyword.declaration.function.arrow.js", "storage.type.function.arrow.ts"],
829
+ settings: {
830
+ foreground: "#A7E0C8"
831
+ }
832
+ },
833
+ {
834
+ scope: "punctuation.decorator.ts",
835
+ settings: {
836
+ foreground: "#9DAFFA"
837
+ }
838
+ },
839
+ {
840
+ scope: [
841
+ "keyword.operator.expression.in.js",
842
+ "keyword.operator.expression.in.ts",
843
+ "keyword.operator.expression.infer.ts",
844
+ "keyword.operator.expression.instanceof.js",
845
+ "keyword.operator.expression.instanceof.ts",
846
+ "keyword.operator.expression.is",
847
+ "keyword.operator.expression.keyof.ts",
848
+ "keyword.operator.expression.of.js",
849
+ "keyword.operator.expression.of.ts",
850
+ "keyword.operator.expression.typeof.ts"
851
+ ],
852
+ settings: {
853
+ foreground: "#C6A5EA"
854
+ }
855
+ },
856
+ {
857
+ scope: "support.function.macro.julia",
858
+ settings: {
859
+ foreground: "#A7E0C8"
860
+ }
861
+ },
862
+ {
863
+ scope: "constant.language.julia",
864
+ settings: {
865
+ foreground: "#EDD5A6"
866
+ }
867
+ },
868
+ {
869
+ scope: "constant.other.symbol.julia",
870
+ settings: {
871
+ foreground: "#F39EAE"
872
+ }
873
+ },
874
+ {
875
+ scope: "text.tex keyword.control.preamble",
876
+ settings: {
877
+ foreground: "#A7E0C8"
878
+ }
879
+ },
880
+ {
881
+ scope: "text.tex support.function.be",
882
+ settings: {
883
+ foreground: "#9DAFFA"
884
+ }
885
+ },
886
+ {
887
+ scope: "constant.other.general.math.tex",
888
+ settings: {
889
+ foreground: "#F2CDCD"
890
+ }
891
+ },
892
+ {
893
+ scope: "comment.line.double-dash.documentation.lua storage.type.annotation.lua",
894
+ settings: {
895
+ foreground: "#C6A5EA",
896
+ fontStyle: ""
897
+ }
898
+ },
899
+ {
900
+ scope: [
901
+ "comment.line.double-dash.documentation.lua entity.name.variable.lua",
902
+ "comment.line.double-dash.documentation.lua variable.lua"
903
+ ],
904
+ settings: {
905
+ foreground: "#E7E7E8"
906
+ }
907
+ },
908
+ {
909
+ scope: [
910
+ "heading.1.markdown punctuation.definition.heading.markdown",
911
+ "heading.1.markdown",
912
+ "heading.1.quarto punctuation.definition.heading.quarto",
913
+ "heading.1.quarto",
914
+ "markup.heading.atx.1.mdx",
915
+ "markup.heading.atx.1.mdx punctuation.definition.heading.mdx",
916
+ "markup.heading.setext.1.markdown",
917
+ "markup.heading.heading-0.asciidoc"
918
+ ],
919
+ settings: {
920
+ foreground: "#F7869B"
921
+ }
922
+ },
923
+ {
924
+ scope: [
925
+ "heading.2.markdown punctuation.definition.heading.markdown",
926
+ "heading.2.markdown",
927
+ "heading.2.quarto punctuation.definition.heading.quarto",
928
+ "heading.2.quarto",
929
+ "markup.heading.atx.2.mdx",
930
+ "markup.heading.atx.2.mdx punctuation.definition.heading.mdx",
931
+ "markup.heading.setext.2.markdown",
932
+ "markup.heading.heading-1.asciidoc"
933
+ ],
934
+ settings: {
935
+ foreground: "#EDD5A6"
936
+ }
937
+ },
938
+ {
939
+ scope: [
940
+ "heading.3.markdown punctuation.definition.heading.markdown",
941
+ "heading.3.markdown",
942
+ "heading.3.quarto punctuation.definition.heading.quarto",
943
+ "heading.3.quarto",
944
+ "markup.heading.atx.3.mdx",
945
+ "markup.heading.atx.3.mdx punctuation.definition.heading.mdx",
946
+ "markup.heading.heading-2.asciidoc"
947
+ ],
948
+ settings: {
949
+ foreground: "#EDD5A6"
950
+ }
951
+ },
952
+ {
953
+ scope: [
954
+ "heading.4.markdown punctuation.definition.heading.markdown",
955
+ "heading.4.markdown",
956
+ "heading.4.quarto punctuation.definition.heading.quarto",
957
+ "heading.4.quarto",
958
+ "markup.heading.atx.4.mdx",
959
+ "markup.heading.atx.4.mdx punctuation.definition.heading.mdx",
960
+ "markup.heading.heading-3.asciidoc"
961
+ ],
962
+ settings: {
963
+ foreground: "#88DCB7"
964
+ }
965
+ },
966
+ {
967
+ scope: [
968
+ "heading.5.markdown punctuation.definition.heading.markdown",
969
+ "heading.5.markdown",
970
+ "heading.5.quarto punctuation.definition.heading.quarto",
971
+ "heading.5.quarto",
972
+ "markup.heading.atx.5.mdx",
973
+ "markup.heading.atx.5.mdx punctuation.definition.heading.mdx",
974
+ "markup.heading.heading-4.asciidoc"
975
+ ],
976
+ settings: {
977
+ foreground: "#9DAFFA"
978
+ }
979
+ },
980
+ {
981
+ scope: [
982
+ "heading.6.markdown punctuation.definition.heading.markdown",
983
+ "heading.6.markdown",
984
+ "heading.6.quarto punctuation.definition.heading.quarto",
985
+ "heading.6.quarto",
986
+ "markup.heading.atx.6.mdx",
987
+ "markup.heading.atx.6.mdx punctuation.definition.heading.mdx",
988
+ "markup.heading.heading-5.asciidoc"
989
+ ],
990
+ settings: {
991
+ foreground: "#C6A5EA"
992
+ }
993
+ },
994
+ {
995
+ scope: "markup.bold",
996
+ settings: {
997
+ foreground: "#F7869B",
998
+ fontStyle: "bold"
999
+ }
1000
+ },
1001
+ {
1002
+ scope: "markup.italic",
1003
+ settings: {
1004
+ foreground: "#F7869B"
1005
+ }
1006
+ },
1007
+ {
1008
+ scope: "markup.strikethrough",
1009
+ settings: {
1010
+ foreground: "#A6ADC8",
1011
+ fontStyle: "strikethrough"
1012
+ }
1013
+ },
1014
+ {
1015
+ scope: ["punctuation.definition.link", "markup.underline.link"],
1016
+ settings: {
1017
+ foreground: "#9DAFFA"
1018
+ }
1019
+ },
1020
+ {
1021
+ scope: [
1022
+ "text.html.markdown punctuation.definition.link.title",
1023
+ "text.html.quarto punctuation.definition.link.title",
1024
+ "string.other.link.title.markdown",
1025
+ "string.other.link.title.quarto",
1026
+ "markup.link",
1027
+ "punctuation.definition.constant.markdown",
1028
+ "punctuation.definition.constant.quarto",
1029
+ "constant.other.reference.link.markdown",
1030
+ "constant.other.reference.link.quarto",
1031
+ "markup.substitution.attribute-reference"
1032
+ ],
1033
+ settings: {
1034
+ foreground: "#B4BEFE"
1035
+ }
1036
+ },
1037
+ {
1038
+ scope: [
1039
+ "punctuation.definition.raw.markdown",
1040
+ "punctuation.definition.raw.quarto",
1041
+ "markup.inline.raw.string.markdown",
1042
+ "markup.inline.raw.string.quarto",
1043
+ "markup.raw.block.markdown",
1044
+ "markup.raw.block.quarto"
1045
+ ],
1046
+ settings: {
1047
+ foreground: "#88DCB7"
1048
+ }
1049
+ },
1050
+ {
1051
+ scope: "fenced_code.block.language",
1052
+ settings: {
1053
+ foreground: "#9DAFFA"
1054
+ }
1055
+ },
1056
+ {
1057
+ scope: [
1058
+ "markup.fenced_code.block punctuation.definition",
1059
+ "markup.raw support.asciidoc"
1060
+ ],
1061
+ settings: {
1062
+ foreground: "#A1A4A5"
1063
+ }
1064
+ },
1065
+ {
1066
+ scope: ["markup.quote", "punctuation.definition.quote.begin"],
1067
+ settings: {
1068
+ foreground: "#EFB7C2"
1069
+ }
1070
+ },
1071
+ {
1072
+ scope: "meta.separator.markdown",
1073
+ settings: {
1074
+ foreground: "#A7E0C8"
1075
+ }
1076
+ },
1077
+ {
1078
+ scope: [
1079
+ "punctuation.definition.list.begin.markdown",
1080
+ "punctuation.definition.list.begin.quarto",
1081
+ "markup.list.bullet"
1082
+ ],
1083
+ settings: {
1084
+ foreground: "#A7E0C8"
1085
+ }
1086
+ },
1087
+ {
1088
+ scope: "markup.heading.quarto",
1089
+ settings: {
1090
+ fontStyle: "bold"
1091
+ }
1092
+ },
1093
+ {
1094
+ scope: [
1095
+ "entity.other.attribute-name.multipart.nix",
1096
+ "entity.other.attribute-name.single.nix"
1097
+ ],
1098
+ settings: {
1099
+ foreground: "#9DAFFA"
1100
+ }
1101
+ },
1102
+ {
1103
+ scope: "variable.parameter.name.nix",
1104
+ settings: {
1105
+ foreground: "#E7E7E8",
1106
+ fontStyle: ""
1107
+ }
1108
+ },
1109
+ {
1110
+ scope: "meta.embedded variable.parameter.name.nix",
1111
+ settings: {
1112
+ foreground: "#B4BEFE",
1113
+ fontStyle: ""
1114
+ }
1115
+ },
1116
+ {
1117
+ scope: "string.unquoted.path.nix",
1118
+ settings: {
1119
+ foreground: "#EFB7C2",
1120
+ fontStyle: ""
1121
+ }
1122
+ },
1123
+ {
1124
+ scope: ["support.attribute.builtin", "meta.attribute.php"],
1125
+ settings: {
1126
+ foreground: "#EDD5A6"
1127
+ }
1128
+ },
1129
+ {
1130
+ scope: "meta.function.parameters.php punctuation.definition.variable.php",
1131
+ settings: {
1132
+ foreground: "#F39EAE"
1133
+ }
1134
+ },
1135
+ {
1136
+ scope: "constant.language.php",
1137
+ settings: {
1138
+ foreground: "#C6A5EA"
1139
+ }
1140
+ },
1141
+ {
1142
+ scope: "text.html.php support.function",
1143
+ settings: {
1144
+ foreground: "#9DAFFA"
1145
+ }
1146
+ },
1147
+ {
1148
+ scope: "keyword.other.phpdoc.php",
1149
+ settings: {
1150
+ fontStyle: ""
1151
+ }
1152
+ },
1153
+ {
1154
+ scope: ["support.variable.magic.python", "meta.function-call.arguments.python"],
1155
+ settings: {
1156
+ foreground: "#E7E7E8"
1157
+ }
1158
+ },
1159
+ {
1160
+ scope: ["support.function.magic.python"],
1161
+ settings: {
1162
+ foreground: "#9DAFFA"
1163
+ }
1164
+ },
1165
+ {
1166
+ scope: [
1167
+ "variable.parameter.function.language.special.self.python",
1168
+ "variable.language.special.self.python"
1169
+ ],
1170
+ settings: {
1171
+ foreground: "#F7869B"
1172
+ }
1173
+ },
1174
+ {
1175
+ scope: ["keyword.control.flow.python", "keyword.operator.logical.python"],
1176
+ settings: {
1177
+ foreground: "#C6A5EA"
1178
+ }
1179
+ },
1180
+ {
1181
+ scope: "storage.type.function.python",
1182
+ settings: {
1183
+ foreground: "#C6A5EA"
1184
+ }
1185
+ },
1186
+ {
1187
+ scope: [
1188
+ "support.token.decorator.python",
1189
+ "meta.function.decorator.identifier.python"
1190
+ ],
1191
+ settings: {
1192
+ foreground: "#9DAFFA"
1193
+ }
1194
+ },
1195
+ {
1196
+ scope: ["meta.function-call.python"],
1197
+ settings: {
1198
+ foreground: "#9DAFFA"
1199
+ }
1200
+ },
1201
+ {
1202
+ scope: [
1203
+ "entity.name.function.decorator.python",
1204
+ "punctuation.definition.decorator.python"
1205
+ ],
1206
+ settings: {
1207
+ foreground: "#EDD5A6"
1208
+ }
1209
+ },
1210
+ {
1211
+ scope: "constant.character.format.placeholder.other.python",
1212
+ settings: {
1213
+ foreground: "#EFB7C2"
1214
+ }
1215
+ },
1216
+ {
1217
+ scope: ["support.type.exception.python", "support.function.builtin.python"],
1218
+ settings: {
1219
+ foreground: "#EDD5A6"
1220
+ }
1221
+ },
1222
+ {
1223
+ scope: ["support.type.python"],
1224
+ settings: {
1225
+ foreground: "#EDD5A6"
1226
+ }
1227
+ },
1228
+ {
1229
+ scope: "constant.language.python",
1230
+ settings: {
1231
+ foreground: "#C6A5EA"
1232
+ }
1233
+ },
1234
+ {
1235
+ scope: ["meta.indexed-name.python", "meta.item-access.python"],
1236
+ settings: {
1237
+ foreground: "#F39EAE"
1238
+ }
1239
+ },
1240
+ {
1241
+ scope: "storage.type.string.python",
1242
+ settings: {
1243
+ foreground: "#88DCB7"
1244
+ }
1245
+ },
1246
+ {
1247
+ scope: "meta.function.parameters.python",
1248
+ settings: {
1249
+ fontStyle: ""
1250
+ }
1251
+ },
1252
+ {
1253
+ scope: [
1254
+ "string.regexp punctuation.definition.string.begin",
1255
+ "string.regexp punctuation.definition.string.end"
1256
+ ],
1257
+ settings: {
1258
+ foreground: "#EFB7C2"
1259
+ }
1260
+ },
1261
+ {
1262
+ scope: "keyword.control.anchor.regexp",
1263
+ settings: {
1264
+ foreground: "#C6A5EA"
1265
+ }
1266
+ },
1267
+ {
1268
+ scope: "string.regexp.ts",
1269
+ settings: {
1270
+ foreground: "#E7E7E8"
1271
+ }
1272
+ },
1273
+ {
1274
+ scope: [
1275
+ "punctuation.definition.group.regexp",
1276
+ "keyword.other.back-reference.regexp"
1277
+ ],
1278
+ settings: {
1279
+ foreground: "#88DCB7"
1280
+ }
1281
+ },
1282
+ {
1283
+ scope: "punctuation.definition.character-class.regexp",
1284
+ settings: {
1285
+ foreground: "#EDD5A6"
1286
+ }
1287
+ },
1288
+ {
1289
+ scope: "constant.other.character-class.regexp",
1290
+ settings: {
1291
+ foreground: "#EFB7C2"
1292
+ }
1293
+ },
1294
+ {
1295
+ scope: "constant.other.character-class.range.regexp",
1296
+ settings: {
1297
+ foreground: "#F5E0DC"
1298
+ }
1299
+ },
1300
+ {
1301
+ scope: "keyword.operator.quantifier.regexp",
1302
+ settings: {
1303
+ foreground: "#A7E0C8"
1304
+ }
1305
+ },
1306
+ {
1307
+ scope: "constant.character.numeric.regexp",
1308
+ settings: {
1309
+ foreground: "#EDD5A6"
1310
+ }
1311
+ },
1312
+ {
1313
+ scope: [
1314
+ "punctuation.definition.group.no-capture.regexp",
1315
+ "meta.assertion.look-ahead.regexp",
1316
+ "meta.assertion.negative-look-ahead.regexp"
1317
+ ],
1318
+ settings: {
1319
+ foreground: "#9DAFFA"
1320
+ }
1321
+ },
1322
+ {
1323
+ scope: [
1324
+ "meta.annotation.rust",
1325
+ "meta.annotation.rust punctuation",
1326
+ "meta.attribute.rust",
1327
+ "punctuation.definition.attribute.rust"
1328
+ ],
1329
+ settings: {
1330
+ foreground: "#EDD5A6"
1331
+ }
1332
+ },
1333
+ {
1334
+ scope: [
1335
+ "meta.attribute.rust string.quoted.double.rust",
1336
+ "meta.attribute.rust string.quoted.single.char.rust"
1337
+ ],
1338
+ settings: {
1339
+ fontStyle: ""
1340
+ }
1341
+ },
1342
+ {
1343
+ scope: [
1344
+ "entity.name.function.macro.rules.rust",
1345
+ "storage.type.module.rust",
1346
+ "storage.modifier.rust",
1347
+ "storage.type.struct.rust",
1348
+ "storage.type.enum.rust",
1349
+ "storage.type.trait.rust",
1350
+ "storage.type.union.rust",
1351
+ "storage.type.impl.rust",
1352
+ "storage.type.rust",
1353
+ "storage.type.function.rust",
1354
+ "storage.type.type.rust"
1355
+ ],
1356
+ settings: {
1357
+ foreground: "#C6A5EA",
1358
+ fontStyle: ""
1359
+ }
1360
+ },
1361
+ {
1362
+ scope: "entity.name.type.numeric.rust",
1363
+ settings: {
1364
+ foreground: "#C6A5EA",
1365
+ fontStyle: ""
1366
+ }
1367
+ },
1368
+ {
1369
+ scope: "meta.generic.rust",
1370
+ settings: {
1371
+ foreground: "#EDD5A6"
1372
+ }
1373
+ },
1374
+ {
1375
+ scope: "entity.name.impl.rust",
1376
+ settings: {
1377
+ foreground: "#EDD5A6"
1378
+ }
1379
+ },
1380
+ {
1381
+ scope: "entity.name.module.rust",
1382
+ settings: {
1383
+ foreground: "#EDD5A6"
1384
+ }
1385
+ },
1386
+ {
1387
+ scope: "entity.name.trait.rust",
1388
+ settings: {
1389
+ foreground: "#EDD5A6"
1390
+ }
1391
+ },
1392
+ {
1393
+ scope: "storage.type.source.rust",
1394
+ settings: {
1395
+ foreground: "#EDD5A6"
1396
+ }
1397
+ },
1398
+ {
1399
+ scope: "entity.name.union.rust",
1400
+ settings: {
1401
+ foreground: "#EDD5A6"
1402
+ }
1403
+ },
1404
+ {
1405
+ scope: "meta.enum.rust storage.type.source.rust",
1406
+ settings: {
1407
+ foreground: "#A7E0C8"
1408
+ }
1409
+ },
1410
+ {
1411
+ scope: [
1412
+ "support.macro.rust",
1413
+ "meta.macro.rust support.function.rust",
1414
+ "entity.name.function.macro.rust"
1415
+ ],
1416
+ settings: {
1417
+ foreground: "#9DAFFA"
1418
+ }
1419
+ },
1420
+ {
1421
+ scope: ["storage.modifier.lifetime.rust", "entity.name.type.lifetime"],
1422
+ settings: {
1423
+ foreground: "#9DAFFA"
1424
+ }
1425
+ },
1426
+ {
1427
+ scope: "string.quoted.double.rust constant.other.placeholder.rust",
1428
+ settings: {
1429
+ foreground: "#EFB7C2"
1430
+ }
1431
+ },
1432
+ {
1433
+ scope: "meta.function.return-type.rust meta.generic.rust storage.type.rust",
1434
+ settings: {
1435
+ foreground: "#E7E7E8"
1436
+ }
1437
+ },
1438
+ {
1439
+ scope: "meta.function.call.rust",
1440
+ settings: {
1441
+ foreground: "#9DAFFA"
1442
+ }
1443
+ },
1444
+ {
1445
+ scope: "punctuation.brackets.angle.rust",
1446
+ settings: {
1447
+ foreground: "#9DAFFA"
1448
+ }
1449
+ },
1450
+ {
1451
+ scope: "constant.other.caps.rust",
1452
+ settings: {
1453
+ foreground: "#EDD5A6"
1454
+ }
1455
+ },
1456
+ {
1457
+ scope: ["meta.function.definition.rust variable.other.rust"],
1458
+ settings: {
1459
+ foreground: "#F39EAE"
1460
+ }
1461
+ },
1462
+ {
1463
+ scope: "meta.function.call.rust variable.other.rust",
1464
+ settings: {
1465
+ foreground: "#E7E7E8"
1466
+ }
1467
+ },
1468
+ {
1469
+ scope: "variable.language.self.rust",
1470
+ settings: {
1471
+ foreground: "#F7869B"
1472
+ }
1473
+ },
1474
+ {
1475
+ scope: [
1476
+ "variable.other.metavariable.name.rust",
1477
+ "meta.macro.metavariable.rust keyword.operator.macro.dollar.rust"
1478
+ ],
1479
+ settings: {
1480
+ foreground: "#EFB7C2"
1481
+ }
1482
+ },
1483
+ {
1484
+ scope: [
1485
+ "comment.line.shebang",
1486
+ "comment.line.shebang punctuation.definition.comment",
1487
+ "comment.line.shebang",
1488
+ "punctuation.definition.comment.shebang.shell",
1489
+ "meta.shebang.shell"
1490
+ ],
1491
+ settings: {
1492
+ foreground: "#EFB7C2"
1493
+ }
1494
+ },
1495
+ {
1496
+ scope: "comment.line.shebang constant.language",
1497
+ settings: {
1498
+ foreground: "#A7E0C8"
1499
+ }
1500
+ },
1501
+ {
1502
+ scope: [
1503
+ "meta.function-call.arguments.shell punctuation.definition.variable.shell",
1504
+ "meta.function-call.arguments.shell punctuation.section.interpolation",
1505
+ "meta.function-call.arguments.shell punctuation.definition.variable.shell",
1506
+ "meta.function-call.arguments.shell punctuation.section.interpolation"
1507
+ ],
1508
+ settings: {
1509
+ foreground: "#F7869B"
1510
+ }
1511
+ },
1512
+ {
1513
+ scope: "meta.string meta.interpolation.parameter.shell variable.other.readwrite",
1514
+ settings: {
1515
+ foreground: "#EDD5A6"
1516
+ }
1517
+ },
1518
+ {
1519
+ scope: [
1520
+ "source.shell punctuation.section.interpolation",
1521
+ "punctuation.definition.evaluation.backticks.shell"
1522
+ ],
1523
+ settings: {
1524
+ foreground: "#A7E0C8"
1525
+ }
1526
+ },
1527
+ {
1528
+ scope: "entity.name.tag.heredoc.shell",
1529
+ settings: {
1530
+ foreground: "#C6A5EA"
1531
+ }
1532
+ },
1533
+ {
1534
+ scope: "string.quoted.double.shell variable.other.normal.shell",
1535
+ settings: {
1536
+ foreground: "#E7E7E8"
1537
+ }
1538
+ },
1539
+ {
1540
+ scope: "token.info-token",
1541
+ settings: {
1542
+ foreground: "#8BA1FF"
1543
+ }
1544
+ },
1545
+ {
1546
+ scope: "token.warn-token",
1547
+ settings: {
1548
+ foreground: "#F5B944"
1549
+ }
1550
+ },
1551
+ {
1552
+ scope: "token.error-token",
1553
+ settings: {
1554
+ foreground: "#FB6E88"
1555
+ }
1556
+ },
1557
+ {
1558
+ scope: "token.debug-token",
1559
+ settings: {
1560
+ foreground: "#BE95EB"
1561
+ }
1562
+ }
1563
+ ]
1564
+ };
1565
+
1566
+ // components/src/asciidoc/util.ts
1567
+ var highlighter = null;
1568
+ var customLanguages = ["oxql"];
1569
+ var supportedLanguages = [...Object.keys(bundledLanguages), ...customLanguages];
1570
+ async function getOrCreateHighlighter() {
1571
+ if (!highlighter) {
1572
+ const langs = [];
1573
+ langs.push({
1574
+ ...oxql_tmLanguage_default
1575
+ });
1576
+ highlighter = await getHighlighter({
1577
+ themes: [oxide_dark_default],
1578
+ langs
1579
+ });
1580
+ }
1581
+ return highlighter;
1582
+ }
1583
+ var highlight = async (block) => {
1584
+ if (block.type === "listing") {
1585
+ const literalBlock = block;
1586
+ if (!literalBlock.content) {
1587
+ return block;
1588
+ }
1589
+ const calloutRegex = /<i class="conum" data-value="\d+"><\/i>/g;
1590
+ const callouts = [];
1591
+ const placeholderContent = literalBlock.content.replace(calloutRegex, (match) => {
1592
+ callouts.push(match);
1593
+ return `__CALLOUT_PLACEHOLDER_${callouts.length - 1}__`;
1594
+ });
1595
+ if (!literalBlock.language) {
1596
+ return {
1597
+ ...block,
1598
+ content: placeholderContent.replace(
1599
+ /__CALLOUT_PLACEHOLDER_(\d+)__/g,
1600
+ (_, index) => callouts[parseInt(index)]
1601
+ )
1602
+ };
1603
+ }
1604
+ let lang = literalBlock.language;
1605
+ const h = await getOrCreateHighlighter();
1606
+ const loadedLanguages = h.getLoadedLanguages();
1607
+ if (!supportedLanguages.includes(lang)) {
1608
+ lang = "text";
1609
+ }
1610
+ if (!loadedLanguages.includes(lang)) {
1611
+ await h.loadLanguage(lang);
1612
+ }
1613
+ const highlightedContent = h.codeToHtml(placeholderContent, {
1614
+ lang,
1615
+ theme: oxide_dark_default,
1616
+ structure: "inline"
1617
+ });
1618
+ const restoredContent = highlightedContent.replace(
1619
+ /__CALLOUT_PLACEHOLDER_(\d+)__/g,
1620
+ (_, index) => callouts[parseInt(index)]
1621
+ );
1622
+ return {
1623
+ ...block,
1624
+ content: restoredContent
1625
+ };
1626
+ }
1627
+ return block;
1628
+ };
1629
+ var loadAsciidoctor = ({ extensions }) => {
1630
+ const ad = asciidoctor();
1631
+ class InlineConverter {
1632
+ baseConverter;
1633
+ constructor() {
1634
+ this.baseConverter = new ad.Html5Converter();
1635
+ }
1636
+ convert(node, transform) {
1637
+ switch (node.getNodeName()) {
1638
+ case "inline_callout":
1639
+ return convertInlineCallout(node);
1640
+ default:
1641
+ break;
1642
+ }
1643
+ return this.baseConverter.convert(node, transform);
1644
+ }
1645
+ }
1646
+ extensions.forEach((extension) => ad.Extensions.register(extension));
1647
+ ad.ConverterFactory.register(new InlineConverter(), ["html5"]);
1648
+ return ad;
1649
+ };
1650
+ function convertInlineCallout(node) {
1651
+ return `<i class="conum" data-value="${node.getText()}"></i>`;
1652
+ }
1653
+ var handleDocument = async (document) => {
1654
+ const doc = prepareDocument(document);
1655
+ return await processDocument(doc, highlight);
1656
+ };
1657
+
115
1658
  // components/src/asciidoc/index.ts
116
1659
  var AsciiDocBlocks = {
117
1660
  Admonition: Admonition_default,
@@ -531,6 +2074,9 @@ export {
531
2074
  badgeColors,
532
2075
  buttonSizes,
533
2076
  buttonStyle,
2077
+ handleDocument,
2078
+ highlight,
2079
+ loadAsciidoctor,
534
2080
  spinnerSizes,
535
2081
  spinnerVariants,
536
2082
  variants