@makeswift/runtime 0.0.15 → 0.0.18

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 (136) hide show
  1. package/dist/api.cjs.js +1 -0
  2. package/dist/api.cjs.js.map +1 -1
  3. package/dist/api.es.js +1 -0
  4. package/dist/api.es.js.map +1 -1
  5. package/dist/builder.cjs.js +1 -1
  6. package/dist/builder.es.js +1 -1
  7. package/dist/components.cjs.js +6 -3
  8. package/dist/components.cjs.js.map +1 -1
  9. package/dist/components.es.js +6 -3
  10. package/dist/components.es.js.map +1 -1
  11. package/dist/constants.cjs.js +10 -363
  12. package/dist/constants.cjs.js.map +1 -1
  13. package/dist/constants.es.js +1 -354
  14. package/dist/constants.es.js.map +1 -1
  15. package/dist/control-serialization.cjs.js +43 -3
  16. package/dist/control-serialization.cjs.js.map +1 -1
  17. package/dist/control-serialization.es.js +41 -1
  18. package/dist/control-serialization.es.js.map +1 -1
  19. package/dist/controls.cjs.js +12 -9
  20. package/dist/controls.cjs.js.map +1 -1
  21. package/dist/controls.es.js +3 -2
  22. package/dist/controls.es.js.map +1 -1
  23. package/dist/descriptors.cjs.js.map +1 -1
  24. package/dist/descriptors.es.js.map +1 -1
  25. package/dist/graphql.cjs.js +365 -0
  26. package/dist/graphql.cjs.js.map +1 -0
  27. package/dist/graphql.es.js +356 -0
  28. package/dist/graphql.es.js.map +1 -0
  29. package/dist/image.cjs.js +14 -0
  30. package/dist/image.cjs.js.map +1 -0
  31. package/dist/image.es.js +10 -0
  32. package/dist/image.es.js.map +1 -0
  33. package/dist/index.cjs.js +412 -149
  34. package/dist/index.cjs.js.map +1 -1
  35. package/dist/index.es.js +368 -103
  36. package/dist/index.es.js.map +1 -1
  37. package/dist/main.cjs.js +1 -0
  38. package/dist/main.cjs.js.map +1 -1
  39. package/dist/main.es.js +1 -0
  40. package/dist/main.es.js.map +1 -1
  41. package/dist/next.cjs.js +18 -24
  42. package/dist/next.cjs.js.map +1 -1
  43. package/dist/next.es.js +20 -26
  44. package/dist/next.es.js.map +1 -1
  45. package/dist/react-builder-preview.cjs.js +8 -5
  46. package/dist/react-builder-preview.cjs.js.map +1 -1
  47. package/dist/react-builder-preview.es.js +10 -7
  48. package/dist/react-builder-preview.es.js.map +1 -1
  49. package/dist/react-page.cjs.js +260 -0
  50. package/dist/react-page.cjs.js.map +1 -1
  51. package/dist/react-page.es.js +254 -1
  52. package/dist/react-page.es.js.map +1 -1
  53. package/dist/react.cjs.js +6 -3
  54. package/dist/react.cjs.js.map +1 -1
  55. package/dist/react.es.js +6 -3
  56. package/dist/react.es.js.map +1 -1
  57. package/dist/shape.cjs.js +20 -0
  58. package/dist/shape.cjs.js.map +1 -0
  59. package/dist/shape.es.js +14 -0
  60. package/dist/shape.es.js.map +1 -0
  61. package/dist/text-input.cjs.js +0 -18
  62. package/dist/text-input.cjs.js.map +1 -1
  63. package/dist/text-input.es.js +1 -13
  64. package/dist/text-input.es.js.map +1 -1
  65. package/dist/types/api/introspection.d.ts +10 -0
  66. package/dist/types/api/introspection.d.ts.map +1 -0
  67. package/dist/types/api/react.d.ts +2 -2
  68. package/dist/types/api/react.d.ts.map +1 -1
  69. package/dist/types/builder/serialization/control-serialization.d.ts +3 -3
  70. package/dist/types/builder/serialization/control-serialization.d.ts.map +1 -1
  71. package/dist/types/builder/serialization/controls/combobox.d.ts +5 -0
  72. package/dist/types/builder/serialization/controls/combobox.d.ts.map +1 -0
  73. package/dist/types/builder/serialization/controls/shape.d.ts +5 -0
  74. package/dist/types/builder/serialization/controls/shape.d.ts.map +1 -0
  75. package/dist/types/components/builtin/Box/Box.d.ts.map +1 -1
  76. package/dist/types/components/builtin/Button/Button.d.ts.map +1 -1
  77. package/dist/types/components/builtin/Carousel/Carousel.d.ts.map +1 -1
  78. package/dist/types/components/builtin/Countdown/Countdown.d.ts.map +1 -1
  79. package/dist/types/components/builtin/Divider/Divider.d.ts.map +1 -1
  80. package/dist/types/components/builtin/Embed/Embed.d.ts.map +1 -1
  81. package/dist/types/components/builtin/Form/Form.d.ts.map +1 -1
  82. package/dist/types/components/builtin/Form/components/Field/components/Checkbox/index.d.ts.map +1 -1
  83. package/dist/types/components/builtin/Form/components/Field/components/Input/index.d.ts +1 -1
  84. package/dist/types/components/builtin/Form/components/Field/components/Input/index.d.ts.map +1 -1
  85. package/dist/types/components/builtin/Form/components/Field/components/Label/index.d.ts.map +1 -1
  86. package/dist/types/components/builtin/Form/components/Field/components/PlaceholderTableField/index.d.ts.map +1 -1
  87. package/dist/types/components/builtin/Form/components/Field/components/RadioButton/index.d.ts.map +1 -1
  88. package/dist/types/components/builtin/Form/components/Field/components/SingleSelectTableField/components/TableColumnSingleSelect/index.d.ts.map +1 -1
  89. package/dist/types/components/builtin/Form/components/Field/components/TextArea/index.d.ts.map +1 -1
  90. package/dist/types/components/builtin/Form/components/Field/services/cssField.d.ts +1 -1
  91. package/dist/types/components/builtin/Form/components/Placeholder/index.d.ts.map +1 -1
  92. package/dist/types/components/builtin/Image/Image.d.ts.map +1 -1
  93. package/dist/types/components/builtin/Navigation/Navigation.d.ts.map +1 -1
  94. package/dist/types/components/builtin/Navigation/components/DropDownButton/index.d.ts.map +1 -1
  95. package/dist/types/components/builtin/Navigation/components/LinksPlaceholder/index.d.ts.map +1 -1
  96. package/dist/types/components/builtin/Navigation/components/MobileMenu/components/MobileDropDownButton/index.d.ts.map +1 -1
  97. package/dist/types/components/builtin/Navigation/components/MobileMenu/index.d.ts.map +1 -1
  98. package/dist/types/components/builtin/Root/Root.d.ts.map +1 -1
  99. package/dist/types/components/builtin/SocialLinks/SocialLinks.d.ts.map +1 -1
  100. package/dist/types/components/builtin/Text/Text.d.ts.map +1 -1
  101. package/dist/types/components/builtin/Video/Video.d.ts.map +1 -1
  102. package/dist/types/components/hooks/useIsomorphicLayoutEffect.d.ts +3 -0
  103. package/dist/types/components/hooks/useIsomorphicLayoutEffect.d.ts.map +1 -0
  104. package/dist/types/components/hooks/useMediaQuery.d.ts.map +1 -1
  105. package/dist/types/components/shared/BackgroundsContainer/components/BackgroundVideo/index.d.ts.map +1 -1
  106. package/dist/types/components/shared/BackgroundsContainer/components/Parallax/index.d.ts.map +1 -1
  107. package/dist/types/components/utils/queries.d.ts +2 -0
  108. package/dist/types/components/utils/queries.d.ts.map +1 -1
  109. package/dist/types/controls/combobox.d.ts +22 -0
  110. package/dist/types/controls/combobox.d.ts.map +1 -0
  111. package/dist/types/controls/control.d.ts +3 -2
  112. package/dist/types/controls/control.d.ts.map +1 -1
  113. package/dist/types/controls/index.d.ts +1 -0
  114. package/dist/types/controls/index.d.ts.map +1 -1
  115. package/dist/types/controls/types.d.ts +3 -0
  116. package/dist/types/controls/types.d.ts.map +1 -1
  117. package/dist/types/next.d.ts +4 -8
  118. package/dist/types/next.d.ts.map +1 -1
  119. package/dist/types/prop-controllers/descriptors.d.ts +4 -3
  120. package/dist/types/prop-controllers/descriptors.d.ts.map +1 -1
  121. package/dist/types/prop-controllers/introspection.d.ts +5 -0
  122. package/dist/types/prop-controllers/introspection.d.ts.map +1 -1
  123. package/dist/types/runtimes/react/controls/combobox.d.ts +4 -0
  124. package/dist/types/runtimes/react/controls/combobox.d.ts.map +1 -0
  125. package/dist/types/runtimes/react/controls/control.d.ts +3 -2
  126. package/dist/types/runtimes/react/controls/control.d.ts.map +1 -1
  127. package/dist/types/runtimes/react/controls.d.ts.map +1 -1
  128. package/dist/types/runtimes/react/index.d.ts +1 -1
  129. package/dist/types/runtimes/react/index.d.ts.map +1 -1
  130. package/dist/types/state/react-page.d.ts +1 -0
  131. package/dist/types/state/react-page.d.ts.map +1 -1
  132. package/package.json +1 -1
  133. package/dist/list.cjs.js +0 -8
  134. package/dist/list.cjs.js.map +0 -1
  135. package/dist/list.es.js +0 -6
  136. package/dist/list.es.js.map +0 -1
package/dist/index.cjs.js CHANGED
@@ -37,16 +37,21 @@ var __publicField = (obj, key, value) => {
37
37
  var _ea;
38
38
  var React = require("react");
39
39
  var withSelector = require("use-sync-external-store/shim/with-selector");
40
- var client = require("@apollo/client");
41
40
  var reactPage = require("./react-page.cjs.js");
42
41
  var actions = require("./actions.cjs.js");
43
42
  var styled = require("styled-components");
44
43
  var framerMotion = require("framer-motion");
45
44
  var css = require("@emotion/css");
45
+ var client = require("@apollo/client");
46
+ var batchHttp = require("@apollo/client/link/batch-http");
47
+ var slate = require("slate");
48
+ var graphql = require("./graphql.cjs.js");
49
+ var shape = require("./shape.cjs.js");
50
+ var style = require("./style.cjs.js");
51
+ var descriptors = require("./descriptors.cjs.js");
46
52
  var jsxRuntime = require("react/jsx-runtime");
47
53
  var parse = require("html-react-parser");
48
54
  var Head = require("next/head");
49
- var descriptors = require("./descriptors.cjs.js");
50
55
  var ColorHelper = require("color");
51
56
  var scrollIntoView = require("scroll-into-view-if-needed");
52
57
  var NextLink = require("next/link");
@@ -58,15 +63,13 @@ var formik = require("formik");
58
63
  var boxModels = require("./box-models.cjs.js");
59
64
  var polished = require("polished");
60
65
  var ReactPlayer = require("react-player");
61
- var slate = require("slate");
62
66
  var Hotkeys = require("slate-hotkeys");
63
67
  var ipsum = require("corporate-ipsum");
64
68
  var isHotkey = require("is-hotkey");
65
69
  var slateReact = require("slate-react");
66
70
  var Lists = require("@convertkit/slate-lists");
67
71
  var textInput = require("./text-input.cjs.js");
68
- var list = require("./list.cjs.js");
69
- var style = require("./style.cjs.js");
72
+ var image = require("./image.cjs.js");
70
73
  var reactDom = require("react-dom");
71
74
  function _interopDefaultLegacy(e) {
72
75
  return e && typeof e === "object" && "default" in e ? e : { "default": e };
@@ -251,9 +254,165 @@ const TABLE_BY_ID = client.gql`
251
254
  }
252
255
  }
253
256
  `;
257
+ const ELEMENT_REFERENCE_GLOBAL_ELEMENT = client.gql`
258
+ query ElementReferenceGlobalElement($id: ID!) {
259
+ globalElement(id: $id) {
260
+ id
261
+ data
262
+ }
263
+ }
264
+ `;
265
+ const INTROSPECTION_QUERY = client.gql`
266
+ query Introspection(
267
+ $swatchIds: [ID!]!
268
+ $fileIds: [ID!]!
269
+ $pageIds: [ID!]!
270
+ $typographyIds: [ID!]!
271
+ $tableIds: [ID!]!
272
+ ) {
273
+ swatches(ids: $swatchIds) {
274
+ id
275
+ hue
276
+ saturation
277
+ lightness
278
+ }
279
+
280
+ files(ids: $fileIds) {
281
+ id
282
+ name
283
+ publicUrl
284
+ extension
285
+ dimensions {
286
+ width
287
+ height
288
+ }
289
+ }
290
+
291
+ pagePathnamesById(ids: $pageIds) {
292
+ id
293
+ pathname
294
+ }
295
+
296
+ typographies(ids: $typographyIds) {
297
+ ...Typography
298
+ }
299
+
300
+ tables(ids: $tableIds) {
301
+ id
302
+ name
303
+ columns {
304
+ id
305
+ name
306
+ ... on MultipleSelectTableColumn {
307
+ options {
308
+ id
309
+ name
310
+ }
311
+ }
312
+ ... on SingleSelectTableColumn {
313
+ options {
314
+ id
315
+ name
316
+ }
317
+ }
318
+ }
319
+ }
320
+ }
321
+
322
+ ${TYPOGRAPHY_FRAGMENT}
323
+ `;
254
324
  function isNonNullable(value) {
255
325
  return value != null;
256
326
  }
327
+ async function introspect(element, client2, store) {
328
+ var _a, _b, _c;
329
+ const descriptors$1 = reactPage.getPropControllerDescriptors(store.getState());
330
+ const swatchIds = /* @__PURE__ */ new Set();
331
+ const fileIds = /* @__PURE__ */ new Set();
332
+ const typographyIds = /* @__PURE__ */ new Set();
333
+ const tableIds = /* @__PURE__ */ new Set();
334
+ const pageIds = /* @__PURE__ */ new Set();
335
+ const remaining = [element];
336
+ let current;
337
+ while (current = remaining.pop()) {
338
+ let getResourcesFromElementDescriptors = function(elementDescriptors2, props) {
339
+ Object.entries(elementDescriptors2).forEach(([propName, descriptor]) => {
340
+ reactPage.getElementSwatchIds(descriptor, props[propName]).forEach((swatchId) => {
341
+ swatchIds.add(swatchId);
342
+ });
343
+ reactPage.getFileIds(descriptor, props[propName]).forEach((fileId) => fileIds.add(fileId));
344
+ reactPage.getTypographyIds(descriptor, props[propName]).forEach((typographyId) => typographyIds.add(typographyId));
345
+ reactPage.getTableIds(descriptor, props[propName]).forEach((tableId) => tableIds.add(tableId));
346
+ reactPage.getPageIds(descriptor, props[propName]).forEach((pageId) => pageIds.add(pageId));
347
+ reactPage.getElementChildren(descriptor, props[propName]).forEach((child) => remaining.push(child));
348
+ if (descriptor.type === shape.ShapeControlType) {
349
+ const prop = props[propName];
350
+ if (prop == null)
351
+ return;
352
+ getResourcesFromElementDescriptors(descriptor.config.type, prop);
353
+ }
354
+ if (descriptor.type === shape.ListControlType) {
355
+ const prop = props[propName];
356
+ if (prop == null)
357
+ return;
358
+ prop.forEach((item) => {
359
+ getResourcesFromElementDescriptors({ propName: descriptor.config.type }, { propName: item.value });
360
+ });
361
+ }
362
+ if (descriptor.type === descriptors.Types.Shape) {
363
+ const prop = props[propName];
364
+ if (prop == null)
365
+ return;
366
+ getResourcesFromElementDescriptors(descriptor.options.type, prop);
367
+ }
368
+ if (descriptor.type === descriptors.Types.List) {
369
+ const prop = props[propName];
370
+ if (prop == null)
371
+ return;
372
+ prop.forEach((item) => {
373
+ getResourcesFromElementDescriptors({ propName: descriptor.options.type }, { propName: item.value });
374
+ });
375
+ }
376
+ });
377
+ };
378
+ let element2;
379
+ if (reactPage.isElementReference(current)) {
380
+ const query = await client2.query({
381
+ query: ELEMENT_REFERENCE_GLOBAL_ELEMENT,
382
+ variables: { id: current.value }
383
+ });
384
+ const elementData = (_b = (_a = query.data) == null ? void 0 : _a.globalElement) == null ? void 0 : _b.data;
385
+ if (elementData == null)
386
+ continue;
387
+ element2 = elementData;
388
+ } else {
389
+ element2 = current;
390
+ }
391
+ const elementDescriptors = descriptors$1.get(element2.type);
392
+ if (elementDescriptors == null)
393
+ continue;
394
+ getResourcesFromElementDescriptors(elementDescriptors, element2.props);
395
+ }
396
+ const typographiesResult = await client2.query({
397
+ query: TYPOGRAPHIES_BY_ID,
398
+ variables: { ids: [...typographyIds] }
399
+ });
400
+ (_c = typographiesResult == null ? void 0 : typographiesResult.data) == null ? void 0 : _c.typographies.forEach((typography) => {
401
+ typography.style.forEach((style2) => {
402
+ var _a2;
403
+ const swatchId = (_a2 = style2.value.color) == null ? void 0 : _a2.swatchId;
404
+ if (swatchId != null)
405
+ swatchIds.add(swatchId);
406
+ });
407
+ });
408
+ return {
409
+ swatchIds: [...swatchIds],
410
+ fileIds: [...fileIds],
411
+ typographyIds: [...typographyIds],
412
+ tableIds: [...tableIds],
413
+ pageIds: [...pageIds]
414
+ };
415
+ }
257
416
  const typePolicies = {
258
417
  Query: {
259
418
  fields: {
@@ -341,14 +500,6 @@ const typePolicies = {
341
500
  }
342
501
  }
343
502
  };
344
- const isServer$1 = typeof window === "undefined";
345
- let globalApolloClient = null;
346
- function garbageCollectGlobalCacheData() {
347
- globalApolloClient = null;
348
- }
349
- function getGlobalCacheData() {
350
- return globalApolloClient == null ? void 0 : globalApolloClient.cache.extract();
351
- }
352
503
  function createApolloClient({
353
504
  uri,
354
505
  cacheData
@@ -359,9 +510,11 @@ function createApolloClient({
359
510
  if (cacheData)
360
511
  cache.restore(cacheData);
361
512
  return new client.ApolloClient({
362
- uri,
363
- cache,
364
- ssrMode: isServer$1
513
+ link: new batchHttp.BatchHttpLink({
514
+ uri,
515
+ batchMax: 100
516
+ }),
517
+ cache
365
518
  });
366
519
  }
367
520
  class MakeswiftClient {
@@ -370,14 +523,28 @@ class MakeswiftClient {
370
523
  cacheData
371
524
  }) {
372
525
  __publicField(this, "apolloClient");
373
- if (globalApolloClient == null)
374
- globalApolloClient = createApolloClient({
375
- uri,
376
- cacheData
526
+ this.apolloClient = createApolloClient({
527
+ uri,
528
+ cacheData
529
+ });
530
+ }
531
+ async prefetch(element) {
532
+ const introspectionData = await introspect(element, this.apolloClient, storeContextDefaultValue);
533
+ const res = await this.apolloClient.query({
534
+ query: INTROSPECTION_QUERY,
535
+ variables: introspectionData
536
+ });
537
+ res.data.pagePathnamesById.forEach((pagePathnameSlice) => {
538
+ const id = Buffer.from(`Page:${pagePathnameSlice.id}`).toString("base64");
539
+ this.apolloClient.cache.writeFragment({
540
+ fragment: graphql.PagePathnameSliceFragmentDoc,
541
+ data: __spreadProps(__spreadValues({}, pagePathnameSlice), {
542
+ id
543
+ })
377
544
  });
378
- else if (cacheData != null)
379
- globalApolloClient.cache.restore(cacheData);
380
- this.apolloClient = globalApolloClient;
545
+ });
546
+ slate.KeyUtils.resetGenerator();
547
+ return this.apolloClient.cache.extract();
381
548
  }
382
549
  updateCacheData(cacheData) {
383
550
  this.apolloClient.cache.restore(cacheData);
@@ -657,10 +824,12 @@ const getDeviceMediaQuery = (device) => {
657
824
  }
658
825
  return parts.join(" and ");
659
826
  };
827
+ const isSSR = typeof window === "undefined" || /ServerSideRendering/.test(window.navigator && window.navigator.userAgent);
828
+ const useIsomorphicLayoutEffect = isSSR ? React.useEffect : React.useLayoutEffect;
660
829
  function useMediaQuery(responsiveValue) {
661
830
  const [deviceId, setDeviceId] = React.useState(DEVICES[0].id);
662
831
  const { value } = findDeviceOverride(responsiveValue, deviceId) || {};
663
- React.useLayoutEffect(() => {
832
+ useIsomorphicLayoutEffect(() => {
664
833
  if (responsiveValue == null || window == null)
665
834
  return () => {
666
835
  };
@@ -1175,7 +1344,7 @@ function Parallax(_g2) {
1175
1344
  const container = React.useRef(null);
1176
1345
  const [containerScrollTop, setContainerScrollTop] = React.useState(strength == null ? 0 : strength);
1177
1346
  const lastScrollParentScrollTop = React.useRef(0);
1178
- React.useLayoutEffect(() => {
1347
+ useIsomorphicLayoutEffect(() => {
1179
1348
  if (!container.current || strength == null || strength === 0)
1180
1349
  return void 0;
1181
1350
  const containerDocument = container.current.ownerDocument;
@@ -1289,7 +1458,7 @@ function BackgroundVideo({
1289
1458
  const [ready, setReady] = React.useState(false);
1290
1459
  const [scale, setScale] = React.useState(1);
1291
1460
  const container = React.useRef(null);
1292
- React.useLayoutEffect(() => {
1461
+ useIsomorphicLayoutEffect(() => {
1293
1462
  const {
1294
1463
  current: containerEl
1295
1464
  } = container;
@@ -1530,7 +1699,9 @@ var BackgroundsContainer = React.forwardRef(function BackgroundsContainer2(_i, r
1530
1699
  }), React.Children.only(children)]
1531
1700
  }));
1532
1701
  });
1533
- const StyledBackgroundsContainer = styled__default["default"](BackgroundsContainer)`
1702
+ const StyledBackgroundsContainer = styled__default["default"](BackgroundsContainer).withConfig({
1703
+ shouldForwardProp: (prop) => !["margin", "borderRadius", "alignSelf"].includes(prop.toString())
1704
+ })`
1534
1705
  display: flex;
1535
1706
  ${cssMargin()}
1536
1707
  ${cssBorderRadius()}
@@ -1538,7 +1709,9 @@ const StyledBackgroundsContainer = styled__default["default"](BackgroundsContain
1538
1709
  alignSelf
1539
1710
  }))}
1540
1711
  `;
1541
- const Grid$1 = styled__default["default"](framerMotion.motion.div)`
1712
+ const Grid$1 = styled__default["default"](framerMotion.motion.div).withConfig({
1713
+ shouldForwardProp: (prop) => !["padding", "border", "boxShadow", "alignContent"].includes(prop)
1714
+ })`
1542
1715
  display: flex;
1543
1716
  flex-wrap: wrap;
1544
1717
  width: 100%;
@@ -1549,7 +1722,9 @@ const Grid$1 = styled__default["default"](framerMotion.motion.div)`
1549
1722
  alignContent
1550
1723
  }))}
1551
1724
  `;
1552
- const GridItem$2 = styled__default["default"](framerMotion.motion.div)`
1725
+ const GridItem$2 = styled__default["default"](framerMotion.motion.div).withConfig({
1726
+ shouldForwardProp: (prop) => !["grid", "alignItems", "index", "columnGap", "rowGap"].includes(prop)
1727
+ })`
1553
1728
  display: flex;
1554
1729
 
1555
1730
  /* IE11 doesn't recognize space-between and treats it as stretch, so we fall back to flex-start */
@@ -1977,7 +2152,9 @@ function responsiveWidth(widthData, defaultValue = "100%") {
1977
2152
  width: typeof width === "object" ? `${width.value}${width.unit}` : width
1978
2153
  })));
1979
2154
  }
1980
- const StyledButton$1 = styled__default["default"](Link)`
2155
+ const StyledButton$1 = styled__default["default"](Link).withConfig({
2156
+ shouldForwardProp: (prop) => !["margin", "variant", "shape", "size", "textColor", "color", "textStyle"].includes(prop.toString())
2157
+ })`
1981
2158
  display: table;
1982
2159
  border: 0;
1983
2160
  outline: 0;
@@ -1987,7 +2164,7 @@ const StyledButton$1 = styled__default["default"](Link)`
1987
2164
  text-decoration: none;
1988
2165
  text-align: center;
1989
2166
  ${cssMargin()}
1990
- ${(p) => cssMediaRules([p.variant, p.shape, p.size, p.textColor, p.color], ([variant = "flat", shape = "rounded", size = "medium", textColor = {
2167
+ ${(p) => cssMediaRules([p.variant, p.shape, p.size, p.textColor, p.color], ([variant = "flat", shape2 = "rounded", size = "medium", textColor = {
1991
2168
  swatch: {
1992
2169
  hue: 0,
1993
2170
  saturation: 0,
@@ -2016,14 +2193,13 @@ const StyledButton$1 = styled__default["default"](Link)`
2016
2193
  square: 0,
2017
2194
  rounded: 4,
2018
2195
  pill: 500
2019
- }[shape]}px;
2196
+ }[shape2]}px;
2020
2197
  padding: ${{
2021
2198
  small: "8px 12px",
2022
2199
  medium: "12px 16px",
2023
2200
  large: "16px 20px"
2024
2201
  }[size]};
2025
2202
  font-size: ${`${fontSize.value}${fontSize.unit}`};
2026
-
2027
2203
  ${{
2028
2204
  flat: styled.css`
2029
2205
  background: ${colorToString(color)};
@@ -2166,7 +2342,7 @@ const StyledButton$1 = styled__default["default"](Link)`
2166
2342
  }[variant]}
2167
2343
  `;
2168
2344
  })}
2169
- ${cssTextStyle()}
2345
+ ${cssTextStyle()}
2170
2346
  `;
2171
2347
  const Button$1 = React.forwardRef(function Button2(_m, ref) {
2172
2348
  var _n = _m, {
@@ -2174,7 +2350,7 @@ const Button$1 = React.forwardRef(function Button2(_m, ref) {
2174
2350
  children,
2175
2351
  link,
2176
2352
  variant,
2177
- shape,
2353
+ shape: shape2,
2178
2354
  size,
2179
2355
  textColor,
2180
2356
  color,
@@ -2203,7 +2379,7 @@ const Button$1 = React.forwardRef(function Button2(_m, ref) {
2203
2379
  color,
2204
2380
  link,
2205
2381
  margin,
2206
- shape,
2382
+ shape: shape2,
2207
2383
  size,
2208
2384
  textColor,
2209
2385
  textStyle,
@@ -2321,10 +2497,10 @@ const placeholders = {
2321
2497
  };
2322
2498
  function loadImage(src) {
2323
2499
  return new Promise((resolve, reject) => {
2324
- const image = new Image();
2325
- image.onload = () => resolve(image);
2326
- image.onerror = reject;
2327
- image.src = src;
2500
+ const image2 = new Image();
2501
+ image2.onload = () => resolve(image2);
2502
+ image2.onerror = reject;
2503
+ image2.src = src;
2328
2504
  });
2329
2505
  }
2330
2506
  function imageSizes(width) {
@@ -2338,7 +2514,9 @@ function imageSizes(width) {
2338
2514
  return `(max-width: ${device.maxWidth}px) ${Math.min(device.maxWidth, override.value.value)}px`;
2339
2515
  }).filter((size) => size != null).reduce((sourceSizes, sourceSize) => `${sourceSize}, ${sourceSizes}`, baseWidthSize);
2340
2516
  }
2341
- const ImageContainer = styled__default["default"].div`
2517
+ const ImageContainer = styled__default["default"].div.withConfig({
2518
+ shouldForwardProp: (prop) => !["margin", "padding", "border", "borderRadius", "boxShadow", "opacity", "link", "dimensions"].includes(prop.toString())
2519
+ })`
2342
2520
  line-height: 0;
2343
2521
  overflow: hidden;
2344
2522
  ${cssMargin()}
@@ -2379,11 +2557,11 @@ const ImageComponent = React.forwardRef(function Image2({
2379
2557
  if (dataDimensions)
2380
2558
  return;
2381
2559
  let cleanedUp = false;
2382
- loadImage(imageSrc).then((image) => {
2560
+ loadImage(imageSrc).then((image2) => {
2383
2561
  if (!cleanedUp) {
2384
2562
  setMeasuredDimensions({
2385
- width: image.naturalWidth,
2386
- height: image.naturalHeight
2563
+ width: image2.naturalWidth,
2564
+ height: image2.naturalHeight
2387
2565
  });
2388
2566
  }
2389
2567
  }).catch(console.error);
@@ -2473,7 +2651,9 @@ const Container$b = styled__default["default"].div`
2473
2651
  position: relative;
2474
2652
  height: 100%;
2475
2653
  `;
2476
- const Wrapper = styled__default["default"].div`
2654
+ const Wrapper = styled__default["default"].div.withConfig({
2655
+ shouldForwardProp: (prop) => !["margin"].includes(prop)
2656
+ })`
2477
2657
  position: relative;
2478
2658
  display: flex;
2479
2659
  flex-direction: column;
@@ -2483,7 +2663,9 @@ const Wrapper = styled__default["default"].div`
2483
2663
  outline: 0;
2484
2664
  }
2485
2665
  `;
2486
- const Arrow = styled__default["default"].div`
2666
+ const Arrow = styled__default["default"].div.withConfig({
2667
+ shouldForwardProp: (prop) => !["background"].includes(prop)
2668
+ })`
2487
2669
  padding: 10px;
2488
2670
  border-radius: 50%;
2489
2671
  outline: 0;
@@ -2511,7 +2693,9 @@ const Arrow = styled__default["default"].div`
2511
2693
  stroke: currentColor;
2512
2694
  }
2513
2695
  `;
2514
- const Slop = styled__default["default"].div`
2696
+ const Slop = styled__default["default"].div.withConfig({
2697
+ shouldForwardProp: (prop) => !["color"].includes(prop)
2698
+ })`
2515
2699
  position: absolute;
2516
2700
  top: 0;
2517
2701
  bottom: 0;
@@ -2530,7 +2714,9 @@ const Slop = styled__default["default"].div`
2530
2714
  color: ${colorToString(color)};
2531
2715
  `)}
2532
2716
  `;
2533
- const Slide = styled__default["default"](framerMotion.motion.div)`
2717
+ const Slide = styled__default["default"](framerMotion.motion.div).withConfig({
2718
+ shouldForwardProp: (prop) => !["pageSize", "alignItems"].includes(prop)
2719
+ })`
2534
2720
  display: flex;
2535
2721
  ${(p) => cssMediaRules([p.pageSize], ([pageSize = 1]) => styled.css`
2536
2722
  flex-basis: ${100 / pageSize}%;
@@ -2542,7 +2728,9 @@ const Slide = styled__default["default"](framerMotion.motion.div)`
2542
2728
  alignItems
2543
2729
  }))}
2544
2730
  `;
2545
- const Reel = styled__default["default"](framerMotion.motion.div)`
2731
+ const Reel = styled__default["default"](framerMotion.motion.div).withConfig({
2732
+ shouldForwardProp: (prop) => !["gap"].includes(prop)
2733
+ })`
2546
2734
  display: flex;
2547
2735
  position: relative;
2548
2736
  flex-wrap: nowrap;
@@ -2561,7 +2749,9 @@ const Page$1 = styled__default["default"](framerMotion.motion.div)`
2561
2749
  position: relative;
2562
2750
  width: 100%;
2563
2751
  `;
2564
- const LeftSlop = styled__default["default"](Slop)`
2752
+ const LeftSlop = styled__default["default"](Slop).withConfig({
2753
+ shouldForwardProp: (prop) => !["position"].includes(prop)
2754
+ })`
2565
2755
  ${(p) => cssMediaRules([p.position], ([position = "inside"]) => {
2566
2756
  switch (position) {
2567
2757
  case "inside":
@@ -2586,7 +2776,9 @@ const LeftSlop = styled__default["default"](Slop)`
2586
2776
  }
2587
2777
  }
2588
2778
  `;
2589
- const RightSlop = styled__default["default"](Slop)`
2779
+ const RightSlop = styled__default["default"](Slop).withConfig({
2780
+ shouldForwardProp: (prop) => !["position"].includes(prop)
2781
+ })`
2590
2782
  ${(p) => cssMediaRules([p.position], ([position = "inside"]) => {
2591
2783
  switch (position) {
2592
2784
  case "inside":
@@ -2614,7 +2806,9 @@ const RightSlop = styled__default["default"](Slop)`
2614
2806
  const ClipMask = styled__default["default"].div`
2615
2807
  overflow: hidden;
2616
2808
  `;
2617
- const Dots = styled__default["default"].div`
2809
+ const Dots = styled__default["default"].div.withConfig({
2810
+ shouldForwardProp: (prop) => !["color"].includes(prop)
2811
+ })`
2618
2812
  display: ${(props) => props.hidden ? "none" : "flex"};
2619
2813
  justify-content: center;
2620
2814
  margin-top: 20px;
@@ -2629,7 +2823,9 @@ const Dots = styled__default["default"].div`
2629
2823
  color: ${colorToString(color)};
2630
2824
  `)}
2631
2825
  `;
2632
- const Dot = styled__default["default"].div`
2826
+ const Dot = styled__default["default"].div.withConfig({
2827
+ shouldForwardProp: (prop) => !["active"].includes(prop)
2828
+ })`
2633
2829
  position: relative;
2634
2830
  margin: 0 6px;
2635
2831
  border-radius: 50%;
@@ -2989,7 +3185,9 @@ const Segment = styled__default["default"].div`
2989
3185
  flex: 1;
2990
3186
  text-align: center;
2991
3187
  `;
2992
- const Container$a = styled__default["default"].div`
3188
+ const Container$a = styled__default["default"].div.withConfig({
3189
+ shouldForwardProp: (prop) => !["margin", "variant", "size", "shape", "gap", "labelColor", "numberFont", "numberColor", "blockColor", "labelFont"].includes(prop)
3190
+ })`
2993
3191
  display: flex;
2994
3192
  ${cssMargin()}
2995
3193
  ${(p) => cssMediaRules([p.size], ([size = "medium"]) => {
@@ -3036,8 +3234,8 @@ const Container$a = styled__default["default"].div`
3036
3234
  }
3037
3235
 
3038
3236
  ${Block$1} {
3039
- ${(p) => cssMediaRules([p.shape], ([shape = "rounded"]) => {
3040
- switch (shape) {
3237
+ ${(p) => cssMediaRules([p.shape], ([shape2 = "rounded"]) => {
3238
+ switch (shape2) {
3041
3239
  case "pill":
3042
3240
  return styled.css`
3043
3241
  border-radius: 500px;
@@ -3085,7 +3283,7 @@ const Container$a = styled__default["default"].div`
3085
3283
  z-index: 1;
3086
3284
  }
3087
3285
 
3088
- :before {
3286
+ ::before {
3089
3287
  content: '';
3090
3288
  position: absolute;
3091
3289
  top: 0;
@@ -3097,7 +3295,7 @@ const Container$a = styled__default["default"].div`
3097
3295
  background: ${colorToString(blockColor)};
3098
3296
  }
3099
3297
 
3100
- :after {
3298
+ ::after {
3101
3299
  content: '';
3102
3300
  position: absolute;
3103
3301
  left: 0;
@@ -3128,7 +3326,7 @@ const Container$a = styled__default["default"].div`
3128
3326
  z-index: 1;
3129
3327
  }
3130
3328
 
3131
- :before {
3329
+ ::before {
3132
3330
  content: '';
3133
3331
  position: absolute;
3134
3332
  top: 50%;
@@ -3203,7 +3401,7 @@ const Countdown = React.forwardRef(function Countdown2({
3203
3401
  date,
3204
3402
  variant,
3205
3403
  size,
3206
- shape,
3404
+ shape: shape2,
3207
3405
  gap,
3208
3406
  labelColor,
3209
3407
  labelFont,
@@ -3235,7 +3433,7 @@ const Countdown = React.forwardRef(function Countdown2({
3235
3433
  margin,
3236
3434
  variant,
3237
3435
  size,
3238
- shape,
3436
+ shape: shape2,
3239
3437
  labelColor,
3240
3438
  labelFont,
3241
3439
  numberColor,
@@ -3408,7 +3606,9 @@ function registerComponent$8(runtime) {
3408
3606
  }
3409
3607
  });
3410
3608
  }
3411
- const IE11MinHeightContainer = styled__default["default"].div`
3609
+ const IE11MinHeightContainer = styled__default["default"].div.withConfig({
3610
+ shouldForwardProp: (prop) => !["margin"].includes(prop)
3611
+ })`
3412
3612
  display: flex;
3413
3613
  width: 100%;
3414
3614
  ${cssMargin()}
@@ -3420,7 +3620,9 @@ const Container$9 = styled__default["default"].div`
3420
3620
  min-height: 40px;
3421
3621
  width: 100%;
3422
3622
  `;
3423
- const Line = styled__default["default"].div`
3623
+ const Line = styled__default["default"].div.withConfig({
3624
+ shouldForwardProp: (prop) => !["variant", "color", "thickness"].includes(prop)
3625
+ })`
3424
3626
  ${(p) => cssMediaRules([p.variant, p.thickness, p.color], ([variant = "solid", thickness = {
3425
3627
  value: 1,
3426
3628
  unit: "px"
@@ -3532,7 +3734,9 @@ function registerComponent$7(runtime) {
3532
3734
  }
3533
3735
  });
3534
3736
  }
3535
- const Container$8 = styled__default["default"].div`
3737
+ const Container$8 = styled__default["default"].div.withConfig({
3738
+ shouldForwardProp: (prop) => !["margin"].includes(prop)
3739
+ })`
3536
3740
  min-height: 15px;
3537
3741
  ${cssMargin()}
3538
3742
  `;
@@ -3568,7 +3772,7 @@ const Embed = React.forwardRef(function Embed2({
3568
3772
  }, ref) {
3569
3773
  const [container, setContainer] = React.useState(null);
3570
3774
  const [shouldRender, setShouldRender] = React.useState(false);
3571
- React.useLayoutEffect(() => {
3775
+ useIsomorphicLayoutEffect(() => {
3572
3776
  setShouldRender(true);
3573
3777
  }, []);
3574
3778
  React.useImperativeHandle(ref, () => container, [container]);
@@ -3721,8 +3925,8 @@ function getSizeVerticalPadding(size) {
3721
3925
  throw new Error(`Invalid form size "${size}"`);
3722
3926
  }
3723
3927
  }
3724
- function getShapeBorderRadius(shape) {
3725
- switch (shape) {
3928
+ function getShapeBorderRadius(shape2) {
3929
+ switch (shape2) {
3726
3930
  case Shapes.SQUARE:
3727
3931
  return 0;
3728
3932
  case Shapes.ROUNDED:
@@ -3730,7 +3934,7 @@ function getShapeBorderRadius(shape) {
3730
3934
  case Shapes.PILL:
3731
3935
  return 500;
3732
3936
  default:
3733
- throw new Error(`Invalid form shape "${shape}"`);
3937
+ throw new Error(`Invalid form shape "${shape2}"`);
3734
3938
  }
3735
3939
  }
3736
3940
  function getContrastBorderColor(contrast, error) {
@@ -3782,13 +3986,13 @@ function cssField() {
3782
3986
  border-style: solid;
3783
3987
  transition: border-color 200ms;
3784
3988
  ${(props) => cssMediaRules([props.shape, props.size, props.contrast, props.brandColor], ([
3785
- shape = Shapes.ROUNDED,
3989
+ shape2 = Shapes.ROUNDED,
3786
3990
  size = Sizes.MEDIUM,
3787
3991
  contrast = Contrasts.LIGHT,
3788
3992
  brandColor = { swatch: { hue: 0, saturation: 0, lightness: 0 }, alpha: 1 }
3789
3993
  ]) => styled.css`
3790
3994
  padding: ${getSizeVerticalPadding(size)}px ${getSizeHorizontalPadding(size)}px;
3791
- border-radius: ${getShapeBorderRadius(shape)}px;
3995
+ border-radius: ${getShapeBorderRadius(shape2)}px;
3792
3996
  border-color: ${getContrastBorderColor(contrast, props.error)};
3793
3997
  color: ${getContrastColor$1(contrast)};
3794
3998
  background-color: ${getContrastBackgroundColor(contrast)};
@@ -3816,7 +4020,9 @@ function getSizeHeight$1(size) {
3816
4020
  throw new Error(`Invalid form size "${size}"`);
3817
4021
  }
3818
4022
  }
3819
- const Base$2 = styled__default["default"].input`
4023
+ const Base$2 = styled__default["default"].input.withConfig({
4024
+ shouldForwardProp: (prop, defaultValidator) => !["shape", "size", "contrast", "brandColor", "error"].includes(prop.toString()) && defaultValidator(prop)
4025
+ })`
3820
4026
  ${cssField()}
3821
4027
  ${(props) => cssMediaRules([props.size], ([size = Sizes.MEDIUM]) => styled.css`
3822
4028
  min-height: ${getSizeHeight$1(size)}px;
@@ -3832,7 +4038,7 @@ var Input$2 = React.forwardRef(function Input2(_o, ref) {
3832
4038
  "form"
3833
4039
  ]);
3834
4040
  const {
3835
- shape,
4041
+ shape: shape2,
3836
4042
  size,
3837
4043
  contrast,
3838
4044
  brandColor
@@ -3840,13 +4046,15 @@ var Input$2 = React.forwardRef(function Input2(_o, ref) {
3840
4046
  return /* @__PURE__ */ jsxRuntime.jsx(Base$2, __spreadProps(__spreadValues({}, restOfProps), {
3841
4047
  ref,
3842
4048
  error,
3843
- shape,
4049
+ shape: shape2,
3844
4050
  size,
3845
4051
  contrast,
3846
4052
  brandColor
3847
4053
  }));
3848
4054
  });
3849
- const Container$7 = styled__default["default"].div`
4055
+ const Container$7 = styled__default["default"].div.withConfig({
4056
+ shouldForwardProp: (prop) => !["width", "margin"].includes(prop.toString())
4057
+ })`
3850
4058
  display: flex;
3851
4059
  flex-direction: column;
3852
4060
  ${cssMargin()};
@@ -3930,7 +4138,9 @@ function getContrastColor(contrast) {
3930
4138
  throw new Error(`Invalid form contrast "${contrast}"`);
3931
4139
  }
3932
4140
  }
3933
- const Base$1 = styled__default["default"].label`
4141
+ const Base$1 = styled__default["default"].label.withConfig({
4142
+ shouldForwardProp: (prop, defaultValidator) => !["contrast", "size", "textStyle", "textColor"].includes(prop.toString()) && defaultValidator(prop)
4143
+ })`
3934
4144
  display: block;
3935
4145
  margin: 0 0 0.25em 0;
3936
4146
  ${cssTextStyle()}
@@ -3981,7 +4191,9 @@ var SingleLineTextTableField = React.forwardRef(function SingleLineTextTableFiel
3981
4191
  }))]
3982
4192
  });
3983
4193
  });
3984
- const Base = styled__default["default"].textarea`
4194
+ const Base = styled__default["default"].textarea.withConfig({
4195
+ shouldForwardProp: (prop, defaultValidator) => !["error", "shape", "size", "contrast", "brandColor"].includes(prop.toString()) && defaultValidator(prop)
4196
+ })`
3985
4197
  resize: vertical;
3986
4198
  ${cssField()}
3987
4199
  `;
@@ -3994,7 +4206,7 @@ var TextArea = React.forwardRef(function TextArea2(_s, ref) {
3994
4206
  "form"
3995
4207
  ]);
3996
4208
  const {
3997
- shape,
4209
+ shape: shape2,
3998
4210
  size,
3999
4211
  contrast,
4000
4212
  brandColor
@@ -4003,7 +4215,7 @@ var TextArea = React.forwardRef(function TextArea2(_s, ref) {
4003
4215
  ref,
4004
4216
  rows: 4,
4005
4217
  error,
4006
- shape,
4218
+ shape: shape2,
4007
4219
  size,
4008
4220
  contrast,
4009
4221
  brandColor
@@ -4047,14 +4259,18 @@ function getCheckmarkColor$1({
4047
4259
  l
4048
4260
  }).alpha(a).isLight() ? "rgba(0, 0, 0, 0.7)" : "rgba(255, 255, 255, 0.95)";
4049
4261
  }
4050
- const Container$6 = styled__default["default"].div`
4262
+ const Container$6 = styled__default["default"].div.withConfig({
4263
+ shouldForwardProp: (prop) => !["size"].includes(prop)
4264
+ })`
4051
4265
  position: relative;
4052
4266
  ${(props) => cssMediaRules([props.size], ([size = Sizes.MEDIUM]) => styled.css`
4053
4267
  height: ${getSizeHeight(size)}px;
4054
4268
  width: ${getSizeHeight(size)}px;
4055
4269
  `)}
4056
4270
  `;
4057
- const FakeCheckbox = styled__default["default"].div`
4271
+ const FakeCheckbox = styled__default["default"].div.withConfig({
4272
+ shouldForwardProp: (prop) => !["contrast", "error"].includes(prop)
4273
+ })`
4058
4274
  position: absolute;
4059
4275
  width: 100%;
4060
4276
  height: 100%;
@@ -4067,7 +4283,9 @@ const FakeCheckbox = styled__default["default"].div`
4067
4283
  background-color: ${getContrastBackgroundColor(contrast)};
4068
4284
  `)}
4069
4285
  `;
4070
- const HiddenCheckbox = styled__default["default"].input`
4286
+ const HiddenCheckbox = styled__default["default"].input.withConfig({
4287
+ shouldForwardProp: (prop, defaultValidator) => !["size", "brandColor", "contrast", "error"].includes(prop) && defaultValidator(prop)
4288
+ })`
4071
4289
  position: absolute;
4072
4290
  opacity: 0;
4073
4291
  width: 100%;
@@ -4310,14 +4528,18 @@ function getCheckmarkColor({
4310
4528
  l
4311
4529
  }).alpha(a).isLight() ? "rgba(0, 0, 0, 0.7)" : "rgba(255, 255, 255, 0.95)";
4312
4530
  }
4313
- const Container$5 = styled__default["default"].div`
4531
+ const Container$5 = styled__default["default"].div.withConfig({
4532
+ shouldForwardProp: (prop) => !["size"].includes(prop.toString())
4533
+ })`
4314
4534
  position: relative;
4315
4535
  ${(props) => cssMediaRules([props.size], ([size = Sizes.MEDIUM]) => styled.css`
4316
4536
  height: ${getSizeHeight(size)}px;
4317
4537
  width: ${getSizeHeight(size)}px;
4318
4538
  `)}
4319
4539
  `;
4320
- const FakeRadioButton = styled__default["default"].div`
4540
+ const FakeRadioButton = styled__default["default"].div.withConfig({
4541
+ shouldForwardProp: (prop) => !["contrast", "error"].includes(prop.toString())
4542
+ })`
4321
4543
  position: absolute;
4322
4544
  width: 100%;
4323
4545
  height: 100%;
@@ -4330,7 +4552,9 @@ const FakeRadioButton = styled__default["default"].div`
4330
4552
  background-color: ${getContrastBackgroundColor(contrast)};
4331
4553
  `)}
4332
4554
  `;
4333
- const HiddenRadioButton = styled__default["default"].input.attrs({
4555
+ const HiddenRadioButton = styled__default["default"].input.withConfig({
4556
+ shouldForwardProp: (prop) => !["brandColor", "contrast", "error"].includes(prop.toString())
4557
+ }).attrs({
4334
4558
  type: "radio"
4335
4559
  })`
4336
4560
  position: absolute;
@@ -4495,7 +4719,9 @@ var TableColumnRadioButtonGroup = React.forwardRef(function TableColumnRadioButt
4495
4719
  }, option.id))]
4496
4720
  });
4497
4721
  });
4498
- const Container$4 = styled__default["default"].div`
4722
+ const Container$4 = styled__default["default"].div.withConfig({
4723
+ shouldForwardProp: (prop) => !["error", "shape", "size", "contrast", "brandColor"].includes(prop.toString())
4724
+ })`
4499
4725
  ${cssField()}
4500
4726
  display: flex;
4501
4727
  align-items: center;
@@ -4551,7 +4777,7 @@ var TableColumnSingleSelect = React.forwardRef(function TableColumnSingleSelect2
4551
4777
  "form"
4552
4778
  ]);
4553
4779
  const {
4554
- shape,
4780
+ shape: shape2,
4555
4781
  size,
4556
4782
  contrast,
4557
4783
  brandColor
@@ -4562,7 +4788,7 @@ var TableColumnSingleSelect = React.forwardRef(function TableColumnSingleSelect2
4562
4788
  children: label
4563
4789
  }), /* @__PURE__ */ jsxRuntime.jsxs(Container$4, {
4564
4790
  error,
4565
- shape,
4791
+ shape: shape2,
4566
4792
  size,
4567
4793
  contrast,
4568
4794
  brandColor,
@@ -4708,7 +4934,9 @@ var NumberTableField = React.forwardRef(function NumberTableField2(_Q, ref) {
4708
4934
  }))]
4709
4935
  });
4710
4936
  });
4711
- const Label = styled__default["default"].div`
4937
+ const Label = styled__default["default"].div.withConfig({
4938
+ shouldForwardProp: (prop) => !["size"].includes(prop.toString())
4939
+ })`
4712
4940
  display: block;
4713
4941
  max-width: 120px;
4714
4942
  min-width: 60px;
@@ -4721,29 +4949,31 @@ const Label = styled__default["default"].div`
4721
4949
  max-height: ${0.5 * getSizeHeight(size)}px;
4722
4950
  `)}
4723
4951
  `;
4724
- const Input = styled__default["default"].div`
4952
+ const Input = styled__default["default"].div.withConfig({
4953
+ shouldForwardProp: (prop) => !["shape", "size"].includes(prop.toString())
4954
+ })`
4725
4955
  display: block;
4726
4956
  width: 100%;
4727
4957
  border-width: 2px;
4728
4958
  border-style: solid;
4729
4959
  border-color: #5f49f4;
4730
4960
  opacity: 0.4;
4731
- ${(props) => cssMediaRules([props.shape, props.size], ([shape = Shapes.ROUNDED, size = Sizes.MEDIUM]) => styled.css`
4961
+ ${(props) => cssMediaRules([props.shape, props.size], ([shape2 = Shapes.ROUNDED, size = Sizes.MEDIUM]) => styled.css`
4732
4962
  min-height: ${getSizeHeight$1(size)}px;
4733
4963
  max-height: ${getSizeHeight$1(size)}px;
4734
- border-radius: ${getShapeBorderRadius(shape)}px;
4964
+ border-radius: ${getShapeBorderRadius(shape2)}px;
4735
4965
  `)}
4736
4966
  `;
4737
4967
  function PlaceholderTableField() {
4738
4968
  const {
4739
4969
  size,
4740
- shape
4970
+ shape: shape2
4741
4971
  } = useFormContext();
4742
4972
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
4743
4973
  children: [/* @__PURE__ */ jsxRuntime.jsx(Label, {
4744
4974
  size
4745
4975
  }), /* @__PURE__ */ jsxRuntime.jsx(Input, {
4746
- shape,
4976
+ shape: shape2,
4747
4977
  size
4748
4978
  })]
4749
4979
  });
@@ -4939,7 +5169,9 @@ const Alignments = {
4939
5169
  CENTER: "center",
4940
5170
  RIGHT: "right"
4941
5171
  };
4942
- const GridForm = styled__default["default"].form`
5172
+ const GridForm = styled__default["default"].form.withConfig({
5173
+ shouldForwardProp: (prop) => !["size", "width", "margin"].includes(prop)
5174
+ })`
4943
5175
  display: flex;
4944
5176
  flex-wrap: wrap;
4945
5177
  width: 100%;
@@ -4948,7 +5180,9 @@ const GridForm = styled__default["default"].form`
4948
5180
  `)}
4949
5181
  ${cssMargin()}
4950
5182
  `;
4951
- const GridItem$1 = styled__default["default"].div`
5183
+ const GridItem$1 = styled__default["default"].div.withConfig({
5184
+ shouldForwardProp: (prop) => !["grid", "index", "rowGap", "columnGap"].includes(prop)
5185
+ })`
4952
5186
  align-self: flex-end;
4953
5187
  flex-direction: column;
4954
5188
  ${cssGridItem()}
@@ -4965,7 +5199,9 @@ function getAlignmentMargin(alignment) {
4965
5199
  }
4966
5200
  const StyledButton = styled__default["default"]((props) => /* @__PURE__ */ jsxRuntime.jsx(Button$1, __spreadProps(__spreadValues({}, props), {
4967
5201
  as: "button"
4968
- })))`
5202
+ }))).withConfig({
5203
+ shouldForwardProp: (prop) => !["alignment"].includes(prop.toString())
5204
+ })`
4969
5205
  display: flex;
4970
5206
  align-items: center;
4971
5207
  justify-content: center;
@@ -5023,7 +5259,7 @@ const Form = React.forwardRef(function Form2({
5023
5259
  fields: fieldsProp,
5024
5260
  submitLabel = "Submit",
5025
5261
  submitLink,
5026
- shape,
5262
+ shape: shape2,
5027
5263
  size,
5028
5264
  contrast,
5029
5265
  brandColor,
@@ -5165,7 +5401,7 @@ const Form = React.forwardRef(function Form2({
5165
5401
  }, [fields, table]);
5166
5402
  return /* @__PURE__ */ jsxRuntime.jsx(Provider, {
5167
5403
  value: {
5168
- shape,
5404
+ shape: shape2,
5169
5405
  size,
5170
5406
  contrast,
5171
5407
  brandColor,
@@ -5222,7 +5458,7 @@ const Form = React.forwardRef(function Form2({
5222
5458
  children: [/* @__PURE__ */ jsxRuntime.jsx(StyledButton, {
5223
5459
  type: "submit",
5224
5460
  disabled: formik$1.isSubmitting || isDone,
5225
- shape,
5461
+ shape: shape2,
5226
5462
  size,
5227
5463
  color: brandColor,
5228
5464
  variant: submitVariant,
@@ -5468,7 +5704,9 @@ const GutterContainer = styled__default["default"].div`
5468
5704
  padding-right: ${p.last ? "0px" : `${gutter.value / 2}${gutter.unit}`};
5469
5705
  `)}
5470
5706
  `;
5471
- const PlaceholderLink$1 = styled__default["default"].div`
5707
+ const PlaceholderLink$1 = styled__default["default"].div.withConfig({
5708
+ shouldForwardProp: (prop) => !["width", "button"].includes(prop.toString())
5709
+ })`
5472
5710
  width: ${(props) => props.width}px;
5473
5711
  height: ${(props) => props.button === true ? 32 : 8}px;
5474
5712
  background-color: #a1a8c2;
@@ -5596,7 +5834,9 @@ var SvgChevronDown8 = function SvgChevronDown82(props) {
5596
5834
  })));
5597
5835
  };
5598
5836
  const DROP_DOWN_MENU_WIDTH = 200;
5599
- const DropDownMenu$1 = styled__default["default"].div`
5837
+ const DropDownMenu$1 = styled__default["default"].div.withConfig({
5838
+ shouldForwardProp: (prop) => !["position"].includes(prop.toString())
5839
+ })`
5600
5840
  position: absolute;
5601
5841
  top: 100%;
5602
5842
  left: ${(props) => props.position === "left" ? 0 : "auto"};
@@ -5633,7 +5873,9 @@ const DropDownContainer = styled__default["default"].div`
5633
5873
  animation: ${dropIn} 0.25s;
5634
5874
  }
5635
5875
  `;
5636
- const StyledDropDownItem = styled__default["default"](Link)`
5876
+ const StyledDropDownItem = styled__default["default"](Link).withConfig({
5877
+ shouldForwardProp: (prop) => !["color", "textStyle"].includes(prop.toString())
5878
+ })`
5637
5879
  display: block;
5638
5880
  text-decoration: none;
5639
5881
  line-height: 1.4;
@@ -5691,7 +5933,7 @@ function DropDownButton(_U) {
5691
5933
  ]);
5692
5934
  const container = React.useRef(null);
5693
5935
  const [position, setPosition] = React.useState("left");
5694
- React.useLayoutEffect(() => {
5936
+ useIsomorphicLayoutEffect(() => {
5695
5937
  if (container.current && container.current.ownerDocument.defaultView.innerWidth < container.current.offsetLeft + DROP_DOWN_MENU_WIDTH) {
5696
5938
  setPosition("right");
5697
5939
  } else {
@@ -5758,7 +6000,9 @@ var SvgTimes16 = function SvgTimes162(props) {
5758
6000
  d: "M13.707 3.707a1 1 0 0 0-1.414-1.414L8 6.586 3.707 2.293a1 1 0 0 0-1.414 1.414L6.586 8l-4.293 4.293a1 1 0 1 0 1.414 1.414L8 9.414l4.293 4.293a1 1 0 0 0 1.414-1.414L9.414 8l4.293-4.293Z"
5759
6001
  })));
5760
6002
  };
5761
- const DropDownMenu = styled__default["default"].div`
6003
+ const DropDownMenu = styled__default["default"].div.withConfig({
6004
+ shouldForwardProp: (prop) => !["open"].includes(prop.toString())
6005
+ })`
5762
6006
  display: ${(props) => props.open ? "flex" : "none"};
5763
6007
  flex-direction: column;
5764
6008
  padding: 8px;
@@ -5766,7 +6010,9 @@ const DropDownMenu = styled__default["default"].div`
5766
6010
  const ButtonLink$1 = styled__default["default"](Button$1)`
5767
6011
  margin: 8px 0;
5768
6012
  `;
5769
- const StyledLink$2 = styled__default["default"](Link)`
6013
+ const StyledLink$2 = styled__default["default"](Link).withConfig({
6014
+ shouldForwardProp: (prop) => !["textStyle", "color"].includes(prop.toString())
6015
+ })`
5770
6016
  text-decoration: none;
5771
6017
  line-height: 1.4;
5772
6018
  padding: 8px 16px;
@@ -5857,7 +6103,9 @@ function NavigationButton$1(props) {
5857
6103
  const ButtonLink = styled__default["default"](NavigationButton$1)`
5858
6104
  margin: 8px 0;
5859
6105
  `;
5860
- const Container$3 = styled__default["default"].div`
6106
+ const Container$3 = styled__default["default"].div.withConfig({
6107
+ shouldForwardProp: (prop) => !["animation", "backgroundColor", "open"].includes(prop.toString())
6108
+ })`
5861
6109
  position: fixed;
5862
6110
  flex-direction: column;
5863
6111
  width: 100%;
@@ -5889,7 +6137,9 @@ const Container$3 = styled__default["default"].div`
5889
6137
  }[animation]}
5890
6138
  `)}
5891
6139
  `;
5892
- const CloseIconContainer = styled__default["default"].button`
6140
+ const CloseIconContainer = styled__default["default"].button.withConfig({
6141
+ shouldForwardProp: (prop) => !["color"].includes(prop.toString())
6142
+ })`
5893
6143
  position: absolute;
5894
6144
  top: 15px;
5895
6145
  right: 15px;
@@ -5937,7 +6187,9 @@ function MobileMenu({
5937
6187
  })]
5938
6188
  });
5939
6189
  }
5940
- const Container$2 = styled__default["default"].nav`
6190
+ const Container$2 = styled__default["default"].nav.withConfig({
6191
+ shouldForwardProp: (prop) => !["margin", "textStyle", "gutter"].includes(prop.toString())
6192
+ })`
5941
6193
  display: flex;
5942
6194
  align-items: center;
5943
6195
  ${cssMargin()}
@@ -5949,7 +6201,9 @@ const Container$2 = styled__default["default"].nav`
5949
6201
  gap: ${gutter.value}${gutter.unit};
5950
6202
  `)}
5951
6203
  `;
5952
- const LinksContainer = styled__default["default"].div`
6204
+ const LinksContainer = styled__default["default"].div.withConfig({
6205
+ shouldForwardProp: (prop) => !["alignment", "mobileMenuAnimation"].includes(prop.toString())
6206
+ })`
5953
6207
  display: flex;
5954
6208
  align-items: center;
5955
6209
  flex-grow: 1;
@@ -5958,7 +6212,9 @@ const LinksContainer = styled__default["default"].div`
5958
6212
  justify-content: ${alignment};
5959
6213
  `)}
5960
6214
  `;
5961
- const OpenIconContainer = styled__default["default"].button`
6215
+ const OpenIconContainer = styled__default["default"].button.withConfig({
6216
+ shouldForwardProp: (prop) => !["mobileMenuAnimation", "alignment", "color"].includes(prop.toString())
6217
+ })`
5962
6218
  display: none;
5963
6219
  flex-grow: 1;
5964
6220
  align-items: center;
@@ -6239,7 +6495,9 @@ const Grid = styled__default["default"].div`
6239
6495
  flex-wrap: wrap;
6240
6496
  width: 100%;
6241
6497
  `;
6242
- const GridItem = styled__default["default"].div`
6498
+ const GridItem = styled__default["default"].div.withConfig({
6499
+ shouldForwardProp: (prop) => !["grid", "index", "rowGap", "columnGap"].includes(prop.toString())
6500
+ })`
6243
6501
  display: flex;
6244
6502
  align-items: flex-start;
6245
6503
  ${cssGridItem()}
@@ -6970,7 +7228,9 @@ function SocialLinksPlaceholder({
6970
7228
  }, link.id))
6971
7229
  });
6972
7230
  }
6973
- const Container$1 = styled__default["default"].div`
7231
+ const Container$1 = styled__default["default"].div.withConfig({
7232
+ shouldForwardProp: (prop) => !["width", "margin", "alignment"].includes(prop.toString())
7233
+ })`
6974
7234
  display: flex;
6975
7235
  flex-direction: row;
6976
7236
  flex-wrap: wrap;
@@ -6979,7 +7239,9 @@ const Container$1 = styled__default["default"].div`
6979
7239
  justify-content: ${alignment};
6980
7240
  `)}
6981
7241
  `;
6982
- const StyledLink$1 = styled__default["default"](Link)`
7242
+ const StyledLink$1 = styled__default["default"](Link).withConfig({
7243
+ shouldForwardProp: (prop) => !["brandColor", "shape", "size", "hoverStyle", "fill", "backgroundColor"].includes(prop.toString())
7244
+ })`
6983
7245
  display: block;
6984
7246
  color: ${(props) => props.brandColor};
6985
7247
  transition: transform, opacity 0.18s;
@@ -6988,8 +7250,8 @@ const StyledLink$1 = styled__default["default"](Link)`
6988
7250
  display: block;
6989
7251
  }
6990
7252
 
6991
- ${(p) => cssMediaRules([p.shape, p.size, p.hoverStyle, p.fill, p.backgroundColor], ([shape = "naked", size = "medium", hoverStyle = "none", fill, backgroundColor]) => styled.css`
6992
- padding: ${shape === "naked" ? 0 : {
7253
+ ${(p) => cssMediaRules([p.shape, p.size, p.hoverStyle, p.fill, p.backgroundColor], ([shape2 = "naked", size = "medium", hoverStyle = "none", fill, backgroundColor]) => styled.css`
7254
+ padding: ${shape2 === "naked" ? 0 : {
6993
7255
  small: 10,
6994
7256
  medium: 12,
6995
7257
  large: 14
@@ -6999,8 +7261,8 @@ const StyledLink$1 = styled__default["default"](Link)`
6999
7261
  rounded: "8px",
7000
7262
  naked: 0,
7001
7263
  square: 0
7002
- }[shape]};
7003
- background: ${shape === "naked" ? "transparent" : backgroundColor == null ? "currentColor" : colorToString(backgroundColor)};
7264
+ }[shape2]};
7265
+ background: ${shape2 === "naked" ? "transparent" : backgroundColor == null ? "currentColor" : colorToString(backgroundColor)};
7004
7266
 
7005
7267
  :hover {
7006
7268
  ${{
@@ -7018,7 +7280,7 @@ const StyledLink$1 = styled__default["default"](Link)`
7018
7280
  }
7019
7281
 
7020
7282
  svg {
7021
- fill: ${fill == null ? shape === "naked" || backgroundColor != null ? "currentColor" : "white" : colorToString(fill)};
7283
+ fill: ${fill == null ? shape2 === "naked" || backgroundColor != null ? "currentColor" : "white" : colorToString(fill)};
7022
7284
  width: ${{
7023
7285
  small: 16,
7024
7286
  medium: 20,
@@ -7041,7 +7303,7 @@ const SocialLinks = React.forwardRef(function SocialLinks2({
7041
7303
  links: [],
7042
7304
  openInNewTab: false
7043
7305
  },
7044
- shape,
7306
+ shape: shape2,
7045
7307
  size,
7046
7308
  hoverStyle,
7047
7309
  fill,
@@ -7077,7 +7339,7 @@ const SocialLinks = React.forwardRef(function SocialLinks2({
7077
7339
  openInNewTab
7078
7340
  }
7079
7341
  },
7080
- shape,
7342
+ shape: shape2,
7081
7343
  size,
7082
7344
  children: option == null ? null : option.icon
7083
7345
  })
@@ -7547,7 +7809,9 @@ const RichTextEditor = styled__default["default"](React.forwardRef(function Rich
7547
7809
  margin: 0;
7548
7810
  }
7549
7811
  `;
7550
- const StyledRichTextEditor = styled__default["default"](RichTextEditor)`
7812
+ const StyledRichTextEditor = styled__default["default"](RichTextEditor).withConfig({
7813
+ shouldForwardProp: (prop) => !["margin"].includes(prop.toString())
7814
+ })`
7551
7815
  ${cssMargin()}
7552
7816
  `;
7553
7817
  const defaultText = {
@@ -7731,7 +7995,9 @@ function registerComponent$1(runtime) {
7731
7995
  }
7732
7996
  });
7733
7997
  }
7734
- const Container = styled__default["default"].div`
7998
+ const Container = styled__default["default"].div.withConfig({
7999
+ shouldForwardProp: (prop) => !["margin", "borderRadius"].includes(prop.toString())
8000
+ })`
7735
8001
  display: flex;
7736
8002
  flex-direction: column;
7737
8003
  overflow: hidden;
@@ -8582,6 +8848,9 @@ function useColorValue(data, definition) {
8582
8848
  const [swatch] = (_b = (_a = result.data) == null ? void 0 : _a.swatches) != null ? _b : [null];
8583
8849
  return ColorHelper__default["default"]({ h: swatch == null ? void 0 : swatch.hue, s: swatch == null ? void 0 : swatch.saturation, l: swatch == null ? void 0 : swatch.lightness }).alpha(data.alpha).rgb().string();
8584
8850
  }
8851
+ function useComboboxControlValue(data) {
8852
+ return data == null ? void 0 : data.value;
8853
+ }
8585
8854
  function useImageControlValue(data) {
8586
8855
  var _a;
8587
8856
  return (_a = useFile(data)) == null ? void 0 : _a.publicUrl;
@@ -8658,25 +8927,31 @@ function ControlValue({
8658
8927
  parameters: [data, definition],
8659
8928
  children: (value) => children(value)
8660
8929
  }, definition.type);
8661
- case textInput.ColorControlType:
8930
+ case image.ColorControlType:
8662
8931
  return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
8663
8932
  hook: useColorValue,
8664
8933
  parameters: [data, definition],
8665
8934
  children: (value) => children(value)
8666
8935
  }, definition.type);
8667
- case textInput.ImageControlType:
8936
+ case image.ImageControlType:
8668
8937
  return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
8669
8938
  hook: useImageControlValue,
8670
8939
  parameters: [data],
8671
8940
  children: (value) => children(value)
8672
8941
  }, definition.type);
8673
- case textInput.ShapeControlType:
8942
+ case shape.ComboboxControlType:
8943
+ return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
8944
+ hook: useComboboxControlValue,
8945
+ parameters: [data],
8946
+ children: (value) => children(value)
8947
+ }, definition.type);
8948
+ case shape.ShapeControlType:
8674
8949
  return /* @__PURE__ */ jsxRuntime.jsx(ShapeControlValue, {
8675
8950
  definition,
8676
8951
  data,
8677
8952
  children: (value) => children(value)
8678
8953
  });
8679
- case list.ListControlType:
8954
+ case shape.ListControlType:
8680
8955
  return /* @__PURE__ */ jsxRuntime.jsx(ListControlValue, {
8681
8956
  definition,
8682
8957
  data,
@@ -8709,10 +8984,11 @@ function PropsValue({
8709
8984
  case textInput.TextInputControlType:
8710
8985
  case textInput.TextAreaControlType:
8711
8986
  case textInput.SelectControlType:
8712
- case textInput.ColorControlType:
8713
- case textInput.ImageControlType:
8714
- case textInput.ShapeControlType:
8715
- case list.ListControlType:
8987
+ case image.ColorControlType:
8988
+ case image.ImageControlType:
8989
+ case shape.ComboboxControlType:
8990
+ case shape.ShapeControlType:
8991
+ case shape.ListControlType:
8716
8992
  return /* @__PURE__ */ jsxRuntime.jsx(ControlValue, {
8717
8993
  definition: descriptor,
8718
8994
  data: props[propName],
@@ -8791,7 +9067,7 @@ const FindDomNode = React.forwardRef(function FindDomNode2(props, ref) {
8791
9067
  innerRef: ref
8792
9068
  }));
8793
9069
  });
8794
- const contextDefaultValue = reactPage.configureStore();
9070
+ const storeContextDefaultValue = reactPage.configureStore();
8795
9071
  function createReactRuntime(store) {
8796
9072
  return {
8797
9073
  registerComponent(component, {
@@ -8814,8 +9090,9 @@ function createReactRuntime(store) {
8814
9090
  }
8815
9091
  };
8816
9092
  }
8817
- const ReactRuntime = createReactRuntime(contextDefaultValue);
8818
- const Context = React.createContext(contextDefaultValue);
9093
+ const ReactRuntime = createReactRuntime(storeContextDefaultValue);
9094
+ registerBuiltinComponents(ReactRuntime);
9095
+ const Context = React.createContext(storeContextDefaultValue);
8819
9096
  function RuntimeProvider({
8820
9097
  client: client2,
8821
9098
  children,
@@ -8823,16 +9100,11 @@ function RuntimeProvider({
8823
9100
  }) {
8824
9101
  const [store, setStore] = React.useState(() => {
8825
9102
  const store2 = reactPage.configureStore({
8826
- preloadedState: contextDefaultValue.getState(),
9103
+ preloadedState: storeContextDefaultValue.getState(),
8827
9104
  rootElements
8828
9105
  });
8829
- const runtime = createReactRuntime(store2);
8830
- registerBuiltinComponents(runtime);
8831
9106
  return store2;
8832
9107
  });
8833
- React.useEffect(() => {
8834
- return registerBuiltinComponents(createReactRuntime(store));
8835
- }, [store]);
8836
9108
  React.useEffect(() => {
8837
9109
  var _a;
8838
9110
  const unregisterDocuments = Array.from((_a = rootElements == null ? void 0 : rootElements.entries()) != null ? _a : []).map(([documentKey, rootElement]) => store.dispatch(actions.registerDocumentEffect(reactPage.createDocument(documentKey, rootElement))));
@@ -8957,14 +9229,7 @@ const ElementReference = React.memo(React.forwardRef(function ElementReference2(
8957
9229
  const {
8958
9230
  error,
8959
9231
  data
8960
- } = useQuery(client.gql`
8961
- query ElementReferenceGlobalElement($id: ID!) {
8962
- globalElement(id: $id) {
8963
- id
8964
- data
8965
- }
8966
- }
8967
- `, {
9232
+ } = useQuery(ELEMENT_REFERENCE_GLOBAL_ELEMENT, {
8968
9233
  variables: {
8969
9234
  id: elementReference.value
8970
9235
  }
@@ -9085,8 +9350,6 @@ exports.cssPadding = cssPadding;
9085
9350
  exports.cssTextStyle = cssTextStyle;
9086
9351
  exports.cssWidth = cssWidth;
9087
9352
  exports.deepEqual = deepEqual;
9088
- exports.garbageCollectGlobalCacheData = garbageCollectGlobalCacheData;
9089
- exports.getGlobalCacheData = getGlobalCacheData;
9090
9353
  exports.registerBuiltinComponents = registerBuiltinComponents;
9091
9354
  exports.registerComponent = registerComponent$c;
9092
9355
  exports.useBackgrounds = useBackgrounds;