@retoo/borda 0.1.0 → 0.1.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.
package/dist/borda.cjs.js CHANGED
@@ -8442,11 +8442,9 @@ function useTooltipPosition({ getTargetElement, getTooltipElement, getPlacement,
8442
8442
  const padding = /* @__PURE__ */ user_derived(getPadding);
8443
8443
  const autoPlacement = /* @__PURE__ */ user_derived(getAutoPlacement);
8444
8444
  const arrowSide = /* @__PURE__ */ user_derived(getArrowSide);
8445
- user_effect(() => {
8445
+ /** Reads the live target/tooltip rects and writes the resolved position into state. */
8446
+ function recompute() {
8446
8447
  if (!get(target) || !get(tooltip)) return;
8447
- /** Re-run on scroll so auto-flip/shift recompute against the live viewport. */
8448
- scroll.x;
8449
- scroll.y;
8450
8448
  const layout = useTooltipLayout({
8451
8449
  target: get(target),
8452
8450
  tooltip: get(tooltip),
@@ -8465,6 +8463,19 @@ function useTooltipPosition({ getTargetElement, getTooltipElement, getPlacement,
8465
8463
  set(left, layout.position.left, true);
8466
8464
  set(effectivePlacement, layout.placement, true);
8467
8465
  set(arrowOffset, layout.arrowOffset, true);
8466
+ }
8467
+ user_effect(() => {
8468
+ if (!get(tooltip)) return;
8469
+ /** Re-run when the tooltip's own size changes (e.g. an image finishes loading). */
8470
+ const observer = new ResizeObserver(recompute);
8471
+ observer.observe(get(tooltip));
8472
+ return () => observer.disconnect();
8473
+ });
8474
+ user_effect(() => {
8475
+ /** Re-run on scroll so auto-flip/shift recompute against the live viewport. */
8476
+ scroll.x;
8477
+ scroll.y;
8478
+ recompute();
8468
8479
  });
8469
8480
  return {
8470
8481
  get top() {
@@ -8949,9 +8960,8 @@ function Borda($$anchor, $$props) {
8949
8960
  getDuration: () => $$props.animation.overlay.transitionDuration
8950
8961
  });
8951
8962
  useFocusTrap({ getContainer: () => get(bordaContainer)?.getElements()?.root ?? null });
8952
- const size = /* @__PURE__ */ user_derived(() => $$props.config.size);
8953
- const shape = /* @__PURE__ */ user_derived(() => $$props.config.shape);
8954
8963
  const rootClasses = /* @__PURE__ */ user_derived(() => ["rb"]);
8964
+ /** Container chrome isn't per-step content, so it always tracks the live config. */
8955
8965
  const containerProps = /* @__PURE__ */ user_derived(() => ({
8956
8966
  ...$$props.config.container,
8957
8967
  customClasses: {
@@ -8959,13 +8969,6 @@ function Borda($$anchor, $$props) {
8959
8969
  root: [$$props.config.container?.customClasses?.root, containerAnimator.classes]
8960
8970
  }
8961
8971
  }));
8962
- const tourOverlayProps = /* @__PURE__ */ user_derived(() => $$props.config.tourOverlay);
8963
- const tourTooltipProps = /* @__PURE__ */ user_derived(() => $$props.config.tourTooltip);
8964
- const tourImageProps = /* @__PURE__ */ user_derived(() => $$props.config.tourImage);
8965
- const tourButtonsProps = /* @__PURE__ */ user_derived(() => $$props.config.tourButtons);
8966
- const tourProgressProps = /* @__PURE__ */ user_derived(() => $$props.config.tourProgress);
8967
- const tourSkipProps = /* @__PURE__ */ user_derived(() => $$props.config.tourSkip);
8968
- const closeButtonProps = /* @__PURE__ */ user_derived(() => $$props.config.closeButton);
8969
8972
  const tourTooltipAnimation = /* @__PURE__ */ user_derived(() => $$props.animation.isEnabled ? $$props.animation.tooltip : false);
8970
8973
  const isAnimated = /* @__PURE__ */ user_derived(() => $$props.animation.isEnabled);
8971
8974
  const hasGlide = /* @__PURE__ */ user_derived(() => $$props.animation.tooltip.transition === BordaTooltipTransition.GLIDE);
@@ -8973,7 +8976,22 @@ function Borda($$anchor, $$props) {
8973
8976
  const isStepSettling = /* @__PURE__ */ user_derived(() => $$props.scroll.isScrolling || overlayTransition.isActive);
8974
8977
  /** In fade mode, hide the tooltip while the step settles, then fade it in at the new position. */
8975
8978
  const isHidden = /* @__PURE__ */ user_derived(() => !get(hasGlide) && get(isAnimated) && get(isStepSettling) && !get(isShownOnScroll));
8976
- const step = /* @__PURE__ */ user_derived(() => $$props.controller.step);
8979
+ /** Seeded once from the initial step so the first render has content; kept in sync by the effect below. */
8980
+ let displayed = /* @__PURE__ */ state(proxy({
8981
+ step: untrack(() => $$props.controller.step),
8982
+ target: untrack(() => $$props.controller.currentTarget),
8983
+ currentStep: untrack(() => $$props.controller.currentStep),
8984
+ config: untrack(() => $$props.config)
8985
+ }));
8986
+ const size = /* @__PURE__ */ user_derived(() => get(displayed).config.size);
8987
+ const shape = /* @__PURE__ */ user_derived(() => get(displayed).config.shape);
8988
+ const tourOverlayProps = /* @__PURE__ */ user_derived(() => get(displayed).config.tourOverlay);
8989
+ const tourTooltipProps = /* @__PURE__ */ user_derived(() => get(displayed).config.tourTooltip);
8990
+ const tourImageProps = /* @__PURE__ */ user_derived(() => get(displayed).config.tourImage);
8991
+ const tourButtonsProps = /* @__PURE__ */ user_derived(() => get(displayed).config.tourButtons);
8992
+ const tourProgressProps = /* @__PURE__ */ user_derived(() => get(displayed).config.tourProgress);
8993
+ const tourSkipProps = /* @__PURE__ */ user_derived(() => get(displayed).config.tourSkip);
8994
+ const closeButtonProps = /* @__PURE__ */ user_derived(() => get(displayed).config.closeButton);
8977
8995
  const tourComponents = /* @__PURE__ */ user_derived(() => {
8978
8996
  const components = get(bordaTour)?.getComponents();
8979
8997
  return {
@@ -9005,6 +9023,34 @@ function Borda($$anchor, $$props) {
9005
9023
  if ($$props.config.visibility?.isHidden) return;
9006
9024
  $$props.scroll.scrollTo($$props.controller.currentTarget);
9007
9025
  });
9026
+ user_effect(() => {
9027
+ if (!get(isHidden)) {
9028
+ set(displayed, {
9029
+ step: $$props.controller.step,
9030
+ target: $$props.controller.currentTarget,
9031
+ currentStep: $$props.controller.currentStep,
9032
+ config: $$props.config
9033
+ }, true);
9034
+ return;
9035
+ }
9036
+ /**
9037
+ * `step`/`currentTarget`/`currentStep`/`config` (incl. per-step overrides
9038
+ * like `tourProgress`) are live and swap the instant the step index
9039
+ * changes, so binding the tooltip/overlay to them directly would render
9040
+ * the new step's content immediately — visible for a frame before the
9041
+ * fade-out even starts. Keep showing the outgoing step's snapshot while
9042
+ * it fades out, and only swap once it's actually invisible.
9043
+ */
9044
+ const timeoutId = setTimeout(() => {
9045
+ set(displayed, {
9046
+ step: $$props.controller.step,
9047
+ target: $$props.controller.currentTarget,
9048
+ currentStep: $$props.controller.currentStep,
9049
+ config: $$props.config
9050
+ }, true);
9051
+ }, $$props.animation.tooltip.exitDuration);
9052
+ return () => clearTimeout(timeoutId);
9053
+ });
9008
9054
  onMount(() => {
9009
9055
  $$props.mount();
9010
9056
  });
@@ -9024,7 +9070,7 @@ function Borda($$anchor, $$props) {
9024
9070
  var consequent = ($$anchor) => {
9025
9071
  bind_this(BordaTourOverlay($$anchor, spread_props({
9026
9072
  get targetElement() {
9027
- return $$props.controller.currentTarget;
9073
+ return get(displayed).target;
9028
9074
  },
9029
9075
  get isAnimated() {
9030
9076
  return get(isAnimated);
@@ -9038,13 +9084,13 @@ function Borda($$anchor, $$props) {
9038
9084
  var consequent_1 = ($$anchor) => {
9039
9085
  bind_this(BordaTour($$anchor, {
9040
9086
  get step() {
9041
- return get(step);
9087
+ return get(displayed).step;
9042
9088
  },
9043
9089
  get currentTarget() {
9044
- return $$props.controller.currentTarget;
9090
+ return get(displayed).target;
9045
9091
  },
9046
9092
  get currentStep() {
9047
- return $$props.controller.currentStep;
9093
+ return get(displayed).currentStep;
9048
9094
  },
9049
9095
  get totalSteps() {
9050
9096
  return $$props.controller.totalSteps;
@@ -9108,7 +9154,7 @@ function Borda($$anchor, $$props) {
9108
9154
  append($$anchor, fragment_1);
9109
9155
  };
9110
9156
  if_block(node_1, ($$render) => {
9111
- if ($$props.controller.currentTarget && get(step)) $$render(consequent_2);
9157
+ if ($$props.controller.currentTarget && $$props.controller.step) $$render(consequent_2);
9112
9158
  });
9113
9159
  append($$anchor, fragment);
9114
9160
  },
@@ -9286,7 +9332,7 @@ function useBorda() {
9286
9332
  }
9287
9333
  return {
9288
9334
  NAME: "@retoo/borda",
9289
- VERSION: "0.1.0",
9335
+ VERSION: "0.1.1",
9290
9336
  mount: mount$1,
9291
9337
  unmount: unmount$1,
9292
9338
  highlight: useBordaHighlight(mount$1).highlight
package/dist/borda.es.js CHANGED
@@ -8441,11 +8441,9 @@ function useTooltipPosition({ getTargetElement, getTooltipElement, getPlacement,
8441
8441
  const padding = /* @__PURE__ */ user_derived(getPadding);
8442
8442
  const autoPlacement = /* @__PURE__ */ user_derived(getAutoPlacement);
8443
8443
  const arrowSide = /* @__PURE__ */ user_derived(getArrowSide);
8444
- user_effect(() => {
8444
+ /** Reads the live target/tooltip rects and writes the resolved position into state. */
8445
+ function recompute() {
8445
8446
  if (!get(target) || !get(tooltip)) return;
8446
- /** Re-run on scroll so auto-flip/shift recompute against the live viewport. */
8447
- scroll.x;
8448
- scroll.y;
8449
8447
  const layout = useTooltipLayout({
8450
8448
  target: get(target),
8451
8449
  tooltip: get(tooltip),
@@ -8464,6 +8462,19 @@ function useTooltipPosition({ getTargetElement, getTooltipElement, getPlacement,
8464
8462
  set(left, layout.position.left, true);
8465
8463
  set(effectivePlacement, layout.placement, true);
8466
8464
  set(arrowOffset, layout.arrowOffset, true);
8465
+ }
8466
+ user_effect(() => {
8467
+ if (!get(tooltip)) return;
8468
+ /** Re-run when the tooltip's own size changes (e.g. an image finishes loading). */
8469
+ const observer = new ResizeObserver(recompute);
8470
+ observer.observe(get(tooltip));
8471
+ return () => observer.disconnect();
8472
+ });
8473
+ user_effect(() => {
8474
+ /** Re-run on scroll so auto-flip/shift recompute against the live viewport. */
8475
+ scroll.x;
8476
+ scroll.y;
8477
+ recompute();
8467
8478
  });
8468
8479
  return {
8469
8480
  get top() {
@@ -8948,9 +8959,8 @@ function Borda($$anchor, $$props) {
8948
8959
  getDuration: () => $$props.animation.overlay.transitionDuration
8949
8960
  });
8950
8961
  useFocusTrap({ getContainer: () => get(bordaContainer)?.getElements()?.root ?? null });
8951
- const size = /* @__PURE__ */ user_derived(() => $$props.config.size);
8952
- const shape = /* @__PURE__ */ user_derived(() => $$props.config.shape);
8953
8962
  const rootClasses = /* @__PURE__ */ user_derived(() => ["rb"]);
8963
+ /** Container chrome isn't per-step content, so it always tracks the live config. */
8954
8964
  const containerProps = /* @__PURE__ */ user_derived(() => ({
8955
8965
  ...$$props.config.container,
8956
8966
  customClasses: {
@@ -8958,13 +8968,6 @@ function Borda($$anchor, $$props) {
8958
8968
  root: [$$props.config.container?.customClasses?.root, containerAnimator.classes]
8959
8969
  }
8960
8970
  }));
8961
- const tourOverlayProps = /* @__PURE__ */ user_derived(() => $$props.config.tourOverlay);
8962
- const tourTooltipProps = /* @__PURE__ */ user_derived(() => $$props.config.tourTooltip);
8963
- const tourImageProps = /* @__PURE__ */ user_derived(() => $$props.config.tourImage);
8964
- const tourButtonsProps = /* @__PURE__ */ user_derived(() => $$props.config.tourButtons);
8965
- const tourProgressProps = /* @__PURE__ */ user_derived(() => $$props.config.tourProgress);
8966
- const tourSkipProps = /* @__PURE__ */ user_derived(() => $$props.config.tourSkip);
8967
- const closeButtonProps = /* @__PURE__ */ user_derived(() => $$props.config.closeButton);
8968
8971
  const tourTooltipAnimation = /* @__PURE__ */ user_derived(() => $$props.animation.isEnabled ? $$props.animation.tooltip : false);
8969
8972
  const isAnimated = /* @__PURE__ */ user_derived(() => $$props.animation.isEnabled);
8970
8973
  const hasGlide = /* @__PURE__ */ user_derived(() => $$props.animation.tooltip.transition === BordaTooltipTransition.GLIDE);
@@ -8972,7 +8975,22 @@ function Borda($$anchor, $$props) {
8972
8975
  const isStepSettling = /* @__PURE__ */ user_derived(() => $$props.scroll.isScrolling || overlayTransition.isActive);
8973
8976
  /** In fade mode, hide the tooltip while the step settles, then fade it in at the new position. */
8974
8977
  const isHidden = /* @__PURE__ */ user_derived(() => !get(hasGlide) && get(isAnimated) && get(isStepSettling) && !get(isShownOnScroll));
8975
- const step = /* @__PURE__ */ user_derived(() => $$props.controller.step);
8978
+ /** Seeded once from the initial step so the first render has content; kept in sync by the effect below. */
8979
+ let displayed = /* @__PURE__ */ state(proxy({
8980
+ step: untrack(() => $$props.controller.step),
8981
+ target: untrack(() => $$props.controller.currentTarget),
8982
+ currentStep: untrack(() => $$props.controller.currentStep),
8983
+ config: untrack(() => $$props.config)
8984
+ }));
8985
+ const size = /* @__PURE__ */ user_derived(() => get(displayed).config.size);
8986
+ const shape = /* @__PURE__ */ user_derived(() => get(displayed).config.shape);
8987
+ const tourOverlayProps = /* @__PURE__ */ user_derived(() => get(displayed).config.tourOverlay);
8988
+ const tourTooltipProps = /* @__PURE__ */ user_derived(() => get(displayed).config.tourTooltip);
8989
+ const tourImageProps = /* @__PURE__ */ user_derived(() => get(displayed).config.tourImage);
8990
+ const tourButtonsProps = /* @__PURE__ */ user_derived(() => get(displayed).config.tourButtons);
8991
+ const tourProgressProps = /* @__PURE__ */ user_derived(() => get(displayed).config.tourProgress);
8992
+ const tourSkipProps = /* @__PURE__ */ user_derived(() => get(displayed).config.tourSkip);
8993
+ const closeButtonProps = /* @__PURE__ */ user_derived(() => get(displayed).config.closeButton);
8976
8994
  const tourComponents = /* @__PURE__ */ user_derived(() => {
8977
8995
  const components = get(bordaTour)?.getComponents();
8978
8996
  return {
@@ -9004,6 +9022,34 @@ function Borda($$anchor, $$props) {
9004
9022
  if ($$props.config.visibility?.isHidden) return;
9005
9023
  $$props.scroll.scrollTo($$props.controller.currentTarget);
9006
9024
  });
9025
+ user_effect(() => {
9026
+ if (!get(isHidden)) {
9027
+ set(displayed, {
9028
+ step: $$props.controller.step,
9029
+ target: $$props.controller.currentTarget,
9030
+ currentStep: $$props.controller.currentStep,
9031
+ config: $$props.config
9032
+ }, true);
9033
+ return;
9034
+ }
9035
+ /**
9036
+ * `step`/`currentTarget`/`currentStep`/`config` (incl. per-step overrides
9037
+ * like `tourProgress`) are live and swap the instant the step index
9038
+ * changes, so binding the tooltip/overlay to them directly would render
9039
+ * the new step's content immediately — visible for a frame before the
9040
+ * fade-out even starts. Keep showing the outgoing step's snapshot while
9041
+ * it fades out, and only swap once it's actually invisible.
9042
+ */
9043
+ const timeoutId = setTimeout(() => {
9044
+ set(displayed, {
9045
+ step: $$props.controller.step,
9046
+ target: $$props.controller.currentTarget,
9047
+ currentStep: $$props.controller.currentStep,
9048
+ config: $$props.config
9049
+ }, true);
9050
+ }, $$props.animation.tooltip.exitDuration);
9051
+ return () => clearTimeout(timeoutId);
9052
+ });
9007
9053
  onMount(() => {
9008
9054
  $$props.mount();
9009
9055
  });
@@ -9023,7 +9069,7 @@ function Borda($$anchor, $$props) {
9023
9069
  var consequent = ($$anchor) => {
9024
9070
  bind_this(BordaTourOverlay($$anchor, spread_props({
9025
9071
  get targetElement() {
9026
- return $$props.controller.currentTarget;
9072
+ return get(displayed).target;
9027
9073
  },
9028
9074
  get isAnimated() {
9029
9075
  return get(isAnimated);
@@ -9037,13 +9083,13 @@ function Borda($$anchor, $$props) {
9037
9083
  var consequent_1 = ($$anchor) => {
9038
9084
  bind_this(BordaTour($$anchor, {
9039
9085
  get step() {
9040
- return get(step);
9086
+ return get(displayed).step;
9041
9087
  },
9042
9088
  get currentTarget() {
9043
- return $$props.controller.currentTarget;
9089
+ return get(displayed).target;
9044
9090
  },
9045
9091
  get currentStep() {
9046
- return $$props.controller.currentStep;
9092
+ return get(displayed).currentStep;
9047
9093
  },
9048
9094
  get totalSteps() {
9049
9095
  return $$props.controller.totalSteps;
@@ -9107,7 +9153,7 @@ function Borda($$anchor, $$props) {
9107
9153
  append($$anchor, fragment_1);
9108
9154
  };
9109
9155
  if_block(node_1, ($$render) => {
9110
- if ($$props.controller.currentTarget && get(step)) $$render(consequent_2);
9156
+ if ($$props.controller.currentTarget && $$props.controller.step) $$render(consequent_2);
9111
9157
  });
9112
9158
  append($$anchor, fragment);
9113
9159
  },
@@ -9285,7 +9331,7 @@ function useBorda() {
9285
9331
  }
9286
9332
  return {
9287
9333
  NAME: "@retoo/borda",
9288
- VERSION: "0.1.0",
9334
+ VERSION: "0.1.1",
9289
9335
  mount: mount$1,
9290
9336
  unmount: unmount$1,
9291
9337
  highlight: useBordaHighlight(mount$1).highlight
@@ -3652,9 +3652,8 @@ function Si({ getTargetElement: e, getTooltipElement: t, getPlacement: n, getPad
3652
3652
  return e = n(), fo.has(e) ? e : io.BOTTOM_START;
3653
3653
  var e;
3654
3654
  }), m = Oe(o), _ = Oe(i), b = Oe(r), y = Oe(s), T = Oe(a);
3655
- return Dt(() => {
3655
+ function w() {
3656
3656
  if (!wn(h) || !wn(v)) return;
3657
- p.x, p.y;
3658
3657
  const e = Ei({
3659
3658
  target: wn(h),
3660
3659
  tooltip: wn(v),
@@ -3670,6 +3669,13 @@ function Si({ getTargetElement: e, getTooltipElement: t, getPlacement: n, getPad
3670
3669
  }
3671
3670
  });
3672
3671
  rt(l, e.position.top, !0), rt(u, e.position.left, !0), rt(c, e.placement, !0), rt(f, e.arrowOffset, !0);
3672
+ }
3673
+ return Dt(() => {
3674
+ if (!wn(v)) return;
3675
+ const e = new ResizeObserver(w);
3676
+ return e.observe(wn(v)), () => e.disconnect();
3677
+ }), Dt(() => {
3678
+ p.x, p.y, w();
3673
3679
  }), {
3674
3680
  get top() {
3675
3681
  return wn(l);
@@ -4272,13 +4278,20 @@ function Di(e, t) {
4272
4278
  getDuration: () => t.animation.overlay.transitionDuration
4273
4279
  });
4274
4280
  eo({ getContainer: () => wn(n)?.getElements()?.root ?? null });
4275
- const a = Oe(() => t.config.size), l = Oe(() => t.config.shape), u = Oe(() => ["rb"]), c = Oe(() => ({
4281
+ const a = Oe(() => ["rb"]), l = Oe(() => ({
4276
4282
  ...t.config.container,
4277
4283
  customClasses: {
4278
4284
  ...t.config.container?.customClasses,
4279
4285
  root: [t.config.container?.customClasses?.root, i.classes]
4280
4286
  }
4281
- })), f = Oe(() => t.config.tourOverlay), d = Oe(() => t.config.tourTooltip), p = Oe(() => t.config.tourImage), h = Oe(() => t.config.tourButtons), v = Oe(() => t.config.tourProgress), g = Oe(() => t.config.tourSkip), m = Oe(() => t.config.closeButton), _ = Oe(() => !!t.animation.isEnabled && t.animation.tooltip), b = Oe(() => t.animation.isEnabled), y = Oe(() => t.animation.tooltip.transition === So.GLIDE), T = Oe(() => t.animation.tooltip.appearance === Eo.DURING_SCROLL), w = Oe(() => t.scroll.isScrolling || s.isActive), E = Oe(() => !wn(y) && wn(b) && wn(w) && !wn(T)), S = Oe(() => t.controller.step), O = Oe(() => {
4287
+ })), u = Oe(() => !!t.animation.isEnabled && t.animation.tooltip), c = Oe(() => t.animation.isEnabled), f = Oe(() => t.animation.tooltip.transition === So.GLIDE), d = Oe(() => t.animation.tooltip.appearance === Eo.DURING_SCROLL), p = Oe(() => t.scroll.isScrolling || s.isActive), h = Oe(() => !wn(f) && wn(c) && wn(p) && !wn(d));
4288
+ let v = tt(lt({
4289
+ step: On(() => t.controller.step),
4290
+ target: On(() => t.controller.currentTarget),
4291
+ currentStep: On(() => t.controller.currentStep),
4292
+ config: On(() => t.config)
4293
+ }));
4294
+ const g = Oe(() => wn(v).config.size), m = Oe(() => wn(v).config.shape), _ = Oe(() => wn(v).config.tourOverlay), b = Oe(() => wn(v).config.tourTooltip), y = Oe(() => wn(v).config.tourImage), T = Oe(() => wn(v).config.tourButtons), w = Oe(() => wn(v).config.tourProgress), E = Oe(() => wn(v).config.tourSkip), S = Oe(() => wn(v).config.closeButton), O = Oe(() => {
4282
4295
  const e = wn(o)?.getComponents();
4283
4296
  return {
4284
4297
  tourTooltip: e?.tourTooltip ?? null,
@@ -4305,6 +4318,22 @@ function Di(e, t) {
4305
4318
  var C;
4306
4319
  Dt(() => {
4307
4320
  t.config.visibility?.isHidden || t.scroll.scrollTo(t.controller.currentTarget);
4321
+ }), Dt(() => {
4322
+ if (!wn(h)) return void rt(v, {
4323
+ step: t.controller.step,
4324
+ target: t.controller.currentTarget,
4325
+ currentStep: t.controller.currentStep,
4326
+ config: t.config
4327
+ }, !0);
4328
+ const e = setTimeout(() => {
4329
+ rt(v, {
4330
+ step: t.controller.step,
4331
+ target: t.controller.currentTarget,
4332
+ currentStep: t.controller.currentStep,
4333
+ config: t.config
4334
+ }, !0);
4335
+ }, t.animation.tooltip.exitDuration);
4336
+ return () => clearTimeout(e);
4308
4337
  }), ir(() => {
4309
4338
  t.mount();
4310
4339
  }), C = () => {
@@ -4326,9 +4355,9 @@ function Di(e, t) {
4326
4355
  }), G(s), Fr(s, (e) => rt(n, e), () => wn(n)), It(() => {
4327
4356
  Mr(s, "id", t.id), yr(s, 1, gr(wn(r))), wr(s, wn(o));
4328
4357
  }), Fn(e, s), re(i);
4329
- }(bt(k), Vr(() => wn(c), {
4358
+ }(bt(k), Vr(() => wn(l), {
4330
4359
  children: (e, n) => {
4331
- var i = jn(), s = yt(i), u = (e) => {
4360
+ var i = jn(), s = yt(i), a = (e) => {
4332
4361
  var n = Ai(), i = yt(n), s = (e) => {
4333
4362
  Fr(function(e, t) {
4334
4363
  ne(t, !0);
@@ -4370,26 +4399,26 @@ function Di(e, t) {
4370
4399
  }), Fn(e, y), re(b);
4371
4400
  }(e, Vr({
4372
4401
  get targetElement() {
4373
- return t.controller.currentTarget;
4402
+ return wn(v).target;
4374
4403
  },
4375
4404
  get isAnimated() {
4376
- return wn(b);
4405
+ return wn(c);
4377
4406
  }
4378
- }, () => wn(f))), (e) => rt(r, e, !0), () => wn(r));
4407
+ }, () => wn(_))), (e) => rt(r, e, !0), () => wn(r));
4379
4408
  };
4380
4409
  sr(i, (e) => {
4381
- !1 !== wn(f) && e(s);
4410
+ !1 !== wn(_) && e(s);
4382
4411
  });
4383
- var u = Tt(i, 2), c = (e) => {
4412
+ var a = Tt(i, 2), l = (e) => {
4384
4413
  Fr(ki(e, {
4385
4414
  get step() {
4386
- return wn(S);
4415
+ return wn(v).step;
4387
4416
  },
4388
4417
  get currentTarget() {
4389
- return t.controller.currentTarget;
4418
+ return wn(v).target;
4390
4419
  },
4391
4420
  get currentStep() {
4392
- return t.controller.currentStep;
4421
+ return wn(v).currentStep;
4393
4422
  },
4394
4423
  get totalSteps() {
4395
4424
  return t.controller.totalSteps;
@@ -4398,37 +4427,37 @@ function Di(e, t) {
4398
4427
  return t.skip.isSkipped;
4399
4428
  },
4400
4429
  get isHidden() {
4401
- return wn(E);
4430
+ return wn(h);
4402
4431
  },
4403
4432
  get hasGlide() {
4404
- return wn(y);
4433
+ return wn(f);
4405
4434
  },
4406
4435
  get tourTooltipAnimation() {
4407
- return wn(_);
4436
+ return wn(u);
4408
4437
  },
4409
4438
  get size() {
4410
- return wn(a);
4439
+ return wn(g);
4411
4440
  },
4412
4441
  get shape() {
4413
- return wn(l);
4442
+ return wn(m);
4414
4443
  },
4415
4444
  get tourTooltipProps() {
4416
- return wn(d);
4445
+ return wn(b);
4417
4446
  },
4418
4447
  get tourImageProps() {
4419
- return wn(p);
4448
+ return wn(y);
4420
4449
  },
4421
4450
  get tourButtonsProps() {
4422
- return wn(h);
4451
+ return wn(T);
4423
4452
  },
4424
4453
  get tourProgressProps() {
4425
- return wn(v);
4454
+ return wn(w);
4426
4455
  },
4427
4456
  get closeButtonProps() {
4428
- return wn(m);
4457
+ return wn(S);
4429
4458
  },
4430
4459
  get tourSkipProps() {
4431
- return wn(g);
4460
+ return wn(E);
4432
4461
  },
4433
4462
  get onNext() {
4434
4463
  return t.controller.next;
@@ -4447,16 +4476,16 @@ function Di(e, t) {
4447
4476
  }
4448
4477
  }), (e) => rt(o, e, !0), () => wn(o));
4449
4478
  };
4450
- sr(u, (e) => {
4451
- !1 !== wn(d) && e(c);
4479
+ sr(a, (e) => {
4480
+ !1 !== wn(b) && e(l);
4452
4481
  }), Fn(e, n);
4453
4482
  };
4454
4483
  sr(s, (e) => {
4455
- t.controller.currentTarget && wn(S) && e(u);
4484
+ t.controller.currentTarget && t.controller.step && e(a);
4456
4485
  }), Fn(e, i);
4457
4486
  },
4458
4487
  $$slots: { default: !0 }
4459
- })), (e) => rt(n, e, !0), () => wn(n)), G(k), It(() => yr(k, 1, gr(wn(u)))), Fn(e, k), re(N);
4488
+ })), (e) => rt(n, e, !0), () => wn(n)), G(k), It(() => yr(k, 1, gr(wn(a)))), Fn(e, k), re(N);
4460
4489
  }
4461
4490
  function Li() {
4462
4491
  const e = /* @__PURE__ */ new WeakMap(), t = /* @__PURE__ */ new WeakSet();
@@ -4549,7 +4578,7 @@ function Li() {
4549
4578
  }
4550
4579
  return {
4551
4580
  NAME: "@retoo/borda",
4552
- VERSION: "0.1.0",
4581
+ VERSION: "0.1.1",
4553
4582
  mount: n,
4554
4583
  unmount: r,
4555
4584
  highlight: Po(n).highlight