intlayer-editor 7.5.0-canary.1 → 7.5.1
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/client/dist/assets/{CodeBlockShiki-BZrNB-hp.js → CodeBlockShiki-BDi8XZg1.js} +4 -4
- package/client/dist/assets/Inter-VariableFont-c8O0ljhh.ttf +0 -0
- package/client/dist/assets/{bundle-web-XVNhfIcT.js → bundle-web-CNJDzNQN.js} +144 -55
- package/client/dist/assets/{dark-plus-D1BtfNxb.js → dark-plus-DmZ1Dzd4.js} +1 -1
- package/client/dist/assets/{index-BCw8xSvk.js → index-DqbmCrrm.js} +749 -135
- package/client/dist/assets/{index-C9tdC4Xg.css → index-xMTI_9fM.css} +7 -6
- package/client/dist/assets/{rose-pine-LL9gXmP2.js → rose-pine-B-kZ4Z9q.js} +1 -1
- package/client/dist/assets/{rose-pine-dawn-CH9zdisO.js → rose-pine-dawn-efeVGdSI.js} +1 -1
- package/client/dist/assets/{rose-pine-moon-B1oKSfEJ.js → rose-pine-moon-DmodZNzl.js} +1 -1
- package/client/dist/assets/vue-BQglRdBF.js +50 -0
- package/client/dist/assets/{vue-html-BzXE5pTE.js → vue-html-BS551n9F.js} +1 -1
- package/client/dist/assets/{vue-vine-BT_ihGGO.js → vue-vine-B43RKH9N.js} +1 -1
- package/client/dist/index.html +2 -2
- package/package.json +13 -13
- package/server/dist/controllers/configuration.controller.cjs +2 -2
- package/server/dist/controllers/configuration.controller.cjs.map +1 -1
- package/server/dist/controllers/dictionary.controller.cjs +5 -5
- package/server/dist/controllers/dictionary.controller.cjs.map +1 -1
- package/server/dist/index.cjs +8 -8
- package/server/dist/index.cjs.map +1 -1
- package/server/dist/routes/config.routes.cjs +2 -2
- package/server/dist/routes/config.routes.cjs.map +1 -1
- package/server/dist/routes/dictionary.routes.cjs +2 -2
- package/server/dist/routes/dictionary.routes.cjs.map +1 -1
- package/client/dist/assets/Figtree-VariableFont-CuCnmeMh.ttf +0 -0
- package/client/dist/assets/vue-M1-XqLgv.js +0 -50
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/vue-
|
|
2
|
-
import { r as reactExports, j as jsxRuntimeExports, C as CodeDefault, _ as __vitePreload } from "./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/vue-BQglRdBF.js","assets/css-BtVcDqlU.js","assets/javascript-DLs729Nk.js","assets/typescript-Cju7JbYj.js","assets/json-D07AUpjp.js","assets/html-derivative-Cswrtqyq.js","assets/html-BOjX3v2Q.js","assets/bundle-web-CNJDzNQN.js","assets/index-DqbmCrrm.js","assets/index-xMTI_9fM.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import { r as reactExports, j as jsxRuntimeExports, C as CodeDefault, _ as __vitePreload } from "./index-DqbmCrrm.js";
|
|
3
3
|
const languageCache = /* @__PURE__ */ new Map();
|
|
4
4
|
const themeCache = /* @__PURE__ */ new Map();
|
|
5
5
|
const loadLanguage = async (lang) => {
|
|
@@ -26,7 +26,7 @@ const loadLanguage = async (lang) => {
|
|
|
26
26
|
languageModule = await __vitePreload(() => import("./tsx-B9RA6cgQ.js").then((n) => n.b), true ? [] : void 0);
|
|
27
27
|
break;
|
|
28
28
|
case "vue":
|
|
29
|
-
languageModule = await __vitePreload(() => import("./vue-
|
|
29
|
+
languageModule = await __vitePreload(() => import("./vue-BQglRdBF.js").then((n) => n.b), true ? __vite__mapDeps([0,1,2,3,4,5,6]) : void 0);
|
|
30
30
|
break;
|
|
31
31
|
case "html":
|
|
32
32
|
languageModule = await __vitePreload(() => import("./html-BOjX3v2Q.js").then((n) => n.b), true ? __vite__mapDeps([6,2,1]) : void 0);
|
|
@@ -60,7 +60,7 @@ const loadTheme = async (themeName) => {
|
|
|
60
60
|
const highlightCode = async (code, lang, isDarkMode) => {
|
|
61
61
|
const themeName = isDarkMode ? "github-dark" : "github-light";
|
|
62
62
|
const [{ codeToHtml }, languageModule, themeModule] = await Promise.all([
|
|
63
|
-
__vitePreload(() => import("./bundle-web-
|
|
63
|
+
__vitePreload(() => import("./bundle-web-CNJDzNQN.js"), true ? __vite__mapDeps([7,8,9]) : void 0),
|
|
64
64
|
loadLanguage(lang),
|
|
65
65
|
loadTheme(themeName)
|
|
66
66
|
]);
|
|
Binary file
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-ChYFFmg7.js","assets/html-BOjX3v2Q.js","assets/javascript-DLs729Nk.js","assets/css-BtVcDqlU.js","assets/angular-ts-CpuGw9DZ.js","assets/scss-Dq-LbI_c.js","assets/astro-B0lt4qz0.js","assets/json-D07AUpjp.js","assets/typescript-Cju7JbYj.js","assets/postcss-kj1IbjVd.js","assets/tsx-B9RA6cgQ.js","assets/blade-DtOFwYfC.js","assets/html-derivative-Cswrtqyq.js","assets/xml-BMzZeaqs.js","assets/java-BfXh-0uJ.js","assets/sql-DzUuSofg.js","assets/coffee-DJkIX6_2.js","assets/cpp-zh2ePAE_.js","assets/regexp-BxWeO75u.js","assets/glsl-CGsiYPcu.js","assets/c-C4VtT7JA.js","assets/graphql-oNSp8dGZ.js","assets/jsx-BPmvoin2.js","assets/haml-BJ44RGT2.js","assets/handlebars-DTnHNTeU.js","assets/yaml-B_vW5iTY.js","assets/http-B1QlEqj7.js","assets/bash-Bz2gZrDc.js","assets/hurl-Br_hZn4E.js","assets/csv-Ba84L8e5.js","assets/jinja-BAZ4h1JD.js","assets/jison-Bwp1bXaL.js","assets/julia-D0f5tMoo.js","assets/python-CrdIx4PZ.js","assets/r-oprfD2-9.js","assets/marko-rwefYVra.js","assets/less-BAzLMJNR.js","assets/mdc-ucHOH9Vl.js","assets/markdown-F_EULe_G.js","assets/php-CI-6KGJr.js","assets/pug-C-LeC0-n.js","assets/svelte-CYSO_rLN.js","assets/ts-tags-DCkNjov3.js","assets/vue-
|
|
2
|
-
import { _ as __vitePreload } from "./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-ChYFFmg7.js","assets/html-BOjX3v2Q.js","assets/javascript-DLs729Nk.js","assets/css-BtVcDqlU.js","assets/angular-ts-CpuGw9DZ.js","assets/scss-Dq-LbI_c.js","assets/astro-B0lt4qz0.js","assets/json-D07AUpjp.js","assets/typescript-Cju7JbYj.js","assets/postcss-kj1IbjVd.js","assets/tsx-B9RA6cgQ.js","assets/blade-DtOFwYfC.js","assets/html-derivative-Cswrtqyq.js","assets/xml-BMzZeaqs.js","assets/java-BfXh-0uJ.js","assets/sql-DzUuSofg.js","assets/coffee-DJkIX6_2.js","assets/cpp-zh2ePAE_.js","assets/regexp-BxWeO75u.js","assets/glsl-CGsiYPcu.js","assets/c-C4VtT7JA.js","assets/graphql-oNSp8dGZ.js","assets/jsx-BPmvoin2.js","assets/haml-BJ44RGT2.js","assets/handlebars-DTnHNTeU.js","assets/yaml-B_vW5iTY.js","assets/http-B1QlEqj7.js","assets/bash-Bz2gZrDc.js","assets/hurl-Br_hZn4E.js","assets/csv-Ba84L8e5.js","assets/jinja-BAZ4h1JD.js","assets/jison-Bwp1bXaL.js","assets/julia-D0f5tMoo.js","assets/python-CrdIx4PZ.js","assets/r-oprfD2-9.js","assets/marko-rwefYVra.js","assets/less-BAzLMJNR.js","assets/mdc-ucHOH9Vl.js","assets/markdown-F_EULe_G.js","assets/php-CI-6KGJr.js","assets/pug-C-LeC0-n.js","assets/svelte-CYSO_rLN.js","assets/ts-tags-DCkNjov3.js","assets/vue-BQglRdBF.js","assets/vue-html-BS551n9F.js","assets/vue-vine-B43RKH9N.js","assets/stylus-DXFa_2Jl.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import { _ as __vitePreload } from "./index-DqbmCrrm.js";
|
|
3
3
|
let ShikiError$2 = class ShikiError extends Error {
|
|
4
4
|
constructor(message) {
|
|
5
5
|
super(message);
|
|
@@ -5269,6 +5269,9 @@ function addClassToHast(node, className) {
|
|
|
5269
5269
|
return node;
|
|
5270
5270
|
}
|
|
5271
5271
|
function splitLines(code, preserveEnding = false) {
|
|
5272
|
+
if (code.length === 0) {
|
|
5273
|
+
return [["", 0]];
|
|
5274
|
+
}
|
|
5272
5275
|
const parts = code.split(/(\r?\n)/g);
|
|
5273
5276
|
let index = 0;
|
|
5274
5277
|
const lines = [];
|
|
@@ -5314,14 +5317,26 @@ function createPositionConverter(code) {
|
|
|
5314
5317
|
}
|
|
5315
5318
|
function guessEmbeddedLanguages(code, _lang, highlighter) {
|
|
5316
5319
|
const langs = /* @__PURE__ */ new Set();
|
|
5317
|
-
for (const match of code.matchAll(
|
|
5318
|
-
|
|
5320
|
+
for (const match of code.matchAll(/:?lang=["']([^"']+)["']/g)) {
|
|
5321
|
+
const lang = match[1].toLowerCase().trim();
|
|
5322
|
+
if (lang)
|
|
5323
|
+
langs.add(lang);
|
|
5319
5324
|
}
|
|
5320
5325
|
for (const match of code.matchAll(/(?:```|~~~)([\w-]+)/g)) {
|
|
5321
|
-
|
|
5326
|
+
const lang = match[1].toLowerCase().trim();
|
|
5327
|
+
if (lang)
|
|
5328
|
+
langs.add(lang);
|
|
5322
5329
|
}
|
|
5323
5330
|
for (const match of code.matchAll(/\\begin\{([\w-]+)\}/g)) {
|
|
5324
|
-
|
|
5331
|
+
const lang = match[1].toLowerCase().trim();
|
|
5332
|
+
if (lang)
|
|
5333
|
+
langs.add(lang);
|
|
5334
|
+
}
|
|
5335
|
+
for (const match of code.matchAll(/<script\s+(?:type|lang)=["']([^"']+)["']/gi)) {
|
|
5336
|
+
const fullType = match[1].toLowerCase().trim();
|
|
5337
|
+
const lang = fullType.includes("/") ? fullType.split("/").pop() : fullType;
|
|
5338
|
+
if (lang)
|
|
5339
|
+
langs.add(lang);
|
|
5325
5340
|
}
|
|
5326
5341
|
if (!highlighter)
|
|
5327
5342
|
return Array.from(langs);
|
|
@@ -6042,15 +6057,26 @@ function tokenizeAnsiWithTheme(theme, fileContents, options) {
|
|
|
6042
6057
|
);
|
|
6043
6058
|
}
|
|
6044
6059
|
function dimColor(color) {
|
|
6045
|
-
const hexMatch = color.match(/#([0-9a-f]{3})
|
|
6060
|
+
const hexMatch = color.match(/#([0-9a-f]{3,8})/i);
|
|
6046
6061
|
if (hexMatch) {
|
|
6047
|
-
|
|
6048
|
-
|
|
6049
|
-
|
|
6050
|
-
|
|
6051
|
-
|
|
6052
|
-
|
|
6053
|
-
|
|
6062
|
+
const hex = hexMatch[1];
|
|
6063
|
+
if (hex.length === 8) {
|
|
6064
|
+
const alpha = Math.round(Number.parseInt(hex.slice(6, 8), 16) / 2).toString(16).padStart(2, "0");
|
|
6065
|
+
return `#${hex.slice(0, 6)}${alpha}`;
|
|
6066
|
+
} else if (hex.length === 6) {
|
|
6067
|
+
return `#${hex}80`;
|
|
6068
|
+
} else if (hex.length === 4) {
|
|
6069
|
+
const r = hex[0];
|
|
6070
|
+
const g = hex[1];
|
|
6071
|
+
const b = hex[2];
|
|
6072
|
+
const a = hex[3];
|
|
6073
|
+
const alpha = Math.round(Number.parseInt(`${a}${a}`, 16) / 2).toString(16).padStart(2, "0");
|
|
6074
|
+
return `#${r}${r}${g}${g}${b}${b}${alpha}`;
|
|
6075
|
+
} else if (hex.length === 3) {
|
|
6076
|
+
const r = hex[0];
|
|
6077
|
+
const g = hex[1];
|
|
6078
|
+
const b = hex[2];
|
|
6079
|
+
return `#${r}${r}${g}${g}${b}${b}80`;
|
|
6054
6080
|
}
|
|
6055
6081
|
}
|
|
6056
6082
|
const cssVarMatch = color.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);
|
|
@@ -6060,15 +6086,15 @@ function dimColor(color) {
|
|
|
6060
6086
|
}
|
|
6061
6087
|
function codeToTokensBase$1(internal, code, options = {}) {
|
|
6062
6088
|
const {
|
|
6063
|
-
lang = "text",
|
|
6064
6089
|
theme: themeName = internal.getLoadedThemes()[0]
|
|
6065
6090
|
} = options;
|
|
6091
|
+
const lang = internal.resolveLangAlias(options.lang || "text");
|
|
6066
6092
|
if (isPlainLang(lang) || isNoneTheme(themeName))
|
|
6067
6093
|
return splitLines(code).map((line) => [{ content: line[0], offset: line[1] }]);
|
|
6068
6094
|
const { theme, colorMap } = internal.setTheme(themeName);
|
|
6069
6095
|
if (lang === "ansi")
|
|
6070
6096
|
return tokenizeAnsiWithTheme(theme, code, options);
|
|
6071
|
-
const _grammar = internal.getLanguage(lang);
|
|
6097
|
+
const _grammar = internal.getLanguage(options.lang || "text");
|
|
6072
6098
|
if (options.grammarState) {
|
|
6073
6099
|
if (options.grammarState.lang !== _grammar.name) {
|
|
6074
6100
|
throw new ShikiError$2(`Grammar state language "${options.grammarState.lang}" does not match highlight language "${_grammar.name}"`);
|
|
@@ -6103,7 +6129,7 @@ function getLastGrammarState$1(...args) {
|
|
|
6103
6129
|
function tokenizeWithTheme(code, grammar, theme, colorMap, options) {
|
|
6104
6130
|
const result = _tokenizeWithTheme(code, grammar, theme, colorMap, options);
|
|
6105
6131
|
const grammarState = new GrammarState(
|
|
6106
|
-
|
|
6132
|
+
result.stateStack,
|
|
6107
6133
|
grammar.name,
|
|
6108
6134
|
theme.name
|
|
6109
6135
|
);
|
|
@@ -6474,7 +6500,7 @@ function codeToHast$1(internal, code, options, transformerContext = {
|
|
|
6474
6500
|
fg,
|
|
6475
6501
|
bg,
|
|
6476
6502
|
themeName,
|
|
6477
|
-
rootStyle
|
|
6503
|
+
rootStyle: options.rootStyle === false ? false : options.rootStyle ?? rootStyle
|
|
6478
6504
|
},
|
|
6479
6505
|
contextSource,
|
|
6480
6506
|
grammarState
|
|
@@ -6491,21 +6517,25 @@ function tokensToHast(tokens, options, transformerContext, grammarState = getLas
|
|
|
6491
6517
|
structure = "classic",
|
|
6492
6518
|
tabindex = "0"
|
|
6493
6519
|
} = options;
|
|
6520
|
+
const properties = {
|
|
6521
|
+
class: `shiki ${options.themeName || ""}`
|
|
6522
|
+
};
|
|
6523
|
+
if (options.rootStyle !== false) {
|
|
6524
|
+
if (options.rootStyle != null)
|
|
6525
|
+
properties.style = options.rootStyle;
|
|
6526
|
+
else
|
|
6527
|
+
properties.style = `background-color:${options.bg};color:${options.fg}`;
|
|
6528
|
+
}
|
|
6529
|
+
if (tabindex !== false && tabindex != null)
|
|
6530
|
+
properties.tabindex = tabindex.toString();
|
|
6531
|
+
for (const [key2, value] of Object.entries(options.meta || {})) {
|
|
6532
|
+
if (!key2.startsWith("_"))
|
|
6533
|
+
properties[key2] = value;
|
|
6534
|
+
}
|
|
6494
6535
|
let preNode = {
|
|
6495
6536
|
type: "element",
|
|
6496
6537
|
tagName: "pre",
|
|
6497
|
-
properties
|
|
6498
|
-
class: `shiki ${options.themeName || ""}`,
|
|
6499
|
-
style: options.rootStyle || `background-color:${options.bg};color:${options.fg}`,
|
|
6500
|
-
...tabindex !== false && tabindex != null ? {
|
|
6501
|
-
tabindex: tabindex.toString()
|
|
6502
|
-
} : {},
|
|
6503
|
-
...Object.fromEntries(
|
|
6504
|
-
Array.from(
|
|
6505
|
-
Object.entries(options.meta || {})
|
|
6506
|
-
).filter(([key2]) => !key2.startsWith("_"))
|
|
6507
|
-
)
|
|
6508
|
-
},
|
|
6538
|
+
properties,
|
|
6509
6539
|
children: []
|
|
6510
6540
|
};
|
|
6511
6541
|
let codeNode = {
|
|
@@ -6580,6 +6610,8 @@ function tokensToHast(tokens, options, transformerContext, grammarState = getLas
|
|
|
6580
6610
|
lineNode = transformer?.line?.call(context, lineNode, idx + 1) || lineNode;
|
|
6581
6611
|
lineNodes.push(lineNode);
|
|
6582
6612
|
lines.push(lineNode);
|
|
6613
|
+
} else if (structure === "inline") {
|
|
6614
|
+
lineNodes.push(lineNode);
|
|
6583
6615
|
}
|
|
6584
6616
|
});
|
|
6585
6617
|
if (structure === "classic") {
|
|
@@ -6589,6 +6621,45 @@ function tokensToHast(tokens, options, transformerContext, grammarState = getLas
|
|
|
6589
6621
|
for (const transformer of transformers)
|
|
6590
6622
|
preNode = transformer?.pre?.call(context, preNode) || preNode;
|
|
6591
6623
|
root2.children.push(preNode);
|
|
6624
|
+
} else if (structure === "inline") {
|
|
6625
|
+
const syntheticLines = [];
|
|
6626
|
+
let currentLine = {
|
|
6627
|
+
type: "element",
|
|
6628
|
+
tagName: "span",
|
|
6629
|
+
properties: { class: "line" },
|
|
6630
|
+
children: []
|
|
6631
|
+
};
|
|
6632
|
+
for (const child of root2.children) {
|
|
6633
|
+
if (child.type === "element" && child.tagName === "br") {
|
|
6634
|
+
syntheticLines.push(currentLine);
|
|
6635
|
+
currentLine = {
|
|
6636
|
+
type: "element",
|
|
6637
|
+
tagName: "span",
|
|
6638
|
+
properties: { class: "line" },
|
|
6639
|
+
children: []
|
|
6640
|
+
};
|
|
6641
|
+
} else if (child.type === "element" || child.type === "text") {
|
|
6642
|
+
currentLine.children.push(child);
|
|
6643
|
+
}
|
|
6644
|
+
}
|
|
6645
|
+
syntheticLines.push(currentLine);
|
|
6646
|
+
const syntheticCode = {
|
|
6647
|
+
type: "element",
|
|
6648
|
+
tagName: "code",
|
|
6649
|
+
properties: {},
|
|
6650
|
+
children: syntheticLines
|
|
6651
|
+
};
|
|
6652
|
+
let transformedCode = syntheticCode;
|
|
6653
|
+
for (const transformer of transformers)
|
|
6654
|
+
transformedCode = transformer?.code?.call(context, transformedCode) || transformedCode;
|
|
6655
|
+
root2.children = [];
|
|
6656
|
+
for (let i = 0; i < transformedCode.children.length; i++) {
|
|
6657
|
+
if (i > 0)
|
|
6658
|
+
root2.children.push({ type: "element", tagName: "br", properties: {}, children: [] });
|
|
6659
|
+
const line = transformedCode.children[i];
|
|
6660
|
+
if (line.type === "element")
|
|
6661
|
+
root2.children.push(...line.children);
|
|
6662
|
+
}
|
|
6592
6663
|
}
|
|
6593
6664
|
let result = root2;
|
|
6594
6665
|
for (const transformer of transformers)
|
|
@@ -6601,12 +6672,12 @@ function mergeWhitespaceTokens(tokens) {
|
|
|
6601
6672
|
return tokens.map((line) => {
|
|
6602
6673
|
const newLine = [];
|
|
6603
6674
|
let carryOnContent = "";
|
|
6604
|
-
let firstOffset
|
|
6675
|
+
let firstOffset;
|
|
6605
6676
|
line.forEach((token, idx) => {
|
|
6606
6677
|
const isDecorated = token.fontStyle && (token.fontStyle & FontStyle.Underline || token.fontStyle & FontStyle.Strikethrough);
|
|
6607
6678
|
const couldMerge = !isDecorated;
|
|
6608
6679
|
if (couldMerge && token.content.match(/^\s+$/) && line[idx + 1]) {
|
|
6609
|
-
if (
|
|
6680
|
+
if (firstOffset === void 0)
|
|
6610
6681
|
firstOffset = token.offset;
|
|
6611
6682
|
carryOnContent += token.content;
|
|
6612
6683
|
} else {
|
|
@@ -6626,7 +6697,7 @@ function mergeWhitespaceTokens(tokens) {
|
|
|
6626
6697
|
token
|
|
6627
6698
|
);
|
|
6628
6699
|
}
|
|
6629
|
-
firstOffset = 0;
|
|
6700
|
+
firstOffset = void 0;
|
|
6630
6701
|
carryOnContent = "";
|
|
6631
6702
|
} else {
|
|
6632
6703
|
newLine.push(token);
|
|
@@ -6832,6 +6903,20 @@ let ShikiError$1 = class ShikiError2 extends Error {
|
|
|
6832
6903
|
this.name = "ShikiError";
|
|
6833
6904
|
}
|
|
6834
6905
|
};
|
|
6906
|
+
function resolveLangAlias(name, alias) {
|
|
6907
|
+
if (!alias)
|
|
6908
|
+
return name;
|
|
6909
|
+
if (alias[name]) {
|
|
6910
|
+
const resolved = /* @__PURE__ */ new Set([name]);
|
|
6911
|
+
while (alias[name]) {
|
|
6912
|
+
name = alias[name];
|
|
6913
|
+
if (resolved.has(name))
|
|
6914
|
+
throw new ShikiError$1(`Circular alias \`${Array.from(resolved).join(" -> ")} -> ${name}\``);
|
|
6915
|
+
resolved.add(name);
|
|
6916
|
+
}
|
|
6917
|
+
}
|
|
6918
|
+
return name;
|
|
6919
|
+
}
|
|
6835
6920
|
class Registry2 extends Registry$1 {
|
|
6836
6921
|
constructor(_resolver, _themes, _langs, _alias = {}) {
|
|
6837
6922
|
super(_resolver);
|
|
@@ -6882,15 +6967,7 @@ class Registry2 extends Registry$1 {
|
|
|
6882
6967
|
this._syncRegistry.setTheme(textmateTheme);
|
|
6883
6968
|
}
|
|
6884
6969
|
getGrammar(name) {
|
|
6885
|
-
|
|
6886
|
-
const resolved = /* @__PURE__ */ new Set([name]);
|
|
6887
|
-
while (this._alias[name]) {
|
|
6888
|
-
name = this._alias[name];
|
|
6889
|
-
if (resolved.has(name))
|
|
6890
|
-
throw new ShikiError$1(`Circular alias \`${Array.from(resolved).join(" -> ")} -> ${name}\``);
|
|
6891
|
-
resolved.add(name);
|
|
6892
|
-
}
|
|
6893
|
-
}
|
|
6970
|
+
name = resolveLangAlias(name, this._alias);
|
|
6894
6971
|
return this._resolvedGrammars.get(name);
|
|
6895
6972
|
}
|
|
6896
6973
|
loadLanguage(lang) {
|
|
@@ -6938,7 +7015,12 @@ class Registry2 extends Registry$1 {
|
|
|
6938
7015
|
const langsGraphArray = Array.from(this._langGraph.entries());
|
|
6939
7016
|
const missingLangs = langsGraphArray.filter(([_, lang]) => !lang);
|
|
6940
7017
|
if (missingLangs.length) {
|
|
6941
|
-
const dependents = langsGraphArray.filter(([_, lang]) =>
|
|
7018
|
+
const dependents = langsGraphArray.filter(([_, lang]) => {
|
|
7019
|
+
if (!lang)
|
|
7020
|
+
return false;
|
|
7021
|
+
const embedded = lang.embeddedLanguages || lang.embeddedLangs;
|
|
7022
|
+
return embedded?.some((l) => missingLangs.map(([name]) => name).includes(l));
|
|
7023
|
+
}).filter((lang) => !missingLangs.includes(lang));
|
|
6942
7024
|
throw new ShikiError$1(`Missing languages ${missingLangs.map(([name]) => `\`${name}\``).join(", ")}, required by ${dependents.map(([name]) => `\`${name}\``).join(", ")}`);
|
|
6943
7025
|
}
|
|
6944
7026
|
for (const [_, lang] of langsGraphArray)
|
|
@@ -6957,8 +7039,9 @@ class Registry2 extends Registry$1 {
|
|
|
6957
7039
|
resolveEmbeddedLanguages(lang) {
|
|
6958
7040
|
this._langMap.set(lang.name, lang);
|
|
6959
7041
|
this._langGraph.set(lang.name, lang);
|
|
6960
|
-
|
|
6961
|
-
|
|
7042
|
+
const embedded = lang.embeddedLanguages ?? lang.embeddedLangs;
|
|
7043
|
+
if (embedded) {
|
|
7044
|
+
for (const embeddedLang of embedded)
|
|
6962
7045
|
this._langGraph.set(embeddedLang, this._langMap.get(embeddedLang));
|
|
6963
7046
|
}
|
|
6964
7047
|
}
|
|
@@ -7023,6 +7106,9 @@ function createShikiInternalSync(options) {
|
|
|
7023
7106
|
const resolver = new Resolver(options.engine, langs);
|
|
7024
7107
|
const _registry = new Registry2(resolver, themes, langs, options.langAlias);
|
|
7025
7108
|
let _lastTheme;
|
|
7109
|
+
function resolveLangAlias$1(name) {
|
|
7110
|
+
return resolveLangAlias(name, options.langAlias);
|
|
7111
|
+
}
|
|
7026
7112
|
function getLanguage(name) {
|
|
7027
7113
|
ensureNotDisposed();
|
|
7028
7114
|
const _lang = _registry.getGrammar(typeof name === "string" ? name : name.name);
|
|
@@ -7094,6 +7180,7 @@ function createShikiInternalSync(options) {
|
|
|
7094
7180
|
getLanguage,
|
|
7095
7181
|
getLoadedThemes,
|
|
7096
7182
|
getLoadedLanguages,
|
|
7183
|
+
resolveLangAlias: resolveLangAlias$1,
|
|
7097
7184
|
loadLanguage,
|
|
7098
7185
|
loadLanguageSync,
|
|
7099
7186
|
loadTheme,
|
|
@@ -7174,16 +7261,16 @@ function makeSingletonHighlighterCore(createHighlighter2) {
|
|
|
7174
7261
|
return getSingletonHighlighterCore2;
|
|
7175
7262
|
}
|
|
7176
7263
|
const getSingletonHighlighterCore = /* @__PURE__ */ makeSingletonHighlighterCore(createHighlighterCore);
|
|
7177
|
-
function
|
|
7264
|
+
function createBundledHighlighter(options) {
|
|
7178
7265
|
const bundledLanguages2 = options.langs;
|
|
7179
7266
|
const bundledThemes2 = options.themes;
|
|
7180
7267
|
const engine = options.engine;
|
|
7181
7268
|
async function createHighlighter2(options2) {
|
|
7182
7269
|
function resolveLang(lang) {
|
|
7183
7270
|
if (typeof lang === "string") {
|
|
7271
|
+
lang = options2.langAlias?.[lang] || lang;
|
|
7184
7272
|
if (isSpecialLang(lang))
|
|
7185
7273
|
return [];
|
|
7186
|
-
lang = options2.langAlias?.[lang] || lang;
|
|
7187
7274
|
const bundle = bundledLanguages2[lang];
|
|
7188
7275
|
if (!bundle)
|
|
7189
7276
|
throw new ShikiError$2(`Language \`${lang}\` is not included in this bundle. You may want to load it from external source.`);
|
|
@@ -7300,6 +7387,7 @@ function createSingletonShorthands(createHighlighter2, config) {
|
|
|
7300
7387
|
}
|
|
7301
7388
|
};
|
|
7302
7389
|
}
|
|
7390
|
+
const createdBundledHighlighter = createBundledHighlighter;
|
|
7303
7391
|
function createCssVariablesTheme(options = {}) {
|
|
7304
7392
|
const {
|
|
7305
7393
|
name = "css-variables",
|
|
@@ -7581,7 +7669,7 @@ const bundledThemesInfo = [
|
|
|
7581
7669
|
"id": "dark-plus",
|
|
7582
7670
|
"displayName": "Dark Plus",
|
|
7583
7671
|
"type": "dark",
|
|
7584
|
-
"import": (() => __vitePreload(() => import("./dark-plus-
|
|
7672
|
+
"import": (() => __vitePreload(() => import("./dark-plus-DmZ1Dzd4.js"), true ? [] : void 0))
|
|
7585
7673
|
},
|
|
7586
7674
|
{
|
|
7587
7675
|
"id": "dracula",
|
|
@@ -7815,19 +7903,19 @@ const bundledThemesInfo = [
|
|
|
7815
7903
|
"id": "rose-pine",
|
|
7816
7904
|
"displayName": "Rosé Pine",
|
|
7817
7905
|
"type": "dark",
|
|
7818
|
-
"import": (() => __vitePreload(() => import("./rose-pine-
|
|
7906
|
+
"import": (() => __vitePreload(() => import("./rose-pine-B-kZ4Z9q.js"), true ? [] : void 0))
|
|
7819
7907
|
},
|
|
7820
7908
|
{
|
|
7821
7909
|
"id": "rose-pine-dawn",
|
|
7822
7910
|
"displayName": "Rosé Pine Dawn",
|
|
7823
7911
|
"type": "light",
|
|
7824
|
-
"import": (() => __vitePreload(() => import("./rose-pine-dawn-
|
|
7912
|
+
"import": (() => __vitePreload(() => import("./rose-pine-dawn-efeVGdSI.js"), true ? [] : void 0))
|
|
7825
7913
|
},
|
|
7826
7914
|
{
|
|
7827
7915
|
"id": "rose-pine-moon",
|
|
7828
7916
|
"displayName": "Rosé Pine Moon",
|
|
7829
7917
|
"type": "dark",
|
|
7830
|
-
"import": (() => __vitePreload(() => import("./rose-pine-moon-
|
|
7918
|
+
"import": (() => __vitePreload(() => import("./rose-pine-moon-DmodZNzl.js"), true ? [] : void 0))
|
|
7831
7919
|
},
|
|
7832
7920
|
{
|
|
7833
7921
|
"id": "slack-dark",
|
|
@@ -8625,17 +8713,17 @@ const bundledLanguagesInfo = [
|
|
|
8625
8713
|
{
|
|
8626
8714
|
"id": "vue",
|
|
8627
8715
|
"name": "Vue",
|
|
8628
|
-
"import": (() => __vitePreload(() => import("./vue-
|
|
8716
|
+
"import": (() => __vitePreload(() => import("./vue-BQglRdBF.js").then((n) => n.a), true ? __vite__mapDeps([43,3,2,8,7,12,1]) : void 0))
|
|
8629
8717
|
},
|
|
8630
8718
|
{
|
|
8631
8719
|
"id": "vue-html",
|
|
8632
8720
|
"name": "Vue HTML",
|
|
8633
|
-
"import": (() => __vitePreload(() => import("./vue-html-
|
|
8721
|
+
"import": (() => __vitePreload(() => import("./vue-html-BS551n9F.js"), true ? __vite__mapDeps([44,43,3,2,8,7,12,1]) : void 0))
|
|
8634
8722
|
},
|
|
8635
8723
|
{
|
|
8636
8724
|
"id": "vue-vine",
|
|
8637
8725
|
"name": "Vue Vine",
|
|
8638
|
-
"import": (() => __vitePreload(() => import("./vue-vine-
|
|
8726
|
+
"import": (() => __vitePreload(() => import("./vue-vine-B43RKH9N.js"), true ? __vite__mapDeps([45,3,5,36,46,9,43,2,8,7,12,1]) : void 0))
|
|
8639
8727
|
},
|
|
8640
8728
|
{
|
|
8641
8729
|
"id": "wasm",
|
|
@@ -8672,7 +8760,7 @@ const bundledLanguages = {
|
|
|
8672
8760
|
...bundledLanguagesBase,
|
|
8673
8761
|
...bundledLanguagesAlias
|
|
8674
8762
|
};
|
|
8675
|
-
const createHighlighter = /* @__PURE__ */
|
|
8763
|
+
const createHighlighter = /* @__PURE__ */ createBundledHighlighter({
|
|
8676
8764
|
langs: bundledLanguages,
|
|
8677
8765
|
themes: bundledThemes,
|
|
8678
8766
|
engine: () => createOnigurumaEngine(__vitePreload(() => import("./wasm-DDgzZJey.js"), true ? [] : void 0))
|
|
@@ -8704,6 +8792,7 @@ export {
|
|
|
8704
8792
|
codeToTokens,
|
|
8705
8793
|
codeToTokensBase,
|
|
8706
8794
|
codeToTokensWithThemes,
|
|
8795
|
+
createBundledHighlighter,
|
|
8707
8796
|
createCssVariablesTheme,
|
|
8708
8797
|
createHighlighter,
|
|
8709
8798
|
createHighlighterCore,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const darkPlus = Object.freeze(JSON.parse('{"colors":{"actionBar.toggledBackground":"#383a49","activityBarBadge.background":"#007ACC","checkbox.border":"#6B6B6B","editor.background":"#1E1E1E","editor.foreground":"#D4D4D4","editor.inactiveSelectionBackground":"#3A3D41","editor.selectionHighlightBackground":"#ADD6FF26","editorIndentGuide.activeBackground1":"#707070","editorIndentGuide.background1":"#404040","input.placeholderForeground":"#A6A6A6","list.activeSelectionIconForeground":"#FFF","list.dropBackground":"#383B3D","menu.background":"#252526","menu.border":"#454545","menu.foreground":"#CCCCCC","menu.selectionBackground":"#0078d4","menu.separatorBackground":"#454545","ports.iconRunningProcessForeground":"#369432","sideBarSectionHeader.background":"#0000","sideBarSectionHeader.border":"#ccc3","sideBarTitle.foreground":"#BBBBBB","statusBarItem.remoteBackground":"#16825D","statusBarItem.remoteForeground":"#FFF","tab.lastPinnedBorder":"#ccc3","tab.selectedBackground":"#222222","tab.selectedForeground":"#ffffffa0","terminal.inactiveSelectionBackground":"#3A3D41","widget.border":"#303031"},"displayName":"Dark Plus","name":"dark-plus","semanticHighlighting":true,"semanticTokenColors":{"customLiteral":"#DCDCAA","newOperator":"#
|
|
1
|
+
const darkPlus = Object.freeze(JSON.parse('{"colors":{"actionBar.toggledBackground":"#383a49","activityBarBadge.background":"#007ACC","checkbox.border":"#6B6B6B","editor.background":"#1E1E1E","editor.foreground":"#D4D4D4","editor.inactiveSelectionBackground":"#3A3D41","editor.selectionHighlightBackground":"#ADD6FF26","editorIndentGuide.activeBackground1":"#707070","editorIndentGuide.background1":"#404040","input.placeholderForeground":"#A6A6A6","list.activeSelectionIconForeground":"#FFF","list.dropBackground":"#383B3D","menu.background":"#252526","menu.border":"#454545","menu.foreground":"#CCCCCC","menu.selectionBackground":"#0078d4","menu.separatorBackground":"#454545","ports.iconRunningProcessForeground":"#369432","sideBarSectionHeader.background":"#0000","sideBarSectionHeader.border":"#ccc3","sideBarTitle.foreground":"#BBBBBB","statusBarItem.remoteBackground":"#16825D","statusBarItem.remoteForeground":"#FFF","tab.lastPinnedBorder":"#ccc3","tab.selectedBackground":"#222222","tab.selectedForeground":"#ffffffa0","terminal.inactiveSelectionBackground":"#3A3D41","widget.border":"#303031"},"displayName":"Dark Plus","name":"dark-plus","semanticHighlighting":true,"semanticTokenColors":{"customLiteral":"#DCDCAA","newOperator":"#C586C0","numberLiteral":"#b5cea8","stringLiteral":"#ce9178"},"tokenColors":[{"scope":["meta.embedded","source.groovy.embedded","string meta.image.inline.markdown","variable.legacy.builtin.python"],"settings":{"foreground":"#D4D4D4"}},{"scope":"emphasis","settings":{"fontStyle":"italic"}},{"scope":"strong","settings":{"fontStyle":"bold"}},{"scope":"header","settings":{"foreground":"#000080"}},{"scope":"comment","settings":{"foreground":"#6A9955"}},{"scope":"constant.language","settings":{"foreground":"#569cd6"}},{"scope":["constant.numeric","variable.other.enummember","keyword.operator.plus.exponent","keyword.operator.minus.exponent"],"settings":{"foreground":"#b5cea8"}},{"scope":"constant.regexp","settings":{"foreground":"#646695"}},{"scope":"entity.name.tag","settings":{"foreground":"#569cd6"}},{"scope":["entity.name.tag.css","entity.name.tag.less"],"settings":{"foreground":"#d7ba7d"}},{"scope":"entity.other.attribute-name","settings":{"foreground":"#9cdcfe"}},{"scope":["entity.other.attribute-name.class.css","source.css entity.other.attribute-name.class","entity.other.attribute-name.id.css","entity.other.attribute-name.parent-selector.css","entity.other.attribute-name.parent.less","source.css entity.other.attribute-name.pseudo-class","entity.other.attribute-name.pseudo-element.css","source.css.less entity.other.attribute-name.id","entity.other.attribute-name.scss"],"settings":{"foreground":"#d7ba7d"}},{"scope":"invalid","settings":{"foreground":"#f44747"}},{"scope":"markup.underline","settings":{"fontStyle":"underline"}},{"scope":"markup.bold","settings":{"fontStyle":"bold","foreground":"#569cd6"}},{"scope":"markup.heading","settings":{"fontStyle":"bold","foreground":"#569cd6"}},{"scope":"markup.italic","settings":{"fontStyle":"italic"}},{"scope":"markup.strikethrough","settings":{"fontStyle":"strikethrough"}},{"scope":"markup.inserted","settings":{"foreground":"#b5cea8"}},{"scope":"markup.deleted","settings":{"foreground":"#ce9178"}},{"scope":"markup.changed","settings":{"foreground":"#569cd6"}},{"scope":"punctuation.definition.quote.begin.markdown","settings":{"foreground":"#6A9955"}},{"scope":"punctuation.definition.list.begin.markdown","settings":{"foreground":"#6796e6"}},{"scope":"markup.inline.raw","settings":{"foreground":"#ce9178"}},{"scope":"punctuation.definition.tag","settings":{"foreground":"#808080"}},{"scope":["meta.preprocessor","entity.name.function.preprocessor"],"settings":{"foreground":"#569cd6"}},{"scope":"meta.preprocessor.string","settings":{"foreground":"#ce9178"}},{"scope":"meta.preprocessor.numeric","settings":{"foreground":"#b5cea8"}},{"scope":"meta.structure.dictionary.key.python","settings":{"foreground":"#9cdcfe"}},{"scope":"meta.diff.header","settings":{"foreground":"#569cd6"}},{"scope":"storage","settings":{"foreground":"#569cd6"}},{"scope":"storage.type","settings":{"foreground":"#569cd6"}},{"scope":["storage.modifier","keyword.operator.noexcept"],"settings":{"foreground":"#569cd6"}},{"scope":["string","meta.embedded.assembly"],"settings":{"foreground":"#ce9178"}},{"scope":"string.tag","settings":{"foreground":"#ce9178"}},{"scope":"string.value","settings":{"foreground":"#ce9178"}},{"scope":"string.regexp","settings":{"foreground":"#d16969"}},{"scope":["punctuation.definition.template-expression.begin","punctuation.definition.template-expression.end","punctuation.section.embedded"],"settings":{"foreground":"#569cd6"}},{"scope":["meta.template.expression"],"settings":{"foreground":"#d4d4d4"}},{"scope":["support.type.vendored.property-name","support.type.property-name","source.css variable","source.coffee.embedded"],"settings":{"foreground":"#9cdcfe"}},{"scope":"keyword","settings":{"foreground":"#569cd6"}},{"scope":"keyword.control","settings":{"foreground":"#569cd6"}},{"scope":"keyword.operator","settings":{"foreground":"#d4d4d4"}},{"scope":["keyword.operator.new","keyword.operator.expression","keyword.operator.cast","keyword.operator.sizeof","keyword.operator.alignof","keyword.operator.typeid","keyword.operator.alignas","keyword.operator.instanceof","keyword.operator.logical.python","keyword.operator.wordlike"],"settings":{"foreground":"#569cd6"}},{"scope":"keyword.other.unit","settings":{"foreground":"#b5cea8"}},{"scope":["punctuation.section.embedded.begin.php","punctuation.section.embedded.end.php"],"settings":{"foreground":"#569cd6"}},{"scope":"support.function.git-rebase","settings":{"foreground":"#9cdcfe"}},{"scope":"constant.sha.git-rebase","settings":{"foreground":"#b5cea8"}},{"scope":["storage.modifier.import.java","variable.language.wildcard.java","storage.modifier.package.java"],"settings":{"foreground":"#d4d4d4"}},{"scope":"variable.language","settings":{"foreground":"#569cd6"}},{"scope":["entity.name.function","support.function","support.constant.handlebars","source.powershell variable.other.member","entity.name.operator.custom-literal"],"settings":{"foreground":"#DCDCAA"}},{"scope":["support.class","support.type","entity.name.type","entity.name.namespace","entity.other.attribute","entity.name.scope-resolution","entity.name.class","storage.type.numeric.go","storage.type.byte.go","storage.type.boolean.go","storage.type.string.go","storage.type.uintptr.go","storage.type.error.go","storage.type.rune.go","storage.type.cs","storage.type.generic.cs","storage.type.modifier.cs","storage.type.variable.cs","storage.type.annotation.java","storage.type.generic.java","storage.type.java","storage.type.object.array.java","storage.type.primitive.array.java","storage.type.primitive.java","storage.type.token.java","storage.type.groovy","storage.type.annotation.groovy","storage.type.parameters.groovy","storage.type.generic.groovy","storage.type.object.array.groovy","storage.type.primitive.array.groovy","storage.type.primitive.groovy"],"settings":{"foreground":"#4EC9B0"}},{"scope":["meta.type.cast.expr","meta.type.new.expr","support.constant.math","support.constant.dom","support.constant.json","entity.other.inherited-class","punctuation.separator.namespace.ruby"],"settings":{"foreground":"#4EC9B0"}},{"scope":["keyword.control","source.cpp keyword.operator.new","keyword.operator.delete","keyword.other.using","keyword.other.directive.using","keyword.other.operator","entity.name.operator"],"settings":{"foreground":"#C586C0"}},{"scope":["variable","meta.definition.variable.name","support.variable","entity.name.variable","constant.other.placeholder"],"settings":{"foreground":"#9CDCFE"}},{"scope":["variable.other.constant","variable.other.enummember"],"settings":{"foreground":"#4FC1FF"}},{"scope":["meta.object-literal.key"],"settings":{"foreground":"#9CDCFE"}},{"scope":["support.constant.property-value","support.constant.font-name","support.constant.media-type","support.constant.media","constant.other.color.rgb-value","constant.other.rgb-value","support.constant.color"],"settings":{"foreground":"#CE9178"}},{"scope":["punctuation.definition.group.regexp","punctuation.definition.group.assertion.regexp","punctuation.definition.character-class.regexp","punctuation.character.set.begin.regexp","punctuation.character.set.end.regexp","keyword.operator.negation.regexp","support.other.parenthesis.regexp"],"settings":{"foreground":"#CE9178"}},{"scope":["constant.character.character-class.regexp","constant.other.character-class.set.regexp","constant.other.character-class.regexp","constant.character.set.regexp"],"settings":{"foreground":"#d16969"}},{"scope":["keyword.operator.or.regexp","keyword.control.anchor.regexp"],"settings":{"foreground":"#DCDCAA"}},{"scope":"keyword.operator.quantifier.regexp","settings":{"foreground":"#d7ba7d"}},{"scope":["constant.character","constant.other.option"],"settings":{"foreground":"#569cd6"}},{"scope":"constant.character.escape","settings":{"foreground":"#d7ba7d"}},{"scope":"entity.name.label","settings":{"foreground":"#C8C8C8"}}],"type":"dark"}'));
|
|
2
2
|
export {
|
|
3
3
|
darkPlus as default
|
|
4
4
|
};
|