mystmd 1.3.26__py3-none-any.whl → 1.3.28__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.
- {mystmd-1.3.26.dist-info → mystmd-1.3.28.dist-info}/METADATA +1 -1
- mystmd-1.3.28.dist-info/RECORD +9 -0
- mystmd_py/myst.cjs +68 -43
- mystmd-1.3.26.dist-info/RECORD +0 -9
- {mystmd-1.3.26.dist-info → mystmd-1.3.28.dist-info}/WHEEL +0 -0
- {mystmd-1.3.26.dist-info → mystmd-1.3.28.dist-info}/entry_points.txt +0 -0
- {mystmd-1.3.26.dist-info → mystmd-1.3.28.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,9 @@
|
|
1
|
+
mystmd_py/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
|
+
mystmd_py/main.py,sha256=qFAnpbiqjx7jXMMmPSVUBA7SSxuRjmr6SiRDBH0rhKQ,2767
|
3
|
+
mystmd_py/myst.cjs,sha256=nprk7YuYBNwxZEW0snYJb-tZQVJgdu7bP6tLl2TE33E,13198799
|
4
|
+
mystmd_py/nodeenv.py,sha256=8KER0P-WIXM2MsRJF4vcedBKscGoc26lJKojbkDxjbg,2447
|
5
|
+
mystmd-1.3.28.dist-info/METADATA,sha256=Gs6dhC8S5elSbK8FdLnIudWYKn41ZSI-ZsPYtzfNc78,3020
|
6
|
+
mystmd-1.3.28.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
7
|
+
mystmd-1.3.28.dist-info/entry_points.txt,sha256=eC2ol2gqS2q5E-ktkMrBSvV0tckGUcNGS-c4hEQ-_V4,45
|
8
|
+
mystmd-1.3.28.dist-info/licenses/LICENSE,sha256=4BcikqvulW5nh_MxaocO-lC7ydIX23dMbcqtNTUSxr4,1082
|
9
|
+
mystmd-1.3.28.dist-info/RECORD,,
|
mystmd_py/myst.cjs
CHANGED
@@ -180855,50 +180855,64 @@ var require_common = __commonJS({
|
|
180855
180855
|
createDebug.namespaces = namespaces;
|
180856
180856
|
createDebug.names = [];
|
180857
180857
|
createDebug.skips = [];
|
180858
|
-
|
180859
|
-
|
180860
|
-
|
180861
|
-
|
180862
|
-
|
180863
|
-
|
180858
|
+
const split2 = (typeof namespaces === "string" ? namespaces : "").trim().replace(/\s+/g, ",").split(",").filter(Boolean);
|
180859
|
+
for (const ns of split2) {
|
180860
|
+
if (ns[0] === "-") {
|
180861
|
+
createDebug.skips.push(ns.slice(1));
|
180862
|
+
} else {
|
180863
|
+
createDebug.names.push(ns);
|
180864
180864
|
}
|
180865
|
-
|
180866
|
-
|
180867
|
-
|
180865
|
+
}
|
180866
|
+
}
|
180867
|
+
function matchesTemplate(search4, template) {
|
180868
|
+
let searchIndex = 0;
|
180869
|
+
let templateIndex = 0;
|
180870
|
+
let starIndex = -1;
|
180871
|
+
let matchIndex = 0;
|
180872
|
+
while (searchIndex < search4.length) {
|
180873
|
+
if (templateIndex < template.length && (template[templateIndex] === search4[searchIndex] || template[templateIndex] === "*")) {
|
180874
|
+
if (template[templateIndex] === "*") {
|
180875
|
+
starIndex = templateIndex;
|
180876
|
+
matchIndex = searchIndex;
|
180877
|
+
templateIndex++;
|
180878
|
+
} else {
|
180879
|
+
searchIndex++;
|
180880
|
+
templateIndex++;
|
180881
|
+
}
|
180882
|
+
} else if (starIndex !== -1) {
|
180883
|
+
templateIndex = starIndex + 1;
|
180884
|
+
matchIndex++;
|
180885
|
+
searchIndex = matchIndex;
|
180868
180886
|
} else {
|
180869
|
-
|
180887
|
+
return false;
|
180870
180888
|
}
|
180871
180889
|
}
|
180890
|
+
while (templateIndex < template.length && template[templateIndex] === "*") {
|
180891
|
+
templateIndex++;
|
180892
|
+
}
|
180893
|
+
return templateIndex === template.length;
|
180872
180894
|
}
|
180873
180895
|
function disable() {
|
180874
180896
|
const namespaces = [
|
180875
|
-
...createDebug.names
|
180876
|
-
...createDebug.skips.map(
|
180897
|
+
...createDebug.names,
|
180898
|
+
...createDebug.skips.map((namespace) => "-" + namespace)
|
180877
180899
|
].join(",");
|
180878
180900
|
createDebug.enable("");
|
180879
180901
|
return namespaces;
|
180880
180902
|
}
|
180881
180903
|
function enabled(name3) {
|
180882
|
-
|
180883
|
-
|
180884
|
-
}
|
180885
|
-
let i2;
|
180886
|
-
let len;
|
180887
|
-
for (i2 = 0, len = createDebug.skips.length; i2 < len; i2++) {
|
180888
|
-
if (createDebug.skips[i2].test(name3)) {
|
180904
|
+
for (const skip of createDebug.skips) {
|
180905
|
+
if (matchesTemplate(name3, skip)) {
|
180889
180906
|
return false;
|
180890
180907
|
}
|
180891
180908
|
}
|
180892
|
-
for (
|
180893
|
-
if (
|
180909
|
+
for (const ns of createDebug.names) {
|
180910
|
+
if (matchesTemplate(name3, ns)) {
|
180894
180911
|
return true;
|
180895
180912
|
}
|
180896
180913
|
}
|
180897
180914
|
return false;
|
180898
180915
|
}
|
180899
|
-
function toNamespace(regexp) {
|
180900
|
-
return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, "*");
|
180901
|
-
}
|
180902
180916
|
function coerce2(val) {
|
180903
180917
|
if (val instanceof Error) {
|
180904
180918
|
return val.stack || val.message;
|
@@ -181059,7 +181073,7 @@ var require_browser5 = __commonJS({
|
|
181059
181073
|
function load2() {
|
181060
181074
|
let r2;
|
181061
181075
|
try {
|
181062
|
-
r2 = exports2.storage.getItem("debug");
|
181076
|
+
r2 = exports2.storage.getItem("debug") || exports2.storage.getItem("DEBUG");
|
181063
181077
|
} catch (error) {
|
181064
181078
|
}
|
181065
181079
|
if (!r2 && typeof process !== "undefined" && "env" in process) {
|
@@ -193426,7 +193440,7 @@ var {
|
|
193426
193440
|
} = import_index.default;
|
193427
193441
|
|
193428
193442
|
// src/version.ts
|
193429
|
-
var version = "1.3.
|
193443
|
+
var version = "1.3.28";
|
193430
193444
|
var version_default = version;
|
193431
193445
|
|
193432
193446
|
// ../myst-cli/dist/build/build.js
|
@@ -195189,12 +195203,15 @@ var ExportFormats;
|
|
195189
195203
|
})(ExportFormats || (ExportFormats = {}));
|
195190
195204
|
|
195191
195205
|
// ../myst-toc/dist/toc.js
|
195192
|
-
var COMMON_ENTRY_KEYS = ["title"];
|
195206
|
+
var COMMON_ENTRY_KEYS = ["title", "hidden"];
|
195193
195207
|
function validateCommonEntry(entry, opts) {
|
195194
195208
|
const output2 = {};
|
195195
195209
|
if (defined(entry.title)) {
|
195196
195210
|
output2.title = validateString(entry.title, incrementOptions("title", opts));
|
195197
195211
|
}
|
195212
|
+
if (defined(entry.hidden)) {
|
195213
|
+
output2.hidden = validateBoolean(entry.hidden, incrementOptions("hidden", opts));
|
195214
|
+
}
|
195198
195215
|
return output2;
|
195199
195216
|
}
|
195200
195217
|
function validateFileEntry(entry, opts) {
|
@@ -289719,7 +289736,7 @@ var import_mime_types = __toESM(require_mime_types(), 1);
|
|
289719
289736
|
var import_node_path16 = __toESM(require("path"), 1);
|
289720
289737
|
|
289721
289738
|
// ../myst-cli/dist/version.js
|
289722
|
-
var version2 = "1.3.
|
289739
|
+
var version2 = "1.3.28";
|
289723
289740
|
var version_default2 = version2;
|
289724
289741
|
|
289725
289742
|
// ../myst-cli/dist/utils/headers.js
|
@@ -298206,12 +298223,13 @@ function listExplicitFiles(entries2, path44) {
|
|
298206
298223
|
function patternsToFileEntries(session, entries2, path44, ignore3, file, opts) {
|
298207
298224
|
return entries2.map((entry) => {
|
298208
298225
|
if (isPattern(entry)) {
|
298209
|
-
const { pattern } = entry;
|
298226
|
+
const { pattern, ...leftover } = entry;
|
298210
298227
|
const matches4 = globSync(pattern, { cwd: path44, nodir: true, ...opts }).filter((item) => !ignore3 || !ignore3.includes(item)).sort(comparePaths);
|
298211
298228
|
const newEntries = matches4.map((item) => {
|
298212
298229
|
return {
|
298213
298230
|
file: item,
|
298214
|
-
implicit: true
|
298231
|
+
implicit: true,
|
298232
|
+
...leftover
|
298215
298233
|
};
|
298216
298234
|
});
|
298217
298235
|
if (newEntries.length === 0) {
|
@@ -298238,15 +298256,16 @@ function pagesFromEntries(session, path44, entries2, pages = [], level = 1, page
|
|
298238
298256
|
let entryLevel = level;
|
298239
298257
|
if (isFile(entry)) {
|
298240
298258
|
entryLevel = level < 0 ? 0 : level;
|
298241
|
-
const
|
298259
|
+
const { file, ...leftover } = entry;
|
298260
|
+
const resolvedFile = resolveExtension((0, import_node_path19.resolve)(path44, file), (message, errorLevel, note) => {
|
298242
298261
|
addWarningForFile(session, configFile, message, errorLevel, {
|
298243
298262
|
ruleId: RuleId.tocContentsExist,
|
298244
298263
|
note
|
298245
298264
|
});
|
298246
298265
|
});
|
298247
|
-
if (
|
298248
|
-
const { slug } = fileInfo2(
|
298249
|
-
pages.push({ file, level: entryLevel, slug,
|
298266
|
+
if (resolvedFile && import_node_fs14.default.existsSync(resolvedFile) && !isDirectory(resolvedFile)) {
|
298267
|
+
const { slug } = fileInfo2(resolvedFile, pageSlugs, { ...opts, session });
|
298268
|
+
pages.push({ file: resolvedFile, level: entryLevel, slug, ...leftover });
|
298250
298269
|
}
|
298251
298270
|
} else if (isURL(entry)) {
|
298252
298271
|
addWarningForFile(session, configFile, `URLs in table of contents are not yet supported: ${entry.url}`, "warn", {
|
@@ -298301,7 +298320,8 @@ function projectFromTOC(session, path44, toc, level = 1, file, opts) {
|
|
298301
298320
|
}
|
298302
298321
|
if ((opts === null || opts === void 0 ? void 0 : opts.urlFolders) && !opts.projectPath)
|
298303
298322
|
opts.projectPath = path44;
|
298304
|
-
const
|
298323
|
+
const slug = "index";
|
298324
|
+
pageSlugs[slug] = 1;
|
298305
298325
|
const pages = [];
|
298306
298326
|
pagesFromEntries(session, path44, entries2, pages, level, pageSlugs, opts);
|
298307
298327
|
return { path: path44 || ".", file: indexFile, index: slug, pages };
|
@@ -300225,7 +300245,7 @@ var KIND_TO_EXT = {
|
|
300225
300245
|
site: void 0
|
300226
300246
|
};
|
300227
300247
|
var DEFAULT_TEMPLATES = {
|
300228
|
-
tex: "tex/myst/
|
300248
|
+
tex: "tex/myst/plain_latex",
|
300229
300249
|
typst: "typst/myst/lapreprint-typst",
|
300230
300250
|
docx: "docx/myst/default",
|
300231
300251
|
site: "site/myst/book-theme"
|
@@ -301993,8 +302013,8 @@ function makeNamedExportOption(description) {
|
|
301993
302013
|
function makeStrictOption() {
|
301994
302014
|
return new Option("--strict", "Summarize build warnings and stop on any errors.").default(false);
|
301995
302015
|
}
|
301996
|
-
function makeForceOption() {
|
301997
|
-
return new Option("--force",
|
302016
|
+
function makeForceOption(description) {
|
302017
|
+
return new Option("--force", description).default(false);
|
301998
302018
|
}
|
301999
302019
|
function makeCheckLinksOption() {
|
302000
302020
|
return new Option("--check-links", "Check all links to websites resolve.").default(false);
|
@@ -307748,8 +307768,10 @@ var typstMacros = {
|
|
307748
307768
|
gets: "arrow.l",
|
307749
307769
|
rightharpoonup: "harpoon.rt",
|
307750
307770
|
rightharpoondown: "harpoon.rb",
|
307771
|
+
rightleftharpoons: "harpoons.rtlb",
|
307751
307772
|
leftharpoonup: "harpoon.lt",
|
307752
307773
|
leftharpoondown: "harpoon.lb",
|
307774
|
+
leftrightharpoons: "harpoons.ltrb",
|
307753
307775
|
infin: "infinity",
|
307754
307776
|
// This is a mathjax only thing, https://docs.mathjax.org/en/v2.7-latest/tex.html#i
|
307755
307777
|
infty: "infinity",
|
@@ -321177,7 +321199,7 @@ async function clean2(session, files, opts) {
|
|
321177
321199
|
|
321178
321200
|
// ../myst-cli/dist/cli/build.js
|
321179
321201
|
function makeBuildCommand() {
|
321180
|
-
const command = new Command("build").description("Build PDF, LaTeX, Word and website exports from MyST files").argument("[files...]", "list of files to export").addOption(makeExecuteOption("Execute Notebooks")).addOption(makePdfOption("Build PDF output")).addOption(makeTexOption("Build LaTeX outputs")).addOption(makeTypstOption("Build Typst outputs")).addOption(makeDocxOption("Build Docx output")).addOption(makeMdOption("Build MD output")).addOption(makeJatsOption("Build JATS xml output")).addOption(makeMecaOptions("Build MECA zip output")).addOption(makeCffOption("Build CFF output")).addOption(makeSiteOption(`Build ${readableName()} site content`)).addOption(makeHtmlOption("Build static HTML site content")).addOption(makeAllOption("Build all exports")).addOption(makeDOIBibOption()).addOption(makeWatchOption()).addOption(makeNamedExportOption("Output file for the export")).addOption(makeForceOption()).addOption(makeCheckLinksOption()).addOption(makeStrictOption()).addOption(makeCIOption()).addOption(makeMaxSizeWebpOption());
|
321202
|
+
const command = new Command("build").description("Build PDF, LaTeX, Word and website exports from MyST files").argument("[files...]", "list of files to export").addOption(makeExecuteOption("Execute Notebooks")).addOption(makePdfOption("Build PDF output")).addOption(makeTexOption("Build LaTeX outputs")).addOption(makeTypstOption("Build Typst outputs")).addOption(makeDocxOption("Build Docx output")).addOption(makeMdOption("Build MD output")).addOption(makeJatsOption("Build JATS xml output")).addOption(makeMecaOptions("Build MECA zip output")).addOption(makeCffOption("Build CFF output")).addOption(makeSiteOption(`Build ${readableName()} site content`)).addOption(makeHtmlOption("Build static HTML site content")).addOption(makeAllOption("Build all exports")).addOption(makeDOIBibOption()).addOption(makeWatchOption()).addOption(makeNamedExportOption("Output file for the export")).addOption(makeForceOption("Build outputs for the given format, even if corresponding exports are not defined in file frontmatter")).addOption(makeCheckLinksOption()).addOption(makeStrictOption()).addOption(makeCIOption()).addOption(makeMaxSizeWebpOption());
|
321181
321203
|
return command;
|
321182
321204
|
}
|
321183
321205
|
|
@@ -333824,7 +333846,7 @@ function getKind(session, kinds) {
|
|
333824
333846
|
return void 0;
|
333825
333847
|
const { pdf, tex, typst, docx, site } = kinds;
|
333826
333848
|
if (pdf)
|
333827
|
-
session.log.warn('PDF templates may
|
333849
|
+
session.log.warn('PDF templates may be either "tex" or "typst", including both.');
|
333828
333850
|
const flags = {
|
333829
333851
|
[TemplateKind.tex]: (tex || pdf) ?? false,
|
333830
333852
|
[TemplateKind.typst]: (typst || pdf) ?? false,
|
@@ -333839,8 +333861,11 @@ function getKind(session, kinds) {
|
|
333839
333861
|
async function downloadTemplateCLI(session, template, path44, opts) {
|
333840
333862
|
const templateKind = getKindFromName(template);
|
333841
333863
|
const kinds = templateKind ? [templateKind] : getKind(session, opts);
|
333842
|
-
if (!kinds
|
333843
|
-
throw new Error("Cannot lookup a template
|
333864
|
+
if (!(kinds == null ? void 0 : kinds.length)) {
|
333865
|
+
throw new Error("Cannot lookup a template without specifying a kind (e.g. typst).");
|
333866
|
+
}
|
333867
|
+
if (kinds.length > 1) {
|
333868
|
+
throw new Error("Cannot lookup a template when more than one kind is specified.");
|
333844
333869
|
}
|
333845
333870
|
const kind = kinds[0];
|
333846
333871
|
const { templatePath: defaultTemplatePath, templateUrl } = resolveInputs(session, {
|
@@ -333947,7 +333972,7 @@ Tags: ${source_default8.dim(
|
|
333947
333972
|
});
|
333948
333973
|
}
|
333949
333974
|
function makeDownloadCLI(program3) {
|
333950
|
-
const command = new Command("download").description("Download a public template to a path").argument("<template>", "The template URL or name").argument("[path]", "A folder to download and unzip the template to").addOption(makePdfOption("Download PDF template")).addOption(makeTexOption("Download LaTeX template")).addOption(makeTypstOption("Download Typst template")).addOption(makeDocxOption("Download Docx template")).addOption(makeSiteOption("Download Site template")).addOption(makeForceOption()).action(clirun2(Session, downloadTemplateCLI, program3));
|
333975
|
+
const command = new Command("download").description("Download a public template to a path").argument("<template>", "The template URL or name").argument("[path]", "A folder to download and unzip the template to").addOption(makePdfOption("Download PDF template")).addOption(makeTexOption("Download LaTeX template")).addOption(makeTypstOption("Download Typst template")).addOption(makeDocxOption("Download Docx template")).addOption(makeSiteOption("Download Site template")).addOption(makeForceOption("Overwrite existing downloaded templates")).action(clirun2(Session, downloadTemplateCLI, program3));
|
333951
333976
|
return command;
|
333952
333977
|
}
|
333953
333978
|
function makeListCLI(program3) {
|
mystmd-1.3.26.dist-info/RECORD
DELETED
@@ -1,9 +0,0 @@
|
|
1
|
-
mystmd_py/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
|
-
mystmd_py/main.py,sha256=qFAnpbiqjx7jXMMmPSVUBA7SSxuRjmr6SiRDBH0rhKQ,2767
|
3
|
-
mystmd_py/myst.cjs,sha256=gmXJ5DgBvXF2I68guR9c6DVom3wfQR-AKirx7tUb7H4,13197796
|
4
|
-
mystmd_py/nodeenv.py,sha256=8KER0P-WIXM2MsRJF4vcedBKscGoc26lJKojbkDxjbg,2447
|
5
|
-
mystmd-1.3.26.dist-info/METADATA,sha256=7HYuHX7K1cwQ-5uKVaZMu0cDmAPECmu04gDU4KtiTfE,3020
|
6
|
-
mystmd-1.3.26.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
7
|
-
mystmd-1.3.26.dist-info/entry_points.txt,sha256=eC2ol2gqS2q5E-ktkMrBSvV0tckGUcNGS-c4hEQ-_V4,45
|
8
|
-
mystmd-1.3.26.dist-info/licenses/LICENSE,sha256=4BcikqvulW5nh_MxaocO-lC7ydIX23dMbcqtNTUSxr4,1082
|
9
|
-
mystmd-1.3.26.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|