{"_id":"@angadie/chittie-label","_rev":"7-b5a787787aea61f680a9f686c13f23f0","name":"@angadie/chittie-label","dist-tags":{"latest":"0.6.4"},"versions":{"0.4.0":{"name":"@angadie/chittie-label","version":"0.4.0","license":"MIT","_id":"@angadie/chittie-label@0.4.0","maintainers":[{"name":"octalpixel","email":"mithushancj@gmail.com"}],"dist":{"shasum":"204d4319ea02f5171d6e9d4030b9046d32c9ec6b","tarball":"https://registry.npmjs.org/@angadie/chittie-label/-/chittie-label-0.4.0.tgz","fileCount":5,"integrity":"sha512-ljYuGjLQyaVPCfyI+/GxEOiWmQBjdpQi16rzcffRCgrF8hd1ahWpWLvKwyBhV54IGZ000aa5XtiPB2ry/cvp8Q==","signatures":[{"sig":"MEUCIA0wYaD/N7RCLjyGUwjUKbu8QJa/XVLLMzBXyfxJMoqpAiEAvHf4LWDQXZQQQeD7/AGnqJhsObr8N0ywGexQv/roSRc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16483},"type":"module","_from":"file:angadie-chittie-label-0.4.0.tgz","types":"./dist/index.d.mts","exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs"}},"scripts":{"test":"tsx spikes/label.spike.ts","build":"tsdown","typecheck":"tsc --noEmit"},"_npmUser":{"name":"octalpixel","email":"mithushancj@gmail.com"},"_resolved":"/private/var/folders/j5/7dkmn95d0_9b5fdnfsmpjs580000gn/T/ebb505731d4128a08db4125dcedc3cea/angadie-chittie-label-0.4.0.tgz","_integrity":"sha512-ljYuGjLQyaVPCfyI+/GxEOiWmQBjdpQi16rzcffRCgrF8hd1ahWpWLvKwyBhV54IGZ000aa5XtiPB2ry/cvp8Q==","_npmVersion":"10.9.7","description":"TSPL label/tag printing for chittie — barcodes, QR, text, boxes, and rasterized images (incl. non-Latin) on coordinate-positioned labels. Universal (web/RN/node), Buffer-free.","directories":{},"_nodeVersion":"22.22.2","dependencies":{"@angadie/chittie-text":"0.4.0","@angadie/chittie-codepage":"0.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@canvas/image-data":"^1.1.0"},"_npmOperationalInternal":{"tmp":"tmp/chittie-label_0.4.0_1782239456280_0.5231117457865264","host":"s3://npm-registry-packages-npm-production"}},"0.5.0":{"name":"@angadie/chittie-label","version":"0.5.0","license":"MIT","_id":"@angadie/chittie-label@0.5.0","maintainers":[{"name":"octalpixel","email":"mithushancj@gmail.com"}],"dist":{"shasum":"91b22e2739e6ef523f960fdb3af34355384a4a08","tarball":"https://registry.npmjs.org/@angadie/chittie-label/-/chittie-label-0.5.0.tgz","fileCount":5,"integrity":"sha512-EhgG8F8ogZgRtWv8P4YZARCb9GIWGtnoTcfPGOjz7g1QWGGfPYh8Yp4NcG5a3gNKgA8smDuOuvbz6xJjkDrpjw==","signatures":[{"sig":"MEYCIQDauvx3DVUHrTCK1dalcXZ7TSP9DqrTmakMP2LRlHirVAIhAJeLk4+GNXdWZvrmqChyJVhPA4BWFlnLu49SFII+xI4y","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16577},"type":"module","_from":"file:angadie-chittie-label-0.5.0.tgz","types":"./dist/index.d.mts","exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs"}},"scripts":{"test":"tsx spikes/label.spike.ts","build":"tsdown","typecheck":"tsc --noEmit"},"_npmUser":{"name":"octalpixel","email":"mithushancj@gmail.com"},"_resolved":"/private/var/folders/j5/7dkmn95d0_9b5fdnfsmpjs580000gn/T/10d0c0ddcafc8eb48362b22203632bb6/angadie-chittie-label-0.5.0.tgz","_integrity":"sha512-EhgG8F8ogZgRtWv8P4YZARCb9GIWGtnoTcfPGOjz7g1QWGGfPYh8Yp4NcG5a3gNKgA8smDuOuvbz6xJjkDrpjw==","_npmVersion":"10.9.7","description":"TSPL label/tag printing for chittie — barcodes, QR, text, boxes, and rasterized images (incl. non-Latin) on coordinate-positioned labels. Universal (web/RN/node), Buffer-free.","directories":{},"_nodeVersion":"22.22.2","dependencies":{"@angadie/chittie-text":"0.5.0","@angadie/chittie-codepage":"0.5.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@canvas/image-data":"^1.1.0"},"_npmOperationalInternal":{"tmp":"tmp/chittie-label_0.5.0_1782240874581_0.8344526302653721","host":"s3://npm-registry-packages-npm-production"}},"0.6.0":{"name":"@angadie/chittie-label","version":"0.6.0","license":"MIT","_id":"@angadie/chittie-label@0.6.0","maintainers":[{"name":"octalpixel","email":"mithushancj@gmail.com"}],"dist":{"shasum":"7214cfd57ddc955639d8324d909d8981ba842df7","tarball":"https://registry.npmjs.org/@angadie/chittie-label/-/chittie-label-0.6.0.tgz","fileCount":5,"integrity":"sha512-F7sFML4qhOLV4aS65AyzIx0jklmMlkV7zRIV/bz3E4+KuxLQ7g0nZfUS7ppO4OpwCSqLe67UdHjOaFin/L9MdQ==","signatures":[{"sig":"MEUCIQCGg0lDG8F0KjNKy22dMnkRJMGnn6+p7GaRtzefFWfzDgIgf4XefPYBG9XJ3Xv4ozq70xmg2Ynx1MJUnXRycgtyvlw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16795},"type":"module","_from":"file:angadie-chittie-label-0.6.0.tgz","types":"./dist/index.d.mts","exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs"}},"scripts":{"test":"tsx spikes/label.spike.ts","build":"tsdown","typecheck":"tsc --noEmit"},"_npmUser":{"name":"octalpixel","email":"mithushancj@gmail.com"},"_resolved":"/private/var/folders/j5/7dkmn95d0_9b5fdnfsmpjs580000gn/T/25b5f046cc1a0ecd6bd099a4596cf221/angadie-chittie-label-0.6.0.tgz","_integrity":"sha512-F7sFML4qhOLV4aS65AyzIx0jklmMlkV7zRIV/bz3E4+KuxLQ7g0nZfUS7ppO4OpwCSqLe67UdHjOaFin/L9MdQ==","_npmVersion":"10.9.7","description":"TSPL label/tag printing for chittie — barcodes, QR, text, boxes, and rasterized images (incl. non-Latin) on coordinate-positioned labels. Universal (web/RN/node), Buffer-free.","directories":{},"_nodeVersion":"22.22.2","dependencies":{"@angadie/chittie-text":"0.6.0","@angadie/chittie-codepage":"0.5.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@canvas/image-data":"^1.1.0"},"_npmOperationalInternal":{"tmp":"tmp/chittie-label_0.6.0_1782302954656_0.43184111077777687","host":"s3://npm-registry-packages-npm-production"}},"0.6.1":{"name":"@angadie/chittie-label","version":"0.6.1","license":"MIT","_id":"@angadie/chittie-label@0.6.1","maintainers":[{"name":"octalpixel","email":"mithushancj@gmail.com"}],"dist":{"shasum":"1da63d0d57168ec366bb2d0c4e8dfc87c5ba2194","tarball":"https://registry.npmjs.org/@angadie/chittie-label/-/chittie-label-0.6.1.tgz","fileCount":5,"integrity":"sha512-p3Ltc7seQDKFi+nm1bfQ76ipeyAsLf9UH9rOJTZpXCOm6cLqDea2Sg6f3ynly2aRn23g+PIkPTEbhki8ozSTuA==","signatures":[{"sig":"MEUCIQC6Ohj4B0PNBaFgYzMDXSNV8F32/YYm3SU0nUOEOCXaZQIgLxvfNC2kCuyUjhTgCl71OZDI+RYaU9R33tSJLC8uTUs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16795},"type":"module","_from":"file:angadie-chittie-label-0.6.1.tgz","types":"./dist/index.d.mts","exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs"}},"scripts":{"test":"tsx spikes/label.spike.ts","build":"tsdown","typecheck":"tsc --noEmit"},"_npmUser":{"name":"octalpixel","email":"mithushancj@gmail.com"},"_resolved":"/private/var/folders/j5/7dkmn95d0_9b5fdnfsmpjs580000gn/T/41ab34344b7a303b9d0f10cbac9642bc/angadie-chittie-label-0.6.1.tgz","_integrity":"sha512-p3Ltc7seQDKFi+nm1bfQ76ipeyAsLf9UH9rOJTZpXCOm6cLqDea2Sg6f3ynly2aRn23g+PIkPTEbhki8ozSTuA==","_npmVersion":"10.9.7","description":"TSPL label/tag printing for chittie — barcodes, QR, text, boxes, and rasterized images (incl. non-Latin) on coordinate-positioned labels. Universal (web/RN/node), Buffer-free.","directories":{},"_nodeVersion":"22.22.2","dependencies":{"@angadie/chittie-text":"0.7.0","@angadie/chittie-codepage":"0.5.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@canvas/image-data":"^1.1.0"},"_npmOperationalInternal":{"tmp":"tmp/chittie-label_0.6.1_1782323110485_0.8501277096853659","host":"s3://npm-registry-packages-npm-production"}},"0.6.2":{"name":"@angadie/chittie-label","version":"0.6.2","license":"MIT","_id":"@angadie/chittie-label@0.6.2","maintainers":[{"name":"octalpixel","email":"mithushancj@gmail.com"}],"dist":{"shasum":"1d7007a7886537a823d5eb5436eeff3863c050ca","tarball":"https://registry.npmjs.org/@angadie/chittie-label/-/chittie-label-0.6.2.tgz","fileCount":5,"integrity":"sha512-YGg5Dl3vwaVVSFbSJJ99ZCYQ6HjpYmj8wLJigC3SNPDQ85yZjTCbA/NZtLHntnwoKTNWErvw8ONWBBQTHH6CIw==","signatures":[{"sig":"MEYCIQDKCwKyIKabNtvvdNglrqCQfTYkQ+k1lNUVOF4SZ2Dk/gIhAI1ad0RG+qylwrltNKI6urwT4GgOt7jZ0Mgn6lfc2/Xw","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16795},"type":"module","_from":"file:angadie-chittie-label-0.6.2.tgz","types":"./dist/index.d.mts","exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs"}},"scripts":{"test":"tsx spikes/label.spike.ts","build":"tsdown","typecheck":"tsc --noEmit"},"_npmUser":{"name":"octalpixel","email":"mithushancj@gmail.com"},"_resolved":"/private/var/folders/j5/7dkmn95d0_9b5fdnfsmpjs580000gn/T/41b08e7e4467db8b5fe3f5e3f3800fce/angadie-chittie-label-0.6.2.tgz","_integrity":"sha512-YGg5Dl3vwaVVSFbSJJ99ZCYQ6HjpYmj8wLJigC3SNPDQ85yZjTCbA/NZtLHntnwoKTNWErvw8ONWBBQTHH6CIw==","_npmVersion":"10.9.7","description":"TSPL label/tag printing for chittie — barcodes, QR, text, boxes, and rasterized images (incl. non-Latin) on coordinate-positioned labels. Universal (web/RN/node), Buffer-free.","directories":{},"_nodeVersion":"22.22.2","dependencies":{"@angadie/chittie-text":"0.8.0","@angadie/chittie-codepage":"0.5.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@canvas/image-data":"^1.1.0"},"_npmOperationalInternal":{"tmp":"tmp/chittie-label_0.6.2_1782372106077_0.6141614384293264","host":"s3://npm-registry-packages-npm-production"}},"0.6.3":{"name":"@angadie/chittie-label","version":"0.6.3","license":"MIT","_id":"@angadie/chittie-label@0.6.3","maintainers":[{"name":"octalpixel","email":"mithushancj@gmail.com"}],"dist":{"shasum":"a4c70b77cead73af6cd64f7c1a571ab7d1addc50","tarball":"https://registry.npmjs.org/@angadie/chittie-label/-/chittie-label-0.6.3.tgz","fileCount":5,"integrity":"sha512-KjnwX1nzWZnw+rAHJmNqy7rOO/DE8AW2uScxB1w/Ks57qOVWl294ImrWkTSYuRTTp0OzMvq+SSXblYtwwYFaJQ==","signatures":[{"sig":"MEUCIEh2srPmhogf8ySU7XB1fDfDth0wqKzNNOsusqqaEXNoAiEAlKkeI0c7l+4m23PYQRTmdEi+1b5qcS9yLRCJat3MSl4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16832},"type":"module","_from":"file:angadie-chittie-label-0.6.3.tgz","types":"./dist/index.d.mts","exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs","default":"./dist/index.mjs"}},"scripts":{"test":"tsx spikes/label.spike.ts","build":"tsdown","typecheck":"tsc --noEmit"},"_npmUser":{"name":"octalpixel","email":"mithushancj@gmail.com"},"_resolved":"/private/var/folders/j5/7dkmn95d0_9b5fdnfsmpjs580000gn/T/135ce854ffbb9a9c180dab0dfba334e9/angadie-chittie-label-0.6.3.tgz","_integrity":"sha512-KjnwX1nzWZnw+rAHJmNqy7rOO/DE8AW2uScxB1w/Ks57qOVWl294ImrWkTSYuRTTp0OzMvq+SSXblYtwwYFaJQ==","_npmVersion":"10.9.7","description":"TSPL label/tag printing for chittie — barcodes, QR, text, boxes, and rasterized images (incl. non-Latin) on coordinate-positioned labels. Universal (web/RN/node), Buffer-free.","directories":{},"_nodeVersion":"22.22.2","dependencies":{"@angadie/chittie-text":"0.8.1","@angadie/chittie-codepage":"0.5.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@canvas/image-data":"^1.1.0"},"_npmOperationalInternal":{"tmp":"tmp/chittie-label_0.6.3_1782463010788_0.5577445947478725","host":"s3://npm-registry-packages-npm-production"}},"0.6.4":{"name":"@angadie/chittie-label","version":"0.6.4","description":"TSPL label/tag printing for chittie — barcodes, QR, text, boxes, and rasterized images (incl. non-Latin) on coordinate-positioned labels. Universal (web/RN/node), Buffer-free.","license":"MIT","type":"module","types":"./dist/index.d.mts","exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs","default":"./dist/index.mjs"}},"dependencies":{"@angadie/chittie-codepage":"0.5.1","@angadie/chittie-text":"0.9.0"},"devDependencies":{"@canvas/image-data":"^1.1.0"},"publishConfig":{"access":"public"},"scripts":{"build":"tsdown","typecheck":"tsc --noEmit","test":"tsx spikes/label.spike.ts"},"_id":"@angadie/chittie-label@0.6.4","_integrity":"sha512-4ce3JKnwW9WHYVOwGAQ9QzeKh29+Bgp99vpRzyw6oqn4WRS+iLZPMUATiEeYvaHAmJFQN++mug+PjamE/oWq8A==","_resolved":"/private/var/folders/j5/7dkmn95d0_9b5fdnfsmpjs580000gn/T/19d388e89d81d2baecbd6016b73a277f/angadie-chittie-label-0.6.4.tgz","_from":"file:angadie-chittie-label-0.6.4.tgz","_nodeVersion":"22.22.2","_npmVersion":"10.9.7","dist":{"integrity":"sha512-4ce3JKnwW9WHYVOwGAQ9QzeKh29+Bgp99vpRzyw6oqn4WRS+iLZPMUATiEeYvaHAmJFQN++mug+PjamE/oWq8A==","shasum":"49553a6d77bd91e32bf158e751b7c595d4693470","tarball":"https://registry.npmjs.org/@angadie/chittie-label/-/chittie-label-0.6.4.tgz","fileCount":5,"unpackedSize":16832,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDFo+cBdwcZvktwgI8KfkdBUHKX7+q264m55Wks94monwIgYOiMX9igTuRlLr50HVks3lEtCmXeF1i9mb7DUfACVos="}]},"_npmUser":{"name":"octalpixel","email":"mithushancj@gmail.com"},"directories":{},"maintainers":[{"name":"octalpixel","email":"mithushancj@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/chittie-label_0.6.4_1787125174819_0.3482036556625121"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-23T18:30:56.087Z","modified":"2026-08-19T07:39:35.177Z","0.4.0":"2026-06-23T18:30:56.429Z","0.5.0":"2026-06-23T18:54:34.752Z","0.6.0":"2026-06-24T12:09:14.811Z","0.6.1":"2026-06-24T17:45:10.624Z","0.6.2":"2026-06-25T07:21:46.212Z","0.6.3":"2026-06-26T08:36:50.920Z","0.6.4":"2026-08-19T07:39:35.019Z"},"license":"MIT","description":"TSPL label/tag printing for chittie — barcodes, QR, text, boxes, and rasterized images (incl. non-Latin) on coordinate-positioned labels. Universal (web/RN/node), Buffer-free.","maintainers":[{"name":"octalpixel","email":"mithushancj@gmail.com"}],"readme":"# @angadie/chittie-label\n\n**TSPL label & tag printing for chittie** — barcodes, QR, text, boxes, and rasterized\nimages (including non-Latin scripts) on coordinate-positioned labels. Universal\n(web / React Native / Node), Buffer-free.\n\nchittie's receipt packages speak **ESC/POS** (line-flow receipts). Label printers —\nfashion price tags, jewellery tags, shelf labels — speak **TSPL** (TSC/Zebra/Gprinter\nand most cheap label printers), which is **coordinate-based**: you place each element at\nan `(x, y)` in dots. This package builds correct TSPL byte streams from a small builder.\n\n```bash\nnpm i @angadie/chittie-label\n```\n\n## Quick start — a garment price tag\n\n```ts\nimport { label, LABEL_PROFILES } from '@angadie/chittie-label';\n\nconst b = label({ ...LABEL_PROFILES['40x30'], density: 8, speed: 4 }); // 40×30mm @203dpi\nconst bytes = b\n  .box(0, 0, b.mm(40), b.mm(30), 2)                       // border\n  .text(b.mm(2), b.mm(2), 'ARTISAN HAUS', { font: '3' })  // brand slot\n  .text(b.mm(2), b.mm(9), 'Rs. 4,500', { font: '4', xMul: 2, yMul: 2 }) // price slot\n  .barcode(b.mm(2), b.mm(16), '4791234567890', { type: 'ean13', height: 50 }) // barcode slot\n  .qrcode(b.mm(28), b.mm(2), 'https://shop.lk/p/SKU123', { cell: 4 })         // QR slot\n  .encode({ copies: 2 });\n\n// bytes : Uint8Array — send via any chittie transport (Web Serial / BLE / Tauri / TCP)\n```\n\n## Design slots\n\nTSPL is positional, so a \"slot\" is just a positioned element. Put coordinates in **dots**\n(`b.mm(n)` converts mm → dots for the profile's DPI). Lay out a template once, then fill\nthe slots per product. Common slots on a price tag: **brand**, **product name**\n(`block()` for wrapping), **price** (magnified `text`), **barcode**, **QR**, **SKU/size**.\n\n## API\n\n`label(profile, { rasterizer? })` → builder with:\n\n| method | TSPL | notes |\n|---|---|---|\n| `text(x, y, value, opts?)` | `TEXT` | `font` \"1\"–\"5\", `rotation`, `xMul`/`yMul`. Non-Latin → rasterized (needs `rasterizer`) or throws. |\n| `barcode(x, y, data, opts?)` | `BARCODE` | `type`, `height`, `human` (0/1/2), `narrow`/`wide`. |\n| `qrcode(x, y, data, opts?)` | `QRCODE` | `ecc` L/M/Q/H, `cell` 1–10. |\n| `box(x, y, w, h, thickness?)` | `BOX` | outline rectangle. |\n| `bar(x, y, w, h)` | `BAR` | filled bar/line. |\n| `image(x, y, imageData, opts?)` | `BITMAP` | 1-bit raster (logos / any `ImageData`). |\n| `raw(line)` | — | append a raw TSPL command. |\n| `encode({ sets?, copies? })` | `SIZE`/`GAP`/…/`CLS`/…/`PRINT` | → `Uint8Array`. |\n\n### Barcodes\n`code128` (default), `code128m`, `ean128`, `code39`, `code93`, `ean13`, `ean8`, `upca`,\n`upce`, `codabar`, `itf14`, `interleaved25`, `msi`. (For retail/apparel: **EAN-13** for\nretail GTINs, **Code128** for internal SKUs, **QR** for links/rich data.)\n\n### Profiles & sizes\n`LABEL_PROFILES`: `40x30`, `50x30`, `30x20`, `50x25`, `60x40` (mm). Or pass\n`{ widthMm, heightMm, gapMm?, dpi?, speed?, density?, direction?, codepage?, reference? }`.\n`gapMm: 0` = continuous stock. `dpi: 300` for 300-DPI printers (12 dots/mm).\n\n### Non-Latin (Sinhala/Tamil/…)\nTSPL's internal fonts can't shape complex scripts, so `text()` with non-encodable content\nis **rasterized to a `BITMAP`** via an injected `rasterizer` (same pattern as chittie-text)\n— or throws if none is supplied (never a silent `?`).\n\n```ts\nlabel(profile, { rasterizer: myCanvasRasterizer }).text(x, y, 'සිල්ක් සාරිය');\n```\n\n### Printing\n`encode()` returns `Uint8Array` — hand it to any chittie transport: Web Serial /\n`@angadie/chittie-transport-web`, BLE / `@angadie/chittie-transport-react-native`, a Tauri\n`print_escpos`-style command, or raw TCP. (TSPL printers take raw bytes just like ESC/POS.)\n\n> A JSX `<Label>` surface (mirroring chittie-react) is planned as `@angadie/chittie-label-react`.\n\n> **Verify on hardware:** BITMAP bit-polarity (dark→0, light→1, MSB-first) follows the TSPL\n> convention and is unit-tested, but confirm a logo prints right-side-out on your printer.\n","readmeFilename":"README.md"}