@angadie/chittie-react 0.1.1 → 0.2.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/index.mjs +3 -3
  2. package/package.json +3 -3
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Children, Fragment, isValidElement } from "react";
2
- import { needsRaster, padTo8, rasterizeRow, smartText } from "@angadie/chittie-text";
2
+ import { foldTypographic, needsRaster, padTo8, rasterizeRow, smartText } from "@angadie/chittie-text";
3
3
  import ReceiptPrinterEncoder from "@angadie/chittie-core";
4
4
  //#region src/components.ts
5
5
  /**
@@ -48,8 +48,8 @@ const Text = printable((e, p, ctx) => {
48
48
  if (p.align) e.align("left");
49
49
  });
50
50
  const Row = printable((e, p, ctx) => {
51
- const left = toText(p.left);
52
- const right = toText(p.right);
51
+ const left = foldTypographic(toText(p.left));
52
+ const right = foldTypographic(toText(p.right));
53
53
  if (needsRaster(left, ctx.codepage) || needsRaster(right, ctx.codepage)) {
54
54
  if (!ctx.rasterizer) throw new Error("chittie: <Row> contains non-encodable text (e.g. Sinhala/Tamil). Pass a rasterizer to render(), or use code-page text.");
55
55
  const img = rasterizeRow(ctx.rasterizer, left, right, { dotWidth: ctx.dotWidth });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angadie/chittie-react",
3
- "version": "0.1.1",
3
+ "version": "0.2.0",
4
4
  "description": "Pure JSX receipt authoring → ESC/POS bytes. RN-safe (no react-dom, no HTML host elements). Renders onto chittie-core.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -15,8 +15,8 @@
15
15
  "dist"
16
16
  ],
17
17
  "dependencies": {
18
- "@angadie/chittie-core": "0.1.1",
19
- "@angadie/chittie-text": "0.1.1"
18
+ "@angadie/chittie-core": "0.2.0",
19
+ "@angadie/chittie-text": "0.2.0"
20
20
  },
21
21
  "peerDependencies": {
22
22
  "react": "^18 || ^19"