{"_id":"@ascii-graphs/renderer-text","_rev":"2-dfcfac47cfea58a2a4e5149b5b65d66c","name":"@ascii-graphs/renderer-text","dist-tags":{"next":"0.1.0-alpha.0","latest":"0.1.0"},"versions":{"0.1.0-alpha.0":{"name":"@ascii-graphs/renderer-text","version":"0.1.0-alpha.0","keywords":["ascii","charts","text","terminal","email","unicode"],"author":{"name":"Juan Víctor Izquierdo"},"license":"MIT","_id":"@ascii-graphs/renderer-text@0.1.0-alpha.0","maintainers":[{"name":"izquierdojv","email":"izquierdojv@gmail.com"}],"homepage":"https://github.com/juanviizquierdo/ascii_graphs#readme","bugs":{"url":"https://github.com/juanviizquierdo/ascii_graphs/issues"},"dist":{"shasum":"c8cdb6b084744f815c5179dc26c9021c2c90db56","tarball":"https://registry.npmjs.org/@ascii-graphs/renderer-text/-/renderer-text-0.1.0-alpha.0.tgz","fileCount":5,"integrity":"sha512-AB6eXj/R0RH0Q8rm1fJTZ1443QTWnEIlmXN+bS6AKocNq4dt5JhYm0+TqEpYe23zwsFcyHSQSraktlcbg+a2gQ==","signatures":[{"sig":"MEYCIQDLdYTLqEoIJRXUSgxhGzO1ydgCfOmVZwRt18wVYu5+kwIhAJ78O0pHRSal6IayrFClu/j6PluTvyorKSwSVw83EkgH","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3364},"main":"./dist/index.js","type":"module","_from":"file:/tmp/ascii-graphs-publish.iTScbw/ascii-graphs-renderer-text-0.1.0-alpha.0.tgz","types":"./dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"scripts":{"build":"tsup src/index.ts --format esm --dts --clean","typecheck":"tsc --noEmit"},"_npmUser":{"name":"izquierdojv","email":"izquierdojv@gmail.com"},"_resolved":"/tmp/ascii-graphs-publish.iTScbw/ascii-graphs-renderer-text-0.1.0-alpha.0.tgz","_integrity":"sha512-AB6eXj/R0RH0Q8rm1fJTZ1443QTWnEIlmXN+bS6AKocNq4dt5JhYm0+TqEpYe23zwsFcyHSQSraktlcbg+a2gQ==","repository":{"url":"git+https://github.com/juanviizquierdo/ascii_graphs.git","type":"git"},"_npmVersion":"11.6.2","description":"Plain-text renderer for portable ASCII charts","directories":{},"sideEffects":false,"_nodeVersion":"25.2.1","dependencies":{"@ascii-graphs/core":"0.1.0-alpha.0"},"publishConfig":{"tag":"next","access":"public","provenance":true},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","typescript":"^5.8.3"},"_npmOperationalInternal":{"tmp":"tmp/renderer-text_0.1.0-alpha.0_1786545180157_0.5686724852869516","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"@ascii-graphs/renderer-text","version":"0.1.0","description":"Plain-text renderer for portable ASCII charts","keywords":["ascii","charts","text","terminal","email","unicode"],"author":{"name":"Juan Víctor Izquierdo"},"repository":{"type":"git","url":"git+https://github.com/juanviizquierdo/ascii_graphs.git"},"type":"module","sideEffects":false,"license":"MIT","engines":{"node":">=20"},"main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"dependencies":{"@ascii-graphs/core":"0.1.0"},"devDependencies":{"tsup":"^8.5.0","typescript":"^5.8.3"},"publishConfig":{"access":"public","provenance":true,"tag":"latest"},"gitHead":"a29f15ab1ec7ab8ee4a5ce57364e0ca311ec3a78","scripts":{"build":"tsup src/index.ts --format esm --dts --clean","typecheck":"tsc --noEmit"},"_id":"@ascii-graphs/renderer-text@0.1.0","bugs":{"url":"https://github.com/juanviizquierdo/ascii_graphs/issues"},"homepage":"https://github.com/juanviizquierdo/ascii_graphs#readme","_integrity":"sha512-6DaHd768kgLCY1gv8+Xor5ONf3gxiHnw2n2yOnwtysaYaXL3rQUV12SK/p3sAfYJmt42TVP1zwroZzffCt2evg==","_resolved":"/home/runner/work/ascii_graphs/ascii_graphs/artifacts/ascii-graphs-renderer-text-0.1.0.tgz","_from":"file:/home/runner/work/ascii_graphs/ascii_graphs/artifacts/ascii-graphs-renderer-text-0.1.0.tgz","_nodeVersion":"24.19.0","_npmVersion":"11.19.1","dist":{"integrity":"sha512-6DaHd768kgLCY1gv8+Xor5ONf3gxiHnw2n2yOnwtysaYaXL3rQUV12SK/p3sAfYJmt42TVP1zwroZzffCt2evg==","shasum":"0cdb71f935b47a5f3a109782b01ded46d520dac1","tarball":"https://registry.npmjs.org/@ascii-graphs/renderer-text/-/renderer-text-0.1.0.tgz","fileCount":5,"unpackedSize":6001,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ascii-graphs%2frenderer-text@0.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQC9X+fNtJsabap7vnRn1haLrDRfoJdJttZ58FDQ1R/8WwIgCgNbzim7rwdoLGOghvCm9+32/YYqV6klg3MqJH1oFDk="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:7b13c34d-6ee1-4ddc-bdae-8fd374a01a32"}},"directories":{},"maintainers":[{"name":"izquierdojv","email":"izquierdojv@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/renderer-text_0.1.0_1787900182697_0.08160565098954775"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-12T14:32:59.998Z","modified":"2026-08-28T06:56:23.186Z","0.1.0-alpha.0":"2026-08-12T14:33:00.302Z","0.1.0":"2026-08-28T06:56:22.831Z"},"bugs":{"url":"https://github.com/juanviizquierdo/ascii_graphs/issues"},"author":{"name":"Juan Víctor Izquierdo"},"license":"MIT","homepage":"https://github.com/juanviizquierdo/ascii_graphs#readme","keywords":["ascii","charts","text","terminal","email","unicode"],"repository":{"type":"git","url":"git+https://github.com/juanviizquierdo/ascii_graphs.git"},"description":"Plain-text renderer for portable ASCII charts","maintainers":[{"name":"izquierdojv","email":"izquierdojv@gmail.com"}],"readme":"# `@ascii-graphs/renderer-text`\n\nPlain-text serialization for `CellGrid` output from `@ascii-graphs/core`.\n\n```sh\npnpm add @ascii-graphs/core @ascii-graphs/renderer-text\n```\n\n```ts\nimport { layout, sparkline } from \"@ascii-graphs/core\";\nimport { renderText } from \"@ascii-graphs/renderer-text\";\n\nconst grid = layout(sparkline({ values: [2, 5, 3, 8] }));\nconsole.log(renderText(grid, { finalNewline: true }));\n```\n\n## Markdown documents\n\nUse `renderMarkdown` from this same package to wrap the chart in a fenced code\nblock ready to insert into a `.md` document:\n\n```ts\nimport { renderMarkdown } from \"@ascii-graphs/renderer-text\";\n\nconst markdown = renderMarkdown(grid);\nconst report = [\"# Weekly report\", \"Recent activity:\", markdown].join(\"\\n\\n\");\n```\n\nThe fence uses the `text` info string and is longer than any backtick run in the\nchart, so labels and titles cannot accidentally close it. Chart content stays\nliteral, including Unicode, HTML characters, and pipes. No Markdown parser,\nMermaid extension, or additional package is required to generate the output.\n\nBoth functions accept `TextRenderOptions`:\n\n| Option                   | Default | Effect                                                                 |\n| ------------------------ | ------- | ---------------------------------------------------------------------- |\n| `trimTrailingWhitespace` | `true`  | Removes whitespace at the end of each chart row                        |\n| `finalNewline`           | `false` | Adds a newline after the output; for Markdown, after the closing fence |\n\nInsert the block on its own lines, separated from surrounding report sections\nwith blank lines. If placing it inside a list or blockquote, apply that\ncontainer's indentation/prefix to every line. Do not wrap the returned Markdown\nin another code fence.\n\nThis is a static text chart, not executable chart JSON. The calling application\nor LLM tool runs the library and writes the result into the document. Standard\nfenced blocks preserve literal text but do not carry our semantic colors; the\nMarkdown viewer controls typography and wrapping.\n\nSee the [Markdown integration guide](../../examples/integrations/markdown.md)\nfor the JSON bridge and LLM workflow, and the\n[CommonMark fenced-code specification](https://spec.commonmark.org/0.31.2/#fenced-code-blocks)\nfor the output format.\n\nThe output contains no ANSI control sequences. Requires Node.js 20 or newer.\nLicensed under MIT.\n","readmeFilename":"README.md"}