react-native-unistyles 3.0.0-alpha.13 → 3.0.0-alpha.14
Sign up to get free protection for your applications and to get access to all the features.
- package/cxx/core/UnistyleWrapper.h +1 -1
- package/cxx/core/UnistylesCommitHook.cpp +5 -2
- package/cxx/hybridObjects/HybridStyleSheet.cpp +1 -3
- package/cxx/hybridObjects/HybridStyleSheet.h +1 -1
- package/lib/commonjs/index.js +4 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/specs/ShadowRegistry/index.js +7 -1
- package/lib/commonjs/specs/ShadowRegistry/index.js.map +1 -1
- package/lib/commonjs/web/convert/index.js +1 -1
- package/lib/commonjs/web/convert/index.js.map +1 -1
- package/lib/commonjs/web/create.js +25 -63
- package/lib/commonjs/web/create.js.map +1 -1
- package/lib/commonjs/web/createUnistylesComponent.js +61 -0
- package/lib/commonjs/web/createUnistylesComponent.js.map +1 -0
- package/lib/commonjs/web/index.js +12 -3
- package/lib/commonjs/web/index.js.map +1 -1
- package/lib/commonjs/web/listener/index.js +7 -0
- package/lib/commonjs/web/listener/index.js.map +1 -1
- package/lib/commonjs/web/listener/listenToDependencies.js +39 -0
- package/lib/commonjs/web/listener/listenToDependencies.js.map +1 -0
- package/lib/commonjs/web/listener/listener.js +1 -2
- package/lib/commonjs/web/listener/listener.js.map +1 -1
- package/lib/commonjs/web/mock.js +1 -10
- package/lib/commonjs/web/mock.js.map +1 -1
- package/lib/commonjs/web/pseudo.js +2 -3
- package/lib/commonjs/web/pseudo.js.map +1 -1
- package/lib/commonjs/web/registry.js +2 -4
- package/lib/commonjs/web/registry.js.map +1 -1
- package/lib/commonjs/web/runtime.js +0 -1
- package/lib/commonjs/web/runtime.js.map +1 -1
- package/lib/commonjs/web/shadowRegistry.js +120 -0
- package/lib/commonjs/web/shadowRegistry.js.map +1 -0
- package/lib/commonjs/web/state.js +0 -40
- package/lib/commonjs/web/state.js.map +1 -1
- package/lib/commonjs/web/utils.js +66 -14
- package/lib/commonjs/web/utils.js.map +1 -1
- package/lib/commonjs/web/variants/useVariants.js +1 -34
- package/lib/commonjs/web/variants/useVariants.js.map +1 -1
- package/lib/module/index.js +4 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/specs/ShadowRegistry/index.js +7 -1
- package/lib/module/specs/ShadowRegistry/index.js.map +1 -1
- package/lib/module/web/convert/index.js +1 -1
- package/lib/module/web/convert/index.js.map +1 -1
- package/lib/module/web/create.js +26 -64
- package/lib/module/web/create.js.map +1 -1
- package/lib/module/web/createUnistylesComponent.js +54 -0
- package/lib/module/web/createUnistylesComponent.js.map +1 -0
- package/lib/module/web/index.js +4 -2
- package/lib/module/web/index.js.map +1 -1
- package/lib/module/web/listener/index.js +1 -0
- package/lib/module/web/listener/index.js.map +1 -1
- package/lib/module/web/listener/listenToDependencies.js +34 -0
- package/lib/module/web/listener/listenToDependencies.js.map +1 -0
- package/lib/module/web/listener/listener.js +1 -1
- package/lib/module/web/listener/listener.js.map +1 -1
- package/lib/module/web/mock.js +0 -9
- package/lib/module/web/mock.js.map +1 -1
- package/lib/module/web/pseudo.js +2 -3
- package/lib/module/web/pseudo.js.map +1 -1
- package/lib/module/web/registry.js +2 -4
- package/lib/module/web/registry.js.map +1 -1
- package/lib/module/web/runtime.js +0 -1
- package/lib/module/web/runtime.js.map +1 -1
- package/lib/module/web/shadowRegistry.js +116 -0
- package/lib/module/web/shadowRegistry.js.map +1 -0
- package/lib/module/web/state.js +0 -40
- package/lib/module/web/state.js.map +1 -1
- package/lib/module/web/utils.js +59 -12
- package/lib/module/web/utils.js.map +1 -1
- package/lib/module/web/variants/useVariants.js +1 -34
- package/lib/module/web/variants/useVariants.js.map +1 -1
- package/lib/typescript/src/specs/ShadowRegistry/index.d.ts.map +1 -1
- package/lib/typescript/src/web/create.d.ts.map +1 -1
- package/lib/typescript/src/web/createUnistylesComponent.d.ts +3 -0
- package/lib/typescript/src/web/createUnistylesComponent.d.ts.map +1 -0
- package/lib/typescript/src/web/index.d.ts +2 -1
- package/lib/typescript/src/web/index.d.ts.map +1 -1
- package/lib/typescript/src/web/listener/index.d.ts +1 -0
- package/lib/typescript/src/web/listener/index.d.ts.map +1 -1
- package/lib/typescript/src/web/listener/listenToDependencies.d.ts +12 -0
- package/lib/typescript/src/web/listener/listenToDependencies.d.ts.map +1 -0
- package/lib/typescript/src/web/listener/listener.d.ts +2 -1
- package/lib/typescript/src/web/listener/listener.d.ts.map +1 -1
- package/lib/typescript/src/web/mock.d.ts +0 -9
- package/lib/typescript/src/web/mock.d.ts.map +1 -1
- package/lib/typescript/src/web/pseudo.d.ts +4 -2
- package/lib/typescript/src/web/pseudo.d.ts.map +1 -1
- package/lib/typescript/src/web/registry.d.ts +1 -1
- package/lib/typescript/src/web/registry.d.ts.map +1 -1
- package/lib/typescript/src/web/runtime.d.ts +0 -1
- package/lib/typescript/src/web/runtime.d.ts.map +1 -1
- package/lib/typescript/src/web/shadowRegistry.d.ts +17 -0
- package/lib/typescript/src/web/shadowRegistry.d.ts.map +1 -0
- package/lib/typescript/src/web/state.d.ts +0 -5
- package/lib/typescript/src/web/state.d.ts.map +1 -1
- package/lib/typescript/src/web/utils.d.ts +22 -7
- package/lib/typescript/src/web/utils.d.ts.map +1 -1
- package/lib/typescript/src/web/variants/useVariants.d.ts.map +1 -1
- package/nitrogen/generated/android/c++/JHybridNativePlatformSpec.hpp +6 -3
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unistyles/HybridNativePlatformSpec.kt +8 -3
- package/nitrogen/generated/ios/c++/HybridNativePlatformSpecSwift.hpp +1 -1
- package/nitrogen/generated/ios/swift/HybridNativePlatformSpec.swift +1 -1
- package/nitrogen/generated/ios/swift/HybridNativePlatformSpecCxx.swift +14 -2
- package/nitrogen/generated/shared/c++/HybridNativePlatformSpec.hpp +3 -0
- package/nitrogen/generated/shared/c++/HybridUnistylesNavigationBarSpec.hpp +3 -0
- package/nitrogen/generated/shared/c++/HybridUnistylesRuntimeSpec.hpp +3 -0
- package/nitrogen/generated/shared/c++/HybridUnistylesShadowRegistrySpec.hpp +3 -0
- package/nitrogen/generated/shared/c++/HybridUnistylesStatusBarSpec.hpp +3 -0
- package/nitrogen/generated/shared/c++/HybridUnistylesStyleSheetSpec.cpp +1 -1
- package/nitrogen/generated/shared/c++/HybridUnistylesStyleSheetSpec.hpp +4 -1
- package/package.json +3 -3
- package/src/index.ts +3 -0
- package/src/specs/ShadowRegistry/index.ts +7 -1
- package/src/web/convert/index.ts +1 -1
- package/src/web/create.ts +24 -79
- package/src/web/createUnistylesComponent.tsx +56 -0
- package/src/web/index.ts +3 -2
- package/src/web/listener/index.ts +1 -0
- package/src/web/listener/listenToDependencies.ts +50 -0
- package/src/web/listener/listener.ts +1 -1
- package/src/web/mock.ts +0 -10
- package/src/web/pseudo.ts +131 -5
- package/src/web/registry.ts +3 -5
- package/src/web/runtime.ts +0 -2
- package/src/web/shadowRegistry.ts +121 -0
- package/src/web/state.ts +0 -44
- package/src/web/utils.ts +90 -16
- package/src/web/variants/useVariants.ts +1 -37
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["ColorScheme","reduceObject","obj","reducer","Object","fromEntries","entries","map","key","value","
|
1
|
+
{"version":3,"names":["ColorScheme","reduceObject","obj","reducer","Object","fromEntries","entries","map","key","value","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","assignSecrets","object","secrets","Math","random","toString","slice","extractSecrets","startsWith","push","getStyles","values","returnValue","defineProperties","enumerable","configurable","createDoubleMap","Map","get","secondKey","mapForKey","undefined","set","delete","callback","extractHiddenProperties","hiddenProperties","getOwnPropertyNames","isInDocument","element","document","body","contains"],"sourceRoot":"../../../src","sources":["web/utils.ts"],"mappings":";;AAAA,SAASA,WAAW,QAA0B,gBAAgB;AAG9D,OAAO,MAAMC,YAAY,GAAGA,CACxBC,GAAS,E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AG,EAAE6C,MAAM,CAAC7C,GAAG,CAAC,CAAC,CACtC,CAAC;AACL,CAAC;AAED,OAAO,MAAMwE,YAAY,GAAIC,OAAoB,IAAKC,QAAQ,CAACC,IAAI,CAACC,QAAQ,CAACH,OAAO,CAAC","ignoreList":[]}
|
@@ -2,12 +2,9 @@
|
|
2
2
|
|
3
3
|
import { useMemo, useRef, useState } from 'react';
|
4
4
|
import { equal, reduceObject } from '../utils';
|
5
|
-
import { UnistylesRegistry } from '../registry';
|
6
5
|
import { getVariants } from './getVariants';
|
7
6
|
export const createUseVariants = (styles, setSelectedVariants) => {
|
8
7
|
const useVariants = selectedVariants => {
|
9
|
-
const [unistylesMap] = useState(() => new Map());
|
10
|
-
const [classNameMap] = useState(() => new Map());
|
11
8
|
const [selectedVariantStylesMap] = useState(() => new Map());
|
12
9
|
const lastSelectedVariantsRef = useRef();
|
13
10
|
// Variable that determines if variants have changed and we need to recalculate styles
|
@@ -23,44 +20,14 @@ export const createUseVariants = (styles, setSelectedVariants) => {
|
|
23
20
|
});
|
24
21
|
return result;
|
25
22
|
}, [lastSelectedVariantsRef.current]);
|
26
|
-
|
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]) => {
|
23
|
+
combinedVariantStyles.forEach(([key]) => {
|
37
24
|
const styleEntry = styles[key];
|
38
|
-
const unistyles = unistylesMap.get(key);
|
39
|
-
const className = classNameMap.get(key);
|
40
25
|
const selectedVariantStyles = selectedVariantStylesMap.get(key);
|
41
|
-
if (!unistyles || !className) {
|
42
|
-
return;
|
43
|
-
}
|
44
|
-
if (variantsChanged) {
|
45
|
-
UnistylesRegistry.updateStyles(unistyles, value, className);
|
46
|
-
}
|
47
26
|
Object.defineProperties(styleEntry, reduceObject(selectedVariantStyles ?? {}, value => ({
|
48
27
|
value,
|
49
28
|
enumerable: false,
|
50
29
|
configurable: true
|
51
30
|
})));
|
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
31
|
});
|
65
32
|
};
|
66
33
|
Object.defineProperty(styles, 'useVariants', {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["useMemo","useRef","useState","equal","reduceObject","
|
1
|
+
{"version":3,"names":["useMemo","useRef","useState","equal","reduceObject","getVariants","createUseVariants","styles","setSelectedVariants","useVariants","selectedVariants","selectedVariantStylesMap","Map","lastSelectedVariantsRef","variantsChanged","current","combinedVariantStyles","result","forEach","key","value","set","styleEntry","selectedVariantStyles","get","Object","defineProperties","enumerable","configurable","defineProperty"],"sourceRoot":"../../../../src","sources":["web/variants/useVariants.ts"],"mappings":";;AAAA,SAASA,OAAO,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAEjD,SAASC,KAAK,EAAEC,YAAY,QAAQ,UAAU;AAC9C,SAASC,WAAW,QAAQ,eAAe;AAE3C,OAAO,MAAMC,iBAAiB,GAAGA,CAACC,MAAyC,EAAEC,mBAA4D,KAAK;EAC1I,MAAMC,WAAW,GAAIC,gBAAqC,IAAK;IAC3D,MAAM,CAACC,wBAAwB,CAAC,GAAGT,QAAQ,CAAC,MAAM,IAAIU,GAAG,CAA8B,CAAC,CAAC;IACzF,MAAMC,uBAAuB,GAAGZ,MAAM,CAAsB,CAAC;IAC7D;IACA,MAAMa,eAAe,GAAG,CAACX,KAAK,CAACU,uBAAuB,CAACE,OAAO,EAAEL,gBAAgB,CAAC;IAEjF,IAAII,eAAe,EAAE;MACjBD,uBAAuB,CAACE,OAAO,GAAGL,gBAAgB;MAClDF,mBAAmB,CAACE,gBAAgB,CAAC;IACzC;IAEA,MAAMM,qBAAqB,GAAGhB,OAAO,CAAC,MAAM;MACxC,MAAMiB,MAAM,GAAGZ,WAAW,CAACE,MAAM,EAAEG,gBAAgB,CAAC;MAEpDO,MAAM,CAACC,OAAO,CAAC,CAAC,CAACC,GAAG,EAAEC,KAAK,CAAC,KAAK;QAC7BT,wBAAwB,CAACU,GAAG,CAACF,GAAG,EAAEC,KAAK,CAAC;MAC5C,CAAC,CAAC;MAEF,OAAOH,MAAM;IACjB,CAAC,EAAE,CAACJ,uBAAuB,CAACE,OAAO,CAAC,CAAC;IAErCC,qBAAqB,CAACE,OAAO,CAAC,CAAC,CAACC,GAAG,CAAC,KAAK;MACrC,MAAMG,UAAU,GAAGf,MAAM,CAACY,GAAG,CAAC;MAC9B,MAAMI,qBAAqB,GAAGZ,wBAAwB,CAACa,GAAG,CAACL,GAAG,CAAC;MAE/DM,MAAM,CAACC,gBAAgB,CAACJ,UAAU,EAAElB,YAAY,CAACmB,qBAAqB,IAAI,CAAC,CAAC,EAAEH,KAAK,KAAK;QACpFA,KAAK;QACLO,UAAU,EAAE,KAAK;QACjBC,YAAY,EAAE;MAClB,CAAC,CAAC,CAAC,CAAC;IACR,CAAC,CAAC;EACN,CAAC;EAEDH,MAAM,CAACI,cAAc,CAACtB,MAAM,EAAE,aAAa,EAAE;IACzCa,KAAK,EAAEX;EACX,CAAC,CAAC;AACN,CAAC","ignoreList":[]}
|
@@ -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,UAA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AI,CAAC;IAEpD,IAAI,CAAC,IAAI,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;IAC/G,MAAM,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,GAAG,IAAI,CAAA;CAClD;AAuCD,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":"create.d.ts","sourceRoot":"","sources":["../../../../src/web/create.ts"],"names":[],"mappings":"
|
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;AAKhF,eAAO,MAAM,MAAM,eAAgB,yBAAyB,CAAC,UAAU,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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CA2CvE,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"createUnistylesComponent.d.ts","sourceRoot":"","sources":["../../../../src/web/createUnistylesComponent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAA;AAmClD,eAAO,MAAM,wBAAwB,GAAI,MAAM,SAAS,MAAM,aAAa,KAAK,CAAC,aAAa,CAAC,MAAM,CAAC,aAAa,MAAM,sBAoBxH,CAAA"}
|
@@ -2459,6 +2459,7 @@ export declare const StyleSheet: {
|
|
2459
2459
|
hairlineWidth: number;
|
2460
2460
|
};
|
2461
2461
|
export { UnistylesRuntime } from './runtime';
|
2462
|
+
export { UnistylesShadowRegistry } from './shadowRegistry';
|
2462
2463
|
export * from './mock';
|
2463
|
-
export declare const getSSRUnistyles: () =>
|
2464
|
+
export declare const getSSRUnistyles: () => never[];
|
2464
2465
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/web/index.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/web/index.ts"],"names":[],"mappings":"AAIA,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,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAA;AAC1D,cAAc,QAAQ,CAAA;AAGtB,eAAO,MAAM,eAAe,eAAW,CAAA"}
|
@@ -1 +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"}
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/web/listener/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA"}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import type { TypeStyle } from 'typestyle';
|
2
|
+
import type { StyleSheet, StyleSheetWithSuperPowers } from '../../types/stylesheet';
|
3
|
+
type ListenToDependenciesProps = {
|
4
|
+
key: PropertyKey;
|
5
|
+
unistyles: TypeStyle;
|
6
|
+
className: string;
|
7
|
+
stylesheet: StyleSheetWithSuperPowers<StyleSheet>;
|
8
|
+
args?: Array<any>;
|
9
|
+
};
|
10
|
+
export declare const listenToDependencies: ({ key, className, unistyles, args, stylesheet }: ListenToDependenciesProps) => (() => void) | undefined;
|
11
|
+
export {};
|
12
|
+
//# sourceMappingURL=listenToDependencies.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"listenToDependencies.d.ts","sourceRoot":"","sources":["../../../../../src/web/listener/listenToDependencies.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAA;AAOnF,KAAK,yBAAyB,GAAG;IAC7B,GAAG,EAAE,WAAW,CAAC;IACjB,SAAS,EAAE,SAAS,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,yBAAyB,CAAC,UAAU,CAAC,CAAA;IACjD,IAAI,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,CAAA;CACpB,CAAA;AAED,eAAO,MAAM,oBAAoB,oDAA0D,yBAAyB,6BAiCnH,CAAA"}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { UnistyleDependency } from '../../specs/NativePlatform';
|
2
|
-
|
2
|
+
declare class UnistylesListenerBuilder {
|
3
3
|
private isInitialized;
|
4
4
|
private listeners;
|
5
5
|
emitChange: (dependency: UnistyleDependency) => void;
|
@@ -7,4 +7,5 @@ export declare class UnistylesListenerBuilder {
|
|
7
7
|
addListeners: (dependencies: Array<UnistyleDependency>, listener: VoidFunction) => () => void;
|
8
8
|
}
|
9
9
|
export declare const UnistylesListener: UnistylesListenerBuilder;
|
10
|
+
export {};
|
10
11
|
//# sourceMappingURL=listener.d.ts.map
|
@@ -1 +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,
|
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,cAAM,wBAAwB;IAC1B,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"}
|
@@ -2,13 +2,4 @@ import type { UnistylesNavigationBar as NavigationBarSpec } from '../specs/Navig
|
|
2
2
|
import type { UnistylesStatusBar as StatusBarSpec } from '../specs/StatusBar';
|
3
3
|
export declare const StatusBar: StatusBarSpec;
|
4
4
|
export declare const NavigationBar: NavigationBarSpec;
|
5
|
-
export declare const UnistylesShadowRegistry: {
|
6
|
-
name: string;
|
7
|
-
__type: string;
|
8
|
-
equals: () => boolean;
|
9
|
-
toString: () => string;
|
10
|
-
dispose: () => void;
|
11
|
-
add: () => void;
|
12
|
-
remove: () => void;
|
13
|
-
};
|
14
5
|
//# sourceMappingURL=mock.d.ts.map
|
@@ -1 +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
|
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"}
|
@@ -1,4 +1,6 @@
|
|
1
|
-
export declare const pseudos: readonly ["_hover", "
|
1
|
+
export declare const pseudos: readonly ["_-moz-broken", "_-moz-drag-over", "_-moz-first-node", "_-moz-handler-blocked", "_-moz-handler-crashed", "_-moz-handler-disabled", "_-moz-last-node", "_-moz-loading", "_-moz-locale-dir(ltr)", "_-moz-locale-dir(rtl)", "_-moz-only-whitespace", "_-moz-submit-invalid", "_-moz-suppressed", "_-moz-user-disabled", "_-moz-window-inactive", "_active", "_any-link", "_autofill", "_blank", "_buffering", "_checked", "_current", "_default", "_defined", "_dir(", "_disabled", "_empty", "_enabled", "_first", "_first-child", "_first-of-type", "_focus", "_focus-visible", "_focus-within", "_fullscreen", "_future", "_has(", "_host", "_host-context(", "_host(", "_hover", "_in-range", "_indeterminate", "_invalid", "_is(", "_lang(", "_last-child", "_last-of-type", "_left", "_link", "_local-link", "_modal", "_muted", "_not(", "_nth-child(", "_nth-last-child(", "_nth-last-of-type(", "_nth-of-type(", "_only-child", "_only-of-type", "_optional", "_out-of-range", "_past", "_paused", "_picture-in-picture", "_placeholder-shown", "_playing", "_popover-open", "_read-only", "_read-write", "_required", "_right", "_scope", "_seeking", "_stalled", "_state(", "_target", "_target-within", "_user-invalid", "_user-valid", "_valid", "_visited", "_volume-locked", "_where(", "_-moz-color-swatch", "_-moz-focus-inner", "_-moz-list-bullet", "_-moz-list-number", "_-moz-meter-bar", "_-moz-progress-bar", "_-moz-range-progress", "_-moz-range-thumb", "_-moz-range-track", "_-webkit-inner-spin-button", "_-webkit-meter-barDeprecated", "_-webkit-meter-even-less-good-value", "_-webkit-meter-inner-element", "_-webkit-meter-optimum-value", "_-webkit-meter-suboptimum-value", "_-webkit-progress-bar", "_-webkit-progress-inner-element", "_-webkit-progress-value", "_-webkit-scrollbar", "_-webkit-search-cancel-button", "_-webkit-search-results-button", "_-webkit-slider-runnable-track", "_-webkit-slider-thumb", "_after", "_backdrop", "_before", "_cue", "_file-selector-button", "_first-letter", "_first-line", "_grammar-error", "_highlight(", "_marker", "_part(", "_placeholder", "_selection", "_slotted(", "_spelling-error", "_target-text", "_view-transition", "_view-transition-group", "_view-transition-image-pair", "_view-transition-new", "_view-transition-old"];
|
2
2
|
export declare const isPseudo: (selector: string) => boolean;
|
3
|
-
|
3
|
+
type AddDynamicSelector<T extends string> = T extends `${infer U}(` ? `${U}(${string})` : T;
|
4
|
+
export type Pseudo = AddDynamicSelector<typeof pseudos[number]>;
|
5
|
+
export {};
|
4
6
|
//# sourceMappingURL=pseudo.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"pseudo.d.ts","sourceRoot":"","sources":["../../../../src/web/pseudo.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"pseudo.d.ts","sourceRoot":"","sources":["../../../../src/web/pseudo.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,ssEAiIV,CAAA;AAEV,eAAO,MAAM,QAAQ,aAAc,MAAM,YAAwD,CAAA;AAEjG,KAAK,kBAAkB,CAAC,CAAC,SAAS,MAAM,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,GAAG,GAAG,GAAG,CAAC,IAAI,MAAM,GAAG,GAAG,CAAC,CAAA;AAE3F,MAAM,MAAM,MAAM,GAAG,kBAAkB,CAAC,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC,CAAA"}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { TypeStyle } from 'typestyle';
|
2
2
|
import type { UnistylesValues } from '../types';
|
3
3
|
declare class UnistylesRegistryBuilder {
|
4
|
-
createStyles: (stylesheet: UnistylesValues, key: string
|
4
|
+
createStyles: (stylesheet: UnistylesValues, key: string) => {
|
5
5
|
className: string;
|
6
6
|
unistyles: TypeStyle;
|
7
7
|
};
|
@@ -1 +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;
|
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;AAG/C,cAAM,wBAAwB;IAC1B,YAAY,eAAgB,eAAe,OAAO,MAAM;;;MAuBvD;IAED,YAAY,cAAe,SAAS,cAAc,eAAe,aAAa,MAAM,UAKnF;CACJ;AAED,eAAO,MAAM,iBAAiB,0BAAiC,CAAA"}
|
@@ -35,7 +35,6 @@ declare class UnistylesRuntimeBuilder {
|
|
35
35
|
setRootViewBackgroundColor: (hex: string, alpha?: number) => void;
|
36
36
|
setImmersiveMode: () => void;
|
37
37
|
updateTheme: (themeName: AppThemeName, updater: (currentTheme: AppTheme) => AppTheme) => void;
|
38
|
-
getSSRUnistyles: () => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>[];
|
39
38
|
}
|
40
39
|
export declare const UnistylesRuntime: UnistylesRuntimeBuilder;
|
41
40
|
export {};
|
@@ -1 +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;I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AED,0BAA0B,QAAS,MAAM,UAAU,MAAM,UAMxD;IAED,gBAAgB,aAAW;IAE3B,WAAW,cAAe,YAAY,WAAW,CAAC,YAAY,EAAE,QAAQ,KAAK,QAAQ,UAQpF;CACJ;AAED,eAAO,MAAM,gBAAgB,yBAAgC,CAAA"}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import type { UnistylesValues } from '../types';
|
2
|
+
type Style = UnistylesValues | ((...args: Array<any>) => UnistylesValues);
|
3
|
+
declare class UnistylesShadowRegistryBuilder {
|
4
|
+
name: string;
|
5
|
+
__type: string;
|
6
|
+
equals: () => boolean;
|
7
|
+
toString: () => string;
|
8
|
+
dispose: () => void;
|
9
|
+
private readonly webUnistylesMap;
|
10
|
+
private readonly disposeMap;
|
11
|
+
private readonly stylesMap;
|
12
|
+
add: (ref: any, _style?: Style | Array<Style>, _variants?: Record<string, any>, _args?: Array<any>) => void;
|
13
|
+
remove: (ref: HTMLElement, style: Style) => void;
|
14
|
+
}
|
15
|
+
export declare const UnistylesShadowRegistry: UnistylesShadowRegistryBuilder;
|
16
|
+
export {};
|
17
|
+
//# sourceMappingURL=shadowRegistry.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"shadowRegistry.d.ts","sourceRoot":"","sources":["../../../../src/web/shadowRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAS/C,KAAK,KAAK,GAAG,eAAe,GAAG,CAAC,CAAC,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,KAAK,eAAe,CAAC,CAAA;AAEzE,cAAM,8BAA8B;IAEhC,IAAI,SAA4B;IAChC,MAAM,SAAQ;IACd,MAAM,gBAAa;IACnB,QAAQ,eAAkC;IAC1C,OAAO,aAAW;IAGlB,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAsD;IACtF,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAmE;IAC9F,OAAO,CAAC,QAAQ,CAAC,SAAS,CAA2D;IAErF,GAAG,QAAS,GAAG,WAAW,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,cAAc,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,UAAU,KAAK,CAAC,GAAG,CAAC,UAmFlG;IAED,MAAM,QAAS,WAAW,SAAS,KAAK,UAQvC;CACJ;AAED,eAAO,MAAM,uBAAuB,gCAAuC,CAAA"}
|
@@ -1,11 +1,9 @@
|
|
1
|
-
import { type ReactElement } from 'react';
|
2
1
|
import type { UnistylesTheme } from '../types';
|
3
2
|
import type { UnistylesConfig } from '../specs/StyleSheet';
|
4
3
|
import type { AppBreakpoint, AppThemeName } from '../specs/types';
|
5
4
|
import type { UnistylesBreakpoints } from '../global';
|
6
5
|
declare class UnistylesStateBuilder {
|
7
6
|
private readonly isSSR;
|
8
|
-
readonly tags: Array<ReactElement>;
|
9
7
|
themes: Map<string, UnistylesTheme>;
|
10
8
|
themeName?: AppThemeName;
|
11
9
|
breakpoint?: AppBreakpoint;
|
@@ -15,9 +13,6 @@ declare class UnistylesStateBuilder {
|
|
15
13
|
private initThemes;
|
16
14
|
private initSettings;
|
17
15
|
private initBreakpoints;
|
18
|
-
createTag(): HTMLStyleElement | {
|
19
|
-
textContent: string;
|
20
|
-
};
|
21
16
|
}
|
22
17
|
export declare const UnistylesState: UnistylesStateBuilder;
|
23
18
|
export {};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../../src/web/state.ts"],"names":[],"mappings":"AAAA,OAAO,
|
1
|
+
{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../../src/web/state.ts"],"names":[],"mappings":"AAAA,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;IAEnC,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;CACJ;AAED,eAAO,MAAM,cAAc,uBAA8B,CAAA"}
|
@@ -1,12 +1,6 @@
|
|
1
1
|
import { ColorScheme, type AppThemeName } from '../specs/types';
|
2
|
-
import type { UnistylesValues } from '../types';
|
2
|
+
import type { StyleSheet, StyleSheetWithSuperPowers, UnistylesValues } from '../types/stylesheet';
|
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 | null, values: UnistylesValues) => {
|
5
|
-
[x: string]: string | boolean;
|
6
|
-
$$css: boolean;
|
7
|
-
} | {
|
8
|
-
$$css?: undefined;
|
9
|
-
};
|
10
4
|
export declare const keyInObject: <T extends Record<string, any>>(obj: T, key: PropertyKey) => key is keyof T;
|
11
5
|
export declare const schemeToTheme: (scheme: ColorScheme) => AppThemeName;
|
12
6
|
export declare const hexToRGBA: (hex: string, opacity: number) => string;
|
@@ -17,4 +11,25 @@ export declare const isServer: () => boolean;
|
|
17
11
|
export declare const deepMergeObjects: <T extends Record<PropertyKey, any>>(...sources: Array<T>) => T;
|
18
12
|
export declare const warn: (message: string) => void;
|
19
13
|
export declare const equal: <T>(a: T, b: T) => boolean;
|
14
|
+
type UnistyleSecrets = {
|
15
|
+
__uni__stylesheet: StyleSheetWithSuperPowers<StyleSheet>;
|
16
|
+
__uni__key: string;
|
17
|
+
__uni__refs: Set<HTMLElement>;
|
18
|
+
__uni__variants: Record<string, any>;
|
19
|
+
__uni__args?: Array<any>;
|
20
|
+
};
|
21
|
+
export declare const assignSecrets: <T>(object: T, secrets: UnistyleSecrets) => T;
|
22
|
+
export declare const extractSecrets: (object: any) => UnistyleSecrets[];
|
23
|
+
export declare const getStyles: (values: UnistylesValues) => {};
|
24
|
+
export declare const createDoubleMap: <TKey, TSecondKey, TValue>() => {
|
25
|
+
get: (key: TKey, secondKey: TSecondKey) => TValue | undefined;
|
26
|
+
set: (key: TKey, secondKey: TSecondKey, value: TValue) => void;
|
27
|
+
delete: (key: TKey, secondKey: TSecondKey) => void;
|
28
|
+
forEach: (callback: (key: TKey, secondKey: TSecondKey, value: TValue) => void) => void;
|
29
|
+
};
|
30
|
+
export declare const extractHiddenProperties: (object: any) => {
|
31
|
+
[k: string]: any;
|
32
|
+
};
|
33
|
+
export declare const isInDocument: (element: HTMLElement) => boolean;
|
34
|
+
export {};
|
20
35
|
//# sourceMappingURL=utils.d.ts.map
|
@@ -1 +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,
|
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,UAAU,EAAE,yBAAyB,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAEjG,eAAO,MAAM,YAAY,GAAI,IAAI,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,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U,EAAE,MAAM;eAIrC,IAAI,aAAa,UAAU;eAS3B,IAAI,aAAa,UAAU,SAAS,MAAM;kBAMvC,IAAI,aAAa,UAAU;wBASrB,CAAC,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI;CAQpF,CAAA;AAED,eAAO,MAAM,uBAAuB,WAAY,GAAG;;CAQlD,CAAA;AAED,eAAO,MAAM,YAAY,YAAa,WAAW,YAAoC,CAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useVariants.d.ts","sourceRoot":"","sources":["../../../../../src/web/variants/useVariants.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"useVariants.d.ts","sourceRoot":"","sources":["../../../../../src/web/variants/useVariants.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAIpE,eAAO,MAAM,iBAAiB,WAAY,qBAAqB,CAAC,UAAU,CAAC,uBAAuB,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,IAAI,SAqCxI,CAAA"}
|
@@ -11,18 +11,21 @@
|
|
11
11
|
#include <fbjni/fbjni.h>
|
12
12
|
#include "HybridNativePlatformSpec.hpp"
|
13
13
|
|
14
|
+
|
15
|
+
|
16
|
+
|
14
17
|
namespace margelo::nitro::unistyles {
|
15
18
|
|
16
19
|
using namespace facebook;
|
17
20
|
|
18
|
-
class JHybridNativePlatformSpec
|
19
|
-
|
21
|
+
class JHybridNativePlatformSpec: public jni::HybridClass<JHybridNativePlatformSpec, JHybridObject>,
|
22
|
+
public virtual HybridNativePlatformSpec {
|
20
23
|
public:
|
21
24
|
static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/unistyles/HybridNativePlatformSpec;";
|
22
25
|
static jni::local_ref<jhybriddata> initHybrid(jni::alias_ref<jhybridobject> jThis);
|
23
26
|
static void registerNatives();
|
24
27
|
|
25
|
-
|
28
|
+
protected:
|
26
29
|
// C++ constructor (called from Java via `initHybrid()`)
|
27
30
|
explicit JHybridNativePlatformSpec(jni::alias_ref<jhybridobject> jThis) :
|
28
31
|
HybridObject(HybridNativePlatformSpec::TAG),
|
package/nitrogen/generated/android/kotlin/com/margelo/nitro/unistyles/HybridNativePlatformSpec.kt
CHANGED
@@ -21,10 +21,8 @@ import com.margelo.nitro.core.*
|
|
21
21
|
@Keep
|
22
22
|
@Suppress("RedundantSuppression", "KotlinJniMissingFunction", "PropertyName", "RedundantUnitReturnType", "unused")
|
23
23
|
abstract class HybridNativePlatformSpec: HybridObject() {
|
24
|
-
protected val TAG = "HybridNativePlatformSpec"
|
25
|
-
|
26
24
|
@DoNotStrip
|
27
|
-
|
25
|
+
private var mHybridData: HybridData = initHybrid()
|
28
26
|
|
29
27
|
init {
|
30
28
|
// Pass this `HybridData` through to it's base class,
|
@@ -32,6 +30,13 @@ abstract class HybridNativePlatformSpec: HybridObject() {
|
|
32
30
|
super.updateNative(mHybridData)
|
33
31
|
}
|
34
32
|
|
33
|
+
/**
|
34
|
+
* Call from a child class to initialize HybridData with a child.
|
35
|
+
*/
|
36
|
+
override fun updateNative(hybridData: HybridData) {
|
37
|
+
mHybridData = hybridData
|
38
|
+
}
|
39
|
+
|
35
40
|
// Properties
|
36
41
|
|
37
42
|
|
@@ -55,7 +55,7 @@ namespace margelo::nitro::unistyles {
|
|
55
55
|
* the future, HybridNativePlatformSpecCxx can directly inherit from the C++ class HybridNativePlatformSpec
|
56
56
|
* to simplify the whole structure and memory management.
|
57
57
|
*/
|
58
|
-
class HybridNativePlatformSpecSwift
|
58
|
+
class HybridNativePlatformSpecSwift: public virtual HybridNativePlatformSpec {
|
59
59
|
public:
|
60
60
|
// Constructor from a Swift instance
|
61
61
|
explicit HybridNativePlatformSpecSwift(const Unistyles::HybridNativePlatformSpecCxx& swiftPart):
|
@@ -17,7 +17,7 @@ import NitroModules
|
|
17
17
|
* - Other HybridObjects need to be wrapped/unwrapped from the Swift TCxx wrapper
|
18
18
|
* - Throwing methods need to be wrapped with a Result<T, Error> type, as exceptions cannot be propagated to C++
|
19
19
|
*/
|
20
|
-
public
|
20
|
+
public class HybridNativePlatformSpecCxx {
|
21
21
|
/**
|
22
22
|
* The Swift <> C++ bridge's namespace (`margelo::nitro::unistyles::bridge::swift`)
|
23
23
|
* from `Unistyles-Swift-Cxx-Bridge.hpp`.
|
@@ -28,7 +28,15 @@ public final class HybridNativePlatformSpecCxx {
|
|
28
28
|
/**
|
29
29
|
* Holds an instance of the `HybridNativePlatformSpec` Swift protocol.
|
30
30
|
*/
|
31
|
-
private
|
31
|
+
private var implementation: HybridNativePlatformSpec
|
32
|
+
|
33
|
+
/**
|
34
|
+
* Get the actual `HybridNativePlatformSpec` instance this class wraps.
|
35
|
+
*/
|
36
|
+
@inline(__always)
|
37
|
+
public func getHybridNativePlatformSpec() -> HybridNativePlatformSpec {
|
38
|
+
return implementation
|
39
|
+
}
|
32
40
|
|
33
41
|
/**
|
34
42
|
* Create a new `HybridNativePlatformSpecCxx` that wraps the given `HybridNativePlatformSpec`.
|
@@ -36,15 +44,18 @@ public final class HybridNativePlatformSpecCxx {
|
|
36
44
|
*/
|
37
45
|
public init(_ implementation: HybridNativePlatformSpec) {
|
38
46
|
self.implementation = implementation
|
47
|
+
/* no base class */
|
39
48
|
}
|
40
49
|
|
41
50
|
/**
|
42
51
|
* Contains a (weak) reference to the C++ HybridObject to cache it.
|
43
52
|
*/
|
44
53
|
public var hybridContext: margelo.nitro.HybridContext {
|
54
|
+
@inline(__always)
|
45
55
|
get {
|
46
56
|
return self.implementation.hybridContext
|
47
57
|
}
|
58
|
+
@inline(__always)
|
48
59
|
set {
|
49
60
|
self.implementation.hybridContext = newValue
|
50
61
|
}
|
@@ -54,6 +65,7 @@ public final class HybridNativePlatformSpecCxx {
|
|
54
65
|
* Get the memory size of the Swift class (plus size of any other allocations)
|
55
66
|
* so the JS VM can properly track it and garbage-collect the JS object if needed.
|
56
67
|
*/
|
68
|
+
@inline(__always)
|
57
69
|
public var memorySize: Int {
|
58
70
|
return self.implementation.memorySize
|
59
71
|
}
|
@@ -43,9 +43,12 @@ namespace margelo::nitro::unistyles {
|
|
43
43
|
/**
|
44
44
|
* An abstract base class for `NativePlatform`
|
45
45
|
* Inherit this class to create instances of `HybridNativePlatformSpec` in C++.
|
46
|
+
* You must explicitly call `HybridObject`'s constructor yourself, because it is virtual.
|
46
47
|
* @example
|
47
48
|
* ```cpp
|
48
49
|
* class HybridNativePlatform: public HybridNativePlatformSpec {
|
50
|
+
* public:
|
51
|
+
* HybridNativePlatform(...): HybridObject(TAG) { ... }
|
49
52
|
* // ...
|
50
53
|
* };
|
51
54
|
* ```
|
@@ -24,9 +24,12 @@ namespace margelo::nitro::unistyles {
|
|
24
24
|
/**
|
25
25
|
* An abstract base class for `UnistylesNavigationBar`
|
26
26
|
* Inherit this class to create instances of `HybridUnistylesNavigationBarSpec` in C++.
|
27
|
+
* You must explicitly call `HybridObject`'s constructor yourself, because it is virtual.
|
27
28
|
* @example
|
28
29
|
* ```cpp
|
29
30
|
* class HybridUnistylesNavigationBar: public HybridUnistylesNavigationBarSpec {
|
31
|
+
* public:
|
32
|
+
* HybridUnistylesNavigationBar(...): HybridObject(TAG) { ... }
|
30
33
|
* // ...
|
31
34
|
* };
|
32
35
|
* ```
|
@@ -39,9 +39,12 @@ namespace margelo::nitro::unistyles {
|
|
39
39
|
/**
|
40
40
|
* An abstract base class for `UnistylesRuntime`
|
41
41
|
* Inherit this class to create instances of `HybridUnistylesRuntimeSpec` in C++.
|
42
|
+
* You must explicitly call `HybridObject`'s constructor yourself, because it is virtual.
|
42
43
|
* @example
|
43
44
|
* ```cpp
|
44
45
|
* class HybridUnistylesRuntime: public HybridUnistylesRuntimeSpec {
|
46
|
+
* public:
|
47
|
+
* HybridUnistylesRuntime(...): HybridObject(TAG) { ... }
|
45
48
|
* // ...
|
46
49
|
* };
|
47
50
|
* ```
|
@@ -24,9 +24,12 @@ namespace margelo::nitro::unistyles {
|
|
24
24
|
/**
|
25
25
|
* An abstract base class for `UnistylesShadowRegistry`
|
26
26
|
* Inherit this class to create instances of `HybridUnistylesShadowRegistrySpec` in C++.
|
27
|
+
* You must explicitly call `HybridObject`'s constructor yourself, because it is virtual.
|
27
28
|
* @example
|
28
29
|
* ```cpp
|
29
30
|
* class HybridUnistylesShadowRegistry: public HybridUnistylesShadowRegistrySpec {
|
31
|
+
* public:
|
32
|
+
* HybridUnistylesShadowRegistry(...): HybridObject(TAG) { ... }
|
30
33
|
* // ...
|
31
34
|
* };
|
32
35
|
* ```
|
@@ -24,9 +24,12 @@ namespace margelo::nitro::unistyles {
|
|
24
24
|
/**
|
25
25
|
* An abstract base class for `UnistylesStatusBar`
|
26
26
|
* Inherit this class to create instances of `HybridUnistylesStatusBarSpec` in C++.
|
27
|
+
* You must explicitly call `HybridObject`'s constructor yourself, because it is virtual.
|
27
28
|
* @example
|
28
29
|
* ```cpp
|
29
30
|
* class HybridUnistylesStatusBar: public HybridUnistylesStatusBarSpec {
|
31
|
+
* public:
|
32
|
+
* HybridUnistylesStatusBar(...): HybridObject(TAG) { ... }
|
30
33
|
* // ...
|
31
34
|
* };
|
32
35
|
* ```
|
@@ -15,7 +15,7 @@ namespace margelo::nitro::unistyles {
|
|
15
15
|
// load custom methods/properties
|
16
16
|
registerHybrids(this, [](Prototype& prototype) {
|
17
17
|
prototype.registerHybridGetter("hairlineWidth", &HybridUnistylesStyleSheetSpec::getHairlineWidth);
|
18
|
-
prototype.registerHybridGetter("
|
18
|
+
prototype.registerHybridGetter("__unid", &HybridUnistylesStyleSheetSpec::get__unid);
|
19
19
|
});
|
20
20
|
}
|
21
21
|
|