@oxide/design-system 1.7.6 → 1.7.7--canary.87d60df.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 (131) hide show
  1. package/components/dist/architecture-I3QFYML2-YZWO3N3B.js +14 -0
  2. package/components/dist/architecture-I3QFYML2-YZWO3N3B.js.map +1 -0
  3. package/components/dist/architectureDiagram-UYN6MBPD-HXPGIDN7.js +8846 -0
  4. package/components/dist/architectureDiagram-UYN6MBPD-HXPGIDN7.js.map +1 -0
  5. package/components/dist/asciidoc.css +1 -1
  6. package/components/dist/blockDiagram-ZHA2E4KO-OAYYKCLF.js +3721 -0
  7. package/components/dist/blockDiagram-ZHA2E4KO-OAYYKCLF.js.map +1 -0
  8. package/components/dist/c4Diagram-6F5ED5ID-TBHFK2XY.js +2599 -0
  9. package/components/dist/c4Diagram-6F5ED5ID-TBHFK2XY.js.map +1 -0
  10. package/components/dist/chunk-2DDKDUUO.js +439 -0
  11. package/components/dist/chunk-2DDKDUUO.js.map +1 -0
  12. package/components/dist/chunk-2NHDMTP7.js +26905 -0
  13. package/components/dist/chunk-2NHDMTP7.js.map +1 -0
  14. package/components/dist/chunk-4IJS44L3.js +22 -0
  15. package/components/dist/chunk-4IJS44L3.js.map +1 -0
  16. package/components/dist/chunk-562WOS3Z.js +1109 -0
  17. package/components/dist/chunk-562WOS3Z.js.map +1 -0
  18. package/components/dist/chunk-6UD2HOKB.js +17082 -0
  19. package/components/dist/chunk-6UD2HOKB.js.map +1 -0
  20. package/components/dist/chunk-76BOQ7BT.js +63 -0
  21. package/components/dist/chunk-76BOQ7BT.js.map +1 -0
  22. package/components/dist/chunk-7I5DT373.js +97 -0
  23. package/components/dist/chunk-7I5DT373.js.map +1 -0
  24. package/components/dist/chunk-BPREMNVP.js +1875 -0
  25. package/components/dist/chunk-BPREMNVP.js.map +1 -0
  26. package/components/dist/chunk-BVYAEHG3.js +122 -0
  27. package/components/dist/chunk-BVYAEHG3.js.map +1 -0
  28. package/components/dist/chunk-BW7DFBOS.js +152 -0
  29. package/components/dist/chunk-BW7DFBOS.js.map +1 -0
  30. package/components/dist/chunk-EZG2MNHW.js +59 -0
  31. package/components/dist/chunk-EZG2MNHW.js.map +1 -0
  32. package/components/dist/chunk-G6QWNAHJ.js +43 -0
  33. package/components/dist/chunk-G6QWNAHJ.js.map +1 -0
  34. package/components/dist/chunk-H72D3HRR.js +1244 -0
  35. package/components/dist/chunk-H72D3HRR.js.map +1 -0
  36. package/components/dist/chunk-K532NZMW.js +46 -0
  37. package/components/dist/chunk-K532NZMW.js.map +1 -0
  38. package/components/dist/chunk-LC3BX2KL.js +25 -0
  39. package/components/dist/chunk-LC3BX2KL.js.map +1 -0
  40. package/components/dist/chunk-LQ2ABR7F.js +5665 -0
  41. package/components/dist/chunk-LQ2ABR7F.js.map +1 -0
  42. package/components/dist/chunk-M6L3MM6K.js +22 -0
  43. package/components/dist/chunk-M6L3MM6K.js.map +1 -0
  44. package/components/dist/chunk-MWA4PRRW.js +122 -0
  45. package/components/dist/chunk-MWA4PRRW.js.map +1 -0
  46. package/components/dist/chunk-ND3FLKHU.js +570 -0
  47. package/components/dist/chunk-ND3FLKHU.js.map +1 -0
  48. package/components/dist/chunk-NIVHLOPB.js +2621 -0
  49. package/components/dist/chunk-NIVHLOPB.js.map +1 -0
  50. package/components/dist/chunk-R6F6FFK7.js +65 -0
  51. package/components/dist/chunk-R6F6FFK7.js.map +1 -0
  52. package/components/dist/chunk-RN5R3L7O.js +2041 -0
  53. package/components/dist/chunk-RN5R3L7O.js.map +1 -0
  54. package/components/dist/chunk-RWDBBMDN.js +10910 -0
  55. package/components/dist/chunk-RWDBBMDN.js.map +1 -0
  56. package/components/dist/chunk-T7HPDS4Z.js +573 -0
  57. package/components/dist/chunk-T7HPDS4Z.js.map +1 -0
  58. package/components/dist/chunk-TG4YEU4Q.js +23 -0
  59. package/components/dist/chunk-TG4YEU4Q.js.map +1 -0
  60. package/components/dist/chunk-U5WCXBW2.js +48 -0
  61. package/components/dist/chunk-U5WCXBW2.js.map +1 -0
  62. package/components/dist/chunk-V6PWN6OH.js +1875 -0
  63. package/components/dist/chunk-V6PWN6OH.js.map +1 -0
  64. package/components/dist/chunk-VLTHNCSD.js +48 -0
  65. package/components/dist/chunk-VLTHNCSD.js.map +1 -0
  66. package/components/dist/chunk-WDK4G4UR.js +2791 -0
  67. package/components/dist/chunk-WDK4G4UR.js.map +1 -0
  68. package/components/dist/chunk-WLVQWTC6.js +77 -0
  69. package/components/dist/chunk-WLVQWTC6.js.map +1 -0
  70. package/components/dist/chunk-YDLS5R4M.js +48 -0
  71. package/components/dist/chunk-YDLS5R4M.js.map +1 -0
  72. package/components/dist/chunk-YGFBWU2Q.js +7 -0
  73. package/components/dist/chunk-YGFBWU2Q.js.map +1 -0
  74. package/components/dist/chunk-ZBL4CWCH.js +2120 -0
  75. package/components/dist/chunk-ZBL4CWCH.js.map +1 -0
  76. package/components/dist/classDiagram-LNE6IOMH-VRQHEQWM.js +40 -0
  77. package/components/dist/classDiagram-LNE6IOMH-VRQHEQWM.js.map +1 -0
  78. package/components/dist/classDiagram-v2-MQ7JQ4JX-5GB4NXXM.js +40 -0
  79. package/components/dist/classDiagram-v2-MQ7JQ4JX-5GB4NXXM.js.map +1 -0
  80. package/components/dist/dagre-4EVJKHTY-XW45LMKR.js +734 -0
  81. package/components/dist/dagre-4EVJKHTY-XW45LMKR.js.map +1 -0
  82. package/components/dist/diagram-QW4FP2JN-J2YMUPB5.js +226 -0
  83. package/components/dist/diagram-QW4FP2JN-J2YMUPB5.js.map +1 -0
  84. package/components/dist/erDiagram-6RL3IURR-HQULDVJI.js +1381 -0
  85. package/components/dist/erDiagram-6RL3IURR-HQULDVJI.js.map +1 -0
  86. package/components/dist/flowDiagram-7ASYPVHJ-2542732I.js +2349 -0
  87. package/components/dist/flowDiagram-7ASYPVHJ-2542732I.js.map +1 -0
  88. package/components/dist/ganttDiagram-NTVNEXSI-V66YQQB3.js +2413 -0
  89. package/components/dist/ganttDiagram-NTVNEXSI-V66YQQB3.js.map +1 -0
  90. package/components/dist/gitGraph-YCYPL57B-AAXPWQN7.js +14 -0
  91. package/components/dist/gitGraph-YCYPL57B-AAXPWQN7.js.map +1 -0
  92. package/components/dist/gitGraphDiagram-NRZ2UAAF-5DU6QMYZ.js +1763 -0
  93. package/components/dist/gitGraphDiagram-NRZ2UAAF-5DU6QMYZ.js.map +1 -0
  94. package/components/dist/index.d.ts +54 -3
  95. package/components/dist/index.js +3794 -226
  96. package/components/dist/index.js.map +1 -1
  97. package/components/dist/info-46DW6VJ7-43TTIEYF.js +14 -0
  98. package/components/dist/info-46DW6VJ7-43TTIEYF.js.map +1 -0
  99. package/components/dist/infoDiagram-A4XQUW5V-UZERSQDI.js +54 -0
  100. package/components/dist/infoDiagram-A4XQUW5V-UZERSQDI.js.map +1 -0
  101. package/components/dist/journeyDiagram-G5WM74LC-RVKMRGRW.js +1244 -0
  102. package/components/dist/journeyDiagram-G5WM74LC-RVKMRGRW.js.map +1 -0
  103. package/components/dist/kanban-definition-QRCXZQQD-NWU5I3TK.js +1119 -0
  104. package/components/dist/kanban-definition-QRCXZQQD-NWU5I3TK.js.map +1 -0
  105. package/components/dist/katex-WNZY3CE5.js +14484 -0
  106. package/components/dist/katex-WNZY3CE5.js.map +1 -0
  107. package/components/dist/mindmap-definition-GWI6TPTV-MISEH6LG.js +6013 -0
  108. package/components/dist/mindmap-definition-GWI6TPTV-MISEH6LG.js.map +1 -0
  109. package/components/dist/packet-W2GHVCYJ-FBZCFIPR.js +14 -0
  110. package/components/dist/packet-W2GHVCYJ-FBZCFIPR.js.map +1 -0
  111. package/components/dist/pie-BEWT4RHE-UFFBBCXM.js +14 -0
  112. package/components/dist/pie-BEWT4RHE-UFFBBCXM.js.map +1 -0
  113. package/components/dist/pieDiagram-YF2LJOPJ-IXEVHPCM.js +223 -0
  114. package/components/dist/pieDiagram-YF2LJOPJ-IXEVHPCM.js.map +1 -0
  115. package/components/dist/quadrantDiagram-OS5C2QUG-MW26UCZV.js +1408 -0
  116. package/components/dist/quadrantDiagram-OS5C2QUG-MW26UCZV.js.map +1 -0
  117. package/components/dist/requirementDiagram-MIRIMTAZ-BX24AAHL.js +1175 -0
  118. package/components/dist/requirementDiagram-MIRIMTAZ-BX24AAHL.js.map +1 -0
  119. package/components/dist/sankeyDiagram-Y46BX6SQ-5RKUGG63.js +1278 -0
  120. package/components/dist/sankeyDiagram-Y46BX6SQ-5RKUGG63.js.map +1 -0
  121. package/components/dist/sequenceDiagram-G6AWOVSC-2T3JBUZ2.js +3529 -0
  122. package/components/dist/sequenceDiagram-G6AWOVSC-2T3JBUZ2.js.map +1 -0
  123. package/components/dist/stateDiagram-MAYHULR4-HZ5EGLPA.js +505 -0
  124. package/components/dist/stateDiagram-MAYHULR4-HZ5EGLPA.js.map +1 -0
  125. package/components/dist/stateDiagram-v2-4JROLMXI-DN2FEZV3.js +40 -0
  126. package/components/dist/stateDiagram-v2-4JROLMXI-DN2FEZV3.js.map +1 -0
  127. package/components/dist/timeline-definition-U7ZMHBDA-GB6AKKW4.js +1260 -0
  128. package/components/dist/timeline-definition-U7ZMHBDA-GB6AKKW4.js.map +1 -0
  129. package/components/dist/xychartDiagram-6QU3TZC5-BFFLEHUP.js +1877 -0
  130. package/components/dist/xychartDiagram-6QU3TZC5-BFFLEHUP.js.map +1 -0
  131. package/package.json +8 -2
@@ -1,126 +1,3740 @@
1
+ import {
2
+ version
3
+ } from "./chunk-YGFBWU2Q.js";
4
+ import {
5
+ selectSvgElement
6
+ } from "./chunk-TG4YEU4Q.js";
7
+ import {
8
+ JSON_SCHEMA,
9
+ load
10
+ } from "./chunk-WDK4G4UR.js";
11
+ import {
12
+ registerLayoutLoaders
13
+ } from "./chunk-WLVQWTC6.js";
14
+ import "./chunk-ND3FLKHU.js";
15
+ import "./chunk-LQ2ABR7F.js";
16
+ import "./chunk-BW7DFBOS.js";
17
+ import "./chunk-M6L3MM6K.js";
18
+ import {
19
+ registerIconPacks
20
+ } from "./chunk-H72D3HRR.js";
21
+ import {
22
+ dedent
23
+ } from "./chunk-NIVHLOPB.js";
24
+ import {
25
+ cleanAndMerge,
26
+ decodeEntities,
27
+ encodeEntities,
28
+ isDetailedError,
29
+ removeDirectives,
30
+ utils_default
31
+ } from "./chunk-T7HPDS4Z.js";
32
+ import "./chunk-7I5DT373.js";
33
+ import {
34
+ UnknownDiagramError,
35
+ __name,
36
+ addDirective,
37
+ assignWithDepth_default,
38
+ configureSvgSize,
39
+ defaultConfig,
40
+ detectType,
41
+ detectors,
42
+ evaluate,
43
+ frontMatterRegex,
44
+ getConfig,
45
+ getDiagram,
46
+ getDiagramLoader,
47
+ getSiteConfig,
48
+ log,
49
+ purify,
50
+ registerDiagram,
51
+ registerLazyLoadedDiagrams,
52
+ reset,
53
+ saveConfigFromInitialize,
54
+ select_default,
55
+ setConfig,
56
+ setLogLevel,
57
+ setSiteConfig,
58
+ styles_default,
59
+ themes_default,
60
+ updateSiteConfig
61
+ } from "./chunk-RWDBBMDN.js";
62
+ import {
63
+ isEmpty_default
64
+ } from "./chunk-BVYAEHG3.js";
65
+ import "./chunk-562WOS3Z.js";
66
+ import "./chunk-K532NZMW.js";
67
+
68
+ // components/src/asciidoc/index.tsx
69
+ import asciidoctor2 from "@asciidoctor/core";
70
+ import { Content as Content4 } from "@oxide/react-asciidoc";
71
+
1
72
  // components/src/asciidoc/Admonition.tsx
2
73
  import { Content, Title, parse } from "@oxide/react-asciidoc";
3
74
 
4
- // components/src/utils.ts
5
- import cn from "classnames";
6
- import { createElement } from "react";
7
- var titleCase = (text) => {
8
- return text.replace(
9
- /\w\S*/g,
10
- (text2) => text2.charAt(0).toUpperCase() + text2.substring(1).toLowerCase()
11
- );
75
+ // components/src/utils.ts
76
+ import cn from "classnames";
77
+ import { createElement } from "react";
78
+ var titleCase = (text) => {
79
+ return text.replace(
80
+ /\w\S*/g,
81
+ (text2) => text2.charAt(0).toUpperCase() + text2.substring(1).toLowerCase()
82
+ );
83
+ };
84
+ var make = (tag) => (
85
+ // only one argument here means string interpolations are not allowed
86
+ (strings) => {
87
+ const Comp = ({ className, children, ...rest }) => createElement(tag, { className: cn(strings[0], className), ...rest }, children);
88
+ Comp.displayName = `classed.${tag}`;
89
+ return Comp;
90
+ }
91
+ );
92
+ var classed = {
93
+ button: make("button"),
94
+ div: make("div"),
95
+ h1: make("h1"),
96
+ h2: make("h2"),
97
+ h3: make("h3"),
98
+ h4: make("h4"),
99
+ hr: make("hr"),
100
+ header: make("header"),
101
+ input: make("input"),
102
+ label: make("label"),
103
+ li: make("li"),
104
+ main: make("main"),
105
+ ol: make("ol"),
106
+ p: make("p"),
107
+ span: make("span"),
108
+ table: make("table"),
109
+ tbody: make("tbody"),
110
+ td: make("td"),
111
+ th: make("th"),
112
+ tr: make("tr")
113
+ };
114
+
115
+ // components/src/asciidoc/Admonition.tsx
116
+ import { jsx, jsxs } from "react/jsx-runtime";
117
+ var Admonition = ({ node: node2 }) => {
118
+ const attrs2 = node2.attributes;
119
+ let icon;
120
+ if (attrs2.name === "caution") {
121
+ icon = /* @__PURE__ */ jsx(Error12, {});
122
+ } else if (attrs2.name === "warning") {
123
+ icon = /* @__PURE__ */ jsx(Warning12, {});
124
+ } else {
125
+ icon = /* @__PURE__ */ jsx(Error12, { className: "rotate-180" });
126
+ }
127
+ return /* @__PURE__ */ jsxs("div", { className: `admonitionblock ${attrs2.name}`, children: [
128
+ /* @__PURE__ */ jsx("div", { className: "admonition-icon", children: icon }),
129
+ /* @__PURE__ */ jsxs("div", { className: "admonition-content content", children: [
130
+ /* @__PURE__ */ jsx(Title, { text: node2.title }),
131
+ /* @__PURE__ */ jsx("div", { children: titleCase(attrs2.name.toString()) }),
132
+ /* @__PURE__ */ jsxs("div", { children: [
133
+ /* @__PURE__ */ jsx(Title, { text: node2.title }),
134
+ node2.content && parse(node2.content),
135
+ /* @__PURE__ */ jsx(Content, { blocks: node2.blocks })
136
+ ] })
137
+ ] })
138
+ ] });
139
+ };
140
+ var Error12 = ({ className }) => /* @__PURE__ */ jsx(
141
+ "svg",
142
+ {
143
+ width: "12",
144
+ height: "12",
145
+ viewBox: "0 0 12 12",
146
+ xmlns: "http://www.w3.org/2000/svg",
147
+ className,
148
+ children: /* @__PURE__ */ jsx(
149
+ "path",
150
+ {
151
+ fillRule: "evenodd",
152
+ clipRule: "evenodd",
153
+ d: "M6 12A6 6 0 1 0 6 0a6 6 0 0 0 0 12Zm.083-9c.368 0 .667.299.667.667v2.666A.667.667 0 0 1 6.083 7h-.166a.667.667 0 0 1-.667-.667V3.667c0-.368.299-.667.667-.667h.166Zm0 5c.368 0 .667.299.667.667v.166a.667.667 0 0 1-.667.667h-.166a.667.667 0 0 1-.667-.667v-.166c0-.368.299-.667.667-.667h.166Z",
154
+ fill: "currentColor"
155
+ }
156
+ )
157
+ }
158
+ );
159
+ var Warning12 = ({ className }) => /* @__PURE__ */ jsx(
160
+ "svg",
161
+ {
162
+ width: "12",
163
+ height: "12",
164
+ viewBox: "0 0 12 12",
165
+ xmlns: "http://www.w3.org/2000/svg",
166
+ className,
167
+ children: /* @__PURE__ */ jsx(
168
+ "path",
169
+ {
170
+ fillRule: "evenodd",
171
+ clipRule: "evenodd",
172
+ d: "M6 12A6 6 0 1 0 6 0a6 6 0 0 0 0 12Zm.083-9c.368 0 .667.299.667.667v2.666A.667.667 0 0 1 6.083 7h-.166a.667.667 0 0 1-.667-.667V3.667c0-.368.299-.667.667-.667h.166Zm0 5c.368 0 .667.299.667.667v.166a.667.667 0 0 1-.667.667h-.166a.667.667 0 0 1-.667-.667v-.166c0-.368.299-.667.667-.667h.166Z",
173
+ fill: "currentColor"
174
+ }
175
+ )
176
+ }
177
+ );
178
+ var Admonition_default = Admonition;
179
+
180
+ // node_modules/stylis/src/Enum.js
181
+ var COMMENT = "comm";
182
+ var RULESET = "rule";
183
+ var DECLARATION = "decl";
184
+ var IMPORT = "@import";
185
+ var KEYFRAMES = "@keyframes";
186
+ var LAYER = "@layer";
187
+
188
+ // node_modules/stylis/src/Utility.js
189
+ var abs = Math.abs;
190
+ var from = String.fromCharCode;
191
+ function trim(value) {
192
+ return value.trim();
193
+ }
194
+ function replace(value, pattern, replacement) {
195
+ return value.replace(pattern, replacement);
196
+ }
197
+ function indexof(value, search, position2) {
198
+ return value.indexOf(search, position2);
199
+ }
200
+ function charat(value, index) {
201
+ return value.charCodeAt(index) | 0;
202
+ }
203
+ function substr(value, begin, end) {
204
+ return value.slice(begin, end);
205
+ }
206
+ function strlen(value) {
207
+ return value.length;
208
+ }
209
+ function sizeof(value) {
210
+ return value.length;
211
+ }
212
+ function append(value, array) {
213
+ return array.push(value), value;
214
+ }
215
+
216
+ // node_modules/stylis/src/Tokenizer.js
217
+ var line = 1;
218
+ var column = 1;
219
+ var length = 0;
220
+ var position = 0;
221
+ var character = 0;
222
+ var characters = "";
223
+ function node(value, root, parent, type, props, children, length2, siblings) {
224
+ return { value, root, parent, type, props, children, line, column, length: length2, return: "", siblings };
225
+ }
226
+ function char() {
227
+ return character;
228
+ }
229
+ function prev() {
230
+ character = position > 0 ? charat(characters, --position) : 0;
231
+ if (column--, character === 10)
232
+ column = 1, line--;
233
+ return character;
234
+ }
235
+ function next() {
236
+ character = position < length ? charat(characters, position++) : 0;
237
+ if (column++, character === 10)
238
+ column = 1, line++;
239
+ return character;
240
+ }
241
+ function peek() {
242
+ return charat(characters, position);
243
+ }
244
+ function caret() {
245
+ return position;
246
+ }
247
+ function slice(begin, end) {
248
+ return substr(characters, begin, end);
249
+ }
250
+ function token(type) {
251
+ switch (type) {
252
+ case 0:
253
+ case 9:
254
+ case 10:
255
+ case 13:
256
+ case 32:
257
+ return 5;
258
+ case 33:
259
+ case 43:
260
+ case 44:
261
+ case 47:
262
+ case 62:
263
+ case 64:
264
+ case 126:
265
+ case 59:
266
+ case 123:
267
+ case 125:
268
+ return 4;
269
+ case 58:
270
+ return 3;
271
+ case 34:
272
+ case 39:
273
+ case 40:
274
+ case 91:
275
+ return 2;
276
+ case 41:
277
+ case 93:
278
+ return 1;
279
+ }
280
+ return 0;
281
+ }
282
+ function alloc(value) {
283
+ return line = column = 1, length = strlen(characters = value), position = 0, [];
284
+ }
285
+ function dealloc(value) {
286
+ return characters = "", value;
287
+ }
288
+ function delimit(type) {
289
+ return trim(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)));
290
+ }
291
+ function whitespace(type) {
292
+ while (character = peek())
293
+ if (character < 33)
294
+ next();
295
+ else
296
+ break;
297
+ return token(type) > 2 || token(character) > 3 ? "" : " ";
298
+ }
299
+ function escaping(index, count) {
300
+ while (--count && next())
301
+ if (character < 48 || character > 102 || character > 57 && character < 65 || character > 70 && character < 97)
302
+ break;
303
+ return slice(index, caret() + (count < 6 && peek() == 32 && next() == 32));
304
+ }
305
+ function delimiter(type) {
306
+ while (next())
307
+ switch (character) {
308
+ case type:
309
+ return position;
310
+ case 34:
311
+ case 39:
312
+ if (type !== 34 && type !== 39)
313
+ delimiter(character);
314
+ break;
315
+ case 40:
316
+ if (type === 41)
317
+ delimiter(type);
318
+ break;
319
+ case 92:
320
+ next();
321
+ break;
322
+ }
323
+ return position;
324
+ }
325
+ function commenter(type, index) {
326
+ while (next())
327
+ if (type + character === 47 + 10)
328
+ break;
329
+ else if (type + character === 42 + 42 && peek() === 47)
330
+ break;
331
+ return "/*" + slice(index, position - 1) + "*" + from(type === 47 ? type : next());
332
+ }
333
+ function identifier(index) {
334
+ while (!token(peek()))
335
+ next();
336
+ return slice(index, position);
337
+ }
338
+
339
+ // node_modules/stylis/src/Parser.js
340
+ function compile(value) {
341
+ return dealloc(parse2("", null, null, null, [""], value = alloc(value), 0, [0], value));
342
+ }
343
+ function parse2(value, root, parent, rule, rules, rulesets, pseudo, points, declarations) {
344
+ var index = 0;
345
+ var offset2 = 0;
346
+ var length2 = pseudo;
347
+ var atrule = 0;
348
+ var property = 0;
349
+ var previous = 0;
350
+ var variable = 1;
351
+ var scanning = 1;
352
+ var ampersand = 1;
353
+ var character2 = 0;
354
+ var type = "";
355
+ var props = rules;
356
+ var children = rulesets;
357
+ var reference = rule;
358
+ var characters2 = type;
359
+ while (scanning)
360
+ switch (previous = character2, character2 = next()) {
361
+ case 40:
362
+ if (previous != 108 && charat(characters2, length2 - 1) == 58) {
363
+ if (indexof(characters2 += replace(delimit(character2), "&", "&\f"), "&\f", abs(index ? points[index - 1] : 0)) != -1)
364
+ ampersand = -1;
365
+ break;
366
+ }
367
+ case 34:
368
+ case 39:
369
+ case 91:
370
+ characters2 += delimit(character2);
371
+ break;
372
+ case 9:
373
+ case 10:
374
+ case 13:
375
+ case 32:
376
+ characters2 += whitespace(previous);
377
+ break;
378
+ case 92:
379
+ characters2 += escaping(caret() - 1, 7);
380
+ continue;
381
+ case 47:
382
+ switch (peek()) {
383
+ case 42:
384
+ case 47:
385
+ append(comment(commenter(next(), caret()), root, parent, declarations), declarations);
386
+ if ((token(previous || 1) == 5 || token(peek() || 1) == 5) && strlen(characters2) && substr(characters2, -1, void 0) !== " ")
387
+ characters2 += " ";
388
+ break;
389
+ default:
390
+ characters2 += "/";
391
+ }
392
+ break;
393
+ case 123 * variable:
394
+ points[index++] = strlen(characters2) * ampersand;
395
+ case 125 * variable:
396
+ case 59:
397
+ case 0:
398
+ switch (character2) {
399
+ case 0:
400
+ case 125:
401
+ scanning = 0;
402
+ case 59 + offset2:
403
+ if (ampersand == -1)
404
+ characters2 = replace(characters2, /\f/g, "");
405
+ if (property > 0 && (strlen(characters2) - length2 || variable === 0 && previous === 47))
406
+ append(property > 32 ? declaration(characters2 + ";", rule, parent, length2 - 1, declarations) : declaration(replace(characters2, " ", "") + ";", rule, parent, length2 - 2, declarations), declarations);
407
+ break;
408
+ case 59:
409
+ characters2 += ";";
410
+ default:
411
+ append(reference = ruleset(characters2, root, parent, index, offset2, rules, points, type, props = [], children = [], length2, rulesets), rulesets);
412
+ if (character2 === 123)
413
+ if (offset2 === 0)
414
+ parse2(characters2, root, reference, reference, props, rulesets, length2, points, children);
415
+ else
416
+ switch (atrule === 99 && charat(characters2, 3) === 110 ? 100 : atrule) {
417
+ case 100:
418
+ case 108:
419
+ case 109:
420
+ case 115:
421
+ parse2(value, reference, reference, rule && append(ruleset(value, reference, reference, 0, 0, rules, points, type, rules, props = [], length2, children), children), rules, children, length2, points, rule ? props : children);
422
+ break;
423
+ default:
424
+ parse2(characters2, reference, reference, reference, [""], children, 0, points, children);
425
+ }
426
+ }
427
+ index = offset2 = property = 0, variable = ampersand = 1, type = characters2 = "", length2 = pseudo;
428
+ break;
429
+ case 58:
430
+ length2 = 1 + strlen(characters2), property = previous;
431
+ default:
432
+ if (variable < 1) {
433
+ if (character2 == 123)
434
+ --variable;
435
+ else if (character2 == 125 && variable++ == 0 && prev() == 125)
436
+ continue;
437
+ }
438
+ switch (characters2 += from(character2), character2 * variable) {
439
+ case 38:
440
+ ampersand = offset2 > 0 ? 1 : (characters2 += "\f", -1);
441
+ break;
442
+ case 44:
443
+ points[index++] = (strlen(characters2) - 1) * ampersand, ampersand = 1;
444
+ break;
445
+ case 64:
446
+ if (peek() === 45)
447
+ characters2 += delimit(next());
448
+ atrule = peek(), offset2 = length2 = strlen(type = characters2 += identifier(caret())), character2++;
449
+ break;
450
+ case 45:
451
+ if (previous === 45 && strlen(characters2) == 2)
452
+ variable = 0;
453
+ }
454
+ }
455
+ return rulesets;
456
+ }
457
+ function ruleset(value, root, parent, index, offset2, rules, points, type, props, children, length2, siblings) {
458
+ var post = offset2 - 1;
459
+ var rule = offset2 === 0 ? rules : [""];
460
+ var size2 = sizeof(rule);
461
+ for (var i = 0, j = 0, k = 0; i < index; ++i)
462
+ for (var x = 0, y = substr(value, post + 1, post = abs(j = points[i])), z = value; x < size2; ++x)
463
+ if (z = trim(j > 0 ? rule[x] + " " + y : replace(y, /&\f/g, rule[x])))
464
+ props[k++] = z;
465
+ return node(value, root, parent, offset2 === 0 ? RULESET : type, props, children, length2, siblings);
466
+ }
467
+ function comment(value, root, parent, siblings) {
468
+ return node(value, root, parent, COMMENT, from(char()), substr(value, 2, -2), 0, siblings);
469
+ }
470
+ function declaration(value, root, parent, length2, siblings) {
471
+ return node(value, root, parent, DECLARATION, substr(value, 0, length2), substr(value, length2 + 1, -1), length2, siblings);
472
+ }
473
+
474
+ // node_modules/stylis/src/Serializer.js
475
+ function serialize(children, callback) {
476
+ var output = "";
477
+ for (var i = 0; i < children.length; i++)
478
+ output += callback(children[i], i, children, callback) || "";
479
+ return output;
480
+ }
481
+ function stringify(element, index, children, callback) {
482
+ switch (element.type) {
483
+ case LAYER:
484
+ if (element.children.length)
485
+ break;
486
+ case IMPORT:
487
+ case DECLARATION:
488
+ return element.return = element.return || element.value;
489
+ case COMMENT:
490
+ return "";
491
+ case KEYFRAMES:
492
+ return element.return = element.value + "{" + serialize(element.children, callback) + "}";
493
+ case RULESET:
494
+ if (!strlen(element.value = element.props.join(",")))
495
+ return "";
496
+ }
497
+ return strlen(children = serialize(element.children, callback)) ? element.return = element.value + "{" + children + "}" : "";
498
+ }
499
+
500
+ // node_modules/mermaid/dist/mermaid.core.mjs
501
+ var id = "c4";
502
+ var detector = /* @__PURE__ */ __name((txt) => {
503
+ return /^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(txt);
504
+ }, "detector");
505
+ var loader = /* @__PURE__ */ __name(async () => {
506
+ const { diagram: diagram2 } = await import("./c4Diagram-6F5ED5ID-TBHFK2XY.js");
507
+ return { id, diagram: diagram2 };
508
+ }, "loader");
509
+ var plugin = {
510
+ id,
511
+ detector,
512
+ loader
513
+ };
514
+ var c4Detector_default = plugin;
515
+ var id2 = "flowchart";
516
+ var detector2 = /* @__PURE__ */ __name((txt, config) => {
517
+ if (config?.flowchart?.defaultRenderer === "dagre-wrapper" || config?.flowchart?.defaultRenderer === "elk") {
518
+ return false;
519
+ }
520
+ return /^\s*graph/.test(txt);
521
+ }, "detector");
522
+ var loader2 = /* @__PURE__ */ __name(async () => {
523
+ const { diagram: diagram2 } = await import("./flowDiagram-7ASYPVHJ-2542732I.js");
524
+ return { id: id2, diagram: diagram2 };
525
+ }, "loader");
526
+ var plugin2 = {
527
+ id: id2,
528
+ detector: detector2,
529
+ loader: loader2
530
+ };
531
+ var flowDetector_default = plugin2;
532
+ var id3 = "flowchart-v2";
533
+ var detector3 = /* @__PURE__ */ __name((txt, config) => {
534
+ if (config?.flowchart?.defaultRenderer === "dagre-d3") {
535
+ return false;
536
+ }
537
+ if (config?.flowchart?.defaultRenderer === "elk") {
538
+ config.layout = "elk";
539
+ }
540
+ if (/^\s*graph/.test(txt) && config?.flowchart?.defaultRenderer === "dagre-wrapper") {
541
+ return true;
542
+ }
543
+ return /^\s*flowchart/.test(txt);
544
+ }, "detector");
545
+ var loader3 = /* @__PURE__ */ __name(async () => {
546
+ const { diagram: diagram2 } = await import("./flowDiagram-7ASYPVHJ-2542732I.js");
547
+ return { id: id3, diagram: diagram2 };
548
+ }, "loader");
549
+ var plugin3 = {
550
+ id: id3,
551
+ detector: detector3,
552
+ loader: loader3
553
+ };
554
+ var flowDetector_v2_default = plugin3;
555
+ var id4 = "er";
556
+ var detector4 = /* @__PURE__ */ __name((txt) => {
557
+ return /^\s*erDiagram/.test(txt);
558
+ }, "detector");
559
+ var loader4 = /* @__PURE__ */ __name(async () => {
560
+ const { diagram: diagram2 } = await import("./erDiagram-6RL3IURR-HQULDVJI.js");
561
+ return { id: id4, diagram: diagram2 };
562
+ }, "loader");
563
+ var plugin4 = {
564
+ id: id4,
565
+ detector: detector4,
566
+ loader: loader4
567
+ };
568
+ var erDetector_default = plugin4;
569
+ var id5 = "gitGraph";
570
+ var detector5 = /* @__PURE__ */ __name((txt) => {
571
+ return /^\s*gitGraph/.test(txt);
572
+ }, "detector");
573
+ var loader5 = /* @__PURE__ */ __name(async () => {
574
+ const { diagram: diagram2 } = await import("./gitGraphDiagram-NRZ2UAAF-5DU6QMYZ.js");
575
+ return { id: id5, diagram: diagram2 };
576
+ }, "loader");
577
+ var plugin5 = {
578
+ id: id5,
579
+ detector: detector5,
580
+ loader: loader5
581
+ };
582
+ var gitGraphDetector_default = plugin5;
583
+ var id6 = "gantt";
584
+ var detector6 = /* @__PURE__ */ __name((txt) => {
585
+ return /^\s*gantt/.test(txt);
586
+ }, "detector");
587
+ var loader6 = /* @__PURE__ */ __name(async () => {
588
+ const { diagram: diagram2 } = await import("./ganttDiagram-NTVNEXSI-V66YQQB3.js");
589
+ return { id: id6, diagram: diagram2 };
590
+ }, "loader");
591
+ var plugin6 = {
592
+ id: id6,
593
+ detector: detector6,
594
+ loader: loader6
595
+ };
596
+ var ganttDetector_default = plugin6;
597
+ var id7 = "info";
598
+ var detector7 = /* @__PURE__ */ __name((txt) => {
599
+ return /^\s*info/.test(txt);
600
+ }, "detector");
601
+ var loader7 = /* @__PURE__ */ __name(async () => {
602
+ const { diagram: diagram2 } = await import("./infoDiagram-A4XQUW5V-UZERSQDI.js");
603
+ return { id: id7, diagram: diagram2 };
604
+ }, "loader");
605
+ var info = {
606
+ id: id7,
607
+ detector: detector7,
608
+ loader: loader7
609
+ };
610
+ var id8 = "pie";
611
+ var detector8 = /* @__PURE__ */ __name((txt) => {
612
+ return /^\s*pie/.test(txt);
613
+ }, "detector");
614
+ var loader8 = /* @__PURE__ */ __name(async () => {
615
+ const { diagram: diagram2 } = await import("./pieDiagram-YF2LJOPJ-IXEVHPCM.js");
616
+ return { id: id8, diagram: diagram2 };
617
+ }, "loader");
618
+ var pie = {
619
+ id: id8,
620
+ detector: detector8,
621
+ loader: loader8
622
+ };
623
+ var id9 = "quadrantChart";
624
+ var detector9 = /* @__PURE__ */ __name((txt) => {
625
+ return /^\s*quadrantChart/.test(txt);
626
+ }, "detector");
627
+ var loader9 = /* @__PURE__ */ __name(async () => {
628
+ const { diagram: diagram2 } = await import("./quadrantDiagram-OS5C2QUG-MW26UCZV.js");
629
+ return { id: id9, diagram: diagram2 };
630
+ }, "loader");
631
+ var plugin7 = {
632
+ id: id9,
633
+ detector: detector9,
634
+ loader: loader9
635
+ };
636
+ var quadrantDetector_default = plugin7;
637
+ var id10 = "xychart";
638
+ var detector10 = /* @__PURE__ */ __name((txt) => {
639
+ return /^\s*xychart-beta/.test(txt);
640
+ }, "detector");
641
+ var loader10 = /* @__PURE__ */ __name(async () => {
642
+ const { diagram: diagram2 } = await import("./xychartDiagram-6QU3TZC5-BFFLEHUP.js");
643
+ return { id: id10, diagram: diagram2 };
644
+ }, "loader");
645
+ var plugin8 = {
646
+ id: id10,
647
+ detector: detector10,
648
+ loader: loader10
649
+ };
650
+ var xychartDetector_default = plugin8;
651
+ var id11 = "requirement";
652
+ var detector11 = /* @__PURE__ */ __name((txt) => {
653
+ return /^\s*requirement(Diagram)?/.test(txt);
654
+ }, "detector");
655
+ var loader11 = /* @__PURE__ */ __name(async () => {
656
+ const { diagram: diagram2 } = await import("./requirementDiagram-MIRIMTAZ-BX24AAHL.js");
657
+ return { id: id11, diagram: diagram2 };
658
+ }, "loader");
659
+ var plugin9 = {
660
+ id: id11,
661
+ detector: detector11,
662
+ loader: loader11
663
+ };
664
+ var requirementDetector_default = plugin9;
665
+ var id12 = "sequence";
666
+ var detector12 = /* @__PURE__ */ __name((txt) => {
667
+ return /^\s*sequenceDiagram/.test(txt);
668
+ }, "detector");
669
+ var loader12 = /* @__PURE__ */ __name(async () => {
670
+ const { diagram: diagram2 } = await import("./sequenceDiagram-G6AWOVSC-2T3JBUZ2.js");
671
+ return { id: id12, diagram: diagram2 };
672
+ }, "loader");
673
+ var plugin10 = {
674
+ id: id12,
675
+ detector: detector12,
676
+ loader: loader12
677
+ };
678
+ var sequenceDetector_default = plugin10;
679
+ var id13 = "class";
680
+ var detector13 = /* @__PURE__ */ __name((txt, config) => {
681
+ if (config?.class?.defaultRenderer === "dagre-wrapper") {
682
+ return false;
683
+ }
684
+ return /^\s*classDiagram/.test(txt);
685
+ }, "detector");
686
+ var loader13 = /* @__PURE__ */ __name(async () => {
687
+ const { diagram: diagram2 } = await import("./classDiagram-LNE6IOMH-VRQHEQWM.js");
688
+ return { id: id13, diagram: diagram2 };
689
+ }, "loader");
690
+ var plugin11 = {
691
+ id: id13,
692
+ detector: detector13,
693
+ loader: loader13
694
+ };
695
+ var classDetector_default = plugin11;
696
+ var id14 = "classDiagram";
697
+ var detector14 = /* @__PURE__ */ __name((txt, config) => {
698
+ if (/^\s*classDiagram/.test(txt) && config?.class?.defaultRenderer === "dagre-wrapper") {
699
+ return true;
700
+ }
701
+ return /^\s*classDiagram-v2/.test(txt);
702
+ }, "detector");
703
+ var loader14 = /* @__PURE__ */ __name(async () => {
704
+ const { diagram: diagram2 } = await import("./classDiagram-v2-MQ7JQ4JX-5GB4NXXM.js");
705
+ return { id: id14, diagram: diagram2 };
706
+ }, "loader");
707
+ var plugin12 = {
708
+ id: id14,
709
+ detector: detector14,
710
+ loader: loader14
711
+ };
712
+ var classDetector_V2_default = plugin12;
713
+ var id15 = "state";
714
+ var detector15 = /* @__PURE__ */ __name((txt, config) => {
715
+ if (config?.state?.defaultRenderer === "dagre-wrapper") {
716
+ return false;
717
+ }
718
+ return /^\s*stateDiagram/.test(txt);
719
+ }, "detector");
720
+ var loader15 = /* @__PURE__ */ __name(async () => {
721
+ const { diagram: diagram2 } = await import("./stateDiagram-MAYHULR4-HZ5EGLPA.js");
722
+ return { id: id15, diagram: diagram2 };
723
+ }, "loader");
724
+ var plugin13 = {
725
+ id: id15,
726
+ detector: detector15,
727
+ loader: loader15
728
+ };
729
+ var stateDetector_default = plugin13;
730
+ var id16 = "stateDiagram";
731
+ var detector16 = /* @__PURE__ */ __name((txt, config) => {
732
+ if (/^\s*stateDiagram-v2/.test(txt)) {
733
+ return true;
734
+ }
735
+ if (/^\s*stateDiagram/.test(txt) && config?.state?.defaultRenderer === "dagre-wrapper") {
736
+ return true;
737
+ }
738
+ return false;
739
+ }, "detector");
740
+ var loader16 = /* @__PURE__ */ __name(async () => {
741
+ const { diagram: diagram2 } = await import("./stateDiagram-v2-4JROLMXI-DN2FEZV3.js");
742
+ return { id: id16, diagram: diagram2 };
743
+ }, "loader");
744
+ var plugin14 = {
745
+ id: id16,
746
+ detector: detector16,
747
+ loader: loader16
748
+ };
749
+ var stateDetector_V2_default = plugin14;
750
+ var id17 = "journey";
751
+ var detector17 = /* @__PURE__ */ __name((txt) => {
752
+ return /^\s*journey/.test(txt);
753
+ }, "detector");
754
+ var loader17 = /* @__PURE__ */ __name(async () => {
755
+ const { diagram: diagram2 } = await import("./journeyDiagram-G5WM74LC-RVKMRGRW.js");
756
+ return { id: id17, diagram: diagram2 };
757
+ }, "loader");
758
+ var plugin15 = {
759
+ id: id17,
760
+ detector: detector17,
761
+ loader: loader17
762
+ };
763
+ var journeyDetector_default = plugin15;
764
+ var draw = /* @__PURE__ */ __name((_text, id26, version2) => {
765
+ log.debug("rendering svg for syntax error\n");
766
+ const svg = selectSvgElement(id26);
767
+ const g = svg.append("g");
768
+ svg.attr("viewBox", "0 0 2412 512");
769
+ configureSvgSize(svg, 100, 512, true);
770
+ g.append("path").attr("class", "error-icon").attr(
771
+ "d",
772
+ "m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"
773
+ );
774
+ g.append("path").attr("class", "error-icon").attr(
775
+ "d",
776
+ "m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"
777
+ );
778
+ g.append("path").attr("class", "error-icon").attr(
779
+ "d",
780
+ "m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"
781
+ );
782
+ g.append("path").attr("class", "error-icon").attr(
783
+ "d",
784
+ "m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"
785
+ );
786
+ g.append("path").attr("class", "error-icon").attr(
787
+ "d",
788
+ "m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"
789
+ );
790
+ g.append("path").attr("class", "error-icon").attr(
791
+ "d",
792
+ "m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"
793
+ );
794
+ g.append("text").attr("class", "error-text").attr("x", 1440).attr("y", 250).attr("font-size", "150px").style("text-anchor", "middle").text("Syntax error in text");
795
+ g.append("text").attr("class", "error-text").attr("x", 1250).attr("y", 400).attr("font-size", "100px").style("text-anchor", "middle").text(`mermaid version ${version2}`);
796
+ }, "draw");
797
+ var renderer = { draw };
798
+ var errorRenderer_default = renderer;
799
+ var diagram = {
800
+ db: {},
801
+ renderer,
802
+ parser: {
803
+ parse: /* @__PURE__ */ __name(() => {
804
+ return;
805
+ }, "parse")
806
+ }
807
+ };
808
+ var errorDiagram_default = diagram;
809
+ var id18 = "flowchart-elk";
810
+ var detector18 = /* @__PURE__ */ __name((txt, config = {}) => {
811
+ if (
812
+ // If diagram explicitly states flowchart-elk
813
+ /^\s*flowchart-elk/.test(txt) || // If a flowchart/graph diagram has their default renderer set to elk
814
+ /^\s*flowchart|graph/.test(txt) && config?.flowchart?.defaultRenderer === "elk"
815
+ ) {
816
+ config.layout = "elk";
817
+ return true;
818
+ }
819
+ return false;
820
+ }, "detector");
821
+ var loader18 = /* @__PURE__ */ __name(async () => {
822
+ const { diagram: diagram2 } = await import("./flowDiagram-7ASYPVHJ-2542732I.js");
823
+ return { id: id18, diagram: diagram2 };
824
+ }, "loader");
825
+ var plugin16 = {
826
+ id: id18,
827
+ detector: detector18,
828
+ loader: loader18
829
+ };
830
+ var detector_default = plugin16;
831
+ var id19 = "timeline";
832
+ var detector19 = /* @__PURE__ */ __name((txt) => {
833
+ return /^\s*timeline/.test(txt);
834
+ }, "detector");
835
+ var loader19 = /* @__PURE__ */ __name(async () => {
836
+ const { diagram: diagram2 } = await import("./timeline-definition-U7ZMHBDA-GB6AKKW4.js");
837
+ return { id: id19, diagram: diagram2 };
838
+ }, "loader");
839
+ var plugin17 = {
840
+ id: id19,
841
+ detector: detector19,
842
+ loader: loader19
843
+ };
844
+ var detector_default2 = plugin17;
845
+ var id20 = "mindmap";
846
+ var detector20 = /* @__PURE__ */ __name((txt) => {
847
+ return /^\s*mindmap/.test(txt);
848
+ }, "detector");
849
+ var loader20 = /* @__PURE__ */ __name(async () => {
850
+ const { diagram: diagram2 } = await import("./mindmap-definition-GWI6TPTV-MISEH6LG.js");
851
+ return { id: id20, diagram: diagram2 };
852
+ }, "loader");
853
+ var plugin18 = {
854
+ id: id20,
855
+ detector: detector20,
856
+ loader: loader20
857
+ };
858
+ var detector_default3 = plugin18;
859
+ var id21 = "kanban";
860
+ var detector21 = /* @__PURE__ */ __name((txt) => {
861
+ return /^\s*kanban/.test(txt);
862
+ }, "detector");
863
+ var loader21 = /* @__PURE__ */ __name(async () => {
864
+ const { diagram: diagram2 } = await import("./kanban-definition-QRCXZQQD-NWU5I3TK.js");
865
+ return { id: id21, diagram: diagram2 };
866
+ }, "loader");
867
+ var plugin19 = {
868
+ id: id21,
869
+ detector: detector21,
870
+ loader: loader21
871
+ };
872
+ var detector_default4 = plugin19;
873
+ var id22 = "sankey";
874
+ var detector22 = /* @__PURE__ */ __name((txt) => {
875
+ return /^\s*sankey-beta/.test(txt);
876
+ }, "detector");
877
+ var loader22 = /* @__PURE__ */ __name(async () => {
878
+ const { diagram: diagram2 } = await import("./sankeyDiagram-Y46BX6SQ-5RKUGG63.js");
879
+ return { id: id22, diagram: diagram2 };
880
+ }, "loader");
881
+ var plugin20 = {
882
+ id: id22,
883
+ detector: detector22,
884
+ loader: loader22
885
+ };
886
+ var sankeyDetector_default = plugin20;
887
+ var id23 = "packet";
888
+ var detector23 = /* @__PURE__ */ __name((txt) => {
889
+ return /^\s*packet-beta/.test(txt);
890
+ }, "detector");
891
+ var loader23 = /* @__PURE__ */ __name(async () => {
892
+ const { diagram: diagram2 } = await import("./diagram-QW4FP2JN-J2YMUPB5.js");
893
+ return { id: id23, diagram: diagram2 };
894
+ }, "loader");
895
+ var packet = {
896
+ id: id23,
897
+ detector: detector23,
898
+ loader: loader23
899
+ };
900
+ var id24 = "block";
901
+ var detector24 = /* @__PURE__ */ __name((txt) => {
902
+ return /^\s*block-beta/.test(txt);
903
+ }, "detector");
904
+ var loader24 = /* @__PURE__ */ __name(async () => {
905
+ const { diagram: diagram2 } = await import("./blockDiagram-ZHA2E4KO-OAYYKCLF.js");
906
+ return { id: id24, diagram: diagram2 };
907
+ }, "loader");
908
+ var plugin21 = {
909
+ id: id24,
910
+ detector: detector24,
911
+ loader: loader24
912
+ };
913
+ var blockDetector_default = plugin21;
914
+ var id25 = "architecture";
915
+ var detector25 = /* @__PURE__ */ __name((txt) => {
916
+ return /^\s*architecture/.test(txt);
917
+ }, "detector");
918
+ var loader25 = /* @__PURE__ */ __name(async () => {
919
+ const { diagram: diagram2 } = await import("./architectureDiagram-UYN6MBPD-HXPGIDN7.js");
920
+ return { id: id25, diagram: diagram2 };
921
+ }, "loader");
922
+ var architecture = {
923
+ id: id25,
924
+ detector: detector25,
925
+ loader: loader25
926
+ };
927
+ var architectureDetector_default = architecture;
928
+ var hasLoadedDiagrams = false;
929
+ var addDiagrams = /* @__PURE__ */ __name(() => {
930
+ if (hasLoadedDiagrams) {
931
+ return;
932
+ }
933
+ hasLoadedDiagrams = true;
934
+ registerDiagram("error", errorDiagram_default, (text) => {
935
+ return text.toLowerCase().trim() === "error";
936
+ });
937
+ registerDiagram(
938
+ "---",
939
+ // --- diagram type may appear if YAML front-matter is not parsed correctly
940
+ {
941
+ db: {
942
+ clear: /* @__PURE__ */ __name(() => {
943
+ }, "clear")
944
+ },
945
+ styles: {},
946
+ // should never be used
947
+ renderer: {
948
+ draw: /* @__PURE__ */ __name(() => {
949
+ }, "draw")
950
+ },
951
+ parser: {
952
+ parse: /* @__PURE__ */ __name(() => {
953
+ throw new Error(
954
+ "Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks"
955
+ );
956
+ }, "parse")
957
+ },
958
+ init: /* @__PURE__ */ __name(() => null, "init")
959
+ // no op
960
+ },
961
+ (text) => {
962
+ return text.toLowerCase().trimStart().startsWith("---");
963
+ }
964
+ );
965
+ registerLazyLoadedDiagrams(
966
+ c4Detector_default,
967
+ detector_default4,
968
+ classDetector_V2_default,
969
+ classDetector_default,
970
+ erDetector_default,
971
+ ganttDetector_default,
972
+ info,
973
+ pie,
974
+ requirementDetector_default,
975
+ sequenceDetector_default,
976
+ detector_default,
977
+ flowDetector_v2_default,
978
+ flowDetector_default,
979
+ detector_default3,
980
+ detector_default2,
981
+ gitGraphDetector_default,
982
+ stateDetector_V2_default,
983
+ stateDetector_default,
984
+ journeyDetector_default,
985
+ quadrantDetector_default,
986
+ sankeyDetector_default,
987
+ packet,
988
+ xychartDetector_default,
989
+ blockDetector_default,
990
+ architectureDetector_default
991
+ );
992
+ }, "addDiagrams");
993
+ var loadRegisteredDiagrams = /* @__PURE__ */ __name(async () => {
994
+ log.debug(`Loading registered diagrams`);
995
+ const results = await Promise.allSettled(
996
+ Object.entries(detectors).map(async ([key, { detector: detector26, loader: loader26 }]) => {
997
+ if (loader26) {
998
+ try {
999
+ getDiagram(key);
1000
+ } catch {
1001
+ try {
1002
+ const { diagram: diagram2, id: id26 } = await loader26();
1003
+ registerDiagram(id26, diagram2, detector26);
1004
+ } catch (err) {
1005
+ log.error(`Failed to load external diagram with key ${key}. Removing from detectors.`);
1006
+ delete detectors[key];
1007
+ throw err;
1008
+ }
1009
+ }
1010
+ }
1011
+ })
1012
+ );
1013
+ const failed = results.filter((result) => result.status === "rejected");
1014
+ if (failed.length > 0) {
1015
+ log.error(`Failed to load ${failed.length} external diagrams`);
1016
+ for (const res of failed) {
1017
+ log.error(res);
1018
+ }
1019
+ throw new Error(`Failed to load ${failed.length} external diagrams`);
1020
+ }
1021
+ }, "loadRegisteredDiagrams");
1022
+ var SVG_ROLE = "graphics-document document";
1023
+ function setA11yDiagramInfo(svg, diagramType) {
1024
+ svg.attr("role", SVG_ROLE);
1025
+ if (diagramType !== "") {
1026
+ svg.attr("aria-roledescription", diagramType);
1027
+ }
1028
+ }
1029
+ __name(setA11yDiagramInfo, "setA11yDiagramInfo");
1030
+ function addSVGa11yTitleDescription(svg, a11yTitle, a11yDesc, baseId) {
1031
+ if (svg.insert === void 0) {
1032
+ return;
1033
+ }
1034
+ if (a11yDesc) {
1035
+ const descId = `chart-desc-${baseId}`;
1036
+ svg.attr("aria-describedby", descId);
1037
+ svg.insert("desc", ":first-child").attr("id", descId).text(a11yDesc);
1038
+ }
1039
+ if (a11yTitle) {
1040
+ const titleId = `chart-title-${baseId}`;
1041
+ svg.attr("aria-labelledby", titleId);
1042
+ svg.insert("title", ":first-child").attr("id", titleId).text(a11yTitle);
1043
+ }
1044
+ }
1045
+ __name(addSVGa11yTitleDescription, "addSVGa11yTitleDescription");
1046
+ var Diagram = class _Diagram {
1047
+ constructor(type, text, db, parser, renderer2) {
1048
+ this.type = type;
1049
+ this.text = text;
1050
+ this.db = db;
1051
+ this.parser = parser;
1052
+ this.renderer = renderer2;
1053
+ }
1054
+ static {
1055
+ __name(this, "Diagram");
1056
+ }
1057
+ static async fromText(text, metadata = {}) {
1058
+ const config = getConfig();
1059
+ const type = detectType(text, config);
1060
+ text = encodeEntities(text) + "\n";
1061
+ try {
1062
+ getDiagram(type);
1063
+ } catch {
1064
+ const loader26 = getDiagramLoader(type);
1065
+ if (!loader26) {
1066
+ throw new UnknownDiagramError(`Diagram ${type} not found.`);
1067
+ }
1068
+ const { id: id26, diagram: diagram2 } = await loader26();
1069
+ registerDiagram(id26, diagram2);
1070
+ }
1071
+ const { db, parser, renderer: renderer2, init: init2 } = getDiagram(type);
1072
+ if (parser.parser) {
1073
+ parser.parser.yy = db;
1074
+ }
1075
+ db.clear?.();
1076
+ init2?.(config);
1077
+ if (metadata.title) {
1078
+ db.setDiagramTitle?.(metadata.title);
1079
+ }
1080
+ await parser.parse(text);
1081
+ return new _Diagram(type, text, db, parser, renderer2);
1082
+ }
1083
+ async render(id26, version2) {
1084
+ await this.renderer.draw(this.text, id26, version2, this);
1085
+ }
1086
+ getParser() {
1087
+ return this.parser;
1088
+ }
1089
+ getType() {
1090
+ return this.type;
1091
+ }
1092
+ };
1093
+ var interactionFunctions = [];
1094
+ var attachFunctions = /* @__PURE__ */ __name(() => {
1095
+ interactionFunctions.forEach((f) => {
1096
+ f();
1097
+ });
1098
+ interactionFunctions = [];
1099
+ }, "attachFunctions");
1100
+ var cleanupComments = /* @__PURE__ */ __name((text) => {
1101
+ return text.replace(/^\s*%%(?!{)[^\n]+\n?/gm, "").trimStart();
1102
+ }, "cleanupComments");
1103
+ function extractFrontMatter(text) {
1104
+ const matches = text.match(frontMatterRegex);
1105
+ if (!matches) {
1106
+ return {
1107
+ text,
1108
+ metadata: {}
1109
+ };
1110
+ }
1111
+ let parsed = load(matches[1], {
1112
+ // To support config, we need JSON schema.
1113
+ // https://www.yaml.org/spec/1.2/spec.html#id2803231
1114
+ schema: JSON_SCHEMA
1115
+ }) ?? {};
1116
+ parsed = typeof parsed === "object" && !Array.isArray(parsed) ? parsed : {};
1117
+ const metadata = {};
1118
+ if (parsed.displayMode) {
1119
+ metadata.displayMode = parsed.displayMode.toString();
1120
+ }
1121
+ if (parsed.title) {
1122
+ metadata.title = parsed.title.toString();
1123
+ }
1124
+ if (parsed.config) {
1125
+ metadata.config = parsed.config;
1126
+ }
1127
+ return {
1128
+ text: text.slice(matches[0].length),
1129
+ metadata
1130
+ };
1131
+ }
1132
+ __name(extractFrontMatter, "extractFrontMatter");
1133
+ var cleanupText = /* @__PURE__ */ __name((code) => {
1134
+ return code.replace(/\r\n?/g, "\n").replace(
1135
+ /<(\w+)([^>]*)>/g,
1136
+ (match, tag, attributes) => "<" + tag + attributes.replace(/="([^"]*)"/g, "='$1'") + ">"
1137
+ );
1138
+ }, "cleanupText");
1139
+ var processFrontmatter = /* @__PURE__ */ __name((code) => {
1140
+ const { text, metadata } = extractFrontMatter(code);
1141
+ const { displayMode, title, config = {} } = metadata;
1142
+ if (displayMode) {
1143
+ if (!config.gantt) {
1144
+ config.gantt = {};
1145
+ }
1146
+ config.gantt.displayMode = displayMode;
1147
+ }
1148
+ return { title, config, text };
1149
+ }, "processFrontmatter");
1150
+ var processDirectives = /* @__PURE__ */ __name((code) => {
1151
+ const initDirective = utils_default.detectInit(code) ?? {};
1152
+ const wrapDirectives = utils_default.detectDirective(code, "wrap");
1153
+ if (Array.isArray(wrapDirectives)) {
1154
+ initDirective.wrap = wrapDirectives.some(({ type }) => type === "wrap");
1155
+ } else if (wrapDirectives?.type === "wrap") {
1156
+ initDirective.wrap = true;
1157
+ }
1158
+ return {
1159
+ text: removeDirectives(code),
1160
+ directive: initDirective
1161
+ };
1162
+ }, "processDirectives");
1163
+ function preprocessDiagram(code) {
1164
+ const cleanedCode = cleanupText(code);
1165
+ const frontMatterResult = processFrontmatter(cleanedCode);
1166
+ const directiveResult = processDirectives(frontMatterResult.text);
1167
+ const config = cleanAndMerge(frontMatterResult.config, directiveResult.directive);
1168
+ code = cleanupComments(directiveResult.text);
1169
+ return {
1170
+ code,
1171
+ title: frontMatterResult.title,
1172
+ config
1173
+ };
1174
+ }
1175
+ __name(preprocessDiagram, "preprocessDiagram");
1176
+ function toBase64(str) {
1177
+ const utf8Bytes = new TextEncoder().encode(str);
1178
+ const utf8Str = Array.from(utf8Bytes, (byte) => String.fromCodePoint(byte)).join("");
1179
+ return btoa(utf8Str);
1180
+ }
1181
+ __name(toBase64, "toBase64");
1182
+ var MAX_TEXTLENGTH = 5e4;
1183
+ var MAX_TEXTLENGTH_EXCEEDED_MSG = "graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa";
1184
+ var SECURITY_LVL_SANDBOX = "sandbox";
1185
+ var SECURITY_LVL_LOOSE = "loose";
1186
+ var XMLNS_SVG_STD = "http://www.w3.org/2000/svg";
1187
+ var XMLNS_XLINK_STD = "http://www.w3.org/1999/xlink";
1188
+ var XMLNS_XHTML_STD = "http://www.w3.org/1999/xhtml";
1189
+ var IFRAME_WIDTH = "100%";
1190
+ var IFRAME_HEIGHT = "100%";
1191
+ var IFRAME_STYLES = "border:0;margin:0;";
1192
+ var IFRAME_BODY_STYLE = "margin:0";
1193
+ var IFRAME_SANDBOX_OPTS = "allow-top-navigation-by-user-activation allow-popups";
1194
+ var IFRAME_NOT_SUPPORTED_MSG = 'The "iframe" tag is not supported by your browser.';
1195
+ var DOMPURIFY_TAGS = ["foreignobject"];
1196
+ var DOMPURIFY_ATTR = ["dominant-baseline"];
1197
+ function processAndSetConfigs(text) {
1198
+ const processed = preprocessDiagram(text);
1199
+ reset();
1200
+ addDirective(processed.config ?? {});
1201
+ return processed;
1202
+ }
1203
+ __name(processAndSetConfigs, "processAndSetConfigs");
1204
+ async function parse3(text, parseOptions) {
1205
+ addDiagrams();
1206
+ try {
1207
+ const { code, config } = processAndSetConfigs(text);
1208
+ const diagram2 = await getDiagramFromText(code);
1209
+ return { diagramType: diagram2.type, config };
1210
+ } catch (error) {
1211
+ if (parseOptions?.suppressErrors) {
1212
+ return false;
1213
+ }
1214
+ throw error;
1215
+ }
1216
+ }
1217
+ __name(parse3, "parse");
1218
+ var cssImportantStyles = /* @__PURE__ */ __name((cssClass, element, cssClasses = []) => {
1219
+ return `
1220
+ .${cssClass} ${element} { ${cssClasses.join(" !important; ")} !important; }`;
1221
+ }, "cssImportantStyles");
1222
+ var createCssStyles = /* @__PURE__ */ __name((config, classDefs = /* @__PURE__ */ new Map()) => {
1223
+ let cssStyles = "";
1224
+ if (config.themeCSS !== void 0) {
1225
+ cssStyles += `
1226
+ ${config.themeCSS}`;
1227
+ }
1228
+ if (config.fontFamily !== void 0) {
1229
+ cssStyles += `
1230
+ :root { --mermaid-font-family: ${config.fontFamily}}`;
1231
+ }
1232
+ if (config.altFontFamily !== void 0) {
1233
+ cssStyles += `
1234
+ :root { --mermaid-alt-font-family: ${config.altFontFamily}}`;
1235
+ }
1236
+ if (classDefs instanceof Map) {
1237
+ const htmlLabels = config.htmlLabels ?? config.flowchart?.htmlLabels;
1238
+ const cssHtmlElements = ["> *", "span"];
1239
+ const cssShapeElements = ["rect", "polygon", "ellipse", "circle", "path"];
1240
+ const cssElements = htmlLabels ? cssHtmlElements : cssShapeElements;
1241
+ classDefs.forEach((styleClassDef) => {
1242
+ if (!isEmpty_default(styleClassDef.styles)) {
1243
+ cssElements.forEach((cssElement) => {
1244
+ cssStyles += cssImportantStyles(styleClassDef.id, cssElement, styleClassDef.styles);
1245
+ });
1246
+ }
1247
+ if (!isEmpty_default(styleClassDef.textStyles)) {
1248
+ cssStyles += cssImportantStyles(
1249
+ styleClassDef.id,
1250
+ "tspan",
1251
+ (styleClassDef?.textStyles || []).map((s) => s.replace("color", "fill"))
1252
+ );
1253
+ }
1254
+ });
1255
+ }
1256
+ return cssStyles;
1257
+ }, "createCssStyles");
1258
+ var createUserStyles = /* @__PURE__ */ __name((config, graphType, classDefs, svgId) => {
1259
+ const userCSSstyles = createCssStyles(config, classDefs);
1260
+ const allStyles = styles_default(graphType, userCSSstyles, config.themeVariables);
1261
+ return serialize(compile(`${svgId}{${allStyles}}`), stringify);
1262
+ }, "createUserStyles");
1263
+ var cleanUpSvgCode = /* @__PURE__ */ __name((svgCode = "", inSandboxMode, useArrowMarkerUrls) => {
1264
+ let cleanedUpSvg = svgCode;
1265
+ if (!useArrowMarkerUrls && !inSandboxMode) {
1266
+ cleanedUpSvg = cleanedUpSvg.replace(
1267
+ /marker-end="url\([\d+./:=?A-Za-z-]*?#/g,
1268
+ 'marker-end="url(#'
1269
+ );
1270
+ }
1271
+ cleanedUpSvg = decodeEntities(cleanedUpSvg);
1272
+ cleanedUpSvg = cleanedUpSvg.replace(/<br>/g, "<br/>");
1273
+ return cleanedUpSvg;
1274
+ }, "cleanUpSvgCode");
1275
+ var putIntoIFrame = /* @__PURE__ */ __name((svgCode = "", svgElement) => {
1276
+ const height = svgElement?.viewBox?.baseVal?.height ? svgElement.viewBox.baseVal.height + "px" : IFRAME_HEIGHT;
1277
+ const base64encodedSrc = toBase64(`<body style="${IFRAME_BODY_STYLE}">${svgCode}</body>`);
1278
+ return `<iframe style="width:${IFRAME_WIDTH};height:${height};${IFRAME_STYLES}" src="data:text/html;charset=UTF-8;base64,${base64encodedSrc}" sandbox="${IFRAME_SANDBOX_OPTS}">
1279
+ ${IFRAME_NOT_SUPPORTED_MSG}
1280
+ </iframe>`;
1281
+ }, "putIntoIFrame");
1282
+ var appendDivSvgG = /* @__PURE__ */ __name((parentRoot, id26, enclosingDivId, divStyle, svgXlink) => {
1283
+ const enclosingDiv = parentRoot.append("div");
1284
+ enclosingDiv.attr("id", enclosingDivId);
1285
+ if (divStyle) {
1286
+ enclosingDiv.attr("style", divStyle);
1287
+ }
1288
+ const svgNode = enclosingDiv.append("svg").attr("id", id26).attr("width", "100%").attr("xmlns", XMLNS_SVG_STD);
1289
+ if (svgXlink) {
1290
+ svgNode.attr("xmlns:xlink", svgXlink);
1291
+ }
1292
+ svgNode.append("g");
1293
+ return parentRoot;
1294
+ }, "appendDivSvgG");
1295
+ function sandboxedIframe(parentNode, iFrameId) {
1296
+ return parentNode.append("iframe").attr("id", iFrameId).attr("style", "width: 100%; height: 100%;").attr("sandbox", "");
1297
+ }
1298
+ __name(sandboxedIframe, "sandboxedIframe");
1299
+ var removeExistingElements = /* @__PURE__ */ __name((doc, id26, divId, iFrameId) => {
1300
+ doc.getElementById(id26)?.remove();
1301
+ doc.getElementById(divId)?.remove();
1302
+ doc.getElementById(iFrameId)?.remove();
1303
+ }, "removeExistingElements");
1304
+ var render = /* @__PURE__ */ __name(async function(id26, text, svgContainingElement) {
1305
+ addDiagrams();
1306
+ const processed = processAndSetConfigs(text);
1307
+ text = processed.code;
1308
+ const config = getConfig();
1309
+ log.debug(config);
1310
+ if (text.length > (config?.maxTextSize ?? MAX_TEXTLENGTH)) {
1311
+ text = MAX_TEXTLENGTH_EXCEEDED_MSG;
1312
+ }
1313
+ const idSelector = "#" + id26;
1314
+ const iFrameID = "i" + id26;
1315
+ const iFrameID_selector = "#" + iFrameID;
1316
+ const enclosingDivID = "d" + id26;
1317
+ const enclosingDivID_selector = "#" + enclosingDivID;
1318
+ const removeTempElements = /* @__PURE__ */ __name(() => {
1319
+ const tmpElementSelector = isSandboxed ? iFrameID_selector : enclosingDivID_selector;
1320
+ const node2 = select_default(tmpElementSelector).node();
1321
+ if (node2 && "remove" in node2) {
1322
+ node2.remove();
1323
+ }
1324
+ }, "removeTempElements");
1325
+ let root = select_default("body");
1326
+ const isSandboxed = config.securityLevel === SECURITY_LVL_SANDBOX;
1327
+ const isLooseSecurityLevel = config.securityLevel === SECURITY_LVL_LOOSE;
1328
+ const fontFamily = config.fontFamily;
1329
+ if (svgContainingElement !== void 0) {
1330
+ if (svgContainingElement) {
1331
+ svgContainingElement.innerHTML = "";
1332
+ }
1333
+ if (isSandboxed) {
1334
+ const iframe = sandboxedIframe(select_default(svgContainingElement), iFrameID);
1335
+ root = select_default(iframe.nodes()[0].contentDocument.body);
1336
+ root.node().style.margin = 0;
1337
+ } else {
1338
+ root = select_default(svgContainingElement);
1339
+ }
1340
+ appendDivSvgG(root, id26, enclosingDivID, `font-family: ${fontFamily}`, XMLNS_XLINK_STD);
1341
+ } else {
1342
+ removeExistingElements(document, id26, enclosingDivID, iFrameID);
1343
+ if (isSandboxed) {
1344
+ const iframe = sandboxedIframe(select_default("body"), iFrameID);
1345
+ root = select_default(iframe.nodes()[0].contentDocument.body);
1346
+ root.node().style.margin = 0;
1347
+ } else {
1348
+ root = select_default("body");
1349
+ }
1350
+ appendDivSvgG(root, id26, enclosingDivID);
1351
+ }
1352
+ let diag;
1353
+ let parseEncounteredException;
1354
+ try {
1355
+ diag = await Diagram.fromText(text, { title: processed.title });
1356
+ } catch (error) {
1357
+ if (config.suppressErrorRendering) {
1358
+ removeTempElements();
1359
+ throw error;
1360
+ }
1361
+ diag = await Diagram.fromText("error");
1362
+ parseEncounteredException = error;
1363
+ }
1364
+ const element = root.select(enclosingDivID_selector).node();
1365
+ const diagramType = diag.type;
1366
+ const svg = element.firstChild;
1367
+ const firstChild = svg.firstChild;
1368
+ const diagramClassDefs = diag.renderer.getClasses?.(text, diag);
1369
+ const rules = createUserStyles(config, diagramType, diagramClassDefs, idSelector);
1370
+ const style1 = document.createElement("style");
1371
+ style1.innerHTML = rules;
1372
+ svg.insertBefore(style1, firstChild);
1373
+ try {
1374
+ await diag.renderer.draw(text, id26, version, diag);
1375
+ } catch (e) {
1376
+ if (config.suppressErrorRendering) {
1377
+ removeTempElements();
1378
+ } else {
1379
+ errorRenderer_default.draw(text, id26, version);
1380
+ }
1381
+ throw e;
1382
+ }
1383
+ const svgNode = root.select(`${enclosingDivID_selector} svg`);
1384
+ const a11yTitle = diag.db.getAccTitle?.();
1385
+ const a11yDescr = diag.db.getAccDescription?.();
1386
+ addA11yInfo(diagramType, svgNode, a11yTitle, a11yDescr);
1387
+ root.select(`[id="${id26}"]`).selectAll("foreignobject > *").attr("xmlns", XMLNS_XHTML_STD);
1388
+ let svgCode = root.select(enclosingDivID_selector).node().innerHTML;
1389
+ log.debug("config.arrowMarkerAbsolute", config.arrowMarkerAbsolute);
1390
+ svgCode = cleanUpSvgCode(svgCode, isSandboxed, evaluate(config.arrowMarkerAbsolute));
1391
+ if (isSandboxed) {
1392
+ const svgEl = root.select(enclosingDivID_selector + " svg").node();
1393
+ svgCode = putIntoIFrame(svgCode, svgEl);
1394
+ } else if (!isLooseSecurityLevel) {
1395
+ svgCode = purify.sanitize(svgCode, {
1396
+ ADD_TAGS: DOMPURIFY_TAGS,
1397
+ ADD_ATTR: DOMPURIFY_ATTR,
1398
+ HTML_INTEGRATION_POINTS: { foreignobject: true }
1399
+ });
1400
+ }
1401
+ attachFunctions();
1402
+ if (parseEncounteredException) {
1403
+ throw parseEncounteredException;
1404
+ }
1405
+ removeTempElements();
1406
+ return {
1407
+ diagramType,
1408
+ svg: svgCode,
1409
+ bindFunctions: diag.db.bindFunctions
1410
+ };
1411
+ }, "render");
1412
+ function initialize(userOptions = {}) {
1413
+ const options = assignWithDepth_default({}, userOptions);
1414
+ if (options?.fontFamily && !options.themeVariables?.fontFamily) {
1415
+ if (!options.themeVariables) {
1416
+ options.themeVariables = {};
1417
+ }
1418
+ options.themeVariables.fontFamily = options.fontFamily;
1419
+ }
1420
+ saveConfigFromInitialize(options);
1421
+ if (options?.theme && options.theme in themes_default) {
1422
+ options.themeVariables = themes_default[options.theme].getThemeVariables(
1423
+ options.themeVariables
1424
+ );
1425
+ } else if (options) {
1426
+ options.themeVariables = themes_default.default.getThemeVariables(options.themeVariables);
1427
+ }
1428
+ const config = typeof options === "object" ? setSiteConfig(options) : getSiteConfig();
1429
+ setLogLevel(config.logLevel);
1430
+ addDiagrams();
1431
+ }
1432
+ __name(initialize, "initialize");
1433
+ var getDiagramFromText = /* @__PURE__ */ __name((text, metadata = {}) => {
1434
+ const { code } = preprocessDiagram(text);
1435
+ return Diagram.fromText(code, metadata);
1436
+ }, "getDiagramFromText");
1437
+ function addA11yInfo(diagramType, svgNode, a11yTitle, a11yDescr) {
1438
+ setA11yDiagramInfo(svgNode, diagramType);
1439
+ addSVGa11yTitleDescription(svgNode, a11yTitle, a11yDescr, svgNode.attr("id"));
1440
+ }
1441
+ __name(addA11yInfo, "addA11yInfo");
1442
+ var mermaidAPI = Object.freeze({
1443
+ render,
1444
+ parse: parse3,
1445
+ getDiagramFromText,
1446
+ initialize,
1447
+ getConfig,
1448
+ setConfig,
1449
+ getSiteConfig,
1450
+ updateSiteConfig,
1451
+ reset: /* @__PURE__ */ __name(() => {
1452
+ reset();
1453
+ }, "reset"),
1454
+ globalReset: /* @__PURE__ */ __name(() => {
1455
+ reset(defaultConfig);
1456
+ }, "globalReset"),
1457
+ defaultConfig
1458
+ });
1459
+ setLogLevel(getConfig().logLevel);
1460
+ reset(getConfig());
1461
+ var handleError = /* @__PURE__ */ __name((error, errors, parseError) => {
1462
+ log.warn(error);
1463
+ if (isDetailedError(error)) {
1464
+ if (parseError) {
1465
+ parseError(error.str, error.hash);
1466
+ }
1467
+ errors.push({ ...error, message: error.str, error });
1468
+ } else {
1469
+ if (parseError) {
1470
+ parseError(error);
1471
+ }
1472
+ if (error instanceof Error) {
1473
+ errors.push({
1474
+ str: error.message,
1475
+ message: error.message,
1476
+ hash: error.name,
1477
+ error
1478
+ });
1479
+ }
1480
+ }
1481
+ }, "handleError");
1482
+ var run = /* @__PURE__ */ __name(async function(options = {
1483
+ querySelector: ".mermaid"
1484
+ }) {
1485
+ try {
1486
+ await runThrowsErrors(options);
1487
+ } catch (e) {
1488
+ if (isDetailedError(e)) {
1489
+ log.error(e.str);
1490
+ }
1491
+ if (mermaid.parseError) {
1492
+ mermaid.parseError(e);
1493
+ }
1494
+ if (!options.suppressErrors) {
1495
+ log.error("Use the suppressErrors option to suppress these errors");
1496
+ throw e;
1497
+ }
1498
+ }
1499
+ }, "run");
1500
+ var runThrowsErrors = /* @__PURE__ */ __name(async function({ postRenderCallback, querySelector, nodes } = {
1501
+ querySelector: ".mermaid"
1502
+ }) {
1503
+ const conf = mermaidAPI.getConfig();
1504
+ log.debug(`${!postRenderCallback ? "No " : ""}Callback function found`);
1505
+ let nodesToProcess;
1506
+ if (nodes) {
1507
+ nodesToProcess = nodes;
1508
+ } else if (querySelector) {
1509
+ nodesToProcess = document.querySelectorAll(querySelector);
1510
+ } else {
1511
+ throw new Error("Nodes and querySelector are both undefined");
1512
+ }
1513
+ log.debug(`Found ${nodesToProcess.length} diagrams`);
1514
+ if (conf?.startOnLoad !== void 0) {
1515
+ log.debug("Start On Load: " + conf?.startOnLoad);
1516
+ mermaidAPI.updateSiteConfig({ startOnLoad: conf?.startOnLoad });
1517
+ }
1518
+ const idGenerator = new utils_default.InitIDGenerator(conf.deterministicIds, conf.deterministicIDSeed);
1519
+ let txt;
1520
+ const errors = [];
1521
+ for (const element of Array.from(nodesToProcess)) {
1522
+ log.info("Rendering diagram: " + element.id);
1523
+ if (element.getAttribute("data-processed")) {
1524
+ continue;
1525
+ }
1526
+ element.setAttribute("data-processed", "true");
1527
+ const id26 = `mermaid-${idGenerator.next()}`;
1528
+ txt = element.innerHTML;
1529
+ txt = dedent(utils_default.entityDecode(txt)).trim().replace(/<br\s*\/?>/gi, "<br/>");
1530
+ const init2 = utils_default.detectInit(txt);
1531
+ if (init2) {
1532
+ log.debug("Detected early reinit: ", init2);
1533
+ }
1534
+ try {
1535
+ const { svg, bindFunctions } = await render2(id26, txt, element);
1536
+ element.innerHTML = svg;
1537
+ if (postRenderCallback) {
1538
+ await postRenderCallback(id26);
1539
+ }
1540
+ if (bindFunctions) {
1541
+ bindFunctions(element);
1542
+ }
1543
+ } catch (error) {
1544
+ handleError(error, errors, mermaid.parseError);
1545
+ }
1546
+ }
1547
+ if (errors.length > 0) {
1548
+ throw errors[0];
1549
+ }
1550
+ }, "runThrowsErrors");
1551
+ var initialize2 = /* @__PURE__ */ __name(function(config) {
1552
+ mermaidAPI.initialize(config);
1553
+ }, "initialize");
1554
+ var init = /* @__PURE__ */ __name(async function(config, nodes, callback) {
1555
+ log.warn("mermaid.init is deprecated. Please use run instead.");
1556
+ if (config) {
1557
+ initialize2(config);
1558
+ }
1559
+ const runOptions = { postRenderCallback: callback, querySelector: ".mermaid" };
1560
+ if (typeof nodes === "string") {
1561
+ runOptions.querySelector = nodes;
1562
+ } else if (nodes) {
1563
+ if (nodes instanceof HTMLElement) {
1564
+ runOptions.nodes = [nodes];
1565
+ } else {
1566
+ runOptions.nodes = nodes;
1567
+ }
1568
+ }
1569
+ await run(runOptions);
1570
+ }, "init");
1571
+ var registerExternalDiagrams = /* @__PURE__ */ __name(async (diagrams, {
1572
+ lazyLoad = true
1573
+ } = {}) => {
1574
+ addDiagrams();
1575
+ registerLazyLoadedDiagrams(...diagrams);
1576
+ if (lazyLoad === false) {
1577
+ await loadRegisteredDiagrams();
1578
+ }
1579
+ }, "registerExternalDiagrams");
1580
+ var contentLoaded = /* @__PURE__ */ __name(function() {
1581
+ if (mermaid.startOnLoad) {
1582
+ const { startOnLoad } = mermaidAPI.getConfig();
1583
+ if (startOnLoad) {
1584
+ mermaid.run().catch((err) => log.error("Mermaid failed to initialize", err));
1585
+ }
1586
+ }
1587
+ }, "contentLoaded");
1588
+ if (typeof document !== "undefined") {
1589
+ window.addEventListener("load", contentLoaded, false);
1590
+ }
1591
+ var setParseErrorHandler = /* @__PURE__ */ __name(function(parseErrorHandler) {
1592
+ mermaid.parseError = parseErrorHandler;
1593
+ }, "setParseErrorHandler");
1594
+ var executionQueue = [];
1595
+ var executionQueueRunning = false;
1596
+ var executeQueue = /* @__PURE__ */ __name(async () => {
1597
+ if (executionQueueRunning) {
1598
+ return;
1599
+ }
1600
+ executionQueueRunning = true;
1601
+ while (executionQueue.length > 0) {
1602
+ const f = executionQueue.shift();
1603
+ if (f) {
1604
+ try {
1605
+ await f();
1606
+ } catch (e) {
1607
+ log.error("Error executing queue", e);
1608
+ }
1609
+ }
1610
+ }
1611
+ executionQueueRunning = false;
1612
+ }, "executeQueue");
1613
+ var parse22 = /* @__PURE__ */ __name(async (text, parseOptions) => {
1614
+ return new Promise((resolve, reject) => {
1615
+ const performCall = /* @__PURE__ */ __name(() => new Promise((res, rej) => {
1616
+ mermaidAPI.parse(text, parseOptions).then(
1617
+ (r) => {
1618
+ res(r);
1619
+ resolve(r);
1620
+ },
1621
+ (e) => {
1622
+ log.error("Error parsing", e);
1623
+ mermaid.parseError?.(e);
1624
+ rej(e);
1625
+ reject(e);
1626
+ }
1627
+ );
1628
+ }), "performCall");
1629
+ executionQueue.push(performCall);
1630
+ executeQueue().catch(reject);
1631
+ });
1632
+ }, "parse");
1633
+ var render2 = /* @__PURE__ */ __name((id26, text, container) => {
1634
+ return new Promise((resolve, reject) => {
1635
+ const performCall = /* @__PURE__ */ __name(() => new Promise((res, rej) => {
1636
+ mermaidAPI.render(id26, text, container).then(
1637
+ (r) => {
1638
+ res(r);
1639
+ resolve(r);
1640
+ },
1641
+ (e) => {
1642
+ log.error("Error parsing", e);
1643
+ mermaid.parseError?.(e);
1644
+ rej(e);
1645
+ reject(e);
1646
+ }
1647
+ );
1648
+ }), "performCall");
1649
+ executionQueue.push(performCall);
1650
+ executeQueue().catch(reject);
1651
+ });
1652
+ }, "render");
1653
+ var mermaid = {
1654
+ startOnLoad: true,
1655
+ mermaidAPI,
1656
+ parse: parse22,
1657
+ render: render2,
1658
+ init,
1659
+ run,
1660
+ registerExternalDiagrams,
1661
+ registerLayoutLoaders,
1662
+ initialize: initialize2,
1663
+ parseError: void 0,
1664
+ contentLoaded,
1665
+ setParseErrorHandler,
1666
+ detectType,
1667
+ registerIconPacks
1668
+ };
1669
+ var mermaid_default = mermaid;
1670
+
1671
+ // components/src/asciidoc/Mermaid.tsx
1672
+ import { memo, useId, useState } from "react";
1673
+ import { Fragment, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
1674
+ mermaid_default.initialize({
1675
+ startOnLoad: false,
1676
+ theme: "dark"
1677
+ });
1678
+ var Mermaid = memo(function Mermaid2({ content }) {
1679
+ const [showSource, setShowSource] = useState(false);
1680
+ const id26 = `mermaid-diagram-${useId().replace(/:/g, "_")}`;
1681
+ const mermaidRef = async (node2) => {
1682
+ if (node2) {
1683
+ const { svg } = await mermaid_default.render(id26, content);
1684
+ node2.innerHTML = svg;
1685
+ }
1686
+ };
1687
+ return /* @__PURE__ */ jsxs2(Fragment, { children: [
1688
+ /* @__PURE__ */ jsxs2(
1689
+ "button",
1690
+ {
1691
+ className: "absolute right-2 top-2 text-mono-xs text-tertiary",
1692
+ onClick: () => setShowSource(!showSource),
1693
+ children: [
1694
+ showSource ? "Hide" : "Show",
1695
+ " Source ",
1696
+ /* @__PURE__ */ jsx2("span", { className: "text-quinary", children: "|" }),
1697
+ " ",
1698
+ "Mermaid"
1699
+ ]
1700
+ }
1701
+ ),
1702
+ !showSource ? /* @__PURE__ */ jsx2("code", { ref: mermaidRef, className: "w-full" }) : /* @__PURE__ */ jsx2("code", { children: content })
1703
+ ] });
1704
+ });
1705
+ var Mermaid_default = Mermaid;
1706
+
1707
+ // icons/react/Link16Icon.tsx
1708
+ import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
1709
+ var Link16Icon = ({ title, titleId, ...props }) => /* @__PURE__ */ jsxs3(
1710
+ "svg",
1711
+ {
1712
+ width: 16,
1713
+ height: 16,
1714
+ viewBox: "0 0 16 16",
1715
+ xmlns: "http://www.w3.org/2000/svg",
1716
+ role: "img",
1717
+ "aria-labelledby": titleId,
1718
+ ...props,
1719
+ children: [
1720
+ title ? /* @__PURE__ */ jsx3("title", { id: titleId, children: title }) : null,
1721
+ /* @__PURE__ */ jsxs3("g", { fill: "currentColor", children: [
1722
+ /* @__PURE__ */ jsx3("path", { d: "m6.586 12.243 1.59-1.591a.75.75 0 0 1 1.061 0l.354.353a.75.75 0 0 1 0 1.06L8 13.658A4 4 0 0 1 2.343 8l1.591-1.591a.75.75 0 0 1 1.06 0l.354.354a.75.75 0 0 1 0 1.06l-1.59 1.591a2 2 0 1 0 2.828 2.829ZM12.066 9.591a.75.75 0 0 1-1.06 0l-.354-.354a.75.75 0 0 1 0-1.06l1.59-1.591a2 2 0 1 0-2.828-2.829l-1.59 1.591a.75.75 0 0 1-1.061 0l-.354-.353a.75.75 0 0 1 0-1.06L8 2.342A4 4 0 0 1 13.657 8l-1.591 1.591Z" }),
1723
+ /* @__PURE__ */ jsx3("path", { d: "M9.945 5.702a.75.75 0 0 0-1.061 0L5.702 8.884a.75.75 0 0 0 0 1.06l.353.354a.75.75 0 0 0 1.061 0l3.182-3.182a.75.75 0 0 0 0-1.06l-.353-.354Z" })
1724
+ ] })
1725
+ ]
1726
+ }
1727
+ );
1728
+ var Link16Icon_default = Link16Icon;
1729
+
1730
+ // icons/react/Checkmark12Icon.tsx
1731
+ import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
1732
+ var Checkmark12Icon = ({
1733
+ title,
1734
+ titleId,
1735
+ ...props
1736
+ }) => /* @__PURE__ */ jsxs4(
1737
+ "svg",
1738
+ {
1739
+ width: 12,
1740
+ height: 12,
1741
+ viewBox: "0 0 12 12",
1742
+ xmlns: "http://www.w3.org/2000/svg",
1743
+ role: "img",
1744
+ "aria-labelledby": titleId,
1745
+ ...props,
1746
+ children: [
1747
+ title ? /* @__PURE__ */ jsx4("title", { id: titleId, children: title }) : null,
1748
+ /* @__PURE__ */ jsx4(
1749
+ "path",
1750
+ {
1751
+ fillRule: "evenodd",
1752
+ clipRule: "evenodd",
1753
+ d: "M10.492 2.651c.28.242.31.665.067.944L5.447 9.463a.667.667 0 0 1-.974.035L1.475 6.516a.667.667 0 0 1 0-.946l.237-.235a.667.667 0 0 1 .94 0l2.24 2.226L9.3 2.501a.667.667 0 0 1 .938-.068l.253.218Z",
1754
+ fill: "currentColor"
1755
+ }
1756
+ )
1757
+ ]
1758
+ }
1759
+ );
1760
+ var Checkmark12Icon_default = Checkmark12Icon;
1761
+
1762
+ // icons/react/DirectionRightIcon.tsx
1763
+ import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
1764
+ var DirectionRightIcon = ({
1765
+ title,
1766
+ titleId,
1767
+ ...props
1768
+ }) => /* @__PURE__ */ jsxs5(
1769
+ "svg",
1770
+ {
1771
+ width: 12,
1772
+ height: 12,
1773
+ viewBox: "0 0 12 12",
1774
+ xmlns: "http://www.w3.org/2000/svg",
1775
+ role: "img",
1776
+ "aria-labelledby": titleId,
1777
+ ...props,
1778
+ children: [
1779
+ title ? /* @__PURE__ */ jsx5("title", { id: titleId, children: title }) : null,
1780
+ /* @__PURE__ */ jsx5(
1781
+ "path",
1782
+ {
1783
+ d: "M8.807 6.597a.667.667 0 0 0 0-1.194l-5.842-2.92A.667.667 0 0 0 2 3.079v5.842c0 .496.522.818.965.596l5.842-2.92Z",
1784
+ fill: "currentColor"
1785
+ }
1786
+ )
1787
+ ]
1788
+ }
1789
+ );
1790
+ var DirectionRightIcon_default = DirectionRightIcon;
1791
+
1792
+ // icons/react/SelectArrows6Icon.tsx
1793
+ import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
1794
+ var SelectArrows6Icon = ({
1795
+ title,
1796
+ titleId,
1797
+ ...props
1798
+ }) => /* @__PURE__ */ jsxs6(
1799
+ "svg",
1800
+ {
1801
+ width: 6,
1802
+ height: 14,
1803
+ viewBox: "0 0 6 14",
1804
+ xmlns: "http://www.w3.org/2000/svg",
1805
+ role: "img",
1806
+ "aria-labelledby": titleId,
1807
+ ...props,
1808
+ children: [
1809
+ title ? /* @__PURE__ */ jsx6("title", { id: titleId, children: title }) : null,
1810
+ /* @__PURE__ */ jsx6(
1811
+ "path",
1812
+ {
1813
+ fillRule: "evenodd",
1814
+ clipRule: "evenodd",
1815
+ d: "M3.322.536a.375.375 0 0 0-.644 0L.341 4.432C.19 4.682.37 5 .662 5h4.676a.375.375 0 0 0 .321-.568L3.322.536Zm-.644 12.928a.375.375 0 0 0 .644 0l2.337-3.896A.375.375 0 0 0 5.338 9H.662a.375.375 0 0 0-.321.568l2.337 3.896Z",
1816
+ fill: "currentColor"
1817
+ }
1818
+ )
1819
+ ]
1820
+ }
1821
+ );
1822
+ var SelectArrows6Icon_default = SelectArrows6Icon;
1823
+
1824
+ // components/src/asciidoc/Section.tsx
1825
+ import { Content as Content2, parse as parse4 } from "@oxide/react-asciidoc";
1826
+ import cn2 from "classnames";
1827
+ import { createElement as createElement2 } from "react";
1828
+ import { Fragment as Fragment2, jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
1829
+ var stripAnchors = (str) => str.replace(/<a[^>]*>(.*?)<\/a>/gi, "$1");
1830
+ var Section = ({ node: node2 }) => {
1831
+ const level = node2.level;
1832
+ let title = "";
1833
+ let sectNum = node2.num;
1834
+ sectNum = sectNum === "." ? "" : sectNum;
1835
+ title = /* @__PURE__ */ jsxs7(Fragment2, { children: [
1836
+ /* @__PURE__ */ jsx7("span", { className: "anchor", id: node2.id || "", "aria-hidden": "true" }),
1837
+ /* @__PURE__ */ jsxs7("a", { className: "link group", href: `#${node2.id}`, children: [
1838
+ parse4(stripAnchors(node2.title)),
1839
+ /* @__PURE__ */ jsx7(Link16Icon_default, { className: "ml-2 hidden text-accent-secondary group-hover:inline-block" })
1840
+ ] })
1841
+ ] });
1842
+ if (level === 0) {
1843
+ return /* @__PURE__ */ jsxs7(Fragment2, { children: [
1844
+ /* @__PURE__ */ jsx7("h1", { className: cn2("sect0", node2.role), "data-sectnum": sectNum, children: title }),
1845
+ /* @__PURE__ */ jsx7(Content2, { blocks: node2.blocks })
1846
+ ] });
1847
+ } else {
1848
+ return /* @__PURE__ */ jsxs7("div", { className: cn2(`sect${level}`, node2.role), children: [
1849
+ createElement2(`h${level + 1}`, { "data-sectnum": sectNum }, title),
1850
+ /* @__PURE__ */ jsx7("div", { className: "sectionbody", children: /* @__PURE__ */ jsx7(Content2, { blocks: node2.blocks }) })
1851
+ ] });
1852
+ }
1853
+ };
1854
+ var Section_default = Section;
1855
+
1856
+ // components/src/asciidoc/Table.tsx
1857
+ import { Table as InnerTable } from "@oxide/react-asciidoc";
1858
+ import { jsx as jsx8 } from "react/jsx-runtime";
1859
+ var Table = ({ node: node2 }) => /* @__PURE__ */ jsx8("div", { className: "table-wrapper", children: /* @__PURE__ */ jsx8(InnerTable, { node: node2 }) });
1860
+ var Table_default = Table;
1861
+
1862
+ // components/src/asciidoc/TableOfContents.tsx
1863
+ import * as Accordion from "@radix-ui/react-accordion";
1864
+ import { Link } from "@remix-run/react";
1865
+ import cn3 from "classnames";
1866
+ import { Fragment as Fragment3, useCallback, useEffect, useMemo, useRef, useState as useState2 } from "react";
1867
+ import { jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
1868
+ function useIntersectionObserver(elements, callback, options) {
1869
+ const [observer, setObserver] = useState2(null);
1870
+ useEffect(() => {
1871
+ const observer2 = new IntersectionObserver(callback, options);
1872
+ setObserver(observer2);
1873
+ return () => {
1874
+ observer2.disconnect();
1875
+ };
1876
+ }, [callback, options]);
1877
+ useEffect(() => {
1878
+ if (observer) {
1879
+ for (const element of elements) {
1880
+ observer.observe(element);
1881
+ }
1882
+ }
1883
+ return () => {
1884
+ if (observer) {
1885
+ for (const element of elements) {
1886
+ observer.unobserve(element);
1887
+ }
1888
+ }
1889
+ };
1890
+ }, [elements, observer]);
1891
+ return observer;
1892
+ }
1893
+ var THRESHOLD = [...Array(2e3).keys()].map((n) => n / 2e3);
1894
+ function isTopLevelSection(element) {
1895
+ return element.classList.contains("sect1");
1896
+ }
1897
+ function findParentSection(element) {
1898
+ const sect2Wrapper = element.closest(".sect2");
1899
+ return sect2Wrapper ? sect2Wrapper : element.closest(".sect1");
1900
+ }
1901
+ function newSection(node2, element, wrapper, parent) {
1902
+ return {
1903
+ node: node2,
1904
+ element,
1905
+ wrapper,
1906
+ parent,
1907
+ children: []
1908
+ };
1909
+ }
1910
+ function buildSectionTree(elements) {
1911
+ const sections = [];
1912
+ let parent = null;
1913
+ for (let i = 0; i < elements.length; i++) {
1914
+ const element = elements[i];
1915
+ const parentWrapper = findParentSection(element);
1916
+ if (parentWrapper) {
1917
+ if (parentWrapper && isTopLevelSection(parentWrapper)) {
1918
+ const section = newSection(i, element, parentWrapper, null);
1919
+ sections.push(section);
1920
+ parent = section;
1921
+ } else {
1922
+ if (parent === null) {
1923
+ return [];
1924
+ } else {
1925
+ const section = newSection(i, element, parentWrapper, parent.node);
1926
+ parent.children.push(i);
1927
+ sections.push(section);
1928
+ }
1929
+ }
1930
+ } else {
1931
+ return [];
1932
+ }
1933
+ }
1934
+ return sections;
1935
+ }
1936
+ function maxIndex(nums) {
1937
+ return nums.reduce((maxIndex2, current, currentIndex) => {
1938
+ const currentMax = maxIndex2 !== void 0 ? nums[maxIndex2] : 0;
1939
+ return current > currentMax ? currentIndex : maxIndex2;
1940
+ }, void 0);
1941
+ }
1942
+ function useActiveSectionTracking(initialSections, onSectionChange, debug = false) {
1943
+ const [sectionWrappers, setSectionWrappers] = useState2(
1944
+ buildSectionTree(initialSections)
1945
+ );
1946
+ const sectionMeasurements = useRef([]);
1947
+ const setSections = useCallback(
1948
+ (sections) => {
1949
+ setSectionWrappers(buildSectionTree(sections));
1950
+ sectionMeasurements.current = [];
1951
+ },
1952
+ [setSectionWrappers]
1953
+ );
1954
+ const wrapperActivator = useCallback(
1955
+ (entries) => {
1956
+ for (const entry of entries) {
1957
+ const index = sectionWrappers.findIndex((node2) => node2.wrapper === entry.target);
1958
+ const covered = entry.intersectionRect.height / (entry.rootBounds?.height || 1);
1959
+ sectionMeasurements.current[index] = covered;
1960
+ }
1961
+ const ownedSectionSizes = sectionWrappers.map((section) => {
1962
+ const childSizes = section.children.map((c) => sectionMeasurements.current[c]).reduce((c, a) => c + a, 0);
1963
+ return sectionMeasurements.current[section.node] - childSizes;
1964
+ });
1965
+ const activeSectionIndex = maxIndex(ownedSectionSizes);
1966
+ if (activeSectionIndex !== void 0) {
1967
+ onSectionChange(sectionWrappers[activeSectionIndex].element);
1968
+ }
1969
+ },
1970
+ [sectionWrappers, onSectionChange]
1971
+ );
1972
+ const wrapperSettings = useMemo(
1973
+ () => ({ threshold: THRESHOLD, rootMargin: `-15% 0px -70% 0px` }),
1974
+ []
1975
+ );
1976
+ const bindableWrappers = useMemo(
1977
+ () => sectionWrappers.map((s) => s.wrapper),
1978
+ [sectionWrappers]
1979
+ );
1980
+ const sectionObserver = useIntersectionObserver(
1981
+ bindableWrappers,
1982
+ wrapperActivator,
1983
+ wrapperSettings
1984
+ );
1985
+ let debugNode = null;
1986
+ if (debug && sectionObserver?.root === null) {
1987
+ const edges = sectionObserver.rootMargin.split(" ").map((margin) => {
1988
+ if (margin.endsWith("%")) {
1989
+ return parseInt(margin) * -1 + "%";
1990
+ } else if (margin.endsWith("px")) {
1991
+ return parseInt(margin) * -1 + "px";
1992
+ } else {
1993
+ return "0px";
1994
+ }
1995
+ });
1996
+ debugNode = /* @__PURE__ */ jsx9(
1997
+ "div",
1998
+ {
1999
+ style: {
2000
+ position: "fixed",
2001
+ top: edges[0],
2002
+ right: edges[1],
2003
+ bottom: edges[2],
2004
+ left: edges[3],
2005
+ background: "rgba(255, 92, 170, 0.2)",
2006
+ border: "1px solid rgba(255, 92, 170)",
2007
+ pointerEvents: "none",
2008
+ zIndex: 500
2009
+ }
2010
+ }
2011
+ );
2012
+ }
2013
+ return {
2014
+ setSections,
2015
+ debugNode
2016
+ };
2017
+ }
2018
+ var DesktopOutline = ({
2019
+ toc,
2020
+ activeItem
2021
+ }) => {
2022
+ const renderToc = (sections) => {
2023
+ return sections.map((item) => /* @__PURE__ */ jsxs8(Fragment3, { children: [
2024
+ /* @__PURE__ */ jsx9(
2025
+ "li",
2026
+ {
2027
+ "data-level": item.level,
2028
+ className: cn3("mb-0 list-none text-sans-sm", item.level > 2 && "hidden"),
2029
+ children: /* @__PURE__ */ jsx9(
2030
+ Link,
2031
+ {
2032
+ to: `#${item.id}`,
2033
+ className: cn3(
2034
+ "block border-l py-[4px] pr-4",
2035
+ activeItem === item.id ? "active text-accent-secondary border-accent-secondary hover:text-accent" : "text-tertiary border-secondary hover:text-secondary"
2036
+ ),
2037
+ style: {
2038
+ paddingLeft: `${0.5 + item.level * 0.5}rem`
2039
+ },
2040
+ children: /* @__PURE__ */ jsx9("span", { dangerouslySetInnerHTML: { __html: item.title } })
2041
+ }
2042
+ )
2043
+ }
2044
+ ),
2045
+ item.sections && renderToc(item.sections)
2046
+ ] }, item.id));
2047
+ };
2048
+ if (toc && toc.length > 0) {
2049
+ return /* @__PURE__ */ jsx9("ul", { className: "toc", children: renderToc(toc) });
2050
+ }
2051
+ return null;
2052
+ };
2053
+ var SmallScreenOutline = ({
2054
+ toc,
2055
+ activeItem,
2056
+ title
2057
+ }) => {
2058
+ const renderToc = (sections) => {
2059
+ return sections.map((item) => /* @__PURE__ */ jsxs8(Fragment3, { children: [
2060
+ /* @__PURE__ */ jsx9(
2061
+ "li",
2062
+ {
2063
+ "data-level": item.level,
2064
+ className: cn3(
2065
+ "AccordionContent hydrated list-none text-sans-sm",
2066
+ item.level > 2 && "hidden"
2067
+ ),
2068
+ children: /* @__PURE__ */ jsx9(
2069
+ Link,
2070
+ {
2071
+ to: `#${item.id}`,
2072
+ className: cn3(
2073
+ "block border-l py-[4px]",
2074
+ activeItem === item.id ? "active text-accent-secondary border-accent-secondary hover:text-accent" : "text-tertiary border-secondary hover:text-secondary"
2075
+ ),
2076
+ style: {
2077
+ paddingLeft: `${0.5 + item.level * 0.5}rem`
2078
+ },
2079
+ children: /* @__PURE__ */ jsx9("span", { dangerouslySetInnerHTML: { __html: item.title } })
2080
+ }
2081
+ )
2082
+ }
2083
+ ),
2084
+ item.sections && renderToc(item.sections)
2085
+ ] }, item.id));
2086
+ };
2087
+ if (toc && toc.length > 0) {
2088
+ return /* @__PURE__ */ jsx9(
2089
+ Accordion.Root,
2090
+ {
2091
+ type: "single",
2092
+ className: "sticky top-[calc(var(--header-height)-1px)] z-10 -mt-px mb-10 block max-h-[calc(100vh-var(--header-height)+1px)] w-full overflow-y-scroll border-b border-t bg-default border-secondary 1200:hidden print:hidden",
2093
+ collapsible: true,
2094
+ children: /* @__PURE__ */ jsxs8(Accordion.Item, { value: `small-toc-${title}`, children: [
2095
+ /* @__PURE__ */ jsx9(Accordion.Header, { children: /* @__PURE__ */ jsxs8(Accordion.Trigger, { className: "flex h-[--toc-header-height] w-full items-center justify-between px-4 text-sans-md text-default hover:bg-hover 400:px-6 600:px-8 [&>svg]:data-[state=open]:rotate-90", children: [
2096
+ "Table of Contents",
2097
+ " ",
2098
+ /* @__PURE__ */ jsx9(DirectionRightIcon_default, { className: "transition-all text-tertiary" })
2099
+ ] }) }),
2100
+ /* @__PURE__ */ jsx9(Accordion.Content, { className: "AccordionContent hydrated w-full border-t px-4 border-secondary 400:px-6 600:px-8", children: /* @__PURE__ */ jsx9("div", { className: "py-4", children: renderToc(toc) }) })
2101
+ ] })
2102
+ }
2103
+ );
2104
+ }
2105
+ return null;
2106
+ };
2107
+
2108
+ // components/src/asciidoc/util.ts
2109
+ import asciidoctor from "@asciidoctor/core";
2110
+ import {
2111
+ prepareDocument,
2112
+ processDocument
2113
+ } from "@oxide/react-asciidoc";
2114
+ import {
2115
+ bundledLanguages,
2116
+ getHighlighter
2117
+ } from "shiki";
2118
+
2119
+ // components/src/asciidoc/langs/oxql.tmLanguage.json
2120
+ var oxql_tmLanguage_default = {
2121
+ $schema: "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
2122
+ name: "oxql",
2123
+ repository: {
2124
+ keywords: {
2125
+ patterns: [
2126
+ {
2127
+ name: "keyword.control.oxql",
2128
+ match: "\\b(if|while|for|return)\\b"
2129
+ }
2130
+ ]
2131
+ },
2132
+ strings: {
2133
+ name: "string.quoted.double.oxql",
2134
+ begin: '"',
2135
+ end: '"',
2136
+ patterns: [
2137
+ {
2138
+ name: "constant.character.escape.oxql",
2139
+ match: "\\\\."
2140
+ }
2141
+ ]
2142
+ }
2143
+ },
2144
+ scopeName: "source.oxql",
2145
+ patterns: [
2146
+ {
2147
+ name: "keyword.control.oxql",
2148
+ match: "\\b(get|join|align|filter|group_by)\\b"
2149
+ },
2150
+ {
2151
+ name: "string.quoted.double.oxql",
2152
+ begin: '"',
2153
+ end: '"',
2154
+ patterns: [
2155
+ {
2156
+ name: "constant.character.escape.oxql",
2157
+ match: "\\\\."
2158
+ }
2159
+ ]
2160
+ },
2161
+ {
2162
+ name: "constant.numeric.oxql",
2163
+ match: "\\b\\d+[smhdw]\\b"
2164
+ },
2165
+ {
2166
+ name: "constant.numeric.datetime.oxql",
2167
+ match: "@\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}"
2168
+ },
2169
+ {
2170
+ name: "constant.numeric.function.oxql",
2171
+ match: "@now\\(\\)"
2172
+ },
2173
+ {
2174
+ name: "constant.numeric.oxql",
2175
+ match: "\\b\\d+\\b"
2176
+ },
2177
+ {
2178
+ name: "comment.block.oxql",
2179
+ begin: "/\\*",
2180
+ end: "\\*/"
2181
+ },
2182
+ {
2183
+ name: "comment.line.double-slash.oxql",
2184
+ match: "//.*$"
2185
+ },
2186
+ {
2187
+ name: "keyword.operator.oxql",
2188
+ match: "\\|"
2189
+ }
2190
+ ]
2191
+ };
2192
+
2193
+ // components/src/asciidoc/oxide-dark.json
2194
+ var oxide_dark_default = {
2195
+ name: "Oxide Dark",
2196
+ colors: {
2197
+ "editor.background": "#080F11",
2198
+ "editor.foreground": "#E7E7E8"
2199
+ },
2200
+ tokenColors: [
2201
+ {
2202
+ scope: [
2203
+ "text",
2204
+ "source",
2205
+ "variable.other.readwrite",
2206
+ "punctuation.definition.variable"
2207
+ ],
2208
+ settings: {
2209
+ foreground: "#E7E7E8"
2210
+ }
2211
+ },
2212
+ {
2213
+ scope: "punctuation",
2214
+ settings: {
2215
+ foreground: "#A1A4A5",
2216
+ fontStyle: ""
2217
+ }
2218
+ },
2219
+ {
2220
+ scope: ["comment", "punctuation.definition.comment"],
2221
+ settings: {
2222
+ foreground: "#A1A4A5"
2223
+ }
2224
+ },
2225
+ {
2226
+ scope: ["string", "punctuation.definition.string"],
2227
+ settings: {
2228
+ foreground: "#68D9A7"
2229
+ }
2230
+ },
2231
+ {
2232
+ scope: "constant.character.escape",
2233
+ settings: {
2234
+ foreground: "#EFB7C2"
2235
+ }
2236
+ },
2237
+ {
2238
+ scope: [
2239
+ "constant.numeric",
2240
+ "variable.other.constant",
2241
+ "entity.name.constant",
2242
+ "constant.language.boolean",
2243
+ "constant.language.false",
2244
+ "constant.language.true",
2245
+ "keyword.other.unit.user-defined",
2246
+ "keyword.other.unit.suffix.floating-point"
2247
+ ],
2248
+ settings: {
2249
+ foreground: "#EDD5A6"
2250
+ }
2251
+ },
2252
+ {
2253
+ scope: [
2254
+ "keyword",
2255
+ "keyword.operator.word",
2256
+ "keyword.operator.new",
2257
+ "variable.language.super",
2258
+ "support.type.primitive",
2259
+ "storage.type",
2260
+ "storage.modifier",
2261
+ "punctuation.definition.keyword"
2262
+ ],
2263
+ settings: {
2264
+ foreground: "#C6A5EA",
2265
+ fontStyle: ""
2266
+ }
2267
+ },
2268
+ {
2269
+ scope: "entity.name.tag.documentation",
2270
+ settings: {
2271
+ foreground: "#C6A5EA"
2272
+ }
2273
+ },
2274
+ {
2275
+ scope: [
2276
+ "keyword.operator",
2277
+ "punctuation.accessor",
2278
+ "punctuation.definition.generic",
2279
+ "meta.function.closure punctuation.section.parameters",
2280
+ "punctuation.definition.tag",
2281
+ "punctuation.separator.key-value"
2282
+ ],
2283
+ settings: {
2284
+ foreground: "#A7E0C8"
2285
+ }
2286
+ },
2287
+ {
2288
+ scope: [
2289
+ "entity.name.function",
2290
+ "meta.function-call.method",
2291
+ "support.function",
2292
+ "support.function.misc",
2293
+ "variable.function"
2294
+ ],
2295
+ settings: {
2296
+ foreground: "#9DAFFA"
2297
+ }
2298
+ },
2299
+ {
2300
+ scope: [
2301
+ "entity.name.class",
2302
+ "entity.other.inherited-class",
2303
+ "support.class",
2304
+ "meta.function-call.constructor",
2305
+ "entity.name.struct"
2306
+ ],
2307
+ settings: {
2308
+ foreground: "#EDD5A6"
2309
+ }
2310
+ },
2311
+ {
2312
+ scope: "entity.name.enum",
2313
+ settings: {
2314
+ foreground: "#EDD5A6"
2315
+ }
2316
+ },
2317
+ {
2318
+ scope: ["meta.enum variable.other.readwrite", "variable.other.enummember"],
2319
+ settings: {
2320
+ foreground: "#A7E0C8"
2321
+ }
2322
+ },
2323
+ {
2324
+ scope: "meta.property.object",
2325
+ settings: {
2326
+ foreground: "#A7E0C8"
2327
+ }
2328
+ },
2329
+ {
2330
+ scope: ["meta.type", "meta.type-alias", "support.type", "entity.name.type"],
2331
+ settings: {
2332
+ foreground: "#EDD5A6"
2333
+ }
2334
+ },
2335
+ {
2336
+ scope: [
2337
+ "meta.annotation variable.function",
2338
+ "meta.annotation variable.annotation.function",
2339
+ "meta.annotation punctuation.definition.annotation",
2340
+ "meta.decorator",
2341
+ "punctuation.decorator"
2342
+ ],
2343
+ settings: {
2344
+ foreground: "#EDD5A6"
2345
+ }
2346
+ },
2347
+ {
2348
+ scope: ["variable.parameter", "meta.function.parameters"],
2349
+ settings: {
2350
+ foreground: "#F39EAE"
2351
+ }
2352
+ },
2353
+ {
2354
+ scope: ["constant.language", "support.function.builtin"],
2355
+ settings: {
2356
+ foreground: "#F7869B"
2357
+ }
2358
+ },
2359
+ {
2360
+ scope: "entity.other.attribute-name.documentation",
2361
+ settings: {
2362
+ foreground: "#F7869B"
2363
+ }
2364
+ },
2365
+ {
2366
+ scope: ["keyword.control.directive", "punctuation.definition.directive"],
2367
+ settings: {
2368
+ foreground: "#EDD5A6"
2369
+ }
2370
+ },
2371
+ {
2372
+ scope: "punctuation.definition.typeparameters",
2373
+ settings: {
2374
+ foreground: "#9DAFFA"
2375
+ }
2376
+ },
2377
+ {
2378
+ scope: "entity.name.namespace",
2379
+ settings: {
2380
+ foreground: "#EDD5A6"
2381
+ }
2382
+ },
2383
+ {
2384
+ scope: "support.type.property-name.css",
2385
+ settings: {
2386
+ foreground: "#9DAFFA",
2387
+ fontStyle: ""
2388
+ }
2389
+ },
2390
+ {
2391
+ scope: [
2392
+ "variable.language.this",
2393
+ "variable.language.this punctuation.definition.variable"
2394
+ ],
2395
+ settings: {
2396
+ foreground: "#F7869B"
2397
+ }
2398
+ },
2399
+ {
2400
+ scope: "variable.object.property",
2401
+ settings: {
2402
+ foreground: "#E7E7E8"
2403
+ }
2404
+ },
2405
+ {
2406
+ scope: ["string.template variable", "string variable"],
2407
+ settings: {
2408
+ foreground: "#E7E7E8"
2409
+ }
2410
+ },
2411
+ {
2412
+ scope: "keyword.operator.new",
2413
+ settings: {
2414
+ fontStyle: "bold"
2415
+ }
2416
+ },
2417
+ {
2418
+ scope: "storage.modifier.specifier.extern.cpp",
2419
+ settings: {
2420
+ foreground: "#C6A5EA"
2421
+ }
2422
+ },
2423
+ {
2424
+ scope: [
2425
+ "entity.name.scope-resolution.template.call.cpp",
2426
+ "entity.name.scope-resolution.parameter.cpp",
2427
+ "entity.name.scope-resolution.cpp",
2428
+ "entity.name.scope-resolution.function.definition.cpp"
2429
+ ],
2430
+ settings: {
2431
+ foreground: "#EDD5A6"
2432
+ }
2433
+ },
2434
+ {
2435
+ scope: "storage.type.class.doxygen",
2436
+ settings: {
2437
+ fontStyle: ""
2438
+ }
2439
+ },
2440
+ {
2441
+ scope: ["storage.modifier.reference.cpp"],
2442
+ settings: {
2443
+ foreground: "#A7E0C8"
2444
+ }
2445
+ },
2446
+ {
2447
+ scope: "meta.interpolation.cs",
2448
+ settings: {
2449
+ foreground: "#E7E7E8"
2450
+ }
2451
+ },
2452
+ {
2453
+ scope: "comment.block.documentation.cs",
2454
+ settings: {
2455
+ foreground: "#E7E7E8"
2456
+ }
2457
+ },
2458
+ {
2459
+ scope: [
2460
+ "source.css entity.other.attribute-name.class.css",
2461
+ "entity.other.attribute-name.parent-selector.css punctuation.definition.entity.css"
2462
+ ],
2463
+ settings: {
2464
+ foreground: "#EDD5A6"
2465
+ }
2466
+ },
2467
+ {
2468
+ scope: "punctuation.separator.operator.css",
2469
+ settings: {
2470
+ foreground: "#A7E0C8"
2471
+ }
2472
+ },
2473
+ {
2474
+ scope: "source.css entity.other.attribute-name.pseudo-class",
2475
+ settings: {
2476
+ foreground: "#A7E0C8"
2477
+ }
2478
+ },
2479
+ {
2480
+ scope: "source.css constant.other.unicode-range",
2481
+ settings: {
2482
+ foreground: "#EDD5A6"
2483
+ }
2484
+ },
2485
+ {
2486
+ scope: "source.css variable.parameter.url",
2487
+ settings: {
2488
+ foreground: "#88DCB7",
2489
+ fontStyle: ""
2490
+ }
2491
+ },
2492
+ {
2493
+ scope: ["support.type.vendored.property-name"],
2494
+ settings: {
2495
+ foreground: "#9DAFFA"
2496
+ }
2497
+ },
2498
+ {
2499
+ scope: [
2500
+ "source.css meta.property-value variable",
2501
+ "source.css meta.property-value variable.other.less",
2502
+ "source.css meta.property-value variable.other.less punctuation.definition.variable.less",
2503
+ "meta.definition.variable.scss"
2504
+ ],
2505
+ settings: {
2506
+ foreground: "#F39EAE"
2507
+ }
2508
+ },
2509
+ {
2510
+ scope: [
2511
+ "source.css meta.property-list variable",
2512
+ "meta.property-list variable.other.less",
2513
+ "meta.property-list variable.other.less punctuation.definition.variable.less"
2514
+ ],
2515
+ settings: {
2516
+ foreground: "#9DAFFA"
2517
+ }
2518
+ },
2519
+ {
2520
+ scope: "keyword.other.unit.percentage.css",
2521
+ settings: {
2522
+ foreground: "#EDD5A6"
2523
+ }
2524
+ },
2525
+ {
2526
+ scope: "source.css meta.attribute-selector",
2527
+ settings: {
2528
+ foreground: "#88DCB7"
2529
+ }
2530
+ },
2531
+ {
2532
+ scope: [
2533
+ "keyword.other.definition.ini",
2534
+ "punctuation.support.type.property-name.json",
2535
+ "support.type.property-name.json",
2536
+ "punctuation.support.type.property-name.toml",
2537
+ "support.type.property-name.toml",
2538
+ "entity.name.tag.yaml",
2539
+ "punctuation.support.type.property-name.yaml",
2540
+ "support.type.property-name.yaml"
2541
+ ],
2542
+ settings: {
2543
+ foreground: "#9DAFFA",
2544
+ fontStyle: ""
2545
+ }
2546
+ },
2547
+ {
2548
+ scope: ["constant.language.json", "constant.language.yaml"],
2549
+ settings: {
2550
+ foreground: "#EDD5A6"
2551
+ }
2552
+ },
2553
+ {
2554
+ scope: ["entity.name.type.anchor.yaml", "variable.other.alias.yaml"],
2555
+ settings: {
2556
+ foreground: "#EDD5A6",
2557
+ fontStyle: ""
2558
+ }
2559
+ },
2560
+ {
2561
+ scope: ["support.type.property-name.table", "entity.name.section.group-title.ini"],
2562
+ settings: {
2563
+ foreground: "#EDD5A6"
2564
+ }
2565
+ },
2566
+ {
2567
+ scope: "constant.other.time.datetime.offset.toml",
2568
+ settings: {
2569
+ foreground: "#EFB7C2"
2570
+ }
2571
+ },
2572
+ {
2573
+ scope: ["punctuation.definition.anchor.yaml", "punctuation.definition.alias.yaml"],
2574
+ settings: {
2575
+ foreground: "#EFB7C2"
2576
+ }
2577
+ },
2578
+ {
2579
+ scope: "entity.other.document.begin.yaml",
2580
+ settings: {
2581
+ foreground: "#EFB7C2"
2582
+ }
2583
+ },
2584
+ {
2585
+ scope: "markup.changed.diff",
2586
+ settings: {
2587
+ foreground: "#EDD5A6"
2588
+ }
2589
+ },
2590
+ {
2591
+ scope: [
2592
+ "meta.diff.header.from-file",
2593
+ "meta.diff.header.to-file",
2594
+ "punctuation.definition.from-file.diff",
2595
+ "punctuation.definition.to-file.diff"
2596
+ ],
2597
+ settings: {
2598
+ foreground: "#9DAFFA"
2599
+ }
2600
+ },
2601
+ {
2602
+ scope: "markup.inserted.diff",
2603
+ settings: {
2604
+ foreground: "#88DCB7"
2605
+ }
2606
+ },
2607
+ {
2608
+ scope: "markup.deleted.diff",
2609
+ settings: {
2610
+ foreground: "#F7869B"
2611
+ }
2612
+ },
2613
+ {
2614
+ scope: ["variable.other.env"],
2615
+ settings: {
2616
+ foreground: "#9DAFFA"
2617
+ }
2618
+ },
2619
+ {
2620
+ scope: ["string.quoted variable.other.env"],
2621
+ settings: {
2622
+ foreground: "#E7E7E8"
2623
+ }
2624
+ },
2625
+ {
2626
+ scope: "support.function.builtin.gdscript",
2627
+ settings: {
2628
+ foreground: "#9DAFFA"
2629
+ }
2630
+ },
2631
+ {
2632
+ scope: "constant.language.gdscript",
2633
+ settings: {
2634
+ foreground: "#EDD5A6"
2635
+ }
2636
+ },
2637
+ {
2638
+ scope: "comment meta.annotation.go",
2639
+ settings: {
2640
+ foreground: "#F39EAE"
2641
+ }
2642
+ },
2643
+ {
2644
+ scope: "comment meta.annotation.parameters.go",
2645
+ settings: {
2646
+ foreground: "#EDD5A6"
2647
+ }
2648
+ },
2649
+ {
2650
+ scope: "constant.language.go",
2651
+ settings: {
2652
+ foreground: "#EDD5A6"
2653
+ }
2654
+ },
2655
+ {
2656
+ scope: "variable.graphql",
2657
+ settings: {
2658
+ foreground: "#E7E7E8"
2659
+ }
2660
+ },
2661
+ {
2662
+ scope: "string.unquoted.alias.graphql",
2663
+ settings: {
2664
+ foreground: "#F2CDCD"
2665
+ }
2666
+ },
2667
+ {
2668
+ scope: "constant.character.enum.graphql",
2669
+ settings: {
2670
+ foreground: "#A7E0C8"
2671
+ }
2672
+ },
2673
+ {
2674
+ scope: "meta.objectvalues.graphql constant.object.key.graphql string.unquoted.graphql",
2675
+ settings: {
2676
+ foreground: "#F2CDCD"
2677
+ }
2678
+ },
2679
+ {
2680
+ scope: [
2681
+ "keyword.other.doctype",
2682
+ "meta.tag.sgml.doctype punctuation.definition.tag",
2683
+ "meta.tag.metadata.doctype entity.name.tag",
2684
+ "meta.tag.metadata.doctype punctuation.definition.tag"
2685
+ ],
2686
+ settings: {
2687
+ foreground: "#C6A5EA"
2688
+ }
2689
+ },
2690
+ {
2691
+ scope: ["entity.name.tag"],
2692
+ settings: {
2693
+ foreground: "#9DAFFA",
2694
+ fontStyle: ""
2695
+ }
2696
+ },
2697
+ {
2698
+ scope: [
2699
+ "text.html constant.character.entity",
2700
+ "text.html constant.character.entity punctuation",
2701
+ "constant.character.entity.xml",
2702
+ "constant.character.entity.xml punctuation",
2703
+ "constant.character.entity.js.jsx",
2704
+ "constant.charactger.entity.js.jsx punctuation",
2705
+ "constant.character.entity.tsx",
2706
+ "constant.character.entity.tsx punctuation"
2707
+ ],
2708
+ settings: {
2709
+ foreground: "#F7869B"
2710
+ }
2711
+ },
2712
+ {
2713
+ scope: ["entity.other.attribute-name"],
2714
+ settings: {
2715
+ foreground: "#EDD5A6"
2716
+ }
2717
+ },
2718
+ {
2719
+ scope: [
2720
+ "support.class.component",
2721
+ "support.class.component.jsx",
2722
+ "support.class.component.tsx",
2723
+ "support.class.component.vue"
2724
+ ],
2725
+ settings: {
2726
+ foreground: "#EFB7C2",
2727
+ fontStyle: ""
2728
+ }
2729
+ },
2730
+ {
2731
+ scope: ["punctuation.definition.annotation", "storage.type.annotation"],
2732
+ settings: {
2733
+ foreground: "#EDD5A6"
2734
+ }
2735
+ },
2736
+ {
2737
+ scope: "constant.other.enum.java",
2738
+ settings: {
2739
+ foreground: "#A7E0C8"
2740
+ }
2741
+ },
2742
+ {
2743
+ scope: "storage.modifier.import.java",
2744
+ settings: {
2745
+ foreground: "#E7E7E8"
2746
+ }
2747
+ },
2748
+ {
2749
+ scope: "comment.block.javadoc.java keyword.other.documentation.javadoc.java",
2750
+ settings: {
2751
+ fontStyle: ""
2752
+ }
2753
+ },
2754
+ {
2755
+ scope: "meta.export variable.other.readwrite.js",
2756
+ settings: {
2757
+ foreground: "#F39EAE"
2758
+ }
2759
+ },
2760
+ {
2761
+ scope: [
2762
+ "variable.other.constant.js",
2763
+ "variable.other.constant.ts",
2764
+ "variable.other.property.js",
2765
+ "variable.other.property.ts"
2766
+ ],
2767
+ settings: {
2768
+ foreground: "#E7E7E8"
2769
+ }
2770
+ },
2771
+ {
2772
+ scope: ["variable.other.jsdoc", "comment.block.documentation variable.other"],
2773
+ settings: {
2774
+ foreground: "#F39EAE",
2775
+ fontStyle: ""
2776
+ }
2777
+ },
2778
+ {
2779
+ scope: "storage.type.class.jsdoc",
2780
+ settings: {
2781
+ fontStyle: ""
2782
+ }
2783
+ },
2784
+ {
2785
+ scope: "support.type.object.console.js",
2786
+ settings: {
2787
+ foreground: "#E7E7E8"
2788
+ }
2789
+ },
2790
+ {
2791
+ scope: ["support.constant.node", "support.type.object.module.js"],
2792
+ settings: {
2793
+ foreground: "#C6A5EA"
2794
+ }
2795
+ },
2796
+ {
2797
+ scope: "storage.modifier.implements",
2798
+ settings: {
2799
+ foreground: "#C6A5EA"
2800
+ }
2801
+ },
2802
+ {
2803
+ scope: [
2804
+ "constant.language.null.js",
2805
+ "constant.language.null.ts",
2806
+ "constant.language.undefined.js",
2807
+ "constant.language.undefined.ts",
2808
+ "support.type.builtin.ts"
2809
+ ],
2810
+ settings: {
2811
+ foreground: "#C6A5EA"
2812
+ }
2813
+ },
2814
+ {
2815
+ scope: "variable.parameter.generic",
2816
+ settings: {
2817
+ foreground: "#EDD5A6"
2818
+ }
2819
+ },
2820
+ {
2821
+ scope: ["keyword.declaration.function.arrow.js", "storage.type.function.arrow.ts"],
2822
+ settings: {
2823
+ foreground: "#A7E0C8"
2824
+ }
2825
+ },
2826
+ {
2827
+ scope: "punctuation.decorator.ts",
2828
+ settings: {
2829
+ foreground: "#9DAFFA"
2830
+ }
2831
+ },
2832
+ {
2833
+ scope: [
2834
+ "keyword.operator.expression.in.js",
2835
+ "keyword.operator.expression.in.ts",
2836
+ "keyword.operator.expression.infer.ts",
2837
+ "keyword.operator.expression.instanceof.js",
2838
+ "keyword.operator.expression.instanceof.ts",
2839
+ "keyword.operator.expression.is",
2840
+ "keyword.operator.expression.keyof.ts",
2841
+ "keyword.operator.expression.of.js",
2842
+ "keyword.operator.expression.of.ts",
2843
+ "keyword.operator.expression.typeof.ts"
2844
+ ],
2845
+ settings: {
2846
+ foreground: "#C6A5EA"
2847
+ }
2848
+ },
2849
+ {
2850
+ scope: "support.function.macro.julia",
2851
+ settings: {
2852
+ foreground: "#A7E0C8"
2853
+ }
2854
+ },
2855
+ {
2856
+ scope: "constant.language.julia",
2857
+ settings: {
2858
+ foreground: "#EDD5A6"
2859
+ }
2860
+ },
2861
+ {
2862
+ scope: "constant.other.symbol.julia",
2863
+ settings: {
2864
+ foreground: "#F39EAE"
2865
+ }
2866
+ },
2867
+ {
2868
+ scope: "text.tex keyword.control.preamble",
2869
+ settings: {
2870
+ foreground: "#A7E0C8"
2871
+ }
2872
+ },
2873
+ {
2874
+ scope: "text.tex support.function.be",
2875
+ settings: {
2876
+ foreground: "#9DAFFA"
2877
+ }
2878
+ },
2879
+ {
2880
+ scope: "constant.other.general.math.tex",
2881
+ settings: {
2882
+ foreground: "#F2CDCD"
2883
+ }
2884
+ },
2885
+ {
2886
+ scope: "comment.line.double-dash.documentation.lua storage.type.annotation.lua",
2887
+ settings: {
2888
+ foreground: "#C6A5EA",
2889
+ fontStyle: ""
2890
+ }
2891
+ },
2892
+ {
2893
+ scope: [
2894
+ "comment.line.double-dash.documentation.lua entity.name.variable.lua",
2895
+ "comment.line.double-dash.documentation.lua variable.lua"
2896
+ ],
2897
+ settings: {
2898
+ foreground: "#E7E7E8"
2899
+ }
2900
+ },
2901
+ {
2902
+ scope: [
2903
+ "heading.1.markdown punctuation.definition.heading.markdown",
2904
+ "heading.1.markdown",
2905
+ "heading.1.quarto punctuation.definition.heading.quarto",
2906
+ "heading.1.quarto",
2907
+ "markup.heading.atx.1.mdx",
2908
+ "markup.heading.atx.1.mdx punctuation.definition.heading.mdx",
2909
+ "markup.heading.setext.1.markdown",
2910
+ "markup.heading.heading-0.asciidoc"
2911
+ ],
2912
+ settings: {
2913
+ foreground: "#F7869B"
2914
+ }
2915
+ },
2916
+ {
2917
+ scope: [
2918
+ "heading.2.markdown punctuation.definition.heading.markdown",
2919
+ "heading.2.markdown",
2920
+ "heading.2.quarto punctuation.definition.heading.quarto",
2921
+ "heading.2.quarto",
2922
+ "markup.heading.atx.2.mdx",
2923
+ "markup.heading.atx.2.mdx punctuation.definition.heading.mdx",
2924
+ "markup.heading.setext.2.markdown",
2925
+ "markup.heading.heading-1.asciidoc"
2926
+ ],
2927
+ settings: {
2928
+ foreground: "#EDD5A6"
2929
+ }
2930
+ },
2931
+ {
2932
+ scope: [
2933
+ "heading.3.markdown punctuation.definition.heading.markdown",
2934
+ "heading.3.markdown",
2935
+ "heading.3.quarto punctuation.definition.heading.quarto",
2936
+ "heading.3.quarto",
2937
+ "markup.heading.atx.3.mdx",
2938
+ "markup.heading.atx.3.mdx punctuation.definition.heading.mdx",
2939
+ "markup.heading.heading-2.asciidoc"
2940
+ ],
2941
+ settings: {
2942
+ foreground: "#EDD5A6"
2943
+ }
2944
+ },
2945
+ {
2946
+ scope: [
2947
+ "heading.4.markdown punctuation.definition.heading.markdown",
2948
+ "heading.4.markdown",
2949
+ "heading.4.quarto punctuation.definition.heading.quarto",
2950
+ "heading.4.quarto",
2951
+ "markup.heading.atx.4.mdx",
2952
+ "markup.heading.atx.4.mdx punctuation.definition.heading.mdx",
2953
+ "markup.heading.heading-3.asciidoc"
2954
+ ],
2955
+ settings: {
2956
+ foreground: "#88DCB7"
2957
+ }
2958
+ },
2959
+ {
2960
+ scope: [
2961
+ "heading.5.markdown punctuation.definition.heading.markdown",
2962
+ "heading.5.markdown",
2963
+ "heading.5.quarto punctuation.definition.heading.quarto",
2964
+ "heading.5.quarto",
2965
+ "markup.heading.atx.5.mdx",
2966
+ "markup.heading.atx.5.mdx punctuation.definition.heading.mdx",
2967
+ "markup.heading.heading-4.asciidoc"
2968
+ ],
2969
+ settings: {
2970
+ foreground: "#9DAFFA"
2971
+ }
2972
+ },
2973
+ {
2974
+ scope: [
2975
+ "heading.6.markdown punctuation.definition.heading.markdown",
2976
+ "heading.6.markdown",
2977
+ "heading.6.quarto punctuation.definition.heading.quarto",
2978
+ "heading.6.quarto",
2979
+ "markup.heading.atx.6.mdx",
2980
+ "markup.heading.atx.6.mdx punctuation.definition.heading.mdx",
2981
+ "markup.heading.heading-5.asciidoc"
2982
+ ],
2983
+ settings: {
2984
+ foreground: "#C6A5EA"
2985
+ }
2986
+ },
2987
+ {
2988
+ scope: "markup.bold",
2989
+ settings: {
2990
+ foreground: "#F7869B",
2991
+ fontStyle: "bold"
2992
+ }
2993
+ },
2994
+ {
2995
+ scope: "markup.italic",
2996
+ settings: {
2997
+ foreground: "#F7869B"
2998
+ }
2999
+ },
3000
+ {
3001
+ scope: "markup.strikethrough",
3002
+ settings: {
3003
+ foreground: "#A6ADC8",
3004
+ fontStyle: "strikethrough"
3005
+ }
3006
+ },
3007
+ {
3008
+ scope: ["punctuation.definition.link", "markup.underline.link"],
3009
+ settings: {
3010
+ foreground: "#9DAFFA"
3011
+ }
3012
+ },
3013
+ {
3014
+ scope: [
3015
+ "text.html.markdown punctuation.definition.link.title",
3016
+ "text.html.quarto punctuation.definition.link.title",
3017
+ "string.other.link.title.markdown",
3018
+ "string.other.link.title.quarto",
3019
+ "markup.link",
3020
+ "punctuation.definition.constant.markdown",
3021
+ "punctuation.definition.constant.quarto",
3022
+ "constant.other.reference.link.markdown",
3023
+ "constant.other.reference.link.quarto",
3024
+ "markup.substitution.attribute-reference"
3025
+ ],
3026
+ settings: {
3027
+ foreground: "#B4BEFE"
3028
+ }
3029
+ },
3030
+ {
3031
+ scope: [
3032
+ "punctuation.definition.raw.markdown",
3033
+ "punctuation.definition.raw.quarto",
3034
+ "markup.inline.raw.string.markdown",
3035
+ "markup.inline.raw.string.quarto",
3036
+ "markup.raw.block.markdown",
3037
+ "markup.raw.block.quarto"
3038
+ ],
3039
+ settings: {
3040
+ foreground: "#88DCB7"
3041
+ }
3042
+ },
3043
+ {
3044
+ scope: "fenced_code.block.language",
3045
+ settings: {
3046
+ foreground: "#9DAFFA"
3047
+ }
3048
+ },
3049
+ {
3050
+ scope: [
3051
+ "markup.fenced_code.block punctuation.definition",
3052
+ "markup.raw support.asciidoc"
3053
+ ],
3054
+ settings: {
3055
+ foreground: "#A1A4A5"
3056
+ }
3057
+ },
3058
+ {
3059
+ scope: ["markup.quote", "punctuation.definition.quote.begin"],
3060
+ settings: {
3061
+ foreground: "#EFB7C2"
3062
+ }
3063
+ },
3064
+ {
3065
+ scope: "meta.separator.markdown",
3066
+ settings: {
3067
+ foreground: "#A7E0C8"
3068
+ }
3069
+ },
3070
+ {
3071
+ scope: [
3072
+ "punctuation.definition.list.begin.markdown",
3073
+ "punctuation.definition.list.begin.quarto",
3074
+ "markup.list.bullet"
3075
+ ],
3076
+ settings: {
3077
+ foreground: "#A7E0C8"
3078
+ }
3079
+ },
3080
+ {
3081
+ scope: "markup.heading.quarto",
3082
+ settings: {
3083
+ fontStyle: "bold"
3084
+ }
3085
+ },
3086
+ {
3087
+ scope: [
3088
+ "entity.other.attribute-name.multipart.nix",
3089
+ "entity.other.attribute-name.single.nix"
3090
+ ],
3091
+ settings: {
3092
+ foreground: "#9DAFFA"
3093
+ }
3094
+ },
3095
+ {
3096
+ scope: "variable.parameter.name.nix",
3097
+ settings: {
3098
+ foreground: "#E7E7E8",
3099
+ fontStyle: ""
3100
+ }
3101
+ },
3102
+ {
3103
+ scope: "meta.embedded variable.parameter.name.nix",
3104
+ settings: {
3105
+ foreground: "#B4BEFE",
3106
+ fontStyle: ""
3107
+ }
3108
+ },
3109
+ {
3110
+ scope: "string.unquoted.path.nix",
3111
+ settings: {
3112
+ foreground: "#EFB7C2",
3113
+ fontStyle: ""
3114
+ }
3115
+ },
3116
+ {
3117
+ scope: ["support.attribute.builtin", "meta.attribute.php"],
3118
+ settings: {
3119
+ foreground: "#EDD5A6"
3120
+ }
3121
+ },
3122
+ {
3123
+ scope: "meta.function.parameters.php punctuation.definition.variable.php",
3124
+ settings: {
3125
+ foreground: "#F39EAE"
3126
+ }
3127
+ },
3128
+ {
3129
+ scope: "constant.language.php",
3130
+ settings: {
3131
+ foreground: "#C6A5EA"
3132
+ }
3133
+ },
3134
+ {
3135
+ scope: "text.html.php support.function",
3136
+ settings: {
3137
+ foreground: "#9DAFFA"
3138
+ }
3139
+ },
3140
+ {
3141
+ scope: "keyword.other.phpdoc.php",
3142
+ settings: {
3143
+ fontStyle: ""
3144
+ }
3145
+ },
3146
+ {
3147
+ scope: ["support.variable.magic.python", "meta.function-call.arguments.python"],
3148
+ settings: {
3149
+ foreground: "#E7E7E8"
3150
+ }
3151
+ },
3152
+ {
3153
+ scope: ["support.function.magic.python"],
3154
+ settings: {
3155
+ foreground: "#9DAFFA"
3156
+ }
3157
+ },
3158
+ {
3159
+ scope: [
3160
+ "variable.parameter.function.language.special.self.python",
3161
+ "variable.language.special.self.python"
3162
+ ],
3163
+ settings: {
3164
+ foreground: "#F7869B"
3165
+ }
3166
+ },
3167
+ {
3168
+ scope: ["keyword.control.flow.python", "keyword.operator.logical.python"],
3169
+ settings: {
3170
+ foreground: "#C6A5EA"
3171
+ }
3172
+ },
3173
+ {
3174
+ scope: "storage.type.function.python",
3175
+ settings: {
3176
+ foreground: "#C6A5EA"
3177
+ }
3178
+ },
3179
+ {
3180
+ scope: [
3181
+ "support.token.decorator.python",
3182
+ "meta.function.decorator.identifier.python"
3183
+ ],
3184
+ settings: {
3185
+ foreground: "#9DAFFA"
3186
+ }
3187
+ },
3188
+ {
3189
+ scope: ["meta.function-call.python"],
3190
+ settings: {
3191
+ foreground: "#9DAFFA"
3192
+ }
3193
+ },
3194
+ {
3195
+ scope: [
3196
+ "entity.name.function.decorator.python",
3197
+ "punctuation.definition.decorator.python"
3198
+ ],
3199
+ settings: {
3200
+ foreground: "#EDD5A6"
3201
+ }
3202
+ },
3203
+ {
3204
+ scope: "constant.character.format.placeholder.other.python",
3205
+ settings: {
3206
+ foreground: "#EFB7C2"
3207
+ }
3208
+ },
3209
+ {
3210
+ scope: ["support.type.exception.python", "support.function.builtin.python"],
3211
+ settings: {
3212
+ foreground: "#EDD5A6"
3213
+ }
3214
+ },
3215
+ {
3216
+ scope: ["support.type.python"],
3217
+ settings: {
3218
+ foreground: "#EDD5A6"
3219
+ }
3220
+ },
3221
+ {
3222
+ scope: "constant.language.python",
3223
+ settings: {
3224
+ foreground: "#C6A5EA"
3225
+ }
3226
+ },
3227
+ {
3228
+ scope: ["meta.indexed-name.python", "meta.item-access.python"],
3229
+ settings: {
3230
+ foreground: "#F39EAE"
3231
+ }
3232
+ },
3233
+ {
3234
+ scope: "storage.type.string.python",
3235
+ settings: {
3236
+ foreground: "#88DCB7"
3237
+ }
3238
+ },
3239
+ {
3240
+ scope: "meta.function.parameters.python",
3241
+ settings: {
3242
+ fontStyle: ""
3243
+ }
3244
+ },
3245
+ {
3246
+ scope: [
3247
+ "string.regexp punctuation.definition.string.begin",
3248
+ "string.regexp punctuation.definition.string.end"
3249
+ ],
3250
+ settings: {
3251
+ foreground: "#EFB7C2"
3252
+ }
3253
+ },
3254
+ {
3255
+ scope: "keyword.control.anchor.regexp",
3256
+ settings: {
3257
+ foreground: "#C6A5EA"
3258
+ }
3259
+ },
3260
+ {
3261
+ scope: "string.regexp.ts",
3262
+ settings: {
3263
+ foreground: "#E7E7E8"
3264
+ }
3265
+ },
3266
+ {
3267
+ scope: [
3268
+ "punctuation.definition.group.regexp",
3269
+ "keyword.other.back-reference.regexp"
3270
+ ],
3271
+ settings: {
3272
+ foreground: "#88DCB7"
3273
+ }
3274
+ },
3275
+ {
3276
+ scope: "punctuation.definition.character-class.regexp",
3277
+ settings: {
3278
+ foreground: "#EDD5A6"
3279
+ }
3280
+ },
3281
+ {
3282
+ scope: "constant.other.character-class.regexp",
3283
+ settings: {
3284
+ foreground: "#EFB7C2"
3285
+ }
3286
+ },
3287
+ {
3288
+ scope: "constant.other.character-class.range.regexp",
3289
+ settings: {
3290
+ foreground: "#F5E0DC"
3291
+ }
3292
+ },
3293
+ {
3294
+ scope: "keyword.operator.quantifier.regexp",
3295
+ settings: {
3296
+ foreground: "#A7E0C8"
3297
+ }
3298
+ },
3299
+ {
3300
+ scope: "constant.character.numeric.regexp",
3301
+ settings: {
3302
+ foreground: "#EDD5A6"
3303
+ }
3304
+ },
3305
+ {
3306
+ scope: [
3307
+ "punctuation.definition.group.no-capture.regexp",
3308
+ "meta.assertion.look-ahead.regexp",
3309
+ "meta.assertion.negative-look-ahead.regexp"
3310
+ ],
3311
+ settings: {
3312
+ foreground: "#9DAFFA"
3313
+ }
3314
+ },
3315
+ {
3316
+ scope: [
3317
+ "meta.annotation.rust",
3318
+ "meta.annotation.rust punctuation",
3319
+ "meta.attribute.rust",
3320
+ "punctuation.definition.attribute.rust"
3321
+ ],
3322
+ settings: {
3323
+ foreground: "#EDD5A6"
3324
+ }
3325
+ },
3326
+ {
3327
+ scope: [
3328
+ "meta.attribute.rust string.quoted.double.rust",
3329
+ "meta.attribute.rust string.quoted.single.char.rust"
3330
+ ],
3331
+ settings: {
3332
+ fontStyle: ""
3333
+ }
3334
+ },
3335
+ {
3336
+ scope: [
3337
+ "entity.name.function.macro.rules.rust",
3338
+ "storage.type.module.rust",
3339
+ "storage.modifier.rust",
3340
+ "storage.type.struct.rust",
3341
+ "storage.type.enum.rust",
3342
+ "storage.type.trait.rust",
3343
+ "storage.type.union.rust",
3344
+ "storage.type.impl.rust",
3345
+ "storage.type.rust",
3346
+ "storage.type.function.rust",
3347
+ "storage.type.type.rust"
3348
+ ],
3349
+ settings: {
3350
+ foreground: "#C6A5EA",
3351
+ fontStyle: ""
3352
+ }
3353
+ },
3354
+ {
3355
+ scope: "entity.name.type.numeric.rust",
3356
+ settings: {
3357
+ foreground: "#C6A5EA",
3358
+ fontStyle: ""
3359
+ }
3360
+ },
3361
+ {
3362
+ scope: "meta.generic.rust",
3363
+ settings: {
3364
+ foreground: "#EDD5A6"
3365
+ }
3366
+ },
3367
+ {
3368
+ scope: "entity.name.impl.rust",
3369
+ settings: {
3370
+ foreground: "#EDD5A6"
3371
+ }
3372
+ },
3373
+ {
3374
+ scope: "entity.name.module.rust",
3375
+ settings: {
3376
+ foreground: "#EDD5A6"
3377
+ }
3378
+ },
3379
+ {
3380
+ scope: "entity.name.trait.rust",
3381
+ settings: {
3382
+ foreground: "#EDD5A6"
3383
+ }
3384
+ },
3385
+ {
3386
+ scope: "storage.type.source.rust",
3387
+ settings: {
3388
+ foreground: "#EDD5A6"
3389
+ }
3390
+ },
3391
+ {
3392
+ scope: "entity.name.union.rust",
3393
+ settings: {
3394
+ foreground: "#EDD5A6"
3395
+ }
3396
+ },
3397
+ {
3398
+ scope: "meta.enum.rust storage.type.source.rust",
3399
+ settings: {
3400
+ foreground: "#A7E0C8"
3401
+ }
3402
+ },
3403
+ {
3404
+ scope: [
3405
+ "support.macro.rust",
3406
+ "meta.macro.rust support.function.rust",
3407
+ "entity.name.function.macro.rust"
3408
+ ],
3409
+ settings: {
3410
+ foreground: "#9DAFFA"
3411
+ }
3412
+ },
3413
+ {
3414
+ scope: ["storage.modifier.lifetime.rust", "entity.name.type.lifetime"],
3415
+ settings: {
3416
+ foreground: "#9DAFFA"
3417
+ }
3418
+ },
3419
+ {
3420
+ scope: "string.quoted.double.rust constant.other.placeholder.rust",
3421
+ settings: {
3422
+ foreground: "#EFB7C2"
3423
+ }
3424
+ },
3425
+ {
3426
+ scope: "meta.function.return-type.rust meta.generic.rust storage.type.rust",
3427
+ settings: {
3428
+ foreground: "#E7E7E8"
3429
+ }
3430
+ },
3431
+ {
3432
+ scope: "meta.function.call.rust",
3433
+ settings: {
3434
+ foreground: "#9DAFFA"
3435
+ }
3436
+ },
3437
+ {
3438
+ scope: "punctuation.brackets.angle.rust",
3439
+ settings: {
3440
+ foreground: "#9DAFFA"
3441
+ }
3442
+ },
3443
+ {
3444
+ scope: "constant.other.caps.rust",
3445
+ settings: {
3446
+ foreground: "#EDD5A6"
3447
+ }
3448
+ },
3449
+ {
3450
+ scope: ["meta.function.definition.rust variable.other.rust"],
3451
+ settings: {
3452
+ foreground: "#F39EAE"
3453
+ }
3454
+ },
3455
+ {
3456
+ scope: "meta.function.call.rust variable.other.rust",
3457
+ settings: {
3458
+ foreground: "#E7E7E8"
3459
+ }
3460
+ },
3461
+ {
3462
+ scope: "variable.language.self.rust",
3463
+ settings: {
3464
+ foreground: "#F7869B"
3465
+ }
3466
+ },
3467
+ {
3468
+ scope: [
3469
+ "variable.other.metavariable.name.rust",
3470
+ "meta.macro.metavariable.rust keyword.operator.macro.dollar.rust"
3471
+ ],
3472
+ settings: {
3473
+ foreground: "#EFB7C2"
3474
+ }
3475
+ },
3476
+ {
3477
+ scope: [
3478
+ "comment.line.shebang",
3479
+ "comment.line.shebang punctuation.definition.comment",
3480
+ "comment.line.shebang",
3481
+ "punctuation.definition.comment.shebang.shell",
3482
+ "meta.shebang.shell"
3483
+ ],
3484
+ settings: {
3485
+ foreground: "#EFB7C2"
3486
+ }
3487
+ },
3488
+ {
3489
+ scope: "comment.line.shebang constant.language",
3490
+ settings: {
3491
+ foreground: "#A7E0C8"
3492
+ }
3493
+ },
3494
+ {
3495
+ scope: [
3496
+ "meta.function-call.arguments.shell punctuation.definition.variable.shell",
3497
+ "meta.function-call.arguments.shell punctuation.section.interpolation",
3498
+ "meta.function-call.arguments.shell punctuation.definition.variable.shell",
3499
+ "meta.function-call.arguments.shell punctuation.section.interpolation"
3500
+ ],
3501
+ settings: {
3502
+ foreground: "#F7869B"
3503
+ }
3504
+ },
3505
+ {
3506
+ scope: "meta.string meta.interpolation.parameter.shell variable.other.readwrite",
3507
+ settings: {
3508
+ foreground: "#EDD5A6"
3509
+ }
3510
+ },
3511
+ {
3512
+ scope: [
3513
+ "source.shell punctuation.section.interpolation",
3514
+ "punctuation.definition.evaluation.backticks.shell"
3515
+ ],
3516
+ settings: {
3517
+ foreground: "#A7E0C8"
3518
+ }
3519
+ },
3520
+ {
3521
+ scope: "entity.name.tag.heredoc.shell",
3522
+ settings: {
3523
+ foreground: "#C6A5EA"
3524
+ }
3525
+ },
3526
+ {
3527
+ scope: "string.quoted.double.shell variable.other.normal.shell",
3528
+ settings: {
3529
+ foreground: "#E7E7E8"
3530
+ }
3531
+ },
3532
+ {
3533
+ scope: "token.info-token",
3534
+ settings: {
3535
+ foreground: "#8BA1FF"
3536
+ }
3537
+ },
3538
+ {
3539
+ scope: "token.warn-token",
3540
+ settings: {
3541
+ foreground: "#F5B944"
3542
+ }
3543
+ },
3544
+ {
3545
+ scope: "token.error-token",
3546
+ settings: {
3547
+ foreground: "#FB6E88"
3548
+ }
3549
+ },
3550
+ {
3551
+ scope: "token.debug-token",
3552
+ settings: {
3553
+ foreground: "#BE95EB"
3554
+ }
3555
+ }
3556
+ ]
3557
+ };
3558
+
3559
+ // components/src/asciidoc/util.ts
3560
+ var highlighter = null;
3561
+ var customLanguages = ["oxql"];
3562
+ var supportedLanguages = [...Object.keys(bundledLanguages), ...customLanguages];
3563
+ async function getOrCreateHighlighter() {
3564
+ if (!highlighter) {
3565
+ const langs = [];
3566
+ langs.push({
3567
+ ...oxql_tmLanguage_default
3568
+ });
3569
+ highlighter = await getHighlighter({
3570
+ themes: [oxide_dark_default],
3571
+ langs
3572
+ });
3573
+ }
3574
+ return highlighter;
3575
+ }
3576
+ var highlight = async (block) => {
3577
+ if (block.type === "listing") {
3578
+ const literalBlock = block;
3579
+ if (!literalBlock.content) {
3580
+ return block;
3581
+ }
3582
+ const calloutRegex = /<i class="conum" data-value="\d+"><\/i>/g;
3583
+ const callouts = [];
3584
+ const placeholderContent = literalBlock.content.replace(calloutRegex, (match) => {
3585
+ callouts.push(match);
3586
+ return `__CALLOUT_PLACEHOLDER_${callouts.length - 1}__`;
3587
+ });
3588
+ if (!literalBlock.language) {
3589
+ return {
3590
+ ...block,
3591
+ content: placeholderContent.replace(
3592
+ /__CALLOUT_PLACEHOLDER_(\d+)__/g,
3593
+ (_, index) => callouts[parseInt(index)]
3594
+ )
3595
+ };
3596
+ }
3597
+ let lang = literalBlock.language;
3598
+ const h = await getOrCreateHighlighter();
3599
+ const loadedLanguages = h.getLoadedLanguages();
3600
+ if (!supportedLanguages.includes(lang)) {
3601
+ lang = "text";
3602
+ }
3603
+ if (!loadedLanguages.includes(lang)) {
3604
+ await h.loadLanguage(lang);
3605
+ }
3606
+ const highlightedContent = h.codeToHtml(placeholderContent, {
3607
+ lang,
3608
+ theme: oxide_dark_default,
3609
+ structure: "inline"
3610
+ });
3611
+ const restoredContent = highlightedContent.replace(
3612
+ /__CALLOUT_PLACEHOLDER_(\d+)__/g,
3613
+ (_, index) => callouts[parseInt(index)]
3614
+ );
3615
+ return {
3616
+ ...block,
3617
+ content: restoredContent
3618
+ };
3619
+ }
3620
+ return block;
12
3621
  };
13
- var make = (tag) => (
14
- // only one argument here means string interpolations are not allowed
15
- (strings) => {
16
- const Comp = ({ className, children, ...rest }) => createElement(tag, { className: cn(strings[0], className), ...rest }, children);
17
- Comp.displayName = `classed.${tag}`;
18
- return Comp;
3622
+ var attrs = {
3623
+ sectlinks: "true",
3624
+ stem: "latexmath",
3625
+ stylesheet: false
3626
+ };
3627
+ var loadAsciidoctor = ({
3628
+ extensions = []
3629
+ }) => {
3630
+ const ad2 = asciidoctor();
3631
+ class InlineConverter2 {
3632
+ baseConverter;
3633
+ constructor() {
3634
+ this.baseConverter = new ad2.Html5Converter();
3635
+ }
3636
+ convert(node2, transform) {
3637
+ switch (node2.getNodeName()) {
3638
+ case "inline_callout":
3639
+ return convertInlineCallout(node2);
3640
+ default:
3641
+ break;
3642
+ }
3643
+ return this.baseConverter.convert(node2, transform);
3644
+ }
19
3645
  }
20
- );
21
- var classed = {
22
- button: make("button"),
23
- div: make("div"),
24
- h1: make("h1"),
25
- h2: make("h2"),
26
- h3: make("h3"),
27
- h4: make("h4"),
28
- hr: make("hr"),
29
- header: make("header"),
30
- input: make("input"),
31
- label: make("label"),
32
- li: make("li"),
33
- main: make("main"),
34
- ol: make("ol"),
35
- p: make("p"),
36
- span: make("span"),
37
- table: make("table"),
38
- tbody: make("tbody"),
39
- td: make("td"),
40
- th: make("th"),
41
- tr: make("tr")
3646
+ extensions.forEach((extension) => ad2.Extensions.register(extension));
3647
+ ad2.ConverterFactory.register(new InlineConverter2(), ["html5"]);
3648
+ return ad2;
3649
+ };
3650
+ function convertInlineCallout(node2) {
3651
+ return `<i class="conum" data-value="${node2.getText()}"></i>`;
3652
+ }
3653
+ var handleDocument = async (document2) => {
3654
+ const doc = prepareDocument(document2);
3655
+ return await processDocument(doc, highlight);
42
3656
  };
43
3657
 
44
- // components/src/asciidoc/Admonition.tsx
45
- import { jsx, jsxs } from "react/jsx-runtime";
46
- var Admonition = ({ node }) => {
47
- const attrs = node.attributes;
48
- let icon;
49
- if (attrs.name === "caution") {
50
- icon = /* @__PURE__ */ jsx(Error12, {});
51
- } else if (attrs.name === "warning") {
52
- icon = /* @__PURE__ */ jsx(Warning12, {});
3658
+ // components/src/asciidoc/index.tsx
3659
+ import { jsx as jsx10 } from "react/jsx-runtime";
3660
+ var MinimalDocument = ({ document: document2 }) => /* @__PURE__ */ jsx10("div", { id: "content", className: "asciidoc-body w-full", children: /* @__PURE__ */ jsx10(Content4, { blocks: document2.blocks }) });
3661
+ var AsciiDocBlocks = {
3662
+ Admonition: Admonition_default,
3663
+ Table: Table_default,
3664
+ Section: Section_default,
3665
+ Mermaid: Mermaid_default,
3666
+ MinimalDocument
3667
+ };
3668
+ var renderWithBreaks = (text) => {
3669
+ return text.split(/(<[^>]*>)/g).map((segment) => {
3670
+ if (segment.startsWith("<") && segment.endsWith(">")) {
3671
+ return segment;
3672
+ }
3673
+ return segment.replace(/(?:^|(?<=\S))\/(?=\S)/g, "/<wbr/>");
3674
+ }).join("");
3675
+ };
3676
+ var QUOTE_TAGS = {
3677
+ "monospaced": ["<code>", "</code>", true],
3678
+ "emphasis": ["<em>", "</em>", true],
3679
+ "strong": ["<strong>", "</strong>", true],
3680
+ "double": ["&#8220;", "&#8221;"],
3681
+ "single": ["&#8216;", "&#8217;"],
3682
+ "mark": ["<mark>", "</mark>", true],
3683
+ "superscript": ["<sup>", "</sup>", true],
3684
+ "subscript": ["<sub>", "</sub>", true],
3685
+ "unquoted": ["<span>", "</span>", true],
3686
+ "asciimath": ["\\$", "\\$"],
3687
+ "latexmath": ["\\(", "\\)"]
3688
+ };
3689
+ var chop = (str) => str.substring(0, str.length - 1);
3690
+ var convertInlineQuoted = (node2) => {
3691
+ const type = node2.getType();
3692
+ const quoteTag = QUOTE_TAGS[type];
3693
+ const [open, close, tag] = quoteTag || ["", ""];
3694
+ let text = node2.getText();
3695
+ if (type === "monospaced") {
3696
+ text = renderWithBreaks(text);
3697
+ }
3698
+ const id26 = node2.getId();
3699
+ const role = node2.getRole();
3700
+ const idAttr = id26 ? `id="${id26}"` : "";
3701
+ const classAttr = role ? `class="${role}"` : "";
3702
+ const attrs2 = `${idAttr} ${classAttr}`;
3703
+ if (id26 || role) {
3704
+ if (tag) {
3705
+ return `${chop(open)} ${attrs2}>${text}${close}`;
3706
+ } else {
3707
+ return `<span ${attrs2}>${open}${text}${close}</span>`;
3708
+ }
53
3709
  } else {
54
- icon = /* @__PURE__ */ jsx(Error12, { className: "rotate-180" });
3710
+ return `${open}${text}${close}`;
55
3711
  }
56
- return /* @__PURE__ */ jsxs("div", { className: `admonitionblock ${attrs.name}`, children: [
57
- /* @__PURE__ */ jsx("div", { className: "admonition-icon", children: icon }),
58
- /* @__PURE__ */ jsxs("div", { className: "admonition-content content", children: [
59
- /* @__PURE__ */ jsx(Title, { text: node.title }),
60
- /* @__PURE__ */ jsx("div", { children: titleCase(attrs.name.toString()) }),
61
- /* @__PURE__ */ jsxs("div", { children: [
62
- /* @__PURE__ */ jsx(Title, { text: node.title }),
63
- node.content && parse(node.content),
64
- /* @__PURE__ */ jsx(Content, { blocks: node.blocks })
65
- ] })
66
- ] })
67
- ] });
68
3712
  };
69
- var Error12 = ({ className }) => /* @__PURE__ */ jsx(
70
- "svg",
71
- {
72
- width: "12",
73
- height: "12",
74
- viewBox: "0 0 12 12",
75
- xmlns: "http://www.w3.org/2000/svg",
76
- className,
77
- children: /* @__PURE__ */ jsx(
78
- "path",
79
- {
80
- fillRule: "evenodd",
81
- clipRule: "evenodd",
82
- d: "M6 12A6 6 0 1 0 6 0a6 6 0 0 0 0 12Zm.083-9c.368 0 .667.299.667.667v2.666A.667.667 0 0 1 6.083 7h-.166a.667.667 0 0 1-.667-.667V3.667c0-.368.299-.667.667-.667h.166Zm0 5c.368 0 .667.299.667.667v.166a.667.667 0 0 1-.667.667h-.166a.667.667 0 0 1-.667-.667v-.166c0-.368.299-.667.667-.667h.166Z",
83
- fill: "currentColor"
84
- }
85
- )
3713
+ function convertInlineCallout2(node2) {
3714
+ return `<i class="conum" data-value="${node2.getText()}"></i>`;
3715
+ }
3716
+ var ad = asciidoctor2();
3717
+ var InlineConverter = class {
3718
+ baseConverter;
3719
+ constructor() {
3720
+ this.baseConverter = new ad.Html5Converter();
86
3721
  }
87
- );
88
- var Warning12 = ({ className }) => /* @__PURE__ */ jsx(
89
- "svg",
90
- {
91
- width: "12",
92
- height: "12",
93
- viewBox: "0 0 12 12",
94
- xmlns: "http://www.w3.org/2000/svg",
95
- className,
96
- children: /* @__PURE__ */ jsx(
97
- "path",
98
- {
99
- fillRule: "evenodd",
100
- clipRule: "evenodd",
101
- d: "M6 12A6 6 0 1 0 6 0a6 6 0 0 0 0 12Zm.083-9c.368 0 .667.299.667.667v2.666A.667.667 0 0 1 6.083 7h-.166a.667.667 0 0 1-.667-.667V3.667c0-.368.299-.667.667-.667h.166Zm0 5c.368 0 .667.299.667.667v.166a.667.667 0 0 1-.667.667h-.166a.667.667 0 0 1-.667-.667v-.166c0-.368.299-.667.667-.667h.166Z",
102
- fill: "currentColor"
103
- }
104
- )
3722
+ convert(node2, transform) {
3723
+ switch (node2.getNodeName()) {
3724
+ case "inline_quoted":
3725
+ return convertInlineQuoted(node2);
3726
+ case "inline_callout":
3727
+ return convertInlineCallout2(node2);
3728
+ default:
3729
+ break;
3730
+ }
3731
+ return this.baseConverter.convert(node2, transform);
105
3732
  }
106
- );
107
- var Admonition_default = Admonition;
108
-
109
- // components/src/asciidoc/Table.tsx
110
- import { Table as InnerTable } from "@oxide/react-asciidoc";
111
- import { jsx as jsx2 } from "react/jsx-runtime";
112
- var Table = ({ node }) => /* @__PURE__ */ jsx2("div", { className: "table-wrapper", children: /* @__PURE__ */ jsx2(InnerTable, { node }) });
113
- var Table_default = Table;
114
-
115
- // components/src/asciidoc/index.ts
116
- var AsciiDocBlocks = {
117
- Admonition: Admonition_default,
118
- Table: Table_default
119
3733
  };
120
3734
 
121
3735
  // components/src/ui/badge/Badge.tsx
122
- import cn2 from "classnames";
123
- import { jsx as jsx3 } from "react/jsx-runtime";
3736
+ import cn4 from "classnames";
3737
+ import { jsx as jsx11 } from "react/jsx-runtime";
124
3738
  var badgeColors = {
125
3739
  default: {
126
3740
  default: `ring-1 ring-inset bg-accent-secondary text-accent ring-[rgba(var(--base-green-800-rgb),0.15)]`,
@@ -145,25 +3759,25 @@ var Badge = ({
145
3759
  color = "default",
146
3760
  variant = "default"
147
3761
  }) => {
148
- return /* @__PURE__ */ jsx3(
3762
+ return /* @__PURE__ */ jsx11(
149
3763
  "span",
150
3764
  {
151
- className: cn2(
3765
+ className: cn4(
152
3766
  "ox-badge",
153
3767
  `variant-${variant}`,
154
3768
  "inline-flex h-4 items-center whitespace-nowrap rounded-sm px-[3px] py-[1px] uppercase text-mono-sm",
155
3769
  badgeColors[variant][color],
156
3770
  className
157
3771
  ),
158
- children: /* @__PURE__ */ jsx3("span", { children })
3772
+ children: /* @__PURE__ */ jsx11("span", { children })
159
3773
  }
160
3774
  );
161
3775
  };
162
3776
 
163
3777
  // components/src/ui/button/Button.tsx
164
- import cn3 from "classnames";
3778
+ import cn5 from "classnames";
165
3779
  import { forwardRef } from "react";
166
- import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
3780
+ import { jsx as jsx12, jsxs as jsxs9 } from "react/jsx-runtime";
167
3781
  var buttonSizes = ["sm", "icon", "base"];
168
3782
  var variants = ["primary", "secondary", "ghost", "danger"];
169
3783
  var sizeStyle = {
@@ -176,7 +3790,7 @@ var buttonStyle = ({
176
3790
  size: size2 = "base",
177
3791
  variant = "primary"
178
3792
  } = {}) => {
179
- return cn3(
3793
+ return cn5(
180
3794
  "ox-button inline-flex items-center justify-center rounded align-top elevation-1 disabled:cursor-not-allowed",
181
3795
  `btn-${variant}`,
182
3796
  sizeStyle[size2],
@@ -203,10 +3817,10 @@ var Button = forwardRef(
203
3817
  ...rest
204
3818
  }, ref) => {
205
3819
  const isDisabled = disabled || loading;
206
- return /* @__PURE__ */ jsxs2(
3820
+ return /* @__PURE__ */ jsxs9(
207
3821
  "button",
208
3822
  {
209
- className: cn3(buttonStyle({ size: size2, variant }), className, {
3823
+ className: cn5(buttonStyle({ size: size2, variant }), className, {
210
3824
  "visually-disabled": isDisabled
211
3825
  }),
212
3826
  ref,
@@ -216,8 +3830,8 @@ var Button = forwardRef(
216
3830
  "aria-disabled": isDisabled,
217
3831
  ...rest,
218
3832
  children: [
219
- loading && /* @__PURE__ */ jsx4(Spinner, { className: "absolute", variant }),
220
- /* @__PURE__ */ jsx4("span", { className: cn3("flex items-center", innerClassName, { invisible: loading }), children })
3833
+ loading && /* @__PURE__ */ jsx12(Spinner, { className: "absolute", variant }),
3834
+ /* @__PURE__ */ jsx12("span", { className: cn5("flex items-center", innerClassName, { invisible: loading }), children })
221
3835
  ]
222
3836
  }
223
3837
  );
@@ -225,9 +3839,9 @@ var Button = forwardRef(
225
3839
  );
226
3840
 
227
3841
  // components/src/ui/spinner/Spinner.tsx
228
- import cn4 from "classnames";
229
- import { useEffect, useRef, useState } from "react";
230
- import { Fragment, jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
3842
+ import cn6 from "classnames";
3843
+ import { useEffect as useEffect2, useRef as useRef2, useState as useState3 } from "react";
3844
+ import { Fragment as Fragment4, jsx as jsx13, jsxs as jsxs10 } from "react/jsx-runtime";
231
3845
  var spinnerSizes = ["base", "lg"];
232
3846
  var spinnerVariants = ["primary", "secondary", "ghost", "danger"];
233
3847
  var Spinner = ({
@@ -239,7 +3853,7 @@ var Spinner = ({
239
3853
  const center = size2 === "lg" ? 18 : 6;
240
3854
  const radius = size2 === "lg" ? 16 : 5;
241
3855
  const strokeWidth = size2 === "lg" ? 3 : 2;
242
- return /* @__PURE__ */ jsxs3(
3856
+ return /* @__PURE__ */ jsxs10(
243
3857
  "svg",
244
3858
  {
245
3859
  width: frameSize,
@@ -248,9 +3862,9 @@ var Spinner = ({
248
3862
  fill: "none",
249
3863
  xmlns: "http://www.w3.org/2000/svg",
250
3864
  "aria-labelledby": "Spinner",
251
- className: cn4("spinner", `spinner-${variant}`, `spinner-${size2}`, className),
3865
+ className: cn6("spinner", `spinner-${variant}`, `spinner-${size2}`, className),
252
3866
  children: [
253
- /* @__PURE__ */ jsx5(
3867
+ /* @__PURE__ */ jsx13(
254
3868
  "circle",
255
3869
  {
256
3870
  fill: "none",
@@ -263,7 +3877,7 @@ var Spinner = ({
263
3877
  strokeOpacity: 0.2
264
3878
  }
265
3879
  ),
266
- /* @__PURE__ */ jsx5(
3880
+ /* @__PURE__ */ jsx13(
267
3881
  "circle",
268
3882
  {
269
3883
  className: "path",
@@ -281,10 +3895,10 @@ var Spinner = ({
281
3895
  );
282
3896
  };
283
3897
  var SpinnerLoader = ({ isLoading, children = null, minTime = 500 }) => {
284
- const [isVisible, setIsVisible] = useState(isLoading);
285
- const hideTimeout = useRef(null);
286
- const loadingStartTime = useRef(0);
287
- useEffect(() => {
3898
+ const [isVisible, setIsVisible] = useState3(isLoading);
3899
+ const hideTimeout = useRef2(null);
3900
+ const loadingStartTime = useRef2(0);
3901
+ useEffect2(() => {
288
3902
  if (isLoading) {
289
3903
  setIsVisible(true);
290
3904
  loadingStartTime.current = Date.now();
@@ -304,88 +3918,24 @@ var SpinnerLoader = ({ isLoading, children = null, minTime = 500 }) => {
304
3918
  clearTimeout(hideTimeout.current);
305
3919
  };
306
3920
  }, [isLoading, minTime]);
307
- return isVisible ? /* @__PURE__ */ jsx5(Spinner, {}) : /* @__PURE__ */ jsx5(Fragment, { children });
3921
+ return isVisible ? /* @__PURE__ */ jsx13(Spinner, {}) : /* @__PURE__ */ jsx13(Fragment4, { children });
308
3922
  };
309
3923
 
310
3924
  // components/src/ui/tabs/Tabs.tsx
311
- import { Content as Content2, List, Root, Trigger } from "@radix-ui/react-tabs";
312
- import cn5 from "classnames";
313
- import { jsx as jsx6 } from "react/jsx-runtime";
3925
+ import { Content as Content5, List, Root as Root2, Trigger as Trigger2 } from "@radix-ui/react-tabs";
3926
+ import cn7 from "classnames";
3927
+ import { jsx as jsx14 } from "react/jsx-runtime";
314
3928
  var Tabs = {
315
- Root: ({ className, ...props }) => /* @__PURE__ */ jsx6(Root, { ...props, className: cn5("ox-tabs", className) }),
316
- Trigger: ({ children, className, ...props }) => /* @__PURE__ */ jsx6(Trigger, { ...props, className: cn5("ox-tab", className), children: /* @__PURE__ */ jsx6("div", { children }) }),
317
- List: ({ className, ...props }) => /* @__PURE__ */ jsx6(List, { ...props, className: cn5("ox-tabs-list", className) }),
318
- Content: ({ className, ...props }) => /* @__PURE__ */ jsx6(Content2, { ...props, className: cn5("ox-tabs-panel", className) })
3929
+ Root: ({ className, ...props }) => /* @__PURE__ */ jsx14(Root2, { ...props, className: cn7("ox-tabs", className) }),
3930
+ Trigger: ({ children, className, ...props }) => /* @__PURE__ */ jsx14(Trigger2, { ...props, className: cn7("ox-tab", className), children: /* @__PURE__ */ jsx14("div", { children }) }),
3931
+ List: ({ className, ...props }) => /* @__PURE__ */ jsx14(List, { ...props, className: cn7("ox-tabs-list", className) }),
3932
+ Content: ({ className, ...props }) => /* @__PURE__ */ jsx14(Content5, { ...props, className: cn7("ox-tabs-panel", className) })
319
3933
  };
320
3934
 
321
- // icons/react/Checkmark12Icon.tsx
322
- import { jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
323
- var Checkmark12Icon = ({
324
- title,
325
- titleId,
326
- ...props
327
- }) => /* @__PURE__ */ jsxs4(
328
- "svg",
329
- {
330
- width: 12,
331
- height: 12,
332
- viewBox: "0 0 12 12",
333
- xmlns: "http://www.w3.org/2000/svg",
334
- role: "img",
335
- "aria-labelledby": titleId,
336
- ...props,
337
- children: [
338
- title ? /* @__PURE__ */ jsx7("title", { id: titleId, children: title }) : null,
339
- /* @__PURE__ */ jsx7(
340
- "path",
341
- {
342
- fillRule: "evenodd",
343
- clipRule: "evenodd",
344
- d: "M10.492 2.651c.28.242.31.665.067.944L5.447 9.463a.667.667 0 0 1-.974.035L1.475 6.516a.667.667 0 0 1 0-.946l.237-.235a.667.667 0 0 1 .94 0l2.24 2.226L9.3 2.501a.667.667 0 0 1 .938-.068l.253.218Z",
345
- fill: "currentColor"
346
- }
347
- )
348
- ]
349
- }
350
- );
351
- var Checkmark12Icon_default = Checkmark12Icon;
352
-
353
- // icons/react/SelectArrows6Icon.tsx
354
- import { jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
355
- var SelectArrows6Icon = ({
356
- title,
357
- titleId,
358
- ...props
359
- }) => /* @__PURE__ */ jsxs5(
360
- "svg",
361
- {
362
- width: 6,
363
- height: 14,
364
- viewBox: "0 0 6 14",
365
- xmlns: "http://www.w3.org/2000/svg",
366
- role: "img",
367
- "aria-labelledby": titleId,
368
- ...props,
369
- children: [
370
- title ? /* @__PURE__ */ jsx8("title", { id: titleId, children: title }) : null,
371
- /* @__PURE__ */ jsx8(
372
- "path",
373
- {
374
- fillRule: "evenodd",
375
- clipRule: "evenodd",
376
- d: "M3.322.536a.375.375 0 0 0-.644 0L.341 4.432C.19 4.682.37 5 .662 5h4.676a.375.375 0 0 0 .321-.568L3.322.536Zm-.644 12.928a.375.375 0 0 0 .644 0l2.337-3.896A.375.375 0 0 0 5.338 9H.662a.375.375 0 0 0-.321.568l2.337 3.896Z",
377
- fill: "currentColor"
378
- }
379
- )
380
- ]
381
- }
382
- );
383
- var SelectArrows6Icon_default = SelectArrows6Icon;
384
-
385
3935
  // components/src/ui/checkbox/Checkbox.tsx
386
- import cn6 from "classnames";
387
- import { jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
388
- var Check = () => /* @__PURE__ */ jsx9(Checkmark12Icon_default, { className: "pointer-events-none absolute left-0.5 top-0.5 h-3 w-3 fill-current text-accent" });
3936
+ import cn8 from "classnames";
3937
+ import { jsx as jsx15, jsxs as jsxs11 } from "react/jsx-runtime";
3938
+ var Check = () => /* @__PURE__ */ jsx15(Checkmark12Icon_default, { className: "pointer-events-none absolute left-0.5 top-0.5 h-3 w-3 fill-current text-accent" });
389
3939
  var Indeterminate = classed.div`absolute w-2 h-0.5 left-1 top-[7px] bg-accent pointer-events-none`;
390
3940
  var inputStyle = `
391
3941
  appearance-none border border-default bg-default h-4 w-4 rounded-sm absolute left-0 outline-none
@@ -399,28 +3949,28 @@ var Checkbox = ({
399
3949
  children,
400
3950
  className,
401
3951
  ...inputProps
402
- }) => /* @__PURE__ */ jsxs6("label", { className: "inline-flex items-center", children: [
403
- /* @__PURE__ */ jsxs6("span", { className: "relative h-4 w-4", children: [
404
- /* @__PURE__ */ jsx9(
3952
+ }) => /* @__PURE__ */ jsxs11("label", { className: "inline-flex items-center", children: [
3953
+ /* @__PURE__ */ jsxs11("span", { className: "relative h-4 w-4", children: [
3954
+ /* @__PURE__ */ jsx15(
405
3955
  "input",
406
3956
  {
407
- className: cn6(inputStyle, className),
3957
+ className: cn8(inputStyle, className),
408
3958
  type: "checkbox",
409
3959
  ref: (el) => el && (el.indeterminate = !!indeterminate),
410
3960
  ...inputProps
411
3961
  }
412
3962
  ),
413
- inputProps.checked && !indeterminate && /* @__PURE__ */ jsx9(Check, {}),
414
- indeterminate && /* @__PURE__ */ jsx9(Indeterminate, {})
3963
+ inputProps.checked && !indeterminate && /* @__PURE__ */ jsx15(Check, {}),
3964
+ indeterminate && /* @__PURE__ */ jsx15(Indeterminate, {})
415
3965
  ] }),
416
- children && /* @__PURE__ */ jsx9("span", { className: "ml-2.5 text-sans-md text-secondary", children })
3966
+ children && /* @__PURE__ */ jsx15("span", { className: "ml-2.5 text-sans-md text-secondary", children })
417
3967
  ] });
418
3968
 
419
3969
  // components/src/ui/listbox/Listbox.tsx
420
3970
  import { FloatingPortal, flip, offset, size, useFloating } from "@floating-ui/react";
421
3971
  import { Listbox as Select } from "@headlessui/react";
422
- import cn7 from "classnames";
423
- import { Fragment as Fragment2, jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
3972
+ import cn9 from "classnames";
3973
+ import { Fragment as Fragment5, jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
424
3974
  var Listbox = ({
425
3975
  name,
426
3976
  selected,
@@ -449,19 +3999,19 @@ var Listbox = ({
449
3999
  const selectedItem = selected && items.find((i) => i.value === selected);
450
4000
  const noItems = !isLoading && items.length === 0;
451
4001
  const isDisabled = disabled || noItems;
452
- return /* @__PURE__ */ jsx10("div", { className: cn7("relative", className), children: /* @__PURE__ */ jsx10(
4002
+ return /* @__PURE__ */ jsx16("div", { className: cn9("relative", className), children: /* @__PURE__ */ jsx16(
453
4003
  Select,
454
4004
  {
455
4005
  value: selected,
456
4006
  onChange: (val) => val !== null && onChange(val),
457
4007
  disabled: isDisabled || isLoading,
458
- children: ({ open }) => /* @__PURE__ */ jsxs7(Fragment2, { children: [
459
- /* @__PURE__ */ jsxs7(
4008
+ children: ({ open }) => /* @__PURE__ */ jsxs12(Fragment5, { children: [
4009
+ /* @__PURE__ */ jsxs12(
460
4010
  Select.Button,
461
4011
  {
462
4012
  name,
463
4013
  ref: refs.setReference,
464
- className: cn7(
4014
+ className: cn9(
465
4015
  `flex h-10 w-full items-center justify-between
466
4016
  rounded border text-sans-md`,
467
4017
  hasError ? "focus-error border-error-secondary hover:border-error" : "border-default hover:border-hover",
@@ -472,37 +4022,37 @@ var Listbox = ({
472
4022
  ),
473
4023
  ...props,
474
4024
  children: [
475
- /* @__PURE__ */ jsx10("div", { className: "w-full px-3 text-left", children: selectedItem ? (
4025
+ /* @__PURE__ */ jsx16("div", { className: "w-full px-3 text-left", children: selectedItem ? (
476
4026
  // labelString is one line, which is what we need when label is a ReactNode
477
4027
  selectedItem.labelString || selectedItem.label
478
- ) : /* @__PURE__ */ jsx10("span", { className: "text-quaternary", children: noItems ? "No items" : placeholder }) }),
479
- !isDisabled && /* @__PURE__ */ jsx10(SpinnerLoader, { isLoading }),
480
- /* @__PURE__ */ jsx10(
4028
+ ) : /* @__PURE__ */ jsx16("span", { className: "text-quaternary", children: noItems ? "No items" : placeholder }) }),
4029
+ !isDisabled && /* @__PURE__ */ jsx16(SpinnerLoader, { isLoading }),
4030
+ /* @__PURE__ */ jsx16(
481
4031
  "div",
482
4032
  {
483
4033
  className: "ml-3 flex h-[calc(100%-12px)] items-center border-l px-3 border-secondary",
484
4034
  "aria-hidden": true,
485
- children: /* @__PURE__ */ jsx10(SelectArrows6Icon_default, { className: "h-[14px] w-2 text-tertiary" })
4035
+ children: /* @__PURE__ */ jsx16(SelectArrows6Icon_default, { className: "h-[14px] w-2 text-tertiary" })
486
4036
  }
487
4037
  )
488
4038
  ]
489
4039
  }
490
4040
  ),
491
- /* @__PURE__ */ jsx10(FloatingPortal, { children: /* @__PURE__ */ jsx10(
4041
+ /* @__PURE__ */ jsx16(FloatingPortal, { children: /* @__PURE__ */ jsx16(
492
4042
  Select.Options,
493
4043
  {
494
4044
  ref: refs.setFloating,
495
4045
  style: floatingStyles,
496
4046
  className: "ox-menu pointer-events-auto z-50 overflow-y-auto !outline-none",
497
- children: items.map((item) => /* @__PURE__ */ jsx10(
4047
+ children: items.map((item) => /* @__PURE__ */ jsx16(
498
4048
  Select.Option,
499
4049
  {
500
4050
  value: item.value,
501
4051
  className: "relative border-b border-secondary last:border-0",
502
- children: ({ active, selected: selected2 }) => /* @__PURE__ */ jsx10(
4052
+ children: ({ active, selected: selected2 }) => /* @__PURE__ */ jsx16(
503
4053
  "div",
504
4054
  {
505
- className: cn7(
4055
+ className: cn9(
506
4056
  "ox-menu-item text-secondary",
507
4057
  selected2 && "is-selected",
508
4058
  active && "is-highlighted"
@@ -524,15 +4074,33 @@ export {
524
4074
  Badge,
525
4075
  Button,
526
4076
  Checkbox,
4077
+ DesktopOutline,
4078
+ InlineConverter,
527
4079
  Listbox,
4080
+ SmallScreenOutline,
528
4081
  Spinner,
529
4082
  SpinnerLoader,
530
4083
  Tabs,
4084
+ attrs,
531
4085
  badgeColors,
532
4086
  buttonSizes,
533
4087
  buttonStyle,
4088
+ handleDocument,
4089
+ highlight,
4090
+ loadAsciidoctor,
4091
+ renderWithBreaks,
534
4092
  spinnerSizes,
535
4093
  spinnerVariants,
4094
+ useActiveSectionTracking,
4095
+ useIntersectionObserver,
536
4096
  variants
537
4097
  };
4098
+ /*! Bundled license information:
4099
+
4100
+ mermaid/dist/mermaid.core.mjs:
4101
+ (*! Check if previously processed *)
4102
+ (*!
4103
+ * Wait for document loaded before starting the execution
4104
+ *)
4105
+ */
538
4106
  //# sourceMappingURL=index.js.map