mystmd 1.3.3__py3-none-any.whl → 1.3.4__py3-none-any.whl

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: mystmd
3
- Version: 1.3.3
3
+ Version: 1.3.4
4
4
  Summary: Command line tools for MyST Markdown
5
5
  Project-URL: Homepage, https://github.com/jupyter-book/mystmd
6
6
  Project-URL: Bug Tracker, https://github.com/jupyter-book/mystmd/issues
@@ -0,0 +1,8 @@
1
+ mystmd_py/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ mystmd_py/main.py,sha256=BaPniv8thshA5DKIBoq2huFUs1Jb0zFkMxN2UIHXUkw,1511
3
+ mystmd_py/myst.cjs,sha256=c7clRZfsPtj80ySuA9KIy-D9HIsw_zwv5Bxa-maVB-k,13096344
4
+ mystmd-1.3.4.dist-info/METADATA,sha256=-9G8dvY-7XKbDqVUgGXP1jU6gyZGTKZBcoaH6Aq2n4o,2954
5
+ mystmd-1.3.4.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
6
+ mystmd-1.3.4.dist-info/entry_points.txt,sha256=eC2ol2gqS2q5E-ktkMrBSvV0tckGUcNGS-c4hEQ-_V4,45
7
+ mystmd-1.3.4.dist-info/licenses/LICENSE,sha256=4BcikqvulW5nh_MxaocO-lC7ydIX23dMbcqtNTUSxr4,1082
8
+ mystmd-1.3.4.dist-info/RECORD,,
mystmd_py/myst.cjs CHANGED
@@ -193562,7 +193562,7 @@ var {
193562
193562
  } = import_index.default;
193563
193563
 
193564
193564
  // src/version.ts
193565
- var version = "1.3.3";
193565
+ var version = "1.3.4";
193566
193566
  var version_default = version;
193567
193567
 
193568
193568
  // ../myst-cli/dist/build/build.js
@@ -194651,7 +194651,7 @@ function validateAffiliation(input3, opts) {
194651
194651
  }
194652
194652
 
194653
194653
  // ../myst-frontmatter/dist/biblio/validators.js
194654
- var BIBLIO_KEYS = ["volume", "issue", "first_page", "last_page"];
194654
+ var BIBLIO_KEYS = ["volume", "issue", "doi", "first_page", "last_page"];
194655
194655
  function validateBiblio(input3, opts) {
194656
194656
  const value = validateObjectKeys(input3, { optional: BIBLIO_KEYS }, opts);
194657
194657
  if (value === void 0)
@@ -194663,6 +194663,9 @@ function validateBiblio(input3, opts) {
194663
194663
  if (defined(value.issue)) {
194664
194664
  output2.issue = validateStringOrNumber(value.issue, incrementOptions("issue", opts));
194665
194665
  }
194666
+ if (defined(value.doi)) {
194667
+ output2.doi = validateDoi(value.doi, incrementOptions("doi", opts));
194668
+ }
194666
194669
  if (defined(value.first_page)) {
194667
194670
  output2.first_page = validateStringOrNumber(value.first_page, incrementOptions("first_page", opts));
194668
194671
  }
@@ -198329,16 +198332,22 @@ function validateVenue(input3, opts) {
198329
198332
  } else {
198330
198333
  titleOpts = incrementOptions("title", opts);
198331
198334
  }
198332
- const value = validateObjectKeys(input3, { optional: ["title", "url"] }, opts);
198335
+ const value = validateObjectKeys(input3, { optional: ["title", "short_title", "url", "doi"] }, opts);
198333
198336
  if (value === void 0)
198334
198337
  return void 0;
198335
198338
  const output2 = {};
198336
198339
  if (defined(value.title)) {
198337
198340
  output2.title = validateString(value.title, titleOpts);
198338
198341
  }
198342
+ if (defined(value.short_title)) {
198343
+ output2.short_title = validateString(value.short_title, incrementOptions("short_title", opts));
198344
+ }
198339
198345
  if (defined(value.url)) {
198340
198346
  output2.url = validateUrl(value.url, incrementOptions("url", opts));
198341
198347
  }
198348
+ if (defined(value.doi)) {
198349
+ output2.doi = validateDoi(value.doi, incrementOptions("doi", opts));
198350
+ }
198342
198351
  return output2;
198343
198352
  }
198344
198353
 
@@ -199028,7 +199037,7 @@ function fillSiteFrontmatter(base5, filler, opts, keys2, trimUnused) {
199028
199037
  return frontmatter;
199029
199038
  }
199030
199039
  function fillProjectFrontmatter(base5, filler, opts, keys2, trimUnused) {
199031
- var _a6, _b, _c, _d2, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x2, _y, _z;
199040
+ var _a6, _b, _c, _d2, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x2, _y, _z, _0, _1;
199032
199041
  const frontmatter = fillSiteFrontmatter(base5, filler, opts, keys2 !== null && keys2 !== void 0 ? keys2 : Object.keys(filler), trimUnused);
199033
199042
  if (filler.numbering || base5.numbering) {
199034
199043
  frontmatter.numbering = fillNumbering(base5.numbering, filler.numbering);
@@ -199048,38 +199057,44 @@ function fillProjectFrontmatter(base5, filler, opts, keys2, trimUnused) {
199048
199057
  ...(_f = base5.settings) !== null && _f !== void 0 ? _f : {}
199049
199058
  };
199050
199059
  }
199060
+ if (filler.biblio || base5.biblio) {
199061
+ frontmatter.biblio = {
199062
+ ...(_g = filler.biblio) !== null && _g !== void 0 ? _g : {},
199063
+ ...(_h = base5.biblio) !== null && _h !== void 0 ? _h : {}
199064
+ };
199065
+ }
199051
199066
  if (!trimUnused) {
199052
199067
  if (filler.bibliography || base5.bibliography) {
199053
199068
  frontmatter.bibliography = [
199054
- .../* @__PURE__ */ new Set([...(_g = filler.bibliography) !== null && _g !== void 0 ? _g : [], ...(_h = base5.bibliography) !== null && _h !== void 0 ? _h : []])
199069
+ .../* @__PURE__ */ new Set([...(_j = filler.bibliography) !== null && _j !== void 0 ? _j : [], ...(_k = base5.bibliography) !== null && _k !== void 0 ? _k : []])
199055
199070
  ];
199056
199071
  }
199057
199072
  if (filler.requirements || base5.requirements) {
199058
199073
  frontmatter.requirements = [
199059
- .../* @__PURE__ */ new Set([...(_j = filler.requirements) !== null && _j !== void 0 ? _j : [], ...(_k = base5.requirements) !== null && _k !== void 0 ? _k : []])
199074
+ .../* @__PURE__ */ new Set([...(_l = filler.requirements) !== null && _l !== void 0 ? _l : [], ...(_m = base5.requirements) !== null && _m !== void 0 ? _m : []])
199060
199075
  ];
199061
199076
  }
199062
199077
  if (filler.resources || base5.resources) {
199063
199078
  frontmatter.resources = [
199064
- .../* @__PURE__ */ new Set([...(_l = filler.resources) !== null && _l !== void 0 ? _l : [], ...(_m = base5.resources) !== null && _m !== void 0 ? _m : []])
199079
+ .../* @__PURE__ */ new Set([...(_o = filler.resources) !== null && _o !== void 0 ? _o : [], ...(_p = base5.resources) !== null && _p !== void 0 ? _p : []])
199065
199080
  ];
199066
199081
  }
199067
199082
  if (filler.exports || base5.exports) {
199068
199083
  frontmatter.exports = [];
199069
- const ids = (_p = (_o = base5.exports) === null || _o === void 0 ? void 0 : _o.map(({ id }) => id)) !== null && _p !== void 0 ? _p : [];
199070
- (_q = filler.exports) === null || _q === void 0 ? void 0 : _q.forEach((exp) => {
199084
+ const ids = (_r = (_q = base5.exports) === null || _q === void 0 ? void 0 : _q.map(({ id }) => id)) !== null && _r !== void 0 ? _r : [];
199085
+ (_s = filler.exports) === null || _s === void 0 ? void 0 : _s.forEach((exp) => {
199071
199086
  var _a7;
199072
199087
  if (!exp.id || !ids.includes(exp.id)) {
199073
199088
  (_a7 = frontmatter.exports) === null || _a7 === void 0 ? void 0 : _a7.push(exp);
199074
199089
  }
199075
199090
  });
199076
- (_r = frontmatter.exports) === null || _r === void 0 ? void 0 : _r.push(...(_s = base5.exports) !== null && _s !== void 0 ? _s : []);
199091
+ (_t = frontmatter.exports) === null || _t === void 0 ? void 0 : _t.push(...(_u = base5.exports) !== null && _u !== void 0 ? _u : []);
199077
199092
  }
199078
199093
  if (filler.downloads || base5.downloads) {
199079
199094
  frontmatter.downloads = [];
199080
- const ids = (_u = (_t = base5.downloads) === null || _t === void 0 ? void 0 : _t.map(({ id }) => id).filter(Boolean)) !== null && _u !== void 0 ? _u : [];
199081
- const urls = (_w = (_v = base5.downloads) === null || _v === void 0 ? void 0 : _v.map(({ url }) => url).filter(Boolean)) !== null && _w !== void 0 ? _w : [];
199082
- (_x2 = filler.downloads) === null || _x2 === void 0 ? void 0 : _x2.forEach((download) => {
199095
+ const ids = (_w = (_v = base5.downloads) === null || _v === void 0 ? void 0 : _v.map(({ id }) => id).filter(Boolean)) !== null && _w !== void 0 ? _w : [];
199096
+ const urls = (_y = (_x2 = base5.downloads) === null || _x2 === void 0 ? void 0 : _x2.map(({ url }) => url).filter(Boolean)) !== null && _y !== void 0 ? _y : [];
199097
+ (_z = filler.downloads) === null || _z === void 0 ? void 0 : _z.forEach((download) => {
199083
199098
  var _a7, _b2;
199084
199099
  if (download.id && !ids.includes(download.id)) {
199085
199100
  (_a7 = frontmatter.downloads) === null || _a7 === void 0 ? void 0 : _a7.push(download);
@@ -199088,7 +199103,7 @@ function fillProjectFrontmatter(base5, filler, opts, keys2, trimUnused) {
199088
199103
  (_b2 = frontmatter.downloads) === null || _b2 === void 0 ? void 0 : _b2.push(download);
199089
199104
  }
199090
199105
  });
199091
- (_y = frontmatter.downloads) === null || _y === void 0 ? void 0 : _y.push(...(_z = base5.downloads) !== null && _z !== void 0 ? _z : []);
199106
+ (_0 = frontmatter.downloads) === null || _0 === void 0 ? void 0 : _0.push(...(_1 = base5.downloads) !== null && _1 !== void 0 ? _1 : []);
199092
199107
  }
199093
199108
  }
199094
199109
  return frontmatter;
@@ -285311,7 +285326,7 @@ var blockquoteDirective = {
285311
285326
  // ../myst-directives/dist/raw.js
285312
285327
  var rawDirective = {
285313
285328
  name: "raw",
285314
- doc: "Allows you to include the source or parsed version of a separate file into your document tree.",
285329
+ doc: 'Allows you to include non-markdown text in your document. If the argument "latex" is provided, the text will be parsed as latex; otherwise, it will be included as raw text.',
285315
285330
  arg: {
285316
285331
  type: String,
285317
285332
  doc: 'Format of directive content - for now, only "latex" is valid'
@@ -285322,11 +285337,67 @@ var rawDirective = {
285322
285337
  },
285323
285338
  run(data) {
285324
285339
  var _a6, _b;
285340
+ const lang = (_a6 = data.arg) !== null && _a6 !== void 0 ? _a6 : "";
285341
+ const value = (_b = data.body) !== null && _b !== void 0 ? _b : "";
285342
+ const tex = ["tex", "latex"].includes(lang) ? `
285343
+ ${value}
285344
+ ` : void 0;
285345
+ const typst = ["typst", "typ"].includes(lang) ? `
285346
+ ${value}
285347
+ ` : void 0;
285348
+ return [
285349
+ {
285350
+ type: "raw",
285351
+ lang,
285352
+ tex,
285353
+ typst,
285354
+ value
285355
+ }
285356
+ ];
285357
+ }
285358
+ };
285359
+ var rawLatexDirective = {
285360
+ name: "raw:latex",
285361
+ alias: ["raw:tex"],
285362
+ doc: "Allows you to include tex in your document that will only be included in tex exports",
285363
+ body: {
285364
+ type: String,
285365
+ doc: "Raw tex content"
285366
+ },
285367
+ run(data) {
285368
+ const lang = "tex";
285369
+ const body3 = data.body;
285370
+ const tex = body3 ? `
285371
+ ${body3}
285372
+ ` : "";
285325
285373
  return [
285326
285374
  {
285327
285375
  type: "raw",
285328
- lang: (_a6 = data.arg) !== null && _a6 !== void 0 ? _a6 : "",
285329
- value: (_b = data.body) !== null && _b !== void 0 ? _b : ""
285376
+ lang,
285377
+ tex
285378
+ }
285379
+ ];
285380
+ }
285381
+ };
285382
+ var rawTypstDirective = {
285383
+ name: "raw:typst",
285384
+ alias: ["raw:typ"],
285385
+ doc: "Allows you to include typst in your document that will only be included in typst exports",
285386
+ body: {
285387
+ type: String,
285388
+ doc: "Raw typst content"
285389
+ },
285390
+ run(data) {
285391
+ const lang = "typst";
285392
+ const body3 = data.body;
285393
+ const typst = body3 ? `
285394
+ ${body3}
285395
+ ` : "";
285396
+ return [
285397
+ {
285398
+ type: "raw",
285399
+ lang,
285400
+ typst
285330
285401
  }
285331
285402
  ];
285332
285403
  }
@@ -285387,6 +285458,8 @@ var defaultDirectives = [
285387
285458
  mermaidDirective,
285388
285459
  mystdemoDirective,
285389
285460
  rawDirective,
285461
+ rawLatexDirective,
285462
+ rawTypstDirective,
285390
285463
  divDirective
285391
285464
  ];
285392
285465
 
@@ -285867,6 +285940,50 @@ var keyboardRole = {
285867
285940
  }
285868
285941
  };
285869
285942
 
285943
+ // ../myst-roles/dist/raw.js
285944
+ var rawLatexRole = {
285945
+ name: "raw:latex",
285946
+ alias: ["raw:tex"],
285947
+ doc: "Allows you to include tex in your document that will only be included in tex exports",
285948
+ body: {
285949
+ type: String,
285950
+ doc: "Raw tex content"
285951
+ },
285952
+ run(data) {
285953
+ var _a6;
285954
+ const lang = "tex";
285955
+ const tex = (_a6 = data.body) !== null && _a6 !== void 0 ? _a6 : "";
285956
+ return [
285957
+ {
285958
+ type: "raw",
285959
+ lang,
285960
+ tex
285961
+ }
285962
+ ];
285963
+ }
285964
+ };
285965
+ var rawTypstRole = {
285966
+ name: "raw:typst",
285967
+ alias: ["raw:typ"],
285968
+ doc: "Allows you to include typst in your document that will only be included in typst exports",
285969
+ body: {
285970
+ type: String,
285971
+ doc: "Raw typst content"
285972
+ },
285973
+ run(data) {
285974
+ var _a6;
285975
+ const lang = "typst";
285976
+ const typst = (_a6 = data.body) !== null && _a6 !== void 0 ? _a6 : "";
285977
+ return [
285978
+ {
285979
+ type: "raw",
285980
+ lang,
285981
+ typst
285982
+ }
285983
+ ];
285984
+ }
285985
+ };
285986
+
285870
285987
  // ../myst-roles/dist/index.js
285871
285988
  var defaultRoles = [
285872
285989
  abbreviationRole,
@@ -285885,7 +286002,9 @@ var defaultRoles = [
285885
286002
  subscriptRole,
285886
286003
  superscriptRole,
285887
286004
  underlineRole,
285888
- keyboardRole
286005
+ keyboardRole,
286006
+ rawLatexRole,
286007
+ rawTypstRole
285889
286008
  ];
285890
286009
 
285891
286010
  // ../myst-parser/dist/tlds.js
@@ -288736,7 +288855,7 @@ var import_node_path16 = __toESM(require("path"), 1);
288736
288855
  var import_nbtx = __toESM(require_cjs2(), 1);
288737
288856
 
288738
288857
  // ../myst-cli/dist/version.js
288739
- var version2 = "1.3.3";
288858
+ var version2 = "1.3.4";
288740
288859
  var version_default2 = version2;
288741
288860
 
288742
288861
  // ../myst-cli/dist/utils/headers.js
@@ -299031,7 +299150,7 @@ function validateTemplateParts(parts, partsDefinitions, options, opts) {
299031
299150
  return output2;
299032
299151
  }
299033
299152
  function validateTemplateDoc(frontmatter, docDefinitions, options, opts) {
299034
- const output2 = validateProjectFrontmatter(frontmatter, opts);
299153
+ const output2 = validateProjectFrontmatter(filterKeys(frontmatter, PROJECT_FRONTMATTER_KEYS), opts);
299035
299154
  if (output2 === void 0)
299036
299155
  return void 0;
299037
299156
  const filteredDoc = docDefinitions.filter((def) => {
@@ -302726,6 +302845,8 @@ var LocalDiskCache = class {
302726
302845
  async function rawDirectiveTransform(tree, vfile2) {
302727
302846
  const rawNodes = selectAll("raw", tree);
302728
302847
  rawNodes.forEach((node3) => {
302848
+ if (!node3.value)
302849
+ return;
302729
302850
  if (["latex", "tex"].includes(node3.lang)) {
302730
302851
  const state = new TexParser(node3.value, vfile2);
302731
302852
  node3.children = state.ast.children;
@@ -304854,6 +304975,14 @@ var handlers3 = {
304854
304975
  state.text(node3.value, false);
304855
304976
  state.write("}");
304856
304977
  }
304978
+ },
304979
+ raw(node3, state) {
304980
+ var _a6;
304981
+ if (node3.tex) {
304982
+ state.write(node3.tex);
304983
+ } else if ((_a6 = node3.children) === null || _a6 === void 0 ? void 0 : _a6.length) {
304984
+ state.renderChildren(node3);
304985
+ }
304857
304986
  }
304858
304987
  };
304859
304988
  var TexSerializer = class {
@@ -306477,6 +306606,14 @@ ${node3.value}
306477
306606
  },
306478
306607
  span(node3, state) {
306479
306608
  state.renderChildren(node3, 0, { trimEnd: false });
306609
+ },
306610
+ raw(node3, state) {
306611
+ var _a6;
306612
+ if (node3.typst) {
306613
+ state.write(node3.typst);
306614
+ } else if ((_a6 = node3.children) === null || _a6 === void 0 ? void 0 : _a6.length) {
306615
+ state.renderChildren(node3, void 0, { trimEnd: false });
306616
+ }
306480
306617
  }
306481
306618
  };
306482
306619
  var TypstSerializer = class {
@@ -1,8 +0,0 @@
1
- mystmd_py/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- mystmd_py/main.py,sha256=BaPniv8thshA5DKIBoq2huFUs1Jb0zFkMxN2UIHXUkw,1511
3
- mystmd_py/myst.cjs,sha256=Xq49AB9KLxnM6JNNLyf7vYIhOr_Sc8tMsEm0NCnXrLs,13093067
4
- mystmd-1.3.3.dist-info/METADATA,sha256=A3ilDq0AI8AdYHU89B19jStpaLCw_O7GgtDNgA2f3aE,2954
5
- mystmd-1.3.3.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
6
- mystmd-1.3.3.dist-info/entry_points.txt,sha256=eC2ol2gqS2q5E-ktkMrBSvV0tckGUcNGS-c4hEQ-_V4,45
7
- mystmd-1.3.3.dist-info/licenses/LICENSE,sha256=4BcikqvulW5nh_MxaocO-lC7ydIX23dMbcqtNTUSxr4,1082
8
- mystmd-1.3.3.dist-info/RECORD,,
File without changes