@webority/tokens 0.129.0 → 0.130.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.
@@ -83,7 +83,50 @@
83
83
  "hint": "multiply the step size by leading.body, or by leading.heading for a heading"
84
84
  }
85
85
  ],
86
- "props": [],
86
+ "props": [
87
+ {
88
+ "package": "@webority/mobile-ui",
89
+ "props": ["tone", "variant", "iconTone", "avatarTone"],
90
+ "from": "error",
91
+ "to": "danger"
92
+ },
93
+ {
94
+ "package": "@webority/mobile-ui",
95
+ "props": ["elevation"],
96
+ "from": "xs",
97
+ "to": "card"
98
+ },
99
+ {
100
+ "package": "@webority/mobile-ui",
101
+ "props": ["elevation"],
102
+ "from": "sm",
103
+ "to": "card"
104
+ },
105
+ {
106
+ "package": "@webority/mobile-ui",
107
+ "props": ["elevation"],
108
+ "from": "md",
109
+ "to": "elevated"
110
+ },
111
+ {
112
+ "package": "@webority/mobile-ui",
113
+ "props": ["elevation"],
114
+ "from": "lg",
115
+ "to": "popover"
116
+ },
117
+ {
118
+ "package": "@webority/mobile-ui",
119
+ "props": ["elevation"],
120
+ "from": "xl",
121
+ "to": "modal"
122
+ },
123
+ {
124
+ "package": "@webority/mobile-ui",
125
+ "props": ["elevation"],
126
+ "from": "2xl",
127
+ "to": "modal"
128
+ }
129
+ ],
87
130
  "componentProps": [],
88
131
  "propValues": [],
89
132
  "propSplits": [],
@@ -37,8 +37,10 @@ export interface SourceRules {
37
37
  literals: [string, string][];
38
38
  /** Renames a property access `from` to `to`. When `receiver` is given, only where the object identifier matches the regular expression `receiver` (case-sensitive, whole identifier). */
39
39
  members: { from: string; to: string; receiver?: string }[];
40
- /** Regular expressions a person must resolve: each matching line is reported as a choose entry with `hint`. */
41
- flags: { pattern: string; hint: string }[];
40
+ /** Regular expressions a person must resolve: each matching line is reported as a choose entry with `hint`. When `importedFrom` is given, only in files that import that exact package name (an import of one of its subpaths does not count). */
41
+ flags: { pattern: string; hint: string; importedFrom?: string }[];
42
+ /** Names a package root stopped exporting; each import of one from exactly that specifier becomes a choose line. */
43
+ removedImports?: { package: string; names: string[]; hint: string }[];
42
44
  }
43
45
 
44
46
  /**
@@ -112,4 +114,27 @@ export interface RenameTable {
112
114
  razorTags?: RazorTagRule[];
113
115
  classes?: ClassRename[];
114
116
  markup?: MarkupRules;
117
+ valueSplits?: ValueSplitRule[];
118
+ razorValueSplits?: RazorValueSplitRule[];
119
+ }
120
+
121
+ /** A JSX prop whose one literal value becomes several props on the same element: `values` maps each old value to the props written in its place (a value of null drops the prop). Applies to the components' local names as imported from `package`. */
122
+ export interface ValueSplitRule {
123
+ package: string;
124
+ components: string[];
125
+ prop: string;
126
+ values: Readonly<Record<string, Readonly<Record<string, string | boolean | number | null>>>>;
127
+ /** A value in neither `values` nor `keep` is reported with this hint instead of rewritten. */
128
+ flag: string;
129
+ /** Values already in the new vocabulary: left as they are, with no finding. */
130
+ keep?: readonly string[];
131
+ }
132
+
133
+ /** The Razor twin: an attribute of the named tags whose value becomes several attributes. */
134
+ export interface RazorValueSplitRule {
135
+ tags: string[];
136
+ attribute: string;
137
+ values: Readonly<Record<string, Readonly<Record<string, string | null>>>>;
138
+ flag: string;
139
+ keep?: readonly string[];
115
140
  }