@dawn-studio/astryx-svelte 0.1.0 → 0.1.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/NOTICE +3 -2
- package/README.md +25 -20
- package/dist/themes/dawn.css +36 -1
- package/dist/themes/neutral.css +5 -0
- package/package.json +59 -1
package/NOTICE
CHANGED
|
@@ -3,8 +3,9 @@ Copyright Dawn Studio
|
|
|
3
3
|
|
|
4
4
|
This package implements Meta's Astryx design system for Svelte 5.
|
|
5
5
|
|
|
6
|
-
The theme CSS files shipped under dist/themes/
|
|
7
|
-
@
|
|
6
|
+
The theme CSS files shipped under dist/themes/ come from
|
|
7
|
+
@dawn-studio/astryx-theme (Dawn Studio), which derives them from the
|
|
8
|
+
published @astryxdesign/theme-neutral package (version 0.7.17), part of Astryx
|
|
8
9
|
(https://github.com/meta/astryx), licensed under the MIT License:
|
|
9
10
|
|
|
10
11
|
Copyright (c) Meta Platforms, Inc. and affiliates.
|
package/README.md
CHANGED
|
@@ -25,21 +25,27 @@ custom properties (`--color-text-primary`, `--color-accent`,
|
|
|
25
25
|
`@scope ([data-astryx-theme="neutral"])`, with dark/light handled by the CSS
|
|
26
26
|
`light-dark()` function driven by `color-scheme` (set from a `data-theme`
|
|
27
27
|
attribute, `prefers-color-scheme` fallback). It is plain CSS — no React, no
|
|
28
|
-
StyleX runtime. **This is the single token source for both
|
|
29
|
-
(ONE FUNCTION ONE PATH)
|
|
30
|
-
|
|
28
|
+
StyleX runtime. **This vocabulary is the single token source for both
|
|
29
|
+
fleets** (ONE FUNCTION ONE PATH), packaged for Dawn as
|
|
30
|
+
`@dawn-studio/astryx-theme`: this package does not fork, rename, or
|
|
31
|
+
hand-copy a single token value.
|
|
31
32
|
|
|
32
33
|
One wrinkle: `theme-neutral` declares `react` / `@astryxdesign/core` peer
|
|
33
34
|
dependencies (for its JS entry), and npm auto-installs peers — a bare
|
|
34
35
|
`npm i @astryxdesign/theme-neutral` drags React + StyleX (12 packages) into a
|
|
35
|
-
Svelte app's tree. So
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
Svelte app's tree. So no Dawn package installs it directly. Since 0.1.1 the
|
|
37
|
+
themes come from **`@dawn-studio/astryx-theme`** — the Dawn fleet's single
|
|
38
|
+
token source (a standalone, stack-neutral CSS package that is the fleet's
|
|
39
|
+
only intake point for `theme-neutral`, and the home of the canonical Dawn
|
|
40
|
+
override layer). It is a **devDependency here**: the build
|
|
41
|
+
(`scripts/build-themes.mjs`) copies its built CSS onward —
|
|
38
42
|
|
|
39
43
|
- `dist/themes/neutral.css` — the upstream theme CSS, verbatim (MIT, see
|
|
40
44
|
NOTICE), importable straight from this package;
|
|
41
|
-
- `dist/themes/dawn.css` — the
|
|
42
|
-
`data-astryx-theme="dawn"` plus
|
|
45
|
+
- `dist/themes/dawn.css` — the Dawn theme: neutral with the scope retargeted
|
|
46
|
+
to `data-astryx-theme="dawn"` plus the Dawn override layer (below), built
|
|
47
|
+
by `@dawn-studio/astryx-theme`. This package keeps no override copy of
|
|
48
|
+
its own.
|
|
43
49
|
|
|
44
50
|
Consumers never install the React peer chain.
|
|
45
51
|
|
|
@@ -75,18 +81,17 @@ Enter that confirms a CJK candidate never submits).
|
|
|
75
81
|
|
|
76
82
|
### Dawn theme (the §8 slot)
|
|
77
83
|
|
|
78
|
-
`dist/themes/dawn.css` =
|
|
79
|
-
`@scope` block so every value
|
|
80
|
-
|
|
81
|
-
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
`#fbf8f1`.
|
|
88
|
-
- **Fonts:** Figtree kept first, CJK fallbacks added
|
|
89
|
-
("Noto Sans TC", "PingFang TC", "Microsoft JhengHei").
|
|
84
|
+
`dist/themes/dawn.css` = the `@dawn-studio/astryx-theme` build of neutral +
|
|
85
|
+
the Dawn override layer, appended as one `@scope` block so every value
|
|
86
|
+
stays traceable. The overrides live in that package's
|
|
87
|
+
`src/dawn-overrides.css` — the single source; do not restate them here.
|
|
88
|
+
|
|
89
|
+
- **One accent (§8 Icon + Accent language):** Dawn teal mapped into the
|
|
90
|
+
accent token family, contrast-verified ≥4.5:1 where the token carries
|
|
91
|
+
text (tests in `@dawn-studio/astryx-theme`).
|
|
92
|
+
- **No Pure White:** neutral's light-mode `#ffffff` surfaces become warm
|
|
93
|
+
cream `#fbf8f1`.
|
|
94
|
+
- **Fonts:** Figtree kept first, CJK fallbacks added.
|
|
90
95
|
- **Default Dark** is a usage rule, not a CSS trick: `<Theme mode="dark">` is
|
|
91
96
|
the default; apps render dark first.
|
|
92
97
|
|
package/dist/themes/dawn.css
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Generated by @dawn-studio/astryx-svelte — do not edit.
|
|
3
|
+
* Source: @dawn-studio/astryx-theme (Dawn Studio), the fleet's single token
|
|
4
|
+
* source, built on @astryxdesign/theme-neutral (Astryx, MIT — see NOTICE).
|
|
5
|
+
*/
|
|
6
|
+
/*
|
|
7
|
+
* Generated by @dawn-studio/astryx-theme — do not edit.
|
|
3
8
|
* Source: @astryxdesign/theme-neutral/dist/theme.css (Astryx, MIT — see NOTICE).
|
|
4
9
|
*/
|
|
5
10
|
/*
|
|
@@ -751,18 +756,48 @@
|
|
|
751
756
|
}
|
|
752
757
|
}
|
|
753
758
|
|
|
754
|
-
/*
|
|
759
|
+
/*
|
|
760
|
+
* @dawn-studio/astryx-theme — src/dawn-overrides.css
|
|
761
|
+
*
|
|
762
|
+
* THE canonical Dawn override layer for Astryx (Dawn Design v1.7 §5/§8).
|
|
763
|
+
* This file is the single source of Dawn's visual identity on top of
|
|
764
|
+
* @astryxdesign/theme-neutral: every Dawn app, React or Svelte, renders
|
|
765
|
+
* these exact values. Do not copy this block into an app or another
|
|
766
|
+
* package — consume the built theme (dist/dawn.css) or this file via
|
|
767
|
+
* the package export `@dawn-studio/astryx-theme/overrides.css`.
|
|
768
|
+
*
|
|
769
|
+
* It re-declares ONLY tokens that exist in the upstream Astryx semantic
|
|
770
|
+
* vocabulary (parity is test-enforced), scoped to the "dawn" theme.
|
|
771
|
+
* Load order: after the neutral theme CSS (the build's dist/dawn.css
|
|
772
|
+
* already has it appended; standalone use imports it last).
|
|
773
|
+
*
|
|
774
|
+
* Contents:
|
|
775
|
+
* §8 One Accent — the Dawn teal mapped into the accent token family.
|
|
776
|
+
* Values are contrast-verified by test/theme.test.ts:
|
|
777
|
+
* on-accent on accent fill: 4.80:1 light / 6.44:1 dark
|
|
778
|
+
* text-accent on background-body: 4.94:1 light / 9.25:1 dark
|
|
779
|
+
* text-accent on cream surfaces: 5.26:1 light
|
|
780
|
+
* §5 No Pure White — every light-mode surface upstream ships as
|
|
781
|
+
* #ffffff becomes cream #fbf8f1 (body background was already #f1f1f1
|
|
782
|
+
* upstream and is left alone).
|
|
783
|
+
* §5 Fonts — Figtree first (upstream), CJK fallbacks added for the
|
|
784
|
+
* fleet's Traditional Chinese surfaces.
|
|
785
|
+
*/
|
|
755
786
|
@layer astryx-theme {
|
|
756
787
|
@scope ([data-astryx-theme="dawn"]) to ([data-astryx-theme]) {
|
|
757
788
|
:scope {
|
|
789
|
+
/* §8 accent system */
|
|
758
790
|
--color-accent: light-dark(#0aa79b, #00c2b8);
|
|
759
791
|
--color-on-accent: #04302a;
|
|
760
792
|
--color-text-accent: light-dark(#00756c, #2dd4bf);
|
|
761
793
|
--color-icon-accent: light-dark(#00756c, #2dd4bf);
|
|
762
794
|
--color-accent-muted: light-dark(#0aa79b29, #00c2b82e);
|
|
795
|
+
/* §5 No Pure White — cream light surfaces */
|
|
763
796
|
--color-background-surface: light-dark(#fbf8f1, #262626);
|
|
764
797
|
--color-background-card: light-dark(#fbf8f1, #1b1b1b);
|
|
765
798
|
--color-background-popover: light-dark(#fbf8f1, #1b1b1b);
|
|
799
|
+
--color-syntax-background: light-dark(#fbf8f1, #111111);
|
|
800
|
+
/* §5 fonts — CJK fallbacks */
|
|
766
801
|
--font-family-body: Figtree, "Noto Sans TC", "PingFang TC", "PingFang HK", "Microsoft JhengHei", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
|
767
802
|
--font-family-heading: Figtree, "Noto Sans TC", "PingFang TC", "PingFang HK", "Microsoft JhengHei", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
|
768
803
|
}
|
package/dist/themes/neutral.css
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Generated by @dawn-studio/astryx-svelte — do not edit.
|
|
3
|
+
* Source: @dawn-studio/astryx-theme (Dawn Studio), the fleet's single token
|
|
4
|
+
* source, built on @astryxdesign/theme-neutral (Astryx, MIT — see NOTICE).
|
|
5
|
+
*/
|
|
6
|
+
/*
|
|
7
|
+
* Generated by @dawn-studio/astryx-theme — do not edit.
|
|
3
8
|
* Source: @astryxdesign/theme-neutral/dist/theme.css (Astryx, MIT — see NOTICE).
|
|
4
9
|
*/
|
|
5
10
|
/*
|
package/package.json
CHANGED
|
@@ -1 +1,59 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"description": "Astryx for Svelte: Dawn Studio's Svelte 5 implementation of Meta's Astryx design system — the upstream semantic token/theme CSS consumed directly, components re-implemented in Svelte against Astryx's published specs.",
|
|
3
|
+
"devDependencies": {
|
|
4
|
+
"@sveltejs/vite-plugin-svelte": "^5.0.0",
|
|
5
|
+
"@testing-library/svelte": "^5.2.0",
|
|
6
|
+
"jsdom": "^25.0.0",
|
|
7
|
+
"svelte": "^5.20.0",
|
|
8
|
+
"typescript": "^5.6.0",
|
|
9
|
+
"vite": "^6.0.0",
|
|
10
|
+
"vitest": "^2.1.0",
|
|
11
|
+
"@dawn-studio/astryx-theme": "0.1.0"
|
|
12
|
+
},
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"default": "./src/index.ts",
|
|
16
|
+
"svelte": "./src/index.ts",
|
|
17
|
+
"types": "./src/index.ts"
|
|
18
|
+
},
|
|
19
|
+
"./package.json": "./package.json",
|
|
20
|
+
"./themes/dawn.css": "./dist/themes/dawn.css",
|
|
21
|
+
"./themes/neutral.css": "./dist/themes/neutral.css"
|
|
22
|
+
},
|
|
23
|
+
"files": [
|
|
24
|
+
"src",
|
|
25
|
+
"dist/themes",
|
|
26
|
+
"README.md",
|
|
27
|
+
"NOTICE"
|
|
28
|
+
],
|
|
29
|
+
"keywords": [
|
|
30
|
+
"astryx",
|
|
31
|
+
"svelte",
|
|
32
|
+
"svelte5",
|
|
33
|
+
"design-system",
|
|
34
|
+
"design-tokens",
|
|
35
|
+
"dawn-studio"
|
|
36
|
+
],
|
|
37
|
+
"license": "Apache-2.0",
|
|
38
|
+
"name": "@dawn-studio/astryx-svelte",
|
|
39
|
+
"peerDependencies": {
|
|
40
|
+
"svelte": "^5.0.0"
|
|
41
|
+
},
|
|
42
|
+
"publishConfig": {
|
|
43
|
+
"access": "public"
|
|
44
|
+
},
|
|
45
|
+
"repository": {
|
|
46
|
+
"type": "git",
|
|
47
|
+
"url": "https://github.com/hectorchanht/dawn-astryx-svelte.git"
|
|
48
|
+
},
|
|
49
|
+
"scripts": {
|
|
50
|
+
"build": "node scripts/build-themes.mjs",
|
|
51
|
+
"demo": "vite --config demo/vite.config.ts",
|
|
52
|
+
"demo:build": "vite build --config demo/vite.config.ts",
|
|
53
|
+
"prepublishOnly": "npm run build && npm test",
|
|
54
|
+
"test": "vitest run",
|
|
55
|
+
"test:watch": "vitest"
|
|
56
|
+
},
|
|
57
|
+
"type": "module",
|
|
58
|
+
"version": "0.1.1"
|
|
59
|
+
}
|