@behivetech/styles 0.0.0-stage → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +22 -2
  3. package/dist/index.css +3833 -0
  4. package/package.json +81 -3
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 BEhive Tech
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,23 @@
1
- # Temporary Holding Version
1
+ # @behivetech/styles
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ One stylesheet with the CSS of every styled `@behivetech` registry component, so an app imports a single file instead of one `styles.css` per package.
4
+
5
+ ## Use it
6
+
7
+ ```ts
8
+ import "@behivetech/styles/index.css";
9
+ ```
10
+
11
+ Import it once, in the app's root layout, next to the design tokens (`@behivetech/tokens`). The packages' own `styles.css` entries keep working, so an app that lists them one by one does not have to change.
12
+
13
+ ## How it is built
14
+
15
+ `pnpm build` runs `src/build.ts` after every dependency has built. It reads the stylesheet each styled registry package lists in `dependencies` and joins them in category order (icons, atoms, forms, molecules, organisms, templates, then by name), each under a comment naming its package. The build fails if the result does not parse or if a declared styled package has no built stylesheet. The styled packages are `devDependencies`, so installing this package pulls only the CSS, not the components. Changesets therefore does not release it for them; `pnpm test:scripts` does the checking instead (see the rule below). One writer produces the file, so the cjs/esm CSS race that a package's own build guards against cannot reach the bundle.
16
+
17
+ ## Adding a styled package
18
+
19
+ A new registry package that exports `./styles.css` must be added to this package's `devDependencies` (`"@behivetech/<category>.<name>": "workspace:*"`). `pnpm test:scripts` fails naming any styled package that is missing.
20
+
21
+ ## Releasing
22
+
23
+ A release that includes a styled component, directly or as a dependent, also releases `@behivetech/styles` (add `"@behivetech/styles": patch` to it), so the published CSS never lags the components. `pnpm test:scripts` fails, naming the packages, when the release plan of the pending changesets (dependents included) releases a styled package and not this one.