@oxide/design-system 3.1.0--canary.148.17974324016.0 → 3.2.0--canary.151.18509831946.0

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