@hyperbook/markdown 0.20.0 → 0.21.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/assets/directive-pyide/client.js +89 -0
- package/dist/assets/directive-pyide/style.css +86 -0
- package/dist/assets/directive-pyide/webworker.js +42 -0
- package/dist/assets/prism/prism.js +2 -1
- package/dist/index.js +178 -85
- package/dist/index.js.map +4 -4
- package/dist/remarkDirectivePyide.d.ts +5 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5475,8 +5475,8 @@ var require_qrcode = __commonJS({
|
|
|
5475
5475
|
};
|
|
5476
5476
|
}
|
|
5477
5477
|
try {
|
|
5478
|
-
var
|
|
5479
|
-
|
|
5478
|
+
var fs4 = __require("fs");
|
|
5479
|
+
fs4.writeFile(file, data, callback);
|
|
5480
5480
|
} catch (e) {
|
|
5481
5481
|
callback(e);
|
|
5482
5482
|
}
|
|
@@ -6651,13 +6651,13 @@ var require_ast = __commonJS({
|
|
|
6651
6651
|
helperExpression: function helperExpression(node3) {
|
|
6652
6652
|
return node3.type === "SubExpression" || (node3.type === "MustacheStatement" || node3.type === "BlockStatement") && !!(node3.params && node3.params.length || node3.hash);
|
|
6653
6653
|
},
|
|
6654
|
-
scopedId: function scopedId(
|
|
6655
|
-
return /^\.|this\b/.test(
|
|
6654
|
+
scopedId: function scopedId(path6) {
|
|
6655
|
+
return /^\.|this\b/.test(path6.original);
|
|
6656
6656
|
},
|
|
6657
6657
|
// an ID is simple if it only has one part, and that part is not
|
|
6658
6658
|
// `..` or `this`.
|
|
6659
|
-
simpleId: function simpleId(
|
|
6660
|
-
return
|
|
6659
|
+
simpleId: function simpleId(path6) {
|
|
6660
|
+
return path6.parts.length === 1 && !AST.helpers.scopedId(path6) && !path6.depth;
|
|
6661
6661
|
}
|
|
6662
6662
|
}
|
|
6663
6663
|
};
|
|
@@ -7727,12 +7727,12 @@ var require_helpers2 = __commonJS({
|
|
|
7727
7727
|
loc
|
|
7728
7728
|
};
|
|
7729
7729
|
}
|
|
7730
|
-
function prepareMustache(
|
|
7730
|
+
function prepareMustache(path6, params, hash2, open2, strip, locInfo) {
|
|
7731
7731
|
var escapeFlag = open2.charAt(3) || open2.charAt(2), escaped = escapeFlag !== "{" && escapeFlag !== "&";
|
|
7732
7732
|
var decorator = /\*/.test(open2);
|
|
7733
7733
|
return {
|
|
7734
7734
|
type: decorator ? "Decorator" : "MustacheStatement",
|
|
7735
|
-
path:
|
|
7735
|
+
path: path6,
|
|
7736
7736
|
params,
|
|
7737
7737
|
hash: hash2,
|
|
7738
7738
|
escaped,
|
|
@@ -8002,9 +8002,9 @@ var require_compiler = __commonJS({
|
|
|
8002
8002
|
},
|
|
8003
8003
|
DecoratorBlock: function DecoratorBlock(decorator) {
|
|
8004
8004
|
var program = decorator.program && this.compileProgram(decorator.program);
|
|
8005
|
-
var params = this.setupFullMustacheParams(decorator, program, void 0),
|
|
8005
|
+
var params = this.setupFullMustacheParams(decorator, program, void 0), path6 = decorator.path;
|
|
8006
8006
|
this.useDecorators = true;
|
|
8007
|
-
this.opcode("registerDecorator", params.length,
|
|
8007
|
+
this.opcode("registerDecorator", params.length, path6.original);
|
|
8008
8008
|
},
|
|
8009
8009
|
PartialStatement: function PartialStatement(partial) {
|
|
8010
8010
|
this.usePartial = true;
|
|
@@ -8068,46 +8068,46 @@ var require_compiler = __commonJS({
|
|
|
8068
8068
|
}
|
|
8069
8069
|
},
|
|
8070
8070
|
ambiguousSexpr: function ambiguousSexpr(sexpr, program, inverse) {
|
|
8071
|
-
var
|
|
8072
|
-
this.opcode("getContext",
|
|
8071
|
+
var path6 = sexpr.path, name = path6.parts[0], isBlock = program != null || inverse != null;
|
|
8072
|
+
this.opcode("getContext", path6.depth);
|
|
8073
8073
|
this.opcode("pushProgram", program);
|
|
8074
8074
|
this.opcode("pushProgram", inverse);
|
|
8075
|
-
|
|
8076
|
-
this.accept(
|
|
8075
|
+
path6.strict = true;
|
|
8076
|
+
this.accept(path6);
|
|
8077
8077
|
this.opcode("invokeAmbiguous", name, isBlock);
|
|
8078
8078
|
},
|
|
8079
8079
|
simpleSexpr: function simpleSexpr(sexpr) {
|
|
8080
|
-
var
|
|
8081
|
-
|
|
8082
|
-
this.accept(
|
|
8080
|
+
var path6 = sexpr.path;
|
|
8081
|
+
path6.strict = true;
|
|
8082
|
+
this.accept(path6);
|
|
8083
8083
|
this.opcode("resolvePossibleLambda");
|
|
8084
8084
|
},
|
|
8085
8085
|
helperSexpr: function helperSexpr(sexpr, program, inverse) {
|
|
8086
|
-
var params = this.setupFullMustacheParams(sexpr, program, inverse),
|
|
8086
|
+
var params = this.setupFullMustacheParams(sexpr, program, inverse), path6 = sexpr.path, name = path6.parts[0];
|
|
8087
8087
|
if (this.options.knownHelpers[name]) {
|
|
8088
8088
|
this.opcode("invokeKnownHelper", params.length, name);
|
|
8089
8089
|
} else if (this.options.knownHelpersOnly) {
|
|
8090
8090
|
throw new _exception2["default"]("You specified knownHelpersOnly, but used the unknown helper " + name, sexpr);
|
|
8091
8091
|
} else {
|
|
8092
|
-
|
|
8093
|
-
|
|
8094
|
-
this.accept(
|
|
8095
|
-
this.opcode("invokeHelper", params.length,
|
|
8092
|
+
path6.strict = true;
|
|
8093
|
+
path6.falsy = true;
|
|
8094
|
+
this.accept(path6);
|
|
8095
|
+
this.opcode("invokeHelper", params.length, path6.original, _ast2["default"].helpers.simpleId(path6));
|
|
8096
8096
|
}
|
|
8097
8097
|
},
|
|
8098
|
-
PathExpression: function PathExpression(
|
|
8099
|
-
this.addDepth(
|
|
8100
|
-
this.opcode("getContext",
|
|
8101
|
-
var name =
|
|
8098
|
+
PathExpression: function PathExpression(path6) {
|
|
8099
|
+
this.addDepth(path6.depth);
|
|
8100
|
+
this.opcode("getContext", path6.depth);
|
|
8101
|
+
var name = path6.parts[0], scoped = _ast2["default"].helpers.scopedId(path6), blockParamId = !path6.depth && !scoped && this.blockParamIndex(name);
|
|
8102
8102
|
if (blockParamId) {
|
|
8103
|
-
this.opcode("lookupBlockParam", blockParamId,
|
|
8103
|
+
this.opcode("lookupBlockParam", blockParamId, path6.parts);
|
|
8104
8104
|
} else if (!name) {
|
|
8105
8105
|
this.opcode("pushContext");
|
|
8106
|
-
} else if (
|
|
8106
|
+
} else if (path6.data) {
|
|
8107
8107
|
this.options.data = true;
|
|
8108
|
-
this.opcode("lookupData",
|
|
8108
|
+
this.opcode("lookupData", path6.depth, path6.parts, path6.strict);
|
|
8109
8109
|
} else {
|
|
8110
|
-
this.opcode("lookupOnContext",
|
|
8110
|
+
this.opcode("lookupOnContext", path6.parts, path6.falsy, path6.strict, scoped);
|
|
8111
8111
|
}
|
|
8112
8112
|
},
|
|
8113
8113
|
StringLiteral: function StringLiteral(string3) {
|
|
@@ -8457,16 +8457,16 @@ var require_util = __commonJS({
|
|
|
8457
8457
|
}
|
|
8458
8458
|
exports.urlGenerate = urlGenerate;
|
|
8459
8459
|
function normalize3(aPath) {
|
|
8460
|
-
var
|
|
8460
|
+
var path6 = aPath;
|
|
8461
8461
|
var url = urlParse(aPath);
|
|
8462
8462
|
if (url) {
|
|
8463
8463
|
if (!url.path) {
|
|
8464
8464
|
return aPath;
|
|
8465
8465
|
}
|
|
8466
|
-
|
|
8466
|
+
path6 = url.path;
|
|
8467
8467
|
}
|
|
8468
|
-
var isAbsolute = exports.isAbsolute(
|
|
8469
|
-
var parts =
|
|
8468
|
+
var isAbsolute = exports.isAbsolute(path6);
|
|
8469
|
+
var parts = path6.split(/\/+/);
|
|
8470
8470
|
for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {
|
|
8471
8471
|
part = parts[i];
|
|
8472
8472
|
if (part === ".") {
|
|
@@ -8483,15 +8483,15 @@ var require_util = __commonJS({
|
|
|
8483
8483
|
}
|
|
8484
8484
|
}
|
|
8485
8485
|
}
|
|
8486
|
-
|
|
8487
|
-
if (
|
|
8488
|
-
|
|
8486
|
+
path6 = parts.join("/");
|
|
8487
|
+
if (path6 === "") {
|
|
8488
|
+
path6 = isAbsolute ? "/" : ".";
|
|
8489
8489
|
}
|
|
8490
8490
|
if (url) {
|
|
8491
|
-
url.path =
|
|
8491
|
+
url.path = path6;
|
|
8492
8492
|
return urlGenerate(url);
|
|
8493
8493
|
}
|
|
8494
|
-
return
|
|
8494
|
+
return path6;
|
|
8495
8495
|
}
|
|
8496
8496
|
exports.normalize = normalize3;
|
|
8497
8497
|
function join(aRoot, aPath) {
|
|
@@ -11272,8 +11272,8 @@ var require_printer = __commonJS({
|
|
|
11272
11272
|
return this.accept(sexpr.path) + " " + params + hash2;
|
|
11273
11273
|
};
|
|
11274
11274
|
PrintVisitor.prototype.PathExpression = function(id) {
|
|
11275
|
-
var
|
|
11276
|
-
return (id.data ? "@" : "") + "PATH:" +
|
|
11275
|
+
var path6 = id.parts.join("/");
|
|
11276
|
+
return (id.data ? "@" : "") + "PATH:" + path6;
|
|
11277
11277
|
};
|
|
11278
11278
|
PrintVisitor.prototype.StringLiteral = function(string3) {
|
|
11279
11279
|
return '"' + string3.value + '"';
|
|
@@ -11312,8 +11312,8 @@ var require_lib = __commonJS({
|
|
|
11312
11312
|
handlebars2.print = printer.print;
|
|
11313
11313
|
module.exports = handlebars2;
|
|
11314
11314
|
function extension2(module2, filename) {
|
|
11315
|
-
var
|
|
11316
|
-
var templateString =
|
|
11315
|
+
var fs4 = __require("fs");
|
|
11316
|
+
var templateString = fs4.readFileSync(filename, "utf8");
|
|
11317
11317
|
module2.exports = handlebars2.compile(templateString);
|
|
11318
11318
|
}
|
|
11319
11319
|
if (typeof __require !== "undefined" && __require.extensions) {
|
|
@@ -21180,13 +21180,13 @@ var VFile = class {
|
|
|
21180
21180
|
* @returns {undefined}
|
|
21181
21181
|
* Nothing.
|
|
21182
21182
|
*/
|
|
21183
|
-
set path(
|
|
21184
|
-
if (isUrl(
|
|
21185
|
-
|
|
21183
|
+
set path(path6) {
|
|
21184
|
+
if (isUrl(path6)) {
|
|
21185
|
+
path6 = fileURLToPath(path6);
|
|
21186
21186
|
}
|
|
21187
|
-
assertNonEmpty(
|
|
21188
|
-
if (this.path !==
|
|
21189
|
-
this.history.push(
|
|
21187
|
+
assertNonEmpty(path6, "path");
|
|
21188
|
+
if (this.path !== path6) {
|
|
21189
|
+
this.history.push(path6);
|
|
21190
21190
|
}
|
|
21191
21191
|
}
|
|
21192
21192
|
/**
|
|
@@ -21453,8 +21453,8 @@ function assertNonEmpty(part, name) {
|
|
|
21453
21453
|
throw new Error("`" + name + "` cannot be empty");
|
|
21454
21454
|
}
|
|
21455
21455
|
}
|
|
21456
|
-
function assertPath(
|
|
21457
|
-
if (!
|
|
21456
|
+
function assertPath(path6, name) {
|
|
21457
|
+
if (!path6) {
|
|
21458
21458
|
throw new Error("Setting `" + name + "` requires `path` to be set too");
|
|
21459
21459
|
}
|
|
21460
21460
|
}
|
|
@@ -23098,27 +23098,27 @@ var sqrtTall = function sqrtTall2(extraVinculum, hLinePad2, viewBoxHeight) {
|
|
|
23098
23098
|
};
|
|
23099
23099
|
var sqrtPath = function sqrtPath2(size, extraVinculum, viewBoxHeight) {
|
|
23100
23100
|
extraVinculum = 1e3 * extraVinculum;
|
|
23101
|
-
var
|
|
23101
|
+
var path6 = "";
|
|
23102
23102
|
switch (size) {
|
|
23103
23103
|
case "sqrtMain":
|
|
23104
|
-
|
|
23104
|
+
path6 = sqrtMain(extraVinculum, hLinePad);
|
|
23105
23105
|
break;
|
|
23106
23106
|
case "sqrtSize1":
|
|
23107
|
-
|
|
23107
|
+
path6 = sqrtSize1(extraVinculum, hLinePad);
|
|
23108
23108
|
break;
|
|
23109
23109
|
case "sqrtSize2":
|
|
23110
|
-
|
|
23110
|
+
path6 = sqrtSize2(extraVinculum, hLinePad);
|
|
23111
23111
|
break;
|
|
23112
23112
|
case "sqrtSize3":
|
|
23113
|
-
|
|
23113
|
+
path6 = sqrtSize3(extraVinculum, hLinePad);
|
|
23114
23114
|
break;
|
|
23115
23115
|
case "sqrtSize4":
|
|
23116
|
-
|
|
23116
|
+
path6 = sqrtSize4(extraVinculum, hLinePad);
|
|
23117
23117
|
break;
|
|
23118
23118
|
case "sqrtTall":
|
|
23119
|
-
|
|
23119
|
+
path6 = sqrtTall(extraVinculum, hLinePad, viewBoxHeight);
|
|
23120
23120
|
}
|
|
23121
|
-
return
|
|
23121
|
+
return path6;
|
|
23122
23122
|
};
|
|
23123
23123
|
var innerPath = function innerPath2(name, height) {
|
|
23124
23124
|
switch (name) {
|
|
@@ -27534,8 +27534,8 @@ var svgData = {
|
|
|
27534
27534
|
};
|
|
27535
27535
|
var staticSvg = function staticSvg2(value, options) {
|
|
27536
27536
|
var [pathName, width, height] = svgData[value];
|
|
27537
|
-
var
|
|
27538
|
-
var svgNode = new SvgNode([
|
|
27537
|
+
var path6 = new PathNode(pathName);
|
|
27538
|
+
var svgNode = new SvgNode([path6], {
|
|
27539
27539
|
"width": makeEm(width),
|
|
27540
27540
|
"height": makeEm(height),
|
|
27541
27541
|
// Override CSS rule `.katex svg { width: 100% }`
|
|
@@ -28431,8 +28431,8 @@ var svgSpan = function svgSpan2(group, options) {
|
|
|
28431
28431
|
pathName = "tilde" + imgIndex;
|
|
28432
28432
|
}
|
|
28433
28433
|
}
|
|
28434
|
-
var
|
|
28435
|
-
var svgNode = new SvgNode([
|
|
28434
|
+
var path6 = new PathNode(pathName);
|
|
28435
|
+
var svgNode = new SvgNode([path6], {
|
|
28436
28436
|
"width": "100%",
|
|
28437
28437
|
"height": makeEm(_height),
|
|
28438
28438
|
"viewBox": "0 0 " + viewBoxWidth + " " + viewBoxHeight,
|
|
@@ -29703,8 +29703,8 @@ var makeGlyphSpan = function makeGlyphSpan2(symbol, font, mode) {
|
|
|
29703
29703
|
};
|
|
29704
29704
|
var makeInner = function makeInner2(ch, height, options) {
|
|
29705
29705
|
var width = fontMetricsData["Size4-Regular"][ch.charCodeAt(0)] ? fontMetricsData["Size4-Regular"][ch.charCodeAt(0)][4] : fontMetricsData["Size1-Regular"][ch.charCodeAt(0)][4];
|
|
29706
|
-
var
|
|
29707
|
-
var svgNode = new SvgNode([
|
|
29706
|
+
var path6 = new PathNode("inner", innerPath(ch, Math.round(1e3 * height)));
|
|
29707
|
+
var svgNode = new SvgNode([path6], {
|
|
29708
29708
|
"width": makeEm(width),
|
|
29709
29709
|
"height": makeEm(height),
|
|
29710
29710
|
// Override CSS rule `.katex svg { width: 100% }`
|
|
@@ -29873,10 +29873,10 @@ var makeStackedDelim = function makeStackedDelim2(delim, heightTotal, center, op
|
|
|
29873
29873
|
var midHeight = realHeightTotal - topHeightTotal - bottomHeightTotal;
|
|
29874
29874
|
var viewBoxHeight = Math.round(realHeightTotal * 1e3);
|
|
29875
29875
|
var pathStr = tallDelim(svgLabel, Math.round(midHeight * 1e3));
|
|
29876
|
-
var
|
|
29876
|
+
var path6 = new PathNode(svgLabel, pathStr);
|
|
29877
29877
|
var width = (viewBoxWidth / 1e3).toFixed(3) + "em";
|
|
29878
29878
|
var height = (viewBoxHeight / 1e3).toFixed(3) + "em";
|
|
29879
|
-
var svg5 = new SvgNode([
|
|
29879
|
+
var svg5 = new SvgNode([path6], {
|
|
29880
29880
|
"width": width,
|
|
29881
29881
|
"height": height,
|
|
29882
29882
|
"viewBox": "0 0 " + viewBoxWidth + " " + viewBoxHeight
|
|
@@ -29917,8 +29917,8 @@ var makeStackedDelim = function makeStackedDelim2(delim, heightTotal, center, op
|
|
|
29917
29917
|
var vbPad = 80;
|
|
29918
29918
|
var emPad = 0.08;
|
|
29919
29919
|
var sqrtSvg = function sqrtSvg2(sqrtName, height, viewBoxHeight, extraVinculum, options) {
|
|
29920
|
-
var
|
|
29921
|
-
var pathNode = new PathNode(sqrtName,
|
|
29920
|
+
var path6 = sqrtPath(sqrtName, extraVinculum, viewBoxHeight);
|
|
29921
|
+
var pathNode = new PathNode(sqrtName, path6);
|
|
29922
29922
|
var svg5 = new SvgNode([pathNode], {
|
|
29923
29923
|
// Note: 1000:1 ratio of viewBox to document em width.
|
|
29924
29924
|
"width": "400em",
|
|
@@ -30427,8 +30427,8 @@ var htmlBuilder$7 = (group, options) => {
|
|
|
30427
30427
|
var angleHeight = inner2.height + inner2.depth + lineWeight + clearance;
|
|
30428
30428
|
inner2.style.paddingLeft = makeEm(angleHeight / 2 + lineWeight);
|
|
30429
30429
|
var viewBoxHeight = Math.floor(1e3 * angleHeight * scale);
|
|
30430
|
-
var
|
|
30431
|
-
var svgNode = new SvgNode([new PathNode("phase",
|
|
30430
|
+
var path6 = phasePath(viewBoxHeight);
|
|
30431
|
+
var svgNode = new SvgNode([new PathNode("phase", path6)], {
|
|
30432
30432
|
"width": "400em",
|
|
30433
30433
|
"height": makeEm(viewBoxHeight / 1e3),
|
|
30434
30434
|
"viewBox": "0 0 400000 " + viewBoxHeight,
|
|
@@ -40203,14 +40203,14 @@ function mergeObjects(target, ...sources) {
|
|
|
40203
40203
|
});
|
|
40204
40204
|
return target;
|
|
40205
40205
|
}
|
|
40206
|
-
function basename(
|
|
40207
|
-
const idx = ~
|
|
40206
|
+
function basename(path6) {
|
|
40207
|
+
const idx = ~path6.lastIndexOf("/") || ~path6.lastIndexOf("\\");
|
|
40208
40208
|
if (idx === 0) {
|
|
40209
|
-
return
|
|
40210
|
-
} else if (~idx ===
|
|
40211
|
-
return basename(
|
|
40209
|
+
return path6;
|
|
40210
|
+
} else if (~idx === path6.length - 1) {
|
|
40211
|
+
return basename(path6.substring(0, path6.length - 1));
|
|
40212
40212
|
} else {
|
|
40213
|
-
return
|
|
40213
|
+
return path6.substr(~idx + 1);
|
|
40214
40214
|
}
|
|
40215
40215
|
}
|
|
40216
40216
|
var CAPTURING_REGEX_SOURCE = /\$(\d+)|\${(\d+):\/(downcase|upcase)}/g;
|
|
@@ -40353,11 +40353,11 @@ var ScopeStack = class _ScopeStack {
|
|
|
40353
40353
|
this.parent = parent;
|
|
40354
40354
|
this.scopeName = scopeName;
|
|
40355
40355
|
}
|
|
40356
|
-
static push(
|
|
40356
|
+
static push(path6, scopeNames) {
|
|
40357
40357
|
for (const name of scopeNames) {
|
|
40358
|
-
|
|
40358
|
+
path6 = new _ScopeStack(path6, name);
|
|
40359
40359
|
}
|
|
40360
|
-
return
|
|
40360
|
+
return path6;
|
|
40361
40361
|
}
|
|
40362
40362
|
static from(...segments) {
|
|
40363
40363
|
let result = null;
|
|
@@ -55412,7 +55412,7 @@ function transformGfmAutolinkLiterals(tree) {
|
|
|
55412
55412
|
{ ignore: ["link", "linkReference"] }
|
|
55413
55413
|
);
|
|
55414
55414
|
}
|
|
55415
|
-
function findUrl(_, protocol, domain2,
|
|
55415
|
+
function findUrl(_, protocol, domain2, path6, match) {
|
|
55416
55416
|
let prefix = "";
|
|
55417
55417
|
if (!previous2(match)) {
|
|
55418
55418
|
return false;
|
|
@@ -55425,7 +55425,7 @@ function findUrl(_, protocol, domain2, path5, match) {
|
|
|
55425
55425
|
if (!isCorrectDomain(domain2)) {
|
|
55426
55426
|
return false;
|
|
55427
55427
|
}
|
|
55428
|
-
const parts = splitUrl(domain2 +
|
|
55428
|
+
const parts = splitUrl(domain2 + path6);
|
|
55429
55429
|
if (!parts[0]) return false;
|
|
55430
55430
|
const result = {
|
|
55431
55431
|
type: "link",
|
|
@@ -63658,7 +63658,7 @@ function sortKeys(object, options = {}) {
|
|
|
63658
63658
|
// ../../node_modules/.pnpm/decircular@1.0.0/node_modules/decircular/index.js
|
|
63659
63659
|
function decircular(object) {
|
|
63660
63660
|
const seenObjects = /* @__PURE__ */ new WeakMap();
|
|
63661
|
-
function internalDecircular(value,
|
|
63661
|
+
function internalDecircular(value, path6 = []) {
|
|
63662
63662
|
if (!(value !== null && typeof value === "object")) {
|
|
63663
63663
|
return value;
|
|
63664
63664
|
}
|
|
@@ -63666,10 +63666,10 @@ function decircular(object) {
|
|
|
63666
63666
|
if (existingPath) {
|
|
63667
63667
|
return `[Circular *${existingPath.join(".")}]`;
|
|
63668
63668
|
}
|
|
63669
|
-
seenObjects.set(value,
|
|
63669
|
+
seenObjects.set(value, path6);
|
|
63670
63670
|
const newValue = Array.isArray(value) ? [] : {};
|
|
63671
63671
|
for (const [key2, value2] of Object.entries(value)) {
|
|
63672
|
-
newValue[key2] = internalDecircular(value2, [...
|
|
63672
|
+
newValue[key2] = internalDecircular(value2, [...path6, key2]);
|
|
63673
63673
|
}
|
|
63674
63674
|
seenObjects.delete(value);
|
|
63675
63675
|
return newValue;
|
|
@@ -73316,6 +73316,98 @@ var remarkDirectiveAbcMusic_default = (ctx) => () => {
|
|
|
73316
73316
|
};
|
|
73317
73317
|
};
|
|
73318
73318
|
|
|
73319
|
+
// src/remarkDirectivePyide.ts
|
|
73320
|
+
import fs3 from "fs";
|
|
73321
|
+
import path5 from "path";
|
|
73322
|
+
var remarkDirectivePyide_default = (ctx) => () => {
|
|
73323
|
+
const name = "pyide";
|
|
73324
|
+
return (tree, file) => {
|
|
73325
|
+
visit(tree, function(node3) {
|
|
73326
|
+
if (isDirective(node3)) {
|
|
73327
|
+
if (node3.name !== name) return;
|
|
73328
|
+
const data = node3.data || (node3.data = {});
|
|
73329
|
+
const { src = "", id } = node3.attributes || {};
|
|
73330
|
+
expectContainerDirective(node3, file, name);
|
|
73331
|
+
registerDirective(file, name, ["client.js"], ["style.css"]);
|
|
73332
|
+
requestJS(file, ["code-input", "code-input.min.js"]);
|
|
73333
|
+
requestCSS(file, ["code-input", "code-input.min.css"]);
|
|
73334
|
+
requestJS(file, ["code-input", "auto-close-brackets.min.js"]);
|
|
73335
|
+
requestJS(file, ["code-input", "indent.min.js"]);
|
|
73336
|
+
let srcFile = "";
|
|
73337
|
+
if (src) {
|
|
73338
|
+
srcFile = fs3.readFileSync(
|
|
73339
|
+
path5.join(ctx.root, "public", String(src)),
|
|
73340
|
+
"utf8"
|
|
73341
|
+
);
|
|
73342
|
+
} else if (node3.children?.length > 0) {
|
|
73343
|
+
srcFile = toText2(node3.children);
|
|
73344
|
+
}
|
|
73345
|
+
data.hName = "div";
|
|
73346
|
+
data.hProperties = {
|
|
73347
|
+
class: "directive-pyide",
|
|
73348
|
+
id: id || hash(node3)
|
|
73349
|
+
};
|
|
73350
|
+
data.hChildren = [
|
|
73351
|
+
{
|
|
73352
|
+
type: "element",
|
|
73353
|
+
tagName: "div",
|
|
73354
|
+
properties: {
|
|
73355
|
+
class: "container"
|
|
73356
|
+
},
|
|
73357
|
+
children: [
|
|
73358
|
+
{
|
|
73359
|
+
type: "element",
|
|
73360
|
+
tagName: "pre",
|
|
73361
|
+
properties: {
|
|
73362
|
+
class: "output"
|
|
73363
|
+
},
|
|
73364
|
+
children: []
|
|
73365
|
+
}
|
|
73366
|
+
]
|
|
73367
|
+
},
|
|
73368
|
+
{
|
|
73369
|
+
type: "element",
|
|
73370
|
+
tagName: "div",
|
|
73371
|
+
properties: {
|
|
73372
|
+
class: "editor-container"
|
|
73373
|
+
},
|
|
73374
|
+
children: [
|
|
73375
|
+
{
|
|
73376
|
+
type: "element",
|
|
73377
|
+
tagName: "button",
|
|
73378
|
+
properties: {
|
|
73379
|
+
class: "run"
|
|
73380
|
+
},
|
|
73381
|
+
children: [
|
|
73382
|
+
{
|
|
73383
|
+
type: "text",
|
|
73384
|
+
value: "Run"
|
|
73385
|
+
}
|
|
73386
|
+
]
|
|
73387
|
+
},
|
|
73388
|
+
{
|
|
73389
|
+
type: "element",
|
|
73390
|
+
tagName: "code-input",
|
|
73391
|
+
properties: {
|
|
73392
|
+
class: "editor",
|
|
73393
|
+
language: "python",
|
|
73394
|
+
template: "pyide-highlighted"
|
|
73395
|
+
},
|
|
73396
|
+
children: [
|
|
73397
|
+
{
|
|
73398
|
+
type: "raw",
|
|
73399
|
+
value: srcFile
|
|
73400
|
+
}
|
|
73401
|
+
]
|
|
73402
|
+
}
|
|
73403
|
+
]
|
|
73404
|
+
}
|
|
73405
|
+
];
|
|
73406
|
+
}
|
|
73407
|
+
});
|
|
73408
|
+
};
|
|
73409
|
+
};
|
|
73410
|
+
|
|
73319
73411
|
// src/process.ts
|
|
73320
73412
|
var remark = (ctx) => {
|
|
73321
73413
|
const remarkPlugins = [
|
|
@@ -73342,6 +73434,7 @@ var remark = (ctx) => {
|
|
|
73342
73434
|
remarkDirectiveTiles_default(ctx),
|
|
73343
73435
|
remarkDirectiveTabs_default(ctx),
|
|
73344
73436
|
remarkDirectiveSqlIde_default(ctx),
|
|
73437
|
+
remarkDirectivePyide_default(ctx),
|
|
73345
73438
|
remarkDirectiveOnlineIde_default(ctx),
|
|
73346
73439
|
remarkDirectivePlantuml_default(ctx),
|
|
73347
73440
|
remarkDirectiveSlideshow_default(ctx),
|