@hyperbook/markdown 0.20.0 → 0.22.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/index.js CHANGED
@@ -5475,8 +5475,8 @@ var require_qrcode = __commonJS({
5475
5475
  };
5476
5476
  }
5477
5477
  try {
5478
- var fs3 = __require("fs");
5479
- fs3.writeFile(file, data, callback);
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(path5) {
6655
- return /^\.|this\b/.test(path5.original);
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(path5) {
6660
- return path5.parts.length === 1 && !AST.helpers.scopedId(path5) && !path5.depth;
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(path5, params, hash2, open2, strip, locInfo) {
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: path5,
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), path5 = decorator.path;
8005
+ var params = this.setupFullMustacheParams(decorator, program, void 0), path6 = decorator.path;
8006
8006
  this.useDecorators = true;
8007
- this.opcode("registerDecorator", params.length, path5.original);
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 path5 = sexpr.path, name = path5.parts[0], isBlock = program != null || inverse != null;
8072
- this.opcode("getContext", path5.depth);
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
- path5.strict = true;
8076
- this.accept(path5);
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 path5 = sexpr.path;
8081
- path5.strict = true;
8082
- this.accept(path5);
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), path5 = sexpr.path, name = path5.parts[0];
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
- path5.strict = true;
8093
- path5.falsy = true;
8094
- this.accept(path5);
8095
- this.opcode("invokeHelper", params.length, path5.original, _ast2["default"].helpers.simpleId(path5));
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(path5) {
8099
- this.addDepth(path5.depth);
8100
- this.opcode("getContext", path5.depth);
8101
- var name = path5.parts[0], scoped = _ast2["default"].helpers.scopedId(path5), blockParamId = !path5.depth && !scoped && this.blockParamIndex(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, path5.parts);
8103
+ this.opcode("lookupBlockParam", blockParamId, path6.parts);
8104
8104
  } else if (!name) {
8105
8105
  this.opcode("pushContext");
8106
- } else if (path5.data) {
8106
+ } else if (path6.data) {
8107
8107
  this.options.data = true;
8108
- this.opcode("lookupData", path5.depth, path5.parts, path5.strict);
8108
+ this.opcode("lookupData", path6.depth, path6.parts, path6.strict);
8109
8109
  } else {
8110
- this.opcode("lookupOnContext", path5.parts, path5.falsy, path5.strict, scoped);
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 path5 = aPath;
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
- path5 = url.path;
8466
+ path6 = url.path;
8467
8467
  }
8468
- var isAbsolute = exports.isAbsolute(path5);
8469
- var parts = path5.split(/\/+/);
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
- path5 = parts.join("/");
8487
- if (path5 === "") {
8488
- path5 = isAbsolute ? "/" : ".";
8486
+ path6 = parts.join("/");
8487
+ if (path6 === "") {
8488
+ path6 = isAbsolute ? "/" : ".";
8489
8489
  }
8490
8490
  if (url) {
8491
- url.path = path5;
8491
+ url.path = path6;
8492
8492
  return urlGenerate(url);
8493
8493
  }
8494
- return path5;
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 path5 = id.parts.join("/");
11276
- return (id.data ? "@" : "") + "PATH:" + path5;
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 fs3 = __require("fs");
11316
- var templateString = fs3.readFileSync(filename, "utf8");
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(path5) {
21184
- if (isUrl(path5)) {
21185
- path5 = fileURLToPath(path5);
21183
+ set path(path6) {
21184
+ if (isUrl(path6)) {
21185
+ path6 = fileURLToPath(path6);
21186
21186
  }
21187
- assertNonEmpty(path5, "path");
21188
- if (this.path !== path5) {
21189
- this.history.push(path5);
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(path5, name) {
21457
- if (!path5) {
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 path5 = "";
23101
+ var path6 = "";
23102
23102
  switch (size) {
23103
23103
  case "sqrtMain":
23104
- path5 = sqrtMain(extraVinculum, hLinePad);
23104
+ path6 = sqrtMain(extraVinculum, hLinePad);
23105
23105
  break;
23106
23106
  case "sqrtSize1":
23107
- path5 = sqrtSize1(extraVinculum, hLinePad);
23107
+ path6 = sqrtSize1(extraVinculum, hLinePad);
23108
23108
  break;
23109
23109
  case "sqrtSize2":
23110
- path5 = sqrtSize2(extraVinculum, hLinePad);
23110
+ path6 = sqrtSize2(extraVinculum, hLinePad);
23111
23111
  break;
23112
23112
  case "sqrtSize3":
23113
- path5 = sqrtSize3(extraVinculum, hLinePad);
23113
+ path6 = sqrtSize3(extraVinculum, hLinePad);
23114
23114
  break;
23115
23115
  case "sqrtSize4":
23116
- path5 = sqrtSize4(extraVinculum, hLinePad);
23116
+ path6 = sqrtSize4(extraVinculum, hLinePad);
23117
23117
  break;
23118
23118
  case "sqrtTall":
23119
- path5 = sqrtTall(extraVinculum, hLinePad, viewBoxHeight);
23119
+ path6 = sqrtTall(extraVinculum, hLinePad, viewBoxHeight);
23120
23120
  }
23121
- return path5;
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 path5 = new PathNode(pathName);
27538
- var svgNode = new SvgNode([path5], {
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 path5 = new PathNode(pathName);
28435
- var svgNode = new SvgNode([path5], {
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 path5 = new PathNode("inner", innerPath(ch, Math.round(1e3 * height)));
29707
- var svgNode = new SvgNode([path5], {
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 path5 = new PathNode(svgLabel, pathStr);
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([path5], {
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 path5 = sqrtPath(sqrtName, extraVinculum, viewBoxHeight);
29921
- var pathNode = new PathNode(sqrtName, path5);
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 path5 = phasePath(viewBoxHeight);
30431
- var svgNode = new SvgNode([new PathNode("phase", path5)], {
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(path5) {
40207
- const idx = ~path5.lastIndexOf("/") || ~path5.lastIndexOf("\\");
40206
+ function basename(path6) {
40207
+ const idx = ~path6.lastIndexOf("/") || ~path6.lastIndexOf("\\");
40208
40208
  if (idx === 0) {
40209
- return path5;
40210
- } else if (~idx === path5.length - 1) {
40211
- return basename(path5.substring(0, path5.length - 1));
40209
+ return path6;
40210
+ } else if (~idx === path6.length - 1) {
40211
+ return basename(path6.substring(0, path6.length - 1));
40212
40212
  } else {
40213
- return path5.substr(~idx + 1);
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(path5, scopeNames) {
40356
+ static push(path6, scopeNames) {
40357
40357
  for (const name of scopeNames) {
40358
- path5 = new _ScopeStack(path5, name);
40358
+ path6 = new _ScopeStack(path6, name);
40359
40359
  }
40360
- return path5;
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, path5, match) {
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 + path5);
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, path5 = []) {
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, path5);
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, [...path5, key2]);
63672
+ newValue[key2] = internalDecircular(value2, [...path6, key2]);
63673
63673
  }
63674
63674
  seenObjects.delete(value);
63675
63675
  return newValue;
@@ -73148,7 +73148,7 @@ ${(code4.scripts ? [cdnLibraryUrl, ...code4.scripts] : []).map((src) => `<script
73148
73148
  type: "element",
73149
73149
  tagName: "code-input",
73150
73150
  properties: {
73151
- class: "editor",
73151
+ class: "editor line-numbers",
73152
73152
  language: "javascript"
73153
73153
  },
73154
73154
  children: [
@@ -73316,6 +73316,184 @@ 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
+ let tests = [];
73338
+ let input = "";
73339
+ if (src) {
73340
+ srcFile = fs3.readFileSync(
73341
+ path5.join(ctx.root, "public", String(src)),
73342
+ "utf8"
73343
+ );
73344
+ } else if (node3.children?.length > 0) {
73345
+ tests = node3.children.filter((c) => c.type === "code").filter((c) => c.meta?.includes("test")).map((c, i) => ({
73346
+ code: c.value,
73347
+ name: `${i}`
73348
+ }));
73349
+ input = toText2(
73350
+ node3.children.find(
73351
+ (c) => c.type === "code" && c.lang === "input"
73352
+ )
73353
+ );
73354
+ srcFile = toText2(
73355
+ node3.children.find(
73356
+ (c) => c.type === "code" && c.lang === "python" && !c.meta?.includes("test")
73357
+ )
73358
+ );
73359
+ }
73360
+ data.hName = "div";
73361
+ data.hProperties = {
73362
+ class: "directive-pyide",
73363
+ id: id || hash(node3),
73364
+ "data-tests": Buffer.from(JSON.stringify(tests)).toString("base64")
73365
+ };
73366
+ data.hChildren = [
73367
+ {
73368
+ type: "element",
73369
+ tagName: "div",
73370
+ properties: {
73371
+ class: "container"
73372
+ },
73373
+ children: [
73374
+ {
73375
+ type: "element",
73376
+ tagName: "div",
73377
+ properties: {
73378
+ class: "buttons"
73379
+ },
73380
+ children: [
73381
+ {
73382
+ type: "element",
73383
+ tagName: "button",
73384
+ properties: {
73385
+ class: "output-btn active"
73386
+ },
73387
+ children: [
73388
+ {
73389
+ type: "text",
73390
+ value: "Output"
73391
+ }
73392
+ ]
73393
+ },
73394
+ {
73395
+ type: "element",
73396
+ tagName: "button",
73397
+ properties: {
73398
+ class: "input-btn"
73399
+ },
73400
+ children: [
73401
+ {
73402
+ type: "text",
73403
+ value: "Input"
73404
+ }
73405
+ ]
73406
+ }
73407
+ ]
73408
+ },
73409
+ {
73410
+ type: "element",
73411
+ tagName: "pre",
73412
+ properties: {
73413
+ class: "output"
73414
+ },
73415
+ children: []
73416
+ },
73417
+ {
73418
+ type: "element",
73419
+ tagName: "code-input",
73420
+ properties: {
73421
+ class: "input hidden"
73422
+ },
73423
+ children: [{
73424
+ type: "raw",
73425
+ value: input || ""
73426
+ }]
73427
+ }
73428
+ ]
73429
+ },
73430
+ {
73431
+ type: "element",
73432
+ tagName: "div",
73433
+ properties: {
73434
+ class: "editor-container"
73435
+ },
73436
+ children: [
73437
+ {
73438
+ type: "element",
73439
+ tagName: "div",
73440
+ properties: {
73441
+ class: "buttons"
73442
+ },
73443
+ children: [
73444
+ {
73445
+ type: "element",
73446
+ tagName: "button",
73447
+ properties: {
73448
+ class: "run"
73449
+ },
73450
+ children: [
73451
+ {
73452
+ type: "text",
73453
+ value: "Run"
73454
+ }
73455
+ ]
73456
+ },
73457
+ ...tests.length > 0 ? [
73458
+ {
73459
+ type: "element",
73460
+ tagName: "button",
73461
+ properties: {
73462
+ class: "test"
73463
+ },
73464
+ children: [
73465
+ {
73466
+ type: "text",
73467
+ value: "Test"
73468
+ }
73469
+ ]
73470
+ }
73471
+ ] : []
73472
+ ]
73473
+ },
73474
+ {
73475
+ type: "element",
73476
+ tagName: "code-input",
73477
+ properties: {
73478
+ class: "editor line-numbers",
73479
+ language: "python",
73480
+ template: "pyide-highlighted"
73481
+ },
73482
+ children: [
73483
+ {
73484
+ type: "raw",
73485
+ value: srcFile
73486
+ }
73487
+ ]
73488
+ }
73489
+ ]
73490
+ }
73491
+ ];
73492
+ }
73493
+ });
73494
+ };
73495
+ };
73496
+
73319
73497
  // src/process.ts
73320
73498
  var remark = (ctx) => {
73321
73499
  const remarkPlugins = [
@@ -73342,6 +73520,7 @@ var remark = (ctx) => {
73342
73520
  remarkDirectiveTiles_default(ctx),
73343
73521
  remarkDirectiveTabs_default(ctx),
73344
73522
  remarkDirectiveSqlIde_default(ctx),
73523
+ remarkDirectivePyide_default(ctx),
73345
73524
  remarkDirectiveOnlineIde_default(ctx),
73346
73525
  remarkDirectivePlantuml_default(ctx),
73347
73526
  remarkDirectiveSlideshow_default(ctx),