modern-monaco 0.3.2 → 0.3.4
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/core.mjs +2 -2
- package/dist/editor-core.mjs +9639 -4391
- package/dist/editor-worker.mjs +77 -77
- package/dist/index.mjs +8 -8
- package/dist/lsp/client.mjs +1 -1
- package/dist/lsp/css/worker.mjs +43 -43
- package/dist/lsp/html/worker.mjs +31 -31
- package/dist/lsp/json/setup.mjs +1 -1
- package/dist/lsp/json/worker.mjs +31 -31
- package/dist/lsp/typescript/libs.mjs +0 -1
- package/dist/lsp/typescript/setup.mjs +1 -1
- package/dist/lsp/typescript/worker.mjs +3 -3
- package/dist/shiki-wasm.mjs +1 -1
- package/dist/shiki.mjs +58 -56
- package/dist/workspace.mjs +12 -17
- package/package.json +7 -5
package/dist/shiki.mjs
CHANGED
|
@@ -10,7 +10,7 @@ var define_SHIKI_GRAMMARS_default = [{ name: "abap", scopeName: "source.abap" },
|
|
|
10
10
|
// <define:SHIKI_THEMES>
|
|
11
11
|
var define_SHIKI_THEMES_default = ["andromeeda", "aurora-x", "ayu-dark", "catppuccin-frappe", "catppuccin-latte", "catppuccin-macchiato", "catppuccin-mocha", "dark-plus", "dracula", "dracula-soft", "everforest-dark", "everforest-light", "github-dark", "github-dark-default", "github-dark-dimmed", "github-dark-high-contrast", "github-light", "github-light-default", "github-light-high-contrast", "gruvbox-dark-hard", "gruvbox-dark-medium", "gruvbox-dark-soft", "gruvbox-light-hard", "gruvbox-light-medium", "gruvbox-light-soft", "houston", "kanagawa-dragon", "kanagawa-lotus", "kanagawa-wave", "laserwave", "light-plus", "material-theme", "material-theme-darker", "material-theme-lighter", "material-theme-ocean", "material-theme-palenight", "min-dark", "min-light", "monokai", "night-owl", "nord", "one-dark-pro", "one-light", "plastic", "poimandres", "red", "rose-pine", "rose-pine-dawn", "rose-pine-moon", "slack-dark", "slack-ochin", "snazzy-light", "solarized-dark", "solarized-light", "synthwave-84", "tokyo-night", "vesper", "vitesse-black", "vitesse-dark", "vitesse-light"];
|
|
12
12
|
|
|
13
|
-
// node_modules
|
|
13
|
+
// node_modules/@shikijs/types/dist/index.mjs
|
|
14
14
|
var ShikiError = class extends Error {
|
|
15
15
|
constructor(message) {
|
|
16
16
|
super(message);
|
|
@@ -18,7 +18,7 @@ var ShikiError = class extends Error {
|
|
|
18
18
|
}
|
|
19
19
|
};
|
|
20
20
|
|
|
21
|
-
// node_modules
|
|
21
|
+
// node_modules/@shikijs/vscode-textmate/dist/index.js
|
|
22
22
|
function clone(something) {
|
|
23
23
|
return doClone(something);
|
|
24
24
|
}
|
|
@@ -3206,7 +3206,7 @@ var Registry = class {
|
|
|
3206
3206
|
};
|
|
3207
3207
|
var INITIAL = StateStackImpl.NULL;
|
|
3208
3208
|
|
|
3209
|
-
// node_modules
|
|
3209
|
+
// node_modules/html-void-elements/index.js
|
|
3210
3210
|
var htmlVoidElements = [
|
|
3211
3211
|
"area",
|
|
3212
3212
|
"base",
|
|
@@ -3230,7 +3230,7 @@ var htmlVoidElements = [
|
|
|
3230
3230
|
"wbr"
|
|
3231
3231
|
];
|
|
3232
3232
|
|
|
3233
|
-
// node_modules
|
|
3233
|
+
// node_modules/property-information/lib/util/schema.js
|
|
3234
3234
|
var Schema = class {
|
|
3235
3235
|
/**
|
|
3236
3236
|
* @param {SchemaType['property']} property
|
|
@@ -3254,7 +3254,7 @@ Schema.prototype.normal = {};
|
|
|
3254
3254
|
Schema.prototype.property = {};
|
|
3255
3255
|
Schema.prototype.space = void 0;
|
|
3256
3256
|
|
|
3257
|
-
// node_modules
|
|
3257
|
+
// node_modules/property-information/lib/util/merge.js
|
|
3258
3258
|
function merge(definitions, space) {
|
|
3259
3259
|
const property = {};
|
|
3260
3260
|
const normal = {};
|
|
@@ -3265,12 +3265,12 @@ function merge(definitions, space) {
|
|
|
3265
3265
|
return new Schema(property, normal, space);
|
|
3266
3266
|
}
|
|
3267
3267
|
|
|
3268
|
-
// node_modules
|
|
3268
|
+
// node_modules/property-information/lib/normalize.js
|
|
3269
3269
|
function normalize(value) {
|
|
3270
3270
|
return value.toLowerCase();
|
|
3271
3271
|
}
|
|
3272
3272
|
|
|
3273
|
-
// node_modules
|
|
3273
|
+
// node_modules/property-information/lib/util/info.js
|
|
3274
3274
|
var Info = class {
|
|
3275
3275
|
/**
|
|
3276
3276
|
* @param {string} property
|
|
@@ -3298,7 +3298,7 @@ Info.prototype.property = "";
|
|
|
3298
3298
|
Info.prototype.spaceSeparated = false;
|
|
3299
3299
|
Info.prototype.space = void 0;
|
|
3300
3300
|
|
|
3301
|
-
// node_modules
|
|
3301
|
+
// node_modules/property-information/lib/util/types.js
|
|
3302
3302
|
var types_exports = {};
|
|
3303
3303
|
__export(types_exports, {
|
|
3304
3304
|
boolean: () => boolean,
|
|
@@ -3321,7 +3321,7 @@ function increment() {
|
|
|
3321
3321
|
return 2 ** ++powers;
|
|
3322
3322
|
}
|
|
3323
3323
|
|
|
3324
|
-
// node_modules
|
|
3324
|
+
// node_modules/property-information/lib/util/defined-info.js
|
|
3325
3325
|
var checks = (
|
|
3326
3326
|
/** @type {ReadonlyArray<keyof typeof types>} */
|
|
3327
3327
|
Object.keys(types_exports)
|
|
@@ -3359,7 +3359,7 @@ function mark(values, key2, value) {
|
|
|
3359
3359
|
}
|
|
3360
3360
|
}
|
|
3361
3361
|
|
|
3362
|
-
// node_modules
|
|
3362
|
+
// node_modules/property-information/lib/util/create.js
|
|
3363
3363
|
function create(definition) {
|
|
3364
3364
|
const properties = {};
|
|
3365
3365
|
const normals = {};
|
|
@@ -3380,7 +3380,7 @@ function create(definition) {
|
|
|
3380
3380
|
return new Schema(properties, normals, definition.space);
|
|
3381
3381
|
}
|
|
3382
3382
|
|
|
3383
|
-
// node_modules
|
|
3383
|
+
// node_modules/property-information/lib/aria.js
|
|
3384
3384
|
var aria = create({
|
|
3385
3385
|
properties: {
|
|
3386
3386
|
ariaActiveDescendant: null,
|
|
@@ -3438,17 +3438,17 @@ var aria = create({
|
|
|
3438
3438
|
}
|
|
3439
3439
|
});
|
|
3440
3440
|
|
|
3441
|
-
// node_modules
|
|
3441
|
+
// node_modules/property-information/lib/util/case-sensitive-transform.js
|
|
3442
3442
|
function caseSensitiveTransform(attributes, attribute) {
|
|
3443
3443
|
return attribute in attributes ? attributes[attribute] : attribute;
|
|
3444
3444
|
}
|
|
3445
3445
|
|
|
3446
|
-
// node_modules
|
|
3446
|
+
// node_modules/property-information/lib/util/case-insensitive-transform.js
|
|
3447
3447
|
function caseInsensitiveTransform(attributes, property) {
|
|
3448
3448
|
return caseSensitiveTransform(attributes, property.toLowerCase());
|
|
3449
3449
|
}
|
|
3450
3450
|
|
|
3451
|
-
// node_modules
|
|
3451
|
+
// node_modules/property-information/lib/html.js
|
|
3452
3452
|
var html = create({
|
|
3453
3453
|
attributes: {
|
|
3454
3454
|
acceptcharset: "accept-charset",
|
|
@@ -3510,7 +3510,7 @@ var html = create({
|
|
|
3510
3510
|
formTarget: null,
|
|
3511
3511
|
headers: spaceSeparated,
|
|
3512
3512
|
height: number,
|
|
3513
|
-
hidden:
|
|
3513
|
+
hidden: overloadedBoolean,
|
|
3514
3514
|
high: number,
|
|
3515
3515
|
href: null,
|
|
3516
3516
|
hrefLang: null,
|
|
@@ -3812,7 +3812,7 @@ var html = create({
|
|
|
3812
3812
|
transform: caseInsensitiveTransform
|
|
3813
3813
|
});
|
|
3814
3814
|
|
|
3815
|
-
// node_modules
|
|
3815
|
+
// node_modules/property-information/lib/svg.js
|
|
3816
3816
|
var svg = create({
|
|
3817
3817
|
attributes: {
|
|
3818
3818
|
accentHeight: "accent-height",
|
|
@@ -4374,7 +4374,7 @@ var svg = create({
|
|
|
4374
4374
|
transform: caseSensitiveTransform
|
|
4375
4375
|
});
|
|
4376
4376
|
|
|
4377
|
-
// node_modules
|
|
4377
|
+
// node_modules/property-information/lib/xlink.js
|
|
4378
4378
|
var xlink = create({
|
|
4379
4379
|
properties: {
|
|
4380
4380
|
xLinkActuate: null,
|
|
@@ -4391,7 +4391,7 @@ var xlink = create({
|
|
|
4391
4391
|
}
|
|
4392
4392
|
});
|
|
4393
4393
|
|
|
4394
|
-
// node_modules
|
|
4394
|
+
// node_modules/property-information/lib/xmlns.js
|
|
4395
4395
|
var xmlns = create({
|
|
4396
4396
|
attributes: { xmlnsxlink: "xmlns:xlink" },
|
|
4397
4397
|
properties: { xmlnsXLink: null, xmlns: null },
|
|
@@ -4399,7 +4399,7 @@ var xmlns = create({
|
|
|
4399
4399
|
transform: caseInsensitiveTransform
|
|
4400
4400
|
});
|
|
4401
4401
|
|
|
4402
|
-
// node_modules
|
|
4402
|
+
// node_modules/property-information/lib/xml.js
|
|
4403
4403
|
var xml = create({
|
|
4404
4404
|
properties: { xmlBase: null, xmlLang: null, xmlSpace: null },
|
|
4405
4405
|
space: "xml",
|
|
@@ -4408,7 +4408,7 @@ var xml = create({
|
|
|
4408
4408
|
}
|
|
4409
4409
|
});
|
|
4410
4410
|
|
|
4411
|
-
// node_modules
|
|
4411
|
+
// node_modules/property-information/lib/find.js
|
|
4412
4412
|
var cap = /[A-Z]/g;
|
|
4413
4413
|
var dash = /-[a-z]/g;
|
|
4414
4414
|
var valid = /^data[-\w.:]+$/i;
|
|
@@ -4444,11 +4444,11 @@ function camelcase($0) {
|
|
|
4444
4444
|
return $0.charAt(1).toUpperCase();
|
|
4445
4445
|
}
|
|
4446
4446
|
|
|
4447
|
-
// node_modules
|
|
4447
|
+
// node_modules/property-information/index.js
|
|
4448
4448
|
var html2 = merge([aria, html, xlink, xmlns, xml], "html");
|
|
4449
4449
|
var svg2 = merge([aria, svg, xlink, xmlns, xml], "svg");
|
|
4450
4450
|
|
|
4451
|
-
// node_modules
|
|
4451
|
+
// node_modules/zwitch/index.js
|
|
4452
4452
|
var own = {}.hasOwnProperty;
|
|
4453
4453
|
function zwitch(key2, options) {
|
|
4454
4454
|
const settings = options || {};
|
|
@@ -4469,7 +4469,7 @@ function zwitch(key2, options) {
|
|
|
4469
4469
|
return one2;
|
|
4470
4470
|
}
|
|
4471
4471
|
|
|
4472
|
-
// node_modules
|
|
4472
|
+
// node_modules/stringify-entities/lib/core.js
|
|
4473
4473
|
var defaultSubsetRegex = /["&'<>`]/g;
|
|
4474
4474
|
var surrogatePairsRegex = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
|
|
4475
4475
|
var controlCharactersRegex = (
|
|
@@ -4519,21 +4519,21 @@ function charactersToExpression(subset) {
|
|
|
4519
4519
|
return new RegExp("(?:" + groups.join("|") + ")", "g");
|
|
4520
4520
|
}
|
|
4521
4521
|
|
|
4522
|
-
// node_modules
|
|
4522
|
+
// node_modules/stringify-entities/lib/util/to-hexadecimal.js
|
|
4523
4523
|
var hexadecimalRegex = /[\dA-Fa-f]/;
|
|
4524
4524
|
function toHexadecimal(code, next, omit) {
|
|
4525
4525
|
const value = "&#x" + code.toString(16).toUpperCase();
|
|
4526
4526
|
return omit && next && !hexadecimalRegex.test(String.fromCharCode(next)) ? value : value + ";";
|
|
4527
4527
|
}
|
|
4528
4528
|
|
|
4529
|
-
// node_modules
|
|
4529
|
+
// node_modules/stringify-entities/lib/util/to-decimal.js
|
|
4530
4530
|
var decimalRegex = /\d/;
|
|
4531
4531
|
function toDecimal(code, next, omit) {
|
|
4532
4532
|
const value = "&#" + String(code);
|
|
4533
4533
|
return omit && next && !decimalRegex.test(String.fromCharCode(next)) ? value : value + ";";
|
|
4534
4534
|
}
|
|
4535
4535
|
|
|
4536
|
-
// node_modules
|
|
4536
|
+
// node_modules/character-entities-legacy/index.js
|
|
4537
4537
|
var characterEntitiesLegacy = [
|
|
4538
4538
|
"AElig",
|
|
4539
4539
|
"AMP",
|
|
@@ -4643,7 +4643,7 @@ var characterEntitiesLegacy = [
|
|
|
4643
4643
|
"yuml"
|
|
4644
4644
|
];
|
|
4645
4645
|
|
|
4646
|
-
// node_modules
|
|
4646
|
+
// node_modules/character-entities-html4/index.js
|
|
4647
4647
|
var characterEntitiesHtml4 = {
|
|
4648
4648
|
nbsp: "\xA0",
|
|
4649
4649
|
iexcl: "\xA1",
|
|
@@ -4899,7 +4899,7 @@ var characterEntitiesHtml4 = {
|
|
|
4899
4899
|
euro: "\u20AC"
|
|
4900
4900
|
};
|
|
4901
4901
|
|
|
4902
|
-
// node_modules
|
|
4902
|
+
// node_modules/stringify-entities/lib/constant/dangerous.js
|
|
4903
4903
|
var dangerous = [
|
|
4904
4904
|
"cent",
|
|
4905
4905
|
"copy",
|
|
@@ -4911,7 +4911,7 @@ var dangerous = [
|
|
|
4911
4911
|
"times"
|
|
4912
4912
|
];
|
|
4913
4913
|
|
|
4914
|
-
// node_modules
|
|
4914
|
+
// node_modules/stringify-entities/lib/util/to-named.js
|
|
4915
4915
|
var own2 = {}.hasOwnProperty;
|
|
4916
4916
|
var characters = {};
|
|
4917
4917
|
var key;
|
|
@@ -4934,7 +4934,7 @@ function toNamed(code, next, omit, attribute) {
|
|
|
4934
4934
|
return "";
|
|
4935
4935
|
}
|
|
4936
4936
|
|
|
4937
|
-
// node_modules
|
|
4937
|
+
// node_modules/stringify-entities/lib/util/format-smart.js
|
|
4938
4938
|
function formatSmart(code, next, options) {
|
|
4939
4939
|
let numeric = toHexadecimal(code, next, options.omitOptionalSemicolons);
|
|
4940
4940
|
let named;
|
|
@@ -4955,12 +4955,12 @@ function formatSmart(code, next, options) {
|
|
|
4955
4955
|
return named && (!options.useShortestReferences || named.length < numeric.length) ? named : numeric;
|
|
4956
4956
|
}
|
|
4957
4957
|
|
|
4958
|
-
// node_modules
|
|
4958
|
+
// node_modules/stringify-entities/lib/index.js
|
|
4959
4959
|
function stringifyEntities(value, options) {
|
|
4960
4960
|
return core(value, Object.assign({ format: formatSmart }, options));
|
|
4961
4961
|
}
|
|
4962
4962
|
|
|
4963
|
-
// node_modules
|
|
4963
|
+
// node_modules/hast-util-to-html/lib/handle/comment.js
|
|
4964
4964
|
var htmlCommentRegex = /^>|^->|<!--|-->|--!>|<!-$/g;
|
|
4965
4965
|
var bogusCommentEntitySubset = [">"];
|
|
4966
4966
|
var commentEntitySubset = ["<", ">"];
|
|
@@ -4981,12 +4981,12 @@ function comment(node, _1, _2, state) {
|
|
|
4981
4981
|
}
|
|
4982
4982
|
}
|
|
4983
4983
|
|
|
4984
|
-
// node_modules
|
|
4984
|
+
// node_modules/hast-util-to-html/lib/handle/doctype.js
|
|
4985
4985
|
function doctype(_1, _2, _3, state) {
|
|
4986
4986
|
return "<!" + (state.settings.upperDoctype ? "DOCTYPE" : "doctype") + (state.settings.tightDoctype ? "" : " ") + "html>";
|
|
4987
4987
|
}
|
|
4988
4988
|
|
|
4989
|
-
// node_modules
|
|
4989
|
+
// node_modules/ccount/index.js
|
|
4990
4990
|
function ccount(value, character) {
|
|
4991
4991
|
const source = String(value);
|
|
4992
4992
|
if (typeof character !== "string") {
|
|
@@ -5001,7 +5001,7 @@ function ccount(value, character) {
|
|
|
5001
5001
|
return count;
|
|
5002
5002
|
}
|
|
5003
5003
|
|
|
5004
|
-
// node_modules
|
|
5004
|
+
// node_modules/comma-separated-tokens/index.js
|
|
5005
5005
|
function stringify(values, options) {
|
|
5006
5006
|
const settings = options || {};
|
|
5007
5007
|
const input = values[values.length - 1] === "" ? [...values, ""] : values;
|
|
@@ -5010,12 +5010,12 @@ function stringify(values, options) {
|
|
|
5010
5010
|
).trim();
|
|
5011
5011
|
}
|
|
5012
5012
|
|
|
5013
|
-
// node_modules
|
|
5013
|
+
// node_modules/space-separated-tokens/index.js
|
|
5014
5014
|
function stringify2(values) {
|
|
5015
5015
|
return values.join(" ").trim();
|
|
5016
5016
|
}
|
|
5017
5017
|
|
|
5018
|
-
// node_modules
|
|
5018
|
+
// node_modules/hast-util-whitespace/lib/index.js
|
|
5019
5019
|
var re = /[ \t\n\f\r]/g;
|
|
5020
5020
|
function whitespace(thing) {
|
|
5021
5021
|
return typeof thing === "object" ? thing.type === "text" ? empty(thing.value) : false : empty(thing);
|
|
@@ -5024,7 +5024,7 @@ function empty(value) {
|
|
|
5024
5024
|
return value.replace(re, "") === "";
|
|
5025
5025
|
}
|
|
5026
5026
|
|
|
5027
|
-
// node_modules
|
|
5027
|
+
// node_modules/hast-util-to-html/lib/omission/util/siblings.js
|
|
5028
5028
|
var siblingAfter = siblings(1);
|
|
5029
5029
|
var siblingBefore = siblings(-1);
|
|
5030
5030
|
var emptyChildren = [];
|
|
@@ -5044,7 +5044,7 @@ function siblings(increment2) {
|
|
|
5044
5044
|
}
|
|
5045
5045
|
}
|
|
5046
5046
|
|
|
5047
|
-
// node_modules
|
|
5047
|
+
// node_modules/hast-util-to-html/lib/omission/omission.js
|
|
5048
5048
|
var own3 = {}.hasOwnProperty;
|
|
5049
5049
|
function omission(handlers) {
|
|
5050
5050
|
return omit;
|
|
@@ -5053,7 +5053,7 @@ function omission(handlers) {
|
|
|
5053
5053
|
}
|
|
5054
5054
|
}
|
|
5055
5055
|
|
|
5056
|
-
// node_modules
|
|
5056
|
+
// node_modules/hast-util-to-html/lib/omission/closing.js
|
|
5057
5057
|
var closing = omission({
|
|
5058
5058
|
body,
|
|
5059
5059
|
caption: headOrColgroupOrCaption,
|
|
@@ -5140,7 +5140,7 @@ function cells(_, index, parent) {
|
|
|
5140
5140
|
return !next || next.type === "element" && (next.tagName === "td" || next.tagName === "th");
|
|
5141
5141
|
}
|
|
5142
5142
|
|
|
5143
|
-
// node_modules
|
|
5143
|
+
// node_modules/hast-util-to-html/lib/omission/opening.js
|
|
5144
5144
|
var opening = omission({
|
|
5145
5145
|
body: body2,
|
|
5146
5146
|
colgroup,
|
|
@@ -5184,7 +5184,7 @@ function tbody2(node, index, parent) {
|
|
|
5184
5184
|
return Boolean(head2 && head2.type === "element" && head2.tagName === "tr");
|
|
5185
5185
|
}
|
|
5186
5186
|
|
|
5187
|
-
// node_modules
|
|
5187
|
+
// node_modules/hast-util-to-html/lib/handle/element.js
|
|
5188
5188
|
var constants = {
|
|
5189
5189
|
// See: <https://html.spec.whatwg.org/#attribute-name-state>.
|
|
5190
5190
|
name: [
|
|
@@ -5311,7 +5311,7 @@ function serializeAttribute(state, key2, value) {
|
|
|
5311
5311
|
return name + (result ? "=" + result : result);
|
|
5312
5312
|
}
|
|
5313
5313
|
|
|
5314
|
-
// node_modules
|
|
5314
|
+
// node_modules/hast-util-to-html/lib/handle/text.js
|
|
5315
5315
|
var textEntitySubset = ["<", "&"];
|
|
5316
5316
|
function text(node, _, parent, state) {
|
|
5317
5317
|
return parent && parent.type === "element" && (parent.tagName === "script" || parent.tagName === "style") ? node.value : stringifyEntities(
|
|
@@ -5322,17 +5322,17 @@ function text(node, _, parent, state) {
|
|
|
5322
5322
|
);
|
|
5323
5323
|
}
|
|
5324
5324
|
|
|
5325
|
-
// node_modules
|
|
5325
|
+
// node_modules/hast-util-to-html/lib/handle/raw.js
|
|
5326
5326
|
function raw(node, index, parent, state) {
|
|
5327
5327
|
return state.settings.allowDangerousHtml ? node.value : text(node, index, parent, state);
|
|
5328
5328
|
}
|
|
5329
5329
|
|
|
5330
|
-
// node_modules
|
|
5330
|
+
// node_modules/hast-util-to-html/lib/handle/root.js
|
|
5331
5331
|
function root(node, _1, _2, state) {
|
|
5332
5332
|
return state.all(node);
|
|
5333
5333
|
}
|
|
5334
5334
|
|
|
5335
|
-
// node_modules
|
|
5335
|
+
// node_modules/hast-util-to-html/lib/handle/index.js
|
|
5336
5336
|
var handle = zwitch("type", {
|
|
5337
5337
|
invalid,
|
|
5338
5338
|
unknown,
|
|
@@ -5349,7 +5349,7 @@ function unknown(node_) {
|
|
|
5349
5349
|
throw new Error("Cannot compile unknown node `" + node.type + "`");
|
|
5350
5350
|
}
|
|
5351
5351
|
|
|
5352
|
-
// node_modules
|
|
5352
|
+
// node_modules/hast-util-to-html/lib/index.js
|
|
5353
5353
|
var emptyOptions = {};
|
|
5354
5354
|
var emptyCharacterReferences = {};
|
|
5355
5355
|
var emptyChildren2 = [];
|
|
@@ -5405,7 +5405,7 @@ function all(parent) {
|
|
|
5405
5405
|
return results.join("");
|
|
5406
5406
|
}
|
|
5407
5407
|
|
|
5408
|
-
// node_modules
|
|
5408
|
+
// node_modules/@shikijs/core/dist/index.mjs
|
|
5409
5409
|
function resolveColorReplacements(theme, options) {
|
|
5410
5410
|
const replacements = typeof theme === "string" ? {} : { ...theme.colorReplacements };
|
|
5411
5411
|
const themeName = typeof theme === "string" ? theme : theme.name;
|
|
@@ -7348,7 +7348,7 @@ async function createHighlighterCore(options) {
|
|
|
7348
7348
|
};
|
|
7349
7349
|
}
|
|
7350
7350
|
|
|
7351
|
-
// node_modules
|
|
7351
|
+
// node_modules/@shikijs/engine-oniguruma/dist/index.mjs
|
|
7352
7352
|
var ShikiError3 = class extends Error {
|
|
7353
7353
|
constructor(message) {
|
|
7354
7354
|
super(message);
|
|
@@ -7792,10 +7792,10 @@ async function createOnigurumaEngine(options) {
|
|
|
7792
7792
|
};
|
|
7793
7793
|
}
|
|
7794
7794
|
|
|
7795
|
-
// node_modules
|
|
7795
|
+
// node_modules/tm-grammars/package.json
|
|
7796
7796
|
var version = "1.26.0";
|
|
7797
7797
|
|
|
7798
|
-
// node_modules
|
|
7798
|
+
// node_modules/tm-themes/package.json
|
|
7799
7799
|
var version2 = "1.10.13";
|
|
7800
7800
|
|
|
7801
7801
|
// src/shiki.ts
|
|
@@ -8086,12 +8086,14 @@ var TokenizerState = class _TokenizerState {
|
|
|
8086
8086
|
}
|
|
8087
8087
|
};
|
|
8088
8088
|
function toRGBA(hex) {
|
|
8089
|
-
const start = hex.charCodeAt(0) ===
|
|
8089
|
+
const start = hex.charCodeAt(0) === /* '#' */
|
|
8090
|
+
35 ? 1 : 0;
|
|
8090
8091
|
const step = hex.length - start >= 6 ? 2 : 1;
|
|
8091
|
-
const rgba = [0,
|
|
8092
|
+
const rgba = [0, 0, 0, 0];
|
|
8093
|
+
for (let i = 0; i < 4; i++) {
|
|
8092
8094
|
const j = start + i * step;
|
|
8093
|
-
|
|
8094
|
-
}
|
|
8095
|
+
rgba[i] = parseInt(hex.slice(j, j + step).repeat(3 - step), 16);
|
|
8096
|
+
}
|
|
8095
8097
|
if (Number.isNaN(rgba[3])) {
|
|
8096
8098
|
rgba[3] = 1;
|
|
8097
8099
|
} else {
|
|
@@ -8108,7 +8110,7 @@ function channelMixer(channelA, channelB, amount) {
|
|
|
8108
8110
|
return Math.round(a + b);
|
|
8109
8111
|
}
|
|
8110
8112
|
function normalizeColor(bg, fg) {
|
|
8111
|
-
const fgRgba = toRGBA(fg);
|
|
8113
|
+
const fgRgba = toRGBA(Array.isArray(fg) ? fg[0] : fg);
|
|
8112
8114
|
if (fgRgba[3] === 1) {
|
|
8113
8115
|
return toHexColor(fgRgba.slice(0, 3));
|
|
8114
8116
|
}
|
package/dist/workspace.mjs
CHANGED
|
@@ -173,32 +173,27 @@ var IndexedDBFileSystem = class {
|
|
|
173
173
|
return stat;
|
|
174
174
|
}
|
|
175
175
|
async createDirectory(name) {
|
|
176
|
-
const now = Date.now();
|
|
177
176
|
const { pathname, href: url } = filenameToURL(name);
|
|
178
177
|
const metaStore = await this._getIdbObjectStore("fs-meta", true);
|
|
178
|
+
const exists = (url2) => promisifyIDBRequest(metaStore.get(url2)).then(Boolean);
|
|
179
|
+
if (await exists(url)) {
|
|
180
|
+
return;
|
|
181
|
+
}
|
|
182
|
+
const now = Date.now();
|
|
179
183
|
const promises = [];
|
|
180
184
|
const newDirs = [];
|
|
181
185
|
let parent = pathname.slice(0, pathname.lastIndexOf("/"));
|
|
182
186
|
while (parent) {
|
|
183
|
-
const
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
})
|
|
190
|
-
);
|
|
191
|
-
newDirs.push(parent);
|
|
187
|
+
const parentUrl = filenameToURL(parent).href;
|
|
188
|
+
if (!await exists(parentUrl)) {
|
|
189
|
+
const stat2 = { type: 2, version: 1, ctime: now, mtime: now, size: 0 };
|
|
190
|
+
promises.push(promisifyIDBRequest(metaStore.add({ url: parentUrl, ...stat2 })));
|
|
191
|
+
newDirs.push(parent);
|
|
192
|
+
}
|
|
192
193
|
parent = parent.slice(0, parent.lastIndexOf("/"));
|
|
193
194
|
}
|
|
194
195
|
const stat = { type: 2, version: 1, ctime: now, mtime: now, size: 0 };
|
|
195
|
-
promises.push(
|
|
196
|
-
promisifyIDBRequest(metaStore.add({ url, ...stat })).catch((error) => {
|
|
197
|
-
if (error.name !== "ConstraintError") {
|
|
198
|
-
throw error;
|
|
199
|
-
}
|
|
200
|
-
})
|
|
201
|
-
);
|
|
196
|
+
promises.push(promisifyIDBRequest(metaStore.add({ url, ...stat })));
|
|
202
197
|
newDirs.push(pathname);
|
|
203
198
|
await Promise.all(promises);
|
|
204
199
|
for (const dir of newDirs) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "modern-monaco",
|
|
3
3
|
"description": "A modern version of Monaco Editor",
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.4",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.mjs",
|
|
7
7
|
"module": "./dist/index.mjs",
|
|
@@ -54,10 +54,10 @@
|
|
|
54
54
|
"bundle": false
|
|
55
55
|
},
|
|
56
56
|
"scripts": {
|
|
57
|
-
"prepublishOnly": "
|
|
58
|
-
"prepare": "
|
|
59
|
-
"update-language-configurations": "
|
|
60
|
-
"dev": "
|
|
57
|
+
"prepublishOnly": "bun scripts/build.ts",
|
|
58
|
+
"prepare": "bun scripts/patch.ts",
|
|
59
|
+
"update-language-configurations": "bun scripts/update-language-configurations.ts",
|
|
60
|
+
"dev": "bun scripts/dev.ts",
|
|
61
61
|
"fmt": "dprint fmt"
|
|
62
62
|
},
|
|
63
63
|
"files": [
|
|
@@ -73,6 +73,8 @@
|
|
|
73
73
|
"@esm.sh/import-map": "0.1.1",
|
|
74
74
|
"@shikijs/core": "3.17.0",
|
|
75
75
|
"@shikijs/engine-oniguruma": "3.17.0",
|
|
76
|
+
"@types/bun": "1.3.3",
|
|
77
|
+
"esbuild": "0.27.0",
|
|
76
78
|
"monaco-editor-core": "0.55.1",
|
|
77
79
|
"tm-grammars": "1.26.0",
|
|
78
80
|
"tm-themes": "1.10.13",
|