@haklex/rich-litexml-cli 0.35.0 → 0.36.0

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.
Files changed (2) hide show
  1. package/dist/cli.mjs +19 -4
  2. package/package.json +5 -5
package/dist/cli.mjs CHANGED
@@ -23583,10 +23583,10 @@ function registerBuiltinReaders(registry) {
23583
23583
  }));
23584
23584
  }
23585
23585
  //#endregion
23586
- //#region ../../node_modules/.pnpm/nanoid@6.0.0/node_modules/nanoid/url-alphabet/index.js
23586
+ //#region ../../node_modules/.pnpm/nanoid@6.0.1/node_modules/nanoid/url-alphabet/index.js
23587
23587
  var urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
23588
23588
  //#endregion
23589
- //#region ../../node_modules/.pnpm/nanoid@6.0.0/node_modules/nanoid/index.js
23589
+ //#region ../../node_modules/.pnpm/nanoid@6.0.1/node_modules/nanoid/index.js
23590
23590
  var GET_RANDOM_LIMIT = 65536;
23591
23591
  function fillRandom(buffer) {
23592
23592
  let from = 0;
@@ -23636,7 +23636,7 @@ function customRandom(alphabet, defaultSize, getRandom) {
23636
23636
  }
23637
23637
  var POOL_MAX = GET_RANDOM_LIMIT / 2;
23638
23638
  function customAlphabet(alphabet, defaultSize = 21) {
23639
- if (typeof alphabet !== "string" || !alphabet.length || alphabet.length > 256) return customRandom(alphabet, defaultSize, random);
23639
+ if (typeof alphabet !== "string" || !alphabet || alphabet.length > 256) return customRandom(alphabet, defaultSize, random);
23640
23640
  for (let i = 0; i < alphabet.length; i++) if (alphabet.charCodeAt(i) > 255) return customRandom(alphabet, defaultSize, random);
23641
23641
  let charCodes = Uint8Array.from(alphabet, (str) => {
23642
23642
  return str.charCodeAt(0);
@@ -23704,6 +23704,19 @@ function imageDisplayWidthAttr(el) {
23704
23704
  const v = numAttr(el, "display-width");
23705
23705
  return v !== void 0 && Number.isFinite(v) && v >= 10 && v <= 100 ? v : void 0;
23706
23706
  }
23707
+ function imageFixedPxAttr(el, name) {
23708
+ const v = numAttr(el, name);
23709
+ return v !== void 0 && Number.isFinite(v) && v > 0 ? Math.round(v) : void 0;
23710
+ }
23711
+ function exclusiveImageDisplayAttrs(el) {
23712
+ const displayWidth = imageDisplayWidthAttr(el);
23713
+ if (displayWidth !== void 0) return { displayWidth };
23714
+ const fixedWidth = imageFixedPxAttr(el, "fixed-width");
23715
+ if (fixedWidth !== void 0) return { fixedWidth };
23716
+ const fixedHeight = imageFixedPxAttr(el, "fixed-height");
23717
+ if (fixedHeight !== void 0) return { fixedHeight };
23718
+ return {};
23719
+ }
23707
23720
  function imageLayoutAttr(el) {
23708
23721
  const v = el.getAttribute("layout");
23709
23722
  return v !== null && IMAGE_LAYOUTS.has(v) ? v : void 0;
@@ -23756,7 +23769,7 @@ function registerCustomReaders(registry) {
23756
23769
  caption: el.getAttribute("caption") ?? void 0,
23757
23770
  thumbhash: el.getAttribute("thumbhash") ?? void 0,
23758
23771
  accent: el.getAttribute("accent") ?? void 0,
23759
- displayWidth: imageDisplayWidthAttr(el),
23772
+ ...exclusiveImageDisplayAttrs(el),
23760
23773
  layout: imageLayoutAttr(el),
23761
23774
  version: 1
23762
23775
  };
@@ -24237,6 +24250,8 @@ function registerCustomWriters(registry) {
24237
24250
  "thumbhash": n.thumbhash,
24238
24251
  "accent": n.accent,
24239
24252
  "display-width": n.displayWidth != null ? String(n.displayWidth) : void 0,
24253
+ "fixed-width": n.fixedWidth != null ? String(n.fixedWidth) : void 0,
24254
+ "fixed-height": n.fixedHeight != null ? String(n.fixedHeight) : void 0,
24240
24255
  "layout": n.layout
24241
24256
  }),
24242
24257
  selfClosing: true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haklex/rich-litexml-cli",
3
- "version": "0.35.0",
3
+ "version": "0.36.0",
4
4
  "description": "Unified CLI for haklex LiteXML: convert LiteXML or Lexical JSON to HTML, JSON, or Markdown.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -18,14 +18,14 @@
18
18
  "dependencies": {
19
19
  "@lexical/headless": "^0.49.0",
20
20
  "lexical": "^0.49.0",
21
- "@haklex/rich-compose": "0.35.0",
22
- "@haklex/rich-headless": "0.35.0",
23
- "@haklex/rich-litexml": "0.35.0"
21
+ "@haklex/rich-compose": "0.36.0",
22
+ "@haklex/rich-headless": "0.36.0",
23
+ "@haklex/rich-litexml": "0.36.0"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@types/node": "26.1.0",
27
27
  "typescript": "^7.0.2",
28
- "vite": "^8.2.0",
28
+ "vite": "^8.2.1",
29
29
  "vitest": "^4.1.10"
30
30
  },
31
31
  "publishConfig": {