react-native-unistyles 3.0.0-alpha.7 → 3.0.0-alpha.9
Sign up to get free protection for your applications and to get access to all the features.
- package/cxx/common/Helpers.h +58 -0
- package/cxx/core/Unistyle.h +0 -6
- package/cxx/core/UnistyleData.h +3 -2
- package/cxx/core/UnistyleWrapper.h +6 -6
- package/cxx/core/UnistylesRegistry.cpp +11 -10
- package/cxx/core/UnistylesRegistry.h +4 -3
- package/cxx/hybridObjects/HybridShadowRegistry.cpp +4 -2
- package/cxx/parser/Parser.cpp +24 -78
- package/cxx/parser/Parser.h +1 -2
- package/lib/commonjs/specs/ShadowRegistry/index.js +2 -2
- package/lib/commonjs/specs/ShadowRegistry/index.js.map +1 -1
- package/lib/commonjs/specs/index.web.js +1 -1
- package/lib/commonjs/web/convert/boxShadow.js +77 -0
- package/lib/commonjs/web/convert/boxShadow.js.map +1 -0
- package/lib/commonjs/web/convert/breakpoint.js +25 -0
- package/lib/commonjs/web/convert/breakpoint.js.map +1 -0
- package/lib/commonjs/web/convert/index.js +76 -0
- package/lib/commonjs/web/convert/index.js.map +1 -0
- package/lib/commonjs/web/convert/module.d.js +2 -0
- package/lib/commonjs/web/convert/module.d.js.map +1 -0
- package/lib/commonjs/web/convert/shadow.js +68 -0
- package/lib/commonjs/web/convert/shadow.js.map +1 -0
- package/lib/commonjs/web/convert/style.js +89 -0
- package/lib/commonjs/web/convert/style.js.map +1 -0
- package/lib/commonjs/web/convert/textShadow.js +73 -0
- package/lib/commonjs/web/convert/textShadow.js.map +1 -0
- package/lib/commonjs/web/convert/transform.js +72 -0
- package/lib/commonjs/web/convert/transform.js.map +1 -0
- package/lib/commonjs/web/convert/types.js +9 -0
- package/lib/commonjs/web/convert/types.js.map +1 -0
- package/lib/commonjs/web/convert/utils.js +55 -0
- package/lib/commonjs/web/convert/utils.js.map +1 -0
- package/lib/commonjs/web/create.js +89 -0
- package/lib/commonjs/web/create.js.map +1 -0
- package/lib/commonjs/web/index.js +51 -0
- package/lib/commonjs/web/index.js.map +1 -0
- package/lib/commonjs/web/listener/index.js +13 -0
- package/lib/commonjs/web/listener/index.js.map +1 -0
- package/lib/commonjs/web/listener/listener.js +36 -0
- package/lib/commonjs/web/listener/listener.js.map +1 -0
- package/lib/commonjs/web/mock.js +37 -0
- package/lib/commonjs/web/mock.js.map +1 -0
- package/lib/commonjs/web/mq.js +23 -0
- package/lib/commonjs/web/mq.js.map +1 -0
- package/lib/commonjs/web/pseudo.js +11 -0
- package/lib/commonjs/web/pseudo.js.map +1 -0
- package/lib/commonjs/web/registry.js +37 -0
- package/lib/commonjs/web/registry.js.map +1 -0
- package/lib/commonjs/web/runtime.js +164 -0
- package/lib/commonjs/web/runtime.js.map +1 -0
- package/lib/commonjs/web/state.js +121 -0
- package/lib/commonjs/web/state.js.map +1 -0
- package/lib/commonjs/web/utils.js +78 -0
- package/lib/commonjs/web/utils.js.map +1 -0
- package/lib/commonjs/web/variants/getVariants.js +39 -0
- package/lib/commonjs/web/variants/getVariants.js.map +1 -0
- package/lib/commonjs/web/variants/index.js +28 -0
- package/lib/commonjs/web/variants/index.js.map +1 -0
- package/lib/commonjs/web/variants/useVariants.js +75 -0
- package/lib/commonjs/web/variants/useVariants.js.map +1 -0
- package/lib/module/specs/ShadowRegistry/index.js +2 -2
- package/lib/module/specs/ShadowRegistry/index.js.map +1 -1
- package/lib/module/specs/index.web.js +1 -1
- package/lib/module/specs/index.web.js.map +1 -1
- package/lib/module/web/convert/boxShadow.js +72 -0
- package/lib/module/web/convert/boxShadow.js.map +1 -0
- package/lib/module/web/convert/breakpoint.js +20 -0
- package/lib/module/web/convert/breakpoint.js.map +1 -0
- package/lib/module/web/convert/index.js +71 -0
- package/lib/module/web/convert/index.js.map +1 -0
- package/lib/module/web/convert/module.d.js +2 -0
- package/lib/module/web/convert/module.d.js.map +1 -0
- package/lib/module/web/convert/shadow.js +63 -0
- package/lib/module/web/convert/shadow.js.map +1 -0
- package/lib/module/web/convert/style.js +84 -0
- package/lib/module/web/convert/style.js.map +1 -0
- package/lib/module/web/convert/textShadow.js +68 -0
- package/lib/module/web/convert/textShadow.js.map +1 -0
- package/lib/module/web/convert/transform.js +67 -0
- package/lib/module/web/convert/transform.js.map +1 -0
- package/lib/module/web/convert/types.js +5 -0
- package/lib/module/web/convert/types.js.map +1 -0
- package/lib/module/web/convert/utils.js +43 -0
- package/lib/module/web/convert/utils.js.map +1 -0
- package/lib/module/web/create.js +84 -0
- package/lib/module/web/create.js.map +1 -0
- package/lib/module/web/index.js +24 -0
- package/lib/module/web/index.js.map +1 -0
- package/lib/module/web/listener/index.js +4 -0
- package/lib/module/web/listener/index.js.map +1 -0
- package/lib/module/web/listener/listener.js +31 -0
- package/lib/module/web/listener/listener.js.map +1 -0
- package/lib/module/web/mock.js +33 -0
- package/lib/module/web/mock.js.map +1 -0
- package/lib/module/web/mq.js +17 -0
- package/lib/module/web/mq.js.map +1 -0
- package/lib/module/web/pseudo.js +6 -0
- package/lib/module/web/pseudo.js.map +1 -0
- package/lib/module/web/registry.js +33 -0
- package/lib/module/web/registry.js.map +1 -0
- package/lib/module/web/runtime.js +160 -0
- package/lib/module/web/runtime.js.map +1 -0
- package/lib/module/web/state.js +117 -0
- package/lib/module/web/state.js.map +1 -0
- package/lib/module/web/utils.js +65 -0
- package/lib/module/web/utils.js.map +1 -0
- package/lib/module/web/variants/getVariants.js +34 -0
- package/lib/module/web/variants/getVariants.js.map +1 -0
- package/lib/module/web/variants/index.js +5 -0
- package/lib/module/web/variants/index.js.map +1 -0
- package/lib/module/web/variants/useVariants.js +70 -0
- package/lib/module/web/variants/useVariants.js.map +1 -0
- 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/index.web.d.ts +1 -1
- package/lib/typescript/src/specs/index.web.d.ts.map +1 -1
- package/lib/typescript/src/types/stylesheet.d.ts +1 -1
- package/lib/typescript/src/types/stylesheet.d.ts.map +1 -1
- package/lib/typescript/src/web/convert/boxShadow.d.ts.map +1 -0
- package/lib/typescript/src/web/convert/breakpoint.d.ts.map +1 -0
- package/lib/typescript/{web → src/web}/convert/index.d.ts +1 -1
- package/lib/typescript/src/web/convert/index.d.ts.map +1 -0
- package/lib/typescript/src/web/convert/shadow.d.ts.map +1 -0
- package/lib/typescript/src/web/convert/style.d.ts.map +1 -0
- package/lib/typescript/src/web/convert/textShadow.d.ts.map +1 -0
- package/lib/typescript/src/web/convert/transform.d.ts.map +1 -0
- package/lib/typescript/{web → src/web}/convert/types.d.ts +1 -1
- package/lib/typescript/src/web/convert/types.d.ts.map +1 -0
- package/lib/typescript/src/web/convert/utils.d.ts.map +1 -0
- package/lib/typescript/{web → src/web}/create.d.ts +11 -11
- package/lib/typescript/{web → src/web}/create.d.ts.map +1 -1
- package/lib/typescript/{web → src/web}/index.d.ts +12 -12
- package/lib/typescript/{web → src/web}/index.d.ts.map +1 -1
- package/lib/typescript/src/web/listener/index.d.ts.map +1 -0
- package/lib/typescript/{web → src/web}/listener/listener.d.ts +1 -1
- package/lib/typescript/src/web/listener/listener.d.ts.map +1 -0
- package/lib/typescript/{web → src/web}/mock.d.ts +2 -2
- package/lib/typescript/src/web/mock.d.ts.map +1 -0
- package/lib/typescript/src/web/mq.d.ts.map +1 -0
- package/lib/typescript/src/web/pseudo.d.ts.map +1 -0
- package/lib/typescript/{web → src/web}/registry.d.ts +1 -1
- package/lib/typescript/src/web/registry.d.ts.map +1 -0
- package/lib/typescript/{web → src/web}/runtime.d.ts +6 -6
- package/lib/typescript/src/web/runtime.d.ts.map +1 -0
- package/lib/typescript/{web → src/web}/state.d.ts +4 -4
- package/lib/typescript/src/web/state.d.ts.map +1 -0
- package/lib/typescript/{web → src/web}/utils.d.ts +5 -3
- package/lib/typescript/src/web/utils.d.ts.map +1 -0
- package/lib/typescript/src/web/variants/getVariants.d.ts +3 -0
- package/lib/typescript/src/web/variants/getVariants.d.ts.map +1 -0
- package/lib/typescript/src/web/variants/index.d.ts +3 -0
- package/lib/typescript/src/web/variants/index.d.ts.map +1 -0
- package/lib/typescript/src/web/variants/useVariants.d.ts +3 -0
- package/lib/typescript/src/web/variants/useVariants.d.ts.map +1 -0
- package/package.json +1 -1
- package/plugin/__tests__/dependencies.spec.js +5 -5
- package/plugin/__tests__/ref.spec.js +132 -17
- package/plugin/__tests__/stylesheet.spec.js +9 -9
- package/plugin/index.js +12 -13
- package/plugin/ref.js +18 -14
- package/plugin/style.js +13 -7
- package/src/specs/ShadowRegistry/index.ts +4 -4
- package/src/specs/index.web.ts +1 -1
- package/src/types/stylesheet.ts +1 -1
- package/{web → src/web}/convert/breakpoint.ts +1 -1
- package/{web → src/web}/convert/index.ts +1 -1
- package/{web → src/web}/convert/types.ts +1 -1
- package/{web → src/web}/create.ts +36 -33
- package/{web → src/web}/listener/listener.ts +1 -1
- package/{web → src/web}/mock.ts +2 -2
- package/{web → src/web}/registry.ts +1 -1
- package/{web → src/web}/runtime.ts +4 -4
- package/{web → src/web}/state.ts +5 -5
- package/{web → src/web}/utils.ts +5 -5
- package/src/web/variants/getVariants.ts +42 -0
- package/src/web/variants/index.ts +2 -0
- package/{web → src/web/variants}/useVariants.ts +24 -44
- package/lib/typescript/web/convert/boxShadow.d.ts.map +0 -1
- package/lib/typescript/web/convert/breakpoint.d.ts.map +0 -1
- package/lib/typescript/web/convert/index.d.ts.map +0 -1
- package/lib/typescript/web/convert/shadow.d.ts.map +0 -1
- package/lib/typescript/web/convert/style.d.ts.map +0 -1
- package/lib/typescript/web/convert/textShadow.d.ts.map +0 -1
- package/lib/typescript/web/convert/transform.d.ts.map +0 -1
- package/lib/typescript/web/convert/types.d.ts.map +0 -1
- package/lib/typescript/web/convert/utils.d.ts.map +0 -1
- package/lib/typescript/web/listener/index.d.ts.map +0 -1
- package/lib/typescript/web/listener/listener.d.ts.map +0 -1
- package/lib/typescript/web/mock.d.ts.map +0 -1
- package/lib/typescript/web/mq.d.ts.map +0 -1
- package/lib/typescript/web/pseudo.d.ts.map +0 -1
- package/lib/typescript/web/registry.d.ts.map +0 -1
- package/lib/typescript/web/runtime.d.ts.map +0 -1
- package/lib/typescript/web/state.d.ts.map +0 -1
- package/lib/typescript/web/useVariants.d.ts +0 -3
- package/lib/typescript/web/useVariants.d.ts.map +0 -1
- package/lib/typescript/web/utils.d.ts.map +0 -1
- /package/lib/typescript/{web → src/web}/convert/boxShadow.d.ts +0 -0
- /package/lib/typescript/{web → src/web}/convert/breakpoint.d.ts +0 -0
- /package/lib/typescript/{web → src/web}/convert/shadow.d.ts +0 -0
- /package/lib/typescript/{web → src/web}/convert/style.d.ts +0 -0
- /package/lib/typescript/{web → src/web}/convert/textShadow.d.ts +0 -0
- /package/lib/typescript/{web → src/web}/convert/transform.d.ts +0 -0
- /package/lib/typescript/{web → src/web}/convert/utils.d.ts +0 -0
- /package/lib/typescript/{web → src/web}/listener/index.d.ts +0 -0
- /package/lib/typescript/{web → src/web}/mq.d.ts +0 -0
- /package/lib/typescript/{web → src/web}/pseudo.d.ts +0 -0
- /package/{web → src/web}/convert/boxShadow.ts +0 -0
- /package/{web → src/web}/convert/module.d.ts +0 -0
- /package/{web → src/web}/convert/shadow.ts +0 -0
- /package/{web → src/web}/convert/style.ts +0 -0
- /package/{web → src/web}/convert/textShadow.ts +0 -0
- /package/{web → src/web}/convert/transform.ts +0 -0
- /package/{web → src/web}/convert/utils.ts +0 -0
- /package/{web → src/web}/index.ts +0 -0
- /package/{web → src/web}/listener/index.ts +0 -0
- /package/{web → src/web}/mq.ts +0 -0
- /package/{web → src/web}/pseudo.ts +0 -0
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["createElement","createRef","UnistylesRuntime","isServer","schemeToTheme","UnistylesListener","UnistyleDependency","UnistylesStateBuilder","isSSR","tags","themes","Map","hasAdaptiveThemes","init","config","initThemes","initBreakpoints","breakpoints","initSettings","settings","initListeners","Object","entries","forEach","themeName","theme","set","adaptiveThemes","themeNames","Array","from","keys","initialTheme","length","Error","colorScheme","breakpointsMap","sort","a","b","breakpoint","value","mediaQuery","window","matchMedia","matches","addEventListener","event","currentBreakpoint","find","mq","emitChange","Breakpoints","createTag","tag","document","head","appendChild","tagRef","Proxy","target","prop","textContent","Reflect","tagElement","ref","key","current","push","UnistylesState"],"sourceRoot":"../../../src","sources":["web/state.ts"],"mappings":";;AAAA,SAA4BA,aAAa,EAAEC,SAAS,QAAQ,OAAO;AAKnE,SAASC,gBAAgB,QAAQ,WAAW;AAC5C,SAASC,QAAQ,EAAEC,aAAa,QAAQ,SAAS;AACjD,SAASC,iBAAiB,QAAQ,YAAY;AAC9C,SAASC,kBAAkB,QAAQ,yBAAyB;AAE5D,MAAMC,qBAAqB,CAAC;EACPC,KAAK,GAAGL,QAAQ,CAAC,CAAC;EAC1BM,IAAI,GAAG,EAAE;EAElBC,MAAM,GAAG,IAAIC,GAAG,CAAyB,CAAC;EAM1CC,iBAAiB,GAAG,KAAK;EAEzBC,IAAI,GAAIC,MAAuB,IAAK;IAChC,IAAI,CAACC,UAAU,CAACD,MAAM,CAACJ,MAAM,CAAC;IAC9B,IAAI,CAACM,eAAe,CAACF,MAAM,CAACG,WAAW,CAAC;IACxC,IAAI,CAACC,YAAY,CAACJ,MAAM,CAACK,QAAQ,CAAC;IAElC,IAAI,IAAI,CAACX,KAAK,EAAE;MACZ;IACJ;IAEAH,iBAAiB,CAACe,aAAa,CAAC,CAAC;EACrC,CAAC;EAEOL,UAAU,GAAGA,CAACL,MAAM,GAAG,CAAC,CAAoB,KAAK;IACrDW,MAAM,CAACC,OAAO,CAACZ,MAAM,CAAC,CAACa,OAAO,CAAC,CAAC,CAACC,SAAS,EAAEC,KAAK,CAAC,KAAK;MACnD,IAAI,CAACf,MAAM,CAACgB,GAAG,CAACF,SAAS,EAAEC,KAAK,CAAC;IACrC,CAAC,CAAC;EACN,CAAC;EAEOP,YAAY,GAAIC,QAAqC,IAAK;IAC9D,IAAI,CAACP,iBAAiB,GAAGO,QAAQ,EAAEQ,cAAc,IAAI,KAAK;IAC1D,MAAMC,U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CAAC,CAAC;IACF,MAAMuB,UAAU,gBAAGhE,aAAa,CAAC,OAAO,EAAE;MAAEiE,GAAG,EAAEP,MAAM;MAAEQ,GAAG,EAAE,IAAI,CAACzD,IAAI,CAACwB;IAAO,CAAC,EAAE,EAAE,CAAC;IACrF,MAAMqB,GAAG,GAAG,IAAIK,KAAK,CAAC;MAAEG,WAAW,EAAE;IAAG,CAAC,EAAE;MACvCpC,GAAG,EAAEA,CAACkC,MAAM,EAAEC,IAAI,EAAEpB,KAAK,KAAK;QAC1B,IAAIoB,IAAI,KAAK,aAAa,EAAE;UACxB,OAAO,KAAK;QAChB;;QAEA;QACAD,MAAM,CAACE,WAAW,GAAGrB,KAAK;QAE1B,IAAIiB,MAAM,CAACS,OAAO,EAAE;UAChBT,MAAM,CAACS,OAAO,CAACL,WAAW,GAAGrB,KAAK;QACtC;QAEA,OAAO,IAAI;MACf;IACJ,CAAC,CAAC;IAEF,IAAI,CAAChC,IAAI,CAAC2D,IAAI,CAACJ,UAAU,CAAC;IAE1B,OAAOV,GAAG;EACd;AACJ;AAEA,OAAO,MAAMe,cAAc,GAAG,IAAI9D,qBAAqB,CAAC,CAAC","ignoreList":[]}
|
@@ -0,0 +1,65 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
import { ColorScheme } from '../specs/types';
|
4
|
+
export const reduceObject = (obj, reducer) => Object.fromEntries(Object.entries(obj).map(([key, value]) => [key, reducer(value, key)]));
|
5
|
+
export const toReactNativeClassName = (className, values) => {
|
6
|
+
const returnValue = className ? {
|
7
|
+
$$css: true,
|
8
|
+
[className]: className
|
9
|
+
} : {};
|
10
|
+
Object.defineProperties(returnValue, reduceObject(values, value => ({
|
11
|
+
value,
|
12
|
+
enumerable: false,
|
13
|
+
configurable: true
|
14
|
+
})));
|
15
|
+
return returnValue;
|
16
|
+
};
|
17
|
+
export const keyInObject = (obj, key) => key in obj;
|
18
|
+
export const schemeToTheme = scheme => {
|
19
|
+
switch (scheme) {
|
20
|
+
case ColorScheme.Dark:
|
21
|
+
return 'dark';
|
22
|
+
case ColorScheme.Light:
|
23
|
+
default:
|
24
|
+
return 'light';
|
25
|
+
}
|
26
|
+
};
|
27
|
+
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})`);
|
28
|
+
export const isServer = () => typeof window === 'undefined';
|
29
|
+
|
30
|
+
/**
|
31
|
+
* Deeply merges properties of passed object
|
32
|
+
*/
|
33
|
+
export const deepMergeObjects = (...sources) => {
|
34
|
+
const target = {};
|
35
|
+
sources.forEach(source => {
|
36
|
+
Object.keys(source).forEach(key => {
|
37
|
+
const sourceValue = source[key];
|
38
|
+
const targetValue = target[key];
|
39
|
+
if (Object(sourceValue) == sourceValue && Object(targetValue) === targetValue) {
|
40
|
+
// @ts-expect-error - can't assign to generic
|
41
|
+
target[key] = deepMergeObjects(targetValue, sourceValue);
|
42
|
+
return;
|
43
|
+
}
|
44
|
+
|
45
|
+
// @ts-expect-error - can't assign to generic
|
46
|
+
target[key] = sourceValue;
|
47
|
+
});
|
48
|
+
});
|
49
|
+
return target;
|
50
|
+
};
|
51
|
+
export const warn = message => console.warn(`🦄 [react-native-unistyles] ${message}`);
|
52
|
+
export const equal = (a, b) => {
|
53
|
+
if (Object.is(a, b)) {
|
54
|
+
return true;
|
55
|
+
}
|
56
|
+
if (typeof a !== 'object' || a === null || typeof b !== 'object' || b === null) {
|
57
|
+
return false;
|
58
|
+
}
|
59
|
+
const keysA = Object.keys(a);
|
60
|
+
if (keysA.length !== Object.keys(b).length) {
|
61
|
+
return false;
|
62
|
+
}
|
63
|
+
return keysA.every(key => Object.is(a[key], b[key]) && Object.prototype.hasOwnProperty.call(b, key));
|
64
|
+
};
|
65
|
+
//# sourceMappingURL=utils.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["ColorScheme","reduceObject","obj","reducer","Object","fromEntries","entries","map","key","value","toReactNativeClassName","className","values","returnValue","$$css","defineProperties","enumerable","configurable","keyInObject","schemeToTheme","scheme","Dark","Light","hexToRGBA","hex","opacity","replace","split","x","parseInt","filter","num","isNaN","reduce","acc","color","concat","isServer","window","deepMergeObjects","sources","target","forEach","source","keys","sourceValue","targetValue","warn","message","console","equal","a","b","is","keysA","length","every","prototype","hasOwnProperty","call"],"sourceRoot":"../../../src","sources":["web/utils.ts"],"mappings":";;AAAA,SAASA,WAAW,QAA0B,gBAAgB;AAG9D,OAAO,MAAMC,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,sBAAsB,GAAGA,CAACC,SAAwB,EAAEC,MAAuB,KAAK;EACzF,MAAMC,WAAW,GAAGF,SAAS,GAAG;IAC5BG,KAAK,EAAE,IAAI;IACX,CAACH,SAAS,GAAGA;EACjB,CAAC,GAAG,CAAC,CAAC;EAENP,MAAM,CAACW,gBAAgB,CAACF,WAAW,EAAEZ,YAAY,CAACW,MAAM,EAAEH,KAAK,KAAK;IAChEA,KAAK;IACLO,UAAU,EAAE,KAAK;IACjBC,YAAY,EAAE;EAClB,CAAC,CAAC,CAAC,CAAC;EAEJ,OAAOJ,WAAW;AACtB,CAAC;AAED,OAAO,MAAMK,WAAW,GAAGA,CAAgChB,GAAM,EAAEM,GAAgB,KAAqBA,GAAG,IAAIN,GAAG;AAElH,OAAO,MAAMiB,aAAa,GAAIC,MAAmB,IAAmB;EAChE,QAAQA,MAAM;IACV,KAAKpB,WAAW,CAACqB,IAAI;MACjB,OAAO,MAAM;IACjB,KAAKrB,WAAW,CAACsB,KAAK;IACtB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MAAMM,IAAI,GAAIC,OAAe,IAAKC,OAAO,CAACF,IAAI,CAAC,+BAA+BC,OAAO,EAAE,CAAC;AAE/F,OAAO,MAAME,KAAK,GAAGA,CAAIC,CAAI,EAAEC,CAAI,KAAK;EACpC,IAAIhD,MAAM,CAACiD,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,GAAGlD,MAAM,CAACwC,IAAI,CAACO,CAAC,CAAmB;EAE9C,IAAIG,KAAK,CAACC,MAAM,KAAKnD,MAAM,CAACwC,IAAI,CAACQ,CAAC,CAAC,CAACG,MAAM,EAAE;IACxC,OAAO,KAAK;EAChB;EAEA,OAAOD,KAAK,CAACE,KAAK,CAAChD,GAAG,IAAIJ,MAAM,CAACiD,EAAE,CAACF,CAAC,CAAC3C,GAAG,CAAC,EAAE4C,CAAC,CAAC5C,GAAG,CAAC,CAAC,IAAIJ,MAAM,CAACqD,SAAS,CAACC,cAAc,CAACC,IAAI,CAACP,CAAC,EAAE5C,GAAG,CAAC,CAAC;AACxG,CAAC","ignoreList":[]}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
import { deepMergeObjects } from '../utils';
|
4
|
+
const hasVariants = value => 'variants' in value[1];
|
5
|
+
export const getVariants = (styles, selectedVariants) => {
|
6
|
+
return Object.entries(styles).filter(hasVariants).filter(([_key, {
|
7
|
+
variants
|
8
|
+
}]) => Object.keys(variants).some(variant => variant in variants)).map(([key, {
|
9
|
+
variants,
|
10
|
+
compoundVariants = []
|
11
|
+
}]) => {
|
12
|
+
const variantStyles = Object.entries(variants).flatMap(([variant, styles]) => {
|
13
|
+
const selectedVariant = selectedVariants[variant];
|
14
|
+
const selectedVariantStyles = styles[selectedVariant] ?? styles['default'];
|
15
|
+
if (!selectedVariantStyles) {
|
16
|
+
return [];
|
17
|
+
}
|
18
|
+
return selectedVariantStyles;
|
19
|
+
});
|
20
|
+
const compoundVariantStyles = compoundVariants.flatMap(compoundVariant => {
|
21
|
+
const {
|
22
|
+
styles,
|
23
|
+
...conditions
|
24
|
+
} = compoundVariant;
|
25
|
+
if (Object.entries(conditions).some(([variant, value]) => String(selectedVariants[variant]) !== String(value))) {
|
26
|
+
return [];
|
27
|
+
}
|
28
|
+
return styles;
|
29
|
+
});
|
30
|
+
const mergedVariantStyles = deepMergeObjects(...variantStyles, ...compoundVariantStyles);
|
31
|
+
return [key, mergedVariantStyles];
|
32
|
+
});
|
33
|
+
};
|
34
|
+
//# sourceMappingURL=getVariants.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","compoundVariantStyles","compoundVariant","conditions","String","mergedVariantStyles"],"sourceRoot":"../../../../src","sources":["web/variants/getVariants.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,CAAC,CACxBI,MAAM,CAACP,WAAW,CAAC,CACnBO,MAAM,CAAC,CAAC,CAACC,IAAI,EAAE;IAAEC;EAAS,CAAC,CAAC,KAAKJ,MAAM,CAACK,IAAI,CAACD,QAAQ,CAAC,CAACE,IAAI,CAACC,OAAO,IAAIA,OAAO,IAAIH,QAAQ,CAAC,CAAC,CAC5FI,GAAG,CAAC,CAAC,CAACC,GAAG,EAAE;IAAEL,QAAQ;IAAEM,gBAAgB,GAAG;EAAG,CAAC,CAAC,KAAK;IACjD,MAAMC,aAAa,GAAGX,MAAM,CAACC,OAAO,CAACG,QAAQ,CAAC,CAACQ,OAAO,CAAC,CAAC,CAACL,OAAO,EAAET,MAAM,CAAC,KAAK;MAC1E,MAAMe,eAAe,GAAGd,gBAAgB,CAACQ,OAAO,CAAC;MACjD,MAAMO,qBAAqB,GAAGhB,MAAM,CAACe,eAAe,CAAC,IAAIf,MAAM,CAAC,SAAS,CAAC;MAE1E,IAAI,CAACgB,qBAAqB,EAAE;QACxB,OAAO,EAAE;MACb;MAEA,OAAOA,qBAAqB;IAChC,CAAC,CAAC;IAEF,MAAMC,qBAAqB,GAAGL,gBAAgB,CAACE,OAAO,CAACI,eAAe,IAAI;MACtE,MAAM;QAAElB,MAAM;QAAE,GAAGmB;MAAW,CAAC,GAAGD,eAAe;MAEjD,IAAIhB,MAAM,CAACC,OAAO,CAACgB,UAAU,CAAC,CAACX,IAAI,CAAC,CAAC,CAACC,OAAO,EAAEX,KAAK,CAAC,KAAKsB,MAAM,CAACnB,gBAAgB,CAACQ,OAAO,CAAC,CAAC,KAAKW,MAAM,CAACtB,KAAK,CAAC,CAAC,EAAE;QAC5G,OAAO,EAAE;MACb;MAEA,OAAOE,MAAM;IACjB,CAAC,CAAC;IAEF,MAAMqB,mBAAmB,GAAGzB,gBAAgB,CAAC,GAAGiB,aAAa,EAAE,GAAGI,qBAAqB,CAAC;IAExF,OAAO,CAACN,GAAG,EAAEU,mBAAmB,CAAC;EACrC,CAAC,CAAC;AACV,CAAC","ignoreList":[]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["web/variants/index.ts"],"mappings":";;AAAA,cAAc,eAAe;AAC7B,cAAc,eAAe","ignoreList":[]}
|
@@ -0,0 +1,70 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
import { useMemo, useRef, useState } from 'react';
|
4
|
+
import { equal, reduceObject } from '../utils';
|
5
|
+
import { UnistylesRegistry } from '../registry';
|
6
|
+
import { getVariants } from './getVariants';
|
7
|
+
export const createUseVariants = (styles, setSelectedVariants) => {
|
8
|
+
const useVariants = selectedVariants => {
|
9
|
+
const [unistylesMap] = useState(() => new Map());
|
10
|
+
const [classNameMap] = useState(() => new Map());
|
11
|
+
const [selectedVariantStylesMap] = useState(() => new Map());
|
12
|
+
const lastSelectedVariantsRef = useRef();
|
13
|
+
// Variable that determines if variants have changed and we need to recalculate styles
|
14
|
+
const variantsChanged = !equal(lastSelectedVariantsRef.current, selectedVariants);
|
15
|
+
if (variantsChanged) {
|
16
|
+
lastSelectedVariantsRef.current = selectedVariants;
|
17
|
+
setSelectedVariants(selectedVariants);
|
18
|
+
}
|
19
|
+
const combinedVariantStyles = useMemo(() => {
|
20
|
+
const result = getVariants(styles, selectedVariants);
|
21
|
+
result.forEach(([key, value]) => {
|
22
|
+
selectedVariantStylesMap.set(key, value);
|
23
|
+
});
|
24
|
+
return result;
|
25
|
+
}, [lastSelectedVariantsRef.current]);
|
26
|
+
if (unistylesMap.size === 0 && combinedVariantStyles.length > 0) {
|
27
|
+
combinedVariantStyles.forEach(([key, value]) => {
|
28
|
+
const {
|
29
|
+
className,
|
30
|
+
unistyles
|
31
|
+
} = UnistylesRegistry.createStyles(value, `variant-${key}`);
|
32
|
+
unistylesMap.set(key, unistyles);
|
33
|
+
classNameMap.set(key, className);
|
34
|
+
});
|
35
|
+
}
|
36
|
+
combinedVariantStyles.forEach(([key, value]) => {
|
37
|
+
const styleEntry = styles[key];
|
38
|
+
const unistyles = unistylesMap.get(key);
|
39
|
+
const className = classNameMap.get(key);
|
40
|
+
const selectedVariantStyles = selectedVariantStylesMap.get(key);
|
41
|
+
if (!unistyles || !className) {
|
42
|
+
return;
|
43
|
+
}
|
44
|
+
if (variantsChanged) {
|
45
|
+
UnistylesRegistry.updateStyles(unistyles, value, className);
|
46
|
+
}
|
47
|
+
Object.defineProperties(styleEntry, reduceObject(selectedVariantStyles ?? {}, value => ({
|
48
|
+
value,
|
49
|
+
enumerable: false,
|
50
|
+
configurable: true
|
51
|
+
})));
|
52
|
+
if (styleEntry) {
|
53
|
+
Object.keys(styleEntry ?? {}).forEach(key => {
|
54
|
+
if (!key.startsWith('variant-')) {
|
55
|
+
return;
|
56
|
+
}
|
57
|
+
|
58
|
+
// @ts-expect-error - remove old variants
|
59
|
+
delete styleEntry[key];
|
60
|
+
});
|
61
|
+
// @ts-expect-error - apply variant className
|
62
|
+
styleEntry[className] = className;
|
63
|
+
}
|
64
|
+
});
|
65
|
+
};
|
66
|
+
Object.defineProperty(styles, 'useVariants', {
|
67
|
+
value: useVariants
|
68
|
+
});
|
69
|
+
};
|
70
|
+
//# sourceMappingURL=useVariants.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["useMemo","useRef","useState","equal","reduceObject","UnistylesRegistry","getVariants","createUseVariants","styles","setSelectedVariants","useVariants","selectedVariants","unistylesMap","Map","classNameMap","selectedVariantStylesMap","lastSelectedVariantsRef","variantsChanged","current","combinedVariantStyles","result","forEach","key","value","set","size","length","className","unistyles","createStyles","styleEntry","get","selectedVariantStyles","updateStyles","Object","defineProperties","enumerable","configurable","keys","startsWith","defineProperty"],"sourceRoot":"../../../../src","sources":["web/variants/useVariants.ts"],"mappings":";;AAAA,SAASA,OAAO,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAGjD,SAASC,KAAK,EAAEC,YAAY,QAAQ,UAAU;AAC9C,SAASC,iBAAiB,QAAQ,aAAa;AAC/C,SAASC,WAAW,QAAQ,eAAe;AAE3C,OAAO,MAAMC,iBAAiB,GAAGA,CAACC,MAAyC,EAAEC,mBAA4D,KAAK;EAC1I,MAAMC,WAAW,GAAIC,gBAAqC,IAAK;IAC3D,MAAM,CAACC,YAAY,CAAC,GAAGV,QAAQ,CAAC,MAAM,IAAIW,GAAG,CAAoB,CAAC,CAAC;IACnE,MAAM,CAACC,Y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GAAG,EAAEC,KAAK,CAAC,KAAK;MAC5C,MAAMO,UAAU,GAAGtB,MAAM,CAACc,GAAG,CAAC;MAC9B,MAAMM,SAAS,GAAGhB,YAAY,CAACmB,GAAG,CAACT,GAAG,CAAC;MACvC,MAAMK,SAAS,GAAGb,YAAY,CAACiB,GAAG,CAACT,GAAG,CAAC;MACvC,MAAMU,qBAAqB,GAAGjB,wBAAwB,CAACgB,GAAG,CAACT,GAAG,CAAC;MAE/D,IAAI,CAACM,SAAS,IAAI,CAACD,SAAS,EAAE;QAC1B;MACJ;MAEA,IAAIV,eAAe,EAAE;QACjBZ,iBAAiB,CAAC4B,YAAY,CAACL,SAAS,EAAEL,KAAK,EAAEI,SAAS,CAAC;MAC/D;MAEAO,MAAM,CAACC,gBAAgB,CAACL,UAAU,EAAE1B,YAAY,CAAC4B,qBAAqB,IAAI,CAAC,CAAC,EAAET,KAAK,KAAK;QACpFA,KAAK;QACLa,UAAU,EAAE,KAAK;QACjBC,YAAY,EAAE;MAClB,CAAC,CAAC,CAAC,CAAC;MAEJ,IAAIP,UAAU,EAAE;QACZI,MAAM,CAACI,IAAI,CAACR,UAAU,IAAI,CAAC,CAAC,CAAC,CAACT,OAAO,CAACC,GAAG,IAAI;UACzC,IAAI,CAACA,GAAG,CAACiB,UAAU,CAAC,UAAU,CAAC,EAAE;YAC7B;UACJ;;UAEA;UACA,OAAOT,UAAU,CAACR,GAAG,CAAC;QAC1B,CAAC,CAAC;QACF;QACAQ,UAAU,CAACH,SAAS,CAAC,GAAGA,SAAS;MACrC;IACJ,CAAC,CAAC;EACN,CAAC;EAEDO,MAAM,CAACM,cAAc,CAAChC,MAAM,EAAE,aAAa,EAAE;IACzCe,KAAK,EAAEb;EACX,CAAC,CAAC;AACN,CAAC","ignoreList":[]}
|
@@ -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, style?: Unistyle, variants?: Record<string, string | boolean>): void;
|
4
|
+
add(handle?: ViewHandle, style?: Unistyle, variants?: Record<string, string | boolean>, args?: Array<any>): void;
|
5
5
|
remove(handle?: ViewHandle, style?: Unistyle): void;
|
6
|
-
link(node: ShadowNode, style: Unistyle, variants?: Record<string, string | boolean>): void;
|
6
|
+
link(node: ShadowNode, style: Unistyle, variants?: Record<string, string | boolean>, args?: Array<any>): void;
|
7
7
|
unlink(node: ShadowNode, style: Unistyle): 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,MAAM,wBAAwB,CAAA;AACpG,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAE/D,UAAU,cAAe,SAAQ,2BAA2B;IAExD,GAAG,CAAC,MAAM,CAAC,EAAE,UAAU,EAAE,KAAK,CAAC,EAAE,QAAQ,EAAE,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,IAAI,CAAC;
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/specs/ShadowRegistry/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,uBAAuB,IAAI,2BAA2B,EAAE,MAAM,wBAAwB,CAAA;AACpG,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAE/D,UAAU,cAAe,SAAQ,2BAA2B;IAExD,GAAG,CAAC,MAAM,CAAC,EAAE,UAAU,EAAE,KAAK,CAAC,EAAE,QAAQ,EAAE,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,EAAE,IAAI,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;IACjH,MAAM,CAAC,MAAM,CAAC,EAAE,UAAU,EAAE,KAAK,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;IAEpD,IAAI,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,EAAE,IAAI,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;IAC9G,MAAM,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,GAAG,IAAI,CAAA;CAClD;AAiCD,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":"index.web.d.ts","sourceRoot":"","sources":["../../../../src/specs/index.web.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AAEzC,eAAO,MAAM,eAAe,QAAe,KAAK,CAAC,YAAY,CAAC,CAAA;AAE9D,cAAc,
|
1
|
+
{"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../../src/specs/index.web.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AAEzC,eAAO,MAAM,eAAe,QAAe,KAAK,CAAC,YAAY,CAAC,CAAA;AAE9D,cAAc,QAAQ,CAAA"}
|
@@ -5,7 +5,7 @@ import type { UnistylesMiniRuntime } from '../specs';
|
|
5
5
|
import type { ReactNativeStyleSheet } from './breakpoints';
|
6
6
|
import type { ExtractVariantNames } from './variants';
|
7
7
|
import type { CSSProperties } from 'react';
|
8
|
-
import type { Pseudo } from '
|
8
|
+
import type { Pseudo } from '../web/pseudo';
|
9
9
|
type NestedKeys = 'shadowOffset' | 'transform' | 'textShadowOffset';
|
10
10
|
export type UnistyleView = Omit<ViewStyle, NestedKeys>;
|
11
11
|
export type UnistyleText = Omit<TextStyle, NestedKeys>;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"stylesheet.d.ts","sourceRoot":"","sources":["../../../../src/types/stylesheet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACpE,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAA;AAC3E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAA;AACrD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AACpD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAA;AAC1D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAA;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAC1C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,
|
1
|
+
{"version":3,"file":"stylesheet.d.ts","sourceRoot":"","sources":["../../../../src/types/stylesheet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACpE,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAA;AAC3E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAA;AACrD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AACpD,OAAO,KAAK,EAAE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K,aAAa,CAAC,CAAC,IAAI;IACpB,WAAW,EAAE,CAAC,QAAQ,EAAE,mBAAmB,CAAC,CAAC,CAAC,KAAK,IAAI,CAAA;CAC1D,CAAA;AAED,QAAA,MAAM,MAAM,GAAI,CAAC,SAAS,UAAU,cAAc,yBAAyB,CAAC,CAAC,CAAC,KAAG,CAAC,qBAAqB,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,OAAO,UAAU,CAAC,CAAgF,CAAA;AAE7N,MAAM,MAAM,yBAAyB,GAAG,OAAO,MAAM,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"boxShadow.d.ts","sourceRoot":"","sources":["../../../../../src/web/convert/boxShadow.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAkB9D,eAAO,MAAM,iBAAiB,WAAY,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAG,mBAoD/D,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"breakpoint.d.ts","sourceRoot":"","sources":["../../../../../src/web/convert/breakpoint.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAMrD,eAAO,MAAM,iBAAiB,eAAgB,MAAM,KAAG,UActD,CAAA"}
|
@@ -1,4 +1,4 @@
|
|
1
1
|
import type { NestedCSSProperties } from 'typestyle/lib/types';
|
2
|
-
import type { UnistylesValues } from '../../
|
2
|
+
import type { UnistylesValues } from '../../types';
|
3
3
|
export declare const convertToTypeStyle: (value: UnistylesValues) => NestedCSSProperties;
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/web/convert/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAC9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAWlD,eAAO,MAAM,kBAAkB,UAAW,eAAe,wBAiExD,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"shadow.d.ts","sourceRoot":"","sources":["../../../../../src/web/convert/shadow.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,qBAAsB,aAAa,CAAC,MAAM,CAAC,UAAU,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,eAAe,GAAG,CAAC,MAAM,CAAC,SAiE5H,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../../../../src/web/convert/style.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAgF9D,eAAO,MAAM,QAAQ,QAAS,MAAM,SAAS,GAAG,wBAY/C,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"textShadow.d.ts","sourceRoot":"","sources":["../../../../../src/web/convert/textShadow.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAiB9D,eAAO,MAAM,kBAAkB,WAAY,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAG,mBAkDhE,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"transform.d.ts","sourceRoot":"","sources":["../../../../../src/web/convert/transform.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAK9D,KAAK,UAAU,GAAG,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAA;AAmC5C,eAAO,MAAM,iBAAiB,eAAgB,UAAU,KAAG,mBA+C1D,CAAA"}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import type { TextStyle, ViewStyle } from 'react-native';
|
2
|
-
import type { ToDeepUnistyles } from '../../
|
2
|
+
import type { ToDeepUnistyles } from '../../types/stylesheet';
|
3
3
|
export type ShadowOffset = ToDeepUnistyles<{
|
4
4
|
width: number;
|
5
5
|
height: number;
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/web/convert/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AAE7D,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"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/web/convert/utils.ts"],"names":[],"mappings":"AAGA,OAAO,EAAyC,KAAK,SAAS,EAAE,KAAK,aAAa,EAAE,MAAM,SAAS,CAAA;AAEnG,eAAO,MAAM,WAAW,QAAS,MAAM,SAAS,GAAG,KAAG,KAAK,IAAI,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAgD,CAAA;AAExI,eAAO,MAAM,YAAY,QAAS,MAAM,YAA0E,CAAA;AAElH,eAAO,MAAM,WAAW,QAAS,MAAM,YAAwE,CAAA;AAE/G,eAAO,MAAM,qBAAqB,UAAW,MAAM,oBAAiC,CAAA;AAEpF,eAAO,MAAM,cAAc,UAAW,MAAM,YAAW,MAAM,WAyB5D,CAAA;AAED,eAAO,MAAM,kBAAkB,GAAI,IAAI,SAAS,aAAa,OAAO,IAAI,cAAc,MAAM,UAAU,GAAG,KAAG,SAAS,CAAC,IAAI,CAazH,CAAA"}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type { StyleSheetWithSuperPowers, StyleSheet } from '../
|
1
|
+
import type { StyleSheetWithSuperPowers, StyleSheet } from '../types/stylesheet';
|
2
2
|
export declare const create: (stylesheet: StyleSheetWithSuperPowers<StyleSheet>) => {
|
3
3
|
[x: string]: {
|
4
4
|
backfaceVisibility?: "visible" | "hidden" | {
|
@@ -1213,15 +1213,15 @@ export declare const create: (stylesheet: StyleSheetWithSuperPowers<StyleSheet>)
|
|
1213
1213
|
} | undefined;
|
1214
1214
|
variants?: {
|
1215
1215
|
[variantName: string]: {
|
1216
|
-
[variant: string]: Omit<import("../
|
1216
|
+
[variant: string]: Omit<import("../types").UnistylesValues, "variants" | "compoundVariants">;
|
1217
1217
|
};
|
1218
1218
|
} | undefined;
|
1219
1219
|
compoundVariants?: Array<{
|
1220
|
-
styles: Omit<import("../
|
1220
|
+
styles: Omit<import("../types").UnistylesValues, "variants" | "compoundVariants">;
|
1221
1221
|
}> | undefined;
|
1222
|
-
shadowOffset?: import("../
|
1223
|
-
transform?: import("../
|
1224
|
-
textShadowOffset?: import("../
|
1222
|
+
shadowOffset?: import("../types/stylesheet").ToDeepUnistyles<import("../types/core").ShadowOffset> | undefined;
|
1223
|
+
transform?: import("../types/stylesheet").ToDeepUnistyles<import("../types/core").TransformStyles>[] | undefined;
|
1224
|
+
textShadowOffset?: import("../types/stylesheet").ToDeepUnistyles<import("../types/core").ShadowOffset> | undefined;
|
1225
1225
|
} | ((...args: any[]) => {
|
1226
1226
|
backfaceVisibility?: "visible" | "hidden" | {
|
1227
1227
|
[x: symbol]: "visible" | "hidden" | undefined;
|
@@ -2435,15 +2435,15 @@ export declare const create: (stylesheet: StyleSheetWithSuperPowers<StyleSheet>)
|
|
2435
2435
|
} | undefined;
|
2436
2436
|
variants?: {
|
2437
2437
|
[variantName: string]: {
|
2438
|
-
[variant: string]: Omit<import("../
|
2438
|
+
[variant: string]: Omit<import("../types").UnistylesValues, "variants" | "compoundVariants">;
|
2439
2439
|
};
|
2440
2440
|
} | undefined;
|
2441
2441
|
compoundVariants?: Array<{
|
2442
|
-
styles: Omit<import("../
|
2442
|
+
styles: Omit<import("../types").UnistylesValues, "variants" | "compoundVariants">;
|
2443
2443
|
}> | undefined;
|
2444
|
-
shadowOffset?: import("../
|
2445
|
-
transform?: import("../
|
2446
|
-
textShadowOffset?: import("../
|
2444
|
+
shadowOffset?: import("../types/stylesheet").ToDeepUnistyles<import("../types/core").ShadowOffset> | undefined;
|
2445
|
+
transform?: import("../types/stylesheet").ToDeepUnistyles<import("../types/core").TransformStyles>[] | undefined;
|
2446
|
+
textShadowOffset?: import("../types/stylesheet").ToDeepUnistyles<import("../types/core").ShadowOffset> | undefined;
|
2447
2447
|
});
|
2448
2448
|
};
|
2449
2449
|
//# sourceMappingURL=create.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["
|
1
|
+
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../../src/web/create.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,yBAAyB,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAkBhF,eAAO,MAAM,MAAM,eAAgB,yBAAyB,CAAC,UAAU,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoFvE,CAAA"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
export declare const StyleSheet: {
|
2
|
-
configure: (config: import("../
|
3
|
-
create: (stylesheet: import("../
|
2
|
+
configure: (config: import("../specs/StyleSheet").UnistylesConfig) => void;
|
3
|
+
create: (stylesheet: import("../types/stylesheet").StyleSheetWithSuperPowers<import("../types").StyleSheet>) => {
|
4
4
|
[x: string]: {
|
5
5
|
backfaceVisibility?: "visible" | "hidden" | {
|
6
6
|
[x: symbol]: "visible" | "hidden" | undefined;
|
@@ -1214,15 +1214,15 @@ export declare const StyleSheet: {
|
|
1214
1214
|
} | undefined;
|
1215
1215
|
variants?: {
|
1216
1216
|
[variantName: string]: {
|
1217
|
-
[variant: string]: Omit<import("../
|
1217
|
+
[variant: string]: Omit<import("../types").UnistylesValues, "variants" | "compoundVariants">;
|
1218
1218
|
};
|
1219
1219
|
} | undefined;
|
1220
1220
|
compoundVariants?: Array<{
|
1221
|
-
styles: Omit<import("../
|
1221
|
+
styles: Omit<import("../types").UnistylesValues, "variants" | "compoundVariants">;
|
1222
1222
|
}> | undefined;
|
1223
|
-
shadowOffset?: import("../
|
1224
|
-
transform?: import("../
|
1225
|
-
textShadowOffset?: import("../
|
1223
|
+
shadowOffset?: import("../types/stylesheet").ToDeepUnistyles<import("../types/core").ShadowOffset> | undefined;
|
1224
|
+
transform?: import("../types/stylesheet").ToDeepUnistyles<import("../types/core").TransformStyles>[] | undefined;
|
1225
|
+
textShadowOffset?: import("../types/stylesheet").ToDeepUnistyles<import("../types/core").ShadowOffset> | undefined;
|
1226
1226
|
} | ((...args: any[]) => {
|
1227
1227
|
backfaceVisibility?: "visible" | "hidden" | {
|
1228
1228
|
[x: symbol]: "visible" | "hidden" | undefined;
|
@@ -2436,15 +2436,15 @@ export declare const StyleSheet: {
|
|
2436
2436
|
} | undefined;
|
2437
2437
|
variants?: {
|
2438
2438
|
[variantName: string]: {
|
2439
|
-
[variant: string]: Omit<import("../
|
2439
|
+
[variant: string]: Omit<import("../types").UnistylesValues, "variants" | "compoundVariants">;
|
2440
2440
|
};
|
2441
2441
|
} | undefined;
|
2442
2442
|
compoundVariants?: Array<{
|
2443
|
-
styles: Omit<import("../
|
2443
|
+
styles: Omit<import("../types").UnistylesValues, "variants" | "compoundVariants">;
|
2444
2444
|
}> | undefined;
|
2445
|
-
shadowOffset?: import("../
|
2446
|
-
transform?: import("../
|
2447
|
-
textShadowOffset?: import("../
|
2445
|
+
shadowOffset?: import("../types/stylesheet").ToDeepUnistyles<import("../types/core").ShadowOffset> | undefined;
|
2446
|
+
transform?: import("../types/stylesheet").ToDeepUnistyles<import("../types/core").TransformStyles>[] | undefined;
|
2447
|
+
textShadowOffset?: import("../types/stylesheet").ToDeepUnistyles<import("../types/core").ShadowOffset> | undefined;
|
2448
2448
|
});
|
2449
2449
|
};
|
2450
2450
|
absoluteFill: {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/web/index.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAUN,MAAM,KAAK,MAAM;yBACT,KAAK,CAAC,MAAM,CAAC;;CAErC,CAAA;AAED,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAA;AAC5C,cAAc,QAAQ,CAAA;AAEtB,eAAO,MAAM,eAAe,gGAA2C,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/web/listener/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"listener.d.ts","sourceRoot":"","sources":["../../../../../src/web/listener/listener.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AAG/D,qBAAa,wBAAwB;IACjC,OAAO,CAAC,aAAa,CAAQ;IAC7B,OAAO,CAAC,SAAS,CAAoG;IAErH,UAAU,eAAgB,kBAAkB,UAE3C;IAED,aAAa,aAUZ;IAED,YAAY,iBAAkB,KAAK,CAAC,kBAAkB,CAAC,YAAY,YAAY,gBAM9E;CACJ;AAED,eAAO,MAAM,iBAAiB,0BAAiC,CAAA"}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import type { UnistylesNavigationBar as NavigationBarSpec } from '../
|
2
|
-
import type { UnistylesStatusBar as StatusBarSpec } from '../
|
1
|
+
import type { UnistylesNavigationBar as NavigationBarSpec } from '../specs/NavigtionBar';
|
2
|
+
import type { UnistylesStatusBar as StatusBarSpec } from '../specs/StatusBar';
|
3
3
|
export declare const StatusBar: StatusBarSpec;
|
4
4
|
export declare const NavigationBar: NavigationBarSpec;
|
5
5
|
export declare const UnistylesShadowRegistry: {
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"mock.d.ts","sourceRoot":"","sources":["../../../../src/web/mock.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,IAAI,iBAAiB,EAAE,MAAM,uBAAuB,CAAA;AACxF,OAAO,KAAK,EAAE,kBAAkB,IAAI,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAE7E,eAAO,MAAM,SAAS,EAAE,aAUvB,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,iBAS3B,CAAA;AAED,eAAO,MAAM,uBAAuB;;;;;;;;CAQnC,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"mq.d.ts","sourceRoot":"","sources":["../../../../src/web/mq.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAMrD,eAAO,MAAM,OAAO,OAAQ,MAAM,KAAG,UAUpC,CAAA;AAED,eAAO,MAAM,aAAa,OAAQ,MAAM,YAAgC,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"pseudo.d.ts","sourceRoot":"","sources":["../../../../src/web/pseudo.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,OAAO,kDAKV,CAAA;AAEV,eAAO,MAAM,QAAQ,aAAc,MAAM,YAAyC,CAAA;AAElF,MAAM,MAAM,MAAM,GAAG,OAAO,OAAO,CAAC,MAAM,CAAC,CAAA"}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { TypeStyle } from 'typestyle';
|
2
|
-
import type { UnistylesValues } from '../
|
2
|
+
import type { UnistylesValues } from '../types';
|
3
3
|
declare class UnistylesRegistryBuilder {
|
4
4
|
createStyles: (stylesheet: UnistylesValues, key: string | number) => {
|
5
5
|
className: string;
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../../src/web/registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,SAAS,EAAE,MAAM,WAAW,CAAA;AACtD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAI/C,cAAM,wBAAwB;IAC1B,YAAY,eAAgB,eAAe,OAAO,MAAM,GAAG,MAAM;;;MAwBhE;IAED,YAAY,cAAe,SAAS,cAAc,eAAe,aAAa,MAAM,UAKnF;CACJ;AAED,eAAO,MAAM,iBAAiB,0BAAiC,CAAA"}
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import { ColorScheme, Orientation, type AppTheme, type AppThemeName } from '../
|
2
|
-
import type { UnistylesMiniRuntime } from '../
|
3
|
-
import { WebContentSizeCategory } from '../
|
1
|
+
import { ColorScheme, Orientation, type AppTheme, type AppThemeName } from '../specs/types';
|
2
|
+
import type { UnistylesMiniRuntime } from '../specs/UnistylesRuntime';
|
3
|
+
import { WebContentSizeCategory } from '../types';
|
4
4
|
declare class UnistylesRuntimeBuilder {
|
5
5
|
lightMedia: MediaQueryList | null;
|
6
6
|
darkMedia: MediaQueryList | null;
|
@@ -11,7 +11,7 @@ declare class UnistylesRuntimeBuilder {
|
|
11
11
|
get contentSizeCategory(): WebContentSizeCategory;
|
12
12
|
get breakpoint(): keyof import("react-native-unistyles").UnistylesBreakpoints | undefined;
|
13
13
|
get orientation(): Orientation;
|
14
|
-
get theme(): import("../
|
14
|
+
get theme(): import("../types").UnistylesTheme;
|
15
15
|
get pixelRatio(): number;
|
16
16
|
get screen(): {
|
17
17
|
width: number;
|
@@ -25,10 +25,10 @@ declare class UnistylesRuntimeBuilder {
|
|
25
25
|
right: number;
|
26
26
|
ime: number;
|
27
27
|
};
|
28
|
-
get statusBar(): import("../
|
28
|
+
get statusBar(): import("../specs/StatusBar").UnistylesStatusBar;
|
29
29
|
get rtl(): boolean;
|
30
30
|
get hasAdaptiveThemes(): boolean;
|
31
|
-
get navigationBar(): import("../
|
31
|
+
get navigationBar(): import("../specs/NavigtionBar").UnistylesNavigationBar;
|
32
32
|
get miniRuntime(): UnistylesMiniRuntime;
|
33
33
|
setTheme: (themeName: AppThemeName) => void;
|
34
34
|
setAdaptiveThemes: (isEnabled: boolean) => void;
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../../../src/web/runtime.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,KAAK,QAAQ,EAAE,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC3F,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AACrE,OAAO,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAA;AAMjD,cAAM,uBAAuB;IACzB,UAAU,wBAAuB;IACjC,SAAS,wBAAsB;IAE/B,OAAO,CAAC,aAAa;IAYrB,OAAO,CAAC,YAAY;IAYpB,IAAI,WAAW,gBASd;IAED,IAAI,SAAS,uEAEZ;IAED,IAAI,mBAAmB,2BAEtB;IAED,IAAI,UAAU,4EAEb;IAED,IAAI,WAAW,gBAMd;IAED,IAAI,KAAK,sCAYR;IAED,IAAI,UAAU,WAEb;IAED,IAAI,MAAM;;;MAYT;IAED,IAAI,SAAS,WAEZ;IAED,IAAI,MAAM;;;;;;MAQT;IAED,IAAI,SAAS,oDAEZ;IAED,IAAI,GAAG,YAEN;IAED,IAAI,iBAAiB,YAEpB;IAED,IAAI,aAAa,2DAEhB;IAED,IAAI,WAAW,IAAI,oBAAoB,CAsBtC;IAED,QAAQ,cAAe,YAAY,UAQlC;IAED,iBAAiB,cAAe,OAAO,UAQtC;IAED,0BAA0B,QAAS,MAAM,UAAU,MAAM,UAMxD;IAED,gBAAgB,aAAW;IAE3B,WAAW,cAAe,YAAY,WAAW,CAAC,YAAY,EAAE,QAAQ,KAAK,QAAQ,UAQpF;IAED,eAAe,iGAA4B;CAC9C;AAED,eAAO,MAAM,gBAAgB,yBAAgC,CAAA"}
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { type ReactElement } from 'react';
|
2
|
-
import type { UnistylesTheme } from '../
|
3
|
-
import type { UnistylesConfig } from '../
|
4
|
-
import type { AppBreakpoint, AppThemeName } from '../
|
5
|
-
import type { UnistylesBreakpoints } from '../
|
2
|
+
import type { UnistylesTheme } from '../types';
|
3
|
+
import type { UnistylesConfig } from '../specs/StyleSheet';
|
4
|
+
import type { AppBreakpoint, AppThemeName } from '../specs/types';
|
5
|
+
import type { UnistylesBreakpoints } from '../global';
|
6
6
|
declare class UnistylesStateBuilder {
|
7
7
|
private readonly isSSR;
|
8
8
|
readonly tags: Array<ReactElement>;
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../../src/web/state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAA4B,MAAM,OAAO,CAAA;AACnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAC9C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AACjE,OAAO,KAAK,EAAE,oBAAoB,EAAmB,MAAM,WAAW,CAAA;AAMtE,cAAM,qBAAqB;IACvB,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAa;IACnC,QAAQ,CAAC,IAAI,EAAS,KAAK,CAAC,YAAY,CAAC,CAAA;IAEzC,MAAM,8BAAoC;IAC1C,SAAS,CAAC,EAAE,YAAY,CAAA;IAExB,UAAU,CAAC,EAAE,aAAa,CAAA;IAC1B,WAAW,CAAC,EAAE,oBAAoB,CAAA;IAElC,iBAAiB,UAAQ;IAEzB,IAAI,WAAY,eAAe,UAU9B;IAED,OAAO,CAAC,UAAU,CAIjB;IAED,OAAO,CAAC,YAAY,CAyBnB;IAED,OAAO,CAAC,eAAe,CAmCtB;IAED,SAAS;;;CAyCZ;AAED,eAAO,MAAM,cAAc,uBAA8B,CAAA"}
|
@@ -1,9 +1,11 @@
|
|
1
|
-
import { ColorScheme, type AppThemeName } from '../
|
2
|
-
import type { UnistylesValues } from '../
|
1
|
+
import { ColorScheme, type AppThemeName } from '../specs/types';
|
2
|
+
import type { UnistylesValues } from '../types';
|
3
3
|
export declare const reduceObject: <TObj extends Record<string, any>, TReducer>(obj: TObj, reducer: (value: TObj[keyof TObj], key: keyof TObj) => TReducer) => { [K in keyof TObj]: TReducer; };
|
4
|
-
export declare const toReactNativeClassName: (className: string, values: UnistylesValues) => {
|
4
|
+
export declare const toReactNativeClassName: (className: string | null, values: UnistylesValues) => {
|
5
5
|
[x: string]: string | boolean;
|
6
6
|
$$css: boolean;
|
7
|
+
} | {
|
8
|
+
$$css?: undefined;
|
7
9
|
};
|
8
10
|
export declare const keyInObject: <T extends Record<string, any>>(obj: T, key: PropertyKey) => key is keyof T;
|
9
11
|
export declare const schemeToTheme: (scheme: ColorScheme) => AppThemeName;
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/web/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,YAAY,EAAC,MAAM,gBAAgB,CAAA;AAC9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAE/C,eAAO,MAAM,YAAY,GAAI,IAAI,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,QAAQ,OAC9D,IAAI,WACA,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,IAAI,CAAC,EAAE,GAAG,EAAE,MAAM,IAAI,KAAK,QAAQ,KACmD,GAAG,CAAe,IAAV,MAAM,IAAI,GAAG,QAAQ,GAAE,CAAA;AAErJ,eAAO,MAAM,sBAAsB,cAAe,MAAM,GAAG,IAAI,UAAU,eAAe;;;;;CAavF,CAAA;AAED,eAAO,MAAM,WAAW,GAAI,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,OAAO,CAAC,OAAO,WAAW,KAAG,GAAG,IAAI,MAAM,CAAe,CAAA;AAElH,eAAO,MAAM,aAAa,WAAY,WAAW,KAAG,YAQnD,CAAA;AAED,eAAO,MAAM,SAAS,QAAS,MAAM,WAAW,MAAM,WAM5B,CAAA;AAE1B,eAAO,MAAM,QAAQ,eAAsC,CAAA;AAE3D;;EAEE;AACF,eAAO,MAAM,gBAAgB,GAAI,CAAC,SAAS,MAAM,CAAC,WAAW,EAAE,GAAG,CAAC,cAAc,KAAK,CAAC,CAAC,CAAC,MAqBxF,CAAA;AAED,eAAO,MAAM,IAAI,YAAa,MAAM,SAA2D,CAAA;AAE/F,eAAO,MAAM,KAAK,GAAI,CAAC,KAAK,CAAC,KAAK,CAAC,YAqBlC,CAAA"}
|