@tamagui/cli 3.0.0-beta.806.1 → 3.0.0-beta.831.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/dist/migrate.cjs CHANGED
@@ -188,7 +188,7 @@ After:
188
188
  Search:
189
189
 
190
190
  \`\`\`bash
191
- rg "focusable|fullscreen|themeInverse|<Theme inverse|Sheet\\.Frame|styleable\\(|inlineWhenUnflattened|\\$true|getTokenRelative|stepTokenUpOrDown|forceRemoveScrollEnabled|sizeAdjust"
191
+ rg "focusable|fullscreen|themeInverse|<Theme inverse|Sheet\\.Frame|styleable\\(|inlineWhenUnflattened|\\$true|getTokenRelative|stepTokenUpOrDown|forceRemoveScrollEnabled|sizeAdjust|getExpandedShorthands|usePropsAndStyle|useProps|useStyle"
192
192
  \`\`\`
193
193
 
194
194
  Replace:
@@ -205,6 +205,27 @@ Replace:
205
205
  - old platform style keys -> flat \`web:\`, \`native:\`, \`ios:\`, and \`android:\` clauses.
206
206
  - \`forceRemoveScrollEnabled\` -> \`disableRemoveScroll\` with inverted intent.
207
207
  - \`createCheckbox\` \`sizeAdjust\` -> explicit sizing math or component styles.
208
+ - \`getExpandedShorthands\` -> \`getExpandedShorthand(key, props)\` when behavior code needs one authored prop and must accept its configured shorthand.
209
+ - \`useProps\`, \`useStyle\`, and \`usePropsAndStyle\` -> keep conditional values on styled Tamagui components; use \`splitStyleProps\` only when a wrapper must partition authored props.
210
+
211
+ V2 could spread one style across its base prop, pseudo-style objects, media
212
+ objects, and platform objects. The removed hooks gathered those separate
213
+ objects into resolved props and styles. V3 keeps every base and conditional
214
+ clause for a style on that style's single property, for example
215
+ \`opacity="1 hover:0.7 sm:0.8"\`. The styled component interprets that value,
216
+ so a wrapper should pass it through instead of flattening the component's
217
+ styles in JavaScript.
218
+
219
+ \`splitStyleProps(props)\` returns \`[styleProps, regularProps]\` in one pass.
220
+ Pass \`{ expandShorthands: true }\` to canonicalize selected keys. Its optional
221
+ filter map selects only those canonical keys, leaving rejected style props in
222
+ the second object. The filter may instead be a callback receiving
223
+ \`(key, value, originalKey, isStyleProp)\`.
224
+
225
+ \`getExpandedShorthand(key, props)\` only chooses the longhand or configured
226
+ shorthand for one property. It does not resolve tokens or select the active
227
+ clause. Neither does \`splitStyleProps\`. Use \`useMedia()\` or \`useTheme()\`
228
+ when behavior itself needs active responsive or theme state.
208
229
 
209
230
  ### 6. Replace true tokens
210
231
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/cli",
3
- "version": "3.0.0-beta.806.1",
3
+ "version": "3.0.0-beta.831.1",
4
4
  "bin": {
5
5
  "tama": "dist/index.cjs",
6
6
  "tamagui": "dist/index.cjs"
@@ -51,12 +51,12 @@
51
51
  "test:web": "bun run test"
52
52
  },
53
53
  "dependencies": {
54
- "@tamagui/generate-themes": "3.0.0-beta.806.1",
55
- "@tamagui/metro-plugin": "3.0.0-beta.806.1",
56
- "@tamagui/static": "3.0.0-beta.806.1",
57
- "@tamagui/to-tailwind": "3.0.0-beta.806.1",
58
- "@tamagui/types": "3.0.0-beta.806.1",
59
- "@tamagui/vite-plugin": "3.0.0-beta.806.1",
54
+ "@tamagui/generate-themes": "3.0.0-beta.831.1",
55
+ "@tamagui/metro-plugin": "3.0.0-beta.831.1",
56
+ "@tamagui/static": "3.0.0-beta.831.1",
57
+ "@tamagui/to-tailwind": "3.0.0-beta.831.1",
58
+ "@tamagui/types": "3.0.0-beta.831.1",
59
+ "@tamagui/vite-plugin": "3.0.0-beta.831.1",
60
60
  "arg": "^5.0.2",
61
61
  "chalk": "^4.1.2",
62
62
  "change-case": "^4.1.2",
@@ -75,10 +75,10 @@
75
75
  "ts-morph": "^28.0.0",
76
76
  "typescript": "~6.0.3",
77
77
  "url": "^0.11.0",
78
- "@tamagui/language-service": "3.0.0-beta.806.1"
78
+ "@tamagui/language-service": "3.0.0-beta.831.1"
79
79
  },
80
80
  "devDependencies": {
81
- "@tamagui/build": "3.0.0-beta.806.1",
81
+ "@tamagui/build": "3.0.0-beta.831.1",
82
82
  "@types/chokidar": "^2.1.3",
83
83
  "@types/marked": "^5.0.0",
84
84
  "vitest": "4.1.0"
package/src/migrate.ts CHANGED
@@ -172,7 +172,7 @@ After:
172
172
  Search:
173
173
 
174
174
  \`\`\`bash
175
- rg "focusable|fullscreen|themeInverse|<Theme inverse|Sheet\\.Frame|styleable\\(|inlineWhenUnflattened|\\$true|getTokenRelative|stepTokenUpOrDown|forceRemoveScrollEnabled|sizeAdjust"
175
+ rg "focusable|fullscreen|themeInverse|<Theme inverse|Sheet\\.Frame|styleable\\(|inlineWhenUnflattened|\\$true|getTokenRelative|stepTokenUpOrDown|forceRemoveScrollEnabled|sizeAdjust|getExpandedShorthands|usePropsAndStyle|useProps|useStyle"
176
176
  \`\`\`
177
177
 
178
178
  Replace:
@@ -189,6 +189,27 @@ Replace:
189
189
  - old platform style keys -> flat \`web:\`, \`native:\`, \`ios:\`, and \`android:\` clauses.
190
190
  - \`forceRemoveScrollEnabled\` -> \`disableRemoveScroll\` with inverted intent.
191
191
  - \`createCheckbox\` \`sizeAdjust\` -> explicit sizing math or component styles.
192
+ - \`getExpandedShorthands\` -> \`getExpandedShorthand(key, props)\` when behavior code needs one authored prop and must accept its configured shorthand.
193
+ - \`useProps\`, \`useStyle\`, and \`usePropsAndStyle\` -> keep conditional values on styled Tamagui components; use \`splitStyleProps\` only when a wrapper must partition authored props.
194
+
195
+ V2 could spread one style across its base prop, pseudo-style objects, media
196
+ objects, and platform objects. The removed hooks gathered those separate
197
+ objects into resolved props and styles. V3 keeps every base and conditional
198
+ clause for a style on that style's single property, for example
199
+ \`opacity="1 hover:0.7 sm:0.8"\`. The styled component interprets that value,
200
+ so a wrapper should pass it through instead of flattening the component's
201
+ styles in JavaScript.
202
+
203
+ \`splitStyleProps(props)\` returns \`[styleProps, regularProps]\` in one pass.
204
+ Pass \`{ expandShorthands: true }\` to canonicalize selected keys. Its optional
205
+ filter map selects only those canonical keys, leaving rejected style props in
206
+ the second object. The filter may instead be a callback receiving
207
+ \`(key, value, originalKey, isStyleProp)\`.
208
+
209
+ \`getExpandedShorthand(key, props)\` only chooses the longhand or configured
210
+ shorthand for one property. It does not resolve tokens or select the active
211
+ clause. Neither does \`splitStyleProps\`. Use \`useMedia()\` or \`useTheme()\`
212
+ when behavior itself needs active responsive or theme state.
192
213
 
193
214
  ### 6. Replace true tokens
194
215