dune-react 0.0.42 → 0.0.44

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 (59) hide show
  1. package/dist/_virtual/_commonjsHelpers.js +6 -0
  2. package/dist/_virtual/index.js +4 -0
  3. package/dist/components/puck-base/media.d.ts +1 -0
  4. package/dist/components/puck-base/media.js +272 -129
  5. package/dist/components/puck-block/contact-sections/centered-form/centered-form.js +1 -1
  6. package/dist/components/puck-block/contact-sections/contact-modal/contact-modal.js +1 -1
  7. package/dist/components/puck-block/contact-sections/form-with-media/form-with-media.js +1 -1
  8. package/dist/components/puck-block/contact-sections/header-form-cards/header-form-cards.js +1 -1
  9. package/dist/components/puck-block/contact-sections/split-info-form/split-info-form.js +135 -50
  10. package/dist/components/puck-block/gallery-sections/static-grid/static-grid.js +14 -10
  11. package/dist/components/puck-block/testimonial-sections/bento-testimonial/component.js +7 -6
  12. package/dist/components/shadcn/slider.js +1 -1
  13. package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/algorithms/flipImageAlgorithm.js +44 -0
  14. package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/algorithms/moveCoordinatesAlgorithm.js +8 -0
  15. package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/algorithms/resizeCoordinatesAlgorithm.js +291 -0
  16. package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/algorithms/rotateImageAlgorithm.js +38 -0
  17. package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/algorithms/transformImageAlgorithm.js +84 -0
  18. package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/animation/index.js +78 -0
  19. package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/boundary/index.js +31 -0
  20. package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/canvas/index.js +94 -0
  21. package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/constants/index.js +8 -0
  22. package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/defaults/defaultAreaPositionRestrictions.js +51 -0
  23. package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/defaults/defaultAreaSizeRestrictions.js +30 -0
  24. package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/defaults/defaultBoundary.js +10 -0
  25. package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/defaults/defaultPosition.js +12 -0
  26. package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/defaults/defaultPositionRestrictions.js +17 -0
  27. package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/defaults/defaultSize.js +31 -0
  28. package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/defaults/defaultSizeRestrictions.js +16 -0
  29. package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/defaults/defaultStencilConstraints.js +13 -0
  30. package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/defaults/defaultVisibleArea.js +49 -0
  31. package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/defaults/index.js +84 -0
  32. package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/extensions/stencil-size/index.js +107 -0
  33. package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/image/index.js +350 -0
  34. package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/instance/AbstractCropperInstance.js +494 -0
  35. package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/service/approximateSize.js +30 -0
  36. package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/service/fitCoordinates.js +30 -0
  37. package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/service/fitVisibleArea.js +26 -0
  38. package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/service/helpers.js +125 -0
  39. package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/service/imageTransforms.js +83 -0
  40. package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/service/interactions.js +19 -0
  41. package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/service/normalize.js +83 -0
  42. package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/service/sizeRestrictions.js +58 -0
  43. package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/service/utils.js +313 -0
  44. package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/state/copyState.js +7 -0
  45. package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/state/createState.js +41 -0
  46. package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/state/moveCoordinates.js +15 -0
  47. package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/state/reconcileState.js +44 -0
  48. package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/state/resizeCoordinates.js +22 -0
  49. package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/state/setBoundary.js +31 -0
  50. package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/state/setCoordinates.js +83 -0
  51. package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/state/setVisibleArea.js +18 -0
  52. package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/state/transformImage.js +18 -0
  53. package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/types/index.js +16 -0
  54. package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/utils/index.js +268 -0
  55. package/dist/node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.js +63 -0
  56. package/dist/node_modules/.pnpm/react-advanced-cropper@0.20.1_react@19.2.4/node_modules/react-advanced-cropper/dist/index.esm-bundler.js +1715 -0
  57. package/dist/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.js +181 -0
  58. package/dist/style.css +406 -0
  59. package/package.json +2 -1
@@ -1,7 +1,6 @@
1
1
  "use client";
2
2
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
3
3
  import { useState } from "react";
4
- import { Select, SelectTrigger, SelectValue, SelectContent, SelectItem } from "../../../shadcn/select.js";
5
4
  import { Input } from "../../../shadcn/input.js";
6
5
  import { Label } from "../../../shadcn/label.js";
7
6
  import { Textarea } from "../../../shadcn/textarea.js";
@@ -11,11 +10,25 @@ import { BiEnvelope, BiPhone, BiMap } from "../../../../node_modules/.pnpm/react
11
10
  import { cn } from "../../../../utils/css-utils.js";
12
11
  import { SectionWrapper } from "../../../puck-core/section-wrapper.js";
13
12
  const SplitInfoForm = (props) => {
14
- const { tagline, heading, description, email, phone, address, button, styles } = {
13
+ const {
14
+ tagline,
15
+ heading,
16
+ description,
17
+ email,
18
+ phone,
19
+ address,
20
+ button,
21
+ styles
22
+ } = {
15
23
  ...SplitInfoFormDefaults,
16
24
  ...props
17
25
  };
18
- const { className: sectionClassName, style: sectionStyle, css, formType = "simple" } = styles ?? {};
26
+ const {
27
+ className: sectionClassName,
28
+ style: sectionStyle,
29
+ css,
30
+ formType = "simple"
31
+ } = styles ?? {};
19
32
  const { createSubmitHandler, submitting } = useContactForm();
20
33
  const [nameInput, setNameInput] = useState("");
21
34
  const [firstName, setFirstName] = useState("");
@@ -23,13 +36,12 @@ const SplitInfoForm = (props) => {
23
36
  const [emailInput, setEmailInput] = useState("");
24
37
  const [phoneInput, setPhoneInput] = useState("");
25
38
  const [messageInput, setMessageInput] = useState("");
26
- const [topic, setTopic] = useState("");
27
39
  const handleSubmit = createSubmitHandler(
28
40
  () => ({
29
41
  name: nameInput || `${firstName} ${lastName}`.trim() || "",
30
42
  email: emailInput || "",
31
43
  phone: phoneInput || "",
32
- message: [topic, messageInput].filter(Boolean).join("\n\n") || ""
44
+ message: messageInput || ""
33
45
  }),
34
46
  () => {
35
47
  setNameInput("");
@@ -38,21 +50,44 @@ const SplitInfoForm = (props) => {
38
50
  setEmailInput("");
39
51
  setPhoneInput("");
40
52
  setMessageInput("");
41
- setTopic("");
42
53
  }
43
54
  );
44
55
  const renderSimpleFields = () => /* @__PURE__ */ jsxs(Fragment, { children: [
45
56
  /* @__PURE__ */ jsxs("div", { className: "grid w-full items-center", children: [
46
57
  /* @__PURE__ */ jsx(Label, { htmlFor: "name", className: "mb-2", children: "Name" }),
47
- /* @__PURE__ */ jsx(Input, { type: "text", id: "name", value: nameInput, onChange: (e) => setNameInput(e.target.value) })
58
+ /* @__PURE__ */ jsx(
59
+ Input,
60
+ {
61
+ type: "text",
62
+ id: "name",
63
+ value: nameInput,
64
+ onChange: (e) => setNameInput(e.target.value)
65
+ }
66
+ )
48
67
  ] }),
49
68
  /* @__PURE__ */ jsxs("div", { className: "grid w-full items-center", children: [
50
69
  /* @__PURE__ */ jsx(Label, { htmlFor: "email", className: "mb-2", children: "Email" }),
51
- /* @__PURE__ */ jsx(Input, { type: "email", id: "email", value: emailInput, onChange: (e) => setEmailInput(e.target.value) })
70
+ /* @__PURE__ */ jsx(
71
+ Input,
72
+ {
73
+ type: "email",
74
+ id: "email",
75
+ value: emailInput,
76
+ onChange: (e) => setEmailInput(e.target.value)
77
+ }
78
+ )
52
79
  ] }),
53
80
  /* @__PURE__ */ jsxs("div", { className: "grid w-full items-center", children: [
54
81
  /* @__PURE__ */ jsx(Label, { htmlFor: "phone", className: "mb-2", children: "Phone" }),
55
- /* @__PURE__ */ jsx(Input, { type: "tel", id: "phone", value: phoneInput, onChange: (e) => setPhoneInput(e.target.value) })
82
+ /* @__PURE__ */ jsx(
83
+ Input,
84
+ {
85
+ type: "tel",
86
+ id: "phone",
87
+ value: phoneInput,
88
+ onChange: (e) => setPhoneInput(e.target.value)
89
+ }
90
+ )
56
91
  ] }),
57
92
  /* @__PURE__ */ jsxs("div", { className: "grid w-full items-center", children: [
58
93
  /* @__PURE__ */ jsx(Label, { htmlFor: "message", className: "mb-2", children: "Message" }),
@@ -72,30 +107,52 @@ const SplitInfoForm = (props) => {
72
107
  /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-6", children: [
73
108
  /* @__PURE__ */ jsxs("div", { className: "grid w-full items-center", children: [
74
109
  /* @__PURE__ */ jsx(Label, { htmlFor: "firstName", className: "mb-2", children: "First name" }),
75
- /* @__PURE__ */ jsx(Input, { type: "text", id: "firstName", value: firstName, onChange: (e) => setFirstName(e.target.value) })
110
+ /* @__PURE__ */ jsx(
111
+ Input,
112
+ {
113
+ type: "text",
114
+ id: "firstName",
115
+ value: firstName,
116
+ onChange: (e) => setFirstName(e.target.value)
117
+ }
118
+ )
76
119
  ] }),
77
120
  /* @__PURE__ */ jsxs("div", { className: "grid w-full items-center", children: [
78
121
  /* @__PURE__ */ jsx(Label, { htmlFor: "lastName", className: "mb-2", children: "Last name" }),
79
- /* @__PURE__ */ jsx(Input, { type: "text", id: "lastName", value: lastName, onChange: (e) => setLastName(e.target.value) })
122
+ /* @__PURE__ */ jsx(
123
+ Input,
124
+ {
125
+ type: "text",
126
+ id: "lastName",
127
+ value: lastName,
128
+ onChange: (e) => setLastName(e.target.value)
129
+ }
130
+ )
80
131
  ] })
81
132
  ] }),
82
133
  /* @__PURE__ */ jsxs("div", { className: "grid w-full items-center", children: [
83
134
  /* @__PURE__ */ jsx(Label, { htmlFor: "email", className: "mb-2", children: "Email" }),
84
- /* @__PURE__ */ jsx(Input, { type: "email", id: "email", value: emailInput, onChange: (e) => setEmailInput(e.target.value) })
135
+ /* @__PURE__ */ jsx(
136
+ Input,
137
+ {
138
+ type: "email",
139
+ id: "email",
140
+ value: emailInput,
141
+ onChange: (e) => setEmailInput(e.target.value)
142
+ }
143
+ )
85
144
  ] }),
86
145
  /* @__PURE__ */ jsxs("div", { className: "grid w-full items-center", children: [
87
146
  /* @__PURE__ */ jsx(Label, { htmlFor: "phone", className: "mb-2", children: "Phone number" }),
88
- /* @__PURE__ */ jsx(Input, { type: "tel", id: "phone", value: phoneInput, onChange: (e) => setPhoneInput(e.target.value) })
89
- ] }),
90
- /* @__PURE__ */ jsxs("div", { className: "grid w-full items-center", children: [
91
- /* @__PURE__ */ jsx(Label, { htmlFor: "topic", className: "mb-2", children: "Choose a topic" }),
92
- /* @__PURE__ */ jsxs(Select, { value: topic, onValueChange: setTopic, children: [
93
- /* @__PURE__ */ jsx(SelectTrigger, { children: /* @__PURE__ */ jsx(SelectValue, { placeholder: "Select one..." }) }),
94
- /* @__PURE__ */ jsxs(SelectContent, { children: [
95
- /* @__PURE__ */ jsx(SelectItem, { value: "topic-1", children: "Topic one" }),
96
- /* @__PURE__ */ jsx(SelectItem, { value: "topic-2", children: "Topic two" })
97
- ] })
98
- ] })
147
+ /* @__PURE__ */ jsx(
148
+ Input,
149
+ {
150
+ type: "tel",
151
+ id: "phone",
152
+ value: phoneInput,
153
+ onChange: (e) => setPhoneInput(e.target.value)
154
+ }
155
+ )
99
156
  ] }),
100
157
  /* @__PURE__ */ jsxs("div", { className: "grid w-full items-center", children: [
101
158
  /* @__PURE__ */ jsx(Label, { htmlFor: "message", className: "mb-2", children: "Message" }),
@@ -111,33 +168,58 @@ const SplitInfoForm = (props) => {
111
168
  )
112
169
  ] })
113
170
  ] });
114
- return /* @__PURE__ */ jsx(SectionWrapper, { className: cn("px-[5%] py-8 md:py-12 lg:py-14", sectionClassName), style: sectionStyle, css, children: /* @__PURE__ */ jsx("div", { className: "container", children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 items-start gap-y-12 md:grid-flow-row md:grid-cols-2 md:gap-x-12 lg:grid-flow-col lg:gap-x-20 lg:gap-y-16", children: [
115
- /* @__PURE__ */ jsxs("div", { children: [
116
- /* @__PURE__ */ jsx("p", { className: "mb-3 font-semibold md:mb-4", children: tagline }),
117
- /* @__PURE__ */ jsxs("div", { className: "mb-6 md:mb-8", children: [
118
- /* @__PURE__ */ jsx("h2", { className: "mb-5 text-5xl font-bold md:mb-6 md:text-7xl lg:text-8xl", children: heading }),
119
- /* @__PURE__ */ jsx("p", { className: "md:text-md", children: description })
120
- ] }),
121
- /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 gap-4 py-2", children: [
122
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-4", children: [
123
- /* @__PURE__ */ jsx(BiEnvelope, { className: "size-6 flex-none" }),
124
- /* @__PURE__ */ jsx("p", { children: email })
125
- ] }),
126
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-4", children: [
127
- /* @__PURE__ */ jsx(BiPhone, { className: "size-6 flex-none" }),
128
- /* @__PURE__ */ jsx("p", { children: phone })
171
+ return /* @__PURE__ */ jsx(
172
+ SectionWrapper,
173
+ {
174
+ className: cn("px-[5%] py-8 md:py-12 lg:py-14", sectionClassName),
175
+ style: sectionStyle,
176
+ css,
177
+ children: /* @__PURE__ */ jsx("div", { className: "container", children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 items-start gap-y-12 md:grid-flow-row md:grid-cols-2 md:gap-x-12 lg:grid-flow-col lg:gap-x-20 lg:gap-y-16", children: [
178
+ /* @__PURE__ */ jsxs("div", { children: [
179
+ /* @__PURE__ */ jsx("p", { className: "mb-3 font-semibold md:mb-4", children: tagline }),
180
+ /* @__PURE__ */ jsxs("div", { className: "mb-6 md:mb-8", children: [
181
+ /* @__PURE__ */ jsx("h2", { className: "mb-5 text-5xl font-bold md:mb-6 md:text-7xl lg:text-8xl", children: heading }),
182
+ /* @__PURE__ */ jsx("p", { className: "md:text-md", children: description })
183
+ ] }),
184
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 gap-4 py-2", children: [
185
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-4", children: [
186
+ /* @__PURE__ */ jsx(BiEnvelope, { className: "size-6 flex-none" }),
187
+ /* @__PURE__ */ jsx("p", { children: email })
188
+ ] }),
189
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-4", children: [
190
+ /* @__PURE__ */ jsx(BiPhone, { className: "size-6 flex-none" }),
191
+ /* @__PURE__ */ jsx("p", { children: phone })
192
+ ] }),
193
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-4", children: [
194
+ /* @__PURE__ */ jsx(BiMap, { className: "size-6 flex-none" }),
195
+ /* @__PURE__ */ jsx("p", { children: address })
196
+ ] })
197
+ ] })
129
198
  ] }),
130
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-4", children: [
131
- /* @__PURE__ */ jsx(BiMap, { className: "size-6 flex-none" }),
132
- /* @__PURE__ */ jsx("p", { children: address })
133
- ] })
134
- ] })
135
- ] }),
136
- /* @__PURE__ */ jsxs("form", { className: "grid grid-cols-1 grid-rows-[auto_auto] gap-6", onSubmit: handleSubmit, children: [
137
- formType === "advanced" ? renderAdvancedFields() : renderSimpleFields(),
138
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(CompoundButton, { label: submitting ? "Submitting..." : button.label, variant: button.variant, size: button.size, action: button.action, icon: button.icon, disabled: submitting }) })
139
- ] })
140
- ] }) }) });
199
+ /* @__PURE__ */ jsxs(
200
+ "form",
201
+ {
202
+ className: "grid grid-cols-1 grid-rows-[auto_auto] gap-6",
203
+ onSubmit: handleSubmit,
204
+ children: [
205
+ formType === "advanced" ? renderAdvancedFields() : renderSimpleFields(),
206
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
207
+ CompoundButton,
208
+ {
209
+ type: "submit",
210
+ label: submitting ? "Submitting..." : button.label,
211
+ variant: button.variant,
212
+ size: button.size,
213
+ icon: button.icon,
214
+ disabled: submitting
215
+ }
216
+ ) })
217
+ ]
218
+ }
219
+ )
220
+ ] }) })
221
+ }
222
+ );
141
223
  };
142
224
  const SplitInfoFormDefaults = {
143
225
  tagline: "Tagline",
@@ -145,7 +227,10 @@ const SplitInfoFormDefaults = {
145
227
  description: "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
146
228
  button: { label: "Submit" },
147
229
  buttons: [],
148
- media: { src: "https://picsum.photos/seed/contact-split/800/600", alt: "Placeholder" },
230
+ media: {
231
+ src: "https://picsum.photos/seed/contact-split/800/600",
232
+ alt: "Placeholder"
233
+ },
149
234
  email: "hello@example.com",
150
235
  phone: "+1 (555) 000-0000",
151
236
  address: "123 Sample St, Sydney NSW 2000 AU",
@@ -3,11 +3,11 @@ import { cn } from "../../../../utils/css-utils.js";
3
3
  import { SectionWrapper } from "../../../puck-core/section-wrapper.js";
4
4
  import { CompoundMedia } from "../../../puck-base/media.js";
5
5
  const columnsMap = {
6
- "1": "grid-cols-1",
7
- "2": "grid-cols-1 md:grid-cols-2",
8
- "3": "grid-cols-1 md:grid-cols-2 lg:grid-cols-3",
9
- "2-lg3": "grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",
10
- "2-lg4": "grid-cols-1 sm:grid-cols-2 lg:grid-cols-4"
6
+ "1": "md:grid-cols-1",
7
+ "2": "md:grid-cols-2",
8
+ "3": "md:grid-cols-2 lg:grid-cols-3",
9
+ "2-lg3": "sm:grid-cols-2 lg:grid-cols-3",
10
+ "2-lg4": "sm:grid-cols-2 lg:grid-cols-4"
11
11
  };
12
12
  const StaticGrid = (props) => {
13
13
  const { heading, description, medias, styles } = {
@@ -25,11 +25,15 @@ const StaticGrid = (props) => {
25
25
  /* @__PURE__ */ jsx(
26
26
  "div",
27
27
  {
28
- className: cn("grid auto-cols-fr", gridCols, {
29
- "gap-8": hasGap,
30
- "gap-0": !hasGap
31
- }),
32
- children: medias.map((media, index) => /* @__PURE__ */ jsx("a", { href: "#", className: "size-full", children: /* @__PURE__ */ jsx("div", { className: "w-full overflow-hidden", children: /* @__PURE__ */ jsx(
28
+ className: cn(
29
+ "flex overflow-x-auto snap-x snap-mandatory scrollbar-hide md:grid md:auto-cols-fr md:overflow-visible",
30
+ gridCols,
31
+ {
32
+ "gap-4 md:gap-8": hasGap,
33
+ "gap-0": !hasGap
34
+ }
35
+ ),
36
+ children: medias.map((media, index) => /* @__PURE__ */ jsx("a", { href: "#", className: "w-[75vw] flex-none snap-start md:w-auto md:flex-1", children: /* @__PURE__ */ jsx("div", { className: "w-full overflow-hidden", children: /* @__PURE__ */ jsx(
33
37
  CompoundMedia,
34
38
  {
35
39
  src: media.src,
@@ -35,6 +35,7 @@ const BentoTestimonial = (props) => {
35
35
  {
36
36
  className: `grid grid-cols-1 gap-6 sm:grid-rows-6 md:grid-cols-2 md:gap-8 lg:grid-cols-4 ${gridRowsClass}`,
37
37
  children: testimonialCards.map((card, index) => {
38
+ var _a, _b, _c, _d, _e, _f;
38
39
  if (card.component === "background" && hasBackgroundCards) {
39
40
  backgroundImageCardCount++;
40
41
  return /* @__PURE__ */ jsxs(
@@ -59,9 +60,9 @@ const BentoTestimonial = (props) => {
59
60
  /* @__PURE__ */ jsx(
60
61
  CompoundMedia,
61
62
  {
62
- src: card.props.media.src,
63
+ src: (_a = card.props.media) == null ? void 0 : _a.src,
63
64
  className: "size-full object-cover",
64
- alt: card.props.media.alt
65
+ alt: (_b = card.props.media) == null ? void 0 : _b.alt
65
66
  }
66
67
  ),
67
68
  /* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-black/50" })
@@ -84,8 +85,8 @@ const BentoTestimonial = (props) => {
84
85
  children: /* @__PURE__ */ jsx(
85
86
  CompoundMedia,
86
87
  {
87
- src: card.props.media.src,
88
- alt: card.props.media.alt,
88
+ src: (_c = card.props.media) == null ? void 0 : _c.src,
89
+ alt: (_d = card.props.media) == null ? void 0 : _d.alt,
89
90
  className: "max-h-16"
90
91
  }
91
92
  )
@@ -104,8 +105,8 @@ const BentoTestimonial = (props) => {
104
105
  /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
105
106
  CompoundMedia,
106
107
  {
107
- src: card.props.media.src,
108
- alt: card.props.media.alt,
108
+ src: (_e = card.props.media) == null ? void 0 : _e.src,
109
+ alt: (_f = card.props.media) == null ? void 0 : _f.alt,
109
110
  className: "mb-4 size-12 min-h-12 min-w-12 rounded-full object-cover md:mb-0 md:mr-4"
110
111
  }
111
112
  ) }),
@@ -34,7 +34,7 @@ function Slider({
34
34
  Slider$1.Track,
35
35
  {
36
36
  "data-slot": "slider-track",
37
- className: "relative grow overflow-hidden rounded-full bg-muted select-none data-horizontal:h-1 data-horizontal:w-full data-vertical:h-full data-vertical:w-1",
37
+ className: "relative grow overflow-hidden rounded-full bg-muted-foreground/20 select-none data-horizontal:h-1 data-horizontal:w-full data-vertical:h-full data-vertical:w-1",
38
38
  children: /* @__PURE__ */ jsx(
39
39
  Slider$1.Indicator,
40
40
  {
@@ -0,0 +1,44 @@
1
+ import { rotatePoint, getCenter, applyMove, diff, moveToPositionRestrictions } from "../service/utils.js";
2
+ import { isInitializedState, getTransformedImageSize, getAreaPositionRestrictions } from "../service/helpers.js";
3
+ import { copyState } from "../state/copyState.js";
4
+ function flipImageAlgorithm(state, settings, horizontal, vertical) {
5
+ if (isInitializedState(state)) {
6
+ var result = copyState(state);
7
+ var rotate = state.transforms.rotate;
8
+ var imageSize = getTransformedImageSize(state);
9
+ var changed = {
10
+ horizontal,
11
+ vertical
12
+ };
13
+ if (changed.horizontal || changed.vertical) {
14
+ var imageCenter = rotatePoint({
15
+ left: imageSize.width / 2,
16
+ top: imageSize.height / 2
17
+ }, -rotate);
18
+ var oldCenter = rotatePoint(getCenter(result.coordinates), -rotate);
19
+ var newCenter = rotatePoint({
20
+ left: changed.horizontal ? imageCenter.left - (oldCenter.left - imageCenter.left) : oldCenter.left,
21
+ top: changed.vertical ? imageCenter.top - (oldCenter.top - imageCenter.top) : oldCenter.top
22
+ }, rotate);
23
+ result.coordinates = applyMove(result.coordinates, diff(newCenter, getCenter(result.coordinates)));
24
+ oldCenter = rotatePoint(getCenter(result.visibleArea), -rotate);
25
+ newCenter = rotatePoint({
26
+ left: changed.horizontal ? imageCenter.left - (oldCenter.left - imageCenter.left) : oldCenter.left,
27
+ top: changed.vertical ? imageCenter.top - (oldCenter.top - imageCenter.top) : oldCenter.top
28
+ }, rotate);
29
+ result.visibleArea = applyMove(result.visibleArea, diff(newCenter, getCenter(result.visibleArea)));
30
+ result.visibleArea = moveToPositionRestrictions(result.visibleArea, getAreaPositionRestrictions(result, settings));
31
+ }
32
+ if (changed.horizontal) {
33
+ result.transforms.flip.horizontal = !state.transforms.flip.horizontal;
34
+ }
35
+ if (changed.vertical) {
36
+ result.transforms.flip.vertical = !state.transforms.flip.vertical;
37
+ }
38
+ return result;
39
+ }
40
+ return state;
41
+ }
42
+ export {
43
+ flipImageAlgorithm
44
+ };
@@ -0,0 +1,8 @@
1
+ import { applyMove, moveToPositionRestrictions } from "../service/utils.js";
2
+ function moveCoordinatesAlgorithm(coordinates, directions, positionRestrictions) {
3
+ var movedCoordinates = applyMove(coordinates, directions);
4
+ return positionRestrictions ? moveToPositionRestrictions(movedCoordinates, positionRestrictions) : movedCoordinates;
5
+ }
6
+ export {
7
+ moveCoordinatesAlgorithm
8
+ };