This commit is contained in:
2025-11-02 19:17:20 +08:00
parent ebf784146e
commit e71b69db5f
2575 changed files with 1242294 additions and 95 deletions

View File

@@ -0,0 +1,118 @@
define("vs/language/css/monaco.contribution", ["require", "exports", "../../editor.api-BhD7pWdi"], (function(require, exports, editor_api) {
"use strict";
class LanguageServiceDefaultsImpl {
constructor(languageId, options, modeConfiguration) {
this._onDidChange = new editor_api.Emitter();
this._languageId = languageId;
this.setOptions(options);
this.setModeConfiguration(modeConfiguration);
}
get onDidChange() {
return this._onDidChange.event;
}
get languageId() {
return this._languageId;
}
get modeConfiguration() {
return this._modeConfiguration;
}
get diagnosticsOptions() {
return this.options;
}
get options() {
return this._options;
}
setOptions(options) {
this._options = options || /* @__PURE__ */ Object.create(null);
this._onDidChange.fire(this);
}
setDiagnosticsOptions(options) {
this.setOptions(options);
}
setModeConfiguration(modeConfiguration) {
this._modeConfiguration = modeConfiguration || /* @__PURE__ */ Object.create(null);
this._onDidChange.fire(this);
}
}
const optionsDefault = {
validate: true,
lint: {
compatibleVendorPrefixes: "ignore",
vendorPrefix: "warning",
duplicateProperties: "warning",
emptyRules: "warning",
importStatement: "ignore",
boxModel: "ignore",
universalSelector: "ignore",
zeroUnits: "ignore",
fontFaceProperties: "warning",
hexColorLength: "error",
argumentsInColorFunction: "error",
unknownProperties: "warning",
ieHack: "ignore",
unknownVendorSpecificProperties: "ignore",
propertyIgnoredDueToDisplay: "warning",
important: "ignore",
float: "ignore",
idSelector: "ignore"
},
data: { useDefaultDataProvider: true },
format: {
newlineBetweenSelectors: true,
newlineBetweenRules: true,
spaceAroundSelectorSeparator: false,
braceStyle: "collapse",
maxPreserveNewLines: void 0,
preserveNewLines: true
}
};
const modeConfigurationDefault = {
completionItems: true,
hovers: true,
documentSymbols: true,
definitions: true,
references: true,
documentHighlights: true,
rename: true,
colors: true,
foldingRanges: true,
diagnostics: true,
selectionRanges: true,
documentFormattingEdits: true,
documentRangeFormattingEdits: true
};
const cssDefaults = new LanguageServiceDefaultsImpl(
"css",
optionsDefault,
modeConfigurationDefault
);
const scssDefaults = new LanguageServiceDefaultsImpl(
"scss",
optionsDefault,
modeConfigurationDefault
);
const lessDefaults = new LanguageServiceDefaultsImpl(
"less",
optionsDefault,
modeConfigurationDefault
);
editor_api.languages.css = { cssDefaults, lessDefaults, scssDefaults };
function getMode() {
{
return new Promise((resolve, reject) => require(["../../cssMode-YNsTpAl9"], resolve, reject));
}
}
editor_api.languages.onLanguage("less", () => {
getMode().then((mode2) => mode2.setupMode(lessDefaults));
});
editor_api.languages.onLanguage("scss", () => {
getMode().then((mode2) => mode2.setupMode(scssDefaults));
});
editor_api.languages.onLanguage("css", () => {
getMode().then((mode2) => mode2.setupMode(cssDefaults));
});
exports.cssDefaults = cssDefaults;
exports.lessDefaults = lessDefaults;
exports.scssDefaults = scssDefaults;
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
}));

View File

@@ -0,0 +1,127 @@
define("vs/language/html/monaco.contribution", ["require", "exports", "../../editor.api-BhD7pWdi"], (function(require, exports, editor_api) {
"use strict";
class LanguageServiceDefaultsImpl {
constructor(languageId, options, modeConfiguration) {
this._onDidChange = new editor_api.Emitter();
this._languageId = languageId;
this.setOptions(options);
this.setModeConfiguration(modeConfiguration);
}
get onDidChange() {
return this._onDidChange.event;
}
get languageId() {
return this._languageId;
}
get options() {
return this._options;
}
get modeConfiguration() {
return this._modeConfiguration;
}
setOptions(options) {
this._options = options || /* @__PURE__ */ Object.create(null);
this._onDidChange.fire(this);
}
setModeConfiguration(modeConfiguration) {
this._modeConfiguration = modeConfiguration || /* @__PURE__ */ Object.create(null);
this._onDidChange.fire(this);
}
}
const formatDefaults = {
tabSize: 4,
insertSpaces: false,
wrapLineLength: 120,
unformatted: 'default": "a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, select, small, span, strong, sub, sup, textarea, tt, var',
contentUnformatted: "pre",
indentInnerHtml: false,
preserveNewLines: true,
maxPreserveNewLines: void 0,
indentHandlebars: false,
endWithNewline: false,
extraLiners: "head, body, /html",
wrapAttributes: "auto"
};
const optionsDefault = {
format: formatDefaults,
suggest: {},
data: { useDefaultDataProvider: true }
};
function getConfigurationDefault(languageId) {
return {
completionItems: true,
hovers: true,
documentSymbols: true,
links: true,
documentHighlights: true,
rename: true,
colors: true,
foldingRanges: true,
selectionRanges: true,
diagnostics: languageId === htmlLanguageId,
// turned off for Razor and Handlebar
documentFormattingEdits: languageId === htmlLanguageId,
// turned off for Razor and Handlebar
documentRangeFormattingEdits: languageId === htmlLanguageId
// turned off for Razor and Handlebar
};
}
const htmlLanguageId = "html";
const handlebarsLanguageId = "handlebars";
const razorLanguageId = "razor";
const htmlLanguageService = registerHTMLLanguageService(
htmlLanguageId,
optionsDefault,
getConfigurationDefault(htmlLanguageId)
);
const htmlDefaults = htmlLanguageService.defaults;
const handlebarLanguageService = registerHTMLLanguageService(
handlebarsLanguageId,
optionsDefault,
getConfigurationDefault(handlebarsLanguageId)
);
const handlebarDefaults = handlebarLanguageService.defaults;
const razorLanguageService = registerHTMLLanguageService(
razorLanguageId,
optionsDefault,
getConfigurationDefault(razorLanguageId)
);
const razorDefaults = razorLanguageService.defaults;
editor_api.languages.html = {
htmlDefaults,
razorDefaults,
handlebarDefaults,
htmlLanguageService,
handlebarLanguageService,
razorLanguageService,
registerHTMLLanguageService
};
function getMode() {
{
return new Promise((resolve, reject) => require(["../../htmlMode-BL74tky3"], resolve, reject));
}
}
function registerHTMLLanguageService(languageId, options = optionsDefault, modeConfiguration = getConfigurationDefault(languageId)) {
const defaults = new LanguageServiceDefaultsImpl(languageId, options, modeConfiguration);
let mode2;
const onLanguageListener = editor_api.languages.onLanguage(languageId, async () => {
mode2 = (await getMode()).setupMode(defaults);
});
return {
defaults,
dispose() {
onLanguageListener.dispose();
mode2?.dispose();
mode2 = void 0;
}
};
}
exports.handlebarDefaults = handlebarDefaults;
exports.handlebarLanguageService = handlebarLanguageService;
exports.htmlDefaults = htmlDefaults;
exports.htmlLanguageService = htmlLanguageService;
exports.razorDefaults = razorDefaults;
exports.razorLanguageService = razorLanguageService;
exports.registerHTMLLanguageService = registerHTMLLanguageService;
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
}));

View File

@@ -0,0 +1,77 @@
define("vs/language/json/monaco.contribution", ["require", "exports", "../../editor.api-BhD7pWdi"], (function(require, exports, editor_api) {
"use strict";
class LanguageServiceDefaultsImpl {
constructor(languageId, diagnosticsOptions, modeConfiguration) {
this._onDidChange = new editor_api.Emitter();
this._languageId = languageId;
this.setDiagnosticsOptions(diagnosticsOptions);
this.setModeConfiguration(modeConfiguration);
}
get onDidChange() {
return this._onDidChange.event;
}
get languageId() {
return this._languageId;
}
get modeConfiguration() {
return this._modeConfiguration;
}
get diagnosticsOptions() {
return this._diagnosticsOptions;
}
setDiagnosticsOptions(options) {
this._diagnosticsOptions = options || /* @__PURE__ */ Object.create(null);
this._onDidChange.fire(this);
}
setModeConfiguration(modeConfiguration) {
this._modeConfiguration = modeConfiguration || /* @__PURE__ */ Object.create(null);
this._onDidChange.fire(this);
}
}
const diagnosticDefault = {
validate: true,
allowComments: true,
schemas: [],
enableSchemaRequest: false,
schemaRequest: "warning",
schemaValidation: "warning",
comments: "error",
trailingCommas: "error"
};
const modeConfigurationDefault = {
documentFormattingEdits: true,
documentRangeFormattingEdits: true,
completionItems: true,
hovers: true,
documentSymbols: true,
tokens: true,
colors: true,
foldingRanges: true,
diagnostics: true,
selectionRanges: true
};
const jsonDefaults = new LanguageServiceDefaultsImpl(
"json",
diagnosticDefault,
modeConfigurationDefault
);
const getWorker = () => getMode().then((mode2) => mode2.getWorker());
editor_api.languages.json = { jsonDefaults, getWorker };
function getMode() {
{
return new Promise((resolve, reject) => require(["../../jsonMode-KHMzkiG2"], resolve, reject));
}
}
editor_api.languages.register({
id: "json",
extensions: [".json", ".bowerrc", ".jshintrc", ".jscsrc", ".eslintrc", ".babelrc", ".har"],
aliases: ["JSON", "json"],
mimetypes: ["application/json"]
});
editor_api.languages.onLanguage("json", () => {
getMode().then((mode2) => mode2.setupMode(jsonDefaults));
});
exports.getWorker = getWorker;
exports.jsonDefaults = jsonDefaults;
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
}));

View File

@@ -0,0 +1,266 @@
define("vs/language/typescript/monaco.contribution", ["require", "exports", "../../editor.api-BhD7pWdi"], (function(require, exports, editor_api) {
"use strict";
const typescriptVersion$1 = "5.4.5";
var ModuleKind = /* @__PURE__ */ ((ModuleKind2) => {
ModuleKind2[ModuleKind2["None"] = 0] = "None";
ModuleKind2[ModuleKind2["CommonJS"] = 1] = "CommonJS";
ModuleKind2[ModuleKind2["AMD"] = 2] = "AMD";
ModuleKind2[ModuleKind2["UMD"] = 3] = "UMD";
ModuleKind2[ModuleKind2["System"] = 4] = "System";
ModuleKind2[ModuleKind2["ES2015"] = 5] = "ES2015";
ModuleKind2[ModuleKind2["ESNext"] = 99] = "ESNext";
return ModuleKind2;
})(ModuleKind || {});
var JsxEmit = /* @__PURE__ */ ((JsxEmit2) => {
JsxEmit2[JsxEmit2["None"] = 0] = "None";
JsxEmit2[JsxEmit2["Preserve"] = 1] = "Preserve";
JsxEmit2[JsxEmit2["React"] = 2] = "React";
JsxEmit2[JsxEmit2["ReactNative"] = 3] = "ReactNative";
JsxEmit2[JsxEmit2["ReactJSX"] = 4] = "ReactJSX";
JsxEmit2[JsxEmit2["ReactJSXDev"] = 5] = "ReactJSXDev";
return JsxEmit2;
})(JsxEmit || {});
var NewLineKind = /* @__PURE__ */ ((NewLineKind2) => {
NewLineKind2[NewLineKind2["CarriageReturnLineFeed"] = 0] = "CarriageReturnLineFeed";
NewLineKind2[NewLineKind2["LineFeed"] = 1] = "LineFeed";
return NewLineKind2;
})(NewLineKind || {});
var ScriptTarget = /* @__PURE__ */ ((ScriptTarget2) => {
ScriptTarget2[ScriptTarget2["ES3"] = 0] = "ES3";
ScriptTarget2[ScriptTarget2["ES5"] = 1] = "ES5";
ScriptTarget2[ScriptTarget2["ES2015"] = 2] = "ES2015";
ScriptTarget2[ScriptTarget2["ES2016"] = 3] = "ES2016";
ScriptTarget2[ScriptTarget2["ES2017"] = 4] = "ES2017";
ScriptTarget2[ScriptTarget2["ES2018"] = 5] = "ES2018";
ScriptTarget2[ScriptTarget2["ES2019"] = 6] = "ES2019";
ScriptTarget2[ScriptTarget2["ES2020"] = 7] = "ES2020";
ScriptTarget2[ScriptTarget2["ESNext"] = 99] = "ESNext";
ScriptTarget2[ScriptTarget2["JSON"] = 100] = "JSON";
ScriptTarget2[
ScriptTarget2["Latest"] = 99
/* ESNext */
] = "Latest";
return ScriptTarget2;
})(ScriptTarget || {});
var ModuleResolutionKind = /* @__PURE__ */ ((ModuleResolutionKind2) => {
ModuleResolutionKind2[ModuleResolutionKind2["Classic"] = 1] = "Classic";
ModuleResolutionKind2[ModuleResolutionKind2["NodeJs"] = 2] = "NodeJs";
return ModuleResolutionKind2;
})(ModuleResolutionKind || {});
class LanguageServiceDefaultsImpl {
constructor(compilerOptions, diagnosticsOptions, workerOptions, inlayHintsOptions, modeConfiguration) {
this._onDidChange = new editor_api.Emitter();
this._onDidExtraLibsChange = new editor_api.Emitter();
this._extraLibs = /* @__PURE__ */ Object.create(null);
this._removedExtraLibs = /* @__PURE__ */ Object.create(null);
this._eagerModelSync = false;
this.setCompilerOptions(compilerOptions);
this.setDiagnosticsOptions(diagnosticsOptions);
this.setWorkerOptions(workerOptions);
this.setInlayHintsOptions(inlayHintsOptions);
this.setModeConfiguration(modeConfiguration);
this._onDidExtraLibsChangeTimeout = -1;
}
get onDidChange() {
return this._onDidChange.event;
}
get onDidExtraLibsChange() {
return this._onDidExtraLibsChange.event;
}
get modeConfiguration() {
return this._modeConfiguration;
}
get workerOptions() {
return this._workerOptions;
}
get inlayHintsOptions() {
return this._inlayHintsOptions;
}
getExtraLibs() {
return this._extraLibs;
}
addExtraLib(content, _filePath) {
let filePath;
if (typeof _filePath === "undefined") {
filePath = `ts:extralib-${Math.random().toString(36).substring(2, 15)}`;
} else {
filePath = _filePath;
}
if (this._extraLibs[filePath] && this._extraLibs[filePath].content === content) {
return {
dispose: () => {
}
};
}
let myVersion = 1;
if (this._removedExtraLibs[filePath]) {
myVersion = this._removedExtraLibs[filePath] + 1;
}
if (this._extraLibs[filePath]) {
myVersion = this._extraLibs[filePath].version + 1;
}
this._extraLibs[filePath] = {
content,
version: myVersion
};
this._fireOnDidExtraLibsChangeSoon();
return {
dispose: () => {
let extraLib = this._extraLibs[filePath];
if (!extraLib) {
return;
}
if (extraLib.version !== myVersion) {
return;
}
delete this._extraLibs[filePath];
this._removedExtraLibs[filePath] = myVersion;
this._fireOnDidExtraLibsChangeSoon();
}
};
}
setExtraLibs(libs) {
for (const filePath in this._extraLibs) {
this._removedExtraLibs[filePath] = this._extraLibs[filePath].version;
}
this._extraLibs = /* @__PURE__ */ Object.create(null);
if (libs && libs.length > 0) {
for (const lib of libs) {
const filePath = lib.filePath || `ts:extralib-${Math.random().toString(36).substring(2, 15)}`;
const content = lib.content;
let myVersion = 1;
if (this._removedExtraLibs[filePath]) {
myVersion = this._removedExtraLibs[filePath] + 1;
}
this._extraLibs[filePath] = {
content,
version: myVersion
};
}
}
this._fireOnDidExtraLibsChangeSoon();
}
_fireOnDidExtraLibsChangeSoon() {
if (this._onDidExtraLibsChangeTimeout !== -1) {
return;
}
this._onDidExtraLibsChangeTimeout = window.setTimeout(() => {
this._onDidExtraLibsChangeTimeout = -1;
this._onDidExtraLibsChange.fire(void 0);
}, 0);
}
getCompilerOptions() {
return this._compilerOptions;
}
setCompilerOptions(options) {
this._compilerOptions = options || /* @__PURE__ */ Object.create(null);
this._onDidChange.fire(void 0);
}
getDiagnosticsOptions() {
return this._diagnosticsOptions;
}
setDiagnosticsOptions(options) {
this._diagnosticsOptions = options || /* @__PURE__ */ Object.create(null);
this._onDidChange.fire(void 0);
}
setWorkerOptions(options) {
this._workerOptions = options || /* @__PURE__ */ Object.create(null);
this._onDidChange.fire(void 0);
}
setInlayHintsOptions(options) {
this._inlayHintsOptions = options || /* @__PURE__ */ Object.create(null);
this._onDidChange.fire(void 0);
}
setMaximumWorkerIdleTime(value) {
}
setEagerModelSync(value) {
this._eagerModelSync = value;
}
getEagerModelSync() {
return this._eagerModelSync;
}
setModeConfiguration(modeConfiguration) {
this._modeConfiguration = modeConfiguration || /* @__PURE__ */ Object.create(null);
this._onDidChange.fire(void 0);
}
}
const typescriptVersion = typescriptVersion$1;
const modeConfigurationDefault = {
completionItems: true,
hovers: true,
documentSymbols: true,
definitions: true,
references: true,
documentHighlights: true,
rename: true,
diagnostics: true,
documentRangeFormattingEdits: true,
signatureHelp: true,
onTypeFormattingEdits: true,
codeActions: true,
inlayHints: true
};
const typescriptDefaults = new LanguageServiceDefaultsImpl(
{
allowNonTsExtensions: true,
target: 99
/* Latest */
},
{ noSemanticValidation: false, noSyntaxValidation: false, onlyVisible: false },
{},
{},
modeConfigurationDefault
);
const javascriptDefaults = new LanguageServiceDefaultsImpl(
{
allowNonTsExtensions: true,
allowJs: true,
target: 99
/* Latest */
},
{ noSemanticValidation: true, noSyntaxValidation: false, onlyVisible: false },
{},
{},
modeConfigurationDefault
);
const getTypeScriptWorker = () => {
return getMode().then((mode) => mode.getTypeScriptWorker());
};
const getJavaScriptWorker = () => {
return getMode().then((mode) => mode.getJavaScriptWorker());
};
editor_api.languages.typescript = {
ModuleKind,
JsxEmit,
NewLineKind,
ScriptTarget,
ModuleResolutionKind,
typescriptVersion,
typescriptDefaults,
javascriptDefaults,
getTypeScriptWorker,
getJavaScriptWorker
};
function getMode() {
{
return new Promise((resolve, reject) => require(["../../tsMode-DOj38qML"], resolve, reject));
}
}
editor_api.languages.onLanguage("typescript", () => {
return getMode().then((mode) => mode.setupTypeScript(typescriptDefaults));
});
editor_api.languages.onLanguage("javascript", () => {
return getMode().then((mode) => mode.setupJavaScript(javascriptDefaults));
});
exports.JsxEmit = JsxEmit;
exports.ModuleKind = ModuleKind;
exports.ModuleResolutionKind = ModuleResolutionKind;
exports.NewLineKind = NewLineKind;
exports.ScriptTarget = ScriptTarget;
exports.getJavaScriptWorker = getJavaScriptWorker;
exports.getTypeScriptWorker = getTypeScriptWorker;
exports.javascriptDefaults = javascriptDefaults;
exports.typescriptDefaults = typescriptDefaults;
exports.typescriptVersion = typescriptVersion;
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
}));