strata-css 1.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.
- package/CHANGELOG.md +62 -0
- package/LICENSE +21 -0
- package/README.md +730 -0
- package/bin/strata.js +139 -0
- package/index.d.ts +70 -0
- package/package.json +68 -0
- package/src/components/modules/modal.js +123 -0
- package/src/components/modules/skeleton.js +334 -0
- package/src/components/strata.manifest.js +15 -0
- package/src/generator/generator.js +113 -0
- package/src/index.js +172 -0
- package/src/layers/base.js +571 -0
- package/src/registry/breakpoints.js +54 -0
- package/src/registry/registry.js +2898 -0
- package/src/scanner/scanner.js +106 -0
- package/strata.css +3 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to Strata CSS will be documented here.
|
|
4
|
+
|
|
5
|
+
## [1.0.0] — 2026-05-10
|
|
6
|
+
|
|
7
|
+
### Components
|
|
8
|
+
- `btn-primary`, `btn-secondary`, `btn-success`, `btn-danger`, `btn-warning`, `btn-info`, `btn-light`, `btn-dark` — full semantic button set with hover, focus, and active states baked in
|
|
9
|
+
- `card`, `card-header`, `card-body`, `card-footer` — composable card component
|
|
10
|
+
- `container`, `row`, `col-*` — Bootstrap-compatible responsive grid across all six breakpoints
|
|
11
|
+
- `modal` — dialog component with `data-st-toggle`, `data-st-dismiss`, and `data-st-backdrop` attribute API
|
|
12
|
+
- `navbar`, `navbar-brand`, `navbar-nav` — navigation bar component
|
|
13
|
+
- Skeleton loader — animated loading placeholder with `Strata.skeleton` JavaScript API
|
|
14
|
+
|
|
15
|
+
### Utilities
|
|
16
|
+
- Spacing: `mt-*`, `mb-*`, `ms-*`, `me-*`, `pt-*`, `pb-*`, `px-*`, `py-*`, `mx-auto`, `my-*`
|
|
17
|
+
- Display: `d-flex`, `d-none`, `d-block`, `d-grid`, `d-inline`, `d-inline-flex`, `d-inline-block`
|
|
18
|
+
- Colors: `text-*`, `bg-*` — all semantic colors (primary, secondary, success, danger, warning, info, light, dark, muted)
|
|
19
|
+
- Sizing: `w-25`, `w-50`, `w-75`, `w-100`, `h-25`, `h-50`, `h-75`, `h-100`, `mw-100`, `mh-100`
|
|
20
|
+
- Flexbox: `justify-content-*`, `align-items-*`, `align-self-*`, `flex-wrap`, `flex-nowrap`, `flex-grow-*`, `flex-shrink-*`
|
|
21
|
+
- Position: `position-static`, `position-relative`, `position-absolute`, `position-fixed`, `position-sticky`
|
|
22
|
+
- Overflow: `overflow-auto`, `overflow-hidden`, `overflow-scroll`, `overflow-visible`
|
|
23
|
+
- Opacity: `opacity-0`, `opacity-25`, `opacity-50`, `opacity-75`, `opacity-100`
|
|
24
|
+
- Visibility: `visible`, `invisible`
|
|
25
|
+
- Z-index: `z-0` through `z-3`
|
|
26
|
+
- Cursor: `cursor-pointer`, `cursor-default`, `cursor-not-allowed`, `cursor-wait`
|
|
27
|
+
- Shadows: `shadow-none`, `shadow-sm`, `shadow`, `shadow-lg`
|
|
28
|
+
- Transitions: `transition`, `transition-fast`, `transition-slow`, `transition-none`
|
|
29
|
+
- Easing: `ease-in`, `ease-out`, `ease-in-out`, `ease-linear`
|
|
30
|
+
- Arbitrary values: `mt-[24px]`, `bg-[#ff0000]`, `w-[347px]`, `transition-[background-color_0.3s_ease]`
|
|
31
|
+
- Important variants: `!mt-0`, `!d-none`, `!p-0`
|
|
32
|
+
- Breakpoint variants on all utilities: `col-md-6`, `d-lg-none`, `mt-xl-4`, `px-xxl-5`
|
|
33
|
+
|
|
34
|
+
### Theming
|
|
35
|
+
- Three built-in themes: `light` (default), `dark`, `dim` — applied via `data-st-theme` on `<html>`
|
|
36
|
+
- Automatic system preference detection via `prefers-color-scheme` — no configuration needed
|
|
37
|
+
- Unlimited custom themes via CSS custom properties: `[data-st-theme="brand"] { --st-primary: #7c3aed }`
|
|
38
|
+
- All `--st-*` custom properties fully overridable in `:root` or any selector
|
|
39
|
+
- Smooth theme transitions — all elements animate when the theme attribute changes
|
|
40
|
+
|
|
41
|
+
### State Management
|
|
42
|
+
- `data-st-visible="true|false"` — fade + translateY transition for show/hide
|
|
43
|
+
- `data-st-collapsed="true|false"` — smooth `max-height` expand/collapse
|
|
44
|
+
- `data-st-loading="true|false"` — opacity reduction + pointer-events disabled
|
|
45
|
+
- `data-st-disabled="true|false"` — opacity reduction + `cursor: not-allowed`
|
|
46
|
+
- `data-st-theme="light|dark|dim|custom"` — live theme switching
|
|
47
|
+
|
|
48
|
+
### Build System
|
|
49
|
+
- PostCSS plugin with O(1) class registry — 1065 pre-computed entries, zero linear scanning
|
|
50
|
+
- Multi-layer caching: dirty flag, file mtime, glob hash, config hash, output string cache
|
|
51
|
+
- CSS `@layer` hierarchy: `st-base` → `st-components` → `st-utilities` — breakpoint order guaranteed, HTML class order irrelevant
|
|
52
|
+
- Bootstrap-style breakpoints: xs (0px), sm (576px), md (768px), lg (992px), xl (1200px), xxl (1400px)
|
|
53
|
+
- Custom breakpoints via `strata.config.js` `theme.breakpoints`
|
|
54
|
+
- `prefers-reduced-motion` respected automatically — no configuration needed
|
|
55
|
+
- CLI: `strata init` (scaffold), `strata --watch` (development), `strata --build` (production), `strata --minify` (minified production)
|
|
56
|
+
|
|
57
|
+
### Performance (vs Tailwind CSS 3 in watch mode)
|
|
58
|
+
- Cold build: 1.89ms avg vs 7.21ms — 3.8× faster
|
|
59
|
+
- Warm rebuild: 0.14ms avg vs 2.70ms — 19× faster
|
|
60
|
+
- Warm p95: 0.23ms vs 6.12ms — 26× faster
|
|
61
|
+
|
|
62
|
+
Reproduce via `npm run benchmark`.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Aftab Ibrahim Kazi
|
|
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.
|