├── .github ├── FUNDING.yml └── workflows │ ├── release.yml │ └── test.yml ├── .gitignore ├── CHANGELOG.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── biome.json ├── bun.lock ├── examples ├── rollup │ ├── .gitignore │ ├── README.md │ ├── bun.lock │ ├── package.json │ ├── public │ │ └── index.html │ ├── rollup.config.js │ └── src │ │ ├── App.svelte │ │ └── index.js ├── sveltekit │ ├── .gitignore │ ├── README.md │ ├── bun.lock │ ├── package.json │ ├── src │ │ ├── app.html │ │ └── routes │ │ │ ├── +layout.js │ │ │ └── +page.svelte │ ├── static │ │ └── favicon.png │ ├── svelte.config.js │ ├── tsconfig.json │ └── vite.config.js ├── vite │ ├── .gitignore │ ├── README.md │ ├── bun.lock │ ├── index.html │ ├── package.json │ ├── src │ │ └── App.svelte │ ├── tsconfig.json │ └── vite.config.ts ├── vite@svelte-5 │ ├── .gitignore │ ├── README.md │ ├── bun.lock │ ├── index.html │ ├── package.json │ ├── src │ │ └── App.svelte │ ├── tsconfig.json │ └── vite.config.ts ├── webpack │ ├── .gitignore │ ├── README.md │ ├── bun.lock │ ├── package.json │ ├── src │ │ ├── App.svelte │ │ └── index.ts │ ├── tsconfig.json │ └── webpack.config.mjs └── webpack@svelte-5 │ ├── .gitignore │ ├── README.md │ ├── bun.lock │ ├── package.json │ ├── src │ ├── App.svelte │ └── index.ts │ ├── tsconfig.json │ └── webpack.config.mjs ├── package.json ├── scripts ├── extract-selectors.ts ├── index-components.ts └── upgrade-examples.ts ├── src ├── component-index.ts ├── constants.ts ├── global.d.ts ├── index.ts ├── plugins │ ├── OptimizeCssPlugin.ts │ ├── create-optimized-css.ts │ ├── optimize-css.ts │ └── print-diff.ts ├── preprocessors │ └── optimize-imports.ts └── utils.ts ├── tests ├── OptimizeCssPlugin.test.ts ├── create-optimized-css.test.ts ├── extract-selectors.test.ts ├── optimize-imports.test.ts ├── print-diff.test.ts ├── test-e2e.ts └── utils.test.ts ├── tsconfig.build.json └── tsconfig.json /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: metonym 2 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | on: 2 | push: 3 | tags: 4 | - "v*" 5 | 6 | jobs: 7 | build: 8 | runs-on: macos-latest-xlarge 9 | permissions: 10 | contents: read 11 | id-token: write 12 | steps: 13 | - uses: actions/checkout@v4 14 | - uses: oven-sh/setup-bun@v2 15 | - uses: actions/setup-node@v4 16 | with: 17 | node-version: "20.x" 18 | registry-url: "https://registry.npmjs.org" 19 | 20 | - name: Install dependencies 21 | run: bun install 22 | 23 | - name: Build package 24 | run: | 25 | bun run build 26 | bun run build:prune-package 27 | 28 | - name: Publish to NPM 29 | env: 30 | NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} 31 | run: npm publish --provenance --access public 32 | -------------------------------------------------------------------------------- /.github/workflows/test.yml: -------------------------------------------------------------------------------- 1 | on: 2 | pull_request: 3 | push: 4 | branches: [main] 5 | 6 | jobs: 7 | test: 8 | runs-on: macos-latest-xlarge 9 | steps: 10 | - uses: actions/checkout@v4 11 | - uses: oven-sh/setup-bun@v2 12 | 13 | - name: Install dependencies 14 | run: bun install 15 | 16 | - name: Run unit tests 17 | run: bun run test 18 | 19 | - name: Run e2e tests 20 | run: bun run test:e2e 21 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | dist 4 | build 5 | public/build/ 6 | .svelte-kit 7 | *.tgz -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), 6 | and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 7 | 8 | ## [0.11.11](https://github.com/carbon-design-system/carbon-preprocess-svelte/releases/tag/v0.11.11) - 2025-02-27 9 | 10 | **Fixes** 11 | 12 | - `optimizeImports`: preserve type imports 13 | 14 | ## [0.11.10](https://github.com/carbon-design-system/carbon-preprocess-svelte/releases/tag/v0.11.10) - 2025-01-19 15 | 16 | **Fixes** 17 | 18 | - `optimizeCss`: update component index to include nested component selectors 19 | 20 | ## [0.11.9](https://github.com/carbon-design-system/carbon-preprocess-svelte/releases/tag/v0.11.9) - 2024-12-09 21 | 22 | **Features** 23 | 24 | - `optimizeImports`: re-index `carbon-components-svelte@0.87` components to support `toHierarchy` 25 | 26 | **Fixes** 27 | 28 | - `optimizeImports`: append line break to optimized path 29 | 30 | ## [0.11.8](https://github.com/carbon-design-system/carbon-preprocess-svelte/releases/tag/v0.11.8) - 2024-11-30 31 | 32 | **Fixes** 33 | 34 | - de-dupe selectors in component index 35 | - preserve comments in TypeScript definitions 36 | 37 | ## [0.11.7](https://github.com/carbon-design-system/carbon-preprocess-svelte/releases/tag/v0.11.7) - 2024-09-18 38 | 39 | **Fixes** 40 | 41 | - fix `OptimizeCssPlugin` to convert buffer to string 42 | - patch `postcss` and `postcss-discard-empty` dependencies 43 | 44 | ## [0.11.6](https://github.com/carbon-design-system/carbon-preprocess-svelte/releases/tag/v0.11.6) - 2024-08-20 45 | 46 | **Fixes** 47 | 48 | - remove code comments from transpiled code 49 | 50 | ## [0.11.5](https://github.com/carbon-design-system/carbon-preprocess-svelte/releases/tag/v0.11.5) - 2024-07-28 51 | 52 | **Fixes** 53 | 54 | - omit pretty printing component index to reduce package size 55 | 56 | ## [0.11.4](https://github.com/carbon-design-system/carbon-preprocess-svelte/releases/tag/v0.11.4) - 2024-07-28 57 | 58 | **Fixes** 59 | 60 | - `optimizeCss`: do not remove custom `@font-face` rules if `preserveAllIBMFonts` is `false` 61 | 62 | ## [0.11.3](https://github.com/carbon-design-system/carbon-preprocess-svelte/releases/tag/v0.11.3) - 2024-04-29 63 | 64 | **Fixes** 65 | 66 | - `optimizeImports`: use `walk` from `estree-walker` directly for Svelte 5 compatibility 67 | 68 | ## [0.11.2](https://github.com/carbon-design-system/carbon-preprocess-svelte/releases/tag/v0.11.2) - 2024-04-08 69 | 70 | **Fixes** 71 | 72 | - `optimizeCss`: do not print diff if value is zero 73 | 74 | ## [0.11.1](https://github.com/carbon-design-system/carbon-preprocess-svelte/releases/tag/v0.11.1) - 2024-04-07 75 | 76 | **Fixes** 77 | 78 | - `optimizeCss`: only remove selectors containing the Carbon `bx--` prefix 79 | 80 | ## [0.11.0](https://github.com/carbon-design-system/carbon-preprocess-svelte/releases/tag/v0.11.0) - 2024-03-23 81 | 82 | **Breaking Changes** 83 | 84 | - Remove all preprocessors except for `optimizeImports` 85 | - `optimizeImports`: drop support for `carbon-icons-svelte` version 10, `carbon-pictograms-svelte` version 10 86 | - Rewrite `optimizeCss` plugin from scratch; it's now offered as a Vite/Rollup/Webpack plugin. `carbon-components-svelte@0.85.0` or greater is required 87 | 88 | ## [0.10.0](https://github.com/carbon-design-system/carbon-preprocess-svelte/releases/tag/v0.10.0) - 2023-07-23 89 | 90 | **Breaking Changes** 91 | 92 | - upgrade `svelte-preprocess` from v4.10.7 to v5.0.3 to support TypeScript 5 93 | 94 | **Fixes** 95 | 96 | - support `carbon-icons-svelte@12` 97 | 98 | ## [0.9.1](https://github.com/carbon-design-system/carbon-preprocess-svelte/releases/tag/v0.9.1) - 2022-06-19 99 | 100 | - bump `svelte-preprocess` from v4.10.5 to v4.10.7 101 | 102 | ## [0.9.0](https://github.com/carbon-design-system/carbon-preprocess-svelte/releases/tag/v0.9.0) - 2022-04-17 103 | 104 | - upgrade `carbon-components-svelte` to v0.63.0 and rebuild components API used by `optimizeImports` 105 | - set latest major version of `carbon-pictograms-svelte` to `12` 106 | 107 | ## [0.8.2](https://github.com/carbon-design-system/carbon-preprocess-svelte/releases/tag/v0.8.2) - 2022-04-10 108 | 109 | - set latest major version of `carbon-icons-svelte` to `11` 110 | 111 | ## [0.8.1](https://github.com/carbon-design-system/carbon-preprocess-svelte/releases/tag/v0.8.1) - 2022-04-10 112 | 113 | - hot fix to re-build components imports map using a non-linked version of `carbon-components-svelte` 114 | 115 | ## [0.8.0](https://github.com/carbon-design-system/carbon-preprocess-svelte/releases/tag/v0.8.0) - 2022-04-10 116 | 117 | - upgrade `@carbon/icons` to v11.0.1 118 | - update `optimizeImports` to support `carbon-icons-svelte@11` component imports 119 | 120 | ## [0.7.0](https://github.com/carbon-design-system/carbon-preprocess-svelte/releases/tag/v0.7.0) - 2022-03-19 121 | 122 | - upgrade `carbon-components-svelte` to v0.62.0 to account for the removed `Copy` component and inlined icon components 123 | 124 | ## [0.6.0](https://github.com/carbon-design-system/carbon-preprocess-svelte/releases/tag/v0.6.0) - 2021-07-11 125 | 126 | - upgrade `carbon-components-svelte` to v0.40.0 to include `Breakpoint`, `Theme` components for `optimizeImports` 127 | 128 | ## [0.5.0](https://github.com/carbon-design-system/carbon-preprocess-svelte/releases/tag/v0.5.0) - 2021-07-05 129 | 130 | - upgrade `carbon-components-svelte` to v0.39.0 to include `RecursiveList`, `TreeView` components for `optimizeImports` 131 | 132 | ## [0.4.0](https://github.com/carbon-design-system/carbon-preprocess-svelte/releases/tag/v0.4.0) - 2021-06-28 133 | 134 | **Features** 135 | 136 | - upgrade `carbon-components-svelte` to v0.38.0 to include `ProgressBar` component for `optimizeImports` 137 | 138 | **Fixes** 139 | 140 | - default `include` preprocessor entry test regex to high-level test option 141 | 142 | ## [0.3.0](https://github.com/carbon-design-system/carbon-preprocess-svelte/releases/tag/v0.3.0) - 2021-05-21 143 | 144 | **Features** 145 | 146 | - add `test` option to `include` preprocessor to filter filenames 147 | 148 | **Fixes** 149 | 150 | - support custom `test` regex per script/markup object in `include` preprocessor 151 | 152 | ## [0.2.0](https://github.com/carbon-design-system/carbon-preprocess-svelte/releases/tag/v0.2.0) - 2021-05-21 153 | 154 | **Features** 155 | 156 | - add `include` preprocessor that prepends or appends arbitrary content to the script and markup blocks 157 | 158 | **Documentation** 159 | 160 | - enrich preprocessor descriptions 161 | - simplify sample SvelteKit set-up 162 | 163 | ## [0.1.0](https://github.com/carbon-design-system/carbon-preprocess-svelte/releases/tag/v0.1.0) - 2021-05-11 164 | 165 | **Documentation** 166 | 167 | - improve preprocessor descriptions, add sample SvelteKit set-up 168 | 169 | ## [0.1.0-rc.5](https://github.com/carbon-design-system/carbon-preprocess-svelte/releases/tag/v0.1.0-rc.5) - 2021-05-11 170 | 171 | **Fixes** 172 | 173 | - add separate entry point for CJS bundle 174 | 175 | ## [0.1.0-rc.4](https://github.com/carbon-design-system/carbon-preprocess-svelte/releases/tag/v0.1.0-rc.4) - 2021-05-10 176 | 177 | **Fixes** 178 | 179 | - add TypeScript as a direct dependency 180 | 181 | ## [0.1.0-rc.3](https://github.com/carbon-design-system/carbon-preprocess-svelte/releases/tag/v0.1.0-rc.3) - 2021-05-10 182 | 183 | **Features** 184 | 185 | - use `svelte-preprocess` in the `optimizeCss` plugin to parse TypeScript syntax in Svelte components 186 | 187 | **Documentation** 188 | 189 | - list available theme options for the `elements` preprocessor 190 | 191 | ## [0.1.0-rc.2](https://github.com/carbon-design-system/carbon-preprocess-svelte/releases/tag/v0.1.0-rc.2) - 2021-05-08 192 | 193 | **Fixes** 194 | 195 | - add `purgecss` as a dependency and exclude from bundle 196 | 197 | **Documentation** 198 | 199 | - add `optimizeCss` API to README 200 | 201 | ## [0.1.0-rc.1](https://github.com/carbon-design-system/carbon-preprocess-svelte/releases/tag/v0.1.0-rc.1) - 2021-05-08 202 | 203 | **Fixes** 204 | 205 | - elements: only replace token in property instead of the entire property 206 | - elements: do not emit warning if token is falsy 207 | - add exports map to `package.json` so `svelte.config.js` works properly 208 | - temporarily omit `optimizeCss` plugin from library 209 | 210 | **Documentation** 211 | 212 | - use ESM instead of CJS syntax in `svelte.config.js` usage examples 213 | 214 | ## [0.1.0-rc.0](https://github.com/carbon-design-system/carbon-preprocess-svelte/releases/tag/v0.1.0-rc.0) - 2021-05-07 215 | 216 | - initial release 217 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | ## Prerequisites 4 | 5 | [Bun](https://bun.sh/) is used to develop this project. 6 | 7 | ## Set-up 8 | 9 | Fork the repository and clone your fork: 10 | 11 | ```sh 12 | git clone 13 | cd carbon-preprocess-svelte 14 | ``` 15 | 16 | Set the original repository as the upstream: 17 | 18 | ```sh 19 | git remote add upstream git@github.com:carbon-design-system/carbon-preprocess-svelte.git 20 | # verify that the upstream is added 21 | git remote -v 22 | ``` 23 | 24 | Finally, install the project dependencies: 25 | 26 | ```sh 27 | bun install 28 | ``` 29 | 30 | ## Workflow 31 | 32 | Imports for `carbon-components-svelte` must be regenerated if the `carbon-components-svelte` package is updated (i.e., a new component is added). 33 | 34 | To update the imports, run the following command: 35 | 36 | ```sh 37 | bun run index:components 38 | ``` 39 | 40 | This will update `src/component-index.ts`, which should be checked into source control. 41 | 42 | Note that for this package, `carbon-components-svelte` is intentionally a `devDependency`, as it is only used for generating the component index, and not depended on at runtime. 43 | 44 | ### Unit tests 45 | 46 | Run `bun test` to execute the unit tests (located in `/tests`). 47 | 48 | For watch mode, run `bun test --watch`. 49 | 50 | To update snapshots, run `bun test --update-snapshots`. 51 | 52 | ### Linked examples 53 | 54 | To simulate real-world usage of the package, you can link the package to an example project. This is useful for testing changes end-to-end. 55 | 56 | Example set-ups are located in the `examples` directory: 57 | 58 | - `examples/rollup`: Rollup (Vite-compatible API) 59 | - `examples/sveltekit`: SvelteKit 60 | - `examples/vite`: Vite 61 | - `examples/vite@svelte-5`: Vite using Svelte 5 62 | - `examples/webpack`: Webpack 63 | 64 | Note that other Svelte frameworks use Vite under the hood (e.g., Astro, Routify). 65 | 66 | `carbon-preprocess-svelte` is linked locally in these examples, so changes to the package will be reflected in the example projects. 67 | 68 | Rebuilding the project in watch mode will automatically update the linked examples. 69 | 70 | ```sh 71 | bun run build -w 72 | ``` 73 | 74 | ## Submitting a Pull Request 75 | 76 | ### Sync Your Fork 77 | 78 | Before submitting a pull request, make sure your fork is up to date with the latest upstream changes. 79 | 80 | ```sh 81 | git fetch upstream 82 | git checkout main 83 | git merge upstream/main 84 | ``` 85 | 86 | ### Submit a PR 87 | 88 | After you've pushed your changes to remote, submit your PR. Make sure you are comparing `/feature` to `origin/main`. 89 | 90 | ## Maintainer guide 91 | 92 | The following items only apply to project maintainers. 93 | 94 | ### Release 95 | 96 | This library is published to NPM with [provenance](https://docs.npmjs.com/generating-provenance-statements) via a [GitHub workflow](https://github.com/carbon-design-system/carbon-icons-svelte/blob/master/.github/workflows/release.yml). 97 | 98 | The workflow is automatically triggered when pushing a tag that begins with `v` (e.g., `v0.9.0`). 99 | 100 | However, maintainers must perform a few things in preparation for a release. 101 | 102 | ### Pre-release checklist 103 | 104 | 1. Update `CHANGELOG.md` and increment `package.json#version`. 105 | 106 | ```diff 107 | - "version": "0.8.0", 108 | + "version": "0.9.0", 109 | ``` 110 | 111 | 2. Commit the changes and tag the release. 112 | 113 | ```sh 114 | git commit -am "v0.9.0" 115 | git tag v0.9.0 116 | ``` 117 | 118 | 3. Push the tag to the remote. 119 | 120 | Finally, push the tag to the remote repository. 121 | 122 | This will trigger the `release.yml` workflow. If the build steps succeed, the new version of the packge will be published to NPM. 123 | 124 | ### Post-release checklist 125 | 126 | After confirming that the new release is published to NPM, perform the following: 127 | 128 | 1. Create a [new release](https://github.com/carbon-design-system/carbon-preprocess-svelte/releases/new) on GitHub. 129 | 130 | 2. Publish the release as the latest release. 131 | 132 | 3. Close out any issues that were resolved in the release. 133 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright 2021 IBM 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # carbon-preprocess-svelte 2 | 3 | [![NPM][npm]][npm-url] 4 | ![GitHub](https://img.shields.io/github/license/ibm/carbon-preprocess-svelte?color=262626&style=for-the-badge) 5 | ![npm downloads to date](https://img.shields.io/npm/dt/carbon-preprocess-svelte?color=262626&style=for-the-badge) 6 | 7 | > [Svelte preprocessors](https://svelte.dev/docs/svelte-compiler#types-preprocessor) for the Carbon Design System. 8 | 9 | ## Installation 10 | 11 | Install `carbon-preprocess-svelte` as a development dependency. 12 | 13 | ```sh 14 | # npm 15 | npm i -D carbon-preprocess-svelte 16 | 17 | # pnpm 18 | pnpm i -D carbon-preprocess-svelte 19 | 20 | # Yarn 21 | yarn add -D carbon-preprocess-svelte 22 | 23 | # Bun 24 | bun add -D carbon-preprocess-svelte 25 | ``` 26 | 27 | ## Usage 28 | 29 | - [**optimizeImports**](#optimizeimports): Svelte preprocessor that rewrites Carbon Svelte imports to their source path in the `script` block, making development compile times dramatically faster. 30 | - [**optimizeCss**](#optimizecss): Vite/Rollup plugin that removes unused Carbon styles, resulting in smaller CSS bundles. 31 | - [**OptimizeCssPlugin**](#optimizecssplugin): The corresponding `optimizeCss` plugin for Webpack that removes unused Carbon styles. 32 | 33 | ### `optimizeImports` 34 | 35 | `optimizeImports` is a Svelte preprocessor that rewrites barrel imports from Carbon components/icons/pictograms packages to their source Svelte code paths. This can significantly speed up development and build compile times while preserving typeahead and autocompletion offered by integrated development environments (IDE) like VS Code. 36 | 37 | The preprocessor optimizes imports from the following packages: 38 | 39 | - [carbon-components-svelte](https://github.com/carbon-design-system/carbon-components-svelte) 40 | - [carbon-icons-svelte](https://github.com/carbon-design-system/carbon-icons-svelte) 41 | - [carbon-pictograms-svelte](https://github.com/carbon-design-system/carbon-pictograms-svelte) 42 | 43 | ```diff 44 | - import { Button } from "carbon-components-svelte"; 45 | + import Button from "carbon-components-svelte/src/Button/Button.svelte"; 46 | 47 | - import { Add } from "carbon-icons-svelte"; 48 | + import Add from "carbon-icons-svelte/lib/Add.svelte"; 49 | 50 | - import { Airplane } from "carbon-pictograms-svelte"; 51 | + import Airplane from "carbon-pictograms-svelte/lib/Airplane.svelte"; 52 | ``` 53 | 54 | > [!NOTE] 55 | > When this preprocessor was first created, there was no workaround to optimize slow cold start times with Vite in development. 56 | > Today, [@sveltejs/vite-plugin-svelte](https://github.com/sveltejs/vite-plugin-svelte) enables [`prebundleSvelteLibraries: true`](https://github.com/sveltejs/vite-plugin-svelte/blob/ba4ac32cf5c3e9c048d1ac430c1091ca08eaa130/docs/config.md#prebundlesveltelibraries) by default. 57 | > However, this preprocessor is still useful for non-Vite bundlers, like Rollup and Webpack. Also, it can further improve cold start development times even with `prebundleSvelteLibraries: true`. 58 | 59 | #### SvelteKit 60 | 61 | See [examples/sveltekit](examples/sveltekit). 62 | 63 | ```js 64 | // svelte.config.js 65 | import adapter from "@sveltejs/adapter-static"; 66 | import { vitePreprocess } from "@sveltejs/vite-plugin-svelte"; 67 | import { optimizeImports } from "carbon-preprocess-svelte"; 68 | 69 | /** @type {import('@sveltejs/kit').Config} */ 70 | const config = { 71 | preprocess: [ 72 | // Preprocessors are run in sequence. 73 | // If using TypeScript, the code must be transpiled first. 74 | vitePreprocess(), 75 | optimizeImports(), 76 | ], 77 | kit: { 78 | adapter: adapter(), 79 | }, 80 | }; 81 | 82 | export default config; 83 | ``` 84 | 85 | #### Vite 86 | 87 | See [examples/vite](examples/vite). 88 | 89 | ```js 90 | // vite.config.js 91 | import { svelte } from "@sveltejs/vite-plugin-svelte"; 92 | import { vitePreprocess } from "@sveltejs/vite-plugin-svelte"; 93 | import { optimizeImports } from "carbon-preprocess-svelte"; 94 | 95 | /** @type {import('vite').UserConfig} */ 96 | export default { 97 | plugins: [ 98 | svelte({ 99 | preprocess: [ 100 | // Preprocessors are run in sequence. 101 | // If using TypeScript, the code must be transpiled first. 102 | vitePreprocess(), 103 | optimizeImports(), 104 | ], 105 | }), 106 | ], 107 | }; 108 | ``` 109 | 110 | #### Rollup 111 | 112 | This code is abridged; see [examples/rollup](examples/rollup) for a full set-up. 113 | 114 | ```js 115 | // rollup.config.js 116 | import svelte from "rollup-plugin-svelte"; 117 | import { optimizeImports } from "carbon-preprocess-svelte"; 118 | 119 | export default { 120 | plugins: [ 121 | svelte({ 122 | preprocess: [optimizeImports()], 123 | }), 124 | ], 125 | }; 126 | ``` 127 | 128 | #### Webpack 129 | 130 | This code is abridged; see [examples/webpack](examples/webpack) for a full set-up. 131 | 132 | ```js 133 | // webpack.config.js 134 | const { optimizeImports } = require("carbon-preprocess-svelte"); 135 | 136 | module.exports = { 137 | module: { 138 | rules: [ 139 | { 140 | test: /\.svelte$/, 141 | use: { 142 | loader: "svelte-loader", 143 | options: { 144 | hotReload: !PROD, 145 | preprocess: [optimizeImports()], 146 | compilerOptions: { dev: !PROD }, 147 | }, 148 | }, 149 | }, 150 | ], 151 | }, 152 | }; 153 | ``` 154 | 155 | ### `optimizeCss` 156 | 157 | `optimizeCss` is a Vite plugin that removes unused Carbon styles at build time. The plugin is compatible with Rollup ([Vite](https://vitejs.dev/guide/api-plugin) extends the Rollup plugin API). 158 | 159 | ```diff 160 | $ vite build 161 | 162 | Optimized index-CU4gbKFa.css 163 | - Before: 606.26 kB 164 | + After: 53.22 kB (-91.22%) 165 | 166 | dist/index.html 0.34 kB │ gzip: 0.24 kB 167 | dist/assets/index-CU4gbKFa.css 53.22 kB │ gzip: 6.91 kB 168 | dist/assets/index-Ceijs3eO.js 53.65 kB │ gzip: 15.88 kB 169 | ``` 170 | 171 | > [!NOTE] 172 | > This is a plugin and not a Svelte preprocessor. It should be added to the list of `vite.plugins`. For Vite set-ups, this plugin _is not run_ during development and is only executed when building the app (i.e., `vite build`). For Rollup and Webpack, you should conditionally apply the plugin to only execute when building for production. 173 | 174 | #### SvelteKit 175 | 176 | See [examples/sveltekit](examples/sveltekit). 177 | 178 | ```js 179 | // vite.config.js 180 | import { sveltekit } from "@sveltejs/kit/vite"; 181 | import { optimizeCss } from "carbon-preprocess-svelte"; 182 | import { defineConfig } from "vite"; 183 | 184 | export default defineConfig({ 185 | plugins: [sveltekit(), optimizeCss()], 186 | }); 187 | ``` 188 | 189 | #### Vite 190 | 191 | See [examples/vite](examples/vite). 192 | 193 | ```js 194 | // vite.config.js 195 | import { svelte } from "@sveltejs/vite-plugin-svelte"; 196 | import { optimizeCss } from "carbon-preprocess-svelte"; 197 | 198 | /** @type {import('vite').UserConfig} */ 199 | export default { 200 | plugins: [svelte(), optimizeCss()], 201 | }; 202 | ``` 203 | 204 | #### Rollup 205 | 206 | This code is abridged; see [examples/rollup](examples/rollup) for a full set-up. 207 | 208 | ```js 209 | // rollup.config.js 210 | import svelte from "rollup-plugin-svelte"; 211 | import { optimizeCss } from "carbon-preprocess-svelte"; 212 | 213 | const production = !process.env.ROLLUP_WATCH; 214 | 215 | export default { 216 | plugins: [ 217 | svelte({ 218 | preprocess: [optimizeImports()], 219 | }), 220 | 221 | // Only apply the plugin when building for production. 222 | production && optimizeCss(), 223 | ], 224 | }; 225 | ``` 226 | 227 | #### `optimizeCss` API 228 | 229 | ```ts 230 | optimizeCss({ 231 | /** 232 | * By default, the plugin will print the size 233 | * difference between the original and optimized CSS. 234 | * 235 | * Set to `false` to disable verbose logging. 236 | * @default true 237 | */ 238 | verbose: false, 239 | 240 | /** 241 | * By default, pre-compiled Carbon StyleSheets ship `@font-face` rules 242 | * for all available IBM Plex fonts, many of which are not actually 243 | * used in Carbon Svelte components. 244 | * 245 | * The default behavior is to preserve the following IBM Plex fonts: 246 | * - IBM Plex Sans (300/400/600-weight and normal-font-style rules) 247 | * - IBM Plex Mono (400-weight and normal-font-style rules) 248 | * 249 | * Set to `true` to disable this behavior and 250 | * retain *all* IBM Plex `@font-face` rules. 251 | * @default false 252 | */ 253 | preserveAllIBMFonts: false, 254 | }); 255 | ``` 256 | 257 | ### `OptimizeCssPlugin` 258 | 259 | For Webpack users, `OptimizeCssPlugin` is a drop-in replacement for `optimizeCss`. The plugin API is identical to that of `optimizeCss`. 260 | 261 | This code is abridged; see [examples/webpack](examples/webpack) for a full set-up. 262 | 263 | ```js 264 | // webpack.config.js 265 | const { OptimizeCssPlugin } = require("carbon-preprocess-svelte"); 266 | 267 | const PROD = process.env.NODE_ENV === "production"; 268 | 269 | module.exports = { 270 | plugins: [ 271 | // Only apply the plugin when building for production. 272 | PROD && new OptimizeCssPlugin(), 273 | ], 274 | }; 275 | ``` 276 | 277 | ## Examples 278 | 279 | Refer to [examples](examples) for common set-ups. 280 | 281 | ## Contributing 282 | 283 | Refer to the [contributing guidelines](CONTRIBUTING.md). 284 | 285 | ## License 286 | 287 | [Apache 2.0](LICENSE) 288 | 289 | [npm]: https://img.shields.io/npm/v/carbon-preprocess-svelte.svg?color=262626&style=for-the-badge 290 | [npm-url]: https://npmjs.com/package/carbon-preprocess-svelte 291 | -------------------------------------------------------------------------------- /biome.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://biomejs.dev/schemas/1.9.2/schema.json", 3 | "organizeImports": { 4 | "enabled": true 5 | }, 6 | "files": { 7 | "ignore": ["build", "dist", ".svelte-kit", "src/component-index.ts"] 8 | }, 9 | "formatter": { 10 | "attributePosition": "multiline", 11 | "indentStyle": "space" 12 | }, 13 | "linter": { 14 | "enabled": true, 15 | "rules": { 16 | "recommended": true 17 | } 18 | }, 19 | "overrides": [ 20 | { 21 | "include": ["*.svelte"], 22 | "linter": { 23 | "rules": { 24 | "style": { 25 | "useConst": "off", 26 | "useImportType": "off" 27 | } 28 | } 29 | } 30 | } 31 | ] 32 | } 33 | -------------------------------------------------------------------------------- /examples/rollup/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .vscode 3 | node_modules 4 | public/build 5 | -------------------------------------------------------------------------------- /examples/rollup/README.md: -------------------------------------------------------------------------------- 1 | # rollup 2 | 3 | > Used for end-to-end testing and development purposes. 4 | 5 | ## Quick Start 6 | 7 | ```sh 8 | # First, build the library locally 9 | bun run build 10 | 11 | # Create a local link to the library 12 | bun link 13 | 14 | # When developing, rebuild the library when making changes 15 | bun run build -w 16 | ``` 17 | 18 | In this folder, you can run the following commands: 19 | 20 | ```sh 21 | # Install dependencies 22 | bun i 23 | ``` 24 | 25 | Run the app in development mode. This should only apply the `optimizeImports` preprocessor. 26 | 27 | ```sh 28 | bun run dev 29 | ``` 30 | 31 | Build the app for production. This should run both the `optimizeImports` and `optimizeCss` preprocessors. 32 | 33 | ```sh 34 | bun run build 35 | ``` 36 | -------------------------------------------------------------------------------- /examples/rollup/bun.lock: -------------------------------------------------------------------------------- 1 | { 2 | "lockfileVersion": 1, 3 | "workspaces": { 4 | "": { 5 | "devDependencies": { 6 | "@rollup/plugin-commonjs": "latest", 7 | "@rollup/plugin-node-resolve": "latest", 8 | "carbon-components-svelte": "^0.85.4", 9 | "carbon-preprocess-svelte": "link:carbon-preprocess-svelte", 10 | "rollup": "latest", 11 | "rollup-plugin-css-only": "latest", 12 | "rollup-plugin-svelte": "latest", 13 | "rollup-plugin-terser": "latest", 14 | "svelte": "^4.2.20", 15 | }, 16 | }, 17 | }, 18 | "packages": { 19 | "@ampproject/remapping": ["@ampproject/remapping@2.3.0", "", { "dependencies": { "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.24" } }, "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw=="], 20 | 21 | "@babel/code-frame": ["@babel/code-frame@7.26.2", "", { "dependencies": { "@babel/helper-validator-identifier": "^7.25.9", "js-tokens": "^4.0.0", "picocolors": "^1.0.0" } }, "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ=="], 22 | 23 | "@babel/helper-validator-identifier": ["@babel/helper-validator-identifier@7.25.9", "", {}, "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ=="], 24 | 25 | "@ibm/telemetry-js": ["@ibm/telemetry-js@1.8.0", "", { "bin": { "ibmtelemetry": "dist/collect.js" } }, "sha512-1u/8f5TtDHXWNQe+YfIESesZGX2PmhEfyU0znlyFvATch+xc5fPYjXj2gWKMTmdKsDawqAm/BkJBQjx2CDlZww=="], 26 | 27 | "@jridgewell/gen-mapping": ["@jridgewell/gen-mapping@0.3.8", "", { "dependencies": { "@jridgewell/set-array": "^1.2.1", "@jridgewell/sourcemap-codec": "^1.4.10", "@jridgewell/trace-mapping": "^0.3.24" } }, "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA=="], 28 | 29 | "@jridgewell/resolve-uri": ["@jridgewell/resolve-uri@3.1.2", "", {}, "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw=="], 30 | 31 | "@jridgewell/set-array": ["@jridgewell/set-array@1.2.1", "", {}, "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A=="], 32 | 33 | "@jridgewell/source-map": ["@jridgewell/source-map@0.3.6", "", { "dependencies": { "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25" } }, "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ=="], 34 | 35 | "@jridgewell/sourcemap-codec": ["@jridgewell/sourcemap-codec@1.5.0", "", {}, "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ=="], 36 | 37 | "@jridgewell/trace-mapping": ["@jridgewell/trace-mapping@0.3.25", "", { "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ=="], 38 | 39 | "@rollup/plugin-commonjs": ["@rollup/plugin-commonjs@28.0.3", "", { "dependencies": { "@rollup/pluginutils": "^5.0.1", "commondir": "^1.0.1", "estree-walker": "^2.0.2", "fdir": "^6.2.0", "is-reference": "1.2.1", "magic-string": "^0.30.3", "picomatch": "^4.0.2" }, "peerDependencies": { "rollup": "^2.68.0||^3.0.0||^4.0.0" }, "optionalPeers": ["rollup"] }, "sha512-pyltgilam1QPdn+Zd9gaCfOLcnjMEJ9gV+bTw6/r73INdvzf1ah9zLIJBm+kW7R6IUFIQ1YO+VqZtYxZNWFPEQ=="], 40 | 41 | "@rollup/plugin-node-resolve": ["@rollup/plugin-node-resolve@16.0.1", "", { "dependencies": { "@rollup/pluginutils": "^5.0.1", "@types/resolve": "1.20.2", "deepmerge": "^4.2.2", "is-module": "^1.0.0", "resolve": "^1.22.1" }, "peerDependencies": { "rollup": "^2.78.0||^3.0.0||^4.0.0" }, "optionalPeers": ["rollup"] }, "sha512-tk5YCxJWIG81umIvNkSod2qK5KyQW19qcBF/B78n1bjtOON6gzKoVeSzAE8yHCZEDmqkHKkxplExA8KzdJLJpA=="], 42 | 43 | "@rollup/pluginutils": ["@rollup/pluginutils@5.1.4", "", { "dependencies": { "@types/estree": "^1.0.0", "estree-walker": "^2.0.2", "picomatch": "^4.0.2" }, "peerDependencies": { "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" }, "optionalPeers": ["rollup"] }, "sha512-USm05zrsFxYLPdWWq+K3STlWiT/3ELn3RcV5hJMghpeAIhxfsUIg6mt12CBJBInWMV4VneoV7SfGv8xIwo2qNQ=="], 44 | 45 | "@rollup/rollup-android-arm-eabi": ["@rollup/rollup-android-arm-eabi@4.41.1", "", { "os": "android", "cpu": "arm" }, "sha512-NELNvyEWZ6R9QMkiytB4/L4zSEaBC03KIXEghptLGLZWJ6VPrL63ooZQCOnlx36aQPGhzuOMwDerC1Eb2VmrLw=="], 46 | 47 | "@rollup/rollup-android-arm64": ["@rollup/rollup-android-arm64@4.41.1", "", { "os": "android", "cpu": "arm64" }, "sha512-DXdQe1BJ6TK47ukAoZLehRHhfKnKg9BjnQYUu9gzhI8Mwa1d2fzxA1aw2JixHVl403bwp1+/o/NhhHtxWJBgEA=="], 48 | 49 | "@rollup/rollup-darwin-arm64": ["@rollup/rollup-darwin-arm64@4.41.1", "", { "os": "darwin", "cpu": "arm64" }, "sha512-5afxvwszzdulsU2w8JKWwY8/sJOLPzf0e1bFuvcW5h9zsEg+RQAojdW0ux2zyYAz7R8HvvzKCjLNJhVq965U7w=="], 50 | 51 | "@rollup/rollup-darwin-x64": ["@rollup/rollup-darwin-x64@4.41.1", "", { "os": "darwin", "cpu": "x64" }, "sha512-egpJACny8QOdHNNMZKf8xY0Is6gIMz+tuqXlusxquWu3F833DcMwmGM7WlvCO9sB3OsPjdC4U0wHw5FabzCGZg=="], 52 | 53 | "@rollup/rollup-freebsd-arm64": ["@rollup/rollup-freebsd-arm64@4.41.1", "", { "os": "freebsd", "cpu": "arm64" }, "sha512-DBVMZH5vbjgRk3r0OzgjS38z+atlupJ7xfKIDJdZZL6sM6wjfDNo64aowcLPKIx7LMQi8vybB56uh1Ftck/Atg=="], 54 | 55 | "@rollup/rollup-freebsd-x64": ["@rollup/rollup-freebsd-x64@4.41.1", "", { "os": "freebsd", "cpu": "x64" }, "sha512-3FkydeohozEskBxNWEIbPfOE0aqQgB6ttTkJ159uWOFn42VLyfAiyD9UK5mhu+ItWzft60DycIN1Xdgiy8o/SA=="], 56 | 57 | "@rollup/rollup-linux-arm-gnueabihf": ["@rollup/rollup-linux-arm-gnueabihf@4.41.1", "", { "os": "linux", "cpu": "arm" }, "sha512-wC53ZNDgt0pqx5xCAgNunkTzFE8GTgdZ9EwYGVcg+jEjJdZGtq9xPjDnFgfFozQI/Xm1mh+D9YlYtl+ueswNEg=="], 58 | 59 | "@rollup/rollup-linux-arm-musleabihf": ["@rollup/rollup-linux-arm-musleabihf@4.41.1", "", { "os": "linux", "cpu": "arm" }, "sha512-jwKCca1gbZkZLhLRtsrka5N8sFAaxrGz/7wRJ8Wwvq3jug7toO21vWlViihG85ei7uJTpzbXZRcORotE+xyrLA=="], 60 | 61 | "@rollup/rollup-linux-arm64-gnu": ["@rollup/rollup-linux-arm64-gnu@4.41.1", "", { "os": "linux", "cpu": "arm64" }, "sha512-g0UBcNknsmmNQ8V2d/zD2P7WWfJKU0F1nu0k5pW4rvdb+BIqMm8ToluW/eeRmxCared5dD76lS04uL4UaNgpNA=="], 62 | 63 | "@rollup/rollup-linux-arm64-musl": ["@rollup/rollup-linux-arm64-musl@4.41.1", "", { "os": "linux", "cpu": "arm64" }, "sha512-XZpeGB5TKEZWzIrj7sXr+BEaSgo/ma/kCgrZgL0oo5qdB1JlTzIYQKel/RmhT6vMAvOdM2teYlAaOGJpJ9lahg=="], 64 | 65 | "@rollup/rollup-linux-loongarch64-gnu": ["@rollup/rollup-linux-loongarch64-gnu@4.41.1", "", { "os": "linux", "cpu": "none" }, "sha512-bkCfDJ4qzWfFRCNt5RVV4DOw6KEgFTUZi2r2RuYhGWC8WhCA8lCAJhDeAmrM/fdiAH54m0mA0Vk2FGRPyzI+tw=="], 66 | 67 | "@rollup/rollup-linux-powerpc64le-gnu": ["@rollup/rollup-linux-powerpc64le-gnu@4.41.1", "", { "os": "linux", "cpu": "ppc64" }, "sha512-3mr3Xm+gvMX+/8EKogIZSIEF0WUu0HL9di+YWlJpO8CQBnoLAEL/roTCxuLncEdgcfJcvA4UMOf+2dnjl4Ut1A=="], 68 | 69 | "@rollup/rollup-linux-riscv64-gnu": ["@rollup/rollup-linux-riscv64-gnu@4.41.1", "", { "os": "linux", "cpu": "none" }, "sha512-3rwCIh6MQ1LGrvKJitQjZFuQnT2wxfU+ivhNBzmxXTXPllewOF7JR1s2vMX/tWtUYFgphygxjqMl76q4aMotGw=="], 70 | 71 | "@rollup/rollup-linux-riscv64-musl": ["@rollup/rollup-linux-riscv64-musl@4.41.1", "", { "os": "linux", "cpu": "none" }, "sha512-LdIUOb3gvfmpkgFZuccNa2uYiqtgZAz3PTzjuM5bH3nvuy9ty6RGc/Q0+HDFrHrizJGVpjnTZ1yS5TNNjFlklw=="], 72 | 73 | "@rollup/rollup-linux-s390x-gnu": ["@rollup/rollup-linux-s390x-gnu@4.41.1", "", { "os": "linux", "cpu": "s390x" }, "sha512-oIE6M8WC9ma6xYqjvPhzZYk6NbobIURvP/lEbh7FWplcMO6gn7MM2yHKA1eC/GvYwzNKK/1LYgqzdkZ8YFxR8g=="], 74 | 75 | "@rollup/rollup-linux-x64-gnu": ["@rollup/rollup-linux-x64-gnu@4.41.1", "", { "os": "linux", "cpu": "x64" }, "sha512-cWBOvayNvA+SyeQMp79BHPK8ws6sHSsYnK5zDcsC3Hsxr1dgTABKjMnMslPq1DvZIp6uO7kIWhiGwaTdR4Og9A=="], 76 | 77 | "@rollup/rollup-linux-x64-musl": ["@rollup/rollup-linux-x64-musl@4.41.1", "", { "os": "linux", "cpu": "x64" }, "sha512-y5CbN44M+pUCdGDlZFzGGBSKCA4A/J2ZH4edTYSSxFg7ce1Xt3GtydbVKWLlzL+INfFIZAEg1ZV6hh9+QQf9YQ=="], 78 | 79 | "@rollup/rollup-win32-arm64-msvc": ["@rollup/rollup-win32-arm64-msvc@4.41.1", "", { "os": "win32", "cpu": "arm64" }, "sha512-lZkCxIrjlJlMt1dLO/FbpZbzt6J/A8p4DnqzSa4PWqPEUUUnzXLeki/iyPLfV0BmHItlYgHUqJe+3KiyydmiNQ=="], 80 | 81 | "@rollup/rollup-win32-ia32-msvc": ["@rollup/rollup-win32-ia32-msvc@4.41.1", "", { "os": "win32", "cpu": "ia32" }, "sha512-+psFT9+pIh2iuGsxFYYa/LhS5MFKmuivRsx9iPJWNSGbh2XVEjk90fmpUEjCnILPEPJnikAU6SFDiEUyOv90Pg=="], 82 | 83 | "@rollup/rollup-win32-x64-msvc": ["@rollup/rollup-win32-x64-msvc@4.41.1", "", { "os": "win32", "cpu": "x64" }, "sha512-Wq2zpapRYLfi4aKxf2Xff0tN+7slj2d4R87WEzqw7ZLsVvO5zwYCIuEGSZYiK41+GlwUo1HiR+GdkLEJnCKTCw=="], 84 | 85 | "@types/estree": ["@types/estree@1.0.7", "", {}, "sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ=="], 86 | 87 | "@types/node": ["@types/node@22.10.7", "", { "dependencies": { "undici-types": "~6.20.0" } }, "sha512-V09KvXxFiutGp6B7XkpaDXlNadZxrzajcY50EuoLIpQ6WWYCSvf19lVIazzfIzQvhUN2HjX12spLojTnhuKlGg=="], 88 | 89 | "@types/resolve": ["@types/resolve@1.20.2", "", {}, "sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q=="], 90 | 91 | "acorn": ["acorn@8.14.0", "", { "bin": { "acorn": "bin/acorn" } }, "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA=="], 92 | 93 | "aria-query": ["aria-query@5.3.2", "", {}, "sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw=="], 94 | 95 | "axobject-query": ["axobject-query@4.1.0", "", {}, "sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ=="], 96 | 97 | "buffer-from": ["buffer-from@1.1.2", "", {}, "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ=="], 98 | 99 | "carbon-components-svelte": ["carbon-components-svelte@0.85.4", "", { "dependencies": { "@ibm/telemetry-js": "^1.5.0", "flatpickr": "4.6.9" } }, "sha512-8dBgRF8Y6TPu+WiythDrYilNAJbhbpHu3kThJazquCO1hyGftWsa2T0HhY+k4+szIiutcc8qVzUMfRZvcGUflQ=="], 100 | 101 | "carbon-preprocess-svelte": ["carbon-preprocess-svelte@link:carbon-preprocess-svelte", {}], 102 | 103 | "code-red": ["code-red@1.0.4", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.4.15", "@types/estree": "^1.0.1", "acorn": "^8.10.0", "estree-walker": "^3.0.3", "periscopic": "^3.1.0" } }, "sha512-7qJWqItLA8/VPVlKJlFXU+NBlo/qyfs39aJcuMT/2ere32ZqvF5OSxgdM5xOfJJ7O429gg2HM47y8v9P+9wrNw=="], 104 | 105 | "commander": ["commander@2.20.3", "", {}, "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ=="], 106 | 107 | "commondir": ["commondir@1.0.1", "", {}, "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg=="], 108 | 109 | "css-tree": ["css-tree@2.3.1", "", { "dependencies": { "mdn-data": "2.0.30", "source-map-js": "^1.0.1" } }, "sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw=="], 110 | 111 | "deepmerge": ["deepmerge@4.3.1", "", {}, "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A=="], 112 | 113 | "estree-walker": ["estree-walker@2.0.2", "", {}, "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w=="], 114 | 115 | "fdir": ["fdir@6.4.3", "", { "peerDependencies": { "picomatch": "^3 || ^4" }, "optionalPeers": ["picomatch"] }, "sha512-PMXmW2y1hDDfTSRc9gaXIuCCRpuoz3Kaz8cUelp3smouvfT632ozg2vrT6lJsHKKOF59YLbOGfAWGUcKEfRMQw=="], 116 | 117 | "flatpickr": ["flatpickr@4.6.9", "", {}, "sha512-F0azNNi8foVWKSF+8X+ZJzz8r9sE1G4hl06RyceIaLvyltKvDl6vqk9Lm/6AUUCi5HWaIjiUbk7UpeE/fOXOpw=="], 118 | 119 | "fsevents": ["fsevents@2.3.3", "", { "os": "darwin" }, "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw=="], 120 | 121 | "function-bind": ["function-bind@1.1.2", "", {}, "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA=="], 122 | 123 | "has-flag": ["has-flag@4.0.0", "", {}, "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="], 124 | 125 | "hasown": ["hasown@2.0.2", "", { "dependencies": { "function-bind": "^1.1.2" } }, "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ=="], 126 | 127 | "is-core-module": ["is-core-module@2.16.1", "", { "dependencies": { "hasown": "^2.0.2" } }, "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w=="], 128 | 129 | "is-module": ["is-module@1.0.0", "", {}, "sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g=="], 130 | 131 | "is-reference": ["is-reference@1.2.1", "", { "dependencies": { "@types/estree": "*" } }, "sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ=="], 132 | 133 | "jest-worker": ["jest-worker@26.6.2", "", { "dependencies": { "@types/node": "*", "merge-stream": "^2.0.0", "supports-color": "^7.0.0" } }, "sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ=="], 134 | 135 | "js-tokens": ["js-tokens@4.0.0", "", {}, "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="], 136 | 137 | "locate-character": ["locate-character@3.0.0", "", {}, "sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA=="], 138 | 139 | "magic-string": ["magic-string@0.30.17", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.0" } }, "sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA=="], 140 | 141 | "mdn-data": ["mdn-data@2.0.30", "", {}, "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA=="], 142 | 143 | "merge-stream": ["merge-stream@2.0.0", "", {}, "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w=="], 144 | 145 | "path-parse": ["path-parse@1.0.7", "", {}, "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw=="], 146 | 147 | "periscopic": ["periscopic@3.1.0", "", { "dependencies": { "@types/estree": "^1.0.0", "estree-walker": "^3.0.0", "is-reference": "^3.0.0" } }, "sha512-vKiQ8RRtkl9P+r/+oefh25C3fhybptkHKCZSPlcXiJux2tJF55GnEj3BVn4A5gKfq9NWWXXrxkHBwVPUfH0opw=="], 148 | 149 | "picocolors": ["picocolors@1.1.1", "", {}, "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA=="], 150 | 151 | "picomatch": ["picomatch@4.0.2", "", {}, "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg=="], 152 | 153 | "randombytes": ["randombytes@2.1.0", "", { "dependencies": { "safe-buffer": "^5.1.0" } }, "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ=="], 154 | 155 | "resolve": ["resolve@1.22.10", "", { "dependencies": { "is-core-module": "^2.16.0", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, "bin": { "resolve": "bin/resolve" } }, "sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w=="], 156 | 157 | "resolve.exports": ["resolve.exports@2.0.3", "", {}, "sha512-OcXjMsGdhL4XnbShKpAcSqPMzQoYkYyhbEaeSko47MjRP9NfEQMhZkXL1DoFlt9LWQn4YttrdnV6X2OiyzBi+A=="], 158 | 159 | "rollup": ["rollup@4.41.1", "", { "dependencies": { "@types/estree": "1.0.7" }, "optionalDependencies": { "@rollup/rollup-android-arm-eabi": "4.41.1", "@rollup/rollup-android-arm64": "4.41.1", "@rollup/rollup-darwin-arm64": "4.41.1", "@rollup/rollup-darwin-x64": "4.41.1", "@rollup/rollup-freebsd-arm64": "4.41.1", "@rollup/rollup-freebsd-x64": "4.41.1", "@rollup/rollup-linux-arm-gnueabihf": "4.41.1", "@rollup/rollup-linux-arm-musleabihf": "4.41.1", "@rollup/rollup-linux-arm64-gnu": "4.41.1", "@rollup/rollup-linux-arm64-musl": "4.41.1", "@rollup/rollup-linux-loongarch64-gnu": "4.41.1", "@rollup/rollup-linux-powerpc64le-gnu": "4.41.1", "@rollup/rollup-linux-riscv64-gnu": "4.41.1", "@rollup/rollup-linux-riscv64-musl": "4.41.1", "@rollup/rollup-linux-s390x-gnu": "4.41.1", "@rollup/rollup-linux-x64-gnu": "4.41.1", "@rollup/rollup-linux-x64-musl": "4.41.1", "@rollup/rollup-win32-arm64-msvc": "4.41.1", "@rollup/rollup-win32-ia32-msvc": "4.41.1", "@rollup/rollup-win32-x64-msvc": "4.41.1", "fsevents": "~2.3.2" }, "bin": { "rollup": "dist/bin/rollup" } }, "sha512-cPmwD3FnFv8rKMBc1MxWCwVQFxwf1JEmSX3iQXrRVVG15zerAIXRjMFVWnd5Q5QvgKF7Aj+5ykXFhUl+QGnyOw=="], 160 | 161 | "rollup-plugin-css-only": ["rollup-plugin-css-only@4.5.2", "", { "dependencies": { "@rollup/pluginutils": "5" }, "peerDependencies": { "rollup": "<5" } }, "sha512-7rj9+jB17Pz8LNcPgtMUb16JcgD8lxQMK9HcGfAVhMK3na/WXes3oGIo5QsrQQVqtgAU6q6KnQNXJrYunaUIQQ=="], 162 | 163 | "rollup-plugin-svelte": ["rollup-plugin-svelte@7.2.2", "", { "dependencies": { "@rollup/pluginutils": "^4.1.0", "resolve.exports": "^2.0.0" }, "peerDependencies": { "rollup": ">=2.0.0", "svelte": ">=3.5.0" } }, "sha512-hgnIblTRewaBEVQD6N0Q43o+y6q1TmDRhBjaEzQCi50bs8TXqjc+d1zFZyE8tsfgcfNHZQzclh4RxlFUB85H8Q=="], 164 | 165 | "rollup-plugin-terser": ["rollup-plugin-terser@7.0.2", "", { "dependencies": { "@babel/code-frame": "^7.10.4", "jest-worker": "^26.2.1", "serialize-javascript": "^4.0.0", "terser": "^5.0.0" }, "peerDependencies": { "rollup": "^2.0.0" } }, "sha512-w3iIaU4OxcF52UUXiZNsNeuXIMDvFrr+ZXK6bFZ0Q60qyVfq4uLptoS4bbq3paG3x216eQllFZX7zt6TIImguQ=="], 166 | 167 | "safe-buffer": ["safe-buffer@5.2.1", "", {}, "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="], 168 | 169 | "serialize-javascript": ["serialize-javascript@4.0.0", "", { "dependencies": { "randombytes": "^2.1.0" } }, "sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw=="], 170 | 171 | "source-map": ["source-map@0.6.1", "", {}, "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="], 172 | 173 | "source-map-js": ["source-map-js@1.2.1", "", {}, "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA=="], 174 | 175 | "source-map-support": ["source-map-support@0.5.21", "", { "dependencies": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" } }, "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w=="], 176 | 177 | "supports-color": ["supports-color@7.2.0", "", { "dependencies": { "has-flag": "^4.0.0" } }, "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw=="], 178 | 179 | "supports-preserve-symlinks-flag": ["supports-preserve-symlinks-flag@1.0.0", "", {}, "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w=="], 180 | 181 | "svelte": ["svelte@4.2.20", "", { "dependencies": { "@ampproject/remapping": "^2.2.1", "@jridgewell/sourcemap-codec": "^1.4.15", "@jridgewell/trace-mapping": "^0.3.18", "@types/estree": "^1.0.1", "acorn": "^8.9.0", "aria-query": "^5.3.0", "axobject-query": "^4.0.0", "code-red": "^1.0.3", "css-tree": "^2.3.1", "estree-walker": "^3.0.3", "is-reference": "^3.0.1", "locate-character": "^3.0.0", "magic-string": "^0.30.4", "periscopic": "^3.1.0" } }, "sha512-eeEgGc2DtiUil5ANdtd8vPwt9AgaMdnuUFnPft9F5oMvU/FHu5IHFic+p1dR/UOB7XU2mX2yHW+NcTch4DCh5Q=="], 182 | 183 | "terser": ["terser@5.37.0", "", { "dependencies": { "@jridgewell/source-map": "^0.3.3", "acorn": "^8.8.2", "commander": "^2.20.0", "source-map-support": "~0.5.20" }, "bin": { "terser": "bin/terser" } }, "sha512-B8wRRkmre4ERucLM/uXx4MOV5cbnOlVAqUst+1+iLKPI0dOgFO28f84ptoQt9HEI537PMzfYa/d+GEPKTRXmYA=="], 184 | 185 | "undici-types": ["undici-types@6.20.0", "", {}, "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg=="], 186 | 187 | "@rollup/pluginutils/@types/estree": ["@types/estree@1.0.6", "", {}, "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw=="], 188 | 189 | "code-red/@types/estree": ["@types/estree@1.0.6", "", {}, "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw=="], 190 | 191 | "code-red/estree-walker": ["estree-walker@3.0.3", "", { "dependencies": { "@types/estree": "^1.0.0" } }, "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g=="], 192 | 193 | "is-reference/@types/estree": ["@types/estree@1.0.6", "", {}, "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw=="], 194 | 195 | "periscopic/@types/estree": ["@types/estree@1.0.6", "", {}, "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw=="], 196 | 197 | "periscopic/estree-walker": ["estree-walker@3.0.3", "", { "dependencies": { "@types/estree": "^1.0.0" } }, "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g=="], 198 | 199 | "periscopic/is-reference": ["is-reference@3.0.3", "", { "dependencies": { "@types/estree": "^1.0.6" } }, "sha512-ixkJoqQvAP88E6wLydLGGqCJsrFUnqoH6HnaczB8XmDH1oaWU+xxdptvikTgaEhtZ53Ky6YXiBuUI2WXLMCwjw=="], 200 | 201 | "rollup-plugin-svelte/@rollup/pluginutils": ["@rollup/pluginutils@4.2.1", "", { "dependencies": { "estree-walker": "^2.0.1", "picomatch": "^2.2.2" } }, "sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ=="], 202 | 203 | "svelte/estree-walker": ["estree-walker@3.0.3", "", { "dependencies": { "@types/estree": "^1.0.0" } }, "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g=="], 204 | 205 | "svelte/is-reference": ["is-reference@3.0.3", "", { "dependencies": { "@types/estree": "^1.0.6" } }, "sha512-ixkJoqQvAP88E6wLydLGGqCJsrFUnqoH6HnaczB8XmDH1oaWU+xxdptvikTgaEhtZ53Ky6YXiBuUI2WXLMCwjw=="], 206 | 207 | "rollup-plugin-svelte/@rollup/pluginutils/picomatch": ["picomatch@2.3.1", "", {}, "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA=="], 208 | 209 | "svelte/estree-walker/@types/estree": ["@types/estree@1.0.6", "", {}, "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw=="], 210 | 211 | "svelte/is-reference/@types/estree": ["@types/estree@1.0.6", "", {}, "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw=="], 212 | } 213 | } 214 | -------------------------------------------------------------------------------- /examples/rollup/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "type": "module", 4 | "scripts": { 5 | "dev": "rollup -cw", 6 | "build": "rollup -c" 7 | }, 8 | "devDependencies": { 9 | "@rollup/plugin-commonjs": "latest", 10 | "@rollup/plugin-node-resolve": "latest", 11 | "carbon-components-svelte": "^0.85.4", 12 | "carbon-preprocess-svelte": "link:carbon-preprocess-svelte", 13 | "rollup": "latest", 14 | "rollup-plugin-css-only": "latest", 15 | "rollup-plugin-svelte": "latest", 16 | "rollup-plugin-terser": "latest", 17 | "svelte": "^4.2.20" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /examples/rollup/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /examples/rollup/rollup.config.js: -------------------------------------------------------------------------------- 1 | import commonjs from "@rollup/plugin-commonjs"; 2 | import resolve from "@rollup/plugin-node-resolve"; 3 | import { optimizeCss, optimizeImports } from "carbon-preprocess-svelte"; 4 | import css from "rollup-plugin-css-only"; 5 | import svelte from "rollup-plugin-svelte"; 6 | import { terser } from "rollup-plugin-terser"; 7 | 8 | const production = !process.env.ROLLUP_WATCH; 9 | 10 | export default { 11 | input: "src/index.js", 12 | output: { 13 | sourcemap: !production, 14 | format: "iife", 15 | name: "app", 16 | file: "public/build/bundle.js", 17 | inlineDynamicImports: true, 18 | }, 19 | plugins: [ 20 | svelte({ 21 | preprocess: [optimizeImports()], 22 | compilerOptions: { dev: !production }, 23 | }), 24 | resolve({ browser: true, dedupe: ["svelte"] }), 25 | commonjs(), 26 | css({ output: "bundle.css" }), 27 | production && terser(), 28 | production && optimizeCss(), 29 | ], 30 | }; 31 | -------------------------------------------------------------------------------- /examples/rollup/src/App.svelte: -------------------------------------------------------------------------------- 1 | 11 | 12 | 65 | -------------------------------------------------------------------------------- /examples/rollup/src/index.js: -------------------------------------------------------------------------------- 1 | import App from "./App.svelte"; 2 | 3 | const app = new App({ target: document.body }); 4 | 5 | export default app; 6 | -------------------------------------------------------------------------------- /examples/sveltekit/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /build 4 | /.svelte-kit 5 | -------------------------------------------------------------------------------- /examples/sveltekit/README.md: -------------------------------------------------------------------------------- 1 | # sveltekit 2 | 3 | > Used for end-to-end testing and development purposes. 4 | 5 | ## Quick Start 6 | 7 | ```sh 8 | # First, build the library locally 9 | bun run build 10 | 11 | # Create a local link to the library 12 | bun link 13 | 14 | # When developing, rebuild the library when making changes 15 | bun run build -w 16 | ``` 17 | 18 | In this folder, you can run the following commands: 19 | 20 | ```sh 21 | # Install dependencies 22 | bun i 23 | ``` 24 | 25 | Run the app in development mode. This should only apply the `optimizeImports` preprocessor. 26 | 27 | ```sh 28 | bun run dev 29 | ``` 30 | 31 | Build the app for production. This should run both the `optimizeImports` and `optimizeCss` preprocessors. 32 | 33 | ```sh 34 | bun run build 35 | ``` 36 | -------------------------------------------------------------------------------- /examples/sveltekit/bun.lock: -------------------------------------------------------------------------------- 1 | { 2 | "lockfileVersion": 1, 3 | "workspaces": { 4 | "": { 5 | "devDependencies": { 6 | "@sveltejs/adapter-static": "latest", 7 | "@sveltejs/kit": "latest", 8 | "@sveltejs/vite-plugin-svelte": "^3.1.2", 9 | "carbon-components-svelte": "^0.85.4", 10 | "carbon-preprocess-svelte": "link:carbon-preprocess-svelte", 11 | "svelte": "^4.2.20", 12 | "typescript": "latest", 13 | "vite": "^5.4.19", 14 | }, 15 | }, 16 | }, 17 | "packages": { 18 | "@ampproject/remapping": ["@ampproject/remapping@2.3.0", "", { "dependencies": { "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.24" } }, "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw=="], 19 | 20 | "@esbuild/aix-ppc64": ["@esbuild/aix-ppc64@0.21.5", "", { "os": "aix", "cpu": "ppc64" }, "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ=="], 21 | 22 | "@esbuild/android-arm": ["@esbuild/android-arm@0.21.5", "", { "os": "android", "cpu": "arm" }, "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg=="], 23 | 24 | "@esbuild/android-arm64": ["@esbuild/android-arm64@0.21.5", "", { "os": "android", "cpu": "arm64" }, "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A=="], 25 | 26 | "@esbuild/android-x64": ["@esbuild/android-x64@0.21.5", "", { "os": "android", "cpu": "x64" }, "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA=="], 27 | 28 | "@esbuild/darwin-arm64": ["@esbuild/darwin-arm64@0.21.5", "", { "os": "darwin", "cpu": "arm64" }, "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ=="], 29 | 30 | "@esbuild/darwin-x64": ["@esbuild/darwin-x64@0.21.5", "", { "os": "darwin", "cpu": "x64" }, "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw=="], 31 | 32 | "@esbuild/freebsd-arm64": ["@esbuild/freebsd-arm64@0.21.5", "", { "os": "freebsd", "cpu": "arm64" }, "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g=="], 33 | 34 | "@esbuild/freebsd-x64": ["@esbuild/freebsd-x64@0.21.5", "", { "os": "freebsd", "cpu": "x64" }, "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ=="], 35 | 36 | "@esbuild/linux-arm": ["@esbuild/linux-arm@0.21.5", "", { "os": "linux", "cpu": "arm" }, "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA=="], 37 | 38 | "@esbuild/linux-arm64": ["@esbuild/linux-arm64@0.21.5", "", { "os": "linux", "cpu": "arm64" }, "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q=="], 39 | 40 | "@esbuild/linux-ia32": ["@esbuild/linux-ia32@0.21.5", "", { "os": "linux", "cpu": "ia32" }, "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg=="], 41 | 42 | "@esbuild/linux-loong64": ["@esbuild/linux-loong64@0.21.5", "", { "os": "linux", "cpu": "none" }, "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg=="], 43 | 44 | "@esbuild/linux-mips64el": ["@esbuild/linux-mips64el@0.21.5", "", { "os": "linux", "cpu": "none" }, "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg=="], 45 | 46 | "@esbuild/linux-ppc64": ["@esbuild/linux-ppc64@0.21.5", "", { "os": "linux", "cpu": "ppc64" }, "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w=="], 47 | 48 | "@esbuild/linux-riscv64": ["@esbuild/linux-riscv64@0.21.5", "", { "os": "linux", "cpu": "none" }, "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA=="], 49 | 50 | "@esbuild/linux-s390x": ["@esbuild/linux-s390x@0.21.5", "", { "os": "linux", "cpu": "s390x" }, "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A=="], 51 | 52 | "@esbuild/linux-x64": ["@esbuild/linux-x64@0.21.5", "", { "os": "linux", "cpu": "x64" }, "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ=="], 53 | 54 | "@esbuild/netbsd-x64": ["@esbuild/netbsd-x64@0.21.5", "", { "os": "none", "cpu": "x64" }, "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg=="], 55 | 56 | "@esbuild/openbsd-x64": ["@esbuild/openbsd-x64@0.21.5", "", { "os": "openbsd", "cpu": "x64" }, "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow=="], 57 | 58 | "@esbuild/sunos-x64": ["@esbuild/sunos-x64@0.21.5", "", { "os": "sunos", "cpu": "x64" }, "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg=="], 59 | 60 | "@esbuild/win32-arm64": ["@esbuild/win32-arm64@0.21.5", "", { "os": "win32", "cpu": "arm64" }, "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A=="], 61 | 62 | "@esbuild/win32-ia32": ["@esbuild/win32-ia32@0.21.5", "", { "os": "win32", "cpu": "ia32" }, "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA=="], 63 | 64 | "@esbuild/win32-x64": ["@esbuild/win32-x64@0.21.5", "", { "os": "win32", "cpu": "x64" }, "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw=="], 65 | 66 | "@ibm/telemetry-js": ["@ibm/telemetry-js@1.8.0", "", { "bin": { "ibmtelemetry": "dist/collect.js" } }, "sha512-1u/8f5TtDHXWNQe+YfIESesZGX2PmhEfyU0znlyFvATch+xc5fPYjXj2gWKMTmdKsDawqAm/BkJBQjx2CDlZww=="], 67 | 68 | "@jridgewell/gen-mapping": ["@jridgewell/gen-mapping@0.3.8", "", { "dependencies": { "@jridgewell/set-array": "^1.2.1", "@jridgewell/sourcemap-codec": "^1.4.10", "@jridgewell/trace-mapping": "^0.3.24" } }, "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA=="], 69 | 70 | "@jridgewell/resolve-uri": ["@jridgewell/resolve-uri@3.1.2", "", {}, "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw=="], 71 | 72 | "@jridgewell/set-array": ["@jridgewell/set-array@1.2.1", "", {}, "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A=="], 73 | 74 | "@jridgewell/sourcemap-codec": ["@jridgewell/sourcemap-codec@1.5.0", "", {}, "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ=="], 75 | 76 | "@jridgewell/trace-mapping": ["@jridgewell/trace-mapping@0.3.25", "", { "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ=="], 77 | 78 | "@polka/url": ["@polka/url@1.0.0-next.28", "", {}, "sha512-8LduaNlMZGwdZ6qWrKlfa+2M4gahzFkprZiAt2TF8uS0qQgBizKXpXURqvTJ4WtmupWxaLqjRb2UCTe72mu+Aw=="], 79 | 80 | "@rollup/rollup-android-arm-eabi": ["@rollup/rollup-android-arm-eabi@4.31.0", "", { "os": "android", "cpu": "arm" }, "sha512-9NrR4033uCbUBRgvLcBrJofa2KY9DzxL2UKZ1/4xA/mnTNyhZCWBuD8X3tPm1n4KxcgaraOYgrFKSgwjASfmlA=="], 81 | 82 | "@rollup/rollup-android-arm64": ["@rollup/rollup-android-arm64@4.31.0", "", { "os": "android", "cpu": "arm64" }, "sha512-iBbODqT86YBFHajxxF8ebj2hwKm1k8PTBQSojSt3d1FFt1gN+xf4CowE47iN0vOSdnd+5ierMHBbu/rHc7nq5g=="], 83 | 84 | "@rollup/rollup-darwin-arm64": ["@rollup/rollup-darwin-arm64@4.31.0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-WHIZfXgVBX30SWuTMhlHPXTyN20AXrLH4TEeH/D0Bolvx9PjgZnn4H677PlSGvU6MKNsjCQJYczkpvBbrBnG6g=="], 85 | 86 | "@rollup/rollup-darwin-x64": ["@rollup/rollup-darwin-x64@4.31.0", "", { "os": "darwin", "cpu": "x64" }, "sha512-hrWL7uQacTEF8gdrQAqcDy9xllQ0w0zuL1wk1HV8wKGSGbKPVjVUv/DEwT2+Asabf8Dh/As+IvfdU+H8hhzrQQ=="], 87 | 88 | "@rollup/rollup-freebsd-arm64": ["@rollup/rollup-freebsd-arm64@4.31.0", "", { "os": "freebsd", "cpu": "arm64" }, "sha512-S2oCsZ4hJviG1QjPY1h6sVJLBI6ekBeAEssYKad1soRFv3SocsQCzX6cwnk6fID6UQQACTjeIMB+hyYrFacRew=="], 89 | 90 | "@rollup/rollup-freebsd-x64": ["@rollup/rollup-freebsd-x64@4.31.0", "", { "os": "freebsd", "cpu": "x64" }, "sha512-pCANqpynRS4Jirn4IKZH4tnm2+2CqCNLKD7gAdEjzdLGbH1iO0zouHz4mxqg0uEMpO030ejJ0aA6e1PJo2xrPA=="], 91 | 92 | "@rollup/rollup-linux-arm-gnueabihf": ["@rollup/rollup-linux-arm-gnueabihf@4.31.0", "", { "os": "linux", "cpu": "arm" }, "sha512-0O8ViX+QcBd3ZmGlcFTnYXZKGbFu09EhgD27tgTdGnkcYXLat4KIsBBQeKLR2xZDCXdIBAlWLkiXE1+rJpCxFw=="], 93 | 94 | "@rollup/rollup-linux-arm-musleabihf": ["@rollup/rollup-linux-arm-musleabihf@4.31.0", "", { "os": "linux", "cpu": "arm" }, "sha512-w5IzG0wTVv7B0/SwDnMYmbr2uERQp999q8FMkKG1I+j8hpPX2BYFjWe69xbhbP6J9h2gId/7ogesl9hwblFwwg=="], 95 | 96 | "@rollup/rollup-linux-arm64-gnu": ["@rollup/rollup-linux-arm64-gnu@4.31.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-JyFFshbN5xwy6fulZ8B/8qOqENRmDdEkcIMF0Zz+RsfamEW+Zabl5jAb0IozP/8UKnJ7g2FtZZPEUIAlUSX8cA=="], 97 | 98 | "@rollup/rollup-linux-arm64-musl": ["@rollup/rollup-linux-arm64-musl@4.31.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-kpQXQ0UPFeMPmPYksiBL9WS/BDiQEjRGMfklVIsA0Sng347H8W2iexch+IEwaR7OVSKtr2ZFxggt11zVIlZ25g=="], 99 | 100 | "@rollup/rollup-linux-loongarch64-gnu": ["@rollup/rollup-linux-loongarch64-gnu@4.31.0", "", { "os": "linux", "cpu": "none" }, "sha512-pMlxLjt60iQTzt9iBb3jZphFIl55a70wexvo8p+vVFK+7ifTRookdoXX3bOsRdmfD+OKnMozKO6XM4zR0sHRrQ=="], 101 | 102 | "@rollup/rollup-linux-powerpc64le-gnu": ["@rollup/rollup-linux-powerpc64le-gnu@4.31.0", "", { "os": "linux", "cpu": "ppc64" }, "sha512-D7TXT7I/uKEuWiRkEFbed1UUYZwcJDU4vZQdPTcepK7ecPhzKOYk4Er2YR4uHKme4qDeIh6N3XrLfpuM7vzRWQ=="], 103 | 104 | "@rollup/rollup-linux-riscv64-gnu": ["@rollup/rollup-linux-riscv64-gnu@4.31.0", "", { "os": "linux", "cpu": "none" }, "sha512-wal2Tc8O5lMBtoePLBYRKj2CImUCJ4UNGJlLwspx7QApYny7K1cUYlzQ/4IGQBLmm+y0RS7dwc3TDO/pmcneTw=="], 105 | 106 | "@rollup/rollup-linux-s390x-gnu": ["@rollup/rollup-linux-s390x-gnu@4.31.0", "", { "os": "linux", "cpu": "s390x" }, "sha512-O1o5EUI0+RRMkK9wiTVpk2tyzXdXefHtRTIjBbmFREmNMy7pFeYXCFGbhKFwISA3UOExlo5GGUuuj3oMKdK6JQ=="], 107 | 108 | "@rollup/rollup-linux-x64-gnu": ["@rollup/rollup-linux-x64-gnu@4.31.0", "", { "os": "linux", "cpu": "x64" }, "sha512-zSoHl356vKnNxwOWnLd60ixHNPRBglxpv2g7q0Cd3Pmr561gf0HiAcUBRL3S1vPqRC17Zo2CX/9cPkqTIiai1g=="], 109 | 110 | "@rollup/rollup-linux-x64-musl": ["@rollup/rollup-linux-x64-musl@4.31.0", "", { "os": "linux", "cpu": "x64" }, "sha512-ypB/HMtcSGhKUQNiFwqgdclWNRrAYDH8iMYH4etw/ZlGwiTVxBz2tDrGRrPlfZu6QjXwtd+C3Zib5pFqID97ZA=="], 111 | 112 | "@rollup/rollup-win32-arm64-msvc": ["@rollup/rollup-win32-arm64-msvc@4.31.0", "", { "os": "win32", "cpu": "arm64" }, "sha512-JuhN2xdI/m8Hr+aVO3vspO7OQfUFO6bKLIRTAy0U15vmWjnZDLrEgCZ2s6+scAYaQVpYSh9tZtRijApw9IXyMw=="], 113 | 114 | "@rollup/rollup-win32-ia32-msvc": ["@rollup/rollup-win32-ia32-msvc@4.31.0", "", { "os": "win32", "cpu": "ia32" }, "sha512-U1xZZXYkvdf5MIWmftU8wrM5PPXzyaY1nGCI4KI4BFfoZxHamsIe+BtnPLIvvPykvQWlVbqUXdLa4aJUuilwLQ=="], 115 | 116 | "@rollup/rollup-win32-x64-msvc": ["@rollup/rollup-win32-x64-msvc@4.31.0", "", { "os": "win32", "cpu": "x64" }, "sha512-ul8rnCsUumNln5YWwz0ted2ZHFhzhRRnkpBZ+YRuHoRAlUji9KChpOUOndY7uykrPEPXVbHLlsdo6v5yXo/TXw=="], 117 | 118 | "@sveltejs/acorn-typescript": ["@sveltejs/acorn-typescript@1.0.5", "", { "peerDependencies": { "acorn": "^8.9.0" } }, "sha512-IwQk4yfwLdibDlrXVE04jTZYlLnwsTT2PIOQQGNLWfjavGifnk1JD1LcZjZaBTRcxZu2FfPfNLOE04DSu9lqtQ=="], 119 | 120 | "@sveltejs/adapter-static": ["@sveltejs/adapter-static@3.0.8", "", { "peerDependencies": { "@sveltejs/kit": "^2.0.0" } }, "sha512-YaDrquRpZwfcXbnlDsSrBQNCChVOT9MGuSg+dMAyfsAa1SmiAhrA5jUYUiIMC59G92kIbY/AaQOWcBdq+lh+zg=="], 121 | 122 | "@sveltejs/kit": ["@sveltejs/kit@2.21.2", "", { "dependencies": { "@sveltejs/acorn-typescript": "^1.0.5", "@types/cookie": "^0.6.0", "acorn": "^8.14.1", "cookie": "^0.6.0", "devalue": "^5.1.0", "esm-env": "^1.2.2", "kleur": "^4.1.5", "magic-string": "^0.30.5", "mrmime": "^2.0.0", "sade": "^1.8.1", "set-cookie-parser": "^2.6.0", "sirv": "^3.0.0" }, "peerDependencies": { "@sveltejs/vite-plugin-svelte": "^3.0.0 || ^4.0.0-next.1 || ^5.0.0", "svelte": "^4.0.0 || ^5.0.0-next.0", "vite": "^5.0.3 || ^6.0.0" }, "bin": { "svelte-kit": "svelte-kit.js" } }, "sha512-EMYTY4+rNa7TaRZYzCqhQslEkACEZzWc363jOYuc90oJrgvlWTcgqTxcGSIJim48hPaXwYlHyatRnnMmTFf5tA=="], 123 | 124 | "@sveltejs/vite-plugin-svelte": ["@sveltejs/vite-plugin-svelte@3.1.2", "", { "dependencies": { "@sveltejs/vite-plugin-svelte-inspector": "^2.1.0", "debug": "^4.3.4", "deepmerge": "^4.3.1", "kleur": "^4.1.5", "magic-string": "^0.30.10", "svelte-hmr": "^0.16.0", "vitefu": "^0.2.5" }, "peerDependencies": { "svelte": "^4.0.0 || ^5.0.0-next.0", "vite": "^5.0.0" } }, "sha512-Txsm1tJvtiYeLUVRNqxZGKR/mI+CzuIQuc2gn+YCs9rMTowpNZ2Nqt53JdL8KF9bLhAf2ruR/dr9eZCwdTriRA=="], 125 | 126 | "@sveltejs/vite-plugin-svelte-inspector": ["@sveltejs/vite-plugin-svelte-inspector@2.1.0", "", { "dependencies": { "debug": "^4.3.4" }, "peerDependencies": { "@sveltejs/vite-plugin-svelte": "^3.0.0", "svelte": "^4.0.0 || ^5.0.0-next.0", "vite": "^5.0.0" } }, "sha512-9QX28IymvBlSCqsCll5t0kQVxipsfhFFL+L2t3nTWfXnddYwxBuAEtTtlaVQpRz9c37BhJjltSeY4AJSC03SSg=="], 127 | 128 | "@types/cookie": ["@types/cookie@0.6.0", "", {}, "sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA=="], 129 | 130 | "@types/estree": ["@types/estree@1.0.6", "", {}, "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw=="], 131 | 132 | "acorn": ["acorn@8.14.1", "", { "bin": { "acorn": "bin/acorn" } }, "sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg=="], 133 | 134 | "aria-query": ["aria-query@5.3.2", "", {}, "sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw=="], 135 | 136 | "axobject-query": ["axobject-query@4.1.0", "", {}, "sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ=="], 137 | 138 | "carbon-components-svelte": ["carbon-components-svelte@0.85.4", "", { "dependencies": { "@ibm/telemetry-js": "^1.5.0", "flatpickr": "4.6.9" } }, "sha512-8dBgRF8Y6TPu+WiythDrYilNAJbhbpHu3kThJazquCO1hyGftWsa2T0HhY+k4+szIiutcc8qVzUMfRZvcGUflQ=="], 139 | 140 | "carbon-preprocess-svelte": ["carbon-preprocess-svelte@link:carbon-preprocess-svelte", {}], 141 | 142 | "code-red": ["code-red@1.0.4", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.4.15", "@types/estree": "^1.0.1", "acorn": "^8.10.0", "estree-walker": "^3.0.3", "periscopic": "^3.1.0" } }, "sha512-7qJWqItLA8/VPVlKJlFXU+NBlo/qyfs39aJcuMT/2ere32ZqvF5OSxgdM5xOfJJ7O429gg2HM47y8v9P+9wrNw=="], 143 | 144 | "cookie": ["cookie@0.6.0", "", {}, "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw=="], 145 | 146 | "css-tree": ["css-tree@2.3.1", "", { "dependencies": { "mdn-data": "2.0.30", "source-map-js": "^1.0.1" } }, "sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw=="], 147 | 148 | "debug": ["debug@4.4.0", "", { "dependencies": { "ms": "^2.1.3" } }, "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA=="], 149 | 150 | "deepmerge": ["deepmerge@4.3.1", "", {}, "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A=="], 151 | 152 | "devalue": ["devalue@5.1.1", "", {}, "sha512-maua5KUiapvEwiEAe+XnlZ3Rh0GD+qI1J/nb9vrJc3muPXvcF/8gXYTWF76+5DAqHyDUtOIImEuo0YKE9mshVw=="], 153 | 154 | "esbuild": ["esbuild@0.21.5", "", { "optionalDependencies": { "@esbuild/aix-ppc64": "0.21.5", "@esbuild/android-arm": "0.21.5", "@esbuild/android-arm64": "0.21.5", "@esbuild/android-x64": "0.21.5", "@esbuild/darwin-arm64": "0.21.5", "@esbuild/darwin-x64": "0.21.5", "@esbuild/freebsd-arm64": "0.21.5", "@esbuild/freebsd-x64": "0.21.5", "@esbuild/linux-arm": "0.21.5", "@esbuild/linux-arm64": "0.21.5", "@esbuild/linux-ia32": "0.21.5", "@esbuild/linux-loong64": "0.21.5", "@esbuild/linux-mips64el": "0.21.5", "@esbuild/linux-ppc64": "0.21.5", "@esbuild/linux-riscv64": "0.21.5", "@esbuild/linux-s390x": "0.21.5", "@esbuild/linux-x64": "0.21.5", "@esbuild/netbsd-x64": "0.21.5", "@esbuild/openbsd-x64": "0.21.5", "@esbuild/sunos-x64": "0.21.5", "@esbuild/win32-arm64": "0.21.5", "@esbuild/win32-ia32": "0.21.5", "@esbuild/win32-x64": "0.21.5" }, "bin": { "esbuild": "bin/esbuild" } }, "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw=="], 155 | 156 | "esm-env": ["esm-env@1.2.2", "", {}, "sha512-Epxrv+Nr/CaL4ZcFGPJIYLWFom+YeV1DqMLHJoEd9SYRxNbaFruBwfEX/kkHUJf55j2+TUbmDcmuilbP1TmXHA=="], 157 | 158 | "estree-walker": ["estree-walker@3.0.3", "", { "dependencies": { "@types/estree": "^1.0.0" } }, "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g=="], 159 | 160 | "flatpickr": ["flatpickr@4.6.9", "", {}, "sha512-F0azNNi8foVWKSF+8X+ZJzz8r9sE1G4hl06RyceIaLvyltKvDl6vqk9Lm/6AUUCi5HWaIjiUbk7UpeE/fOXOpw=="], 161 | 162 | "fsevents": ["fsevents@2.3.3", "", { "os": "darwin" }, "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw=="], 163 | 164 | "is-reference": ["is-reference@3.0.3", "", { "dependencies": { "@types/estree": "^1.0.6" } }, "sha512-ixkJoqQvAP88E6wLydLGGqCJsrFUnqoH6HnaczB8XmDH1oaWU+xxdptvikTgaEhtZ53Ky6YXiBuUI2WXLMCwjw=="], 165 | 166 | "kleur": ["kleur@4.1.5", "", {}, "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ=="], 167 | 168 | "locate-character": ["locate-character@3.0.0", "", {}, "sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA=="], 169 | 170 | "magic-string": ["magic-string@0.30.17", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.0" } }, "sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA=="], 171 | 172 | "mdn-data": ["mdn-data@2.0.30", "", {}, "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA=="], 173 | 174 | "mri": ["mri@1.2.0", "", {}, "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA=="], 175 | 176 | "mrmime": ["mrmime@2.0.0", "", {}, "sha512-eu38+hdgojoyq63s+yTpN4XMBdt5l8HhMhc4VKLO9KM5caLIBvUm4thi7fFaxyTmCKeNnXZ5pAlBwCUnhA09uw=="], 177 | 178 | "ms": ["ms@2.1.3", "", {}, "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="], 179 | 180 | "nanoid": ["nanoid@3.3.8", "", { "bin": { "nanoid": "bin/nanoid.cjs" } }, "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w=="], 181 | 182 | "periscopic": ["periscopic@3.1.0", "", { "dependencies": { "@types/estree": "^1.0.0", "estree-walker": "^3.0.0", "is-reference": "^3.0.0" } }, "sha512-vKiQ8RRtkl9P+r/+oefh25C3fhybptkHKCZSPlcXiJux2tJF55GnEj3BVn4A5gKfq9NWWXXrxkHBwVPUfH0opw=="], 183 | 184 | "picocolors": ["picocolors@1.1.1", "", {}, "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA=="], 185 | 186 | "postcss": ["postcss@8.5.1", "", { "dependencies": { "nanoid": "^3.3.8", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" } }, "sha512-6oz2beyjc5VMn/KV1pPw8fliQkhBXrVn1Z3TVyqZxU8kZpzEKhBdmCFqI6ZbmGtamQvQGuU1sgPTk8ZrXDD7jQ=="], 187 | 188 | "rollup": ["rollup@4.31.0", "", { "dependencies": { "@types/estree": "1.0.6" }, "optionalDependencies": { "@rollup/rollup-android-arm-eabi": "4.31.0", "@rollup/rollup-android-arm64": "4.31.0", "@rollup/rollup-darwin-arm64": "4.31.0", "@rollup/rollup-darwin-x64": "4.31.0", "@rollup/rollup-freebsd-arm64": "4.31.0", "@rollup/rollup-freebsd-x64": "4.31.0", "@rollup/rollup-linux-arm-gnueabihf": "4.31.0", "@rollup/rollup-linux-arm-musleabihf": "4.31.0", "@rollup/rollup-linux-arm64-gnu": "4.31.0", "@rollup/rollup-linux-arm64-musl": "4.31.0", "@rollup/rollup-linux-loongarch64-gnu": "4.31.0", "@rollup/rollup-linux-powerpc64le-gnu": "4.31.0", "@rollup/rollup-linux-riscv64-gnu": "4.31.0", "@rollup/rollup-linux-s390x-gnu": "4.31.0", "@rollup/rollup-linux-x64-gnu": "4.31.0", "@rollup/rollup-linux-x64-musl": "4.31.0", "@rollup/rollup-win32-arm64-msvc": "4.31.0", "@rollup/rollup-win32-ia32-msvc": "4.31.0", "@rollup/rollup-win32-x64-msvc": "4.31.0", "fsevents": "~2.3.2" }, "bin": { "rollup": "dist/bin/rollup" } }, "sha512-9cCE8P4rZLx9+PjoyqHLs31V9a9Vpvfo4qNcs6JCiGWYhw2gijSetFbH6SSy1whnkgcefnUwr8sad7tgqsGvnw=="], 189 | 190 | "sade": ["sade@1.8.1", "", { "dependencies": { "mri": "^1.1.0" } }, "sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A=="], 191 | 192 | "set-cookie-parser": ["set-cookie-parser@2.7.1", "", {}, "sha512-IOc8uWeOZgnb3ptbCURJWNjWUPcO3ZnTTdzsurqERrP6nPyv+paC55vJM0LpOlT2ne+Ix+9+CRG1MNLlyZ4GjQ=="], 193 | 194 | "sirv": ["sirv@3.0.0", "", { "dependencies": { "@polka/url": "^1.0.0-next.24", "mrmime": "^2.0.0", "totalist": "^3.0.0" } }, "sha512-BPwJGUeDaDCHihkORDchNyyTvWFhcusy1XMmhEVTQTwGeybFbp8YEmB+njbPnth1FibULBSBVwCQni25XlCUDg=="], 195 | 196 | "source-map-js": ["source-map-js@1.2.1", "", {}, "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA=="], 197 | 198 | "svelte": ["svelte@4.2.20", "", { "dependencies": { "@ampproject/remapping": "^2.2.1", "@jridgewell/sourcemap-codec": "^1.4.15", "@jridgewell/trace-mapping": "^0.3.18", "@types/estree": "^1.0.1", "acorn": "^8.9.0", "aria-query": "^5.3.0", "axobject-query": "^4.0.0", "code-red": "^1.0.3", "css-tree": "^2.3.1", "estree-walker": "^3.0.3", "is-reference": "^3.0.1", "locate-character": "^3.0.0", "magic-string": "^0.30.4", "periscopic": "^3.1.0" } }, "sha512-eeEgGc2DtiUil5ANdtd8vPwt9AgaMdnuUFnPft9F5oMvU/FHu5IHFic+p1dR/UOB7XU2mX2yHW+NcTch4DCh5Q=="], 199 | 200 | "svelte-hmr": ["svelte-hmr@0.16.0", "", { "peerDependencies": { "svelte": "^3.19.0 || ^4.0.0" } }, "sha512-Gyc7cOS3VJzLlfj7wKS0ZnzDVdv3Pn2IuVeJPk9m2skfhcu5bq3wtIZyQGggr7/Iim5rH5cncyQft/kRLupcnA=="], 201 | 202 | "totalist": ["totalist@3.0.1", "", {}, "sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ=="], 203 | 204 | "typescript": ["typescript@5.8.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ=="], 205 | 206 | "vite": ["vite@5.4.19", "", { "dependencies": { "esbuild": "^0.21.3", "postcss": "^8.4.43", "rollup": "^4.20.0" }, "optionalDependencies": { "fsevents": "~2.3.3" }, "peerDependencies": { "@types/node": "^18.0.0 || >=20.0.0", "less": "*", "lightningcss": "^1.21.0", "sass": "*", "sass-embedded": "*", "stylus": "*", "sugarss": "*", "terser": "^5.4.0" }, "optionalPeers": ["@types/node", "less", "lightningcss", "sass", "sass-embedded", "stylus", "sugarss", "terser"], "bin": { "vite": "bin/vite.js" } }, "sha512-qO3aKv3HoQC8QKiNSTuUM1l9o/XX3+c+VTgLHbJWHZGeTPVAg2XwazI9UWzoxjIJCGCV2zU60uqMzjeLZuULqA=="], 207 | 208 | "vitefu": ["vitefu@0.2.5", "", { "peerDependencies": { "vite": "^3.0.0 || ^4.0.0 || ^5.0.0" }, "optionalPeers": ["vite"] }, "sha512-SgHtMLoqaeeGnd2evZ849ZbACbnwQCIwRH57t18FxcXoZop0uQu0uzlIhJBlF/eWVzuce0sHeqPcDo+evVcg8Q=="], 209 | 210 | "code-red/acorn": ["acorn@8.14.0", "", { "bin": { "acorn": "bin/acorn" } }, "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA=="], 211 | } 212 | } 213 | -------------------------------------------------------------------------------- /examples/sveltekit/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "scripts": { 4 | "dev": "vite dev", 5 | "build": "vite build", 6 | "preview": "vite preview" 7 | }, 8 | "devDependencies": { 9 | "@sveltejs/adapter-static": "latest", 10 | "@sveltejs/kit": "latest", 11 | "@sveltejs/vite-plugin-svelte": "^3.1.2", 12 | "carbon-components-svelte": "^0.85.4", 13 | "carbon-preprocess-svelte": "link:carbon-preprocess-svelte", 14 | "svelte": "^4.2.20", 15 | "typescript": "latest", 16 | "vite": "^5.4.19" 17 | }, 18 | "type": "module" 19 | } 20 | -------------------------------------------------------------------------------- /examples/sveltekit/src/app.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | %sveltekit.head% 8 | 9 | 10 |
%sveltekit.body%
11 | 12 | 13 | -------------------------------------------------------------------------------- /examples/sveltekit/src/routes/+layout.js: -------------------------------------------------------------------------------- 1 | export const prerender = true; 2 | -------------------------------------------------------------------------------- /examples/sveltekit/src/routes/+page.svelte: -------------------------------------------------------------------------------- 1 | 11 | 12 | 65 | -------------------------------------------------------------------------------- /examples/sveltekit/static/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carbon-design-system/carbon-preprocess-svelte/5f0fa065dd37c40954a1e1eee465e751c4f83c01/examples/sveltekit/static/favicon.png -------------------------------------------------------------------------------- /examples/sveltekit/svelte.config.js: -------------------------------------------------------------------------------- 1 | import adapter from "@sveltejs/adapter-static"; 2 | import { vitePreprocess } from "@sveltejs/vite-plugin-svelte"; 3 | import { optimizeImports } from "carbon-preprocess-svelte"; 4 | 5 | /** @type {import('@sveltejs/kit').Config} */ 6 | const config = { 7 | preprocess: [vitePreprocess(), optimizeImports()], 8 | kit: { 9 | adapter: adapter(), 10 | }, 11 | }; 12 | 13 | export default config; 14 | -------------------------------------------------------------------------------- /examples/sveltekit/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./.svelte-kit/tsconfig.json" 3 | } 4 | -------------------------------------------------------------------------------- /examples/sveltekit/vite.config.js: -------------------------------------------------------------------------------- 1 | import { sveltekit } from "@sveltejs/kit/vite"; 2 | import { optimizeCss } from "carbon-preprocess-svelte"; 3 | import { defineConfig } from "vite"; 4 | 5 | export default defineConfig({ 6 | plugins: [sveltekit(), optimizeCss()], 7 | 8 | // Optional, but recommended for even faster cold starts. 9 | // Instruct Vite to exclude packages that `optimizeImports` will resolve. 10 | optimizeDeps: { 11 | exclude: [ 12 | "carbon-components-svelte", 13 | "carbon-icons-svelte", 14 | "carbon-pictograms-svelte", 15 | ], 16 | }, 17 | }); 18 | -------------------------------------------------------------------------------- /examples/vite/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | public 4 | -------------------------------------------------------------------------------- /examples/vite/README.md: -------------------------------------------------------------------------------- 1 | # vite 2 | 3 | > Used for end-to-end testing and development purposes. 4 | 5 | ## Quick Start 6 | 7 | ```sh 8 | # First, build the library locally 9 | bun run build 10 | 11 | # Create a local link to the library 12 | bun link 13 | 14 | # When developing, rebuild the library when making changes 15 | bun run build -w 16 | ``` 17 | 18 | In this folder, you can run the following commands: 19 | 20 | ```sh 21 | # Install dependencies 22 | bun i 23 | ``` 24 | 25 | Run the app in development mode. This should only apply the `optimizeImports` preprocessor. 26 | 27 | ```sh 28 | bun run dev 29 | ``` 30 | 31 | Build the app for production. This should run both the `optimizeImports` and `optimizeCss` preprocessors. 32 | 33 | ```sh 34 | bun run build 35 | ``` 36 | -------------------------------------------------------------------------------- /examples/vite/bun.lock: -------------------------------------------------------------------------------- 1 | { 2 | "lockfileVersion": 1, 3 | "workspaces": { 4 | "": { 5 | "devDependencies": { 6 | "@sveltejs/vite-plugin-svelte": "^3.1.2", 7 | "carbon-components-svelte": "^0.85.4", 8 | "carbon-preprocess-svelte": "link:carbon-preprocess-svelte", 9 | "svelte": "^4.2.20", 10 | "typescript": "latest", 11 | "vite": "^5.4.19", 12 | }, 13 | }, 14 | }, 15 | "packages": { 16 | "@ampproject/remapping": ["@ampproject/remapping@2.3.0", "", { "dependencies": { "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.24" } }, "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw=="], 17 | 18 | "@esbuild/aix-ppc64": ["@esbuild/aix-ppc64@0.21.5", "", { "os": "aix", "cpu": "ppc64" }, "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ=="], 19 | 20 | "@esbuild/android-arm": ["@esbuild/android-arm@0.21.5", "", { "os": "android", "cpu": "arm" }, "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg=="], 21 | 22 | "@esbuild/android-arm64": ["@esbuild/android-arm64@0.21.5", "", { "os": "android", "cpu": "arm64" }, "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A=="], 23 | 24 | "@esbuild/android-x64": ["@esbuild/android-x64@0.21.5", "", { "os": "android", "cpu": "x64" }, "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA=="], 25 | 26 | "@esbuild/darwin-arm64": ["@esbuild/darwin-arm64@0.21.5", "", { "os": "darwin", "cpu": "arm64" }, "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ=="], 27 | 28 | "@esbuild/darwin-x64": ["@esbuild/darwin-x64@0.21.5", "", { "os": "darwin", "cpu": "x64" }, "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw=="], 29 | 30 | "@esbuild/freebsd-arm64": ["@esbuild/freebsd-arm64@0.21.5", "", { "os": "freebsd", "cpu": "arm64" }, "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g=="], 31 | 32 | "@esbuild/freebsd-x64": ["@esbuild/freebsd-x64@0.21.5", "", { "os": "freebsd", "cpu": "x64" }, "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ=="], 33 | 34 | "@esbuild/linux-arm": ["@esbuild/linux-arm@0.21.5", "", { "os": "linux", "cpu": "arm" }, "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA=="], 35 | 36 | "@esbuild/linux-arm64": ["@esbuild/linux-arm64@0.21.5", "", { "os": "linux", "cpu": "arm64" }, "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q=="], 37 | 38 | "@esbuild/linux-ia32": ["@esbuild/linux-ia32@0.21.5", "", { "os": "linux", "cpu": "ia32" }, "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg=="], 39 | 40 | "@esbuild/linux-loong64": ["@esbuild/linux-loong64@0.21.5", "", { "os": "linux", "cpu": "none" }, "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg=="], 41 | 42 | "@esbuild/linux-mips64el": ["@esbuild/linux-mips64el@0.21.5", "", { "os": "linux", "cpu": "none" }, "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg=="], 43 | 44 | "@esbuild/linux-ppc64": ["@esbuild/linux-ppc64@0.21.5", "", { "os": "linux", "cpu": "ppc64" }, "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w=="], 45 | 46 | "@esbuild/linux-riscv64": ["@esbuild/linux-riscv64@0.21.5", "", { "os": "linux", "cpu": "none" }, "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA=="], 47 | 48 | "@esbuild/linux-s390x": ["@esbuild/linux-s390x@0.21.5", "", { "os": "linux", "cpu": "s390x" }, "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A=="], 49 | 50 | "@esbuild/linux-x64": ["@esbuild/linux-x64@0.21.5", "", { "os": "linux", "cpu": "x64" }, "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ=="], 51 | 52 | "@esbuild/netbsd-x64": ["@esbuild/netbsd-x64@0.21.5", "", { "os": "none", "cpu": "x64" }, "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg=="], 53 | 54 | "@esbuild/openbsd-x64": ["@esbuild/openbsd-x64@0.21.5", "", { "os": "openbsd", "cpu": "x64" }, "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow=="], 55 | 56 | "@esbuild/sunos-x64": ["@esbuild/sunos-x64@0.21.5", "", { "os": "sunos", "cpu": "x64" }, "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg=="], 57 | 58 | "@esbuild/win32-arm64": ["@esbuild/win32-arm64@0.21.5", "", { "os": "win32", "cpu": "arm64" }, "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A=="], 59 | 60 | "@esbuild/win32-ia32": ["@esbuild/win32-ia32@0.21.5", "", { "os": "win32", "cpu": "ia32" }, "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA=="], 61 | 62 | "@esbuild/win32-x64": ["@esbuild/win32-x64@0.21.5", "", { "os": "win32", "cpu": "x64" }, "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw=="], 63 | 64 | "@ibm/telemetry-js": ["@ibm/telemetry-js@1.8.0", "", { "bin": { "ibmtelemetry": "dist/collect.js" } }, "sha512-1u/8f5TtDHXWNQe+YfIESesZGX2PmhEfyU0znlyFvATch+xc5fPYjXj2gWKMTmdKsDawqAm/BkJBQjx2CDlZww=="], 65 | 66 | "@jridgewell/gen-mapping": ["@jridgewell/gen-mapping@0.3.8", "", { "dependencies": { "@jridgewell/set-array": "^1.2.1", "@jridgewell/sourcemap-codec": "^1.4.10", "@jridgewell/trace-mapping": "^0.3.24" } }, "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA=="], 67 | 68 | "@jridgewell/resolve-uri": ["@jridgewell/resolve-uri@3.1.2", "", {}, "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw=="], 69 | 70 | "@jridgewell/set-array": ["@jridgewell/set-array@1.2.1", "", {}, "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A=="], 71 | 72 | "@jridgewell/sourcemap-codec": ["@jridgewell/sourcemap-codec@1.5.0", "", {}, "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ=="], 73 | 74 | "@jridgewell/trace-mapping": ["@jridgewell/trace-mapping@0.3.25", "", { "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ=="], 75 | 76 | "@rollup/rollup-android-arm-eabi": ["@rollup/rollup-android-arm-eabi@4.31.0", "", { "os": "android", "cpu": "arm" }, "sha512-9NrR4033uCbUBRgvLcBrJofa2KY9DzxL2UKZ1/4xA/mnTNyhZCWBuD8X3tPm1n4KxcgaraOYgrFKSgwjASfmlA=="], 77 | 78 | "@rollup/rollup-android-arm64": ["@rollup/rollup-android-arm64@4.31.0", "", { "os": "android", "cpu": "arm64" }, "sha512-iBbODqT86YBFHajxxF8ebj2hwKm1k8PTBQSojSt3d1FFt1gN+xf4CowE47iN0vOSdnd+5ierMHBbu/rHc7nq5g=="], 79 | 80 | "@rollup/rollup-darwin-arm64": ["@rollup/rollup-darwin-arm64@4.31.0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-WHIZfXgVBX30SWuTMhlHPXTyN20AXrLH4TEeH/D0Bolvx9PjgZnn4H677PlSGvU6MKNsjCQJYczkpvBbrBnG6g=="], 81 | 82 | "@rollup/rollup-darwin-x64": ["@rollup/rollup-darwin-x64@4.31.0", "", { "os": "darwin", "cpu": "x64" }, "sha512-hrWL7uQacTEF8gdrQAqcDy9xllQ0w0zuL1wk1HV8wKGSGbKPVjVUv/DEwT2+Asabf8Dh/As+IvfdU+H8hhzrQQ=="], 83 | 84 | "@rollup/rollup-freebsd-arm64": ["@rollup/rollup-freebsd-arm64@4.31.0", "", { "os": "freebsd", "cpu": "arm64" }, "sha512-S2oCsZ4hJviG1QjPY1h6sVJLBI6ekBeAEssYKad1soRFv3SocsQCzX6cwnk6fID6UQQACTjeIMB+hyYrFacRew=="], 85 | 86 | "@rollup/rollup-freebsd-x64": ["@rollup/rollup-freebsd-x64@4.31.0", "", { "os": "freebsd", "cpu": "x64" }, "sha512-pCANqpynRS4Jirn4IKZH4tnm2+2CqCNLKD7gAdEjzdLGbH1iO0zouHz4mxqg0uEMpO030ejJ0aA6e1PJo2xrPA=="], 87 | 88 | "@rollup/rollup-linux-arm-gnueabihf": ["@rollup/rollup-linux-arm-gnueabihf@4.31.0", "", { "os": "linux", "cpu": "arm" }, "sha512-0O8ViX+QcBd3ZmGlcFTnYXZKGbFu09EhgD27tgTdGnkcYXLat4KIsBBQeKLR2xZDCXdIBAlWLkiXE1+rJpCxFw=="], 89 | 90 | "@rollup/rollup-linux-arm-musleabihf": ["@rollup/rollup-linux-arm-musleabihf@4.31.0", "", { "os": "linux", "cpu": "arm" }, "sha512-w5IzG0wTVv7B0/SwDnMYmbr2uERQp999q8FMkKG1I+j8hpPX2BYFjWe69xbhbP6J9h2gId/7ogesl9hwblFwwg=="], 91 | 92 | "@rollup/rollup-linux-arm64-gnu": ["@rollup/rollup-linux-arm64-gnu@4.31.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-JyFFshbN5xwy6fulZ8B/8qOqENRmDdEkcIMF0Zz+RsfamEW+Zabl5jAb0IozP/8UKnJ7g2FtZZPEUIAlUSX8cA=="], 93 | 94 | "@rollup/rollup-linux-arm64-musl": ["@rollup/rollup-linux-arm64-musl@4.31.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-kpQXQ0UPFeMPmPYksiBL9WS/BDiQEjRGMfklVIsA0Sng347H8W2iexch+IEwaR7OVSKtr2ZFxggt11zVIlZ25g=="], 95 | 96 | "@rollup/rollup-linux-loongarch64-gnu": ["@rollup/rollup-linux-loongarch64-gnu@4.31.0", "", { "os": "linux", "cpu": "none" }, "sha512-pMlxLjt60iQTzt9iBb3jZphFIl55a70wexvo8p+vVFK+7ifTRookdoXX3bOsRdmfD+OKnMozKO6XM4zR0sHRrQ=="], 97 | 98 | "@rollup/rollup-linux-powerpc64le-gnu": ["@rollup/rollup-linux-powerpc64le-gnu@4.31.0", "", { "os": "linux", "cpu": "ppc64" }, "sha512-D7TXT7I/uKEuWiRkEFbed1UUYZwcJDU4vZQdPTcepK7ecPhzKOYk4Er2YR4uHKme4qDeIh6N3XrLfpuM7vzRWQ=="], 99 | 100 | "@rollup/rollup-linux-riscv64-gnu": ["@rollup/rollup-linux-riscv64-gnu@4.31.0", "", { "os": "linux", "cpu": "none" }, "sha512-wal2Tc8O5lMBtoePLBYRKj2CImUCJ4UNGJlLwspx7QApYny7K1cUYlzQ/4IGQBLmm+y0RS7dwc3TDO/pmcneTw=="], 101 | 102 | "@rollup/rollup-linux-s390x-gnu": ["@rollup/rollup-linux-s390x-gnu@4.31.0", "", { "os": "linux", "cpu": "s390x" }, "sha512-O1o5EUI0+RRMkK9wiTVpk2tyzXdXefHtRTIjBbmFREmNMy7pFeYXCFGbhKFwISA3UOExlo5GGUuuj3oMKdK6JQ=="], 103 | 104 | "@rollup/rollup-linux-x64-gnu": ["@rollup/rollup-linux-x64-gnu@4.31.0", "", { "os": "linux", "cpu": "x64" }, "sha512-zSoHl356vKnNxwOWnLd60ixHNPRBglxpv2g7q0Cd3Pmr561gf0HiAcUBRL3S1vPqRC17Zo2CX/9cPkqTIiai1g=="], 105 | 106 | "@rollup/rollup-linux-x64-musl": ["@rollup/rollup-linux-x64-musl@4.31.0", "", { "os": "linux", "cpu": "x64" }, "sha512-ypB/HMtcSGhKUQNiFwqgdclWNRrAYDH8iMYH4etw/ZlGwiTVxBz2tDrGRrPlfZu6QjXwtd+C3Zib5pFqID97ZA=="], 107 | 108 | "@rollup/rollup-win32-arm64-msvc": ["@rollup/rollup-win32-arm64-msvc@4.31.0", "", { "os": "win32", "cpu": "arm64" }, "sha512-JuhN2xdI/m8Hr+aVO3vspO7OQfUFO6bKLIRTAy0U15vmWjnZDLrEgCZ2s6+scAYaQVpYSh9tZtRijApw9IXyMw=="], 109 | 110 | "@rollup/rollup-win32-ia32-msvc": ["@rollup/rollup-win32-ia32-msvc@4.31.0", "", { "os": "win32", "cpu": "ia32" }, "sha512-U1xZZXYkvdf5MIWmftU8wrM5PPXzyaY1nGCI4KI4BFfoZxHamsIe+BtnPLIvvPykvQWlVbqUXdLa4aJUuilwLQ=="], 111 | 112 | "@rollup/rollup-win32-x64-msvc": ["@rollup/rollup-win32-x64-msvc@4.31.0", "", { "os": "win32", "cpu": "x64" }, "sha512-ul8rnCsUumNln5YWwz0ted2ZHFhzhRRnkpBZ+YRuHoRAlUji9KChpOUOndY7uykrPEPXVbHLlsdo6v5yXo/TXw=="], 113 | 114 | "@sveltejs/vite-plugin-svelte": ["@sveltejs/vite-plugin-svelte@3.1.2", "", { "dependencies": { "@sveltejs/vite-plugin-svelte-inspector": "^2.1.0", "debug": "^4.3.4", "deepmerge": "^4.3.1", "kleur": "^4.1.5", "magic-string": "^0.30.10", "svelte-hmr": "^0.16.0", "vitefu": "^0.2.5" }, "peerDependencies": { "svelte": "^4.0.0 || ^5.0.0-next.0", "vite": "^5.0.0" } }, "sha512-Txsm1tJvtiYeLUVRNqxZGKR/mI+CzuIQuc2gn+YCs9rMTowpNZ2Nqt53JdL8KF9bLhAf2ruR/dr9eZCwdTriRA=="], 115 | 116 | "@sveltejs/vite-plugin-svelte-inspector": ["@sveltejs/vite-plugin-svelte-inspector@2.1.0", "", { "dependencies": { "debug": "^4.3.4" }, "peerDependencies": { "@sveltejs/vite-plugin-svelte": "^3.0.0", "svelte": "^4.0.0 || ^5.0.0-next.0", "vite": "^5.0.0" } }, "sha512-9QX28IymvBlSCqsCll5t0kQVxipsfhFFL+L2t3nTWfXnddYwxBuAEtTtlaVQpRz9c37BhJjltSeY4AJSC03SSg=="], 117 | 118 | "@types/estree": ["@types/estree@1.0.6", "", {}, "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw=="], 119 | 120 | "acorn": ["acorn@8.14.0", "", { "bin": { "acorn": "bin/acorn" } }, "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA=="], 121 | 122 | "aria-query": ["aria-query@5.3.2", "", {}, "sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw=="], 123 | 124 | "axobject-query": ["axobject-query@4.1.0", "", {}, "sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ=="], 125 | 126 | "carbon-components-svelte": ["carbon-components-svelte@0.85.4", "", { "dependencies": { "@ibm/telemetry-js": "^1.5.0", "flatpickr": "4.6.9" } }, "sha512-8dBgRF8Y6TPu+WiythDrYilNAJbhbpHu3kThJazquCO1hyGftWsa2T0HhY+k4+szIiutcc8qVzUMfRZvcGUflQ=="], 127 | 128 | "carbon-preprocess-svelte": ["carbon-preprocess-svelte@link:carbon-preprocess-svelte", {}], 129 | 130 | "code-red": ["code-red@1.0.4", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.4.15", "@types/estree": "^1.0.1", "acorn": "^8.10.0", "estree-walker": "^3.0.3", "periscopic": "^3.1.0" } }, "sha512-7qJWqItLA8/VPVlKJlFXU+NBlo/qyfs39aJcuMT/2ere32ZqvF5OSxgdM5xOfJJ7O429gg2HM47y8v9P+9wrNw=="], 131 | 132 | "css-tree": ["css-tree@2.3.1", "", { "dependencies": { "mdn-data": "2.0.30", "source-map-js": "^1.0.1" } }, "sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw=="], 133 | 134 | "debug": ["debug@4.4.0", "", { "dependencies": { "ms": "^2.1.3" } }, "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA=="], 135 | 136 | "deepmerge": ["deepmerge@4.3.1", "", {}, "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A=="], 137 | 138 | "esbuild": ["esbuild@0.21.5", "", { "optionalDependencies": { "@esbuild/aix-ppc64": "0.21.5", "@esbuild/android-arm": "0.21.5", "@esbuild/android-arm64": "0.21.5", "@esbuild/android-x64": "0.21.5", "@esbuild/darwin-arm64": "0.21.5", "@esbuild/darwin-x64": "0.21.5", "@esbuild/freebsd-arm64": "0.21.5", "@esbuild/freebsd-x64": "0.21.5", "@esbuild/linux-arm": "0.21.5", "@esbuild/linux-arm64": "0.21.5", "@esbuild/linux-ia32": "0.21.5", "@esbuild/linux-loong64": "0.21.5", "@esbuild/linux-mips64el": "0.21.5", "@esbuild/linux-ppc64": "0.21.5", "@esbuild/linux-riscv64": "0.21.5", "@esbuild/linux-s390x": "0.21.5", "@esbuild/linux-x64": "0.21.5", "@esbuild/netbsd-x64": "0.21.5", "@esbuild/openbsd-x64": "0.21.5", "@esbuild/sunos-x64": "0.21.5", "@esbuild/win32-arm64": "0.21.5", "@esbuild/win32-ia32": "0.21.5", "@esbuild/win32-x64": "0.21.5" }, "bin": { "esbuild": "bin/esbuild" } }, "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw=="], 139 | 140 | "estree-walker": ["estree-walker@3.0.3", "", { "dependencies": { "@types/estree": "^1.0.0" } }, "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g=="], 141 | 142 | "flatpickr": ["flatpickr@4.6.9", "", {}, "sha512-F0azNNi8foVWKSF+8X+ZJzz8r9sE1G4hl06RyceIaLvyltKvDl6vqk9Lm/6AUUCi5HWaIjiUbk7UpeE/fOXOpw=="], 143 | 144 | "fsevents": ["fsevents@2.3.3", "", { "os": "darwin" }, "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw=="], 145 | 146 | "is-reference": ["is-reference@3.0.3", "", { "dependencies": { "@types/estree": "^1.0.6" } }, "sha512-ixkJoqQvAP88E6wLydLGGqCJsrFUnqoH6HnaczB8XmDH1oaWU+xxdptvikTgaEhtZ53Ky6YXiBuUI2WXLMCwjw=="], 147 | 148 | "kleur": ["kleur@4.1.5", "", {}, "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ=="], 149 | 150 | "locate-character": ["locate-character@3.0.0", "", {}, "sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA=="], 151 | 152 | "magic-string": ["magic-string@0.30.17", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.0" } }, "sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA=="], 153 | 154 | "mdn-data": ["mdn-data@2.0.30", "", {}, "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA=="], 155 | 156 | "ms": ["ms@2.1.3", "", {}, "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="], 157 | 158 | "nanoid": ["nanoid@3.3.8", "", { "bin": { "nanoid": "bin/nanoid.cjs" } }, "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w=="], 159 | 160 | "periscopic": ["periscopic@3.1.0", "", { "dependencies": { "@types/estree": "^1.0.0", "estree-walker": "^3.0.0", "is-reference": "^3.0.0" } }, "sha512-vKiQ8RRtkl9P+r/+oefh25C3fhybptkHKCZSPlcXiJux2tJF55GnEj3BVn4A5gKfq9NWWXXrxkHBwVPUfH0opw=="], 161 | 162 | "picocolors": ["picocolors@1.1.1", "", {}, "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA=="], 163 | 164 | "postcss": ["postcss@8.5.1", "", { "dependencies": { "nanoid": "^3.3.8", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" } }, "sha512-6oz2beyjc5VMn/KV1pPw8fliQkhBXrVn1Z3TVyqZxU8kZpzEKhBdmCFqI6ZbmGtamQvQGuU1sgPTk8ZrXDD7jQ=="], 165 | 166 | "rollup": ["rollup@4.31.0", "", { "dependencies": { "@types/estree": "1.0.6" }, "optionalDependencies": { "@rollup/rollup-android-arm-eabi": "4.31.0", "@rollup/rollup-android-arm64": "4.31.0", "@rollup/rollup-darwin-arm64": "4.31.0", "@rollup/rollup-darwin-x64": "4.31.0", "@rollup/rollup-freebsd-arm64": "4.31.0", "@rollup/rollup-freebsd-x64": "4.31.0", "@rollup/rollup-linux-arm-gnueabihf": "4.31.0", "@rollup/rollup-linux-arm-musleabihf": "4.31.0", "@rollup/rollup-linux-arm64-gnu": "4.31.0", "@rollup/rollup-linux-arm64-musl": "4.31.0", "@rollup/rollup-linux-loongarch64-gnu": "4.31.0", "@rollup/rollup-linux-powerpc64le-gnu": "4.31.0", "@rollup/rollup-linux-riscv64-gnu": "4.31.0", "@rollup/rollup-linux-s390x-gnu": "4.31.0", "@rollup/rollup-linux-x64-gnu": "4.31.0", "@rollup/rollup-linux-x64-musl": "4.31.0", "@rollup/rollup-win32-arm64-msvc": "4.31.0", "@rollup/rollup-win32-ia32-msvc": "4.31.0", "@rollup/rollup-win32-x64-msvc": "4.31.0", "fsevents": "~2.3.2" }, "bin": { "rollup": "dist/bin/rollup" } }, "sha512-9cCE8P4rZLx9+PjoyqHLs31V9a9Vpvfo4qNcs6JCiGWYhw2gijSetFbH6SSy1whnkgcefnUwr8sad7tgqsGvnw=="], 167 | 168 | "source-map-js": ["source-map-js@1.2.1", "", {}, "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA=="], 169 | 170 | "svelte": ["svelte@4.2.20", "", { "dependencies": { "@ampproject/remapping": "^2.2.1", "@jridgewell/sourcemap-codec": "^1.4.15", "@jridgewell/trace-mapping": "^0.3.18", "@types/estree": "^1.0.1", "acorn": "^8.9.0", "aria-query": "^5.3.0", "axobject-query": "^4.0.0", "code-red": "^1.0.3", "css-tree": "^2.3.1", "estree-walker": "^3.0.3", "is-reference": "^3.0.1", "locate-character": "^3.0.0", "magic-string": "^0.30.4", "periscopic": "^3.1.0" } }, "sha512-eeEgGc2DtiUil5ANdtd8vPwt9AgaMdnuUFnPft9F5oMvU/FHu5IHFic+p1dR/UOB7XU2mX2yHW+NcTch4DCh5Q=="], 171 | 172 | "svelte-hmr": ["svelte-hmr@0.16.0", "", { "peerDependencies": { "svelte": "^3.19.0 || ^4.0.0" } }, "sha512-Gyc7cOS3VJzLlfj7wKS0ZnzDVdv3Pn2IuVeJPk9m2skfhcu5bq3wtIZyQGggr7/Iim5rH5cncyQft/kRLupcnA=="], 173 | 174 | "typescript": ["typescript@5.8.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ=="], 175 | 176 | "vite": ["vite@5.4.19", "", { "dependencies": { "esbuild": "^0.21.3", "postcss": "^8.4.43", "rollup": "^4.20.0" }, "optionalDependencies": { "fsevents": "~2.3.3" }, "peerDependencies": { "@types/node": "^18.0.0 || >=20.0.0", "less": "*", "lightningcss": "^1.21.0", "sass": "*", "sass-embedded": "*", "stylus": "*", "sugarss": "*", "terser": "^5.4.0" }, "optionalPeers": ["@types/node", "less", "lightningcss", "sass", "sass-embedded", "stylus", "sugarss", "terser"], "bin": { "vite": "bin/vite.js" } }, "sha512-qO3aKv3HoQC8QKiNSTuUM1l9o/XX3+c+VTgLHbJWHZGeTPVAg2XwazI9UWzoxjIJCGCV2zU60uqMzjeLZuULqA=="], 177 | 178 | "vitefu": ["vitefu@0.2.5", "", { "peerDependencies": { "vite": "^3.0.0 || ^4.0.0 || ^5.0.0" }, "optionalPeers": ["vite"] }, "sha512-SgHtMLoqaeeGnd2evZ849ZbACbnwQCIwRH57t18FxcXoZop0uQu0uzlIhJBlF/eWVzuce0sHeqPcDo+evVcg8Q=="], 179 | } 180 | } 181 | -------------------------------------------------------------------------------- /examples/vite/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /examples/vite/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "type": "module", 4 | "scripts": { 5 | "dev": "vite", 6 | "build": "vite build", 7 | "preview": "vite preview" 8 | }, 9 | "devDependencies": { 10 | "@sveltejs/vite-plugin-svelte": "^3.1.2", 11 | "carbon-components-svelte": "^0.85.4", 12 | "carbon-preprocess-svelte": "link:carbon-preprocess-svelte", 13 | "svelte": "^4.2.20", 14 | "typescript": "latest", 15 | "vite": "^5.4.19" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /examples/vite/src/App.svelte: -------------------------------------------------------------------------------- 1 | 11 | 12 | 65 | -------------------------------------------------------------------------------- /examples/vite/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "noEmit": true, 4 | "esModuleInterop": true, 5 | "forceConsistentCasingInFileNames": true, 6 | "noUnusedLocals": true, 7 | "noUnusedParameters": true, 8 | "noImplicitAny": true, 9 | "verbatimModuleSyntax": true, 10 | "isolatedModules": true, 11 | "target": "ESNext", 12 | "module": "ESNext", 13 | "moduleResolution": "bundler", 14 | "strict": true 15 | }, 16 | "include": ["src"] 17 | } 18 | -------------------------------------------------------------------------------- /examples/vite/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { svelte, vitePreprocess } from "@sveltejs/vite-plugin-svelte"; 2 | import { optimizeCss, optimizeImports } from "carbon-preprocess-svelte"; 3 | 4 | /** @type {import('vite').UserConfig} */ 5 | export default { 6 | plugins: [ 7 | svelte({ 8 | preprocess: [vitePreprocess(), optimizeImports()], 9 | }), 10 | optimizeCss(), 11 | ], 12 | 13 | // Optional, but recommended for even faster cold starts. 14 | // Instruct Vite to exclude packages that `optimizeImports` will resolve. 15 | optimizeDeps: { 16 | exclude: [ 17 | "carbon-components-svelte", 18 | "carbon-icons-svelte", 19 | "carbon-pictograms-svelte", 20 | ], 21 | }, 22 | }; 23 | -------------------------------------------------------------------------------- /examples/vite@svelte-5/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | public 4 | -------------------------------------------------------------------------------- /examples/vite@svelte-5/README.md: -------------------------------------------------------------------------------- 1 | # vite@svelte-5 2 | 3 | > Used for end-to-end testing and development purposes. 4 | 5 | Identical to the `vite` example, but using Svelte 5. 6 | 7 | ## Quick Start 8 | 9 | ```sh 10 | # First, build the library locally 11 | bun run build 12 | 13 | # Create a local link to the library 14 | bun link 15 | 16 | # When developing, rebuild the library when making changes 17 | bun run build -w 18 | ``` 19 | 20 | In this folder, you can run the following commands: 21 | 22 | ```sh 23 | # Install dependencies 24 | bun i 25 | ``` 26 | 27 | Run the app in development mode. This should only apply the `optimizeImports` preprocessor. 28 | 29 | ```sh 30 | bun run dev 31 | ``` 32 | 33 | Build the app for production. This should run both the `optimizeImports` and `optimizeCss` preprocessors. 34 | 35 | ```sh 36 | bun run build 37 | ``` 38 | -------------------------------------------------------------------------------- /examples/vite@svelte-5/bun.lock: -------------------------------------------------------------------------------- 1 | { 2 | "lockfileVersion": 1, 3 | "workspaces": { 4 | "": { 5 | "devDependencies": { 6 | "@sveltejs/vite-plugin-svelte": "^4.0.4", 7 | "carbon-components-svelte": "^0.85.4", 8 | "carbon-preprocess-svelte": "link:carbon-preprocess-svelte", 9 | "svelte": "^5.33.4", 10 | "typescript": "^5.8.3", 11 | "vite": "latest", 12 | }, 13 | }, 14 | }, 15 | "packages": { 16 | "@ampproject/remapping": ["@ampproject/remapping@2.3.0", "", { "dependencies": { "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.24" } }, "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw=="], 17 | 18 | "@esbuild/aix-ppc64": ["@esbuild/aix-ppc64@0.25.0", "", { "os": "aix", "cpu": "ppc64" }, "sha512-O7vun9Sf8DFjH2UtqK8Ku3LkquL9SZL8OLY1T5NZkA34+wG3OQF7cl4Ql8vdNzM6fzBbYfLaiRLIOZ+2FOCgBQ=="], 19 | 20 | "@esbuild/android-arm": ["@esbuild/android-arm@0.25.0", "", { "os": "android", "cpu": "arm" }, "sha512-PTyWCYYiU0+1eJKmw21lWtC+d08JDZPQ5g+kFyxP0V+es6VPPSUhM6zk8iImp2jbV6GwjX4pap0JFbUQN65X1g=="], 21 | 22 | "@esbuild/android-arm64": ["@esbuild/android-arm64@0.25.0", "", { "os": "android", "cpu": "arm64" }, "sha512-grvv8WncGjDSyUBjN9yHXNt+cq0snxXbDxy5pJtzMKGmmpPxeAmAhWxXI+01lU5rwZomDgD3kJwulEnhTRUd6g=="], 23 | 24 | "@esbuild/android-x64": ["@esbuild/android-x64@0.25.0", "", { "os": "android", "cpu": "x64" }, "sha512-m/ix7SfKG5buCnxasr52+LI78SQ+wgdENi9CqyCXwjVR2X4Jkz+BpC3le3AoBPYTC9NHklwngVXvbJ9/Akhrfg=="], 25 | 26 | "@esbuild/darwin-arm64": ["@esbuild/darwin-arm64@0.25.0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-mVwdUb5SRkPayVadIOI78K7aAnPamoeFR2bT5nszFUZ9P8UpK4ratOdYbZZXYSqPKMHfS1wdHCJk1P1EZpRdvw=="], 27 | 28 | "@esbuild/darwin-x64": ["@esbuild/darwin-x64@0.25.0", "", { "os": "darwin", "cpu": "x64" }, "sha512-DgDaYsPWFTS4S3nWpFcMn/33ZZwAAeAFKNHNa1QN0rI4pUjgqf0f7ONmXf6d22tqTY+H9FNdgeaAa+YIFUn2Rg=="], 29 | 30 | "@esbuild/freebsd-arm64": ["@esbuild/freebsd-arm64@0.25.0", "", { "os": "freebsd", "cpu": "arm64" }, "sha512-VN4ocxy6dxefN1MepBx/iD1dH5K8qNtNe227I0mnTRjry8tj5MRk4zprLEdG8WPyAPb93/e4pSgi1SoHdgOa4w=="], 31 | 32 | "@esbuild/freebsd-x64": ["@esbuild/freebsd-x64@0.25.0", "", { "os": "freebsd", "cpu": "x64" }, "sha512-mrSgt7lCh07FY+hDD1TxiTyIHyttn6vnjesnPoVDNmDfOmggTLXRv8Id5fNZey1gl/V2dyVK1VXXqVsQIiAk+A=="], 33 | 34 | "@esbuild/linux-arm": ["@esbuild/linux-arm@0.25.0", "", { "os": "linux", "cpu": "arm" }, "sha512-vkB3IYj2IDo3g9xX7HqhPYxVkNQe8qTK55fraQyTzTX/fxaDtXiEnavv9geOsonh2Fd2RMB+i5cbhu2zMNWJwg=="], 35 | 36 | "@esbuild/linux-arm64": ["@esbuild/linux-arm64@0.25.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-9QAQjTWNDM/Vk2bgBl17yWuZxZNQIF0OUUuPZRKoDtqF2k4EtYbpyiG5/Dk7nqeK6kIJWPYldkOcBqjXjrUlmg=="], 37 | 38 | "@esbuild/linux-ia32": ["@esbuild/linux-ia32@0.25.0", "", { "os": "linux", "cpu": "ia32" }, "sha512-43ET5bHbphBegyeqLb7I1eYn2P/JYGNmzzdidq/w0T8E2SsYL1U6un2NFROFRg1JZLTzdCoRomg8Rvf9M6W6Gg=="], 39 | 40 | "@esbuild/linux-loong64": ["@esbuild/linux-loong64@0.25.0", "", { "os": "linux", "cpu": "none" }, "sha512-fC95c/xyNFueMhClxJmeRIj2yrSMdDfmqJnyOY4ZqsALkDrrKJfIg5NTMSzVBr5YW1jf+l7/cndBfP3MSDpoHw=="], 41 | 42 | "@esbuild/linux-mips64el": ["@esbuild/linux-mips64el@0.25.0", "", { "os": "linux", "cpu": "none" }, "sha512-nkAMFju7KDW73T1DdH7glcyIptm95a7Le8irTQNO/qtkoyypZAnjchQgooFUDQhNAy4iu08N79W4T4pMBwhPwQ=="], 43 | 44 | "@esbuild/linux-ppc64": ["@esbuild/linux-ppc64@0.25.0", "", { "os": "linux", "cpu": "ppc64" }, "sha512-NhyOejdhRGS8Iwv+KKR2zTq2PpysF9XqY+Zk77vQHqNbo/PwZCzB5/h7VGuREZm1fixhs4Q/qWRSi5zmAiO4Fw=="], 45 | 46 | "@esbuild/linux-riscv64": ["@esbuild/linux-riscv64@0.25.0", "", { "os": "linux", "cpu": "none" }, "sha512-5S/rbP5OY+GHLC5qXp1y/Mx//e92L1YDqkiBbO9TQOvuFXM+iDqUNG5XopAnXoRH3FjIUDkeGcY1cgNvnXp/kA=="], 47 | 48 | "@esbuild/linux-s390x": ["@esbuild/linux-s390x@0.25.0", "", { "os": "linux", "cpu": "s390x" }, "sha512-XM2BFsEBz0Fw37V0zU4CXfcfuACMrppsMFKdYY2WuTS3yi8O1nFOhil/xhKTmE1nPmVyvQJjJivgDT+xh8pXJA=="], 49 | 50 | "@esbuild/linux-x64": ["@esbuild/linux-x64@0.25.0", "", { "os": "linux", "cpu": "x64" }, "sha512-9yl91rHw/cpwMCNytUDxwj2XjFpxML0y9HAOH9pNVQDpQrBxHy01Dx+vaMu0N1CKa/RzBD2hB4u//nfc+Sd3Cw=="], 51 | 52 | "@esbuild/netbsd-arm64": ["@esbuild/netbsd-arm64@0.25.0", "", { "os": "none", "cpu": "arm64" }, "sha512-RuG4PSMPFfrkH6UwCAqBzauBWTygTvb1nxWasEJooGSJ/NwRw7b2HOwyRTQIU97Hq37l3npXoZGYMy3b3xYvPw=="], 53 | 54 | "@esbuild/netbsd-x64": ["@esbuild/netbsd-x64@0.25.0", "", { "os": "none", "cpu": "x64" }, "sha512-jl+qisSB5jk01N5f7sPCsBENCOlPiS/xptD5yxOx2oqQfyourJwIKLRA2yqWdifj3owQZCL2sn6o08dBzZGQzA=="], 55 | 56 | "@esbuild/openbsd-arm64": ["@esbuild/openbsd-arm64@0.25.0", "", { "os": "openbsd", "cpu": "arm64" }, "sha512-21sUNbq2r84YE+SJDfaQRvdgznTD8Xc0oc3p3iW/a1EVWeNj/SdUCbm5U0itZPQYRuRTW20fPMWMpcrciH2EJw=="], 57 | 58 | "@esbuild/openbsd-x64": ["@esbuild/openbsd-x64@0.25.0", "", { "os": "openbsd", "cpu": "x64" }, "sha512-2gwwriSMPcCFRlPlKx3zLQhfN/2WjJ2NSlg5TKLQOJdV0mSxIcYNTMhk3H3ulL/cak+Xj0lY1Ym9ysDV1igceg=="], 59 | 60 | "@esbuild/sunos-x64": ["@esbuild/sunos-x64@0.25.0", "", { "os": "sunos", "cpu": "x64" }, "sha512-bxI7ThgLzPrPz484/S9jLlvUAHYMzy6I0XiU1ZMeAEOBcS0VePBFxh1JjTQt3Xiat5b6Oh4x7UC7IwKQKIJRIg=="], 61 | 62 | "@esbuild/win32-arm64": ["@esbuild/win32-arm64@0.25.0", "", { "os": "win32", "cpu": "arm64" }, "sha512-ZUAc2YK6JW89xTbXvftxdnYy3m4iHIkDtK3CLce8wg8M2L+YZhIvO1DKpxrd0Yr59AeNNkTiic9YLf6FTtXWMw=="], 63 | 64 | "@esbuild/win32-ia32": ["@esbuild/win32-ia32@0.25.0", "", { "os": "win32", "cpu": "ia32" }, "sha512-eSNxISBu8XweVEWG31/JzjkIGbGIJN/TrRoiSVZwZ6pkC6VX4Im/WV2cz559/TXLcYbcrDN8JtKgd9DJVIo8GA=="], 65 | 66 | "@esbuild/win32-x64": ["@esbuild/win32-x64@0.25.0", "", { "os": "win32", "cpu": "x64" }, "sha512-ZENoHJBxA20C2zFzh6AI4fT6RraMzjYw4xKWemRTRmRVtN9c5DcH9r/f2ihEkMjOW5eGgrwCslG/+Y/3bL+DHQ=="], 67 | 68 | "@ibm/telemetry-js": ["@ibm/telemetry-js@1.8.0", "", { "bin": { "ibmtelemetry": "dist/collect.js" } }, "sha512-1u/8f5TtDHXWNQe+YfIESesZGX2PmhEfyU0znlyFvATch+xc5fPYjXj2gWKMTmdKsDawqAm/BkJBQjx2CDlZww=="], 69 | 70 | "@jridgewell/gen-mapping": ["@jridgewell/gen-mapping@0.3.8", "", { "dependencies": { "@jridgewell/set-array": "^1.2.1", "@jridgewell/sourcemap-codec": "^1.4.10", "@jridgewell/trace-mapping": "^0.3.24" } }, "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA=="], 71 | 72 | "@jridgewell/resolve-uri": ["@jridgewell/resolve-uri@3.1.2", "", {}, "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw=="], 73 | 74 | "@jridgewell/set-array": ["@jridgewell/set-array@1.2.1", "", {}, "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A=="], 75 | 76 | "@jridgewell/sourcemap-codec": ["@jridgewell/sourcemap-codec@1.5.0", "", {}, "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ=="], 77 | 78 | "@jridgewell/trace-mapping": ["@jridgewell/trace-mapping@0.3.25", "", { "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ=="], 79 | 80 | "@rollup/rollup-android-arm-eabi": ["@rollup/rollup-android-arm-eabi@4.40.1", "", { "os": "android", "cpu": "arm" }, "sha512-kxz0YeeCrRUHz3zyqvd7n+TVRlNyTifBsmnmNPtk3hQURUyG9eAB+usz6DAwagMusjx/zb3AjvDUvhFGDAexGw=="], 81 | 82 | "@rollup/rollup-android-arm64": ["@rollup/rollup-android-arm64@4.40.1", "", { "os": "android", "cpu": "arm64" }, "sha512-PPkxTOisoNC6TpnDKatjKkjRMsdaWIhyuMkA4UsBXT9WEZY4uHezBTjs6Vl4PbqQQeu6oION1w2voYZv9yquCw=="], 83 | 84 | "@rollup/rollup-darwin-arm64": ["@rollup/rollup-darwin-arm64@4.40.1", "", { "os": "darwin", "cpu": "arm64" }, "sha512-VWXGISWFY18v/0JyNUy4A46KCFCb9NVsH+1100XP31lud+TzlezBbz24CYzbnA4x6w4hx+NYCXDfnvDVO6lcAA=="], 85 | 86 | "@rollup/rollup-darwin-x64": ["@rollup/rollup-darwin-x64@4.40.1", "", { "os": "darwin", "cpu": "x64" }, "sha512-nIwkXafAI1/QCS7pxSpv/ZtFW6TXcNUEHAIA9EIyw5OzxJZQ1YDrX+CL6JAIQgZ33CInl1R6mHet9Y/UZTg2Bw=="], 87 | 88 | "@rollup/rollup-freebsd-arm64": ["@rollup/rollup-freebsd-arm64@4.40.1", "", { "os": "freebsd", "cpu": "arm64" }, "sha512-BdrLJ2mHTrIYdaS2I99mriyJfGGenSaP+UwGi1kB9BLOCu9SR8ZpbkmmalKIALnRw24kM7qCN0IOm6L0S44iWw=="], 89 | 90 | "@rollup/rollup-freebsd-x64": ["@rollup/rollup-freebsd-x64@4.40.1", "", { "os": "freebsd", "cpu": "x64" }, "sha512-VXeo/puqvCG8JBPNZXZf5Dqq7BzElNJzHRRw3vjBE27WujdzuOPecDPc/+1DcdcTptNBep3861jNq0mYkT8Z6Q=="], 91 | 92 | "@rollup/rollup-linux-arm-gnueabihf": ["@rollup/rollup-linux-arm-gnueabihf@4.40.1", "", { "os": "linux", "cpu": "arm" }, "sha512-ehSKrewwsESPt1TgSE/na9nIhWCosfGSFqv7vwEtjyAqZcvbGIg4JAcV7ZEh2tfj/IlfBeZjgOXm35iOOjadcg=="], 93 | 94 | "@rollup/rollup-linux-arm-musleabihf": ["@rollup/rollup-linux-arm-musleabihf@4.40.1", "", { "os": "linux", "cpu": "arm" }, "sha512-m39iO/aaurh5FVIu/F4/Zsl8xppd76S4qoID8E+dSRQvTyZTOI2gVk3T4oqzfq1PtcvOfAVlwLMK3KRQMaR8lg=="], 95 | 96 | "@rollup/rollup-linux-arm64-gnu": ["@rollup/rollup-linux-arm64-gnu@4.40.1", "", { "os": "linux", "cpu": "arm64" }, "sha512-Y+GHnGaku4aVLSgrT0uWe2o2Rq8te9hi+MwqGF9r9ORgXhmHK5Q71N757u0F8yU1OIwUIFy6YiJtKjtyktk5hg=="], 97 | 98 | "@rollup/rollup-linux-arm64-musl": ["@rollup/rollup-linux-arm64-musl@4.40.1", "", { "os": "linux", "cpu": "arm64" }, "sha512-jEwjn3jCA+tQGswK3aEWcD09/7M5wGwc6+flhva7dsQNRZZTe30vkalgIzV4tjkopsTS9Jd7Y1Bsj6a4lzz8gQ=="], 99 | 100 | "@rollup/rollup-linux-loongarch64-gnu": ["@rollup/rollup-linux-loongarch64-gnu@4.40.1", "", { "os": "linux", "cpu": "none" }, "sha512-ySyWikVhNzv+BV/IDCsrraOAZ3UaC8SZB67FZlqVwXwnFhPihOso9rPOxzZbjp81suB1O2Topw+6Ug3JNegejQ=="], 101 | 102 | "@rollup/rollup-linux-powerpc64le-gnu": ["@rollup/rollup-linux-powerpc64le-gnu@4.40.1", "", { "os": "linux", "cpu": "ppc64" }, "sha512-BvvA64QxZlh7WZWqDPPdt0GH4bznuL6uOO1pmgPnnv86rpUpc8ZxgZwcEgXvo02GRIZX1hQ0j0pAnhwkhwPqWg=="], 103 | 104 | "@rollup/rollup-linux-riscv64-gnu": ["@rollup/rollup-linux-riscv64-gnu@4.40.1", "", { "os": "linux", "cpu": "none" }, "sha512-EQSP+8+1VuSulm9RKSMKitTav89fKbHymTf25n5+Yr6gAPZxYWpj3DzAsQqoaHAk9YX2lwEyAf9S4W8F4l3VBQ=="], 105 | 106 | "@rollup/rollup-linux-riscv64-musl": ["@rollup/rollup-linux-riscv64-musl@4.40.1", "", { "os": "linux", "cpu": "none" }, "sha512-n/vQ4xRZXKuIpqukkMXZt9RWdl+2zgGNx7Uda8NtmLJ06NL8jiHxUawbwC+hdSq1rrw/9CghCpEONor+l1e2gA=="], 107 | 108 | "@rollup/rollup-linux-s390x-gnu": ["@rollup/rollup-linux-s390x-gnu@4.40.1", "", { "os": "linux", "cpu": "s390x" }, "sha512-h8d28xzYb98fMQKUz0w2fMc1XuGzLLjdyxVIbhbil4ELfk5/orZlSTpF/xdI9C8K0I8lCkq+1En2RJsawZekkg=="], 109 | 110 | "@rollup/rollup-linux-x64-gnu": ["@rollup/rollup-linux-x64-gnu@4.40.1", "", { "os": "linux", "cpu": "x64" }, "sha512-XiK5z70PEFEFqcNj3/zRSz/qX4bp4QIraTy9QjwJAb/Z8GM7kVUsD0Uk8maIPeTyPCP03ChdI+VVmJriKYbRHQ=="], 111 | 112 | "@rollup/rollup-linux-x64-musl": ["@rollup/rollup-linux-x64-musl@4.40.1", "", { "os": "linux", "cpu": "x64" }, "sha512-2BRORitq5rQ4Da9blVovzNCMaUlyKrzMSvkVR0D4qPuOy/+pMCrh1d7o01RATwVy+6Fa1WBw+da7QPeLWU/1mQ=="], 113 | 114 | "@rollup/rollup-win32-arm64-msvc": ["@rollup/rollup-win32-arm64-msvc@4.40.1", "", { "os": "win32", "cpu": "arm64" }, "sha512-b2bcNm9Kbde03H+q+Jjw9tSfhYkzrDUf2d5MAd1bOJuVplXvFhWz7tRtWvD8/ORZi7qSCy0idW6tf2HgxSXQSg=="], 115 | 116 | "@rollup/rollup-win32-ia32-msvc": ["@rollup/rollup-win32-ia32-msvc@4.40.1", "", { "os": "win32", "cpu": "ia32" }, "sha512-DfcogW8N7Zg7llVEfpqWMZcaErKfsj9VvmfSyRjCyo4BI3wPEfrzTtJkZG6gKP/Z92wFm6rz2aDO7/JfiR/whA=="], 117 | 118 | "@rollup/rollup-win32-x64-msvc": ["@rollup/rollup-win32-x64-msvc@4.40.1", "", { "os": "win32", "cpu": "x64" }, "sha512-ECyOuDeH3C1I8jH2MK1RtBJW+YPMvSfT0a5NN0nHfQYnDSJ6tUiZH3gzwVP5/Kfh/+Tt7tpWVF9LXNTnhTJ3kA=="], 119 | 120 | "@sveltejs/acorn-typescript": ["@sveltejs/acorn-typescript@1.0.5", "", { "peerDependencies": { "acorn": "^8.9.0" } }, "sha512-IwQk4yfwLdibDlrXVE04jTZYlLnwsTT2PIOQQGNLWfjavGifnk1JD1LcZjZaBTRcxZu2FfPfNLOE04DSu9lqtQ=="], 121 | 122 | "@sveltejs/vite-plugin-svelte": ["@sveltejs/vite-plugin-svelte@4.0.4", "", { "dependencies": { "@sveltejs/vite-plugin-svelte-inspector": "^3.0.0-next.0||^3.0.0", "debug": "^4.3.7", "deepmerge": "^4.3.1", "kleur": "^4.1.5", "magic-string": "^0.30.12", "vitefu": "^1.0.3" }, "peerDependencies": { "svelte": "^5.0.0-next.96 || ^5.0.0", "vite": "^5.0.0" } }, "sha512-0ba1RQ/PHen5FGpdSrW7Y3fAMQjrXantECALeOiOdBdzR5+5vPP6HVZRLmZaQL+W8m++o+haIAKq5qT+MiZ7VA=="], 123 | 124 | "@sveltejs/vite-plugin-svelte-inspector": ["@sveltejs/vite-plugin-svelte-inspector@3.0.1", "", { "dependencies": { "debug": "^4.3.7" }, "peerDependencies": { "@sveltejs/vite-plugin-svelte": "^4.0.0-next.0||^4.0.0", "svelte": "^5.0.0-next.96 || ^5.0.0", "vite": "^5.0.0" } }, "sha512-2CKypmj1sM4GE7HjllT7UKmo4Q6L5xFRd7VMGEWhYnZ+wc6AUVU01IBd7yUi6WnFndEwWoMNOd6e8UjoN0nbvQ=="], 125 | 126 | "@types/estree": ["@types/estree@1.0.7", "", {}, "sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ=="], 127 | 128 | "acorn": ["acorn@8.14.0", "", { "bin": { "acorn": "bin/acorn" } }, "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA=="], 129 | 130 | "aria-query": ["aria-query@5.3.2", "", {}, "sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw=="], 131 | 132 | "axobject-query": ["axobject-query@4.1.0", "", {}, "sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ=="], 133 | 134 | "carbon-components-svelte": ["carbon-components-svelte@0.85.4", "", { "dependencies": { "@ibm/telemetry-js": "^1.5.0", "flatpickr": "4.6.9" } }, "sha512-8dBgRF8Y6TPu+WiythDrYilNAJbhbpHu3kThJazquCO1hyGftWsa2T0HhY+k4+szIiutcc8qVzUMfRZvcGUflQ=="], 135 | 136 | "carbon-preprocess-svelte": ["carbon-preprocess-svelte@link:carbon-preprocess-svelte", {}], 137 | 138 | "clsx": ["clsx@2.1.1", "", {}, "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA=="], 139 | 140 | "debug": ["debug@4.4.0", "", { "dependencies": { "ms": "^2.1.3" } }, "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA=="], 141 | 142 | "deepmerge": ["deepmerge@4.3.1", "", {}, "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A=="], 143 | 144 | "esbuild": ["esbuild@0.25.0", "", { "optionalDependencies": { "@esbuild/aix-ppc64": "0.25.0", "@esbuild/android-arm": "0.25.0", "@esbuild/android-arm64": "0.25.0", "@esbuild/android-x64": "0.25.0", "@esbuild/darwin-arm64": "0.25.0", "@esbuild/darwin-x64": "0.25.0", "@esbuild/freebsd-arm64": "0.25.0", "@esbuild/freebsd-x64": "0.25.0", "@esbuild/linux-arm": "0.25.0", "@esbuild/linux-arm64": "0.25.0", "@esbuild/linux-ia32": "0.25.0", "@esbuild/linux-loong64": "0.25.0", "@esbuild/linux-mips64el": "0.25.0", "@esbuild/linux-ppc64": "0.25.0", "@esbuild/linux-riscv64": "0.25.0", "@esbuild/linux-s390x": "0.25.0", "@esbuild/linux-x64": "0.25.0", "@esbuild/netbsd-arm64": "0.25.0", "@esbuild/netbsd-x64": "0.25.0", "@esbuild/openbsd-arm64": "0.25.0", "@esbuild/openbsd-x64": "0.25.0", "@esbuild/sunos-x64": "0.25.0", "@esbuild/win32-arm64": "0.25.0", "@esbuild/win32-ia32": "0.25.0", "@esbuild/win32-x64": "0.25.0" }, "bin": { "esbuild": "bin/esbuild" } }, "sha512-BXq5mqc8ltbaN34cDqWuYKyNhX8D/Z0J1xdtdQ8UcIIIyJyz+ZMKUt58tF3SrZ85jcfN/PZYhjR5uDQAYNVbuw=="], 145 | 146 | "esm-env": ["esm-env@1.2.2", "", {}, "sha512-Epxrv+Nr/CaL4ZcFGPJIYLWFom+YeV1DqMLHJoEd9SYRxNbaFruBwfEX/kkHUJf55j2+TUbmDcmuilbP1TmXHA=="], 147 | 148 | "esrap": ["esrap@1.4.6", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.4.15" } }, "sha512-F/D2mADJ9SHY3IwksD4DAXjTt7qt7GWUf3/8RhCNWmC/67tyb55dpimHmy7EplakFaflV0R/PC+fdSPqrRHAQw=="], 149 | 150 | "fdir": ["fdir@6.4.4", "", { "peerDependencies": { "picomatch": "^3 || ^4" }, "optionalPeers": ["picomatch"] }, "sha512-1NZP+GK4GfuAv3PqKvxQRDMjdSRZjnkq7KfhlNrCNNlZ0ygQFpebfrnfnq/W7fpUnAv9aGWmY1zKx7FYL3gwhg=="], 151 | 152 | "flatpickr": ["flatpickr@4.6.9", "", {}, "sha512-F0azNNi8foVWKSF+8X+ZJzz8r9sE1G4hl06RyceIaLvyltKvDl6vqk9Lm/6AUUCi5HWaIjiUbk7UpeE/fOXOpw=="], 153 | 154 | "fsevents": ["fsevents@2.3.3", "", { "os": "darwin" }, "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw=="], 155 | 156 | "is-reference": ["is-reference@3.0.3", "", { "dependencies": { "@types/estree": "^1.0.6" } }, "sha512-ixkJoqQvAP88E6wLydLGGqCJsrFUnqoH6HnaczB8XmDH1oaWU+xxdptvikTgaEhtZ53Ky6YXiBuUI2WXLMCwjw=="], 157 | 158 | "kleur": ["kleur@4.1.5", "", {}, "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ=="], 159 | 160 | "locate-character": ["locate-character@3.0.0", "", {}, "sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA=="], 161 | 162 | "magic-string": ["magic-string@0.30.17", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.0" } }, "sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA=="], 163 | 164 | "ms": ["ms@2.1.3", "", {}, "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="], 165 | 166 | "nanoid": ["nanoid@3.3.8", "", { "bin": { "nanoid": "bin/nanoid.cjs" } }, "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w=="], 167 | 168 | "picocolors": ["picocolors@1.1.1", "", {}, "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA=="], 169 | 170 | "picomatch": ["picomatch@4.0.2", "", {}, "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg=="], 171 | 172 | "postcss": ["postcss@8.5.3", "", { "dependencies": { "nanoid": "^3.3.8", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" } }, "sha512-dle9A3yYxlBSrt8Fu+IpjGT8SY8hN0mlaA6GY8t0P5PjIOZemULz/E2Bnm/2dcUOena75OTNkHI76uZBNUUq3A=="], 173 | 174 | "rollup": ["rollup@4.40.1", "", { "dependencies": { "@types/estree": "1.0.7" }, "optionalDependencies": { "@rollup/rollup-android-arm-eabi": "4.40.1", "@rollup/rollup-android-arm64": "4.40.1", "@rollup/rollup-darwin-arm64": "4.40.1", "@rollup/rollup-darwin-x64": "4.40.1", "@rollup/rollup-freebsd-arm64": "4.40.1", "@rollup/rollup-freebsd-x64": "4.40.1", "@rollup/rollup-linux-arm-gnueabihf": "4.40.1", "@rollup/rollup-linux-arm-musleabihf": "4.40.1", "@rollup/rollup-linux-arm64-gnu": "4.40.1", "@rollup/rollup-linux-arm64-musl": "4.40.1", "@rollup/rollup-linux-loongarch64-gnu": "4.40.1", "@rollup/rollup-linux-powerpc64le-gnu": "4.40.1", "@rollup/rollup-linux-riscv64-gnu": "4.40.1", "@rollup/rollup-linux-riscv64-musl": "4.40.1", "@rollup/rollup-linux-s390x-gnu": "4.40.1", "@rollup/rollup-linux-x64-gnu": "4.40.1", "@rollup/rollup-linux-x64-musl": "4.40.1", "@rollup/rollup-win32-arm64-msvc": "4.40.1", "@rollup/rollup-win32-ia32-msvc": "4.40.1", "@rollup/rollup-win32-x64-msvc": "4.40.1", "fsevents": "~2.3.2" }, "bin": { "rollup": "dist/bin/rollup" } }, "sha512-C5VvvgCCyfyotVITIAv+4efVytl5F7wt+/I2i9q9GZcEXW9BP52YYOXC58igUi+LFZVHukErIIqQSWwv/M3WRw=="], 175 | 176 | "source-map-js": ["source-map-js@1.2.1", "", {}, "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA=="], 177 | 178 | "svelte": ["svelte@5.33.14", "", { "dependencies": { "@ampproject/remapping": "^2.3.0", "@jridgewell/sourcemap-codec": "^1.5.0", "@sveltejs/acorn-typescript": "^1.0.5", "@types/estree": "^1.0.5", "acorn": "^8.12.1", "aria-query": "^5.3.1", "axobject-query": "^4.1.0", "clsx": "^2.1.1", "esm-env": "^1.2.1", "esrap": "^1.4.6", "is-reference": "^3.0.3", "locate-character": "^3.0.0", "magic-string": "^0.30.11", "zimmerframe": "^1.1.2" } }, "sha512-kRlbhIlMTijbFmVDQFDeKXPLlX1/ovXwV0I162wRqQhRcygaqDIcu1d/Ese3H2uI+yt3uT8E7ndgDthQv5v5BA=="], 179 | 180 | "tinyglobby": ["tinyglobby@0.2.13", "", { "dependencies": { "fdir": "^6.4.4", "picomatch": "^4.0.2" } }, "sha512-mEwzpUgrLySlveBwEVDMKk5B57bhLPYovRfPAXD5gA/98Opn0rCDj3GtLwFvCvH5RK9uPCExUROW5NjDwvqkxw=="], 181 | 182 | "typescript": ["typescript@5.8.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ=="], 183 | 184 | "vite": ["vite@6.3.5", "", { "dependencies": { "esbuild": "^0.25.0", "fdir": "^6.4.4", "picomatch": "^4.0.2", "postcss": "^8.5.3", "rollup": "^4.34.9", "tinyglobby": "^0.2.13" }, "optionalDependencies": { "fsevents": "~2.3.3" }, "peerDependencies": { "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", "jiti": ">=1.21.0", "less": "*", "lightningcss": "^1.21.0", "sass": "*", "sass-embedded": "*", "stylus": "*", "sugarss": "*", "terser": "^5.16.0", "tsx": "^4.8.1", "yaml": "^2.4.2" }, "optionalPeers": ["@types/node", "jiti", "less", "lightningcss", "sass", "sass-embedded", "stylus", "sugarss", "terser", "tsx", "yaml"], "bin": { "vite": "bin/vite.js" } }, "sha512-cZn6NDFE7wdTpINgs++ZJ4N49W2vRp8LCKrn3Ob1kYNtOo21vfDoaV5GzBfLU4MovSAB8uNRm4jgzVQZ+mBzPQ=="], 185 | 186 | "vitefu": ["vitefu@1.0.5", "", { "peerDependencies": { "vite": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0" }, "optionalPeers": ["vite"] }, "sha512-h4Vflt9gxODPFNGPwp4zAMZRpZR7eslzwH2c5hn5kNZ5rhnKyRJ50U+yGCdc2IRaBs8O4haIgLNGrV5CrpMsCA=="], 187 | 188 | "zimmerframe": ["zimmerframe@1.1.2", "", {}, "sha512-rAbqEGa8ovJy4pyBxZM70hg4pE6gDgaQ0Sl9M3enG3I0d6H4XSAM3GeNGLKnsBpuijUow064sf7ww1nutC5/3w=="], 189 | 190 | "is-reference/@types/estree": ["@types/estree@1.0.6", "", {}, "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw=="], 191 | } 192 | } 193 | -------------------------------------------------------------------------------- /examples/vite@svelte-5/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /examples/vite@svelte-5/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "type": "module", 4 | "scripts": { 5 | "dev": "vite", 6 | "build": "vite build", 7 | "preview": "vite preview" 8 | }, 9 | "devDependencies": { 10 | "@sveltejs/vite-plugin-svelte": "^4.0.4", 11 | "carbon-components-svelte": "^0.85.4", 12 | "carbon-preprocess-svelte": "link:carbon-preprocess-svelte", 13 | "svelte": "^5.33.14", 14 | "typescript": "^5.8.3", 15 | "vite": "latest" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /examples/vite@svelte-5/src/App.svelte: -------------------------------------------------------------------------------- 1 | 11 | 12 | 65 | -------------------------------------------------------------------------------- /examples/vite@svelte-5/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "noEmit": true, 4 | "esModuleInterop": true, 5 | "forceConsistentCasingInFileNames": true, 6 | "noUnusedLocals": true, 7 | "noUnusedParameters": true, 8 | "noImplicitAny": true, 9 | "verbatimModuleSyntax": true, 10 | "isolatedModules": true, 11 | "target": "ESNext", 12 | "module": "ESNext", 13 | "moduleResolution": "bundler", 14 | "strict": true 15 | }, 16 | "include": ["src"] 17 | } 18 | -------------------------------------------------------------------------------- /examples/vite@svelte-5/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { svelte, vitePreprocess } from "@sveltejs/vite-plugin-svelte"; 2 | import { optimizeCss, optimizeImports } from "carbon-preprocess-svelte"; 3 | 4 | /** @type {import('vite').UserConfig} */ 5 | export default { 6 | resolve: { 7 | conditions: ["browser"], 8 | }, 9 | plugins: [ 10 | svelte({ 11 | preprocess: [vitePreprocess(), optimizeImports()], 12 | }), 13 | optimizeCss(), 14 | ], 15 | 16 | // Optional, but recommended for even faster cold starts. 17 | // Instruct Vite to exclude packages that `optimizeImports` will resolve. 18 | optimizeDeps: { 19 | exclude: [ 20 | "carbon-components-svelte", 21 | "carbon-icons-svelte", 22 | "carbon-pictograms-svelte", 23 | ], 24 | }, 25 | }; 26 | -------------------------------------------------------------------------------- /examples/webpack/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | public 4 | -------------------------------------------------------------------------------- /examples/webpack/README.md: -------------------------------------------------------------------------------- 1 | # webpack 2 | 3 | > Used for end-to-end testing and development purposes. 4 | 5 | ## Quick Start 6 | 7 | ```sh 8 | # First, build the library locally 9 | bun run build 10 | 11 | # Create a local link to the library 12 | bun link 13 | 14 | # When developing, rebuild the library when making changes 15 | bun run build -w 16 | ``` 17 | 18 | In this folder, you can run the following commands: 19 | 20 | ```sh 21 | # Install dependencies 22 | bun i 23 | ``` 24 | 25 | Run the app in development mode. This should only apply the `optimizeImports` preprocessor. 26 | 27 | ```sh 28 | bun run dev 29 | ``` 30 | 31 | Build the app for production. This should run both the `optimizeImports` and `optimizeCss` preprocessors. 32 | 33 | ```sh 34 | bun run build 35 | ``` 36 | -------------------------------------------------------------------------------- /examples/webpack/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "type": "module", 4 | "scripts": { 5 | "dev": "webpack serve", 6 | "build": "NODE_ENV=production webpack" 7 | }, 8 | "devDependencies": { 9 | "carbon-components-svelte": "^0.85.4", 10 | "carbon-preprocess-svelte": "link:carbon-preprocess-svelte", 11 | "css-loader": "latest", 12 | "html-webpack-plugin": "latest", 13 | "mini-css-extract-plugin": "latest", 14 | "svelte": "^4.2.20", 15 | "svelte-loader": "latest", 16 | "svelte-preprocess": "latest", 17 | "typescript": "latest", 18 | "webpack": "latest", 19 | "webpack-cli": "latest", 20 | "webpack-dev-server": "latest" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /examples/webpack/src/App.svelte: -------------------------------------------------------------------------------- 1 | 11 | 12 | 65 | -------------------------------------------------------------------------------- /examples/webpack/src/index.ts: -------------------------------------------------------------------------------- 1 | import App from "./App.svelte"; 2 | 3 | const app = new App({ target: document.body }); 4 | 5 | export default app; 6 | -------------------------------------------------------------------------------- /examples/webpack/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "noEmit": true, 4 | "esModuleInterop": true, 5 | "forceConsistentCasingInFileNames": true, 6 | "noUnusedLocals": true, 7 | "noUnusedParameters": true, 8 | "noImplicitAny": true, 9 | "verbatimModuleSyntax": true, 10 | "isolatedModules": true, 11 | "target": "ESNext", 12 | "module": "ESNext", 13 | "moduleResolution": "bundler", 14 | "strict": true 15 | }, 16 | "include": ["src"] 17 | } 18 | -------------------------------------------------------------------------------- /examples/webpack/webpack.config.mjs: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import path from "node:path"; 3 | import carbonPreprocess from "carbon-preprocess-svelte"; 4 | import HtmlWebpackPlugin from "html-webpack-plugin"; 5 | import MiniCssExtractPlugin from "mini-css-extract-plugin"; 6 | import { sveltePreprocess } from "svelte-preprocess"; 7 | 8 | const { optimizeImports, OptimizeCssPlugin } = carbonPreprocess; 9 | 10 | /** @type {"development" | "production"} */ 11 | const NODE_ENV = 12 | process.env.NODE_ENV === "production" ? "production" : "development"; 13 | const PROD = NODE_ENV === "production"; 14 | 15 | /** @type {import("webpack").Configuration} */ 16 | export default { 17 | entry: { "build/bundle": ["./src/index.ts"] }, 18 | resolve: { 19 | extensions: [".mjs", ".js", ".svelte"], 20 | conditionNames: ["svelte", "browser", "import"], 21 | }, 22 | output: { 23 | publicPath: "/", 24 | path: path.resolve("./public"), 25 | filename: PROD ? "[name].[contenthash].js" : "[name].js", 26 | chunkFilename: "[name].[id].js", 27 | clean: true, 28 | }, 29 | module: { 30 | rules: [ 31 | { 32 | test: /\.svelte$/, 33 | use: { 34 | loader: "svelte-loader", 35 | options: { 36 | hotReload: !PROD, 37 | preprocess: [sveltePreprocess(), optimizeImports()], 38 | compilerOptions: { dev: !PROD }, 39 | }, 40 | }, 41 | }, 42 | { 43 | test: /\.css$/, 44 | use: [MiniCssExtractPlugin.loader, "css-loader"], 45 | }, 46 | { 47 | test: /node_modules\/svelte\/.*\.mjs$/, 48 | resolve: { fullySpecified: false }, 49 | }, 50 | ], 51 | }, 52 | mode: NODE_ENV, 53 | plugins: [ 54 | PROD && new OptimizeCssPlugin(), 55 | new MiniCssExtractPlugin({ 56 | filename: PROD ? "[name].[chunkhash].css" : "[name].css", 57 | }), 58 | new HtmlWebpackPlugin({ 59 | templateContent: ` 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | `, 69 | }), 70 | ], 71 | stats: "errors-only", 72 | devtool: PROD ? false : "source-map", 73 | devServer: { hot: true, historyApiFallback: true }, 74 | }; 75 | -------------------------------------------------------------------------------- /examples/webpack@svelte-5/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | public 4 | -------------------------------------------------------------------------------- /examples/webpack@svelte-5/README.md: -------------------------------------------------------------------------------- 1 | # webpack@svelte-5 2 | 3 | > Used for end-to-end testing and development purposes. 4 | 5 | Identical to the `vite` example, but using Svelte 5. 6 | 7 | ## Quick Start 8 | 9 | ```sh 10 | # First, build the library locally 11 | bun run build 12 | 13 | # Create a local link to the library 14 | bun link 15 | 16 | # When developing, rebuild the library when making changes 17 | bun run build -w 18 | ``` 19 | 20 | In this folder, you can run the following commands: 21 | 22 | ```sh 23 | # Install dependencies 24 | bun i 25 | ``` 26 | 27 | Run the app in development mode. This should only apply the `optimizeImports` preprocessor. 28 | 29 | ```sh 30 | bun run dev 31 | ``` 32 | 33 | Build the app for production. This should run both the `optimizeImports` and `optimizeCss` preprocessors. 34 | 35 | ```sh 36 | bun run build 37 | ``` 38 | -------------------------------------------------------------------------------- /examples/webpack@svelte-5/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "type": "module", 4 | "scripts": { 5 | "dev": "webpack serve", 6 | "build": "NODE_ENV=production webpack" 7 | }, 8 | "devDependencies": { 9 | "carbon-components-svelte": "^0.85.4", 10 | "carbon-preprocess-svelte": "link:carbon-preprocess-svelte", 11 | "css-loader": "latest", 12 | "html-webpack-plugin": "latest", 13 | "mini-css-extract-plugin": "latest", 14 | "svelte": "^5.33.14", 15 | "svelte-loader": "latest", 16 | "svelte-preprocess": "latest", 17 | "typescript": "latest", 18 | "webpack": "latest", 19 | "webpack-cli": "latest", 20 | "webpack-dev-server": "latest" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /examples/webpack@svelte-5/src/App.svelte: -------------------------------------------------------------------------------- 1 | 11 | 12 | 65 | -------------------------------------------------------------------------------- /examples/webpack@svelte-5/src/index.ts: -------------------------------------------------------------------------------- 1 | import { mount } from "svelte"; 2 | import App from "./App.svelte"; 3 | 4 | mount(App, { target: document.body }); 5 | -------------------------------------------------------------------------------- /examples/webpack@svelte-5/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "noEmit": true, 4 | "esModuleInterop": true, 5 | "forceConsistentCasingInFileNames": true, 6 | "noUnusedLocals": true, 7 | "noUnusedParameters": true, 8 | "noImplicitAny": true, 9 | "verbatimModuleSyntax": true, 10 | "isolatedModules": true, 11 | "target": "ESNext", 12 | "module": "ESNext", 13 | "moduleResolution": "bundler", 14 | "strict": true 15 | }, 16 | "include": ["src"] 17 | } 18 | -------------------------------------------------------------------------------- /examples/webpack@svelte-5/webpack.config.mjs: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import path from "node:path"; 3 | import carbonPreprocess from "carbon-preprocess-svelte"; 4 | import HtmlWebpackPlugin from "html-webpack-plugin"; 5 | import MiniCssExtractPlugin from "mini-css-extract-plugin"; 6 | import { sveltePreprocess } from "svelte-preprocess"; 7 | 8 | const { optimizeImports, OptimizeCssPlugin } = carbonPreprocess; 9 | 10 | /** @type {"development" | "production"} */ 11 | const NODE_ENV = 12 | process.env.NODE_ENV === "production" ? "production" : "development"; 13 | const PROD = NODE_ENV === "production"; 14 | 15 | /** @type {import("webpack").Configuration} */ 16 | export default { 17 | entry: { "build/bundle": ["./src/index.ts"] }, 18 | resolve: { 19 | extensions: [".mjs", ".js", ".svelte"], 20 | conditionNames: ["svelte", "browser", "import"], 21 | }, 22 | output: { 23 | publicPath: "/", 24 | path: path.resolve("./public"), 25 | filename: PROD ? "[name].[contenthash].js" : "[name].js", 26 | chunkFilename: "[name].[id].js", 27 | clean: true, 28 | }, 29 | module: { 30 | rules: [ 31 | { 32 | test: /\.svelte$/, 33 | use: { 34 | loader: "svelte-loader", 35 | options: { 36 | hotReload: !PROD, 37 | preprocess: [sveltePreprocess(), optimizeImports()], 38 | compilerOptions: { dev: !PROD }, 39 | }, 40 | }, 41 | }, 42 | { 43 | test: /\.css$/, 44 | use: [MiniCssExtractPlugin.loader, "css-loader"], 45 | }, 46 | { 47 | test: /node_modules\/svelte\/.*\.mjs$/, 48 | resolve: { fullySpecified: false }, 49 | }, 50 | ], 51 | }, 52 | mode: NODE_ENV, 53 | plugins: [ 54 | PROD && new OptimizeCssPlugin(), 55 | new MiniCssExtractPlugin({ 56 | filename: PROD ? "[name].[chunkhash].css" : "[name].css", 57 | }), 58 | new HtmlWebpackPlugin({ 59 | templateContent: ` 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | `, 69 | }), 70 | ], 71 | stats: "errors-only", 72 | devtool: PROD ? false : "source-map", 73 | devServer: { hot: true, historyApiFallback: true }, 74 | }; 75 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "carbon-preprocess-svelte", 3 | "version": "0.11.11", 4 | "license": "Apache-2.0", 5 | "description": "Svelte preprocessors for the Carbon Design System", 6 | "author": "Eric Liu (https://github.com/metonym)", 7 | "main": "./dist/index.js", 8 | "types": "./dist/index.d.ts", 9 | "scripts": { 10 | "index:components": "bun scripts/index-components.ts", 11 | "build": "bun --bun tsc -p tsconfig.build.json", 12 | "build:prune-package": "bunx culls", 13 | "test": "bun test", 14 | "test:e2e": "bun tests/test-e2e.ts", 15 | "format": "bunx biome check --write .", 16 | "upgrade-examples": "bun scripts/upgrade-examples.ts" 17 | }, 18 | "dependencies": { 19 | "estree-walker": "^2.0.2", 20 | "magic-string": "^0.30.17", 21 | "postcss": "^8.5.4", 22 | "postcss-discard-empty": "^7.0.1" 23 | }, 24 | "devDependencies": { 25 | "@biomejs/biome": "1.9.4", 26 | "@types/bun": "latest", 27 | "@types/jest": "latest", 28 | "carbon-components-svelte": "0.87.0", 29 | "culls": "latest", 30 | "svelte": "^5.33.14", 31 | "typescript": "latest", 32 | "vite": "latest", 33 | "webpack": "latest" 34 | }, 35 | "repository": { 36 | "type": "git", 37 | "url": "git+https://github.com/carbon-design-system/carbon-preprocess-svelte.git" 38 | }, 39 | "homepage": "https://github.com/carbon-design-system/carbon-preprocess-svelte", 40 | "bugs": "https://github.com/carbon-design-system/carbon-preprocess-svelte/issues", 41 | "keywords": [ 42 | "carbon", 43 | "carbon design system", 44 | "carbon preprocess", 45 | "svelte", 46 | "preprocessor", 47 | "optimize imports", 48 | "optimize CSS" 49 | ], 50 | "files": ["dist"], 51 | "maintainers": ["Eric Liu (https://github.com/metonym)"] 52 | } 53 | -------------------------------------------------------------------------------- /scripts/extract-selectors.ts: -------------------------------------------------------------------------------- 1 | import { type ANode, walk } from "estree-walker"; 2 | import { parse } from "svelte/compiler"; 3 | import { CARBON_PREFIX } from "../src/constants"; 4 | 5 | type ExtractSelectorsProps = { 6 | code: string; 7 | filename: string; 8 | }; 9 | 10 | export function extractSelectors(props: ExtractSelectorsProps) { 11 | const { code, filename } = props; 12 | const ast = parse(code, { filename }); 13 | const selectors: Map = new Map(); 14 | const components: Set = new Set(); 15 | 16 | walk(ast, { 17 | enter(node) { 18 | // A component may compose other components. 19 | // Record these references for later processing. 20 | if (node.type === "InlineComponent") { 21 | if (node.name === "svelte:component") { 22 | components.add(node.expression.name); 23 | } else { 24 | components.add(node.name); 25 | } 26 | } 27 | 28 | if (node.type === "Attribute" && node.name === "class") { 29 | // class="c1" 30 | // class="c1 c2" 31 | // class="{c} c1 c2 c3" 32 | node.value?.map((value: ANode) => { 33 | if (value.type === "Text") { 34 | for (const selector of value.data.split(/\s+/).filter(Boolean)) { 35 | selectors.set(selector, { type: node.type }); 36 | } 37 | } 38 | }); 39 | } 40 | 41 | // class:directive 42 | if (node.type === "Class") { 43 | selectors.set(node.name, { type: node.type }); 44 | } 45 | 46 | if (node.type === "PseudoClassSelector" && node.name === "global") { 47 | // global selector 48 | // :global(div) {} 49 | const selector = code.slice(node.start, node.end); 50 | 51 | // Remove :global( from start and ) from end 52 | const cleanSelector = selector.replace(/^:global\((.*)\)$/, "$1"); 53 | selectors.set(cleanSelector, { type: node.type, name: node.name }); 54 | } 55 | 56 | if (node.type === "Literal" && CARBON_PREFIX.test(node.value)) { 57 | selectors.set(node.value, { type: "Class" }); 58 | } 59 | 60 | if ( 61 | node.type === "TemplateElement" && 62 | CARBON_PREFIX.test(node.value.raw) 63 | ) { 64 | selectors.set(node.value.raw, { type: "Class" }); 65 | } 66 | }, 67 | }); 68 | 69 | const classes: string[] = []; 70 | 71 | // Iterate through all class attribute identifiers 72 | for (const [v = ""] of selectors) { 73 | if (typeof v === "string") { 74 | const value = v.trim(); 75 | 76 | if (value.startsWith("bx--") && !value.startsWith(".")) { 77 | classes.push(`.${value}`); 78 | } else { 79 | if (value.startsWith(".")) { 80 | classes.push(value); 81 | } else { 82 | classes.push(`.${value}`); 83 | } 84 | } 85 | } 86 | } 87 | 88 | return { 89 | /** Unique classes in the current component. */ 90 | classes: [...new Set(classes)], 91 | 92 | /** Unique components that are referenced by the current component. */ 93 | components: [...new Set(components)], 94 | }; 95 | } 96 | -------------------------------------------------------------------------------- /scripts/index-components.ts: -------------------------------------------------------------------------------- 1 | import path from "node:path"; 2 | import { Glob } from "bun"; 3 | import { walk } from "estree-walker"; 4 | import { parse } from "svelte/compiler"; 5 | import { CarbonSvelte } from "../src/constants"; 6 | import { isSvelteFile } from "../src/utils"; 7 | import { extractSelectors } from "./extract-selectors"; 8 | 9 | const carbon_path = path.join("node_modules", CarbonSvelte.Components); 10 | const index_js = path.join(carbon_path, "src/index.js"); 11 | const index_file = await Bun.file(index_js).text(); 12 | 13 | /** 14 | * The exportee from `carbon-components-svelte`. 15 | * @example Accordion, breakpoints, etc. 16 | */ 17 | type Identifier = string; 18 | 19 | type IdentifierValue = { path: string; classes: string[] }; 20 | 21 | /** Map of components/files exported from the barrel file. */ 22 | const exports_map = new Map(); 23 | /** Map of internal components. */ 24 | const internal_components = new Map(); 25 | /** 26 | * A map of components that contain other components. 27 | * Once all components have been processed, use this map to add 28 | * the classes of the sub-components to the parent component. 29 | * @example 30 | * ```ts 31 | * ["Accordion", ["AccordionSkeleton"]] 32 | * ``` 33 | */ 34 | const sub_components = new Map(); 35 | 36 | walk(parse(``), { 37 | enter(node) { 38 | if (node.type === "Identifier") { 39 | exports_map.set(node.name, null); 40 | } 41 | }, 42 | }); 43 | 44 | const files = new Glob("**/*.{js,svelte}").scan(path.join(carbon_path, "src")); 45 | 46 | for await (const file of files) { 47 | // Skip processing icon components, which do not have classes. 48 | if (file.startsWith("icons/")) { 49 | continue; 50 | } 51 | 52 | const moduleName = path.parse(file).name; 53 | 54 | const map: IdentifierValue = { 55 | path: `${CarbonSvelte.Components}/src/${file}`, 56 | classes: [], 57 | }; 58 | 59 | if (isSvelteFile(file)) { 60 | const file_path = path.join(carbon_path, "src/", file); 61 | const file_text = await Bun.file(file_path).text(); 62 | const selectors = extractSelectors({ code: file_text, filename: file }); 63 | 64 | map.classes = selectors.classes; 65 | 66 | if (selectors.components.length > 0) { 67 | sub_components.set(moduleName, selectors.components); 68 | } 69 | } 70 | 71 | if (exports_map.has(moduleName)) { 72 | exports_map.set(moduleName, map); 73 | } else if (isSvelteFile(file)) { 74 | internal_components.set(moduleName, map); 75 | } 76 | } 77 | 78 | for (const [parent, components] of sub_components.entries()) { 79 | const parent_map = exports_map.get(parent); 80 | 81 | if (parent_map) { 82 | const sub_classes = components.flatMap((component) => { 83 | if (exports_map.has(component)) { 84 | return exports_map.get(component)?.classes ?? []; 85 | } 86 | if (internal_components.has(component)) { 87 | return internal_components.get(component)?.classes ?? []; 88 | } 89 | 90 | // Components that fall through here are icon components, 91 | // which do not have classes and can be ignored. 92 | return []; 93 | }); 94 | 95 | if (sub_classes.length > 0) { 96 | parent_map.classes = [ 97 | ...new Set([...parent_map.classes, ...sub_classes]), 98 | ]; 99 | } 100 | } 101 | } 102 | 103 | // Sort Map keys alphabetically and convert to object. 104 | const components = Object.fromEntries( 105 | new Map( 106 | [...exports_map.entries()] 107 | .sort((a, b) => a.toLocaleString().localeCompare(b.toLocaleString())) 108 | .filter(([_, value]) => value !== null), 109 | ), 110 | ); 111 | 112 | await Bun.write( 113 | "src/component-index.ts", 114 | `// @generated 115 | // This file was automatically generated and should not be edited. 116 | // @see scripts/index-components.ts 117 | 118 | export const components: Record = Object.freeze(${JSON.stringify( 119 | components, 120 | )});\n`, 121 | ); 122 | -------------------------------------------------------------------------------- /scripts/upgrade-examples.ts: -------------------------------------------------------------------------------- 1 | import { $ } from "bun"; 2 | 3 | for await (const dir of $`find examples -maxdepth 1 -mindepth 1 -type d`.lines()) { 4 | if (dir) await $`cd ${dir} && bun update`; 5 | } 6 | -------------------------------------------------------------------------------- /src/constants.ts: -------------------------------------------------------------------------------- 1 | export const CarbonSvelte = { 2 | Components: "carbon-components-svelte", 3 | Icons: "carbon-icons-svelte", 4 | Pictograms: "carbon-pictograms-svelte", 5 | } as const; 6 | 7 | export const CARBON_PREFIX = /bx--/; 8 | 9 | export const RE_EXT_SVELTE = /\.svelte$/; 10 | 11 | export const RE_EXT_CSS = /\.css$/; 12 | 13 | // Vite uses the decimal system for file sizes. 14 | export const BITS_DENOM = 1_000; 15 | -------------------------------------------------------------------------------- /src/global.d.ts: -------------------------------------------------------------------------------- 1 | declare module "estree-walker" { 2 | import type { Ast, Element, Text } from "svelte/types/compiler/interfaces"; 3 | 4 | type CustomElement = Omit & T; 5 | 6 | type Literal = CustomElement<{ 7 | type: "Literal"; 8 | value: string; 9 | }>; 10 | 11 | type TemplateElement = CustomElement<{ 12 | type: "TemplateElement"; 13 | value: { raw: string }; 14 | }>; 15 | 16 | type PseudoClassSelector = CustomElement<{ 17 | type: "PseudoClassSelector"; 18 | name: "global" | string; 19 | }>; 20 | 21 | type Class = CustomElement<{ 22 | type: "Class"; 23 | }>; 24 | 25 | type Attribute = CustomElement<{ 26 | type: "Attribute"; 27 | name: string; 28 | value?: Array; 29 | }>; 30 | 31 | type Identifier = CustomElement<{ 32 | type: "Identifier"; 33 | }>; 34 | 35 | type ImportDeclaration = CustomElement<{ 36 | type: "ImportDeclaration"; 37 | source: { value: string }; 38 | specifiers: Array<{ 39 | local: { name: string }; 40 | imported: { name: string }; 41 | }>; 42 | }>; 43 | 44 | type ANode = 45 | | Element 46 | | Literal 47 | | TemplateElement 48 | | PseudoClassSelector 49 | | Class 50 | | Attribute 51 | | Identifier 52 | | ImportDeclaration; 53 | 54 | export function walk( 55 | ast: Ast, 56 | options: { 57 | enter: (node: ANode, parentNode: ANode) => void; 58 | }, 59 | ): void; 60 | } 61 | -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- 1 | export { default as OptimizeCssPlugin } from "./plugins/OptimizeCssPlugin"; 2 | export { optimizeCss } from "./plugins/optimize-css"; 3 | export { optimizeImports } from "./preprocessors/optimize-imports"; 4 | -------------------------------------------------------------------------------- /src/plugins/OptimizeCssPlugin.ts: -------------------------------------------------------------------------------- 1 | import type { Compiler } from "webpack"; 2 | import { isCarbonSvelteImport, isCssFile } from "../utils"; 3 | import type { OptimizeCssOptions } from "./create-optimized-css"; 4 | import { createOptimizedCss } from "./create-optimized-css"; 5 | import { printDiff } from "./print-diff"; 6 | 7 | // Webpack plugin to optimize CSS for Carbon Svelte components. 8 | class OptimizeCssPlugin { 9 | private options: OptimizeCssOptions; 10 | 11 | public constructor(options?: OptimizeCssOptions) { 12 | this.options = { 13 | verbose: options?.verbose !== false, 14 | preserveAllIBMFonts: options?.preserveAllIBMFonts === true, 15 | }; 16 | } 17 | 18 | public apply(compiler: Compiler) { 19 | const { 20 | webpack: { 21 | Compilation, 22 | NormalModule, 23 | sources: { RawSource }, 24 | }, 25 | } = compiler; 26 | 27 | compiler.hooks.thisCompilation.tap( 28 | OptimizeCssPlugin.name, 29 | (compilation) => { 30 | const hooks = NormalModule.getCompilationHooks(compilation); 31 | const ids: string[] = []; 32 | 33 | hooks.beforeSnapshot.tap(OptimizeCssPlugin.name, ({ buildInfo }) => { 34 | if (buildInfo?.fileDependencies) { 35 | for (const id of buildInfo.fileDependencies) { 36 | if (isCarbonSvelteImport(id)) { 37 | ids.push(id); 38 | } 39 | } 40 | } 41 | }); 42 | 43 | compilation.hooks.processAssets.tap( 44 | { 45 | name: OptimizeCssPlugin.name, 46 | stage: Compilation.PROCESS_ASSETS_STAGE_DERIVED, 47 | }, 48 | (assets) => { 49 | // Skip processing if no Carbon Svelte imports are found. 50 | if (ids.length === 0) return; 51 | 52 | for (const [id] of Object.entries(assets)) { 53 | if (isCssFile(id)) { 54 | const original_css = assets[id].source(); 55 | const optimized_css = createOptimizedCss({ 56 | ...this.options, 57 | source: Buffer.isBuffer(original_css) 58 | ? original_css.toString() 59 | : original_css, 60 | ids, 61 | }); 62 | 63 | compilation.updateAsset(id, new RawSource(optimized_css)); 64 | 65 | if (this.options.verbose) { 66 | printDiff({ original_css, optimized_css, id }); 67 | } 68 | } 69 | } 70 | }, 71 | ); 72 | }, 73 | ); 74 | } 75 | } 76 | 77 | export default OptimizeCssPlugin; 78 | -------------------------------------------------------------------------------- /src/plugins/create-optimized-css.ts: -------------------------------------------------------------------------------- 1 | import path from "node:path"; 2 | import postcss from "postcss"; 3 | import discardEmpty from "postcss-discard-empty"; 4 | import { components } from "../component-index"; 5 | import { CARBON_PREFIX } from "../constants"; 6 | 7 | export type OptimizeCssOptions = { 8 | /** 9 | * By default, the plugin will print the size 10 | * difference between the original and optimized CSS. 11 | * 12 | * Set to `false` to disable verbose logging. 13 | * @default true 14 | */ 15 | verbose?: boolean; 16 | 17 | /** 18 | * By default, pre-compiled Carbon StyleSheets ship `@font-face` rules 19 | * for all available IBM Plex fonts, many of which are not actually 20 | * used in Carbon Svelte components. 21 | * 22 | * The default behavior is to preserve the following IBM Plex fonts: 23 | * - IBM Plex Sans (300/400/600-weight and normal-font-style rules) 24 | * - IBM Plex Mono (400-weight and normal-font-style rules) 25 | * 26 | * Set to `true` to disable this behavior and 27 | * retain *all* IBM Plex `@font-face` rules. 28 | * @default false 29 | */ 30 | preserveAllIBMFonts?: boolean; 31 | }; 32 | 33 | type CreateOptimizedCssOptions = OptimizeCssOptions & { 34 | source: Uint8Array | string; 35 | ids: string[]; 36 | }; 37 | 38 | export function createOptimizedCss(options: CreateOptimizedCssOptions) { 39 | const { source, ids } = options; 40 | const preserveAllIBMFonts = options?.preserveAllIBMFonts === true; 41 | 42 | // List of Carbon classes that must be preserved in the CSS 43 | // but that are not referenced in Carbon Svelte components. 44 | const css_allowlist = [".bx--body"]; 45 | 46 | for (const id of ids) { 47 | const { name } = path.parse(id); 48 | 49 | if (name in components) { 50 | css_allowlist.push(...components[name].classes); 51 | } 52 | } 53 | 54 | return postcss([ 55 | { 56 | postcssPlugin: "postcss-plugin:carbon:optimize-css", 57 | Rule(node) { 58 | const selector = node.selector; 59 | 60 | // Ensure that the selector contains a Carbon prefix. 61 | if (CARBON_PREFIX.test(selector)) { 62 | // Selectors may contain multiple classes, separated by a comma. 63 | const classes = selector.split(",").filter((selectee) => { 64 | const value = selectee.trim() ?? ""; 65 | // Some Carbon classes are prefixed with a tag for higher specificity. 66 | // E.g., a.bx--header 67 | const [, rest] = value.split("."); 68 | return Boolean(rest); 69 | }); 70 | 71 | let remove_rule = true; 72 | 73 | for (const name of classes) { 74 | for (const selector of css_allowlist) { 75 | // If at least one class is in the allowlist, keep the rule. 76 | // This is a simplistic approach and can be further optimized. 77 | if (name.includes(selector)) { 78 | remove_rule = false; 79 | break; 80 | } 81 | } 82 | } 83 | 84 | if (remove_rule) { 85 | node.remove(); 86 | } 87 | } 88 | }, 89 | AtRule(node) { 90 | if (!preserveAllIBMFonts && node.name === "font-face") { 91 | const attributes = { 92 | "font-family": "", 93 | "font-style": "", 94 | "font-weight": "", 95 | }; 96 | 97 | node.walkDecls((decl) => { 98 | switch (decl.prop) { 99 | case "font-family": 100 | case "font-style": 101 | case "font-weight": 102 | attributes[decl.prop] = decl.value; 103 | break; 104 | } 105 | }); 106 | 107 | // Do not proceed if font is not IBM Plex. 108 | if (!attributes["font-family"].startsWith("IBM Plex")) { 109 | return; 110 | } 111 | 112 | const is_mono = 113 | attributes["font-style"] === "normal" && 114 | attributes["font-family"] === "IBM Plex Mono" && 115 | attributes["font-weight"] === "400"; 116 | 117 | const is_sans = 118 | attributes["font-style"] === "normal" && 119 | attributes["font-family"] === "IBM Plex Sans" && 120 | ["300", "400", "600"].includes(attributes["font-weight"]); 121 | 122 | if (!(is_sans || is_mono)) { 123 | node.remove(); 124 | } 125 | } 126 | }, 127 | }, 128 | discardEmpty(), 129 | ]).process(source).css; 130 | } 131 | -------------------------------------------------------------------------------- /src/plugins/optimize-css.ts: -------------------------------------------------------------------------------- 1 | import type { Plugin } from "vite"; 2 | import { isCarbonSvelteImport, isCssFile } from "../utils"; 3 | import type { OptimizeCssOptions } from "./create-optimized-css"; 4 | import { createOptimizedCss } from "./create-optimized-css"; 5 | import { printDiff } from "./print-diff"; 6 | 7 | // Vite plugin (Rollup-compatible) to optimize CSS for Carbon Svelte components. 8 | export const optimizeCss = (options?: OptimizeCssOptions): Plugin => { 9 | const verbose = options?.verbose !== false; 10 | const ids: string[] = []; 11 | 12 | return { 13 | name: "vite:carbon:optimize-css", 14 | apply: "build", 15 | enforce: "post", 16 | transform(_, id) { 17 | if (isCarbonSvelteImport(id)) { 18 | ids.push(id); 19 | } 20 | }, 21 | async generateBundle(_, bundle) { 22 | // Skip processing if no Carbon Svelte imports are found. 23 | if (ids.length === 0) return; 24 | 25 | for (const id in bundle) { 26 | const file = bundle[id]; 27 | 28 | if (file.type === "asset" && isCssFile(id)) { 29 | const original_css = file.source; 30 | const optimized_css = createOptimizedCss({ 31 | ...options, 32 | source: original_css, 33 | ids, 34 | }); 35 | 36 | file.source = optimized_css; 37 | 38 | if (verbose) { 39 | printDiff({ original_css, optimized_css, id }); 40 | } 41 | } 42 | } 43 | }, 44 | }; 45 | }; 46 | -------------------------------------------------------------------------------- /src/plugins/print-diff.ts: -------------------------------------------------------------------------------- 1 | import { BITS_DENOM } from "../constants"; 2 | 3 | const formatter = new Intl.NumberFormat("en-US", { maximumFractionDigits: 2 }); 4 | 5 | function toHumanReadableSize(size_in_kb: number) { 6 | if (size_in_kb >= BITS_DENOM) { 7 | return `${formatter.format(size_in_kb / BITS_DENOM)} MB`; 8 | } 9 | 10 | return `${formatter.format(size_in_kb)} kB`; 11 | } 12 | 13 | function percentageDiff(a: number, b: number) { 14 | return `${formatter.format(((a - b) / a) * 100)}%`; 15 | } 16 | 17 | function stringSizeInKB(str: string) { 18 | const blob = new Blob([str], { type: "text/plain" }); 19 | return blob.size / BITS_DENOM; 20 | } 21 | 22 | function padIfNeeded(a: string, b: string) { 23 | return a.length > b.length ? a : a.padStart(b.length, " "); 24 | } 25 | 26 | export function printDiff(props: { 27 | original_css: Uint8Array | Buffer | string; 28 | optimized_css: string; 29 | id: string; 30 | }) { 31 | const { original_css, optimized_css, id } = props; 32 | 33 | const original_size = stringSizeInKB(original_css.toString()); 34 | const optimized_size = stringSizeInKB(optimized_css); 35 | 36 | if (original_size === optimized_size) { 37 | return; 38 | } 39 | 40 | const original = toHumanReadableSize(original_size); 41 | const optimized = toHumanReadableSize(optimized_size); 42 | const original_display = padIfNeeded(original, optimized); 43 | const optimized_display = padIfNeeded(optimized, original); 44 | const diff = percentageDiff(original_size, optimized_size); 45 | 46 | console.log("\n"); 47 | console.log("Optimized", id); 48 | console.log("Before:", original_display); 49 | console.log("After: ", optimized_display, `(-${diff})\n`); 50 | } 51 | -------------------------------------------------------------------------------- /src/preprocessors/optimize-imports.ts: -------------------------------------------------------------------------------- 1 | import type { ImportDeclaration } from "estree-walker"; 2 | import { walk } from "estree-walker"; 3 | import MagicString from "magic-string"; 4 | import { parse } from "svelte/compiler"; 5 | import type { SveltePreprocessor } from "svelte/types/compiler/preprocess"; 6 | import { components } from "../component-index"; 7 | import { CarbonSvelte } from "../constants"; 8 | 9 | function rewriteImport( 10 | s: MagicString, 11 | node: ImportDeclaration, 12 | map: (specifier: ImportDeclaration["specifiers"][0]) => string, 13 | ) { 14 | let content = ""; 15 | 16 | for (const specifier of node.specifiers) { 17 | const fragment = map(specifier); 18 | if (fragment) { 19 | content += fragment + (!fragment.endsWith("\n") ? "\n" : ""); 20 | } 21 | } 22 | 23 | if (content) s.overwrite(node.start, node.end, content.trimEnd()); 24 | } 25 | 26 | export const optimizeImports: SveltePreprocessor<"script"> = () => { 27 | return { 28 | name: "carbon:optimize-imports", 29 | script({ filename, content: raw }) { 30 | // Skip files in node_modules to minimize unnecessary preprocessing 31 | if (!filename) return; 32 | if (/node_modules/.test(filename)) return; 33 | 34 | // Wrap the content in a ``; 36 | const s = new MagicString(content); 37 | 38 | walk(parse(content), { 39 | enter(node) { 40 | if (node.type === "ImportDeclaration") { 41 | const import_name = node.source.value; 42 | 43 | switch (import_name) { 44 | case CarbonSvelte.Components: 45 | rewriteImport(s, node, ({ imported, local }) => { 46 | const import_path = components[imported.name]?.path; 47 | if (!import_path) return ""; 48 | return `import ${local.name} from "${import_path}";`; 49 | }); 50 | break; 51 | 52 | case CarbonSvelte.Icons: 53 | case CarbonSvelte.Pictograms: 54 | rewriteImport(s, node, ({ imported, local }) => { 55 | return `import ${local.name} from "${import_name}/lib/${imported.name}.svelte";`; 56 | }); 57 | break; 58 | } 59 | } 60 | }, 61 | }); 62 | 63 | s.replace(/^ 61 |