react-native-unistyles 3.0.0-alpha.13 → 3.0.0-alpha.15

Sign up to get free protection for your applications and to get access to all the features.
Files changed (133) hide show
  1. package/cxx/core/UnistyleWrapper.h +1 -1
  2. package/cxx/core/UnistylesCommitHook.cpp +13 -10
  3. package/cxx/core/UnistylesMountHook.cpp +3 -19
  4. package/cxx/hybridObjects/HybridStyleSheet.cpp +4 -3
  5. package/cxx/hybridObjects/HybridStyleSheet.h +1 -1
  6. package/cxx/parser/Parser.cpp +13 -9
  7. package/cxx/shadowTree/ShadowTreeManager.cpp +5 -5
  8. package/lib/commonjs/index.js +4 -0
  9. package/lib/commonjs/index.js.map +1 -1
  10. package/lib/commonjs/specs/ShadowRegistry/index.js +7 -1
  11. package/lib/commonjs/specs/ShadowRegistry/index.js.map +1 -1
  12. package/lib/commonjs/web/convert/index.js +1 -1
  13. package/lib/commonjs/web/convert/index.js.map +1 -1
  14. package/lib/commonjs/web/create.js +25 -63
  15. package/lib/commonjs/web/create.js.map +1 -1
  16. package/lib/commonjs/web/createUnistylesComponent.js +61 -0
  17. package/lib/commonjs/web/createUnistylesComponent.js.map +1 -0
  18. package/lib/commonjs/web/index.js +12 -3
  19. package/lib/commonjs/web/index.js.map +1 -1
  20. package/lib/commonjs/web/listener/index.js +7 -0
  21. package/lib/commonjs/web/listener/index.js.map +1 -1
  22. package/lib/commonjs/web/listener/listenToDependencies.js +39 -0
  23. package/lib/commonjs/web/listener/listenToDependencies.js.map +1 -0
  24. package/lib/commonjs/web/listener/listener.js +1 -2
  25. package/lib/commonjs/web/listener/listener.js.map +1 -1
  26. package/lib/commonjs/web/mock.js +1 -10
  27. package/lib/commonjs/web/mock.js.map +1 -1
  28. package/lib/commonjs/web/pseudo.js +2 -3
  29. package/lib/commonjs/web/pseudo.js.map +1 -1
  30. package/lib/commonjs/web/registry.js +2 -4
  31. package/lib/commonjs/web/registry.js.map +1 -1
  32. package/lib/commonjs/web/runtime.js +0 -1
  33. package/lib/commonjs/web/runtime.js.map +1 -1
  34. package/lib/commonjs/web/shadowRegistry.js +120 -0
  35. package/lib/commonjs/web/shadowRegistry.js.map +1 -0
  36. package/lib/commonjs/web/state.js +0 -40
  37. package/lib/commonjs/web/state.js.map +1 -1
  38. package/lib/commonjs/web/utils.js +66 -14
  39. package/lib/commonjs/web/utils.js.map +1 -1
  40. package/lib/commonjs/web/variants/useVariants.js +15 -31
  41. package/lib/commonjs/web/variants/useVariants.js.map +1 -1
  42. package/lib/module/index.js +4 -0
  43. package/lib/module/index.js.map +1 -1
  44. package/lib/module/specs/ShadowRegistry/index.js +7 -1
  45. package/lib/module/specs/ShadowRegistry/index.js.map +1 -1
  46. package/lib/module/web/convert/index.js +1 -1
  47. package/lib/module/web/convert/index.js.map +1 -1
  48. package/lib/module/web/create.js +26 -64
  49. package/lib/module/web/create.js.map +1 -1
  50. package/lib/module/web/createUnistylesComponent.js +54 -0
  51. package/lib/module/web/createUnistylesComponent.js.map +1 -0
  52. package/lib/module/web/index.js +4 -2
  53. package/lib/module/web/index.js.map +1 -1
  54. package/lib/module/web/listener/index.js +1 -0
  55. package/lib/module/web/listener/index.js.map +1 -1
  56. package/lib/module/web/listener/listenToDependencies.js +34 -0
  57. package/lib/module/web/listener/listenToDependencies.js.map +1 -0
  58. package/lib/module/web/listener/listener.js +1 -1
  59. package/lib/module/web/listener/listener.js.map +1 -1
  60. package/lib/module/web/mock.js +0 -9
  61. package/lib/module/web/mock.js.map +1 -1
  62. package/lib/module/web/pseudo.js +2 -3
  63. package/lib/module/web/pseudo.js.map +1 -1
  64. package/lib/module/web/registry.js +2 -4
  65. package/lib/module/web/registry.js.map +1 -1
  66. package/lib/module/web/runtime.js +0 -1
  67. package/lib/module/web/runtime.js.map +1 -1
  68. package/lib/module/web/shadowRegistry.js +116 -0
  69. package/lib/module/web/shadowRegistry.js.map +1 -0
  70. package/lib/module/web/state.js +0 -40
  71. package/lib/module/web/state.js.map +1 -1
  72. package/lib/module/web/utils.js +59 -12
  73. package/lib/module/web/utils.js.map +1 -1
  74. package/lib/module/web/variants/useVariants.js +16 -32
  75. package/lib/module/web/variants/useVariants.js.map +1 -1
  76. package/lib/typescript/src/specs/ShadowRegistry/index.d.ts.map +1 -1
  77. package/lib/typescript/src/web/create.d.ts.map +1 -1
  78. package/lib/typescript/src/web/createUnistylesComponent.d.ts +3 -0
  79. package/lib/typescript/src/web/createUnistylesComponent.d.ts.map +1 -0
  80. package/lib/typescript/src/web/index.d.ts +2 -1
  81. package/lib/typescript/src/web/index.d.ts.map +1 -1
  82. package/lib/typescript/src/web/listener/index.d.ts +1 -0
  83. package/lib/typescript/src/web/listener/index.d.ts.map +1 -1
  84. package/lib/typescript/src/web/listener/listenToDependencies.d.ts +12 -0
  85. package/lib/typescript/src/web/listener/listenToDependencies.d.ts.map +1 -0
  86. package/lib/typescript/src/web/listener/listener.d.ts +2 -1
  87. package/lib/typescript/src/web/listener/listener.d.ts.map +1 -1
  88. package/lib/typescript/src/web/mock.d.ts +0 -9
  89. package/lib/typescript/src/web/mock.d.ts.map +1 -1
  90. package/lib/typescript/src/web/pseudo.d.ts +4 -2
  91. package/lib/typescript/src/web/pseudo.d.ts.map +1 -1
  92. package/lib/typescript/src/web/registry.d.ts +1 -1
  93. package/lib/typescript/src/web/registry.d.ts.map +1 -1
  94. package/lib/typescript/src/web/runtime.d.ts +0 -1
  95. package/lib/typescript/src/web/runtime.d.ts.map +1 -1
  96. package/lib/typescript/src/web/shadowRegistry.d.ts +17 -0
  97. package/lib/typescript/src/web/shadowRegistry.d.ts.map +1 -0
  98. package/lib/typescript/src/web/state.d.ts +0 -5
  99. package/lib/typescript/src/web/state.d.ts.map +1 -1
  100. package/lib/typescript/src/web/utils.d.ts +22 -7
  101. package/lib/typescript/src/web/utils.d.ts.map +1 -1
  102. package/lib/typescript/src/web/variants/useVariants.d.ts.map +1 -1
  103. package/nitrogen/generated/android/c++/JHybridNativePlatformSpec.hpp +6 -3
  104. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unistyles/HybridNativePlatformSpec.kt +8 -3
  105. package/nitrogen/generated/ios/c++/HybridNativePlatformSpecSwift.hpp +1 -1
  106. package/nitrogen/generated/ios/swift/HybridNativePlatformSpec.swift +1 -1
  107. package/nitrogen/generated/ios/swift/HybridNativePlatformSpecCxx.swift +14 -2
  108. package/nitrogen/generated/shared/c++/HybridNativePlatformSpec.hpp +3 -0
  109. package/nitrogen/generated/shared/c++/HybridUnistylesNavigationBarSpec.hpp +3 -0
  110. package/nitrogen/generated/shared/c++/HybridUnistylesRuntimeSpec.hpp +3 -0
  111. package/nitrogen/generated/shared/c++/HybridUnistylesShadowRegistrySpec.hpp +3 -0
  112. package/nitrogen/generated/shared/c++/HybridUnistylesStatusBarSpec.hpp +3 -0
  113. package/nitrogen/generated/shared/c++/HybridUnistylesStyleSheetSpec.cpp +1 -1
  114. package/nitrogen/generated/shared/c++/HybridUnistylesStyleSheetSpec.hpp +4 -1
  115. package/package.json +3 -3
  116. package/plugin/index.js +31 -0
  117. package/src/index.ts +3 -0
  118. package/src/specs/ShadowRegistry/index.ts +7 -1
  119. package/src/web/convert/index.ts +1 -1
  120. package/src/web/create.ts +24 -79
  121. package/src/web/createUnistylesComponent.tsx +56 -0
  122. package/src/web/index.ts +3 -2
  123. package/src/web/listener/index.ts +1 -0
  124. package/src/web/listener/listenToDependencies.ts +50 -0
  125. package/src/web/listener/listener.ts +1 -1
  126. package/src/web/mock.ts +0 -10
  127. package/src/web/pseudo.ts +131 -5
  128. package/src/web/registry.ts +3 -5
  129. package/src/web/runtime.ts +0 -2
  130. package/src/web/shadowRegistry.ts +121 -0
  131. package/src/web/state.ts +0 -44
  132. package/src/web/utils.ts +90 -16
  133. package/src/web/variants/useVariants.ts +18 -32
@@ -1,13 +1,11 @@
1
1
  "use strict";
2
2
 
3
- import { createElement, createRef } from 'react';
4
3
  import { UnistylesRuntime } from './runtime';
5
4
  import { isServer, schemeToTheme } from './utils';
6
5
  import { UnistylesListener } from './listener';
7
6
  import { UnistyleDependency } from '../specs/NativePlatform';
8
7
  class UnistylesStateBuilder {
9
8
  isSSR = isServer();
10
- tags = [];
11
9
  themes = new Map();
12
10
  hasAdaptiveThemes = false;
13
11
  init = config => {
@@ -74,44 +72,6 @@ class UnistylesStateBuilder {
74
72
  });
75
73
  });
76
74
  };
77
- createTag() {
78
- if (!this.isSSR) {
79
- const tag = document.createElement('style');
80
- document.head.appendChild(tag);
81
- return tag;
82
- }
83
- const tagRef = new Proxy(/*#__PURE__*/createRef(), {
84
- set: (target, prop, value) => {
85
- // When ref is assigned
86
- if ('textContent' in value) {
87
- value.textContent = tag.textContent;
88
- }
89
- return Reflect.set(target, prop, value);
90
- }
91
- });
92
- const tagElement = /*#__PURE__*/createElement('style', {
93
- ref: tagRef,
94
- key: this.tags.length
95
- }, '');
96
- const tag = new Proxy({
97
- textContent: ''
98
- }, {
99
- set: (target, prop, value) => {
100
- if (prop !== 'textContent') {
101
- return false;
102
- }
103
-
104
- // When css is updated
105
- target.textContent = value;
106
- if (tagRef.current) {
107
- tagRef.current.textContent = value;
108
- }
109
- return true;
110
- }
111
- });
112
- this.tags.push(tagElement);
113
- return tag;
114
- }
115
75
  }
116
76
  export const UnistylesState = new UnistylesStateBuilder();
117
77
  //# sourceMappingURL=state.js.map
@@ -1 +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,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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":[]}
1
+ {"version":3,"names":["UnistylesRuntime","isServer","schemeToTheme","UnistylesListener","UnistyleDependency","UnistylesStateBuilder","isSSR","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","UnistylesState"],"sourceRoot":"../../../src","sources":["web/state.ts"],"mappings":";;AAIA,SAASA,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;EAEnCM,MAAM,GAAG,IAAIC,GAAG,CAAyB,CAAC;EAM1CC,iBAAiB,GAAG,KAAK;EAEzBC,IAAI,GAAIC,MAAuB,IAAK;IAChC,IAAI,CAAC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5C,kBAAkB,CAAC6C,WAAW,CAAC;MAChE,CAAC,CAAC;IACN,CAAC,CAAC;EACV,CAAC;AACL;AAEA,OAAO,MAAMC,cAAc,GAAG,IAAI7C,qBAAqB,CAAC,CAAC","ignoreList":[]}
@@ -2,18 +2,6 @@
2
2
 
3
3
  import { ColorScheme } from '../specs/types';
4
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
5
  export const keyInObject = (obj, key) => key in obj;
18
6
  export const schemeToTheme = scheme => {
19
7
  switch (scheme) {
@@ -62,4 +50,63 @@ export const equal = (a, b) => {
62
50
  }
63
51
  return keysA.every(key => Object.is(a[key], b[key]) && Object.prototype.hasOwnProperty.call(b, key));
64
52
  };
53
+ export const assignSecrets = (object, secrets) => {
54
+ // @ts-expect-error - assign secrets to object
55
+ object[`__uni__secrets__${Math.random().toString(16).slice(2)}`] = secrets;
56
+ return object;
57
+ };
58
+ export const extractSecrets = object => {
59
+ const secrets = Object.entries(object).reduce((acc, [key, value]) => {
60
+ if (key.startsWith('__uni__secrets__')) {
61
+ acc.push(value);
62
+ }
63
+ return acc;
64
+ }, []);
65
+ return secrets;
66
+ };
67
+ export const getStyles = values => {
68
+ const returnValue = {};
69
+ Object.defineProperties(returnValue, reduceObject(values, value => ({
70
+ value,
71
+ enumerable: false,
72
+ configurable: true
73
+ })));
74
+ return returnValue;
75
+ };
76
+ export const createDoubleMap = () => {
77
+ const map = new Map();
78
+ return {
79
+ get: (key, secondKey) => {
80
+ const mapForKey = map.get(key);
81
+ if (!mapForKey) {
82
+ return undefined;
83
+ }
84
+ return mapForKey.get(secondKey);
85
+ },
86
+ set: (key, secondKey, value) => {
87
+ const mapForKey = map.get(key) ?? new Map();
88
+ map.set(key, mapForKey);
89
+ mapForKey.set(secondKey, value);
90
+ },
91
+ delete: (key, secondKey) => {
92
+ const mapForKey = map.get(key);
93
+ if (!mapForKey) {
94
+ return;
95
+ }
96
+ mapForKey.delete(secondKey);
97
+ },
98
+ forEach: callback => {
99
+ map.forEach((mapForKey, key) => {
100
+ mapForKey.forEach((value, secondKey) => {
101
+ callback(key, secondKey, value);
102
+ });
103
+ });
104
+ }
105
+ };
106
+ };
107
+ export const extractHiddenProperties = object => {
108
+ const hiddenProperties = Object.getOwnPropertyNames(object);
109
+ return Object.fromEntries(hiddenProperties.filter(key => !key.startsWith('__uni__')).map(key => [key, object[key]]));
110
+ };
111
+ export const isInDocument = element => document.body.contains(element);
65
112
  //# sourceMappingURL=utils.js.map
@@ -1 +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,W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AC,EAAE4C,CAAC,CAAC5C,GAAG,CAAC,CAAC,IAAIJ,MAAM,CAACqD,SAAS,CAACC,cAAc,CAACC,IAAI,CAACP,CAAC,EAAE5C,GAAG,CAAC,CAAC;AACxG,CAAC","ignoreList":[]}
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,EACTC,OAA+D,KAC9DC,MAAM,CAACC,WAAW,CAACD,MAAM,CAACE,OAAO,CAACJ,GAAG,CAAC,CAACK,GAAG,CAAC,CAAC,CAACC,GAAG,EAAEC,KAAK,CAAC,KAAK,CAACD,GAAG,EAAEL,OAAO,CAACM,KAAK,EAAsBD,GAAG,CAAC,CAAC,CAAC,CAAoC;AAErJ,OAAO,MAAME,WAAW,GAAGA,CAAgCR,GAAM,EAAEM,GAAgB,KAAqBA,GAAG,IAAIN,GAAG;AAElH,OAAO,MAAMS,aAAa,GAAIC,MAAmB,IAAmB;EAChE,QAAQA,MAAM;IACV,KAAKZ,WAAW,CAACa,IAAI;MACjB,OAAO,MAAM;IACjB,KAAKb,WAAW,CAACc,KAAK;IACtB;MACI,OAAO,OAAO;EACtB;AACJ,CAAC;AAED,OAAO,MAAMC,SAAS,GAAGA,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AG,CAAC;MAE9B,IAAI,CAACgE,SAAS,EAAE;QACZ;MACJ;MAEAA,SAAS,CAACG,MAAM,CAACJ,SAAS,CAAC;IAC/B,CAAC;IACDrC,OAAO,EAAG0C,QAAmE,IAAK;MAC9ErE,GAAG,CAAC2B,OAAO,CAAC,CAACsC,SAAS,EAAEhE,GAAG,KAAK;QAC5BgE,SAAS,CAACtC,OAAO,CAAC,CAACzB,KAAK,EAAE8D,SAAS,KAAK;UACpCK,QAAQ,CAACpE,GAAG,EAAE+D,SAAS,EAAE9D,KAAK,CAAC;QACnC,CAAC,CAAC;MACN,CAAC,CAAC;IACN;EACJ,CAAC;AACL,CAAC;AAED,OAAO,MAAMoE,uBAAuB,GAAIxB,MAAW,IAAK;EACpD,MAAMyB,gBAAgB,GAAG1E,MAAM,CAAC2E,mBAAmB,CAAC1B,MAAM,CAAC;EAE3D,OAAOjD,MAAM,CAACC,WAAW,CACrByE,gBAAgB,CACXxD,MAAM,CAACd,GAAG,IAAI,CAACA,GAAG,CAACoD,UAAU,CAAC,SAAS,CAAC,CAAC,CACzCrD,GAAG,CAACC,GAAG,IAAI,CAACA,GAAG,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":[]}
@@ -1,13 +1,10 @@
1
1
  "use strict";
2
2
 
3
3
  import { useMemo, useRef, useState } from 'react';
4
- import { equal, reduceObject } from '../utils';
5
- import { UnistylesRegistry } from '../registry';
4
+ import { equal, keyInObject, reduceObject } from '../utils';
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,31 @@ export const createUseVariants = (styles, setSelectedVariants) => {
23
20
  });
24
21
  return result;
25
22
  }, [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]) => {
23
+ combinedVariantStyles.forEach(([key]) => {
37
24
  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) {
25
+ if (!styleEntry) {
42
26
  return;
43
27
  }
44
- if (variantsChanged) {
45
- UnistylesRegistry.updateStyles(unistyles, value, className);
46
- }
28
+ const selectedVariantStyles = selectedVariantStylesMap.get(key);
47
29
  Object.defineProperties(styleEntry, reduceObject(selectedVariantStyles ?? {}, value => ({
48
30
  value,
49
31
  enumerable: false,
50
32
  configurable: true
51
33
  })));
52
- if (styleEntry) {
53
- Object.keys(styleEntry ?? {}).forEach(key => {
54
- if (!key.startsWith('variant-')) {
55
- return;
56
- }
57
34
 
58
- // @ts-expect-error - remove old variants
59
- delete styleEntry[key];
35
+ // Add __uni__variants to static styles
36
+ Object.keys(styleEntry).forEach(key => {
37
+ if (!key.startsWith('__uni__secrets__')) {
38
+ return;
39
+ }
40
+ const secret = keyInObject(styleEntry, key) ? styleEntry[key] : undefined;
41
+ if (!secret) {
42
+ return;
43
+ }
44
+ Object.defineProperty(secret, '__uni__variants', {
45
+ value: selectedVariants
60
46
  });
61
- // @ts-expect-error - apply variant className
62
- styleEntry[className] = className;
63
- }
47
+ });
64
48
  });
65
49
  };
66
50
  Object.defineProperty(styles, 'useVariants', {
@@ -1 +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,YAAY,CAAC,GAAGZ,QAAQ,CAAC,MAAM,IAAIW,GAAG,CAAiB,CAAC,CAAC;IAChE,MAAM,CAACE,wBAAwB,CAAC,GAAGb,QAAQ,CAAC,MAAM,IAAIW,GAAG,CAA8B,CAAC,CAAC;IACzF,MAAMG,uBAAuB,GAAGf,MAAM,CAAsB,CAAC;IAC7D;IACA,MAAMgB,eAAe,GAAG,CAACd,KAAK,CAACa,uBAAuB,CAACE,OAAO,EAAEP,gBAAgB,CAAC;IAEjF,IAAIM,eAAe,EAAE;MACjBD,uBAAuB,CAACE,OAAO,GAAGP,gBAAgB;MAClDF,mBAAmB,CAACE,gBAAgB,CAAC;IACzC;IAEA,MAAMQ,qBAAqB,GAAGnB,OAAO,CAAC,MAAM;MACxC,MAAMoB,MAAM,GAAGd,WAAW,CAACE,MAAM,EAAEG,g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BAAqB,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
+ {"version":3,"names":["useMemo","useRef","useState","equal","keyInObject","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","keys","startsWith","secret","undefined","defineProperty"],"sourceRoot":"../../../../src","sources":["web/variants/useVariants.ts"],"mappings":";;AAAA,SAASA,OAAO,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAEjD,SAASC,KAAK,EAAEC,WAAW,EAAEC,YAAY,QAAQ,UAAU;AAC3D,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,GAAGV,QAAQ,CAAC,MAAM,IAAIW,GAAG,CAA8B,CAAC,CAAC;IACzF,MAA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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
+ {"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,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/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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2CvE,CAAA"}
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ export declare const createUnistylesComponent: <TProps extends object>(Component: React.ComponentType<TProps>) => (props: TProps) => React.JSX.Element;
3
+ //# sourceMappingURL=createUnistylesComponent.d.ts.map
@@ -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: () => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>[];
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":"AAKA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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 export { listenToDependencies } from './listenToDependencies';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -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
- export declare class UnistylesListenerBuilder {
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,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
+ {"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;AAED,eAAO,MAAM,uBAAuB;;;;;;;;CAQnC,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", "_css", "_before", "_after"];
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
- export type Pseudo = typeof pseudos[number];
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":"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
+ {"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 | number) => {
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;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
+ {"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,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AAiB,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;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,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
+ {"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,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"}
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,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,eAAe,MAKnE,CAAA;AAED,eAAO,MAAM,cAAc,WAAY,GAAG,sBAUzC,CAAA;AAED,eAAO,MAAM,SAAS,WAAY,eAAe,OAUhD,CAAA;AAED,eAAO,MAAM,eAAe,GAAI,IAAI,EAAE,UAAU,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":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAKpE,eAAO,MAAM,iBAAiB,WAAY,qBAAqB,CAAC,UAAU,CAAC,uBAAuB,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,IAAI,SAuExI,CAAA"}
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,SA2DxI,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 final: public jni::HybridClass<JHybridNativePlatformSpec, JHybridObject>,
19
- public HybridNativePlatformSpec {
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
- private:
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),