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