@haklex/rich-litexml 0.0.110 → 0.1.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.
package/dist/index.mjs CHANGED
@@ -254,9 +254,11 @@ function registerCustomReaders(registry) {
254
254
  version: 1
255
255
  };
256
256
  }
257
+ const color = el.getAttribute("color");
257
258
  return {
258
259
  type: "katex-inline",
259
260
  equation: el.textContent ?? "",
261
+ ...color ? { color } : {},
260
262
  version: 1
261
263
  };
262
264
  });
@@ -700,8 +702,11 @@ function registerCustomWriters(registry) {
700
702
  });
701
703
  registry.registerWriter("katex-inline", (node) => {
702
704
  const n = node;
705
+ const attrs = {};
706
+ if (n.color) attrs.color = n.color;
703
707
  return {
704
708
  tag: "math",
709
+ attrs: Object.keys(attrs).length > 0 ? attrs : void 0,
705
710
  children: [n.equation ?? ""]
706
711
  };
707
712
  });
@@ -1 +1 @@
1
- {"version":3,"file":"custom.d.ts","sourceRoot":"","sources":["../../src/readers/custom.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AA6BnD,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,eAAe,GAAG,IAAI,CA2XrE"}
1
+ {"version":3,"file":"custom.d.ts","sourceRoot":"","sources":["../../src/readers/custom.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AA6BnD,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,eAAe,GAAG,IAAI,CA6XrE"}
@@ -1 +1 @@
1
- {"version":3,"file":"custom.d.ts","sourceRoot":"","sources":["../../src/writers/custom.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAenD,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,eAAe,GAAG,IAAI,CAsQrE"}
1
+ {"version":3,"file":"custom.d.ts","sourceRoot":"","sources":["../../src/writers/custom.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAenD,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,eAAe,GAAG,IAAI,CAyQrE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haklex/rich-litexml",
3
- "version": "0.0.110",
3
+ "version": "0.1.0",
4
4
  "description": "Bidirectional Lexical SerializedNode <-> XML conversion with plugin registry",
5
5
  "repository": {
6
6
  "type": "git",