@makeswift/runtime 0.0.17 → 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 (98) 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/components.cjs.js +6 -4
  6. package/dist/components.cjs.js.map +1 -1
  7. package/dist/components.es.js +6 -4
  8. package/dist/components.es.js.map +1 -1
  9. package/dist/constants.cjs.js +10 -363
  10. package/dist/constants.cjs.js.map +1 -1
  11. package/dist/constants.es.js +1 -354
  12. package/dist/constants.es.js.map +1 -1
  13. package/dist/controls.cjs.js +5 -4
  14. package/dist/controls.cjs.js.map +1 -1
  15. package/dist/controls.es.js +2 -1
  16. package/dist/controls.es.js.map +1 -1
  17. package/dist/graphql.cjs.js +365 -0
  18. package/dist/graphql.cjs.js.map +1 -0
  19. package/dist/graphql.es.js +356 -0
  20. package/dist/graphql.es.js.map +1 -0
  21. package/dist/image.cjs.js +14 -0
  22. package/dist/image.cjs.js.map +1 -0
  23. package/dist/image.es.js +10 -0
  24. package/dist/image.es.js.map +1 -0
  25. package/dist/index.cjs.js +357 -115
  26. package/dist/index.cjs.js.map +1 -1
  27. package/dist/index.es.js +348 -106
  28. package/dist/index.es.js.map +1 -1
  29. package/dist/main.cjs.js +1 -0
  30. package/dist/main.cjs.js.map +1 -1
  31. package/dist/main.es.js +1 -0
  32. package/dist/main.es.js.map +1 -1
  33. package/dist/next.cjs.js +6 -4
  34. package/dist/next.cjs.js.map +1 -1
  35. package/dist/next.es.js +6 -4
  36. package/dist/next.es.js.map +1 -1
  37. package/dist/react-builder-preview.cjs.js +8 -6
  38. package/dist/react-builder-preview.cjs.js.map +1 -1
  39. package/dist/react-builder-preview.es.js +9 -7
  40. package/dist/react-builder-preview.es.js.map +1 -1
  41. package/dist/react-page.cjs.js +260 -0
  42. package/dist/react-page.cjs.js.map +1 -1
  43. package/dist/react-page.es.js +254 -1
  44. package/dist/react-page.es.js.map +1 -1
  45. package/dist/react.cjs.js +6 -4
  46. package/dist/react.cjs.js.map +1 -1
  47. package/dist/react.es.js +6 -4
  48. package/dist/react.es.js.map +1 -1
  49. package/dist/text-input.cjs.js +0 -12
  50. package/dist/text-input.cjs.js.map +1 -1
  51. package/dist/text-input.es.js +1 -9
  52. package/dist/text-input.es.js.map +1 -1
  53. package/dist/types/api/introspection.d.ts +10 -0
  54. package/dist/types/api/introspection.d.ts.map +1 -0
  55. package/dist/types/api/react.d.ts +0 -1
  56. package/dist/types/api/react.d.ts.map +1 -1
  57. package/dist/types/components/builtin/Box/Box.d.ts.map +1 -1
  58. package/dist/types/components/builtin/Button/Button.d.ts.map +1 -1
  59. package/dist/types/components/builtin/Carousel/Carousel.d.ts.map +1 -1
  60. package/dist/types/components/builtin/Countdown/Countdown.d.ts.map +1 -1
  61. package/dist/types/components/builtin/Divider/Divider.d.ts.map +1 -1
  62. package/dist/types/components/builtin/Embed/Embed.d.ts.map +1 -1
  63. package/dist/types/components/builtin/Form/Form.d.ts.map +1 -1
  64. package/dist/types/components/builtin/Form/components/Field/components/Checkbox/index.d.ts.map +1 -1
  65. package/dist/types/components/builtin/Form/components/Field/components/Input/index.d.ts +1 -1
  66. package/dist/types/components/builtin/Form/components/Field/components/Input/index.d.ts.map +1 -1
  67. package/dist/types/components/builtin/Form/components/Field/components/Label/index.d.ts.map +1 -1
  68. package/dist/types/components/builtin/Form/components/Field/components/PlaceholderTableField/index.d.ts.map +1 -1
  69. package/dist/types/components/builtin/Form/components/Field/components/RadioButton/index.d.ts.map +1 -1
  70. package/dist/types/components/builtin/Form/components/Field/components/SingleSelectTableField/components/TableColumnSingleSelect/index.d.ts.map +1 -1
  71. package/dist/types/components/builtin/Form/components/Field/components/TextArea/index.d.ts.map +1 -1
  72. package/dist/types/components/builtin/Form/components/Field/services/cssField.d.ts +1 -1
  73. package/dist/types/components/builtin/Form/components/Placeholder/index.d.ts.map +1 -1
  74. package/dist/types/components/builtin/Image/Image.d.ts.map +1 -1
  75. package/dist/types/components/builtin/Navigation/Navigation.d.ts.map +1 -1
  76. package/dist/types/components/builtin/Navigation/components/DropDownButton/index.d.ts.map +1 -1
  77. package/dist/types/components/builtin/Navigation/components/LinksPlaceholder/index.d.ts.map +1 -1
  78. package/dist/types/components/builtin/Navigation/components/MobileMenu/components/MobileDropDownButton/index.d.ts.map +1 -1
  79. package/dist/types/components/builtin/Navigation/components/MobileMenu/index.d.ts.map +1 -1
  80. package/dist/types/components/builtin/Root/Root.d.ts.map +1 -1
  81. package/dist/types/components/builtin/SocialLinks/SocialLinks.d.ts.map +1 -1
  82. package/dist/types/components/builtin/Text/Text.d.ts.map +1 -1
  83. package/dist/types/components/builtin/Video/Video.d.ts.map +1 -1
  84. package/dist/types/components/hooks/useIsomorphicLayoutEffect.d.ts +3 -0
  85. package/dist/types/components/hooks/useIsomorphicLayoutEffect.d.ts.map +1 -0
  86. package/dist/types/components/hooks/useMediaQuery.d.ts.map +1 -1
  87. package/dist/types/components/shared/BackgroundsContainer/components/BackgroundVideo/index.d.ts.map +1 -1
  88. package/dist/types/components/shared/BackgroundsContainer/components/Backgrounds/index.d.ts.map +1 -1
  89. package/dist/types/components/shared/BackgroundsContainer/components/Parallax/index.d.ts.map +1 -1
  90. package/dist/types/components/utils/queries.d.ts +2 -0
  91. package/dist/types/components/utils/queries.d.ts.map +1 -1
  92. package/dist/types/prop-controllers/introspection.d.ts +5 -0
  93. package/dist/types/prop-controllers/introspection.d.ts.map +1 -1
  94. package/dist/types/runtimes/react/index.d.ts +1 -1
  95. package/dist/types/runtimes/react/index.d.ts.map +1 -1
  96. package/dist/types/state/react-page.d.ts +1 -0
  97. package/dist/types/state/react-page.d.ts.map +1 -1
  98. package/package.json +1 -1
package/dist/index.es.js CHANGED
@@ -35,26 +35,29 @@ var __publicField = (obj, key, value) => {
35
35
  };
36
36
  var _ea;
37
37
  import * as React from "react";
38
- import { forwardRef, createContext, useContext, useMemo, useState, useLayoutEffect, useCallback, useEffect, useRef, useImperativeHandle, Children, createElement, Fragment as Fragment$1, Component, memo } from "react";
38
+ import { forwardRef, createContext, useContext, useMemo, useEffect, useLayoutEffect, useState, useCallback, useRef, useImperativeHandle, Children, createElement, Fragment as Fragment$1, Component, memo } from "react";
39
39
  import { useSyncExternalStoreWithSelector } from "use-sync-external-store/shim/with-selector";
40
- import { gql, useQuery as useQuery$1, useMutation as useMutation$1, ApolloClient, InMemoryCache } from "@apollo/client";
41
- import { a as createDocumentReference, g as getComponentPropControllerDescriptors, b as getIsInBuilder, d as configureStore, e as getElementId, f as getReactComponent, h as getDocument, i as isElementReference, c as createDocument } from "./react-page.es.js";
40
+ import { g as getPropControllerDescriptors, i as isElementReference, a as getElementSwatchIds, b as getFileIds, d as getTypographyIds, e as getTableIds, f as getPageIds, h as getElementChildren, j as createDocumentReference, k as getComponentPropControllerDescriptors, l as getIsInBuilder, m as configureStore, n as getElementId, o as getReactComponent, p as getDocument, c as createDocument } from "./react-page.es.js";
42
41
  import { f as registerComponentHandleEffect, g as mountComponentEffect, h as registerComponentEffect, j as registerReactComponentEffect, k as registerDocumentEffect } from "./actions.es.js";
43
42
  import styled, { css, keyframes, createGlobalStyle } from "styled-components";
44
43
  import { useReducedMotion, useAnimation, motion } from "framer-motion";
45
44
  import { cx, css as css$1, cache } from "@emotion/css";
46
- import { getDataFromTree } from "@apollo/client/react/ssr";
45
+ import { gql, useQuery as useQuery$1, useMutation as useMutation$1, ApolloClient, InMemoryCache } from "@apollo/client";
46
+ import { BatchHttpLink } from "@apollo/client/link/batch-http";
47
47
  import { KeyUtils, Value } from "slate";
48
- import uuid from "uuid/v4";
48
+ import { P as PagePathnameSliceFragmentDoc } from "./graphql.es.js";
49
+ import { S as ShapeControlType, L as ListControlType, C as ComboboxControlType } from "./shape.es.js";
50
+ import { a as StyleControlProperty, S as StyleControlType } from "./style.es.js";
51
+ import { T as Types, 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, t as WidthControlValueFormats } from "./descriptors.es.js";
49
52
  import { jsx, Fragment, jsxs } from "react/jsx-runtime";
50
53
  import parse$1 from "html-react-parser";
51
54
  import Head from "next/head";
52
- 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, T as Types, t as WidthControlValueFormats } from "./descriptors.es.js";
53
55
  import ColorHelper from "color";
54
56
  import scrollIntoView from "scroll-into-view-if-needed";
55
57
  import NextLink from "next/link";
56
58
  import { useGesture } from "react-use-gesture";
57
59
  import { wrap } from "@popmotion/popcorn";
60
+ import uuid from "uuid/v4";
58
61
  import NextImage from "next/image";
59
62
  import { Field as Field$1, getIn, Formik } from "formik";
60
63
  import { p as parse, c as createBox, g as getBox } from "./box-models.es.js";
@@ -65,9 +68,8 @@ import ipsum from "corporate-ipsum";
65
68
  import { isHotkey } from "is-hotkey";
66
69
  import { Editor } from "slate-react";
67
70
  import Lists from "@convertkit/slate-lists";
68
- import { I as ImageControlType, C as ColorControlType, S as SelectControlType, T as TextAreaControlType, a as TextInputControlType, N as NumberControlType, b as CheckboxControlType } from "./text-input.es.js";
69
- import { L as ListControlType, S as ShapeControlType, C as ComboboxControlType } from "./shape.es.js";
70
- import { a as StyleControlProperty, S as StyleControlType } from "./style.es.js";
71
+ import { S as SelectControlType, T as TextAreaControlType, a as TextInputControlType, N as NumberControlType, C as CheckboxControlType } from "./text-input.es.js";
72
+ import { I as ImageControlType, C as ColorControlType } from "./image.es.js";
71
73
  import { findDOMNode } from "react-dom";
72
74
  const PlaceholderBase$1 = styled.div`
73
75
  width: 100%;
@@ -216,9 +218,165 @@ const TABLE_BY_ID = gql`
216
218
  }
217
219
  }
218
220
  `;
221
+ const ELEMENT_REFERENCE_GLOBAL_ELEMENT = gql`
222
+ query ElementReferenceGlobalElement($id: ID!) {
223
+ globalElement(id: $id) {
224
+ id
225
+ data
226
+ }
227
+ }
228
+ `;
229
+ const INTROSPECTION_QUERY = gql`
230
+ query Introspection(
231
+ $swatchIds: [ID!]!
232
+ $fileIds: [ID!]!
233
+ $pageIds: [ID!]!
234
+ $typographyIds: [ID!]!
235
+ $tableIds: [ID!]!
236
+ ) {
237
+ swatches(ids: $swatchIds) {
238
+ id
239
+ hue
240
+ saturation
241
+ lightness
242
+ }
243
+
244
+ files(ids: $fileIds) {
245
+ id
246
+ name
247
+ publicUrl
248
+ extension
249
+ dimensions {
250
+ width
251
+ height
252
+ }
253
+ }
254
+
255
+ pagePathnamesById(ids: $pageIds) {
256
+ id
257
+ pathname
258
+ }
259
+
260
+ typographies(ids: $typographyIds) {
261
+ ...Typography
262
+ }
263
+
264
+ tables(ids: $tableIds) {
265
+ id
266
+ name
267
+ columns {
268
+ id
269
+ name
270
+ ... on MultipleSelectTableColumn {
271
+ options {
272
+ id
273
+ name
274
+ }
275
+ }
276
+ ... on SingleSelectTableColumn {
277
+ options {
278
+ id
279
+ name
280
+ }
281
+ }
282
+ }
283
+ }
284
+ }
285
+
286
+ ${TYPOGRAPHY_FRAGMENT}
287
+ `;
219
288
  function isNonNullable(value) {
220
289
  return value != null;
221
290
  }
291
+ async function introspect(element, client, store) {
292
+ var _a, _b, _c;
293
+ const descriptors = getPropControllerDescriptors(store.getState());
294
+ const swatchIds = /* @__PURE__ */ new Set();
295
+ const fileIds = /* @__PURE__ */ new Set();
296
+ const typographyIds = /* @__PURE__ */ new Set();
297
+ const tableIds = /* @__PURE__ */ new Set();
298
+ const pageIds = /* @__PURE__ */ new Set();
299
+ const remaining = [element];
300
+ let current;
301
+ while (current = remaining.pop()) {
302
+ let getResourcesFromElementDescriptors = function(elementDescriptors2, props) {
303
+ Object.entries(elementDescriptors2).forEach(([propName, descriptor]) => {
304
+ getElementSwatchIds(descriptor, props[propName]).forEach((swatchId) => {
305
+ swatchIds.add(swatchId);
306
+ });
307
+ getFileIds(descriptor, props[propName]).forEach((fileId) => fileIds.add(fileId));
308
+ getTypographyIds(descriptor, props[propName]).forEach((typographyId) => typographyIds.add(typographyId));
309
+ getTableIds(descriptor, props[propName]).forEach((tableId) => tableIds.add(tableId));
310
+ getPageIds(descriptor, props[propName]).forEach((pageId) => pageIds.add(pageId));
311
+ getElementChildren(descriptor, props[propName]).forEach((child) => remaining.push(child));
312
+ if (descriptor.type === ShapeControlType) {
313
+ const prop = props[propName];
314
+ if (prop == null)
315
+ return;
316
+ getResourcesFromElementDescriptors(descriptor.config.type, prop);
317
+ }
318
+ if (descriptor.type === ListControlType) {
319
+ const prop = props[propName];
320
+ if (prop == null)
321
+ return;
322
+ prop.forEach((item) => {
323
+ getResourcesFromElementDescriptors({ propName: descriptor.config.type }, { propName: item.value });
324
+ });
325
+ }
326
+ if (descriptor.type === Types.Shape) {
327
+ const prop = props[propName];
328
+ if (prop == null)
329
+ return;
330
+ getResourcesFromElementDescriptors(descriptor.options.type, prop);
331
+ }
332
+ if (descriptor.type === Types.List) {
333
+ const prop = props[propName];
334
+ if (prop == null)
335
+ return;
336
+ prop.forEach((item) => {
337
+ getResourcesFromElementDescriptors({ propName: descriptor.options.type }, { propName: item.value });
338
+ });
339
+ }
340
+ });
341
+ };
342
+ let element2;
343
+ if (isElementReference(current)) {
344
+ const query = await client.query({
345
+ query: ELEMENT_REFERENCE_GLOBAL_ELEMENT,
346
+ variables: { id: current.value }
347
+ });
348
+ const elementData = (_b = (_a = query.data) == null ? void 0 : _a.globalElement) == null ? void 0 : _b.data;
349
+ if (elementData == null)
350
+ continue;
351
+ element2 = elementData;
352
+ } else {
353
+ element2 = current;
354
+ }
355
+ const elementDescriptors = descriptors.get(element2.type);
356
+ if (elementDescriptors == null)
357
+ continue;
358
+ getResourcesFromElementDescriptors(elementDescriptors, element2.props);
359
+ }
360
+ const typographiesResult = await client.query({
361
+ query: TYPOGRAPHIES_BY_ID,
362
+ variables: { ids: [...typographyIds] }
363
+ });
364
+ (_c = typographiesResult == null ? void 0 : typographiesResult.data) == null ? void 0 : _c.typographies.forEach((typography) => {
365
+ typography.style.forEach((style) => {
366
+ var _a2;
367
+ const swatchId = (_a2 = style.value.color) == null ? void 0 : _a2.swatchId;
368
+ if (swatchId != null)
369
+ swatchIds.add(swatchId);
370
+ });
371
+ });
372
+ return {
373
+ swatchIds: [...swatchIds],
374
+ fileIds: [...fileIds],
375
+ typographyIds: [...typographyIds],
376
+ tableIds: [...tableIds],
377
+ pageIds: [...pageIds]
378
+ };
379
+ }
222
380
  const typePolicies = {
223
381
  Query: {
224
382
  fields: {
@@ -306,10 +464,6 @@ const typePolicies = {
306
464
  }
307
465
  }
308
466
  };
309
- const PrefetchContext = createContext(false);
310
- function useIsPrefetching() {
311
- return useContext(PrefetchContext);
312
- }
313
467
  function createApolloClient({
314
468
  uri,
315
469
  cacheData
@@ -320,7 +474,10 @@ function createApolloClient({
320
474
  if (cacheData)
321
475
  cache2.restore(cacheData);
322
476
  return new ApolloClient({
323
- uri,
477
+ link: new BatchHttpLink({
478
+ uri,
479
+ batchMax: 100
480
+ }),
324
481
  cache: cache2
325
482
  });
326
483
  }
@@ -336,17 +493,20 @@ class MakeswiftClient {
336
493
  });
337
494
  }
338
495
  async prefetch(element) {
339
- const id = uuid();
340
- await getDataFromTree(/* @__PURE__ */ jsx(PrefetchContext.Provider, {
341
- value: true,
342
- children: /* @__PURE__ */ jsx(RuntimeProvider, {
343
- client: this,
344
- rootElements: /* @__PURE__ */ new Map([[id, element]]),
345
- children: /* @__PURE__ */ jsx(DocumentReference, {
346
- documentReference: createDocumentReference(id)
496
+ const introspectionData = await introspect(element, this.apolloClient, storeContextDefaultValue);
497
+ const res = await this.apolloClient.query({
498
+ query: INTROSPECTION_QUERY,
499
+ variables: introspectionData
500
+ });
501
+ res.data.pagePathnamesById.forEach((pagePathnameSlice) => {
502
+ const id = Buffer.from(`Page:${pagePathnameSlice.id}`).toString("base64");
503
+ this.apolloClient.cache.writeFragment({
504
+ fragment: PagePathnameSliceFragmentDoc,
505
+ data: __spreadProps(__spreadValues({}, pagePathnameSlice), {
506
+ id
347
507
  })
348
- })
349
- }));
508
+ });
509
+ });
350
510
  KeyUtils.resetGenerator();
351
511
  return this.apolloClient.cache.extract();
352
512
  }
@@ -628,10 +788,12 @@ const getDeviceMediaQuery = (device) => {
628
788
  }
629
789
  return parts.join(" and ");
630
790
  };
791
+ const isSSR = typeof window === "undefined" || /ServerSideRendering/.test(window.navigator && window.navigator.userAgent);
792
+ const useIsomorphicLayoutEffect = isSSR ? useEffect : useLayoutEffect;
631
793
  function useMediaQuery(responsiveValue) {
632
794
  const [deviceId, setDeviceId] = useState(DEVICES[0].id);
633
795
  const { value } = findDeviceOverride(responsiveValue, deviceId) || {};
634
- useLayoutEffect(() => {
796
+ useIsomorphicLayoutEffect(() => {
635
797
  if (responsiveValue == null || window == null)
636
798
  return () => {
637
799
  };
@@ -1146,7 +1308,7 @@ function Parallax(_g2) {
1146
1308
  const container = useRef(null);
1147
1309
  const [containerScrollTop, setContainerScrollTop] = useState(strength == null ? 0 : strength);
1148
1310
  const lastScrollParentScrollTop = useRef(0);
1149
- useLayoutEffect(() => {
1311
+ useIsomorphicLayoutEffect(() => {
1150
1312
  if (!container.current || strength == null || strength === 0)
1151
1313
  return void 0;
1152
1314
  const containerDocument = container.current.ownerDocument;
@@ -1260,7 +1422,7 @@ function BackgroundVideo({
1260
1422
  const [ready, setReady] = useState(false);
1261
1423
  const [scale, setScale] = useState(1);
1262
1424
  const container = useRef(null);
1263
- useLayoutEffect(() => {
1425
+ useIsomorphicLayoutEffect(() => {
1264
1426
  const {
1265
1427
  current: containerEl
1266
1428
  } = container;
@@ -1367,9 +1529,6 @@ const BackgroundsContainer$1 = styled(Container$c)`
1367
1529
  function Backgrounds({
1368
1530
  backgrounds
1369
1531
  }) {
1370
- const isPrefetching = useIsPrefetching();
1371
- if (isPrefetching)
1372
- return /* @__PURE__ */ jsx(Fragment, {});
1373
1532
  if (backgrounds == null)
1374
1533
  return /* @__PURE__ */ jsx(Fragment, {});
1375
1534
  return /* @__PURE__ */ jsx(Fragment, {
@@ -1504,7 +1663,9 @@ var BackgroundsContainer = forwardRef(function BackgroundsContainer2(_i, ref) {
1504
1663
  }), Children.only(children)]
1505
1664
  }));
1506
1665
  });
1507
- const StyledBackgroundsContainer = styled(BackgroundsContainer)`
1666
+ const StyledBackgroundsContainer = styled(BackgroundsContainer).withConfig({
1667
+ shouldForwardProp: (prop) => !["margin", "borderRadius", "alignSelf"].includes(prop.toString())
1668
+ })`
1508
1669
  display: flex;
1509
1670
  ${cssMargin()}
1510
1671
  ${cssBorderRadius()}
@@ -1512,7 +1673,9 @@ const StyledBackgroundsContainer = styled(BackgroundsContainer)`
1512
1673
  alignSelf
1513
1674
  }))}
1514
1675
  `;
1515
- const Grid$1 = styled(motion.div)`
1676
+ const Grid$1 = styled(motion.div).withConfig({
1677
+ shouldForwardProp: (prop) => !["padding", "border", "boxShadow", "alignContent"].includes(prop)
1678
+ })`
1516
1679
  display: flex;
1517
1680
  flex-wrap: wrap;
1518
1681
  width: 100%;
@@ -1523,7 +1686,9 @@ const Grid$1 = styled(motion.div)`
1523
1686
  alignContent
1524
1687
  }))}
1525
1688
  `;
1526
- const GridItem$2 = styled(motion.div)`
1689
+ const GridItem$2 = styled(motion.div).withConfig({
1690
+ shouldForwardProp: (prop) => !["grid", "alignItems", "index", "columnGap", "rowGap"].includes(prop)
1691
+ })`
1527
1692
  display: flex;
1528
1693
 
1529
1694
  /* IE11 doesn't recognize space-between and treats it as stretch, so we fall back to flex-start */
@@ -1951,7 +2116,9 @@ function responsiveWidth(widthData, defaultValue = "100%") {
1951
2116
  width: typeof width === "object" ? `${width.value}${width.unit}` : width
1952
2117
  })));
1953
2118
  }
1954
- const StyledButton$1 = styled(Link)`
2119
+ const StyledButton$1 = styled(Link).withConfig({
2120
+ shouldForwardProp: (prop) => !["margin", "variant", "shape", "size", "textColor", "color", "textStyle"].includes(prop.toString())
2121
+ })`
1955
2122
  display: table;
1956
2123
  border: 0;
1957
2124
  outline: 0;
@@ -1997,7 +2164,6 @@ const StyledButton$1 = styled(Link)`
1997
2164
  large: "16px 20px"
1998
2165
  }[size]};
1999
2166
  font-size: ${`${fontSize.value}${fontSize.unit}`};
2000
-
2001
2167
  ${{
2002
2168
  flat: css`
2003
2169
  background: ${colorToString(color)};
@@ -2140,7 +2306,7 @@ const StyledButton$1 = styled(Link)`
2140
2306
  }[variant]}
2141
2307
  `;
2142
2308
  })}
2143
- ${cssTextStyle()}
2309
+ ${cssTextStyle()}
2144
2310
  `;
2145
2311
  const Button$1 = forwardRef(function Button2(_m, ref) {
2146
2312
  var _n = _m, {
@@ -2312,7 +2478,9 @@ function imageSizes(width) {
2312
2478
  return `(max-width: ${device.maxWidth}px) ${Math.min(device.maxWidth, override.value.value)}px`;
2313
2479
  }).filter((size) => size != null).reduce((sourceSizes, sourceSize) => `${sourceSize}, ${sourceSizes}`, baseWidthSize);
2314
2480
  }
2315
- const ImageContainer = styled.div`
2481
+ const ImageContainer = styled.div.withConfig({
2482
+ shouldForwardProp: (prop) => !["margin", "padding", "border", "borderRadius", "boxShadow", "opacity", "link", "dimensions"].includes(prop.toString())
2483
+ })`
2316
2484
  line-height: 0;
2317
2485
  overflow: hidden;
2318
2486
  ${cssMargin()}
@@ -2349,7 +2517,6 @@ const ImageComponent = forwardRef(function Image2({
2349
2517
  const dataDimensions = (fileData == null ? void 0 : fileData.publicUrl) ? fileData == null ? void 0 : fileData.dimensions : placeholder2.dimensions;
2350
2518
  const [measuredDimensions, setMeasuredDimensions] = useState(null);
2351
2519
  const isInBuilder = useIsInBuilder();
2352
- const isPrefetching = useIsPrefetching();
2353
2520
  useEffect(() => {
2354
2521
  if (dataDimensions)
2355
2522
  return;
@@ -2370,8 +2537,6 @@ const ImageComponent = forwardRef(function Image2({
2370
2537
  if (!dimensions)
2371
2538
  return null;
2372
2539
  const widthClass = css$1(responsiveWidth(width, `${dimensions.width}px`));
2373
- if (isPrefetching)
2374
- return null;
2375
2540
  return /* @__PURE__ */ jsx(ImageContainer, {
2376
2541
  as: link ? Link : "div",
2377
2542
  link,
@@ -2450,7 +2615,9 @@ const Container$b = styled.div`
2450
2615
  position: relative;
2451
2616
  height: 100%;
2452
2617
  `;
2453
- const Wrapper = styled.div`
2618
+ const Wrapper = styled.div.withConfig({
2619
+ shouldForwardProp: (prop) => !["margin"].includes(prop)
2620
+ })`
2454
2621
  position: relative;
2455
2622
  display: flex;
2456
2623
  flex-direction: column;
@@ -2460,7 +2627,9 @@ const Wrapper = styled.div`
2460
2627
  outline: 0;
2461
2628
  }
2462
2629
  `;
2463
- const Arrow = styled.div`
2630
+ const Arrow = styled.div.withConfig({
2631
+ shouldForwardProp: (prop) => !["background"].includes(prop)
2632
+ })`
2464
2633
  padding: 10px;
2465
2634
  border-radius: 50%;
2466
2635
  outline: 0;
@@ -2488,7 +2657,9 @@ const Arrow = styled.div`
2488
2657
  stroke: currentColor;
2489
2658
  }
2490
2659
  `;
2491
- const Slop = styled.div`
2660
+ const Slop = styled.div.withConfig({
2661
+ shouldForwardProp: (prop) => !["color"].includes(prop)
2662
+ })`
2492
2663
  position: absolute;
2493
2664
  top: 0;
2494
2665
  bottom: 0;
@@ -2507,7 +2678,9 @@ const Slop = styled.div`
2507
2678
  color: ${colorToString(color)};
2508
2679
  `)}
2509
2680
  `;
2510
- const Slide = styled(motion.div)`
2681
+ const Slide = styled(motion.div).withConfig({
2682
+ shouldForwardProp: (prop) => !["pageSize", "alignItems"].includes(prop)
2683
+ })`
2511
2684
  display: flex;
2512
2685
  ${(p) => cssMediaRules([p.pageSize], ([pageSize = 1]) => css`
2513
2686
  flex-basis: ${100 / pageSize}%;
@@ -2519,7 +2692,9 @@ const Slide = styled(motion.div)`
2519
2692
  alignItems
2520
2693
  }))}
2521
2694
  `;
2522
- const Reel = styled(motion.div)`
2695
+ const Reel = styled(motion.div).withConfig({
2696
+ shouldForwardProp: (prop) => !["gap"].includes(prop)
2697
+ })`
2523
2698
  display: flex;
2524
2699
  position: relative;
2525
2700
  flex-wrap: nowrap;
@@ -2538,7 +2713,9 @@ const Page$1 = styled(motion.div)`
2538
2713
  position: relative;
2539
2714
  width: 100%;
2540
2715
  `;
2541
- const LeftSlop = styled(Slop)`
2716
+ const LeftSlop = styled(Slop).withConfig({
2717
+ shouldForwardProp: (prop) => !["position"].includes(prop)
2718
+ })`
2542
2719
  ${(p) => cssMediaRules([p.position], ([position = "inside"]) => {
2543
2720
  switch (position) {
2544
2721
  case "inside":
@@ -2563,7 +2740,9 @@ const LeftSlop = styled(Slop)`
2563
2740
  }
2564
2741
  }
2565
2742
  `;
2566
- const RightSlop = styled(Slop)`
2743
+ const RightSlop = styled(Slop).withConfig({
2744
+ shouldForwardProp: (prop) => !["position"].includes(prop)
2745
+ })`
2567
2746
  ${(p) => cssMediaRules([p.position], ([position = "inside"]) => {
2568
2747
  switch (position) {
2569
2748
  case "inside":
@@ -2591,7 +2770,9 @@ const RightSlop = styled(Slop)`
2591
2770
  const ClipMask = styled.div`
2592
2771
  overflow: hidden;
2593
2772
  `;
2594
- const Dots = styled.div`
2773
+ const Dots = styled.div.withConfig({
2774
+ shouldForwardProp: (prop) => !["color"].includes(prop)
2775
+ })`
2595
2776
  display: ${(props) => props.hidden ? "none" : "flex"};
2596
2777
  justify-content: center;
2597
2778
  margin-top: 20px;
@@ -2606,7 +2787,9 @@ const Dots = styled.div`
2606
2787
  color: ${colorToString(color)};
2607
2788
  `)}
2608
2789
  `;
2609
- const Dot = styled.div`
2790
+ const Dot = styled.div.withConfig({
2791
+ shouldForwardProp: (prop) => !["active"].includes(prop)
2792
+ })`
2610
2793
  position: relative;
2611
2794
  margin: 0 6px;
2612
2795
  border-radius: 50%;
@@ -2966,7 +3149,9 @@ const Segment = styled.div`
2966
3149
  flex: 1;
2967
3150
  text-align: center;
2968
3151
  `;
2969
- const Container$a = styled.div`
3152
+ const Container$a = styled.div.withConfig({
3153
+ shouldForwardProp: (prop) => !["margin", "variant", "size", "shape", "gap", "labelColor", "numberFont", "numberColor", "blockColor", "labelFont"].includes(prop)
3154
+ })`
2970
3155
  display: flex;
2971
3156
  ${cssMargin()}
2972
3157
  ${(p) => cssMediaRules([p.size], ([size = "medium"]) => {
@@ -3062,7 +3247,7 @@ const Container$a = styled.div`
3062
3247
  z-index: 1;
3063
3248
  }
3064
3249
 
3065
- :before {
3250
+ ::before {
3066
3251
  content: '';
3067
3252
  position: absolute;
3068
3253
  top: 0;
@@ -3074,7 +3259,7 @@ const Container$a = styled.div`
3074
3259
  background: ${colorToString(blockColor)};
3075
3260
  }
3076
3261
 
3077
- :after {
3262
+ ::after {
3078
3263
  content: '';
3079
3264
  position: absolute;
3080
3265
  left: 0;
@@ -3105,7 +3290,7 @@ const Container$a = styled.div`
3105
3290
  z-index: 1;
3106
3291
  }
3107
3292
 
3108
- :before {
3293
+ ::before {
3109
3294
  content: '';
3110
3295
  position: absolute;
3111
3296
  top: 50%;
@@ -3385,7 +3570,9 @@ function registerComponent$8(runtime) {
3385
3570
  }
3386
3571
  });
3387
3572
  }
3388
- const IE11MinHeightContainer = styled.div`
3573
+ const IE11MinHeightContainer = styled.div.withConfig({
3574
+ shouldForwardProp: (prop) => !["margin"].includes(prop)
3575
+ })`
3389
3576
  display: flex;
3390
3577
  width: 100%;
3391
3578
  ${cssMargin()}
@@ -3397,7 +3584,9 @@ const Container$9 = styled.div`
3397
3584
  min-height: 40px;
3398
3585
  width: 100%;
3399
3586
  `;
3400
- const Line = styled.div`
3587
+ const Line = styled.div.withConfig({
3588
+ shouldForwardProp: (prop) => !["variant", "color", "thickness"].includes(prop)
3589
+ })`
3401
3590
  ${(p) => cssMediaRules([p.variant, p.thickness, p.color], ([variant = "solid", thickness = {
3402
3591
  value: 1,
3403
3592
  unit: "px"
@@ -3509,7 +3698,9 @@ function registerComponent$7(runtime) {
3509
3698
  }
3510
3699
  });
3511
3700
  }
3512
- const Container$8 = styled.div`
3701
+ const Container$8 = styled.div.withConfig({
3702
+ shouldForwardProp: (prop) => !["margin"].includes(prop)
3703
+ })`
3513
3704
  min-height: 15px;
3514
3705
  ${cssMargin()}
3515
3706
  `;
@@ -3545,7 +3736,7 @@ const Embed = forwardRef(function Embed2({
3545
3736
  }, ref) {
3546
3737
  const [container, setContainer] = useState(null);
3547
3738
  const [shouldRender, setShouldRender] = useState(false);
3548
- useLayoutEffect(() => {
3739
+ useIsomorphicLayoutEffect(() => {
3549
3740
  setShouldRender(true);
3550
3741
  }, []);
3551
3742
  useImperativeHandle(ref, () => container, [container]);
@@ -3793,7 +3984,9 @@ function getSizeHeight$1(size) {
3793
3984
  throw new Error(`Invalid form size "${size}"`);
3794
3985
  }
3795
3986
  }
3796
- const Base$2 = styled.input`
3987
+ const Base$2 = styled.input.withConfig({
3988
+ shouldForwardProp: (prop, defaultValidator) => !["shape", "size", "contrast", "brandColor", "error"].includes(prop.toString()) && defaultValidator(prop)
3989
+ })`
3797
3990
  ${cssField()}
3798
3991
  ${(props) => cssMediaRules([props.size], ([size = Sizes.MEDIUM]) => css`
3799
3992
  min-height: ${getSizeHeight$1(size)}px;
@@ -3823,7 +4016,9 @@ var Input$2 = forwardRef(function Input(_o, ref) {
3823
4016
  brandColor
3824
4017
  }));
3825
4018
  });
3826
- const Container$7 = styled.div`
4019
+ const Container$7 = styled.div.withConfig({
4020
+ shouldForwardProp: (prop) => !["width", "margin"].includes(prop.toString())
4021
+ })`
3827
4022
  display: flex;
3828
4023
  flex-direction: column;
3829
4024
  ${cssMargin()};
@@ -3907,7 +4102,9 @@ function getContrastColor(contrast) {
3907
4102
  throw new Error(`Invalid form contrast "${contrast}"`);
3908
4103
  }
3909
4104
  }
3910
- const Base$1 = styled.label`
4105
+ const Base$1 = styled.label.withConfig({
4106
+ shouldForwardProp: (prop, defaultValidator) => !["contrast", "size", "textStyle", "textColor"].includes(prop.toString()) && defaultValidator(prop)
4107
+ })`
3911
4108
  display: block;
3912
4109
  margin: 0 0 0.25em 0;
3913
4110
  ${cssTextStyle()}
@@ -3958,7 +4155,9 @@ var SingleLineTextTableField = forwardRef(function SingleLineTextTableField2(_q,
3958
4155
  }))]
3959
4156
  });
3960
4157
  });
3961
- const Base = styled.textarea`
4158
+ const Base = styled.textarea.withConfig({
4159
+ shouldForwardProp: (prop, defaultValidator) => !["error", "shape", "size", "contrast", "brandColor"].includes(prop.toString()) && defaultValidator(prop)
4160
+ })`
3962
4161
  resize: vertical;
3963
4162
  ${cssField()}
3964
4163
  `;
@@ -4024,14 +4223,18 @@ function getCheckmarkColor$1({
4024
4223
  l
4025
4224
  }).alpha(a).isLight() ? "rgba(0, 0, 0, 0.7)" : "rgba(255, 255, 255, 0.95)";
4026
4225
  }
4027
- const Container$6 = styled.div`
4226
+ const Container$6 = styled.div.withConfig({
4227
+ shouldForwardProp: (prop) => !["size"].includes(prop)
4228
+ })`
4028
4229
  position: relative;
4029
4230
  ${(props) => cssMediaRules([props.size], ([size = Sizes.MEDIUM]) => css`
4030
4231
  height: ${getSizeHeight(size)}px;
4031
4232
  width: ${getSizeHeight(size)}px;
4032
4233
  `)}
4033
4234
  `;
4034
- const FakeCheckbox = styled.div`
4235
+ const FakeCheckbox = styled.div.withConfig({
4236
+ shouldForwardProp: (prop) => !["contrast", "error"].includes(prop)
4237
+ })`
4035
4238
  position: absolute;
4036
4239
  width: 100%;
4037
4240
  height: 100%;
@@ -4044,7 +4247,9 @@ const FakeCheckbox = styled.div`
4044
4247
  background-color: ${getContrastBackgroundColor(contrast)};
4045
4248
  `)}
4046
4249
  `;
4047
- const HiddenCheckbox = styled.input`
4250
+ const HiddenCheckbox = styled.input.withConfig({
4251
+ shouldForwardProp: (prop, defaultValidator) => !["size", "brandColor", "contrast", "error"].includes(prop) && defaultValidator(prop)
4252
+ })`
4048
4253
  position: absolute;
4049
4254
  opacity: 0;
4050
4255
  width: 100%;
@@ -4287,14 +4492,18 @@ function getCheckmarkColor({
4287
4492
  l
4288
4493
  }).alpha(a).isLight() ? "rgba(0, 0, 0, 0.7)" : "rgba(255, 255, 255, 0.95)";
4289
4494
  }
4290
- const Container$5 = styled.div`
4495
+ const Container$5 = styled.div.withConfig({
4496
+ shouldForwardProp: (prop) => !["size"].includes(prop.toString())
4497
+ })`
4291
4498
  position: relative;
4292
4499
  ${(props) => cssMediaRules([props.size], ([size = Sizes.MEDIUM]) => css`
4293
4500
  height: ${getSizeHeight(size)}px;
4294
4501
  width: ${getSizeHeight(size)}px;
4295
4502
  `)}
4296
4503
  `;
4297
- const FakeRadioButton = styled.div`
4504
+ const FakeRadioButton = styled.div.withConfig({
4505
+ shouldForwardProp: (prop) => !["contrast", "error"].includes(prop.toString())
4506
+ })`
4298
4507
  position: absolute;
4299
4508
  width: 100%;
4300
4509
  height: 100%;
@@ -4307,7 +4516,9 @@ const FakeRadioButton = styled.div`
4307
4516
  background-color: ${getContrastBackgroundColor(contrast)};
4308
4517
  `)}
4309
4518
  `;
4310
- const HiddenRadioButton = styled.input.attrs({
4519
+ const HiddenRadioButton = styled.input.withConfig({
4520
+ shouldForwardProp: (prop) => !["brandColor", "contrast", "error"].includes(prop.toString())
4521
+ }).attrs({
4311
4522
  type: "radio"
4312
4523
  })`
4313
4524
  position: absolute;
@@ -4472,7 +4683,9 @@ var TableColumnRadioButtonGroup = forwardRef(function TableColumnRadioButtonGrou
4472
4683
  }, option.id))]
4473
4684
  });
4474
4685
  });
4475
- const Container$4 = styled.div`
4686
+ const Container$4 = styled.div.withConfig({
4687
+ shouldForwardProp: (prop) => !["error", "shape", "size", "contrast", "brandColor"].includes(prop.toString())
4688
+ })`
4476
4689
  ${cssField()}
4477
4690
  display: flex;
4478
4691
  align-items: center;
@@ -4685,7 +4898,9 @@ var NumberTableField = forwardRef(function NumberTableField2(_Q, ref) {
4685
4898
  }))]
4686
4899
  });
4687
4900
  });
4688
- const Label = styled.div`
4901
+ const Label = styled.div.withConfig({
4902
+ shouldForwardProp: (prop) => !["size"].includes(prop.toString())
4903
+ })`
4689
4904
  display: block;
4690
4905
  max-width: 120px;
4691
4906
  min-width: 60px;
@@ -4698,7 +4913,9 @@ const Label = styled.div`
4698
4913
  max-height: ${0.5 * getSizeHeight(size)}px;
4699
4914
  `)}
4700
4915
  `;
4701
- const Input2 = styled.div`
4916
+ const Input2 = styled.div.withConfig({
4917
+ shouldForwardProp: (prop) => !["shape", "size"].includes(prop.toString())
4918
+ })`
4702
4919
  display: block;
4703
4920
  width: 100%;
4704
4921
  border-width: 2px;
@@ -4916,7 +5133,9 @@ const Alignments = {
4916
5133
  CENTER: "center",
4917
5134
  RIGHT: "right"
4918
5135
  };
4919
- const GridForm = styled.form`
5136
+ const GridForm = styled.form.withConfig({
5137
+ shouldForwardProp: (prop) => !["size", "width", "margin"].includes(prop)
5138
+ })`
4920
5139
  display: flex;
4921
5140
  flex-wrap: wrap;
4922
5141
  width: 100%;
@@ -4925,7 +5144,9 @@ const GridForm = styled.form`
4925
5144
  `)}
4926
5145
  ${cssMargin()}
4927
5146
  `;
4928
- const GridItem$1 = styled.div`
5147
+ const GridItem$1 = styled.div.withConfig({
5148
+ shouldForwardProp: (prop) => !["grid", "index", "rowGap", "columnGap"].includes(prop)
5149
+ })`
4929
5150
  align-self: flex-end;
4930
5151
  flex-direction: column;
4931
5152
  ${cssGridItem()}
@@ -4942,7 +5163,9 @@ function getAlignmentMargin(alignment) {
4942
5163
  }
4943
5164
  const StyledButton = styled((props) => /* @__PURE__ */ jsx(Button$1, __spreadProps(__spreadValues({}, props), {
4944
5165
  as: "button"
4945
- })))`
5166
+ }))).withConfig({
5167
+ shouldForwardProp: (prop) => !["alignment"].includes(prop.toString())
5168
+ })`
4946
5169
  display: flex;
4947
5170
  align-items: center;
4948
5171
  justify-content: center;
@@ -5445,7 +5668,9 @@ const GutterContainer = styled.div`
5445
5668
  padding-right: ${p.last ? "0px" : `${gutter.value / 2}${gutter.unit}`};
5446
5669
  `)}
5447
5670
  `;
5448
- const PlaceholderLink$1 = styled.div`
5671
+ const PlaceholderLink$1 = styled.div.withConfig({
5672
+ shouldForwardProp: (prop) => !["width", "button"].includes(prop.toString())
5673
+ })`
5449
5674
  width: ${(props) => props.width}px;
5450
5675
  height: ${(props) => props.button === true ? 32 : 8}px;
5451
5676
  background-color: #a1a8c2;
@@ -5573,7 +5798,9 @@ var SvgChevronDown8 = function SvgChevronDown82(props) {
5573
5798
  })));
5574
5799
  };
5575
5800
  const DROP_DOWN_MENU_WIDTH = 200;
5576
- const DropDownMenu$1 = styled.div`
5801
+ const DropDownMenu$1 = styled.div.withConfig({
5802
+ shouldForwardProp: (prop) => !["position"].includes(prop.toString())
5803
+ })`
5577
5804
  position: absolute;
5578
5805
  top: 100%;
5579
5806
  left: ${(props) => props.position === "left" ? 0 : "auto"};
@@ -5610,7 +5837,9 @@ const DropDownContainer = styled.div`
5610
5837
  animation: ${dropIn} 0.25s;
5611
5838
  }
5612
5839
  `;
5613
- const StyledDropDownItem = styled(Link)`
5840
+ const StyledDropDownItem = styled(Link).withConfig({
5841
+ shouldForwardProp: (prop) => !["color", "textStyle"].includes(prop.toString())
5842
+ })`
5614
5843
  display: block;
5615
5844
  text-decoration: none;
5616
5845
  line-height: 1.4;
@@ -5668,7 +5897,7 @@ function DropDownButton(_U) {
5668
5897
  ]);
5669
5898
  const container = useRef(null);
5670
5899
  const [position, setPosition] = useState("left");
5671
- useLayoutEffect(() => {
5900
+ useIsomorphicLayoutEffect(() => {
5672
5901
  if (container.current && container.current.ownerDocument.defaultView.innerWidth < container.current.offsetLeft + DROP_DOWN_MENU_WIDTH) {
5673
5902
  setPosition("right");
5674
5903
  } else {
@@ -5735,7 +5964,9 @@ var SvgTimes16 = function SvgTimes162(props) {
5735
5964
  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"
5736
5965
  })));
5737
5966
  };
5738
- const DropDownMenu = styled.div`
5967
+ const DropDownMenu = styled.div.withConfig({
5968
+ shouldForwardProp: (prop) => !["open"].includes(prop.toString())
5969
+ })`
5739
5970
  display: ${(props) => props.open ? "flex" : "none"};
5740
5971
  flex-direction: column;
5741
5972
  padding: 8px;
@@ -5743,7 +5974,9 @@ const DropDownMenu = styled.div`
5743
5974
  const ButtonLink$1 = styled(Button$1)`
5744
5975
  margin: 8px 0;
5745
5976
  `;
5746
- const StyledLink$2 = styled(Link)`
5977
+ const StyledLink$2 = styled(Link).withConfig({
5978
+ shouldForwardProp: (prop) => !["textStyle", "color"].includes(prop.toString())
5979
+ })`
5747
5980
  text-decoration: none;
5748
5981
  line-height: 1.4;
5749
5982
  padding: 8px 16px;
@@ -5834,7 +6067,9 @@ function NavigationButton$1(props) {
5834
6067
  const ButtonLink = styled(NavigationButton$1)`
5835
6068
  margin: 8px 0;
5836
6069
  `;
5837
- const Container$3 = styled.div`
6070
+ const Container$3 = styled.div.withConfig({
6071
+ shouldForwardProp: (prop) => !["animation", "backgroundColor", "open"].includes(prop.toString())
6072
+ })`
5838
6073
  position: fixed;
5839
6074
  flex-direction: column;
5840
6075
  width: 100%;
@@ -5866,7 +6101,9 @@ const Container$3 = styled.div`
5866
6101
  }[animation]}
5867
6102
  `)}
5868
6103
  `;
5869
- const CloseIconContainer = styled.button`
6104
+ const CloseIconContainer = styled.button.withConfig({
6105
+ shouldForwardProp: (prop) => !["color"].includes(prop.toString())
6106
+ })`
5870
6107
  position: absolute;
5871
6108
  top: 15px;
5872
6109
  right: 15px;
@@ -5914,7 +6151,9 @@ function MobileMenu({
5914
6151
  })]
5915
6152
  });
5916
6153
  }
5917
- const Container$2 = styled.nav`
6154
+ const Container$2 = styled.nav.withConfig({
6155
+ shouldForwardProp: (prop) => !["margin", "textStyle", "gutter"].includes(prop.toString())
6156
+ })`
5918
6157
  display: flex;
5919
6158
  align-items: center;
5920
6159
  ${cssMargin()}
@@ -5926,7 +6165,9 @@ const Container$2 = styled.nav`
5926
6165
  gap: ${gutter.value}${gutter.unit};
5927
6166
  `)}
5928
6167
  `;
5929
- const LinksContainer = styled.div`
6168
+ const LinksContainer = styled.div.withConfig({
6169
+ shouldForwardProp: (prop) => !["alignment", "mobileMenuAnimation"].includes(prop.toString())
6170
+ })`
5930
6171
  display: flex;
5931
6172
  align-items: center;
5932
6173
  flex-grow: 1;
@@ -5935,7 +6176,9 @@ const LinksContainer = styled.div`
5935
6176
  justify-content: ${alignment};
5936
6177
  `)}
5937
6178
  `;
5938
- const OpenIconContainer = styled.button`
6179
+ const OpenIconContainer = styled.button.withConfig({
6180
+ shouldForwardProp: (prop) => !["mobileMenuAnimation", "alignment", "color"].includes(prop.toString())
6181
+ })`
5939
6182
  display: none;
5940
6183
  flex-grow: 1;
5941
6184
  align-items: center;
@@ -6216,7 +6459,9 @@ const Grid = styled.div`
6216
6459
  flex-wrap: wrap;
6217
6460
  width: 100%;
6218
6461
  `;
6219
- const GridItem = styled.div`
6462
+ const GridItem = styled.div.withConfig({
6463
+ shouldForwardProp: (prop) => !["grid", "index", "rowGap", "columnGap"].includes(prop.toString())
6464
+ })`
6220
6465
  display: flex;
6221
6466
  align-items: flex-start;
6222
6467
  ${cssGridItem()}
@@ -6947,7 +7192,9 @@ function SocialLinksPlaceholder({
6947
7192
  }, link.id))
6948
7193
  });
6949
7194
  }
6950
- const Container$1 = styled.div`
7195
+ const Container$1 = styled.div.withConfig({
7196
+ shouldForwardProp: (prop) => !["width", "margin", "alignment"].includes(prop.toString())
7197
+ })`
6951
7198
  display: flex;
6952
7199
  flex-direction: row;
6953
7200
  flex-wrap: wrap;
@@ -6956,7 +7203,9 @@ const Container$1 = styled.div`
6956
7203
  justify-content: ${alignment};
6957
7204
  `)}
6958
7205
  `;
6959
- const StyledLink$1 = styled(Link)`
7206
+ const StyledLink$1 = styled(Link).withConfig({
7207
+ shouldForwardProp: (prop) => !["brandColor", "shape", "size", "hoverStyle", "fill", "backgroundColor"].includes(prop.toString())
7208
+ })`
6960
7209
  display: block;
6961
7210
  color: ${(props) => props.brandColor};
6962
7211
  transition: transform, opacity 0.18s;
@@ -7524,7 +7773,9 @@ const RichTextEditor = styled(forwardRef(function RichTextEditor2(_ca, ref) {
7524
7773
  margin: 0;
7525
7774
  }
7526
7775
  `;
7527
- const StyledRichTextEditor = styled(RichTextEditor)`
7776
+ const StyledRichTextEditor = styled(RichTextEditor).withConfig({
7777
+ shouldForwardProp: (prop) => !["margin"].includes(prop.toString())
7778
+ })`
7528
7779
  ${cssMargin()}
7529
7780
  `;
7530
7781
  const defaultText = {
@@ -7708,7 +7959,9 @@ function registerComponent$1(runtime) {
7708
7959
  }
7709
7960
  });
7710
7961
  }
7711
- const Container = styled.div`
7962
+ const Container = styled.div.withConfig({
7963
+ shouldForwardProp: (prop) => !["margin", "borderRadius"].includes(prop.toString())
7964
+ })`
7712
7965
  display: flex;
7713
7966
  flex-direction: column;
7714
7967
  overflow: hidden;
@@ -8778,7 +9031,7 @@ const FindDomNode = forwardRef(function FindDomNode2(props, ref) {
8778
9031
  innerRef: ref
8779
9032
  }));
8780
9033
  });
8781
- const contextDefaultValue = configureStore();
9034
+ const storeContextDefaultValue = configureStore();
8782
9035
  function createReactRuntime(store) {
8783
9036
  return {
8784
9037
  registerComponent(component, {
@@ -8801,8 +9054,9 @@ function createReactRuntime(store) {
8801
9054
  }
8802
9055
  };
8803
9056
  }
8804
- const ReactRuntime = createReactRuntime(contextDefaultValue);
8805
- const Context = createContext(contextDefaultValue);
9057
+ const ReactRuntime = createReactRuntime(storeContextDefaultValue);
9058
+ registerBuiltinComponents(ReactRuntime);
9059
+ const Context = createContext(storeContextDefaultValue);
8806
9060
  function RuntimeProvider({
8807
9061
  client,
8808
9062
  children,
@@ -8810,16 +9064,11 @@ function RuntimeProvider({
8810
9064
  }) {
8811
9065
  const [store, setStore] = useState(() => {
8812
9066
  const store2 = configureStore({
8813
- preloadedState: contextDefaultValue.getState(),
9067
+ preloadedState: storeContextDefaultValue.getState(),
8814
9068
  rootElements
8815
9069
  });
8816
- const runtime = createReactRuntime(store2);
8817
- registerBuiltinComponents(runtime);
8818
9070
  return store2;
8819
9071
  });
8820
- useEffect(() => {
8821
- return registerBuiltinComponents(createReactRuntime(store));
8822
- }, [store]);
8823
9072
  useEffect(() => {
8824
9073
  var _a;
8825
9074
  const unregisterDocuments = Array.from((_a = rootElements == null ? void 0 : rootElements.entries()) != null ? _a : []).map(([documentKey, rootElement]) => store.dispatch(registerDocumentEffect(createDocument(documentKey, rootElement))));
@@ -8942,14 +9191,7 @@ const ElementReference = memo(forwardRef(function ElementReference2({
8942
9191
  const {
8943
9192
  error,
8944
9193
  data
8945
- } = useQuery(gql`
8946
- query ElementReferenceGlobalElement($id: ID!) {
8947
- globalElement(id: $id) {
8948
- id
8949
- data
8950
- }
8951
- }
8952
- `, {
9194
+ } = useQuery(ELEMENT_REFERENCE_GLOBAL_ELEMENT, {
8953
9195
  variables: {
8954
9196
  id: elementReference.value
8955
9197
  }