react-native-unistyles 3.0.0-nightly-20250513 → 3.0.0-nightly-20250526

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (144) hide show
  1. package/README.md +10 -7
  2. package/android/src/main/cxx/NativeUnistylesModule.cpp +3 -7
  3. package/android/src/main/cxx/NativeUnistylesModule.h +0 -4
  4. package/android/src/main/java/com/unistyles/UnistylesModule.kt +1 -7
  5. package/cxx/core/UnistylesCommitShadowNode.h +0 -21
  6. package/cxx/core/UnistylesRegistry.cpp +45 -43
  7. package/cxx/hybridObjects/HybridStyleSheet.cpp +0 -13
  8. package/cxx/hybridObjects/HybridStyleSheet.h +2 -7
  9. package/cxx/parser/Parser.cpp +150 -107
  10. package/cxx/shadowTree/ShadowTreeManager.cpp +36 -33
  11. package/cxx/shadowTree/ShadowTreeManager.h +0 -1
  12. package/ios/UnistylesModuleOnLoad.h +1 -5
  13. package/ios/UnistylesModuleOnLoad.mm +5 -13
  14. package/lib/commonjs/components/ScopedTheme.js +1 -2
  15. package/lib/commonjs/components/ScopedTheme.js.map +1 -1
  16. package/lib/commonjs/components/native/Image.js +1 -2
  17. package/lib/commonjs/components/native/Image.js.map +1 -1
  18. package/lib/commonjs/components/native/ImageBackground.js +1 -2
  19. package/lib/commonjs/components/native/ImageBackground.js.map +1 -1
  20. package/lib/commonjs/components/native/Pressable.js +1 -2
  21. package/lib/commonjs/components/native/Pressable.js.map +1 -1
  22. package/lib/commonjs/components/native/Pressable.native.js +1 -2
  23. package/lib/commonjs/components/native/Pressable.native.js.map +1 -1
  24. package/lib/commonjs/core/createUnistylesElement.native.js +2 -28
  25. package/lib/commonjs/core/createUnistylesElement.native.js.map +1 -1
  26. package/lib/commonjs/core/createUnistylesImageBackground.js +6 -21
  27. package/lib/commonjs/core/createUnistylesImageBackground.js.map +1 -1
  28. package/lib/commonjs/core/getClassname.js +1 -2
  29. package/lib/commonjs/core/getClassname.js.map +1 -1
  30. package/lib/commonjs/core/useProxifiedUnistyles/listener.js +1 -2
  31. package/lib/commonjs/core/useProxifiedUnistyles/listener.js.map +1 -1
  32. package/lib/commonjs/core/withUnistyles/withUnistyles.js +1 -2
  33. package/lib/commonjs/core/withUnistyles/withUnistyles.js.map +1 -1
  34. package/lib/commonjs/core/withUnistyles/withUnistyles.native.js +1 -2
  35. package/lib/commonjs/core/withUnistyles/withUnistyles.native.js.map +1 -1
  36. package/lib/commonjs/index.js +6 -0
  37. package/lib/commonjs/index.js.map +1 -1
  38. package/lib/commonjs/reanimated/useAnimatedTheme.js.map +1 -1
  39. package/lib/commonjs/reanimated/useAnimatedTheme.native.js.map +1 -1
  40. package/lib/commonjs/server/getServerUnistyles.js +1 -2
  41. package/lib/commonjs/server/getServerUnistyles.js.map +1 -1
  42. package/lib/commonjs/server/hydrateServerUnistyles.js +1 -2
  43. package/lib/commonjs/server/hydrateServerUnistyles.js.map +1 -1
  44. package/lib/commonjs/server/resetServerUnistyles.js +1 -2
  45. package/lib/commonjs/server/resetServerUnistyles.js.map +1 -1
  46. package/lib/commonjs/web/create.js +1 -2
  47. package/lib/commonjs/web/create.js.map +1 -1
  48. package/lib/commonjs/web/css/core.js +6 -1
  49. package/lib/commonjs/web/css/core.js.map +1 -1
  50. package/lib/commonjs/web/index.js +1 -2
  51. package/lib/commonjs/web/index.js.map +1 -1
  52. package/lib/commonjs/web/shadowRegistry.js +1 -1
  53. package/lib/commonjs/web/shadowRegistry.js.map +1 -1
  54. package/lib/commonjs/web/utils/createUnistylesRef.js +1 -2
  55. package/lib/commonjs/web/utils/createUnistylesRef.js.map +1 -1
  56. package/lib/commonjs/web/utils/unistyle.js +1 -2
  57. package/lib/commonjs/web/utils/unistyle.js.map +1 -1
  58. package/lib/module/core/createUnistylesElement.native.js +1 -26
  59. package/lib/module/core/createUnistylesElement.native.js.map +1 -1
  60. package/lib/module/core/createUnistylesImageBackground.js +5 -19
  61. package/lib/module/core/createUnistylesImageBackground.js.map +1 -1
  62. package/lib/module/index.js +5 -0
  63. package/lib/module/index.js.map +1 -1
  64. package/lib/module/reanimated/useAnimatedTheme.js.map +1 -1
  65. package/lib/module/reanimated/useAnimatedTheme.native.js.map +1 -1
  66. package/lib/module/web/css/core.js +6 -1
  67. package/lib/module/web/css/core.js.map +1 -1
  68. package/lib/module/web/shadowRegistry.js +1 -1
  69. package/lib/module/web/shadowRegistry.js.map +1 -1
  70. package/lib/typescript/plugin/src/consts.d.ts +17 -0
  71. package/lib/typescript/plugin/src/consts.d.ts.map +1 -0
  72. package/lib/typescript/repack-plugin/src/index.d.ts +18 -0
  73. package/lib/typescript/repack-plugin/src/index.d.ts.map +1 -0
  74. package/lib/typescript/repack-plugin/src/loader.d.ts +9 -0
  75. package/lib/typescript/repack-plugin/src/loader.d.ts.map +1 -0
  76. package/lib/typescript/src/components/native/Animated.d.ts.map +1 -1
  77. package/lib/typescript/src/core/createUnistylesElement.d.ts.map +1 -1
  78. package/lib/typescript/src/core/createUnistylesElement.native.d.ts.map +1 -1
  79. package/lib/typescript/src/core/createUnistylesImageBackground.d.ts.map +1 -1
  80. package/lib/typescript/src/core/getClassname.d.ts.map +1 -1
  81. package/lib/typescript/src/core/passForwardRef.d.ts.map +1 -1
  82. package/lib/typescript/src/core/useProxifiedUnistyles/listener.d.ts.map +1 -1
  83. package/lib/typescript/src/core/useProxifiedUnistyles/listener.native.d.ts.map +1 -1
  84. package/lib/typescript/src/core/useProxifiedUnistyles/useProxifiedUnistyles.d.ts.map +1 -1
  85. package/lib/typescript/src/core/warn.d.ts.map +1 -1
  86. package/lib/typescript/src/core/withUnistyles/withUnistyles.d.ts.map +1 -1
  87. package/lib/typescript/src/core/withUnistyles/withUnistyles.native.d.ts.map +1 -1
  88. package/lib/typescript/src/hooks/useMedia.d.ts.map +1 -1
  89. package/lib/typescript/src/hooks/useMedia.native.d.ts.map +1 -1
  90. package/lib/typescript/src/index.d.ts.map +1 -1
  91. package/lib/typescript/src/reanimated/useAnimatedTheme.d.ts +3 -1
  92. package/lib/typescript/src/reanimated/useAnimatedTheme.d.ts.map +1 -1
  93. package/lib/typescript/src/reanimated/useAnimatedTheme.native.d.ts +3 -1
  94. package/lib/typescript/src/reanimated/useAnimatedTheme.native.d.ts.map +1 -1
  95. package/lib/typescript/src/server/getServerUnistyles.d.ts.map +1 -1
  96. package/lib/typescript/src/server/serialize.d.ts.map +1 -1
  97. package/lib/typescript/src/server/useServerUnistyles.d.ts.map +1 -1
  98. package/lib/typescript/src/specs/StatusBar/index.d.ts.map +1 -1
  99. package/lib/typescript/src/types/stylesheet.d.ts.map +1 -1
  100. package/lib/typescript/src/utils.d.ts.map +1 -1
  101. package/lib/typescript/src/web/convert/index.d.ts.map +1 -1
  102. package/lib/typescript/src/web/convert/object/boxShadow.d.ts.map +1 -1
  103. package/lib/typescript/src/web/convert/object/filter.d.ts.map +1 -1
  104. package/lib/typescript/src/web/convert/object/objectStyle.d.ts.map +1 -1
  105. package/lib/typescript/src/web/convert/object/transform.d.ts.map +1 -1
  106. package/lib/typescript/src/web/convert/pseudo.d.ts.map +1 -1
  107. package/lib/typescript/src/web/convert/shadow/boxShadow.d.ts.map +1 -1
  108. package/lib/typescript/src/web/convert/shadow/getShadowBreakpoints.d.ts.map +1 -1
  109. package/lib/typescript/src/web/convert/shadow/textShadow.d.ts.map +1 -1
  110. package/lib/typescript/src/web/convert/style.d.ts.map +1 -1
  111. package/lib/typescript/src/web/convert/utils.d.ts.map +1 -1
  112. package/lib/typescript/src/web/create.d.ts.map +1 -1
  113. package/lib/typescript/src/web/css/core.d.ts.map +1 -1
  114. package/lib/typescript/src/web/css/state.d.ts.map +1 -1
  115. package/lib/typescript/src/web/css/utils.d.ts.map +1 -1
  116. package/lib/typescript/src/web/listener.d.ts.map +1 -1
  117. package/lib/typescript/src/web/registry.d.ts.map +1 -1
  118. package/lib/typescript/src/web/runtime.d.ts.map +1 -1
  119. package/lib/typescript/src/web/shadowRegistry.d.ts.map +1 -1
  120. package/lib/typescript/src/web/state.d.ts.map +1 -1
  121. package/lib/typescript/src/web/utils/common.d.ts.map +1 -1
  122. package/lib/typescript/src/web/utils/createUnistylesRef.d.ts.map +1 -1
  123. package/lib/typescript/src/web/utils/unistyle.d.ts.map +1 -1
  124. package/lib/typescript/src/web/variants.d.ts.map +1 -1
  125. package/lib/typescript/src/web-only/getWebProps.d.ts.map +1 -1
  126. package/package.json +32 -21
  127. package/plugin/index.d.ts +5 -4
  128. package/plugin/index.js +9 -1
  129. package/reanimated/package.json +6 -0
  130. package/repack-plugin/index.d.ts +19 -0
  131. package/repack-plugin/index.js +152 -0
  132. package/src/core/createUnistylesElement.native.tsx +1 -29
  133. package/src/core/createUnistylesImageBackground.tsx +7 -22
  134. package/src/index.ts +8 -0
  135. package/src/reanimated/useAnimatedTheme.native.ts +3 -3
  136. package/src/reanimated/useAnimatedTheme.ts +3 -3
  137. package/src/web/css/core.ts +9 -1
  138. package/src/web/shadowRegistry.ts +1 -1
  139. package/web/package.json +6 -0
  140. package/cxx/core/UnistylesCommitHook.cpp +0 -59
  141. package/cxx/core/UnistylesCommitHook.h +0 -27
  142. package/cxx/core/UnistylesMountHook.cpp +0 -26
  143. package/cxx/core/UnistylesMountHook.h +0 -24
  144. package/lib/module/package.json +0 -1
@@ -1,43 +1,15 @@
1
- import React, { useLayoutEffect, useRef } from 'react'
1
+ import React from 'react'
2
2
  import { UnistylesShadowRegistry } from '../specs'
3
3
  import { copyComponentProperties } from '../utils'
4
4
  import { passForwardedRef } from './passForwardRef'
5
5
  import { maybeWarnAboutMultipleUnistyles } from './warn'
6
6
 
7
- const getNativeRef = (Component: any, ref: any) => {
8
- switch (Component.name) {
9
- case 'KeyboardAvoidingView':
10
- return ref.viewRef?.current
11
- case 'FlatList':
12
- return ref.getNativeScrollRef?.()
13
- case 'VirtualizedList':
14
- return ref.getScrollRef?.()
15
- default:
16
- return ref
17
- }
18
- }
19
-
20
7
  export const createUnistylesElement = (Component: any) => {
21
8
  const UnistylesComponent = React.forwardRef((props, forwardedRef) => {
22
- const storedRef = useRef<unknown>(null)
23
-
24
- useLayoutEffect(() => {
25
- return () => {
26
- if (storedRef.current) {
27
- // @ts-ignore
28
- UnistylesShadowRegistry.remove(storedRef.current)
29
- }
30
- }
31
- }, [])
32
-
33
9
  return (
34
10
  <Component
35
11
  {...props}
36
12
  ref={(ref: unknown) => {
37
- if (ref) {
38
- storedRef.current = getNativeRef(Component, ref)
39
- }
40
-
41
13
  // @ts-ignore we don't know the type of the component
42
14
  maybeWarnAboutMultipleUnistyles(props.style, Component.displayName)
43
15
 
@@ -1,5 +1,5 @@
1
- import React, { useLayoutEffect, useRef } from 'react'
2
- import type { Image, ImageBackground, ImageBackgroundProps } from 'react-native'
1
+ import React from 'react'
2
+ import type { ImageBackground, ImageBackgroundProps } from 'react-native'
3
3
  import { UnistylesShadowRegistry } from '../specs'
4
4
  import { copyComponentProperties } from '../utils'
5
5
  import { passForwardedRef } from './passForwardRef'
@@ -7,17 +7,6 @@ import { maybeWarnAboutMultipleUnistyles } from './warn'
7
7
 
8
8
  export const createUnistylesImageBackground = (Component: typeof ImageBackground) => {
9
9
  const UnistylesImageBackground = React.forwardRef<ImageBackground, ImageBackgroundProps>((props, forwardedRef) => {
10
- const storedImageRef = useRef<Image | null>(null)
11
-
12
- useLayoutEffect(() => {
13
- return () => {
14
- if (storedImageRef.current) {
15
- // @ts-ignore
16
- UnistylesShadowRegistry.remove(storedImageRef.current)
17
- }
18
- }
19
- }, [])
20
-
21
10
  // @ts-expect-error we don't know the type of the component
22
11
  maybeWarnAboutMultipleUnistyles(props.style, 'ImageBackground')
23
12
  // @ts-ignore we don't know the type of the component
@@ -37,21 +26,17 @@ export const createUnistylesImageBackground = (Component: typeof ImageBackground
37
26
  () => {
38
27
  // @ts-expect-error - this is hidden from TS
39
28
  UnistylesShadowRegistry.remove(ref)
40
-
41
- if (storedImageRef.current) {
42
- // @ts-expect-error - this is hidden from TS
43
- UnistylesShadowRegistry.remove(storedImageRef.current)
44
- }
45
29
  }
46
30
  )
47
31
  }}
48
32
  imageRef={ref => {
49
- if (ref) {
50
- storedImageRef.current = ref
51
- }
52
-
53
33
  // @ts-expect-error web types are not compatible with RN styles
54
34
  UnistylesShadowRegistry.add(ref, props.imageStyle)
35
+
36
+ return () => {
37
+ // @ts-ignore this is hidden from TS
38
+ UnistylesShadowRegistry.remove(ref)
39
+ }
55
40
  }}
56
41
  />
57
42
  )
package/src/index.ts CHANGED
@@ -1,3 +1,11 @@
1
+ import React from 'react'
2
+
3
+ const [majorReactVersions] = React.version.split('.').map(Number.parseInt)
4
+
5
+ if (majorReactVersions === undefined || majorReactVersions < 19) {
6
+ throw new Error('Unistyles 🦄: To enable full Fabric power you need to use React 19.0.0 or higher')
7
+ }
8
+
1
9
  export { StyleSheet, UnistylesRuntime, StatusBar, NavigationBar } from './specs'
2
10
  export { mq } from './mq'
3
11
  export type { UnistylesThemes, UnistylesBreakpoints } from './global'
@@ -1,10 +1,10 @@
1
1
  import { useEffect } from 'react'
2
- import { useSharedValue } from 'react-native-reanimated'
2
+ import { type SharedValue, useSharedValue } from 'react-native-reanimated'
3
3
  import { StyleSheet, UnistyleDependency, UnistylesRuntime } from '../specs'
4
4
  import type { UnistylesTheme } from '../types'
5
5
 
6
6
  export const useAnimatedTheme = () => {
7
- const theme = useSharedValue<UnistylesTheme>(UnistylesRuntime.getTheme())
7
+ const theme = useSharedValue(UnistylesRuntime.getTheme())
8
8
 
9
9
  useEffect(() => {
10
10
  // @ts-ignore this is hidden from TS
@@ -17,5 +17,5 @@ export const useAnimatedTheme = () => {
17
17
  return () => dispose()
18
18
  }, [])
19
19
 
20
- return theme
20
+ return theme as SharedValue<UnistylesTheme>
21
21
  }
@@ -1,11 +1,11 @@
1
1
  import { useEffect } from 'react'
2
- import { useSharedValue } from 'react-native-reanimated'
2
+ import { type SharedValue, useSharedValue } from 'react-native-reanimated'
3
3
  import { UnistyleDependency, UnistylesRuntime } from '../specs'
4
4
  import type { UnistylesTheme } from '../types'
5
5
  import { services } from '../web/services'
6
6
 
7
7
  export const useAnimatedTheme = () => {
8
- const theme = useSharedValue<UnistylesTheme>(UnistylesRuntime.getTheme())
8
+ const theme = useSharedValue(UnistylesRuntime.getTheme())
9
9
 
10
10
  useEffect(() => {
11
11
  const dispose = services.listener.addListeners([UnistyleDependency.Theme], () => theme.set(UnistylesRuntime.getTheme()))
@@ -15,5 +15,5 @@ export const useAnimatedTheme = () => {
15
15
  }
16
16
  }, [])
17
17
 
18
- return theme
18
+ return theme as SharedValue<UnistylesTheme>
19
19
  }
@@ -34,8 +34,16 @@ export const convertToCSS = (hash: string, value: Record<string, any>, state: CS
34
34
  }
35
35
 
36
36
  if (typeof styleValue === 'object') {
37
- const allBreakpoints = Object.keys(value)
38
37
  Object.entries(styleValue).forEach(([breakpointStyleKey, breakpointStyleValue]) => {
38
+ const allBreakpoints = Object.entries(value)
39
+ .filter(([_, value]) => {
40
+ if (typeof value !== 'object' || value === null) {
41
+ return false
42
+ }
43
+
44
+ return breakpointStyleKey in value
45
+ })
46
+ .map(([key]) => key)
39
47
  const mediaQuery = getMediaQuery(styleKey, allBreakpoints)
40
48
 
41
49
  state.set({
@@ -20,7 +20,7 @@ export class UnistylesShadowRegistry {
20
20
  constructor(private services: UnistylesServices) {}
21
21
 
22
22
  add = (ref: any, hash?: string) => {
23
- if (!(ref instanceof HTMLElement) || !hash) {
23
+ if (isServer() || !(ref instanceof HTMLElement) || !hash) {
24
24
  return
25
25
  }
26
26
 
@@ -0,0 +1,6 @@
1
+ {
2
+ "main": "../lib/commonjs/web-only/index",
3
+ "module": "../lib/module/web-only/index",
4
+ "react-native": "../src/web-only/index",
5
+ "types": "../lib/typescript/src/web-only/index"
6
+ }
@@ -1,59 +0,0 @@
1
- #include "UnistylesCommitHook.h"
2
-
3
- using namespace margelo::nitro::unistyles;
4
- using namespace facebook::react;
5
-
6
- core::UnistylesCommitHook::~UnistylesCommitHook() noexcept {
7
- _uiManager->unregisterCommitHook(*this);
8
- }
9
-
10
- void core::UnistylesCommitHook::commitHookWasRegistered(const UIManager &uiManager) noexcept {}
11
- void core::UnistylesCommitHook::commitHookWasUnregistered(const UIManager &uiManager) noexcept {}
12
-
13
- RootShadowNode::Unshared core::UnistylesCommitHook::shadowTreeWillCommit(
14
- const ShadowTree &shadowTree,
15
- const RootShadowNode::Shared &oldRootShadowNode,
16
- const RootShadowNode::Unshared &newRootShadowNode
17
- ) noexcept {
18
- RootShadowNode::Unshared rootNode = newRootShadowNode;
19
- auto unistylesRootNode = std::reinterpret_pointer_cast<core::UnistylesCommitShadowNode>(newRootShadowNode);
20
-
21
- // this is Unistyles commit, we don't need to override it
22
- if (unistylesRootNode->hasUnistylesCommitTrait()) {
23
- unistylesRootNode->removeUnistylesCommitTrait();
24
- unistylesRootNode->addUnistylesMountTrait();
25
-
26
- return newRootShadowNode;
27
- }
28
-
29
- auto& registry = core::UnistylesRegistry::get();
30
-
31
- if (registry.trafficController.shouldStop()) {
32
- registry.trafficController.resumeUnistylesTraffic();
33
-
34
- return newRootShadowNode;
35
- }
36
-
37
- // this is React Native / Reanimated commit
38
- // merge Unistyles updates before it completes
39
-
40
- return registry.trafficController.withLock([&](){
41
- auto& shadowLeafUpdates = registry.trafficController.getUpdates();
42
-
43
- // oops, no updates from Unistyles yet, skip it!
44
- if (shadowLeafUpdates.size() == 0) {
45
- return newRootShadowNode;
46
- }
47
-
48
- auto affectedNodes = shadow::ShadowTreeManager::findAffectedNodes(*rootNode, shadowLeafUpdates);
49
-
50
- registry.trafficController.stopUnistylesTraffic();
51
-
52
- // we have few updates, so merge it
53
- return std::static_pointer_cast<RootShadowNode>(shadow::ShadowTreeManager::cloneShadowTree(
54
- *rootNode,
55
- shadowLeafUpdates,
56
- affectedNodes
57
- ));
58
- });
59
- }
@@ -1,27 +0,0 @@
1
- #pragma once
2
-
3
- #include <react/renderer/uimanager/UIManager.h>
4
- #include <react/renderer/uimanager/UIManagerCommitHook.h>
5
- #include "ShadowTreeManager.h"
6
- #include "ShadowTrafficController.h"
7
-
8
- namespace margelo::nitro::unistyles::core {
9
-
10
- using namespace facebook::react;
11
-
12
- struct UnistylesCommitHook : public UIManagerCommitHook {
13
- UnistylesCommitHook(std::shared_ptr<UIManager> uiManager) : _uiManager{uiManager} {
14
- _uiManager->registerCommitHook(*this);
15
- }
16
-
17
- ~UnistylesCommitHook() noexcept override;
18
-
19
- void commitHookWasRegistered(const UIManager &uiManager) noexcept override;
20
- void commitHookWasUnregistered(const UIManager &uiManager) noexcept override;
21
- RootShadowNode::Unshared shadowTreeWillCommit(const ShadowTree &shadowTree, const RootShadowNode::Shared &oldRootShadowNode, const RootShadowNode::Unshared &newRootShadowNode) noexcept override;
22
-
23
- private:
24
- std::shared_ptr<UIManager> _uiManager;
25
- };
26
-
27
- }
@@ -1,26 +0,0 @@
1
- #include "UnistylesMountHook.h"
2
-
3
- using namespace margelo::nitro::unistyles;
4
- using namespace facebook::react;
5
-
6
- core::UnistylesMountHook::~UnistylesMountHook() noexcept {
7
- _uiManager->unregisterMountHook(*this);
8
- }
9
-
10
- void core::UnistylesMountHook::shadowTreeDidMount(RootShadowNode::Shared const &rootShadowNode, double mountTime) noexcept {
11
- auto rootNode = std::const_pointer_cast<RootShadowNode>(rootShadowNode);
12
- auto unistylesRootNode = std::reinterpret_pointer_cast<core::UnistylesCommitShadowNode>(rootNode);
13
-
14
- // if this is Unistyles commit, do nothing
15
- if (unistylesRootNode->hasUnistylesMountTrait()) {
16
- unistylesRootNode->removeUnistylesMountTrait();
17
-
18
- return;
19
- }
20
-
21
- // this is React Native or Reanimated commit
22
- // one more time merge Unistyles changes
23
- auto& registry = core::UnistylesRegistry::get();
24
-
25
- registry.trafficController.stopUnistylesTraffic();
26
- }
@@ -1,24 +0,0 @@
1
- #pragma once
2
-
3
- #include <react/renderer/uimanager/UIManager.h>
4
- #include <react/renderer/uimanager/UIManagerMountHook.h>
5
- #include "ShadowTreeManager.h"
6
-
7
- namespace margelo::nitro::unistyles::core {
8
-
9
- using namespace facebook::react;
10
-
11
- struct UnistylesMountHook : public UIManagerMountHook {
12
- UnistylesMountHook(std::shared_ptr<UIManager> uiManager): _uiManager{uiManager} {
13
- _uiManager->registerMountHook(*this);
14
- }
15
-
16
- ~UnistylesMountHook() noexcept override;
17
-
18
- void shadowTreeDidMount(RootShadowNode::Shared const &rootShadowNode, double mountTime) noexcept override;
19
-
20
- private:
21
- std::shared_ptr<UIManager> _uiManager;
22
- };
23
-
24
- }
@@ -1 +0,0 @@
1
- {"type":"module"}