@aria-framework/theme 0.4.0 → 0.4.1
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/README.md +13 -0
- package/package.json +1 -1
- package/web/sidebar.js +6 -0
package/README.md
CHANGED
|
@@ -159,3 +159,16 @@ Token change → edit `tokens.json`, run `npm run build`, commit the regenerated
|
|
|
159
159
|
hand-maintained web/mobile.
|
|
160
160
|
- **v0.2.0** — added `tokens.json` + `build.js` generator (single source of record;
|
|
161
161
|
web + mobile generated from one file). Unified the drifted dark `--line-strong`.
|
|
162
|
+
- **v0.3.0** — renamed to `@aria-framework/theme` and published to npm. Mobile
|
|
163
|
+
sources now compile to `dist/` (.js + `.d.ts`, via a `prepare` script) so RN
|
|
164
|
+
apps can import the package out-of-tree; `exports` point at the built files.
|
|
165
|
+
- **v0.4.0** — first shell component: the **sidebar rail** (CSS + `--side-*`
|
|
166
|
+
tokens + `sidebar.js` behavior with a per-app `data-storage-key`; markup
|
|
167
|
+
contract above). Build now assembles generated tokens → `src/base.css` →
|
|
168
|
+
`src/components/*.css`. Sidebar carries its own focus-visible contrast rule.
|
|
169
|
+
- **v0.4.1** — `sidebar.js` double-include guard (a second script tag no longer
|
|
170
|
+
registers duplicate listeners); this changelog added.
|
|
171
|
+
|
|
172
|
+
> **0.x semver reminder:** `^0.4.0` matches `<0.5.0` only — consumers pick up
|
|
173
|
+
> patches via `npm update`, but every **minor** bump (0.4 → 0.5) requires
|
|
174
|
+
> editing the range in each consuming app.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aria-framework/theme",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "Aria App Framework — theme module. Field Ops Console design system: tokens.json single source of record + a generator that emits a Bootstrap 5.3 web theme (theme.css + self-hosted fonts) and a React Native palette/provider/primitives. Light + dark.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"private": false,
|
package/web/sidebar.js
CHANGED
|
@@ -21,6 +21,12 @@
|
|
|
21
21
|
* two layers can't drift. CSP-safe: external, self-hosted, no inline script.
|
|
22
22
|
*/
|
|
23
23
|
(function () {
|
|
24
|
+
// Double-include guard: a second copy (e.g. two layout partials both adding
|
|
25
|
+
// the script tag) would register a second delegated listener, making every
|
|
26
|
+
// toggle fire twice — a silent, error-free dead sidebar. First copy wins.
|
|
27
|
+
if (window.__ariaSidebar) return;
|
|
28
|
+
window.__ariaSidebar = true;
|
|
29
|
+
|
|
24
30
|
// currentScript is only set during initial execution — capture before deferring.
|
|
25
31
|
var script = document.currentScript;
|
|
26
32
|
var KEY = (script && script.dataset && script.dataset.storageKey) || 'aria-sidebar-collapsed';
|