@astryxdesign/theme-y2k 0.7.0-canary.f3a2181 → 0.7.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/dist/source.js CHANGED
@@ -112,16 +112,16 @@ var y2kTheme = (0, import_theme.defineTheme)({
112
112
  // =========================================================================
113
113
  // Spacing — comfortable preset (base=6)
114
114
  // =========================================================================
115
- "--spacing-0-5": "3px",
116
- "--spacing-1": "6px",
117
- "--spacing-1-5": "9px",
118
- "--spacing-2": "12px",
119
- "--spacing-3": "18px",
120
- "--spacing-4": "24px",
121
- "--spacing-5": "30px",
122
- "--spacing-6": "36px",
123
- "--spacing-7": "42px",
124
- "--spacing-8": "48px",
115
+ "--spacing-0-5": "0.1875rem",
116
+ "--spacing-1": "0.375rem",
117
+ "--spacing-1-5": "0.5625rem",
118
+ "--spacing-2": "0.75rem",
119
+ "--spacing-3": "1.125rem",
120
+ "--spacing-4": "1.5rem",
121
+ "--spacing-5": "1.875rem",
122
+ "--spacing-6": "2.25rem",
123
+ "--spacing-7": "2.625rem",
124
+ "--spacing-8": "3rem",
125
125
  // Size — comfortable preset
126
126
  "--size-element-sm": "32px",
127
127
  "--size-element-md": "40px",
package/dist/source.mjs CHANGED
@@ -114,16 +114,16 @@ var y2kTheme = defineTheme({
114
114
  // =========================================================================
115
115
  // Spacing — comfortable preset (base=6)
116
116
  // =========================================================================
117
- "--spacing-0-5": "3px",
118
- "--spacing-1": "6px",
119
- "--spacing-1-5": "9px",
120
- "--spacing-2": "12px",
121
- "--spacing-3": "18px",
122
- "--spacing-4": "24px",
123
- "--spacing-5": "30px",
124
- "--spacing-6": "36px",
125
- "--spacing-7": "42px",
126
- "--spacing-8": "48px",
117
+ "--spacing-0-5": "0.1875rem",
118
+ "--spacing-1": "0.375rem",
119
+ "--spacing-1-5": "0.5625rem",
120
+ "--spacing-2": "0.75rem",
121
+ "--spacing-3": "1.125rem",
122
+ "--spacing-4": "1.5rem",
123
+ "--spacing-5": "1.875rem",
124
+ "--spacing-6": "2.25rem",
125
+ "--spacing-7": "2.625rem",
126
+ "--spacing-8": "3rem",
127
127
  // Size — comfortable preset
128
128
  "--size-element-sm": "32px",
129
129
  "--size-element-md": "40px",
package/dist/theme.css CHANGED
@@ -173,16 +173,16 @@
173
173
  --color-syntax-property: light-dark(#3c6755, #87b5a1);
174
174
  --color-syntax-punctuation: light-dark(#5e5e5e, #ababab);
175
175
  --color-syntax-background: light-dark(#FFF6ED, #190f00);
176
- --spacing-0-5: 3px;
177
- --spacing-1: 6px;
178
- --spacing-1-5: 9px;
179
- --spacing-2: 12px;
180
- --spacing-3: 18px;
181
- --spacing-4: 24px;
182
- --spacing-5: 30px;
183
- --spacing-6: 36px;
184
- --spacing-7: 42px;
185
- --spacing-8: 48px;
176
+ --spacing-0-5: 0.1875rem;
177
+ --spacing-1: 0.375rem;
178
+ --spacing-1-5: 0.5625rem;
179
+ --spacing-2: 0.75rem;
180
+ --spacing-3: 1.125rem;
181
+ --spacing-4: 1.5rem;
182
+ --spacing-5: 1.875rem;
183
+ --spacing-6: 2.25rem;
184
+ --spacing-7: 2.625rem;
185
+ --spacing-8: 3rem;
186
186
  --size-element-sm: 32px;
187
187
  --size-element-md: 40px;
188
188
  --size-element-lg: 48px;
package/dist/y2k.js CHANGED
@@ -105,16 +105,16 @@ export const y2kTheme = {
105
105
  "--color-syntax-property": "light-dark(#3c6755, #87b5a1)",
106
106
  "--color-syntax-punctuation": "light-dark(#5e5e5e, #ababab)",
107
107
  "--color-syntax-background": "light-dark(#FFF6ED, #190f00)",
108
- "--spacing-0-5": "3px",
109
- "--spacing-1": "6px",
110
- "--spacing-1-5": "9px",
111
- "--spacing-2": "12px",
112
- "--spacing-3": "18px",
113
- "--spacing-4": "24px",
114
- "--spacing-5": "30px",
115
- "--spacing-6": "36px",
116
- "--spacing-7": "42px",
117
- "--spacing-8": "48px",
108
+ "--spacing-0-5": "0.1875rem",
109
+ "--spacing-1": "0.375rem",
110
+ "--spacing-1-5": "0.5625rem",
111
+ "--spacing-2": "0.75rem",
112
+ "--spacing-3": "1.125rem",
113
+ "--spacing-4": "1.5rem",
114
+ "--spacing-5": "1.875rem",
115
+ "--spacing-6": "2.25rem",
116
+ "--spacing-7": "2.625rem",
117
+ "--spacing-8": "3rem",
118
118
  "--size-element-sm": "32px",
119
119
  "--size-element-md": "40px",
120
120
  "--size-element-lg": "48px",
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=y2kTheme.spacing.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"y2kTheme.spacing.test.d.ts","sourceRoot":"","sources":["../src/y2kTheme.spacing.test.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astryxdesign/theme-y2k",
3
- "version": "0.7.0-canary.f3a2181",
3
+ "version": "0.7.0",
4
4
  "displayName": "Y2K Theme",
5
5
  "private": false,
6
6
  "description": "Hot pinks, lime greens, and Poppins. Bubbly, playful, and unmistakably retro.",
@@ -57,11 +57,11 @@
57
57
  "lucide-react": "^1.18.0"
58
58
  },
59
59
  "peerDependencies": {
60
- "@astryxdesign/core": "0.7.0-canary.f3a2181",
60
+ "@astryxdesign/core": "0.7.0",
61
61
  "react": ">=19"
62
62
  },
63
63
  "devDependencies": {
64
- "@astryxdesign/cli": "0.7.0-canary.f3a2181"
64
+ "@astryxdesign/cli": "0.7.0"
65
65
  },
66
66
  "module": "./dist/source.mjs",
67
67
  "scripts": {
@@ -0,0 +1,42 @@
1
+ // Copyright (c) Meta Platforms, Inc. and affiliates.
2
+
3
+ import {describe, expect, it} from 'vitest';
4
+ import {y2kTheme} from './y2kTheme';
5
+
6
+ const ROOT_FONT_SIZE_PX = 16;
7
+
8
+ // The pixel values these steps had before they moved to rem.
9
+ const previousPx: Record<string, number> = {
10
+ '--spacing-0-5': 3,
11
+ '--spacing-1': 6,
12
+ '--spacing-1-5': 9,
13
+ '--spacing-2': 12,
14
+ '--spacing-3': 18,
15
+ '--spacing-4': 24,
16
+ '--spacing-5': 30,
17
+ '--spacing-6': 36,
18
+ '--spacing-7': 42,
19
+ '--spacing-8': 48,
20
+ };
21
+
22
+ describe('y2k spacing steps', () => {
23
+ const tokens = y2kTheme.tokens as Record<string, string>;
24
+ const spacingSteps = Object.entries(tokens).filter(([name]) =>
25
+ name.startsWith('--spacing-'),
26
+ );
27
+
28
+ it('are rem, so they follow the root font size', () => {
29
+ expect(spacingSteps.length).toBe(Object.keys(previousPx).length);
30
+ for (const [name, value] of spacingSteps) {
31
+ expect(value, name).toMatch(/^\d+(\.\d+)?rem$/);
32
+ }
33
+ });
34
+
35
+ it('keep their previous pixel values at the default 16px root', () => {
36
+ for (const [name, px] of Object.entries(previousPx)) {
37
+ expect(Number.parseFloat(tokens[name]) * ROOT_FONT_SIZE_PX, name).toBe(
38
+ px,
39
+ );
40
+ }
41
+ });
42
+ });
package/src/y2kTheme.ts CHANGED
@@ -63,16 +63,16 @@ export const y2kTheme = defineTheme({
63
63
  // =========================================================================
64
64
  // Spacing — comfortable preset (base=6)
65
65
  // =========================================================================
66
- '--spacing-0-5': '3px',
67
- '--spacing-1': '6px',
68
- '--spacing-1-5': '9px',
69
- '--spacing-2': '12px',
70
- '--spacing-3': '18px',
71
- '--spacing-4': '24px',
72
- '--spacing-5': '30px',
73
- '--spacing-6': '36px',
74
- '--spacing-7': '42px',
75
- '--spacing-8': '48px',
66
+ '--spacing-0-5': '0.1875rem',
67
+ '--spacing-1': '0.375rem',
68
+ '--spacing-1-5': '0.5625rem',
69
+ '--spacing-2': '0.75rem',
70
+ '--spacing-3': '1.125rem',
71
+ '--spacing-4': '1.5rem',
72
+ '--spacing-5': '1.875rem',
73
+ '--spacing-6': '2.25rem',
74
+ '--spacing-7': '2.625rem',
75
+ '--spacing-8': '3rem',
76
76
 
77
77
  // Size — comfortable preset
78
78
  '--size-element-sm': '32px',