{"_id":"@ardeshiiiiir/storybook-darkmode-addon","_rev":"1-0fdebf92e844ef181a41952ac5b2cca6","name":"@ardeshiiiiir/storybook-darkmode-addon","dist-tags":{"latest":"0.0.2"},"versions":{"0.0.1":{"name":"@ardeshiiiiir/storybook-darkmode-addon","version":"0.0.1","description":"Switching between themes by changing data attribute","keywords":["storybook-addons","storybook-addons"],"repository":{"type":"git","url":"git+https://github.com/finishedcoot/storybook-darkmode-data-attribute.git"},"author":{"name":"ardeshir","email":"ardeshiir@outlook.com"},"license":"MIT","exports":{".":{"require":"./dist/index.js","import":"./dist/index.mjs","types":"./dist/index.d.ts"},"./manager":{"require":"./dist/manager.js","import":"./dist/manager.mjs","types":"./dist/manager.d.ts"},"./preview":{"require":"./dist/preview.js","import":"./dist/preview.mjs","types":"./dist/preview.d.ts"},"./package.json":"./package.json"},"main":"dist/index.js","module":"dist/index.mjs","types":"dist/index.d.ts","scripts":{"clean":"rimraf ./dist","prebuild":"yarn clean","build":"tsup","build:watch":"yarn build --watch","test":"echo \"Error: no test specified\" && exit 1","start":"run-p build:watch 'storybook --quiet'","prerelease":"zx scripts/prepublish-checks.mjs","release":"yarn build && auto shipit","eject-ts":"zx scripts/eject-typescript.mjs","storybook":"storybook dev -p 6006","build-storybook":"storybook build"},"devDependencies":{"@storybook/addon-essentials":"^7.0.0","@storybook/addon-interactions":"^7.0.0","@storybook/addon-links":"^7.0.0","@storybook/react":"^7.0.0","@storybook/react-vite":"^7.0.0","@storybook/testing-library":"^0.0.14-next.1","@types/node":"^18.15.0","@types/react":"^18.0.34","@vitejs/plugin-react":"^3.1.0","auto":"^10.3.0","boxen":"^5.0.1","dedent":"^0.7.0","npm-run-all":"^4.1.5","prettier":"^2.3.1","prompts":"^2.4.2","prop-types":"^15.8.1","react":"^18.0.0","react-dom":"^18.0.0","rimraf":"^3.0.2","storybook":"^7.0.0","tsup":"^6.6.3","typescript":"^4.9.5","vite":"^4.1.4","zx":"^1.14.1"},"peerDependencies":{"@storybook/blocks":"^7.0.0","@storybook/components":"^7.0.0","@storybook/core-events":"^7.0.0","@storybook/manager-api":"^7.0.0","@storybook/preview-api":"^7.0.0","@storybook/theming":"^7.0.0","@storybook/types":"^7.0.0","react":"^16.8.0 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0"},"peerDependenciesMeta":{"react":{"optional":true},"react-dom":{"optional":true}},"publishConfig":{"access":"public"},"storybook":{"displayName":"darkmode","supportedFrameworks":["react"],"icon":"https://user-images.githubusercontent.com/321738/63501763-88dbf600-c4cc-11e9-96cd-94adadc2fd72.png"},"dependencies":{"@storybook/addons":"^7.2.1"},"gitHead":"a82145e257644d55d42dd8acf2a8553f980ff13b","bugs":{"url":"https://github.com/finishedcoot/storybook-darkmode-data-attribute/issues"},"homepage":"https://github.com/finishedcoot/storybook-darkmode-data-attribute#readme","_id":"@ardeshiiiiir/storybook-darkmode-addon@0.0.1","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-zMEcL57ODP3c3R2XZMxWKNevtKBFOlwm1Tq/HtRKYAJrcIVR1a2T15PgS5/+mSCx832Oz+2Y/A16NLj+dyV4+w==","shasum":"ccaa7f91281d0f364e7c9df76f829fdb8e8bc4b1","tarball":"https://registry.npmjs.org/@ardeshiiiiir/storybook-darkmode-addon/-/storybook-darkmode-addon-0.0.1.tgz","fileCount":20,"unpackedSize":32971,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD0rEdZj4mnsfZqM9xH/rVIbqA3o239ut64SwPlftH++wIhAJcsPaZl9NHEAZ4XHZMLj2bhCm9j85sdPRvP4ijEgfMp"}]},"_npmUser":{"name":"ardeshiiiiir","email":"finishedcoot@gmail.com"},"directories":{},"maintainers":[{"name":"ardeshiiiiir","email":"finishedcoot@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/storybook-darkmode-addon_0.0.1_1691332448348_0.31752795375004417"},"_hasShrinkwrap":false},"0.0.2":{"name":"@ardeshiiiiir/storybook-darkmode-addon","version":"0.0.2","description":"Switching between themes by changing data attribute","keywords":["storybook-addons","storybook-addons"],"repository":{"type":"git","url":"git+https://github.com/finishedcoot/storybook-darkmode-data-attribute.git"},"author":{"name":"ardeshir","email":"ardeshiir@outlook.com"},"license":"MIT","exports":{".":{"require":"./dist/index.js","import":"./dist/index.mjs","types":"./dist/index.d.ts"},"./manager":{"require":"./dist/manager.js","import":"./dist/manager.mjs","types":"./dist/manager.d.ts"},"./preview":{"require":"./dist/preview.js","import":"./dist/preview.mjs","types":"./dist/preview.d.ts"},"./package.json":"./package.json"},"main":"dist/index.js","module":"dist/index.mjs","types":"dist/index.d.ts","scripts":{"clean":"rimraf ./dist","prebuild":"yarn clean","build":"tsup","build:watch":"yarn build --watch","test":"echo \"Error: no test specified\" && exit 1","start":"run-p build:watch 'storybook --quiet'","prerelease":"zx scripts/prepublish-checks.mjs","release":"yarn build && auto shipit","eject-ts":"zx scripts/eject-typescript.mjs","storybook":"storybook dev -p 6006","build-storybook":"storybook build"},"devDependencies":{"@storybook/addon-essentials":"^7.0.0","@storybook/addon-interactions":"^7.0.0","@storybook/addon-links":"^7.0.0","@storybook/react":"^7.0.0","@storybook/react-vite":"^7.0.0","@storybook/testing-library":"^0.0.14-next.1","@types/node":"^18.15.0","@types/react":"^18.0.34","@vitejs/plugin-react":"^3.1.0","auto":"^10.3.0","boxen":"^5.0.1","dedent":"^0.7.0","npm-run-all":"^4.1.5","prettier":"^2.3.1","prompts":"^2.4.2","prop-types":"^15.8.1","react":"^18.0.0","react-dom":"^18.0.0","rimraf":"^3.0.2","storybook":"^7.0.0","tsup":"^6.6.3","typescript":"^4.9.5","vite":"^4.1.4","zx":"^1.14.1"},"peerDependencies":{"@storybook/blocks":"^7.0.0","@storybook/components":"^7.0.0","@storybook/core-events":"^7.0.0","@storybook/manager-api":"^7.0.0","@storybook/preview-api":"^7.0.0","@storybook/theming":"^7.0.0","@storybook/types":"^7.0.0","react":"^16.8.0 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0"},"peerDependenciesMeta":{"react":{"optional":true},"react-dom":{"optional":true}},"publishConfig":{"access":"public"},"storybook":{"displayName":"darkmode","supportedFrameworks":["react"],"icon":"https://user-images.githubusercontent.com/321738/63501763-88dbf600-c4cc-11e9-96cd-94adadc2fd72.png"},"dependencies":{"@ardeshiiiiir/storybook-darkmode-addon":"^0.0.1","@storybook/addons":"^7.2.1"},"gitHead":"a82145e257644d55d42dd8acf2a8553f980ff13b","bugs":{"url":"https://github.com/finishedcoot/storybook-darkmode-data-attribute/issues"},"homepage":"https://github.com/finishedcoot/storybook-darkmode-data-attribute#readme","_id":"@ardeshiiiiir/storybook-darkmode-addon@0.0.2","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-Jm9MFiMQoAmwXhfNYALhJBHPXjSmQdtuuGFQLSix+d/dPGQSxiQPpYv5lRDKxvlqFtZPBNDZSwLFoe+jRslMoQ==","shasum":"ad872b1f04ae5bc34b7d274e59be4eec51d2d644","tarball":"https://registry.npmjs.org/@ardeshiiiiir/storybook-darkmode-addon/-/storybook-darkmode-addon-0.0.2.tgz","fileCount":20,"unpackedSize":33028,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDJzS19ZdCxL9K5/tae+auYfuGsou80YNUfawQHeKjn7AIgEM9rAfRD70bli7dYeMcVtaOZJni+XZsn+55Vtlcn4rU="}]},"_npmUser":{"name":"ardeshiiiiir","email":"finishedcoot@gmail.com"},"directories":{},"maintainers":[{"name":"ardeshiiiiir","email":"finishedcoot@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/storybook-darkmode-addon_0.0.2_1691333625529_0.44609305606317706"},"_hasShrinkwrap":false}},"time":{"created":"2023-08-06T14:34:08.285Z","0.0.1":"2023-08-06T14:34:08.540Z","modified":"2023-08-06T14:53:45.802Z","0.0.2":"2023-08-06T14:53:45.672Z"},"maintainers":[{"name":"ardeshiiiiir","email":"finishedcoot@gmail.com"}],"description":"Switching between themes by changing data attribute","homepage":"https://github.com/finishedcoot/storybook-darkmode-data-attribute#readme","keywords":["storybook-addons","storybook-addons"],"repository":{"type":"git","url":"git+https://github.com/finishedcoot/storybook-darkmode-data-attribute.git"},"author":{"name":"ardeshir","email":"ardeshiir@outlook.com"},"bugs":{"url":"https://github.com/finishedcoot/storybook-darkmode-data-attribute/issues"},"license":"MIT","readme":"# Storybook Addon darkmode\nSwitching between themes by changing data attribute\r\n\r\n### Development scripts\r\n\r\n- `yarn start` runs babel in watch mode and starts Storybook\r\n- `yarn build` build and package your addon code\r\n\r\n### Switch from TypeScript to JavaScript\r\n\r\nDon't want to use TypeScript? We offer a handy eject command: `yarn eject-ts`\r\n\r\nThis will convert all code to JS. It is a destructive process, so we recommended running this before you start writing any code.\r\n\r\n## What's included?\r\n\r\n![Demo](https://user-images.githubusercontent.com/42671/107857205-e7044380-6dfa-11eb-8718-ad02e3ba1a3f.gif)\r\n\r\nThe addon code lives in `src`. It demonstrates all core addon related concepts. The three [UI paradigms](https://storybook.js.org/docs/react/addons/addon-types#ui-based-addons)\r\n\r\n- `src/Tool.tsx`\r\n- `src/Panel.tsx`\r\n- `src/Tab.tsx`\r\n\r\nWhich, along with the addon itself, are registered in `src/manager.ts`.\r\n\r\nManaging State and interacting with a story:\r\n\r\n- `src/withGlobals.ts` & `src/Tool.tsx` demonstrates how to use `useGlobals` to manage global state and modify the contents of a Story.\r\n- `src/withRoundTrip.ts` & `src/Panel.tsx` demonstrates two-way communication using channels.\r\n- `src/Tab.tsx` demonstrates how to use `useParameter` to access the current story's parameters.\r\n\r\nYour addon might use one or more of these patterns. Feel free to delete unused code. Update `src/manager.ts` and `src/preview.ts` accordingly.\r\n\r\nLastly, configure you addon name in `src/constants.ts`.\r\n\r\n### Metadata\r\n\r\nStorybook addons are listed in the [catalog](https://storybook.js.org/addons) and distributed via npm. The catalog is populated by querying npm's registry for Storybook-specific metadata in `package.json`. This project has been configured with sample data. Learn more about available options in the [Addon metadata docs](https://storybook.js.org/docs/react/addons/addon-catalog#addon-metadata).\r\n\r\n## Release Management\r\n\r\n### Setup\r\n\r\nThis project is configured to use [auto](https://github.com/intuit/auto) for release management. It generates a changelog and pushes it to both GitHub and npm. Therefore, you need to configure access to both:\r\n\r\n- [`NPM_TOKEN`](https://docs.npmjs.com/creating-and-viewing-access-tokens#creating-access-tokens) Create a token with both _Read and Publish_ permissions.\r\n- [`GH_TOKEN`](https://github.com/settings/tokens) Create a token with the `repo` scope.\r\n\r\nThen open your `package.json` and edit the following fields:\r\n\r\n- `name`\r\n- `author`\r\n- `repository`\r\n\r\n#### Local\r\n\r\nTo use `auto` locally create a `.env` file at the root of your project and add your tokens to it:\r\n\r\n```bash\r\nGH_TOKEN=<value you just got from GitHub>\r\nNPM_TOKEN=<value you just got from npm>\r\n```\r\n\r\nLastly, **create labels on GitHub**. You’ll use these labels in the future when making changes to the package.\r\n\r\n```bash\r\nnpx auto create-labels\r\n```\r\n\r\nIf you check on GitHub, you’ll now see a set of labels that `auto` would like you to use. Use these to tag future pull requests.\r\n\r\n#### GitHub Actions\r\n\r\nThis template comes with GitHub actions already set up to publish your addon anytime someone pushes to your repository.\r\n\r\nGo to `Settings > Secrets`, click `New repository secret`, and add your `NPM_TOKEN`.\r\n\r\n### Creating a release\r\n\r\nTo create a release locally you can run the following command, otherwise the GitHub action will make the release for you.\r\n\r\n```sh\r\nyarn release\r\n```\r\n\r\nThat will:\r\n\r\n- Build and package the addon code\r\n- Bump the version\r\n- Push a release to GitHub and npm\r\n- Push a changelog to GitHub\r\n","readmeFilename":"README.md"}