@pantheon-systems/pds-design-tokens 2.0.0-alpha.55 → 2.0.0-alpha.57
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/build/css/variables.dark.css +6 -2
- package/build/css/variables.global.css +0 -1
- package/build/css/variables.light.css +4 -0
- package/build/figma/tokens.json +118 -19
- package/build/js/variables.global.d.ts +0 -1
- package/build/js/variables.global.js +0 -1
- package/build/json/tokens.json +0 -23
- package/codemods/v1-to-v2/README.md +203 -0
- package/codemods/v1-to-v2/generate-migration-guide.js +384 -0
- package/codemods/v1-to-v2/mappings.json +1645 -0
- package/codemods/v1-to-v2/validate.js +132 -0
- package/package.json +5 -3
|
@@ -314,16 +314,20 @@
|
|
|
314
314
|
--pds-color-dropdown-item-background-active: var(--pds-color-interactive-background-active);
|
|
315
315
|
--pds-color-dropdown-item-background-selected: var(--pds-color-interactive-background-hover);
|
|
316
316
|
--pds-color-dropdown-top-border: rgba(255, 255, 255, 0.00);
|
|
317
|
+
--pds-color-dropdown-separator: oklch(0.4091 0 0);
|
|
317
318
|
--pds-color-foreground-default: oklch(0.9702 0 0);
|
|
318
319
|
--pds-color-foreground-default-secondary: oklch(0.8452 0 0);
|
|
319
320
|
--pds-color-foreground-reverse: oklch(0.2178 0 0);
|
|
320
321
|
--pds-color-foreground-reverse-secondary: oklch(0.5173 0 0);
|
|
322
|
+
--pds-color-highlight-background: oklch(0.55 0.115 65);
|
|
323
|
+
--pds-color-highlight-foreground: oklch(0.9673 0 0);
|
|
321
324
|
--pds-color-input-placeholder: oklch(0.6830 0 0);
|
|
322
325
|
--pds-color-input-file-upload-button-background-default: oklch(0.2931 0 0);
|
|
323
326
|
--pds-color-input-file-upload-button-background-hover: oklch(0.3329 0 0);
|
|
324
327
|
--pds-color-input-selected-background: oklch(0.7049 0.1468 258.30);
|
|
325
|
-
--pds-color-input-selected-foreground: oklch(
|
|
326
|
-
--pds-color-input-switch-icon: oklch(0.
|
|
328
|
+
--pds-color-input-selected-foreground: oklch(0.2178 0 0);
|
|
329
|
+
--pds-color-input-switch-icon: oklch(0.2178 0 0);
|
|
330
|
+
--pds-color-input-switch-background: oklch(0.6830 0 0);
|
|
327
331
|
--pds-color-input-tag-background-default: oklch(0.38 0 0);
|
|
328
332
|
--pds-color-input-tag-background-hover: oklch(0.32 0 0);
|
|
329
333
|
--pds-color-input-tag-background-active: oklch(0.7049 0.1468 258.30);
|
|
@@ -73,7 +73,6 @@
|
|
|
73
73
|
--pds-spacing-button-gap-inline-l: var(--pds-spacing-xs);
|
|
74
74
|
--pds-spacing-input-height-s: var(--pds-spacing-2xl);
|
|
75
75
|
--pds-spacing-input-height-m: var(--pds-spacing-3xl);
|
|
76
|
-
--pds-spacing-input-height-l: var(--pds-spacing-4xl);
|
|
77
76
|
--pds-z-index-navigation: 100;
|
|
78
77
|
--pds-z-index-dropdown: 300;
|
|
79
78
|
--pds-z-index-notifications: 500;
|
|
@@ -314,16 +314,20 @@
|
|
|
314
314
|
--pds-color-dropdown-item-background-active: var(--pds-color-interactive-background-active);
|
|
315
315
|
--pds-color-dropdown-item-background-selected: var(--pds-color-interactive-background-hover);
|
|
316
316
|
--pds-color-dropdown-top-border: #dfdfdf;
|
|
317
|
+
--pds-color-dropdown-separator: oklch(0.9430 0 0);
|
|
317
318
|
--pds-color-foreground-default: oklch(0.2178 0 0);
|
|
318
319
|
--pds-color-foreground-default-secondary: oklch(0.5550 0.0020 247.86);
|
|
319
320
|
--pds-color-foreground-reverse: oklch(1.0000 0 0);
|
|
320
321
|
--pds-color-foreground-reverse-secondary: oklch(0.8452 0 0);
|
|
322
|
+
--pds-color-highlight-background: oklch(0.9 0.13 72);
|
|
323
|
+
--pds-color-highlight-foreground: oklch(0.2178 0 0);
|
|
321
324
|
--pds-color-input-placeholder: oklch(0.8047 0 0);
|
|
322
325
|
--pds-color-input-file-upload-button-background-default: oklch(0.9702 0 0);
|
|
323
326
|
--pds-color-input-file-upload-button-background-hover: oklch(0.9430 0 0);
|
|
324
327
|
--pds-color-input-selected-background: oklch(0.5256 0.1988 268.04);
|
|
325
328
|
--pds-color-input-selected-foreground: oklch(1.0000 0 0);
|
|
326
329
|
--pds-color-input-switch-icon: oklch(1.0000 0 0);
|
|
330
|
+
--pds-color-input-switch-background: oklch(0.5550 0.0020 247.86);
|
|
327
331
|
--pds-color-input-tag-background-default: oklch(0.907 0 0);
|
|
328
332
|
--pds-color-input-tag-background-hover: oklch(0.87 0 0);
|
|
329
333
|
--pds-color-input-tag-background-active: oklch(0.9559 0.0143 308.29);
|
package/build/figma/tokens.json
CHANGED
|
@@ -896,23 +896,6 @@
|
|
|
896
896
|
}
|
|
897
897
|
}
|
|
898
898
|
}
|
|
899
|
-
},
|
|
900
|
-
"l": {
|
|
901
|
-
"value": "{spacing.4XL}",
|
|
902
|
-
"type": "dimension",
|
|
903
|
-
"$extensions": {
|
|
904
|
-
"public": true,
|
|
905
|
-
"defaultUnit": "rem",
|
|
906
|
-
"com.figma": {
|
|
907
|
-
"scopes": [
|
|
908
|
-
"WIDTH_HEIGHT"
|
|
909
|
-
],
|
|
910
|
-
"exportAs": "variable",
|
|
911
|
-
"codeSyntax": {
|
|
912
|
-
"WEB": "--pds-spacing-input-height-l"
|
|
913
|
-
}
|
|
914
|
-
}
|
|
915
|
-
}
|
|
916
899
|
}
|
|
917
900
|
}
|
|
918
901
|
}
|
|
@@ -4426,6 +4409,20 @@
|
|
|
4426
4409
|
}
|
|
4427
4410
|
}
|
|
4428
4411
|
}
|
|
4412
|
+
},
|
|
4413
|
+
"separator": {
|
|
4414
|
+
"value": "{color.light-mode.neutral.300}",
|
|
4415
|
+
"type": "color",
|
|
4416
|
+
"$extensions": {
|
|
4417
|
+
"public": true,
|
|
4418
|
+
"resolveValue": true,
|
|
4419
|
+
"com.figma": {
|
|
4420
|
+
"exportAs": "variable",
|
|
4421
|
+
"codeSyntax": {
|
|
4422
|
+
"WEB": "--pds-color-dropdown-separator"
|
|
4423
|
+
}
|
|
4424
|
+
}
|
|
4425
|
+
}
|
|
4429
4426
|
}
|
|
4430
4427
|
},
|
|
4431
4428
|
"foreground": {
|
|
@@ -4486,6 +4483,36 @@
|
|
|
4486
4483
|
}
|
|
4487
4484
|
}
|
|
4488
4485
|
},
|
|
4486
|
+
"highlight": {
|
|
4487
|
+
"background": {
|
|
4488
|
+
"value": "#ffd078",
|
|
4489
|
+
"type": "color",
|
|
4490
|
+
"$extensions": {
|
|
4491
|
+
"public": true,
|
|
4492
|
+
"resolveValue": true,
|
|
4493
|
+
"com.figma": {
|
|
4494
|
+
"exportAs": "variable",
|
|
4495
|
+
"codeSyntax": {
|
|
4496
|
+
"WEB": "--pds-color-highlight-background"
|
|
4497
|
+
}
|
|
4498
|
+
}
|
|
4499
|
+
}
|
|
4500
|
+
},
|
|
4501
|
+
"foreground": {
|
|
4502
|
+
"value": "#1a1a1a",
|
|
4503
|
+
"type": "color",
|
|
4504
|
+
"$extensions": {
|
|
4505
|
+
"public": true,
|
|
4506
|
+
"resolveValue": true,
|
|
4507
|
+
"com.figma": {
|
|
4508
|
+
"exportAs": "variable",
|
|
4509
|
+
"codeSyntax": {
|
|
4510
|
+
"WEB": "--pds-color-highlight-foreground"
|
|
4511
|
+
}
|
|
4512
|
+
}
|
|
4513
|
+
}
|
|
4514
|
+
}
|
|
4515
|
+
},
|
|
4489
4516
|
"input": {
|
|
4490
4517
|
"placeholder": {
|
|
4491
4518
|
"value": "{color.light-mode.neutral.500}",
|
|
@@ -4579,6 +4606,20 @@
|
|
|
4579
4606
|
}
|
|
4580
4607
|
}
|
|
4581
4608
|
}
|
|
4609
|
+
},
|
|
4610
|
+
"background": {
|
|
4611
|
+
"value": "{color.light-mode.neutral.700}",
|
|
4612
|
+
"type": "color",
|
|
4613
|
+
"$extensions": {
|
|
4614
|
+
"public": true,
|
|
4615
|
+
"resolveValue": true,
|
|
4616
|
+
"com.figma": {
|
|
4617
|
+
"exportAs": "variable",
|
|
4618
|
+
"codeSyntax": {
|
|
4619
|
+
"WEB": "--pds-color-input-switch-background"
|
|
4620
|
+
}
|
|
4621
|
+
}
|
|
4622
|
+
}
|
|
4582
4623
|
}
|
|
4583
4624
|
},
|
|
4584
4625
|
"tag": {
|
|
@@ -12256,6 +12297,20 @@
|
|
|
12256
12297
|
}
|
|
12257
12298
|
}
|
|
12258
12299
|
}
|
|
12300
|
+
},
|
|
12301
|
+
"separator": {
|
|
12302
|
+
"value": "{color.dark-mode.neutral.500}",
|
|
12303
|
+
"type": "color",
|
|
12304
|
+
"$extensions": {
|
|
12305
|
+
"public": true,
|
|
12306
|
+
"resolveValue": true,
|
|
12307
|
+
"com.figma": {
|
|
12308
|
+
"exportAs": "variable",
|
|
12309
|
+
"codeSyntax": {
|
|
12310
|
+
"WEB": "--pds-color-dropdown-separator"
|
|
12311
|
+
}
|
|
12312
|
+
}
|
|
12313
|
+
}
|
|
12259
12314
|
}
|
|
12260
12315
|
},
|
|
12261
12316
|
"foreground": {
|
|
@@ -12316,6 +12371,36 @@
|
|
|
12316
12371
|
}
|
|
12317
12372
|
}
|
|
12318
12373
|
},
|
|
12374
|
+
"highlight": {
|
|
12375
|
+
"background": {
|
|
12376
|
+
"value": "#9f6116",
|
|
12377
|
+
"type": "color",
|
|
12378
|
+
"$extensions": {
|
|
12379
|
+
"public": true,
|
|
12380
|
+
"resolveValue": true,
|
|
12381
|
+
"com.figma": {
|
|
12382
|
+
"exportAs": "variable",
|
|
12383
|
+
"codeSyntax": {
|
|
12384
|
+
"WEB": "--pds-color-highlight-background"
|
|
12385
|
+
}
|
|
12386
|
+
}
|
|
12387
|
+
}
|
|
12388
|
+
},
|
|
12389
|
+
"foreground": {
|
|
12390
|
+
"value": "#f4f4f4",
|
|
12391
|
+
"type": "color",
|
|
12392
|
+
"$extensions": {
|
|
12393
|
+
"public": true,
|
|
12394
|
+
"resolveValue": true,
|
|
12395
|
+
"com.figma": {
|
|
12396
|
+
"exportAs": "variable",
|
|
12397
|
+
"codeSyntax": {
|
|
12398
|
+
"WEB": "--pds-color-highlight-foreground"
|
|
12399
|
+
}
|
|
12400
|
+
}
|
|
12401
|
+
}
|
|
12402
|
+
}
|
|
12403
|
+
},
|
|
12319
12404
|
"input": {
|
|
12320
12405
|
"placeholder": {
|
|
12321
12406
|
"value": "{color.dark-mode.neutral.700}",
|
|
@@ -12381,7 +12466,7 @@
|
|
|
12381
12466
|
}
|
|
12382
12467
|
},
|
|
12383
12468
|
"foreground": {
|
|
12384
|
-
"value": "
|
|
12469
|
+
"value": "{color.dark-mode.neutral.100}",
|
|
12385
12470
|
"type": "color",
|
|
12386
12471
|
"$extensions": {
|
|
12387
12472
|
"public": true,
|
|
@@ -12397,7 +12482,7 @@
|
|
|
12397
12482
|
},
|
|
12398
12483
|
"switch": {
|
|
12399
12484
|
"icon": {
|
|
12400
|
-
"value": "{color.dark-mode.neutral.
|
|
12485
|
+
"value": "{color.dark-mode.neutral.100}",
|
|
12401
12486
|
"type": "color",
|
|
12402
12487
|
"$extensions": {
|
|
12403
12488
|
"public": true,
|
|
@@ -12409,6 +12494,20 @@
|
|
|
12409
12494
|
}
|
|
12410
12495
|
}
|
|
12411
12496
|
}
|
|
12497
|
+
},
|
|
12498
|
+
"background": {
|
|
12499
|
+
"value": "{color.dark-mode.neutral.700}",
|
|
12500
|
+
"type": "color",
|
|
12501
|
+
"$extensions": {
|
|
12502
|
+
"public": true,
|
|
12503
|
+
"resolveValue": true,
|
|
12504
|
+
"com.figma": {
|
|
12505
|
+
"exportAs": "variable",
|
|
12506
|
+
"codeSyntax": {
|
|
12507
|
+
"WEB": "--pds-color-input-switch-background"
|
|
12508
|
+
}
|
|
12509
|
+
}
|
|
12510
|
+
}
|
|
12412
12511
|
}
|
|
12413
12512
|
},
|
|
12414
12513
|
"tag": {
|
|
@@ -80,7 +80,6 @@ export const SPACING_BUTTON_GAP_INLINE_M: string;
|
|
|
80
80
|
export const SPACING_BUTTON_GAP_INLINE_L: string;
|
|
81
81
|
export const SPACING_INPUT_HEIGHT_S: string;
|
|
82
82
|
export const SPACING_INPUT_HEIGHT_M: string;
|
|
83
|
-
export const SPACING_INPUT_HEIGHT_L: string;
|
|
84
83
|
export const TYPOGRAPHY_FONT_CSS_IMPORT: string;
|
|
85
84
|
export const Z_INDEX_NAVIGATION: number;
|
|
86
85
|
export const Z_INDEX_DROPDOWN: number;
|
|
@@ -80,7 +80,6 @@ export const SPACING_BUTTON_GAP_INLINE_M = "0.625rem";
|
|
|
80
80
|
export const SPACING_BUTTON_GAP_INLINE_L = "0.625rem";
|
|
81
81
|
export const SPACING_INPUT_HEIGHT_S = "2rem";
|
|
82
82
|
export const SPACING_INPUT_HEIGHT_M = "2.5rem";
|
|
83
|
-
export const SPACING_INPUT_HEIGHT_L = "3rem";
|
|
84
83
|
export const TYPOGRAPHY_FONT_CSS_IMPORT = "'https://fonts.googleapis.com/css2?family=IBM+Plex+Serif:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;1,100;1,200;1,300;1,400;1,500;1,600;1,700&family=Inter+Tight:ital,wght@0,100..900;1,100..900&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Source+Code+Pro:ital,wght@0,200..900;1,200..900&display=swap'";
|
|
85
84
|
export const Z_INDEX_NAVIGATION = 100;
|
|
86
85
|
export const Z_INDEX_DROPDOWN = 300;
|
package/build/json/tokens.json
CHANGED
|
@@ -1715,29 +1715,6 @@
|
|
|
1715
1715
|
"m"
|
|
1716
1716
|
],
|
|
1717
1717
|
"public": true
|
|
1718
|
-
},
|
|
1719
|
-
"l": {
|
|
1720
|
-
"value": "3",
|
|
1721
|
-
"filePath": "tokens/spacing/semantic/input.json",
|
|
1722
|
-
"isSource": true,
|
|
1723
|
-
"original": {
|
|
1724
|
-
"value": "{spacing.4XL}",
|
|
1725
|
-
"public": true
|
|
1726
|
-
},
|
|
1727
|
-
"name": "SpacingInputHeightL",
|
|
1728
|
-
"attributes": {
|
|
1729
|
-
"category": "spacing",
|
|
1730
|
-
"type": "input",
|
|
1731
|
-
"item": "height",
|
|
1732
|
-
"subitem": "l"
|
|
1733
|
-
},
|
|
1734
|
-
"path": [
|
|
1735
|
-
"spacing",
|
|
1736
|
-
"input",
|
|
1737
|
-
"height",
|
|
1738
|
-
"l"
|
|
1739
|
-
],
|
|
1740
|
-
"public": true
|
|
1741
1718
|
}
|
|
1742
1719
|
}
|
|
1743
1720
|
}
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
# v1 to v2 Migration Codemod
|
|
2
|
+
|
|
3
|
+
This directory contains the data and tooling for the automated migration from v1.x to v2.x of PDS Design Tokens.
|
|
4
|
+
|
|
5
|
+
**Status:** 📝 Data collection phase (Alpha)
|
|
6
|
+
|
|
7
|
+
The codemod itself will be built during the beta phase when the API is frozen.
|
|
8
|
+
|
|
9
|
+
## Contents
|
|
10
|
+
|
|
11
|
+
### `mappings.json`
|
|
12
|
+
|
|
13
|
+
**Purpose:** Machine-readable source of truth for all breaking changes
|
|
14
|
+
|
|
15
|
+
This file tracks:
|
|
16
|
+
- File path renames (CSS, JS)
|
|
17
|
+
- Token renames (direct 1:1 mappings)
|
|
18
|
+
- Token patterns (wildcards like `--pds-color-gradient-avatar-*`)
|
|
19
|
+
- Token removals (with optional replacement notes)
|
|
20
|
+
- Value format changes (e.g., decimal → percentage)
|
|
21
|
+
- Categories for grouping related changes
|
|
22
|
+
|
|
23
|
+
**When to update:**
|
|
24
|
+
- Every time you make a breaking change during alpha/beta
|
|
25
|
+
- Update this file FIRST, then auto-generate the migration guide
|
|
26
|
+
- This ensures consistency and makes codemod development easier
|
|
27
|
+
|
|
28
|
+
### `validate.js`
|
|
29
|
+
|
|
30
|
+
**Purpose:** Validates `mappings.json` for consistency
|
|
31
|
+
|
|
32
|
+
Checks for:
|
|
33
|
+
- Valid JSON structure
|
|
34
|
+
- No duplicate "from" tokens
|
|
35
|
+
- No duplicate removals
|
|
36
|
+
- All category references exist
|
|
37
|
+
- No conflicts (token in both renames and removals)
|
|
38
|
+
|
|
39
|
+
**Usage:**
|
|
40
|
+
```bash
|
|
41
|
+
# Direct
|
|
42
|
+
node codemods/v1-to-v2/validate.js
|
|
43
|
+
|
|
44
|
+
# Or via npm script
|
|
45
|
+
npm run validate:mappings
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Run this before committing changes to ensure data integrity.
|
|
49
|
+
|
|
50
|
+
### `generate-migration-guide.js`
|
|
51
|
+
|
|
52
|
+
**Purpose:** Auto-generates the Breaking Changes section of `guides/MIGRATION-v2.md` from `mappings.json`
|
|
53
|
+
|
|
54
|
+
Generates:
|
|
55
|
+
- Summary-style Breaking Changes with counts and categories
|
|
56
|
+
- Links to detailed Step-by-Step Migration sections
|
|
57
|
+
- Organized by: File Structure, Token Removals, Token Renames, Category Changes, Format Changes, New Features
|
|
58
|
+
|
|
59
|
+
**Usage:**
|
|
60
|
+
```bash
|
|
61
|
+
# Direct
|
|
62
|
+
node codemods/v1-to-v2/generate-migration-guide.js
|
|
63
|
+
|
|
64
|
+
# Or via npm script
|
|
65
|
+
npm run generate:migration
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Run this after updating `mappings.json` to keep the migration guide in sync.
|
|
69
|
+
|
|
70
|
+
## Workflow for Adding Breaking Changes
|
|
71
|
+
|
|
72
|
+
When you make a breaking change during alpha/beta:
|
|
73
|
+
|
|
74
|
+
### 1. Update `mappings.json`
|
|
75
|
+
|
|
76
|
+
**For a token rename:**
|
|
77
|
+
```json
|
|
78
|
+
{
|
|
79
|
+
"from": "--pds-old-token",
|
|
80
|
+
"to": "--pds-new-token",
|
|
81
|
+
"category": "animation"
|
|
82
|
+
}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Add to `tokens.renames` array.
|
|
86
|
+
|
|
87
|
+
**For a token removal:**
|
|
88
|
+
```json
|
|
89
|
+
{
|
|
90
|
+
"token": "--pds-removed-token",
|
|
91
|
+
"category": "color",
|
|
92
|
+
"replacement": null,
|
|
93
|
+
"note": "Optional note about why it was removed"
|
|
94
|
+
}
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Add to `tokens.removals` array.
|
|
98
|
+
|
|
99
|
+
**For a file rename:**
|
|
100
|
+
```json
|
|
101
|
+
{
|
|
102
|
+
"from": "build/css/old-file.css",
|
|
103
|
+
"to": "build/css/new-file.css",
|
|
104
|
+
"description": "Brief description"
|
|
105
|
+
}
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Add to `files.renames` array.
|
|
109
|
+
|
|
110
|
+
### 2. Validate the changes
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
npm run validate:mappings
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### 3. Generate migration guide
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
npm run generate:migration
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
This auto-generates a summary-style Breaking Changes section in `guides/MIGRATION-v2.md` from `mappings.json`. The summary includes counts, categories, and links to detailed step-by-step instructions.
|
|
123
|
+
|
|
124
|
+
### 4. Update CHANGELOG
|
|
125
|
+
|
|
126
|
+
Add entry to `CHANGELOG.mdx` with "BREAKING:" prefix.
|
|
127
|
+
|
|
128
|
+
### 5. Commit together
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
git add tokens/ codemods/v1-to-v2/mappings.json guides/MIGRATION-v2.md CHANGELOG.mdx
|
|
132
|
+
git commit -m "BREAKING: Description
|
|
133
|
+
|
|
134
|
+
- Specific change
|
|
135
|
+
- Updated mappings.json and auto-generated migration guide"
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
## Future: Codemod Implementation
|
|
139
|
+
|
|
140
|
+
**Timeline:** Build during beta phase (when API is frozen)
|
|
141
|
+
|
|
142
|
+
**Implementation plan:**
|
|
143
|
+
- Use [jscodeshift](https://github.com/facebook/jscodeshift) for JS/TS transformations
|
|
144
|
+
- Use [postcss](https://postcss.org/) for CSS/SCSS transformations
|
|
145
|
+
- Read from `mappings.json` for all transformation rules
|
|
146
|
+
- Provide dry-run mode to preview changes
|
|
147
|
+
- Generate report of:
|
|
148
|
+
- Automated changes (file renames, token renames)
|
|
149
|
+
- Manual review needed (removed tokens, value changes)
|
|
150
|
+
|
|
151
|
+
**Usage (future):**
|
|
152
|
+
```bash
|
|
153
|
+
npx @pantheon-systems/pds-design-tokens migrate v1-to-v2
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
## Categories
|
|
157
|
+
|
|
158
|
+
Current categories defined in `mappings.json`:
|
|
159
|
+
|
|
160
|
+
- **animation** - Animation and transition tokens
|
|
161
|
+
- **status-colors** - Status color tokens (info, success, warning, critical, discovery)
|
|
162
|
+
- **text-colors** - Text and foreground color tokens
|
|
163
|
+
- **typography** - Typography tokens (font families, sizes, etc.)
|
|
164
|
+
- **gradients** - Gradient tokens (moved from color category)
|
|
165
|
+
- **border** - Border width and offset tokens
|
|
166
|
+
- **color** - General color tokens
|
|
167
|
+
- **component** - Component-specific tokens
|
|
168
|
+
|
|
169
|
+
Add new categories as needed to keep changes organized.
|
|
170
|
+
|
|
171
|
+
## Validation Script Output
|
|
172
|
+
|
|
173
|
+
Example successful validation:
|
|
174
|
+
|
|
175
|
+
```
|
|
176
|
+
✅ mappings.json is valid JSON
|
|
177
|
+
✅ No duplicate 'from' tokens in renames (19 unique)
|
|
178
|
+
✅ No duplicate removal tokens (21 unique)
|
|
179
|
+
ℹ️ Valid categories: animation, status-colors, text-colors, typography, gradients, border, color, component
|
|
180
|
+
✅ All token categories are valid
|
|
181
|
+
✅ No conflicts between renames and removals
|
|
182
|
+
|
|
183
|
+
📊 Summary:
|
|
184
|
+
File renames: 3
|
|
185
|
+
Token renames: 19
|
|
186
|
+
Token patterns: 1
|
|
187
|
+
Token removals: 21
|
|
188
|
+
Value changes: 1
|
|
189
|
+
Categories: 8
|
|
190
|
+
|
|
191
|
+
✅ All validations passed!
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
## Notes
|
|
195
|
+
|
|
196
|
+
- **Patterns:** Use `isPattern: true` for wildcard tokens like `--pds-color-gradient-avatar-*`
|
|
197
|
+
- **Removals:** Set `replacement: null` for tokens removed without direct replacement
|
|
198
|
+
- **Value changes:** Document transformation logic (e.g., "multiply by 100, add %")
|
|
199
|
+
- **Keep synced:** `mappings.json` is the source of truth - migration guide reflects this data
|
|
200
|
+
|
|
201
|
+
---
|
|
202
|
+
|
|
203
|
+
For migration guide, see: `guides/MIGRATION-v2.md`
|