@robertlinde/react-tour-kit 0.8.9 → 1.0.1

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 (368) hide show
  1. package/CHANGELOG.md +48 -0
  2. package/MIGRATION.md +205 -0
  3. package/README.md +401 -850
  4. package/dist/react-native-platform/hooks/use-tour-scroll-view.hook.d.ts +14 -0
  5. package/dist/react-native-platform/hooks/use-tour-scroll-view.hook.d.ts.map +1 -0
  6. package/dist/react-native-platform/hooks/use-tour-scroll-view.hook.js +21 -0
  7. package/dist/react-native-platform/hooks/use-tour-scroll-view.hook.js.map +1 -0
  8. package/dist/react-native-platform/hooks/use-tour-target.hook.d.ts +15 -0
  9. package/dist/react-native-platform/hooks/use-tour-target.hook.d.ts.map +1 -0
  10. package/dist/react-native-platform/hooks/use-tour-target.hook.js +28 -0
  11. package/dist/react-native-platform/hooks/use-tour-target.hook.js.map +1 -0
  12. package/dist/react-native-platform/host-store.d.ts +24 -0
  13. package/dist/react-native-platform/host-store.d.ts.map +1 -0
  14. package/dist/react-native-platform/host-store.js +63 -0
  15. package/dist/react-native-platform/host-store.js.map +1 -0
  16. package/dist/react-native-platform/insets.util.d.ts +11 -0
  17. package/dist/react-native-platform/insets.util.d.ts.map +1 -0
  18. package/dist/react-native-platform/insets.util.js +31 -0
  19. package/dist/react-native-platform/insets.util.js.map +1 -0
  20. package/dist/react-native-platform/layer/native-renderer.d.ts +7 -0
  21. package/dist/react-native-platform/layer/native-renderer.d.ts.map +1 -0
  22. package/dist/react-native-platform/layer/native-renderer.js +496 -0
  23. package/dist/react-native-platform/layer/native-renderer.js.map +1 -0
  24. package/dist/react-native-platform/layer/tour-host.d.ts +13 -0
  25. package/dist/react-native-platform/layer/tour-host.d.ts.map +1 -0
  26. package/dist/react-native-platform/layer/tour-host.js +70 -0
  27. package/dist/react-native-platform/layer/tour-host.js.map +1 -0
  28. package/dist/react-native-platform/measure.util.d.ts +20 -0
  29. package/dist/react-native-platform/measure.util.d.ts.map +1 -0
  30. package/dist/react-native-platform/measure.util.js +100 -0
  31. package/dist/react-native-platform/measure.util.js.map +1 -0
  32. package/dist/react-native-platform/native-context.d.ts +12 -0
  33. package/dist/react-native-platform/native-context.d.ts.map +1 -0
  34. package/dist/react-native-platform/native-context.js +4 -0
  35. package/dist/react-native-platform/native-context.js.map +1 -0
  36. package/dist/react-native-platform/native-environment.d.ts +14 -0
  37. package/dist/react-native-platform/native-environment.d.ts.map +1 -0
  38. package/dist/react-native-platform/native-environment.js +20 -0
  39. package/dist/react-native-platform/native-environment.js.map +1 -0
  40. package/dist/react-native-platform/native-platform.d.ts +19 -0
  41. package/dist/react-native-platform/native-platform.d.ts.map +1 -0
  42. package/dist/react-native-platform/native-platform.js +265 -0
  43. package/dist/react-native-platform/native-platform.js.map +1 -0
  44. package/dist/react-native-platform/reduced-motion.d.ts +4 -0
  45. package/dist/react-native-platform/reduced-motion.d.ts.map +1 -0
  46. package/dist/react-native-platform/reduced-motion.js +44 -0
  47. package/dist/react-native-platform/reduced-motion.js.map +1 -0
  48. package/dist/react-native-platform/registry.d.ts +18 -0
  49. package/dist/react-native-platform/registry.d.ts.map +1 -0
  50. package/dist/react-native-platform/registry.js +51 -0
  51. package/dist/react-native-platform/registry.js.map +1 -0
  52. package/dist/react-native-platform/tour-provider.d.ts +16 -3
  53. package/dist/react-native-platform/tour-provider.d.ts.map +1 -0
  54. package/dist/react-native-platform/tour-provider.js +92 -211
  55. package/dist/react-native-platform/tour-provider.js.map +1 -1
  56. package/dist/react-native.d.ts +14 -10
  57. package/dist/react-native.d.ts.map +1 -0
  58. package/dist/react-native.js +7 -7
  59. package/dist/react-native.js.map +1 -1
  60. package/dist/react-platform/dom/elements.util.d.ts +35 -0
  61. package/dist/react-platform/dom/elements.util.d.ts.map +1 -0
  62. package/dist/react-platform/dom/elements.util.js +155 -0
  63. package/dist/react-platform/dom/elements.util.js.map +1 -0
  64. package/dist/react-platform/dom/occluders.util.d.ts +13 -0
  65. package/dist/react-platform/dom/occluders.util.d.ts.map +1 -0
  66. package/dist/react-platform/dom/occluders.util.js +75 -0
  67. package/dist/react-platform/dom/occluders.util.js.map +1 -0
  68. package/dist/react-platform/dom/scroll-lock.util.d.ts +13 -0
  69. package/dist/react-platform/dom/scroll-lock.util.d.ts.map +1 -0
  70. package/dist/react-platform/dom/scroll-lock.util.js +219 -0
  71. package/dist/react-platform/dom/scroll-lock.util.js.map +1 -0
  72. package/dist/react-platform/dom/scroll.util.d.ts +44 -0
  73. package/dist/react-platform/dom/scroll.util.d.ts.map +1 -0
  74. package/dist/react-platform/dom/scroll.util.js +250 -0
  75. package/dist/react-platform/dom/scroll.util.js.map +1 -0
  76. package/dist/react-platform/dom/viewport.util.d.ts +16 -0
  77. package/dist/react-platform/dom/viewport.util.d.ts.map +1 -0
  78. package/dist/react-platform/dom/viewport.util.js +65 -0
  79. package/dist/react-platform/dom/viewport.util.js.map +1 -0
  80. package/dist/react-platform/dom/web-platform.d.ts +15 -0
  81. package/dist/react-platform/dom/web-platform.d.ts.map +1 -0
  82. package/dist/react-platform/dom/web-platform.js +169 -0
  83. package/dist/react-platform/dom/web-platform.js.map +1 -0
  84. package/dist/react-platform/layer/styles.d.ts +12 -0
  85. package/dist/react-platform/layer/styles.d.ts.map +1 -0
  86. package/dist/react-platform/layer/styles.js +285 -0
  87. package/dist/react-platform/layer/styles.js.map +1 -0
  88. package/dist/react-platform/layer/web-renderer.d.ts +4 -0
  89. package/dist/react-platform/layer/web-renderer.d.ts.map +1 -0
  90. package/dist/react-platform/layer/web-renderer.js +390 -0
  91. package/dist/react-platform/layer/web-renderer.js.map +1 -0
  92. package/dist/react-platform/tour-provider.d.ts +9 -3
  93. package/dist/react-platform/tour-provider.d.ts.map +1 -0
  94. package/dist/react-platform/tour-provider.js +28 -218
  95. package/dist/react-platform/tour-provider.js.map +1 -1
  96. package/dist/react.d.ts +10 -10
  97. package/dist/react.d.ts.map +1 -0
  98. package/dist/react.js +5 -7
  99. package/dist/react.js.map +1 -1
  100. package/dist/shared/engine/abort.util.d.ts +17 -0
  101. package/dist/shared/engine/abort.util.d.ts.map +1 -0
  102. package/dist/shared/engine/abort.util.js +72 -0
  103. package/dist/shared/engine/abort.util.js.map +1 -0
  104. package/dist/shared/engine/report.util.d.ts +12 -0
  105. package/dist/shared/engine/report.util.d.ts.map +1 -0
  106. package/dist/shared/engine/report.util.js +51 -0
  107. package/dist/shared/engine/report.util.js.map +1 -0
  108. package/dist/shared/engine/tour-adapter.type.d.ts +67 -0
  109. package/dist/shared/engine/tour-adapter.type.d.ts.map +1 -0
  110. package/dist/shared/engine/tour-adapter.type.js +2 -0
  111. package/dist/shared/engine/tour-adapter.type.js.map +1 -0
  112. package/dist/shared/engine/tour-engine.d.ts +101 -0
  113. package/dist/shared/engine/tour-engine.d.ts.map +1 -0
  114. package/dist/shared/engine/tour-engine.js +835 -0
  115. package/dist/shared/engine/tour-engine.js.map +1 -0
  116. package/dist/shared/geometry/box.util.d.ts +39 -0
  117. package/dist/shared/geometry/box.util.d.ts.map +1 -0
  118. package/dist/shared/geometry/box.util.js +146 -0
  119. package/dist/shared/geometry/box.util.js.map +1 -0
  120. package/dist/shared/geometry/compute-tooltip-layout.util.d.ts +60 -0
  121. package/dist/shared/geometry/compute-tooltip-layout.util.d.ts.map +1 -0
  122. package/dist/shared/geometry/compute-tooltip-layout.util.js +148 -0
  123. package/dist/shared/geometry/compute-tooltip-layout.util.js.map +1 -0
  124. package/dist/shared/geometry/geometry.type.d.ts +34 -0
  125. package/dist/shared/geometry/geometry.type.d.ts.map +1 -0
  126. package/dist/shared/geometry/geometry.type.js +2 -0
  127. package/dist/shared/geometry/geometry.type.js.map +1 -0
  128. package/dist/shared/geometry/reveal.util.d.ts +38 -0
  129. package/dist/shared/geometry/reveal.util.d.ts.map +1 -0
  130. package/dist/shared/geometry/reveal.util.js +135 -0
  131. package/dist/shared/geometry/reveal.util.js.map +1 -0
  132. package/dist/shared/geometry/target-visibility.util.d.ts +10 -0
  133. package/dist/shared/geometry/target-visibility.util.d.ts.map +1 -0
  134. package/dist/shared/geometry/target-visibility.util.js +29 -0
  135. package/dist/shared/geometry/target-visibility.util.js.map +1 -0
  136. package/dist/shared/platform/create-tour-adapter.d.ts +9 -0
  137. package/dist/shared/platform/create-tour-adapter.d.ts.map +1 -0
  138. package/dist/shared/platform/create-tour-adapter.js +145 -0
  139. package/dist/shared/platform/create-tour-adapter.js.map +1 -0
  140. package/dist/shared/platform/platform.type.d.ts +77 -0
  141. package/dist/shared/platform/platform.type.d.ts.map +1 -0
  142. package/dist/shared/platform/platform.type.js +2 -0
  143. package/dist/shared/platform/platform.type.js.map +1 -0
  144. package/dist/shared/platform/reveal-in-scroll-containers.d.ts +27 -0
  145. package/dist/shared/platform/reveal-in-scroll-containers.d.ts.map +1 -0
  146. package/dist/shared/platform/reveal-in-scroll-containers.js +49 -0
  147. package/dist/shared/platform/reveal-in-scroll-containers.js.map +1 -0
  148. package/dist/shared/react/tour-context.d.ts +7 -0
  149. package/dist/shared/react/tour-context.d.ts.map +1 -0
  150. package/dist/shared/react/tour-context.js +23 -0
  151. package/dist/shared/react/tour-context.js.map +1 -0
  152. package/dist/shared/react/tour-provider-core.d.ts +41 -0
  153. package/dist/shared/react/tour-provider-core.d.ts.map +1 -0
  154. package/dist/shared/react/tour-provider-core.js +24 -0
  155. package/dist/shared/react/tour-provider-core.js.map +1 -0
  156. package/dist/shared/react/tour-root.d.ts +14 -0
  157. package/dist/shared/react/tour-root.d.ts.map +1 -0
  158. package/dist/shared/react/tour-root.js +22 -0
  159. package/dist/shared/react/tour-root.js.map +1 -0
  160. package/dist/shared/react/use-isomorphic-layout-effect.hook.d.ts +4 -0
  161. package/dist/shared/react/use-isomorphic-layout-effect.hook.d.ts.map +1 -0
  162. package/dist/shared/react/use-isomorphic-layout-effect.hook.js +5 -0
  163. package/dist/shared/react/use-isomorphic-layout-effect.hook.js.map +1 -0
  164. package/dist/shared/react/use-tour-view.hook.d.ts +5 -0
  165. package/dist/shared/react/use-tour-view.hook.d.ts.map +1 -0
  166. package/dist/shared/react/use-tour-view.hook.js +14 -0
  167. package/dist/shared/react/use-tour-view.hook.js.map +1 -0
  168. package/dist/shared/react/use-tour.hook.d.ts +7 -0
  169. package/dist/shared/react/use-tour.hook.d.ts.map +1 -0
  170. package/dist/shared/react/use-tour.hook.js +10 -0
  171. package/dist/shared/react/use-tour.hook.js.map +1 -0
  172. package/dist/shared/renderer/default-tooltip.d.ts +5 -0
  173. package/dist/shared/renderer/default-tooltip.d.ts.map +1 -0
  174. package/dist/shared/renderer/default-tooltip.js +13 -0
  175. package/dist/shared/renderer/default-tooltip.js.map +1 -0
  176. package/dist/shared/renderer/motion.d.ts +29 -0
  177. package/dist/shared/renderer/motion.d.ts.map +1 -0
  178. package/dist/shared/renderer/motion.js +49 -0
  179. package/dist/shared/renderer/motion.js.map +1 -0
  180. package/dist/shared/renderer/renderer-context.d.ts +17 -0
  181. package/dist/shared/renderer/renderer-context.d.ts.map +1 -0
  182. package/dist/shared/renderer/renderer-context.js +16 -0
  183. package/dist/shared/renderer/renderer-context.js.map +1 -0
  184. package/dist/shared/renderer/renderer.type.d.ts +164 -0
  185. package/dist/shared/renderer/renderer.type.d.ts.map +1 -0
  186. package/dist/shared/renderer/renderer.type.js +2 -0
  187. package/dist/shared/renderer/renderer.type.js.map +1 -0
  188. package/dist/shared/renderer/tooltip-model.d.ts +32 -0
  189. package/dist/shared/renderer/tooltip-model.d.ts.map +1 -0
  190. package/dist/shared/renderer/tooltip-model.js +24 -0
  191. package/dist/shared/renderer/tooltip-model.js.map +1 -0
  192. package/dist/shared/renderer/tour-overlay.d.ts +24 -0
  193. package/dist/shared/renderer/tour-overlay.d.ts.map +1 -0
  194. package/dist/shared/renderer/tour-overlay.js +228 -0
  195. package/dist/shared/renderer/tour-overlay.js.map +1 -0
  196. package/dist/shared/types/tour-context.type.d.ts +21 -11
  197. package/dist/shared/types/tour-context.type.d.ts.map +1 -0
  198. package/dist/shared/types/tour-end-info.type.d.ts +19 -2
  199. package/dist/shared/types/tour-end-info.type.d.ts.map +1 -0
  200. package/dist/shared/types/tour-i18n.type.d.ts +8 -0
  201. package/dist/shared/types/tour-i18n.type.d.ts.map +1 -0
  202. package/dist/shared/types/tour-step.type.d.ts +35 -6
  203. package/dist/shared/types/tour-step.type.d.ts.map +1 -0
  204. package/dist/shared/types/tour-theme.type.d.ts +22 -2
  205. package/dist/shared/types/tour-theme.type.d.ts.map +1 -0
  206. package/dist/shared/types/tour-theme.type.js +1 -16
  207. package/dist/shared/types/tour-theme.type.js.map +1 -1
  208. package/dist/shared/types/tour-tooltip-props.type.d.ts +21 -17
  209. package/dist/shared/types/tour-tooltip-props.type.d.ts.map +1 -0
  210. package/dist/shared/utils/frame.util.d.ts +6 -0
  211. package/dist/shared/utils/frame.util.d.ts.map +1 -0
  212. package/dist/shared/utils/frame.util.js +20 -0
  213. package/dist/shared/utils/frame.util.js.map +1 -0
  214. package/dist/shared/utils/get-truncated-dots.util.d.ts +13 -7
  215. package/dist/shared/utils/get-truncated-dots.util.d.ts.map +1 -0
  216. package/dist/shared/utils/get-truncated-dots.util.js +30 -30
  217. package/dist/shared/utils/get-truncated-dots.util.js.map +1 -1
  218. package/dist/shared/utils/i18n.util.d.ts +7 -0
  219. package/dist/shared/utils/i18n.util.d.ts.map +1 -0
  220. package/dist/shared/utils/i18n.util.js +34 -0
  221. package/dist/shared/utils/i18n.util.js.map +1 -0
  222. package/dist/shared/utils/theme.util.d.ts +6 -0
  223. package/dist/shared/utils/theme.util.d.ts.map +1 -0
  224. package/dist/shared/utils/theme.util.js +31 -0
  225. package/dist/shared/utils/theme.util.js.map +1 -0
  226. package/package.json +72 -55
  227. package/src/react-native-platform/hooks/use-tour-scroll-view.hook.ts +24 -0
  228. package/src/react-native-platform/hooks/use-tour-target.hook.ts +30 -0
  229. package/src/react-native-platform/host-store.ts +92 -0
  230. package/src/react-native-platform/insets.util.ts +39 -0
  231. package/src/react-native-platform/layer/native-renderer.tsx +776 -0
  232. package/src/react-native-platform/layer/tour-host.tsx +105 -0
  233. package/src/react-native-platform/measure.util.ts +140 -0
  234. package/src/react-native-platform/native-context.ts +15 -0
  235. package/src/react-native-platform/native-environment.ts +33 -0
  236. package/src/react-native-platform/native-platform.ts +368 -0
  237. package/src/react-native-platform/reduced-motion.ts +47 -0
  238. package/src/react-native-platform/registry.ts +70 -0
  239. package/src/react-native-platform/tour-provider.tsx +148 -0
  240. package/src/react-native.ts +15 -0
  241. package/src/react-platform/dom/elements.util.ts +191 -0
  242. package/src/react-platform/dom/occluders.util.ts +88 -0
  243. package/src/react-platform/dom/scroll-lock.util.ts +261 -0
  244. package/src/react-platform/dom/scroll.util.ts +310 -0
  245. package/src/react-platform/dom/viewport.util.ts +74 -0
  246. package/src/react-platform/dom/web-platform.ts +208 -0
  247. package/src/react-platform/layer/styles.ts +286 -0
  248. package/src/react-platform/layer/web-renderer.tsx +594 -0
  249. package/src/react-platform/tour-provider.tsx +44 -0
  250. package/src/react.ts +13 -0
  251. package/src/shared/engine/abort.util.ts +84 -0
  252. package/src/shared/engine/report.util.ts +58 -0
  253. package/src/shared/engine/tour-adapter.type.ts +73 -0
  254. package/src/shared/engine/tour-engine.ts +1147 -0
  255. package/src/shared/geometry/box.util.ts +185 -0
  256. package/src/shared/geometry/compute-tooltip-layout.util.ts +238 -0
  257. package/src/shared/geometry/geometry.type.ts +38 -0
  258. package/src/shared/geometry/reveal.util.ts +190 -0
  259. package/src/shared/geometry/target-visibility.util.ts +44 -0
  260. package/src/shared/platform/create-tour-adapter.ts +169 -0
  261. package/src/shared/platform/platform.type.ts +81 -0
  262. package/src/shared/platform/reveal-in-scroll-containers.ts +78 -0
  263. package/src/shared/react/tour-context.ts +28 -0
  264. package/src/shared/react/tour-provider-core.ts +67 -0
  265. package/src/shared/react/tour-root.tsx +34 -0
  266. package/src/shared/react/use-isomorphic-layout-effect.hook.ts +7 -0
  267. package/src/shared/react/use-tour-view.hook.ts +17 -0
  268. package/src/shared/react/use-tour.hook.ts +11 -0
  269. package/src/shared/renderer/default-tooltip.tsx +52 -0
  270. package/src/shared/renderer/motion.ts +59 -0
  271. package/src/shared/renderer/renderer-context.ts +33 -0
  272. package/src/shared/renderer/renderer.type.ts +183 -0
  273. package/src/shared/renderer/tooltip-model.ts +44 -0
  274. package/src/shared/renderer/tour-overlay.tsx +453 -0
  275. package/src/shared/types/tour-context.type.ts +23 -0
  276. package/src/shared/types/tour-end-info.type.ts +32 -0
  277. package/src/shared/types/tour-i18n.type.ts +15 -0
  278. package/src/shared/types/tour-step.type.ts +40 -0
  279. package/src/shared/types/tour-theme.type.ts +28 -0
  280. package/src/shared/types/tour-tooltip-props.type.ts +27 -0
  281. package/src/shared/utils/frame.util.ts +21 -0
  282. package/src/shared/utils/get-truncated-dots.util.ts +46 -0
  283. package/src/shared/utils/i18n.util.ts +44 -0
  284. package/src/shared/utils/theme.util.ts +38 -0
  285. package/dist/react-native-platform/components/index.d.ts +0 -2
  286. package/dist/react-native-platform/components/index.js +0 -3
  287. package/dist/react-native-platform/components/index.js.map +0 -1
  288. package/dist/react-native-platform/components/tour-overlay.d.ts +0 -3
  289. package/dist/react-native-platform/components/tour-overlay.js +0 -26
  290. package/dist/react-native-platform/components/tour-overlay.js.map +0 -1
  291. package/dist/react-native-platform/components/tour-tooltip.d.ts +0 -3
  292. package/dist/react-native-platform/components/tour-tooltip.js +0 -167
  293. package/dist/react-native-platform/components/tour-tooltip.js.map +0 -1
  294. package/dist/react-native-platform/hooks/index.d.ts +0 -1
  295. package/dist/react-native-platform/hooks/index.js +0 -2
  296. package/dist/react-native-platform/hooks/index.js.map +0 -1
  297. package/dist/react-native-platform/hooks/use-tour-target.d.ts +0 -2
  298. package/dist/react-native-platform/hooks/use-tour-target.js +0 -13
  299. package/dist/react-native-platform/hooks/use-tour-target.js.map +0 -1
  300. package/dist/react-native-platform/index.d.ts +0 -7
  301. package/dist/react-native-platform/index.js +0 -7
  302. package/dist/react-native-platform/index.js.map +0 -1
  303. package/dist/react-native-platform/platform-adapter.d.ts +0 -2
  304. package/dist/react-native-platform/platform-adapter.js +0 -84
  305. package/dist/react-native-platform/platform-adapter.js.map +0 -1
  306. package/dist/react-native-platform/target-registry.d.ts +0 -10
  307. package/dist/react-native-platform/target-registry.js +0 -17
  308. package/dist/react-native-platform/target-registry.js.map +0 -1
  309. package/dist/react-native-platform/types/tour-provider.props.type.d.ts +0 -12
  310. package/dist/react-native-platform/types/tour-provider.props.type.js +0 -2
  311. package/dist/react-native-platform/types/tour-provider.props.type.js.map +0 -1
  312. package/dist/react-platform/components/index.d.ts +0 -2
  313. package/dist/react-platform/components/index.js +0 -3
  314. package/dist/react-platform/components/index.js.map +0 -1
  315. package/dist/react-platform/components/tour-overlay.d.ts +0 -3
  316. package/dist/react-platform/components/tour-overlay.js +0 -29
  317. package/dist/react-platform/components/tour-overlay.js.map +0 -1
  318. package/dist/react-platform/components/tour-tooltip.d.ts +0 -2
  319. package/dist/react-platform/components/tour-tooltip.js +0 -155
  320. package/dist/react-platform/components/tour-tooltip.js.map +0 -1
  321. package/dist/react-platform/index.d.ts +0 -6
  322. package/dist/react-platform/index.js +0 -6
  323. package/dist/react-platform/index.js.map +0 -1
  324. package/dist/react-platform/platform-adapter.d.ts +0 -2
  325. package/dist/react-platform/platform-adapter.js +0 -101
  326. package/dist/react-platform/platform-adapter.js.map +0 -1
  327. package/dist/react-platform/types/tour-provider.props.type.d.ts +0 -12
  328. package/dist/react-platform/types/tour-provider.props.type.js +0 -2
  329. package/dist/react-platform/types/tour-provider.props.type.js.map +0 -1
  330. package/dist/react-platform/utils/find-visible-element.util.d.ts +0 -1
  331. package/dist/react-platform/utils/find-visible-element.util.js +0 -11
  332. package/dist/react-platform/utils/find-visible-element.util.js.map +0 -1
  333. package/dist/react-platform/utils/index.d.ts +0 -1
  334. package/dist/react-platform/utils/index.js +0 -2
  335. package/dist/react-platform/utils/index.js.map +0 -1
  336. package/dist/shared/context/index.d.ts +0 -1
  337. package/dist/shared/context/index.js +0 -2
  338. package/dist/shared/context/index.js.map +0 -1
  339. package/dist/shared/context/tour-context.d.ts +0 -3
  340. package/dist/shared/context/tour-context.js +0 -14
  341. package/dist/shared/context/tour-context.js.map +0 -1
  342. package/dist/shared/hooks/index.d.ts +0 -1
  343. package/dist/shared/hooks/index.js +0 -2
  344. package/dist/shared/hooks/index.js.map +0 -1
  345. package/dist/shared/hooks/use-tour.hook.d.ts +0 -2
  346. package/dist/shared/hooks/use-tour.hook.js +0 -7
  347. package/dist/shared/hooks/use-tour.hook.js.map +0 -1
  348. package/dist/shared/index.d.ts +0 -7
  349. package/dist/shared/index.js +0 -6
  350. package/dist/shared/index.js.map +0 -1
  351. package/dist/shared/types/index.d.ts +0 -10
  352. package/dist/shared/types/index.js +0 -2
  353. package/dist/shared/types/index.js.map +0 -1
  354. package/dist/shared/types/platform-adapter.type.d.ts +0 -24
  355. package/dist/shared/types/platform-adapter.type.js +0 -2
  356. package/dist/shared/types/platform-adapter.type.js.map +0 -1
  357. package/dist/shared/types/rect.type.d.ts +0 -11
  358. package/dist/shared/types/rect.type.js +0 -2
  359. package/dist/shared/types/rect.type.js.map +0 -1
  360. package/dist/shared/types/tour-overlay-props.type.d.ts +0 -8
  361. package/dist/shared/types/tour-overlay-props.type.js +0 -2
  362. package/dist/shared/types/tour-overlay-props.type.js.map +0 -1
  363. package/dist/shared/utils/calculate-tooltip-position.util.d.ts +0 -14
  364. package/dist/shared/utils/calculate-tooltip-position.util.js +0 -49
  365. package/dist/shared/utils/calculate-tooltip-position.util.js.map +0 -1
  366. package/dist/shared/utils/index.d.ts +0 -3
  367. package/dist/shared/utils/index.js +0 -3
  368. package/dist/shared/utils/index.js.map +0 -1
@@ -0,0 +1,51 @@
1
+ export function createRegistry() {
2
+ const targets = new Map();
3
+ const scrollViews = new Set();
4
+ const listeners = new Set();
5
+ const notify = () => {
6
+ // Snapshot: listeners may unsubscribe while being notified.
7
+ const snapshot = [...listeners];
8
+ for (const listener of snapshot) {
9
+ listener();
10
+ }
11
+ };
12
+ return {
13
+ registerTarget(id, ref) {
14
+ const entries = targets.get(id) ?? [];
15
+ entries.push(ref);
16
+ targets.set(id, entries);
17
+ notify();
18
+ return () => {
19
+ const current = targets.get(id);
20
+ const index = current?.lastIndexOf(ref) ?? -1;
21
+ if (current && index !== -1) {
22
+ current.splice(index, 1);
23
+ if (current.length === 0) {
24
+ targets.delete(id);
25
+ }
26
+ notify();
27
+ }
28
+ };
29
+ },
30
+ // Newest first. (Not `toReversed`: ES2023 is not available on every supported React Native version.)
31
+ // eslint-disable-next-line unicorn/no-array-reverse
32
+ targets: (id) => [...(targets.get(id) ?? [])].reverse(),
33
+ registerScrollView(ref) {
34
+ scrollViews.add(ref);
35
+ notify();
36
+ return () => {
37
+ if (scrollViews.delete(ref)) {
38
+ notify();
39
+ }
40
+ };
41
+ },
42
+ scrollViews: () => [...scrollViews],
43
+ subscribe(listener) {
44
+ listeners.add(listener);
45
+ return () => {
46
+ listeners.delete(listener);
47
+ };
48
+ },
49
+ };
50
+ }
51
+ //# sourceMappingURL=registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/react-native-platform/registry.ts"],"names":[],"mappings":"AAkBA,MAAM,UAAU,cAAc;IAC5B,MAAM,OAAO,GAAG,IAAI,GAAG,EAAqC,CAAC;IAC7D,MAAM,WAAW,GAAG,IAAI,GAAG,EAAsB,CAAC;IAClD,MAAM,SAAS,GAAG,IAAI,GAAG,EAAc,CAAC;IACxC,MAAM,MAAM,GAAG,GAAS,EAAE;QACxB,4DAA4D;QAC5D,MAAM,QAAQ,GAAG,CAAC,GAAG,SAAS,CAAC,CAAC;QAChC,KAAK,MAAM,QAAQ,IAAI,QAAQ,EAAE,CAAC;YAChC,QAAQ,EAAE,CAAC;QACb,CAAC;IACH,CAAC,CAAC;IAEF,OAAO;QACL,cAAc,CAAC,EAAE,EAAE,GAAG;YACpB,MAAM,OAAO,GAAG,OAAO,CAAC,GA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;gBACV,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;YAC7B,CAAC,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -1,3 +1,16 @@
1
- import { type JSX } from 'react';
2
- import { TourProviderProps } from './types/tour-provider.props.type';
3
- export declare function TourProvider({ children, TooltipComponent, OverlayComponent, onTourEnd, theme, platform, i18n, closeOnOverlayClick, }: TourProviderProps): JSX.Element;
1
+ import { type ReactNode } from 'react';
2
+ import { type TourProviderBaseProps } from '../shared/react/tour-provider-core.js';
3
+ import type { TourInsets } from './insets.util.js';
4
+ export type TourProviderProps = TourProviderBaseProps & {
5
+ /**
6
+ * Safe-area insets, for example `useSafeAreaInsets()` from react-native-safe-area-context.
7
+ * Without them, conservative defaults keep the tooltip clear of notches and system bars.
8
+ */
9
+ readonly insets?: TourInsets;
10
+ };
11
+ /**
12
+ * Provides `useTour()` and renders the tour above your app. Place it at the root, around your
13
+ * navigation container and outside any `SafeAreaView`; pass safe-area `insets` instead.
14
+ */
15
+ export declare function TourProvider({ insets, ...props }: TourProviderProps): ReactNode;
16
+ //# sourceMappingURL=tour-provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tour-provider.d.ts","sourceRoot":"","sources":["../../src/react-native-platform/tour-provider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,SAAS,EAAqD,MAAM,OAAO,CAAC;AAIzF,OAAO,EAAC,KAAK,qBAAqB,EAAc,MAAM,uCAAuC,CAAC;AAE9F,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,kBAAkB,CAAC;AASjD,MAAM,MAAM,iBAAiB,GAAG,qBAAqB,GAAG;IACtD;;;OAGG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC;CAC9B,CAAC;AAEF;;;GAGG;AACH,wBAAgB,YAAY,CAAC,EAAC,MAAM,EAAE,GAAG,KAAK,EAAC,EAAE,iBAAiB,GAAG,SAAS,CAuG7E"}
@@ -1,223 +1,104 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useCallback, useState, useEffect, useRef, useMemo } from 'react';
3
- import { TourContext, calculateTooltipPosition, resolveTheme, } from '../shared/index.js';
4
- import { TourTooltip as DefaultTourTooltip } from './components/tour-tooltip';
5
- import { TourOverlay as DefaultTourOverlay } from './components/tour-overlay';
6
- import { nativePlatformAdapter } from './platform-adapter';
7
- const { Modal } = require('react-native');
8
- const defaultPlacement = 'bottom';
9
- const positionRetryDelayMs = 100;
10
- const initialPositionDelayMs = 50;
11
- const maxPositionAttempts = 20;
12
- const domUpdateDelayMs = 100;
13
- export function TourProvider({ children, TooltipComponent, OverlayComponent, onTourEnd, theme, platform = nativePlatformAdapter, i18n, closeOnOverlayClick = true, }) {
14
- const resolvedTheme = useMemo(() => resolveTheme(theme), [theme]);
15
- const [isActive, setIsActive] = useState(false);
16
- const [currentStep, setCurrentStep] = useState(0);
17
- const [steps, setSteps] = useState([]);
18
- const [currentTourId, setCurrentTourId] = useState(undefined);
19
- const [tooltipPosition, setTooltipPosition] = useState({ top: 0, left: 0 });
20
- const [isPositioned, setIsPositioned] = useState(false);
21
- const [highlightRect, setHighlightRect] = useState(undefined);
22
- const [tooltipSize, setTooltipSize] = useState({ width: 0, height: 0 });
23
- const tooltipRef = useRef(null);
24
- const [positionKey, setPositionKey] = useState(0);
25
- const tourOnEndRef = useRef(undefined);
26
- const Tooltip = TooltipComponent ?? DefaultTourTooltip;
27
- const Overlay = OverlayComponent ?? DefaultTourOverlay;
28
- const startTour = useCallback((tourSteps, tourId, options) => {
29
- if (tourSteps.length > 0) {
30
- setSteps(tourSteps);
31
- setCurrentStep(0);
32
- setCurrentTourId(tourId);
33
- tourOnEndRef.current = options?.onTourEnd;
34
- setIsActive(true);
35
- }
36
- }, []);
37
- const finishTour = useCallback((reason) => {
38
- const stepAtEnd = steps[currentStep] ?? steps.at(-1);
39
- if (stepAtEnd) {
40
- const info = {
41
- reason,
42
- stepIndex: currentStep,
43
- step: stepAtEnd,
44
- totalSteps: steps.length,
45
- };
46
- tourOnEndRef.current?.(currentTourId, info);
47
- onTourEnd?.(currentTourId, info);
48
- }
49
- tourOnEndRef.current = undefined;
50
- setIsActive(false);
51
- setCurrentStep(0);
52
- setSteps([]);
53
- setCurrentTourId(undefined);
54
- setHighlightRect(undefined);
55
- setTooltipPosition({ top: 0, left: 0 });
56
- setTooltipSize({ width: 0, height: 0 });
57
- setIsPositioned(false);
58
- }, [currentTourId, currentStep, steps, onTourEnd]);
59
- const handleTooltipMeasured = useCallback((size) => {
60
- setTooltipSize((previous) => {
61
- if (previous.width === size.width && previous.height === size.height) {
62
- return previous;
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useEffect, useMemo, useState, useSyncExternalStore } from 'react';
3
+ import { Keyboard, PixelRatio, Platform, StyleSheet, View } from 'react-native';
4
+ import { useIsomorphicLayoutEffect } from '../shared/react/use-isomorphic-layout-effect.hook.js';
5
+ import { TourRoot } from '../shared/react/tour-root.js';
6
+ import { useTourCore } from '../shared/react/tour-provider-core.js';
7
+ import { createHostStore } from './host-store.js';
8
+ import { nativeRenderer } from './layer/native-renderer.js';
9
+ import { HostView } from './layer/tour-host.js';
10
+ import { NativeTourContext } from './native-context.js';
11
+ import { createNativeEnvironment } from './native-environment.js';
12
+ import { createNativePlatform } from './native-platform.js';
13
+ import { createReducedMotionSetting } from './reduced-motion.js';
14
+ import { createRegistry } from './registry.js';
15
+ /**
16
+ * Provides `useTour()` and renders the tour above your app. Place it at the root, around your
17
+ * navigation container and outside any `SafeAreaView`; pass safe-area `insets` instead.
18
+ */
19
+ export function TourProvider({ insets, ...props }) {
20
+ const [registry] = useState(createRegistry);
21
+ const [hosts] = useState(createHostStore);
22
+ const [environment] = useState(createNativeEnvironment);
23
+ const [platform] = useState(() => createNativePlatform({
24
+ registry,
25
+ getHost: hosts.activeHost,
26
+ getInsets: () => environment.getInsets(hosts.activeHost()?.size ?? { width: 0, height: 0 }),
27
+ subscribeLayout: hosts.subscribeLayout,
28
+ reducedMotion: createReducedMotionSetting(),
29
+ getPixelRatio: () => PixelRatio.get(),
30
+ }));
31
+ const { engine, overlay } = useTourCore(props, platform, nativeRenderer);
32
+ const { isActive } = useSyncExternalStore(engine.subscribe, engine.getPublicState, engine.getPublicState);
33
+ const isRootActive = useSyncExternalStore(hosts.subscribe, hosts.isRootActive, hosts.isRootActive);
34
+ // New insets (rotation, split screen) move the safe area.
35
+ useIsomorphicLayoutEffect(() => {
36
+ environment.setInsets(insets);
37
+ hosts.notifyLayout();
38
+ }, [environment, hosts, insets?.top, insets?.right, insets?.bottom, insets?.left]);
39
+ // The keyboard shrinks the area the tooltip may use.
40
+ useEffect(() => {
41
+ const show = Platform.OS === 'ios' ? 'keyboardWillShow' : 'keyboardDidShow';
42
+ const hide = Platform.OS === 'ios' ? 'keyboardWillHide' : 'keyboardDidHide';
43
+ let keyboard;
44
+ const apply = (overlap) => {
45
+ if (environment.setKeyboardOverlap(overlap)) {
46
+ hosts.notifyLayout();
63
47
  }
64
- return size;
65
- });
66
- }, []);
67
- const endTour = useCallback(() => {
68
- finishTour('closed');
69
- }, [finishTour]);
70
- const nextStep = useCallback(() => {
71
- if (currentStep < steps.length - 1) {
72
- setCurrentStep((previous) => previous + 1);
73
- }
74
- else {
75
- finishTour('completed');
76
- }
77
- }, [currentStep, steps.length, finishTour]);
78
- const previousStep = useCallback(() => {
79
- if (currentStep > 0) {
80
- setCurrentStep((previous) => previous - 1);
81
- }
82
- }, [currentStep]);
83
- const goToStep = useCallback((step) => {
84
- if (step >= 0 && step < steps.length) {
85
- setCurrentStep(step);
86
- }
87
- }, [steps.length]);
88
- const updatePositions = useCallback(() => {
89
- if (!isActive || steps.length === 0) {
90
- return;
91
- }
92
- const currentTourStep = steps[currentStep];
93
- if (!currentTourStep) {
94
- return;
95
- }
96
- void (async () => {
97
- const rect = await platform.measureElement(currentTourStep.target);
98
- if (!rect) {
99
- if (currentStep < steps.length - 1) {
100
- setCurrentStep((previous) => previous + 1);
101
- }
102
- else {
103
- finishTour('target-missing');
104
- }
48
+ };
49
+ const update = () => {
50
+ const current = keyboard;
51
+ if (!current) {
52
+ apply(0);
105
53
  return;
106
54
  }
107
- setHighlightRect(rect);
108
- const placement = currentTourStep.placement ?? defaultPlacement;
109
- const viewportDimensions = platform.getViewportDimensions();
110
- const position = calculateTooltipPosition(rect, placement, tooltipSize, viewportDimensions);
111
- setTooltipPosition(position);
112
- setIsPositioned(true);
113
- })();
114
- }, [isActive, currentStep, steps, finishTour, platform, tooltipSize]);
115
- useEffect(() => {
116
- if (!isActive || steps.length === 0) {
117
- return;
118
- }
119
- const currentTourStep = steps[currentStep];
120
- if (!currentTourStep) {
121
- return;
122
- }
123
- const runStep = async () => {
124
- if (currentTourStep.onBeforeStep) {
125
- await currentTourStep.onBeforeStep(currentTourStep.target);
126
- await new Promise((resolve) => {
127
- setTimeout(resolve, domUpdateDelayMs);
128
- });
129
- }
130
- const rect = await platform.measureElement(currentTourStep.target);
131
- if (!rect) {
132
- if (currentStep < steps.length - 1) {
133
- setCurrentStep((previous) => previous + 1);
134
- }
135
- else {
136
- finishTour('target-missing');
137
- }
55
+ // Android apps that resize with the keyboard (`adjustResize` without edge-to-edge) have
56
+ // already made room for it: only the part still covering the layer counts.
57
+ const host = hosts.activeHost()?.instance;
58
+ if (Platform.OS !== 'android' || !canMeasureInWindow(host)) {
59
+ apply(current.height);
138
60
  return;
139
61
  }
140
- setHighlightRect(rect);
141
- setTimeout(() => {
142
- setPositionKey((k) => k + 1);
143
- }, initialPositionDelayMs);
144
- };
145
- void runStep();
146
- }, [isActive, currentStep, steps, finishTour, platform]);
147
- useEffect(() => {
148
- if (!isActive || !highlightRect || steps.length === 0) {
149
- return;
150
- }
151
- const currentTourStep = steps[currentStep];
152
- if (!currentTourStep) {
153
- return;
154
- }
155
- let attempts = 0;
156
- let timeoutId;
157
- let animationFrameId;
158
- const tryPosition = () => {
159
- attempts++;
160
- animationFrameId = platform.scheduleFrame(() => {
161
- void (async () => {
162
- const rect = await platform.measureElement(currentTourStep.target);
163
- if (!rect || rect.width === 0 || rect.height === 0) {
164
- if (attempts < maxPositionAttempts) {
165
- timeoutId = setTimeout(tryPosition, positionRetryDelayMs);
166
- }
167
- return;
168
- }
169
- setHighlightRect(rect);
170
- const placement = currentTourStep.placement ?? defaultPlacement;
171
- const viewportDimensions = platform.getViewportDimensions();
172
- const position = calculateTooltipPosition(rect, placement, tooltipSize, viewportDimensions);
173
- setTooltipPosition(position);
174
- if (tooltipSize.height > 0 && tooltipSize.width > 0) {
175
- setIsPositioned(true);
176
- }
177
- await platform.scrollToElement(currentTourStep.target, placement, tooltipSize.height);
178
- })();
62
+ host.measureInWindow((_x, y, _width, height) => {
63
+ if (keyboard === current) {
64
+ apply(y + height - current.top);
65
+ }
179
66
  });
180
67
  };
181
- timeoutId = setTimeout(tryPosition, initialPositionDelayMs);
68
+ const subscriptions = [
69
+ Keyboard.addListener(show, (event) => {
70
+ keyboard = { top: event.endCoordinates.screenY, height: event.endCoordinates.height };
71
+ update();
72
+ }),
73
+ Keyboard.addListener(hide, () => {
74
+ keyboard = undefined;
75
+ update();
76
+ }),
77
+ ];
78
+ // The layer resizing for the keyboard changes how much of it the keyboard covers.
79
+ const unsubscribeLayout = hosts.subscribeLayout(() => {
80
+ if (keyboard) {
81
+ update();
82
+ }
83
+ });
182
84
  return () => {
183
- clearTimeout(timeoutId);
184
- if (animationFrameId) {
185
- platform.cancelFrame(animationFrameId);
85
+ unsubscribeLayout();
86
+ for (const subscription of subscriptions) {
87
+ subscription.remove();
186
88
  }
187
89
  };
188
- }, [isActive, currentStep, steps, highlightRect, positionKey, platform, tooltipSize]);
189
- useEffect(() => {
190
- if (!isActive) {
191
- return;
192
- }
193
- return platform.subscribeToKeyboard({
194
- onEscape() {
195
- finishTour('closed');
196
- },
197
- onNext: nextStep,
198
- onPrev: previousStep,
199
- });
200
- }, [isActive, finishTour, nextStep, previousStep, platform]);
201
- useEffect(() => {
202
- if (!isActive) {
203
- return;
204
- }
205
- return platform.subscribeToLayout(updatePositions);
206
- }, [isActive, updatePositions, platform]);
207
- const currentTourStep = steps[currentStep];
208
- const contextValue = useMemo(() => ({
209
- isActive,
210
- currentStep,
211
- steps,
212
- currentTourId,
213
- startTour,
214
- endTour,
215
- nextStep,
216
- prevStep: previousStep,
217
- goToStep,
218
- }), [isActive, currentStep, steps, currentTourId, startTour, endTour, nextStep, previousStep, goToStep]);
219
- return (_jsxs(TourContext, { value: contextValue, children: [children, _jsx(Modal, { transparent: true, visible: Boolean(isActive && highlightRect), animationType: "fade", children: highlightRect ? (_jsxs(_Fragment, { children: [_jsx(Overlay, { closeOnOverlayClick: closeOnOverlayClick, highlightRect: highlightRect, theme: resolvedTheme, onClose: () => {
220
- finishTour('blur');
221
- } }), currentTourStep ? (_jsx(Tooltip, { ref: tooltipRef, content: currentTourStep.content, currentStep: currentStep, i18n: i18n, isPositioned: isPositioned, position: tooltipPosition, theme: resolvedTheme, title: currentTourStep.title, totalSteps: steps.length, onClose: endTour, onGoToStep: goToStep, onMeasured: handleTooltipMeasured, onNext: nextStep, onPrev: previousStep })) : null] })) : null })] }));
90
+ }, [environment, hosts]);
91
+ const context = useMemo(() => ({ registry, hosts, overlay }), [registry, hosts, overlay]);
92
+ const hidesApp = isActive && isRootActive;
93
+ return (_jsx(TourRoot, { engine: engine, children: _jsx(NativeTourContext.Provider, { value: context, children: _jsxs(View, { collapsable: false, style: styles.root, children: [_jsx(View, { collapsable: false, style: styles.root, importantForAccessibility: hidesApp ? 'no-hide-descendants' : 'auto', accessibilityElementsHidden: hidesApp, children: props.children }), _jsx(HostView, { isRoot: true })] }) }) }));
94
+ }
95
+ function canMeasureInWindow(value) {
96
+ return (typeof value === 'object' &&
97
+ value !== null &&
98
+ 'measureInWindow' in value &&
99
+ typeof value.measureInWindow === 'function');
222
100
  }
101
+ const styles = StyleSheet.create({
102
+ root: { flex: 1 },
103
+ });
223
104
  //# sourceMappingURL=tour-provider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tour-provider.js","sourceRoot":"","sources":["../../src/react-native-platform/tour-provider.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAW,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAC,MAAM,OAAO,CAAC;AAElF,OAAO,EAQL,WAAW,EACX,wBAAwB,EACxB,YAAY,GACb,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAC,WAAW,IAAI,kBAAkB,EAAC,MAAM,2BAA2B,CAAC;AAC5E,OAAO,EAAC,WAAW,IAAI,kBAAkB,EAAC,MAAM,2BAA2B,CAAC;AAC5E,OAAO,EAAC,qBAAqB,EAAC,MAAM,oBAAoB,CAAC;AAGzD,MAAM,EAAC,KAAK,EAAC,GAAG,OAAO,CAAC,cAAc,CAAkC,CAAC;AAEzE,MAAM,gBAAgB,GAAG,QAAiB,CAAC;AAC3C,MAAM,oBAAoB,GAAG,GAAG,CAAC;AACjC,MAAM,sBAAsB,GAAG,EAAE,CAAC;AAClC,MAAM,mBAAmB,GAAG,EAAE,CAAC;AAC/B,MAAM,gBAAgB,GAAG,GAAG,CAAC;AAE7B,MAAM,UAAU,YAAY,CAAC,EAC3B,QAAQ,EACR,gBAAgB,EAChB,gBAAgB,EAChB,SAAS,EACT,KAAK,EACL,QAAQ,GAAG,qBAAqB,EAChC,IAAI,EACJ,mBAAmB,GAAG,IAAI,GACR;IAClB,MAAM,aAAa,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAClE,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAChD,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IAClD,MAAM,CAAC,KAAK,EAAE,QAAQ,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AC/B,IAAI,EAAE,EAAC,IAAI,EAAE,CAAC,EAAC;CAChB,CAAC,CAAC"}
@@ -1,10 +1,14 @@
1
- export { TourProvider, type TourProviderProps } from './react-native-platform';
2
- export { TourContext, useTour } from './shared';
3
- export { useTourTarget } from './react-native-platform';
4
- export { TourOverlay, TourTooltip } from './react-native-platform';
5
- export type { TourStep, TourContextType, TourTooltipProps, TourOverlayProps, TourTheme, TourI18n, TourEndReason, TourEndInfo, TourEndCallback, StartTourOptions, } from './shared';
6
- export type { Rect, TourTarget } from './shared';
7
- export { calculateTooltipPosition } from './shared';
8
- export { getTruncatedDots, MAX_VISIBLE_DOTS, DOT_SIZE, DOT_GAP, DOTS_CONTAINER_WIDTH } from './shared';
9
- export type { DotItem } from './shared';
10
- export { nativePlatformAdapter, targetRegistry } from './react-native-platform';
1
+ export { TourProvider, type TourProviderProps } from './react-native-platform/tour-provider.js';
2
+ export { TourHost } from './react-native-platform/layer/tour-host.js';
3
+ export { useTourTarget } from './react-native-platform/hooks/use-tour-target.hook.js';
4
+ export { useTourScrollView } from './react-native-platform/hooks/use-tour-scroll-view.hook.js';
5
+ export { useTour } from './shared/react/use-tour.hook.js';
6
+ export { getTruncatedDots, type DotItem } from './shared/utils/get-truncated-dots.util.js';
7
+ export type { TourInsets } from './react-native-platform/insets.util.js';
8
+ export type { TourContextType } from './shared/types/tour-context.type.js';
9
+ export type { StartTourOptions, TourEndCallback, TourEndInfo, TourEndReason } from './shared/types/tour-end-info.type.js';
10
+ export type { TourI18n } from './shared/types/tour-i18n.type.js';
11
+ export type { TourPlacement, TourStep, TourStepContext, TourTarget } from './shared/types/tour-step.type.js';
12
+ export type { TourTheme } from './shared/types/tour-theme.type.js';
13
+ export type { TourTooltipProps } from './shared/types/tour-tooltip-props.type.js';
14
+ //# sourceMappingURL=react-native.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"react-native.d.ts","sourceRoot":"","sources":["../src/react-native.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,YAAY,EAAE,KAAK,iBAAiB,EAAC,MAAM,0CAA0C,CAAC;AAC9F,OAAO,EAAC,QAAQ,EAAC,MAAM,4CAA4C,CAAC;AACpE,OAAO,EAAC,aAAa,EAAC,MAAM,uDAAuD,CAAC;AACpF,OAAO,EAAC,iBAAiB,EAAC,MAAM,4DAA4D,CAAC;AAC7F,OAAO,EAAC,OAAO,EAAC,MAAM,iCAAiC,CAAC;AACxD,OAAO,EAAC,gBAAgB,EAAE,KAAK,OAAO,EAAC,MAAM,2CAA2C,CAAC;AACzF,YAAY,EAAC,UAAU,EAAC,MAAM,wCAAwC,CAAC;AACvE,YAAY,EAAC,eAAe,EAAC,MAAM,qCAAqC,CAAC;AACzE,YAAY,EAAC,gBAAgB,EAAE,eAAe,EAAE,WAAW,EAAE,aAAa,EAAC,MAAM,sCAAsC,CAAC;AACxH,YAAY,EAAC,QAAQ,EAAC,MAAM,kCAAkC,CAAC;AAC/D,YAAY,EAAC,aAAa,EAAE,QAAQ,EAAE,eAAe,EAAE,UAAU,EAAC,MAAM,kCAAkC,CAAC;AAC3G,YAAY,EAAC,SAAS,EAAC,MAAM,mCAAmC,CAAC;AACjE,YAAY,EAAC,gBAAgB,EAAC,MAAM,2CAA2C,CAAC"}
@@ -1,8 +1,8 @@
1
- export { TourProvider } from './react-native-platform';
2
- export { TourContext, useTour } from './shared';
3
- export { useTourTarget } from './react-native-platform';
4
- export { TourOverlay, TourTooltip } from './react-native-platform';
5
- export { calculateTooltipPosition } from './shared';
6
- export { getTruncatedDots, MAX_VISIBLE_DOTS, DOT_SIZE, DOT_GAP, DOTS_CONTAINER_WIDTH } from './shared';
7
- export { nativePlatformAdapter, targetRegistry } from './react-native-platform';
1
+ // React Native entry point: import from '@robertlinde/react-tour-kit/react-native'.
2
+ export { TourProvider } from './react-native-platform/tour-provider.js';
3
+ export { TourHost } from './react-native-platform/layer/tour-host.js';
4
+ export { useTourTarget } from './react-native-platform/hooks/use-tour-target.hook.js';
5
+ export { useTourScrollView } from './react-native-platform/hooks/use-tour-scroll-view.hook.js';
6
+ export { useTour } from './shared/react/use-tour.hook.js';
7
+ export { getTruncatedDots } from './shared/utils/get-truncated-dots.util.js';
8
8
  //# sourceMappingURL=react-native.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"react-native.js","sourceRoot":"","sources":["../src/react-native.ts"],"names":[],"mappings":"AAKA,OAAO,EAAC,YAAY,EAAyB,MAAM,yBAAyB,CAAC;AAE7E,OAAO,EAAC,WAAW,EAAE,OAAO,EAAC,MAAM,UAAU,CAAC;AAE9C,OAAO,EAAC,aAAa,EAAC,MAAM,yBAAyB,CAAC;AAItD,OAAO,EAAC,WAAW,EAAE,WAAW,EAAC,MAAM,yBAAyB,CAAC;AAqBjE,OAAO,EAAC,wBAAwB,EAAC,MAAM,UAAU,CAAC;AAElD,OAAO,EAAC,gBAAgB,EAAE,gBAAgB,EAAE,QAAQ,EAAE,OAAO,EAAE,oBAAoB,EAAC,MAAM,UAAU,CAAC;AAMrG,OAAO,EAAC,qBAAqB,EAAE,cAAc,EAAC,MAAM,yBAAyB,CAAC"}
1
+ {"version":3,"file":"react-native.js","sourceRoot":"","sources":["../src/react-native.ts"],"names":[],"mappings":"AAAA,oFAAoF;AAEpF,OAAO,EAAC,YAAY,EAAyB,MAAM,0CAA0C,CAAC;AAC9F,OAAO,EAAC,QAAQ,EAAC,MAAM,4CAA4C,CAAC;AACpE,OAAO,EAAC,aAAa,EAAC,MAAM,uDAAuD,CAAC;AACpF,OAAO,EAAC,iBAAiB,EAAC,MAAM,4DAA4D,CAAC;AAC7F,OAAO,EAAC,OAAO,EAAC,MAAM,iCAAiC,CAAC;AACxD,OAAO,EAAC,gBAAgB,EAAe,MAAM,2CAA2C,CAAC"}
@@ -0,0 +1,35 @@
1
+ import type { Box } from '../../shared/geometry/geometry.type.js';
2
+ import type { TourTarget } from '../../shared/types/tour-step.type.js';
3
+ export declare function toBox(rect: DOMRectReadOnly): Box;
4
+ /**
5
+ * False in documents without a layout engine (jsdom, happy-dom in test suites): every size there is
6
+ * zero. A real page always has a size, also a zero-sized frame (its window is zero-sized too).
7
+ */
8
+ export declare function hasLayout(): boolean;
9
+ /** `checkVisibility()` where the browser has it. */
10
+ export declare function checkVisibility(element: Element, options: {
11
+ visibilityProperty?: boolean;
12
+ opacityProperty?: boolean;
13
+ }): boolean | undefined;
14
+ /** True when the element takes up space and is not hidden (`display: none`, `visibility: hidden`, closed `<details>`). */
15
+ export declare function isRendered(element: Element): boolean;
16
+ /**
17
+ * Resolves a target to an element. For selectors, the first rendered match wins, which handles
18
+ * layouts that duplicate markup (for example a mobile and a desktop navigation).
19
+ */
20
+ export declare function resolveTarget(target: TourTarget): Element | undefined;
21
+ /** The parent element, crossing shadow-root boundaries. */
22
+ export declare function parentOf(element: Element): Element | undefined;
23
+ /** `ancestor.contains(element)`, also for elements inside shadow roots of the ancestor's descendants. */
24
+ export declare function containsComposed(ancestor: Element, element: Element): boolean;
25
+ /**
26
+ * The page's direction. Browsers take it from `<body>` (CSS calls it the principal writing mode),
27
+ * so `<body dir="rtl">` turns the page right-to-left even when `<html>` is left-to-right.
28
+ */
29
+ export declare function pageDirection(): 'ltr' | 'rtl';
30
+ /**
31
+ * True when the focused element handles `key` itself (typing, toggling, choosing, adjusting a
32
+ * value), so the tour neither navigates nor blocks scrolling with it.
33
+ */
34
+ export declare function handlesKey(target: EventTarget | null, key: string): boolean;
35
+ //# sourceMappingURL=elements.util.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"elements.util.d.ts","sourceRoot":"","sources":["../../../src/react-platform/dom/elements.util.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,GAAG,EAAC,MAAM,wCAAwC,CAAC;AAChE,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,sCAAsC,CAAC;AAErE,wBAAgB,KAAK,CAAC,IAAI,EAAE,eAAe,GAAG,GAAG,CAEhD;AAED;;;GAGG;AACH,wBAAgB,SAAS,IAAI,OAAO,CAGnC;AAID,oDAAoD;AACpD,wBAAgB,eAAe,CAC7B,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE;IAAC,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAAC,eAAe,CAAC,EAAE,OAAO,CAAA;CAAC,GACjE,OAAO,GAAG,SAAS,CAGrB;AAED,0HAA0H;AAC1H,wBAAgB,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAYpD;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,GAAG,SAAS,CAoBrE;AAED,2DAA2D;AAC3D,wBAAgB,QAAQ,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,GAAG,SAAS,CAO9D;AAED,yGAAyG;AACzG,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAQ7E;AAED;;;GAGG;AACH,wBAAgB,aAAa,IAAI,KAAK,GAAG,KAAK,CAG7C;AAuDD;;;GAGG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAmC3E"}