@dotss/tictoccroc 0.0.3 → 0.0.5

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 (30) hide show
  1. package/dist/index.mjs +78 -77
  2. package/dist/shared/components/Masonry/Masonry.mjs +111 -103
  3. package/dist/shared/components/Masonry/MasonryBlock/MasonryBlock.d.ts +1 -1
  4. package/dist/shared/components/Masonry/MasonryBlock/MasonryBlock.mjs +103 -86
  5. package/dist/shared/components/MediaDialog/MediaBlock/MediaBlock.mjs +1 -1
  6. package/dist/shared/components/MediaDialog/MediaDialog.mjs +121 -118
  7. package/dist/shared/components/Roller/Roller.mjs +131 -7
  8. package/dist/shared/components/Roller/index.mjs +3 -3
  9. package/dist/shared/components/Scheduler/ScheduleEvent/ScheduleEvent.mjs +1 -1
  10. package/dist/shared/components/Swiper/Swiper.mjs +1 -1
  11. package/dist/shared/components/index.mjs +3 -3
  12. package/dist/teacher/profile/components/CertificationSection/CertificationItem/CertificationItem.mjs +1 -1
  13. package/dist/teacher/profile/components/EducationSection/EducationItem/EducationItem.mjs +1 -1
  14. package/dist/teacher/profile/components/LessonNotesSection/LessonNotesSection.mjs +79 -6
  15. package/dist/teacher/profile/components/LessonNotesSection/index.mjs +3 -3
  16. package/dist/teacher/profile/components/index.mjs +5 -5
  17. package/package.json +2 -2
  18. package/dist/LessonNotesSection-Bg1DHFxg.js +0 -208
  19. package/dist/shared/utils/birthDateToAge/birthDateToAge.test.mjs +0 -11
  20. package/dist/shared/utils/getDateRange/getDateRange.test.mjs +0 -60
  21. package/dist/shared/utils/getImageUrl/getImageUrl.test.mjs +0 -27
  22. package/dist/shared/utils/getTimeRange/getTimeRange.test.mjs +0 -75
  23. package/dist/shared/utils/getVimeoId/getVimeoId.test.mjs +0 -14
  24. package/dist/shared/utils/isAndroid/isAndroid.test.mjs +0 -12
  25. package/dist/shared/utils/isApp/isApp.test.mjs +0 -22
  26. package/dist/shared/utils/isDesktop/isDesktop.test.mjs +0 -10
  27. package/dist/shared/utils/isServer/isServer.test.mjs +0 -12
  28. package/dist/shared/utils/objectToQueryString/objectToQueryString.test.mjs +0 -11
  29. package/dist/shared/utils/parseQueryString/parseQueryString.test.mjs +0 -15
  30. package/dist/shared/utils/share/share.test.mjs +0 -31
package/dist/index.mjs CHANGED
@@ -2,7 +2,7 @@ import { default as t } from "./shared/components/Scheduler/Scheduler.mjs";
2
2
  import { default as a } from "./shared/components/Scheduler/ScheduleEvent/ScheduleEvent.mjs";
3
3
  import { default as l } from "./shared/components/Scheduler/ScheduleBlock/ScheduleBlock.mjs";
4
4
  import { getAvailableDateRange as s } from "./shared/components/Scheduler/Scheduler.utils.mjs";
5
- import { default as u } from "./shared/components/MediaDialog/MediaDialog.mjs";
5
+ import { default as m } from "./shared/components/MediaDialog/MediaDialog.mjs";
6
6
  import { default as i } from "./shared/components/MediaDialog/MediaBlock/MediaBlock.mjs";
7
7
  import { default as n } from "./shared/components/MediaDialog/MediaDialogContent/MediaDialogContent.mjs";
8
8
  import { default as g } from "./shared/components/MediaDialog/MediaDialogFooter/MediaDialogFooter.mjs";
@@ -10,104 +10,105 @@ import { default as y } from "./shared/components/MediaDialog/MediaDialogToolbar
10
10
  import { default as C } from "./shared/components/Swiper/Swiper.mjs";
11
11
  import { default as b } from "./shared/components/Swiper/SwiperBlock/SwiperBlock.mjs";
12
12
  import { default as D } from "./shared/components/Carousel/Carousel.mjs";
13
- import { default as R } from "./shared/components/Carousel/CarouselSlide/CarouselSlide.mjs";
14
- import { default as k } from "./shared/components/TimePicker/TimePicker.mjs";
15
- import { L as P, R as w } from "./LessonNotesSection-Bg1DHFxg.js";
13
+ import { default as h } from "./shared/components/Carousel/CarouselSlide/CarouselSlide.mjs";
14
+ import { default as M } from "./shared/components/TimePicker/TimePicker.mjs";
15
+ import { default as R } from "./shared/components/Roller/Roller.mjs";
16
16
  import { default as T } from "./shared/components/Roller/RollerBlock/RollerBlock.mjs";
17
17
  import { default as G } from "./shared/components/Image/Image.mjs";
18
- import { default as N } from "./shared/components/Calendar/Calendar.mjs";
19
- import { default as j } from "./shared/components/Masonry/Masonry.mjs";
20
- import { default as U } from "./shared/components/Masonry/MasonryBlock/MasonryBlock.mjs";
21
- import { default as q } from "./shared/components/LoadingAnnouncer/LoadingAnnouncer.mjs";
22
- import { default as H } from "./shared/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.mjs";
23
- import { default as O } from "./shared/utils/getImageUrl/getImageUrl.mjs";
24
- import { default as X } from "./shared/utils/isServer/isServer.mjs";
25
- import { default as Z } from "./shared/utils/getTimeRange/getTimeRange.mjs";
26
- import { default as $ } from "./shared/utils/getDateRange/getDateRange.mjs";
27
- import { default as oe } from "./shared/utils/isAndroid/isAndroid.mjs";
28
- import { default as re } from "./shared/utils/isApp/isApp.mjs";
29
- import { default as fe } from "./shared/utils/isDesktop/isDesktop.mjs";
30
- import { default as de } from "./shared/utils/birthDateToAge/birthDateToAge.mjs";
31
- import { default as me } from "./shared/utils/objectToQueryString/objectToQueryString.mjs";
32
- import { default as pe } from "./shared/utils/getVimeoId/getVimeoId.mjs";
33
- import { default as xe } from "./shared/utils/parseQueryString/parseQueryString.mjs";
34
- import { default as ce } from "./shared/utils/share/share.mjs";
35
- import { default as Se } from "./teacher/profile/components/ProfileSummary/ProfileSummary.mjs";
36
- import { default as Ae } from "./teacher/profile/components/StatBadgeCollection/StatBadgeCollection.mjs";
37
- import { default as ve } from "./teacher/profile/components/StatBadgeCollection/StatBadge/StatBadge.mjs";
38
- import { default as Be } from "./teacher/profile/components/ActivityGallery/ActivityGallery.mjs";
39
- import { default as Ie } from "./teacher/profile/components/ActivityGallery/ActivityGalleryItem/ActivityGalleryItem.mjs";
18
+ import { default as K } from "./shared/components/Calendar/Calendar.mjs";
19
+ import { default as Q } from "./shared/components/Masonry/Masonry.mjs";
20
+ import { default as F } from "./shared/components/Masonry/MasonryBlock/MasonryBlock.mjs";
21
+ import { default as V } from "./shared/components/LoadingAnnouncer/LoadingAnnouncer.mjs";
22
+ import { default as z } from "./shared/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.mjs";
23
+ import { default as J } from "./shared/utils/getImageUrl/getImageUrl.mjs";
24
+ import { default as W } from "./shared/utils/isServer/isServer.mjs";
25
+ import { default as Y } from "./shared/utils/getTimeRange/getTimeRange.mjs";
26
+ import { default as _ } from "./shared/utils/getDateRange/getDateRange.mjs";
27
+ import { default as ee } from "./shared/utils/isAndroid/isAndroid.mjs";
28
+ import { default as te } from "./shared/utils/isApp/isApp.mjs";
29
+ import { default as ae } from "./shared/utils/isDesktop/isDesktop.mjs";
30
+ import { default as le } from "./shared/utils/birthDateToAge/birthDateToAge.mjs";
31
+ import { default as se } from "./shared/utils/objectToQueryString/objectToQueryString.mjs";
32
+ import { default as me } from "./shared/utils/getVimeoId/getVimeoId.mjs";
33
+ import { default as ie } from "./shared/utils/parseQueryString/parseQueryString.mjs";
34
+ import { default as ne } from "./shared/utils/share/share.mjs";
35
+ import { default as ge } from "./teacher/profile/components/ProfileSummary/ProfileSummary.mjs";
36
+ import { default as ye } from "./teacher/profile/components/StatBadgeCollection/StatBadgeCollection.mjs";
37
+ import { default as Ce } from "./teacher/profile/components/StatBadgeCollection/StatBadge/StatBadge.mjs";
38
+ import { default as be } from "./teacher/profile/components/ActivityGallery/ActivityGallery.mjs";
39
+ import { default as De } from "./teacher/profile/components/ActivityGallery/ActivityGalleryItem/ActivityGalleryItem.mjs";
40
40
  import { default as he } from "./teacher/profile/components/CertificationSection/CertificationSection.mjs";
41
41
  import { default as Me } from "./teacher/profile/components/CertificationSection/CertificationItem/CertificationItem.mjs";
42
- import { default as we } from "./teacher/profile/components/CareerSection/CareerSection.mjs";
42
+ import { default as Re } from "./teacher/profile/components/CareerSection/CareerSection.mjs";
43
43
  import { default as Te } from "./teacher/profile/components/CareerSection/CareerItem/CareerItem.mjs";
44
44
  import { default as Ge } from "./teacher/profile/components/EducationSection/EducationSection.mjs";
45
- import { default as Ne } from "./teacher/profile/components/EducationSection/EducationItem/EducationItem.mjs";
46
- import { default as je } from "./teacher/profile/components/PreferredActivityKeywordGroup/PreferredActivityKeywordGroup.mjs";
47
- import { default as Ue } from "./teacher/profile/components/PreferredAgeGroup/PreferredAgeGroup.mjs";
48
- import { getPreferredAgeKeywords as qe } from "./teacher/profile/components/PreferredAgeGroup/PreferredAgeGroup.utils.mjs";
49
- import { default as He } from "./teacher/profile/components/AbilityCollection/AbilityCollection.mjs";
50
- import { default as Oe } from "./teacher/profile/components/AbilityCollection/AbilityBadge/AbilityBadge.mjs";
51
- import { getAbilityCollection as Xe } from "./teacher/profile/components/AbilityCollection/AbilityCollection.utils.mjs";
52
- import { default as Ze } from "./teacher/profile/components/AvailableScheduleSection/AvailableScheduleSection.mjs";
53
- import { default as $e } from "./teacher/profile/components/LessonNotesSection/LessonNote/LessonNote.mjs";
54
- import { default as oo } from "./teacher/profile/components/ParentReviewSection/ParentReviewSection.mjs";
55
- import { default as ro } from "./teacher/profile/components/ParentReviewSection/ParentReviewCard/ParentReviewCard.mjs";
45
+ import { default as Ke } from "./teacher/profile/components/EducationSection/EducationItem/EducationItem.mjs";
46
+ import { default as Qe } from "./teacher/profile/components/PreferredActivityKeywordGroup/PreferredActivityKeywordGroup.mjs";
47
+ import { default as Fe } from "./teacher/profile/components/PreferredAgeGroup/PreferredAgeGroup.mjs";
48
+ import { getPreferredAgeKeywords as Ve } from "./teacher/profile/components/PreferredAgeGroup/PreferredAgeGroup.utils.mjs";
49
+ import { default as ze } from "./teacher/profile/components/AbilityCollection/AbilityCollection.mjs";
50
+ import { default as Je } from "./teacher/profile/components/AbilityCollection/AbilityBadge/AbilityBadge.mjs";
51
+ import { getAbilityCollection as We } from "./teacher/profile/components/AbilityCollection/AbilityCollection.utils.mjs";
52
+ import { default as Ye } from "./teacher/profile/components/AvailableScheduleSection/AvailableScheduleSection.mjs";
53
+ import { default as _e } from "./teacher/profile/components/LessonNotesSection/LessonNotesSection.mjs";
54
+ import { default as eo } from "./teacher/profile/components/LessonNotesSection/LessonNote/LessonNote.mjs";
55
+ import { default as to } from "./teacher/profile/components/ParentReviewSection/ParentReviewSection.mjs";
56
+ import { default as ao } from "./teacher/profile/components/ParentReviewSection/ParentReviewCard/ParentReviewCard.mjs";
56
57
  export {
57
- Oe as AbilityBadge,
58
- He as AbilityCollection,
59
- Be as ActivityGallery,
60
- Ie as ActivityGalleryItem,
61
- Ze as AvailableScheduleSection,
62
- N as Calendar,
58
+ Je as AbilityBadge,
59
+ ze as AbilityCollection,
60
+ be as ActivityGallery,
61
+ De as ActivityGalleryItem,
62
+ Ye as AvailableScheduleSection,
63
+ K as Calendar,
63
64
  Te as CareerItem,
64
- we as CareerSection,
65
+ Re as CareerSection,
65
66
  D as Carousel,
66
- R as CarouselSlide,
67
+ h as CarouselSlide,
67
68
  Me as CertificationItem,
68
69
  he as CertificationSection,
69
- Ne as EducationItem,
70
+ Ke as EducationItem,
70
71
  Ge as EducationSection,
71
72
  G as Image,
72
- $e as LessonNote,
73
- P as LessonNotesSection,
74
- q as LoadingAnnouncer,
75
- j as Masonry,
76
- U as MasonryBlock,
73
+ eo as LessonNote,
74
+ _e as LessonNotesSection,
75
+ V as LoadingAnnouncer,
76
+ Q as Masonry,
77
+ F as MasonryBlock,
77
78
  i as MediaBlock,
78
- u as MediaDialog,
79
+ m as MediaDialog,
79
80
  n as MediaDialogContent,
80
81
  g as MediaDialogFooter,
81
82
  y as MediaDialogToolbar,
82
- ro as ParentReviewCard,
83
- oo as ParentReviewSection,
84
- je as PreferredActivityKeywordGroup,
85
- Ue as PreferredAgeGroup,
86
- Se as ProfileSummary,
87
- w as Roller,
83
+ ao as ParentReviewCard,
84
+ to as ParentReviewSection,
85
+ Qe as PreferredActivityKeywordGroup,
86
+ Fe as PreferredAgeGroup,
87
+ ge as ProfileSummary,
88
+ R as Roller,
88
89
  T as RollerBlock,
89
90
  l as ScheduleBlock,
90
91
  a as ScheduleEvent,
91
92
  t as Scheduler,
92
- ve as StatBadge,
93
- Ae as StatBadgeCollection,
93
+ Ce as StatBadge,
94
+ ye as StatBadgeCollection,
94
95
  C as Swiper,
95
96
  b as SwiperBlock,
96
- k as TimePicker,
97
- de as birthDateToAge,
98
- Xe as getAbilityCollection,
97
+ M as TimePicker,
98
+ le as birthDateToAge,
99
+ We as getAbilityCollection,
99
100
  s as getAvailableDateRange,
100
- $ as getDateRange,
101
- O as getImageUrl,
102
- qe as getPreferredAgeKeywords,
103
- Z as getTimeRange,
104
- pe as getVimeoId,
105
- oe as isAndroid,
106
- re as isApp,
107
- fe as isDesktop,
108
- X as isServer,
109
- me as objectToQueryString,
110
- xe as parseQueryString,
111
- ce as share,
112
- H as useIsomorphicLayoutEffect
101
+ _ as getDateRange,
102
+ J as getImageUrl,
103
+ Ve as getPreferredAgeKeywords,
104
+ Y as getTimeRange,
105
+ me as getVimeoId,
106
+ ee as isAndroid,
107
+ te as isApp,
108
+ ae as isDesktop,
109
+ W as isServer,
110
+ se as objectToQueryString,
111
+ ie as parseQueryString,
112
+ ne as share,
113
+ z as useIsomorphicLayoutEffect
113
114
  };
@@ -1,62 +1,62 @@
1
- import { jsx as T } from "react/jsx-runtime";
2
- import { useState as p, useRef as i, Children as x, isValidElement as G, useEffect as g, cloneElement as j } from "react";
3
- import { Box as q, Flexbox as ct } from "@dotss/ui";
4
- import ut from "@dotss/ui/core/useTheme";
5
- import { findImageInChildren as z, getHorizontalLayoutRows as lt, getNextIndexHorizontalFromRows as ft, findNextFocusableElement as L } from "./Masonry.utils.mjs";
6
- import V from "./MasonryBlock/MasonryBlock.mjs";
7
- import $ from "../../../teacher/profile/components/ActivityGallery/ActivityGalleryItem/ActivityGalleryItem.mjs";
8
- function bt({
9
- children: y,
10
- columnCount: S = 2,
11
- rowCount: F = 2,
12
- spacing: u = 2,
1
+ import { jsx as z } from "react/jsx-runtime";
2
+ import { useState as p, useRef as i, Children as S, isValidElement as j, useEffect as g, cloneElement as q } from "react";
3
+ import { Box as V, Flexbox as ct } from "@dotss/ui";
4
+ import lt from "@dotss/ui/core/useTheme";
5
+ import { findImageInChildren as x, getHorizontalLayoutRows as ft, getNextIndexHorizontalFromRows as pt, findNextFocusableElement as y } from "./Masonry.utils.mjs";
6
+ import $ from "./MasonryBlock/MasonryBlock.mjs";
7
+ import J from "../../../teacher/profile/components/ActivityGallery/ActivityGalleryItem/ActivityGalleryItem.mjs";
8
+ function kt({
9
+ children: A,
10
+ columnCount: F = 2,
11
+ rowCount: B = 2,
12
+ spacing: s = 2,
13
13
  edgeSpacing: d = 0,
14
- direction: v = "vertical",
15
- defaultContainerWidth: J = 360,
16
- defaultContainerHeight: Q = 0,
14
+ direction: b = "vertical",
15
+ defaultContainerWidth: Q = 360,
16
+ defaultContainerHeight: Y = 0,
17
17
  ...a
18
18
  }) {
19
- const { spacing: A } = ut(), [Y, Z] = p(J), [_, K] = p(Q), [H, O] = p(0), w = 4 / 3, l = (Y - u) / S, f = v === "horizontal" ? (_ - u) / F : l * w, o = i(null), c = i([]), b = i([]), E = i(!1), k = i(!0), B = i(0), I = i(0), m = i(0), [h, tt] = p(
20
- x.toArray(y).filter(G).filter((e) => e.type === V || e.type === $)
21
- ), [W, et] = p(
19
+ const { spacing: E } = lt(), [Z, _] = p(Q), [K, O] = p(Y), [H, tt] = p(0), k = 4 / 3, l = (Z - s) / F, f = b === "horizontal" ? (K - s) / B : l * k, o = i(null), u = i([]), R = i([]), T = i(!1), M = i(!0), W = i(0), C = i(0), m = i(0), [h, et] = p(
20
+ S.toArray(A).filter(j).filter((e) => e.type === $ || e.type === J)
21
+ ), [N, rt] = p(
22
22
  h.map((e) => {
23
23
  var t;
24
- return ((t = z(e.props.children)) == null ? void 0 : t.props.src) ?? "";
24
+ return ((t = x(e.props.children)) == null ? void 0 : t.props.src) ?? "";
25
25
  })
26
- ), [C, rt] = p(
26
+ ), [D, nt] = p(
27
27
  h.map((e) => {
28
28
  var t;
29
29
  return {
30
- src: ((t = z(e.props.children)) == null ? void 0 : t.props.src) ?? "",
30
+ src: ((t = x(e.props.children)) == null ? void 0 : t.props.src) ?? "",
31
31
  width: e.props.width ?? l,
32
32
  height: e.props.height ?? f
33
33
  };
34
34
  })
35
- ), N = h.length, P = (e) => {
35
+ ), P = h.length, U = (e) => {
36
36
  var t, r;
37
- E.current = !0, B.current = e.clientX - (((t = o.current) == null ? void 0 : t.offsetLeft) || 0), I.current = ((r = o.current) == null ? void 0 : r.scrollLeft) || 0;
38
- }, U = (e) => {
39
- E.current && (e.currentTarget.style.cursor = "grabbing", o.current && (o.current.scrollLeft = I.current - (e.clientX - o.current.offsetLeft - B.current)));
40
- }, M = (e) => {
37
+ T.current = !0, W.current = e.clientX - (((t = o.current) == null ? void 0 : t.offsetLeft) || 0), C.current = ((r = o.current) == null ? void 0 : r.scrollLeft) || 0;
38
+ }, X = (e) => {
39
+ T.current && (e.currentTarget.style.cursor = "grabbing", o.current && (o.current.scrollLeft = C.current - (e.clientX - o.current.offsetLeft - W.current)));
40
+ }, L = (e) => {
41
41
  var r;
42
- E.current = !1, I.current !== ((r = o.current) == null ? void 0 : r.scrollLeft) ? (e.currentTarget.style.cursor = "grab", k.current = !1, m.current && cancelAnimationFrame(m.current), m.current = requestAnimationFrame(() => {
43
- k.current = !0;
44
- })) : k.current = !0;
45
- }, nt = (e) => (t) => {
42
+ T.current = !1, C.current !== ((r = o.current) == null ? void 0 : r.scrollLeft) ? (e.currentTarget.style.cursor = "grab", M.current = !1, m.current && cancelAnimationFrame(m.current), m.current = requestAnimationFrame(() => {
43
+ M.current = !0;
44
+ })) : M.current = !0;
45
+ }, ot = (e) => (t) => {
46
46
  t.stopPropagation();
47
47
  let r = null;
48
48
  switch (t.key) {
49
49
  case "ArrowRight":
50
- t.preventDefault(), r = L(t.currentTarget, "right", c.current);
50
+ t.preventDefault(), r = y(t.currentTarget, "right", u.current);
51
51
  break;
52
52
  case "ArrowLeft":
53
- t.preventDefault(), r = L(t.currentTarget, "left", c.current);
53
+ t.preventDefault(), r = y(t.currentTarget, "left", u.current);
54
54
  break;
55
55
  case "ArrowDown":
56
- t.preventDefault(), r = L(t.currentTarget, "down", c.current);
56
+ t.preventDefault(), r = y(t.currentTarget, "down", u.current);
57
57
  break;
58
58
  case "ArrowUp":
59
- t.preventDefault(), r = L(t.currentTarget, "up", c.current);
59
+ t.preventDefault(), r = y(t.currentTarget, "up", u.current);
60
60
  break;
61
61
  case "Enter":
62
62
  case " ": {
@@ -67,7 +67,7 @@ function bt({
67
67
  return;
68
68
  }
69
69
  r == null || r.focus(), e == null || e(t);
70
- }, ot = (e) => (t) => {
70
+ }, st = (e) => (t) => {
71
71
  if (t.stopPropagation(), t.key === "Enter" || t.key === " ") {
72
72
  t.preventDefault(), t.currentTarget.click();
73
73
  return;
@@ -78,22 +78,22 @@ function bt({
78
78
  return;
79
79
  }
80
80
  t.preventDefault();
81
- const R = ft(
82
- b.current,
81
+ const v = pt(
82
+ R.current,
83
83
  r,
84
84
  n
85
- ), s = c.current[R ?? -1];
86
- s == null || s.focus(), e == null || e(t);
87
- }, st = (e) => (t) => {
88
- c.current[e] = t;
89
- }, at = (e, t, r) => (n) => {
90
- b.current[t] || (b.current[t] = []), c.current[e] = n, b.current[t][r] = n;
91
- }, X = (e) => (t) => {
92
- O(Number(t.currentTarget.getAttribute("aria-posinset")) - 1), e == null || e(t);
85
+ ), w = u.current[v ?? -1];
86
+ w == null || w.focus(), e == null || e(t);
87
+ }, at = (e) => (t) => {
88
+ u.current[e] = t;
89
+ }, it = (e, t, r) => (n) => {
90
+ R.current[t] || (R.current[t] = []), u.current[e] = n, R.current[t][r] = n;
91
+ }, G = (e) => (t) => {
92
+ tt(Number(t.currentTarget.getAttribute("aria-posinset")) - 1), e == null || e(t);
93
93
  };
94
94
  if (g(() => {
95
95
  const e = o.current, t = (r) => {
96
- k.current || r.stopPropagation();
96
+ M.current || r.stopPropagation();
97
97
  };
98
98
  return e == null || e.addEventListener("click", t), () => {
99
99
  e == null || e.removeEventListener("click", t);
@@ -106,53 +106,53 @@ function bt({
106
106
  e == null || e.removeEventListener("touchmove", t);
107
107
  };
108
108
  }, []), g(() => {
109
- const e = x.toArray(y).filter(G).filter((r) => r.type === V || r.type === $), t = e.map((r) => {
109
+ const e = S.toArray(A).filter(j).filter((r) => r.type === $ || r.type === J), t = e.map((r) => {
110
110
  var n;
111
- return ((n = z(r.props.children)) == null ? void 0 : n.props.src) ?? "";
111
+ return ((n = x(r.props.children)) == null ? void 0 : n.props.src) ?? "";
112
112
  }).filter(Boolean);
113
- tt(e), et(t);
114
- }, [y]), g(() => {
115
- f <= 0 || W.forEach((e) => {
113
+ et(e), rt(t);
114
+ }, [A]), g(() => {
115
+ f <= 0 || N.forEach((e) => {
116
116
  const t = new window.Image();
117
117
  t.src = e, t.onload = () => {
118
- rt(
118
+ nt(
119
119
  (r) => r.map((n) => (n.src === e && (n.width = t.width / t.height * (n.height ?? f), n.height = n.height ?? f), n))
120
120
  ), t.onload = null;
121
121
  }, t.onerror = () => {
122
122
  t.onload = null;
123
123
  };
124
124
  });
125
- }, [W, f]), g(() => {
125
+ }, [N, f]), g(() => {
126
126
  const e = () => {
127
127
  var t, r, n;
128
- Z(((r = (t = o.current) == null ? void 0 : t.parentElement) == null ? void 0 : r.offsetWidth) ?? 0), K(((n = o.current) == null ? void 0 : n.offsetHeight) ?? 0);
128
+ _(((r = (t = o.current) == null ? void 0 : t.parentElement) == null ? void 0 : r.offsetWidth) ?? 0), O(((n = o.current) == null ? void 0 : n.offsetHeight) ?? 0);
129
129
  };
130
130
  return e(), window.addEventListener("resize", e), () => {
131
131
  window.removeEventListener("resize", e);
132
132
  };
133
133
  }, []), g(() => () => {
134
134
  m.current && cancelAnimationFrame(m.current);
135
- }, []), v === "horizontal") {
136
- const e = lt(
137
- C,
135
+ }, []), b === "horizontal") {
136
+ const e = ft(
137
+ D,
138
138
  h,
139
- F,
140
- l * w / 2
139
+ B,
140
+ l * k / 2
141
141
  );
142
- let t = l * w / 2;
142
+ let t = l * k / 2;
143
143
  t = t <= 0 ? 120 : t;
144
144
  let r = 0;
145
- return /* @__PURE__ */ T(
146
- q,
145
+ return /* @__PURE__ */ z(
146
+ V,
147
147
  {
148
148
  ref: o,
149
149
  role: "list",
150
150
  "aria-label": "콘텐츠",
151
151
  "aria-orientation": "horizontal",
152
- onMouseDown: P,
153
- onMouseMove: U,
154
- onMouseUp: M,
155
- onMouseLeave: M,
152
+ onMouseDown: U,
153
+ onMouseMove: X,
154
+ onMouseUp: L,
155
+ onMouseLeave: L,
156
156
  pl: d,
157
157
  pr: d,
158
158
  ...a,
@@ -170,63 +170,71 @@ function bt({
170
170
  },
171
171
  ...a == null ? void 0 : a.inlineCSS
172
172
  },
173
- children: e.map((n, R) => /* @__PURE__ */ T(ct, { gap: u, children: n.map((s, it) => {
174
- const D = r++;
175
- return j(s, {
176
- setInnerRef: at(D, R, it),
177
- tabIndex: D === H ? 0 : -1,
178
- role: "listitem",
179
- "aria-posinset": D + 1,
180
- "aria-setsize": N,
181
- width: s.props.width ?? t,
182
- height: s.props.height ?? f,
183
- spacing: A.content(u),
184
- direction: v,
185
- sourceMetadata: C,
186
- onKeyDown: ot(s.props.onKeyDown),
187
- onFocus: X(s.props.onFocus),
188
- ...s.props
189
- });
190
- }) }, `masonry-row-${R}`))
173
+ children: e.map((n, v) => {
174
+ const w = v === e.length - 1;
175
+ return /* @__PURE__ */ z(ct, { gap: s, children: n.map((c, ut) => {
176
+ const I = r++;
177
+ return q(c, {
178
+ setInnerRef: it(I, v, ut),
179
+ tabIndex: I === H ? 0 : -1,
180
+ role: "listitem",
181
+ "aria-posinset": I + 1,
182
+ "aria-setsize": P,
183
+ width: c.props.width ?? t,
184
+ height: c.props.height ?? f,
185
+ direction: b,
186
+ spacing: s,
187
+ sourceMetadata: D,
188
+ onKeyDown: st(c.props.onKeyDown),
189
+ onFocus: G(c.props.onFocus),
190
+ style: {
191
+ marginBottom: w ? 0 : E.content(s),
192
+ ...c.props.style
193
+ },
194
+ ...c.props
195
+ });
196
+ }) }, `masonry-row-${v}`);
197
+ })
191
198
  }
192
199
  );
193
200
  }
194
- return /* @__PURE__ */ T(
195
- q,
201
+ return /* @__PURE__ */ z(
202
+ V,
196
203
  {
197
204
  ref: o,
198
205
  role: "list",
199
206
  "aria-label": "콘텐츠",
200
207
  "aria-orientation": "vertical",
201
- onMouseDown: P,
202
- onMouseMove: U,
203
- onMouseUp: M,
204
- onMouseLeave: M,
208
+ onMouseDown: U,
209
+ onMouseMove: X,
210
+ onMouseUp: L,
211
+ onMouseLeave: L,
205
212
  pt: d,
206
213
  pb: d,
207
214
  ...a,
208
215
  inlineCSS: {
209
216
  width: "100%",
210
217
  position: "relative",
211
- columnCount: S,
212
- columnGap: A.content(u),
218
+ columnCount: F,
219
+ columnGap: E.content(s),
220
+ marginTop: -E.content(s),
213
221
  ...a == null ? void 0 : a.inlineCSS
214
222
  },
215
- children: x.map(
223
+ children: S.map(
216
224
  h,
217
- (e, t) => j(e, {
218
- setInnerRef: st(t),
225
+ (e, t) => q(e, {
226
+ setInnerRef: at(t),
219
227
  role: "listitem",
220
228
  tabIndex: t === H ? 0 : -1,
221
229
  "aria-posinset": t + 1,
222
- "aria-setsize": N,
230
+ "aria-setsize": P,
223
231
  width: e.props.width ?? l,
224
- height: e.props.height ?? l * w / 2,
225
- spacing: A.content(u),
226
- direction: v,
227
- sourceMetadata: C,
228
- onKeyDown: nt(e.props.onKeyDown),
229
- onFocus: X(e.props.onFocus),
232
+ height: e.props.height ?? l * k / 2,
233
+ direction: b,
234
+ spacing: s,
235
+ sourceMetadata: D,
236
+ onKeyDown: ot(e.props.onKeyDown),
237
+ onFocus: G(e.props.onFocus),
230
238
  ...e.props
231
239
  })
232
240
  )
@@ -234,5 +242,5 @@ function bt({
234
242
  );
235
243
  }
236
244
  export {
237
- bt as default
245
+ kt as default
238
246
  };
@@ -1,8 +1,8 @@
1
1
  import { FlexboxProps } from 'node_modules/@dotss/ui/Flexbox/Flexbox';
2
2
  export interface MasonryBlockProps extends FlexboxProps {
3
- spacing?: number;
4
3
  width?: number;
5
4
  height?: number;
5
+ spacing?: number;
6
6
  borderRadius?: number | string;
7
7
  direction?: 'horizontal' | 'vertical';
8
8
  sourceMetadata?: {