mystmd 1.3.16__py3-none-any.whl → 1.3.18__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.16.dist-info → mystmd-1.3.18.dist-info}/METADATA +2 -3
- mystmd-1.3.18.dist-info/RECORD +9 -0
- {mystmd-1.3.16.dist-info → mystmd-1.3.18.dist-info}/WHEEL +1 -1
- mystmd_py/myst.cjs +63 -10
- mystmd-1.3.16.dist-info/RECORD +0 -9
- {mystmd-1.3.16.dist-info → mystmd-1.3.18.dist-info}/entry_points.txt +0 -0
- {mystmd-1.3.16.dist-info → mystmd-1.3.18.dist-info}/licenses/LICENSE +0 -0
@@ -1,13 +1,12 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: mystmd
|
3
|
-
Version: 1.3.
|
3
|
+
Version: 1.3.18
|
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
|
7
7
|
Project-URL: Repository, https://github.com/jupyter-book/mystmd.git
|
8
8
|
Author-email: Rowan Cockett <rowan@curvenote.com>
|
9
|
-
License
|
10
|
-
License-File: LICENSE
|
9
|
+
License: MIT
|
11
10
|
Keywords: latex,markdown,pdf-generation,science-research,scientific-visualization,writing-software
|
12
11
|
Classifier: Intended Audience :: Science/Research
|
13
12
|
Classifier: License :: OSI Approved :: MIT License
|
@@ -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=ZgH3nO8FjLtc0M7I2dIvxNFzrInsPYeM8sVOrGYIEpo,13160860
|
4
|
+
mystmd_py/nodeenv.py,sha256=8KER0P-WIXM2MsRJF4vcedBKscGoc26lJKojbkDxjbg,2447
|
5
|
+
mystmd-1.3.18.dist-info/METADATA,sha256=Hl0H8JCukp-LbcBwT40tW56NZ35E7FV6dxUtFjWd9Lc,2987
|
6
|
+
mystmd-1.3.18.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
|
7
|
+
mystmd-1.3.18.dist-info/entry_points.txt,sha256=eC2ol2gqS2q5E-ktkMrBSvV0tckGUcNGS-c4hEQ-_V4,45
|
8
|
+
mystmd-1.3.18.dist-info/licenses/LICENSE,sha256=4BcikqvulW5nh_MxaocO-lC7ydIX23dMbcqtNTUSxr4,1082
|
9
|
+
mystmd-1.3.18.dist-info/RECORD,,
|
mystmd_py/myst.cjs
CHANGED
@@ -193891,7 +193891,7 @@ var {
|
|
193891
193891
|
} = import_index.default;
|
193892
193892
|
|
193893
193893
|
// src/version.ts
|
193894
|
-
var version = "1.3.
|
193894
|
+
var version = "1.3.18";
|
193895
193895
|
var version_default = version;
|
193896
193896
|
|
193897
193897
|
// ../myst-cli/dist/build/build.js
|
@@ -198480,11 +198480,12 @@ var URL_ID_LOOKUP = Object.fromEntries(Object.values(ID_LICENSE_LOOKUP).filter((
|
|
198480
198480
|
return [cleanUrl(value.url), value.id];
|
198481
198481
|
}));
|
198482
198482
|
function validateLicense(input3, opts) {
|
198483
|
+
var _a6;
|
198483
198484
|
if (typeof input3 === "string") {
|
198484
198485
|
const value2 = validateString(input3, opts);
|
198485
198486
|
if (value2 === void 0)
|
198486
198487
|
return void 0;
|
198487
|
-
const valueSpdx = correctLicense(value2);
|
198488
|
+
const valueSpdx = value2.length < 15 ? correctLicense(value2) : void 0;
|
198488
198489
|
if (URL_ID_LOOKUP[cleanUrl(value2)]) {
|
198489
198490
|
input3 = { id: URL_ID_LOOKUP[cleanUrl(value2)] };
|
198490
198491
|
} else if (isUrl(value2)) {
|
@@ -198516,7 +198517,17 @@ function validateLicense(input3, opts) {
|
|
198516
198517
|
}
|
198517
198518
|
output2.id = idSpdx !== null && idSpdx !== void 0 ? idSpdx : id;
|
198518
198519
|
} else {
|
198519
|
-
|
198520
|
+
if (value.url) {
|
198521
|
+
const url = (_a6 = validateUrl(value.url, { property: "", messages: {} })) !== null && _a6 !== void 0 ? _a6 : "";
|
198522
|
+
const idFromUrl = URL_ID_LOOKUP[cleanUrl(url)];
|
198523
|
+
if (idFromUrl) {
|
198524
|
+
output2.id = idFromUrl;
|
198525
|
+
value.url = ID_LICENSE_LOOKUP[idFromUrl].url;
|
198526
|
+
}
|
198527
|
+
}
|
198528
|
+
if (!output2.id) {
|
198529
|
+
validationWarning(`no license ID - using a SPDX license ID is recommended, see https://spdx.org/licenses/`, opts);
|
198530
|
+
}
|
198520
198531
|
}
|
198521
198532
|
const expected = output2.id ? ID_LICENSE_LOOKUP[output2.id] : void 0;
|
198522
198533
|
if (value.url != null) {
|
@@ -278884,10 +278895,10 @@ var FIGURE_HANDLERS = {
|
|
278884
278895
|
},
|
278885
278896
|
macro_centering: centering,
|
278886
278897
|
macro_includegraphics(node3, state) {
|
278887
|
-
var _a6;
|
278898
|
+
var _a6, _b, _c;
|
278888
278899
|
state.closeParagraph();
|
278889
278900
|
const url = texToText(getArguments(node3, "group"));
|
278890
|
-
const args = (_a6 = getArguments(node3, "argument")) === null || _a6 === void 0 ? void 0 : _a6[0].content;
|
278901
|
+
const args = (_c = (_b = (_a6 = getArguments(node3, "argument")) === null || _a6 === void 0 ? void 0 : _a6[0]) === null || _b === void 0 ? void 0 : _b.content) !== null && _c !== void 0 ? _c : [];
|
278891
278902
|
if (args.length === 4 && args[0].content === "width" && args[1].content === "=" && Number.isFinite(Number.parseFloat(args[2].content))) {
|
278892
278903
|
const width = `${Math.round(Number.parseFloat(args[2].content) * 100)}%`;
|
278893
278904
|
state.pushNode(u2("image", { url, width }));
|
@@ -289404,7 +289415,7 @@ var import_node_path15 = __toESM(require("path"), 1);
|
|
289404
289415
|
var import_nbtx = __toESM(require_cjs2(), 1);
|
289405
289416
|
|
289406
289417
|
// ../myst-cli/dist/version.js
|
289407
|
-
var version2 = "1.3.
|
289418
|
+
var version2 = "1.3.18";
|
289408
289419
|
var version_default2 = version2;
|
289409
289420
|
|
289410
289421
|
// ../myst-cli/dist/utils/headers.js
|
@@ -307296,7 +307307,13 @@ function parseLatex2(value) {
|
|
307296
307307
|
tilde: { signature: "m" },
|
307297
307308
|
widehat: { signature: "m" },
|
307298
307309
|
overset: { signature: "m m" },
|
307299
|
-
underset: { signature: "m m" }
|
307310
|
+
underset: { signature: "m m" },
|
307311
|
+
overbrace: { signature: "m" },
|
307312
|
+
overline: { signature: "m" },
|
307313
|
+
overparen: { signature: "m" },
|
307314
|
+
underbrace: { signature: "m" },
|
307315
|
+
underline: { signature: "m" },
|
307316
|
+
underparen: { signature: "m" }
|
307300
307317
|
}
|
307301
307318
|
}).processSync({ value });
|
307302
307319
|
const content3 = file.result.content;
|
@@ -307586,7 +307603,7 @@ var tableHandler = (node3, state) => {
|
|
307586
307603
|
});
|
307587
307604
|
return;
|
307588
307605
|
}
|
307589
|
-
state.useMacro('#import "@preview/tablex:0.0.
|
307606
|
+
state.useMacro('#import "@preview/tablex:0.0.9": tablex, cellx, hlinex, vlinex');
|
307590
307607
|
state.useMacro("#let tableStyle = (:)");
|
307591
307608
|
state.write(`${command}(columns: ${columns}, header-rows: ${countHeaderRows(node3)}, repeat-header: true, ..tableStyle,
|
307592
307609
|
`);
|
@@ -307598,7 +307615,7 @@ var tableRowHandler = (node3, state) => {
|
|
307598
307615
|
state.renderChildren(node3, 1);
|
307599
307616
|
};
|
307600
307617
|
var tableCellHandler = (node3, state) => {
|
307601
|
-
if (node3.rowspan || node3.colspan) {
|
307618
|
+
if (node3.rowspan || node3.colspan || node3.align) {
|
307602
307619
|
state.write("cellx(");
|
307603
307620
|
if (node3.rowspan) {
|
307604
307621
|
state.write(`rowspan: ${node3.rowspan}, `);
|
@@ -307606,6 +307623,9 @@ var tableCellHandler = (node3, state) => {
|
|
307606
307623
|
if (node3.colspan) {
|
307607
307624
|
state.write(`colspan: ${node3.colspan}, `);
|
307608
307625
|
}
|
307626
|
+
if (node3.align) {
|
307627
|
+
state.write(`align: ${node3.align}, `);
|
307628
|
+
}
|
307609
307629
|
state.write(")");
|
307610
307630
|
}
|
307611
307631
|
state.write("[\n");
|
@@ -308040,6 +308060,28 @@ ${node3.value}
|
|
308040
308060
|
state.renderChildren(node3);
|
308041
308061
|
state.write("]");
|
308042
308062
|
state.ensureNewLine();
|
308063
|
+
},
|
308064
|
+
card(node3, state) {
|
308065
|
+
var _a6;
|
308066
|
+
if (node3.url) {
|
308067
|
+
(_a6 = node3.children) === null || _a6 === void 0 ? void 0 : _a6.push({ type: "paragraph", children: [{ type: "text", value: node3.url }] });
|
308068
|
+
}
|
308069
|
+
state.renderChildren(node3);
|
308070
|
+
state.ensureNewLine();
|
308071
|
+
state.write("\n");
|
308072
|
+
},
|
308073
|
+
cardTitle(node3, state) {
|
308074
|
+
state.write("*");
|
308075
|
+
state.renderChildren(node3);
|
308076
|
+
state.write("*");
|
308077
|
+
state.ensureNewLine();
|
308078
|
+
state.write("\n");
|
308079
|
+
},
|
308080
|
+
root(node3, state) {
|
308081
|
+
state.renderChildren(node3);
|
308082
|
+
},
|
308083
|
+
footer() {
|
308084
|
+
return;
|
308043
308085
|
}
|
308044
308086
|
};
|
308045
308087
|
var TypstSerializer = class {
|
@@ -308243,8 +308285,12 @@ async function localArticleToTypstRaw(session, templateOptions, opts) {
|
|
308243
308285
|
const { dir, name: name3, ext: ext2 } = import_node_path45.default.parse(output2);
|
308244
308286
|
let includeContent = "";
|
308245
308287
|
let fileInd = 0;
|
308288
|
+
let addPageBreak = false;
|
308246
308289
|
articles.forEach((article) => {
|
308247
308290
|
var _a6, _b, _c, _d2;
|
308291
|
+
if (addPageBreak)
|
308292
|
+
includeContent += "#pagebreak()\n\n";
|
308293
|
+
addPageBreak = false;
|
308248
308294
|
if (article.file) {
|
308249
308295
|
const base5 = `${name3}-${(_b = (_a6 = content3[fileInd]) === null || _a6 === void 0 ? void 0 : _a6.slug) !== null && _b !== void 0 ? _b : fileInd}${ext2}`;
|
308250
308296
|
const includeFile = import_node_path45.default.format({ dir, ext: ext2, base: base5 });
|
@@ -308260,6 +308306,7 @@ async function localArticleToTypstRaw(session, templateOptions, opts) {
|
|
308260
308306
|
|
308261
308307
|
`;
|
308262
308308
|
fileInd++;
|
308309
|
+
addPageBreak = true;
|
308263
308310
|
} else if (article.title) {
|
308264
308311
|
includeContent += `${titleToTypstHeading(session, article.title, article.level)}
|
308265
308312
|
|
@@ -308268,6 +308315,7 @@ async function localArticleToTypstRaw(session, templateOptions, opts) {
|
|
308268
308315
|
});
|
308269
308316
|
writeFileToFolder(output2, includeContent);
|
308270
308317
|
}
|
308318
|
+
await runTypstExecutable(session, output2);
|
308271
308319
|
return { tempFolders: [] };
|
308272
308320
|
}
|
308273
308321
|
async function localArticleToTypstTemplated(session, file, templateOptions, opts) {
|
@@ -308351,8 +308399,12 @@ async function localArticleToTypstTemplated(session, file, templateOptions, opts
|
|
308351
308399
|
const { dir, name: name3, ext: ext2 } = import_node_path45.default.parse(output2);
|
308352
308400
|
typstContent = "";
|
308353
308401
|
let fileInd = 0;
|
308402
|
+
let addPageBreak = false;
|
308354
308403
|
articles.forEach((article) => {
|
308355
308404
|
var _a7, _b, _c, _d2;
|
308405
|
+
if (addPageBreak)
|
308406
|
+
typstContent += "#pagebreak()\n\n";
|
308407
|
+
addPageBreak = false;
|
308356
308408
|
if (article.file) {
|
308357
308409
|
const base5 = `${name3}-${(_b = (_a7 = content3[fileInd]) === null || _a7 === void 0 ? void 0 : _a7.slug) !== null && _b !== void 0 ? _b : fileInd}${ext2}`;
|
308358
308410
|
const includeFile = import_node_path45.default.format({ dir, ext: ext2, base: base5 });
|
@@ -308371,6 +308423,7 @@ ${part}${results[fileInd].value}`);
|
|
308371
308423
|
|
308372
308424
|
`;
|
308373
308425
|
fileInd++;
|
308426
|
+
addPageBreak = true;
|
308374
308427
|
} else if (article.title) {
|
308375
308428
|
typstContent += `${titleToTypstHeading(session, article.title, article.level)}
|
308376
308429
|
|
@@ -332138,7 +332191,7 @@ var Session = class {
|
|
332138
332191
|
}).catch(() => null);
|
332139
332192
|
}
|
332140
332193
|
showUpgradeNotice() {
|
332141
|
-
if (this._shownUpgrade || !this._latestVersion || version_default2 === this._latestVersion)
|
332194
|
+
if (this._shownUpgrade || !this._latestVersion || version_default2 === this._latestVersion || isWhiteLabelled())
|
332142
332195
|
return;
|
332143
332196
|
this.log.info(logUpdateAvailable({
|
332144
332197
|
current: version_default2,
|
mystmd-1.3.16.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=IQOqY_fcYOdNSRruV-BZBl--dd0uDcXF6vyzBY4GEEw,13159130
|
4
|
-
mystmd_py/nodeenv.py,sha256=8KER0P-WIXM2MsRJF4vcedBKscGoc26lJKojbkDxjbg,2447
|
5
|
-
mystmd-1.3.16.dist-info/METADATA,sha256=QoYn52IMHLinEFHlvwWYigSqVXicPaTeJFxldrdZ7lY,3020
|
6
|
-
mystmd-1.3.16.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
|
7
|
-
mystmd-1.3.16.dist-info/entry_points.txt,sha256=eC2ol2gqS2q5E-ktkMrBSvV0tckGUcNGS-c4hEQ-_V4,45
|
8
|
-
mystmd-1.3.16.dist-info/licenses/LICENSE,sha256=4BcikqvulW5nh_MxaocO-lC7ydIX23dMbcqtNTUSxr4,1082
|
9
|
-
mystmd-1.3.16.dist-info/RECORD,,
|
File without changes
|
File without changes
|