@makeswift/runtime 0.0.0-25251c0 → 0.0.0-2efc6ab

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 (66) hide show
  1. package/dist/actions.cjs.js +5 -0
  2. package/dist/actions.cjs.js.map +1 -1
  3. package/dist/actions.es.js +5 -1
  4. package/dist/actions.es.js.map +1 -1
  5. package/dist/components.cjs.js +8 -0
  6. package/dist/components.cjs.js.map +1 -1
  7. package/dist/components.es.js +1 -1
  8. package/dist/control-serialization.cjs.js +4 -1
  9. package/dist/control-serialization.cjs.js.map +1 -1
  10. package/dist/control-serialization.es.js +4 -1
  11. package/dist/control-serialization.es.js.map +1 -1
  12. package/dist/descriptors.cjs.js +1 -0
  13. package/dist/descriptors.cjs.js.map +1 -1
  14. package/dist/descriptors.es.js +1 -1
  15. package/dist/descriptors.es.js.map +1 -1
  16. package/dist/main.cjs.js +1 -0
  17. package/dist/main.cjs.js.map +1 -1
  18. package/dist/main.es.js +1 -1
  19. package/dist/react-builder-preview.cjs.js +3 -0
  20. package/dist/react-builder-preview.cjs.js.map +1 -1
  21. package/dist/react-builder-preview.es.js +4 -1
  22. package/dist/react-builder-preview.es.js.map +1 -1
  23. package/dist/react-page.cjs.js +1 -1
  24. package/dist/react-page.cjs.js.map +1 -1
  25. package/dist/react-page.es.js +1 -1
  26. package/dist/react-page.es.js.map +1 -1
  27. package/dist/react.cjs2.js +243 -63
  28. package/dist/react.cjs2.js.map +1 -1
  29. package/dist/react.es2.js +233 -61
  30. package/dist/react.es2.js.map +1 -1
  31. package/dist/types/api/react.d.ts +6 -1
  32. package/dist/types/api/react.d.ts.map +1 -1
  33. package/dist/types/builder/serialization/control-serialization.d.ts +17 -11
  34. package/dist/types/builder/serialization/control-serialization.d.ts.map +1 -1
  35. package/dist/types/components/builtin/Video/Video.d.ts +15 -0
  36. package/dist/types/components/builtin/Video/Video.d.ts.map +1 -0
  37. package/dist/types/components/builtin/Video/index.d.ts +2 -0
  38. package/dist/types/components/builtin/Video/index.d.ts.map +1 -0
  39. package/dist/types/components/builtin/index.d.ts.map +1 -1
  40. package/dist/types/components/index.d.ts +1 -0
  41. package/dist/types/components/index.d.ts.map +1 -1
  42. package/dist/types/components/utils/placeholders.d.ts +7 -0
  43. package/dist/types/components/utils/placeholders.d.ts.map +1 -1
  44. package/dist/types/index.d.ts +1 -1
  45. package/dist/types/index.d.ts.map +1 -1
  46. package/dist/types/prop-controllers/descriptors.d.ts +5 -4
  47. package/dist/types/prop-controllers/descriptors.d.ts.map +1 -1
  48. package/dist/types/prop-controllers/index.d.ts +1 -1
  49. package/dist/types/prop-controllers/index.d.ts.map +1 -1
  50. package/dist/types/runtimes/react.d.ts.map +1 -1
  51. package/dist/types/state/actions.d.ts +9 -1
  52. package/dist/types/state/actions.d.ts.map +1 -1
  53. package/dist/types/state/react-builder-preview.d.ts.map +1 -1
  54. package/package.json +1 -1
  55. package/dist/types/components/builtin/Form/prop-controllers.d.ts +0 -1
  56. package/dist/types/components/builtin/Form/prop-controllers.d.ts.map +0 -1
  57. package/dist/types/components/hooks/useTableWorkspace.d.ts +0 -14
  58. package/dist/types/components/hooks/useTableWorkspace.d.ts.map +0 -1
  59. package/dist/types/components/utils/layout.d.ts +0 -16
  60. package/dist/types/components/utils/layout.d.ts.map +0 -1
  61. package/dist/types/components/utils/pollAnimationFrame.d.ts +0 -2
  62. package/dist/types/components/utils/pollAnimationFrame.d.ts.map +0 -1
  63. package/dist/types/components/utils/pollElementLayout.d.ts +0 -8
  64. package/dist/types/components/utils/pollElementLayout.d.ts.map +0 -1
  65. package/dist/types/components/utils/requestBatchedAnimationFrame.d.ts +0 -4
  66. package/dist/types/components/utils/requestBatchedAnimationFrame.d.ts.map +0 -1
package/dist/react.es2.js CHANGED
@@ -41,7 +41,7 @@ import { jsx, Fragment, jsxs } from "react/jsx-runtime";
41
41
  import { p as parse, c as createBox, g as getBox } from "./box-models.es.js";
42
42
  import NextImage from "next/image";
43
43
  import ReactPlayer from "react-player";
44
- import { E as ElementID, B as Backgrounds$1, W as Width, R as ResponsiveIconRadioGroup, M as Margin, P as Padding, a as Border, b as BorderRadius, S as Shadows, G as GapY, c as GapX, e as ResponsiveSelect, f as ResponsiveNumber, C as Checkbox$1, g as Grid$2, h as TextInput, L as Link$1, i as ResponsiveColor, j as TextStyle, I as Image$1, k as ResponsiveOpacity, l as Images, N as Number$1, D as Date$1, F as Font, m as ResponsiveLength, n as TextArea$1, o as Table, p as TableFormFields, q as NavigationLinks, r as SocialLinks$1, s as RichText } from "./descriptors.es.js";
44
+ import { E as ElementID, B as Backgrounds$1, W as Width, R as ResponsiveIconRadioGroup, M as Margin, P as Padding, a as Border, b as BorderRadius, S as Shadows, G as GapY, c as GapX, e as ResponsiveSelect, f as ResponsiveNumber, C as Checkbox$1, g as Grid$2, h as TextInput, L as Link$1, i as ResponsiveColor, j as TextStyle, I as Image$1, k as ResponsiveOpacity, l as Images, N as Number$1, D as Date$1, F as Font, m as ResponsiveLength, n as TextArea$1, o as Table, p as TableFormFields, q as NavigationLinks, r as SocialLinks$1, s as RichText, V as Video$1 } from "./descriptors.es.js";
45
45
  import ColorHelper from "color";
46
46
  import scrollIntoView from "scroll-into-view-if-needed";
47
47
  import NextLink from "next/link";
@@ -227,6 +227,89 @@ function ApolloProvider({
227
227
  children
228
228
  });
229
229
  }
230
+ const typePolicies = {
231
+ Query: {
232
+ fields: {
233
+ swatches(existingData, {
234
+ args,
235
+ toReference
236
+ }) {
237
+ return existingData != null ? existingData : args == null ? void 0 : args.ids.map((id) => toReference({
238
+ __typename: "Swatch",
239
+ id
240
+ }));
241
+ },
242
+ file(existingData, {
243
+ args,
244
+ toReference
245
+ }) {
246
+ return existingData != null ? existingData : toReference({
247
+ __typename: "File",
248
+ id: args == null ? void 0 : args.id
249
+ });
250
+ },
251
+ files(existingData, {
252
+ args,
253
+ toReference
254
+ }) {
255
+ return existingData != null ? existingData : args == null ? void 0 : args.ids.map((id) => toReference({
256
+ __typename: "File",
257
+ id
258
+ }));
259
+ },
260
+ typographies(existingData, {
261
+ args,
262
+ toReference
263
+ }) {
264
+ return existingData != null ? existingData : args == null ? void 0 : args.ids.map((id) => toReference({
265
+ __typename: "Typography",
266
+ id
267
+ }));
268
+ },
269
+ pagePathnamesById(existingData, {
270
+ args,
271
+ toReference
272
+ }) {
273
+ return existingData != null ? existingData : args == null ? void 0 : args.ids.map((id) => toReference({
274
+ __typename: "PagePathnameSlice",
275
+ id
276
+ }));
277
+ },
278
+ globalElement(existingData, {
279
+ args,
280
+ toReference
281
+ }) {
282
+ return existingData != null ? existingData : toReference({
283
+ __typename: "GlobalElement",
284
+ id: args == null ? void 0 : args.id
285
+ });
286
+ },
287
+ table(existingData, {
288
+ args,
289
+ toReference
290
+ }) {
291
+ return existingData != null ? existingData : toReference({
292
+ __typename: "Table",
293
+ id: args == null ? void 0 : args.id
294
+ });
295
+ }
296
+ }
297
+ }
298
+ };
299
+ function createApolloClient({
300
+ uri,
301
+ cacheData
302
+ }) {
303
+ const cache = new InMemoryCache({
304
+ typePolicies
305
+ });
306
+ if (cacheData)
307
+ cache.restore(cacheData);
308
+ return new ApolloClient({
309
+ uri,
310
+ cache
311
+ });
312
+ }
230
313
  function useBackgrounds(value) {
231
314
  const fileIds = value == null ? [] : value.map(({ value: backgrounds }) => backgrounds.map((background) => background.type === "image" && background.payload != null ? background.payload.imageId : null).filter(isNonNullable).reduce((a, b) => a.concat(b), [])).reduce((a, b) => a.concat(b), []);
232
315
  const swatchIds = value == null ? [] : value.map(({ value: backgrounds }) => backgrounds.map((background) => {
@@ -1073,7 +1156,7 @@ function Parallax(_g2) {
1073
1156
  children: children(getProps)
1074
1157
  }));
1075
1158
  }
1076
- const Container$c = styled.div`
1159
+ const Container$d = styled.div`
1077
1160
  position: absolute;
1078
1161
  top: 0;
1079
1162
  left: 0;
@@ -1127,7 +1210,7 @@ function BackgroundVideo({
1127
1210
  }, [aspectRatio, zoom]);
1128
1211
  if (!ReactPlayer.canPlay(url))
1129
1212
  return /* @__PURE__ */ jsx(Fragment, {});
1130
- return /* @__PURE__ */ jsxs(Container$c, {
1213
+ return /* @__PURE__ */ jsxs(Container$d, {
1131
1214
  ref: container,
1132
1215
  children: [container.current && /* @__PURE__ */ jsx(ReactPlayer, {
1133
1216
  url,
@@ -1206,10 +1289,10 @@ const AbsoluteFill = styled.div`
1206
1289
  right: 0;
1207
1290
  bottom: 0;
1208
1291
  `;
1209
- const Container$b = styled(AbsoluteFill)`
1292
+ const Container$c = styled(AbsoluteFill)`
1210
1293
  border-radius: inherit;
1211
1294
  `;
1212
- const BackgroundsContainer$1 = styled(Container$b)`
1295
+ const BackgroundsContainer$1 = styled(Container$c)`
1213
1296
  overflow: hidden;
1214
1297
  ${(p) => cssMediaRules([p.visibility], ([visibility]) => css`
1215
1298
  display: ${visibility === true ? "block" : "none"};
@@ -1233,7 +1316,7 @@ function Backgrounds({
1233
1316
  visibility,
1234
1317
  children: [...value].reverse().map((bg) => {
1235
1318
  if (bg.type === "color") {
1236
- return /* @__PURE__ */ jsx(Container$b, {
1319
+ return /* @__PURE__ */ jsx(Container$c, {
1237
1320
  style: {
1238
1321
  backgroundColor: getColor(bg.payload)
1239
1322
  }
@@ -1269,7 +1352,7 @@ function Backgrounds({
1269
1352
  }
1270
1353
  return /* @__PURE__ */ jsx(Parallax, {
1271
1354
  strength: parallax,
1272
- children: (getParallaxProps) => /* @__PURE__ */ jsx(Container$b, __spreadValues({}, getParallaxProps({
1355
+ children: (getParallaxProps) => /* @__PURE__ */ jsx(Container$c, __spreadValues({}, getParallaxProps({
1273
1356
  style: {
1274
1357
  backgroundImage: publicUrl != null ? `url('${publicUrl}')` : void 0,
1275
1358
  backgroundPosition,
@@ -1287,7 +1370,7 @@ function Backgrounds({
1287
1370
  isRadial
1288
1371
  } = bg.payload;
1289
1372
  const gradient = `${getStopsStyle(stops)}`;
1290
- return /* @__PURE__ */ jsx(Container$b, {
1373
+ return /* @__PURE__ */ jsx(Container$c, {
1291
1374
  style: {
1292
1375
  background: isRadial ? `radial-gradient(${gradient})` : `linear-gradient(${angle}rad, ${gradient})`
1293
1376
  }
@@ -1304,7 +1387,7 @@ function Backgrounds({
1304
1387
  } = bg.payload;
1305
1388
  return /* @__PURE__ */ jsx(Parallax, {
1306
1389
  strength: parallax,
1307
- children: (getParallaxProps) => /* @__PURE__ */ jsx(Container$b, __spreadProps(__spreadValues({}, getParallaxProps({})), {
1390
+ children: (getParallaxProps) => /* @__PURE__ */ jsx(Container$c, __spreadProps(__spreadValues({}, getParallaxProps({})), {
1308
1391
  children: /* @__PURE__ */ jsx(BackgroundVideo, {
1309
1392
  url,
1310
1393
  zoom,
@@ -1500,7 +1583,7 @@ const Box = forwardRef(function Box2({
1500
1583
  })
1501
1584
  }, key == null ? void 0 : key.container);
1502
1585
  });
1503
- function registerComponent$b(runtime) {
1586
+ function registerComponent$c(runtime) {
1504
1587
  return runtime.registerComponent(Box, {
1505
1588
  type: "./components/Box/index.js",
1506
1589
  label: "Box",
@@ -1998,7 +2081,7 @@ const Button$1 = forwardRef(function Button2(_m, ref) {
1998
2081
  children: children == null ? "Button Text" : children
1999
2082
  }));
2000
2083
  });
2001
- function registerComponent$a(runtime) {
2084
+ function registerComponent$b(runtime) {
2002
2085
  return runtime.registerComponent(Button$1, {
2003
2086
  type: "./components/Button/index.js",
2004
2087
  label: "Button",
@@ -2094,6 +2177,10 @@ const placeholders = {
2094
2177
  image: {
2095
2178
  src: "data:image/svg+xml,%3Csvg width='360' height='240' viewBox='0 0 360 240' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0)'%3E%3Cpath d='M0 0H360V240H0V0Z' fill='%23A1A8C2' fill-opacity='0.18'/%3E%3Cpath d='M260 59C260 78.33 244.33 94 225 94C205.67 94 190 78.33 190 59C190 39.67 205.67 24 225 24C244.33 24 260 39.67 260 59Z' fill='%23A1A8C2' fill-opacity='0.25'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M319 250H417L291.485 124.485C286.799 119.799 279.201 119.799 274.515 124.485L234 165L319 250Z' fill='%23A1A8C2' fill-opacity='0.25'/%3E%3Cpath d='M311 250L-89 250L102.515 58.4853C107.201 53.799 114.799 53.799 119.485 58.4853L311 250Z' fill='%23A1A8C2' fill-opacity='0.25'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0'%3E%3Cpath d='M0 0H360V240H0V0Z' fill='white'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E%0A",
2096
2179
  dimensions: { width: 360, height: 240 }
2180
+ },
2181
+ video: {
2182
+ src: "data:image/svg+xml,%3Csvg width='712' height='400' viewBox='0 0 712 400' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M712 0H0V400H712V0ZM356 240C378.091 240 396 222.091 396 200C396 177.909 378.091 160 356 160C333.909 160 316 177.909 316 200C316 222.091 333.909 240 356 240Z' fill='%23A1A8C2' fill-opacity='0.18'/%3E%3Cpath d='M344 216.503V183.497C344 181.95 345.681 180.989 347.014 181.773L375.069 198.276C376.384 199.049 376.384 200.951 375.069 201.724L347.014 218.227C345.681 219.011 344 218.05 344 216.503Z' fill='%23A1A8C2' fill-opacity='0.4'/%3E%3C/svg%3E%0A",
2183
+ dimensions: { width: 712, height: 400 }
2097
2184
  }
2098
2185
  };
2099
2186
  function loadImage(src) {
@@ -2199,7 +2286,7 @@ const ImageComponent = forwardRef(function Image2({
2199
2286
  })
2200
2287
  });
2201
2288
  });
2202
- function registerComponent$9(runtime) {
2289
+ function registerComponent$a(runtime) {
2203
2290
  return runtime.registerComponent(ImageComponent, {
2204
2291
  type: "./components/Image/index.js",
2205
2292
  label: "Image",
@@ -2248,7 +2335,7 @@ const RightChevron = () => /* @__PURE__ */ jsx("svg", {
2248
2335
  strokeWidth: "2"
2249
2336
  })
2250
2337
  });
2251
- const Container$a = styled.div`
2338
+ const Container$b = styled.div`
2252
2339
  position: relative;
2253
2340
  height: 100%;
2254
2341
  `;
@@ -2548,7 +2635,7 @@ const Carousel = forwardRef(function Carousel2({
2548
2635
  break;
2549
2636
  }
2550
2637
  },
2551
- children: [/* @__PURE__ */ jsxs(Container$a, {
2638
+ children: [/* @__PURE__ */ jsxs(Container$b, {
2552
2639
  children: [/* @__PURE__ */ jsx(ClipMask, {
2553
2640
  children: /* @__PURE__ */ jsx(Page, __spreadProps(__spreadValues({}, bindPage()), {
2554
2641
  animate: animation,
@@ -2624,7 +2711,7 @@ const Carousel = forwardRef(function Carousel2({
2624
2711
  })]
2625
2712
  });
2626
2713
  });
2627
- function registerComponent$8(runtime) {
2714
+ function registerComponent$9(runtime) {
2628
2715
  return runtime.registerComponent(Carousel, {
2629
2716
  type: "./components/Carousel/index.js",
2630
2717
  label: "Carousel",
@@ -2751,7 +2838,7 @@ const Segment = styled.div`
2751
2838
  flex: 1;
2752
2839
  text-align: center;
2753
2840
  `;
2754
- const Container$9 = styled.div`
2841
+ const Container$a = styled.div`
2755
2842
  display: flex;
2756
2843
  ${cssWidth("560px")}
2757
2844
  ${cssMargin()}
@@ -2991,7 +3078,7 @@ const Countdown = forwardRef(function Countdown2({
2991
3078
  }, 1e3);
2992
3079
  return () => clearInterval(intervalId);
2993
3080
  }, [date]);
2994
- return /* @__PURE__ */ jsxs(Container$9, {
3081
+ return /* @__PURE__ */ jsxs(Container$a, {
2995
3082
  ref,
2996
3083
  id,
2997
3084
  width,
@@ -3040,7 +3127,7 @@ const Countdown = forwardRef(function Countdown2({
3040
3127
  })]
3041
3128
  });
3042
3129
  });
3043
- function registerComponent$7(runtime) {
3130
+ function registerComponent$8(runtime) {
3044
3131
  return runtime.registerComponent(Countdown, {
3045
3132
  type: "./components/Countdown/index.js",
3046
3133
  label: "Countdown",
@@ -3176,7 +3263,7 @@ const IE11MinHeightContainer = styled.div`
3176
3263
  ${cssWidth()}
3177
3264
  ${cssMargin()}
3178
3265
  `;
3179
- const Container$8 = styled.div`
3266
+ const Container$9 = styled.div`
3180
3267
  display: flex;
3181
3268
  flex-direction: column;
3182
3269
  justify-content: center;
@@ -3235,7 +3322,7 @@ const Divider = forwardRef(function Divider2({
3235
3322
  id,
3236
3323
  width,
3237
3324
  margin,
3238
- children: /* @__PURE__ */ jsx(Container$8, {
3325
+ children: /* @__PURE__ */ jsx(Container$9, {
3239
3326
  children: /* @__PURE__ */ jsx(Line, {
3240
3327
  variant,
3241
3328
  thickness,
@@ -3244,7 +3331,7 @@ const Divider = forwardRef(function Divider2({
3244
3331
  })
3245
3332
  });
3246
3333
  });
3247
- function registerComponent$6(runtime) {
3334
+ function registerComponent$7(runtime) {
3248
3335
  return runtime.registerComponent(Divider, {
3249
3336
  type: "./components/Divider/index.js",
3250
3337
  label: "Divider",
@@ -3294,7 +3381,7 @@ function registerComponent$6(runtime) {
3294
3381
  }
3295
3382
  });
3296
3383
  }
3297
- const Container$7 = styled.div`
3384
+ const Container$8 = styled.div`
3298
3385
  min-height: 15px;
3299
3386
  ${cssWidth()}
3300
3387
  ${cssMargin()}
@@ -3374,7 +3461,7 @@ const Embed = forwardRef(function Embed2({
3374
3461
  }, [container, html]);
3375
3462
  if (shouldRender === false)
3376
3463
  return null;
3377
- return /* @__PURE__ */ jsx(Container$7, {
3464
+ return /* @__PURE__ */ jsx(Container$8, {
3378
3465
  ref: setContainer,
3379
3466
  id,
3380
3467
  margin,
@@ -3384,7 +3471,7 @@ const Embed = forwardRef(function Embed2({
3384
3471
  }
3385
3472
  });
3386
3473
  });
3387
- function registerComponent$5(runtime) {
3474
+ function registerComponent$6(runtime) {
3388
3475
  return runtime.registerComponent(Embed, {
3389
3476
  type: "./components/Embed/index.js",
3390
3477
  label: "Embed",
@@ -3606,7 +3693,7 @@ var Input$2 = forwardRef(function Input(_o, ref) {
3606
3693
  brandColor
3607
3694
  }));
3608
3695
  });
3609
- const Container$6 = styled.div`
3696
+ const Container$7 = styled.div`
3610
3697
  display: flex;
3611
3698
  flex-direction: column;
3612
3699
  ${cssWidth()};
@@ -3641,7 +3728,7 @@ var Placeholder$1 = forwardRef(function Placeholder2({
3641
3728
  width,
3642
3729
  margin
3643
3730
  }, ref) {
3644
- return /* @__PURE__ */ jsxs(Container$6, {
3731
+ return /* @__PURE__ */ jsxs(Container$7, {
3645
3732
  ref,
3646
3733
  width,
3647
3734
  margin,
@@ -3808,7 +3895,7 @@ function getCheckmarkColor$1({
3808
3895
  l
3809
3896
  }).alpha(a).isLight() ? "rgba(0, 0, 0, 0.7)" : "rgba(255, 255, 255, 0.95)";
3810
3897
  }
3811
- const Container$5 = styled.div`
3898
+ const Container$6 = styled.div`
3812
3899
  position: relative;
3813
3900
  ${(props) => cssMediaRules([props.size], ([size = Sizes.MEDIUM]) => css`
3814
3901
  height: ${getSizeHeight(size)}px;
@@ -3928,7 +4015,7 @@ var Checkbox = forwardRef(function Checkbox2(_w, ref) {
3928
4015
  contrast,
3929
4016
  brandColor
3930
4017
  } = useFormContext();
3931
- return /* @__PURE__ */ jsxs(Container$5, {
4018
+ return /* @__PURE__ */ jsxs(Container$6, {
3932
4019
  size,
3933
4020
  children: [/* @__PURE__ */ jsx(HiddenCheckbox, __spreadProps(__spreadValues({}, restOfProps), {
3934
4021
  type: "checkbox",
@@ -4071,7 +4158,7 @@ function getCheckmarkColor({
4071
4158
  l
4072
4159
  }).alpha(a).isLight() ? "rgba(0, 0, 0, 0.7)" : "rgba(255, 255, 255, 0.95)";
4073
4160
  }
4074
- const Container$4 = styled.div`
4161
+ const Container$5 = styled.div`
4075
4162
  position: relative;
4076
4163
  ${(props) => cssMediaRules([props.size], ([size = Sizes.MEDIUM]) => css`
4077
4164
  height: ${getSizeHeight(size)}px;
@@ -4184,7 +4271,7 @@ var RadioButton = forwardRef(function RadioButton2(_C, ref) {
4184
4271
  contrast,
4185
4272
  brandColor
4186
4273
  } = useFormContext();
4187
- return /* @__PURE__ */ jsxs(Container$4, {
4274
+ return /* @__PURE__ */ jsxs(Container$5, {
4188
4275
  size,
4189
4276
  children: [/* @__PURE__ */ jsx(HiddenRadioButton, __spreadProps(__spreadValues({}, restOfProps), {
4190
4277
  ref,
@@ -4256,7 +4343,7 @@ var TableColumnRadioButtonGroup = forwardRef(function TableColumnRadioButtonGrou
4256
4343
  }, option.id))]
4257
4344
  });
4258
4345
  });
4259
- const Container$3 = styled.div`
4346
+ const Container$4 = styled.div`
4260
4347
  ${cssField()}
4261
4348
  display: flex;
4262
4349
  align-items: center;
@@ -4321,7 +4408,7 @@ var TableColumnSingleSelect = forwardRef(function TableColumnSingleSelect2(_G, r
4321
4408
  children: [!hideLabel && /* @__PURE__ */ jsx(Label$1, {
4322
4409
  htmlFor: id,
4323
4410
  children: label
4324
- }), /* @__PURE__ */ jsxs(Container$3, {
4411
+ }), /* @__PURE__ */ jsxs(Container$4, {
4325
4412
  error,
4326
4413
  shape,
4327
4414
  size,
@@ -5014,7 +5101,7 @@ const Form = forwardRef(function Form2({
5014
5101
  })
5015
5102
  });
5016
5103
  });
5017
- function registerComponent$4(runtime) {
5104
+ function registerComponent$5(runtime) {
5018
5105
  return runtime.registerComponent(Form, {
5019
5106
  type: "./components/Form/index.js",
5020
5107
  label: "Form",
@@ -5574,7 +5661,7 @@ function MobileDropDownButton(_Y) {
5574
5661
  const ButtonLink = styled(Button$1)`
5575
5662
  margin: 8px 0;
5576
5663
  `;
5577
- const Container$2 = styled.div`
5664
+ const Container$3 = styled.div`
5578
5665
  position: fixed;
5579
5666
  flex-direction: column;
5580
5667
  width: 100%;
@@ -5628,7 +5715,7 @@ function MobileMenu({
5628
5715
  onClose = () => {
5629
5716
  }
5630
5717
  }) {
5631
- return /* @__PURE__ */ jsxs(Container$2, {
5718
+ return /* @__PURE__ */ jsxs(Container$3, {
5632
5719
  animation,
5633
5720
  backgroundColor: useColor(backgroundColor),
5634
5721
  open,
@@ -5654,7 +5741,7 @@ function MobileMenu({
5654
5741
  })]
5655
5742
  });
5656
5743
  }
5657
- const Container$1 = styled.nav`
5744
+ const Container$2 = styled.nav`
5658
5745
  display: flex;
5659
5746
  align-items: center;
5660
5747
  ${cssWidth()}
@@ -5711,7 +5798,7 @@ const Navigation = forwardRef(function Navigation2({
5711
5798
  margin
5712
5799
  }, ref) {
5713
5800
  const [isOpen, setIsOpen] = useState(false);
5714
- return /* @__PURE__ */ jsxs(Container$1, {
5801
+ return /* @__PURE__ */ jsxs(Container$2, {
5715
5802
  ref,
5716
5803
  id,
5717
5804
  margin,
@@ -5759,7 +5846,7 @@ const Navigation = forwardRef(function Navigation2({
5759
5846
  })]
5760
5847
  });
5761
5848
  });
5762
- function registerComponent$3(runtime) {
5849
+ function registerComponent$4(runtime) {
5763
5850
  return runtime.registerComponent(Navigation, {
5764
5851
  type: "./components/Navigation/index.js",
5765
5852
  label: "Navigation",
@@ -5936,7 +6023,7 @@ const Root = forwardRef(function Page2({
5936
6023
  })]
5937
6024
  });
5938
6025
  });
5939
- function registerComponent$2(runtime) {
6026
+ function registerComponent$3(runtime) {
5940
6027
  return runtime.registerComponent(Root, {
5941
6028
  type: "./components/Root/index.js",
5942
6029
  label: "Page",
@@ -6613,7 +6700,7 @@ function SocialLinksPlaceholder({
6613
6700
  }, link.id))
6614
6701
  });
6615
6702
  }
6616
- const Container = styled.div`
6703
+ const Container$1 = styled.div`
6617
6704
  display: flex;
6618
6705
  flex-direction: row;
6619
6706
  flex-wrap: wrap;
@@ -6697,7 +6784,7 @@ const SocialLinks = forwardRef(function SocialLinks2({
6697
6784
  }, ref) {
6698
6785
  const fillData = useColor(fill);
6699
6786
  const backgroundColorData = useColor(backgroundColor);
6700
- return /* @__PURE__ */ jsx(Container, {
6787
+ return /* @__PURE__ */ jsx(Container$1, {
6701
6788
  ref,
6702
6789
  id,
6703
6790
  alignment,
@@ -6733,7 +6820,7 @@ const SocialLinks = forwardRef(function SocialLinks2({
6733
6820
  })
6734
6821
  });
6735
6822
  });
6736
- function registerComponent$1(runtime) {
6823
+ function registerComponent$2(runtime) {
6737
6824
  return runtime.registerComponent(SocialLinks, {
6738
6825
  type: "./components/SocialLinks/index.js",
6739
6826
  label: "Social Links",
@@ -7270,7 +7357,7 @@ const Text = forwardRef(function Text2({
7270
7357
  onKeyDown: handleKeyDown
7271
7358
  });
7272
7359
  });
7273
- function registerComponent(runtime) {
7360
+ function registerComponent$1(runtime) {
7274
7361
  return runtime.registerComponent(Text, {
7275
7362
  type: "./components/Text/index.js",
7276
7363
  label: "Text",
@@ -7348,19 +7435,103 @@ function registerComponent(runtime) {
7348
7435
  }
7349
7436
  });
7350
7437
  }
7438
+ const Container = styled.div`
7439
+ display: flex;
7440
+ flex-direction: column;
7441
+ overflow: hidden;
7442
+ ${cssWidth("560px")}
7443
+ ${cssMargin()}
7444
+ ${cssBorderRadius()}
7445
+ `;
7446
+ const ASPECT_RATIO = 16 / 9;
7447
+ const Video = forwardRef(function Video2({
7448
+ id,
7449
+ video,
7450
+ width,
7451
+ margin,
7452
+ borderRadius
7453
+ }, ref) {
7454
+ const canPlayUrl = video && video.url != null && ReactPlayer.canPlay(video.url);
7455
+ return /* @__PURE__ */ jsx(Container, {
7456
+ ref,
7457
+ id,
7458
+ width,
7459
+ margin,
7460
+ borderRadius,
7461
+ children: /* @__PURE__ */ jsx("div", {
7462
+ style: {
7463
+ position: "relative",
7464
+ paddingTop: `${100 / ASPECT_RATIO}%`
7465
+ },
7466
+ children: /* @__PURE__ */ jsx("div", {
7467
+ style: {
7468
+ position: "absolute",
7469
+ top: 0,
7470
+ left: 0,
7471
+ right: 0,
7472
+ bottom: 0
7473
+ },
7474
+ children: canPlayUrl === true ? /* @__PURE__ */ jsx(ReactPlayer, __spreadProps(__spreadValues({}, video), {
7475
+ width: "100%",
7476
+ height: "100%",
7477
+ config: {
7478
+ vimeo: {
7479
+ playerOptions: {
7480
+ background: video != null && !video.controls
7481
+ }
7482
+ },
7483
+ wistia: {
7484
+ options: {
7485
+ endVideoBehavior: video != null && video.loop === true ? "loop" : "default"
7486
+ }
7487
+ }
7488
+ }
7489
+ })) : /* @__PURE__ */ jsx("img", {
7490
+ width: "100%",
7491
+ src: placeholders.video.src,
7492
+ alt: "Video Placeholder"
7493
+ })
7494
+ })
7495
+ })
7496
+ });
7497
+ });
7498
+ function registerComponent(runtime) {
7499
+ return runtime.registerComponent(Video, {
7500
+ type: "./components/Video/index.js",
7501
+ label: "Video",
7502
+ icon: "Video40",
7503
+ props: {
7504
+ id: ElementID(),
7505
+ video: Video$1({
7506
+ preset: {
7507
+ controls: true
7508
+ }
7509
+ }),
7510
+ width: Width({
7511
+ defaultValue: {
7512
+ value: 560,
7513
+ unit: "px"
7514
+ }
7515
+ }),
7516
+ margin: Margin(),
7517
+ borderRadius: BorderRadius()
7518
+ }
7519
+ });
7520
+ }
7351
7521
  function registerBuiltinComponents(runtime) {
7352
- const unregisterBoxComponent = registerComponent$b(runtime);
7353
- const unregisterButtonComponent = registerComponent$a(runtime);
7354
- const unregisterCarouselComponent = registerComponent$8(runtime);
7355
- const unregisterCountdownComponent = registerComponent$7(runtime);
7356
- const unregisterDividerComponent = registerComponent$6(runtime);
7357
- const unregisterEmbedComponent = registerComponent$5(runtime);
7358
- const unregisterFormComponent = registerComponent$4(runtime);
7359
- const unregisterImageComponent = registerComponent$9(runtime);
7360
- const unregisterNavigationComponent = registerComponent$3(runtime);
7361
- const unregisterRootComponent = registerComponent$2(runtime);
7362
- const unregisterSocialLinksComponent = registerComponent$1(runtime);
7363
- const unregisterTextComponent = registerComponent(runtime);
7522
+ const unregisterBoxComponent = registerComponent$c(runtime);
7523
+ const unregisterButtonComponent = registerComponent$b(runtime);
7524
+ const unregisterCarouselComponent = registerComponent$9(runtime);
7525
+ const unregisterCountdownComponent = registerComponent$8(runtime);
7526
+ const unregisterDividerComponent = registerComponent$7(runtime);
7527
+ const unregisterEmbedComponent = registerComponent$6(runtime);
7528
+ const unregisterFormComponent = registerComponent$5(runtime);
7529
+ const unregisterImageComponent = registerComponent$a(runtime);
7530
+ const unregisterNavigationComponent = registerComponent$4(runtime);
7531
+ const unregisterRootComponent = registerComponent$3(runtime);
7532
+ const unregisterSocialLinksComponent = registerComponent$2(runtime);
7533
+ const unregisterTextComponent = registerComponent$1(runtime);
7534
+ const unregisterVideoComponent = registerComponent(runtime);
7364
7535
  return () => {
7365
7536
  unregisterBoxComponent();
7366
7537
  unregisterButtonComponent();
@@ -7374,6 +7545,8 @@ function registerBuiltinComponents(runtime) {
7374
7545
  unregisterRootComponent();
7375
7546
  unregisterSocialLinksComponent();
7376
7547
  unregisterTextComponent();
7548
+ unregisterTextComponent();
7549
+ unregisterVideoComponent();
7377
7550
  };
7378
7551
  }
7379
7552
  const contextDefaultValue = configureStore();
@@ -7417,16 +7590,15 @@ function RuntimeProvider({
7417
7590
  registerComponents == null ? void 0 : registerComponents(runtime);
7418
7591
  return store2;
7419
7592
  });
7420
- const [client, setClient] = useState(new ApolloClient({
7421
- uri: makeswiftApiEndpoint,
7422
- cache: new InMemoryCache()
7593
+ const [client, setClient] = useState(createApolloClient({
7594
+ uri: makeswiftApiEndpoint
7423
7595
  }));
7424
7596
  useEffect(() => {
7425
7597
  setClient(({
7426
7598
  cache
7427
- }) => new ApolloClient({
7599
+ }) => createApolloClient({
7428
7600
  uri: makeswiftApiEndpoint,
7429
- cache
7601
+ cacheData: cache.extract()
7430
7602
  }));
7431
7603
  }, [makeswiftApiEndpoint]);
7432
7604
  useEffect(() => {
@@ -7652,5 +7824,5 @@ const DocumentReference = memo(forwardRef(function DocumentReference2({
7652
7824
  document
7653
7825
  });
7654
7826
  }));
7655
- export { Box as B, Carousel as C, DocumentReference as D, Element$1 as E, Form as F, ImageComponent as I, Navigation as N, PageProvider as P, RuntimeProvider as R, SocialLinks as S, Text as T, ReactRuntime as a, usePageId as b, Button$1 as c, Countdown as d, Divider as e, Embed as f, Root as g, registerComponent$b as h, DEFAULT_BOX_ANIMATE_TYPE as i, DEFAULT_BOX_ANIMATE_DELAY as j, DEFAULT_BOX_ANIMATE_DURATION as k, DEFAULT_ITEM_ANIMATE_TYPE as l, DEFAULT_ITEM_ANIMATE_DELAY as m, DEFAULT_ITEM_ANIMATE_DURATION as n, DEFAULT_ITEM_STAGGER_DURATION as o, cssMediaRules as p, cssWidth as q, registerBuiltinComponents as r, cssMargin as s, cssPadding as t, useIsInBuilder as u, cssBorder as v, cssBorderRadius as w, cssBoxShadow as x, cssGridItem as y, cssTextStyle as z };
7827
+ export { useBackgrounds as A, Box as B, Carousel as C, DocumentReference as D, Element$1 as E, Form as F, useBorder as G, useBoxShadow as H, ImageComponent as I, useColor as J, useFile as K, useMediaQuery as L, usePage as M, Navigation as N, useTable as O, PageProvider as P, RuntimeProvider as R, SocialLinks as S, Text as T, ReactRuntime as a, usePageId as b, Button$1 as c, Countdown as d, Divider as e, Embed as f, Root as g, registerComponent$c as h, DEFAULT_BOX_ANIMATE_TYPE as i, DEFAULT_BOX_ANIMATE_DELAY as j, DEFAULT_BOX_ANIMATE_DURATION as k, DEFAULT_ITEM_ANIMATE_TYPE as l, DEFAULT_ITEM_ANIMATE_DELAY as m, DEFAULT_ITEM_ANIMATE_DURATION as n, DEFAULT_ITEM_STAGGER_DURATION as o, cssMediaRules as p, cssWidth as q, registerBuiltinComponents as r, cssMargin as s, cssPadding as t, useIsInBuilder as u, cssBorder as v, cssBorderRadius as w, cssBoxShadow as x, cssGridItem as y, cssTextStyle as z };
7656
7828
  //# sourceMappingURL=react.es2.js.map