mystmd 1.5.0__tar.gz → 1.6.0__tar.gz

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.4
2
2
  Name: mystmd
3
- Version: 1.5.0
3
+ Version: 1.6.0
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mystmd",
3
- "version": "1.5.0",
3
+ "version": "1.6.0",
4
4
  "description": "Command line tools for MyST Markdown",
5
5
  "author": "Rowan Cockett <rowan@curvenote.com>",
6
6
  "license": "MIT",
@@ -45,6 +45,6 @@
45
45
  "commander": "^10.0.1",
46
46
  "core-js": "^3.31.1",
47
47
  "js-yaml": "^4.1.0",
48
- "myst-cli": "^1.5.0"
48
+ "myst-cli": "^1.6.0"
49
49
  }
50
50
  }
@@ -193391,7 +193391,7 @@ var {
193391
193391
  } = import_index.default;
193392
193392
 
193393
193393
  // src/version.ts
193394
- var version = "1.5.0";
193394
+ var version = "1.6.0";
193395
193395
  var version_default = version;
193396
193396
 
193397
193397
  // ../myst-cli/dist/build/build.js
@@ -196064,6 +196064,12 @@ var licenses = {
196064
196064
  osi: true,
196065
196065
  free: true
196066
196066
  },
196067
+ "Artistic-dist": {
196068
+ name: "Artistic License 1.0 (dist)"
196069
+ },
196070
+ "Aspell-RU": {
196071
+ name: "Aspell Russian License"
196072
+ },
196067
196073
  "ASWF-Digital-Assets-1.0": {
196068
196074
  name: "ASWF Digital Assets License version 1.0"
196069
196075
  },
@@ -196139,6 +196145,9 @@ var licenses = {
196139
196145
  name: "BSD-2-Clause Plus Patent License",
196140
196146
  osi: true
196141
196147
  },
196148
+ "BSD-2-Clause-pkgconf-disclaimer": {
196149
+ name: "BSD 2-Clause pkgconf disclaimer variant"
196150
+ },
196142
196151
  "BSD-2-Clause-Views": {
196143
196152
  name: "BSD 2-Clause with views sentence"
196144
196153
  },
@@ -196616,6 +196625,9 @@ var licenses = {
196616
196625
  Crossword: {
196617
196626
  name: "Crossword License"
196618
196627
  },
196628
+ CryptoSwift: {
196629
+ name: "CryptoSwift License"
196630
+ },
196619
196631
  CrystalStacker: {
196620
196632
  name: "CrystalStacker License"
196621
196633
  },
@@ -196650,6 +196662,9 @@ var licenses = {
196650
196662
  DOC: {
196651
196663
  name: "DOC License"
196652
196664
  },
196665
+ "DocBook-DTD": {
196666
+ name: "DocBook DTD License"
196667
+ },
196653
196668
  "DocBook-Schema": {
196654
196669
  name: "DocBook Schema License"
196655
196670
  },
@@ -196781,9 +196796,18 @@ var licenses = {
196781
196796
  FSFULLR: {
196782
196797
  name: "FSF Unlimited License (with License Retention)"
196783
196798
  },
196799
+ FSFULLRSD: {
196800
+ name: "FSF Unlimited License (with License Retention and Short Disclaimer)"
196801
+ },
196784
196802
  FSFULLRWD: {
196785
196803
  name: "FSF Unlimited License (With License Retention and Warranty Disclaimer)"
196786
196804
  },
196805
+ "FSL-1.1-ALv2": {
196806
+ name: "Functional Source License, Version 1.1, ALv2 Future License"
196807
+ },
196808
+ "FSL-1.1-MIT": {
196809
+ name: "Functional Source License, Version 1.1, MIT Future License"
196810
+ },
196787
196811
  FTL: {
196788
196812
  name: "Freetype Project License",
196789
196813
  free: true
@@ -196794,6 +196818,9 @@ var licenses = {
196794
196818
  fwlw: {
196795
196819
  name: "fwlw License"
196796
196820
  },
196821
+ "Game-Programming-Gems": {
196822
+ name: "Game Programming Gems License"
196823
+ },
196797
196824
  "GCR-docs": {
196798
196825
  name: "Gnome GCR Documentation License"
196799
196826
  },
@@ -196923,6 +196950,9 @@ var licenses = {
196923
196950
  HaskellReport: {
196924
196951
  name: "Haskell Language Report License"
196925
196952
  },
196953
+ HDF5: {
196954
+ name: "HDF5 License"
196955
+ },
196926
196956
  hdparm: {
196927
196957
  name: "hdparm License"
196928
196958
  },
@@ -197088,6 +197118,9 @@ var licenses = {
197088
197118
  "JasPer-2.0": {
197089
197119
  name: "JasPer License"
197090
197120
  },
197121
+ jove: {
197122
+ name: "Jove License"
197123
+ },
197091
197124
  "JPL-image": {
197092
197125
  name: "JPL Image Use Policy"
197093
197126
  },
@@ -197155,6 +197188,9 @@ var licenses = {
197155
197188
  Libpng: {
197156
197189
  name: "libpng License"
197157
197190
  },
197191
+ "libpng-1.6.35": {
197192
+ name: "PNG Reference Library License v1 (for libpng 0.5 through 1.6.35)"
197193
+ },
197158
197194
  "libpng-2.0": {
197159
197195
  name: "PNG Reference Library version 2"
197160
197196
  },
@@ -197254,6 +197290,9 @@ var licenses = {
197254
197290
  MakeIndex: {
197255
197291
  name: "MakeIndex License"
197256
197292
  },
197293
+ man2html: {
197294
+ name: "man2html License"
197295
+ },
197257
197296
  "Martin-Birgmeier": {
197258
197297
  name: "Martin Birgmeier License"
197259
197298
  },
@@ -197424,6 +197463,9 @@ var licenses = {
197424
197463
  name: "Nethack General Public License",
197425
197464
  osi: true
197426
197465
  },
197466
+ ngrep: {
197467
+ name: "ngrep License"
197468
+ },
197427
197469
  "NICTA-1.0": {
197428
197470
  name: "NICTA Public Software License, Version 1.0"
197429
197471
  },
@@ -197472,6 +197514,9 @@ var licenses = {
197472
197514
  NRL: {
197473
197515
  name: "NRL License"
197474
197516
  },
197517
+ "NTIA-PD": {
197518
+ name: "NTIA Public Domain Notice"
197519
+ },
197475
197520
  NTP: {
197476
197521
  name: "NTP License",
197477
197522
  osi: true
@@ -197850,6 +197895,9 @@ var licenses = {
197850
197895
  snprintf: {
197851
197896
  name: "snprintf License"
197852
197897
  },
197898
+ SOFA: {
197899
+ name: "SOFA Software License"
197900
+ },
197853
197901
  softSurfer: {
197854
197902
  name: "softSurfer License"
197855
197903
  },
@@ -197888,6 +197936,9 @@ var licenses = {
197888
197936
  "SugarCRM-1.1.3": {
197889
197937
  name: "SugarCRM Public License v1.1.3"
197890
197938
  },
197939
+ "SUL-1.0": {
197940
+ name: "Sustainable Use License v1.0"
197941
+ },
197891
197942
  "Sun-PPP": {
197892
197943
  name: "Sun PPP License"
197893
197944
  },
@@ -197995,6 +198046,12 @@ var licenses = {
197995
198046
  osi: true,
197996
198047
  free: true
197997
198048
  },
198049
+ "Unlicense-libtelnet": {
198050
+ name: "Unlicense - libtelnet variant"
198051
+ },
198052
+ "Unlicense-libwhirlpool": {
198053
+ name: "Unlicense - libwhirlpool variant"
198054
+ },
197998
198055
  "UPL-1.0": {
197999
198056
  name: "Universal Permissive License v1.0",
198000
198057
  osi: true,
@@ -222083,6 +222140,10 @@ var defaultHtmlToMdastOptions = {
222083
222140
  },
222084
222141
  summary(h4, node3) {
222085
222142
  return h4(node3, "summary", all5(h4, node3));
222143
+ },
222144
+ u(h4, node3) {
222145
+ const attrs = addClassAndIdentifier(node3);
222146
+ return h4(node3, "underline", attrs, all5(h4, node3));
222086
222147
  }
222087
222148
  }
222088
222149
  };
@@ -238686,17 +238747,29 @@ function listFromPages(pages, projectSlug) {
238686
238747
  function listItemFromPages(pages, projectSlug) {
238687
238748
  if (pages.length === 0)
238688
238749
  return;
238689
- const { title, slug, enumerator, level } = pages[0];
238750
+ const { title, slug, url, enumerator, level } = pages[0];
238690
238751
  const text7 = {
238691
238752
  type: "text",
238692
238753
  value: `${enumerator ? `${enumerator} ` : ""}${title}`
238693
238754
  };
238694
- const child = slug != null ? {
238695
- type: "link",
238696
- url: `${projectSlug ? `/${projectSlug}` : ""}/${slug}`,
238697
- internal: true,
238698
- children: [text7]
238699
- } : text7;
238755
+ let child;
238756
+ if (url != null) {
238757
+ child = {
238758
+ type: "link",
238759
+ url,
238760
+ internal: false,
238761
+ children: [text7]
238762
+ };
238763
+ } else if (slug != null) {
238764
+ child = {
238765
+ type: "link",
238766
+ url: `${projectSlug ? `/${projectSlug}` : ""}/${slug}`,
238767
+ internal: true,
238768
+ children: [text7]
238769
+ };
238770
+ } else {
238771
+ child = text7;
238772
+ }
238700
238773
  const item = {
238701
238774
  type: "listItem",
238702
238775
  children: [child]
@@ -285930,17 +286003,25 @@ var glossaryDirective = {
285930
286003
  var mathDirective = {
285931
286004
  name: "math",
285932
286005
  options: {
285933
- ...commonDirectiveOptions("math")
286006
+ ...commonDirectiveOptions("math"),
286007
+ typst: {
286008
+ type: String,
286009
+ doc: "Typst-specific math content. If not provided, LaTeX content will be converted to Typst."
286010
+ }
285934
286011
  },
285935
286012
  body: {
285936
286013
  type: String,
285937
286014
  required: true
285938
286015
  },
285939
286016
  run(data) {
286017
+ var _a6;
285940
286018
  const math7 = addCommonDirectiveOptions(data, { type: "math", value: data.body });
285941
286019
  if (data.node.tight) {
285942
286020
  math7.tight = data.node.tight;
285943
286021
  }
286022
+ if ((_a6 = data.options) === null || _a6 === void 0 ? void 0 : _a6.typst) {
286023
+ math7.typst = data.options.typst;
286024
+ }
285944
286025
  return [math7];
285945
286026
  }
285946
286027
  };
@@ -286440,14 +286521,24 @@ var deleteRole = {
286440
286521
  // ../myst-roles/dist/math.js
286441
286522
  var mathRole = {
286442
286523
  name: "math",
286443
- options: { ...commonRoleOptions("math") },
286524
+ options: {
286525
+ ...commonRoleOptions("math"),
286526
+ typst: {
286527
+ type: String,
286528
+ doc: "Typst-specific math content. If not provided, LaTeX content will be converted to Typst."
286529
+ }
286530
+ },
286444
286531
  body: {
286445
286532
  type: String,
286446
286533
  required: true
286447
286534
  },
286448
286535
  run(data) {
286536
+ var _a6;
286449
286537
  const node3 = { type: "inlineMath", value: data.body };
286450
286538
  addCommonRoleOptions(data, node3);
286539
+ if ((_a6 = data.options) === null || _a6 === void 0 ? void 0 : _a6.typst) {
286540
+ node3.typst = data.options.typst;
286541
+ }
286451
286542
  return [node3];
286452
286543
  }
286453
286544
  };
@@ -289073,6 +289164,7 @@ function applyRoles(tree, specs, vfile2) {
289073
289164
  const { valid: validOptions, options } = parseOptions(name3, node3, vfile2, optionsSpec);
289074
289165
  let validationError2 = validOptions;
289075
289166
  data.options = options;
289167
+ node3.options = options;
289076
289168
  const bodyNode = (_a6 = node3.children) === null || _a6 === void 0 ? void 0 : _a6.find((n) => n.type === "mystRoleBody");
289077
289169
  if (body3) {
289078
289170
  if (body3.required && !bodyNode) {
@@ -289901,7 +289993,7 @@ var import_mime_types = __toESM(require_mime_types(), 1);
289901
289993
  var import_node_path16 = __toESM(require("path"), 1);
289902
289994
 
289903
289995
  // ../myst-cli/dist/version.js
289904
- var version2 = "1.5.0";
289996
+ var version2 = "1.6.0";
289905
289997
  var version_default2 = version2;
289906
289998
 
289907
289999
  // ../myst-cli/dist/utils/headers.js
@@ -290212,6 +290304,14 @@ function binaryName() {
290212
290304
  var _a6;
290213
290305
  return (_a6 = process.env.MYSTMD_BINARY_NAME) !== null && _a6 !== void 0 ? _a6 : "myst";
290214
290306
  }
290307
+ function npmPackageName() {
290308
+ var _a6;
290309
+ return (_a6 = process.env.MYSTMD_NPM_PACKAGE_NAME) !== null && _a6 !== void 0 ? _a6 : "mystmd";
290310
+ }
290311
+ function npmBinaryName() {
290312
+ var _a6;
290313
+ return (_a6 = process.env.MYSTMD_NPM_BINARY_NAME) !== null && _a6 !== void 0 ? _a6 : "myst";
290314
+ }
290215
290315
  function homeURL() {
290216
290316
  var _a6;
290217
290317
  return (_a6 = process.env.MYSTMD_HOME_URL) !== null && _a6 !== void 0 ? _a6 : "https://mystmd.org";
@@ -290914,6 +291014,9 @@ async function transformImageFormats(session, mdast2, file, writeFolder, opts) {
290914
291014
  }
290915
291015
  unconvertableImages.forEach((image6) => {
290916
291016
  const badExt = import_node_path16.default.extname(image6.url) || "<no extension>";
291017
+ if (badExt === ".*") {
291018
+ return;
291019
+ }
290917
291020
  addWarningForFile(session, file, `Unsupported image extension "${badExt}" may not correctly render.`, "error", { position: image6.position, ruleId: RuleId.imageFormatConverts });
290918
291021
  });
290919
291022
  return Promise.all(conversionPromises);
@@ -302343,7 +302446,7 @@ async function transformMystXRefs(session, vfile2, mdast2, frontmatter) {
302343
302446
  })
302344
302447
  ]);
302345
302448
  const denominator = number2 === nodes.length ? "" : `/${nodes.length}`;
302346
- session.log.info(toc(`\u{1FA84} Updated link text for ${plural(`%s${denominator} external MyST reference(s)`, number2)} in %s seconds`));
302449
+ session.log.info(toc(`\u{1FA84} Updated link text for ${plural(`%s${denominator} external MyST reference(s)`, number2)} in %s`));
302347
302450
  }
302348
302451
 
302349
302452
  // ../myst-cli/dist/process/loadReferences.js
@@ -303270,9 +303373,9 @@ function mutateEmbedNode(node3, targetNode, opts) {
303270
303373
  });
303271
303374
  }
303272
303375
  if (targetNode && node3["remove-input"]) {
303273
- targetNode = filter2(targetNode, (n) => {
303376
+ targetNode = filter2(targetNode, (n, index4, parent2) => {
303274
303377
  var _a6;
303275
- return n.type !== "code" || ((_a6 = n.data) === null || _a6 === void 0 ? void 0 : _a6.type) === "output";
303378
+ return !(n.type === "code" && ((_a6 = n.data) === null || _a6 === void 0 ? void 0 : _a6.type) !== "output" && (parent2 === null || parent2 === void 0 ? void 0 : parent2.type) === "block" && (parent2 === null || parent2 === void 0 ? void 0 : parent2.kind) === NotebookCell.code);
303276
303379
  });
303277
303380
  }
303278
303381
  selectAll("[identifier],[label],[html_id]", targetNode).forEach((idNode) => {
@@ -308524,7 +308627,8 @@ function resolveRecursiveCommands(plugins3) {
308524
308627
  }
308525
308628
  var math5 = (node3, state) => {
308526
308629
  var _a6, _b;
308527
- const { value, macros: macros18 } = texToTypst(node3.value);
308630
+ const mathValue = node3.typst || node3.value;
308631
+ const { value, macros: macros18 } = node3.typst ? { value: mathValue, macros: void 0 } : texToTypst(node3.value);
308528
308632
  macros18 === null || macros18 === void 0 ? void 0 : macros18.forEach((macro2) => {
308529
308633
  state.useMacro(macro2);
308530
308634
  });
@@ -308544,7 +308648,8 @@ var math5 = (node3, state) => {
308544
308648
  state.ensureNewLine(true);
308545
308649
  };
308546
308650
  var inlineMath3 = (node3, state) => {
308547
- const { value, macros: macros18 } = texToTypst(node3.value);
308651
+ const mathValue = node3.typst || node3.value;
308652
+ const { value, macros: macros18 } = node3.typst ? { value: mathValue, macros: void 0 } : texToTypst(node3.value);
308548
308653
  macros18 === null || macros18 === void 0 ? void 0 : macros18.forEach((macro2) => {
308549
308654
  state.useMacro(macro2);
308550
308655
  });
@@ -318622,7 +318727,7 @@ async function currentSiteRoutes(session, host, baseurl, opts) {
318622
318727
  const pageSlug = slugToUrl(page.slug);
318623
318728
  return {
318624
318729
  url: `${host}${projSlug}/${pageSlug}`,
318625
- path: import_node_path57.default.join((_a8 = proj.slug) !== null && _a8 !== void 0 ? _a8 : "", `${pageSlug}.html`)
318730
+ path: import_node_path57.default.join((_a8 = proj.slug) !== null && _a8 !== void 0 ? _a8 : "", `${pageSlug}/index.html`)
318626
318731
  };
318627
318732
  }),
318628
318733
  // Download all of the configured JSON
@@ -321490,10 +321595,10 @@ async function checkAtGitRoot() {
321490
321595
 
321491
321596
  // ../myst-cli/dist/init/gh-actions/index.js
321492
321597
  function createGithubPagesAction({ defaultBranch = "main", username = "username", isGithubIO }) {
321493
- return `# This file was created automatically with \`myst init --gh-pages\` \u{1FA84} \u{1F49A}
321598
+ return `# This file was created automatically with \`${npmBinaryName()} init --gh-pages\` \u{1FA84} \u{1F49A}
321494
321599
  # Ensure your GitHub Pages settings for this repository are set to deploy with **GitHub Actions**.
321495
321600
 
321496
- name: MyST GitHub Pages Deploy
321601
+ name: ${readableName()} GitHub Pages Deploy
321497
321602
  on:
321498
321603
  push:
321499
321604
  # Runs on pushes targeting the default branch
@@ -321527,10 +321632,10 @@ jobs:
321527
321632
  - uses: actions/setup-node@v4
321528
321633
  with:
321529
321634
  node-version: 18.x
321530
- - name: Install MyST Markdown
321531
- run: npm install -g mystmd
321635
+ - name: Install ${readableName()}
321636
+ run: npm install -g ${npmPackageName()}
321532
321637
  - name: Build HTML Assets
321533
- run: myst build --html
321638
+ run: ${npmBinaryName()} build --html
321534
321639
  - name: Upload artifact
321535
321640
  uses: actions/upload-pages-artifact@v3
321536
321641
  with:
@@ -321541,7 +321646,7 @@ jobs:
321541
321646
  `;
321542
321647
  }
321543
321648
  function createGithubCurvenoteAction({ defaultBranch = "main" }) {
321544
- return `# This file was created automatically with \`myst init --gh-curvenote\` \u{1FA84} \u{1F49A}
321649
+ return `# This file was created automatically with \`${npmBinaryName()} init --gh-curvenote\` \u{1FA84} \u{1F49A}
321545
321650
 
321546
321651
  name: Curvenote Deploy
321547
321652
  on:
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes