{"_id":"@activetheory/balance-text","_rev":"2-24bc225f3c9f458380e0f3448104bc5d","name":"@activetheory/balance-text","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"@activetheory/balance-text","version":"1.0.0","author":{"url":"https://activetheory.net","name":"Active Theory","email":"hello@activetheory.net"},"license":"MIT","_id":"@activetheory/balance-text@1.0.0","maintainers":[{"name":"luigiactivetheory","email":"luigi@activetheory.net"},{"name":"raffaele.filiberti","email":"raffaele@activetheory.net"}],"homepage":"https://github.com/activetheory/balance-text#readme","bugs":{"url":"https://github.com/activetheory/balance-text/issues"},"dist":{"shasum":"32eb0799c826feeff87b8f1713e13cabd0e814cc","tarball":"https://registry.npmjs.org/@activetheory/balance-text/-/balance-text-1.0.0.tgz","fileCount":5,"integrity":"sha512-N/XppcbHFYGRQieww6TUqUW1Qz8HSLgF5sgYIuySp9ijiZELKYtXzJfFB4aqdEwpRLlnjaecUweMJaRxTpZrfA==","signatures":[{"sig":"MEUCICakgtLghptVC8+GaL/Jp7U8khurkBG/zuM/aJlV3+y4AiEA9YijZi0EddnwI+PleMiEhYs9yUtwHgGSTO6gSgAXrxY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5412},"main":"./src/index.js","type":"module","types":"./src/index.d.ts","exports":{".":{"types":"./src/index.d.ts","default":"./src/index.js"}},"gitHead":"54e4126f3ca24149e7d8a03d7153fde9e8ea2212","scripts":{"dev":"vite demo","format":"prettier --write --ignore-unknown","prepare":"husky","release":"release-it"},"_npmUser":{"name":"raffaele.filiberti","email":"raffaele@activetheory.net"},"prettier":{"semi":true,"useTabs":false,"tabWidth":2,"endOfLine":"lf","printWidth":200,"quoteProps":"as-needed","arrowParens":"always","singleQuote":true,"trailingComma":"es5","bracketSpacing":true,"htmlWhitespaceSensitivity":"css"},"release-it":{"npm":{"publish":true},"github":{"release":true}},"repository":{"url":"git+https://github.com/activetheory/balance-text.git","type":"git"},"_npmVersion":"10.2.4","description":"Simple text balancing utility","directories":{},"lint-staged":{"**/*":["npm run format"]},"sideEffects":false,"_nodeVersion":"20.11.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^6.0.9","husky":"^9.1.7","prettier":"^3.4.2","release-it":"^18.1.1","lint-staged":"^15.4.1"},"_npmOperationalInternal":{"tmp":"tmp/balance-text_1.0.0_1737395457721_0.7010360849871207","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@activetheory/balance-text","version":"1.0.1","author":{"url":"https://activetheory.net","name":"Active Theory","email":"hello@activetheory.net"},"license":"MIT","_id":"@activetheory/balance-text@1.0.1","maintainers":[{"name":"luigiactivetheory","email":"luigi@activetheory.net"},{"name":"raffaele.filiberti","email":"raffaele@activetheory.net"}],"homepage":"https://github.com/activetheory/balance-text#readme","bugs":{"url":"https://github.com/activetheory/balance-text/issues"},"dist":{"shasum":"3af227220dc5ec5cca1576e1c72a63b6deca2127","tarball":"https://registry.npmjs.org/@activetheory/balance-text/-/balance-text-1.0.1.tgz","fileCount":5,"integrity":"sha512-X81LqmqtAPK19qMFzwnRW01wrgopwEsamsaRiQxWK0X1xoFTFE4z5zoxTph4+ULVAYq/B4r0JiBWmeUmqSd0PA==","signatures":[{"sig":"MEUCIEGd7sxjSNGWSbp5xfay+8aKlwYgYrI4ANv8lEPVuQiJAiEAktyOuAv0hP+2oISQDiD+NpHMMuRqPaXonGH8Kl5iHOs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5018},"main":"./src/index.js","type":"module","types":"./src/index.d.ts","exports":{".":{"types":"./src/index.d.ts","default":"./src/index.js"}},"gitHead":"af8de6c0d58d0cf00d60f57341af6b76cc7d5043","scripts":{"dev":"vite demo","format":"prettier --write --ignore-unknown","prepare":"husky","release":"release-it"},"_npmUser":{"name":"raffaele.filiberti","email":"raffaele@activetheory.net"},"prettier":{"semi":true,"useTabs":false,"tabWidth":2,"endOfLine":"lf","printWidth":200,"quoteProps":"as-needed","arrowParens":"always","singleQuote":true,"trailingComma":"es5","bracketSpacing":true,"htmlWhitespaceSensitivity":"css"},"release-it":{"npm":{"publish":true},"github":{"release":true}},"repository":{"url":"git+https://github.com/activetheory/balance-text.git","type":"git"},"_npmVersion":"10.2.4","description":"Simple text balancing utility","directories":{},"lint-staged":{"**/*":["npm run format"]},"sideEffects":false,"_nodeVersion":"20.11.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^6.0.9","husky":"^9.1.7","prettier":"^3.4.2","release-it":"^18.1.1","lint-staged":"^15.4.1"},"_npmOperationalInternal":{"tmp":"tmp/balance-text_1.0.1_1737480326532_0.34956231847862407","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@activetheory/balance-text","version":"1.0.2","description":"Simple text balancing utility","main":"./src/index.js","publishConfig":{"access":"public"},"exports":{".":{"types":"./src/index.d.ts","default":"./src/index.js"}},"types":"./src/index.d.ts","scripts":{"dev":"vite demo","demo:build":"vite build --outDir ../dist --emptyOutDir --base ./ ./demo/","format":"prettier --write --ignore-unknown","release":"release-it","prepare":"husky"},"sideEffects":false,"type":"module","author":{"name":"Active Theory","email":"hello@activetheory.net","url":"https://activetheory.net"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/activetheory/balance-text.git"},"prettier":{"arrowParens":"always","bracketSpacing":true,"endOfLine":"lf","htmlWhitespaceSensitivity":"css","printWidth":200,"quoteProps":"as-needed","semi":true,"singleQuote":true,"tabWidth":2,"trailingComma":"es5","useTabs":false},"devDependencies":{"husky":"^9.1.7","lint-staged":"^15.4.1","prettier":"^3.4.2","release-it":"^18.1.1","vite":"^6.0.9"},"release-it":{"github":{"release":true},"npm":{"publish":true}},"lint-staged":{"**/*":["npm run format"]},"_id":"@activetheory/balance-text@1.0.2","gitHead":"8d922c62bfc98d138db950eb2f663cbfdc95acf0","bugs":{"url":"https://github.com/activetheory/balance-text/issues"},"homepage":"https://github.com/activetheory/balance-text#readme","_nodeVersion":"20.11.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-RD57R4ZviYjl6Gt7JEBdQ6t45dppk7WER5uxZBJ3cxdXfatpIcDIpLseFW3ajLMKA4+IShD/sO2/dhaB6jYreQ==","shasum":"5cb82e0857d6dabb3ab47a5a8ecdf1146fabfe49","tarball":"https://registry.npmjs.org/@activetheory/balance-text/-/balance-text-1.0.2.tgz","fileCount":8,"unpackedSize":8411,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCpQDGly0wXU8r97BACi/D29BHz6MNgxztvSSA3KV08ewIgcz5AJCpNDjrhDeSYOdHhP0Fzxd1HHfO0p2FvXaYwHcQ="}]},"_npmUser":{"name":"raffaele.filiberti","email":"raffaele@activetheory.net"},"directories":{},"maintainers":[{"name":"luigiactivetheory","email":"luigi@activetheory.net"},{"name":"raffaele.filiberti","email":"raffaele@activetheory.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/balance-text_1.0.2_1738228466014_0.6361597783645931"},"_hasShrinkwrap":false}},"time":{"created":"2025-01-20T17:50:57.571Z","modified":"2025-01-30T09:14:26.410Z","1.0.0":"2025-01-20T17:50:57.928Z","1.0.1":"2025-01-21T17:25:26.739Z","1.0.2":"2025-01-30T09:14:26.208Z"},"bugs":{"url":"https://github.com/activetheory/balance-text/issues"},"author":{"name":"Active Theory","email":"hello@activetheory.net","url":"https://activetheory.net"},"license":"MIT","homepage":"https://github.com/activetheory/balance-text#readme","repository":{"type":"git","url":"git+https://github.com/activetheory/balance-text.git"},"description":"Simple text balancing utility","maintainers":[{"name":"luigiactivetheory","email":"luigi@activetheory.net"},{"name":"raffaele.filiberti","email":"raffaele@activetheory.net"}],"readme":"# Balance Text\n\nSimple text balancing utility. It's a wrapper around the `text-wrap: balance` CSS property.\nIf the browser supports the `text-wrap: balance` property, and the element has the `text-wrap: balance` property set, it will not be balanced.\n\n[Demo](https://activetheory.github.io/balance-text/)\n\n## Installation\n\n```bash\nnpm install @activetheory/balance-text\n```\n\n## Usage\n\n```js\nimport balanceText from '@activetheory/balance-text';\n\nconst el = document.querySelector('.el');\n\nconst result = balanceText({\n  el,\n  ratio: 1,\n  useParent: true,\n  debug: true,\n});\n```\n\n## Options\n\n- `el`: The element to balance.\n- `ratio`: The ratio of the width of the element to the width of the parent.\n- `useParent`: Whether to use the parent element as reference to balance the text.\n- `debug`: Whether to log debug information.\n\n## Demo\n\nSee the [demo](./demo) folder for examples.\nTo run the demo, run `npm run dev`.\n","readmeFilename":"README.md"}