react-native-unistyles 3.0.0-alpha.41 → 3.0.0-alpha.43
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +7 -1
- package/cxx/common/Constants.h +0 -1
- package/cxx/core/UnistylesRegistry.cpp +10 -4
- package/cxx/core/UnistylesRegistry.h +1 -1
- package/cxx/hybridObjects/HybridShadowRegistry.cpp +2 -2
- package/cxx/parser/Parser.cpp +7 -22
- package/cxx/parser/Parser.h +0 -1
- package/lib/commonjs/components/Display.js +2 -2
- package/lib/commonjs/components/Display.js.map +1 -1
- package/lib/commonjs/components/Hide.js +2 -2
- package/lib/commonjs/components/Hide.js.map +1 -1
- package/lib/commonjs/components/Pressable.js +82 -0
- package/lib/commonjs/components/Pressable.js.map +1 -0
- package/lib/commonjs/components/Pressable.web.js +97 -0
- package/lib/commonjs/components/Pressable.web.js.map +1 -0
- package/lib/commonjs/components/index.js +7 -0
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/core/getBoundArgs.js +18 -0
- package/lib/commonjs/core/getBoundArgs.js.map +1 -0
- package/lib/commonjs/core/getId.js +9 -0
- package/lib/commonjs/core/getId.js.map +1 -0
- package/lib/commonjs/core/index.js +14 -0
- package/lib/commonjs/core/index.js.map +1 -1
- package/lib/commonjs/hooks/index.js +13 -0
- package/lib/commonjs/hooks/index.js.map +1 -0
- package/lib/commonjs/hooks/useMedia.js.map +1 -0
- package/lib/commonjs/hooks/useMedia.web.js.map +1 -0
- package/lib/commonjs/index.js +8 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/mq.js +6 -6
- package/lib/commonjs/mq.js.map +1 -1
- package/lib/commonjs/specs/ShadowRegistry/index.js +3 -4
- package/lib/commonjs/specs/ShadowRegistry/index.js.map +1 -1
- package/lib/commonjs/specs/StyleSheet/index.js.map +1 -1
- package/lib/commonjs/specs/TurboUnistyles/NativeTurboUnistyles.js +1 -2
- package/lib/commonjs/specs/TurboUnistyles/NativeTurboUnistyles.js.map +1 -1
- package/lib/commonjs/specs/index.web.js +0 -7
- package/lib/commonjs/specs/index.web.js.map +1 -1
- package/lib/commonjs/utils.js +1 -1
- package/lib/commonjs/utils.js.map +1 -1
- package/lib/commonjs/web/convert/types.js.map +1 -1
- package/lib/commonjs/web/convert/utils.js +1 -1
- package/lib/commonjs/web/convert/utils.js.map +1 -1
- package/lib/commonjs/web/create.js +10 -2
- package/lib/commonjs/web/create.js.map +1 -1
- package/lib/commonjs/web/index.js +7 -5
- package/lib/commonjs/web/index.js.map +1 -1
- package/lib/commonjs/web/listener.js.map +1 -1
- package/lib/commonjs/web/runtime.js +7 -7
- package/lib/commonjs/web/runtime.js.map +1 -1
- package/lib/commonjs/web/shadowRegistry.js +1 -1
- package/lib/commonjs/web/shadowRegistry.js.map +1 -1
- package/lib/commonjs/web/state.js +23 -16
- package/lib/commonjs/web/state.js.map +1 -1
- package/lib/commonjs/web/utils/common.js +3 -3
- package/lib/commonjs/web/utils/common.js.map +1 -1
- package/lib/commonjs/web/utils/unistyle.js +2 -4
- package/lib/commonjs/web/utils/unistyle.js.map +1 -1
- package/lib/commonjs/web/{variants/getVariants.js → variants.js} +3 -3
- package/lib/commonjs/web/variants.js.map +1 -0
- package/lib/module/components/Display.js +1 -1
- package/lib/module/components/Display.js.map +1 -1
- package/lib/module/components/Hide.js +1 -1
- package/lib/module/components/Hide.js.map +1 -1
- package/lib/module/components/Pressable.js +76 -0
- package/lib/module/components/Pressable.js.map +1 -0
- package/lib/module/components/Pressable.web.js +91 -0
- package/lib/module/components/Pressable.web.js.map +1 -0
- package/lib/module/components/index.js +1 -0
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/core/getBoundArgs.js +13 -0
- package/lib/module/core/getBoundArgs.js.map +1 -0
- package/lib/module/core/getId.js +4 -0
- package/lib/module/core/getId.js.map +1 -0
- package/lib/module/core/index.js +2 -0
- package/lib/module/core/index.js.map +1 -1
- package/lib/module/hooks/index.js +4 -0
- package/lib/module/hooks/index.js.map +1 -0
- package/lib/module/hooks/useMedia.js.map +1 -0
- package/lib/module/hooks/useMedia.web.js.map +1 -0
- package/lib/module/index.js +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/mq.js +6 -6
- package/lib/module/mq.js.map +1 -1
- package/lib/module/specs/ShadowRegistry/index.js +3 -4
- package/lib/module/specs/ShadowRegistry/index.js.map +1 -1
- package/lib/module/specs/StyleSheet/index.js.map +1 -1
- package/lib/module/specs/TurboUnistyles/NativeTurboUnistyles.js +1 -2
- package/lib/module/specs/TurboUnistyles/NativeTurboUnistyles.js.map +1 -1
- package/lib/module/specs/index.web.js +0 -1
- package/lib/module/specs/index.web.js.map +1 -1
- package/lib/module/utils.js +1 -1
- package/lib/module/utils.js.map +1 -1
- package/lib/module/web/convert/types.js.map +1 -1
- package/lib/module/web/convert/utils.js +1 -1
- package/lib/module/web/convert/utils.js.map +1 -1
- package/lib/module/web/create.js +12 -4
- package/lib/module/web/create.js.map +1 -1
- package/lib/module/web/index.js +7 -3
- package/lib/module/web/index.js.map +1 -1
- package/lib/module/web/listener.js.map +1 -1
- package/lib/module/web/runtime.js +8 -8
- package/lib/module/web/runtime.js.map +1 -1
- package/lib/module/web/shadowRegistry.js +1 -1
- package/lib/module/web/shadowRegistry.js.map +1 -1
- package/lib/module/web/state.js +24 -17
- package/lib/module/web/state.js.map +1 -1
- package/lib/module/web/utils/common.js +1 -1
- package/lib/module/web/utils/common.js.map +1 -1
- package/lib/module/web/utils/unistyle.js +1 -2
- package/lib/module/web/utils/unistyle.js.map +1 -1
- package/lib/module/web/{variants/getVariants.js → variants.js} +3 -3
- package/lib/module/web/variants.js.map +1 -0
- package/lib/typescript/src/components/Pressable.d.ts +7 -0
- package/lib/typescript/src/components/Pressable.d.ts.map +1 -0
- package/lib/typescript/src/components/Pressable.web.d.ts +13 -0
- package/lib/typescript/src/components/Pressable.web.d.ts.map +1 -0
- package/lib/typescript/src/components/index.d.ts +1 -0
- package/lib/typescript/src/components/index.d.ts.map +1 -1
- package/lib/typescript/src/core/getBoundArgs.d.ts +2 -0
- package/lib/typescript/src/core/getBoundArgs.d.ts.map +1 -0
- package/lib/typescript/src/core/getId.d.ts +2 -0
- package/lib/typescript/src/core/getId.d.ts.map +1 -0
- package/lib/typescript/src/core/index.d.ts +2 -0
- package/lib/typescript/src/core/index.d.ts.map +1 -1
- package/lib/typescript/src/hooks/index.d.ts +2 -0
- package/lib/typescript/src/hooks/index.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useMedia.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useMedia.web.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +1 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/specs/NativePlatform/NativePlatform.nitro.d.ts +1 -1
- package/lib/typescript/src/specs/NativePlatform/NativePlatform.nitro.d.ts.map +1 -1
- package/lib/typescript/src/specs/ShadowRegistry/index.d.ts +2 -2
- package/lib/typescript/src/specs/ShadowRegistry/index.d.ts.map +1 -1
- package/lib/typescript/src/specs/ShadowRegistry/types.d.ts +1 -0
- package/lib/typescript/src/specs/ShadowRegistry/types.d.ts.map +1 -1
- package/lib/typescript/src/specs/StyleSheet/UnistylesStyleSheet.nitro.d.ts +1 -1
- package/lib/typescript/src/specs/StyleSheet/UnistylesStyleSheet.nitro.d.ts.map +1 -1
- package/lib/typescript/src/specs/StyleSheet/index.d.ts +3 -2
- package/lib/typescript/src/specs/StyleSheet/index.d.ts.map +1 -1
- package/lib/typescript/src/specs/UnistylesRuntime/index.d.ts +1 -1
- package/lib/typescript/src/specs/UnistylesRuntime/index.d.ts.map +1 -1
- package/lib/typescript/src/specs/index.web.d.ts +0 -2
- package/lib/typescript/src/specs/index.web.d.ts.map +1 -1
- package/lib/typescript/src/types/common.d.ts +1 -0
- package/lib/typescript/src/types/common.d.ts.map +1 -1
- package/lib/typescript/src/types/index.d.ts +1 -1
- package/lib/typescript/src/types/index.d.ts.map +1 -1
- package/lib/typescript/src/web/convert/types.d.ts +1 -1
- package/lib/typescript/src/web/convert/types.d.ts.map +1 -1
- package/lib/typescript/src/web/create.d.ts +1 -1
- package/lib/typescript/src/web/create.d.ts.map +1 -1
- package/lib/typescript/src/web/index.d.ts +8 -2
- package/lib/typescript/src/web/index.d.ts.map +1 -1
- package/lib/typescript/src/web/listener.d.ts.map +1 -1
- package/lib/typescript/src/web/runtime.d.ts.map +1 -1
- package/lib/typescript/src/web/state.d.ts.map +1 -1
- package/lib/typescript/src/web/utils/common.d.ts +1 -1
- package/lib/typescript/src/web/utils/common.d.ts.map +1 -1
- package/lib/typescript/src/web/utils/unistyle.d.ts +0 -1
- package/lib/typescript/src/web/utils/unistyle.d.ts.map +1 -1
- package/lib/typescript/src/web/{variants/getVariants.d.ts → variants.d.ts} +2 -2
- package/lib/typescript/src/web/variants.d.ts.map +1 -0
- package/package.json +12 -16
- package/plugin/common.js +1 -4
- package/plugin/import.js +29 -3
- package/plugin/index.js +18 -8
- package/plugin/ref.js +15 -75
- package/plugin/style.js +251 -88
- package/src/components/Display.tsx +1 -1
- package/src/components/Hide.tsx +1 -1
- package/src/components/Pressable.tsx +101 -0
- package/src/components/Pressable.web.tsx +103 -0
- package/src/components/index.ts +1 -0
- package/src/core/getBoundArgs.ts +15 -0
- package/src/core/getId.ts +1 -0
- package/src/core/index.ts +2 -0
- package/src/hooks/index.ts +1 -0
- package/src/index.ts +1 -1
- package/src/mq.ts +6 -6
- package/src/specs/NativePlatform/NativePlatform.nitro.ts +1 -1
- package/src/specs/ShadowRegistry/index.ts +5 -6
- package/src/specs/ShadowRegistry/types.ts +2 -1
- package/src/specs/StyleSheet/UnistylesStyleSheet.nitro.ts +1 -1
- package/src/specs/StyleSheet/index.ts +3 -2
- package/src/specs/TurboUnistyles/NativeTurboUnistyles.ts +1 -2
- package/src/specs/UnistylesRuntime/UnistylesRuntime.nitro.ts +1 -1
- package/src/specs/UnistylesRuntime/index.ts +1 -1
- package/src/specs/index.web.ts +0 -4
- package/src/types/common.ts +1 -0
- package/src/types/index.ts +1 -1
- package/src/utils.ts +1 -1
- package/src/web/convert/types.ts +1 -1
- package/src/web/convert/utils.ts +2 -2
- package/src/web/create.ts +13 -4
- package/src/web/index.ts +7 -3
- package/src/web/listener.ts +2 -0
- package/src/web/registry.ts +1 -1
- package/src/web/runtime.ts +9 -9
- package/src/web/shadowRegistry.ts +3 -3
- package/src/web/state.ts +36 -17
- package/src/web/utils/common.ts +1 -1
- package/src/web/utils/unistyle.ts +3 -9
- package/src/web/{variants/getVariants.ts → variants.ts} +3 -3
- package/lib/commonjs/components/useMedia.js.map +0 -1
- package/lib/commonjs/components/useMedia.web.js.map +0 -1
- package/lib/commonjs/web/variants/getVariants.js.map +0 -1
- package/lib/commonjs/web/variants/index.js +0 -28
- package/lib/commonjs/web/variants/index.js.map +0 -1
- package/lib/commonjs/web/variants/useVariants.js +0 -59
- package/lib/commonjs/web/variants/useVariants.js.map +0 -1
- package/lib/module/components/useMedia.js.map +0 -1
- package/lib/module/components/useMedia.web.js.map +0 -1
- package/lib/module/web/variants/getVariants.js.map +0 -1
- package/lib/module/web/variants/index.js +0 -5
- package/lib/module/web/variants/index.js.map +0 -1
- package/lib/module/web/variants/useVariants.js +0 -54
- package/lib/module/web/variants/useVariants.js.map +0 -1
- package/lib/typescript/src/components/useMedia.d.ts.map +0 -1
- package/lib/typescript/src/components/useMedia.web.d.ts.map +0 -1
- package/lib/typescript/src/web/variants/getVariants.d.ts.map +0 -1
- package/lib/typescript/src/web/variants/index.d.ts +0 -3
- package/lib/typescript/src/web/variants/index.d.ts.map +0 -1
- package/lib/typescript/src/web/variants/useVariants.d.ts +0 -3
- package/lib/typescript/src/web/variants/useVariants.d.ts.map +0 -1
- package/src/web/variants/index.ts +0 -2
- package/src/web/variants/useVariants.ts +0 -65
- /package/lib/commonjs/{components → hooks}/useMedia.js +0 -0
- /package/lib/commonjs/{components → hooks}/useMedia.web.js +0 -0
- /package/lib/module/{components → hooks}/useMedia.js +0 -0
- /package/lib/module/{components → hooks}/useMedia.web.js +0 -0
- /package/lib/typescript/src/{components → hooks}/useMedia.d.ts +0 -0
- /package/lib/typescript/src/{components → hooks}/useMedia.web.d.ts +0 -0
- /package/src/{components → hooks}/useMedia.ts +0 -0
- /package/src/{components → hooks}/useMedia.web.ts +0 -0
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["UnistyleDependency","ColorScheme","Orientation","WebContentSizeCategory","UnistylesListener","NavigationBar","StatusBar","UnistylesState","isServer","schemeToTheme","UnistylesRuntimeBuilder","lightMedia","getLightMedia","darkMedia","getDarkMedia","window","matchMedia","colorScheme","matches","Light","Dark","Unspecified","themeName","hasAdaptiveThemes","contentSizeCategory","breakpoints","breakpoint","orientation","Portrait","screen","type","includes","Landscape","theme","getTheme","pixelRatio","devicePixelRatio","width","height","innerWidth","innerHeight","fontScale","insets","top","bottom","left","right","ime","statusBar","rtl","document","documentElement","dir","navigationBar","miniRuntime","isLandscape","isPortrait","setTheme","UnistylesRuntime","emitChange","Theme","ThemeName","setAdaptiveThemes","isEnabled","setRootViewBackgroundColor","color","style","backgroundColor","setImmersiveMode","updateTheme","updater","oldTheme","themes","get","
|
1
|
+
{"version":3,"names":["UnistyleDependency","ColorScheme","Orientation","WebContentSizeCategory","UnistylesListener","NavigationBar","StatusBar","UnistylesState","error","isServer","schemeToTheme","UnistylesRuntimeBuilder","lightMedia","getLightMedia","darkMedia","getDarkMedia","window","matchMedia","colorScheme","matches","Light","Dark","Unspecified","themeName","hasAdaptiveThemes","contentSizeCategory","breakpoints","breakpoint","orientation","Portrait","screen","type","includes","Landscape","theme","getTheme","pixelRatio","devicePixelRatio","width","height","innerWidth","innerHeight","fontScale","insets","top","bottom","left","right","ime","statusBar","rtl","document","documentElement","dir","navigationBar","miniRuntime","isLandscape","isPortrait","setTheme","UnistylesRuntime","emitChange","Theme","ThemeName","setAdaptiveThemes","isEnabled","setRootViewBackgroundColor","color","style","backgroundColor","setImmersiveMode","updateTheme","updater","oldTheme","themes","get","set"],"sourceRoot":"../../../src","sources":["web/runtime.ts"],"mappings":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SAAS,KAAK;IACvC,MAAMW,KAAK,GAAG3B,cAAc,CAACkE,MAAM,CAACC,GAAG,CAACnD,SAAS,IAAI,EAAE,CAAC;IAExD,IAAI,CAACA,SAAS,IAAI,CAACW,KAAK,EAAE;MACtB,MAAM1B,KAAK,CAAC,+BAA+Be,SAAS,6BAA6B,CAAC;IACtF;IAEA,OAAOW,KAAK;EAChB,CAAC;AACL;AAEA,OAAO,MAAMyB,gBAAgB,GAAG,IAAIhD,uBAAuB,CAAC,CAAC","ignoreList":[]}
|
@@ -66,7 +66,7 @@ class UnistylesShadowRegistryBuilder {
|
|
66
66
|
const newComputedStylesheet = UnistylesRegistry.getComputedStylesheet(__uni__stylesheet);
|
67
67
|
const style = newComputedStylesheet[__uni__key];
|
68
68
|
const variants = _variants && Object.keys(_variants).length > 0 ? _variants : __uni__variants;
|
69
|
-
const args = _args[styleIndex] ? _args[styleIndex] : __uni__args;
|
69
|
+
const args = _args[styleIndex] && _args[styleIndex].length > 0 ? _args[styleIndex] : __uni__args;
|
70
70
|
const result = typeof style === 'function' ? style(...args) : style;
|
71
71
|
const {
|
72
72
|
variantsResult
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["convertUnistyles","UnistylesListener","UnistylesRegistry","deepMergeObjects","equal","extractSecrets","extractUnistyleDependencies","isInDocument","getVariants","UnistylesShadowRegistryBuilder","name","__type","equals","toString","dispose","resultsMap","Map","hashMap","classNamesMap","add","ref","_style","_variants","_args","secrets","forEach","__uni__refs","oldResult","get","delete","remove","HTMLElement","styles","filter","style","Object","keys","some","key","startsWith","length","parsedStyles","flatMap","styleIndex","map","secret","__uni__key","__uni__stylesheet","__uni__variants","__uni__args","newComputedStylesheet","getComputedStylesheet","variants","args","result","variantsResult","fromEntries","resultWithVariants","dependencies","addDependenciesToStylesheet","addListeners","hash","newComputedStyleSheet","newValue","applyStyles","combinedStyles","oldStyles","oldClassNames","className","classList","set","existingHash","injectedClassNames","_web","_classNames","newClassNames","Array","isArray","concat","Unist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UAE9B,IAAIO,SAAS,EAAE;YACXzB,iBAAiB,CAAC4B,MAAM,CAACH,SAAS,CAAC;UACvC;QACJ,CAAC,CAAC;MACN,CAAC,CAAC;MAEF;IACJ;;IAEA;IACA,IAAI,EAAEP,GAAG,YAAYW,WAAW,CAAC,EAAE;MAC/B;IACJ;IAEA,MAAMC,MAAM,GAAGX,MAAM,CAACY,MAAM,CAACC,KAAK,IAAIC,MAAM,CAACC,IAAI,CAACF,KAAK,IAAI,CAAC,CAAC,CAAC,CAACG,IAAI,CAACC,GAAG,IAAIA,GAAG,CAACC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC;;IAEtG;IACA,IAAIP,MAAM,CAACQ,MAAM,KAAK,CAAC,EAAE;MACrB;IACJ;IAEA,MAAMC,YAAY,GAAGT,MAAM,CAACU,OAAO,CAAC,CAACR,KAAK,EAAES,UAAU,KAAKtC,cAAc,CAAC6B,KAAK,CAAC,CAACU,GAAG,CAACC,MAAM,IAAI;MAC3F,MAAM;QAAEC,UAAU;QAAEC,iBAAiB;QAAEC,eAAe;QAAEC,WAAW,GAAG,EAAE;QAAEvB;MAAY,CAAC,GAAGmB,MAAM;MAChG,MAAMK,qBAAqB,GAAGhD,iBAAiB,CAACiD,qBAAqB,CAACJ,iBAAiB,CAAC;MACxF,MAAMb,KAAK,GAAGgB,qBAAqB,CAACJ,UAAU,
|
1
|
+
{"version":3,"names":["convertUnistyles","UnistylesListener","UnistylesRegistry","deepMergeObjects","equal","extractSecrets","extractUnistyleDependencies","isInDocument","getVariants","UnistylesShadowRegistryBuilder","name","__type","equals","toString","dispose","resultsMap","Map","hashMap","classNamesMap","add","ref","_style","_variants","_args","secrets","forEach","__uni__refs","oldResult","get","delete","remove","HTMLElement","styles","filter","style","Object","keys","some","key","startsWith","length","parsedStyles","flatMap","styleIndex","map","secret","__uni__key","__uni__stylesheet","__uni__variants","__uni__args","newComputedStylesheet","getComputedStylesheet","variants","args","result","variantsResult","fromEntries","resultWithVariants","dependencies","addDependenciesToStylesheet","addListeners","hash","newComputedStyleSheet","newValue","applyStyles","combinedStyles","oldStyles","oldClassNames","className","classList","set","existingHash","injectedClassNames","_web","_classNames","newClassNames","Array","isArray","concat","UnistylesShadowRegistry"],"sourceRoot":"../../../src","sources":["web/shadowRegistry.ts"],"mappings":";;AACA,SAASA,gBAAgB,QAAQ,WAAW;AAC5C,SAASC,iBAAiB,QAAQ,YAAY;AAC9C,SAASC,iBAAiB,QAAQ,YAAY;AAC9C,SAASC,gBAAgB,QAAQ,UAAU;AAC3C,SAASC,KAAK,EAAEC,cAAc,EAAEC,2BAA2B,EAAEC,YAAY,QAAQ,SAAS;AAC1F,SAASC,WAAW,QAAQ,YAAY;AAIxC,MAAMC,8BAA8B,CAAC;EACjC;EACAC,IAAI,GAAG,yBAAyB;EAChCC,MAAM,GAAG,KAAK;EACdC,MAAM,GAAGA,CAAA,KAAM,IAAI;EACnBC,QAAQ,GAAGA,CAAA,KAAM,yBAAyB;EAC1CC,OAAO,GAAGA,CAAA,KAAM,CAAC,CAAC;EAClB;;EAEQC,UAAU,GAAG,IAAIC,GAAG,CAA+B,CAAC;EACpDC,OAAO,GAAG,IAAID,GAAG,CAAsB,CAAC;EACxCE,aAAa,GAAG,IAAIF,GAAG,CAA6B,CAAC;EAE7DG,GAAG,GAAGA,CAACC,GAAQ,EAAEC,MAAoB,EAAEC,SAA0C,EAAEC,KAAwB,KAAK;IAC5G;IACA,IAAI,CAACF,MAAM,EAAE;MACT;IACJ;;IAEA;IACA,IAAID,GAAG,KAAK,IAAI,EAAE;MACd,MAAMI,OAAO,GAAGnB,cAAc,CAACgB,MAAM,CAAC;MAEtCG,OAAO,CAACC,OAAO,CAAC,CAAC;QAAEC;MAAY,CAAC,KAAK;QACjCA,WAAW,CAACD,OAAO,CAACL,GAAG,IAAI;UACvB,IAAIb,YAAY,CAACa,GAAG,CAAC,EAAE;YACnB;UACJ;UAEA,MAAMO,SAAS,GAAG,IAAI,CAACZ,UAAU,CAACa,GAAG,C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,CAAC,GAAGwD,aAAa,CAAC;;IAEnC;IACA,IAAI,CAACJ,YAAY,EAAE;MACf,IAAI,CAACtD,OAAO,CAACqD,GAAG,CAAClD,GAAG,EAAEyC,IAAI,CAAC;IAC/B;IAEA,OAAOc,aAAa;EACxB,CAAC;EAED7C,MAAM,GAAGA,CAAA,KAAM,CAAC,CAAC;AACrB;AAEA,OAAO,MAAMiD,uBAAuB,GAAG,IAAItE,8BAA8B,CAAC,CAAC","ignoreList":[]}
|
package/lib/module/web/state.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
3
|
import { UnistylesRuntime } from './runtime';
|
4
|
-
import { isServer, schemeToTheme } from './utils';
|
4
|
+
import { error, isServer, schemeToTheme } from './utils';
|
5
5
|
import { UnistylesListener } from './listener';
|
6
6
|
import { UnistyleDependency } from '../specs/NativePlatform';
|
7
7
|
class UnistylesStateBuilder {
|
@@ -15,7 +15,9 @@ class UnistylesStateBuilder {
|
|
15
15
|
init = config => {
|
16
16
|
this.initThemes(config.themes);
|
17
17
|
this.initBreakpoints(config.breakpoints);
|
18
|
-
|
18
|
+
if (config.settings) {
|
19
|
+
this.initSettings(config.settings);
|
20
|
+
}
|
19
21
|
if (isServer()) {
|
20
22
|
return;
|
21
23
|
}
|
@@ -28,31 +30,36 @@ class UnistylesStateBuilder {
|
|
28
30
|
};
|
29
31
|
initSettings = settings => {
|
30
32
|
this.hasAdaptiveThemes = settings?.adaptiveThemes ?? false;
|
31
|
-
|
32
|
-
|
33
|
-
// Single theme + no settings
|
34
|
-
if (!settings?.adaptiveThemes && !settings?.initialTheme && themeNames.length === 1) {
|
35
|
-
this.themeName = themeNames[0];
|
36
|
-
return;
|
37
|
-
}
|
38
|
-
|
39
|
-
// No settings
|
40
|
-
if (!settings?.adaptiveThemes && !settings?.initialTheme) {
|
41
|
-
throw new Error('🦄 You need to specify either "initialTheme" or "adaptiveThemes" in your config');
|
33
|
+
if (settings.initialTheme && settings.adaptiveThemes) {
|
34
|
+
throw error('You\'re trying to set initial theme and enable adaptiveThemes, but these options are mutually exclusive.');
|
42
35
|
}
|
43
36
|
|
44
37
|
// Adaptive themes
|
45
38
|
if (settings.adaptiveThemes) {
|
39
|
+
if (!this.themes.get('light') || !this.themes.get('dark')) {
|
40
|
+
throw error(`You're trying to enable adaptiveThemes, but you didn't register both 'light' and 'dark' themes.`);
|
41
|
+
}
|
46
42
|
this.themeName = schemeToTheme(UnistylesRuntime.colorScheme);
|
47
43
|
return;
|
48
44
|
}
|
49
|
-
|
50
|
-
|
51
|
-
|
45
|
+
if (settings.initialTheme) {
|
46
|
+
const initialTheme = typeof settings.initialTheme === 'function' ? settings.initialTheme() : settings.initialTheme;
|
47
|
+
if (!this.themes.get(initialTheme)) {
|
48
|
+
throw error(`You're trying to select theme "${initialTheme}" but it wasn't registered.`);
|
49
|
+
}
|
50
|
+
this.themeName = initialTheme;
|
51
|
+
}
|
52
52
|
};
|
53
53
|
initBreakpoints = (breakpoints = {}) => {
|
54
54
|
this.breakpoints = breakpoints;
|
55
|
-
Object.entries(breakpoints)
|
55
|
+
const breakpointsEntries = Object.entries(breakpoints);
|
56
|
+
if (breakpointsEntries.length === 0) {
|
57
|
+
throw error('StyleSheet.configure\'s breakpoints can\'t be empty.');
|
58
|
+
}
|
59
|
+
if (breakpointsEntries?.[0]?.[1] !== 0) {
|
60
|
+
throw error('StyleSheet.configure\'s first breakpoint must start from 0.');
|
61
|
+
}
|
62
|
+
breakpointsEntries.sort(([, a], [, b]) => a - b).forEach(([breakpoint, value]) => {
|
56
63
|
if (isServer()) {
|
57
64
|
return;
|
58
65
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["UnistylesRuntime","isServer","schemeToTheme","UnistylesListener","UnistyleDependency","UnistylesStateBuilder","themes","Map","matchingBreakpoints","breakpoint","currentBreakpoint","Array","from","reverse","find","_key","value","hasAdaptiveThemes","init","config","initThemes","initBreakpoints","breakpoints","
|
1
|
+
{"version":3,"names":["UnistylesRuntime","error","isServer","schemeToTheme","UnistylesListener","UnistyleDependency","UnistylesStateBuilder","themes","Map","matchingBreakpoints","breakpoint","currentBreakpoint","Array","from","reverse","find","_key","value","hasAdaptiveThemes","init","config","initThemes","initBreakpoints","breakpoints","settings","initSettings","initListeners","Object","entries","forEach","themeName","theme","set","adaptiveThemes","initialTheme","get","colorScheme","breakpointsEntries","length","sort","a","b","mediaQuery","window","matchMedia","matches","addEventListener","event","emitChange","Breakpoints","UnistylesState"],"sourceRoot":"../../../src","sources":["web/state.ts"],"mappings":";;AAIA,SAASA,gBAAgB,QAAQ,WAAW;AAC5C,SAASC,KAAK,EAAEC,QAAQ,EAAEC,aAAa,QAAQ,SAAS;AACxD,SAASC,iBAAiB,QAAQ,YAAY;AAC9C,SAASC,kBAAkB,QAAQ,yBAAyB;AAK5D,MAAMC,qBAAqB,CAAC;EACxBC,MAAM,GAAG,IAAIC,GAAG,CAAyB,CAAC;EAGlCC,mBAAmB,GAAG,IAAID,GAAG,CAAkB,CAAC;EAExD,IAAIE,UAAUA,CAAA,EAAG;IACb,MAAM,CAACC,iBAAiB,CAAC,GAAGC,KAAK,CAACC,IAAI,CAAC,IAAI,CAACJ,mBAAmB,CAAC,CAC3DK,OAAO,CAAC,CAAC,CACTC,IAAI,CAAC,CAAC,CAACC,IAAI,EAAEC,KAAK,CAAC,KAAKA,KAAK,CAAC,IAAI,EAAE;IAEzC,OAAON,iBAAiB;EAC5B;EAIAO,iBAAiB,GAAG,KAAK;EAEzBC,IAAI,GAAIC,MAAuB,IAAK;IAChC,IAAI,CAACC,UAAU,CAACD,MAAM,CAACb,MAAM,CAAC;IAC9B,IAAI,CAACe,eAAe,CAACF,MAAM,CAACG,WAAW,CAAC;IAExC,IAAIH,MAAM,CAACI,QAAQ,EAAE;MACjB,IAAI,CAACC,YAAY,CAACL,MAAM,CAACI,QAA6B,CAAC;IAC3D;IAEA,IAAItB,QAAQ,CAAC,CAAC,EAAE;MACZ;IACJ;IAEAE,i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GA,CAACC,WAAW,GAAG,CAAC,CAAyB,KAAK;IACpE,IAAI,CAACA,WAAW,GAAGA,WAAW;IAC9B,MAAMc,kBAAkB,GAAGV,MAAM,CAACC,OAAO,CAACL,WAAW,CAAC;IAEtD,IAAIc,kBAAkB,CAACC,MAAM,KAAK,CAAC,EAAE;MACjC,MAAMrC,KAAK,CAAC,sDAAsD,CAAC;IACvE;IAEA,IAAIoC,kBAAkB,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,EAAE;MACpC,MAAMpC,KAAK,CAAC,6DAA6D,CAAC;IAC9E;IAEAoC,kBAAkB,CACbE,IAAI,CAAC,CAAC,GAAGC,CAAC,CAAC,EAAE,GAAGC,CAAC,CAAC,KAAKD,CAAC,GAAGC,CAAC,CAAC,CAC7BZ,OAAO,CAAC,CAAC,CAACnB,UAAU,EAAEO,KAAK,CAAC,KAAK;MAC9B,IAAIf,QAAQ,CAAC,CAAC,EAAE;QACZ;MACJ;MAEA,MAAMwC,UAAU,GAAGC,MAAM,CAACC,UAAU,CAAC,eAAe3B,KAAK,KAAK,CAAC;MAC/D,IAAI,CAACR,mBAAmB,CAACuB,GAAG,CAACtB,UAAU,EAAEgC,UAAU,CAACG,OAAO,CAAC;MAE5DH,UAAU,CAACI,gBAAgB,CAAC,QAAQ,EAAEC,KAAK,IAAI;QAC3C,IAAI,CAACtC,mBAAmB,CAACuB,GAAG,CAACtB,UAAU,EAAEqC,KAAK,CAACF,OAAO,CAAC;QACvDzC,iBAAiB,CAAC4C,UAAU,CAAC3C,kBAAkB,CAAC4C,WAAW,CAAC;MAChE,CAAC,CAAC;IACN,CAAC,CAAC;EACV,CAAC;AACL;AAEA,OAAO,MAAMC,cAAc,GAAG,IAAI5C,qBAAqB,CAAC,CAAC","ignoreList":[]}
|
@@ -3,7 +3,7 @@
|
|
3
3
|
export const reduceObject = (obj, reducer) => Object.fromEntries(Object.entries(obj).map(([key, value]) => [key, reducer(value, key)]));
|
4
4
|
export const keyInObject = (obj, key) => key in obj;
|
5
5
|
export const isServer = () => typeof window === 'undefined';
|
6
|
-
export const
|
6
|
+
export const error = message => new Error(`Unistyles: ${message}`);
|
7
7
|
export const equal = (a, b) => {
|
8
8
|
if (Object.is(a, b)) {
|
9
9
|
return true;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["reduceObject","obj","reducer","Object","fromEntries","entries","map","key","value","keyInObject","isServer","window","
|
1
|
+
{"version":3,"names":["reduceObject","obj","reducer","Object","fromEntries","entries","map","key","value","keyInObject","isServer","window","error","message","Error","equal","a","b","is","keysA","keys","length","every","prototype","hasOwnProperty","call","generateHash","str","JSON","stringify","hasher","charCodeAt","toString","hyphenate","propertyName","replace","m","toLowerCase"],"sourceRoot":"../../../../src","sources":["web/utils/common.ts"],"mappings":";;AAAA,OAAO,MAAMA,YAAY,GAAGA,CACxBC,GAAS,EACTC,OAA+D,KAC9DC,MAAM,CAACC,WAAW,CAACD,MAAM,CAACE,OAAO,CAACJ,GAAG,CAAC,CAACK,GAAG,CAAC,CAAC,CAACC,GAAG,EAAEC,KAAK,CAAC,KAAK,CAACD,GAAG,EAAEL,OAAO,CAACM,KAAK,EAAsBD,GAAG,CAAC,CAAC,CAAC,CAAoC;AAErJ,OAAO,MAAME,WAAW,GAAGA,CAAgCR,GAAM,EAAEM,GAAgB,KAAqBA,GAAG,IAAIN,GAAG;AAElH,OAAO,MAAMS,QAAQ,GAAGA,CAAA,KAAM,OAAOC,MAAM,KAAK,WAAW;AAE3D,OAAO,MAAMC,KAAK,GAAIC,OAAe,IAAK,IAAIC,KAAK,CAAC,cAAcD,OAAO,EAAE,CAAC;AAE5E,OAAO,MAAME,KAAK,GAAGA,CAAIC,CAAI,EAAEC,CAAI,KAAK;EACpC,IAAId,MAAM,CAACe,EAAE,CAACF,CAAC,EAAEC,CAAC,CAAC,EAAE;IACjB,OAAO,IAAI;EACf;EAEA,IACI,OAAOD,CAAC,KAAK,QAAQ,IAClBA,CAAC,KAAK,IAAI,IACV,OAAOC,CAAC,KAAK,QAAQ,IACrBA,CAAC,KAAK,IAAI,EACf;IACE,OAAO,KAAK;EAChB;EAEA,MAAME,KAAK,GAAGhB,MAAM,CAACiB,IAAI,CAACJ,CAAC,CAAmB;EAE9C,IAAIG,KAAK,CAACE,MAAM,KAAKlB,MAAM,CAACiB,IAAI,CAACH,CAAC,CAAC,CAACI,MAAM,EAAE;IACxC,OAAO,KAAK;EAChB;EAEA,OAAOF,KAAK,CAACG,KAAK,CAACf,GAAG,IAAIJ,MAAM,CAACe,EAAE,CAACF,CAAC,CAACT,GAAG,CAAC,EAAEU,CAAC,CAACV,GAAG,CAAC,CAAC,IAAIJ,MAAM,CAACoB,SAAS,CAACC,cAAc,CAACC,IAAI,CAACR,CAAC,EAAEV,GAAG,CAAC,CAAC;AACxG,CAAC;AAED,OAAO,MAAMmB,YAAY,GAAIlB,KAAU,IAAK;EACxC,MAAMmB,GAAG,GAAGC,IAAI,CAACC,SAAS,CAACrB,KAAK,CAAC;EACjC,IAAIsB,MAAM,GAAG,IAAI;EACjB,IAAIT,MAAM,GAAGM,GAAG,CAACN,MAAM;EAEvB,OAAOA,MAAM,EAAE,EAAES,MAAM,GAAIA,MAAM,GAAG,EAAE,GAAIH,GAAG,CAACI,UAAU,CAACV,MAAM,CAAC;EAEhE,OAAO,aAAa,CAACS,MAAM,KAAK,CAAC,EAAEE,QAAQ,CAAC,EAAE,CAAC,EAAE;AACrD,CAAC;AAED,OAAO,MAAMC,SAAS,GAAIC,YAAoB,IAAKA,YAAY,CAACC,OAAO,CAAC,QAAQ,EAAGC,CAAS,IAAK,IAAIA,CAAC,CAACC,WAAW,CAAC,CAAC,EAAE,CAAC","ignoreList":[]}
|
@@ -13,7 +13,6 @@ export const schemeToTheme = scheme => {
|
|
13
13
|
return 'light';
|
14
14
|
}
|
15
15
|
};
|
16
|
-
export const hexToRGBA = (hex, opacity) => hex.replace('#', '').split(/(?=(?:..)*$)/).map(x => parseInt(x, 16)).filter(num => !isNaN(num)).reduce((acc, color) => `${acc}${color},`, 'rgba(').concat(`${opacity})`);
|
17
16
|
export const assignSecrets = (object, secrets) => {
|
18
17
|
// @ts-expect-error - assign secrets to object
|
19
18
|
object[`__uni__secrets__${Math.random().toString(16).slice(2)}`] = secrets;
|
@@ -44,7 +43,7 @@ export const extractMediaQueryValue = query => {
|
|
44
43
|
return undefined;
|
45
44
|
}
|
46
45
|
const value = Number(px);
|
47
|
-
return isNaN(value) ? undefined : value;
|
46
|
+
return Number.isNaN(value) ? undefined : value;
|
48
47
|
};
|
49
48
|
export const getMediaQuery = query => {
|
50
49
|
if (Object.values(Orientation).includes(query)) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["ColorScheme","Orientation","isUnistylesMq","parseMq","UnistylesState","keyInObject","reduceObject","schemeToTheme","scheme","Dark","Light","
|
1
|
+
{"version":3,"names":["ColorScheme","Orientation","isUnistylesMq","parseMq","UnistylesState","keyInObject","reduceObject","schemeToTheme","scheme","Dark","Light","assignSecrets","object","secrets","Math","random","toString","slice","extractSecrets","Object","entries","reduce","acc","key","value","startsWith","push","getStyles","values","returnValue","defineProperties","enumerable","configurable","isInDocument","element","document","body","contains","extractMediaQueryValue","query","_","px","match","undefined","Number","isNaN","getMediaQuery","includes","minWidth","maxWidth","minHeight","maxHeight","filter","Boolean","join","breakpoints","extractUnistyleDependencies","dependencies","uni__dependencies","Array","isArray"],"sourceRoot":"../../../../src","sources":["web/utils/unistyle.ts"],"mappings":";;AACA,SAASA,WAAW,EAAEC,WAAW,QAAQ,mBAAmB;AAE5D,SAASC,aAAa,EAAEC,OAAO,QAAQ,UAAU;AACjD,SAASC,cAAc,QAAQ,UAAU;AACzC,SAASC,WAAW,EAAEC,YAAY,QAAQ,UAAU;AAEpD,OAAO,MAAMC,aAAa,GAAIC,MAAmB,IAAK;EAClD,QAAQA,MAAM;IACV,KAAKR,WAAW,CAACS,IAAI;MACjB,OAAO,MAAM;IACjB,KAAKT,WAAW,CAACU,KAAK;IACt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,OAAOC,KAAK,CAACC,OAAO,CAACH,YAAY,CAAC,GAAGA,YAAY,GAAG,EAAE;AAC1D,CAAC","ignoreList":[]}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
-
import { deepMergeObjects } from '
|
3
|
+
import { deepMergeObjects } from '../utils';
|
4
4
|
const hasVariants = value => 'variants' in value[1];
|
5
5
|
export const getVariants = (styles, selectedVariants) => {
|
6
6
|
return Object.entries(styles).filter(hasVariants).filter(([_key, {
|
@@ -11,7 +11,7 @@ export const getVariants = (styles, selectedVariants) => {
|
|
11
11
|
}]) => {
|
12
12
|
const variantStyles = Object.entries(variants).flatMap(([variant, styles]) => {
|
13
13
|
const selectedVariant = selectedVariants[variant];
|
14
|
-
const selectedVariantStyles = styles[selectedVariant] ?? styles
|
14
|
+
const selectedVariantStyles = styles[selectedVariant] ?? styles.default;
|
15
15
|
if (!selectedVariantStyles) {
|
16
16
|
return [];
|
17
17
|
}
|
@@ -31,4 +31,4 @@ export const getVariants = (styles, selectedVariants) => {
|
|
31
31
|
return [key, mergedVariantStyles];
|
32
32
|
});
|
33
33
|
};
|
34
|
-
//# sourceMappingURL=
|
34
|
+
//# sourceMappingURL=variants.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["deepMergeObjects","hasVariants","value","getVariants","styles","selectedVariants","Object","entries","filter","_key","variants","keys","some","variant","map","key","compoundVariants","variantStyles","flatMap","selectedVariant","selectedVariantStyles","default","compoundVariantStyles","compoundVariant","conditions","String","mergedVariantStyles"],"sourceRoot":"../../../src","sources":["web/variants.ts"],"mappings":";;AACA,SAASA,gBAAgB,QAAQ,UAAU;AAQ3C,MAAMC,WAAW,GAAsBC,KAAkB,IAAgD,UAAU,IAAIA,KAAK,CAAC,CAAC,CAAC;AAE/H,OAAO,MAAMC,WAAW,GAAGA,CAACC,MAAyC,EAAEC,gBAAqC,KAAK;EAC7G,OAAOC,MAAM,CAACC,OAAO,CAACH,MAAM,CAA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,CAAC","ignoreList":[]}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import type { PressableProps as Props, View } from 'react-native';
|
3
|
+
export declare const Pressable: React.ForwardRefExoticComponent<Props & {
|
4
|
+
rawStyle?: Array<any>;
|
5
|
+
variants?: Record<string, string | boolean>;
|
6
|
+
} & React.RefAttributes<View>>;
|
7
|
+
//# sourceMappingURL=Pressable.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Pressable.d.ts","sourceRoot":"","sources":["../../../../src/components/Pressable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6B,MAAM,OAAO,CAAA;AAEjD,OAAO,KAAK,EAAE,cAAc,IAAI,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AASjE,eAAO,MAAM,SAAS;eAJP,KAAK,CAAC,GAAG,CAAC;eACV,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC;8BA4F7C,CAAA"}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import type { PressableProps as Props, View, ViewStyle } from 'react-native';
|
3
|
+
type WebPressableState = {
|
4
|
+
pressed: boolean;
|
5
|
+
hovered: boolean;
|
6
|
+
focused: boolean;
|
7
|
+
};
|
8
|
+
export declare const Pressable: React.ForwardRefExoticComponent<Props & {
|
9
|
+
variants?: Record<string, string | boolean>;
|
10
|
+
style?: ((state: WebPressableState) => ViewStyle) | ViewStyle;
|
11
|
+
} & React.RefAttributes<View>>;
|
12
|
+
export {};
|
13
|
+
//# sourceMappingURL=Pressable.web.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Pressable.web.d.ts","sourceRoot":"","sources":["../../../../src/components/Pressable.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwC,MAAM,OAAO,CAAA;AAE5D,OAAO,KAAK,EAAE,cAAc,IAAI,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAG5E,KAAK,iBAAiB,GAAG;IACrB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAA;CACnB,CAAA;AAsBD,eAAO,MAAM,SAAS;eAnBP,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC;YACnC,CAAC,CAAC,KAAK,EAAE,iBAAiB,KAAK,SAAS,CAAC,GAAG,SAAS;8BAyF/D,CAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAC7B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA"}
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAC7B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"getBoundArgs.d.ts","sourceRoot":"","sources":["../../../../src/core/getBoundArgs.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,OAAQ,QAAQ,aAcxC,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"getId.d.ts","sourceRoot":"","sources":["../../../../src/core/getId.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,cAAwD,CAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAA"}
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAA;AACrE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"useMedia.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useMedia.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,QAAQ,WAAY;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE;;CA2D9C,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"useMedia.web.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useMedia.web.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,QAAQ,WAAY;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE;;CA2C9C,CAAA"}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
export * from './specs';
|
2
2
|
export { mq } from './mq';
|
3
3
|
export type { UnistylesThemes, UnistylesBreakpoints } from './global';
|
4
|
-
export { createUnistylesComponent } from './core';
|
4
|
+
export { createUnistylesComponent, getBoundArgs } from './core';
|
5
5
|
export type { UnistylesVariants } from './types';
|
6
6
|
export * from './components';
|
7
7
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AACvB,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAA;AACzB,YAAY,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AACrE,OAAO,EAAE,wBAAwB,EAAE,MAAM,QAAQ,CAAA;
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AACvB,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAA;AACzB,YAAY,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AACrE,OAAO,EAAE,wBAAwB,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAA;AAC/D,YAAY,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAChD,cAAc,cAAc,CAAA"}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import type { HybridObject } from 'react-native-nitro-modules';
|
2
|
-
import {
|
2
|
+
import type { Dimensions, Insets } from '../types';
|
3
3
|
type ColorScheme = 'dark' | 'light' | 'unspecified';
|
4
4
|
type Orientation = 'portrait' | 'landscape';
|
5
5
|
export declare enum UnistyleDependency {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"NativePlatform.nitro.d.ts","sourceRoot":"","sources":["../../../../../src/specs/NativePlatform/NativePlatform.nitro.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AAC9D,OAAO,EAAE,
|
1
|
+
{"version":3,"file":"NativePlatform.nitro.d.ts","sourceRoot":"","sources":["../../../../../src/specs/NativePlatform/NativePlatform.nitro.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AAC9D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAElD,KAAK,WAAW,GAAG,MAAM,GAAG,OAAO,GAAG,aAAa,CAAA;AACnD,KAAK,WAAW,GAAG,UAAU,GAAG,WAAW,CAAA;AAE3C,oBAAY,kBAAkB;IAC1B,KAAK,IAAI;IACT,SAAS,IAAI;IACb,cAAc,IAAI;IAClB,WAAW,IAAI;I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,EAAE,OAAO,GAAG,IAAI,CAAC;IACjD,kBAAkB,CAAC,QAAQ,EAAE,OAAO,GAAG,IAAI,CAAC;IAC5C,gBAAgB,CAAC,SAAS,EAAE,OAAO,GAAG,IAAI,CAAC;IAG3C,cAAc,IAAI,0BAA0B,CAAC;IAC7C,wBAAwB,CAAC,QAAQ,EAAE,CAAC,YAAY,EAAE,KAAK,CAAC,kBAAkB,CAAC,EAAE,WAAW,EAAE,0BAA0B,KAAK,IAAI,GAAG,IAAI,CAAC;IACrI,mBAAmB,CAAC,QAAQ,EAAE,CAAC,WAAW,EAAE,0BAA0B,KAAK,IAAI,GAAG,IAAI,CAAC;IACvF,2BAA2B,IAAI,IAAI,CAAA;CACtC"}
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import type { UnistylesShadowRegistry as UnistylesShadowRegistrySpec } from './ShadowRegistry.nitro';
|
2
2
|
import type { ShadowNode, Unistyle, ViewHandle } from './types';
|
3
3
|
interface ShadowRegistry extends UnistylesShadowRegistrySpec {
|
4
|
-
add(handle?: ViewHandle, styles?: Array<Unistyle>, variants?: Record<string, string | boolean>, args?: Array<Array<any>>,
|
4
|
+
add(handle?: ViewHandle, styles?: Array<Unistyle>, variants?: Record<string, string | boolean>, args?: Array<Array<any>>, id?: string): void;
|
5
5
|
remove(handle?: ViewHandle): void;
|
6
|
-
link(node: ShadowNode, styles?: Array<Unistyle>, variants?: Record<string, string | boolean>, args?: Array<Array<any>>,
|
6
|
+
link(node: ShadowNode, styles?: Array<Unistyle>, variants?: Record<string, string | boolean>, args?: Array<Array<any>>, id?: string): void;
|
7
7
|
unlink(node: ShadowNode): void;
|
8
8
|
}
|
9
9
|
type PrivateMethods = 'add' | 'remove' | 'link' | 'unlink';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/specs/ShadowRegistry/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,uBAAuB,IAAI,2BAA2B,EAAE,M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AAE,MAAM,GAAG,IAAI,CAAC;IAC3I,MAAM,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,CAAA;CACjC;AAsCD,KAAK,cAAc,GACb,KAAK,GACL,QAAQ,GACR,MAAM,GACN,QAAQ,CAAA;AAEd,eAAO,MAAM,uBAAuB,EAA2B,IAAI,CAAC,cAAc,EAAE,cAAc,CAAC,CAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/specs/ShadowRegistry/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG;IACpB,IAAI,CAAC,EAAE,UAAU,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,UAAU,GAAG;IACrB,6BAA6B,EAAE,GAAG,CAAA;CACrC,CAAA;AAED,MAAM,MAAM,UAAU,GAAG;IACrB,wBAAwB,CAAC,EAAE;QACvB,SAAS,CAAC,EAAE,SAAS,CAAA;
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/specs/ShadowRegistry/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG;IACpB,IAAI,CAAC,EAAE,UAAU,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,UAAU,GAAG;IACrB,6BAA6B,EAAE,GAAG,CAAA;CACrC,CAAA;AAED,MAAM,MAAM,UAAU,GAAG;IACrB,wBAAwB,CAAC,EAAE;QACvB,SAAS,CAAC,EAAE,SAAS,CAAC;QACtB,WAAW,CAAC,EAAE,MAAM,CAAA;KACvB,CAAC;IACF,kBAAkB,CAAC,EAAE,MAAM;QACvB,kBAAkB,CAAC,EAAE,MAAM,CAAC;YACxB,wBAAwB,CAAC,EAAE;gBACvB,SAAS,CAAC,EAAE,SAAS,CAAA;aACxB,CAAA;SACJ,CAAC,CAAA;KACL,CAAC;IACF,kBAAkB,CAAC,EAAE,MAAM,CAAC;QACxB,wBAAwB,CAAC,EAAE;YACvB,SAAS,CAAC,EAAE,SAAS,CAAA;SACxB,CAAA;KACJ,CAAC,CAAA;CACL,CAAA;AAED,MAAM,MAAM,QAAQ,GAAG;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE;QACN,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;KACvB,CAAA;CACJ,CAAA"}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import type { HybridObject } from 'react-native-nitro-modules';
|
2
|
-
import { UnistyleDependency } from '../NativePlatform';
|
2
|
+
import type { UnistyleDependency } from '../NativePlatform';
|
3
3
|
export interface UnistylesStyleSheet extends HybridObject<{
|
4
4
|
ios: 'c++';
|
5
5
|
android: 'c++';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"UnistylesStyleSheet.nitro.d.ts","sourceRoot":"","sources":["../../../../../src/specs/StyleSheet/UnistylesStyleSheet.nitro.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;
|
1
|
+
{"version":3,"file":"UnistylesStyleSheet.nitro.d.ts","sourceRoot":"","sources":["../../../../../src/specs/StyleSheet/UnistylesStyleSheet.nitro.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AAC9D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAE3D,MAAM,WAAW,mBAAoB,SAAQ,YAAY,CAAC;IAAE,GAAG,EAAE,KAAK,CAAC;IAAC,OAAO,EAAE,KAAK,CAAA;CAAE,CAAC;IACrF,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAA;IAC9B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IAErB,iBAAiB,CAAC,SAAS,EAAE,CAAC,YAAY,EAAE,KAAK,CAAC,kBAAkB,CAAC,KAAK,IAAI,GAAG,MAAM,IAAI,CAAA;CAC9F"}
|
@@ -4,8 +4,9 @@ import type { UnistylesStyleSheet as UnistylesStyleSheetSpec } from './Unistyles
|
|
4
4
|
import type { UnistylesBreakpoints, UnistylesThemes } from '../../global';
|
5
5
|
import type { CreateUnistylesStyleSheet } from '../../types';
|
6
6
|
type UnistylesSettings = {
|
7
|
-
|
8
|
-
|
7
|
+
initialTheme: (() => keyof UnistylesThemes) | keyof UnistylesThemes;
|
8
|
+
} | {
|
9
|
+
adaptiveThemes: boolean;
|
9
10
|
};
|
10
11
|
export type UnistylesConfig = {
|
11
12
|
settings?: UnistylesSettings;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/specs/StyleSheet/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAkC,MAAM,cAAc,CAAA;AAC3E,OAAO,KAAK,EAAE,UAAU,IAAI,oBAAoB,EAAE,MAAM,cAAc,CAAA;AACtE,OAAO,KAAK,EAAE,mBAAmB,IAAI,uBAAuB,EAAE,MAAM,6BAA6B,CAAA;AACjG,OAAO,KAAK,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AACzE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAA;AAE5D,KAAK,iBAAiB,GAAG;IACrB,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/specs/StyleSheet/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAkC,MAAM,cAAc,CAAA;AAC3E,OAAO,KAAK,EAAE,UAAU,IAAI,oBAAoB,EAAE,MAAM,cAAc,CAAA;AACtE,OAAO,KAAK,EAAE,mBAAmB,IAAI,uBAAuB,EAAE,MAAM,6BAA6B,CAAA;AACjG,OAAO,KAAK,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AACzE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAA;AAE5D,KAAK,iBAAiB,GAAG;IACrB,YAAY,EAAE,CAAC,MAAM,MAAM,eAAe,CAAC,GAAG,MAAM,eAAe,CAAA;CACtE,GAAG;IACA,cAAc,EAAE,OAAO,CAAA;CAC1B,CAAA;AAED,MAAM,MAAM,eAAe,GAAG;IAC1B,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,MAAM,CAAC,EAAE,eAAe,CAAC;IACzB,WAAW,CAAC,EAAE,oBAAoB,CAAA;CACrC,CAAA;AAED,MAAM,WAAW,mBAAoB,SAAQ,uBAAuB;IAChE,kBAAkB,EAAE,OAAO,oBAAoB,CAAC,kBAAkB,CAAC;IACnE,YAAY,EAAE,OAAO,oBAAoB,CAAC,YAAY,CAAC;IACvD,OAAO,EAAE,OAAO,oBAAoB,CAAC,OAAO,CAAC;IAC7C,OAAO,EAAE,OAAO,oBAAoB,CAAC,OAAO,CAAC;IAG7C,IAAI,IAAI,IAAI,CAAC;IACb,MAAM,EAAE,yBAAyB,CAAC;IAClC,SAAS,CAAC,MAAM,EAAE,eAAe,GAAG,IAAI,CAAC;IACzC,SAAS,EAAE;QACP,YAAY,EAAE,OAAO,YAAY,CAAA;KACpC,CAAA;CACJ;AAeD,KAAK,cAAc,GAAG,WAAW,GAAG,mBAAmB,GAAG,MAAM,CAAA;AAEhE,eAAO,MAAM,UAAU,EAAgC,IAAI,CAAC,mBAAmB,EAAE,cAAc,CAAC,CAAA"}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import type { UnistylesRuntime as UnistylesRuntimeSpec, UnistylesMiniRuntime } from './UnistylesRuntime.nitro';
|
2
2
|
import type { AppBreakpoint, AppTheme, AppThemeName, Color, ColorScheme, Orientation } from '../types';
|
3
3
|
import { type UnistylesStatusBar } from '../StatusBar';
|
4
|
-
import {
|
4
|
+
import type { UnistylesNavigationBar } from '../NavigtionBar';
|
5
5
|
import type { AndroidContentSizeCategory, IOSContentSizeCategory, UnistylesTheme } from '../../types';
|
6
6
|
import type { UnistylesThemes } from '../../global';
|
7
7
|
export interface UnistylesRuntimePrivate extends Omit<UnistylesRuntimeSpec, 'setRootViewBackgroundColor'> {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/specs/UnistylesRuntime/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,IAAI,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AAC9G,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,YAAY,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AACtG,OAAO,EAA4B,KAAK,kBAAkB,EAAE,MAAM,cAAc,CAAA;AAChF,OAAO,EAAE,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/specs/UnistylesRuntime/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,IAAI,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AAC9G,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,YAAY,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AACtG,OAAO,EAA4B,KAAK,kBAAkB,EAAE,MAAM,cAAc,CAAA;AAChF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAA;AAC7D,OAAO,KAAK,EAAE,0BAA0B,EAAE,sBAAsB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAErG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAEnD,MAAM,WAAW,uBAAwB,SAAQ,IAAI,CAAC,oBAAoB,EAAE,4BAA4B,CAAC;IACrG,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;IAClC,QAAQ,CAAC,SAAS,CAAC,EAAE,YAAY,CAAC;IAClC,QAAQ,CAAC,mBAAmB,EAAE,sBAAsB,GAAG,0BAA0B,CAAC;IAClF,QAAQ,CAAC,UAAU,CAAC,EAAE,aAAa,CAAC;IACpC,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;IAGlC,SAAS,EAAE,kBAAkB,CAAC;IAC9B,aAAa,EAAE,sBAAsB,CAAC;IAEtC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,eAAe,GAAG,cAAc,CAAC;IAC5D,QAAQ,CAAC,SAAS,EAAE,YAAY,GAAG,IAAI,CAAA;IACvC,WAAW,CAAC,SAAS,EAAE,YAAY,EAAE,OAAO,EAAE,CAAC,YAAY,EAAE,QAAQ,KAAK,QAAQ,GAAG,IAAI,CAAC;IAC1F,0BAA0B,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjD,2BAA2B,CAAC,KAAK,CAAC,EAAE,KAAK,GAAG,IAAI,CAAA;IAGhD,qBAAqB,IAAI,kBAAkB,CAAC;IAC5C,yBAAyB,IAAI,sBAAsB,CAAA;CACtD;AAED,KAAK,cAAc,GACd,uBAAuB,GACtB,2BAA2B,GAC3B,SAAS,GACT,aAAa,GACb,6BAA6B,CAAA;AAEnC,KAAK,gBAAgB,GAAG,IAAI,CAAC,uBAAuB,EAAE,cAAc,CAAC,CAAA;AAqBrE,eAAO,MAAM,OAAO,EAA6B,gBAAgB,CAAA;AAEjE,YAAY,EACR,oBAAoB,EACvB,CAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../../src/specs/index.web.ts"],"names":[],"mappings":"AAAA,
|
1
|
+
{"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../../src/specs/index.web.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAA"}
|
@@ -2,4 +2,5 @@ export type Optional<T> = T | undefined;
|
|
2
2
|
export type Nullable<T> = T | null;
|
3
3
|
export type SafeReturnType<T> = T extends (...args: any) => infer R ? R : T;
|
4
4
|
export type PartialBy<T, K> = Omit<T, K & keyof T> & Partial<Pick<T, K & keyof T>>;
|
5
|
+
export type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
|
5
6
|
//# sourceMappingURL=common.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../src/types/common.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI,CAAC,GAAG,SAAS,CAAA;AACvC,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI,CAAC,GAAG,IAAI,CAAA;AAClC,MAAM,MAAM,cAAc,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,KAAK,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;AAC3E,MAAM,MAAM,SAAS,CAAC,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAA"}
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../src/types/common.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI,CAAC,GAAG,SAAS,CAAA;AACvC,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI,CAAC,GAAG,IAAI,CAAA;AAClC,MAAM,MAAM,cAAc,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,KAAK,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;AAC3E,MAAM,MAAM,SAAS,CAAC,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAA;AAClF,MAAM,MAAM,mBAAmB,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,GAAG,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK,IAAI,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,EAAE,MAAM,CAAC,KAAK,IAAI,GAAG,CAAC,GAAG,KAAK,CAAA"}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export type { Optional, Nullable } from './common';
|
1
|
+
export type { Optional, Nullable, UnionToIntersection } from './common';
|
2
2
|
export type { NestedStylePairs, UnistylesTheme, ScreenSize, NestedStyle, RNValue, RNStyle } from './core';
|
3
3
|
export type { CreateUnistylesStyleSheet, StyleSheet, AllAvailableKeys, UnistylesValues, UnistyleText, UnistyleView, UnistyleImage } from './stylesheet';
|
4
4
|
export type { ReactNativeStyleSheet } from './breakpoints';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,QAAQ,EAAE,QAAQ,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AACvE,YAAY,EACR,gBAAgB,EAChB,cAAc,EACd,UAAU,EACV,WAAW,EACX,OAAO,EACP,OAAO,EACV,MAAM,QAAQ,CAAA;AACf,YAAY,EACR,yBAAyB,EACzB,UAAU,EACV,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,aAAa,EAChB,MAAM,cAAc,CAAA;AACrB,YAAY,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAA;AAC1D,YAAY,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AACxE,OAAO,EAAE,0BAA0B,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAA"}
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import type { FilterFunction, TextStyle, ViewStyle } from 'react-native';
|
2
2
|
import type { ToDeepUnistyles } from '../../types/stylesheet';
|
3
|
+
import type { UnionToIntersection } from '../../types';
|
3
4
|
export type ShadowOffset = ToDeepUnistyles<{
|
4
5
|
width: number;
|
5
6
|
height: number;
|
@@ -10,7 +11,6 @@ export declare const BOX_SHADOW_STYLES: readonly ["shadowColor", "shadowRadius",
|
|
10
11
|
export type BoxShadow = Required<Pick<ViewStyle, typeof BOX_SHADOW_STYLES[number]>>;
|
11
12
|
export type AllShadow = TextShadow & BoxShadow;
|
12
13
|
export type AllShadowKeys = keyof AllShadow;
|
13
|
-
type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
|
14
14
|
type FilterKeys = keyof UnionToIntersection<FilterFunction>;
|
15
15
|
export type Filters = {
|
16
16
|
[K in FilterKeys]: UnionToIntersection<FilterFunction>[K];
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/web/convert/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/web/convert/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AAC7D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAEtD,MAAM,MAAM,YAAY,GAAG,eAAe,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAAA;AAE7E,eAAO,MAAM,kBAAkB,sEAAuE,CAAA;AAEtG,MAAM,MAAM,UAAU,GAAG,QAAQ,CAAC,IAAI,CAAC,SAAS,EAAE,OAAO,kBAAkB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;AAErF,eAAO,MAAM,iBAAiB,2EAA4E,CAAA;AAE1G,MAAM,MAAM,SAAS,GAAG,QAAQ,CAAC,IAAI,CAAC,SAAS,EAAE,OAAO,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;AAEnF,MAAM,MAAM,SAAS,GAAG,UAAU,GAAG,SAAS,CAAA;AAE9C,MAAM,MAAM,aAAa,GAAG,MAAM,SAAS,CAAA;AAE3C,KAAK,UAAU,GAAG,MAAM,mBAAmB,CAAC,cAAc,CAAC,CAAA;AAE3D,MAAM,MAAM,OAAO,GAAG;KACjB,CAAC,IAAI,UAAU,GAAG,mBAAmB,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;CAC5D,CAAA"}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import type { StyleSheetWithSuperPowers, StyleSheet } from '../types/stylesheet';
|
2
|
-
export declare const create: (stylesheet: StyleSheetWithSuperPowers<StyleSheet
|
2
|
+
export declare const create: (stylesheet: StyleSheetWithSuperPowers<StyleSheet>, id?: string) => {
|
3
3
|
[x: string]: {
|
4
4
|
backfaceVisibility?: "visible" | "hidden" | {
|
5
5
|
[x: symbol]: "visible" | "hidden" | undefined;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../../src/web/create.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,yBAAyB,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAMhF,eAAO,MAAM,MAAM,eAAgB,yBAAyB,CAAC,UAAU,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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