@tamagui/web 3.0.0-beta.1604.1 → 3.0.0-beta.1670.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.
Files changed (76) hide show
  1. package/dist/cjs/createComponent.native.cjs +1 -1
  2. package/dist/cjs/createComponent.native.js +1 -1
  3. package/dist/cjs/createComponent.native.js.map +1 -1
  4. package/dist/cjs/createTamagui.cjs +10 -8
  5. package/dist/cjs/createTamagui.native.cjs +10 -8
  6. package/dist/cjs/createTamagui.native.js +10 -8
  7. package/dist/cjs/createTamagui.native.js.map +1 -1
  8. package/dist/cjs/eventHandling.native.cjs +28 -4
  9. package/dist/cjs/eventHandling.native.js +28 -4
  10. package/dist/cjs/eventHandling.native.js.map +1 -1
  11. package/dist/cjs/helpers/getSplitStyles.cjs +5 -7
  12. package/dist/cjs/helpers/getSplitStyles.native.cjs +6 -8
  13. package/dist/cjs/helpers/getSplitStyles.native.js +6 -8
  14. package/dist/cjs/helpers/getSplitStyles.native.js.map +1 -1
  15. package/dist/cjs/helpers/proxyThemeToParents.cjs +2 -1
  16. package/dist/cjs/helpers/proxyThemeToParents.native.cjs +2 -1
  17. package/dist/cjs/helpers/proxyThemeToParents.native.js +2 -1
  18. package/dist/cjs/helpers/proxyThemeToParents.native.js.map +1 -1
  19. package/dist/cjs/helpers/themes.cjs +19 -11
  20. package/dist/cjs/helpers/themes.native.cjs +19 -11
  21. package/dist/cjs/helpers/themes.native.js +19 -11
  22. package/dist/cjs/helpers/themes.native.js.map +1 -1
  23. package/dist/cjs/hooks/useThemeState.cjs +9 -19
  24. package/dist/cjs/hooks/useThemeState.native.cjs +16 -22
  25. package/dist/cjs/hooks/useThemeState.native.js +16 -22
  26. package/dist/cjs/hooks/useThemeState.native.js.map +1 -1
  27. package/dist/cjs/internal-runtime.cjs +2 -0
  28. package/dist/cjs/internal-runtime.native.cjs +2 -0
  29. package/dist/cjs/internal-runtime.native.js +2 -0
  30. package/dist/cjs/internal-runtime.native.js.map +1 -1
  31. package/dist/esm/createComponent.native.js +1 -1
  32. package/dist/esm/createComponent.native.js.map +1 -1
  33. package/dist/esm/createTamagui.mjs +11 -9
  34. package/dist/esm/createTamagui.mjs.map +1 -1
  35. package/dist/esm/createTamagui.native.js +11 -9
  36. package/dist/esm/createTamagui.native.js.map +1 -1
  37. package/dist/esm/eventHandling.native.js +28 -4
  38. package/dist/esm/eventHandling.native.js.map +1 -1
  39. package/dist/esm/helpers/getSplitStyles.mjs +5 -7
  40. package/dist/esm/helpers/getSplitStyles.mjs.map +1 -1
  41. package/dist/esm/helpers/getSplitStyles.native.js +6 -8
  42. package/dist/esm/helpers/getSplitStyles.native.js.map +1 -1
  43. package/dist/esm/helpers/proxyThemeToParents.mjs +3 -1
  44. package/dist/esm/helpers/proxyThemeToParents.mjs.map +1 -1
  45. package/dist/esm/helpers/proxyThemeToParents.native.js +3 -1
  46. package/dist/esm/helpers/proxyThemeToParents.native.js.map +1 -1
  47. package/dist/esm/helpers/themes.mjs +15 -11
  48. package/dist/esm/helpers/themes.mjs.map +1 -1
  49. package/dist/esm/helpers/themes.native.js +15 -11
  50. package/dist/esm/helpers/themes.native.js.map +1 -1
  51. package/dist/esm/hooks/useThemeState.mjs +8 -20
  52. package/dist/esm/hooks/useThemeState.mjs.map +1 -1
  53. package/dist/esm/hooks/useThemeState.native.js +16 -22
  54. package/dist/esm/hooks/useThemeState.native.js.map +1 -1
  55. package/dist/esm/internal-runtime.mjs +3 -2
  56. package/dist/esm/internal-runtime.mjs.map +1 -1
  57. package/dist/esm/internal-runtime.native.js +3 -2
  58. package/dist/esm/internal-runtime.native.js.map +1 -1
  59. package/package.json +17 -17
  60. package/src/createComponent.tsx +1 -1
  61. package/src/createTamagui.ts +17 -21
  62. package/src/eventHandling.native.ts +24 -3
  63. package/src/helpers/getSplitStyles.tsx +13 -8
  64. package/src/helpers/proxyThemeToParents.ts +2 -1
  65. package/src/helpers/themes.ts +17 -11
  66. package/src/hooks/useThemeState.ts +15 -35
  67. package/src/internal-runtime.ts +6 -1
  68. package/types/createTamagui.d.ts.map +1 -1
  69. package/types/eventHandling.native.d.ts.map +1 -1
  70. package/types/helpers/getSplitStyles.d.ts.map +1 -1
  71. package/types/helpers/proxyThemeToParents.d.ts.map +1 -1
  72. package/types/helpers/themes.d.ts +2 -0
  73. package/types/helpers/themes.d.ts.map +1 -1
  74. package/types/hooks/useThemeState.d.ts.map +1 -1
  75. package/types/internal-runtime.d.ts +1 -0
  76. package/types/internal-runtime.d.ts.map +1 -1
@@ -7,7 +7,7 @@ import { styleToCSS as styleToCSS$1 } from "./helpers/styleToCSS.mjs";
7
7
  import { getThemeCSSRules as getThemeCSSRules$1 } from "./helpers/getThemeCSSRules.mjs";
8
8
  import { normalizeValueWithProperty as normalizeValueWithProperty$1 } from "./helpers/normalizeValueWithProperty.mjs";
9
9
  import { proxyThemeToParents as proxyThemeToParents$1 } from "./helpers/proxyThemeToParents.mjs";
10
- import { ensureThemeVariable as ensureThemeVariable$1 } from "./helpers/themes.mjs";
10
+ import { copyAuthoredThemeScheme as copyAuthoredThemeScheme$1, ensureThemeVariable as ensureThemeVariable$1 } from "./helpers/themes.mjs";
11
11
  import { transformsToString as transformsToString$1 } from "./helpers/transformsToString.mjs";
12
12
  import { parseFont as parseFont$1, registerFontVariables as registerFontVariables$1 } from "./insertFont.mjs";
13
13
  import { createTamagui as createTamagui$1 } from "./createTamagui.mjs";
@@ -27,6 +27,7 @@ const getThemeCSSRules = getThemeCSSRules$1;
27
27
  const normalizeValueWithProperty = normalizeValueWithProperty$1;
28
28
  const proxyThemeToParents = proxyThemeToParents$1;
29
29
  const ensureThemeVariable = ensureThemeVariable$1;
30
+ const copyAuthoredThemeScheme = copyAuthoredThemeScheme$1;
30
31
  const transformsToString = transformsToString$1;
31
32
  const styleToCSS = styleToCSS$1;
32
33
  const useThemeWithState = useThemeWithState$1;
@@ -79,5 +80,5 @@ function createFrontendHTML(frontend) {
79
80
  return out;
80
81
  }
81
82
 
82
- export { TamaguiProvider, createFrontendHTML, createFrontendStyled, createFrontendViews, createTamagui, createVariables, ensureThemeVariable, fixStyles, getThemeCSSRules, mergeFrontendCondition, normalizeValueWithProperty, parseFont, plainValueToPayload, proxyThemeToParents, registerFontVariables, regularStyleFrontend, setupHooks, styleToCSS, transformsToString, useThemeWithState };
83
+ export { TamaguiProvider, copyAuthoredThemeScheme, createFrontendHTML, createFrontendStyled, createFrontendViews, createTamagui, createVariables, ensureThemeVariable, fixStyles, getThemeCSSRules, mergeFrontendCondition, normalizeValueWithProperty, parseFont, plainValueToPayload, proxyThemeToParents, registerFontVariables, regularStyleFrontend, setupHooks, styleToCSS, transformsToString, useThemeWithState };
83
84
  //# sourceMappingURL=internal-runtime.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"internal-runtime.js","names":["createVariablesImpl","parseFontImpl","registerFontVariablesImpl","fixStylesImpl","getThemeCSSRulesImpl","normalizeValueWithPropertyImpl","proxyThemeToParentsImpl","ensureThemeVariableImpl","transformsToStringImpl","styleToCSSImpl","useThemeWithStateImpl","createTamaguiImpl","setupHooksImpl","TamaguiProviderImpl","createFrontendStyledImpl"],"sources":["esm/internal-runtime.js"],"sourcesContent":["import { stylePropsUnitless } from \"@tamagui/helpers\";\nimport { createComponent } from \"./createComponent\";\nimport { createVariables as createVariablesImpl } from \"./createVariables\";\nimport { html } from \"./dom/html\";\nimport { fixStyles as fixStylesImpl } from \"./helpers/expandStyles\";\nimport { styleToCSS as styleToCSSImpl } from \"./helpers/styleToCSS\";\nimport { getThemeCSSRules as getThemeCSSRulesImpl } from \"./helpers/getThemeCSSRules\";\nimport { normalizeValueWithProperty as normalizeValueWithPropertyImpl } from \"./helpers/normalizeValueWithProperty\";\nimport { proxyThemeToParents as proxyThemeToParentsImpl } from \"./helpers/proxyThemeToParents\";\nimport { ensureThemeVariable as ensureThemeVariableImpl } from \"./helpers/themes\";\nimport { transformsToString as transformsToStringImpl } from \"./helpers/transformsToString\";\nimport {\n parseFont as parseFontImpl,\n registerFontVariables as registerFontVariablesImpl\n} from \"./insertFont\";\nimport { createTamagui as createTamaguiImpl } from \"./createTamagui\";\nimport { setupHooks as setupHooksImpl } from \"./setupHooks\";\nimport { createFrontendStyled as createFrontendStyledImpl } from \"./styled\";\nimport { useThemeWithState as useThemeWithStateImpl } from \"./hooks/useTheme\";\nimport { TamaguiProvider as TamaguiProviderImpl } from \"./views/TamaguiProvider\";\nimport { textStaticConfig } from \"./views/Text\";\nimport { viewStaticConfig } from \"./views/View\";\nimport { mergeFrontendCondition, regularStyleFrontend } from \"./helpers/styleFrontend\";\nconst createVariables = createVariablesImpl;\nconst parseFont = parseFontImpl;\nconst registerFontVariables = registerFontVariablesImpl;\nconst fixStyles = fixStylesImpl;\nconst getThemeCSSRules = getThemeCSSRulesImpl;\nconst normalizeValueWithProperty = normalizeValueWithPropertyImpl;\nconst proxyThemeToParents = proxyThemeToParentsImpl;\nconst ensureThemeVariable = ensureThemeVariableImpl;\nconst transformsToString = transformsToStringImpl;\nconst styleToCSS = styleToCSSImpl;\nconst useThemeWithState = useThemeWithStateImpl;\nconst plainValueToPayload = (value, property) => {\n if (typeof value === \"string\") return value;\n if (typeof value !== \"number\" || !Number.isFinite(value)) return null;\n if (property === \"rotate\" || property === \"rotateX\" || property === \"rotateY\" || property === \"rotateZ\") {\n return value === 0 ? \"0\" : `${value}deg`;\n }\n if (property === \"x\" || property === \"y\" || property === \"perspective\" || property === \"translateX\" || property === \"translateY\") {\n return value === 0 ? \"0\" : `${value}px`;\n }\n return stylePropsUnitless[property] ? String(value) : `${value}px`;\n};\nconst createTamagui = createTamaguiImpl;\nconst setupHooks = setupHooksImpl;\nconst TamaguiProvider = TamaguiProviderImpl;\nfunction createFrontendStyled(frontend) {\n return createFrontendStyledImpl(frontend);\n}\nfunction createFrontendViews(frontend) {\n return {\n View: createComponent({\n ...viewStaticConfig,\n styleFrontend: frontend,\n displayName: \"View\"\n }),\n Text: createComponent({\n ...textStaticConfig,\n styleFrontend: frontend,\n displayName: \"Text\"\n })\n };\n}\nfunction createFrontendHTML(frontend) {\n const out = {};\n for (const tag in html) {\n const source = html[tag];\n if (!source.staticConfig) {\n out[tag] = source;\n continue;\n }\n const rebuilt = createComponent({\n ...source.staticConfig,\n styleFrontend: frontend,\n displayName: tag\n });\n out[tag] = source.rebindDOMTag ? source.rebindDOMTag(rebuilt) : rebuilt;\n }\n return out;\n}\nexport {\n TamaguiProvider,\n createFrontendHTML,\n createFrontendStyled,\n createFrontendViews,\n createTamagui,\n createVariables,\n ensureThemeVariable,\n fixStyles,\n getThemeCSSRules,\n mergeFrontendCondition,\n normalizeValueWithProperty,\n parseFont,\n plainValueToPayload,\n proxyThemeToParents,\n registerFontVariables,\n regularStyleFrontend,\n setupHooks,\n styleToCSS,\n transformsToString,\n useThemeWithState\n};\n//# sourceMappingURL=internal-runtime.js.map\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAuBA,MAAM,kBAAkBA;AACxB,MAAM,YAAYC;AAClB,MAAM,wBAAwBC;AAC9B,MAAM,YAAYC;AAClB,MAAM,mBAAmBC;AACzB,MAAM,6BAA6BC;AACnC,MAAM,sBAAsBC;AAC5B,MAAM,sBAAsBC;AAC5B,MAAM,qBAAqBC;AAC3B,MAAM,aAAaC;AACnB,MAAM,oBAAoBC;AAC1B,MAAM,uBAAuB,OAAO,aAAa;CAC/C,IAAI,OAAO,UAAU,UAAU,OAAO;CACtC,IAAI,OAAO,UAAU,YAAY,CAAC,OAAO,SAAS,KAAK,GAAG,OAAO;CACjE,IAAI,aAAa,YAAY,aAAa,aAAa,aAAa,aAAa,aAAa,WAAW;EACvG,OAAO,UAAU,IAAI,MAAM,GAAG,MAAM;CACtC;CACA,IAAI,aAAa,OAAO,aAAa,OAAO,aAAa,iBAAiB,aAAa,gBAAgB,aAAa,cAAc;EAChI,OAAO,UAAU,IAAI,MAAM,GAAG,MAAM;CACtC;CACA,OAAO,mBAAmB,YAAY,OAAO,KAAK,IAAI,GAAG,MAAM;AACjE;AACA,MAAM,gBAAgBC;AACtB,MAAM,aAAaC;AACnB,MAAM,kBAAkBC;AACxB,SAAS,qBAAqB,UAAU;CACtC,OAAOC,uBAAyB,QAAQ;AAC1C;AACA,SAAS,oBAAoB,UAAU;CACrC,OAAO;EACL,MAAM,gBAAgB;GACpB,GAAG;GACH,eAAe;GACf,aAAa;EACf,CAAC;EACD,MAAM,gBAAgB;GACpB,GAAG;GACH,eAAe;GACf,aAAa;EACf,CAAC;CACH;AACF;AACA,SAAS,mBAAmB,UAAU;CACpC,MAAM,MAAM,CAAC;CACb,KAAK,MAAM,OAAO,MAAM;EACtB,MAAM,SAAS,KAAK;EACpB,IAAI,CAAC,OAAO,cAAc;GACxB,IAAI,OAAO;GACX;EACF;EACA,MAAM,UAAU,gBAAgB;GAC9B,GAAG,OAAO;GACV,eAAe;GACf,aAAa;EACf,CAAC;EACD,IAAI,OAAO,OAAO,eAAe,OAAO,aAAa,OAAO,IAAI;CAClE;CACA,OAAO;AACT"}
1
+ {"version":3,"file":"internal-runtime.js","names":["createVariablesImpl","parseFontImpl","registerFontVariablesImpl","fixStylesImpl","getThemeCSSRulesImpl","normalizeValueWithPropertyImpl","proxyThemeToParentsImpl","ensureThemeVariableImpl","copyAuthoredThemeSchemeImpl","transformsToStringImpl","styleToCSSImpl","useThemeWithStateImpl","createTamaguiImpl","setupHooksImpl","TamaguiProviderImpl","createFrontendStyledImpl"],"sources":["esm/internal-runtime.js"],"sourcesContent":["import { stylePropsUnitless } from \"@tamagui/helpers\";\nimport { createComponent } from \"./createComponent\";\nimport { createVariables as createVariablesImpl } from \"./createVariables\";\nimport { html } from \"./dom/html\";\nimport { fixStyles as fixStylesImpl } from \"./helpers/expandStyles\";\nimport { styleToCSS as styleToCSSImpl } from \"./helpers/styleToCSS\";\nimport { getThemeCSSRules as getThemeCSSRulesImpl } from \"./helpers/getThemeCSSRules\";\nimport { normalizeValueWithProperty as normalizeValueWithPropertyImpl } from \"./helpers/normalizeValueWithProperty\";\nimport { proxyThemeToParents as proxyThemeToParentsImpl } from \"./helpers/proxyThemeToParents\";\nimport {\n copyAuthoredThemeScheme as copyAuthoredThemeSchemeImpl,\n ensureThemeVariable as ensureThemeVariableImpl\n} from \"./helpers/themes\";\nimport { transformsToString as transformsToStringImpl } from \"./helpers/transformsToString\";\nimport {\n parseFont as parseFontImpl,\n registerFontVariables as registerFontVariablesImpl\n} from \"./insertFont\";\nimport { createTamagui as createTamaguiImpl } from \"./createTamagui\";\nimport { setupHooks as setupHooksImpl } from \"./setupHooks\";\nimport { createFrontendStyled as createFrontendStyledImpl } from \"./styled\";\nimport { useThemeWithState as useThemeWithStateImpl } from \"./hooks/useTheme\";\nimport { TamaguiProvider as TamaguiProviderImpl } from \"./views/TamaguiProvider\";\nimport { textStaticConfig } from \"./views/Text\";\nimport { viewStaticConfig } from \"./views/View\";\nimport { mergeFrontendCondition, regularStyleFrontend } from \"./helpers/styleFrontend\";\nconst createVariables = createVariablesImpl;\nconst parseFont = parseFontImpl;\nconst registerFontVariables = registerFontVariablesImpl;\nconst fixStyles = fixStylesImpl;\nconst getThemeCSSRules = getThemeCSSRulesImpl;\nconst normalizeValueWithProperty = normalizeValueWithPropertyImpl;\nconst proxyThemeToParents = proxyThemeToParentsImpl;\nconst ensureThemeVariable = ensureThemeVariableImpl;\nconst copyAuthoredThemeScheme = copyAuthoredThemeSchemeImpl;\nconst transformsToString = transformsToStringImpl;\nconst styleToCSS = styleToCSSImpl;\nconst useThemeWithState = useThemeWithStateImpl;\nconst plainValueToPayload = (value, property) => {\n if (typeof value === \"string\") return value;\n if (typeof value !== \"number\" || !Number.isFinite(value)) return null;\n if (property === \"rotate\" || property === \"rotateX\" || property === \"rotateY\" || property === \"rotateZ\") {\n return value === 0 ? \"0\" : `${value}deg`;\n }\n if (property === \"x\" || property === \"y\" || property === \"perspective\" || property === \"translateX\" || property === \"translateY\") {\n return value === 0 ? \"0\" : `${value}px`;\n }\n return stylePropsUnitless[property] ? String(value) : `${value}px`;\n};\nconst createTamagui = createTamaguiImpl;\nconst setupHooks = setupHooksImpl;\nconst TamaguiProvider = TamaguiProviderImpl;\nfunction createFrontendStyled(frontend) {\n return createFrontendStyledImpl(frontend);\n}\nfunction createFrontendViews(frontend) {\n return {\n View: createComponent({\n ...viewStaticConfig,\n styleFrontend: frontend,\n displayName: \"View\"\n }),\n Text: createComponent({\n ...textStaticConfig,\n styleFrontend: frontend,\n displayName: \"Text\"\n })\n };\n}\nfunction createFrontendHTML(frontend) {\n const out = {};\n for (const tag in html) {\n const source = html[tag];\n if (!source.staticConfig) {\n out[tag] = source;\n continue;\n }\n const rebuilt = createComponent({\n ...source.staticConfig,\n styleFrontend: frontend,\n displayName: tag\n });\n out[tag] = source.rebindDOMTag ? source.rebindDOMTag(rebuilt) : rebuilt;\n }\n return out;\n}\nexport {\n TamaguiProvider,\n copyAuthoredThemeScheme,\n createFrontendHTML,\n createFrontendStyled,\n createFrontendViews,\n createTamagui,\n createVariables,\n ensureThemeVariable,\n fixStyles,\n getThemeCSSRules,\n mergeFrontendCondition,\n normalizeValueWithProperty,\n parseFont,\n plainValueToPayload,\n proxyThemeToParents,\n registerFontVariables,\n regularStyleFrontend,\n setupHooks,\n styleToCSS,\n transformsToString,\n useThemeWithState\n};\n//# sourceMappingURL=internal-runtime.js.map\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA0BA,MAAM,kBAAkBA;AACxB,MAAM,YAAYC;AAClB,MAAM,wBAAwBC;AAC9B,MAAM,YAAYC;AAClB,MAAM,mBAAmBC;AACzB,MAAM,6BAA6BC;AACnC,MAAM,sBAAsBC;AAC5B,MAAM,sBAAsBC;AAC5B,MAAM,0BAA0BC;AAChC,MAAM,qBAAqBC;AAC3B,MAAM,aAAaC;AACnB,MAAM,oBAAoBC;AAC1B,MAAM,uBAAuB,OAAO,aAAa;CAC/C,IAAI,OAAO,UAAU,UAAU,OAAO;CACtC,IAAI,OAAO,UAAU,YAAY,CAAC,OAAO,SAAS,KAAK,GAAG,OAAO;CACjE,IAAI,aAAa,YAAY,aAAa,aAAa,aAAa,aAAa,aAAa,WAAW;EACvG,OAAO,UAAU,IAAI,MAAM,GAAG,MAAM;CACtC;CACA,IAAI,aAAa,OAAO,aAAa,OAAO,aAAa,iBAAiB,aAAa,gBAAgB,aAAa,cAAc;EAChI,OAAO,UAAU,IAAI,MAAM,GAAG,MAAM;CACtC;CACA,OAAO,mBAAmB,YAAY,OAAO,KAAK,IAAI,GAAG,MAAM;AACjE;AACA,MAAM,gBAAgBC;AACtB,MAAM,aAAaC;AACnB,MAAM,kBAAkBC;AACxB,SAAS,qBAAqB,UAAU;CACtC,OAAOC,uBAAyB,QAAQ;AAC1C;AACA,SAAS,oBAAoB,UAAU;CACrC,OAAO;EACL,MAAM,gBAAgB;GACpB,GAAG;GACH,eAAe;GACf,aAAa;EACf,CAAC;EACD,MAAM,gBAAgB;GACpB,GAAG;GACH,eAAe;GACf,aAAa;EACf,CAAC;CACH;AACF;AACA,SAAS,mBAAmB,UAAU;CACpC,MAAM,MAAM,CAAC;CACb,KAAK,MAAM,OAAO,MAAM;EACtB,MAAM,SAAS,KAAK;EACpB,IAAI,CAAC,OAAO,cAAc;GACxB,IAAI,OAAO;GACX;EACF;EACA,MAAM,UAAU,gBAAgB;GAC9B,GAAG,OAAO;GACV,eAAe;GACf,aAAa;EACf,CAAC;EACD,IAAI,OAAO,OAAO,eAAe,OAAO,aAAa,OAAO,IAAI;CAClE;CACA,OAAO;AACT"}
@@ -7,7 +7,7 @@ import { styleToCSS as styleToCSS$1 } from "./helpers/styleToCSS.native.js";
7
7
  import { getThemeCSSRules as getThemeCSSRules$1 } from "./helpers/getThemeCSSRules.native.js";
8
8
  import { normalizeValueWithProperty as normalizeValueWithProperty$1 } from "./helpers/normalizeValueWithProperty.native.js";
9
9
  import { proxyThemeToParents as proxyThemeToParents$1 } from "./helpers/proxyThemeToParents.native.js";
10
- import { ensureThemeVariable as ensureThemeVariable$1 } from "./helpers/themes.native.js";
10
+ import { copyAuthoredThemeScheme as copyAuthoredThemeScheme$1, ensureThemeVariable as ensureThemeVariable$1 } from "./helpers/themes.native.js";
11
11
  import { transformsToString as transformsToString$1 } from "./helpers/transformsToString.native.js";
12
12
  import { parseFont as parseFont$1, registerFontVariables as registerFontVariables$1 } from "./insertFont.native.js";
13
13
  import { createTamagui as createTamagui$1 } from "./createTamagui.native.js";
@@ -27,6 +27,7 @@ var getThemeCSSRules = getThemeCSSRules$1;
27
27
  var normalizeValueWithProperty = normalizeValueWithProperty$1;
28
28
  var proxyThemeToParents = proxyThemeToParents$1;
29
29
  var ensureThemeVariable = ensureThemeVariable$1;
30
+ var copyAuthoredThemeScheme = copyAuthoredThemeScheme$1;
30
31
  var transformsToString = transformsToString$1;
31
32
  var styleToCSS = styleToCSS$1;
32
33
  var useThemeWithState = useThemeWithState$1;
@@ -79,5 +80,5 @@ function createFrontendHTML(frontend) {
79
80
  return out;
80
81
  }
81
82
 
82
- export { TamaguiProvider, createFrontendHTML, createFrontendStyled, createFrontendViews, createTamagui, createVariables, ensureThemeVariable, fixStyles, getThemeCSSRules, mergeFrontendCondition, normalizeValueWithProperty, parseFont, plainValueToPayload, proxyThemeToParents, registerFontVariables, regularStyleFrontend, setupHooks, styleToCSS, transformsToString, useThemeWithState };
83
+ export { TamaguiProvider, copyAuthoredThemeScheme, createFrontendHTML, createFrontendStyled, createFrontendViews, createTamagui, createVariables, ensureThemeVariable, fixStyles, getThemeCSSRules, mergeFrontendCondition, normalizeValueWithProperty, parseFont, plainValueToPayload, proxyThemeToParents, registerFontVariables, regularStyleFrontend, setupHooks, styleToCSS, transformsToString, useThemeWithState };
83
84
  //# sourceMappingURL=internal-runtime.native.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"internal-runtime.native.js","names":["createVariablesImpl","parseFontImpl","registerFontVariablesImpl","fixStylesImpl","getThemeCSSRulesImpl","normalizeValueWithPropertyImpl","proxyThemeToParentsImpl","ensureThemeVariableImpl","transformsToStringImpl","styleToCSSImpl","useThemeWithStateImpl","createTamaguiImpl","setupHooksImpl","TamaguiProviderImpl","createFrontendStyledImpl"],"sources":["esm/internal-runtime.native.js"],"sourcesContent":["import { stylePropsUnitless } from \"@tamagui/helpers\";\nimport { createComponent } from \"./createComponent\";\nimport { createVariables as createVariablesImpl } from \"./createVariables\";\nimport { html } from \"./dom/html\";\nimport { fixStyles as fixStylesImpl } from \"./helpers/expandStyles\";\nimport { styleToCSS as styleToCSSImpl } from \"./helpers/styleToCSS\";\nimport { getThemeCSSRules as getThemeCSSRulesImpl } from \"./helpers/getThemeCSSRules\";\nimport { normalizeValueWithProperty as normalizeValueWithPropertyImpl } from \"./helpers/normalizeValueWithProperty\";\nimport { proxyThemeToParents as proxyThemeToParentsImpl } from \"./helpers/proxyThemeToParents\";\nimport { ensureThemeVariable as ensureThemeVariableImpl } from \"./helpers/themes\";\nimport { transformsToString as transformsToStringImpl } from \"./helpers/transformsToString\";\nimport { parseFont as parseFontImpl, registerFontVariables as registerFontVariablesImpl } from \"./insertFont\";\nimport { createTamagui as createTamaguiImpl } from \"./createTamagui\";\nimport { setupHooks as setupHooksImpl } from \"./setupHooks\";\nimport { createFrontendStyled as createFrontendStyledImpl } from \"./styled\";\nimport { useThemeWithState as useThemeWithStateImpl } from \"./hooks/useTheme\";\nimport { TamaguiProvider as TamaguiProviderImpl } from \"./views/TamaguiProvider\";\nimport { textStaticConfig } from \"./views/Text\";\nimport { viewStaticConfig } from \"./views/View\";\nimport { mergeFrontendCondition, regularStyleFrontend } from \"./helpers/styleFrontend\";\nvar createVariables = createVariablesImpl;\nvar parseFont = parseFontImpl;\nvar registerFontVariables = registerFontVariablesImpl;\nvar fixStyles = fixStylesImpl;\nvar getThemeCSSRules = getThemeCSSRulesImpl;\nvar normalizeValueWithProperty = normalizeValueWithPropertyImpl;\nvar proxyThemeToParents = proxyThemeToParentsImpl;\nvar ensureThemeVariable = ensureThemeVariableImpl;\nvar transformsToString = transformsToStringImpl;\nvar styleToCSS = styleToCSSImpl;\nvar useThemeWithState = useThemeWithStateImpl;\nvar plainValueToPayload = function(value, property) {\n if (typeof value === \"string\") return value;\n if (typeof value !== \"number\" || !Number.isFinite(value)) return null;\n if (property === \"rotate\" || property === \"rotateX\" || property === \"rotateY\" || property === \"rotateZ\") {\n return value === 0 ? \"0\" : `${value}deg`;\n }\n if (property === \"x\" || property === \"y\" || property === \"perspective\" || property === \"translateX\" || property === \"translateY\") {\n return value === 0 ? \"0\" : `${value}px`;\n }\n return stylePropsUnitless[property] ? String(value) : `${value}px`;\n};\nvar createTamagui = createTamaguiImpl;\nvar setupHooks = setupHooksImpl;\nvar TamaguiProvider = TamaguiProviderImpl;\nfunction createFrontendStyled(frontend) {\n return createFrontendStyledImpl(frontend);\n}\nfunction createFrontendViews(frontend) {\n return {\n View: createComponent({\n ...viewStaticConfig,\n styleFrontend: frontend,\n displayName: \"View\"\n }),\n Text: createComponent({\n ...textStaticConfig,\n styleFrontend: frontend,\n displayName: \"Text\"\n })\n };\n}\nfunction createFrontendHTML(frontend) {\n var out = {};\n for (var tag in html) {\n var source = html[tag];\n if (!source.staticConfig) {\n out[tag] = source;\n continue;\n }\n var rebuilt = createComponent({\n ...source.staticConfig,\n styleFrontend: frontend,\n displayName: tag\n });\n out[tag] = source.rebindDOMTag ? source.rebindDOMTag(rebuilt) : rebuilt;\n }\n return out;\n}\nexport {\n TamaguiProvider,\n createFrontendHTML,\n createFrontendStyled,\n createFrontendViews,\n createTamagui,\n createVariables,\n ensureThemeVariable,\n fixStyles,\n getThemeCSSRules,\n mergeFrontendCondition,\n normalizeValueWithProperty,\n parseFont,\n plainValueToPayload,\n proxyThemeToParents,\n registerFontVariables,\n regularStyleFrontend,\n setupHooks,\n styleToCSS,\n transformsToString,\n useThemeWithState\n};\n//# sourceMappingURL=internal-runtime.js.map\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAoBA,IAAI,kBAAkBA;AACtB,IAAI,YAAYC;AAChB,IAAI,wBAAwBC;AAC5B,IAAI,YAAYC;A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VariablesImpl","parseFontImpl","registerFontVariablesImpl","fixStylesImpl","getThemeCSSRulesImpl","normalizeValueWithPropertyImpl","proxyThemeToParentsImpl","ensureThemeVariableImpl","copyAuthoredThemeSchemeImpl","transformsToStringImpl","styleToCSSImpl","useThemeWithStateImpl","createTamaguiImpl","setupHooksImpl","TamaguiProviderImpl","createFrontendStyledImpl"],"sources":["esm/internal-runtime.native.js"],"sourcesContent":["import { stylePropsUnitless } from \"@tamagui/helpers\";\nimport { createComponent } from \"./createComponent\";\nimport { createVariables as createVariablesImpl } from \"./createVariables\";\nimport { html } from \"./dom/html\";\nimport { fixStyles as fixStylesImpl } from \"./helpers/expandStyles\";\nimport { styleToCSS as styleToCSSImpl } from \"./helpers/styleToCSS\";\nimport { getThemeCSSRules as getThemeCSSRulesImpl } from \"./helpers/getThemeCSSRules\";\nimport { normalizeValueWithProperty as normalizeValueWithPropertyImpl } from \"./helpers/normalizeValueWithProperty\";\nimport { proxyThemeToParents as proxyThemeToParentsImpl } from \"./helpers/proxyThemeToParents\";\nimport { copyAuthoredThemeScheme as copyAuthoredThemeSchemeImpl, ensureThemeVariable as ensureThemeVariableImpl } from \"./helpers/themes\";\nimport { transformsToString as transformsToStringImpl } from \"./helpers/transformsToString\";\nimport { parseFont as parseFontImpl, registerFontVariables as registerFontVariablesImpl } from \"./insertFont\";\nimport { createTamagui as createTamaguiImpl } from \"./createTamagui\";\nimport { setupHooks as setupHooksImpl } from \"./setupHooks\";\nimport { createFrontendStyled as createFrontendStyledImpl } from \"./styled\";\nimport { useThemeWithState as useThemeWithStateImpl } from \"./hooks/useTheme\";\nimport { TamaguiProvider as TamaguiProviderImpl } from \"./views/TamaguiProvider\";\nimport { textStaticConfig } from \"./views/Text\";\nimport { viewStaticConfig } from \"./views/View\";\nimport { mergeFrontendCondition, regularStyleFrontend } from \"./helpers/styleFrontend\";\nvar createVariables = createVariablesImpl;\nvar parseFont = parseFontImpl;\nvar registerFontVariables = registerFontVariablesImpl;\nvar fixStyles = fixStylesImpl;\nvar getThemeCSSRules = getThemeCSSRulesImpl;\nvar normalizeValueWithProperty = normalizeValueWithPropertyImpl;\nvar proxyThemeToParents = proxyThemeToParentsImpl;\nvar ensureThemeVariable = ensureThemeVariableImpl;\nvar copyAuthoredThemeScheme = copyAuthoredThemeSchemeImpl;\nvar transformsToString = transformsToStringImpl;\nvar styleToCSS = styleToCSSImpl;\nvar useThemeWithState = useThemeWithStateImpl;\nvar plainValueToPayload = function(value, property) {\n if (typeof value === \"string\") return value;\n if (typeof value !== \"number\" || !Number.isFinite(value)) return null;\n if (property === \"rotate\" || property === \"rotateX\" || property === \"rotateY\" || property === \"rotateZ\") {\n return value === 0 ? \"0\" : `${value}deg`;\n }\n if (property === \"x\" || property === \"y\" || property === \"perspective\" || property === \"translateX\" || property === \"translateY\") {\n return value === 0 ? \"0\" : `${value}px`;\n }\n return stylePropsUnitless[property] ? String(value) : `${value}px`;\n};\nvar createTamagui = createTamaguiImpl;\nvar setupHooks = setupHooksImpl;\nvar TamaguiProvider = TamaguiProviderImpl;\nfunction createFrontendStyled(frontend) {\n return createFrontendStyledImpl(frontend);\n}\nfunction createFrontendViews(frontend) {\n return {\n View: createComponent({\n ...viewStaticConfig,\n styleFrontend: frontend,\n displayName: \"View\"\n }),\n Text: createComponent({\n ...textStaticConfig,\n styleFrontend: frontend,\n displayName: \"Text\"\n })\n };\n}\nfunction createFrontendHTML(frontend) {\n var out = {};\n for (var tag in html) {\n var source = html[tag];\n if (!source.staticConfig) {\n out[tag] = source;\n continue;\n }\n var rebuilt = createComponent({\n ...source.staticConfig,\n styleFrontend: frontend,\n displayName: tag\n });\n out[tag] = source.rebindDOMTag ? source.rebindDOMTag(rebuilt) : rebuilt;\n }\n return out;\n}\nexport {\n TamaguiProvider,\n copyAuthoredThemeScheme,\n createFrontendHTML,\n createFrontendStyled,\n createFrontendViews,\n createTamagui,\n createVariables,\n ensureThemeVariable,\n fixStyles,\n getThemeCSSRules,\n mergeFrontendCondition,\n normalizeValueWithProperty,\n parseFont,\n plainValueToPayload,\n proxyThemeToParents,\n registerFontVariables,\n regularStyleFrontend,\n setupHooks,\n styleToCSS,\n transformsToString,\n useThemeWithState\n};\n//# sourceMappingURL=internal-runtime.js.map\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAoBA,IAAI,kBAAkBA;AACtB,IAAI,YAAYC;AAChB,IAAI,wBAAwBC;AAC5B,IAAI,YAAYC;AAChB,IAAI,mBAAmBC;AACvB,IAAI,6BAA6BC;AACjC,IAAI,sBAAsBC;AAC1B,IAAI,sBAAsBC;AAC1B,IAAI,0BAA0BC;AAC9B,IAAI,qBAAqBC;AACzB,IAAI,aAAaC;AACjB,IAAI,oBAAoBC;AACxB,IAAI,sBAAsB,SAAS,OAAO,UAAU;CAClD,IAAI,OAAO,UAAU,UAAU,OAAO;CACtC,IAAI,OAAO,UAAU,YAAY,CAAC,OAAO,SAAS,KAAK,GAAG,OAAO;CACjE,IAAI,aAAa,YAAY,aAAa,aAAa,aAAa,aAAa,aAAa,WAAW;EACvG,OAAO,UAAU,IAAI,MAAM,GAAG,MAAM;CACtC;CACA,IAAI,aAAa,OAAO,aAAa,OAAO,aAAa,iBAAiB,aAAa,gBAAgB,aAAa,cAAc;EAChI,OAAO,UAAU,IAAI,MAAM,GAAG,MAAM;CACtC;CACA,OAAO,mBAAmB,YAAY,OAAO,KAAK,IAAI,GAAG,MAAM;AACjE;AACA,IAAI,gBAAgBC;AACpB,IAAI,aAAaC;AACjB,IAAI,kBAAkBC;AACtB,SAAS,qBAAqB,UAAU;CACtC,OAAOC,uBAAyB,QAAQ;AAC1C;AACA,SAAS,oBAAoB,UAAU;CACrC,OAAO;EACL,MAAM,gBAAgB;GACpB,GAAG;GACH,eAAe;GACf,aAAa;EACf,CAAC;EACD,MAAM,gBAAgB;GACpB,GAAG;GACH,eAAe;GACf,aAAa;EACf,CAAC;CACH;AACF;AACA,SAAS,mBAAmB,UAAU;CACpC,IAAI,MAAM,CAAC;CACX,KAAK,IAAI,OAAO,MAAM;EACpB,IAAI,SAAS,KAAK;EAClB,IAAI,CAAC,OAAO,cAAc;GACxB,IAAI,OAAO;GACX;EACF;EACA,IAAI,UAAU,gBAAgB;GAC5B,GAAG,OAAO;GACV,eAAe;GACf,aAAa;EACf,CAAC;EACD,IAAI,OAAO,OAAO,eAAe,OAAO,aAAa,OAAO,IAAI;CAClE;CACA,OAAO;AACT"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/web",
3
- "version": "3.0.0-beta.1604.1",
3
+ "version": "3.0.0-beta.1670.1",
4
4
  "license": "MIT",
5
5
  "author": {
6
6
  "name": "Nate Wienert"
@@ -100,23 +100,23 @@
100
100
  "test:web": "vitest --typecheck --run"
101
101
  },
102
102
  "dependencies": {
103
- "@tamagui/animation-helpers": "3.0.0-beta.1604.1",
104
- "@tamagui/compose-refs": "3.0.0-beta.1604.1",
105
- "@tamagui/constants": "3.0.0-beta.1604.1",
106
- "@tamagui/dom": "3.0.0-beta.1604.1",
107
- "@tamagui/helpers": "3.0.0-beta.1604.1",
108
- "@tamagui/is-equal-shallow": "3.0.0-beta.1604.1",
109
- "@tamagui/native": "3.0.0-beta.1604.1",
110
- "@tamagui/normalize-css-color": "3.0.0-beta.1604.1",
111
- "@tamagui/react-native-types": "3.0.0-beta.1604.1",
112
- "@tamagui/style-grammar": "3.0.0-beta.1604.1",
113
- "@tamagui/types": "3.0.0-beta.1604.1",
114
- "@tamagui/use-did-finish-ssr": "3.0.0-beta.1604.1",
115
- "@tamagui/use-event": "3.0.0-beta.1604.1",
116
- "@tamagui/use-force-update": "3.0.0-beta.1604.1"
103
+ "@tamagui/animation-helpers": "3.0.0-beta.1670.1",
104
+ "@tamagui/compose-refs": "3.0.0-beta.1670.1",
105
+ "@tamagui/constants": "3.0.0-beta.1670.1",
106
+ "@tamagui/dom": "3.0.0-beta.1670.1",
107
+ "@tamagui/helpers": "3.0.0-beta.1670.1",
108
+ "@tamagui/is-equal-shallow": "3.0.0-beta.1670.1",
109
+ "@tamagui/native": "3.0.0-beta.1670.1",
110
+ "@tamagui/normalize-css-color": "3.0.0-beta.1670.1",
111
+ "@tamagui/react-native-types": "3.0.0-beta.1670.1",
112
+ "@tamagui/style-grammar": "3.0.0-beta.1670.1",
113
+ "@tamagui/types": "3.0.0-beta.1670.1",
114
+ "@tamagui/use-did-finish-ssr": "3.0.0-beta.1670.1",
115
+ "@tamagui/use-event": "3.0.0-beta.1670.1",
116
+ "@tamagui/use-force-update": "3.0.0-beta.1670.1"
117
117
  },
118
118
  "devDependencies": {
119
- "@tamagui/build": "3.0.0-beta.1604.1",
119
+ "@tamagui/build": "3.0.0-beta.1670.1",
120
120
  "@testing-library/react": "^16.1.0",
121
121
  "csstype": "^3.0.10",
122
122
  "react": "19.2.3",
@@ -129,5 +129,5 @@
129
129
  "react": ">=19",
130
130
  "react-dom": "*"
131
131
  },
132
- "releaseSourceCommit": "360e4e0e611bb81518cc274cccff03d38e59a2a0"
132
+ "releaseSourceCommit": "23b9b37ef498bb7ebe306138c1d635a807db8ac1"
133
133
  }
@@ -2097,7 +2097,7 @@ export function createComponent<
2097
2097
  stateRef,
2098
2098
  isHOC,
2099
2099
  isCompositeComponent,
2100
- hasRealPressEvents
2100
+ hasRealPressEvents && !isInsideNativeMenu
2101
2101
  )
2102
2102
  }
2103
2103
 
@@ -14,7 +14,11 @@ import {
14
14
  } from './helpers/createDesignSystem'
15
15
  import { scanAllSheets } from './helpers/insertStyleRule'
16
16
  import { proxyThemesToParents } from './helpers/proxyThemeToParents'
17
- import { ensureThemeVariable } from './helpers/themes'
17
+ import {
18
+ copyAuthoredThemeScheme,
19
+ ensureThemeVariable,
20
+ getAuthoredThemeScheme,
21
+ } from './helpers/themes'
18
22
  import { mergeConfigVariablesIntoTheme } from './helpers/configVariables'
19
23
  import { configureMedia } from './hooks/useMedia'
20
24
  import { parseFont, registerFontVariables } from './insertFont'
@@ -232,10 +236,7 @@ export function createTamagui<Conf extends CreateTamaguiProps>(
232
236
 
233
237
  const themesIn = configIn.themes as ThemesLikeObject
234
238
  const dedupedThemes =
235
- foundThemes ??
236
- getThemesDeduped(themesIn, tokens.color, configIn.variables, {
237
- tokensParsed,
238
- })
239
+ foundThemes ?? getThemesDeduped(themesIn, tokensParsed, configIn.variables)
239
240
  const themes = proxyThemesToParents(dedupedThemes, Object.keys(themesIn))
240
241
 
241
242
  return {
@@ -330,11 +331,8 @@ export function createTamagui<Conf extends CreateTamaguiProps>(
330
331
  // dedupes the themes if given them via JS config
331
332
  function getThemesDeduped(
332
333
  themes: ThemesLikeObject,
333
- colorTokens?: Record<string, any>,
334
- variables?: CreateTamaguiProps['variables'],
335
- variablesCtx?: {
336
- tokensParsed: TokensParsed
337
- }
334
+ tokensParsed: TokensParsed,
335
+ variables?: CreateTamaguiProps['variables']
338
336
  ): DedupedThemes {
339
337
  const dedupedThemes: DedupedThemes = []
340
338
  const existing = new Map<string, DedupedTheme>()
@@ -351,11 +349,12 @@ function getThemesDeduped(
351
349
  const rawTheme = themes[themeName]
352
350
 
353
351
  // dont force referential equality but may need something more consistent than JSON.stringify
354
- const key = JSON.stringify(rawTheme)
352
+ const scheme = getAuthoredThemeScheme(rawTheme)
353
+ const key = JSON.stringify(rawTheme) + scheme
355
354
 
356
355
  // if existing, avoid
357
- if (existing.has(key)) {
358
- const e = existing.get(key)!
356
+ const e = existing.get(key)
357
+ if (e) {
359
358
  e.names.push(themeName)
360
359
  continue
361
360
  }
@@ -363,7 +362,7 @@ function getThemesDeduped(
363
362
  // ensure each theme object unique for dedupe
364
363
  // is ThemeParsed because we call ensureThemeVariable
365
364
  // color tokens are spread first as fallbacks, theme values take precedence
366
- const theme = { ...colorTokens, ...rawTheme } as any as ThemeParsed
365
+ const theme = { ...tokensParsed.color, ...rawTheme } as any as ThemeParsed
367
366
 
368
367
  // parse into variables
369
368
  for (const key in theme) {
@@ -371,16 +370,13 @@ function getThemesDeduped(
371
370
  ensureThemeVariable(theme, key)
372
371
  }
373
372
 
373
+ copyAuthoredThemeScheme(theme, rawTheme)
374
+
374
375
  // custom variables merge into base themes only; sub-themes inherit them
375
376
  // via proxyThemesToParents (native) and the CSS cascade (web), so a
376
377
  // a ThemeUpdate patch survives sub-theme switches below it
377
- if (variables && variablesCtx && !themeName.includes('_')) {
378
- mergeConfigVariablesIntoTheme(
379
- theme as any,
380
- themeName,
381
- variables,
382
- variablesCtx.tokensParsed
383
- )
378
+ if (variables && !themeName.includes('_')) {
379
+ mergeConfigVariablesIntoTheme(theme as any, themeName, variables, tokensParsed)
384
380
  }
385
381
 
386
382
  // set deduped
@@ -159,19 +159,39 @@ export function useEvents(
159
159
  // the component's own state a dropped release latches the press look with no
160
160
  // event left to clear it. Guarding here means a stray duplicate release is a
161
161
  // no-op while a missing one is caught by onFinalize / the detach clear below.
162
+ const longPressTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null)
163
+ const longPressedRef = useRef(false)
164
+ const clearLongPress = () => {
165
+ if (longPressTimerRef.current) clearTimeout(longPressTimerRef.current)
166
+ longPressTimerRef.current = null
167
+ }
168
+ React.useEffect(() => clearLongPress, [])
162
169
  const pressActiveRef = useRef(false)
163
170
  const beginPress = (e?: any) => {
164
171
  if (pressActiveRef.current) return
165
172
  pressActiveRef.current = true
173
+ if (isInsideNativeMenu) {
174
+ clearLongPress()
175
+ longPressedRef.current = false
176
+ if (callbacksRef.current.onLongPress) {
177
+ longPressTimerRef.current = setTimeout(() => {
178
+ longPressTimerRef.current = null
179
+ longPressedRef.current = true
180
+ callbacksRef.current.onLongPress?.(e ?? {})
181
+ }, callbacksRef.current.delayLongPress ?? 500)
182
+ }
183
+ }
166
184
  callbacksRef.current.onPressIn?.(e ?? {})
167
185
  }
168
186
  const endPress = (e?: any, firePress = false) => {
187
+ clearLongPress()
169
188
  if (!pressActiveRef.current) return
170
189
  pressActiveRef.current = false
171
- if (firePress) callbacksRef.current.onPress?.(e ?? {})
190
+ if (firePress && !longPressedRef.current) callbacksRef.current.onPress?.(e ?? {})
172
191
  callbacksRef.current.onPressOut?.(e ?? {})
173
192
  }
174
193
 
194
+ // native menu triggers leave responder ownership to the adapter.
175
195
  // Real press handlers use the responder system for delivery even when RNGH
176
196
  // is configured. RNGH Tap begin/end ordering is not stable enough for
177
197
  // nested Tamagui press arbitration, and Fabric can mount a stale Tap that
@@ -184,7 +204,7 @@ export function useEvents(
184
204
  // unconditionally here for stable hooks order; useMainThreadPressEvents
185
205
  // no-ops when enabled is false.
186
206
  const useResponderFallback = Boolean(
187
- hasRealPressEvents || (!isInsideNativeMenu && getIsAndroid() && hasPressEvents)
207
+ !isInsideNativeMenu && (hasRealPressEvents || (getIsAndroid() && hasPressEvents))
188
208
  )
189
209
  useMainThreadPressEvents(events, viewProps, useResponderFallback, debugName)
190
210
 
@@ -196,10 +216,11 @@ export function useEvents(
196
216
  onPressOut: events.onPressOut,
197
217
  onPress: events.onPress,
198
218
  onLongPress: events.onLongPress,
219
+ delayLongPress: events.delayLongPress,
199
220
  }
200
221
  : {}
201
222
 
202
- if (hasRealPressEvents) {
223
+ if (hasRealPressEvents && !isInsideNativeMenu) {
203
224
  // Real handlers are delivered by useMainThreadPressEvents above. Clear
204
225
  // any cached press-clause observer from an earlier render so it cannot
205
226
  // double-fire after onPress appears dynamically.
@@ -534,7 +534,6 @@ function contributeProp(
534
534
  const shouldCheckSkipProps = !noSkip
535
535
  const asChildExceptStyleLike = Boolean(flags & passAsChildStyleFlag)
536
536
  const isTextOrInput = isText || isInput
537
- const hocParentVariants = isHOC ? parentVariants : undefined
538
537
  let keyInit = keyOg
539
538
  let valInit = valOg
540
539
 
@@ -1008,11 +1007,10 @@ function contributeProp(
1008
1007
  const shouldPassProp =
1009
1008
  (!isStyleProp && isHOC) ||
1010
1009
  // is in parent variants
1011
- (hocParentVariants && keyInit in hocParentVariants) ||
1010
+ (parentVariants && keyInit in parentVariants) ||
1012
1011
  inlineProps?.has(keyInit)
1013
1012
 
1014
- const parentVariant = parentVariants?.[keyInit]
1015
- const isHOCShouldPassThrough = Boolean(isHOC && (parentVariant || keyInit in skipProps))
1013
+ const isHOCShouldPassThrough = isHOC && keyInit in skipProps
1016
1014
 
1017
1015
  const shouldPassThrough = shouldPassProp || isHOCShouldPassThrough
1018
1016
 
@@ -1342,8 +1340,10 @@ export const getSplitStyles: StyleSplitter = (
1342
1340
  let frontendContainer: boolean | string | undefined
1343
1341
  let frontendContainerType: string | undefined
1344
1342
  const processedProps = props
1345
- const parentVariants = parentStaticConfig
1346
- ? getStyleStaticConfig(parentStaticConfig as StaticConfig, conf).variants
1343
+ // only variant names determine HOC forwarding; their style values resolve
1344
+ // in the renderer, so this needs no normalized style snapshot.
1345
+ const parentVariants = isHOC
1346
+ ? staticConfig.Component?.staticConfig?.variants
1347
1347
  : undefined
1348
1348
  const defaultProps = asChild ? styleStaticConfig.defaultProps : undefined
1349
1349
  const asChildExceptStyleLike =
@@ -1382,7 +1382,7 @@ export const getSplitStyles: StyleSplitter = (
1382
1382
  styledContextKeys,
1383
1383
  stylePassFlags,
1384
1384
  debug,
1385
- parentStaticConfig,
1385
+ process.env.NODE_ENV === 'development' ? parentStaticConfig : undefined,
1386
1386
  defaultProps,
1387
1387
  driverAnimations,
1388
1388
  driverOutputStyle,
@@ -3480,7 +3480,12 @@ function emitValue(
3480
3480
  }
3481
3481
  if (typeof raw === 'string' && property === 'background') {
3482
3482
  const parts = splitComponents(raw)
3483
- if (parts.length === 1 && !startsValueFunction(parts[0])) {
3483
+ if (
3484
+ parts.length === 1 &&
3485
+ (!startsValueFunction(parts[0]) ||
3486
+ (process.env.TAMAGUI_TARGET === 'native' &&
3487
+ classifyBorderComponents(parts[0]).color))
3488
+ ) {
3484
3489
  emitResolved(state, 'backgroundColor', parts[0], cursor, originalValue, contextOnly)
3485
3490
  return
3486
3491
  }
@@ -1,4 +1,5 @@
1
1
  import type { DedupedThemes, ThemeParsed } from '../types'
2
+ import { copyAuthoredThemeScheme } from './themes'
2
3
 
3
4
  const themesRaw: Record<string, ThemeParsed> = {}
4
5
 
@@ -58,5 +59,5 @@ export function proxyThemeToParents(themeName: string, theme: ThemeParsed) {
58
59
  Object.assign(out, themesRaw[parent])
59
60
  }
60
61
  Object.assign(out, theme)
61
- return out
62
+ return copyAuthoredThemeScheme(out, theme)
62
63
  }
@@ -1,22 +1,28 @@
1
1
  import { createVariable, isVariable } from '../createVariable'
2
2
 
3
+ const schemeKey = /* @__PURE__ */ Symbol.for('tamagui.theme.scheme')
4
+
5
+ export function getAuthoredThemeScheme(theme: any): 'light' | 'dark' | undefined {
6
+ const scheme = theme[schemeKey]
7
+ return scheme === 'light' || scheme === 'dark' ? scheme : undefined
8
+ }
9
+
10
+ export function copyAuthoredThemeScheme<T>(target: T, source: any): T {
11
+ const scheme = getAuthoredThemeScheme(source)
12
+ if (scheme) Object.defineProperty(target, schemeKey, { value: scheme })
13
+ return target
14
+ }
15
+
3
16
  // mutates, freeze after
4
17
  // shared by createTamagui so extracted here
5
18
  export function ensureThemeVariable(theme: any, key: string) {
6
19
  const val = theme[key]
7
- const value = isVariable(val) ? val.val : val
8
- if (!isVariable(val)) {
9
- theme[key] = createVariable({
10
- key,
11
- name: key,
12
- val: value,
13
- })
14
- } else if (val.name !== key) {
15
- // rename to theme name
20
+ const variable = isVariable(val)
21
+ if (!variable || val.name !== key) {
16
22
  theme[key] = createVariable({
17
- key: val.name,
23
+ key: variable ? val.name : key,
18
24
  name: key,
19
- val: value,
25
+ val: variable ? val.val : val,
20
26
  })
21
27
  }
22
28
  }
@@ -18,6 +18,7 @@ import type {
18
18
  UseThemeWithStateProps,
19
19
  } from '../types'
20
20
  import type { ThemeUpdateState } from '../helpers/themeUpdateState'
21
+ import { getAuthoredThemeScheme } from '../helpers/themes'
21
22
 
22
23
  type ID = string
23
24
 
@@ -110,7 +111,7 @@ export const useThemeState = (
110
111
  }
111
112
 
112
113
  const id = useId()
113
- const propsKey = getPropsKey(props)
114
+ const propsKey = `${props.name || ''}${props.forceClassName || ''}${props._themeUpdate?.key || ''}`
114
115
 
115
116
  if (cascadeOnChange) {
116
117
  registerThemeProviderChain(id, parentId, props)
@@ -119,20 +120,14 @@ export const useThemeState = (
119
120
  const ref = useRef<ThemeStateRef>(null as any)
120
121
  const r = (ref.current ||= {
121
122
  id,
122
- parentId,
123
- props,
124
- propsKey,
125
- isRoot,
126
- keys,
127
- schemeKeys,
128
123
  optimizeForFirstRender,
129
124
  renderVersion: 0,
130
- })
125
+ } as ThemeStateRef)
131
126
  r.props = props
132
127
  r.propsKey = propsKey
133
128
  r.isRoot = isRoot
134
129
  r.keys = keys
135
- r.schemeKeys = schemeKeys
130
+ if (process.env.TAMAGUI_TARGET === 'native') r.schemeKeys = schemeKeys
136
131
  r.parentId = parentId
137
132
  r.renderVersion++
138
133
 
@@ -153,7 +148,7 @@ export const useThemeState = (
153
148
  }
154
149
 
155
150
  if (r.unsubscribe && r.subscribedTo !== r.parentId) {
156
- cleanupThemeSubscription(r)
151
+ r.unsubscribe?.()
157
152
  }
158
153
 
159
154
  if (shouldSubscribeToTheme(r, cascadeOnChange)) {
@@ -189,7 +184,7 @@ export const useThemeState = (
189
184
  }
190
185
  }
191
186
  } else if (r.unsubscribe) {
192
- cleanupThemeSubscription(r)
187
+ r.unsubscribe?.()
193
188
  }
194
189
 
195
190
  return () => {
@@ -250,13 +245,9 @@ const shouldSubscribeToTheme = (r: ThemeStateRef, cascadeOnChange: boolean): boo
250
245
  r.props.needsUpdate?.()
251
246
  )
252
247
 
253
- function cleanupThemeSubscription(r: ThemeStateRef) {
254
- r.unsubscribe?.()
255
- }
256
-
257
248
  function cleanupThemeState(r: ThemeStateRef) {
258
249
  if (r.unsubscribe) {
259
- cleanupThemeSubscription(r)
250
+ r.unsubscribe()
260
251
  } else {
261
252
  r.state = undefined
262
253
  states.delete(r.id)
@@ -267,16 +258,8 @@ function cleanupThemeState(r: ThemeStateRef) {
267
258
  }
268
259
 
269
260
  const getSnapshotImpl = (r: SnapshotRef): ThemeState => {
270
- const {
271
- id,
272
- parentId,
273
- props,
274
- propsKey,
275
- isRoot,
276
- keys,
277
- schemeKeys,
278
- optimizeForFirstRender,
279
- } = r
261
+ const { id, parentId, props, propsKey, isRoot, keys, optimizeForFirstRender } = r
262
+ const schemeKeys = process.env.TAMAGUI_TARGET === 'native' ? r.schemeKeys : undefined
280
263
  // useId values repeat across server renders; each hook owns its snapshot.
281
264
  let local = r.state
282
265
  const parentState = states.get(parentId)
@@ -302,11 +285,11 @@ const getSnapshotImpl = (r: SnapshotRef): ThemeState => {
302
285
  local.scheme !== parentState.scheme &&
303
286
  getThemeBaseName(local.name) === getThemeBaseName(parentState.name)
304
287
 
305
- const allKeysSchemeOptimized =
306
- !optimizeForFirstRender &&
307
- Boolean(keys.current?.size && schemeKeys?.current?.size === keys.current.size)
308
-
309
- const canSkipForSchemeChange = Boolean(isSchemeOnlyChange && allKeysSchemeOptimized)
288
+ const canSkipForSchemeChange = Boolean(
289
+ isSchemeOnlyChange &&
290
+ keys.current?.size &&
291
+ schemeKeys?.current?.size === keys.current.size
292
+ )
310
293
 
311
294
  // forceClassName renders its resolved name as classes, so a nameless one that
312
295
  // mirrors its parent still has to re-render when the parent's scheme flips
@@ -445,7 +428,7 @@ const getNextState = (
445
428
  }
446
429
 
447
430
  // a same-name pin still introduces its own scope.
448
- const scheme = getScheme(resolvedName)
431
+ const scheme = getAuthoredThemeScheme(themes[resolvedName]) || getScheme(resolvedName)
449
432
  const parentInverses = parentState?.inverses ?? 0
450
433
  const isInverse = Boolean(parentState && scheme !== parentState.scheme)
451
434
  const inverses = parentInverses + (isInverse ? 1 : 0)
@@ -556,8 +539,5 @@ export function resolveThemeName(
556
539
  return found
557
540
  }
558
541
 
559
- const getPropsKey = ({ name, forceClassName, _themeUpdate }: UseThemeWithStateProps) =>
560
- `${name || ''}${forceClassName || ''}${_themeUpdate?.key || ''}`
561
-
562
542
  export const hasThemeUpdatingProps = (props: UseThemeWithStateProps) =>
563
543
  'name' in props || 'forceClassName' in props || '_themeUpdate' in props
@@ -19,7 +19,10 @@ import { getThemeCSSRules as getThemeCSSRulesImpl } from './helpers/getThemeCSSR
19
19
  import { normalizeValueWithProperty as normalizeValueWithPropertyImpl } from './helpers/normalizeValueWithProperty'
20
20
  import { proxyThemeToParents as proxyThemeToParentsImpl } from './helpers/proxyThemeToParents'
21
21
  import type { FrontendComponent, StyleFrontend } from './helpers/styleFrontend'
22
- import { ensureThemeVariable as ensureThemeVariableImpl } from './helpers/themes'
22
+ import {
23
+ copyAuthoredThemeScheme as copyAuthoredThemeSchemeImpl,
24
+ ensureThemeVariable as ensureThemeVariableImpl,
25
+ } from './helpers/themes'
23
26
  import { transformsToString as transformsToStringImpl } from './helpers/transformsToString'
24
27
  import {
25
28
  parseFont as parseFontImpl,
@@ -59,6 +62,8 @@ export const proxyThemeToParents: (themeName: string, theme: any) => any =
59
62
  proxyThemeToParentsImpl
60
63
  export const ensureThemeVariable: (theme: any, key: string) => void =
61
64
  ensureThemeVariableImpl
65
+ export const copyAuthoredThemeScheme: <T>(target: T, source: any) => T =
66
+ copyAuthoredThemeSchemeImpl
62
67
  export const transformsToString: (transforms: object[]) => string = transformsToStringImpl
63
68
  export const styleToCSS: (style: Record<string, any>) => void = styleToCSSImpl
64
69
  export const useThemeWithState: (
@@ -1 +1 @@
1
- {"version":3,"file":"createTamagui.d.ts","sourceRoot":"","sources":["../src/createTamagui.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EACV,kBAAkB,EAMlB,kBAAkB,EAClB,qBAAqB,EAKtB,MAAM,SAAS,CAAA;AAwDhB,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,qBAAqB,yBAIjE;AAwBD,wBAAgB,aAAa,CAAC,IAAI,SAAS,kBAAkB,EAC3D,QAAQ,EAAE,IAAI,GACb,kBAAkB,CAAC,IAAI,CAAC,CA+M1B"}
1
+ {"version":3,"file":"createTamagui.d.ts","sourceRoot":"","sources":["../src/createTamagui.ts"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EACV,kBAAkB,EAMlB,kBAAkB,EAClB,qBAAqB,EAKtB,MAAM,SAAS,CAAA;AAwDhB,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,qBAAqB,yBAIjE;AAwBD,wBAAgB,aAAa,CAAC,IAAI,SAAS,kBAAkB,EAC3D,QAAQ,EAAE,IAAI,GACb,kBAAkB,CAAC,IAAI,CAAC,CA4M1B"}
@@ -1 +1 @@
1
- {"version":3,"file":"eventHandling.native.d.ts","sourceRoot":"","sources":["../src/eventHandling.native.ts"],"names":[],"mappings":"AAAA;;GAEG;AAOH,OAAO,KAAK,EAAE,YAAY,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAA;AAoCrE,wBAAgB,YAAY,OAE3B;AAED,wBAAgB,SAAS,CACvB,MAAM,EAAE,GAAG,EACX,SAAS,EAAE,GAAG,EACd,QAAQ,EAAE;IAAE,OAAO,EAAE,wBAAwB,CAAA;CAAE,EAC/C,YAAY,EAAE,YAAY,EAC1B,KAAK,CAAC,EAAE,OAAO,EACf,kBAAkB,CAAC,EAAE,OAAO,EAC5B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,EACzB,kBAAkB,CAAC,EAAE,OAAO,OA0N7B;AAED,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,GAAG,EACZ,OAAO,EAAE,GAAG,EACZ,SAAS,EAAE;IAAE,OAAO,EAAE,wBAAwB,CAAA;CAAE,EAChD,KAAK,CAAC,EAAE,OAAO,EACf,oBAAoB,CAAC,EAAE,OAAO,EAC9B,kBAAkB,CAAC,EAAE,OAAO,OA+D7B"}
1
+ {"version":3,"file":"eventHandling.native.d.ts","sourceRoot":"","sources":["../src/eventHandling.native.ts"],"names":[],"mappings":"AAAA;;GAEG;AAOH,OAAO,KAAK,EAAE,YAAY,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAA;AAoCrE,wBAAgB,YAAY,OAE3B;AAED,wBAAgB,SAAS,CACvB,MAAM,EAAE,GAAG,EACX,SAAS,EAAE,GAAG,EACd,QAAQ,E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,QAyBlB;AAID,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,qBAAqB,sBAgBtF;AAMD,cAAc,mBAAmB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"proxyThemeToParents.d.ts","sourceRoot":"","sources":["../../src/helpers/proxyThemeToParents.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAM1D,wBAAgB,oBAAoB,CAClC,aAAa,EAAE,aAAa,EAC5B,gBAAgB,CAAC,EAAE,MAAM,EAAE,GAC1B,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CA+B7B;AAED,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,MAmBxE"}
1
+ {"version":3,"file":"proxyThemeToParents.d.ts","sourceRoot":"","sources":["../../src/helpers/proxyThemeToParents.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAO1D,wBAAgB,oBAAoB,CAClC,aAAa,EAAE,aAAa,EAC5B,gBAAgB,CAAC,EAAE,MAAM,EAAE,GAC1B,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CA+B7B;AAED,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,MAmBxE"}
@@ -1,2 +1,4 @@
1
+ export declare function getAuthoredThemeScheme(theme: any): 'light' | 'dark' | undefined;
2
+ export declare function copyAuthoredThemeScheme<T>(target: T, source: any): T;
1
3
  export declare function ensureThemeVariable(theme: any, key: string): void;
2
4
  //# sourceMappingURL=themes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"themes.d.ts","sourceRoot":"","sources":["../../src/helpers/themes.ts"],"names":[],"mappings":"AAIA,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,QAiB1D"}
1
+ {"version":3,"file":"themes.d.ts","sourceRoot":"","sources":["../../src/helpers/themes.ts"],"names":[],"mappings":"AAIA,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,GAAG,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAG/E;AAED,wBAAgB,uBAAuB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,GAAG,GAAG,CAAC,CAIpE;AAID,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,QAU1D"}
@@ -1 +1 @@
1
- {"version":3,"file":"useThemeState.d.ts","sourceRoot":"","sources":["../../src/hooks/useThemeState.ts"],"names":[],"mappings":"AACA,OAAO,EAOL,KAAK,gBAAgB,EACtB,MAAM,OAAO,CAAA;AAId,OAAO,KAAK,EAGV,UAAU,EACV,sBAAsB,EACvB,MAAM,UAAU,CAAA;AACjB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAEnE,KAAK,EAAE,GAAG,MAAM,CAAA;AAEhB,eAAO,MAAM,iBAAiB,iCAAwB,CAAA;AAWtD,eAAO,MAAM,iBAAiB,YAK7B,CAAA;AAED,eAAO,MAAM,aAAa,OAAQ,EAAE,2BAAmB,CAAA;AAKvD,eAAO,MAAM,mBAAmB,OAAQ,EAAE,iCAA8B,CAAA;AACxE,eAAO,MAAM,sBAAsB,OAAQ,EAAE,uBAAiC,CAAA;AAE9E,eAAO,MAAM,0BAA0B;IACrC,MAAM;IACN,OAAO;CACP,CAAA;AAsBF,eAAO,MAAM,iBAAiB,yBAAuB,CAAA;AAMrD,eAAO,MAAM,aAAa,UACjB,sBAAsB,qCAEvB,gBAAgB,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,eAC7B,gBAAgB,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,kEAGhD,UAsIF,CAAA;AAiRD,wBAAgB,eAAe,CAC7B,UAAU,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