@oxide/design-system 1.8.0--canary.7d8d904.0 → 1.8.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.
@@ -1,126 +1,2183 @@
1
+ // components/src/asciidoc/index.tsx
2
+ import asciidoctor2 from "@asciidoctor/core";
3
+ import { Content as Content4 } from "@oxide/react-asciidoc";
4
+
1
5
  // components/src/asciidoc/Admonition.tsx
2
6
  import { Content, Title, parse } from "@oxide/react-asciidoc";
3
7
 
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
- );
8
+ // components/src/utils.ts
9
+ import cn from "classnames";
10
+ import { createElement } from "react";
11
+ var titleCase = (text) => {
12
+ return text.replace(
13
+ /\w\S*/g,
14
+ (text2) => text2.charAt(0).toUpperCase() + text2.substring(1).toLowerCase()
15
+ );
16
+ };
17
+ var make = (tag) => (
18
+ // only one argument here means string interpolations are not allowed
19
+ (strings) => {
20
+ const Comp = ({ className, children, ...rest }) => createElement(tag, { className: cn(strings[0], className), ...rest }, children);
21
+ Comp.displayName = `classed.${tag}`;
22
+ return Comp;
23
+ }
24
+ );
25
+ var classed = {
26
+ button: make("button"),
27
+ div: make("div"),
28
+ h1: make("h1"),
29
+ h2: make("h2"),
30
+ h3: make("h3"),
31
+ h4: make("h4"),
32
+ hr: make("hr"),
33
+ header: make("header"),
34
+ input: make("input"),
35
+ label: make("label"),
36
+ li: make("li"),
37
+ main: make("main"),
38
+ ol: make("ol"),
39
+ p: make("p"),
40
+ span: make("span"),
41
+ table: make("table"),
42
+ tbody: make("tbody"),
43
+ td: make("td"),
44
+ th: make("th"),
45
+ tr: make("tr")
46
+ };
47
+
48
+ // components/src/asciidoc/Admonition.tsx
49
+ import { jsx, jsxs } from "react/jsx-runtime";
50
+ var Admonition = ({ node }) => {
51
+ const attrs2 = node.attributes;
52
+ let icon;
53
+ if (attrs2.name === "caution") {
54
+ icon = /* @__PURE__ */ jsx(Error12, {});
55
+ } else if (attrs2.name === "warning") {
56
+ icon = /* @__PURE__ */ jsx(Warning12, {});
57
+ } else {
58
+ icon = /* @__PURE__ */ jsx(Error12, { className: "rotate-180" });
59
+ }
60
+ return /* @__PURE__ */ jsxs("div", { className: `admonitionblock ${attrs2.name}`, children: [
61
+ /* @__PURE__ */ jsx("div", { className: "admonition-icon", children: icon }),
62
+ /* @__PURE__ */ jsxs("div", { className: "admonition-content content", children: [
63
+ /* @__PURE__ */ jsx(Title, { text: node.title }),
64
+ /* @__PURE__ */ jsx("div", { children: titleCase(attrs2.name.toString()) }),
65
+ /* @__PURE__ */ jsxs("div", { children: [
66
+ /* @__PURE__ */ jsx(Title, { text: node.title }),
67
+ node.content && parse(node.content),
68
+ /* @__PURE__ */ jsx(Content, { blocks: node.blocks })
69
+ ] })
70
+ ] })
71
+ ] });
72
+ };
73
+ var Error12 = ({ className }) => /* @__PURE__ */ jsx(
74
+ "svg",
75
+ {
76
+ width: "12",
77
+ height: "12",
78
+ viewBox: "0 0 12 12",
79
+ xmlns: "http://www.w3.org/2000/svg",
80
+ className,
81
+ children: /* @__PURE__ */ jsx(
82
+ "path",
83
+ {
84
+ fillRule: "evenodd",
85
+ clipRule: "evenodd",
86
+ 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",
87
+ fill: "currentColor"
88
+ }
89
+ )
90
+ }
91
+ );
92
+ var Warning12 = ({ className }) => /* @__PURE__ */ jsx(
93
+ "svg",
94
+ {
95
+ width: "12",
96
+ height: "12",
97
+ viewBox: "0 0 12 12",
98
+ xmlns: "http://www.w3.org/2000/svg",
99
+ className,
100
+ children: /* @__PURE__ */ jsx(
101
+ "path",
102
+ {
103
+ fillRule: "evenodd",
104
+ clipRule: "evenodd",
105
+ 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",
106
+ fill: "currentColor"
107
+ }
108
+ )
109
+ }
110
+ );
111
+ var Admonition_default = Admonition;
112
+
113
+ // icons/react/Link16Icon.tsx
114
+ import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
115
+ var Link16Icon = ({ title, titleId, ...props }) => /* @__PURE__ */ jsxs2(
116
+ "svg",
117
+ {
118
+ width: 16,
119
+ height: 16,
120
+ viewBox: "0 0 16 16",
121
+ xmlns: "http://www.w3.org/2000/svg",
122
+ role: "img",
123
+ "aria-labelledby": titleId,
124
+ ...props,
125
+ children: [
126
+ title ? /* @__PURE__ */ jsx2("title", { id: titleId, children: title }) : null,
127
+ /* @__PURE__ */ jsxs2("g", { fill: "currentColor", children: [
128
+ /* @__PURE__ */ jsx2("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" }),
129
+ /* @__PURE__ */ jsx2("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" })
130
+ ] })
131
+ ]
132
+ }
133
+ );
134
+ var Link16Icon_default = Link16Icon;
135
+
136
+ // icons/react/Checkmark12Icon.tsx
137
+ import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
138
+ var Checkmark12Icon = ({
139
+ title,
140
+ titleId,
141
+ ...props
142
+ }) => /* @__PURE__ */ jsxs3(
143
+ "svg",
144
+ {
145
+ width: 12,
146
+ height: 12,
147
+ viewBox: "0 0 12 12",
148
+ xmlns: "http://www.w3.org/2000/svg",
149
+ role: "img",
150
+ "aria-labelledby": titleId,
151
+ ...props,
152
+ children: [
153
+ title ? /* @__PURE__ */ jsx3("title", { id: titleId, children: title }) : null,
154
+ /* @__PURE__ */ jsx3(
155
+ "path",
156
+ {
157
+ fillRule: "evenodd",
158
+ clipRule: "evenodd",
159
+ 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",
160
+ fill: "currentColor"
161
+ }
162
+ )
163
+ ]
164
+ }
165
+ );
166
+ var Checkmark12Icon_default = Checkmark12Icon;
167
+
168
+ // icons/react/DirectionRightIcon.tsx
169
+ import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
170
+ var DirectionRightIcon = ({
171
+ title,
172
+ titleId,
173
+ ...props
174
+ }) => /* @__PURE__ */ jsxs4(
175
+ "svg",
176
+ {
177
+ width: 12,
178
+ height: 12,
179
+ viewBox: "0 0 12 12",
180
+ xmlns: "http://www.w3.org/2000/svg",
181
+ role: "img",
182
+ "aria-labelledby": titleId,
183
+ ...props,
184
+ children: [
185
+ title ? /* @__PURE__ */ jsx4("title", { id: titleId, children: title }) : null,
186
+ /* @__PURE__ */ jsx4(
187
+ "path",
188
+ {
189
+ 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",
190
+ fill: "currentColor"
191
+ }
192
+ )
193
+ ]
194
+ }
195
+ );
196
+ var DirectionRightIcon_default = DirectionRightIcon;
197
+
198
+ // icons/react/SelectArrows6Icon.tsx
199
+ import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
200
+ var SelectArrows6Icon = ({
201
+ title,
202
+ titleId,
203
+ ...props
204
+ }) => /* @__PURE__ */ jsxs5(
205
+ "svg",
206
+ {
207
+ width: 6,
208
+ height: 14,
209
+ viewBox: "0 0 6 14",
210
+ xmlns: "http://www.w3.org/2000/svg",
211
+ role: "img",
212
+ "aria-labelledby": titleId,
213
+ ...props,
214
+ children: [
215
+ title ? /* @__PURE__ */ jsx5("title", { id: titleId, children: title }) : null,
216
+ /* @__PURE__ */ jsx5(
217
+ "path",
218
+ {
219
+ fillRule: "evenodd",
220
+ clipRule: "evenodd",
221
+ 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",
222
+ fill: "currentColor"
223
+ }
224
+ )
225
+ ]
226
+ }
227
+ );
228
+ var SelectArrows6Icon_default = SelectArrows6Icon;
229
+
230
+ // components/src/asciidoc/Section.tsx
231
+ import { Content as Content2, parse as parse2 } from "@oxide/react-asciidoc";
232
+ import cn2 from "classnames";
233
+ import { createElement as createElement2 } from "react";
234
+ import { Fragment, jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
235
+ var stripAnchors = (str) => str.replace(/<a[^>]*>(.*?)<\/a>/gi, "$1");
236
+ var Section = ({ node }) => {
237
+ const level = node.level;
238
+ let title = "";
239
+ let sectNum = node.num;
240
+ sectNum = sectNum === "." ? "" : sectNum;
241
+ title = /* @__PURE__ */ jsxs6(Fragment, { children: [
242
+ /* @__PURE__ */ jsx6("span", { className: "anchor", id: node.id || "", "aria-hidden": "true" }),
243
+ /* @__PURE__ */ jsxs6("a", { className: "link group", href: `#${node.id}`, children: [
244
+ parse2(stripAnchors(node.title)),
245
+ /* @__PURE__ */ jsx6(Link16Icon_default, { className: "ml-2 hidden text-accent-secondary group-hover:inline-block" })
246
+ ] })
247
+ ] });
248
+ if (level === 0) {
249
+ return /* @__PURE__ */ jsxs6(Fragment, { children: [
250
+ /* @__PURE__ */ jsx6("h1", { className: cn2("sect0", node.role), "data-sectnum": sectNum, children: title }),
251
+ /* @__PURE__ */ jsx6(Content2, { blocks: node.blocks })
252
+ ] });
253
+ } else {
254
+ return /* @__PURE__ */ jsxs6("div", { className: cn2(`sect${level}`, node.role), children: [
255
+ createElement2(`h${level + 1}`, { "data-sectnum": sectNum }, title),
256
+ /* @__PURE__ */ jsx6("div", { className: "sectionbody", children: /* @__PURE__ */ jsx6(Content2, { blocks: node.blocks }) })
257
+ ] });
258
+ }
259
+ };
260
+ var Section_default = Section;
261
+
262
+ // components/src/asciidoc/Table.tsx
263
+ import { Table as InnerTable } from "@oxide/react-asciidoc";
264
+ import { jsx as jsx7 } from "react/jsx-runtime";
265
+ var Table = ({ node }) => /* @__PURE__ */ jsx7("div", { className: "table-wrapper", children: /* @__PURE__ */ jsx7(InnerTable, { node }) });
266
+ var Table_default = Table;
267
+
268
+ // components/src/asciidoc/TableOfContents.tsx
269
+ import * as Accordion from "@radix-ui/react-accordion";
270
+ import { Link } from "@remix-run/react";
271
+ import cn3 from "classnames";
272
+ import { Fragment as Fragment2, useCallback, useEffect, useMemo, useRef, useState } from "react";
273
+ import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
274
+ function useIntersectionObserver(elements, callback, options) {
275
+ const [observer, setObserver] = useState(null);
276
+ useEffect(() => {
277
+ const observer2 = new IntersectionObserver(callback, options);
278
+ setObserver(observer2);
279
+ return () => {
280
+ observer2.disconnect();
281
+ };
282
+ }, [callback, options]);
283
+ useEffect(() => {
284
+ if (observer) {
285
+ for (const element of elements) {
286
+ observer.observe(element);
287
+ }
288
+ }
289
+ return () => {
290
+ if (observer) {
291
+ for (const element of elements) {
292
+ observer.unobserve(element);
293
+ }
294
+ }
295
+ };
296
+ }, [elements, observer]);
297
+ return observer;
298
+ }
299
+ var THRESHOLD = [...Array(2e3).keys()].map((n) => n / 2e3);
300
+ function isTopLevelSection(element) {
301
+ return element.classList.contains("sect1");
302
+ }
303
+ function findParentSection(element) {
304
+ const sect2Wrapper = element.closest(".sect2");
305
+ return sect2Wrapper ? sect2Wrapper : element.closest(".sect1");
306
+ }
307
+ function newSection(node, element, wrapper, parent) {
308
+ return {
309
+ node,
310
+ element,
311
+ wrapper,
312
+ parent,
313
+ children: []
314
+ };
315
+ }
316
+ function buildSectionTree(elements) {
317
+ const sections = [];
318
+ let parent = null;
319
+ for (let i = 0; i < elements.length; i++) {
320
+ const element = elements[i];
321
+ const parentWrapper = findParentSection(element);
322
+ if (parentWrapper) {
323
+ if (parentWrapper && isTopLevelSection(parentWrapper)) {
324
+ const section = newSection(i, element, parentWrapper, null);
325
+ sections.push(section);
326
+ parent = section;
327
+ } else {
328
+ if (parent === null) {
329
+ return [];
330
+ } else {
331
+ const section = newSection(i, element, parentWrapper, parent.node);
332
+ parent.children.push(i);
333
+ sections.push(section);
334
+ }
335
+ }
336
+ } else {
337
+ return [];
338
+ }
339
+ }
340
+ return sections;
341
+ }
342
+ function maxIndex(nums) {
343
+ return nums.reduce((maxIndex2, current, currentIndex) => {
344
+ const currentMax = maxIndex2 !== void 0 ? nums[maxIndex2] : 0;
345
+ return current > currentMax ? currentIndex : maxIndex2;
346
+ }, void 0);
347
+ }
348
+ function useActiveSectionTracking(initialSections, onSectionChange, debug = false) {
349
+ const [sectionWrappers, setSectionWrappers] = useState(
350
+ buildSectionTree(initialSections)
351
+ );
352
+ const sectionMeasurements = useRef([]);
353
+ const setSections = useCallback(
354
+ (sections) => {
355
+ setSectionWrappers(buildSectionTree(sections));
356
+ sectionMeasurements.current = [];
357
+ },
358
+ [setSectionWrappers]
359
+ );
360
+ const wrapperActivator = useCallback(
361
+ (entries) => {
362
+ for (const entry of entries) {
363
+ const index = sectionWrappers.findIndex((node) => node.wrapper === entry.target);
364
+ const covered = entry.intersectionRect.height / (entry.rootBounds?.height || 1);
365
+ sectionMeasurements.current[index] = covered;
366
+ }
367
+ const ownedSectionSizes = sectionWrappers.map((section) => {
368
+ const childSizes = section.children.map((c) => sectionMeasurements.current[c]).reduce((c, a) => c + a, 0);
369
+ return sectionMeasurements.current[section.node] - childSizes;
370
+ });
371
+ const activeSectionIndex = maxIndex(ownedSectionSizes);
372
+ if (activeSectionIndex !== void 0) {
373
+ onSectionChange(sectionWrappers[activeSectionIndex].element);
374
+ }
375
+ },
376
+ [sectionWrappers, onSectionChange]
377
+ );
378
+ const wrapperSettings = useMemo(
379
+ () => ({ threshold: THRESHOLD, rootMargin: `-15% 0px -70% 0px` }),
380
+ []
381
+ );
382
+ const bindableWrappers = useMemo(
383
+ () => sectionWrappers.map((s) => s.wrapper),
384
+ [sectionWrappers]
385
+ );
386
+ const sectionObserver = useIntersectionObserver(
387
+ bindableWrappers,
388
+ wrapperActivator,
389
+ wrapperSettings
390
+ );
391
+ let debugNode = null;
392
+ if (debug && sectionObserver?.root === null) {
393
+ const edges = sectionObserver.rootMargin.split(" ").map((margin) => {
394
+ if (margin.endsWith("%")) {
395
+ return parseInt(margin) * -1 + "%";
396
+ } else if (margin.endsWith("px")) {
397
+ return parseInt(margin) * -1 + "px";
398
+ } else {
399
+ return "0px";
400
+ }
401
+ });
402
+ debugNode = /* @__PURE__ */ jsx8(
403
+ "div",
404
+ {
405
+ style: {
406
+ position: "fixed",
407
+ top: edges[0],
408
+ right: edges[1],
409
+ bottom: edges[2],
410
+ left: edges[3],
411
+ background: "rgba(255, 92, 170, 0.2)",
412
+ border: "1px solid rgba(255, 92, 170)",
413
+ pointerEvents: "none",
414
+ zIndex: 500
415
+ }
416
+ }
417
+ );
418
+ }
419
+ return {
420
+ setSections,
421
+ debugNode
422
+ };
423
+ }
424
+ var DesktopOutline = ({
425
+ toc,
426
+ activeItem,
427
+ className
428
+ }) => {
429
+ const renderToc = (sections) => {
430
+ return sections.map((item) => /* @__PURE__ */ jsxs7(Fragment2, { children: [
431
+ /* @__PURE__ */ jsx8(
432
+ "li",
433
+ {
434
+ "data-level": item.level,
435
+ className: cn3("mb-0 list-none text-sans-sm", item.level > 2 && "hidden"),
436
+ children: /* @__PURE__ */ jsx8(
437
+ Link,
438
+ {
439
+ to: `#${item.id}`,
440
+ className: cn3(
441
+ "block border-l py-[4px] pr-4",
442
+ activeItem === item.id ? "active text-accent-secondary border-accent-secondary hover:text-accent" : "text-tertiary border-secondary hover:text-secondary"
443
+ ),
444
+ style: {
445
+ paddingLeft: `${0.5 + item.level * 0.5}rem`
446
+ },
447
+ children: /* @__PURE__ */ jsx8("span", { dangerouslySetInnerHTML: { __html: item.title } })
448
+ }
449
+ )
450
+ }
451
+ ),
452
+ item.sections && renderToc(item.sections)
453
+ ] }, item.id));
454
+ };
455
+ if (toc && toc.length > 0) {
456
+ return /* @__PURE__ */ jsx8("ul", { className, children: renderToc(toc) });
457
+ }
458
+ return null;
459
+ };
460
+ var SmallScreenOutline = ({
461
+ toc,
462
+ activeItem,
463
+ className
464
+ }) => {
465
+ const [value, setValue] = useState("");
466
+ const renderToc = (sections) => {
467
+ return sections.map((item) => /* @__PURE__ */ jsxs7(Fragment2, { children: [
468
+ /* @__PURE__ */ jsx8(
469
+ "li",
470
+ {
471
+ "data-level": item.level,
472
+ className: cn3("list-none text-sans-sm", item.level > 2 && "hidden"),
473
+ children: /* @__PURE__ */ jsx8(
474
+ Link,
475
+ {
476
+ to: `#${item.id}`,
477
+ onClick: () => setValue(""),
478
+ className: cn3(
479
+ "block border-l py-[4px]",
480
+ activeItem === item.id ? "active text-accent-secondary border-accent-secondary hover:text-accent" : "text-tertiary border-secondary hover:text-secondary"
481
+ ),
482
+ style: {
483
+ paddingLeft: `${0.5 + item.level * 0.5}rem`
484
+ },
485
+ children: /* @__PURE__ */ jsx8("span", { dangerouslySetInnerHTML: { __html: item.title } })
486
+ }
487
+ )
488
+ }
489
+ ),
490
+ item.sections && renderToc(item.sections)
491
+ ] }, item.id));
492
+ };
493
+ if (toc && toc.length > 0) {
494
+ return /* @__PURE__ */ jsx8(
495
+ Accordion.Root,
496
+ {
497
+ type: "single",
498
+ className: cn3(
499
+ "sticky top-[calc(var(--header-height)-1px)] z-10 -mt-px mb-10 block w-full border-b border-t bg-default border-secondary print:hidden",
500
+ className
501
+ ),
502
+ collapsible: true,
503
+ value,
504
+ onValueChange: setValue,
505
+ children: /* @__PURE__ */ jsxs7(Accordion.Item, { value: "toc", children: [
506
+ /* @__PURE__ */ jsx8(Accordion.Header, { children: /* @__PURE__ */ jsxs7(Accordion.Trigger, { className: "flex h-12 w-full items-center justify-between text-sans-md text-default hover:bg-hover px-5 600:px-10 [&>svg]:data-[state=open]:rotate-90", children: [
507
+ "Table of Contents",
508
+ " ",
509
+ /* @__PURE__ */ jsx8(DirectionRightIcon_default, { className: "transition-all text-tertiary" })
510
+ ] }) }),
511
+ /* @__PURE__ */ jsx8(Accordion.Content, { className: "animated-accordion hydrated max-h-[66.6vh] overflow-y-scroll w-full border-t border-secondary px-5 600:px-10", children: /* @__PURE__ */ jsx8("div", { className: "py-4", children: renderToc(toc) }) })
512
+ ] })
513
+ }
514
+ );
515
+ }
516
+ return null;
517
+ };
518
+
519
+ // components/src/asciidoc/use-delegated-links.ts
520
+ import { useNavigate } from "@remix-run/react";
521
+ import { useEffect as useEffect2 } from "react";
522
+ function useDelegatedReactRouterLinks(nodeRef, key) {
523
+ const navigate = useNavigate();
524
+ useEffect2(() => {
525
+ const node = nodeRef.current;
526
+ const handler = (event) => {
527
+ if (!nodeRef.current)
528
+ return;
529
+ if (!(event.target instanceof HTMLElement))
530
+ return;
531
+ const a = event.target.closest("a");
532
+ if (a && // is anchor or has anchor parent
533
+ a.hasAttribute("href") && // has an href
534
+ a.host === window.location.host && // is internal
535
+ event.button === 0 && // left click
536
+ (!a.target || a.target === "_self") && // Let browser handle "target=_blank" etc.
537
+ !(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey)) {
538
+ event.preventDefault();
539
+ const { pathname, search, hash } = a;
540
+ navigate({ pathname, search, hash });
541
+ }
542
+ };
543
+ if (!node)
544
+ return;
545
+ node.addEventListener("click", handler);
546
+ return () => {
547
+ node?.removeEventListener("click", handler);
548
+ };
549
+ }, [navigate, nodeRef, key]);
550
+ }
551
+
552
+ // components/src/asciidoc/util.ts
553
+ import asciidoctor from "@asciidoctor/core";
554
+ import {
555
+ prepareDocument,
556
+ processDocument
557
+ } from "@oxide/react-asciidoc";
558
+ import {
559
+ bundledLanguages,
560
+ getHighlighter
561
+ } from "shiki";
562
+
563
+ // components/src/asciidoc/langs/oxql.tmLanguage.json
564
+ var oxql_tmLanguage_default = {
565
+ $schema: "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
566
+ name: "oxql",
567
+ repository: {
568
+ keywords: {
569
+ patterns: [
570
+ {
571
+ name: "keyword.control.oxql",
572
+ match: "\\b(if|while|for|return)\\b"
573
+ }
574
+ ]
575
+ },
576
+ strings: {
577
+ name: "string.quoted.double.oxql",
578
+ begin: '"',
579
+ end: '"',
580
+ patterns: [
581
+ {
582
+ name: "constant.character.escape.oxql",
583
+ match: "\\\\."
584
+ }
585
+ ]
586
+ }
587
+ },
588
+ scopeName: "source.oxql",
589
+ patterns: [
590
+ {
591
+ name: "keyword.control.oxql",
592
+ match: "\\b(get|join|align|filter|group_by)\\b"
593
+ },
594
+ {
595
+ name: "string.quoted.double.oxql",
596
+ begin: '"',
597
+ end: '"',
598
+ patterns: [
599
+ {
600
+ name: "constant.character.escape.oxql",
601
+ match: "\\\\."
602
+ }
603
+ ]
604
+ },
605
+ {
606
+ name: "constant.numeric.oxql",
607
+ match: "\\b\\d+[smhdw]\\b"
608
+ },
609
+ {
610
+ name: "constant.numeric.datetime.oxql",
611
+ match: "@\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}"
612
+ },
613
+ {
614
+ name: "constant.numeric.function.oxql",
615
+ match: "@now\\(\\)"
616
+ },
617
+ {
618
+ name: "constant.numeric.oxql",
619
+ match: "\\b\\d+\\b"
620
+ },
621
+ {
622
+ name: "comment.block.oxql",
623
+ begin: "/\\*",
624
+ end: "\\*/"
625
+ },
626
+ {
627
+ name: "comment.line.double-slash.oxql",
628
+ match: "//.*$"
629
+ },
630
+ {
631
+ name: "keyword.operator.oxql",
632
+ match: "\\|"
633
+ }
634
+ ]
635
+ };
636
+
637
+ // components/src/asciidoc/oxide-dark.json
638
+ var oxide_dark_default = {
639
+ name: "Oxide Dark",
640
+ colors: {
641
+ "editor.background": "#080F11",
642
+ "editor.foreground": "#E7E7E8"
643
+ },
644
+ tokenColors: [
645
+ {
646
+ scope: [
647
+ "text",
648
+ "source",
649
+ "variable.other.readwrite",
650
+ "punctuation.definition.variable"
651
+ ],
652
+ settings: {
653
+ foreground: "#E7E7E8"
654
+ }
655
+ },
656
+ {
657
+ scope: "punctuation",
658
+ settings: {
659
+ foreground: "#A1A4A5",
660
+ fontStyle: ""
661
+ }
662
+ },
663
+ {
664
+ scope: ["comment", "punctuation.definition.comment"],
665
+ settings: {
666
+ foreground: "#A1A4A5"
667
+ }
668
+ },
669
+ {
670
+ scope: ["string", "punctuation.definition.string"],
671
+ settings: {
672
+ foreground: "#68D9A7"
673
+ }
674
+ },
675
+ {
676
+ scope: "constant.character.escape",
677
+ settings: {
678
+ foreground: "#EFB7C2"
679
+ }
680
+ },
681
+ {
682
+ scope: [
683
+ "constant.numeric",
684
+ "variable.other.constant",
685
+ "entity.name.constant",
686
+ "constant.language.boolean",
687
+ "constant.language.false",
688
+ "constant.language.true",
689
+ "keyword.other.unit.user-defined",
690
+ "keyword.other.unit.suffix.floating-point"
691
+ ],
692
+ settings: {
693
+ foreground: "#EDD5A6"
694
+ }
695
+ },
696
+ {
697
+ scope: [
698
+ "keyword",
699
+ "keyword.operator.word",
700
+ "keyword.operator.new",
701
+ "variable.language.super",
702
+ "support.type.primitive",
703
+ "storage.type",
704
+ "storage.modifier",
705
+ "punctuation.definition.keyword"
706
+ ],
707
+ settings: {
708
+ foreground: "#C6A5EA",
709
+ fontStyle: ""
710
+ }
711
+ },
712
+ {
713
+ scope: "entity.name.tag.documentation",
714
+ settings: {
715
+ foreground: "#C6A5EA"
716
+ }
717
+ },
718
+ {
719
+ scope: [
720
+ "keyword.operator",
721
+ "punctuation.accessor",
722
+ "punctuation.definition.generic",
723
+ "meta.function.closure punctuation.section.parameters",
724
+ "punctuation.definition.tag",
725
+ "punctuation.separator.key-value"
726
+ ],
727
+ settings: {
728
+ foreground: "#A7E0C8"
729
+ }
730
+ },
731
+ {
732
+ scope: [
733
+ "entity.name.function",
734
+ "meta.function-call.method",
735
+ "support.function",
736
+ "support.function.misc",
737
+ "variable.function"
738
+ ],
739
+ settings: {
740
+ foreground: "#9DAFFA"
741
+ }
742
+ },
743
+ {
744
+ scope: [
745
+ "entity.name.class",
746
+ "entity.other.inherited-class",
747
+ "support.class",
748
+ "meta.function-call.constructor",
749
+ "entity.name.struct"
750
+ ],
751
+ settings: {
752
+ foreground: "#EDD5A6"
753
+ }
754
+ },
755
+ {
756
+ scope: "entity.name.enum",
757
+ settings: {
758
+ foreground: "#EDD5A6"
759
+ }
760
+ },
761
+ {
762
+ scope: ["meta.enum variable.other.readwrite", "variable.other.enummember"],
763
+ settings: {
764
+ foreground: "#A7E0C8"
765
+ }
766
+ },
767
+ {
768
+ scope: "meta.property.object",
769
+ settings: {
770
+ foreground: "#A7E0C8"
771
+ }
772
+ },
773
+ {
774
+ scope: ["meta.type", "meta.type-alias", "support.type", "entity.name.type"],
775
+ settings: {
776
+ foreground: "#EDD5A6"
777
+ }
778
+ },
779
+ {
780
+ scope: [
781
+ "meta.annotation variable.function",
782
+ "meta.annotation variable.annotation.function",
783
+ "meta.annotation punctuation.definition.annotation",
784
+ "meta.decorator",
785
+ "punctuation.decorator"
786
+ ],
787
+ settings: {
788
+ foreground: "#EDD5A6"
789
+ }
790
+ },
791
+ {
792
+ scope: ["variable.parameter", "meta.function.parameters"],
793
+ settings: {
794
+ foreground: "#F39EAE"
795
+ }
796
+ },
797
+ {
798
+ scope: ["constant.language", "support.function.builtin"],
799
+ settings: {
800
+ foreground: "#F7869B"
801
+ }
802
+ },
803
+ {
804
+ scope: "entity.other.attribute-name.documentation",
805
+ settings: {
806
+ foreground: "#F7869B"
807
+ }
808
+ },
809
+ {
810
+ scope: ["keyword.control.directive", "punctuation.definition.directive"],
811
+ settings: {
812
+ foreground: "#EDD5A6"
813
+ }
814
+ },
815
+ {
816
+ scope: "punctuation.definition.typeparameters",
817
+ settings: {
818
+ foreground: "#9DAFFA"
819
+ }
820
+ },
821
+ {
822
+ scope: "entity.name.namespace",
823
+ settings: {
824
+ foreground: "#EDD5A6"
825
+ }
826
+ },
827
+ {
828
+ scope: "support.type.property-name.css",
829
+ settings: {
830
+ foreground: "#9DAFFA",
831
+ fontStyle: ""
832
+ }
833
+ },
834
+ {
835
+ scope: [
836
+ "variable.language.this",
837
+ "variable.language.this punctuation.definition.variable"
838
+ ],
839
+ settings: {
840
+ foreground: "#F7869B"
841
+ }
842
+ },
843
+ {
844
+ scope: "variable.object.property",
845
+ settings: {
846
+ foreground: "#E7E7E8"
847
+ }
848
+ },
849
+ {
850
+ scope: ["string.template variable", "string variable"],
851
+ settings: {
852
+ foreground: "#E7E7E8"
853
+ }
854
+ },
855
+ {
856
+ scope: "keyword.operator.new",
857
+ settings: {
858
+ fontStyle: "bold"
859
+ }
860
+ },
861
+ {
862
+ scope: "storage.modifier.specifier.extern.cpp",
863
+ settings: {
864
+ foreground: "#C6A5EA"
865
+ }
866
+ },
867
+ {
868
+ scope: [
869
+ "entity.name.scope-resolution.template.call.cpp",
870
+ "entity.name.scope-resolution.parameter.cpp",
871
+ "entity.name.scope-resolution.cpp",
872
+ "entity.name.scope-resolution.function.definition.cpp"
873
+ ],
874
+ settings: {
875
+ foreground: "#EDD5A6"
876
+ }
877
+ },
878
+ {
879
+ scope: "storage.type.class.doxygen",
880
+ settings: {
881
+ fontStyle: ""
882
+ }
883
+ },
884
+ {
885
+ scope: ["storage.modifier.reference.cpp"],
886
+ settings: {
887
+ foreground: "#A7E0C8"
888
+ }
889
+ },
890
+ {
891
+ scope: "meta.interpolation.cs",
892
+ settings: {
893
+ foreground: "#E7E7E8"
894
+ }
895
+ },
896
+ {
897
+ scope: "comment.block.documentation.cs",
898
+ settings: {
899
+ foreground: "#E7E7E8"
900
+ }
901
+ },
902
+ {
903
+ scope: [
904
+ "source.css entity.other.attribute-name.class.css",
905
+ "entity.other.attribute-name.parent-selector.css punctuation.definition.entity.css"
906
+ ],
907
+ settings: {
908
+ foreground: "#EDD5A6"
909
+ }
910
+ },
911
+ {
912
+ scope: "punctuation.separator.operator.css",
913
+ settings: {
914
+ foreground: "#A7E0C8"
915
+ }
916
+ },
917
+ {
918
+ scope: "source.css entity.other.attribute-name.pseudo-class",
919
+ settings: {
920
+ foreground: "#A7E0C8"
921
+ }
922
+ },
923
+ {
924
+ scope: "source.css constant.other.unicode-range",
925
+ settings: {
926
+ foreground: "#EDD5A6"
927
+ }
928
+ },
929
+ {
930
+ scope: "source.css variable.parameter.url",
931
+ settings: {
932
+ foreground: "#88DCB7",
933
+ fontStyle: ""
934
+ }
935
+ },
936
+ {
937
+ scope: ["support.type.vendored.property-name"],
938
+ settings: {
939
+ foreground: "#9DAFFA"
940
+ }
941
+ },
942
+ {
943
+ scope: [
944
+ "source.css meta.property-value variable",
945
+ "source.css meta.property-value variable.other.less",
946
+ "source.css meta.property-value variable.other.less punctuation.definition.variable.less",
947
+ "meta.definition.variable.scss"
948
+ ],
949
+ settings: {
950
+ foreground: "#F39EAE"
951
+ }
952
+ },
953
+ {
954
+ scope: [
955
+ "source.css meta.property-list variable",
956
+ "meta.property-list variable.other.less",
957
+ "meta.property-list variable.other.less punctuation.definition.variable.less"
958
+ ],
959
+ settings: {
960
+ foreground: "#9DAFFA"
961
+ }
962
+ },
963
+ {
964
+ scope: "keyword.other.unit.percentage.css",
965
+ settings: {
966
+ foreground: "#EDD5A6"
967
+ }
968
+ },
969
+ {
970
+ scope: "source.css meta.attribute-selector",
971
+ settings: {
972
+ foreground: "#88DCB7"
973
+ }
974
+ },
975
+ {
976
+ scope: [
977
+ "keyword.other.definition.ini",
978
+ "punctuation.support.type.property-name.json",
979
+ "support.type.property-name.json",
980
+ "punctuation.support.type.property-name.toml",
981
+ "support.type.property-name.toml",
982
+ "entity.name.tag.yaml",
983
+ "punctuation.support.type.property-name.yaml",
984
+ "support.type.property-name.yaml"
985
+ ],
986
+ settings: {
987
+ foreground: "#9DAFFA",
988
+ fontStyle: ""
989
+ }
990
+ },
991
+ {
992
+ scope: ["constant.language.json", "constant.language.yaml"],
993
+ settings: {
994
+ foreground: "#EDD5A6"
995
+ }
996
+ },
997
+ {
998
+ scope: ["entity.name.type.anchor.yaml", "variable.other.alias.yaml"],
999
+ settings: {
1000
+ foreground: "#EDD5A6",
1001
+ fontStyle: ""
1002
+ }
1003
+ },
1004
+ {
1005
+ scope: ["support.type.property-name.table", "entity.name.section.group-title.ini"],
1006
+ settings: {
1007
+ foreground: "#EDD5A6"
1008
+ }
1009
+ },
1010
+ {
1011
+ scope: "constant.other.time.datetime.offset.toml",
1012
+ settings: {
1013
+ foreground: "#EFB7C2"
1014
+ }
1015
+ },
1016
+ {
1017
+ scope: ["punctuation.definition.anchor.yaml", "punctuation.definition.alias.yaml"],
1018
+ settings: {
1019
+ foreground: "#EFB7C2"
1020
+ }
1021
+ },
1022
+ {
1023
+ scope: "entity.other.document.begin.yaml",
1024
+ settings: {
1025
+ foreground: "#EFB7C2"
1026
+ }
1027
+ },
1028
+ {
1029
+ scope: "markup.changed.diff",
1030
+ settings: {
1031
+ foreground: "#EDD5A6"
1032
+ }
1033
+ },
1034
+ {
1035
+ scope: [
1036
+ "meta.diff.header.from-file",
1037
+ "meta.diff.header.to-file",
1038
+ "punctuation.definition.from-file.diff",
1039
+ "punctuation.definition.to-file.diff"
1040
+ ],
1041
+ settings: {
1042
+ foreground: "#9DAFFA"
1043
+ }
1044
+ },
1045
+ {
1046
+ scope: "markup.inserted.diff",
1047
+ settings: {
1048
+ foreground: "#88DCB7"
1049
+ }
1050
+ },
1051
+ {
1052
+ scope: "markup.deleted.diff",
1053
+ settings: {
1054
+ foreground: "#F7869B"
1055
+ }
1056
+ },
1057
+ {
1058
+ scope: ["variable.other.env"],
1059
+ settings: {
1060
+ foreground: "#9DAFFA"
1061
+ }
1062
+ },
1063
+ {
1064
+ scope: ["string.quoted variable.other.env"],
1065
+ settings: {
1066
+ foreground: "#E7E7E8"
1067
+ }
1068
+ },
1069
+ {
1070
+ scope: "support.function.builtin.gdscript",
1071
+ settings: {
1072
+ foreground: "#9DAFFA"
1073
+ }
1074
+ },
1075
+ {
1076
+ scope: "constant.language.gdscript",
1077
+ settings: {
1078
+ foreground: "#EDD5A6"
1079
+ }
1080
+ },
1081
+ {
1082
+ scope: "comment meta.annotation.go",
1083
+ settings: {
1084
+ foreground: "#F39EAE"
1085
+ }
1086
+ },
1087
+ {
1088
+ scope: "comment meta.annotation.parameters.go",
1089
+ settings: {
1090
+ foreground: "#EDD5A6"
1091
+ }
1092
+ },
1093
+ {
1094
+ scope: "constant.language.go",
1095
+ settings: {
1096
+ foreground: "#EDD5A6"
1097
+ }
1098
+ },
1099
+ {
1100
+ scope: "variable.graphql",
1101
+ settings: {
1102
+ foreground: "#E7E7E8"
1103
+ }
1104
+ },
1105
+ {
1106
+ scope: "string.unquoted.alias.graphql",
1107
+ settings: {
1108
+ foreground: "#F2CDCD"
1109
+ }
1110
+ },
1111
+ {
1112
+ scope: "constant.character.enum.graphql",
1113
+ settings: {
1114
+ foreground: "#A7E0C8"
1115
+ }
1116
+ },
1117
+ {
1118
+ scope: "meta.objectvalues.graphql constant.object.key.graphql string.unquoted.graphql",
1119
+ settings: {
1120
+ foreground: "#F2CDCD"
1121
+ }
1122
+ },
1123
+ {
1124
+ scope: [
1125
+ "keyword.other.doctype",
1126
+ "meta.tag.sgml.doctype punctuation.definition.tag",
1127
+ "meta.tag.metadata.doctype entity.name.tag",
1128
+ "meta.tag.metadata.doctype punctuation.definition.tag"
1129
+ ],
1130
+ settings: {
1131
+ foreground: "#C6A5EA"
1132
+ }
1133
+ },
1134
+ {
1135
+ scope: ["entity.name.tag"],
1136
+ settings: {
1137
+ foreground: "#9DAFFA",
1138
+ fontStyle: ""
1139
+ }
1140
+ },
1141
+ {
1142
+ scope: [
1143
+ "text.html constant.character.entity",
1144
+ "text.html constant.character.entity punctuation",
1145
+ "constant.character.entity.xml",
1146
+ "constant.character.entity.xml punctuation",
1147
+ "constant.character.entity.js.jsx",
1148
+ "constant.charactger.entity.js.jsx punctuation",
1149
+ "constant.character.entity.tsx",
1150
+ "constant.character.entity.tsx punctuation"
1151
+ ],
1152
+ settings: {
1153
+ foreground: "#F7869B"
1154
+ }
1155
+ },
1156
+ {
1157
+ scope: ["entity.other.attribute-name"],
1158
+ settings: {
1159
+ foreground: "#EDD5A6"
1160
+ }
1161
+ },
1162
+ {
1163
+ scope: [
1164
+ "support.class.component",
1165
+ "support.class.component.jsx",
1166
+ "support.class.component.tsx",
1167
+ "support.class.component.vue"
1168
+ ],
1169
+ settings: {
1170
+ foreground: "#EFB7C2",
1171
+ fontStyle: ""
1172
+ }
1173
+ },
1174
+ {
1175
+ scope: ["punctuation.definition.annotation", "storage.type.annotation"],
1176
+ settings: {
1177
+ foreground: "#EDD5A6"
1178
+ }
1179
+ },
1180
+ {
1181
+ scope: "constant.other.enum.java",
1182
+ settings: {
1183
+ foreground: "#A7E0C8"
1184
+ }
1185
+ },
1186
+ {
1187
+ scope: "storage.modifier.import.java",
1188
+ settings: {
1189
+ foreground: "#E7E7E8"
1190
+ }
1191
+ },
1192
+ {
1193
+ scope: "comment.block.javadoc.java keyword.other.documentation.javadoc.java",
1194
+ settings: {
1195
+ fontStyle: ""
1196
+ }
1197
+ },
1198
+ {
1199
+ scope: "meta.export variable.other.readwrite.js",
1200
+ settings: {
1201
+ foreground: "#F39EAE"
1202
+ }
1203
+ },
1204
+ {
1205
+ scope: [
1206
+ "variable.other.constant.js",
1207
+ "variable.other.constant.ts",
1208
+ "variable.other.property.js",
1209
+ "variable.other.property.ts"
1210
+ ],
1211
+ settings: {
1212
+ foreground: "#E7E7E8"
1213
+ }
1214
+ },
1215
+ {
1216
+ scope: ["variable.other.jsdoc", "comment.block.documentation variable.other"],
1217
+ settings: {
1218
+ foreground: "#F39EAE",
1219
+ fontStyle: ""
1220
+ }
1221
+ },
1222
+ {
1223
+ scope: "storage.type.class.jsdoc",
1224
+ settings: {
1225
+ fontStyle: ""
1226
+ }
1227
+ },
1228
+ {
1229
+ scope: "support.type.object.console.js",
1230
+ settings: {
1231
+ foreground: "#E7E7E8"
1232
+ }
1233
+ },
1234
+ {
1235
+ scope: ["support.constant.node", "support.type.object.module.js"],
1236
+ settings: {
1237
+ foreground: "#C6A5EA"
1238
+ }
1239
+ },
1240
+ {
1241
+ scope: "storage.modifier.implements",
1242
+ settings: {
1243
+ foreground: "#C6A5EA"
1244
+ }
1245
+ },
1246
+ {
1247
+ scope: [
1248
+ "constant.language.null.js",
1249
+ "constant.language.null.ts",
1250
+ "constant.language.undefined.js",
1251
+ "constant.language.undefined.ts",
1252
+ "support.type.builtin.ts"
1253
+ ],
1254
+ settings: {
1255
+ foreground: "#C6A5EA"
1256
+ }
1257
+ },
1258
+ {
1259
+ scope: "variable.parameter.generic",
1260
+ settings: {
1261
+ foreground: "#EDD5A6"
1262
+ }
1263
+ },
1264
+ {
1265
+ scope: ["keyword.declaration.function.arrow.js", "storage.type.function.arrow.ts"],
1266
+ settings: {
1267
+ foreground: "#A7E0C8"
1268
+ }
1269
+ },
1270
+ {
1271
+ scope: "punctuation.decorator.ts",
1272
+ settings: {
1273
+ foreground: "#9DAFFA"
1274
+ }
1275
+ },
1276
+ {
1277
+ scope: [
1278
+ "keyword.operator.expression.in.js",
1279
+ "keyword.operator.expression.in.ts",
1280
+ "keyword.operator.expression.infer.ts",
1281
+ "keyword.operator.expression.instanceof.js",
1282
+ "keyword.operator.expression.instanceof.ts",
1283
+ "keyword.operator.expression.is",
1284
+ "keyword.operator.expression.keyof.ts",
1285
+ "keyword.operator.expression.of.js",
1286
+ "keyword.operator.expression.of.ts",
1287
+ "keyword.operator.expression.typeof.ts"
1288
+ ],
1289
+ settings: {
1290
+ foreground: "#C6A5EA"
1291
+ }
1292
+ },
1293
+ {
1294
+ scope: "support.function.macro.julia",
1295
+ settings: {
1296
+ foreground: "#A7E0C8"
1297
+ }
1298
+ },
1299
+ {
1300
+ scope: "constant.language.julia",
1301
+ settings: {
1302
+ foreground: "#EDD5A6"
1303
+ }
1304
+ },
1305
+ {
1306
+ scope: "constant.other.symbol.julia",
1307
+ settings: {
1308
+ foreground: "#F39EAE"
1309
+ }
1310
+ },
1311
+ {
1312
+ scope: "text.tex keyword.control.preamble",
1313
+ settings: {
1314
+ foreground: "#A7E0C8"
1315
+ }
1316
+ },
1317
+ {
1318
+ scope: "text.tex support.function.be",
1319
+ settings: {
1320
+ foreground: "#9DAFFA"
1321
+ }
1322
+ },
1323
+ {
1324
+ scope: "constant.other.general.math.tex",
1325
+ settings: {
1326
+ foreground: "#F2CDCD"
1327
+ }
1328
+ },
1329
+ {
1330
+ scope: "comment.line.double-dash.documentation.lua storage.type.annotation.lua",
1331
+ settings: {
1332
+ foreground: "#C6A5EA",
1333
+ fontStyle: ""
1334
+ }
1335
+ },
1336
+ {
1337
+ scope: [
1338
+ "comment.line.double-dash.documentation.lua entity.name.variable.lua",
1339
+ "comment.line.double-dash.documentation.lua variable.lua"
1340
+ ],
1341
+ settings: {
1342
+ foreground: "#E7E7E8"
1343
+ }
1344
+ },
1345
+ {
1346
+ scope: [
1347
+ "heading.1.markdown punctuation.definition.heading.markdown",
1348
+ "heading.1.markdown",
1349
+ "heading.1.quarto punctuation.definition.heading.quarto",
1350
+ "heading.1.quarto",
1351
+ "markup.heading.atx.1.mdx",
1352
+ "markup.heading.atx.1.mdx punctuation.definition.heading.mdx",
1353
+ "markup.heading.setext.1.markdown",
1354
+ "markup.heading.heading-0.asciidoc"
1355
+ ],
1356
+ settings: {
1357
+ foreground: "#F7869B"
1358
+ }
1359
+ },
1360
+ {
1361
+ scope: [
1362
+ "heading.2.markdown punctuation.definition.heading.markdown",
1363
+ "heading.2.markdown",
1364
+ "heading.2.quarto punctuation.definition.heading.quarto",
1365
+ "heading.2.quarto",
1366
+ "markup.heading.atx.2.mdx",
1367
+ "markup.heading.atx.2.mdx punctuation.definition.heading.mdx",
1368
+ "markup.heading.setext.2.markdown",
1369
+ "markup.heading.heading-1.asciidoc"
1370
+ ],
1371
+ settings: {
1372
+ foreground: "#EDD5A6"
1373
+ }
1374
+ },
1375
+ {
1376
+ scope: [
1377
+ "heading.3.markdown punctuation.definition.heading.markdown",
1378
+ "heading.3.markdown",
1379
+ "heading.3.quarto punctuation.definition.heading.quarto",
1380
+ "heading.3.quarto",
1381
+ "markup.heading.atx.3.mdx",
1382
+ "markup.heading.atx.3.mdx punctuation.definition.heading.mdx",
1383
+ "markup.heading.heading-2.asciidoc"
1384
+ ],
1385
+ settings: {
1386
+ foreground: "#EDD5A6"
1387
+ }
1388
+ },
1389
+ {
1390
+ scope: [
1391
+ "heading.4.markdown punctuation.definition.heading.markdown",
1392
+ "heading.4.markdown",
1393
+ "heading.4.quarto punctuation.definition.heading.quarto",
1394
+ "heading.4.quarto",
1395
+ "markup.heading.atx.4.mdx",
1396
+ "markup.heading.atx.4.mdx punctuation.definition.heading.mdx",
1397
+ "markup.heading.heading-3.asciidoc"
1398
+ ],
1399
+ settings: {
1400
+ foreground: "#88DCB7"
1401
+ }
1402
+ },
1403
+ {
1404
+ scope: [
1405
+ "heading.5.markdown punctuation.definition.heading.markdown",
1406
+ "heading.5.markdown",
1407
+ "heading.5.quarto punctuation.definition.heading.quarto",
1408
+ "heading.5.quarto",
1409
+ "markup.heading.atx.5.mdx",
1410
+ "markup.heading.atx.5.mdx punctuation.definition.heading.mdx",
1411
+ "markup.heading.heading-4.asciidoc"
1412
+ ],
1413
+ settings: {
1414
+ foreground: "#9DAFFA"
1415
+ }
1416
+ },
1417
+ {
1418
+ scope: [
1419
+ "heading.6.markdown punctuation.definition.heading.markdown",
1420
+ "heading.6.markdown",
1421
+ "heading.6.quarto punctuation.definition.heading.quarto",
1422
+ "heading.6.quarto",
1423
+ "markup.heading.atx.6.mdx",
1424
+ "markup.heading.atx.6.mdx punctuation.definition.heading.mdx",
1425
+ "markup.heading.heading-5.asciidoc"
1426
+ ],
1427
+ settings: {
1428
+ foreground: "#C6A5EA"
1429
+ }
1430
+ },
1431
+ {
1432
+ scope: "markup.bold",
1433
+ settings: {
1434
+ foreground: "#F7869B",
1435
+ fontStyle: "bold"
1436
+ }
1437
+ },
1438
+ {
1439
+ scope: "markup.italic",
1440
+ settings: {
1441
+ foreground: "#F7869B"
1442
+ }
1443
+ },
1444
+ {
1445
+ scope: "markup.strikethrough",
1446
+ settings: {
1447
+ foreground: "#A6ADC8",
1448
+ fontStyle: "strikethrough"
1449
+ }
1450
+ },
1451
+ {
1452
+ scope: ["punctuation.definition.link", "markup.underline.link"],
1453
+ settings: {
1454
+ foreground: "#9DAFFA"
1455
+ }
1456
+ },
1457
+ {
1458
+ scope: [
1459
+ "text.html.markdown punctuation.definition.link.title",
1460
+ "text.html.quarto punctuation.definition.link.title",
1461
+ "string.other.link.title.markdown",
1462
+ "string.other.link.title.quarto",
1463
+ "markup.link",
1464
+ "punctuation.definition.constant.markdown",
1465
+ "punctuation.definition.constant.quarto",
1466
+ "constant.other.reference.link.markdown",
1467
+ "constant.other.reference.link.quarto",
1468
+ "markup.substitution.attribute-reference"
1469
+ ],
1470
+ settings: {
1471
+ foreground: "#B4BEFE"
1472
+ }
1473
+ },
1474
+ {
1475
+ scope: [
1476
+ "punctuation.definition.raw.markdown",
1477
+ "punctuation.definition.raw.quarto",
1478
+ "markup.inline.raw.string.markdown",
1479
+ "markup.inline.raw.string.quarto",
1480
+ "markup.raw.block.markdown",
1481
+ "markup.raw.block.quarto"
1482
+ ],
1483
+ settings: {
1484
+ foreground: "#88DCB7"
1485
+ }
1486
+ },
1487
+ {
1488
+ scope: "fenced_code.block.language",
1489
+ settings: {
1490
+ foreground: "#9DAFFA"
1491
+ }
1492
+ },
1493
+ {
1494
+ scope: [
1495
+ "markup.fenced_code.block punctuation.definition",
1496
+ "markup.raw support.asciidoc"
1497
+ ],
1498
+ settings: {
1499
+ foreground: "#A1A4A5"
1500
+ }
1501
+ },
1502
+ {
1503
+ scope: ["markup.quote", "punctuation.definition.quote.begin"],
1504
+ settings: {
1505
+ foreground: "#EFB7C2"
1506
+ }
1507
+ },
1508
+ {
1509
+ scope: "meta.separator.markdown",
1510
+ settings: {
1511
+ foreground: "#A7E0C8"
1512
+ }
1513
+ },
1514
+ {
1515
+ scope: [
1516
+ "punctuation.definition.list.begin.markdown",
1517
+ "punctuation.definition.list.begin.quarto",
1518
+ "markup.list.bullet"
1519
+ ],
1520
+ settings: {
1521
+ foreground: "#A7E0C8"
1522
+ }
1523
+ },
1524
+ {
1525
+ scope: "markup.heading.quarto",
1526
+ settings: {
1527
+ fontStyle: "bold"
1528
+ }
1529
+ },
1530
+ {
1531
+ scope: [
1532
+ "entity.other.attribute-name.multipart.nix",
1533
+ "entity.other.attribute-name.single.nix"
1534
+ ],
1535
+ settings: {
1536
+ foreground: "#9DAFFA"
1537
+ }
1538
+ },
1539
+ {
1540
+ scope: "variable.parameter.name.nix",
1541
+ settings: {
1542
+ foreground: "#E7E7E8",
1543
+ fontStyle: ""
1544
+ }
1545
+ },
1546
+ {
1547
+ scope: "meta.embedded variable.parameter.name.nix",
1548
+ settings: {
1549
+ foreground: "#B4BEFE",
1550
+ fontStyle: ""
1551
+ }
1552
+ },
1553
+ {
1554
+ scope: "string.unquoted.path.nix",
1555
+ settings: {
1556
+ foreground: "#EFB7C2",
1557
+ fontStyle: ""
1558
+ }
1559
+ },
1560
+ {
1561
+ scope: ["support.attribute.builtin", "meta.attribute.php"],
1562
+ settings: {
1563
+ foreground: "#EDD5A6"
1564
+ }
1565
+ },
1566
+ {
1567
+ scope: "meta.function.parameters.php punctuation.definition.variable.php",
1568
+ settings: {
1569
+ foreground: "#F39EAE"
1570
+ }
1571
+ },
1572
+ {
1573
+ scope: "constant.language.php",
1574
+ settings: {
1575
+ foreground: "#C6A5EA"
1576
+ }
1577
+ },
1578
+ {
1579
+ scope: "text.html.php support.function",
1580
+ settings: {
1581
+ foreground: "#9DAFFA"
1582
+ }
1583
+ },
1584
+ {
1585
+ scope: "keyword.other.phpdoc.php",
1586
+ settings: {
1587
+ fontStyle: ""
1588
+ }
1589
+ },
1590
+ {
1591
+ scope: ["support.variable.magic.python", "meta.function-call.arguments.python"],
1592
+ settings: {
1593
+ foreground: "#E7E7E8"
1594
+ }
1595
+ },
1596
+ {
1597
+ scope: ["support.function.magic.python"],
1598
+ settings: {
1599
+ foreground: "#9DAFFA"
1600
+ }
1601
+ },
1602
+ {
1603
+ scope: [
1604
+ "variable.parameter.function.language.special.self.python",
1605
+ "variable.language.special.self.python"
1606
+ ],
1607
+ settings: {
1608
+ foreground: "#F7869B"
1609
+ }
1610
+ },
1611
+ {
1612
+ scope: ["keyword.control.flow.python", "keyword.operator.logical.python"],
1613
+ settings: {
1614
+ foreground: "#C6A5EA"
1615
+ }
1616
+ },
1617
+ {
1618
+ scope: "storage.type.function.python",
1619
+ settings: {
1620
+ foreground: "#C6A5EA"
1621
+ }
1622
+ },
1623
+ {
1624
+ scope: [
1625
+ "support.token.decorator.python",
1626
+ "meta.function.decorator.identifier.python"
1627
+ ],
1628
+ settings: {
1629
+ foreground: "#9DAFFA"
1630
+ }
1631
+ },
1632
+ {
1633
+ scope: ["meta.function-call.python"],
1634
+ settings: {
1635
+ foreground: "#9DAFFA"
1636
+ }
1637
+ },
1638
+ {
1639
+ scope: [
1640
+ "entity.name.function.decorator.python",
1641
+ "punctuation.definition.decorator.python"
1642
+ ],
1643
+ settings: {
1644
+ foreground: "#EDD5A6"
1645
+ }
1646
+ },
1647
+ {
1648
+ scope: "constant.character.format.placeholder.other.python",
1649
+ settings: {
1650
+ foreground: "#EFB7C2"
1651
+ }
1652
+ },
1653
+ {
1654
+ scope: ["support.type.exception.python", "support.function.builtin.python"],
1655
+ settings: {
1656
+ foreground: "#EDD5A6"
1657
+ }
1658
+ },
1659
+ {
1660
+ scope: ["support.type.python"],
1661
+ settings: {
1662
+ foreground: "#EDD5A6"
1663
+ }
1664
+ },
1665
+ {
1666
+ scope: "constant.language.python",
1667
+ settings: {
1668
+ foreground: "#C6A5EA"
1669
+ }
1670
+ },
1671
+ {
1672
+ scope: ["meta.indexed-name.python", "meta.item-access.python"],
1673
+ settings: {
1674
+ foreground: "#F39EAE"
1675
+ }
1676
+ },
1677
+ {
1678
+ scope: "storage.type.string.python",
1679
+ settings: {
1680
+ foreground: "#88DCB7"
1681
+ }
1682
+ },
1683
+ {
1684
+ scope: "meta.function.parameters.python",
1685
+ settings: {
1686
+ fontStyle: ""
1687
+ }
1688
+ },
1689
+ {
1690
+ scope: [
1691
+ "string.regexp punctuation.definition.string.begin",
1692
+ "string.regexp punctuation.definition.string.end"
1693
+ ],
1694
+ settings: {
1695
+ foreground: "#EFB7C2"
1696
+ }
1697
+ },
1698
+ {
1699
+ scope: "keyword.control.anchor.regexp",
1700
+ settings: {
1701
+ foreground: "#C6A5EA"
1702
+ }
1703
+ },
1704
+ {
1705
+ scope: "string.regexp.ts",
1706
+ settings: {
1707
+ foreground: "#E7E7E8"
1708
+ }
1709
+ },
1710
+ {
1711
+ scope: [
1712
+ "punctuation.definition.group.regexp",
1713
+ "keyword.other.back-reference.regexp"
1714
+ ],
1715
+ settings: {
1716
+ foreground: "#88DCB7"
1717
+ }
1718
+ },
1719
+ {
1720
+ scope: "punctuation.definition.character-class.regexp",
1721
+ settings: {
1722
+ foreground: "#EDD5A6"
1723
+ }
1724
+ },
1725
+ {
1726
+ scope: "constant.other.character-class.regexp",
1727
+ settings: {
1728
+ foreground: "#EFB7C2"
1729
+ }
1730
+ },
1731
+ {
1732
+ scope: "constant.other.character-class.range.regexp",
1733
+ settings: {
1734
+ foreground: "#F5E0DC"
1735
+ }
1736
+ },
1737
+ {
1738
+ scope: "keyword.operator.quantifier.regexp",
1739
+ settings: {
1740
+ foreground: "#A7E0C8"
1741
+ }
1742
+ },
1743
+ {
1744
+ scope: "constant.character.numeric.regexp",
1745
+ settings: {
1746
+ foreground: "#EDD5A6"
1747
+ }
1748
+ },
1749
+ {
1750
+ scope: [
1751
+ "punctuation.definition.group.no-capture.regexp",
1752
+ "meta.assertion.look-ahead.regexp",
1753
+ "meta.assertion.negative-look-ahead.regexp"
1754
+ ],
1755
+ settings: {
1756
+ foreground: "#9DAFFA"
1757
+ }
1758
+ },
1759
+ {
1760
+ scope: [
1761
+ "meta.annotation.rust",
1762
+ "meta.annotation.rust punctuation",
1763
+ "meta.attribute.rust",
1764
+ "punctuation.definition.attribute.rust"
1765
+ ],
1766
+ settings: {
1767
+ foreground: "#EDD5A6"
1768
+ }
1769
+ },
1770
+ {
1771
+ scope: [
1772
+ "meta.attribute.rust string.quoted.double.rust",
1773
+ "meta.attribute.rust string.quoted.single.char.rust"
1774
+ ],
1775
+ settings: {
1776
+ fontStyle: ""
1777
+ }
1778
+ },
1779
+ {
1780
+ scope: [
1781
+ "entity.name.function.macro.rules.rust",
1782
+ "storage.type.module.rust",
1783
+ "storage.modifier.rust",
1784
+ "storage.type.struct.rust",
1785
+ "storage.type.enum.rust",
1786
+ "storage.type.trait.rust",
1787
+ "storage.type.union.rust",
1788
+ "storage.type.impl.rust",
1789
+ "storage.type.rust",
1790
+ "storage.type.function.rust",
1791
+ "storage.type.type.rust"
1792
+ ],
1793
+ settings: {
1794
+ foreground: "#C6A5EA",
1795
+ fontStyle: ""
1796
+ }
1797
+ },
1798
+ {
1799
+ scope: "entity.name.type.numeric.rust",
1800
+ settings: {
1801
+ foreground: "#C6A5EA",
1802
+ fontStyle: ""
1803
+ }
1804
+ },
1805
+ {
1806
+ scope: "meta.generic.rust",
1807
+ settings: {
1808
+ foreground: "#EDD5A6"
1809
+ }
1810
+ },
1811
+ {
1812
+ scope: "entity.name.impl.rust",
1813
+ settings: {
1814
+ foreground: "#EDD5A6"
1815
+ }
1816
+ },
1817
+ {
1818
+ scope: "entity.name.module.rust",
1819
+ settings: {
1820
+ foreground: "#EDD5A6"
1821
+ }
1822
+ },
1823
+ {
1824
+ scope: "entity.name.trait.rust",
1825
+ settings: {
1826
+ foreground: "#EDD5A6"
1827
+ }
1828
+ },
1829
+ {
1830
+ scope: "storage.type.source.rust",
1831
+ settings: {
1832
+ foreground: "#EDD5A6"
1833
+ }
1834
+ },
1835
+ {
1836
+ scope: "entity.name.union.rust",
1837
+ settings: {
1838
+ foreground: "#EDD5A6"
1839
+ }
1840
+ },
1841
+ {
1842
+ scope: "meta.enum.rust storage.type.source.rust",
1843
+ settings: {
1844
+ foreground: "#A7E0C8"
1845
+ }
1846
+ },
1847
+ {
1848
+ scope: [
1849
+ "support.macro.rust",
1850
+ "meta.macro.rust support.function.rust",
1851
+ "entity.name.function.macro.rust"
1852
+ ],
1853
+ settings: {
1854
+ foreground: "#9DAFFA"
1855
+ }
1856
+ },
1857
+ {
1858
+ scope: ["storage.modifier.lifetime.rust", "entity.name.type.lifetime"],
1859
+ settings: {
1860
+ foreground: "#9DAFFA"
1861
+ }
1862
+ },
1863
+ {
1864
+ scope: "string.quoted.double.rust constant.other.placeholder.rust",
1865
+ settings: {
1866
+ foreground: "#EFB7C2"
1867
+ }
1868
+ },
1869
+ {
1870
+ scope: "meta.function.return-type.rust meta.generic.rust storage.type.rust",
1871
+ settings: {
1872
+ foreground: "#E7E7E8"
1873
+ }
1874
+ },
1875
+ {
1876
+ scope: "meta.function.call.rust",
1877
+ settings: {
1878
+ foreground: "#9DAFFA"
1879
+ }
1880
+ },
1881
+ {
1882
+ scope: "punctuation.brackets.angle.rust",
1883
+ settings: {
1884
+ foreground: "#9DAFFA"
1885
+ }
1886
+ },
1887
+ {
1888
+ scope: "constant.other.caps.rust",
1889
+ settings: {
1890
+ foreground: "#EDD5A6"
1891
+ }
1892
+ },
1893
+ {
1894
+ scope: ["meta.function.definition.rust variable.other.rust"],
1895
+ settings: {
1896
+ foreground: "#F39EAE"
1897
+ }
1898
+ },
1899
+ {
1900
+ scope: "meta.function.call.rust variable.other.rust",
1901
+ settings: {
1902
+ foreground: "#E7E7E8"
1903
+ }
1904
+ },
1905
+ {
1906
+ scope: "variable.language.self.rust",
1907
+ settings: {
1908
+ foreground: "#F7869B"
1909
+ }
1910
+ },
1911
+ {
1912
+ scope: [
1913
+ "variable.other.metavariable.name.rust",
1914
+ "meta.macro.metavariable.rust keyword.operator.macro.dollar.rust"
1915
+ ],
1916
+ settings: {
1917
+ foreground: "#EFB7C2"
1918
+ }
1919
+ },
1920
+ {
1921
+ scope: [
1922
+ "comment.line.shebang",
1923
+ "comment.line.shebang punctuation.definition.comment",
1924
+ "comment.line.shebang",
1925
+ "punctuation.definition.comment.shebang.shell",
1926
+ "meta.shebang.shell"
1927
+ ],
1928
+ settings: {
1929
+ foreground: "#EFB7C2"
1930
+ }
1931
+ },
1932
+ {
1933
+ scope: "comment.line.shebang constant.language",
1934
+ settings: {
1935
+ foreground: "#A7E0C8"
1936
+ }
1937
+ },
1938
+ {
1939
+ scope: [
1940
+ "meta.function-call.arguments.shell punctuation.definition.variable.shell",
1941
+ "meta.function-call.arguments.shell punctuation.section.interpolation",
1942
+ "meta.function-call.arguments.shell punctuation.definition.variable.shell",
1943
+ "meta.function-call.arguments.shell punctuation.section.interpolation"
1944
+ ],
1945
+ settings: {
1946
+ foreground: "#F7869B"
1947
+ }
1948
+ },
1949
+ {
1950
+ scope: "meta.string meta.interpolation.parameter.shell variable.other.readwrite",
1951
+ settings: {
1952
+ foreground: "#EDD5A6"
1953
+ }
1954
+ },
1955
+ {
1956
+ scope: [
1957
+ "source.shell punctuation.section.interpolation",
1958
+ "punctuation.definition.evaluation.backticks.shell"
1959
+ ],
1960
+ settings: {
1961
+ foreground: "#A7E0C8"
1962
+ }
1963
+ },
1964
+ {
1965
+ scope: "entity.name.tag.heredoc.shell",
1966
+ settings: {
1967
+ foreground: "#C6A5EA"
1968
+ }
1969
+ },
1970
+ {
1971
+ scope: "string.quoted.double.shell variable.other.normal.shell",
1972
+ settings: {
1973
+ foreground: "#E7E7E8"
1974
+ }
1975
+ },
1976
+ {
1977
+ scope: "token.info-token",
1978
+ settings: {
1979
+ foreground: "#8BA1FF"
1980
+ }
1981
+ },
1982
+ {
1983
+ scope: "token.warn-token",
1984
+ settings: {
1985
+ foreground: "#F5B944"
1986
+ }
1987
+ },
1988
+ {
1989
+ scope: "token.error-token",
1990
+ settings: {
1991
+ foreground: "#FB6E88"
1992
+ }
1993
+ },
1994
+ {
1995
+ scope: "token.debug-token",
1996
+ settings: {
1997
+ foreground: "#BE95EB"
1998
+ }
1999
+ }
2000
+ ]
2001
+ };
2002
+
2003
+ // components/src/asciidoc/util.ts
2004
+ var highlighter = null;
2005
+ var customLanguages = ["oxql"];
2006
+ var supportedLanguages = [...Object.keys(bundledLanguages), ...customLanguages];
2007
+ async function getOrCreateHighlighter() {
2008
+ if (!highlighter) {
2009
+ const langs = [];
2010
+ langs.push({
2011
+ ...oxql_tmLanguage_default
2012
+ });
2013
+ highlighter = await getHighlighter({
2014
+ themes: [oxide_dark_default],
2015
+ langs
2016
+ });
2017
+ }
2018
+ return highlighter;
2019
+ }
2020
+ var highlight = async (block) => {
2021
+ if (block.type === "listing") {
2022
+ const literalBlock = block;
2023
+ if (!literalBlock.content) {
2024
+ return block;
2025
+ }
2026
+ const calloutRegex = /<i class="conum" data-value="\d+"><\/i>/g;
2027
+ const callouts = [];
2028
+ const placeholderContent = literalBlock.content.replace(calloutRegex, (match) => {
2029
+ callouts.push(match);
2030
+ return `__CALLOUT_PLACEHOLDER_${callouts.length - 1}__`;
2031
+ });
2032
+ if (!literalBlock.language) {
2033
+ return {
2034
+ ...block,
2035
+ content: placeholderContent.replace(
2036
+ /__CALLOUT_PLACEHOLDER_(\d+)__/g,
2037
+ (_, index) => callouts[parseInt(index)]
2038
+ )
2039
+ };
2040
+ }
2041
+ let lang = literalBlock.language;
2042
+ const h = await getOrCreateHighlighter();
2043
+ const loadedLanguages = h.getLoadedLanguages();
2044
+ if (!supportedLanguages.includes(lang)) {
2045
+ lang = "text";
2046
+ }
2047
+ if (!loadedLanguages.includes(lang)) {
2048
+ await h.loadLanguage(lang);
2049
+ }
2050
+ const highlightedContent = h.codeToHtml(placeholderContent, {
2051
+ lang,
2052
+ theme: oxide_dark_default,
2053
+ structure: "inline"
2054
+ });
2055
+ const restoredContent = highlightedContent.replace(
2056
+ /__CALLOUT_PLACEHOLDER_(\d+)__/g,
2057
+ (_, index) => callouts[parseInt(index)]
2058
+ );
2059
+ return {
2060
+ ...block,
2061
+ content: restoredContent
2062
+ };
2063
+ }
2064
+ return block;
12
2065
  };
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;
2066
+ var attrs = {
2067
+ sectlinks: "true",
2068
+ stem: "latexmath",
2069
+ stylesheet: false
2070
+ };
2071
+ var loadAsciidoctor = ({
2072
+ extensions = []
2073
+ }) => {
2074
+ const ad2 = asciidoctor();
2075
+ class InlineConverter2 {
2076
+ baseConverter;
2077
+ constructor() {
2078
+ this.baseConverter = new ad2.Html5Converter();
2079
+ }
2080
+ convert(node, transform) {
2081
+ switch (node.getNodeName()) {
2082
+ case "inline_callout":
2083
+ return convertInlineCallout(node);
2084
+ default:
2085
+ break;
2086
+ }
2087
+ return this.baseConverter.convert(node, transform);
2088
+ }
19
2089
  }
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")
2090
+ extensions.forEach((extension) => ad2.Extensions.register(extension));
2091
+ ad2.ConverterFactory.register(new InlineConverter2(), ["html5"]);
2092
+ return ad2;
2093
+ };
2094
+ function convertInlineCallout(node) {
2095
+ return `<i class="conum" data-value="${node.getText()}"></i>`;
2096
+ }
2097
+ var handleDocument = async (document) => {
2098
+ const doc = prepareDocument(document);
2099
+ return await processDocument(doc, highlight);
42
2100
  };
43
2101
 
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, {});
2102
+ // components/src/asciidoc/index.tsx
2103
+ import { jsx as jsx9 } from "react/jsx-runtime";
2104
+ var MinimalDocument = ({ document }) => /* @__PURE__ */ jsx9("div", { id: "content", className: "asciidoc-body w-full", children: /* @__PURE__ */ jsx9(Content4, { blocks: document.blocks }) });
2105
+ var AsciiDocBlocks = {
2106
+ Admonition: Admonition_default,
2107
+ Table: Table_default,
2108
+ Section: Section_default,
2109
+ MinimalDocument
2110
+ };
2111
+ var renderWithBreaks = (text) => {
2112
+ return text.split(/(<[^>]*>)/g).map((segment) => {
2113
+ if (segment.startsWith("<") && segment.endsWith(">")) {
2114
+ return segment;
2115
+ }
2116
+ return segment.replace(/(?:^|(?<=\S))\/(?=\S)/g, "/<wbr/>");
2117
+ }).join("");
2118
+ };
2119
+ var QUOTE_TAGS = {
2120
+ "monospaced": ["<code>", "</code>", true],
2121
+ "emphasis": ["<em>", "</em>", true],
2122
+ "strong": ["<strong>", "</strong>", true],
2123
+ "double": ["&#8220;", "&#8221;"],
2124
+ "single": ["&#8216;", "&#8217;"],
2125
+ "mark": ["<mark>", "</mark>", true],
2126
+ "superscript": ["<sup>", "</sup>", true],
2127
+ "subscript": ["<sub>", "</sub>", true],
2128
+ "unquoted": ["<span>", "</span>", true],
2129
+ "asciimath": ["\\$", "\\$"],
2130
+ "latexmath": ["\\(", "\\)"]
2131
+ };
2132
+ var chop = (str) => str.substring(0, str.length - 1);
2133
+ var convertInlineQuoted = (node) => {
2134
+ const type = node.getType();
2135
+ const quoteTag = QUOTE_TAGS[type];
2136
+ const [open, close, tag] = quoteTag || ["", ""];
2137
+ let text = node.getText();
2138
+ if (type === "monospaced") {
2139
+ text = renderWithBreaks(text);
2140
+ }
2141
+ const id = node.getId();
2142
+ const role = node.getRole();
2143
+ const idAttr = id ? `id="${id}"` : "";
2144
+ const classAttr = role ? `class="${role}"` : "";
2145
+ const attrs2 = `${idAttr} ${classAttr}`;
2146
+ if (id || role) {
2147
+ if (tag) {
2148
+ return `${chop(open)} ${attrs2}>${text}${close}`;
2149
+ } else {
2150
+ return `<span ${attrs2}>${open}${text}${close}</span>`;
2151
+ }
53
2152
  } else {
54
- icon = /* @__PURE__ */ jsx(Error12, { className: "rotate-180" });
2153
+ return `${open}${text}${close}`;
55
2154
  }
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
2155
  };
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
- )
2156
+ function convertInlineCallout2(node) {
2157
+ return `<i class="conum" data-value="${node.getText()}"></i>`;
2158
+ }
2159
+ var ad = asciidoctor2();
2160
+ var InlineConverter = class {
2161
+ baseConverter;
2162
+ constructor() {
2163
+ this.baseConverter = new ad.Html5Converter();
86
2164
  }
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
- )
2165
+ convert(node, transform) {
2166
+ switch (node.getNodeName()) {
2167
+ case "inline_quoted":
2168
+ return convertInlineQuoted(node);
2169
+ case "inline_callout":
2170
+ return convertInlineCallout2(node);
2171
+ default:
2172
+ break;
2173
+ }
2174
+ return this.baseConverter.convert(node, transform);
105
2175
  }
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
2176
  };
120
2177
 
121
2178
  // components/src/ui/badge/Badge.tsx
122
- import cn2 from "classnames";
123
- import { jsx as jsx3 } from "react/jsx-runtime";
2179
+ import cn4 from "classnames";
2180
+ import { jsx as jsx10 } from "react/jsx-runtime";
124
2181
  var badgeColors = {
125
2182
  default: {
126
2183
  default: `ring-1 ring-inset bg-accent-secondary text-accent ring-[rgba(var(--base-green-800-rgb),0.15)]`,
@@ -145,25 +2202,25 @@ var Badge = ({
145
2202
  color = "default",
146
2203
  variant = "default"
147
2204
  }) => {
148
- return /* @__PURE__ */ jsx3(
2205
+ return /* @__PURE__ */ jsx10(
149
2206
  "span",
150
2207
  {
151
- className: cn2(
2208
+ className: cn4(
152
2209
  "ox-badge",
153
2210
  `variant-${variant}`,
154
2211
  "inline-flex h-4 items-center whitespace-nowrap rounded-sm px-[3px] py-[1px] uppercase text-mono-sm",
155
2212
  badgeColors[variant][color],
156
2213
  className
157
2214
  ),
158
- children: /* @__PURE__ */ jsx3("span", { children })
2215
+ children: /* @__PURE__ */ jsx10("span", { children })
159
2216
  }
160
2217
  );
161
2218
  };
162
2219
 
163
2220
  // components/src/ui/button/Button.tsx
164
- import cn3 from "classnames";
2221
+ import cn5 from "classnames";
165
2222
  import { forwardRef } from "react";
166
- import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
2223
+ import { jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
167
2224
  var buttonSizes = ["sm", "icon", "base"];
168
2225
  var variants = ["primary", "secondary", "ghost", "danger"];
169
2226
  var sizeStyle = {
@@ -176,7 +2233,7 @@ var buttonStyle = ({
176
2233
  size: size2 = "base",
177
2234
  variant = "primary"
178
2235
  } = {}) => {
179
- return cn3(
2236
+ return cn5(
180
2237
  "ox-button inline-flex items-center justify-center rounded align-top elevation-1 disabled:cursor-not-allowed",
181
2238
  `btn-${variant}`,
182
2239
  sizeStyle[size2],
@@ -203,10 +2260,10 @@ var Button = forwardRef(
203
2260
  ...rest
204
2261
  }, ref) => {
205
2262
  const isDisabled = disabled || loading;
206
- return /* @__PURE__ */ jsxs2(
2263
+ return /* @__PURE__ */ jsxs8(
207
2264
  "button",
208
2265
  {
209
- className: cn3(buttonStyle({ size: size2, variant }), className, {
2266
+ className: cn5(buttonStyle({ size: size2, variant }), className, {
210
2267
  "visually-disabled": isDisabled
211
2268
  }),
212
2269
  ref,
@@ -216,8 +2273,8 @@ var Button = forwardRef(
216
2273
  "aria-disabled": isDisabled,
217
2274
  ...rest,
218
2275
  children: [
219
- loading && /* @__PURE__ */ jsx4(Spinner, { className: "absolute", variant }),
220
- /* @__PURE__ */ jsx4("span", { className: cn3("flex items-center", innerClassName, { invisible: loading }), children })
2276
+ loading && /* @__PURE__ */ jsx11(Spinner, { className: "absolute", variant }),
2277
+ /* @__PURE__ */ jsx11("span", { className: cn5("flex items-center", innerClassName, { invisible: loading }), children })
221
2278
  ]
222
2279
  }
223
2280
  );
@@ -225,9 +2282,9 @@ var Button = forwardRef(
225
2282
  );
226
2283
 
227
2284
  // 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";
2285
+ import cn6 from "classnames";
2286
+ import { useEffect as useEffect3, useRef as useRef2, useState as useState2 } from "react";
2287
+ import { Fragment as Fragment3, jsx as jsx12, jsxs as jsxs9 } from "react/jsx-runtime";
231
2288
  var spinnerSizes = ["base", "lg"];
232
2289
  var spinnerVariants = ["primary", "secondary", "ghost", "danger"];
233
2290
  var Spinner = ({
@@ -239,7 +2296,7 @@ var Spinner = ({
239
2296
  const center = size2 === "lg" ? 18 : 6;
240
2297
  const radius = size2 === "lg" ? 16 : 5;
241
2298
  const strokeWidth = size2 === "lg" ? 3 : 2;
242
- return /* @__PURE__ */ jsxs3(
2299
+ return /* @__PURE__ */ jsxs9(
243
2300
  "svg",
244
2301
  {
245
2302
  width: frameSize,
@@ -248,9 +2305,9 @@ var Spinner = ({
248
2305
  fill: "none",
249
2306
  xmlns: "http://www.w3.org/2000/svg",
250
2307
  "aria-labelledby": "Spinner",
251
- className: cn4("spinner", `spinner-${variant}`, `spinner-${size2}`, className),
2308
+ className: cn6("spinner", `spinner-${variant}`, `spinner-${size2}`, className),
252
2309
  children: [
253
- /* @__PURE__ */ jsx5(
2310
+ /* @__PURE__ */ jsx12(
254
2311
  "circle",
255
2312
  {
256
2313
  fill: "none",
@@ -263,7 +2320,7 @@ var Spinner = ({
263
2320
  strokeOpacity: 0.2
264
2321
  }
265
2322
  ),
266
- /* @__PURE__ */ jsx5(
2323
+ /* @__PURE__ */ jsx12(
267
2324
  "circle",
268
2325
  {
269
2326
  className: "path",
@@ -281,10 +2338,10 @@ var Spinner = ({
281
2338
  );
282
2339
  };
283
2340
  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(() => {
2341
+ const [isVisible, setIsVisible] = useState2(isLoading);
2342
+ const hideTimeout = useRef2(null);
2343
+ const loadingStartTime = useRef2(0);
2344
+ useEffect3(() => {
288
2345
  if (isLoading) {
289
2346
  setIsVisible(true);
290
2347
  loadingStartTime.current = Date.now();
@@ -304,88 +2361,24 @@ var SpinnerLoader = ({ isLoading, children = null, minTime = 500 }) => {
304
2361
  clearTimeout(hideTimeout.current);
305
2362
  };
306
2363
  }, [isLoading, minTime]);
307
- return isVisible ? /* @__PURE__ */ jsx5(Spinner, {}) : /* @__PURE__ */ jsx5(Fragment, { children });
2364
+ return isVisible ? /* @__PURE__ */ jsx12(Spinner, {}) : /* @__PURE__ */ jsx12(Fragment3, { children });
308
2365
  };
309
2366
 
310
2367
  // 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";
2368
+ import { Content as Content5, List, Root as Root2, Trigger as Trigger2 } from "@radix-ui/react-tabs";
2369
+ import cn7 from "classnames";
2370
+ import { jsx as jsx13 } from "react/jsx-runtime";
314
2371
  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) })
2372
+ Root: ({ className, ...props }) => /* @__PURE__ */ jsx13(Root2, { ...props, className: cn7("ox-tabs", className) }),
2373
+ Trigger: ({ children, className, ...props }) => /* @__PURE__ */ jsx13(Trigger2, { ...props, className: cn7("ox-tab", className), children: /* @__PURE__ */ jsx13("div", { children }) }),
2374
+ List: ({ className, ...props }) => /* @__PURE__ */ jsx13(List, { ...props, className: cn7("ox-tabs-list", className) }),
2375
+ Content: ({ className, ...props }) => /* @__PURE__ */ jsx13(Content5, { ...props, className: cn7("ox-tabs-panel", className) })
319
2376
  };
320
2377
 
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
2378
  // 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" });
2379
+ import cn8 from "classnames";
2380
+ import { jsx as jsx14, jsxs as jsxs10 } from "react/jsx-runtime";
2381
+ var Check = () => /* @__PURE__ */ jsx14(Checkmark12Icon_default, { className: "pointer-events-none absolute left-0.5 top-0.5 h-3 w-3 fill-current text-accent" });
389
2382
  var Indeterminate = classed.div`absolute w-2 h-0.5 left-1 top-[7px] bg-accent pointer-events-none`;
390
2383
  var inputStyle = `
391
2384
  appearance-none border border-default bg-default h-4 w-4 rounded-sm absolute left-0 outline-none
@@ -399,28 +2392,28 @@ var Checkbox = ({
399
2392
  children,
400
2393
  className,
401
2394
  ...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(
2395
+ }) => /* @__PURE__ */ jsxs10("label", { className: "inline-flex items-center", children: [
2396
+ /* @__PURE__ */ jsxs10("span", { className: "relative h-4 w-4", children: [
2397
+ /* @__PURE__ */ jsx14(
405
2398
  "input",
406
2399
  {
407
- className: cn6(inputStyle, className),
2400
+ className: cn8(inputStyle, className),
408
2401
  type: "checkbox",
409
2402
  ref: (el) => el && (el.indeterminate = !!indeterminate),
410
2403
  ...inputProps
411
2404
  }
412
2405
  ),
413
- inputProps.checked && !indeterminate && /* @__PURE__ */ jsx9(Check, {}),
414
- indeterminate && /* @__PURE__ */ jsx9(Indeterminate, {})
2406
+ inputProps.checked && !indeterminate && /* @__PURE__ */ jsx14(Check, {}),
2407
+ indeterminate && /* @__PURE__ */ jsx14(Indeterminate, {})
415
2408
  ] }),
416
- children && /* @__PURE__ */ jsx9("span", { className: "ml-2.5 text-sans-md text-secondary", children })
2409
+ children && /* @__PURE__ */ jsx14("span", { className: "ml-2.5 text-sans-md text-secondary", children })
417
2410
  ] });
418
2411
 
419
2412
  // components/src/ui/listbox/Listbox.tsx
420
2413
  import { FloatingPortal, flip, offset, size, useFloating } from "@floating-ui/react";
421
2414
  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";
2415
+ import cn9 from "classnames";
2416
+ import { Fragment as Fragment4, jsx as jsx15, jsxs as jsxs11 } from "react/jsx-runtime";
424
2417
  var Listbox = ({
425
2418
  name,
426
2419
  selected,
@@ -449,19 +2442,19 @@ var Listbox = ({
449
2442
  const selectedItem = selected && items.find((i) => i.value === selected);
450
2443
  const noItems = !isLoading && items.length === 0;
451
2444
  const isDisabled = disabled || noItems;
452
- return /* @__PURE__ */ jsx10("div", { className: cn7("relative", className), children: /* @__PURE__ */ jsx10(
2445
+ return /* @__PURE__ */ jsx15("div", { className: cn9("relative", className), children: /* @__PURE__ */ jsx15(
453
2446
  Select,
454
2447
  {
455
2448
  value: selected,
456
2449
  onChange: (val) => val !== null && onChange(val),
457
2450
  disabled: isDisabled || isLoading,
458
- children: ({ open }) => /* @__PURE__ */ jsxs7(Fragment2, { children: [
459
- /* @__PURE__ */ jsxs7(
2451
+ children: ({ open }) => /* @__PURE__ */ jsxs11(Fragment4, { children: [
2452
+ /* @__PURE__ */ jsxs11(
460
2453
  Select.Button,
461
2454
  {
462
2455
  name,
463
2456
  ref: refs.setReference,
464
- className: cn7(
2457
+ className: cn9(
465
2458
  `flex h-10 w-full items-center justify-between
466
2459
  rounded border text-sans-md`,
467
2460
  hasError ? "focus-error border-error-secondary hover:border-error" : "border-default hover:border-hover",
@@ -472,37 +2465,37 @@ var Listbox = ({
472
2465
  ),
473
2466
  ...props,
474
2467
  children: [
475
- /* @__PURE__ */ jsx10("div", { className: "w-full px-3 text-left", children: selectedItem ? (
2468
+ /* @__PURE__ */ jsx15("div", { className: "w-full px-3 text-left", children: selectedItem ? (
476
2469
  // labelString is one line, which is what we need when label is a ReactNode
477
2470
  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(
2471
+ ) : /* @__PURE__ */ jsx15("span", { className: "text-quaternary", children: noItems ? "No items" : placeholder }) }),
2472
+ !isDisabled && /* @__PURE__ */ jsx15(SpinnerLoader, { isLoading }),
2473
+ /* @__PURE__ */ jsx15(
481
2474
  "div",
482
2475
  {
483
2476
  className: "ml-3 flex h-[calc(100%-12px)] items-center border-l px-3 border-secondary",
484
2477
  "aria-hidden": true,
485
- children: /* @__PURE__ */ jsx10(SelectArrows6Icon_default, { className: "h-[14px] w-2 text-tertiary" })
2478
+ children: /* @__PURE__ */ jsx15(SelectArrows6Icon_default, { className: "h-[14px] w-2 text-tertiary" })
486
2479
  }
487
2480
  )
488
2481
  ]
489
2482
  }
490
2483
  ),
491
- /* @__PURE__ */ jsx10(FloatingPortal, { children: /* @__PURE__ */ jsx10(
2484
+ /* @__PURE__ */ jsx15(FloatingPortal, { children: /* @__PURE__ */ jsx15(
492
2485
  Select.Options,
493
2486
  {
494
2487
  ref: refs.setFloating,
495
2488
  style: floatingStyles,
496
2489
  className: "ox-menu pointer-events-auto z-50 overflow-y-auto !outline-none",
497
- children: items.map((item) => /* @__PURE__ */ jsx10(
2490
+ children: items.map((item) => /* @__PURE__ */ jsx15(
498
2491
  Select.Option,
499
2492
  {
500
2493
  value: item.value,
501
2494
  className: "relative border-b border-secondary last:border-0",
502
- children: ({ active, selected: selected2 }) => /* @__PURE__ */ jsx10(
2495
+ children: ({ active, selected: selected2 }) => /* @__PURE__ */ jsx15(
503
2496
  "div",
504
2497
  {
505
- className: cn7(
2498
+ className: cn9(
506
2499
  "ox-menu-item text-secondary",
507
2500
  selected2 && "is-selected",
508
2501
  active && "is-highlighted"
@@ -524,15 +2517,26 @@ export {
524
2517
  Badge,
525
2518
  Button,
526
2519
  Checkbox,
2520
+ DesktopOutline,
2521
+ InlineConverter,
527
2522
  Listbox,
2523
+ SmallScreenOutline,
528
2524
  Spinner,
529
2525
  SpinnerLoader,
530
2526
  Tabs,
2527
+ attrs,
531
2528
  badgeColors,
532
2529
  buttonSizes,
533
2530
  buttonStyle,
2531
+ handleDocument,
2532
+ highlight,
2533
+ loadAsciidoctor,
2534
+ renderWithBreaks,
534
2535
  spinnerSizes,
535
2536
  spinnerVariants,
2537
+ useActiveSectionTracking,
2538
+ useDelegatedReactRouterLinks,
2539
+ useIntersectionObserver,
536
2540
  variants
537
2541
  };
538
2542
  //# sourceMappingURL=index.js.map