@theguild/components 9.3.1 → 9.3.2-alpha-20250204184603-caff0f85bfdd5339cae8a6d0406b9238250f0f50

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.
@@ -29,10 +29,10 @@ function Marquee({
29
29
  ...rest,
30
30
  children: [
31
31
  /* @__PURE__ */ jsxs(
32
- "ul",
32
+ "div",
33
33
  {
34
34
  className: cn(
35
- "flex w-max animate-[marquee_var(--animation-duration)_var(--animation-direction)_linear_infinite] gap-2 py-1"
35
+ "flex w-max animate-[marquee_var(--animation-duration)_var(--animation-direction)_linear_infinite] gap-1 py-0.5 sm:gap-2 sm:py-1"
36
36
  ),
37
37
  style: {
38
38
  "--animation-duration": `${animationDuration}ms`,
@@ -76,10 +76,14 @@ function MarqueeRows({
76
76
  className,
77
77
  ...rest
78
78
  }) {
79
- const chunkSize = Math.ceil(children.length / rows);
79
+ const chunkSize = Math.floor(children.length / rows);
80
+ const remainder = children.length % rows;
80
81
  const chunks = [];
82
+ let start = 0;
81
83
  for (let i = 0; i < rows; i++) {
82
- chunks.push(children.slice(i * chunkSize, (i + 1) * chunkSize));
84
+ const end = start + chunkSize + (i < remainder ? 1 : 0);
85
+ chunks.push(children.slice(start, end));
86
+ start = end;
83
87
  }
84
88
  return /* @__PURE__ */ jsx("div", { className: cn("overflow-hidden", className), ...rest, children: chunks.map((chunk, index) => /* @__PURE__ */ jsxs(
85
89
  Marquee,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theguild/components",
3
- "version": "9.3.1",
3
+ "version": "9.3.2-alpha-20250204184603-caff0f85bfdd5339cae8a6d0406b9238250f0f50",
4
4
  "repository": {
5
5
  "url": "https://github.com/the-guild-org/docs",
6
6
  "directory": "packages/components"