@factorialco/f0-react 12.9.1 → 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-CWTlUs36.js → ChatPostComposerDialog-CGil1xkf.js} +4 -4
- package/dist/{CoachmarkProvider-BMunnTvE.js → CoachmarkProvider-cZnuTk79.js} +21047 -21041
- 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-C1yw4Yqt.js → DocxViewer-DQV5Kv1n.js} +25 -23
- package/dist/ExternalLink-RdKU698E.js +22 -0
- package/dist/{F0AiProcessingOverlay-cdj77_VP.js → F0AiProcessingOverlay-DjGkQ2Nc.js} +1903 -1795
- package/dist/{popover-BjrPOMeQ.js → F0Button-FXkThQ9H.js} +3164 -8587
- package/dist/{F0CanvasPanel-DPEwyR89.js → F0CanvasPanel-BgDo2LWP.js} +3704 -3274
- package/dist/F0DocumentViewer-BXifXzUW.js +79 -0
- package/dist/F0DocumentViewer-DWuIFBHu.js +3 -0
- package/dist/F0Icon-Cj0USbCF.js +202 -0
- package/dist/{F0Map-ZSo-alK8.js → F0Map-Dwev4u-_.js} +199 -191
- package/dist/{F0Select-B-ZxVjXG.js → F0Select-BWWdEd7l.js} +6696 -6726
- package/dist/{F0Text-D92NWQRd.js → F0Text-DMZW7dhN.js} +25 -41
- package/dist/{F0VideoPlayer-B1-tEFuq.js → F0VideoPlayer-BmCmHG87.js} +206 -202
- 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-B_Hw6nIS.js → Map-BxGPElF2.js} +56 -53
- package/dist/{PdfThumbnail-BWqOqM04.js → PdfThumbnail-CpGZz5Kq.js} +5 -5
- package/dist/PdfViewer-C81MK43i.js +296 -0
- package/dist/SandboxedHtmlFrame-B6YWhgyg.js +309 -0
- package/dist/{SheetViewer-B8JTSi3B.js → SheetViewer-DPGpMNqq.js} +36 -26
- package/dist/TextThumbnail-DKNxh344.js +15 -0
- package/dist/{TextViewer-CEZd1H8u.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 +5080 -4883
- package/dist/{exports-BdFDYdp1.d.ts → exports-C0yM5usu.d.ts} +13 -2
- 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-DIwa_k8B.d.ts → index-CduxMW5L.d.ts} +16 -2
- 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-BSY0r3_z.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-DRgGoc3T.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-hr47rxX3.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-iHZHYbFM.js +0 -70
- package/dist/F0DocumentViewer-CzNVxjsJ.js +0 -3
- package/dist/F0DocumentViewer-sRCjFb2O.js +0 -400
- package/dist/F0VideoPlayer-B4Nu7ugx.js +0 -1
- package/dist/TextThumbnail-X04JgaNI.js +0 -26
- package/dist/dist-DvxtFKDL.js +0 -78
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
//#region src/addons/documents/lib/fetchText.ts
|
|
2
|
+
var e = [
|
|
3
|
+
239,
|
|
4
|
+
187,
|
|
5
|
+
191
|
|
6
|
+
], t = [255, 254], n = [254, 255], r = (e, t) => t.every((t, n) => e[n] === t), i = (e) => {
|
|
7
|
+
if (!e) return null;
|
|
8
|
+
try {
|
|
9
|
+
return new TextDecoder(e.trim().toLowerCase());
|
|
10
|
+
} catch {
|
|
11
|
+
return null;
|
|
12
|
+
}
|
|
13
|
+
}, a = (e) => e?.match(/charset\s*=\s*["']?([\w-]+)/i)?.[1] ?? void 0, o = (e) => new TextDecoder("windows-1252").decode(e.subarray(0, 1024)).match(/<meta[^>]+charset\s*=\s*["']?([\w-]+)/i)?.[1] ?? void 0, s = (s, c) => {
|
|
14
|
+
if (r(s, e)) return new TextDecoder("utf-8").decode(s.subarray(3));
|
|
15
|
+
if (r(s, t)) return new TextDecoder("utf-16le").decode(s.subarray(2));
|
|
16
|
+
if (r(s, n)) return new TextDecoder("utf-16be").decode(s.subarray(2));
|
|
17
|
+
let l = i(a(c)) ?? i(o(s));
|
|
18
|
+
if (l && l.encoding !== "utf-8") return l.decode(s);
|
|
19
|
+
try {
|
|
20
|
+
return new TextDecoder("utf-8", { fatal: !0 }).decode(s);
|
|
21
|
+
} catch {
|
|
22
|
+
return new TextDecoder("windows-1252").decode(s);
|
|
23
|
+
}
|
|
24
|
+
}, c = async (e, { withCredentials: t = !0, maxChars: n, signal: r } = {}) => {
|
|
25
|
+
let i = e.startsWith("blob:"), a = await fetch(e, {
|
|
26
|
+
credentials: t ? "include" : "same-origin",
|
|
27
|
+
signal: i ? void 0 : r
|
|
28
|
+
});
|
|
29
|
+
if (i && r?.aborted) throw new DOMException("Aborted", "AbortError");
|
|
30
|
+
if (!a.ok) throw Error(`Failed to fetch text: ${a.status}`);
|
|
31
|
+
let o = s(n === void 0 ? new Uint8Array(await a.arrayBuffer()) : await l(a, n * 4), a.headers?.get("content-type"));
|
|
32
|
+
return n === void 0 ? o : o.slice(0, n);
|
|
33
|
+
}, l = async (e, t) => {
|
|
34
|
+
let n = e.body;
|
|
35
|
+
if (!n || typeof n.getReader != "function") return new Uint8Array(await e.arrayBuffer()).subarray(0, t);
|
|
36
|
+
let r = n.getReader(), i = [], a = 0;
|
|
37
|
+
for (; a < t;) {
|
|
38
|
+
let { done: e, value: t } = await r.read();
|
|
39
|
+
if (e) return u(i, a);
|
|
40
|
+
i.push(t), a += t.length;
|
|
41
|
+
}
|
|
42
|
+
return r.cancel().catch(() => {}), d(u(i, a).subarray(0, t));
|
|
43
|
+
}, u = (e, t) => {
|
|
44
|
+
let n = new Uint8Array(t), r = 0;
|
|
45
|
+
for (let t of e) n.set(t, r), r += t.length;
|
|
46
|
+
return n;
|
|
47
|
+
}, d = (e) => {
|
|
48
|
+
let t = e.length - 1;
|
|
49
|
+
for (; t > 0 && e.length - t < 4 && (e[t] & 192) == 128;) t--;
|
|
50
|
+
let n = e[t], r = n >= 240 ? 4 : n >= 224 ? 3 : n >= 192 ? 2 : 1;
|
|
51
|
+
return e.length - t < r ? e.subarray(0, t) : e;
|
|
52
|
+
};
|
|
53
|
+
//#endregion
|
|
54
|
+
export { c as t };
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/highlight.js@11.12.0/node_modules/highlight.js/es/languages/go.js
|
|
2
|
+
function e(e) {
|
|
3
|
+
let t = {
|
|
4
|
+
keyword: [
|
|
5
|
+
"break",
|
|
6
|
+
"case",
|
|
7
|
+
"chan",
|
|
8
|
+
"const",
|
|
9
|
+
"continue",
|
|
10
|
+
"default",
|
|
11
|
+
"defer",
|
|
12
|
+
"else",
|
|
13
|
+
"fallthrough",
|
|
14
|
+
"for",
|
|
15
|
+
"func",
|
|
16
|
+
"go",
|
|
17
|
+
"goto",
|
|
18
|
+
"if",
|
|
19
|
+
"import",
|
|
20
|
+
"interface",
|
|
21
|
+
"map",
|
|
22
|
+
"package",
|
|
23
|
+
"range",
|
|
24
|
+
"return",
|
|
25
|
+
"select",
|
|
26
|
+
"struct",
|
|
27
|
+
"switch",
|
|
28
|
+
"type",
|
|
29
|
+
"var"
|
|
30
|
+
],
|
|
31
|
+
type: [
|
|
32
|
+
"bool",
|
|
33
|
+
"byte",
|
|
34
|
+
"complex64",
|
|
35
|
+
"complex128",
|
|
36
|
+
"error",
|
|
37
|
+
"float32",
|
|
38
|
+
"float64",
|
|
39
|
+
"int8",
|
|
40
|
+
"int16",
|
|
41
|
+
"int32",
|
|
42
|
+
"int64",
|
|
43
|
+
"string",
|
|
44
|
+
"uint8",
|
|
45
|
+
"uint16",
|
|
46
|
+
"uint32",
|
|
47
|
+
"uint64",
|
|
48
|
+
"int",
|
|
49
|
+
"uint",
|
|
50
|
+
"uintptr",
|
|
51
|
+
"rune"
|
|
52
|
+
],
|
|
53
|
+
literal: [
|
|
54
|
+
"true",
|
|
55
|
+
"false",
|
|
56
|
+
"iota",
|
|
57
|
+
"nil"
|
|
58
|
+
],
|
|
59
|
+
built_in: [
|
|
60
|
+
"append",
|
|
61
|
+
"cap",
|
|
62
|
+
"close",
|
|
63
|
+
"complex",
|
|
64
|
+
"copy",
|
|
65
|
+
"imag",
|
|
66
|
+
"len",
|
|
67
|
+
"make",
|
|
68
|
+
"new",
|
|
69
|
+
"panic",
|
|
70
|
+
"print",
|
|
71
|
+
"println",
|
|
72
|
+
"real",
|
|
73
|
+
"recover",
|
|
74
|
+
"delete"
|
|
75
|
+
]
|
|
76
|
+
};
|
|
77
|
+
return {
|
|
78
|
+
name: "Go",
|
|
79
|
+
aliases: ["golang"],
|
|
80
|
+
keywords: t,
|
|
81
|
+
illegal: "</",
|
|
82
|
+
contains: [
|
|
83
|
+
e.C_LINE_COMMENT_MODE,
|
|
84
|
+
e.C_BLOCK_COMMENT_MODE,
|
|
85
|
+
{
|
|
86
|
+
className: "string",
|
|
87
|
+
variants: [
|
|
88
|
+
e.QUOTE_STRING_MODE,
|
|
89
|
+
e.APOS_STRING_MODE,
|
|
90
|
+
{
|
|
91
|
+
begin: "`",
|
|
92
|
+
end: "`"
|
|
93
|
+
}
|
|
94
|
+
]
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
className: "number",
|
|
98
|
+
variants: [
|
|
99
|
+
{
|
|
100
|
+
match: /-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,
|
|
101
|
+
relevance: 0
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
match: /-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,
|
|
105
|
+
relevance: 0
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
match: /-?\b0[oO](_?[0-7])*i?/,
|
|
109
|
+
relevance: 0
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
match: /-?\b0[bB](_?[01])*i?/,
|
|
113
|
+
relevance: 0
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
match: /-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,
|
|
117
|
+
relevance: 0
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
match: /-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,
|
|
121
|
+
relevance: 0
|
|
122
|
+
}
|
|
123
|
+
]
|
|
124
|
+
},
|
|
125
|
+
{ begin: /:=/ },
|
|
126
|
+
{
|
|
127
|
+
className: "function",
|
|
128
|
+
beginKeywords: "func",
|
|
129
|
+
end: "\\s*(\\{|$)",
|
|
130
|
+
excludeEnd: !0,
|
|
131
|
+
contains: [e.TITLE_MODE, {
|
|
132
|
+
className: "params",
|
|
133
|
+
begin: /\(/,
|
|
134
|
+
end: /\)/,
|
|
135
|
+
endsParent: !0,
|
|
136
|
+
keywords: t,
|
|
137
|
+
illegal: /["']/
|
|
138
|
+
}]
|
|
139
|
+
}
|
|
140
|
+
]
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
//#endregion
|
|
144
|
+
export { e as default };
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/highlight.js@11.12.0/node_modules/highlight.js/es/languages/graphql.js
|
|
2
|
+
function e(e) {
|
|
3
|
+
let t = e.regex;
|
|
4
|
+
return {
|
|
5
|
+
name: "GraphQL",
|
|
6
|
+
aliases: ["gql"],
|
|
7
|
+
case_insensitive: !0,
|
|
8
|
+
disableAutodetect: !1,
|
|
9
|
+
keywords: {
|
|
10
|
+
keyword: [
|
|
11
|
+
"query",
|
|
12
|
+
"mutation",
|
|
13
|
+
"subscription",
|
|
14
|
+
"type",
|
|
15
|
+
"input",
|
|
16
|
+
"schema",
|
|
17
|
+
"directive",
|
|
18
|
+
"interface",
|
|
19
|
+
"union",
|
|
20
|
+
"scalar",
|
|
21
|
+
"fragment",
|
|
22
|
+
"enum",
|
|
23
|
+
"on"
|
|
24
|
+
],
|
|
25
|
+
literal: [
|
|
26
|
+
"true",
|
|
27
|
+
"false",
|
|
28
|
+
"null"
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
contains: [
|
|
32
|
+
e.HASH_COMMENT_MODE,
|
|
33
|
+
e.QUOTE_STRING_MODE,
|
|
34
|
+
e.NUMBER_MODE,
|
|
35
|
+
{
|
|
36
|
+
scope: "punctuation",
|
|
37
|
+
match: /[.]{3}/,
|
|
38
|
+
relevance: 0
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
scope: "punctuation",
|
|
42
|
+
begin: /[\!\(\)\:\=\[\]\{\|\}]{1}/,
|
|
43
|
+
relevance: 0
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
scope: "variable",
|
|
47
|
+
begin: /\$/,
|
|
48
|
+
end: /\W/,
|
|
49
|
+
excludeEnd: !0,
|
|
50
|
+
relevance: 0
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
scope: "meta",
|
|
54
|
+
match: /@\w+/,
|
|
55
|
+
excludeEnd: !0
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
scope: "symbol",
|
|
59
|
+
begin: t.concat(/[_A-Za-z][_0-9A-Za-z]*/, t.lookahead(/\s*:/)),
|
|
60
|
+
relevance: 0
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
illegal: [/[;<']/, /BEGIN/]
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
//#endregion
|
|
67
|
+
export { e as default };
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/highlight.js@11.12.0/node_modules/highlight.js/es/languages/groovy.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 = {}) {
|
|
18
|
+
return t.variants = e, t;
|
|
19
|
+
}
|
|
20
|
+
function a(e) {
|
|
21
|
+
let t = e.regex, n = "[A-Za-z0-9_$]+", a = i([
|
|
22
|
+
e.C_LINE_COMMENT_MODE,
|
|
23
|
+
e.C_BLOCK_COMMENT_MODE,
|
|
24
|
+
e.COMMENT("/\\*\\*", "\\*/", {
|
|
25
|
+
relevance: 0,
|
|
26
|
+
contains: [{
|
|
27
|
+
begin: /\w+@/,
|
|
28
|
+
relevance: 0
|
|
29
|
+
}, {
|
|
30
|
+
className: "doctag",
|
|
31
|
+
begin: "@[A-Za-z]+"
|
|
32
|
+
}]
|
|
33
|
+
})
|
|
34
|
+
]), o = {
|
|
35
|
+
className: "regexp",
|
|
36
|
+
begin: /~?\/[^\/\n]+\//,
|
|
37
|
+
contains: [e.BACKSLASH_ESCAPE]
|
|
38
|
+
}, s = r, c = i([
|
|
39
|
+
{
|
|
40
|
+
begin: /"""/,
|
|
41
|
+
end: /"""/
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
begin: /'''/,
|
|
45
|
+
end: /'''/
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
begin: "\\$/",
|
|
49
|
+
end: "/\\$",
|
|
50
|
+
relevance: 10
|
|
51
|
+
},
|
|
52
|
+
e.APOS_STRING_MODE,
|
|
53
|
+
e.QUOTE_STRING_MODE
|
|
54
|
+
], { className: "string" }), l = {
|
|
55
|
+
match: [
|
|
56
|
+
/(class|interface|trait|enum|record|extends|implements)/,
|
|
57
|
+
/\s+/,
|
|
58
|
+
e.UNDERSCORE_IDENT_RE
|
|
59
|
+
],
|
|
60
|
+
scope: {
|
|
61
|
+
1: "keyword",
|
|
62
|
+
3: "title.class"
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
return {
|
|
66
|
+
name: "Groovy",
|
|
67
|
+
keywords: {
|
|
68
|
+
"variable.language": "this super",
|
|
69
|
+
literal: "true false null",
|
|
70
|
+
type: [
|
|
71
|
+
"byte",
|
|
72
|
+
"short",
|
|
73
|
+
"char",
|
|
74
|
+
"int",
|
|
75
|
+
"long",
|
|
76
|
+
"boolean",
|
|
77
|
+
"float",
|
|
78
|
+
"double",
|
|
79
|
+
"void"
|
|
80
|
+
],
|
|
81
|
+
keyword: /* @__PURE__ */ "def.as.in.assert.trait.abstract.static.volatile.transient.public.private.protected.synchronized.final.class.interface.enum.if.else.for.while.switch.case.break.default.continue.throw.throws.try.catch.finally.implements.extends.new.import.package.return.instanceof.var".split(".")
|
|
82
|
+
},
|
|
83
|
+
contains: [
|
|
84
|
+
e.SHEBANG({
|
|
85
|
+
binary: "groovy",
|
|
86
|
+
relevance: 10
|
|
87
|
+
}),
|
|
88
|
+
a,
|
|
89
|
+
c,
|
|
90
|
+
o,
|
|
91
|
+
s,
|
|
92
|
+
l,
|
|
93
|
+
{
|
|
94
|
+
className: "meta",
|
|
95
|
+
begin: "@[A-Za-z]+",
|
|
96
|
+
relevance: 0
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
className: "attr",
|
|
100
|
+
begin: n + "[ ]*:",
|
|
101
|
+
relevance: 0
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
begin: /\?/,
|
|
105
|
+
end: /:/,
|
|
106
|
+
relevance: 0,
|
|
107
|
+
contains: [
|
|
108
|
+
a,
|
|
109
|
+
c,
|
|
110
|
+
o,
|
|
111
|
+
s,
|
|
112
|
+
"self"
|
|
113
|
+
]
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
className: "symbol",
|
|
117
|
+
begin: "^[ ]*" + t.lookahead(n + ":"),
|
|
118
|
+
excludeBegin: !0,
|
|
119
|
+
end: n + ":",
|
|
120
|
+
relevance: 0
|
|
121
|
+
}
|
|
122
|
+
],
|
|
123
|
+
illegal: /#|<\//
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
//#endregion
|
|
127
|
+
export { a as default };
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/highlight.js@11.12.0/node_modules/highlight.js/es/languages/haskell.js
|
|
2
|
+
function e(e) {
|
|
3
|
+
let t = "([0-9]_*)+", n = "([0-9a-fA-F]_*)+", r = "([!#$%&*+.\\/<=>?@\\\\^~-]|(?!([(),;\\[\\]`|{}]|[_:\"']))(\\p{S}|\\p{P}))", i = { variants: [e.COMMENT("--+", "$"), e.COMMENT(/\{-/, /-\}/, { contains: ["self"] })] }, a = {
|
|
4
|
+
className: "meta",
|
|
5
|
+
begin: /\{-#/,
|
|
6
|
+
end: /#-\}/
|
|
7
|
+
}, o = {
|
|
8
|
+
className: "meta",
|
|
9
|
+
begin: "^#",
|
|
10
|
+
end: "$"
|
|
11
|
+
}, s = {
|
|
12
|
+
className: "type",
|
|
13
|
+
begin: "\\b[A-Z][\\w']*",
|
|
14
|
+
relevance: 0
|
|
15
|
+
}, c = {
|
|
16
|
+
begin: "\\(",
|
|
17
|
+
end: "\\)",
|
|
18
|
+
illegal: "\"",
|
|
19
|
+
contains: [
|
|
20
|
+
a,
|
|
21
|
+
o,
|
|
22
|
+
{
|
|
23
|
+
className: "type",
|
|
24
|
+
begin: "\\b[A-Z][\\w]*(\\((\\.\\.|,|\\w+)\\))?"
|
|
25
|
+
},
|
|
26
|
+
e.inherit(e.TITLE_MODE, { begin: "[_a-z][\\w']*" }),
|
|
27
|
+
i
|
|
28
|
+
]
|
|
29
|
+
}, l = {
|
|
30
|
+
begin: /\{/,
|
|
31
|
+
end: /\}/,
|
|
32
|
+
contains: c.contains
|
|
33
|
+
}, u = {
|
|
34
|
+
className: "number",
|
|
35
|
+
relevance: 0,
|
|
36
|
+
variants: [
|
|
37
|
+
{ match: `\\b(${t})(\\.(${t}))?([eE][+-]?(${t}))?\\b` },
|
|
38
|
+
{ match: `\\b0[xX]_*(${n})(\\.(${n}))?([pP][+-]?(${t}))?\\b` },
|
|
39
|
+
{ match: "\\b0[oO](([0-7]_*)+)\\b" },
|
|
40
|
+
{ match: "\\b0[bB](([01]_*)+)\\b" }
|
|
41
|
+
]
|
|
42
|
+
};
|
|
43
|
+
return {
|
|
44
|
+
name: "Haskell",
|
|
45
|
+
aliases: ["hs"],
|
|
46
|
+
keywords: "let in if then else case of where do module import hiding qualified type data newtype deriving class instance as default infix infixl infixr foreign export ccall stdcall cplusplus jvm dotnet safe unsafe family forall mdo proc rec",
|
|
47
|
+
unicodeRegex: !0,
|
|
48
|
+
contains: [
|
|
49
|
+
{
|
|
50
|
+
beginKeywords: "module",
|
|
51
|
+
end: "where",
|
|
52
|
+
keywords: "module where",
|
|
53
|
+
contains: [c, i],
|
|
54
|
+
illegal: "\\W\\.|;"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
begin: "\\bimport\\b",
|
|
58
|
+
end: "$",
|
|
59
|
+
keywords: "import qualified as hiding",
|
|
60
|
+
contains: [c, i],
|
|
61
|
+
illegal: "\\W\\.|;"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
className: "class",
|
|
65
|
+
begin: "^(\\s*)?(class|instance)\\b",
|
|
66
|
+
end: "where",
|
|
67
|
+
keywords: "class family instance where",
|
|
68
|
+
contains: [
|
|
69
|
+
s,
|
|
70
|
+
c,
|
|
71
|
+
i
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
className: "class",
|
|
76
|
+
begin: "\\b(data|(new)?type)\\b",
|
|
77
|
+
end: "$",
|
|
78
|
+
keywords: "data family type newtype deriving where",
|
|
79
|
+
contains: [
|
|
80
|
+
a,
|
|
81
|
+
s,
|
|
82
|
+
c,
|
|
83
|
+
l,
|
|
84
|
+
i
|
|
85
|
+
]
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
beginKeywords: "default",
|
|
89
|
+
end: "$",
|
|
90
|
+
contains: [
|
|
91
|
+
s,
|
|
92
|
+
c,
|
|
93
|
+
i
|
|
94
|
+
]
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
beginKeywords: "infix infixl infixr",
|
|
98
|
+
end: "$",
|
|
99
|
+
contains: [e.C_NUMBER_MODE, i]
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
begin: "\\bforeign\\b",
|
|
103
|
+
end: "$",
|
|
104
|
+
keywords: "foreign import export ccall stdcall cplusplus jvm dotnet safe unsafe",
|
|
105
|
+
contains: [
|
|
106
|
+
s,
|
|
107
|
+
e.QUOTE_STRING_MODE,
|
|
108
|
+
i
|
|
109
|
+
]
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
className: "meta",
|
|
113
|
+
begin: "#!\\/usr\\/bin\\/env runhaskell",
|
|
114
|
+
end: "$"
|
|
115
|
+
},
|
|
116
|
+
a,
|
|
117
|
+
o,
|
|
118
|
+
{
|
|
119
|
+
scope: "string",
|
|
120
|
+
begin: /'(?=\\?.')/,
|
|
121
|
+
end: /'/,
|
|
122
|
+
contains: [{
|
|
123
|
+
scope: "char.escape",
|
|
124
|
+
match: /\\./
|
|
125
|
+
}]
|
|
126
|
+
},
|
|
127
|
+
e.QUOTE_STRING_MODE,
|
|
128
|
+
u,
|
|
129
|
+
s,
|
|
130
|
+
e.inherit(e.TITLE_MODE, { begin: "^[_a-z][\\w']*" }),
|
|
131
|
+
{ begin: `(?!-)${r}--+|--+(?!-)${r}` },
|
|
132
|
+
i,
|
|
133
|
+
{ begin: "->|<-" }
|
|
134
|
+
]
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
//#endregion
|
|
138
|
+
export { e as default };
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { at as e, gt as t, ht as n } from "./F0CanvasPanel-BgDo2LWP.js";
|
|
2
|
+
import { t as r } from "./purify.es-ZpfdAuNV.js";
|
|
3
|
+
import { t as i } from "./ownValue-D4uSXt0d.js";
|
|
4
|
+
//#region src/addons/documents/lib/codeLanguages.ts
|
|
5
|
+
var a = {
|
|
6
|
+
shell: "bash",
|
|
7
|
+
"c++": "cpp",
|
|
8
|
+
"c#": "csharp",
|
|
9
|
+
objc: "objectivec",
|
|
10
|
+
make: "makefile",
|
|
11
|
+
md: "markdown",
|
|
12
|
+
html: "xml",
|
|
13
|
+
htm: "xml",
|
|
14
|
+
xhtml: "xml",
|
|
15
|
+
svg: "xml",
|
|
16
|
+
env: "bash"
|
|
17
|
+
}, o = (e) => t.includes(e), s = (e) => {
|
|
18
|
+
let t = e?.trim().toLowerCase();
|
|
19
|
+
return t ? o(t) ? t : i(n, t) ?? i(a, t) ?? null : null;
|
|
20
|
+
}, c = (t) => {
|
|
21
|
+
let n = t?.split(/[\\/]/).pop()?.trim();
|
|
22
|
+
return n ? e({ name: n }) : null;
|
|
23
|
+
}, l = {
|
|
24
|
+
bash: () => import("./bash-BcZBmoDA.js"),
|
|
25
|
+
c: () => import("./c-Dv-5_kUQ.js"),
|
|
26
|
+
cpp: () => import("./cpp-CMQhucZt.js"),
|
|
27
|
+
csharp: () => import("./csharp-CuDKSCf2.js"),
|
|
28
|
+
css: () => import("./css-Dta7Q4Li.js"),
|
|
29
|
+
dart: () => import("./dart-po7Eq73d.js"),
|
|
30
|
+
diff: () => import("./diff-IgsQP-8T.js"),
|
|
31
|
+
dos: () => import("./dos-1TcyLtUq.js"),
|
|
32
|
+
dockerfile: () => import("./dockerfile-B4Bz9I5u.js"),
|
|
33
|
+
elixir: () => import("./elixir-BnEjyLGa.js"),
|
|
34
|
+
erlang: () => import("./erlang-tgri7ZSv.js"),
|
|
35
|
+
go: () => import("./go-CEVmppuo.js"),
|
|
36
|
+
graphql: () => import("./graphql-BWwc-u8d.js"),
|
|
37
|
+
groovy: () => import("./groovy-BELuqtd6.js"),
|
|
38
|
+
haskell: () => import("./haskell-Cxh7aaFM.js"),
|
|
39
|
+
ini: () => import("./ini-DA-F0rRr.js"),
|
|
40
|
+
java: () => import("./java-Bujnoc_f.js"),
|
|
41
|
+
javascript: () => import("./javascript-BeEhpXRE.js"),
|
|
42
|
+
json: () => import("./json-CxvE7tEw.js"),
|
|
43
|
+
kotlin: () => import("./kotlin-DOwDGI_m.js"),
|
|
44
|
+
less: () => import("./less-DWlR-e-o.js"),
|
|
45
|
+
lua: () => import("./lua-BlZiakwh.js"),
|
|
46
|
+
makefile: () => import("./makefile-D3841Yg4.js"),
|
|
47
|
+
markdown: () => import("./markdown-D1wNG79U.js"),
|
|
48
|
+
objectivec: () => import("./objectivec-DxtRzTBy.js"),
|
|
49
|
+
perl: () => import("./perl-BWRmkuyz.js"),
|
|
50
|
+
php: () => import("./php-CjwybYSP.js"),
|
|
51
|
+
powershell: () => import("./powershell-CgKcNA5Q.js"),
|
|
52
|
+
properties: () => import("./properties-Bc45MTzW.js"),
|
|
53
|
+
protobuf: () => import("./protobuf-Bv_xSUaI.js"),
|
|
54
|
+
python: () => import("./python-D8PdGjgy.js"),
|
|
55
|
+
r: () => import("./r-DA-9ZIdU.js"),
|
|
56
|
+
ruby: () => import("./ruby-Bqr16BpN.js"),
|
|
57
|
+
rust: () => import("./rust-BCvJMwk8.js"),
|
|
58
|
+
scala: () => import("./scala-Du8mOD2z.js"),
|
|
59
|
+
scss: () => import("./scss-AMxHqh46.js"),
|
|
60
|
+
sql: () => import("./sql-BbYSgcOA.js"),
|
|
61
|
+
swift: () => import("./swift-DRKtalPn.js"),
|
|
62
|
+
typescript: () => import("./typescript-Bv8uKU6V.js"),
|
|
63
|
+
xml: () => import("./xml-BVpP05uE.js"),
|
|
64
|
+
yaml: () => import("./yaml-BNe2WG-i.js")
|
|
65
|
+
}, u = {
|
|
66
|
+
xml: ["css", "javascript"],
|
|
67
|
+
markdown: [
|
|
68
|
+
"xml",
|
|
69
|
+
"css",
|
|
70
|
+
"javascript"
|
|
71
|
+
],
|
|
72
|
+
php: [
|
|
73
|
+
"xml",
|
|
74
|
+
"css",
|
|
75
|
+
"javascript"
|
|
76
|
+
]
|
|
77
|
+
}, d = {
|
|
78
|
+
maxChars: 131072,
|
|
79
|
+
maxLines: 3e3,
|
|
80
|
+
maxLineLength: 2e3
|
|
81
|
+
}, f = (/* @__PURE__ */ "[&_.hljs-comment]:text-f1-foreground-secondary [&_.hljs-comment]:italic,[&_.hljs-quote]:text-f1-foreground-secondary [&_.hljs-quote]:italic,[&_.hljs-meta]:text-f1-foreground-secondary,[&_.hljs-keyword]:text-f1-foreground-info,[&_.hljs-selector-tag]:text-f1-foreground-info,[&_.hljs-built_in]:text-f1-foreground-info,[&_.hljs-literal]:text-f1-foreground-warning,[&_.hljs-number]:text-f1-foreground-warning,[&_.hljs-symbol]:text-f1-foreground-warning,[&_.hljs-bullet]:text-f1-foreground-warning,[&_.hljs-string]:text-f1-foreground-positive,[&_.hljs-regexp]:text-f1-foreground-positive,[&_.hljs-addition]:text-f1-foreground-positive,[&_.hljs-template-tag]:text-f1-foreground-positive,[&_.hljs-deletion]:text-f1-foreground-critical,[&_.hljs-name]:text-f1-foreground-critical,[&_.hljs-tag]:text-f1-foreground-critical,[&_.hljs-selector-id]:text-f1-foreground-critical,[&_.hljs-selector-class]:text-f1-foreground-critical,[&_.hljs-title]:text-f1-foreground-selected,[&_.hljs-section]:text-f1-foreground-selected [&_.hljs-section]:font-semibold,[&_.hljs-attr]:text-f1-foreground-accent,[&_.hljs-attribute]:text-f1-foreground-accent,[&_.hljs-property]:text-f1-foreground-accent,[&_.hljs-variable]:text-f1-foreground-accent,[&_.hljs-template-variable]:text-f1-foreground-accent,[&_.hljs-type]:text-f1-foreground-accent,[&_.hljs-params]:text-f1-foreground,[&_.hljs-strong]:font-semibold,[&_.hljs-emphasis]:italic".split(",")).join(" "), p = null, m = /* @__PURE__ */ new Map(), h = () => (p ??= import("./core-C0MCmPil.js").then((e) => {
|
|
82
|
+
let t = e.default.newInstance();
|
|
83
|
+
return t.configure({ ignoreUnescapedHTML: !0 }), t;
|
|
84
|
+
}), p), g = (e, t) => {
|
|
85
|
+
let n = m.get(t);
|
|
86
|
+
return n || (n = (async () => {
|
|
87
|
+
let n = await l[t]();
|
|
88
|
+
e.registerLanguage(t, n.default);
|
|
89
|
+
})(), n.catch(() => m.delete(t)), m.set(t, n)), n;
|
|
90
|
+
}, _ = (e) => {
|
|
91
|
+
if (e.length > d.maxChars) return !1;
|
|
92
|
+
let t = 1, n = 0;
|
|
93
|
+
for (let r = 0; r < e.length; r++) if (e.charCodeAt(r) === 10 && (r - n > d.maxLineLength || (t++, n = r + 1, t > d.maxLines))) return !1;
|
|
94
|
+
return e.length - n <= d.maxLineLength;
|
|
95
|
+
}, v = {
|
|
96
|
+
ALLOWED_TAGS: ["span"],
|
|
97
|
+
ALLOWED_ATTR: ["class"]
|
|
98
|
+
}, y = (e) => r.sanitize(e, v), b = async (e, t) => {
|
|
99
|
+
let n = s(t ?? void 0);
|
|
100
|
+
if (!n || !_(e)) return null;
|
|
101
|
+
try {
|
|
102
|
+
let t = await h();
|
|
103
|
+
await Promise.all([n, ...u[n] ?? []].map((e) => g(t, e)));
|
|
104
|
+
let { value: r } = t.highlight(e, {
|
|
105
|
+
language: n,
|
|
106
|
+
ignoreIllegals: !0
|
|
107
|
+
});
|
|
108
|
+
return y(r);
|
|
109
|
+
} catch {
|
|
110
|
+
return null;
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
//#endregion
|
|
114
|
+
export { c as a, b as i, v as n, s as o, _ as r, f as t };
|