@aurodesignsystem/auro-formkit 2.0.0-beta.40 → 2.0.0-beta.42
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/.turbo/cache/04e52430125e8954-meta.json +1 -0
- package/.turbo/cache/04e52430125e8954.tar.zst +0 -0
- package/.turbo/cache/0593ea8b5b3ed321-meta.json +1 -0
- package/.turbo/cache/068b8eef3688b4e2-meta.json +1 -0
- package/.turbo/cache/068b8eef3688b4e2.tar.zst +0 -0
- package/.turbo/cache/06c6468593bc10ab-meta.json +1 -0
- package/.turbo/cache/06c6468593bc10ab.tar.zst +0 -0
- package/.turbo/cache/0c48a4d7b5aac928-meta.json +1 -0
- package/.turbo/cache/0c48a4d7b5aac928.tar.zst +0 -0
- package/.turbo/cache/1959dd19c8cca5b3-meta.json +1 -0
- package/.turbo/cache/1c16e59f30927b15-meta.json +1 -0
- package/.turbo/cache/29ac8c4304c43ba8-meta.json +1 -0
- package/.turbo/cache/29ac8c4304c43ba8.tar.zst +0 -0
- package/.turbo/cache/2b46337c7a6faa1f-meta.json +1 -0
- package/.turbo/cache/33b12bddab905466-meta.json +1 -0
- package/.turbo/cache/{6d48e8dc24e08c8c.tar.zst → 33b12bddab905466.tar.zst} +0 -0
- package/.turbo/cache/3e068f9ea52e35fd-meta.json +1 -0
- package/.turbo/cache/3f6725da0ddcb57a-meta.json +1 -0
- package/.turbo/cache/3fa3b39e63c49920-meta.json +1 -0
- package/.turbo/cache/3fbb4335136fe72b-meta.json +1 -0
- package/.turbo/cache/3fbb4335136fe72b.tar.zst +0 -0
- package/.turbo/cache/4d32cb975704a7bc-meta.json +1 -0
- package/.turbo/cache/4d32cb975704a7bc.tar.zst +0 -0
- package/.turbo/cache/504dc5478398bc23-meta.json +1 -0
- package/.turbo/cache/504dc5478398bc23.tar.zst +0 -0
- package/.turbo/cache/5736b4ba6916fd8d-meta.json +1 -0
- package/.turbo/cache/5736b4ba6916fd8d.tar.zst +0 -0
- package/.turbo/cache/5aae6a716a40ac0d-meta.json +1 -0
- package/.turbo/cache/618b3075ce2d9a61-meta.json +1 -0
- package/.turbo/cache/618b3075ce2d9a61.tar.zst +0 -0
- package/.turbo/cache/67c13dfc4fd939fc-meta.json +1 -0
- package/.turbo/cache/68fe65245fb34e68-meta.json +1 -0
- package/.turbo/cache/68fe65245fb34e68.tar.zst +0 -0
- package/.turbo/cache/6a25a3c0fc92f44d-meta.json +1 -0
- package/.turbo/cache/6a25a3c0fc92f44d.tar.zst +0 -0
- package/.turbo/cache/6cd6d76ac166da16-meta.json +1 -0
- package/.turbo/cache/71cd21072abc2990-meta.json +1 -0
- package/.turbo/cache/7b4e0f3ba43fedf0-meta.json +1 -0
- package/.turbo/cache/7b9897d3439462f4-meta.json +1 -0
- package/.turbo/cache/7b9897d3439462f4.tar.zst +0 -0
- package/.turbo/cache/80a42a1ee43a7b11-meta.json +1 -0
- package/.turbo/cache/{7a2e937d0f5acb7c.tar.zst → 80a42a1ee43a7b11.tar.zst} +0 -0
- package/.turbo/cache/80bda930b819e4e5-meta.json +1 -0
- package/.turbo/cache/826ecc96865e3b2b-meta.json +1 -0
- package/.turbo/cache/{4aadd7fe6b69cccf.tar.zst → 826ecc96865e3b2b.tar.zst} +0 -0
- package/.turbo/cache/8a66291a4385f56d-meta.json +1 -0
- package/.turbo/cache/8b33dd53ac78ffcb-meta.json +1 -0
- package/.turbo/cache/8b33dd53ac78ffcb.tar.zst +0 -0
- package/.turbo/cache/922ac9eb482cf470-meta.json +1 -0
- package/.turbo/cache/939cf3ccc40e9ab0-meta.json +1 -0
- package/.turbo/cache/{47d63056350252e5.tar.zst → 939cf3ccc40e9ab0.tar.zst} +0 -0
- package/.turbo/cache/997795fcad6346cf-meta.json +1 -0
- package/.turbo/cache/9d39077f59442e6d-meta.json +1 -0
- package/.turbo/cache/9f33c2699df2acc2-meta.json +1 -0
- package/.turbo/cache/9f33c2699df2acc2.tar.zst +0 -0
- package/.turbo/cache/a95cdb7b2836627c-meta.json +1 -0
- package/.turbo/cache/aa7a71eea03e0057-meta.json +1 -0
- package/.turbo/cache/ac01a85fedf6d42a-meta.json +1 -0
- package/.turbo/cache/ac01a85fedf6d42a.tar.zst +0 -0
- package/.turbo/cache/b0b5371ee9e6fd7b-meta.json +1 -0
- package/.turbo/cache/b0b5371ee9e6fd7b.tar.zst +0 -0
- package/.turbo/cache/b21472a210e5d253-meta.json +1 -0
- package/.turbo/cache/b21472a210e5d253.tar.zst +0 -0
- package/.turbo/cache/ba6844de212fdfc5-meta.json +1 -0
- package/.turbo/cache/bb95b8c7cc483fe7-meta.json +1 -0
- package/.turbo/cache/bb95b8c7cc483fe7.tar.zst +0 -0
- package/.turbo/cache/be89ec729b2d7aa1-meta.json +1 -0
- package/.turbo/cache/be89ec729b2d7aa1.tar.zst +0 -0
- package/.turbo/cache/c0c0f7ab71b548fe-meta.json +1 -0
- package/.turbo/cache/c0c0f7ab71b548fe.tar.zst +0 -0
- package/.turbo/cache/c4b442aa3a612c5a-meta.json +1 -0
- package/.turbo/cache/c833fd369811f0b3-meta.json +1 -0
- package/.turbo/cache/c833fd369811f0b3.tar.zst +0 -0
- package/.turbo/cache/cc1bb0ba75999fd5-meta.json +1 -0
- package/.turbo/cache/cc1bb0ba75999fd5.tar.zst +0 -0
- package/.turbo/cache/cc999fcae80b9892-meta.json +1 -0
- package/.turbo/cache/cf739f73c4d81043-meta.json +1 -0
- package/.turbo/cache/cf87272227a0d544-meta.json +1 -0
- package/.turbo/cache/cf87272227a0d544.tar.zst +0 -0
- package/.turbo/cache/d09e82feba2c48a3-meta.json +1 -0
- package/.turbo/cache/d264bb58130e3915-meta.json +1 -0
- package/.turbo/cache/d4fda50b9aa326d9-meta.json +1 -0
- package/.turbo/cache/da0461631780f1e1-meta.json +1 -0
- package/.turbo/cache/dbdfe30495790f74-meta.json +1 -0
- package/.turbo/cache/dea41fd4a13eb241-meta.json +1 -0
- package/.turbo/cache/e229b033acee0336-meta.json +1 -0
- package/.turbo/cache/ed401f9a734e292c-meta.json +1 -0
- package/.turbo/cache/efafac21cf262b2c-meta.json +1 -0
- package/.turbo/cache/{b323342fa340ccb5.tar.zst → efafac21cf262b2c.tar.zst} +0 -0
- package/.turbo/cache/f20df212682f7978-meta.json +1 -0
- package/.turbo/cache/f20df212682f7978.tar.zst +0 -0
- package/.turbo/cache/f272ad05432871ac-meta.json +1 -0
- package/CHANGELOG.md +27 -0
- package/components/bibtemplate/.stylelintrc.json +3 -0
- package/components/bibtemplate/.turbo/turbo-build$colon$sass.log +24 -0
- package/components/bibtemplate/.turbo/turbo-build$colon$version.log +10 -0
- package/components/bibtemplate/.turbo/turbo-build.log +49 -0
- package/components/bibtemplate/.turbo/turbo-bundler.log +7 -0
- package/components/bibtemplate/.turbo/turbo-postCss$colon$component.log +4 -0
- package/components/bibtemplate/.turbo/turbo-sass$colon$render.log +22 -0
- package/components/bibtemplate/.turbo/turbo-types.log +4 -0
- package/components/bibtemplate/dist/auro-bibtemplate.d.ts +39 -0
- package/components/bibtemplate/dist/auro-bibtemplate.d.ts.map +1 -0
- package/components/bibtemplate/dist/headerVersion.d.ts +3 -0
- package/components/bibtemplate/dist/headerVersion.d.ts.map +1 -0
- package/components/bibtemplate/dist/iconVersion.d.ts +3 -0
- package/components/bibtemplate/dist/iconVersion.d.ts.map +1 -0
- package/components/bibtemplate/dist/index.d.ts +3 -0
- package/components/bibtemplate/dist/index.d.ts.map +1 -0
- package/components/bibtemplate/dist/index.js +792 -0
- package/components/bibtemplate/dist/styles/color-css.d.ts +3 -0
- package/components/bibtemplate/dist/styles/color-css.d.ts.map +1 -0
- package/components/bibtemplate/dist/styles/style-css.d.ts +3 -0
- package/components/bibtemplate/dist/styles/style-css.d.ts.map +1 -0
- package/components/bibtemplate/dist/styles/tokens-css.d.ts +3 -0
- package/components/bibtemplate/dist/styles/tokens-css.d.ts.map +1 -0
- package/components/bibtemplate/node_modules/chalk/package.json +83 -0
- package/components/bibtemplate/node_modules/chalk/readme.md +297 -0
- package/components/bibtemplate/node_modules/chalk/source/index.d.ts +325 -0
- package/components/bibtemplate/node_modules/chalk/source/index.js +225 -0
- package/components/bibtemplate/node_modules/chalk/source/utilities.js +33 -0
- package/components/bibtemplate/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +236 -0
- package/components/bibtemplate/node_modules/chalk/source/vendor/ansi-styles/index.js +223 -0
- package/components/bibtemplate/node_modules/chalk/source/vendor/supports-color/browser.d.ts +1 -0
- package/components/bibtemplate/node_modules/chalk/source/vendor/supports-color/browser.js +34 -0
- package/components/bibtemplate/node_modules/chalk/source/vendor/supports-color/index.d.ts +55 -0
- package/components/bibtemplate/node_modules/chalk/source/vendor/supports-color/index.js +182 -0
- package/components/bibtemplate/package.json +60 -0
- package/components/bibtemplate/src/auro-bibtemplate.js +137 -0
- package/components/bibtemplate/src/headerVersion.js +1 -0
- package/components/bibtemplate/src/iconVersion.js +1 -0
- package/components/bibtemplate/src/index.js +6 -0
- package/components/bibtemplate/src/styles/color-css.js +2 -0
- package/components/bibtemplate/src/styles/color.css +1 -0
- package/components/bibtemplate/src/styles/color.scss +0 -0
- package/components/bibtemplate/src/styles/style-css.js +2 -0
- package/components/bibtemplate/src/styles/style.css +58 -0
- package/components/bibtemplate/src/styles/style.scss +62 -0
- package/components/bibtemplate/src/styles/tokens-css.js +2 -0
- package/components/bibtemplate/src/styles/tokens.css +3 -0
- package/components/bibtemplate/src/styles/tokens.scss +5 -0
- package/components/checkbox/.turbo/turbo-build.log +3 -3
- package/components/checkbox/README.md +1 -1
- package/components/combobox/.turbo/turbo-build.log +5 -0
- package/components/combobox/README.md +6 -4
- package/components/combobox/demo/api.md +79 -0
- package/components/combobox/demo/api.min.js +1529 -514
- package/components/combobox/demo/index.md +16 -0
- package/components/combobox/demo/index.min.js +1529 -514
- package/components/combobox/dist/auro-combobox.d.ts +45 -2
- package/components/combobox/dist/auro-combobox.d.ts.map +1 -1
- package/components/combobox/dist/bibtemplateVersion.d.ts +3 -0
- package/components/combobox/dist/bibtemplateVersion.d.ts.map +1 -0
- package/components/combobox/dist/index.js +1454 -439
- package/components/combobox/package.json +1 -0
- package/components/combobox/src/auro-combobox.js +172 -23
- package/components/combobox/src/bibtemplateVersion.js +1 -0
- package/components/combobox/src/styles/style-css.js +1 -1
- package/components/combobox/src/styles/style.css +0 -4
- package/components/combobox/src/styles/style.scss +0 -8
- package/components/counter/.turbo/turbo-build.log +2 -2
- package/components/counter/.turbo/turbo-bundler.log +3 -3
- package/components/counter/README.md +1 -1
- package/components/counter/demo/api.min.js +244 -168
- package/components/counter/demo/index.min.js +244 -168
- package/components/counter/dist/index.js +244 -168
- package/components/datepicker/.turbo/turbo-build.log +3 -3
- package/components/datepicker/README.md +4 -4
- package/components/datepicker/demo/api.min.js +245 -169
- package/components/datepicker/demo/index.min.js +245 -169
- package/components/datepicker/dist/index.js +245 -169
- package/components/datepicker/src/auro-calendar.js +1 -1
- package/components/dropdown/.turbo/turbo-build.log +6 -3
- package/components/dropdown/README.md +1 -1
- package/components/dropdown/demo/api.md +6 -4
- package/components/dropdown/demo/api.min.js +244 -168
- package/components/dropdown/demo/index.min.js +244 -168
- package/components/dropdown/dist/auro-dropdown.d.ts +17 -3
- package/components/dropdown/dist/auro-dropdown.d.ts.map +1 -1
- package/components/dropdown/dist/auro-dropdownBib.d.ts +8 -0
- package/components/dropdown/dist/auro-dropdownBib.d.ts.map +1 -1
- package/components/dropdown/dist/dropdownVersion.d.ts +3 -0
- package/components/dropdown/dist/dropdownVersion.d.ts.map +1 -0
- package/components/dropdown/dist/index.js +244 -168
- package/components/dropdown/src/auro-dropdown.js +25 -4
- package/components/dropdown/src/auro-dropdownBib.js +27 -5
- package/components/dropdown/src/dropdownVersion.js +1 -0
- package/components/dropdown/src/styles/bibStyles-css.js +1 -1
- package/components/dropdown/src/styles/bibStyles.css +1 -0
- package/components/dropdown/src/styles/bibStyles.scss +1 -0
- package/components/form/.turbo/turbo-build.log +3 -3
- package/components/form/.turbo/turbo-bundler.log +3 -3
- package/components/form/README.md +1 -1
- package/components/form/demo/api.min.js +15 -2
- package/components/form/demo/index.min.js +15 -2
- package/components/form/dist/auro-form.d.ts +1 -0
- package/components/form/dist/auro-form.d.ts.map +1 -1
- package/components/form/dist/index.js +15 -2
- package/components/form/src/auro-form.js +15 -2
- package/components/helptext/.turbo/turbo-build.log +1 -1
- package/components/helptext/.turbo/turbo-bundler.log +1 -1
- package/components/input/.turbo/turbo-build.log +3 -3
- package/components/input/README.md +1 -1
- package/components/menu/.turbo/turbo-build.log +3 -3
- package/components/menu/.turbo/turbo-bundler.log +3 -3
- package/components/menu/README.md +1 -1
- package/components/radio/.turbo/turbo-build.log +3 -3
- package/components/radio/README.md +1 -1
- package/components/select/.turbo/turbo-build.log +2 -2
- package/components/select/README.md +3 -3
- package/components/select/demo/api.min.js +244 -168
- package/components/select/demo/index.min.js +244 -168
- package/components/select/dist/index.js +244 -168
- package/package.json +2 -2
- package/turbo.json +1 -0
- package/.turbo/cache/006be80261b993a5-meta.json +0 -1
- package/.turbo/cache/006be80261b993a5.tar.zst +0 -0
- package/.turbo/cache/03338963f2ae4c89-meta.json +0 -1
- package/.turbo/cache/06dfc9c20aacd0fa-meta.json +0 -1
- package/.turbo/cache/075034ccdb82fbea-meta.json +0 -1
- package/.turbo/cache/0ff927ad868537f6-meta.json +0 -1
- package/.turbo/cache/0ff927ad868537f6.tar.zst +0 -0
- package/.turbo/cache/10b8500a6b0c6655-meta.json +0 -1
- package/.turbo/cache/138466aaa06fa946-meta.json +0 -1
- package/.turbo/cache/1a8525cb6ad91e2a-meta.json +0 -1
- package/.turbo/cache/1a8525cb6ad91e2a.tar.zst +0 -0
- package/.turbo/cache/1c347bdf63624c8a-meta.json +0 -1
- package/.turbo/cache/1d4e8167ea8e924f-meta.json +0 -1
- package/.turbo/cache/2289d12debb3c42c-meta.json +0 -1
- package/.turbo/cache/2289d12debb3c42c.tar.zst +0 -0
- package/.turbo/cache/22fc147c04804f70-meta.json +0 -1
- package/.turbo/cache/2d51091c22fc92f5-meta.json +0 -1
- package/.turbo/cache/2d51091c22fc92f5.tar.zst +0 -0
- package/.turbo/cache/3025cdff2ca7afbf-meta.json +0 -1
- package/.turbo/cache/3082b3a86c0f9b94-meta.json +0 -1
- package/.turbo/cache/366fc19b143f7957-meta.json +0 -1
- package/.turbo/cache/366fc19b143f7957.tar.zst +0 -0
- package/.turbo/cache/3dba2f8fdc7eb1d0-meta.json +0 -1
- package/.turbo/cache/43995f6c84a2de33-meta.json +0 -1
- package/.turbo/cache/45d6aea680ecb5ec-meta.json +0 -1
- package/.turbo/cache/45ecc27552696bd6-meta.json +0 -1
- package/.turbo/cache/45ecc27552696bd6.tar.zst +0 -0
- package/.turbo/cache/47d63056350252e5-meta.json +0 -1
- package/.turbo/cache/4aadd7fe6b69cccf-meta.json +0 -1
- package/.turbo/cache/5b3bb164db4c477c-meta.json +0 -1
- package/.turbo/cache/6bfd7cffad1e6b8a-meta.json +0 -1
- package/.turbo/cache/6d48e8dc24e08c8c-meta.json +0 -1
- package/.turbo/cache/70e65d2581c9de95-meta.json +0 -1
- package/.turbo/cache/78629f56974cc5d7-meta.json +0 -1
- package/.turbo/cache/78629f56974cc5d7.tar.zst +0 -0
- package/.turbo/cache/7a2e937d0f5acb7c-meta.json +0 -1
- package/.turbo/cache/85f181c5a0ebfdc3-meta.json +0 -1
- package/.turbo/cache/8830b8b624914679-meta.json +0 -1
- package/.turbo/cache/8830b8b624914679.tar.zst +0 -0
- package/.turbo/cache/88d4c5b7339b081b-meta.json +0 -1
- package/.turbo/cache/8f20a1cd3533e2cb-meta.json +0 -1
- package/.turbo/cache/91de2098a36b6939-meta.json +0 -1
- package/.turbo/cache/96edc0764ed4ab77-meta.json +0 -1
- package/.turbo/cache/a776eb6f87cd7464-meta.json +0 -1
- package/.turbo/cache/aa2a6d9e7beff7fc-meta.json +0 -1
- package/.turbo/cache/aa2a6d9e7beff7fc.tar.zst +0 -0
- package/.turbo/cache/ac47b2df8381d990-meta.json +0 -1
- package/.turbo/cache/ac47b2df8381d990.tar.zst +0 -0
- package/.turbo/cache/ac98992ca27cd36e-meta.json +0 -1
- package/.turbo/cache/b323342fa340ccb5-meta.json +0 -1
- package/.turbo/cache/b681d1652a7f2aca-meta.json +0 -1
- package/.turbo/cache/b681d1652a7f2aca.tar.zst +0 -0
- package/.turbo/cache/b99d21002170d86d-meta.json +0 -1
- package/.turbo/cache/b99d21002170d86d.tar.zst +0 -0
- package/.turbo/cache/bff34c0db361f414-meta.json +0 -1
- package/.turbo/cache/c1c7334875426ff3-meta.json +0 -1
- package/.turbo/cache/cd12b66dd972aaf7-meta.json +0 -1
- package/.turbo/cache/cf74604f39b00f11-meta.json +0 -1
- package/.turbo/cache/d5dbe6fb31ae5667-meta.json +0 -1
- package/.turbo/cache/e2688cc026390fd6-meta.json +0 -1
- package/.turbo/cache/e2688cc026390fd6.tar.zst +0 -0
- package/.turbo/cache/e34579fa4cd85684-meta.json +0 -1
- package/.turbo/cache/e34579fa4cd85684.tar.zst +0 -0
- package/.turbo/cache/e64bd75c16c140f3-meta.json +0 -1
- package/.turbo/cache/ea92743dea3b7023-meta.json +0 -1
- package/.turbo/cache/f1b0cb8241603223-meta.json +0 -1
- package/.turbo/cache/f1b0cb8241603223.tar.zst +0 -0
- package/.turbo/cache/f22dc2dd55715ba2-meta.json +0 -1
- package/.turbo/cache/f8f7a8045f230b79-meta.json +0 -1
- package/.turbo/cache/f8f7a8045f230b79.tar.zst +0 -0
- package/.turbo/cache/f8f99ba69bff8f2c-meta.json +0 -1
- package/.turbo/cache/faafa5cc35d12e06-meta.json +0 -1
- package/.turbo/cache/faafa5cc35d12e06.tar.zst +0 -0
- /package/.turbo/cache/{03338963f2ae4c89.tar.zst → 0593ea8b5b3ed321.tar.zst} +0 -0
- /package/.turbo/cache/{d5dbe6fb31ae5667.tar.zst → 1959dd19c8cca5b3.tar.zst} +0 -0
- /package/.turbo/cache/{cd12b66dd972aaf7.tar.zst → 1c16e59f30927b15.tar.zst} +0 -0
- /package/.turbo/cache/{8f20a1cd3533e2cb.tar.zst → 2b46337c7a6faa1f.tar.zst} +0 -0
- /package/.turbo/cache/{f22dc2dd55715ba2.tar.zst → 3e068f9ea52e35fd.tar.zst} +0 -0
- /package/.turbo/cache/{91de2098a36b6939.tar.zst → 3f6725da0ddcb57a.tar.zst} +0 -0
- /package/.turbo/cache/{43995f6c84a2de33.tar.zst → 3fa3b39e63c49920.tar.zst} +0 -0
- /package/.turbo/cache/{bff34c0db361f414.tar.zst → 5aae6a716a40ac0d.tar.zst} +0 -0
- /package/.turbo/cache/{a776eb6f87cd7464.tar.zst → 67c13dfc4fd939fc.tar.zst} +0 -0
- /package/.turbo/cache/{3dba2f8fdc7eb1d0.tar.zst → 6cd6d76ac166da16.tar.zst} +0 -0
- /package/.turbo/cache/{10b8500a6b0c6655.tar.zst → 71cd21072abc2990.tar.zst} +0 -0
- /package/.turbo/cache/{88d4c5b7339b081b.tar.zst → 7b4e0f3ba43fedf0.tar.zst} +0 -0
- /package/.turbo/cache/{1d4e8167ea8e924f.tar.zst → 80bda930b819e4e5.tar.zst} +0 -0
- /package/.turbo/cache/{5b3bb164db4c477c.tar.zst → 8a66291a4385f56d.tar.zst} +0 -0
- /package/.turbo/cache/{45d6aea680ecb5ec.tar.zst → 922ac9eb482cf470.tar.zst} +0 -0
- /package/.turbo/cache/{3025cdff2ca7afbf.tar.zst → 997795fcad6346cf.tar.zst} +0 -0
- /package/.turbo/cache/{06dfc9c20aacd0fa.tar.zst → 9d39077f59442e6d.tar.zst} +0 -0
- /package/.turbo/cache/{22fc147c04804f70.tar.zst → a95cdb7b2836627c.tar.zst} +0 -0
- /package/.turbo/cache/{f8f99ba69bff8f2c.tar.zst → aa7a71eea03e0057.tar.zst} +0 -0
- /package/.turbo/cache/{96edc0764ed4ab77.tar.zst → ba6844de212fdfc5.tar.zst} +0 -0
- /package/.turbo/cache/{85f181c5a0ebfdc3.tar.zst → c4b442aa3a612c5a.tar.zst} +0 -0
- /package/.turbo/cache/{70e65d2581c9de95.tar.zst → cc999fcae80b9892.tar.zst} +0 -0
- /package/.turbo/cache/{3082b3a86c0f9b94.tar.zst → cf739f73c4d81043.tar.zst} +0 -0
- /package/.turbo/cache/{ea92743dea3b7023.tar.zst → d09e82feba2c48a3.tar.zst} +0 -0
- /package/.turbo/cache/{c1c7334875426ff3.tar.zst → d264bb58130e3915.tar.zst} +0 -0
- /package/.turbo/cache/{1c347bdf63624c8a.tar.zst → d4fda50b9aa326d9.tar.zst} +0 -0
- /package/.turbo/cache/{138466aaa06fa946.tar.zst → da0461631780f1e1.tar.zst} +0 -0
- /package/.turbo/cache/{075034ccdb82fbea.tar.zst → dbdfe30495790f74.tar.zst} +0 -0
- /package/.turbo/cache/{ac98992ca27cd36e.tar.zst → dea41fd4a13eb241.tar.zst} +0 -0
- /package/.turbo/cache/{6bfd7cffad1e6b8a.tar.zst → e229b033acee0336.tar.zst} +0 -0
- /package/.turbo/cache/{e64bd75c16c140f3.tar.zst → ed401f9a734e292c.tar.zst} +0 -0
- /package/.turbo/cache/{cf74604f39b00f11.tar.zst → f272ad05432871ac.tar.zst} +0 -0
|
@@ -0,0 +1,325 @@
|
|
|
1
|
+
// TODO: Make it this when TS suports that.
|
|
2
|
+
// import {ModifierName, ForegroundColor, BackgroundColor, ColorName} from '#ansi-styles';
|
|
3
|
+
// import {ColorInfo, ColorSupportLevel} from '#supports-color';
|
|
4
|
+
import {
|
|
5
|
+
ModifierName,
|
|
6
|
+
ForegroundColorName,
|
|
7
|
+
BackgroundColorName,
|
|
8
|
+
ColorName,
|
|
9
|
+
} from './vendor/ansi-styles/index.js';
|
|
10
|
+
import {ColorInfo, ColorSupportLevel} from './vendor/supports-color/index.js';
|
|
11
|
+
|
|
12
|
+
export interface Options {
|
|
13
|
+
/**
|
|
14
|
+
Specify the color support for Chalk.
|
|
15
|
+
|
|
16
|
+
By default, color support is automatically detected based on the environment.
|
|
17
|
+
|
|
18
|
+
Levels:
|
|
19
|
+
- `0` - All colors disabled.
|
|
20
|
+
- `1` - Basic 16 colors support.
|
|
21
|
+
- `2` - ANSI 256 colors support.
|
|
22
|
+
- `3` - Truecolor 16 million colors support.
|
|
23
|
+
*/
|
|
24
|
+
readonly level?: ColorSupportLevel;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
Return a new Chalk instance.
|
|
29
|
+
*/
|
|
30
|
+
export const Chalk: new (options?: Options) => ChalkInstance; // eslint-disable-line @typescript-eslint/naming-convention
|
|
31
|
+
|
|
32
|
+
export interface ChalkInstance {
|
|
33
|
+
(...text: unknown[]): string;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
The color support for Chalk.
|
|
37
|
+
|
|
38
|
+
By default, color support is automatically detected based on the environment.
|
|
39
|
+
|
|
40
|
+
Levels:
|
|
41
|
+
- `0` - All colors disabled.
|
|
42
|
+
- `1` - Basic 16 colors support.
|
|
43
|
+
- `2` - ANSI 256 colors support.
|
|
44
|
+
- `3` - Truecolor 16 million colors support.
|
|
45
|
+
*/
|
|
46
|
+
level: ColorSupportLevel;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
Use RGB values to set text color.
|
|
50
|
+
|
|
51
|
+
@example
|
|
52
|
+
```
|
|
53
|
+
import chalk from 'chalk';
|
|
54
|
+
|
|
55
|
+
chalk.rgb(222, 173, 237);
|
|
56
|
+
```
|
|
57
|
+
*/
|
|
58
|
+
rgb: (red: number, green: number, blue: number) => this;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
Use HEX value to set text color.
|
|
62
|
+
|
|
63
|
+
@param color - Hexadecimal value representing the desired color.
|
|
64
|
+
|
|
65
|
+
@example
|
|
66
|
+
```
|
|
67
|
+
import chalk from 'chalk';
|
|
68
|
+
|
|
69
|
+
chalk.hex('#DEADED');
|
|
70
|
+
```
|
|
71
|
+
*/
|
|
72
|
+
hex: (color: string) => this;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
Use an [8-bit unsigned number](https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit) to set text color.
|
|
76
|
+
|
|
77
|
+
@example
|
|
78
|
+
```
|
|
79
|
+
import chalk from 'chalk';
|
|
80
|
+
|
|
81
|
+
chalk.ansi256(201);
|
|
82
|
+
```
|
|
83
|
+
*/
|
|
84
|
+
ansi256: (index: number) => this;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
Use RGB values to set background color.
|
|
88
|
+
|
|
89
|
+
@example
|
|
90
|
+
```
|
|
91
|
+
import chalk from 'chalk';
|
|
92
|
+
|
|
93
|
+
chalk.bgRgb(222, 173, 237);
|
|
94
|
+
```
|
|
95
|
+
*/
|
|
96
|
+
bgRgb: (red: number, green: number, blue: number) => this;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
Use HEX value to set background color.
|
|
100
|
+
|
|
101
|
+
@param color - Hexadecimal value representing the desired color.
|
|
102
|
+
|
|
103
|
+
@example
|
|
104
|
+
```
|
|
105
|
+
import chalk from 'chalk';
|
|
106
|
+
|
|
107
|
+
chalk.bgHex('#DEADED');
|
|
108
|
+
```
|
|
109
|
+
*/
|
|
110
|
+
bgHex: (color: string) => this;
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
Use a [8-bit unsigned number](https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit) to set background color.
|
|
114
|
+
|
|
115
|
+
@example
|
|
116
|
+
```
|
|
117
|
+
import chalk from 'chalk';
|
|
118
|
+
|
|
119
|
+
chalk.bgAnsi256(201);
|
|
120
|
+
```
|
|
121
|
+
*/
|
|
122
|
+
bgAnsi256: (index: number) => this;
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
Modifier: Reset the current style.
|
|
126
|
+
*/
|
|
127
|
+
readonly reset: this;
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
Modifier: Make the text bold.
|
|
131
|
+
*/
|
|
132
|
+
readonly bold: this;
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
Modifier: Make the text have lower opacity.
|
|
136
|
+
*/
|
|
137
|
+
readonly dim: this;
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
Modifier: Make the text italic. *(Not widely supported)*
|
|
141
|
+
*/
|
|
142
|
+
readonly italic: this;
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
Modifier: Put a horizontal line below the text. *(Not widely supported)*
|
|
146
|
+
*/
|
|
147
|
+
readonly underline: this;
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
Modifier: Put a horizontal line above the text. *(Not widely supported)*
|
|
151
|
+
*/
|
|
152
|
+
readonly overline: this;
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
Modifier: Invert background and foreground colors.
|
|
156
|
+
*/
|
|
157
|
+
readonly inverse: this;
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
Modifier: Print the text but make it invisible.
|
|
161
|
+
*/
|
|
162
|
+
readonly hidden: this;
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
Modifier: Puts a horizontal line through the center of the text. *(Not widely supported)*
|
|
166
|
+
*/
|
|
167
|
+
readonly strikethrough: this;
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
Modifier: Print the text only when Chalk has a color level above zero.
|
|
171
|
+
|
|
172
|
+
Can be useful for things that are purely cosmetic.
|
|
173
|
+
*/
|
|
174
|
+
readonly visible: this;
|
|
175
|
+
|
|
176
|
+
readonly black: this;
|
|
177
|
+
readonly red: this;
|
|
178
|
+
readonly green: this;
|
|
179
|
+
readonly yellow: this;
|
|
180
|
+
readonly blue: this;
|
|
181
|
+
readonly magenta: this;
|
|
182
|
+
readonly cyan: this;
|
|
183
|
+
readonly white: this;
|
|
184
|
+
|
|
185
|
+
/*
|
|
186
|
+
Alias for `blackBright`.
|
|
187
|
+
*/
|
|
188
|
+
readonly gray: this;
|
|
189
|
+
|
|
190
|
+
/*
|
|
191
|
+
Alias for `blackBright`.
|
|
192
|
+
*/
|
|
193
|
+
readonly grey: this;
|
|
194
|
+
|
|
195
|
+
readonly blackBright: this;
|
|
196
|
+
readonly redBright: this;
|
|
197
|
+
readonly greenBright: this;
|
|
198
|
+
readonly yellowBright: this;
|
|
199
|
+
readonly blueBright: this;
|
|
200
|
+
readonly magentaBright: this;
|
|
201
|
+
readonly cyanBright: this;
|
|
202
|
+
readonly whiteBright: this;
|
|
203
|
+
|
|
204
|
+
readonly bgBlack: this;
|
|
205
|
+
readonly bgRed: this;
|
|
206
|
+
readonly bgGreen: this;
|
|
207
|
+
readonly bgYellow: this;
|
|
208
|
+
readonly bgBlue: this;
|
|
209
|
+
readonly bgMagenta: this;
|
|
210
|
+
readonly bgCyan: this;
|
|
211
|
+
readonly bgWhite: this;
|
|
212
|
+
|
|
213
|
+
/*
|
|
214
|
+
Alias for `bgBlackBright`.
|
|
215
|
+
*/
|
|
216
|
+
readonly bgGray: this;
|
|
217
|
+
|
|
218
|
+
/*
|
|
219
|
+
Alias for `bgBlackBright`.
|
|
220
|
+
*/
|
|
221
|
+
readonly bgGrey: this;
|
|
222
|
+
|
|
223
|
+
readonly bgBlackBright: this;
|
|
224
|
+
readonly bgRedBright: this;
|
|
225
|
+
readonly bgGreenBright: this;
|
|
226
|
+
readonly bgYellowBright: this;
|
|
227
|
+
readonly bgBlueBright: this;
|
|
228
|
+
readonly bgMagentaBright: this;
|
|
229
|
+
readonly bgCyanBright: this;
|
|
230
|
+
readonly bgWhiteBright: this;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
Main Chalk object that allows to chain styles together.
|
|
235
|
+
|
|
236
|
+
Call the last one as a method with a string argument.
|
|
237
|
+
|
|
238
|
+
Order doesn't matter, and later styles take precedent in case of a conflict.
|
|
239
|
+
|
|
240
|
+
This simply means that `chalk.red.yellow.green` is equivalent to `chalk.green`.
|
|
241
|
+
*/
|
|
242
|
+
declare const chalk: ChalkInstance;
|
|
243
|
+
|
|
244
|
+
export const supportsColor: ColorInfo;
|
|
245
|
+
|
|
246
|
+
export const chalkStderr: typeof chalk;
|
|
247
|
+
export const supportsColorStderr: typeof supportsColor;
|
|
248
|
+
|
|
249
|
+
export {
|
|
250
|
+
ModifierName, ForegroundColorName, BackgroundColorName, ColorName,
|
|
251
|
+
modifierNames, foregroundColorNames, backgroundColorNames, colorNames,
|
|
252
|
+
// } from '#ansi-styles';
|
|
253
|
+
} from './vendor/ansi-styles/index.js';
|
|
254
|
+
|
|
255
|
+
export {
|
|
256
|
+
ColorInfo,
|
|
257
|
+
ColorSupport,
|
|
258
|
+
ColorSupportLevel,
|
|
259
|
+
// } from '#supports-color';
|
|
260
|
+
} from './vendor/supports-color/index.js';
|
|
261
|
+
|
|
262
|
+
// TODO: Remove these aliases in the next major version
|
|
263
|
+
/**
|
|
264
|
+
@deprecated Use `ModifierName` instead.
|
|
265
|
+
|
|
266
|
+
Basic modifier names.
|
|
267
|
+
*/
|
|
268
|
+
export type Modifiers = ModifierName;
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
@deprecated Use `ForegroundColorName` instead.
|
|
272
|
+
|
|
273
|
+
Basic foreground color names.
|
|
274
|
+
|
|
275
|
+
[More colors here.](https://github.com/chalk/chalk/blob/main/readme.md#256-and-truecolor-color-support)
|
|
276
|
+
*/
|
|
277
|
+
export type ForegroundColor = ForegroundColorName;
|
|
278
|
+
|
|
279
|
+
/**
|
|
280
|
+
@deprecated Use `BackgroundColorName` instead.
|
|
281
|
+
|
|
282
|
+
Basic background color names.
|
|
283
|
+
|
|
284
|
+
[More colors here.](https://github.com/chalk/chalk/blob/main/readme.md#256-and-truecolor-color-support)
|
|
285
|
+
*/
|
|
286
|
+
export type BackgroundColor = BackgroundColorName;
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
@deprecated Use `ColorName` instead.
|
|
290
|
+
|
|
291
|
+
Basic color names. The combination of foreground and background color names.
|
|
292
|
+
|
|
293
|
+
[More colors here.](https://github.com/chalk/chalk/blob/main/readme.md#256-and-truecolor-color-support)
|
|
294
|
+
*/
|
|
295
|
+
export type Color = ColorName;
|
|
296
|
+
|
|
297
|
+
/**
|
|
298
|
+
@deprecated Use `modifierNames` instead.
|
|
299
|
+
|
|
300
|
+
Basic modifier names.
|
|
301
|
+
*/
|
|
302
|
+
export const modifiers: readonly Modifiers[];
|
|
303
|
+
|
|
304
|
+
/**
|
|
305
|
+
@deprecated Use `foregroundColorNames` instead.
|
|
306
|
+
|
|
307
|
+
Basic foreground color names.
|
|
308
|
+
*/
|
|
309
|
+
export const foregroundColors: readonly ForegroundColor[];
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
@deprecated Use `backgroundColorNames` instead.
|
|
313
|
+
|
|
314
|
+
Basic background color names.
|
|
315
|
+
*/
|
|
316
|
+
export const backgroundColors: readonly BackgroundColor[];
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
@deprecated Use `colorNames` instead.
|
|
320
|
+
|
|
321
|
+
Basic color names. The combination of foreground and background color names.
|
|
322
|
+
*/
|
|
323
|
+
export const colors: readonly Color[];
|
|
324
|
+
|
|
325
|
+
export default chalk;
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
import ansiStyles from '#ansi-styles';
|
|
2
|
+
import supportsColor from '#supports-color';
|
|
3
|
+
import { // eslint-disable-line import/order
|
|
4
|
+
stringReplaceAll,
|
|
5
|
+
stringEncaseCRLFWithFirstIndex,
|
|
6
|
+
} from './utilities.js';
|
|
7
|
+
|
|
8
|
+
const {stdout: stdoutColor, stderr: stderrColor} = supportsColor;
|
|
9
|
+
|
|
10
|
+
const GENERATOR = Symbol('GENERATOR');
|
|
11
|
+
const STYLER = Symbol('STYLER');
|
|
12
|
+
const IS_EMPTY = Symbol('IS_EMPTY');
|
|
13
|
+
|
|
14
|
+
// `supportsColor.level` → `ansiStyles.color[name]` mapping
|
|
15
|
+
const levelMapping = [
|
|
16
|
+
'ansi',
|
|
17
|
+
'ansi',
|
|
18
|
+
'ansi256',
|
|
19
|
+
'ansi16m',
|
|
20
|
+
];
|
|
21
|
+
|
|
22
|
+
const styles = Object.create(null);
|
|
23
|
+
|
|
24
|
+
const applyOptions = (object, options = {}) => {
|
|
25
|
+
if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
|
|
26
|
+
throw new Error('The `level` option should be an integer from 0 to 3');
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// Detect level if not set manually
|
|
30
|
+
const colorLevel = stdoutColor ? stdoutColor.level : 0;
|
|
31
|
+
object.level = options.level === undefined ? colorLevel : options.level;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export class Chalk {
|
|
35
|
+
constructor(options) {
|
|
36
|
+
// eslint-disable-next-line no-constructor-return
|
|
37
|
+
return chalkFactory(options);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const chalkFactory = options => {
|
|
42
|
+
const chalk = (...strings) => strings.join(' ');
|
|
43
|
+
applyOptions(chalk, options);
|
|
44
|
+
|
|
45
|
+
Object.setPrototypeOf(chalk, createChalk.prototype);
|
|
46
|
+
|
|
47
|
+
return chalk;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
function createChalk(options) {
|
|
51
|
+
return chalkFactory(options);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
Object.setPrototypeOf(createChalk.prototype, Function.prototype);
|
|
55
|
+
|
|
56
|
+
for (const [styleName, style] of Object.entries(ansiStyles)) {
|
|
57
|
+
styles[styleName] = {
|
|
58
|
+
get() {
|
|
59
|
+
const builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);
|
|
60
|
+
Object.defineProperty(this, styleName, {value: builder});
|
|
61
|
+
return builder;
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
styles.visible = {
|
|
67
|
+
get() {
|
|
68
|
+
const builder = createBuilder(this, this[STYLER], true);
|
|
69
|
+
Object.defineProperty(this, 'visible', {value: builder});
|
|
70
|
+
return builder;
|
|
71
|
+
},
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
const getModelAnsi = (model, level, type, ...arguments_) => {
|
|
75
|
+
if (model === 'rgb') {
|
|
76
|
+
if (level === 'ansi16m') {
|
|
77
|
+
return ansiStyles[type].ansi16m(...arguments_);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
if (level === 'ansi256') {
|
|
81
|
+
return ansiStyles[type].ansi256(ansiStyles.rgbToAnsi256(...arguments_));
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return ansiStyles[type].ansi(ansiStyles.rgbToAnsi(...arguments_));
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
if (model === 'hex') {
|
|
88
|
+
return getModelAnsi('rgb', level, type, ...ansiStyles.hexToRgb(...arguments_));
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
return ansiStyles[type][model](...arguments_);
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
const usedModels = ['rgb', 'hex', 'ansi256'];
|
|
95
|
+
|
|
96
|
+
for (const model of usedModels) {
|
|
97
|
+
styles[model] = {
|
|
98
|
+
get() {
|
|
99
|
+
const {level} = this;
|
|
100
|
+
return function (...arguments_) {
|
|
101
|
+
const styler = createStyler(getModelAnsi(model, levelMapping[level], 'color', ...arguments_), ansiStyles.color.close, this[STYLER]);
|
|
102
|
+
return createBuilder(this, styler, this[IS_EMPTY]);
|
|
103
|
+
};
|
|
104
|
+
},
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
const bgModel = 'bg' + model[0].toUpperCase() + model.slice(1);
|
|
108
|
+
styles[bgModel] = {
|
|
109
|
+
get() {
|
|
110
|
+
const {level} = this;
|
|
111
|
+
return function (...arguments_) {
|
|
112
|
+
const styler = createStyler(getModelAnsi(model, levelMapping[level], 'bgColor', ...arguments_), ansiStyles.bgColor.close, this[STYLER]);
|
|
113
|
+
return createBuilder(this, styler, this[IS_EMPTY]);
|
|
114
|
+
};
|
|
115
|
+
},
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
const proto = Object.defineProperties(() => {}, {
|
|
120
|
+
...styles,
|
|
121
|
+
level: {
|
|
122
|
+
enumerable: true,
|
|
123
|
+
get() {
|
|
124
|
+
return this[GENERATOR].level;
|
|
125
|
+
},
|
|
126
|
+
set(level) {
|
|
127
|
+
this[GENERATOR].level = level;
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
const createStyler = (open, close, parent) => {
|
|
133
|
+
let openAll;
|
|
134
|
+
let closeAll;
|
|
135
|
+
if (parent === undefined) {
|
|
136
|
+
openAll = open;
|
|
137
|
+
closeAll = close;
|
|
138
|
+
} else {
|
|
139
|
+
openAll = parent.openAll + open;
|
|
140
|
+
closeAll = close + parent.closeAll;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
return {
|
|
144
|
+
open,
|
|
145
|
+
close,
|
|
146
|
+
openAll,
|
|
147
|
+
closeAll,
|
|
148
|
+
parent,
|
|
149
|
+
};
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
const createBuilder = (self, _styler, _isEmpty) => {
|
|
153
|
+
// Single argument is hot path, implicit coercion is faster than anything
|
|
154
|
+
// eslint-disable-next-line no-implicit-coercion
|
|
155
|
+
const builder = (...arguments_) => applyStyle(builder, (arguments_.length === 1) ? ('' + arguments_[0]) : arguments_.join(' '));
|
|
156
|
+
|
|
157
|
+
// We alter the prototype because we must return a function, but there is
|
|
158
|
+
// no way to create a function with a different prototype
|
|
159
|
+
Object.setPrototypeOf(builder, proto);
|
|
160
|
+
|
|
161
|
+
builder[GENERATOR] = self;
|
|
162
|
+
builder[STYLER] = _styler;
|
|
163
|
+
builder[IS_EMPTY] = _isEmpty;
|
|
164
|
+
|
|
165
|
+
return builder;
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
const applyStyle = (self, string) => {
|
|
169
|
+
if (self.level <= 0 || !string) {
|
|
170
|
+
return self[IS_EMPTY] ? '' : string;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
let styler = self[STYLER];
|
|
174
|
+
|
|
175
|
+
if (styler === undefined) {
|
|
176
|
+
return string;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
const {openAll, closeAll} = styler;
|
|
180
|
+
if (string.includes('\u001B')) {
|
|
181
|
+
while (styler !== undefined) {
|
|
182
|
+
// Replace any instances already present with a re-opening code
|
|
183
|
+
// otherwise only the part of the string until said closing code
|
|
184
|
+
// will be colored, and the rest will simply be 'plain'.
|
|
185
|
+
string = stringReplaceAll(string, styler.close, styler.open);
|
|
186
|
+
|
|
187
|
+
styler = styler.parent;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
// We can move both next actions out of loop, because remaining actions in loop won't have
|
|
192
|
+
// any/visible effect on parts we add here. Close the styling before a linebreak and reopen
|
|
193
|
+
// after next line to fix a bleed issue on macOS: https://github.com/chalk/chalk/pull/92
|
|
194
|
+
const lfIndex = string.indexOf('\n');
|
|
195
|
+
if (lfIndex !== -1) {
|
|
196
|
+
string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
return openAll + string + closeAll;
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
Object.defineProperties(createChalk.prototype, styles);
|
|
203
|
+
|
|
204
|
+
const chalk = createChalk();
|
|
205
|
+
export const chalkStderr = createChalk({level: stderrColor ? stderrColor.level : 0});
|
|
206
|
+
|
|
207
|
+
export {
|
|
208
|
+
modifierNames,
|
|
209
|
+
foregroundColorNames,
|
|
210
|
+
backgroundColorNames,
|
|
211
|
+
colorNames,
|
|
212
|
+
|
|
213
|
+
// TODO: Remove these aliases in the next major version
|
|
214
|
+
modifierNames as modifiers,
|
|
215
|
+
foregroundColorNames as foregroundColors,
|
|
216
|
+
backgroundColorNames as backgroundColors,
|
|
217
|
+
colorNames as colors,
|
|
218
|
+
} from './vendor/ansi-styles/index.js';
|
|
219
|
+
|
|
220
|
+
export {
|
|
221
|
+
stdoutColor as supportsColor,
|
|
222
|
+
stderrColor as supportsColorStderr,
|
|
223
|
+
};
|
|
224
|
+
|
|
225
|
+
export default chalk;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// TODO: When targeting Node.js 16, use `String.prototype.replaceAll`.
|
|
2
|
+
export function stringReplaceAll(string, substring, replacer) {
|
|
3
|
+
let index = string.indexOf(substring);
|
|
4
|
+
if (index === -1) {
|
|
5
|
+
return string;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
const substringLength = substring.length;
|
|
9
|
+
let endIndex = 0;
|
|
10
|
+
let returnValue = '';
|
|
11
|
+
do {
|
|
12
|
+
returnValue += string.slice(endIndex, index) + substring + replacer;
|
|
13
|
+
endIndex = index + substringLength;
|
|
14
|
+
index = string.indexOf(substring, endIndex);
|
|
15
|
+
} while (index !== -1);
|
|
16
|
+
|
|
17
|
+
returnValue += string.slice(endIndex);
|
|
18
|
+
return returnValue;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
|
|
22
|
+
let endIndex = 0;
|
|
23
|
+
let returnValue = '';
|
|
24
|
+
do {
|
|
25
|
+
const gotCR = string[index - 1] === '\r';
|
|
26
|
+
returnValue += string.slice(endIndex, (gotCR ? index - 1 : index)) + prefix + (gotCR ? '\r\n' : '\n') + postfix;
|
|
27
|
+
endIndex = index + 1;
|
|
28
|
+
index = string.indexOf('\n', endIndex);
|
|
29
|
+
} while (index !== -1);
|
|
30
|
+
|
|
31
|
+
returnValue += string.slice(endIndex);
|
|
32
|
+
return returnValue;
|
|
33
|
+
}
|