@optique/core 1.3.0-dev.2538 → 1.3.0-dev.2540
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/doc.cjs +3 -3
- package/dist/doc.js +3 -3
- package/package.json +2 -2
package/dist/doc.cjs
CHANGED
|
@@ -323,9 +323,9 @@ function formatDocPage(programName, page, options = {}) {
|
|
|
323
323
|
}, options.theme))].map((token) => token.width)) : 0;
|
|
324
324
|
const usageMin = page.usage != null && showUsage ? usageLabelWidth + Math.max(programNameWidth, Math.min(maxVisibleAtomicWidth(page.usage, options.theme), programNameWidth + usageLabelWidth)) : 1;
|
|
325
325
|
let sectionMin = 1;
|
|
326
|
-
if (hasContent(page.examples)) sectionMin = Math.max(sectionMin,
|
|
327
|
-
if (hasContent(page.author)) sectionMin = Math.max(sectionMin,
|
|
328
|
-
if (hasContent(page.bugs)) sectionMin = Math.max(sectionMin,
|
|
326
|
+
if (hasContent(page.examples)) sectionMin = Math.max(sectionMin, ...label("Examples:", "examples").split("\n").map((line) => require_displaywidth.getDisplayWidth(line)));
|
|
327
|
+
if (hasContent(page.author)) sectionMin = Math.max(sectionMin, ...label("Author:", "author").split("\n").map((line) => require_displaywidth.getDisplayWidth(line)));
|
|
328
|
+
if (hasContent(page.bugs)) sectionMin = Math.max(sectionMin, ...label("Bugs:", "bugs").split("\n").map((line) => require_displaywidth.getDisplayWidth(line)));
|
|
329
329
|
const minWidth = Math.max(entryMin, usageMin, sectionMin);
|
|
330
330
|
if (options.maxWidth < minWidth) throw new RangeError(`maxWidth must be at least ${minWidth}, got ${options.maxWidth}.`);
|
|
331
331
|
if (needsDescColumn && minDescWidth > 1) {
|
package/dist/doc.js
CHANGED
|
@@ -323,9 +323,9 @@ function formatDocPage(programName, page, options = {}) {
|
|
|
323
323
|
}, options.theme))].map((token) => token.width)) : 0;
|
|
324
324
|
const usageMin = page.usage != null && showUsage ? usageLabelWidth + Math.max(programNameWidth, Math.min(maxVisibleAtomicWidth(page.usage, options.theme), programNameWidth + usageLabelWidth)) : 1;
|
|
325
325
|
let sectionMin = 1;
|
|
326
|
-
if (hasContent(page.examples)) sectionMin = Math.max(sectionMin,
|
|
327
|
-
if (hasContent(page.author)) sectionMin = Math.max(sectionMin,
|
|
328
|
-
if (hasContent(page.bugs)) sectionMin = Math.max(sectionMin,
|
|
326
|
+
if (hasContent(page.examples)) sectionMin = Math.max(sectionMin, ...label("Examples:", "examples").split("\n").map((line) => getDisplayWidth(line)));
|
|
327
|
+
if (hasContent(page.author)) sectionMin = Math.max(sectionMin, ...label("Author:", "author").split("\n").map((line) => getDisplayWidth(line)));
|
|
328
|
+
if (hasContent(page.bugs)) sectionMin = Math.max(sectionMin, ...label("Bugs:", "bugs").split("\n").map((line) => getDisplayWidth(line)));
|
|
329
329
|
const minWidth = Math.max(entryMin, usageMin, sectionMin);
|
|
330
330
|
if (options.maxWidth < minWidth) throw new RangeError(`maxWidth must be at least ${minWidth}, got ${options.maxWidth}.`);
|
|
331
331
|
if (needsDescColumn && minDescWidth > 1) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@optique/core",
|
|
3
|
-
"version": "1.3.0-dev.
|
|
3
|
+
"version": "1.3.0-dev.2540",
|
|
4
4
|
"description": "Type-safe combinatorial command-line interface parser",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"CLI",
|
|
@@ -237,7 +237,7 @@
|
|
|
237
237
|
},
|
|
238
238
|
"sideEffects": false,
|
|
239
239
|
"devDependencies": {
|
|
240
|
-
"@optique/env": "1.3.0-dev.
|
|
240
|
+
"@optique/env": "1.3.0-dev.2540+a24fec00",
|
|
241
241
|
"@types/node": "^24.0.0",
|
|
242
242
|
"fast-check": "^4.7.0",
|
|
243
243
|
"tsdown": "^0.13.0",
|