@factorialco/f0-react 12.10.0 → 12.11.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/ArchiveThumbnail-cs8kx5Zf.js +70 -0
- package/dist/ArchiveViewer-BXUH8Lm5.js +172 -0
- package/dist/{ChatPostComposerDialog-DcmLrQk6.js → ChatPostComposerDialog-CGil1xkf.js} +4 -4
- package/dist/{CoachmarkProvider-XfLjB3dH.js → CoachmarkProvider-cZnuTk79.js} +29938 -29932
- package/dist/CodeThumbnail-Dcer4AyK.js +31 -0
- package/dist/CodeViewer-DFBwdIFm.js +98 -0
- package/dist/DocumentToolbar-vZEyzJ89.js +74 -0
- package/dist/{DocxThumbnail-kHTNnwW0.js → DocxThumbnail-CK9vFoTB.js} +2 -2
- package/dist/{DocxViewer-CqHgSExq.js → DocxViewer-DQV5Kv1n.js} +25 -23
- package/dist/ExternalLink-RdKU698E.js +22 -0
- package/dist/{F0AiProcessingOverlay-H23WHd7F.js → F0AiProcessingOverlay-DjGkQ2Nc.js} +1349 -1345
- package/dist/{popover-BjrPOMeQ.js → F0Button-FXkThQ9H.js} +3164 -8587
- package/dist/{F0CanvasPanel--hLKeQvg.js → F0CanvasPanel-BgDo2LWP.js} +9436 -9008
- package/dist/F0DocumentViewer-BXifXzUW.js +79 -0
- package/dist/F0DocumentViewer-DWuIFBHu.js +3 -0
- package/dist/F0Icon-Cj0USbCF.js +202 -0
- package/dist/{F0Map-hvgCUGk8.js → F0Map-Dwev4u-_.js} +189 -188
- package/dist/{F0Select-B-ZxVjXG.js → F0Select-BWWdEd7l.js} +6696 -6726
- package/dist/{F0Text-D92NWQRd.js → F0Text-DMZW7dhN.js} +25 -41
- package/dist/{F0VideoPlayer-CNp5hXgp.js → F0VideoPlayer-BmCmHG87.js} +412 -408
- package/dist/F0VideoPlayer-C8oYUUZM.js +1 -0
- package/dist/HtmlThumbnail-BAgkBH2r.js +60 -0
- package/dist/HtmlViewer-FRfNoxhP.js +208 -0
- package/dist/LockLocked-gdodYvT_.js +41 -0
- package/dist/{Map-eIXVKc1x.js → Map-BxGPElF2.js} +57 -54
- package/dist/{PdfThumbnail-CCSmwxQU.js → PdfThumbnail-CpGZz5Kq.js} +5 -5
- package/dist/PdfViewer-C81MK43i.js +296 -0
- package/dist/SandboxedHtmlFrame-B6YWhgyg.js +309 -0
- package/dist/{SheetViewer-BN5UYkEZ.js → SheetViewer-DPGpMNqq.js} +36 -26
- package/dist/TextThumbnail-DKNxh344.js +15 -0
- package/dist/{TextViewer-Bt0_dYB-.js → TextViewer-BH42AeG8.js} +44 -41
- package/dist/ai.d.ts +3 -3
- package/dist/ai.js +5 -5
- package/dist/bash-BcZBmoDA.js +169 -0
- package/dist/c-Dv-5_kUQ.js +187 -0
- package/dist/component-status.js +2 -2
- package/dist/core-C0MCmPil.js +842 -0
- package/dist/cpp-CMQhucZt.js +236 -0
- package/dist/csharp-CuDKSCf2.js +260 -0
- package/dist/css-Dta7Q4Li.js +145 -0
- package/dist/dart-po7Eq73d.js +134 -0
- package/dist/diff-IgsQP-8T.js +39 -0
- package/dist/dist-D-MJbPvE.js +59 -0
- package/dist/dockerfile-B4Bz9I5u.js +34 -0
- package/dist/dos-1TcyLtUq.js +57 -0
- package/dist/elixir-BnEjyLGa.js +189 -0
- package/dist/erlang-tgri7ZSv.js +218 -0
- package/dist/experimental.d.ts +24 -4
- package/dist/experimental.js +2711 -2702
- package/dist/{exports-BByQBwpi.d.ts → exports-C0yM5usu.d.ts} +1 -1
- package/dist/f0.d.ts +130 -8
- package/dist/f0.js +751 -745
- package/dist/fetchText-o_GOtiv3.js +54 -0
- package/dist/go-CEVmppuo.js +144 -0
- package/dist/graphql-BWwc-u8d.js +67 -0
- package/dist/groovy-BELuqtd6.js +127 -0
- package/dist/haskell-Cxh7aaFM.js +138 -0
- package/dist/highlight-CyebkDAD.js +114 -0
- package/dist/i18n-provider-BBhzYHef.js +150 -0
- package/dist/{i18n-provider-defaults-p0UGTA_k.js → i18n-provider-defaults-BUagKwGN.js} +32 -1
- package/dist/{i18n-provider-defaults-DQxuUMpU.d.ts → i18n-provider-defaults-CTDMMs-y.d.ts} +31 -0
- package/dist/i18n-provider-defaults.d.ts +1 -1
- package/dist/i18n-provider-defaults.js +1 -1
- package/dist/{index-D3nEDg8x.d.ts → index-CduxMW5L.d.ts} +1 -1
- package/dist/ini-DA-F0rRr.js +88 -0
- package/dist/java-Bujnoc_f.js +174 -0
- package/dist/javascript-BeEhpXRE.js +431 -0
- package/dist/json-CxvE7tEw.js +42 -0
- package/dist/kotlin-DOwDGI_m.js +206 -0
- package/dist/less-DWlR-e-o.js +196 -0
- package/dist/lua-BlZiakwh.js +46 -0
- package/dist/makefile-D3841Yg4.js +57 -0
- package/dist/{maplibre-Bywi9z2G.js → maplibre-g-8NG-3q.js} +1 -1
- package/dist/markdown-D1wNG79U.js +178 -0
- package/dist/objectivec-DxtRzTBy.js +117 -0
- package/dist/ownValue-D4uSXt0d.js +4 -0
- package/dist/{pdfWorker-CKgxOaCl.js → pdfWorker-D5NB2V5s.js} +12 -9
- package/dist/pdfWorkerConfig-BwllKt1K.js +8 -0
- package/dist/perl-BWRmkuyz.js +192 -0
- package/dist/php-CjwybYSP.js +300 -0
- package/dist/popover-CQztsDta.js +4486 -0
- package/dist/{posts-DGtDUrKT.js → posts-BHRBUAYJ.js} +2 -0
- package/dist/powershell-CgKcNA5Q.js +188 -0
- package/dist/properties-Bc45MTzW.js +38 -0
- package/dist/protobuf-Bv_xSUaI.js +61 -0
- package/dist/purify.es-ZpfdAuNV.js +545 -0
- package/dist/python-D8PdGjgy.js +238 -0
- package/dist/r-DA-9ZIdU.js +140 -0
- package/dist/{renderDocx-_UmnE-yc.js → renderDocx-BW-uDyaZ.js} +2 -0
- package/dist/ruby-Bqr16BpN.js +262 -0
- package/dist/rust-BCvJMwk8.js +182 -0
- package/dist/scala-Du8mOD2z.js +162 -0
- package/dist/scss-AMxHqh46.js +155 -0
- package/dist/skeleton-DqejhQgn.js +72 -0
- package/dist/sql-BbYSgcOA.js +118 -0
- package/dist/styles.css +1 -1
- package/dist/swift-DRKtalPn.js +575 -0
- package/dist/toolbarStyles-0IygMI4H.js +52 -0
- package/dist/{types-UMYBr8Mi.d.ts → types-DlwD3i9z.d.ts} +3 -95
- package/dist/typescript-Bv8uKU6V.js +516 -0
- package/dist/{useData-B7LYSzh0.js → useData-Dkq5W4r6.js} +4917 -4876
- package/dist/useFetchedText-BR3_KLXx.js +38 -0
- package/dist/useThumbnailText-DwXQvLIe.js +22 -0
- package/dist/xml-BVpP05uE.js +162 -0
- package/dist/yaml-BNe2WG-i.js +144 -0
- package/dist/zipTree-B2zUYl6b.js +247 -0
- package/package.json +2 -1
- package/dist/DocumentToolbar-CqbY6eID.js +0 -70
- package/dist/F0DocumentViewer-BN-2IVgz.js +0 -400
- package/dist/F0DocumentViewer-D1G3M2J_.js +0 -3
- package/dist/F0VideoPlayer-D4bZBBLK.js +0 -1
- package/dist/TextThumbnail-X04JgaNI.js +0 -26
- package/dist/dist-DvxtFKDL.js +0 -78
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { t as e } from "./i18n-provider-defaults-BUagKwGN.js";
|
|
2
|
+
import { createContext as t, forwardRef as n, memo as r, useContext as i, useEffect as a, useMemo as o, useState as s } from "react";
|
|
3
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
4
|
+
//#region src/elements/providers/user-platafform/user-platform.ts
|
|
5
|
+
var l = async () => {
|
|
6
|
+
if (navigator.userAgentData) {
|
|
7
|
+
let e = (await navigator.userAgentData.getHighEntropyValues(["platform"])).platform?.toLowerCase() || "";
|
|
8
|
+
switch (!0) {
|
|
9
|
+
case e.includes("mac"): return "mac";
|
|
10
|
+
case e.includes("windows"): return "windows";
|
|
11
|
+
case e.includes("linux"): return "linux";
|
|
12
|
+
case navigator.userAgentData.mobile: return "mobile";
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
let e = navigator.userAgent.toLowerCase();
|
|
16
|
+
switch (!0) {
|
|
17
|
+
case /mac|iphone|ipod|ipad/.test(e): return "mac";
|
|
18
|
+
case e.includes("win"): return "windows";
|
|
19
|
+
case e.includes("linux"): return "linux";
|
|
20
|
+
case /android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(e): return "mobile";
|
|
21
|
+
default: return "unknown";
|
|
22
|
+
}
|
|
23
|
+
}, u = t(null), d = ({ children: e, platform: t, isDev: n = !1, showExperimentalWarnings: r = !1, renderDataTestIdAttribute: i = !1, hourCycle: o }) => {
|
|
24
|
+
let [d, f] = s(t ?? "unknown");
|
|
25
|
+
return a(() => {
|
|
26
|
+
t === void 0 && l().then(f);
|
|
27
|
+
}, [t]), /* @__PURE__ */ c(u.Provider, {
|
|
28
|
+
value: {
|
|
29
|
+
platform: d,
|
|
30
|
+
isDev: n,
|
|
31
|
+
showExperimentalWarnings: r,
|
|
32
|
+
renderDataTestIdAttribute: i,
|
|
33
|
+
hourCycle: o
|
|
34
|
+
},
|
|
35
|
+
children: e
|
|
36
|
+
});
|
|
37
|
+
}, f = () => {
|
|
38
|
+
let e = i(u);
|
|
39
|
+
if (e === null) throw Error("useIsDev must be used within an UserPlatformProvider");
|
|
40
|
+
return e.isDev;
|
|
41
|
+
};
|
|
42
|
+
function p() {
|
|
43
|
+
let e = i(u);
|
|
44
|
+
if (e === null) throw Error("useUserPlatform must be used within an UserPlatformProvider");
|
|
45
|
+
return e.platform;
|
|
46
|
+
}
|
|
47
|
+
function m() {
|
|
48
|
+
return i(u)?.renderDataTestIdAttribute ?? !1;
|
|
49
|
+
}
|
|
50
|
+
function h() {
|
|
51
|
+
let e = i(u);
|
|
52
|
+
return e === null ? (console.warn("useShowExperimentalWarnings must be used within an UserPlatformProvider"), !1) : e.showExperimentalWarnings;
|
|
53
|
+
}
|
|
54
|
+
function g() {
|
|
55
|
+
return i(u)?.hourCycle;
|
|
56
|
+
}
|
|
57
|
+
//#endregion
|
|
58
|
+
//#region src/elements/lib/data-testid/data-testid.tsx
|
|
59
|
+
var _ = /* @__PURE__ */ new Set([
|
|
60
|
+
"prototype",
|
|
61
|
+
"length",
|
|
62
|
+
"name",
|
|
63
|
+
"$$typeof",
|
|
64
|
+
"render"
|
|
65
|
+
]), v = (e, t) => {
|
|
66
|
+
let n = [...Object.getOwnPropertyNames(e), ...Object.getOwnPropertySymbols(e)];
|
|
67
|
+
for (let r of n) if (!_.has(r)) try {
|
|
68
|
+
let n = Object.getOwnPropertyDescriptor(e, r);
|
|
69
|
+
n && Object.defineProperty(t, r, n);
|
|
70
|
+
} catch {}
|
|
71
|
+
}, y = ({ dataTestId: e, children: t }) => {
|
|
72
|
+
let n = m();
|
|
73
|
+
return !e || !n ? t : /* @__PURE__ */ c("div", {
|
|
74
|
+
"data-testid": e,
|
|
75
|
+
className: "contents",
|
|
76
|
+
children: t
|
|
77
|
+
});
|
|
78
|
+
}, b = (e) => {
|
|
79
|
+
if (e.$$typeof === Symbol.for("react.forward_ref")) {
|
|
80
|
+
let t = e, r = n((e, n) => {
|
|
81
|
+
let { dataTestId: r, ...i } = e;
|
|
82
|
+
return /* @__PURE__ */ c(y, {
|
|
83
|
+
dataTestId: r,
|
|
84
|
+
children: /* @__PURE__ */ c(t, {
|
|
85
|
+
...i,
|
|
86
|
+
ref: n
|
|
87
|
+
})
|
|
88
|
+
});
|
|
89
|
+
});
|
|
90
|
+
return v(e, r), r.displayName ||= e.displayName || e.name || e.render?.name || "Component", r;
|
|
91
|
+
}
|
|
92
|
+
if (e.$$typeof === Symbol.for("react.memo")) {
|
|
93
|
+
let t = e.type, n = e.compare, i = b(t), a = r(i, n);
|
|
94
|
+
return v(e, a), a.displayName ||= e.displayName || e.name || e.type?.displayName || "Component", a;
|
|
95
|
+
}
|
|
96
|
+
let t = n((t, n) => {
|
|
97
|
+
let { dataTestId: r, ...i } = t;
|
|
98
|
+
return /* @__PURE__ */ c(y, {
|
|
99
|
+
dataTestId: r,
|
|
100
|
+
children: /* @__PURE__ */ c(e, {
|
|
101
|
+
...i,
|
|
102
|
+
ref: n
|
|
103
|
+
})
|
|
104
|
+
});
|
|
105
|
+
});
|
|
106
|
+
return v(e, t), t.displayName ||= e.displayName || e.name || "Component", t;
|
|
107
|
+
}, x = t(null), S = (e, t) => {
|
|
108
|
+
let n = e.split("."), r = t;
|
|
109
|
+
for (let e of n) if (r && typeof r == "object" && e in r) r = r[e];
|
|
110
|
+
else return;
|
|
111
|
+
return typeof r == "string" ? r : void 0;
|
|
112
|
+
}, C = (e) => typeof e == "object" && !!e && !Array.isArray(e), w = (e, t) => {
|
|
113
|
+
let n = { ...e };
|
|
114
|
+
for (let [e, r] of Object.entries(t)) {
|
|
115
|
+
if (r === void 0) continue;
|
|
116
|
+
let t = n[e];
|
|
117
|
+
n[e] = C(r) && C(t) ? w(t, r) : r;
|
|
118
|
+
}
|
|
119
|
+
return n;
|
|
120
|
+
};
|
|
121
|
+
function T({ children: t, translations: n }) {
|
|
122
|
+
let r = o(() => w(e, n), [n]), i = (e, t = {}) => {
|
|
123
|
+
let n = S(e, r);
|
|
124
|
+
if (n === void 0) return console.warn(`Translation key ${e} not found`), e;
|
|
125
|
+
for (let [e, r] of Object.entries(t)) n = n.replace(`{{${e}}}`, r.toString());
|
|
126
|
+
return n;
|
|
127
|
+
};
|
|
128
|
+
return /* @__PURE__ */ c(x.Provider, {
|
|
129
|
+
value: {
|
|
130
|
+
...r,
|
|
131
|
+
t: i
|
|
132
|
+
},
|
|
133
|
+
children: t
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
var E = {
|
|
137
|
+
...e,
|
|
138
|
+
t: (t, n = {}) => {
|
|
139
|
+
let r = S(t, e);
|
|
140
|
+
if (r === void 0) return t;
|
|
141
|
+
for (let [e, t] of Object.entries(n)) r = r.replace(`{{${e}}}`, t.toString());
|
|
142
|
+
return r;
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
function D() {
|
|
146
|
+
return i(x) ?? E;
|
|
147
|
+
}
|
|
148
|
+
var O = (e) => e;
|
|
149
|
+
//#endregion
|
|
150
|
+
export { b as a, f as c, y as i, h as l, O as n, d as o, D as r, g as s, T as t, p as u };
|
|
@@ -948,6 +948,7 @@ var e = {
|
|
|
948
948
|
videoPlayerLabel: "Video player: {{name}}",
|
|
949
949
|
loadingVideo: "Loading video: {{name}}",
|
|
950
950
|
previewUnavailable: "Can't preview this file",
|
|
951
|
+
playNamedAudio: "Play {{name}}",
|
|
951
952
|
photo: "Photo",
|
|
952
953
|
photoCount: {
|
|
953
954
|
one: "{{count}} photo",
|
|
@@ -1542,7 +1543,37 @@ var e = {
|
|
|
1542
1543
|
showingFirstRows: {
|
|
1543
1544
|
one: "Showing the first row",
|
|
1544
1545
|
other: "Showing the first {{count}} rows"
|
|
1545
|
-
}
|
|
1546
|
+
},
|
|
1547
|
+
copyCode: "Copy code",
|
|
1548
|
+
copied: "Copied",
|
|
1549
|
+
wrapLines: "Wrap lines",
|
|
1550
|
+
codeRegion: "Source code of {{name}}",
|
|
1551
|
+
reload: "Reload",
|
|
1552
|
+
contentFrom: "Content from {{sender}}",
|
|
1553
|
+
htmlFrameTitle: "Preview of {{name}}",
|
|
1554
|
+
runContent: "Run content",
|
|
1555
|
+
runContentWarning: "Scripts in this file are turned off. Run them only if you trust where it came from.",
|
|
1556
|
+
htmlCantRun: "Scripts can't run here, so this page may not look right.",
|
|
1557
|
+
htmlNavigatedAway: "This page kept trying to open another site, so the preview was closed. You can still download it.",
|
|
1558
|
+
externalLinkTitle: "This link goes to {{host}}",
|
|
1559
|
+
externalLinkOpen: "Open link",
|
|
1560
|
+
archiveLabel: "Contents of {{name}}",
|
|
1561
|
+
archiveFiles: {
|
|
1562
|
+
one: "{{count}} file",
|
|
1563
|
+
other: "{{count}} files"
|
|
1564
|
+
},
|
|
1565
|
+
archiveFolders: {
|
|
1566
|
+
one: "{{count}} folder",
|
|
1567
|
+
other: "{{count}} folders"
|
|
1568
|
+
},
|
|
1569
|
+
archiveSize: "{{size}} uncompressed",
|
|
1570
|
+
archiveEncrypted: "Password protected",
|
|
1571
|
+
archiveEncryptedCount: {
|
|
1572
|
+
one: "{{count}} password-protected file",
|
|
1573
|
+
other: "{{count}} password-protected files"
|
|
1574
|
+
},
|
|
1575
|
+
archiveTruncated: "Showing the first {{shown}} of {{total}} items",
|
|
1576
|
+
archiveEmpty: "This archive is empty"
|
|
1546
1577
|
},
|
|
1547
1578
|
videoPlayer: {
|
|
1548
1579
|
regionLabel: "Video player",
|
|
@@ -979,6 +979,7 @@ declare const defaultTranslations: {
|
|
|
979
979
|
readonly videoPlayerLabel: "Video player: {{name}}";
|
|
980
980
|
readonly loadingVideo: "Loading video: {{name}}";
|
|
981
981
|
readonly previewUnavailable: "Can't preview this file";
|
|
982
|
+
readonly playNamedAudio: "Play {{name}}";
|
|
982
983
|
readonly photo: "Photo";
|
|
983
984
|
readonly photoCount: {
|
|
984
985
|
readonly one: "{{count}} photo";
|
|
@@ -1586,6 +1587,36 @@ declare const defaultTranslations: {
|
|
|
1586
1587
|
readonly one: "Showing the first row";
|
|
1587
1588
|
readonly other: "Showing the first {{count}} rows";
|
|
1588
1589
|
};
|
|
1590
|
+
readonly copyCode: "Copy code";
|
|
1591
|
+
readonly copied: "Copied";
|
|
1592
|
+
readonly wrapLines: "Wrap lines";
|
|
1593
|
+
readonly codeRegion: "Source code of {{name}}";
|
|
1594
|
+
readonly reload: "Reload";
|
|
1595
|
+
readonly contentFrom: "Content from {{sender}}";
|
|
1596
|
+
readonly htmlFrameTitle: "Preview of {{name}}";
|
|
1597
|
+
readonly runContent: "Run content";
|
|
1598
|
+
readonly runContentWarning: "Scripts in this file are turned off. Run them only if you trust where it came from.";
|
|
1599
|
+
readonly htmlCantRun: "Scripts can't run here, so this page may not look right.";
|
|
1600
|
+
readonly htmlNavigatedAway: "This page kept trying to open another site, so the preview was closed. You can still download it.";
|
|
1601
|
+
readonly externalLinkTitle: "This link goes to {{host}}";
|
|
1602
|
+
readonly externalLinkOpen: "Open link";
|
|
1603
|
+
readonly archiveLabel: "Contents of {{name}}";
|
|
1604
|
+
readonly archiveFiles: {
|
|
1605
|
+
readonly one: "{{count}} file";
|
|
1606
|
+
readonly other: "{{count}} files";
|
|
1607
|
+
};
|
|
1608
|
+
readonly archiveFolders: {
|
|
1609
|
+
readonly one: "{{count}} folder";
|
|
1610
|
+
readonly other: "{{count}} folders";
|
|
1611
|
+
};
|
|
1612
|
+
readonly archiveSize: "{{size}} uncompressed";
|
|
1613
|
+
readonly archiveEncrypted: "Password protected";
|
|
1614
|
+
readonly archiveEncryptedCount: {
|
|
1615
|
+
readonly one: "{{count}} password-protected file";
|
|
1616
|
+
readonly other: "{{count}} password-protected files";
|
|
1617
|
+
};
|
|
1618
|
+
readonly archiveTruncated: "Showing the first {{shown}} of {{total}} items";
|
|
1619
|
+
readonly archiveEmpty: "This archive is empty";
|
|
1589
1620
|
};
|
|
1590
1621
|
readonly videoPlayer: {
|
|
1591
1622
|
readonly regionLabel: "Video player";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as TranslationsType, r as defaultTranslations, t as TranslationKey } from "./i18n-provider-defaults-
|
|
1
|
+
import { n as TranslationsType, r as defaultTranslations, t as TranslationKey } from "./i18n-provider-defaults-CTDMMs-y.js";
|
|
2
2
|
export { TranslationKey, TranslationsType, defaultTranslations };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as defaultTranslations } from "./i18n-provider-defaults-
|
|
1
|
+
export { t as defaultTranslations } from "./i18n-provider-defaults-BUagKwGN.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as TranslationsType, t as TranslationKey } from "./i18n-provider-defaults-
|
|
1
|
+
import { n as TranslationsType, t as TranslationKey } from "./i18n-provider-defaults-CTDMMs-y.js";
|
|
2
2
|
import * as React$2 from "react";
|
|
3
3
|
import React$1, { AnchorHTMLAttributes, ComponentProps, ComponentType, FC, ForwardRefExoticComponent, ForwardedRef, HTMLAttributeAnchorTarget, HTMLAttributes, PropsWithChildren, ReactElement, ReactNode, RefAttributes, RefObject, SVGProps } from "react";
|
|
4
4
|
import { VariantProps } from "cva";
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/highlight.js@11.12.0/node_modules/highlight.js/es/languages/ini.js
|
|
2
|
+
function e(e) {
|
|
3
|
+
let t = e.regex, n = {
|
|
4
|
+
className: "number",
|
|
5
|
+
relevance: 0,
|
|
6
|
+
variants: [{ begin: /([+-]+)?[\d]+_[\d_]+/ }, { begin: e.NUMBER_RE }]
|
|
7
|
+
}, r = e.COMMENT();
|
|
8
|
+
r.variants = [{
|
|
9
|
+
begin: /;/,
|
|
10
|
+
end: /$/
|
|
11
|
+
}, {
|
|
12
|
+
begin: /#/,
|
|
13
|
+
end: /$/
|
|
14
|
+
}];
|
|
15
|
+
let i = {
|
|
16
|
+
className: "variable",
|
|
17
|
+
variants: [{ begin: /\$[\w\d"][\w\d_]*/ }, { begin: /\$\{(.*?)\}/ }]
|
|
18
|
+
}, a = {
|
|
19
|
+
className: "literal",
|
|
20
|
+
begin: /\bon|off|true|false|yes|no\b/
|
|
21
|
+
}, o = {
|
|
22
|
+
className: "string",
|
|
23
|
+
contains: [e.BACKSLASH_ESCAPE],
|
|
24
|
+
variants: [
|
|
25
|
+
{
|
|
26
|
+
begin: "'''",
|
|
27
|
+
end: "'''",
|
|
28
|
+
relevance: 10
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
begin: "\"\"\"",
|
|
32
|
+
end: "\"\"\"",
|
|
33
|
+
relevance: 10
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
begin: "\"",
|
|
37
|
+
end: "\""
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
begin: "'",
|
|
41
|
+
end: "'"
|
|
42
|
+
}
|
|
43
|
+
]
|
|
44
|
+
}, s = {
|
|
45
|
+
begin: /\[/,
|
|
46
|
+
end: /\]/,
|
|
47
|
+
contains: [
|
|
48
|
+
r,
|
|
49
|
+
a,
|
|
50
|
+
i,
|
|
51
|
+
o,
|
|
52
|
+
n,
|
|
53
|
+
"self"
|
|
54
|
+
],
|
|
55
|
+
relevance: 0
|
|
56
|
+
}, c = t.either(/[A-Za-z0-9_-]+/, /"(\\"|[^"])*"/, /'[^']*'/);
|
|
57
|
+
return {
|
|
58
|
+
name: "TOML, also INI",
|
|
59
|
+
aliases: ["toml"],
|
|
60
|
+
case_insensitive: !0,
|
|
61
|
+
illegal: /\S/,
|
|
62
|
+
contains: [
|
|
63
|
+
r,
|
|
64
|
+
{
|
|
65
|
+
className: "section",
|
|
66
|
+
begin: /\[+/,
|
|
67
|
+
end: /\]+/
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
begin: t.concat(c, "(\\s*\\.\\s*", c, ")*", t.lookahead(/\s*=\s*[^#\s]/)),
|
|
71
|
+
className: "attr",
|
|
72
|
+
starts: {
|
|
73
|
+
end: /$/,
|
|
74
|
+
contains: [
|
|
75
|
+
r,
|
|
76
|
+
s,
|
|
77
|
+
a,
|
|
78
|
+
i,
|
|
79
|
+
o,
|
|
80
|
+
n
|
|
81
|
+
]
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
]
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
//#endregion
|
|
88
|
+
export { e as default };
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/highlight.js@11.12.0/node_modules/highlight.js/es/languages/java.js
|
|
2
|
+
var e = "[0-9](_*[0-9])*", t = `\\.(${e})`, n = "[0-9a-fA-F](_*[0-9a-fA-F])*", r = {
|
|
3
|
+
className: "number",
|
|
4
|
+
variants: [
|
|
5
|
+
{ begin: `(\\b(${e})((${t})|\\.)?|(${t}))[eE][+-]?(${e})[fFdD]?\\b` },
|
|
6
|
+
{ begin: `\\b(${e})((${t})[fFdD]?\\b|\\.([fFdD]\\b)?)` },
|
|
7
|
+
{ begin: `(${t})[fFdD]?\\b` },
|
|
8
|
+
{ begin: `\\b(${e})[fFdD]\\b` },
|
|
9
|
+
{ begin: `\\b0[xX]((${n})\\.?|(${n})?\\.(${n}))[pP][+-]?(${e})[fFdD]?\\b` },
|
|
10
|
+
{ begin: "\\b(0|[1-9](_*[0-9])*)[lL]?\\b" },
|
|
11
|
+
{ begin: `\\b0[xX](${n})[lL]?\\b` },
|
|
12
|
+
{ begin: "\\b0(_*[0-7])*[lL]?\\b" },
|
|
13
|
+
{ begin: "\\b0[bB][01](_*[01])*[lL]?\\b" }
|
|
14
|
+
],
|
|
15
|
+
relevance: 0
|
|
16
|
+
};
|
|
17
|
+
function i(e, t, n) {
|
|
18
|
+
return n === -1 ? "" : e.replace(t, (r) => i(e, t, n - 1));
|
|
19
|
+
}
|
|
20
|
+
function a(e) {
|
|
21
|
+
let t = e.regex, n = "[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*", a = "(?:(?:\\s*\\[\\s*])+)?", o = "(?:\\?(?:\\s+(?:extends|super)\\s+[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*<@@@>(?:(?:\\s*\\[\\s*])+)?)?|[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*<@@@>(?:(?:\\s*\\[\\s*])+)?)", s = i("(?:\\s*<\\s*" + o + "(?:\\s*,\\s*" + o + ")*\\s*>)?", /<@@@>/g, 2), c = {
|
|
22
|
+
keyword: /* @__PURE__ */ "synchronized.abstract.private.var.static.if.const .for.while.strictfp.finally.protected.import.native.final.void.enum.else.break.transient.catch.instanceof.volatile.case.assert.package.default.public.try.switch.continue.throws.protected.public.private.module.requires.exports.do.sealed.yield.permits.goto.when".split("."),
|
|
23
|
+
literal: [
|
|
24
|
+
"false",
|
|
25
|
+
"true",
|
|
26
|
+
"null"
|
|
27
|
+
],
|
|
28
|
+
type: [
|
|
29
|
+
"char",
|
|
30
|
+
"boolean",
|
|
31
|
+
"long",
|
|
32
|
+
"float",
|
|
33
|
+
"int",
|
|
34
|
+
"byte",
|
|
35
|
+
"short",
|
|
36
|
+
"double"
|
|
37
|
+
],
|
|
38
|
+
built_in: ["super", "this"]
|
|
39
|
+
}, l = {
|
|
40
|
+
className: "meta",
|
|
41
|
+
begin: "@" + n,
|
|
42
|
+
contains: [{
|
|
43
|
+
begin: /\(/,
|
|
44
|
+
end: /\)/,
|
|
45
|
+
contains: ["self"]
|
|
46
|
+
}]
|
|
47
|
+
}, u = {
|
|
48
|
+
className: "params",
|
|
49
|
+
begin: /\(/,
|
|
50
|
+
end: /\)/,
|
|
51
|
+
keywords: c,
|
|
52
|
+
relevance: 0,
|
|
53
|
+
contains: [e.C_BLOCK_COMMENT_MODE],
|
|
54
|
+
endsParent: !0
|
|
55
|
+
};
|
|
56
|
+
return {
|
|
57
|
+
name: "Java",
|
|
58
|
+
aliases: ["jsp"],
|
|
59
|
+
keywords: c,
|
|
60
|
+
illegal: /<\/|#/,
|
|
61
|
+
contains: [
|
|
62
|
+
e.COMMENT("/\\*\\*", "\\*/", {
|
|
63
|
+
relevance: 0,
|
|
64
|
+
contains: [{
|
|
65
|
+
begin: /\w+@/,
|
|
66
|
+
relevance: 0
|
|
67
|
+
}, {
|
|
68
|
+
className: "doctag",
|
|
69
|
+
begin: "@[A-Za-z]+"
|
|
70
|
+
}]
|
|
71
|
+
}),
|
|
72
|
+
{
|
|
73
|
+
begin: /import java\.[a-z]+\./,
|
|
74
|
+
keywords: "import",
|
|
75
|
+
relevance: 2
|
|
76
|
+
},
|
|
77
|
+
e.C_LINE_COMMENT_MODE,
|
|
78
|
+
e.C_BLOCK_COMMENT_MODE,
|
|
79
|
+
{
|
|
80
|
+
begin: /"""/,
|
|
81
|
+
end: /"""/,
|
|
82
|
+
className: "string",
|
|
83
|
+
contains: [e.BACKSLASH_ESCAPE]
|
|
84
|
+
},
|
|
85
|
+
e.APOS_STRING_MODE,
|
|
86
|
+
e.QUOTE_STRING_MODE,
|
|
87
|
+
{
|
|
88
|
+
match: [
|
|
89
|
+
/\b(?:class|interface|enum|extends|implements|new)/,
|
|
90
|
+
/\s+/,
|
|
91
|
+
n
|
|
92
|
+
],
|
|
93
|
+
className: {
|
|
94
|
+
1: "keyword",
|
|
95
|
+
3: "title.class"
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
match: /non-sealed/,
|
|
100
|
+
scope: "keyword"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
beginKeywords: "new throw return else yield assert",
|
|
104
|
+
relevance: 0
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
begin: [
|
|
108
|
+
n,
|
|
109
|
+
t.concat(s, a, /\s+/),
|
|
110
|
+
n,
|
|
111
|
+
a,
|
|
112
|
+
/\s*/,
|
|
113
|
+
/=(?!=)/
|
|
114
|
+
],
|
|
115
|
+
className: {
|
|
116
|
+
1: "type",
|
|
117
|
+
3: "variable",
|
|
118
|
+
6: "operator"
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
begin: [
|
|
123
|
+
/record/,
|
|
124
|
+
/\s+/,
|
|
125
|
+
n
|
|
126
|
+
],
|
|
127
|
+
className: {
|
|
128
|
+
1: "keyword",
|
|
129
|
+
3: "title.class"
|
|
130
|
+
},
|
|
131
|
+
contains: [
|
|
132
|
+
u,
|
|
133
|
+
e.C_LINE_COMMENT_MODE,
|
|
134
|
+
e.C_BLOCK_COMMENT_MODE
|
|
135
|
+
]
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
begin: [
|
|
139
|
+
n,
|
|
140
|
+
t.concat(s, a, /\s+/),
|
|
141
|
+
n,
|
|
142
|
+
/\s*(?=\()/
|
|
143
|
+
],
|
|
144
|
+
className: {
|
|
145
|
+
1: "type",
|
|
146
|
+
3: "title.function"
|
|
147
|
+
},
|
|
148
|
+
keywords: c,
|
|
149
|
+
contains: [
|
|
150
|
+
{
|
|
151
|
+
className: "params",
|
|
152
|
+
begin: /\(/,
|
|
153
|
+
end: /\)/,
|
|
154
|
+
keywords: c,
|
|
155
|
+
relevance: 0,
|
|
156
|
+
contains: [
|
|
157
|
+
l,
|
|
158
|
+
e.APOS_STRING_MODE,
|
|
159
|
+
e.QUOTE_STRING_MODE,
|
|
160
|
+
r,
|
|
161
|
+
e.C_BLOCK_COMMENT_MODE
|
|
162
|
+
]
|
|
163
|
+
},
|
|
164
|
+
e.C_LINE_COMMENT_MODE,
|
|
165
|
+
e.C_BLOCK_COMMENT_MODE
|
|
166
|
+
]
|
|
167
|
+
},
|
|
168
|
+
r,
|
|
169
|
+
l
|
|
170
|
+
]
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
//#endregion
|
|
174
|
+
export { a as default };
|