@astryxdesign/theme-matcha 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/matcha.js CHANGED
@@ -175,20 +175,20 @@ export const matchaTheme = {
175
175
  "--color-border-yellow": "light-dark(#FFB600, #ffc940)",
176
176
  "--color-icon-yellow": "light-dark(#FFB600, #ffc940)",
177
177
  "--color-text-yellow": "light-dark(#cc9200, #ffd960)",
178
- "--spacing-0-5": "3px",
179
- "--spacing-1": "6px",
180
- "--spacing-1-5": "9px",
181
- "--spacing-2": "12px",
182
- "--spacing-3": "18px",
183
- "--spacing-4": "24px",
184
- "--spacing-5": "30px",
185
- "--spacing-6": "36px",
186
- "--spacing-7": "42px",
187
- "--spacing-8": "48px",
188
- "--spacing-9": "54px",
189
- "--spacing-10": "60px",
190
- "--spacing-11": "66px",
191
- "--spacing-12": "72px",
178
+ "--spacing-0-5": "0.1875rem",
179
+ "--spacing-1": "0.375rem",
180
+ "--spacing-1-5": "0.5625rem",
181
+ "--spacing-2": "0.75rem",
182
+ "--spacing-3": "1.125rem",
183
+ "--spacing-4": "1.5rem",
184
+ "--spacing-5": "1.875rem",
185
+ "--spacing-6": "2.25rem",
186
+ "--spacing-7": "2.625rem",
187
+ "--spacing-8": "3rem",
188
+ "--spacing-9": "3.375rem",
189
+ "--spacing-10": "3.75rem",
190
+ "--spacing-11": "4.125rem",
191
+ "--spacing-12": "4.5rem",
192
192
  "--radius-inner": "6px",
193
193
  "--radius-element": "12px",
194
194
  "--radius-container": "18px",
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=matchaTheme.spacing.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"matchaTheme.spacing.test.d.ts","sourceRoot":"","sources":["../src/matchaTheme.spacing.test.ts"],"names":[],"mappings":""}
package/dist/source.js CHANGED
@@ -213,20 +213,20 @@ var matchaTheme = (0, import_theme.defineTheme)({
213
213
  // =========================================================================
214
214
  // Spacing
215
215
  // =========================================================================
216
- "--spacing-0-5": "3px",
217
- "--spacing-1": "6px",
218
- "--spacing-1-5": "9px",
219
- "--spacing-2": "12px",
220
- "--spacing-3": "18px",
221
- "--spacing-4": "24px",
222
- "--spacing-5": "30px",
223
- "--spacing-6": "36px",
224
- "--spacing-7": "42px",
225
- "--spacing-8": "48px",
226
- "--spacing-9": "54px",
227
- "--spacing-10": "60px",
228
- "--spacing-11": "66px",
229
- "--spacing-12": "72px",
216
+ "--spacing-0-5": "0.1875rem",
217
+ "--spacing-1": "0.375rem",
218
+ "--spacing-1-5": "0.5625rem",
219
+ "--spacing-2": "0.75rem",
220
+ "--spacing-3": "1.125rem",
221
+ "--spacing-4": "1.5rem",
222
+ "--spacing-5": "1.875rem",
223
+ "--spacing-6": "2.25rem",
224
+ "--spacing-7": "2.625rem",
225
+ "--spacing-8": "3rem",
226
+ "--spacing-9": "3.375rem",
227
+ "--spacing-10": "3.75rem",
228
+ "--spacing-11": "4.125rem",
229
+ "--spacing-12": "4.5rem",
230
230
  // =========================================================================
231
231
  // Radius — soft and rounded
232
232
  // =========================================================================
package/dist/source.mjs CHANGED
@@ -216,20 +216,20 @@ var matchaTheme = defineTheme({
216
216
  // =========================================================================
217
217
  // Spacing
218
218
  // =========================================================================
219
- "--spacing-0-5": "3px",
220
- "--spacing-1": "6px",
221
- "--spacing-1-5": "9px",
222
- "--spacing-2": "12px",
223
- "--spacing-3": "18px",
224
- "--spacing-4": "24px",
225
- "--spacing-5": "30px",
226
- "--spacing-6": "36px",
227
- "--spacing-7": "42px",
228
- "--spacing-8": "48px",
229
- "--spacing-9": "54px",
230
- "--spacing-10": "60px",
231
- "--spacing-11": "66px",
232
- "--spacing-12": "72px",
219
+ "--spacing-0-5": "0.1875rem",
220
+ "--spacing-1": "0.375rem",
221
+ "--spacing-1-5": "0.5625rem",
222
+ "--spacing-2": "0.75rem",
223
+ "--spacing-3": "1.125rem",
224
+ "--spacing-4": "1.5rem",
225
+ "--spacing-5": "1.875rem",
226
+ "--spacing-6": "2.25rem",
227
+ "--spacing-7": "2.625rem",
228
+ "--spacing-8": "3rem",
229
+ "--spacing-9": "3.375rem",
230
+ "--spacing-10": "3.75rem",
231
+ "--spacing-11": "4.125rem",
232
+ "--spacing-12": "4.5rem",
233
233
  // =========================================================================
234
234
  // Radius — soft and rounded
235
235
  // =========================================================================
package/dist/theme.css CHANGED
@@ -243,20 +243,20 @@
243
243
  --color-border-yellow: light-dark(#FFB600, #ffc940);
244
244
  --color-icon-yellow: light-dark(#FFB600, #ffc940);
245
245
  --color-text-yellow: light-dark(#cc9200, #ffd960);
246
- --spacing-0-5: 3px;
247
- --spacing-1: 6px;
248
- --spacing-1-5: 9px;
249
- --spacing-2: 12px;
250
- --spacing-3: 18px;
251
- --spacing-4: 24px;
252
- --spacing-5: 30px;
253
- --spacing-6: 36px;
254
- --spacing-7: 42px;
255
- --spacing-8: 48px;
256
- --spacing-9: 54px;
257
- --spacing-10: 60px;
258
- --spacing-11: 66px;
259
- --spacing-12: 72px;
246
+ --spacing-0-5: 0.1875rem;
247
+ --spacing-1: 0.375rem;
248
+ --spacing-1-5: 0.5625rem;
249
+ --spacing-2: 0.75rem;
250
+ --spacing-3: 1.125rem;
251
+ --spacing-4: 1.5rem;
252
+ --spacing-5: 1.875rem;
253
+ --spacing-6: 2.25rem;
254
+ --spacing-7: 2.625rem;
255
+ --spacing-8: 3rem;
256
+ --spacing-9: 3.375rem;
257
+ --spacing-10: 3.75rem;
258
+ --spacing-11: 4.125rem;
259
+ --spacing-12: 4.5rem;
260
260
  --radius-inner: 6px;
261
261
  --radius-element: 12px;
262
262
  --radius-container: 18px;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astryxdesign/theme-matcha",
3
- "version": "0.7.0-canary.f3a2181",
3
+ "version": "0.7.0",
4
4
  "private": false,
5
5
  "description": "Earthy greens with a calm, organic feel. Naturalistic and grounded, great for wellness or content-first apps.",
6
6
  "author": "Meta Open Source",
@@ -56,11 +56,11 @@
56
56
  "lucide-react": "^1.18.0"
57
57
  },
58
58
  "peerDependencies": {
59
- "@astryxdesign/core": "0.7.0-canary.f3a2181",
59
+ "@astryxdesign/core": "0.7.0",
60
60
  "react": ">=19"
61
61
  },
62
62
  "devDependencies": {
63
- "@astryxdesign/cli": "0.7.0-canary.f3a2181"
63
+ "@astryxdesign/cli": "0.7.0"
64
64
  },
65
65
  "module": "./dist/source.mjs",
66
66
  "scripts": {
@@ -0,0 +1,46 @@
1
+ // Copyright (c) Meta Platforms, Inc. and affiliates.
2
+
3
+ import {describe, expect, it} from 'vitest';
4
+ import {matchaTheme} from './matchaTheme';
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
+ '--spacing-9': 54,
21
+ '--spacing-10': 60,
22
+ '--spacing-11': 66,
23
+ '--spacing-12': 72,
24
+ };
25
+
26
+ describe('matcha spacing steps', () => {
27
+ const tokens = matchaTheme.tokens as Record<string, string>;
28
+ const spacingSteps = Object.entries(tokens).filter(([name]) =>
29
+ name.startsWith('--spacing-'),
30
+ );
31
+
32
+ it('are rem, so they follow the root font size', () => {
33
+ expect(spacingSteps.length).toBe(Object.keys(previousPx).length);
34
+ for (const [name, value] of spacingSteps) {
35
+ expect(value, name).toMatch(/^\d+(\.\d+)?rem$/);
36
+ }
37
+ });
38
+
39
+ it('keep their previous pixel values at the default 16px root', () => {
40
+ for (const [name, px] of Object.entries(previousPx)) {
41
+ expect(Number.parseFloat(tokens[name]) * ROOT_FONT_SIZE_PX, name).toBe(
42
+ px,
43
+ );
44
+ }
45
+ });
46
+ });
@@ -180,20 +180,20 @@ export const matchaTheme = defineTheme({
180
180
  // =========================================================================
181
181
  // Spacing
182
182
  // =========================================================================
183
- '--spacing-0-5': '3px',
184
- '--spacing-1': '6px',
185
- '--spacing-1-5': '9px',
186
- '--spacing-2': '12px',
187
- '--spacing-3': '18px',
188
- '--spacing-4': '24px',
189
- '--spacing-5': '30px',
190
- '--spacing-6': '36px',
191
- '--spacing-7': '42px',
192
- '--spacing-8': '48px',
193
- '--spacing-9': '54px',
194
- '--spacing-10': '60px',
195
- '--spacing-11': '66px',
196
- '--spacing-12': '72px',
183
+ '--spacing-0-5': '0.1875rem',
184
+ '--spacing-1': '0.375rem',
185
+ '--spacing-1-5': '0.5625rem',
186
+ '--spacing-2': '0.75rem',
187
+ '--spacing-3': '1.125rem',
188
+ '--spacing-4': '1.5rem',
189
+ '--spacing-5': '1.875rem',
190
+ '--spacing-6': '2.25rem',
191
+ '--spacing-7': '2.625rem',
192
+ '--spacing-8': '3rem',
193
+ '--spacing-9': '3.375rem',
194
+ '--spacing-10': '3.75rem',
195
+ '--spacing-11': '4.125rem',
196
+ '--spacing-12': '4.5rem',
197
197
 
198
198
  // =========================================================================
199
199
  // Radius — soft and rounded