@robertlinde/react-tour-kit 0.8.9 → 1.0.0
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.
- package/CHANGELOG.md +40 -0
- package/MIGRATION.md +205 -0
- package/README.md +401 -850
- package/dist/react-native-platform/hooks/use-tour-scroll-view.hook.d.ts +14 -0
- package/dist/react-native-platform/hooks/use-tour-scroll-view.hook.d.ts.map +1 -0
- package/dist/react-native-platform/hooks/use-tour-scroll-view.hook.js +21 -0
- package/dist/react-native-platform/hooks/use-tour-scroll-view.hook.js.map +1 -0
- package/dist/react-native-platform/hooks/use-tour-target.hook.d.ts +15 -0
- package/dist/react-native-platform/hooks/use-tour-target.hook.d.ts.map +1 -0
- package/dist/react-native-platform/hooks/use-tour-target.hook.js +28 -0
- package/dist/react-native-platform/hooks/use-tour-target.hook.js.map +1 -0
- package/dist/react-native-platform/host-store.d.ts +24 -0
- package/dist/react-native-platform/host-store.d.ts.map +1 -0
- package/dist/react-native-platform/host-store.js +63 -0
- package/dist/react-native-platform/host-store.js.map +1 -0
- package/dist/react-native-platform/insets.util.d.ts +11 -0
- package/dist/react-native-platform/insets.util.d.ts.map +1 -0
- package/dist/react-native-platform/insets.util.js +31 -0
- package/dist/react-native-platform/insets.util.js.map +1 -0
- package/dist/react-native-platform/layer/native-renderer.d.ts +7 -0
- package/dist/react-native-platform/layer/native-renderer.d.ts.map +1 -0
- package/dist/react-native-platform/layer/native-renderer.js +496 -0
- package/dist/react-native-platform/layer/native-renderer.js.map +1 -0
- package/dist/react-native-platform/layer/tour-host.d.ts +13 -0
- package/dist/react-native-platform/layer/tour-host.d.ts.map +1 -0
- package/dist/react-native-platform/layer/tour-host.js +70 -0
- package/dist/react-native-platform/layer/tour-host.js.map +1 -0
- package/dist/react-native-platform/measure.util.d.ts +20 -0
- package/dist/react-native-platform/measure.util.d.ts.map +1 -0
- package/dist/react-native-platform/measure.util.js +100 -0
- package/dist/react-native-platform/measure.util.js.map +1 -0
- package/dist/react-native-platform/native-context.d.ts +12 -0
- package/dist/react-native-platform/native-context.d.ts.map +1 -0
- package/dist/react-native-platform/native-context.js +4 -0
- package/dist/react-native-platform/native-context.js.map +1 -0
- package/dist/react-native-platform/native-environment.d.ts +14 -0
- package/dist/react-native-platform/native-environment.d.ts.map +1 -0
- package/dist/react-native-platform/native-environment.js +20 -0
- package/dist/react-native-platform/native-environment.js.map +1 -0
- package/dist/react-native-platform/native-platform.d.ts +19 -0
- package/dist/react-native-platform/native-platform.d.ts.map +1 -0
- package/dist/react-native-platform/native-platform.js +265 -0
- package/dist/react-native-platform/native-platform.js.map +1 -0
- package/dist/react-native-platform/reduced-motion.d.ts +4 -0
- package/dist/react-native-platform/reduced-motion.d.ts.map +1 -0
- package/dist/react-native-platform/reduced-motion.js +44 -0
- package/dist/react-native-platform/reduced-motion.js.map +1 -0
- package/dist/react-native-platform/registry.d.ts +18 -0
- package/dist/react-native-platform/registry.d.ts.map +1 -0
- package/dist/react-native-platform/registry.js +51 -0
- package/dist/react-native-platform/registry.js.map +1 -0
- package/dist/react-native-platform/tour-provider.d.ts +16 -3
- package/dist/react-native-platform/tour-provider.d.ts.map +1 -0
- package/dist/react-native-platform/tour-provider.js +92 -211
- package/dist/react-native-platform/tour-provider.js.map +1 -1
- package/dist/react-native.d.ts +14 -10
- package/dist/react-native.d.ts.map +1 -0
- package/dist/react-native.js +7 -7
- package/dist/react-native.js.map +1 -1
- package/dist/react-platform/dom/elements.util.d.ts +35 -0
- package/dist/react-platform/dom/elements.util.d.ts.map +1 -0
- package/dist/react-platform/dom/elements.util.js +155 -0
- package/dist/react-platform/dom/elements.util.js.map +1 -0
- package/dist/react-platform/dom/occluders.util.d.ts +13 -0
- package/dist/react-platform/dom/occluders.util.d.ts.map +1 -0
- package/dist/react-platform/dom/occluders.util.js +75 -0
- package/dist/react-platform/dom/occluders.util.js.map +1 -0
- package/dist/react-platform/dom/scroll-lock.util.d.ts +13 -0
- package/dist/react-platform/dom/scroll-lock.util.d.ts.map +1 -0
- package/dist/react-platform/dom/scroll-lock.util.js +219 -0
- package/dist/react-platform/dom/scroll-lock.util.js.map +1 -0
- package/dist/react-platform/dom/scroll.util.d.ts +44 -0
- package/dist/react-platform/dom/scroll.util.d.ts.map +1 -0
- package/dist/react-platform/dom/scroll.util.js +250 -0
- package/dist/react-platform/dom/scroll.util.js.map +1 -0
- package/dist/react-platform/dom/viewport.util.d.ts +16 -0
- package/dist/react-platform/dom/viewport.util.d.ts.map +1 -0
- package/dist/react-platform/dom/viewport.util.js +65 -0
- package/dist/react-platform/dom/viewport.util.js.map +1 -0
- package/dist/react-platform/dom/web-platform.d.ts +15 -0
- package/dist/react-platform/dom/web-platform.d.ts.map +1 -0
- package/dist/react-platform/dom/web-platform.js +169 -0
- package/dist/react-platform/dom/web-platform.js.map +1 -0
- package/dist/react-platform/layer/styles.d.ts +12 -0
- package/dist/react-platform/layer/styles.d.ts.map +1 -0
- package/dist/react-platform/layer/styles.js +285 -0
- package/dist/react-platform/layer/styles.js.map +1 -0
- package/dist/react-platform/layer/web-renderer.d.ts +4 -0
- package/dist/react-platform/layer/web-renderer.d.ts.map +1 -0
- package/dist/react-platform/layer/web-renderer.js +390 -0
- package/dist/react-platform/layer/web-renderer.js.map +1 -0
- package/dist/react-platform/tour-provider.d.ts +9 -3
- package/dist/react-platform/tour-provider.d.ts.map +1 -0
- package/dist/react-platform/tour-provider.js +28 -218
- package/dist/react-platform/tour-provider.js.map +1 -1
- package/dist/react.d.ts +10 -10
- package/dist/react.d.ts.map +1 -0
- package/dist/react.js +5 -7
- package/dist/react.js.map +1 -1
- package/dist/shared/engine/abort.util.d.ts +17 -0
- package/dist/shared/engine/abort.util.d.ts.map +1 -0
- package/dist/shared/engine/abort.util.js +72 -0
- package/dist/shared/engine/abort.util.js.map +1 -0
- package/dist/shared/engine/report.util.d.ts +12 -0
- package/dist/shared/engine/report.util.d.ts.map +1 -0
- package/dist/shared/engine/report.util.js +51 -0
- package/dist/shared/engine/report.util.js.map +1 -0
- package/dist/shared/engine/tour-adapter.type.d.ts +60 -0
- package/dist/shared/engine/tour-adapter.type.d.ts.map +1 -0
- package/dist/shared/engine/tour-adapter.type.js +2 -0
- package/dist/shared/engine/tour-adapter.type.js.map +1 -0
- package/dist/shared/engine/tour-engine.d.ts +92 -0
- package/dist/shared/engine/tour-engine.d.ts.map +1 -0
- package/dist/shared/engine/tour-engine.js +787 -0
- package/dist/shared/engine/tour-engine.js.map +1 -0
- package/dist/shared/geometry/box.util.d.ts +39 -0
- package/dist/shared/geometry/box.util.d.ts.map +1 -0
- package/dist/shared/geometry/box.util.js +146 -0
- package/dist/shared/geometry/box.util.js.map +1 -0
- package/dist/shared/geometry/compute-tooltip-layout.util.d.ts +60 -0
- package/dist/shared/geometry/compute-tooltip-layout.util.d.ts.map +1 -0
- package/dist/shared/geometry/compute-tooltip-layout.util.js +148 -0
- package/dist/shared/geometry/compute-tooltip-layout.util.js.map +1 -0
- package/dist/shared/geometry/geometry.type.d.ts +34 -0
- package/dist/shared/geometry/geometry.type.d.ts.map +1 -0
- package/dist/shared/geometry/geometry.type.js +2 -0
- package/dist/shared/geometry/geometry.type.js.map +1 -0
- package/dist/shared/geometry/reveal.util.d.ts +38 -0
- package/dist/shared/geometry/reveal.util.d.ts.map +1 -0
- package/dist/shared/geometry/reveal.util.js +135 -0
- package/dist/shared/geometry/reveal.util.js.map +1 -0
- package/dist/shared/geometry/target-visibility.util.d.ts +10 -0
- package/dist/shared/geometry/target-visibility.util.d.ts.map +1 -0
- package/dist/shared/geometry/target-visibility.util.js +29 -0
- package/dist/shared/geometry/target-visibility.util.js.map +1 -0
- package/dist/shared/platform/create-tour-adapter.d.ts +9 -0
- package/dist/shared/platform/create-tour-adapter.d.ts.map +1 -0
- package/dist/shared/platform/create-tour-adapter.js +130 -0
- package/dist/shared/platform/create-tour-adapter.js.map +1 -0
- package/dist/shared/platform/platform.type.d.ts +77 -0
- package/dist/shared/platform/platform.type.d.ts.map +1 -0
- package/dist/shared/platform/platform.type.js +2 -0
- package/dist/shared/platform/platform.type.js.map +1 -0
- package/dist/shared/platform/reveal-in-scroll-containers.d.ts +27 -0
- package/dist/shared/platform/reveal-in-scroll-containers.d.ts.map +1 -0
- package/dist/shared/platform/reveal-in-scroll-containers.js +49 -0
- package/dist/shared/platform/reveal-in-scroll-containers.js.map +1 -0
- package/dist/shared/react/tour-context.d.ts +7 -0
- package/dist/shared/react/tour-context.d.ts.map +1 -0
- package/dist/shared/react/tour-context.js +23 -0
- package/dist/shared/react/tour-context.js.map +1 -0
- package/dist/shared/react/tour-provider-core.d.ts +41 -0
- package/dist/shared/react/tour-provider-core.d.ts.map +1 -0
- package/dist/shared/react/tour-provider-core.js +24 -0
- package/dist/shared/react/tour-provider-core.js.map +1 -0
- package/dist/shared/react/tour-root.d.ts +14 -0
- package/dist/shared/react/tour-root.d.ts.map +1 -0
- package/dist/shared/react/tour-root.js +22 -0
- package/dist/shared/react/tour-root.js.map +1 -0
- package/dist/shared/react/use-isomorphic-layout-effect.hook.d.ts +4 -0
- package/dist/shared/react/use-isomorphic-layout-effect.hook.d.ts.map +1 -0
- package/dist/shared/react/use-isomorphic-layout-effect.hook.js +5 -0
- package/dist/shared/react/use-isomorphic-layout-effect.hook.js.map +1 -0
- package/dist/shared/react/use-tour-view.hook.d.ts +5 -0
- package/dist/shared/react/use-tour-view.hook.d.ts.map +1 -0
- package/dist/shared/react/use-tour-view.hook.js +14 -0
- package/dist/shared/react/use-tour-view.hook.js.map +1 -0
- package/dist/shared/react/use-tour.hook.d.ts +7 -0
- package/dist/shared/react/use-tour.hook.d.ts.map +1 -0
- package/dist/shared/react/use-tour.hook.js +10 -0
- package/dist/shared/react/use-tour.hook.js.map +1 -0
- package/dist/shared/renderer/default-tooltip.d.ts +5 -0
- package/dist/shared/renderer/default-tooltip.d.ts.map +1 -0
- package/dist/shared/renderer/default-tooltip.js +13 -0
- package/dist/shared/renderer/default-tooltip.js.map +1 -0
- package/dist/shared/renderer/motion.d.ts +29 -0
- package/dist/shared/renderer/motion.d.ts.map +1 -0
- package/dist/shared/renderer/motion.js +49 -0
- package/dist/shared/renderer/motion.js.map +1 -0
- package/dist/shared/renderer/renderer-context.d.ts +17 -0
- package/dist/shared/renderer/renderer-context.d.ts.map +1 -0
- package/dist/shared/renderer/renderer-context.js +16 -0
- package/dist/shared/renderer/renderer-context.js.map +1 -0
- package/dist/shared/renderer/renderer.type.d.ts +164 -0
- package/dist/shared/renderer/renderer.type.d.ts.map +1 -0
- package/dist/shared/renderer/renderer.type.js +2 -0
- package/dist/shared/renderer/renderer.type.js.map +1 -0
- package/dist/shared/renderer/tooltip-model.d.ts +32 -0
- package/dist/shared/renderer/tooltip-model.d.ts.map +1 -0
- package/dist/shared/renderer/tooltip-model.js +24 -0
- package/dist/shared/renderer/tooltip-model.js.map +1 -0
- package/dist/shared/renderer/tour-overlay.d.ts +24 -0
- package/dist/shared/renderer/tour-overlay.d.ts.map +1 -0
- package/dist/shared/renderer/tour-overlay.js +228 -0
- package/dist/shared/renderer/tour-overlay.js.map +1 -0
- package/dist/shared/types/tour-context.type.d.ts +21 -11
- package/dist/shared/types/tour-context.type.d.ts.map +1 -0
- package/dist/shared/types/tour-end-info.type.d.ts +19 -2
- package/dist/shared/types/tour-end-info.type.d.ts.map +1 -0
- package/dist/shared/types/tour-i18n.type.d.ts +8 -0
- package/dist/shared/types/tour-i18n.type.d.ts.map +1 -0
- package/dist/shared/types/tour-step.type.d.ts +35 -6
- package/dist/shared/types/tour-step.type.d.ts.map +1 -0
- package/dist/shared/types/tour-theme.type.d.ts +22 -2
- package/dist/shared/types/tour-theme.type.d.ts.map +1 -0
- package/dist/shared/types/tour-theme.type.js +1 -16
- package/dist/shared/types/tour-theme.type.js.map +1 -1
- package/dist/shared/types/tour-tooltip-props.type.d.ts +21 -17
- package/dist/shared/types/tour-tooltip-props.type.d.ts.map +1 -0
- package/dist/shared/utils/frame.util.d.ts +6 -0
- package/dist/shared/utils/frame.util.d.ts.map +1 -0
- package/dist/shared/utils/frame.util.js +20 -0
- package/dist/shared/utils/frame.util.js.map +1 -0
- package/dist/shared/utils/get-truncated-dots.util.d.ts +13 -7
- package/dist/shared/utils/get-truncated-dots.util.d.ts.map +1 -0
- package/dist/shared/utils/get-truncated-dots.util.js +30 -30
- package/dist/shared/utils/get-truncated-dots.util.js.map +1 -1
- package/dist/shared/utils/i18n.util.d.ts +7 -0
- package/dist/shared/utils/i18n.util.d.ts.map +1 -0
- package/dist/shared/utils/i18n.util.js +34 -0
- package/dist/shared/utils/i18n.util.js.map +1 -0
- package/dist/shared/utils/theme.util.d.ts +6 -0
- package/dist/shared/utils/theme.util.d.ts.map +1 -0
- package/dist/shared/utils/theme.util.js +31 -0
- package/dist/shared/utils/theme.util.js.map +1 -0
- package/package.json +72 -55
- package/src/react-native-platform/hooks/use-tour-scroll-view.hook.ts +24 -0
- package/src/react-native-platform/hooks/use-tour-target.hook.ts +30 -0
- package/src/react-native-platform/host-store.ts +92 -0
- package/src/react-native-platform/insets.util.ts +39 -0
- package/src/react-native-platform/layer/native-renderer.tsx +776 -0
- package/src/react-native-platform/layer/tour-host.tsx +105 -0
- package/src/react-native-platform/measure.util.ts +140 -0
- package/src/react-native-platform/native-context.ts +15 -0
- package/src/react-native-platform/native-environment.ts +33 -0
- package/src/react-native-platform/native-platform.ts +368 -0
- package/src/react-native-platform/reduced-motion.ts +47 -0
- package/src/react-native-platform/registry.ts +70 -0
- package/src/react-native-platform/tour-provider.tsx +148 -0
- package/src/react-native.ts +15 -0
- package/src/react-platform/dom/elements.util.ts +191 -0
- package/src/react-platform/dom/occluders.util.ts +88 -0
- package/src/react-platform/dom/scroll-lock.util.ts +261 -0
- package/src/react-platform/dom/scroll.util.ts +310 -0
- package/src/react-platform/dom/viewport.util.ts +74 -0
- package/src/react-platform/dom/web-platform.ts +208 -0
- package/src/react-platform/layer/styles.ts +286 -0
- package/src/react-platform/layer/web-renderer.tsx +594 -0
- package/src/react-platform/tour-provider.tsx +44 -0
- package/src/react.ts +13 -0
- package/src/shared/engine/abort.util.ts +84 -0
- package/src/shared/engine/report.util.ts +58 -0
- package/src/shared/engine/tour-adapter.type.ts +62 -0
- package/src/shared/engine/tour-engine.ts +1068 -0
- package/src/shared/geometry/box.util.ts +185 -0
- package/src/shared/geometry/compute-tooltip-layout.util.ts +238 -0
- package/src/shared/geometry/geometry.type.ts +38 -0
- package/src/shared/geometry/reveal.util.ts +190 -0
- package/src/shared/geometry/target-visibility.util.ts +44 -0
- package/src/shared/platform/create-tour-adapter.ts +151 -0
- package/src/shared/platform/platform.type.ts +81 -0
- package/src/shared/platform/reveal-in-scroll-containers.ts +78 -0
- package/src/shared/react/tour-context.ts +28 -0
- package/src/shared/react/tour-provider-core.ts +67 -0
- package/src/shared/react/tour-root.tsx +34 -0
- package/src/shared/react/use-isomorphic-layout-effect.hook.ts +7 -0
- package/src/shared/react/use-tour-view.hook.ts +17 -0
- package/src/shared/react/use-tour.hook.ts +11 -0
- package/src/shared/renderer/default-tooltip.tsx +52 -0
- package/src/shared/renderer/motion.ts +59 -0
- package/src/shared/renderer/renderer-context.ts +33 -0
- package/src/shared/renderer/renderer.type.ts +183 -0
- package/src/shared/renderer/tooltip-model.ts +44 -0
- package/src/shared/renderer/tour-overlay.tsx +453 -0
- package/src/shared/types/tour-context.type.ts +23 -0
- package/src/shared/types/tour-end-info.type.ts +32 -0
- package/src/shared/types/tour-i18n.type.ts +15 -0
- package/src/shared/types/tour-step.type.ts +40 -0
- package/src/shared/types/tour-theme.type.ts +28 -0
- package/src/shared/types/tour-tooltip-props.type.ts +27 -0
- package/src/shared/utils/frame.util.ts +21 -0
- package/src/shared/utils/get-truncated-dots.util.ts +46 -0
- package/src/shared/utils/i18n.util.ts +44 -0
- package/src/shared/utils/theme.util.ts +38 -0
- package/dist/react-native-platform/components/index.d.ts +0 -2
- package/dist/react-native-platform/components/index.js +0 -3
- package/dist/react-native-platform/components/index.js.map +0 -1
- package/dist/react-native-platform/components/tour-overlay.d.ts +0 -3
- package/dist/react-native-platform/components/tour-overlay.js +0 -26
- package/dist/react-native-platform/components/tour-overlay.js.map +0 -1
- package/dist/react-native-platform/components/tour-tooltip.d.ts +0 -3
- package/dist/react-native-platform/components/tour-tooltip.js +0 -167
- package/dist/react-native-platform/components/tour-tooltip.js.map +0 -1
- package/dist/react-native-platform/hooks/index.d.ts +0 -1
- package/dist/react-native-platform/hooks/index.js +0 -2
- package/dist/react-native-platform/hooks/index.js.map +0 -1
- package/dist/react-native-platform/hooks/use-tour-target.d.ts +0 -2
- package/dist/react-native-platform/hooks/use-tour-target.js +0 -13
- package/dist/react-native-platform/hooks/use-tour-target.js.map +0 -1
- package/dist/react-native-platform/index.d.ts +0 -7
- package/dist/react-native-platform/index.js +0 -7
- package/dist/react-native-platform/index.js.map +0 -1
- package/dist/react-native-platform/platform-adapter.d.ts +0 -2
- package/dist/react-native-platform/platform-adapter.js +0 -84
- package/dist/react-native-platform/platform-adapter.js.map +0 -1
- package/dist/react-native-platform/target-registry.d.ts +0 -10
- package/dist/react-native-platform/target-registry.js +0 -17
- package/dist/react-native-platform/target-registry.js.map +0 -1
- package/dist/react-native-platform/types/tour-provider.props.type.d.ts +0 -12
- package/dist/react-native-platform/types/tour-provider.props.type.js +0 -2
- package/dist/react-native-platform/types/tour-provider.props.type.js.map +0 -1
- package/dist/react-platform/components/index.d.ts +0 -2
- package/dist/react-platform/components/index.js +0 -3
- package/dist/react-platform/components/index.js.map +0 -1
- package/dist/react-platform/components/tour-overlay.d.ts +0 -3
- package/dist/react-platform/components/tour-overlay.js +0 -29
- package/dist/react-platform/components/tour-overlay.js.map +0 -1
- package/dist/react-platform/components/tour-tooltip.d.ts +0 -2
- package/dist/react-platform/components/tour-tooltip.js +0 -155
- package/dist/react-platform/components/tour-tooltip.js.map +0 -1
- package/dist/react-platform/index.d.ts +0 -6
- package/dist/react-platform/index.js +0 -6
- package/dist/react-platform/index.js.map +0 -1
- package/dist/react-platform/platform-adapter.d.ts +0 -2
- package/dist/react-platform/platform-adapter.js +0 -101
- package/dist/react-platform/platform-adapter.js.map +0 -1
- package/dist/react-platform/types/tour-provider.props.type.d.ts +0 -12
- package/dist/react-platform/types/tour-provider.props.type.js +0 -2
- package/dist/react-platform/types/tour-provider.props.type.js.map +0 -1
- package/dist/react-platform/utils/find-visible-element.util.d.ts +0 -1
- package/dist/react-platform/utils/find-visible-element.util.js +0 -11
- package/dist/react-platform/utils/find-visible-element.util.js.map +0 -1
- package/dist/react-platform/utils/index.d.ts +0 -1
- package/dist/react-platform/utils/index.js +0 -2
- package/dist/react-platform/utils/index.js.map +0 -1
- package/dist/shared/context/index.d.ts +0 -1
- package/dist/shared/context/index.js +0 -2
- package/dist/shared/context/index.js.map +0 -1
- package/dist/shared/context/tour-context.d.ts +0 -3
- package/dist/shared/context/tour-context.js +0 -14
- package/dist/shared/context/tour-context.js.map +0 -1
- package/dist/shared/hooks/index.d.ts +0 -1
- package/dist/shared/hooks/index.js +0 -2
- package/dist/shared/hooks/index.js.map +0 -1
- package/dist/shared/hooks/use-tour.hook.d.ts +0 -2
- package/dist/shared/hooks/use-tour.hook.js +0 -7
- package/dist/shared/hooks/use-tour.hook.js.map +0 -1
- package/dist/shared/index.d.ts +0 -7
- package/dist/shared/index.js +0 -6
- package/dist/shared/index.js.map +0 -1
- package/dist/shared/types/index.d.ts +0 -10
- package/dist/shared/types/index.js +0 -2
- package/dist/shared/types/index.js.map +0 -1
- package/dist/shared/types/platform-adapter.type.d.ts +0 -24
- package/dist/shared/types/platform-adapter.type.js +0 -2
- package/dist/shared/types/platform-adapter.type.js.map +0 -1
- package/dist/shared/types/rect.type.d.ts +0 -11
- package/dist/shared/types/rect.type.js +0 -2
- package/dist/shared/types/rect.type.js.map +0 -1
- package/dist/shared/types/tour-overlay-props.type.d.ts +0 -8
- package/dist/shared/types/tour-overlay-props.type.js +0 -2
- package/dist/shared/types/tour-overlay-props.type.js.map +0 -1
- package/dist/shared/utils/calculate-tooltip-position.util.d.ts +0 -14
- package/dist/shared/utils/calculate-tooltip-position.util.js +0 -49
- package/dist/shared/utils/calculate-tooltip-position.util.js.map +0 -1
- package/dist/shared/utils/index.d.ts +0 -3
- package/dist/shared/utils/index.js +0 -3
- package/dist/shared/utils/index.js.map +0 -1
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type {TourStep} from './tour-step.type.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Why a tour ended.
|
|
5
|
+
* - `completed`: the user finished the last step.
|
|
6
|
+
* - `closed`: the close button, `endTour()`, the Android back button, or another tour was started.
|
|
7
|
+
* - `blur`: the user clicked or tapped the dimmed area (see `closeOnOverlayClick`).
|
|
8
|
+
* - `escape`: Escape on the web, the VoiceOver escape gesture on iOS.
|
|
9
|
+
* - `target-missing`: no remaining step had a target that could be found and shown.
|
|
10
|
+
* - `error`: a step's `onBeforeStep` threw or rejected; see {@link TourEndInfo.error}.
|
|
11
|
+
*/
|
|
12
|
+
export type TourEndReason = 'completed' | 'closed' | 'blur' | 'escape' | 'target-missing' | 'error';
|
|
13
|
+
|
|
14
|
+
/** Details about how and where a tour ended. */
|
|
15
|
+
export type TourEndInfo = {
|
|
16
|
+
readonly reason: TourEndReason;
|
|
17
|
+
/** Zero-based index of the step the user was on (for `target-missing`: the last step that was tried). */
|
|
18
|
+
readonly stepIndex: number;
|
|
19
|
+
readonly step: TourStep;
|
|
20
|
+
readonly totalSteps: number;
|
|
21
|
+
/** The error thrown by `onBeforeStep` when `reason` is `'error'`. */
|
|
22
|
+
readonly error?: unknown;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/** Called once when a tour ends. */
|
|
26
|
+
export type TourEndCallback = (tourId: string | undefined, info: TourEndInfo) => void;
|
|
27
|
+
|
|
28
|
+
/** Options for a single tour, passed to `startTour`. */
|
|
29
|
+
export type StartTourOptions = {
|
|
30
|
+
/** Called when this tour ends, before the provider's `onTourEnd`. */
|
|
31
|
+
readonly onTourEnd?: TourEndCallback;
|
|
32
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** Texts of the built-in tooltip. Every key is optional. */
|
|
2
|
+
export type TourI18n = {
|
|
3
|
+
/** @defaultValue `'Next'` */
|
|
4
|
+
readonly nextLabel?: string;
|
|
5
|
+
/** @defaultValue `'Back'` */
|
|
6
|
+
readonly prevLabel?: string;
|
|
7
|
+
/** Label of the Next button on the last step. @defaultValue `'Finish'` */
|
|
8
|
+
readonly finishLabel?: string;
|
|
9
|
+
/** Step counter; `{current}` and `{total}` are replaced. @defaultValue `'{current} of {total}'` */
|
|
10
|
+
readonly stepCounterTemplate?: string;
|
|
11
|
+
/** Accessible name of the close button. @defaultValue `'Close tour'` */
|
|
12
|
+
readonly closeAriaLabel?: string;
|
|
13
|
+
/** Accessible name of each step dot; `{step}` and `{total}` are replaced. @defaultValue `'Go to step {step}'` */
|
|
14
|
+
readonly dotAriaLabelTemplate?: string;
|
|
15
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type {ReactNode, RefObject} from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Preferred side of the target for the tooltip. If there is not enough room on that side, the
|
|
5
|
+
* tooltip moves to the opposite side, then to the roomier of the remaining sides.
|
|
6
|
+
*/
|
|
7
|
+
export type TourPlacement = 'top' | 'bottom' | 'left' | 'right';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* What a step highlights.
|
|
11
|
+
* - Web: a CSS selector such as `'[data-tour="settings"]'`, or a ref to a DOM element.
|
|
12
|
+
* - React Native: an id registered with `useTourTarget`, or a ref to a native view.
|
|
13
|
+
*/
|
|
14
|
+
export type TourTarget = string | RefObject<unknown>;
|
|
15
|
+
|
|
16
|
+
/** Second argument of {@link TourStep.onBeforeStep}. */
|
|
17
|
+
export type TourStepContext = {
|
|
18
|
+
/**
|
|
19
|
+
* Aborted when the step is abandoned before it is shown (the user navigates elsewhere or the
|
|
20
|
+
* tour ends). Pass it to `fetch` or check `signal.aborted` in long-running work.
|
|
21
|
+
*/
|
|
22
|
+
readonly signal: AbortSignal;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export type TourStep = {
|
|
26
|
+
/** The element to highlight. Leave it out for a step that is shown in the centre of the screen. */
|
|
27
|
+
readonly target?: TourTarget;
|
|
28
|
+
readonly title: ReactNode;
|
|
29
|
+
readonly content: ReactNode;
|
|
30
|
+
/** @defaultValue `'bottom'` */
|
|
31
|
+
readonly placement?: TourPlacement;
|
|
32
|
+
/**
|
|
33
|
+
* Runs before the step is shown, for example to navigate to another page or open a menu.
|
|
34
|
+
* The tour then waits (up to 5 seconds) for the target to appear, so there is no need to poll.
|
|
35
|
+
*
|
|
36
|
+
* Make it idempotent: it runs again if the user comes back to this step.
|
|
37
|
+
* If it throws or rejects, the tour ends with the reason `'error'`.
|
|
38
|
+
*/
|
|
39
|
+
readonly onBeforeStep?: (target: TourTarget | undefined, context: TourStepContext) => void | Promise<void>;
|
|
40
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/** Colours of the built-in tooltip and overlay. Every key is optional. */
|
|
2
|
+
export type TourTheme = {
|
|
3
|
+
/**
|
|
4
|
+
* Buttons, the step badge, the active dot and the highlight ring.
|
|
5
|
+
* @defaultValue `'#2563eb'`
|
|
6
|
+
*/
|
|
7
|
+
readonly primaryColor?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Text on `primaryColor` (the Next button and the step badge).
|
|
10
|
+
* @defaultValue `'#ffffff'`
|
|
11
|
+
*/
|
|
12
|
+
readonly primaryTextColor?: string;
|
|
13
|
+
/** @defaultValue `'#ffffff'` */
|
|
14
|
+
readonly tooltipBackground?: string;
|
|
15
|
+
/** @defaultValue `'#111827'` */
|
|
16
|
+
readonly titleColor?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Body text. Muted elements (inactive dots, dividers, the Back button) are derived from it, so a
|
|
19
|
+
* dark theme only needs a dark `tooltipBackground` and light text colours.
|
|
20
|
+
* @defaultValue `'#4b5563'`
|
|
21
|
+
*/
|
|
22
|
+
readonly contentColor?: string;
|
|
23
|
+
/**
|
|
24
|
+
* The dimmed area around the highlighted element. Include transparency.
|
|
25
|
+
* @defaultValue `'rgba(0, 0, 0, 0.5)'`
|
|
26
|
+
*/
|
|
27
|
+
readonly overlayColor?: string;
|
|
28
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type {TourPlacement, TourStep} from './tour-step.type.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Props of a custom `TooltipComponent`. The component only renders the card's content: the tour
|
|
5
|
+
* measures, positions, animates and focuses it, and keeps it on screen.
|
|
6
|
+
*/
|
|
7
|
+
export type TourTooltipProps = {
|
|
8
|
+
readonly step: TourStep;
|
|
9
|
+
/** Zero-based index of the step. */
|
|
10
|
+
readonly currentStep: number;
|
|
11
|
+
readonly totalSteps: number;
|
|
12
|
+
readonly onNext: () => void;
|
|
13
|
+
readonly onPrev: () => void;
|
|
14
|
+
readonly onClose: () => void;
|
|
15
|
+
readonly onGoToStep: (index: number) => void;
|
|
16
|
+
/** Side of the target the tooltip ended up on, or `'center'` for steps without a target. Use it to draw an arrow. */
|
|
17
|
+
readonly placement: TourPlacement | 'center';
|
|
18
|
+
/**
|
|
19
|
+
* Distance in pixels from the tooltip's left edge (for `top`/`bottom`) or top edge (for
|
|
20
|
+
* `left`/`right`) to where an arrow should point. `undefined` when no arrow should be drawn.
|
|
21
|
+
*/
|
|
22
|
+
readonly arrowOffset: number | undefined;
|
|
23
|
+
/** Put `id={titleId}` on the element showing the title so screen readers announce it. */
|
|
24
|
+
readonly titleId: string;
|
|
25
|
+
/** Put `id={descriptionId}` on the element showing the content. */
|
|
26
|
+
readonly descriptionId: string;
|
|
27
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const frameMs = 16;
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Calls `callback` before the next frame is drawn, or after about one frame where there are no
|
|
5
|
+
* frames (test environments without `requestAnimationFrame`). Returns the cancellation.
|
|
6
|
+
*/
|
|
7
|
+
export function requestFrame(callback: () => void): () => void {
|
|
8
|
+
if (typeof globalThis.requestAnimationFrame === 'function') {
|
|
9
|
+
const frame = globalThis.requestAnimationFrame(() => {
|
|
10
|
+
callback();
|
|
11
|
+
});
|
|
12
|
+
return () => {
|
|
13
|
+
globalThis.cancelAnimationFrame(frame);
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const timer = setTimeout(callback, frameMs);
|
|
18
|
+
return () => {
|
|
19
|
+
clearTimeout(timer);
|
|
20
|
+
};
|
|
21
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/** One item in the step indicator: a dot for a step, or an ellipsis standing in for several steps. */
|
|
2
|
+
export type DotItem =
|
|
3
|
+
{readonly type: 'dot'; readonly index: number} | {readonly type: 'ellipsis'; readonly position: 'start' | 'end'};
|
|
4
|
+
|
|
5
|
+
const maxVisible = 7;
|
|
6
|
+
const siblings = (maxVisible - 5) / 2;
|
|
7
|
+
|
|
8
|
+
function range(from: number, to: number): DotItem[] {
|
|
9
|
+
return Array.from({length: to - from + 1}, (_, offset) => ({type: 'dot', index: from + offset}));
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* The step indicator for `totalSteps` steps with `currentStep` (zero-based) selected.
|
|
14
|
+
*
|
|
15
|
+
* Up to 7 steps every step gets a dot. Above that the result always has exactly 7 items, so the
|
|
16
|
+
* indicator keeps a constant width: the first and last step, the current step and its neighbours,
|
|
17
|
+
* and ellipses for the rest. An ellipsis always stands for at least two steps.
|
|
18
|
+
*/
|
|
19
|
+
export function getTruncatedDots(currentStep: number, totalSteps: number): DotItem[] {
|
|
20
|
+
const total = Number.isFinite(totalSteps) ? Math.max(0, Math.floor(totalSteps)) : 0;
|
|
21
|
+
if (total === 0) {
|
|
22
|
+
return [];
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
if (total <= maxVisible) {
|
|
26
|
+
return range(0, total - 1);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const last = total - 1;
|
|
30
|
+
const current = Math.min(Math.max(Number.isFinite(currentStep) ? Math.floor(currentStep) : 0, 0), last);
|
|
31
|
+
if (current <= maxVisible - 3 - siblings) {
|
|
32
|
+
return [...range(0, maxVisible - 3), {type: 'ellipsis', position: 'end'}, {type: 'dot', index: last}];
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
if (current >= total - (maxVisible - 2) + siblings) {
|
|
36
|
+
return [{type: 'dot', index: 0}, {type: 'ellipsis', position: 'start'}, ...range(total - (maxVisible - 2), last)];
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
return [
|
|
40
|
+
{type: 'dot', index: 0},
|
|
41
|
+
{type: 'ellipsis', position: 'start'},
|
|
42
|
+
...range(current - siblings, current + siblings),
|
|
43
|
+
{type: 'ellipsis', position: 'end'},
|
|
44
|
+
{type: 'dot', index: last},
|
|
45
|
+
];
|
|
46
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type {TourI18n} from '../types/tour-i18n.type.js';
|
|
2
|
+
|
|
3
|
+
export type ResolvedI18n = Required<TourI18n>;
|
|
4
|
+
|
|
5
|
+
export const defaultI18n: ResolvedI18n = {
|
|
6
|
+
nextLabel: 'Next',
|
|
7
|
+
prevLabel: 'Back',
|
|
8
|
+
finishLabel: 'Finish',
|
|
9
|
+
stepCounterTemplate: '{current} of {total}',
|
|
10
|
+
closeAriaLabel: 'Close tour',
|
|
11
|
+
dotAriaLabelTemplate: 'Go to step {step}',
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const i18nKeys = [
|
|
15
|
+
'nextLabel',
|
|
16
|
+
'prevLabel',
|
|
17
|
+
'finishLabel',
|
|
18
|
+
'stepCounterTemplate',
|
|
19
|
+
'closeAriaLabel',
|
|
20
|
+
'dotAriaLabelTemplate',
|
|
21
|
+
] as const satisfies ReadonlyArray<keyof TourI18n>;
|
|
22
|
+
|
|
23
|
+
export function resolveI18n(i18n: TourI18n | undefined): ResolvedI18n {
|
|
24
|
+
if (!i18n) {
|
|
25
|
+
return defaultI18n;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const resolved = {...defaultI18n};
|
|
29
|
+
for (const key of i18nKeys) {
|
|
30
|
+
const value = i18n[key];
|
|
31
|
+
if (typeof value === 'string') {
|
|
32
|
+
resolved[key] = value;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
return resolved;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/** Replaces every `{name}` placeholder with its value; unknown placeholders are left as they are. */
|
|
40
|
+
export function formatTemplate(template: string, values: Readonly<Record<string, string | number>>): string {
|
|
41
|
+
return template.replaceAll(/\{(\w+)\}/gu, (match, name: string) =>
|
|
42
|
+
Object.hasOwn(values, name) ? String(values[name]) : match,
|
|
43
|
+
);
|
|
44
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type {TourTheme} from '../types/tour-theme.type.js';
|
|
2
|
+
|
|
3
|
+
export type ResolvedTheme = Required<TourTheme>;
|
|
4
|
+
|
|
5
|
+
export const defaultTheme: ResolvedTheme = {
|
|
6
|
+
primaryColor: '#2563eb',
|
|
7
|
+
primaryTextColor: '#ffffff',
|
|
8
|
+
tooltipBackground: '#ffffff',
|
|
9
|
+
titleColor: '#111827',
|
|
10
|
+
contentColor: '#4b5563',
|
|
11
|
+
overlayColor: 'rgba(0, 0, 0, 0.5)',
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const themeKeys = [
|
|
15
|
+
'primaryColor',
|
|
16
|
+
'primaryTextColor',
|
|
17
|
+
'tooltipBackground',
|
|
18
|
+
'titleColor',
|
|
19
|
+
'contentColor',
|
|
20
|
+
'overlayColor',
|
|
21
|
+
] as const satisfies ReadonlyArray<keyof TourTheme>;
|
|
22
|
+
|
|
23
|
+
/** Fills in defaults for missing (or `undefined`) keys. */
|
|
24
|
+
export function resolveTheme(theme: TourTheme | undefined): ResolvedTheme {
|
|
25
|
+
if (!theme) {
|
|
26
|
+
return defaultTheme;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const resolved = {...defaultTheme};
|
|
30
|
+
for (const key of themeKeys) {
|
|
31
|
+
const value = theme[key];
|
|
32
|
+
if (typeof value === 'string' && value.length > 0) {
|
|
33
|
+
resolved[key] = value;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return resolved;
|
|
38
|
+
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/react-native-platform/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAE3C,OAAO,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
const { View, StyleSheet, TouchableWithoutFeedback } = require('react-native');
|
|
3
|
-
const { default: Svg, Defs, Mask, Rect } = require('react-native-svg');
|
|
4
|
-
const highlightPadding = 8;
|
|
5
|
-
const highlightBorderRadius = 8;
|
|
6
|
-
export function TourOverlay({ highlightRect, onClose, theme, closeOnOverlayClick }) {
|
|
7
|
-
const x = highlightRect.left - highlightPadding;
|
|
8
|
-
const y = highlightRect.top - highlightPadding;
|
|
9
|
-
const width = highlightRect.width + highlightPadding * 2;
|
|
10
|
-
const height = highlightRect.height + highlightPadding * 2;
|
|
11
|
-
const overlayContent = (_jsxs(View, { style: StyleSheet.absoluteFill, pointerEvents: closeOnOverlayClick ? 'auto' : 'none', children: [_jsxs(Svg, { style: StyleSheet.absoluteFill, children: [_jsx(Defs, { children: _jsxs(Mask, { id: "tour-mask", children: [_jsx(Rect, { x: "0", y: "0", width: "100%", height: "100%", fill: "white" }), _jsx(Rect, { x: x, y: y, width: width, height: height, rx: highlightBorderRadius, fill: "black" })] }) }), _jsx(Rect, { x: "0", y: "0", width: "100%", height: "100%", fill: theme.overlayColor, mask: "url(#tour-mask)" })] }), _jsx(View, { pointerEvents: "none", style: {
|
|
12
|
-
position: 'absolute',
|
|
13
|
-
top: y,
|
|
14
|
-
left: x,
|
|
15
|
-
width,
|
|
16
|
-
height,
|
|
17
|
-
borderRadius: highlightBorderRadius,
|
|
18
|
-
borderWidth: 2,
|
|
19
|
-
borderColor: theme.primaryColor,
|
|
20
|
-
} })] }));
|
|
21
|
-
if (closeOnOverlayClick) {
|
|
22
|
-
return _jsx(TouchableWithoutFeedback, { onPress: onClose, children: overlayContent });
|
|
23
|
-
}
|
|
24
|
-
return overlayContent;
|
|
25
|
-
}
|
|
26
|
-
//# sourceMappingURL=tour-overlay.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tour-overlay.js","sourceRoot":"","sources":["../../../src/react-native-platform/components/tour-overlay.tsx"],"names":[],"mappings":";AAGA,MAAM,EAAC,IAAI,EAAE,UAAU,EAAE,wBAAwB,EAAC,GAAG,OAAO,CAAC,cAAc,CAAkC,CAAC;AAC9G,MAAM,EAAC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAC,GAAG,OAAO,CAAC,kBAAkB,CAAsC,CAAC;AAE1G,MAAM,gBAAgB,GAAG,CAAC,CAAC;AAC3B,MAAM,qBAAqB,GAAG,CAAC,CAAC;AAMhC,MAAM,UAAU,WAAW,CAAC,EAAC,aAAa,EAAE,OAAO,EAAE,KAAK,EAAE,mBAAmB,EAAmB;IAChG,MAAM,CAAC,GAAG,aAAa,CAAC,IAAI,GAAG,gBAAgB,CAAC;IAChD,MAAM,CAAC,GAAG,aAAa,CAAC,GAAG,GAAG,gBAAgB,CAAC;IAC/C,MAAM,KAAK,GAAG,aAAa,CAAC,KAAK,GAAG,gBAAgB,GAAG,CAAC,CAAC;IACzD,MAAM,MAAM,GAAG,aAAa,CAAC,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c,CAAC;AACxB,CAAC"}
|
|
@@ -1,167 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef, useCallback, useMemo } from 'react';
|
|
3
|
-
import { getTruncatedDots, DOTS_CONTAINER_WIDTH, DOT_SIZE, DOT_GAP } from '../../shared/utils';
|
|
4
|
-
const { View, Text, TouchableOpacity, StyleSheet } = require('react-native');
|
|
5
|
-
const defaultI18n = {
|
|
6
|
-
nextLabel: 'Next',
|
|
7
|
-
prevLabel: 'Back',
|
|
8
|
-
finishLabel: 'Done',
|
|
9
|
-
stepCounterTemplate: 'Step {current} of {total}',
|
|
10
|
-
};
|
|
11
|
-
export const TourTooltip = forwardRef(function TourTooltip({ title, content, currentStep, totalSteps, position, isPositioned, onClose, onNext, onPrev, onMeasured, theme, i18n, }, ref) {
|
|
12
|
-
const { nextLabel, prevLabel, finishLabel, stepCounterTemplate } = { ...defaultI18n, ...i18n };
|
|
13
|
-
const isFirstStep = currentStep === 0;
|
|
14
|
-
const isLastStep = currentStep === totalSteps - 1;
|
|
15
|
-
const handleLayout = useCallback((event) => {
|
|
16
|
-
if (!onMeasured) {
|
|
17
|
-
return;
|
|
18
|
-
}
|
|
19
|
-
const { width, height } = event.nativeEvent.layout;
|
|
20
|
-
onMeasured({ width, height });
|
|
21
|
-
}, [onMeasured]);
|
|
22
|
-
const themedStyles = useMemo(() => ({
|
|
23
|
-
container: {
|
|
24
|
-
backgroundColor: theme.tooltipBackground,
|
|
25
|
-
},
|
|
26
|
-
stepBadge: {
|
|
27
|
-
backgroundColor: theme.primaryColor,
|
|
28
|
-
},
|
|
29
|
-
closeButtonText: {
|
|
30
|
-
color: theme.contentColor,
|
|
31
|
-
},
|
|
32
|
-
title: {
|
|
33
|
-
color: theme.titleColor,
|
|
34
|
-
},
|
|
35
|
-
content: {
|
|
36
|
-
color: theme.contentColor,
|
|
37
|
-
},
|
|
38
|
-
nextButton: {
|
|
39
|
-
backgroundColor: theme.primaryColor,
|
|
40
|
-
},
|
|
41
|
-
dotActive: {
|
|
42
|
-
backgroundColor: theme.primaryColor,
|
|
43
|
-
},
|
|
44
|
-
}), [theme]);
|
|
45
|
-
return (_jsxs(View, { ref: ref, style: [
|
|
46
|
-
styles.container,
|
|
47
|
-
themedStyles.container,
|
|
48
|
-
{
|
|
49
|
-
top: position.top,
|
|
50
|
-
left: position.left,
|
|
51
|
-
opacity: isPositioned ? 1 : 0,
|
|
52
|
-
},
|
|
53
|
-
], onLayout: handleLayout, children: [_jsxs(View, { style: styles.header, children: [_jsx(View, { style: [styles.stepBadge, themedStyles.stepBadge], children: _jsx(Text, { style: styles.stepBadgeText, children: stepCounterTemplate.replace('{current}', String(currentStep + 1)).replace('{total}', String(totalSteps)) }) }), _jsx(TouchableOpacity, { style: styles.closeButton, onPress: onClose, children: _jsx(Text, { style: [styles.closeButtonText, themedStyles.closeButtonText], children: "\u00D7" }) })] }), _jsxs(View, { style: styles.body, children: [_jsx(Text, { style: [styles.title, themedStyles.title], children: title }), _jsx(Text, { style: [styles.content, themedStyles.content], children: content })] }), _jsxs(View, { style: styles.footer, children: [_jsx(TouchableOpacity, { disabled: isFirstStep, style: [styles.navButton, styles.prevButton, isFirstStep && styles.buttonDisabled], onPress: onPrev, children: _jsx(Text, { style: [styles.prevButtonText, isFirstStep && styles.buttonTextDisabled], children: prevLabel }) }), _jsx(View, { style: styles.dots, children: getTruncatedDots(currentStep, totalSteps).map((item, i) => item.type === 'ellipsis' ? (_jsxs(View, { style: styles.ellipsis, children: [_jsx(View, { style: styles.ellipsisDot }), _jsx(View, { style: styles.ellipsisDot })] }, `ellipsis-${i}`)) : (_jsx(View, { style: [styles.dot, item.index === currentStep && themedStyles.dotActive] }, item.index))) }), _jsx(TouchableOpacity, { style: [styles.navButton, themedStyles.nextButton], onPress: onNext, children: _jsx(Text, { style: styles.nextButtonText, children: isLastStep ? finishLabel : nextLabel }) })] })] }));
|
|
54
|
-
});
|
|
55
|
-
const styles = StyleSheet.create({
|
|
56
|
-
container: {
|
|
57
|
-
position: 'absolute',
|
|
58
|
-
width: 320,
|
|
59
|
-
borderRadius: 12,
|
|
60
|
-
shadowColor: '#000',
|
|
61
|
-
shadowOffset: { width: 0, height: 4 },
|
|
62
|
-
shadowOpacity: 0.15,
|
|
63
|
-
shadowRadius: 12,
|
|
64
|
-
elevation: 8,
|
|
65
|
-
},
|
|
66
|
-
header: {
|
|
67
|
-
flexDirection: 'row',
|
|
68
|
-
justifyContent: 'space-between',
|
|
69
|
-
alignItems: 'center',
|
|
70
|
-
paddingHorizontal: 16,
|
|
71
|
-
paddingTop: 16,
|
|
72
|
-
paddingBottom: 12,
|
|
73
|
-
borderBottomWidth: 1,
|
|
74
|
-
borderBottomColor: '#e5e7eb',
|
|
75
|
-
},
|
|
76
|
-
stepBadge: {
|
|
77
|
-
paddingHorizontal: 10,
|
|
78
|
-
paddingVertical: 4,
|
|
79
|
-
borderRadius: 6,
|
|
80
|
-
},
|
|
81
|
-
stepBadgeText: {
|
|
82
|
-
color: '#ffffff',
|
|
83
|
-
fontSize: 12,
|
|
84
|
-
fontWeight: '600',
|
|
85
|
-
},
|
|
86
|
-
closeButton: {
|
|
87
|
-
padding: 4,
|
|
88
|
-
},
|
|
89
|
-
closeButtonText: {
|
|
90
|
-
fontSize: 24,
|
|
91
|
-
lineHeight: 24,
|
|
92
|
-
},
|
|
93
|
-
body: {
|
|
94
|
-
padding: 16,
|
|
95
|
-
},
|
|
96
|
-
title: {
|
|
97
|
-
fontSize: 18,
|
|
98
|
-
fontWeight: '600',
|
|
99
|
-
marginBottom: 8,
|
|
100
|
-
},
|
|
101
|
-
content: {
|
|
102
|
-
fontSize: 14,
|
|
103
|
-
lineHeight: 20,
|
|
104
|
-
},
|
|
105
|
-
footer: {
|
|
106
|
-
flexDirection: 'row',
|
|
107
|
-
justifyContent: 'space-between',
|
|
108
|
-
alignItems: 'center',
|
|
109
|
-
paddingHorizontal: 16,
|
|
110
|
-
paddingBottom: 16,
|
|
111
|
-
paddingTop: 8,
|
|
112
|
-
},
|
|
113
|
-
navButton: {
|
|
114
|
-
paddingHorizontal: 16,
|
|
115
|
-
paddingVertical: 10,
|
|
116
|
-
borderRadius: 8,
|
|
117
|
-
minWidth: 80,
|
|
118
|
-
alignItems: 'center',
|
|
119
|
-
},
|
|
120
|
-
prevButton: {
|
|
121
|
-
backgroundColor: '#f3f4f6',
|
|
122
|
-
},
|
|
123
|
-
prevButtonText: {
|
|
124
|
-
fontSize: 14,
|
|
125
|
-
fontWeight: '500',
|
|
126
|
-
color: '#1f2937',
|
|
127
|
-
},
|
|
128
|
-
nextButtonText: {
|
|
129
|
-
fontSize: 14,
|
|
130
|
-
fontWeight: '500',
|
|
131
|
-
color: '#ffffff',
|
|
132
|
-
},
|
|
133
|
-
buttonDisabled: {
|
|
134
|
-
opacity: 0.5,
|
|
135
|
-
},
|
|
136
|
-
buttonTextDisabled: {
|
|
137
|
-
color: '#9ca3af',
|
|
138
|
-
},
|
|
139
|
-
dots: {
|
|
140
|
-
flexDirection: 'row',
|
|
141
|
-
gap: DOT_GAP,
|
|
142
|
-
width: DOTS_CONTAINER_WIDTH,
|
|
143
|
-
justifyContent: 'center',
|
|
144
|
-
alignItems: 'center',
|
|
145
|
-
},
|
|
146
|
-
dot: {
|
|
147
|
-
width: DOT_SIZE,
|
|
148
|
-
height: DOT_SIZE,
|
|
149
|
-
borderRadius: DOT_SIZE / 2,
|
|
150
|
-
backgroundColor: '#d1d5db',
|
|
151
|
-
},
|
|
152
|
-
ellipsis: {
|
|
153
|
-
width: DOT_SIZE,
|
|
154
|
-
height: DOT_SIZE,
|
|
155
|
-
flexDirection: 'row',
|
|
156
|
-
alignItems: 'center',
|
|
157
|
-
justifyContent: 'center',
|
|
158
|
-
gap: 2,
|
|
159
|
-
},
|
|
160
|
-
ellipsisDot: {
|
|
161
|
-
width: 3,
|
|
162
|
-
height: 3,
|
|
163
|
-
borderRadius: 1.5,
|
|
164
|
-
backgroundColor: '#d1d5db',
|
|
165
|
-
},
|
|
166
|
-
});
|
|
167
|
-
//# sourceMappingURL=tour-tooltip.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tour-tooltip.js","sourceRoot":"","sources":["../../../src/react-native-platform/components/tour-tooltip.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAiB,UAAU,EAAqB,WAAW,EAAE,OAAO,EAAC,MAAM,OAAO,CAAC;AAG1F,OAAO,EAAC,gBAAgB,EAAE,oBAAoB,EAAE,QAAQ,EAAE,OAAO,EAAC,MAAM,oBAAoB,CAAC;AAE7F,MAAM,EAAC,IAAI,EAAE,IAAI,EAAE,gBAAgB,EAAE,UAAU,EAAC,GAAG,OAAO,CAAC,cAAc,CAAkC,CAAC;AAE5G,MAAM,WAAW,GAAG;IAClB,SAAS,EAAE,MAAM;IACjB,SAAS,EAAE,MAAM;IACjB,WAAW,EAAE,MAAM;IACnB,mBAAmB,EAAE,2BAA2B;CACjD,CAAC;AAOF,MAAM,CAAC,MAAM,WAAW,GAAG,UAAU,CAAC,SAAS,WAAW,CACxD,EACE,KAAK,EACL,OAAO,EACP,WAAW,EACX,UAAU,EACV,QAAQ,EACR,YAAY,EACZ,OAAO,EACP,MAAM,EACN,MAAM,EACN,UAAU,EACV,KAAK,EACL,IAAI,GACa,EACnB,GAA2B;IAE3B,MAAM,EAAC,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,mBAAmB,EAAC,GAAG,EAAC,GAAG,WAAW,EAAE,GAAG,IAAI,EAAC,CAAC;IAE3F,MAAM,WAAW,GAAG,WAAW,KAAK,CAAC,CAAC;IACtC,MAAM,UAAU,GAAG,WAAW,KAAK,UAAU,GAAG,CAAC,CAAC;IAElD,MAAM,YAAY,GAAG,WAAW,CAC9B,CAAC,KAAwB,EAAQ,EAAE;QACjC,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,OAAO;QACT,CAAC;QAED,MAAM,EAAC,KAAK,EAAE,MAAM,EAAC,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;QACH,KAAK,EAAE,QAAQ;QACf,MAAM,EAAE,QAAQ;QAChB,YAAY,EAAE,QAAQ,GAAG,CAAC;QAC1B,eAAe,EAAE,SAAS;KAC3B;IACD,QAAQ,EAAE;QACR,KAAK,EAAE,QAAQ;QACf,MAAM,EAAE,QAAQ;QAChB,aAAa,EAAE,KAAK;QACpB,UAAU,EAAE,QAAQ;QACpB,cAAc,EAAE,QAAQ;QACxB,GAAG,EAAE,CAAC;KACP;IACD,WAAW,EAAE;QACX,KAAK,EAAE,CAAC;QACR,MAAM,EAAE,CAAC;QACT,YAAY,EAAE,GAAG;QACjB,eAAe,EAAE,SAAS;KAC3B;CACF,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { useTourTarget } from './use-tour-target';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/react-native-platform/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAC,MAAM,mBAAmB,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { useRef, useEffect } from 'react';
|
|
2
|
-
import { targetRegistry } from '../target-registry';
|
|
3
|
-
export function useTourTarget(id) {
|
|
4
|
-
const ref = useRef(null);
|
|
5
|
-
useEffect(() => {
|
|
6
|
-
targetRegistry.register(id, ref);
|
|
7
|
-
return () => {
|
|
8
|
-
targetRegistry.unregister(id);
|
|
9
|
-
};
|
|
10
|
-
}, [id]);
|
|
11
|
-
return ref;
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=use-tour-target.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-tour-target.js","sourceRoot":"","sources":["../../../src/react-native-platform/hooks/use-tour-target.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAE,SAAS,EAAiB,MAAM,OAAO,CAAC;AACxD,OAAO,EAAC,cAAc,EAAC,MAAM,oBAAoB,CAAC;AAsBlD,MAAM,UAAU,aAAa,CAAc,EAAU;IACnD,MAAM,GAAG,GAAG,MAAM,CAAW,IAAI,CAAC,CAAC;IAEnC,SAAS,CAAC,GAAG,EAAE;QACb,cAAc,CAAC,QAAQ,CAAC,EAAE,EAAE,GAAyB,CAAC,CAAC;QAEvD,OAAO,GAAS,EAAE;YAChB,cAAc,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;QAChC,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IAET,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export { TourProvider } from './tour-provider';
|
|
2
|
-
export type { TourProviderProps } from './types/tour-provider.props.type';
|
|
3
|
-
export { TourOverlay } from './components/tour-overlay';
|
|
4
|
-
export { TourTooltip } from './components/tour-tooltip';
|
|
5
|
-
export { useTourTarget } from './hooks';
|
|
6
|
-
export { nativePlatformAdapter } from './platform-adapter';
|
|
7
|
-
export { targetRegistry } from './target-registry';
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export { TourProvider } from './tour-provider';
|
|
2
|
-
export { TourOverlay } from './components/tour-overlay';
|
|
3
|
-
export { TourTooltip } from './components/tour-tooltip';
|
|
4
|
-
export { useTourTarget } from './hooks';
|
|
5
|
-
export { nativePlatformAdapter } from './platform-adapter';
|
|
6
|
-
export { targetRegistry } from './target-registry';
|
|
7
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/react-native-platform/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,YAAY,EAAC,MAAM,iBAAiB,CAAC;AAG7C,OAAO,EAAC,WAAW,EAAC,MAAM,2BAA2B,CAAC;AAEtD,OAAO,EAAC,WAAW,EAAC,MAAM,2BAA2B,CAAC;AAItD,OAAO,EAAC,aAAa,EAAC,MAAM,SAAS,CAAC;AAItC,OAAO,EAAC,qBAAqB,EAAC,MAAM,oBAAoB,CAAC;AAEzD,OAAO,EAAC,cAAc,EAAC,MAAM,mBAAmB,CAAC"}
|