@tamagui/core 1.14.0 → 1.14.2

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 (51) hide show
  1. package/dist/cjs/helpers/getBoundingClientRect.js +33 -1
  2. package/dist/cjs/helpers/getBoundingClientRect.js.map +2 -2
  3. package/dist/cjs/helpers/getRect.js +35 -1
  4. package/dist/cjs/helpers/getRect.js.map +2 -2
  5. package/dist/cjs/hooks/useElementLayout.js +83 -1
  6. package/dist/cjs/hooks/useElementLayout.js.map +2 -2
  7. package/dist/cjs/hooks/usePlatformMethods.js +47 -1
  8. package/dist/cjs/hooks/usePlatformMethods.js.map +2 -2
  9. package/dist/cjs/index.js +163 -1
  10. package/dist/cjs/index.js.map +2 -2
  11. package/dist/cjs/inject-styles.js +39 -1
  12. package/dist/cjs/inject-styles.js.map +2 -2
  13. package/dist/cjs/reactNativeTypes.js +16 -1
  14. package/dist/cjs/reactNativeTypes.js.map +2 -2
  15. package/dist/cjs/vendor/Pressability.js +31 -1
  16. package/dist/cjs/vendor/Pressability.js.map +2 -2
  17. package/dist/cjs/vendor/Pressability.native.js +31 -1
  18. package/dist/cjs/vendor/Pressability.native.js.map +2 -2
  19. package/dist/esm/helpers/getBoundingClientRect.js +9 -1
  20. package/dist/esm/helpers/getBoundingClientRect.js.map +2 -2
  21. package/dist/esm/helpers/getBoundingClientRect.mjs +9 -1
  22. package/dist/esm/helpers/getBoundingClientRect.mjs.map +2 -2
  23. package/dist/esm/helpers/getRect.js +11 -1
  24. package/dist/esm/helpers/getRect.js.map +2 -2
  25. package/dist/esm/helpers/getRect.mjs +11 -1
  26. package/dist/esm/helpers/getRect.mjs.map +2 -2
  27. package/dist/esm/hooks/useElementLayout.js +58 -1
  28. package/dist/esm/hooks/useElementLayout.js.map +2 -2
  29. package/dist/esm/hooks/useElementLayout.mjs +58 -1
  30. package/dist/esm/hooks/useElementLayout.mjs.map +2 -2
  31. package/dist/esm/hooks/usePlatformMethods.js +23 -1
  32. package/dist/esm/hooks/usePlatformMethods.js.map +2 -2
  33. package/dist/esm/hooks/usePlatformMethods.mjs +23 -1
  34. package/dist/esm/hooks/usePlatformMethods.mjs.map +2 -2
  35. package/dist/esm/index.js +144 -1
  36. package/dist/esm/index.js.map +2 -2
  37. package/dist/esm/index.mjs +144 -1
  38. package/dist/esm/index.mjs.map +2 -2
  39. package/dist/esm/inject-styles.js +15 -1
  40. package/dist/esm/inject-styles.js.map +2 -2
  41. package/dist/esm/inject-styles.mjs +15 -1
  42. package/dist/esm/inject-styles.mjs.map +2 -2
  43. package/dist/esm/vendor/Pressability.js +6 -1
  44. package/dist/esm/vendor/Pressability.js.map +2 -2
  45. package/dist/esm/vendor/Pressability.mjs +6 -1
  46. package/dist/esm/vendor/Pressability.mjs.map +2 -2
  47. package/dist/esm/vendor/Pressability.native.js +6 -1
  48. package/dist/esm/vendor/Pressability.native.js.map +2 -2
  49. package/dist/esm/vendor/Pressability.native.mjs +6 -1
  50. package/dist/esm/vendor/Pressability.native.mjs.map +2 -2
  51. package/package.json +6 -6
@@ -1,2 +1,145 @@
1
- import{useResponderEvents as w}from"@tamagui/react-native-use-responder-events";import{Stack as B,Text as I,composeEventHandlers as A,isRSC as M,mergeEvent as S,setupHooks as j}from"@tamagui/web";import{useElementLayout as F}from"./hooks/useElementLayout";import{usePlatformMethods as _}from"./hooks/usePlatformMethods";import{usePressability as G}from"./vendor/Pressability";export*from"@tamagui/web";const Y=B,Z=I;j({getBaseViews(){const e=require("react-native");return{View:e.View||e.default.View,Text:e.Text||e.default.Text}},usePropsTransform(e,n,r){const{onMoveShouldSetResponder:i,onMoveShouldSetResponderCapture:f,onResponderEnd:c,onResponderGrant:a,onResponderMove:l,onResponderReject:p,onResponderRelease:m,onResponderStart:x,onResponderTerminate:b,onResponderTerminationRequest:T,onScrollShouldSetResponder:h,onScrollShouldSetResponderCapture:P,onSelectionChangeShouldSetResponder:k,onSelectionChangeShouldSetResponderCapture:C,onStartShouldSetResponder:g,onStartShouldSetResponderCapture:y,collapsable:q,focusable:d,accessible:N,accessibilityDisabled:V,onLayout:E,hrefAttrs:R,...o}=n;if(M||(_(r),F(r,E),w(r,{onMoveShouldSetResponder:i,onMoveShouldSetResponderCapture:f,onResponderEnd:c,onResponderGrant:a,onResponderMove:l,onResponderReject:p,onResponderRelease:m,onResponderStart:x,onResponderTerminate:b,onResponderTerminationRequest:T,onScrollShouldSetResponder:h,onScrollShouldSetResponderCapture:P,onSelectionChangeShouldSetResponder:k,onSelectionChangeShouldSetResponderCapture:C,onStartShouldSetResponder:g,onStartShouldSetResponderCapture:y})),o.href!==void 0&&R!==void 0){const{download:s,rel:t,target:u}=R;s!=null&&(o.download=s),t!=null&&(o.rel=t),typeof u=="string"&&(o.target=u.charAt(0)!=="_"?`_${u}`:u)}if(!o.tabIndex){const s=d!==void 0?d:N,t=o.role;s===!1&&(o.tabIndex="-1"),e==="a"||e==="button"||e==="input"||e==="select"||e==="textarea"?(s===!1||V===!0)&&(o.tabIndex="-1"):(t==="button"||t==="checkbox"||t==="link"||t==="radio"||t==="textbox"||t==="switch")&&s!==!1&&(o.tabIndex="0"),s===!0&&(o.tabIndex="0")}return o},useEvents(e,n,{pseudos:r},i){if(process.env.TAMAGUI_TARGET==="native"){!!(r!=null&&r.focusStyle)&&(e.onFocus=S(e.onFocus,()=>{i({focus:!0})}),e.onBlur=S(e.onBlur,()=>{i({focus:!1})}));const c=G(n?{...n,hitSlop:e.hitSlop}:{});if(n!=null&&n.onPress)for(const a in c){const l=e[a],p=c[a];e[a]=l&&!O[a]?A(l,p):p}}}});const O={onClick:!0};export{Y as Stack,Z as Text};
1
+ import { useResponderEvents } from "@tamagui/react-native-use-responder-events";
2
+ import {
3
+ Stack as WebStack,
4
+ Text as WebText,
5
+ composeEventHandlers,
6
+ isRSC,
7
+ mergeEvent,
8
+ setupHooks
9
+ } from "@tamagui/web";
10
+ import { useElementLayout } from "./hooks/useElementLayout";
11
+ import { usePlatformMethods } from "./hooks/usePlatformMethods";
12
+ import { usePressability } from "./vendor/Pressability";
13
+ export * from "@tamagui/web";
14
+ const Stack = WebStack;
15
+ const Text = WebText;
16
+ setupHooks({
17
+ getBaseViews() {
18
+ const native = require("react-native");
19
+ return {
20
+ View: native.View || native.default.View,
21
+ Text: native.Text || native.default.Text
22
+ };
23
+ },
24
+ usePropsTransform(elementType, propsIn, hostRef) {
25
+ const {
26
+ // event props
27
+ onMoveShouldSetResponder,
28
+ onMoveShouldSetResponderCapture,
29
+ onResponderEnd,
30
+ onResponderGrant,
31
+ onResponderMove,
32
+ onResponderReject,
33
+ onResponderRelease,
34
+ onResponderStart,
35
+ onResponderTerminate,
36
+ onResponderTerminationRequest,
37
+ onScrollShouldSetResponder,
38
+ onScrollShouldSetResponderCapture,
39
+ onSelectionChangeShouldSetResponder,
40
+ onSelectionChangeShouldSetResponderCapture,
41
+ onStartShouldSetResponder,
42
+ onStartShouldSetResponderCapture,
43
+ // android
44
+ collapsable,
45
+ focusable,
46
+ // deprecated,
47
+ accessible,
48
+ accessibilityDisabled,
49
+ onLayout,
50
+ hrefAttrs,
51
+ ...viewProps
52
+ } = propsIn;
53
+ if (!isRSC) {
54
+ usePlatformMethods(hostRef);
55
+ useElementLayout(hostRef, onLayout);
56
+ useResponderEvents(hostRef, {
57
+ onMoveShouldSetResponder,
58
+ onMoveShouldSetResponderCapture,
59
+ onResponderEnd,
60
+ onResponderGrant,
61
+ onResponderMove,
62
+ onResponderReject,
63
+ onResponderRelease,
64
+ onResponderStart,
65
+ onResponderTerminate,
66
+ onResponderTerminationRequest,
67
+ onScrollShouldSetResponder,
68
+ onScrollShouldSetResponderCapture,
69
+ onSelectionChangeShouldSetResponder,
70
+ onSelectionChangeShouldSetResponderCapture,
71
+ onStartShouldSetResponder,
72
+ onStartShouldSetResponderCapture
73
+ });
74
+ }
75
+ if (viewProps.href !== void 0 && hrefAttrs !== void 0) {
76
+ const { download, rel, target } = hrefAttrs;
77
+ if (download != null) {
78
+ viewProps.download = download;
79
+ }
80
+ if (rel != null) {
81
+ viewProps.rel = rel;
82
+ }
83
+ if (typeof target === "string") {
84
+ viewProps.target = target.charAt(0) !== "_" ? `_${target}` : target;
85
+ }
86
+ }
87
+ if (!viewProps.tabIndex) {
88
+ const _focusable = focusable !== void 0 ? focusable : accessible;
89
+ const role = viewProps.role;
90
+ if (_focusable === false) {
91
+ viewProps.tabIndex = "-1";
92
+ }
93
+ if (
94
+ // These native elements are focusable by default
95
+ elementType === "a" || elementType === "button" || elementType === "input" || elementType === "select" || elementType === "textarea"
96
+ ) {
97
+ if (_focusable === false || accessibilityDisabled === true) {
98
+ viewProps.tabIndex = "-1";
99
+ }
100
+ } else if (
101
+ // These roles are made focusable by default
102
+ role === "button" || role === "checkbox" || role === "link" || role === "radio" || role === "textbox" || role === "switch"
103
+ ) {
104
+ if (_focusable !== false) {
105
+ viewProps.tabIndex = "0";
106
+ }
107
+ }
108
+ if (_focusable === true) {
109
+ viewProps.tabIndex = "0";
110
+ }
111
+ }
112
+ return viewProps;
113
+ },
114
+ useEvents(viewProps, events, { pseudos }, setStateShallow) {
115
+ if (process.env.TAMAGUI_TARGET === "native") {
116
+ const attachFocus = !!(pseudos == null ? void 0 : pseudos.focusStyle);
117
+ if (attachFocus) {
118
+ viewProps.onFocus = mergeEvent(viewProps.onFocus, () => {
119
+ setStateShallow({ focus: true });
120
+ });
121
+ viewProps.onBlur = mergeEvent(viewProps.onBlur, () => {
122
+ setStateShallow({ focus: false });
123
+ });
124
+ }
125
+ const pressability = usePressability(
126
+ events ? { ...events, hitSlop: viewProps.hitSlop } : {}
127
+ );
128
+ if (events == null ? void 0 : events.onPress) {
129
+ for (const key in pressability) {
130
+ const og = viewProps[key];
131
+ const val = pressability[key];
132
+ viewProps[key] = og && !dontComposePressabilityKeys[key] ? composeEventHandlers(og, val) : val;
133
+ }
134
+ }
135
+ }
136
+ }
137
+ });
138
+ const dontComposePressabilityKeys = {
139
+ onClick: true
140
+ };
141
+ export {
142
+ Stack,
143
+ Text
144
+ };
2
145
  //# sourceMappingURL=index.mjs.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.ts"],
4
4
  "sourcesContent": ["import { useResponderEvents } from '@tamagui/react-native-use-responder-events'\nimport {\n StackProps,\n StackPropsBase,\n TamaguiComponent,\n TextProps,\n TextPropsBase,\n Stack as WebStack,\n Text as WebText,\n composeEventHandlers,\n isRSC,\n mergeEvent,\n setupHooks,\n} from '@tamagui/web'\nimport { RefObject } from 'react'\nimport type { Text as RNText, View as RNView } from 'react-native'\n\nimport { useElementLayout } from './hooks/useElementLayout'\nimport { usePlatformMethods } from './hooks/usePlatformMethods'\nimport type { RNTextProps, RNViewProps } from './reactNativeTypes'\nimport { usePressability } from './vendor/Pressability'\n\n// re-exports all of @tamagui/web just adds hooks\nexport * from '@tamagui/web'\n\n// adds extra types to Stack/Text:\n\nexport const Stack = WebStack as TamaguiComponent<\n StackProps & RNViewProps,\n RNView,\n StackPropsBase & RNViewProps\n>\n\nexport const Text = WebText as TamaguiComponent<\n TextProps & RNTextProps,\n RNText,\n TextPropsBase & RNTextProps\n>\n\n// setup internal hooks:\n\nsetupHooks({\n getBaseViews() {\n const native = require('react-native')\n return {\n View: native.View || native.default.View,\n Text: native.Text || native.default.Text,\n }\n },\n\n usePropsTransform(elementType, propsIn, hostRef) {\n // otherwise replicate react-native-web functionality\n const {\n // event props\n onMoveShouldSetResponder,\n onMoveShouldSetResponderCapture,\n onResponderEnd,\n onResponderGrant,\n onResponderMove,\n onResponderReject,\n onResponderRelease,\n onResponderStart,\n onResponderTerminate,\n onResponderTerminationRequest,\n onScrollShouldSetResponder,\n onScrollShouldSetResponderCapture,\n onSelectionChangeShouldSetResponder,\n onSelectionChangeShouldSetResponderCapture,\n onStartShouldSetResponder,\n onStartShouldSetResponderCapture,\n\n // android\n collapsable,\n focusable,\n\n // deprecated,\n accessible,\n accessibilityDisabled,\n\n onLayout,\n hrefAttrs,\n\n ...viewProps\n } = propsIn\n\n if (!isRSC) {\n usePlatformMethods(hostRef as RefObject<Element>)\n useElementLayout(hostRef as RefObject<Element>, onLayout as any)\n useResponderEvents(hostRef, {\n onMoveShouldSetResponder,\n onMoveShouldSetResponderCapture,\n onResponderEnd,\n onResponderGrant,\n onResponderMove,\n onResponderReject,\n onResponderRelease,\n onResponderStart,\n onResponderTerminate,\n onResponderTerminationRequest,\n onScrollShouldSetResponder,\n onScrollShouldSetResponderCapture,\n onSelectionChangeShouldSetResponder,\n onSelectionChangeShouldSetResponderCapture,\n onStartShouldSetResponder,\n onStartShouldSetResponderCapture,\n } as any)\n }\n\n // TODO move into getSplitStyles inital `if (process.env.TAMAGUI_TARGET === 'web')` block\n\n if (viewProps.href !== undefined && hrefAttrs !== undefined) {\n const { download, rel, target } = hrefAttrs\n if (download != null) {\n viewProps.download = download\n }\n if (rel != null) {\n viewProps.rel = rel\n }\n if (typeof target === 'string') {\n viewProps.target = target.charAt(0) !== '_' ? `_${target}` : target\n }\n }\n\n // FOCUS\n // \"focusable\" indicates that an element may be a keyboard tab-stop.\n // ported from RNW: TODO move into getSplitStyles\n if (!viewProps.tabIndex) {\n const _focusable = focusable !== undefined ? focusable : accessible\n const role = viewProps.role\n if (_focusable === false) {\n viewProps.tabIndex = '-1'\n }\n if (\n // These native elements are focusable by default\n elementType === 'a' ||\n elementType === 'button' ||\n elementType === 'input' ||\n elementType === 'select' ||\n elementType === 'textarea'\n ) {\n if (_focusable === false || accessibilityDisabled === true) {\n viewProps.tabIndex = '-1'\n }\n } else if (\n // These roles are made focusable by default\n role === 'button' ||\n role === 'checkbox' ||\n role === 'link' ||\n role === 'radio' ||\n role === 'textbox' ||\n role === 'switch'\n ) {\n if (_focusable !== false) {\n viewProps.tabIndex = '0'\n }\n }\n // Everything else must explicitly set the prop\n if (_focusable === true) {\n viewProps.tabIndex = '0'\n }\n }\n\n return viewProps\n },\n\n useEvents(viewProps, events, { pseudos }, setStateShallow) {\n if (process.env.TAMAGUI_TARGET === 'native') {\n const attachFocus = !!pseudos?.focusStyle\n if (attachFocus) {\n viewProps.onFocus = mergeEvent(viewProps.onFocus, () => {\n setStateShallow({ focus: true })\n })\n viewProps.onBlur = mergeEvent(viewProps.onBlur, () => {\n setStateShallow({ focus: false })\n })\n }\n\n // use Pressability to get smooth unPress when you press + hold + move out\n // only ever create once, use .configure() to update later\n const pressability = usePressability(\n events ? { ...events, hitSlop: viewProps.hitSlop } : {}\n )\n if (events?.onPress) {\n for (const key in pressability) {\n const og = viewProps[key]\n const val = pressability[key]\n viewProps[key] =\n og && !dontComposePressabilityKeys[key] ? composeEventHandlers(og, val) : val\n }\n }\n }\n },\n})\n\nconst dontComposePressabilityKeys = {\n onClick: true,\n}\n"],
5
- "mappings": "AAAA,OAAS,sBAAAA,MAA0B,6CACnC,OAME,SAASC,EACT,QAAQC,EACR,wBAAAC,EACA,SAAAC,EACA,cAAAC,EACA,cAAAC,MACK,eAIP,OAAS,oBAAAC,MAAwB,2BACjC,OAAS,sBAAAC,MAA0B,6BAEnC,OAAS,mBAAAC,MAAuB,wBAGhC,WAAc,eAIP,MAAMC,EAAQT,EAMRU,EAAOT,EAQpBI,EAAW,CACT,cAAe,CACb,MAAMM,EAAS,QAAQ,cAAc,EACrC,MAAO,CACL,KAAMA,EAAO,MAAQA,EAAO,QAAQ,KACpC,KAAMA,EAAO,MAAQA,EAAO,QAAQ,IACtC,CACF,EAEA,kBAAkBC,EAAaC,EAASC,EAAS,CAE/C,KAAM,CAEJ,yBAAAC,EACA,gCAAAC,EACA,eAAAC,EACA,iBAAAC,EACA,gBAAAC,EACA,kBAAAC,EACA,mBAAAC,EACA,iBAAAC,EACA,qBAAAC,EACA,8BAAAC,EACA,2BAAAC,EACA,kCAAAC,EACA,oCAAAC,EACA,2CAAAC,EACA,0BAAAC,EACA,iCAAAC,EAGA,YAAAC,EACA,UAAAC,EAGA,WAAAC,EACA,sBAAAC,EAEA,SAAAC,EACA,UAAAC,EAEA,GAAGC,CACL,EAAIxB,EA2BJ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ACDR,EAAU,OAASjC,EAAWiC,EAAU,OAAQ,IAAM,CACpDQ,EAAgB,CAAE,MAAO,EAAM,CAAC,CAClC,CAAC,GAKH,MAAMC,EAAetC,EACnBmC,EAAS,CAAE,GAAGA,EAAQ,QAASN,EAAU,OAAQ,EAAI,CAAC,CACxD,EACA,GAAIM,GAAA,MAAAA,EAAQ,QACV,UAAWI,KAAOD,EAAc,CAC9B,MAAME,EAAKX,EAAUU,CAAG,EAClBE,EAAMH,EAAaC,CAAG,EAC5BV,EAAUU,CAAG,EACXC,GAAM,CAACE,EAA4BH,CAAG,EAAI7C,EAAqB8C,EAAIC,CAAG,EAAIA,CAC9E,CAEJ,CACF,CACF,CAAC,EAED,MAAMC,EAA8B,CAClC,QAAS,EACX",
6
- "names": ["useResponderEvents", "WebStack", "WebText", "composeEventHandlers", "isRSC", "mergeEvent", "setupHooks", "useElementLayout", "usePlatformMethods", "usePressability", "Stack", "Text", "native", "elementType", "propsIn", "hostRef", "onMoveShouldSetResponder", "onMoveShouldSetResponderCapture", "onResponderEnd", "onResponderGrant", "onResponderMove", "onResponderReject", "onResponderRelease", "onResponderStart", "onResponderTerminate", "onResponderTerminationRequest", "onScrollShouldSetResponder", "onScrollShouldSetResponderCapture", "onSelectionChangeShouldSetResponder", "onSelectionChangeShouldSetResponderCapture", "onStartShouldSetResponder", "onStartShouldSetResponderCapture", "collapsable", "focusable", "accessible", "accessibilityDisabled", "onLayout", "hrefAttrs", "viewProps", "download", "rel", "target", "_focusable", "role", "events", "pseudos", "setStateShallow", "pressability", "key", "og", "val", "dontComposePressabilityKeys"]
5
+ "mappings": "AAAA,SAAS,0BAA0B;AACnC;AAAA,EAME,SAAS;AAAA,EACT,QAAQ;AAAA,EACR;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAIP,SAAS,wBAAwB;AACjC,SAAS,0BAA0B;AAEnC,SAAS,uBAAuB;AAGhC,cAAc;AAIP,MAAM,QAAQ;AAMd,MAAM,OAAO;AAQpB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X;",
6
+ "names": []
7
7
  }
@@ -1,2 +1,16 @@
1
- const n={},i=({filePath:e,css:c})=>{let s=n[e];if(!s){const t=document.createElement("style");t.setAttribute("data-file",e),t.setAttribute("type","text/css"),s=n[e]=t,document.head.appendChild(t)}s.innerHTML=c};export{i as injectStyles};
1
+ const stylesheets = {};
2
+ const injectStyles = ({ filePath, css }) => {
3
+ let stylesheet = stylesheets[filePath];
4
+ if (!stylesheet) {
5
+ const styleEl = document.createElement("style");
6
+ styleEl.setAttribute("data-file", filePath);
7
+ styleEl.setAttribute("type", "text/css");
8
+ stylesheet = stylesheets[filePath] = styleEl;
9
+ document.head.appendChild(styleEl);
10
+ }
11
+ stylesheet.innerHTML = css;
12
+ };
13
+ export {
14
+ injectStyles
15
+ };
2
16
  //# sourceMappingURL=inject-styles.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/inject-styles.ts"],
4
4
  "sourcesContent": ["// for vite dev mode\n\nconst stylesheets: Record<string, HTMLElement> = {}\n\ninterface InjectStylesOptions {\n filePath: string\n css: string\n}\n\nexport const injectStyles = ({ filePath, css }: InjectStylesOptions) => {\n let stylesheet = stylesheets[filePath]\n if (!stylesheet) {\n const styleEl = document.createElement('style')\n styleEl.setAttribute('data-file', filePath)\n styleEl.setAttribute('type', 'text/css')\n stylesheet = stylesheets[filePath] = styleEl\n document.head.appendChild(styleEl)\n }\n stylesheet.innerHTML = css\n}\n"],
5
- "mappings": "AAEA,MAAMA,EAA2C,CAAC,EAOrCC,EAAe,CAAC,CAAE,SAAAC,EAAU,IAAAC,CAAI,IAA2B,CACtE,IAAIC,EAAaJ,EAAYE,CAAQ,EACrC,GAAI,CAACE,EAAY,CACf,MAAMC,EAAU,SAAS,cAAc,OAAO,EAC9CA,EAAQ,aAAa,YAAaH,CAAQ,EAC1CG,EAAQ,aAAa,OAAQ,UAAU,EACvCD,EAAaJ,EAAYE,CAAQ,EAAIG,EACrC,SAAS,KAAK,YAAYA,CAAO,CACnC,CACAD,EAAW,UAAYD,CACzB",
6
- "names": ["stylesheets", "injectStyles", "filePath", "css", "stylesheet", "styleEl"]
5
+ "mappings": "AAEA,MAAM,cAA2C,CAAC;AAO3C,MAAM,eAAe,CAAC,EAAE,UAAU,IAAI,MAA2B;AACtE,MAAI,aAAa,YAAY,QAAQ;AACrC,MAAI,CAAC,YAAY;AACf,UAAM,UAAU,SAAS,cAAc,OAAO;AAC9C,YAAQ,aAAa,aAAa,QAAQ;AAC1C,YAAQ,aAAa,QAAQ,UAAU;AACvC,iBAAa,YAAY,QAAQ,IAAI;AACrC,aAAS,KAAK,YAAY,OAAO;AAAA,EACnC;AACA,aAAW,YAAY;AACzB;",
6
+ "names": []
7
7
  }
@@ -1,2 +1,16 @@
1
- const n={},i=({filePath:e,css:c})=>{let s=n[e];if(!s){const t=document.createElement("style");t.setAttribute("data-file",e),t.setAttribute("type","text/css"),s=n[e]=t,document.head.appendChild(t)}s.innerHTML=c};export{i as injectStyles};
1
+ const stylesheets = {};
2
+ const injectStyles = ({ filePath, css }) => {
3
+ let stylesheet = stylesheets[filePath];
4
+ if (!stylesheet) {
5
+ const styleEl = document.createElement("style");
6
+ styleEl.setAttribute("data-file", filePath);
7
+ styleEl.setAttribute("type", "text/css");
8
+ stylesheet = stylesheets[filePath] = styleEl;
9
+ document.head.appendChild(styleEl);
10
+ }
11
+ stylesheet.innerHTML = css;
12
+ };
13
+ export {
14
+ injectStyles
15
+ };
2
16
  //# sourceMappingURL=inject-styles.mjs.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/inject-styles.ts"],
4
4
  "sourcesContent": ["// for vite dev mode\n\nconst stylesheets: Record<string, HTMLElement> = {}\n\ninterface InjectStylesOptions {\n filePath: string\n css: string\n}\n\nexport const injectStyles = ({ filePath, css }: InjectStylesOptions) => {\n let stylesheet = stylesheets[filePath]\n if (!stylesheet) {\n const styleEl = document.createElement('style')\n styleEl.setAttribute('data-file', filePath)\n styleEl.setAttribute('type', 'text/css')\n stylesheet = stylesheets[filePath] = styleEl\n document.head.appendChild(styleEl)\n }\n stylesheet.innerHTML = css\n}\n"],
5
- "mappings": "AAEA,MAAMA,EAA2C,CAAC,EAOrCC,EAAe,CAAC,CAAE,SAAAC,EAAU,IAAAC,CAAI,IAA2B,CACtE,IAAIC,EAAaJ,EAAYE,CAAQ,EACrC,GAAI,CAACE,EAAY,CACf,MAAMC,EAAU,SAAS,cAAc,OAAO,EAC9CA,EAAQ,aAAa,YAAaH,CAAQ,EAC1CG,EAAQ,aAAa,OAAQ,UAAU,EACvCD,EAAaJ,EAAYE,CAAQ,EAAIG,EACrC,SAAS,KAAK,YAAYA,CAAO,CACnC,CACAD,EAAW,UAAYD,CACzB",
6
- "names": ["stylesheets", "injectStyles", "filePath", "css", "stylesheet", "styleEl"]
5
+ "mappings": "AAEA,MAAM,cAA2C,CAAC;AAO3C,MAAM,eAAe,CAAC,EAAE,UAAU,IAAI,MAA2B;AACtE,MAAI,aAAa,YAAY,QAAQ;AACrC,MAAI,CAAC,YAAY;AACf,UAAM,UAAU,SAAS,cAAc,OAAO;AAC9C,YAAQ,aAAa,aAAa,QAAQ;AAC1C,YAAQ,aAAa,QAAQ,UAAU;AACvC,iBAAa,YAAY,QAAQ,IAAI;AACrC,aAAS,KAAK,YAAY,OAAO;AAAA,EACnC;AACA,aAAW,YAAY;AACzB;",
6
+ "names": []
7
7
  }
@@ -1,2 +1,7 @@
1
- const s={},t={};export{s as Pressability,t as usePressability};
1
+ const Pressability = {};
2
+ const usePressability = {};
3
+ export {
4
+ Pressability,
5
+ usePressability
6
+ };
2
7
  //# sourceMappingURL=Pressability.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/vendor/Pressability.tsx"],
4
4
  "sourcesContent": ["export const Pressability = {} as any\nexport const usePressability = {} as Function\n"],
5
- "mappings": "AAAO,MAAMA,EAAe,CAAC,EAChBC,EAAkB,CAAC",
6
- "names": ["Pressability", "usePressability"]
5
+ "mappings": "AAAO,MAAM,eAAe,CAAC;AACtB,MAAM,kBAAkB,CAAC;",
6
+ "names": []
7
7
  }
@@ -1,2 +1,7 @@
1
- const s={},t={};export{s as Pressability,t as usePressability};
1
+ const Pressability = {};
2
+ const usePressability = {};
3
+ export {
4
+ Pressability,
5
+ usePressability
6
+ };
2
7
  //# sourceMappingURL=Pressability.mjs.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/vendor/Pressability.tsx"],
4
4
  "sourcesContent": ["export const Pressability = {} as any\nexport const usePressability = {} as Function\n"],
5
- "mappings": "AAAO,MAAMA,EAAe,CAAC,EAChBC,EAAkB,CAAC",
6
- "names": ["Pressability", "usePressability"]
5
+ "mappings": "AAAO,MAAM,eAAe,CAAC;AACtB,MAAM,kBAAkB,CAAC;",
6
+ "names": []
7
7
  }
@@ -1,2 +1,7 @@
1
- const e=require("react-native/Libraries/Pressability/Pressability").default,r=require("react-native/Libraries/Pressability/usePressability").default;export{e as Pressability,r as usePressability};
1
+ const Pressability = require("react-native/Libraries/Pressability/Pressability").default;
2
+ const usePressability = require("react-native/Libraries/Pressability/usePressability").default;
3
+ export {
4
+ Pressability,
5
+ usePressability
6
+ };
2
7
  //# sourceMappingURL=Pressability.native.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/vendor/Pressability.native.tsx"],
4
4
  "sourcesContent": ["export const Pressability =\n require('react-native/Libraries/Pressability/Pressability').default\nexport const usePressability =\n require('react-native/Libraries/Pressability/usePressability').default\n"],
5
- "mappings": "AAAO,MAAMA,EACX,QAAQ,kDAAkD,EAAE,QACjDC,EACX,QAAQ,qDAAqD,EAAE",
6
- "names": ["Pressability", "usePressability"]
5
+ "mappings": "AAAO,MAAM,eACX,QAAQ,kDAAkD,EAAE;AACvD,MAAM,kBACX,QAAQ,qDAAqD,EAAE;",
6
+ "names": []
7
7
  }
@@ -1,2 +1,7 @@
1
- const e=require("react-native/Libraries/Pressability/Pressability").default,r=require("react-native/Libraries/Pressability/usePressability").default;export{e as Pressability,r as usePressability};
1
+ const Pressability = require("react-native/Libraries/Pressability/Pressability").default;
2
+ const usePressability = require("react-native/Libraries/Pressability/usePressability").default;
3
+ export {
4
+ Pressability,
5
+ usePressability
6
+ };
2
7
  //# sourceMappingURL=Pressability.native.mjs.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/vendor/Pressability.native.tsx"],
4
4
  "sourcesContent": ["export const Pressability =\n require('react-native/Libraries/Pressability/Pressability').default\nexport const usePressability =\n require('react-native/Libraries/Pressability/usePressability').default\n"],
5
- "mappings": "AAAO,MAAMA,EACX,QAAQ,kDAAkD,EAAE,QACjDC,EACX,QAAQ,qDAAqD,EAAE",
6
- "names": ["Pressability", "usePressability"]
5
+ "mappings": "AAAO,MAAM,eACX,QAAQ,kDAAkD,EAAE;AACvD,MAAM,kBACX,QAAQ,qDAAqD,EAAE;",
6
+ "names": []
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/core",
3
- "version": "1.14.0",
3
+ "version": "1.14.2",
4
4
  "source": "src/index.ts",
5
5
  "main": "dist/cjs",
6
6
  "module": "dist/esm",
@@ -28,16 +28,16 @@
28
28
  "reset.css"
29
29
  ],
30
30
  "dependencies": {
31
- "@tamagui/react-native-use-pressable": "1.14.0",
32
- "@tamagui/react-native-use-responder-events": "1.14.0",
33
- "@tamagui/use-event": "1.14.0",
34
- "@tamagui/web": "1.14.0"
31
+ "@tamagui/react-native-use-pressable": "1.14.2",
32
+ "@tamagui/react-native-use-responder-events": "1.14.2",
33
+ "@tamagui/use-event": "1.14.2",
34
+ "@tamagui/web": "1.14.2"
35
35
  },
36
36
  "peerDependencies": {
37
37
  "react": "*"
38
38
  },
39
39
  "devDependencies": {
40
- "@tamagui/build": "1.14.0",
40
+ "@tamagui/build": "1.14.2",
41
41
  "@testing-library/react": "^13.4.0",
42
42
  "csstype": "^3.0.10",
43
43
  "react": "^18.2.0",