diff --git a/example/storybook-nativewind/package.json b/example/storybook-nativewind/package.json index d4ed516187..1a25e88dc7 100644 --- a/example/storybook-nativewind/package.json +++ b/example/storybook-nativewind/package.json @@ -27,7 +27,7 @@ "@expo/html-elements": "^0.4.2", "@expo/webpack-config": "^0.17.2", "@geometricpanda/storybook-addon-iframe": "^0.2.2", - "@gluestack-style/react": "^1.0.53", + "@gluestack-style/react": "^1.0.54", "@gluestack-ui/config": "^1.1.17", "@gluestack-ui/themed": "^1.1.22", "@gluestack/design-system": "^0.5.36", diff --git a/example/storybook-nativewind/src/core-components/nativewind/box/styles.tsx b/example/storybook-nativewind/src/core-components/nativewind/box/styles.tsx index 1e7fa67f63..760e8fffa1 100644 --- a/example/storybook-nativewind/src/core-components/nativewind/box/styles.tsx +++ b/example/storybook-nativewind/src/core-components/nativewind/box/styles.tsx @@ -1,10 +1,10 @@ import { tva } from '@gluestack-ui/nativewind-utils/tva'; -import { Platform } from 'react-native'; +import { isWeb } from '@gluestack-ui/nativewind-utils/IsWeb'; + +const baseStyle = isWeb + ? 'flex flex-col relative z-0 box-border border-0 list-none min-w-0 min-h-0 bg-transparent items-stretch m-0 p-0 text-decoration-none' + : ''; -const baseStyle = Platform.select({ - web: 'flex flex-col relative z-0 box-border border-0 list-none min-w-0 min-h-0 bg-transparent items-stretch m-0 p-0 text-decoration-none', - default: '', -}); export const boxStyle = tva({ base: baseStyle, }); diff --git a/example/storybook-nativewind/src/core-components/nativewind/card/styles.tsx b/example/storybook-nativewind/src/core-components/nativewind/card/styles.tsx index 36576b8b64..59de8b7eb7 100644 --- a/example/storybook-nativewind/src/core-components/nativewind/card/styles.tsx +++ b/example/storybook-nativewind/src/core-components/nativewind/card/styles.tsx @@ -1,9 +1,7 @@ import { tva } from '@gluestack-ui/nativewind-utils/tva'; -import { Platform } from 'react-native'; -const baseStyle = Platform.select({ - web: 'flex flex-col relative z-0', - default: '', -}); +import { isWeb } from '@gluestack-ui/nativewind-utils/IsWeb'; +const baseStyle = isWeb ? 'flex flex-col relative z-0' : ''; + export const cardStyle = tva({ base: baseStyle, variants: { diff --git a/example/storybook-nativewind/src/core-components/nativewind/center/styles.tsx b/example/storybook-nativewind/src/core-components/nativewind/center/styles.tsx index 33d2cfc70d..8b744bc250 100644 --- a/example/storybook-nativewind/src/core-components/nativewind/center/styles.tsx +++ b/example/storybook-nativewind/src/core-components/nativewind/center/styles.tsx @@ -1,9 +1,8 @@ import { tva } from '@gluestack-ui/nativewind-utils/tva'; -import { Platform } from 'react-native'; -const baseStyle = Platform.select({ - web: 'flex flex-col relative z-0', - default: '', -}); +import { isWeb } from '@gluestack-ui/nativewind-utils/IsWeb'; + +const baseStyle = isWeb ? 'flex flex-col relative z-0' : ''; + export const centerStyle = tva({ base: `justify-center items-center ${baseStyle}`, }); diff --git a/example/storybook-nativewind/src/core-components/nativewind/heading/styles.tsx b/example/storybook-nativewind/src/core-components/nativewind/heading/styles.tsx index 2e657c2b65..484165bd70 100644 --- a/example/storybook-nativewind/src/core-components/nativewind/heading/styles.tsx +++ b/example/storybook-nativewind/src/core-components/nativewind/heading/styles.tsx @@ -1,10 +1,9 @@ import { tva } from '@gluestack-ui/nativewind-utils/tva'; -import { Platform } from 'react-native'; -const baseStyle = Platform.select({ - web: 'font-sans tracking-sm bg-transparent border-0 box-border display-inline list-none margin-0 padding-0 position-relative text-start no-underline whitespace-pre-wrap word-wrap-break-word', - default: '', -}); +import { isWeb } from '@gluestack-ui/nativewind-utils/IsWeb'; +const baseStyle = isWeb + ? 'font-sans tracking-sm bg-transparent border-0 box-border display-inline list-none margin-0 padding-0 position-relative text-start no-underline whitespace-pre-wrap word-wrap-break-word' + : ''; export const headingStyle = tva({ base: `text-typography-900 font-bold font-heading tracking-sm my-0 ${baseStyle}`, diff --git a/example/storybook-nativewind/src/core-components/nativewind/hstack/styles.tsx b/example/storybook-nativewind/src/core-components/nativewind/hstack/styles.tsx index aa48b61229..f02fb7cbe5 100644 --- a/example/storybook-nativewind/src/core-components/nativewind/hstack/styles.tsx +++ b/example/storybook-nativewind/src/core-components/nativewind/hstack/styles.tsx @@ -1,9 +1,10 @@ +import { isWeb } from '@gluestack-ui/nativewind-utils/IsWeb'; import { tva } from '@gluestack-ui/nativewind-utils/tva'; -import { Platform } from 'react-native'; -const baseStyle = Platform.select({ - web: 'flex relative z-0 box-border border-0 list-none min-w-0 min-h-0 bg-transparent items-stretch m-0 p-0 text-decoration-none', - default: '', -}); + +const baseStyle = isWeb + ? 'flex relative z-0 box-border border-0 list-none min-w-0 min-h-0 bg-transparent items-stretch m-0 p-0 text-decoration-none' + : ''; + export const hstackStyle = tva({ base: `flex-row ${baseStyle}`, variants: { diff --git a/example/storybook-nativewind/src/core-components/nativewind/input/index.tsx b/example/storybook-nativewind/src/core-components/nativewind/input/index.tsx index bcef62cde0..0bdb447682 100644 --- a/example/storybook-nativewind/src/core-components/nativewind/input/index.tsx +++ b/example/storybook-nativewind/src/core-components/nativewind/input/index.tsx @@ -95,7 +95,7 @@ const inputSlotStyle = tva({ }); const inputFieldStyle = tva({ - base: 'flex-1 text-typography-900 web:cursor-text web:data-[disabled=true]:cursor-not-allowed py-auto px-3 placeholder:text-typography-500 h-full', + base: 'flex-1 text-typography-900 py-auto px-3 placeholder:text-typography-500 h-full ios:leading-[0px] web:cursor-text web:data-[disabled=true]:cursor-not-allowed', parentVariants: { variant: { @@ -105,17 +105,17 @@ const inputFieldStyle = tva({ }, size: { - '2xs': 'text-2xs leading-[0px]', - 'xs': 'text-xs leading-[0px]', - 'sm': 'text-sm leading-[0px]', - 'md': 'text-base leading-[0px]', - 'lg': 'text-lg leading-[0px]', - 'xl': 'text-xl leading-[0px]', - '2xl': 'text-2xl leading-[0px]', - '3xl': 'text-3xl leading-[0px]', - '4xl': 'text-4xl leading-[0px]', - '5xl': 'text-5xl leading-[0px]', - '6xl': 'text-6xl leading-[0px]', + '2xs': 'text-2xs', + 'xs': 'text-xs', + 'sm': 'text-sm', + 'md': 'text-base', + 'lg': 'text-lg', + 'xl': 'text-xl', + '2xl': 'text-2xl', + '3xl': 'text-3xl', + '4xl': 'text-4xl', + '5xl': 'text-5xl', + '6xl': 'text-6xl', }, }, }); diff --git a/example/storybook-nativewind/src/core-components/nativewind/text/styles.tsx b/example/storybook-nativewind/src/core-components/nativewind/text/styles.tsx index 22ade1157f..d590f0efed 100644 --- a/example/storybook-nativewind/src/core-components/nativewind/text/styles.tsx +++ b/example/storybook-nativewind/src/core-components/nativewind/text/styles.tsx @@ -1,10 +1,9 @@ import { tva } from '@gluestack-ui/nativewind-utils/tva'; -import { Platform } from 'react-native'; +import { isWeb } from '@gluestack-ui/nativewind-utils/IsWeb'; -const baseStyle = Platform.select({ - web: 'font-sans tracking-sm my-0 bg-transparent border-0 box-border display-inline list-none margin-0 padding-0 position-relative text-start no-underline whitespace-pre-wrap word-wrap-break-word', - default: '', -}); +const baseStyle = isWeb + ? 'font-sans tracking-sm my-0 bg-transparent border-0 box-border display-inline list-none margin-0 padding-0 position-relative text-start no-underline whitespace-pre-wrap word-wrap-break-word' + : ''; export const textStyle = tva({ base: `text-typography-700 font-normal font-body ${baseStyle}`, diff --git a/example/storybook-nativewind/src/core-components/nativewind/vstack/styles.tsx b/example/storybook-nativewind/src/core-components/nativewind/vstack/styles.tsx index f2777feb7e..abc5dbe02c 100644 --- a/example/storybook-nativewind/src/core-components/nativewind/vstack/styles.tsx +++ b/example/storybook-nativewind/src/core-components/nativewind/vstack/styles.tsx @@ -1,9 +1,10 @@ +import { isWeb } from '@gluestack-ui/nativewind-utils/IsWeb'; import { tva } from '@gluestack-ui/nativewind-utils/tva'; -import { Platform } from 'react-native'; -const baseStyle = Platform.select({ - web: 'flex flex-col relative z-0 box-border border-0 list-none min-w-0 min-h-0 bg-transparent items-stretch m-0 p-0 text-decoration-none', - default: '', -}); + +const baseStyle = isWeb + ? 'flex flex-col relative z-0 box-border border-0 list-none min-w-0 min-h-0 bg-transparent items-stretch m-0 p-0 text-decoration-none' + : ''; + export const vstackStyle = tva({ base: `flex-col ${baseStyle}`, variants: { diff --git a/packages/config/package.json b/packages/config/package.json index a82ba142d3..0c56cc1ddc 100644 --- a/packages/config/package.json +++ b/packages/config/package.json @@ -37,7 +37,7 @@ "@expo/html-elements": "latest", "@gluestack-style/animation-resolver": "1.0.4", "@gluestack-style/legend-motion-animation-driver": "1.0.3", - "@gluestack-style/react": "1.0.53", + "@gluestack-style/react": "1.0.54", "@gluestack-ui/accordion": "1.0.4", "@gluestack-ui/actionsheet": "0.2.41", "@gluestack-ui/alert": "0.1.13", @@ -72,7 +72,7 @@ "@legendapp/motion": "latest" }, "peerDependencies": { - "@gluestack-style/react": ">=1.0", + "@gluestack-style/react": ">=1.0.54", "@gluestack-ui/themed": ">=1.1.22" }, "release-it": { diff --git a/packages/nativewind/utils/IsWeb/index.d.ts b/packages/nativewind/utils/IsWeb/index.d.ts new file mode 100644 index 0000000000..dfa95a9e0d --- /dev/null +++ b/packages/nativewind/utils/IsWeb/index.d.ts @@ -0,0 +1 @@ +export declare const isWeb = false; diff --git a/packages/nativewind/utils/IsWeb/index.js b/packages/nativewind/utils/IsWeb/index.js new file mode 100644 index 0000000000..19da7e3e9f --- /dev/null +++ b/packages/nativewind/utils/IsWeb/index.js @@ -0,0 +1 @@ +export const isWeb = false; diff --git a/packages/nativewind/utils/IsWeb/index.ts b/packages/nativewind/utils/IsWeb/index.ts new file mode 100644 index 0000000000..19da7e3e9f --- /dev/null +++ b/packages/nativewind/utils/IsWeb/index.ts @@ -0,0 +1 @@ +export const isWeb = false; diff --git a/packages/nativewind/utils/IsWeb/index.web.d.ts b/packages/nativewind/utils/IsWeb/index.web.d.ts new file mode 100644 index 0000000000..e62afcc1a6 --- /dev/null +++ b/packages/nativewind/utils/IsWeb/index.web.d.ts @@ -0,0 +1 @@ +export declare const isWeb = true; diff --git a/packages/nativewind/utils/IsWeb/index.web.js b/packages/nativewind/utils/IsWeb/index.web.js new file mode 100644 index 0000000000..186be93599 --- /dev/null +++ b/packages/nativewind/utils/IsWeb/index.web.js @@ -0,0 +1 @@ +export const isWeb = true; diff --git a/packages/nativewind/utils/IsWeb/index.web.ts b/packages/nativewind/utils/IsWeb/index.web.ts new file mode 100644 index 0000000000..186be93599 --- /dev/null +++ b/packages/nativewind/utils/IsWeb/index.web.ts @@ -0,0 +1 @@ +export const isWeb = true; diff --git a/packages/nativewind/utils/cn/index.js b/packages/nativewind/utils/cn/index.js index 2861741ab5..3798c2f9b4 100644 --- a/packages/nativewind/utils/cn/index.js +++ b/packages/nativewind/utils/cn/index.js @@ -1,5 +1,5 @@ import clsx from 'clsx'; import { twMerge } from 'tailwind-merge'; export function cn(...inputs) { - return twMerge(clsx(inputs)); + return twMerge(clsx(inputs)); } diff --git a/packages/nativewind/utils/context/index.d.ts b/packages/nativewind/utils/context/index.d.ts index 6a8942739c..e29888263a 100644 --- a/packages/nativewind/utils/context/index.d.ts +++ b/packages/nativewind/utils/context/index.d.ts @@ -1,3 +1,3 @@ /// -export declare const ParentContext: import('react').Context<{}>; +export declare const ParentContext: import("react").Context<{}>; export declare const useParentContext: () => any; diff --git a/packages/nativewind/utils/context/index.js b/packages/nativewind/utils/context/index.js index b0693066f2..66461e76d8 100644 --- a/packages/nativewind/utils/context/index.js +++ b/packages/nativewind/utils/context/index.js @@ -2,5 +2,5 @@ import { createContext, useContext } from 'react'; export const ParentContext = createContext({}); export const useParentContext = () => { - return useContext(ParentContext); + return useContext(ParentContext); }; diff --git a/packages/nativewind/utils/cssInterop/index.js b/packages/nativewind/utils/cssInterop/index.js index 44b0cd8f3e..250e770d24 100644 --- a/packages/nativewind/utils/cssInterop/index.js +++ b/packages/nativewind/utils/cssInterop/index.js @@ -1,2 +1,2 @@ -const cssInterop = (_A, _B) => {}; +const cssInterop = (_A, _B) => { }; export { cssInterop }; diff --git a/packages/nativewind/utils/flush/index.d.ts b/packages/nativewind/utils/flush/index.d.ts index 87cdb01cbb..19fa29f156 100644 --- a/packages/nativewind/utils/flush/index.d.ts +++ b/packages/nativewind/utils/flush/index.d.ts @@ -1,12 +1,9 @@ import React from 'react'; -export declare function flush(): React.DetailedReactHTMLElement< - { +export declare function flush(): React.DetailedReactHTMLElement<{ id: string; key: string; dangerouslySetInnerHTML: { - __html: string; + __html: string; }; - }, - HTMLElement ->; +}, HTMLElement>; export declare function setFlushStyles(styles: any): void; diff --git a/packages/nativewind/utils/flush/index.js b/packages/nativewind/utils/flush/index.js index 1715affb9a..3b0148a2ad 100644 --- a/packages/nativewind/utils/flush/index.js +++ b/packages/nativewind/utils/flush/index.js @@ -1,14 +1,14 @@ import React from 'react'; var flushStyles = ''; export function flush() { - return React.createElement('style', { - id: 'nativewind-style', - key: 'nativewind-style', - dangerouslySetInnerHTML: { - __html: flushStyles, - }, - }); + return React.createElement('style', { + id: 'nativewind-style', + key: 'nativewind-style', + dangerouslySetInnerHTML: { + __html: flushStyles, + }, + }); } export function setFlushStyles(styles) { - flushStyles = styles; + flushStyles = styles; } diff --git a/packages/nativewind/utils/package.json b/packages/nativewind/utils/package.json index e4f2829c4c..f8912b3df4 100644 --- a/packages/nativewind/utils/package.json +++ b/packages/nativewind/utils/package.json @@ -17,7 +17,7 @@ "main": "index.js", "module": "index.js", "types": "index.d.ts", - "version": "1.0.6", + "version": "1.0.11-alpha.0", "react-native": "src/index", "source": "src/index", "scripts": { @@ -26,11 +26,13 @@ "remove": "rm -rf ../../../node_modules/react-native-css-interop", "clean": "rm -rf lib", "dev:web": "cd example/native && yarn web --clear", - "storybook": "cd example/native/storybook && yarn web" + "storybook": "cd example/native/storybook && yarn web", + "postinstall": "node ./scripts/test.js" }, "devDependencies": { "@types/react": "^18.0.22", "babel-plugin-transform-remove-console": "^6.9.4", + "patch-package": "^8.0.0", "react": "^18.1.0", "react-native-builder-bob": "^0.20.1", "tsconfig": "7", @@ -41,6 +43,7 @@ "tailwind-variants": "^0.1.20" }, "peerDependencies": { + "patch-package": ">=8", "react": ">=16" }, "react-native-builder-bob": { @@ -68,7 +71,9 @@ "withStyleContext", "withStyleContextAndStates", "cssInterop", - "flush" + "flush", + "scripts", + "IsWeb" ], "jest": { "preset": "jest-expo", diff --git a/packages/nativewind/utils/scripts/patches/react-native-css-interop+0.0.36.patch b/packages/nativewind/utils/scripts/patches/react-native-css-interop+0.0.36.patch new file mode 100644 index 0000000000..139276de40 --- /dev/null +++ b/packages/nativewind/utils/scripts/patches/react-native-css-interop+0.0.36.patch @@ -0,0 +1,346 @@ +diff --git a/node_modules/react-native-css-interop/dist/runtime/api.d.ts b/node_modules/react-native-css-interop/dist/runtime/api.d.ts +index 05c3461..0e94bc5 100644 +--- a/node_modules/react-native-css-interop/dist/runtime/api.d.ts ++++ b/node_modules/react-native-css-interop/dist/runtime/api.d.ts +@@ -1 +1,2 @@ + export * from "./web/api"; ++export * from "./web/interopComponentsMap"; +diff --git a/node_modules/react-native-css-interop/dist/runtime/api.js b/node_modules/react-native-css-interop/dist/runtime/api.js +index d532aa8..340d8fd 100644 +--- a/node_modules/react-native-css-interop/dist/runtime/api.js ++++ b/node_modules/react-native-css-interop/dist/runtime/api.js +@@ -15,4 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) { + }; + Object.defineProperty(exports, "__esModule", { value: true }); + __exportStar(require("./web/api"), exports); ++__exportStar(require("./web/interopComponentsMap"), exports); + //# sourceMappingURL=api.js.map +\ No newline at end of file +diff --git a/node_modules/react-native-css-interop/dist/runtime/api.js.map b/node_modules/react-native-css-interop/dist/runtime/api.js.map +index 7825b53..c59fa3b 100644 +--- a/node_modules/react-native-css-interop/dist/runtime/api.js.map ++++ b/node_modules/react-native-css-interop/dist/runtime/api.js.map +@@ -1 +1 @@ +-{"version":3,"file":"api.js","sourceRoot":"","sources":["../../src/runtime/api.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B"} +\ No newline at end of file ++{"version":3,"file":"api.js","sourceRoot":"","sources":["../../src/runtime/api.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,6DAA2C"} +\ No newline at end of file +diff --git a/node_modules/react-native-css-interop/dist/runtime/components.js b/node_modules/react-native-css-interop/dist/runtime/components.js +index c4832b0..63aa94e 100644 +--- a/node_modules/react-native-css-interop/dist/runtime/components.js ++++ b/node_modules/react-native-css-interop/dist/runtime/components.js +@@ -1,4 +1,5 @@ + "use strict"; ++"use client"; + Object.defineProperty(exports, "__esModule", { value: true }); + const react_native_1 = require("react-native"); + const api_1 = require("./api"); +diff --git a/node_modules/react-native-css-interop/dist/runtime/components.js.map b/node_modules/react-native-css-interop/dist/runtime/components.js.map +index 0101386..9549388 100644 +--- a/node_modules/react-native-css-interop/dist/runtime/components.js.map ++++ b/node_modules/react-native-css-interop/dist/runtime/components.js.map +@@ -1 +1 @@ +-{"version":3,"file":"components.js","sourceRoot":"","sources":["../../src/runtime/components.ts"],"names":[],"mappings":";;AAAA,+CAkBsB;AAEtB,+BAA+C;AAE/C,IAAA,gBAAU,EAAC,oBAAK,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,CAAC;AAC1C,IAAA,gBAAU,EAAC,wBAAS,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,CAAC;AAC9C,IAAA,gBAAU,EAAC,2BAAY,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,CAAC;AACjD,IAAA,gBAAU,EAAC,qBAAM,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,CAAC;AAC3C,IAAA,gBAAU,EAAC,mBAAI,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,CAAC;AACzC,IAAA,gBAAU,EAAC,iCAAkB,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,CAAC;AACvD,IAAA,gBAAU,EAAC,+BAAgB,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,CAAC;AACrD,IAAA,gBAAU,EAAC,uCAAwB,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,CAAC;AAC7D,IAAA,gBAAU,EAAC,mBAAI,EAAE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AACH,IAAA,gBAAU,EAAC,yBAAU,EAAE;IACrB,SAAS,EAAE,OAAO;IAClB,yBAAyB,EAAE,uBAAuB;IAClD,kBAAkB,EAAE,gBAAgB;CACrC,CAAC,CAAC;AACH,IAAA,gBAAU,EAAC,wBAAS,EAAE;IACpB,SAAS,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,iBAAiB,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE;CACvE,CAAC,CAAC;AAEH,IAAA,gBAAU,EAAC,uBAAQ,EAAE;IACnB,SAAS,EAAE,OAAO;IAClB,4BAA4B,EAAE,0BAA0B;IACxD,4BAA4B,EAAE,0BAA0B;IACxD,sBAAsB,EAAE,oBAAoB;IAC5C,yBAAyB,EAAE,uBAAuB;IAClD,kBAAkB,EAAE,gBAAgB;CACrC,CAAC,CAAC;AACH,IAAA,gBAAU,EAAC,8BAAe,EAAE;IAC1B,SAAS,EAAE,OAAO;IAClB,cAAc,EAAE,YAAY;CAC7B,CAAC,CAAC;AACH,IAAA,gBAAU,EAAC,mCAAoB,EAAE;IAC/B,SAAS,EAAE,OAAO;IAClB,yBAAyB,EAAE,uBAAuB;CACnD,CAAC,CAAC;AACH,IAAA,gBAAU,EAAC,8BAAe,EAAE;IAC1B,SAAS,EAAE,OAAO;IAClB,4BAA4B,EAAE,0BAA0B;IACxD,4BAA4B,EAAE,0BAA0B;IACxD,yBAAyB,EAAE,uBAAuB;IAClD,kBAAkB,EAAE,gBAAgB;CACrC,CAAC,CAAC"} +\ No newline at end of file +diff --git a/node_modules/react-native-css-interop/dist/runtime/native/resolve-value.d.ts b/node_modules/react-native-css-interop/dist/runtime/native/resolve-value.d.ts +index 05710bd..21028f3 100644 +--- a/node_modules/react-native-css-interop/dist/runtime/native/resolve-value.d.ts ++++ b/node_modules/react-native-css-interop/dist/runtime/native/resolve-value.d.ts +@@ -17,4 +17,8 @@ export declare function setDeep(target: Record, paths: string[], va + export declare function getWidth(state: PropState): number; + export declare function getHeight(state: PropState): number; + export declare const defaultValues: Record AnimatableValue)>; +-export declare function calc(state: PropState, expression: RuntimeValueDescriptor[], style?: Record): string | number | undefined; ++export declare function calc(state: PropState, expression: RuntimeValueDescriptor, style?: Record): { ++ mode: string; ++ raw: number; ++ value: string | number; ++} | undefined; +diff --git a/node_modules/react-native-css-interop/dist/runtime/native/resolve-value.js b/node_modules/react-native-css-interop/dist/runtime/native/resolve-value.js +index 5f9c2b2..cec8e9a 100644 +--- a/node_modules/react-native-css-interop/dist/runtime/native/resolve-value.js ++++ b/node_modules/react-native-css-interop/dist/runtime/native/resolve-value.js +@@ -23,12 +23,59 @@ function resolveValue(state, descriptor, style) { + } + switch (descriptor.name) { + case "var": { +- const value = resolve(state, descriptor.arguments[0], style); ++ let value = resolve(state, descriptor.arguments[0], style); + if (typeof value === "string") +- return getVar(state, value, style); ++ value = getVar(state, value, style); ++ if (value === undefined && descriptor.arguments[1]) { ++ value = resolveValue(state, descriptor.arguments[1], style); ++ } ++ return value; + } + case "calc": { +- return calc(state, descriptor.arguments, style); ++ return calc(state, descriptor.arguments, style)?.value; ++ } ++ case "max": { ++ let mode; ++ let values = []; ++ for (const arg of descriptor.arguments) { ++ const result = calc(state, arg, style); ++ if (result) { ++ if (!mode) ++ mode = result?.mode; ++ if (result.mode === mode) { ++ values.push(result.raw); ++ } ++ } ++ } ++ const max = Math.max(...values); ++ return mode === "percentage" ? `${max}%` : max; ++ } ++ case "min": { ++ let mode; ++ let values = []; ++ for (const arg of descriptor.arguments) { ++ const result = calc(state, arg, style); ++ if (result) { ++ if (!mode) ++ mode = result?.mode; ++ if (result.mode === mode) { ++ values.push(result.raw); ++ } ++ } ++ } ++ const min = Math.min(...values); ++ return mode === "percentage" ? `${min}%` : min; ++ } ++ case "clamp": { ++ const min = calc(state, descriptor.arguments[0], style); ++ const val = calc(state, descriptor.arguments[1], style); ++ const max = calc(state, descriptor.arguments[2], style); ++ if (!min || !val || !max) ++ return; ++ if (min.mode !== val.mode && max.mode !== val.mode) ++ return; ++ const value = Math.max(min.raw, Math.min(val.raw, max.raw)); ++ return val.mode === "percentage" ? `${value}%` : value; + } + case "vh": { + const value = resolve(state, descriptor.arguments[0], style); +@@ -357,6 +404,9 @@ function calc(state, expression, style) { + const values = []; + const ops = []; + let mode; ++ if (!Array.isArray(expression)) { ++ expression = [expression]; ++ } + for (let token of expression) { + switch (typeof token) { + case "undefined": +@@ -427,7 +477,11 @@ function calc(state, expression, style) { + if (!mode) + return; + const value = round(values[0]); +- return mode === "percentage" ? `${value}%` : value; ++ return { ++ mode, ++ raw: value, ++ value: mode === "percentage" ? `${value}%` : value, ++ }; + } + exports.calc = calc; + //# sourceMappingURL=resolve-value.js.map +\ No newline at end of file +diff --git a/node_modules/react-native-css-interop/dist/runtime/native/resolve-value.js.map b/node_modules/react-native-css-interop/dist/runtime/native/resolve-value.js.map +index ae1884d..a14dc2e 100644 +--- a/node_modules/react-native-css-interop/dist/runtime/native/resolve-value.js.map ++++ b/node_modules/react-native-css-interop/dist/runtime/native/resolve-value.js.map +@@ -1 +1 @@ +-{"version":3,"file":"resolve-value.js","sourceRoot":"","sources":["../../../src/runtime/native/resolve-value.ts"],"names":[],"mappings":";;;AAAA,+CAA+E;AAI/E,uCAA+E;AAC/E,8CAAmD;AACnD,yCAA6C;AAY7C,SAAgB,YAAY,CAC1B,KAAgB,EAChB,UAA8D,EAC9D,KAA2B;IAE3B,QAAQ,OAAO,UAAU,EAAE,CAAC;QAC1B,KAAK,WAAW;YACd,OAAO;QACT,KAAK,SAAS,CAAC;QACf,KAAK,QAAQ,CAAC;QACd,KAAK,UAAU;YACb,OAAO,UAAU,CAAC;QACpB,KAAK,QAAQ;YACX,OAAO,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC;gBAC9B,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;gBACvC,CAAC,CAAC,UAAU,CAAC;IACnB,CAAC;IAED,I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AAC;AA/ED,oBA+EC"} +\ No newline at end of file ++{"version":3,"file":"resolve-value.js","sourceRoot":"","sources":["../../../src/runtime/native/resolve-value.ts"],"names":[],"mappings":";;;AAAA,+CAA+E;AAI/E,uCAA+E;AAC/E,8CAAmD;AACnD,yCAA6C;AAY7C,SAAgB,YAAY,CAC1B,KAAgB,EAChB,UAA8D,EAC9D,KAA2B;IAE3B,QAAQ,OAAO,UAAU,EAAE,CAAC;QAC1B,KAAK,WAAW;YACd,OAAO;QACT,KAAK,SAAS,CAAC;QACf,KAAK,QAAQ,CAAC;QACd,KAAK,UAAU;YACb,OAAO,UAAU,CAAC;QACpB,KAAK,QAAQ;YACX,OAAO,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC;gBAC9B,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;gBACvC,CAAC,CAAC,UAAU,CAAC;IACnB,CAAC;IAED,IAAI,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;QAC9B,OAAO,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,YAAY,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC;IAC9D,CAAC;IAED,QAAQ,UAAU,CAAC,IAAI,EAAE,CAAC;QACxB,KAAK,KAAK,CAAC,CAAC,CAAC;YACX,IAAI,KAAK,GAAG,OAAO,CAAC,KAAK,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;YAC3D,IAAI,OAAO,KAAK,KAAK,QAAQ;gBAAE,KAAK,GAAG,MAAM,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;YACnE,IAAI,KAAK,KAAK,SAAS,IAAI,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;gBACnD,KAAK,GAAG,YAAY,CAAC,KAAK,EAAE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IAAI,cAAc,CAAC,KAAK,CAAC,EAC5D,CAAC;wBACD,iBAAiB,CAAC,GAAG,CAAC,GAAG,EAAG,EAAE,MAAM,CAAC,GAAG,EAAG,EAAE,MAAM,CAAC,GAAG,EAAG,EAAE,MAAM,CAAC,CAAC;oBACtE,CAAC;oBACD,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBAClB,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,GAAG,CAAC,MAAM,EAAE,CAAC;QAClB,iBAAiB,CAAC,GAAG,CAAC,GAAG,EAAG,EAAE,MAAM,CAAC,GAAG,EAAG,EAAE,MAAM,CAAC,GAAG,EAAG,EAAE,MAAM,CAAC,CAAC;IACtE,CAAC;IAED,IAAI,CAAC,IAAI;QAAE,OAAO;IAElB,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;IAE/B,OAAO;QACL,IAAI;QACJ,GAAG,EAAE,KAAK;QACV,KAAK,EAAE,IAAI,KAAK,YAAY,CAAC,CAAC,CAAC,GAAG,KAAK,GAAG,CAAC,CAAC,CAAC,KAAK;KACnD,CAAC;AACJ,CAAC;AAvFD,oBAuFC"} +\ No newline at end of file +diff --git a/node_modules/react-native-css-interop/dist/runtime/test.d.ts b/node_modules/react-native-css-interop/dist/runtime/test.d.ts +deleted file mode 100644 +index a326c79..0000000 +--- a/node_modules/react-native-css-interop/dist/runtime/test.d.ts ++++ /dev/null +@@ -1 +0,0 @@ +-export declare const testContext: Record; +diff --git a/node_modules/react-native-css-interop/dist/runtime/test.js b/node_modules/react-native-css-interop/dist/runtime/test.js +deleted file mode 100644 +index 9c6f4c8..0000000 +--- a/node_modules/react-native-css-interop/dist/runtime/test.js ++++ /dev/null +@@ -1,7 +0,0 @@ +-"use strict"; +-Object.defineProperty(exports, "__esModule", { value: true }); +-exports.testContext = void 0; +-exports.testContext = { +- "--theme-fg": "blue", +-}; +-//# sourceMappingURL=test.js.map +\ No newline at end of file +diff --git a/node_modules/react-native-css-interop/dist/runtime/test.js.map b/node_modules/react-native-css-interop/dist/runtime/test.js.map +deleted file mode 100644 +index 5ec3e17..0000000 +--- a/node_modules/react-native-css-interop/dist/runtime/test.js.map ++++ /dev/null +@@ -1 +0,0 @@ +-{"version":3,"file":"test.js","sourceRoot":"","sources":["../../src/runtime/test.ts"],"names":[],"mappings":";;;AAAa,QAAA,WAAW,GAAwB;IAC9C,YAAY,EAAE,MAAM;CACrB,CAAC"} +\ No newline at end of file +diff --git a/node_modules/react-native-css-interop/dist/runtime/web/api.d.ts b/node_modules/react-native-css-interop/dist/runtime/web/api.d.ts +index d38ce4a..3ec4979 100644 +--- a/node_modules/react-native-css-interop/dist/runtime/web/api.d.ts ++++ b/node_modules/react-native-css-interop/dist/runtime/web/api.d.ts +@@ -1,16 +1,10 @@ +-/// + import { CssInterop } from "../../types"; + export { StyleSheet } from "./stylesheet"; + export { colorScheme } from "./color-scheme"; + export { rem } from "./rem"; +-export declare const interopComponents: Map>; ++export { useColorScheme } from "./useColorScheme"; + export declare const cssInterop: CssInterop; + export declare const remapProps: CssInterop; +-export declare function useColorScheme(): { +- colorScheme: "light" | "dark" | undefined; +- setColorScheme: (value: "light" | "dark" | "system") => void; +- toggleColorScheme: () => void; +-}; + export declare const useUnstableNativeVariable: (name: string) => undefined; + export declare function vars>(variables: T): Record; + export declare function useSafeAreaEnv(): {} | undefined; +diff --git a/node_modules/react-native-css-interop/dist/runtime/web/api.js b/node_modules/react-native-css-interop/dist/runtime/web/api.js +index 99eda40..5eb4764 100644 +--- a/node_modules/react-native-css-interop/dist/runtime/web/api.js ++++ b/node_modules/react-native-css-interop/dist/runtime/web/api.js +@@ -1,17 +1,19 @@ + "use strict"; ++"use client"; + Object.defineProperty(exports, "__esModule", { value: true }); +-exports.useSafeAreaEnv = exports.vars = exports.useUnstableNativeVariable = exports.useColorScheme = exports.remapProps = exports.cssInterop = exports.interopComponents = exports.rem = exports.colorScheme = exports.StyleSheet = void 0; ++exports.useSafeAreaEnv = exports.vars = exports.useUnstableNativeVariable = exports.remapProps = exports.cssInterop = exports.useColorScheme = exports.rem = exports.colorScheme = exports.StyleSheet = void 0; + const react_1 = require("react"); + const config_1 = require("../config"); +-const color_scheme_1 = require("./color-scheme"); + var stylesheet_1 = require("./stylesheet"); + Object.defineProperty(exports, "StyleSheet", { enumerable: true, get: function () { return stylesheet_1.StyleSheet; } }); +-var color_scheme_2 = require("./color-scheme"); +-Object.defineProperty(exports, "colorScheme", { enumerable: true, get: function () { return color_scheme_2.colorScheme; } }); ++var color_scheme_1 = require("./color-scheme"); ++Object.defineProperty(exports, "colorScheme", { enumerable: true, get: function () { return color_scheme_1.colorScheme; } }); + var rem_1 = require("./rem"); + Object.defineProperty(exports, "rem", { enumerable: true, get: function () { return rem_1.rem; } }); +-exports.interopComponents = new Map(); ++const interopComponentsMap_1 = require("./interopComponentsMap"); + const ForwardRefSymbol = Symbol.for("react.forward_ref"); ++var useColorScheme_1 = require("./useColorScheme"); ++Object.defineProperty(exports, "useColorScheme", { enumerable: true, get: function () { return useColorScheme_1.useColorScheme; } }); + const cssInterop = (baseComponent, mapping) => { + const configs = (0, config_1.getNormalizeConfig)(mapping); + const interopComponent = (0, react_1.forwardRef)(function CssInteropComponent({ ...props }, ref) { +@@ -56,23 +58,11 @@ const cssInterop = (baseComponent, mapping) => { + } + }); + interopComponent.displayName = `CssInterop.${baseComponent.displayName ?? baseComponent.name ?? "unknown"}`; +- exports.interopComponents.set(baseComponent, interopComponent); ++ interopComponentsMap_1.interopComponents.set(baseComponent, interopComponent); + return interopComponent; + }; + exports.cssInterop = cssInterop; + exports.remapProps = exports.cssInterop; +-function useColorScheme() { +- const [effect, setEffect] = (0, react_1.useState)(() => ({ +- rerun: () => setEffect((s) => ({ ...s })), +- dependencies: new Set(), +- })); +- return { +- colorScheme: color_scheme_1.colorScheme.get(effect), +- setColorScheme: color_scheme_1.colorScheme.set, +- toggleColorScheme: color_scheme_1.colorScheme.toggle, +- }; +-} +-exports.useColorScheme = useColorScheme; + const useUnstableNativeVariable = (name) => { + if (process.env.NODE_ENV !== "production") { + console.log("useUnstableNativeVariable is not supported on web."); +diff --git a/node_modules/react-native-css-interop/dist/runtime/web/api.js.map b/node_modules/react-native-css-interop/dist/runtime/web/api.js.map +index d64992f..38a7312 100644 +--- a/node_modules/react-native-css-interop/dist/runtime/web/api.js.map ++++ b/node_modules/react-native-css-interop/dist/runtime/web/api.js.map +@@ -1 +1 @@ +-{"version":3,"file":"api.js","sourceRoot":"","sources":["../../../src/runtime/web/api.ts"],"names":[],"mappings":";;;AAAA,iCAAuE;AAEvE,sCAA+C;AAE/C,iDAA6C;AAE7C,2CAA0C;AAAjC,wGAAA,UAAU,OAAA;AACnB,+CAA6C;AAApC,2GAAA,WAAW,OAAA;AACpB,6BAA4B;AAAnB,0FAAA,GAAG,OAAA;AAEC,QAAA,iBAAiB,GAAG,IAAI,GAAG,EAGrC,CAAC;AAEJ,MAAM,gBAAgB,GAAG,MAAM,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;AAElD,MAAM,UAAU,GAAe,CAAC,aAAa,EAAE,OAAO,EAAO,EAAE;IACpE,MAAM,OAAO,GAAG,IAAA,2BAAkB,EAAC,OAAO,CAAC,CAAC;IAQ5C,MAAM,gBAAgB,GAAG,IAAA,kBAAU,EAAC,SAAS,mBAAmB,CAC9D,EAAE,GAAG,KAAK,EAAuB,EACjC,GAAQ;QAER,IAAI,KAAK,CAAC,UAAU,KAAK,KAAK,EAAE,CAAC;YAC/B,OAAO,IAAA,qBAAa,EAAC,aAAa,EAAE,KAAK,CAAC,CAAC;QAC7C,CAAC;QAED,KAAK,GAAG,EAAE,GAAG,KAAK,EAAE,GAAG,EAAE,CAAC;QAC1B,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;YAC7B,IAAI,SAAS,GAAc,EAAE,CAAC;YAC9B,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,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,gBAAgB,CAAC,WAAW,GAAG,cAC7B,aAAa,CAAC,WAAW,IAAI,aAAa,CAAC,IAAI,IAAI,SACrD,EAAE,CAAC;IACH,wCAAiB,CAAC,GAAG,CAAC,aAAa,EAAE,gBAAgB,CAAC,CAAC;IACvD,OAAO,gBAAgB,CAAC;AAC1B,CAAC,CAAC;AAlEW,QAAA,UAAU,cAkErB;AAGW,QAAA,UAAU,GAAG,kBAAU,CAAC;AAE9B,MAAM,yBAAyB,GAAG,CAAC,IAAY,EAAE,EAAE;IACxD,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,EAAE,CAAC;QAC1C,OAAO,CAAC,GAAG,CAAC,oDAAoD,CAAC,CAAC;IACpE,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AALW,QAAA,yBAAyB,6BAKpC;AAEF,SAAgB,IAAI,CAClB,SAAY;IAEZ,MAAM,UAAU,GAA2B,EAAE,CAAC;IAE9C,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC;QACrD,IAAI,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;YACzB,UAAU,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAC;QACrC,CAAC;aAAM,CAAC;YACN,UAAU,CAAC,KAAK,GAAG,EAAE,CAAC,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAC;QAC5C,CAAC;IACH,CAAC;IACD,OAAO,UAAU,CAAC;AACpB,CAAC;AAbD,oBAaC;AAED,SAAgB,cAAc;IAC5B,OAAO,SAAS,CAAC;AACnB,CAAC;AAFD,wCAEC"} +\ No newline at end of file +diff --git a/node_modules/react-native-css-interop/dist/runtime/web/interopComponentsMap.d.ts b/node_modules/react-native-css-interop/dist/runtime/web/interopComponentsMap.d.ts +new file mode 100644 +index 0000000..303c043 +--- /dev/null ++++ b/node_modules/react-native-css-interop/dist/runtime/web/interopComponentsMap.d.ts +@@ -0,0 +1,2 @@ ++/// ++export declare const interopComponents: Map>; +diff --git a/node_modules/react-native-css-interop/dist/runtime/web/interopComponentsMap.js b/node_modules/react-native-css-interop/dist/runtime/web/interopComponentsMap.js +new file mode 100644 +index 0000000..3ff844a +--- /dev/null ++++ b/node_modules/react-native-css-interop/dist/runtime/web/interopComponentsMap.js +@@ -0,0 +1,5 @@ ++"use strict"; ++Object.defineProperty(exports, "__esModule", { value: true }); ++exports.interopComponents = void 0; ++exports.interopComponents = new Map(); ++//# sourceMappingURL=interopComponentsMap.js.map +\ No newline at end of file +diff --git a/node_modules/react-native-css-interop/dist/runtime/web/interopComponentsMap.js.map b/node_modules/react-native-css-interop/dist/runtime/web/interopComponentsMap.js.map +new file mode 100644 +index 0000000..601d610 +--- /dev/null ++++ b/node_modules/react-native-css-interop/dist/runtime/web/interopComponentsMap.js.map +@@ -0,0 +1 @@ ++{"version":3,"file":"interopComponentsMap.js","sourceRoot":"","sources":["../../../src/runtime/web/interopComponentsMap.ts"],"names":[],"mappings":";;;AAEa,QAAA,iBAAiB,GAAG,IAAI,GAAG,EAGrC,CAAC"} +\ No newline at end of file +diff --git a/node_modules/react-native-css-interop/dist/runtime/web/useColorScheme.d.ts b/node_modules/react-native-css-interop/dist/runtime/web/useColorScheme.d.ts +new file mode 100644 +index 0000000..874a890 +--- /dev/null ++++ b/node_modules/react-native-css-interop/dist/runtime/web/useColorScheme.d.ts +@@ -0,0 +1,5 @@ ++export declare function useColorScheme(): { ++ colorScheme: "light" | "dark" | undefined; ++ setColorScheme: (value: "light" | "dark" | "system") => void; ++ toggleColorScheme: () => void; ++}; +diff --git a/node_modules/react-native-css-interop/dist/runtime/web/useColorScheme.js b/node_modules/react-native-css-interop/dist/runtime/web/useColorScheme.js +new file mode 100644 +index 0000000..9de6ccb +--- /dev/null ++++ b/node_modules/react-native-css-interop/dist/runtime/web/useColorScheme.js +@@ -0,0 +1,18 @@ ++"use strict"; ++Object.defineProperty(exports, "__esModule", { value: true }); ++exports.useColorScheme = void 0; ++const react_1 = require("react"); ++const color_scheme_1 = require("./color-scheme"); ++function useColorScheme() { ++ const [effect, setEffect] = (0, react_1.useState)(() => ({ ++ rerun: () => setEffect((s) => ({ ...s })), ++ dependencies: new Set(), ++ })); ++ return { ++ colorScheme: color_scheme_1.colorScheme.get(effect), ++ setColorScheme: color_scheme_1.colorScheme.set, ++ toggleColorScheme: color_scheme_1.colorScheme.toggle, ++ }; ++} ++exports.useColorScheme = useColorScheme; ++//# sourceMappingURL=useColorScheme.js.map +\ No newline at end of file +diff --git a/node_modules/react-native-css-interop/dist/runtime/web/useColorScheme.js.map b/node_modules/react-native-css-interop/dist/runtime/web/useColorScheme.js.map +new file mode 100644 +index 0000000..69f3b00 +--- /dev/null ++++ b/node_modules/react-native-css-interop/dist/runtime/web/useColorScheme.js.map +@@ -0,0 +1 @@ ++{"version":3,"file":"useColorScheme.js","sourceRoot":"","sources":["../../../src/runtime/web/useColorScheme.ts"],"names":[],"mappings":";;;AAAA,iCAAiC;AACjC,iDAA6C;AAE7C,SAAgB,cAAc;IAC5B,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,IAAA,gBAAQ,EAAS,GAAG,EAAE,CAAC,CAAC;QAClD,KAAK,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC;QACzC,YAAY,EAAE,IAAI,GAAG,EAAE;KACxB,CAAC,CAAC,CAAC;IAEJ,OAAO;QACL,WAAW,EAAE,0BAAW,CAAC,GAAG,CAAC,MAAM,CAAC;QACpC,cAAc,EAAE,0BAAW,CAAC,GAAG;QAC/B,iBAAiB,EAAE,0BAAW,CAAC,MAAM;KACtC,CAAC;AACJ,CAAC;AAXD,wCAWC"} +\ No newline at end of file diff --git a/packages/nativewind/utils/scripts/post-install-script.js b/packages/nativewind/utils/scripts/post-install-script.js new file mode 100644 index 0000000000..a853a6795f --- /dev/null +++ b/packages/nativewind/utils/scripts/post-install-script.js @@ -0,0 +1,57 @@ +const fs = require('fs'); +const path = require('path'); +const processPath = process.cwd(); +console.log('🚀 ~ processPath:', processPath); +const userDirectory = path.resolve(processPath, '..', '..', '..'); +console.log('🚀 ~ userDirectory:', userDirectory); + +function CopyDirectory(src, dest) { + if (!fs.existsSync(dest)) { + fs.mkdirSync(dest); + } + + let entries = fs.readdirSync(src, { withFileTypes: true }); + + for (let entry of entries) { + let srcPath = path.join(src, entry.name); + let destPath = path.join(dest, entry.name); + + if (entry.isDirectory()) { + CopyDirectory(srcPath, destPath); + } else { + fs.copyFileSync(srcPath, destPath); + } + } +} + +function main() { + // check if next.config.mjs or next.config.js file exists in project + if ( + !fs.existsSync(path.join(userDirectory, 'next.config.mjs')) && + !fs.existsSync(path.join(userDirectory, 'next.config.js')) + ) { + return; + } + + CopyDirectory( + path.join(processPath, 'scripts', 'patches'), + path.join(userDirectory, 'patches') + ); + // read package json file + const packageJsonPath = path.join(userDirectory, 'package.json'); + const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8')); + // add postinstall script + packageJson.scripts = packageJson.scripts || {}; + if ( + packageJson.scripts.postinstall && + !packageJson.scripts.postinstall.includes('patch-package') + ) { + packageJson.scripts.postinstall = `${packageJson.scripts.postinstall} && patch-package`; + } else if (!packageJson.scripts.postinstall) { + packageJson.scripts.postinstall = 'patch-package'; + } + // write package json file + fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2)); +} + +main(); diff --git a/packages/nativewind/utils/tsconfig.json b/packages/nativewind/utils/tsconfig.json index cf4b453728..b0bf176c26 100644 --- a/packages/nativewind/utils/tsconfig.json +++ b/packages/nativewind/utils/tsconfig.json @@ -11,7 +11,8 @@ "withStyleContext", "withStyleContextAndStates", "cssInterop", - "flush" + "flush", + "IsWeb" ], "exclude": ["node_modules", "example"], "path": {}, diff --git a/packages/nativewind/utils/tva/index.js b/packages/nativewind/utils/tva/index.js index 903fccb530..c40a49f69c 100644 --- a/packages/nativewind/utils/tva/index.js +++ b/packages/nativewind/utils/tva/index.js @@ -2,29 +2,26 @@ import { tv } from 'tailwind-variants'; import { deepMergeObjects } from '../utils/deepMerge'; const tvatemp = (options) => { - const parentVariants = options?.parentVariants; - const parentCompoundVariants = options?.parentCompoundVariants; - delete options.parentVariants; - delete options.parentCompoundVariants; - options.variants = deepMergeObjects(parentVariants, options.variants); - if ( - Array.isArray(parentCompoundVariants) && - parentCompoundVariants.length > 0 - ) { - if (!options.compoundVariants) { - options.compoundVariants = []; + const parentVariants = options?.parentVariants; + const parentCompoundVariants = options?.parentCompoundVariants; + delete options.parentVariants; + delete options.parentCompoundVariants; + options.variants = deepMergeObjects(parentVariants, options.variants); + if (Array.isArray(parentCompoundVariants) && + parentCompoundVariants.length > 0) { + if (!options.compoundVariants) { + options.compoundVariants = []; + } + options.compoundVariants = [ + ...parentCompoundVariants, + ...options.compoundVariants, + ]; } - options.compoundVariants = [ - ...parentCompoundVariants, - ...options.compoundVariants, - ]; - } - const callback = tv(options); - return (inlineProps) => { - const { parentVariants: inlineParentVariants = {}, ...variant } = - inlineProps; - const mergedVariants = deepMergeObjects(inlineParentVariants, variant); - return callback({ ...mergedVariants }); - }; + const callback = tv(options); + return (inlineProps) => { + const { parentVariants: inlineParentVariants = {}, ...variant } = inlineProps; + const mergedVariants = deepMergeObjects(inlineParentVariants, variant); + return callback({ ...mergedVariants }); + }; }; export const tva = tvatemp; diff --git a/packages/nativewind/utils/types.d.ts b/packages/nativewind/utils/types.d.ts index 7bad7f51b5..f0d4928795 100644 --- a/packages/nativewind/utils/types.d.ts +++ b/packages/nativewind/utils/types.d.ts @@ -1,122 +1,64 @@ -import type { - TVVariants, - TVDefaultVariants, - ClassValue, - TVCompoundSlots, - TVCompoundVariants, - TVProps, - TVReturnProps, - VariantProps as TVVariantProps, -} from 'tailwind-variants'; +import type { TVVariants, TVDefaultVariants, ClassValue, TVCompoundSlots, TVCompoundVariants, TVProps, TVReturnProps, VariantProps as TVVariantProps } from 'tailwind-variants'; import type { TVConfig } from 'tailwind-variants/dist/config'; type TVSlots = Record | undefined; export type TVA = { - < - V extends TVVariants, - CV extends TVCompoundVariants, - DV extends TVDefaultVariants, - C extends TVConfig, - PV extends TVVariants, - PCV extends TVCompoundVariants, - B extends ClassValue = undefined, - S extends TVSlots = undefined, - E extends TVReturnType = TVReturnType< - V, - S, - B, - C, - EV extends undefined ? {} : EV, - ES extends undefined ? {} : ES - >, - EV extends TVVariants = E['variants'], - ES extends TVSlots = E['slots'] extends TVSlots ? E['slots'] : undefined - >( - options: { - /** - * Extend allows for easy composition of components. - * @see https://www.tailwind-variants.org/docs/composing-components - */ - extend?: E; - /** - * Base allows you to set a base class for a component. - */ - base?: B; - /** - * Slots allow you to separate a component into multiple parts. - * @see https://www.tailwind-variants.org/docs/slots - */ - slots?: S; - /** - * Variants allow you to create multiple versions of the same component. - * @see https://www.tailwind-variants.org/docs/variants#adding-variants - */ - variants?: V; - /** - * Compound variants allow you to apply classes to multiple variants at once. - * @see https://www.tailwind-variants.org/docs/variants#compound-variants - */ - compoundVariants?: CV; - /** - * Compound slots allow you to apply classes to multiple slots at once. - */ - compoundSlots?: TVCompoundSlots; - /** - * Default variants allow you to set default variants for a component. - * @see https://www.tailwind-variants.org/docs/variants#default-variants - */ - defaultVariants?: DV; - parentVariants?: PV; - parentCompoundVariants?: PCV; - }, + , CV extends TVCompoundVariants, DV extends TVDefaultVariants, C extends TVConfig, PV extends TVVariants, PCV extends TVCompoundVariants, B extends ClassValue = undefined, S extends TVSlots = undefined, E extends TVReturnType = TVReturnType, EV extends TVVariants = E['variants'], ES extends TVSlots = E['slots'] extends TVSlots ? E['slots'] : undefined>(options: { + /** + * Extend allows for easy composition of components. + * @see https://www.tailwind-variants.org/docs/composing-components + */ + extend?: E; + /** + * Base allows you to set a base class for a component. + */ + base?: B; + /** + * Slots allow you to separate a component into multiple parts. + * @see https://www.tailwind-variants.org/docs/slots + */ + slots?: S; + /** + * Variants allow you to create multiple versions of the same component. + * @see https://www.tailwind-variants.org/docs/variants#adding-variants + */ + variants?: V; + /** + * Compound variants allow you to apply classes to multiple variants at once. + * @see https://www.tailwind-variants.org/docs/variants#compound-variants + */ + compoundVariants?: CV; + /** + * Compound slots allow you to apply classes to multiple slots at once. + */ + compoundSlots?: TVCompoundSlots; + /** + * Default variants allow you to set default variants for a component. + * @see https://www.tailwind-variants.org/docs/variants#default-variants + */ + defaultVariants?: DV; + parentVariants?: PV; + parentCompoundVariants?: PCV; + }, /** * The config object allows you to modify the default configuration. * @see https://www.tailwind-variants.org/docs/api-reference#config-optional */ - config?: C - ): TVReturnType, S, B, C, EV, ES, E>; + config?: C): TVReturnType, S, B, C, EV, ES, E>; }; type UNION = A & B; -export type TVReturnType< - V extends TVVariants, - S extends TVSlots, - B extends ClassValue, - C extends TVConfig, - EV extends TVVariants, - ES extends TVSlots, - E extends TVReturnType = undefined -> = { - ( - props?: TVProps & { - parentVariants?: Omit, 'class' | 'className'>; - } - ): HasSlots extends true - ? { - [K in keyof (ES extends undefined ? {} : ES)]: ( - slotProps?: TVProps - ) => string; - } & { - [K in keyof (S extends undefined ? {} : S)]: ( - slotProps?: TVProps - ) => string; - } & { - [K in TVSlotsWithBase<{}, B>]: ( - slotProps?: TVProps - ) => string; - } - : string; +export type TVReturnType, S extends TVSlots, B extends ClassValue, C extends TVConfig, EV extends TVVariants, ES extends TVSlots, E extends TVReturnType = undefined> = { + (props?: TVProps & { + parentVariants?: Omit, 'class' | 'className'>; + }): HasSlots extends true ? { + [K in keyof (ES extends undefined ? {} : ES)]: (slotProps?: TVProps) => string; + } & { + [K in keyof (S extends undefined ? {} : S)]: (slotProps?: TVProps) => string; + } & { + [K in TVSlotsWithBase<{}, B>]: (slotProps?: TVProps) => string; + } : string; } & TVReturnProps; -type HasSlots = S extends undefined - ? ES extends undefined - ? false - : true - : true; -type TVSlotsWithBase< - S extends TVSlots, - B extends ClassValue -> = B extends undefined ? keyof S : keyof S | TVBaseName; +type HasSlots = S extends undefined ? ES extends undefined ? false : true : true; +type TVSlotsWithBase = B extends undefined ? keyof S : keyof S | TVBaseName; type TVBaseName = 'base'; -export type VariantProps any> = Omit< - TVVariantProps, - 'parentVariants' ->; +export type VariantProps any> = Omit, 'parentVariants'>; export {}; diff --git a/packages/nativewind/utils/utils/deepMerge.js b/packages/nativewind/utils/utils/deepMerge.js index 7978ffc5b3..e114031f34 100644 --- a/packages/nativewind/utils/utils/deepMerge.js +++ b/packages/nativewind/utils/utils/deepMerge.js @@ -1,23 +1,25 @@ export function deepMergeObjects(...objects) { - const isObject = (obj) => - obj && typeof obj === 'object' && !Array.isArray(obj); - return objects.reduce((prev, obj) => { - if (isObject(prev) && isObject(obj)) { - Object.keys(obj).forEach((key) => { - if (isObject(obj[key])) { - if (!prev[key] || !isObject(prev[key])) { - prev[key] = {}; - } - prev[key] = deepMergeObjects(prev[key], obj[key]); - } else { - if (Array.isArray(obj[key]) && Array.isArray(prev[key])) { - prev[key] = prev[key].concat(obj[key]); // Merge arrays without converting to an object - } else { - if (obj[key] !== undefined) prev[key] = obj[key]; - } + const isObject = (obj) => obj && typeof obj === 'object' && !Array.isArray(obj); + return objects.reduce((prev, obj) => { + if (isObject(prev) && isObject(obj)) { + Object.keys(obj).forEach((key) => { + if (isObject(obj[key])) { + if (!prev[key] || !isObject(prev[key])) { + prev[key] = {}; + } + prev[key] = deepMergeObjects(prev[key], obj[key]); + } + else { + if (Array.isArray(obj[key]) && Array.isArray(prev[key])) { + prev[key] = prev[key].concat(obj[key]); // Merge arrays without converting to an object + } + else { + if (obj[key] !== undefined) + prev[key] = obj[key]; + } + } + }); } - }); - } - return prev; - }, {}); + return prev; + }, {}); } diff --git a/packages/nativewind/utils/utils/index.d.ts b/packages/nativewind/utils/utils/index.d.ts index 2346a3b8c5..a8331790bf 100644 --- a/packages/nativewind/utils/utils/index.d.ts +++ b/packages/nativewind/utils/utils/index.d.ts @@ -1,16 +1,11 @@ -export declare function parseDataAttribute(inputString: string): - | { - state: string; - value: string; - className: string; - } - | { - state: null; - value: null; - className: null; - }; +export declare function parseDataAttribute(inputString: string): { + state: string; + value: string; + className: string; +} | { + state: null; + value: null; + className: null; +}; export declare function stringToBoolean(str: string): boolean; -export declare function extractDataClassName( - className: string, - states: any -): string | undefined; +export declare function extractDataClassName(className: string, states: any): string | undefined; diff --git a/packages/nativewind/utils/utils/index.js b/packages/nativewind/utils/utils/index.js index 1445a3abd3..74eba531f2 100644 --- a/packages/nativewind/utils/utils/index.js +++ b/packages/nativewind/utils/utils/index.js @@ -1,57 +1,57 @@ import { cn } from '../cn'; export function parseDataAttribute(inputString) { - const regex = /^data-\[(\w+)=(\w+)\]:(.+)$/; - const match = inputString.match(regex); - if (match) { - return { - state: match[1], - value: match[2], - className: match[3], - }; - } else { - return { - state: null, - value: null, - className: null, - }; - } + const regex = /^data-\[(\w+)=(\w+)\]:(.+)$/; + const match = inputString.match(regex); + if (match) { + return { + state: match[1], + value: match[2], + className: match[3], + }; + } + else { + return { + state: null, + value: null, + className: null, + }; + } } export function stringToBoolean(str) { - if (str === 'true') return true; - else return false; + if (str === 'true') + return true; + else + return false; } const resolveDataAttribute = (className, states) => { - if (className.includes('data-')) { - // parse data- attribute - const { - state, - value, - className: stateClassName, - } = parseDataAttribute(className); - // check if state is present and value is true - if (state && value && states[state] === stringToBoolean(value)) { - // append state class name - if (stateClassName.includes('data-')) { - return resolveDataAttribute(stateClassName, states); - } - return stateClassName; + if (className.includes('data-')) { + // parse data- attribute + const { state, value, className: stateClassName, } = parseDataAttribute(className); + // check if state is present and value is true + if (state && value && states[state] === stringToBoolean(value)) { + // append state class name + if (stateClassName.includes('data-')) { + return resolveDataAttribute(stateClassName, states); + } + return stateClassName; + } } - } }; export function extractDataClassName(className, states) { - const classNamesArray = - typeof className === 'string' ? className.split(' ') : className; - if (classNamesArray === undefined) return; - let classNamesFinal = ''; - classNamesArray.forEach((classNameItem) => { - // check for data- attribute - if (classNameItem.includes('data-')) { - // parse data- attribute - const resolvedClassName = resolveDataAttribute(classNameItem, states); - classNamesFinal = cn(classNamesFinal, resolvedClassName); - } else { - classNamesFinal += ` ${classNameItem}`; - } - }); - return classNamesFinal; + const classNamesArray = typeof className === 'string' ? className.split(' ') : className; + if (classNamesArray === undefined) + return; + let classNamesFinal = ''; + classNamesArray.forEach((classNameItem) => { + // check for data- attribute + if (classNameItem.includes('data-')) { + // parse data- attribute + const resolvedClassName = resolveDataAttribute(classNameItem, states); + classNamesFinal = cn(classNamesFinal, resolvedClassName); + } + else { + classNamesFinal += ` ${classNameItem}`; + } + }); + return classNamesFinal; } diff --git a/packages/nativewind/utils/withStates/index.d.ts b/packages/nativewind/utils/withStates/index.d.ts index fa6ef0b1f1..08270ea9b5 100644 --- a/packages/nativewind/utils/withStates/index.d.ts +++ b/packages/nativewind/utils/withStates/index.d.ts @@ -1,11 +1,7 @@ import React from 'react'; type WithStatesProps = { - className?: string; - states?: any; + className?: string; + states?: any; }; -export declare const withStates: ( - Component: React.ComponentType -) => React.ForwardRefExoticComponent< - React.PropsWithoutRef & React.RefAttributes ->; +export declare const withStates: (Component: React.ComponentType) => React.ForwardRefExoticComponent & React.RefAttributes>; export {}; diff --git a/packages/nativewind/utils/withStates/index.js b/packages/nativewind/utils/withStates/index.js index 3bde0c0e65..d92648f494 100644 --- a/packages/nativewind/utils/withStates/index.js +++ b/packages/nativewind/utils/withStates/index.js @@ -1,15 +1,11 @@ 'use client'; import React from 'react'; import { extractDataClassName } from '../utils'; -export const withStates = (Component) => - React.forwardRef(({ states, className, ...props }, ref) => { +export const withStates = (Component) => React.forwardRef(({ states, className, ...props }, ref) => { const classNamesFinal = React.useMemo(() => { - if (!className) return; - return extractDataClassName(className, states); + if (!className) + return; + return extractDataClassName(className, states); }, [className, states]); - return React.createElement(Component, { - className: classNamesFinal, - ...props, - ref: ref, - }); - }); + return (React.createElement(Component, { className: classNamesFinal, ...props, ref: ref })); +}); diff --git a/packages/nativewind/utils/withStyleContext/index.d.ts b/packages/nativewind/utils/withStyleContext/index.d.ts index 423f69f70e..7896d0c42e 100644 --- a/packages/nativewind/utils/withStyleContext/index.d.ts +++ b/packages/nativewind/utils/withStyleContext/index.d.ts @@ -1,13 +1,7 @@ import React from 'react'; type WithStyleContextProps = { - context?: any; + context?: any; }; -export declare const withStyleContext: ( - Component: React.ComponentType, - scope?: string -) => React.ForwardRefExoticComponent< - React.PropsWithoutRef & - React.RefAttributes ->; +export declare const withStyleContext: (Component: React.ComponentType, scope?: string) => React.ForwardRefExoticComponent & React.RefAttributes>; export declare const useStyleContext: (scope?: string) => any; export {}; diff --git a/packages/nativewind/utils/withStyleContext/index.js b/packages/nativewind/utils/withStyleContext/index.js index 986a4e50e6..3e7d63f202 100644 --- a/packages/nativewind/utils/withStyleContext/index.js +++ b/packages/nativewind/utils/withStyleContext/index.js @@ -3,23 +3,21 @@ import React from 'react'; import { ParentContext } from '../context'; import { useParentContext } from '../context'; export const withStyleContext = (Component, scope = 'Global') => { - return React.forwardRef(({ context, ...props }, ref) => { - let contextValues = {}; - const parentContextValues = useParentContext(); - if (parentContextValues[scope] !== undefined) { - parentContextValues[scope] = context; - contextValues = parentContextValues; - } else { - contextValues = { ...parentContextValues, [scope]: context }; - } - return React.createElement( - ParentContext.Provider, - { value: contextValues }, - React.createElement(Component, { ...props, ref: ref }) - ); - }); + return React.forwardRef(({ context, ...props }, ref) => { + let contextValues = {}; + const parentContextValues = useParentContext(); + if (parentContextValues[scope] !== undefined) { + parentContextValues[scope] = context; + contextValues = parentContextValues; + } + else { + contextValues = { ...parentContextValues, [scope]: context }; + } + return (React.createElement(ParentContext.Provider, { value: contextValues }, + React.createElement(Component, { ...props, ref: ref }))); + }); }; export const useStyleContext = (scope = 'Global') => { - const parentContextValues = useParentContext(); - return parentContextValues[scope]; + const parentContextValues = useParentContext(); + return parentContextValues[scope]; }; diff --git a/packages/nativewind/utils/withStyleContextAndStates/index.d.ts b/packages/nativewind/utils/withStyleContextAndStates/index.d.ts index fc48d865f3..a7da4962c5 100644 --- a/packages/nativewind/utils/withStyleContextAndStates/index.d.ts +++ b/packages/nativewind/utils/withStyleContextAndStates/index.d.ts @@ -1,15 +1,9 @@ import React from 'react'; type WithStyleContextProps = { - context?: any; - className?: string; - states?: any; + context?: any; + className?: string; + states?: any; }; -export declare const withStyleContextAndStates: ( - Component: React.ComponentType, - scope?: string -) => React.ForwardRefExoticComponent< - React.PropsWithoutRef & - React.RefAttributes ->; +export declare const withStyleContextAndStates: (Component: React.ComponentType, scope?: string) => React.ForwardRefExoticComponent & React.RefAttributes>; export declare const useStyleContext: (scope?: string) => any; export {}; diff --git a/packages/nativewind/utils/withStyleContextAndStates/index.js b/packages/nativewind/utils/withStyleContextAndStates/index.js index 127c0c9536..7c82f52e31 100644 --- a/packages/nativewind/utils/withStyleContextAndStates/index.js +++ b/packages/nativewind/utils/withStyleContextAndStates/index.js @@ -4,31 +4,26 @@ import { extractDataClassName } from '../utils'; import { ParentContext } from '../context'; import { useParentContext } from '../context'; export const withStyleContextAndStates = (Component, scope = 'Global') => { - return React.forwardRef(({ context, className, states, ...props }, ref) => { - let contextValues = {}; - const parentContextValues = useParentContext(); - if (parentContextValues[scope] !== undefined) { - parentContextValues[scope] = context; - contextValues = parentContextValues; - } else { - contextValues = { ...parentContextValues, [scope]: context }; - } - const classNamesFinal = React.useMemo(() => { - if (!className) return; - return extractDataClassName(className, states); - }, [className, states]); - return React.createElement( - ParentContext.Provider, - { value: contextValues }, - React.createElement(Component, { - className: classNamesFinal, - ...props, - ref: ref, - }) - ); - }); + return React.forwardRef(({ context, className, states, ...props }, ref) => { + let contextValues = {}; + const parentContextValues = useParentContext(); + if (parentContextValues[scope] !== undefined) { + parentContextValues[scope] = context; + contextValues = parentContextValues; + } + else { + contextValues = { ...parentContextValues, [scope]: context }; + } + const classNamesFinal = React.useMemo(() => { + if (!className) + return; + return extractDataClassName(className, states); + }, [className, states]); + return (React.createElement(ParentContext.Provider, { value: contextValues }, + React.createElement(Component, { className: classNamesFinal, ...props, ref: ref }))); + }); }; export const useStyleContext = (scope = 'Global') => { - const parentContextValues = useParentContext(); - return parentContextValues[scope]; + const parentContextValues = useParentContext(); + return parentContextValues[scope]; }; diff --git a/packages/styled/react/CHANGELOG.md b/packages/styled/react/CHANGELOG.md index a665a3b735..4b15a2e6e4 100644 --- a/packages/styled/react/CHANGELOG.md +++ b/packages/styled/react/CHANGELOG.md @@ -1,5 +1,11 @@ # @gluestack-style/react +## 1.0.54 + +### Patch Changes + +- - Fixed plugins utility props resolution + ## 1.0.53 ### Patch Changes diff --git a/packages/styled/react/package.json b/packages/styled/react/package.json index 3f49cf2019..991ccb1c0c 100644 --- a/packages/styled/react/package.json +++ b/packages/styled/react/package.json @@ -1,7 +1,7 @@ { "name": "@gluestack-style/react", "description": "A universal & performant styling library for React Native, Next.js & React", - "version": "1.0.53", + "version": "1.0.54", "keywords": [ "React Native", "Next.js", diff --git a/packages/styled/react/src/plugins/font-resolver.tsx b/packages/styled/react/src/plugins/font-resolver.tsx index 0535f1afdd..1fb18f63ca 100644 --- a/packages/styled/react/src/plugins/font-resolver.tsx +++ b/packages/styled/react/src/plugins/font-resolver.tsx @@ -318,17 +318,19 @@ export class FontResolver implements IStyledPlugin, FontPlugin { let style = rest?.style; - if (Object.keys(resolvedSxProps).length > 0) { - if (Array.isArray(style)) { - style = StyleSheet.flatten(style); - - Object.keys(resolvedSxProps).forEach((ele) => { - style[ele] = resolvedSxProps[ele]; - }); - } else { - Object.keys(resolvedSxProps).forEach((ele) => { - style[ele] = resolvedSxProps[ele]; - }); + if (resolvedSxProps.fontFamily) { + if (Object.keys(resolvedSxProps).length > 0) { + if (Array.isArray(style)) { + style = StyleSheet.flatten(style); + + Object.keys(resolvedSxProps).forEach((ele) => { + style[ele] = resolvedSxProps[ele]; + }); + } else { + Object.keys(resolvedSxProps).forEach((ele) => { + style[ele] = resolvedSxProps[ele]; + }); + } } } diff --git a/packages/styled/react/src/styled.tsx b/packages/styled/react/src/styled.tsx index 8497f70f42..249d5691de 100644 --- a/packages/styled/react/src/styled.tsx +++ b/packages/styled/react/src/styled.tsx @@ -141,7 +141,11 @@ function convertUtiltiyToSXFromProps( const resolvedSXVerbosed = convertSxToSxVerbosed(resolvedSxVerbose); - return { sx: resolvedSXVerbosed, rest: restProps }; + return { + sx: resolvedSXVerbosed, + nonVerbosedSx: resolvedSxVerbose, + rest: restProps, + }; } function getStateStyleCSSFromStyleIdsAndProps( @@ -1589,36 +1593,51 @@ export function verboseStyled( applySxStatePassingProps.current ); - let { sx: filteredComponentSx, rest: filteredComponentRemainingProps } = - convertUtiltiyToSXFromProps( - // Object.assign( - // defaultThemePropsWithoutVariants, - inlineComponentPropsWithoutVariants, - styledSystemProps, - { ...componentStyleConfig, uniqueComponentId }, - reservedKeys, - plugins, - ignoreKeys, - inlineComponentPropsWithoutVariants?.as ?? Component, - ExtendedConfig - ); + let { + sx: filteredComponentSx, + nonVerbosedSx, + rest: filteredComponentRemainingProps, + } = convertUtiltiyToSXFromProps( + // Object.assign( + // defaultThemePropsWithoutVariants, + inlineComponentPropsWithoutVariants, + styledSystemProps, + { ...componentStyleConfig, uniqueComponentId }, + reservedKeys, + plugins, + ignoreKeys, + inlineComponentPropsWithoutVariants?.as ?? Component, + ExtendedConfig + ); + + let sxToBePassedIntoPlugin = { + ...nonVerbosedSx, + }; const mergedPassingProps = shallowMerge( { ...defaultThemePropsWithoutVariants, ...passingProps }, applyAncestorPassingProps ); - let { sx: filteredPassingSx, rest: filteredPassingRemainingProps } = - convertUtiltiyToSXFromProps( - mergedPassingProps, - styledSystemProps, - { ...componentStyleConfig, uniqueComponentId }, - reservedKeys, - plugins, - ignoreKeys, - mergedPassingProps?.as ?? Component, - ExtendedConfig - ); + let { + sx: filteredPassingSx, + nonVerbosedSx: filteredPassingNonVerbosedSx, + rest: filteredPassingRemainingProps, + } = convertUtiltiyToSXFromProps( + mergedPassingProps, + styledSystemProps, + { ...componentStyleConfig, uniqueComponentId }, + reservedKeys, + plugins, + ignoreKeys, + mergedPassingProps?.as ?? Component, + ExtendedConfig + ); + + sxToBePassedIntoPlugin = deepMergeObjects( + sxToBePassedIntoPlugin, + filteredPassingNonVerbosedSx + ); let containsSX = false; Object.assign(applyComponentInlineProps, filteredPassingRemainingProps); @@ -1831,6 +1850,7 @@ export function verboseStyled( const { sx: filteredPassingSxUpdated, + nonVerbosedSx: filteredPassingNonVerbosedSxUpdated, rest: filteredPassingRemainingPropsUpdated, } = convertUtiltiyToSXFromProps( passingPropsUpdated, @@ -1843,6 +1863,11 @@ export function verboseStyled( ExtendedConfig ); + sxToBePassedIntoPlugin = deepMergeObjects( + sxToBePassedIntoPlugin, + filteredPassingNonVerbosedSxUpdated + ); + filteredPassingSx = filteredPassingSxUpdated; injectAndUpdateSXProps(filteredPassingSx); @@ -2214,7 +2239,7 @@ export function verboseStyled( ? { ...variantProps, states: states, - sx: componentProps.sx, + sx: sxToBePassedIntoPlugin, } : {};