@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.
- package/dist/api.cjs.js +1 -0
- package/dist/api.cjs.js.map +1 -1
- package/dist/api.es.js +1 -0
- package/dist/api.es.js.map +1 -1
- package/dist/builder.cjs.js +1 -1
- package/dist/builder.es.js +1 -1
- package/dist/components.cjs.js +6 -3
- package/dist/components.cjs.js.map +1 -1
- package/dist/components.es.js +6 -3
- package/dist/components.es.js.map +1 -1
- package/dist/constants.cjs.js +10 -363
- package/dist/constants.cjs.js.map +1 -1
- package/dist/constants.es.js +1 -354
- package/dist/constants.es.js.map +1 -1
- package/dist/control-serialization.cjs.js +43 -3
- package/dist/control-serialization.cjs.js.map +1 -1
- package/dist/control-serialization.es.js +41 -1
- package/dist/control-serialization.es.js.map +1 -1
- package/dist/controls.cjs.js +12 -9
- package/dist/controls.cjs.js.map +1 -1
- package/dist/controls.es.js +3 -2
- package/dist/controls.es.js.map +1 -1
- package/dist/descriptors.cjs.js.map +1 -1
- package/dist/descriptors.es.js.map +1 -1
- package/dist/graphql.cjs.js +365 -0
- package/dist/graphql.cjs.js.map +1 -0
- package/dist/graphql.es.js +356 -0
- package/dist/graphql.es.js.map +1 -0
- package/dist/image.cjs.js +14 -0
- package/dist/image.cjs.js.map +1 -0
- package/dist/image.es.js +10 -0
- package/dist/image.es.js.map +1 -0
- package/dist/index.cjs.js +412 -149
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +368 -103
- package/dist/index.es.js.map +1 -1
- package/dist/main.cjs.js +1 -0
- package/dist/main.cjs.js.map +1 -1
- package/dist/main.es.js +1 -0
- package/dist/main.es.js.map +1 -1
- package/dist/next.cjs.js +18 -24
- package/dist/next.cjs.js.map +1 -1
- package/dist/next.es.js +20 -26
- package/dist/next.es.js.map +1 -1
- package/dist/react-builder-preview.cjs.js +8 -5
- package/dist/react-builder-preview.cjs.js.map +1 -1
- package/dist/react-builder-preview.es.js +10 -7
- package/dist/react-builder-preview.es.js.map +1 -1
- package/dist/react-page.cjs.js +260 -0
- package/dist/react-page.cjs.js.map +1 -1
- package/dist/react-page.es.js +254 -1
- package/dist/react-page.es.js.map +1 -1
- package/dist/react.cjs.js +6 -3
- package/dist/react.cjs.js.map +1 -1
- package/dist/react.es.js +6 -3
- package/dist/react.es.js.map +1 -1
- package/dist/shape.cjs.js +20 -0
- package/dist/shape.cjs.js.map +1 -0
- package/dist/shape.es.js +14 -0
- package/dist/shape.es.js.map +1 -0
- package/dist/text-input.cjs.js +0 -18
- package/dist/text-input.cjs.js.map +1 -1
- package/dist/text-input.es.js +1 -13
- package/dist/text-input.es.js.map +1 -1
- package/dist/types/api/introspection.d.ts +10 -0
- package/dist/types/api/introspection.d.ts.map +1 -0
- package/dist/types/api/react.d.ts +2 -2
- package/dist/types/api/react.d.ts.map +1 -1
- package/dist/types/builder/serialization/control-serialization.d.ts +3 -3
- package/dist/types/builder/serialization/control-serialization.d.ts.map +1 -1
- package/dist/types/builder/serialization/controls/combobox.d.ts +5 -0
- package/dist/types/builder/serialization/controls/combobox.d.ts.map +1 -0
- package/dist/types/builder/serialization/controls/shape.d.ts +5 -0
- package/dist/types/builder/serialization/controls/shape.d.ts.map +1 -0
- package/dist/types/components/builtin/Box/Box.d.ts.map +1 -1
- package/dist/types/components/builtin/Button/Button.d.ts.map +1 -1
- package/dist/types/components/builtin/Carousel/Carousel.d.ts.map +1 -1
- package/dist/types/components/builtin/Countdown/Countdown.d.ts.map +1 -1
- package/dist/types/components/builtin/Divider/Divider.d.ts.map +1 -1
- package/dist/types/components/builtin/Embed/Embed.d.ts.map +1 -1
- package/dist/types/components/builtin/Form/Form.d.ts.map +1 -1
- package/dist/types/components/builtin/Form/components/Field/components/Checkbox/index.d.ts.map +1 -1
- package/dist/types/components/builtin/Form/components/Field/components/Input/index.d.ts +1 -1
- package/dist/types/components/builtin/Form/components/Field/components/Input/index.d.ts.map +1 -1
- package/dist/types/components/builtin/Form/components/Field/components/Label/index.d.ts.map +1 -1
- package/dist/types/components/builtin/Form/components/Field/components/PlaceholderTableField/index.d.ts.map +1 -1
- package/dist/types/components/builtin/Form/components/Field/components/RadioButton/index.d.ts.map +1 -1
- package/dist/types/components/builtin/Form/components/Field/components/SingleSelectTableField/components/TableColumnSingleSelect/index.d.ts.map +1 -1
- package/dist/types/components/builtin/Form/components/Field/components/TextArea/index.d.ts.map +1 -1
- package/dist/types/components/builtin/Form/components/Field/services/cssField.d.ts +1 -1
- package/dist/types/components/builtin/Form/components/Placeholder/index.d.ts.map +1 -1
- package/dist/types/components/builtin/Image/Image.d.ts.map +1 -1
- package/dist/types/components/builtin/Navigation/Navigation.d.ts.map +1 -1
- package/dist/types/components/builtin/Navigation/components/DropDownButton/index.d.ts.map +1 -1
- package/dist/types/components/builtin/Navigation/components/LinksPlaceholder/index.d.ts.map +1 -1
- package/dist/types/components/builtin/Navigation/components/MobileMenu/components/MobileDropDownButton/index.d.ts.map +1 -1
- package/dist/types/components/builtin/Navigation/components/MobileMenu/index.d.ts.map +1 -1
- package/dist/types/components/builtin/Root/Root.d.ts.map +1 -1
- package/dist/types/components/builtin/SocialLinks/SocialLinks.d.ts.map +1 -1
- package/dist/types/components/builtin/Text/Text.d.ts.map +1 -1
- package/dist/types/components/builtin/Video/Video.d.ts.map +1 -1
- package/dist/types/components/hooks/useIsomorphicLayoutEffect.d.ts +3 -0
- package/dist/types/components/hooks/useIsomorphicLayoutEffect.d.ts.map +1 -0
- package/dist/types/components/hooks/useMediaQuery.d.ts.map +1 -1
- package/dist/types/components/shared/BackgroundsContainer/components/BackgroundVideo/index.d.ts.map +1 -1
- package/dist/types/components/shared/BackgroundsContainer/components/Parallax/index.d.ts.map +1 -1
- package/dist/types/components/utils/queries.d.ts +2 -0
- package/dist/types/components/utils/queries.d.ts.map +1 -1
- package/dist/types/controls/combobox.d.ts +22 -0
- package/dist/types/controls/combobox.d.ts.map +1 -0
- package/dist/types/controls/control.d.ts +3 -2
- package/dist/types/controls/control.d.ts.map +1 -1
- package/dist/types/controls/index.d.ts +1 -0
- package/dist/types/controls/index.d.ts.map +1 -1
- package/dist/types/controls/types.d.ts +3 -0
- package/dist/types/controls/types.d.ts.map +1 -1
- package/dist/types/next.d.ts +4 -8
- package/dist/types/next.d.ts.map +1 -1
- package/dist/types/prop-controllers/descriptors.d.ts +4 -3
- package/dist/types/prop-controllers/descriptors.d.ts.map +1 -1
- package/dist/types/prop-controllers/introspection.d.ts +5 -0
- package/dist/types/prop-controllers/introspection.d.ts.map +1 -1
- package/dist/types/runtimes/react/controls/combobox.d.ts +4 -0
- package/dist/types/runtimes/react/controls/combobox.d.ts.map +1 -0
- package/dist/types/runtimes/react/controls/control.d.ts +3 -2
- package/dist/types/runtimes/react/controls/control.d.ts.map +1 -1
- package/dist/types/runtimes/react/controls.d.ts.map +1 -1
- package/dist/types/runtimes/react/index.d.ts +1 -1
- package/dist/types/runtimes/react/index.d.ts.map +1 -1
- package/dist/types/state/react-page.d.ts +1 -0
- package/dist/types/state/react-page.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/list.cjs.js +0 -8
- package/dist/list.cjs.js.map +0 -1
- package/dist/list.es.js +0 -6
- package/dist/list.es.js.map +0 -1
package/dist/index.es.js
CHANGED
|
@@ -35,18 +35,23 @@ var __publicField = (obj, key, value) => {
|
|
|
35
35
|
};
|
|
36
36
|
var _ea;
|
|
37
37
|
import * as React from "react";
|
|
38
|
-
import { forwardRef, createContext, useContext, useMemo,
|
|
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 {
|
|
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";
|
|
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
|
+
import { KeyUtils, Value } from "slate";
|
|
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";
|
|
46
52
|
import { jsx, Fragment, jsxs } from "react/jsx-runtime";
|
|
47
53
|
import parse$1 from "html-react-parser";
|
|
48
54
|
import Head from "next/head";
|
|
49
|
-
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";
|
|
50
55
|
import ColorHelper from "color";
|
|
51
56
|
import scrollIntoView from "scroll-into-view-if-needed";
|
|
52
57
|
import NextLink from "next/link";
|
|
@@ -58,15 +63,13 @@ import { Field as Field$1, getIn, Formik } from "formik";
|
|
|
58
63
|
import { p as parse, c as createBox, g as getBox } from "./box-models.es.js";
|
|
59
64
|
import { normalize } from "polished";
|
|
60
65
|
import ReactPlayer from "react-player";
|
|
61
|
-
import { Value } from "slate";
|
|
62
66
|
import Hotkeys from "slate-hotkeys";
|
|
63
67
|
import ipsum from "corporate-ipsum";
|
|
64
68
|
import { isHotkey } from "is-hotkey";
|
|
65
69
|
import { Editor } from "slate-react";
|
|
66
70
|
import Lists from "@convertkit/slate-lists";
|
|
67
|
-
import { S as
|
|
68
|
-
import {
|
|
69
|
-
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";
|
|
70
73
|
import { findDOMNode } from "react-dom";
|
|
71
74
|
const PlaceholderBase$1 = styled.div`
|
|
72
75
|
width: 100%;
|
|
@@ -215,9 +218,165 @@ const TABLE_BY_ID = gql`
|
|
|
215
218
|
}
|
|
216
219
|
}
|
|
217
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
|
+
`;
|
|
218
288
|
function isNonNullable(value) {
|
|
219
289
|
return value != null;
|
|
220
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
|
+
}
|
|
221
380
|
const typePolicies = {
|
|
222
381
|
Query: {
|
|
223
382
|
fields: {
|
|
@@ -305,14 +464,6 @@ const typePolicies = {
|
|
|
305
464
|
}
|
|
306
465
|
}
|
|
307
466
|
};
|
|
308
|
-
const isServer$1 = typeof window === "undefined";
|
|
309
|
-
let globalApolloClient = null;
|
|
310
|
-
function garbageCollectGlobalCacheData() {
|
|
311
|
-
globalApolloClient = null;
|
|
312
|
-
}
|
|
313
|
-
function getGlobalCacheData() {
|
|
314
|
-
return globalApolloClient == null ? void 0 : globalApolloClient.cache.extract();
|
|
315
|
-
}
|
|
316
467
|
function createApolloClient({
|
|
317
468
|
uri,
|
|
318
469
|
cacheData
|
|
@@ -323,9 +474,11 @@ function createApolloClient({
|
|
|
323
474
|
if (cacheData)
|
|
324
475
|
cache2.restore(cacheData);
|
|
325
476
|
return new ApolloClient({
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
477
|
+
link: new BatchHttpLink({
|
|
478
|
+
uri,
|
|
479
|
+
batchMax: 100
|
|
480
|
+
}),
|
|
481
|
+
cache: cache2
|
|
329
482
|
});
|
|
330
483
|
}
|
|
331
484
|
class MakeswiftClient {
|
|
@@ -334,14 +487,28 @@ class MakeswiftClient {
|
|
|
334
487
|
cacheData
|
|
335
488
|
}) {
|
|
336
489
|
__publicField(this, "apolloClient");
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
490
|
+
this.apolloClient = createApolloClient({
|
|
491
|
+
uri,
|
|
492
|
+
cacheData
|
|
493
|
+
});
|
|
494
|
+
}
|
|
495
|
+
async prefetch(element) {
|
|
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
|
|
507
|
+
})
|
|
341
508
|
});
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
this.apolloClient
|
|
509
|
+
});
|
|
510
|
+
KeyUtils.resetGenerator();
|
|
511
|
+
return this.apolloClient.cache.extract();
|
|
345
512
|
}
|
|
346
513
|
updateCacheData(cacheData) {
|
|
347
514
|
this.apolloClient.cache.restore(cacheData);
|
|
@@ -621,10 +788,12 @@ const getDeviceMediaQuery = (device) => {
|
|
|
621
788
|
}
|
|
622
789
|
return parts.join(" and ");
|
|
623
790
|
};
|
|
791
|
+
const isSSR = typeof window === "undefined" || /ServerSideRendering/.test(window.navigator && window.navigator.userAgent);
|
|
792
|
+
const useIsomorphicLayoutEffect = isSSR ? useEffect : useLayoutEffect;
|
|
624
793
|
function useMediaQuery(responsiveValue) {
|
|
625
794
|
const [deviceId, setDeviceId] = useState(DEVICES[0].id);
|
|
626
795
|
const { value } = findDeviceOverride(responsiveValue, deviceId) || {};
|
|
627
|
-
|
|
796
|
+
useIsomorphicLayoutEffect(() => {
|
|
628
797
|
if (responsiveValue == null || window == null)
|
|
629
798
|
return () => {
|
|
630
799
|
};
|
|
@@ -1139,7 +1308,7 @@ function Parallax(_g2) {
|
|
|
1139
1308
|
const container = useRef(null);
|
|
1140
1309
|
const [containerScrollTop, setContainerScrollTop] = useState(strength == null ? 0 : strength);
|
|
1141
1310
|
const lastScrollParentScrollTop = useRef(0);
|
|
1142
|
-
|
|
1311
|
+
useIsomorphicLayoutEffect(() => {
|
|
1143
1312
|
if (!container.current || strength == null || strength === 0)
|
|
1144
1313
|
return void 0;
|
|
1145
1314
|
const containerDocument = container.current.ownerDocument;
|
|
@@ -1253,7 +1422,7 @@ function BackgroundVideo({
|
|
|
1253
1422
|
const [ready, setReady] = useState(false);
|
|
1254
1423
|
const [scale, setScale] = useState(1);
|
|
1255
1424
|
const container = useRef(null);
|
|
1256
|
-
|
|
1425
|
+
useIsomorphicLayoutEffect(() => {
|
|
1257
1426
|
const {
|
|
1258
1427
|
current: containerEl
|
|
1259
1428
|
} = container;
|
|
@@ -1494,7 +1663,9 @@ var BackgroundsContainer = forwardRef(function BackgroundsContainer2(_i, ref) {
|
|
|
1494
1663
|
}), Children.only(children)]
|
|
1495
1664
|
}));
|
|
1496
1665
|
});
|
|
1497
|
-
const StyledBackgroundsContainer = styled(BackgroundsContainer)
|
|
1666
|
+
const StyledBackgroundsContainer = styled(BackgroundsContainer).withConfig({
|
|
1667
|
+
shouldForwardProp: (prop) => !["margin", "borderRadius", "alignSelf"].includes(prop.toString())
|
|
1668
|
+
})`
|
|
1498
1669
|
display: flex;
|
|
1499
1670
|
${cssMargin()}
|
|
1500
1671
|
${cssBorderRadius()}
|
|
@@ -1502,7 +1673,9 @@ const StyledBackgroundsContainer = styled(BackgroundsContainer)`
|
|
|
1502
1673
|
alignSelf
|
|
1503
1674
|
}))}
|
|
1504
1675
|
`;
|
|
1505
|
-
const Grid$1 = styled(motion.div)
|
|
1676
|
+
const Grid$1 = styled(motion.div).withConfig({
|
|
1677
|
+
shouldForwardProp: (prop) => !["padding", "border", "boxShadow", "alignContent"].includes(prop)
|
|
1678
|
+
})`
|
|
1506
1679
|
display: flex;
|
|
1507
1680
|
flex-wrap: wrap;
|
|
1508
1681
|
width: 100%;
|
|
@@ -1513,7 +1686,9 @@ const Grid$1 = styled(motion.div)`
|
|
|
1513
1686
|
alignContent
|
|
1514
1687
|
}))}
|
|
1515
1688
|
`;
|
|
1516
|
-
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
|
+
})`
|
|
1517
1692
|
display: flex;
|
|
1518
1693
|
|
|
1519
1694
|
/* IE11 doesn't recognize space-between and treats it as stretch, so we fall back to flex-start */
|
|
@@ -1941,7 +2116,9 @@ function responsiveWidth(widthData, defaultValue = "100%") {
|
|
|
1941
2116
|
width: typeof width === "object" ? `${width.value}${width.unit}` : width
|
|
1942
2117
|
})));
|
|
1943
2118
|
}
|
|
1944
|
-
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
|
+
})`
|
|
1945
2122
|
display: table;
|
|
1946
2123
|
border: 0;
|
|
1947
2124
|
outline: 0;
|
|
@@ -1987,7 +2164,6 @@ const StyledButton$1 = styled(Link)`
|
|
|
1987
2164
|
large: "16px 20px"
|
|
1988
2165
|
}[size]};
|
|
1989
2166
|
font-size: ${`${fontSize.value}${fontSize.unit}`};
|
|
1990
|
-
|
|
1991
2167
|
${{
|
|
1992
2168
|
flat: css`
|
|
1993
2169
|
background: ${colorToString(color)};
|
|
@@ -2130,7 +2306,7 @@ const StyledButton$1 = styled(Link)`
|
|
|
2130
2306
|
}[variant]}
|
|
2131
2307
|
`;
|
|
2132
2308
|
})}
|
|
2133
|
-
|
|
2309
|
+
${cssTextStyle()}
|
|
2134
2310
|
`;
|
|
2135
2311
|
const Button$1 = forwardRef(function Button2(_m, ref) {
|
|
2136
2312
|
var _n = _m, {
|
|
@@ -2302,7 +2478,9 @@ function imageSizes(width) {
|
|
|
2302
2478
|
return `(max-width: ${device.maxWidth}px) ${Math.min(device.maxWidth, override.value.value)}px`;
|
|
2303
2479
|
}).filter((size) => size != null).reduce((sourceSizes, sourceSize) => `${sourceSize}, ${sourceSizes}`, baseWidthSize);
|
|
2304
2480
|
}
|
|
2305
|
-
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
|
+
})`
|
|
2306
2484
|
line-height: 0;
|
|
2307
2485
|
overflow: hidden;
|
|
2308
2486
|
${cssMargin()}
|
|
@@ -2437,7 +2615,9 @@ const Container$b = styled.div`
|
|
|
2437
2615
|
position: relative;
|
|
2438
2616
|
height: 100%;
|
|
2439
2617
|
`;
|
|
2440
|
-
const Wrapper = styled.div
|
|
2618
|
+
const Wrapper = styled.div.withConfig({
|
|
2619
|
+
shouldForwardProp: (prop) => !["margin"].includes(prop)
|
|
2620
|
+
})`
|
|
2441
2621
|
position: relative;
|
|
2442
2622
|
display: flex;
|
|
2443
2623
|
flex-direction: column;
|
|
@@ -2447,7 +2627,9 @@ const Wrapper = styled.div`
|
|
|
2447
2627
|
outline: 0;
|
|
2448
2628
|
}
|
|
2449
2629
|
`;
|
|
2450
|
-
const Arrow = styled.div
|
|
2630
|
+
const Arrow = styled.div.withConfig({
|
|
2631
|
+
shouldForwardProp: (prop) => !["background"].includes(prop)
|
|
2632
|
+
})`
|
|
2451
2633
|
padding: 10px;
|
|
2452
2634
|
border-radius: 50%;
|
|
2453
2635
|
outline: 0;
|
|
@@ -2475,7 +2657,9 @@ const Arrow = styled.div`
|
|
|
2475
2657
|
stroke: currentColor;
|
|
2476
2658
|
}
|
|
2477
2659
|
`;
|
|
2478
|
-
const Slop = styled.div
|
|
2660
|
+
const Slop = styled.div.withConfig({
|
|
2661
|
+
shouldForwardProp: (prop) => !["color"].includes(prop)
|
|
2662
|
+
})`
|
|
2479
2663
|
position: absolute;
|
|
2480
2664
|
top: 0;
|
|
2481
2665
|
bottom: 0;
|
|
@@ -2494,7 +2678,9 @@ const Slop = styled.div`
|
|
|
2494
2678
|
color: ${colorToString(color)};
|
|
2495
2679
|
`)}
|
|
2496
2680
|
`;
|
|
2497
|
-
const Slide = styled(motion.div)
|
|
2681
|
+
const Slide = styled(motion.div).withConfig({
|
|
2682
|
+
shouldForwardProp: (prop) => !["pageSize", "alignItems"].includes(prop)
|
|
2683
|
+
})`
|
|
2498
2684
|
display: flex;
|
|
2499
2685
|
${(p) => cssMediaRules([p.pageSize], ([pageSize = 1]) => css`
|
|
2500
2686
|
flex-basis: ${100 / pageSize}%;
|
|
@@ -2506,7 +2692,9 @@ const Slide = styled(motion.div)`
|
|
|
2506
2692
|
alignItems
|
|
2507
2693
|
}))}
|
|
2508
2694
|
`;
|
|
2509
|
-
const Reel = styled(motion.div)
|
|
2695
|
+
const Reel = styled(motion.div).withConfig({
|
|
2696
|
+
shouldForwardProp: (prop) => !["gap"].includes(prop)
|
|
2697
|
+
})`
|
|
2510
2698
|
display: flex;
|
|
2511
2699
|
position: relative;
|
|
2512
2700
|
flex-wrap: nowrap;
|
|
@@ -2525,7 +2713,9 @@ const Page$1 = styled(motion.div)`
|
|
|
2525
2713
|
position: relative;
|
|
2526
2714
|
width: 100%;
|
|
2527
2715
|
`;
|
|
2528
|
-
const LeftSlop = styled(Slop)
|
|
2716
|
+
const LeftSlop = styled(Slop).withConfig({
|
|
2717
|
+
shouldForwardProp: (prop) => !["position"].includes(prop)
|
|
2718
|
+
})`
|
|
2529
2719
|
${(p) => cssMediaRules([p.position], ([position = "inside"]) => {
|
|
2530
2720
|
switch (position) {
|
|
2531
2721
|
case "inside":
|
|
@@ -2550,7 +2740,9 @@ const LeftSlop = styled(Slop)`
|
|
|
2550
2740
|
}
|
|
2551
2741
|
}
|
|
2552
2742
|
`;
|
|
2553
|
-
const RightSlop = styled(Slop)
|
|
2743
|
+
const RightSlop = styled(Slop).withConfig({
|
|
2744
|
+
shouldForwardProp: (prop) => !["position"].includes(prop)
|
|
2745
|
+
})`
|
|
2554
2746
|
${(p) => cssMediaRules([p.position], ([position = "inside"]) => {
|
|
2555
2747
|
switch (position) {
|
|
2556
2748
|
case "inside":
|
|
@@ -2578,7 +2770,9 @@ const RightSlop = styled(Slop)`
|
|
|
2578
2770
|
const ClipMask = styled.div`
|
|
2579
2771
|
overflow: hidden;
|
|
2580
2772
|
`;
|
|
2581
|
-
const Dots = styled.div
|
|
2773
|
+
const Dots = styled.div.withConfig({
|
|
2774
|
+
shouldForwardProp: (prop) => !["color"].includes(prop)
|
|
2775
|
+
})`
|
|
2582
2776
|
display: ${(props) => props.hidden ? "none" : "flex"};
|
|
2583
2777
|
justify-content: center;
|
|
2584
2778
|
margin-top: 20px;
|
|
@@ -2593,7 +2787,9 @@ const Dots = styled.div`
|
|
|
2593
2787
|
color: ${colorToString(color)};
|
|
2594
2788
|
`)}
|
|
2595
2789
|
`;
|
|
2596
|
-
const Dot = styled.div
|
|
2790
|
+
const Dot = styled.div.withConfig({
|
|
2791
|
+
shouldForwardProp: (prop) => !["active"].includes(prop)
|
|
2792
|
+
})`
|
|
2597
2793
|
position: relative;
|
|
2598
2794
|
margin: 0 6px;
|
|
2599
2795
|
border-radius: 50%;
|
|
@@ -2953,7 +3149,9 @@ const Segment = styled.div`
|
|
|
2953
3149
|
flex: 1;
|
|
2954
3150
|
text-align: center;
|
|
2955
3151
|
`;
|
|
2956
|
-
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
|
+
})`
|
|
2957
3155
|
display: flex;
|
|
2958
3156
|
${cssMargin()}
|
|
2959
3157
|
${(p) => cssMediaRules([p.size], ([size = "medium"]) => {
|
|
@@ -3049,7 +3247,7 @@ const Container$a = styled.div`
|
|
|
3049
3247
|
z-index: 1;
|
|
3050
3248
|
}
|
|
3051
3249
|
|
|
3052
|
-
|
|
3250
|
+
::before {
|
|
3053
3251
|
content: '';
|
|
3054
3252
|
position: absolute;
|
|
3055
3253
|
top: 0;
|
|
@@ -3061,7 +3259,7 @@ const Container$a = styled.div`
|
|
|
3061
3259
|
background: ${colorToString(blockColor)};
|
|
3062
3260
|
}
|
|
3063
3261
|
|
|
3064
|
-
|
|
3262
|
+
::after {
|
|
3065
3263
|
content: '';
|
|
3066
3264
|
position: absolute;
|
|
3067
3265
|
left: 0;
|
|
@@ -3092,7 +3290,7 @@ const Container$a = styled.div`
|
|
|
3092
3290
|
z-index: 1;
|
|
3093
3291
|
}
|
|
3094
3292
|
|
|
3095
|
-
|
|
3293
|
+
::before {
|
|
3096
3294
|
content: '';
|
|
3097
3295
|
position: absolute;
|
|
3098
3296
|
top: 50%;
|
|
@@ -3372,7 +3570,9 @@ function registerComponent$8(runtime) {
|
|
|
3372
3570
|
}
|
|
3373
3571
|
});
|
|
3374
3572
|
}
|
|
3375
|
-
const IE11MinHeightContainer = styled.div
|
|
3573
|
+
const IE11MinHeightContainer = styled.div.withConfig({
|
|
3574
|
+
shouldForwardProp: (prop) => !["margin"].includes(prop)
|
|
3575
|
+
})`
|
|
3376
3576
|
display: flex;
|
|
3377
3577
|
width: 100%;
|
|
3378
3578
|
${cssMargin()}
|
|
@@ -3384,7 +3584,9 @@ const Container$9 = styled.div`
|
|
|
3384
3584
|
min-height: 40px;
|
|
3385
3585
|
width: 100%;
|
|
3386
3586
|
`;
|
|
3387
|
-
const Line = styled.div
|
|
3587
|
+
const Line = styled.div.withConfig({
|
|
3588
|
+
shouldForwardProp: (prop) => !["variant", "color", "thickness"].includes(prop)
|
|
3589
|
+
})`
|
|
3388
3590
|
${(p) => cssMediaRules([p.variant, p.thickness, p.color], ([variant = "solid", thickness = {
|
|
3389
3591
|
value: 1,
|
|
3390
3592
|
unit: "px"
|
|
@@ -3496,7 +3698,9 @@ function registerComponent$7(runtime) {
|
|
|
3496
3698
|
}
|
|
3497
3699
|
});
|
|
3498
3700
|
}
|
|
3499
|
-
const Container$8 = styled.div
|
|
3701
|
+
const Container$8 = styled.div.withConfig({
|
|
3702
|
+
shouldForwardProp: (prop) => !["margin"].includes(prop)
|
|
3703
|
+
})`
|
|
3500
3704
|
min-height: 15px;
|
|
3501
3705
|
${cssMargin()}
|
|
3502
3706
|
`;
|
|
@@ -3532,7 +3736,7 @@ const Embed = forwardRef(function Embed2({
|
|
|
3532
3736
|
}, ref) {
|
|
3533
3737
|
const [container, setContainer] = useState(null);
|
|
3534
3738
|
const [shouldRender, setShouldRender] = useState(false);
|
|
3535
|
-
|
|
3739
|
+
useIsomorphicLayoutEffect(() => {
|
|
3536
3740
|
setShouldRender(true);
|
|
3537
3741
|
}, []);
|
|
3538
3742
|
useImperativeHandle(ref, () => container, [container]);
|
|
@@ -3780,7 +3984,9 @@ function getSizeHeight$1(size) {
|
|
|
3780
3984
|
throw new Error(`Invalid form size "${size}"`);
|
|
3781
3985
|
}
|
|
3782
3986
|
}
|
|
3783
|
-
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
|
+
})`
|
|
3784
3990
|
${cssField()}
|
|
3785
3991
|
${(props) => cssMediaRules([props.size], ([size = Sizes.MEDIUM]) => css`
|
|
3786
3992
|
min-height: ${getSizeHeight$1(size)}px;
|
|
@@ -3810,7 +4016,9 @@ var Input$2 = forwardRef(function Input(_o, ref) {
|
|
|
3810
4016
|
brandColor
|
|
3811
4017
|
}));
|
|
3812
4018
|
});
|
|
3813
|
-
const Container$7 = styled.div
|
|
4019
|
+
const Container$7 = styled.div.withConfig({
|
|
4020
|
+
shouldForwardProp: (prop) => !["width", "margin"].includes(prop.toString())
|
|
4021
|
+
})`
|
|
3814
4022
|
display: flex;
|
|
3815
4023
|
flex-direction: column;
|
|
3816
4024
|
${cssMargin()};
|
|
@@ -3894,7 +4102,9 @@ function getContrastColor(contrast) {
|
|
|
3894
4102
|
throw new Error(`Invalid form contrast "${contrast}"`);
|
|
3895
4103
|
}
|
|
3896
4104
|
}
|
|
3897
|
-
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
|
+
})`
|
|
3898
4108
|
display: block;
|
|
3899
4109
|
margin: 0 0 0.25em 0;
|
|
3900
4110
|
${cssTextStyle()}
|
|
@@ -3945,7 +4155,9 @@ var SingleLineTextTableField = forwardRef(function SingleLineTextTableField2(_q,
|
|
|
3945
4155
|
}))]
|
|
3946
4156
|
});
|
|
3947
4157
|
});
|
|
3948
|
-
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
|
+
})`
|
|
3949
4161
|
resize: vertical;
|
|
3950
4162
|
${cssField()}
|
|
3951
4163
|
`;
|
|
@@ -4011,14 +4223,18 @@ function getCheckmarkColor$1({
|
|
|
4011
4223
|
l
|
|
4012
4224
|
}).alpha(a).isLight() ? "rgba(0, 0, 0, 0.7)" : "rgba(255, 255, 255, 0.95)";
|
|
4013
4225
|
}
|
|
4014
|
-
const Container$6 = styled.div
|
|
4226
|
+
const Container$6 = styled.div.withConfig({
|
|
4227
|
+
shouldForwardProp: (prop) => !["size"].includes(prop)
|
|
4228
|
+
})`
|
|
4015
4229
|
position: relative;
|
|
4016
4230
|
${(props) => cssMediaRules([props.size], ([size = Sizes.MEDIUM]) => css`
|
|
4017
4231
|
height: ${getSizeHeight(size)}px;
|
|
4018
4232
|
width: ${getSizeHeight(size)}px;
|
|
4019
4233
|
`)}
|
|
4020
4234
|
`;
|
|
4021
|
-
const FakeCheckbox = styled.div
|
|
4235
|
+
const FakeCheckbox = styled.div.withConfig({
|
|
4236
|
+
shouldForwardProp: (prop) => !["contrast", "error"].includes(prop)
|
|
4237
|
+
})`
|
|
4022
4238
|
position: absolute;
|
|
4023
4239
|
width: 100%;
|
|
4024
4240
|
height: 100%;
|
|
@@ -4031,7 +4247,9 @@ const FakeCheckbox = styled.div`
|
|
|
4031
4247
|
background-color: ${getContrastBackgroundColor(contrast)};
|
|
4032
4248
|
`)}
|
|
4033
4249
|
`;
|
|
4034
|
-
const HiddenCheckbox = styled.input
|
|
4250
|
+
const HiddenCheckbox = styled.input.withConfig({
|
|
4251
|
+
shouldForwardProp: (prop, defaultValidator) => !["size", "brandColor", "contrast", "error"].includes(prop) && defaultValidator(prop)
|
|
4252
|
+
})`
|
|
4035
4253
|
position: absolute;
|
|
4036
4254
|
opacity: 0;
|
|
4037
4255
|
width: 100%;
|
|
@@ -4274,14 +4492,18 @@ function getCheckmarkColor({
|
|
|
4274
4492
|
l
|
|
4275
4493
|
}).alpha(a).isLight() ? "rgba(0, 0, 0, 0.7)" : "rgba(255, 255, 255, 0.95)";
|
|
4276
4494
|
}
|
|
4277
|
-
const Container$5 = styled.div
|
|
4495
|
+
const Container$5 = styled.div.withConfig({
|
|
4496
|
+
shouldForwardProp: (prop) => !["size"].includes(prop.toString())
|
|
4497
|
+
})`
|
|
4278
4498
|
position: relative;
|
|
4279
4499
|
${(props) => cssMediaRules([props.size], ([size = Sizes.MEDIUM]) => css`
|
|
4280
4500
|
height: ${getSizeHeight(size)}px;
|
|
4281
4501
|
width: ${getSizeHeight(size)}px;
|
|
4282
4502
|
`)}
|
|
4283
4503
|
`;
|
|
4284
|
-
const FakeRadioButton = styled.div
|
|
4504
|
+
const FakeRadioButton = styled.div.withConfig({
|
|
4505
|
+
shouldForwardProp: (prop) => !["contrast", "error"].includes(prop.toString())
|
|
4506
|
+
})`
|
|
4285
4507
|
position: absolute;
|
|
4286
4508
|
width: 100%;
|
|
4287
4509
|
height: 100%;
|
|
@@ -4294,7 +4516,9 @@ const FakeRadioButton = styled.div`
|
|
|
4294
4516
|
background-color: ${getContrastBackgroundColor(contrast)};
|
|
4295
4517
|
`)}
|
|
4296
4518
|
`;
|
|
4297
|
-
const HiddenRadioButton = styled.input.
|
|
4519
|
+
const HiddenRadioButton = styled.input.withConfig({
|
|
4520
|
+
shouldForwardProp: (prop) => !["brandColor", "contrast", "error"].includes(prop.toString())
|
|
4521
|
+
}).attrs({
|
|
4298
4522
|
type: "radio"
|
|
4299
4523
|
})`
|
|
4300
4524
|
position: absolute;
|
|
@@ -4459,7 +4683,9 @@ var TableColumnRadioButtonGroup = forwardRef(function TableColumnRadioButtonGrou
|
|
|
4459
4683
|
}, option.id))]
|
|
4460
4684
|
});
|
|
4461
4685
|
});
|
|
4462
|
-
const Container$4 = styled.div
|
|
4686
|
+
const Container$4 = styled.div.withConfig({
|
|
4687
|
+
shouldForwardProp: (prop) => !["error", "shape", "size", "contrast", "brandColor"].includes(prop.toString())
|
|
4688
|
+
})`
|
|
4463
4689
|
${cssField()}
|
|
4464
4690
|
display: flex;
|
|
4465
4691
|
align-items: center;
|
|
@@ -4672,7 +4898,9 @@ var NumberTableField = forwardRef(function NumberTableField2(_Q, ref) {
|
|
|
4672
4898
|
}))]
|
|
4673
4899
|
});
|
|
4674
4900
|
});
|
|
4675
|
-
const Label = styled.div
|
|
4901
|
+
const Label = styled.div.withConfig({
|
|
4902
|
+
shouldForwardProp: (prop) => !["size"].includes(prop.toString())
|
|
4903
|
+
})`
|
|
4676
4904
|
display: block;
|
|
4677
4905
|
max-width: 120px;
|
|
4678
4906
|
min-width: 60px;
|
|
@@ -4685,7 +4913,9 @@ const Label = styled.div`
|
|
|
4685
4913
|
max-height: ${0.5 * getSizeHeight(size)}px;
|
|
4686
4914
|
`)}
|
|
4687
4915
|
`;
|
|
4688
|
-
const Input2 = styled.div
|
|
4916
|
+
const Input2 = styled.div.withConfig({
|
|
4917
|
+
shouldForwardProp: (prop) => !["shape", "size"].includes(prop.toString())
|
|
4918
|
+
})`
|
|
4689
4919
|
display: block;
|
|
4690
4920
|
width: 100%;
|
|
4691
4921
|
border-width: 2px;
|
|
@@ -4903,7 +5133,9 @@ const Alignments = {
|
|
|
4903
5133
|
CENTER: "center",
|
|
4904
5134
|
RIGHT: "right"
|
|
4905
5135
|
};
|
|
4906
|
-
const GridForm = styled.form
|
|
5136
|
+
const GridForm = styled.form.withConfig({
|
|
5137
|
+
shouldForwardProp: (prop) => !["size", "width", "margin"].includes(prop)
|
|
5138
|
+
})`
|
|
4907
5139
|
display: flex;
|
|
4908
5140
|
flex-wrap: wrap;
|
|
4909
5141
|
width: 100%;
|
|
@@ -4912,7 +5144,9 @@ const GridForm = styled.form`
|
|
|
4912
5144
|
`)}
|
|
4913
5145
|
${cssMargin()}
|
|
4914
5146
|
`;
|
|
4915
|
-
const GridItem$1 = styled.div
|
|
5147
|
+
const GridItem$1 = styled.div.withConfig({
|
|
5148
|
+
shouldForwardProp: (prop) => !["grid", "index", "rowGap", "columnGap"].includes(prop)
|
|
5149
|
+
})`
|
|
4916
5150
|
align-self: flex-end;
|
|
4917
5151
|
flex-direction: column;
|
|
4918
5152
|
${cssGridItem()}
|
|
@@ -4929,7 +5163,9 @@ function getAlignmentMargin(alignment) {
|
|
|
4929
5163
|
}
|
|
4930
5164
|
const StyledButton = styled((props) => /* @__PURE__ */ jsx(Button$1, __spreadProps(__spreadValues({}, props), {
|
|
4931
5165
|
as: "button"
|
|
4932
|
-
})))
|
|
5166
|
+
}))).withConfig({
|
|
5167
|
+
shouldForwardProp: (prop) => !["alignment"].includes(prop.toString())
|
|
5168
|
+
})`
|
|
4933
5169
|
display: flex;
|
|
4934
5170
|
align-items: center;
|
|
4935
5171
|
justify-content: center;
|
|
@@ -5432,7 +5668,9 @@ const GutterContainer = styled.div`
|
|
|
5432
5668
|
padding-right: ${p.last ? "0px" : `${gutter.value / 2}${gutter.unit}`};
|
|
5433
5669
|
`)}
|
|
5434
5670
|
`;
|
|
5435
|
-
const PlaceholderLink$1 = styled.div
|
|
5671
|
+
const PlaceholderLink$1 = styled.div.withConfig({
|
|
5672
|
+
shouldForwardProp: (prop) => !["width", "button"].includes(prop.toString())
|
|
5673
|
+
})`
|
|
5436
5674
|
width: ${(props) => props.width}px;
|
|
5437
5675
|
height: ${(props) => props.button === true ? 32 : 8}px;
|
|
5438
5676
|
background-color: #a1a8c2;
|
|
@@ -5560,7 +5798,9 @@ var SvgChevronDown8 = function SvgChevronDown82(props) {
|
|
|
5560
5798
|
})));
|
|
5561
5799
|
};
|
|
5562
5800
|
const DROP_DOWN_MENU_WIDTH = 200;
|
|
5563
|
-
const DropDownMenu$1 = styled.div
|
|
5801
|
+
const DropDownMenu$1 = styled.div.withConfig({
|
|
5802
|
+
shouldForwardProp: (prop) => !["position"].includes(prop.toString())
|
|
5803
|
+
})`
|
|
5564
5804
|
position: absolute;
|
|
5565
5805
|
top: 100%;
|
|
5566
5806
|
left: ${(props) => props.position === "left" ? 0 : "auto"};
|
|
@@ -5597,7 +5837,9 @@ const DropDownContainer = styled.div`
|
|
|
5597
5837
|
animation: ${dropIn} 0.25s;
|
|
5598
5838
|
}
|
|
5599
5839
|
`;
|
|
5600
|
-
const StyledDropDownItem = styled(Link)
|
|
5840
|
+
const StyledDropDownItem = styled(Link).withConfig({
|
|
5841
|
+
shouldForwardProp: (prop) => !["color", "textStyle"].includes(prop.toString())
|
|
5842
|
+
})`
|
|
5601
5843
|
display: block;
|
|
5602
5844
|
text-decoration: none;
|
|
5603
5845
|
line-height: 1.4;
|
|
@@ -5655,7 +5897,7 @@ function DropDownButton(_U) {
|
|
|
5655
5897
|
]);
|
|
5656
5898
|
const container = useRef(null);
|
|
5657
5899
|
const [position, setPosition] = useState("left");
|
|
5658
|
-
|
|
5900
|
+
useIsomorphicLayoutEffect(() => {
|
|
5659
5901
|
if (container.current && container.current.ownerDocument.defaultView.innerWidth < container.current.offsetLeft + DROP_DOWN_MENU_WIDTH) {
|
|
5660
5902
|
setPosition("right");
|
|
5661
5903
|
} else {
|
|
@@ -5722,7 +5964,9 @@ var SvgTimes16 = function SvgTimes162(props) {
|
|
|
5722
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"
|
|
5723
5965
|
})));
|
|
5724
5966
|
};
|
|
5725
|
-
const DropDownMenu = styled.div
|
|
5967
|
+
const DropDownMenu = styled.div.withConfig({
|
|
5968
|
+
shouldForwardProp: (prop) => !["open"].includes(prop.toString())
|
|
5969
|
+
})`
|
|
5726
5970
|
display: ${(props) => props.open ? "flex" : "none"};
|
|
5727
5971
|
flex-direction: column;
|
|
5728
5972
|
padding: 8px;
|
|
@@ -5730,7 +5974,9 @@ const DropDownMenu = styled.div`
|
|
|
5730
5974
|
const ButtonLink$1 = styled(Button$1)`
|
|
5731
5975
|
margin: 8px 0;
|
|
5732
5976
|
`;
|
|
5733
|
-
const StyledLink$2 = styled(Link)
|
|
5977
|
+
const StyledLink$2 = styled(Link).withConfig({
|
|
5978
|
+
shouldForwardProp: (prop) => !["textStyle", "color"].includes(prop.toString())
|
|
5979
|
+
})`
|
|
5734
5980
|
text-decoration: none;
|
|
5735
5981
|
line-height: 1.4;
|
|
5736
5982
|
padding: 8px 16px;
|
|
@@ -5821,7 +6067,9 @@ function NavigationButton$1(props) {
|
|
|
5821
6067
|
const ButtonLink = styled(NavigationButton$1)`
|
|
5822
6068
|
margin: 8px 0;
|
|
5823
6069
|
`;
|
|
5824
|
-
const Container$3 = styled.div
|
|
6070
|
+
const Container$3 = styled.div.withConfig({
|
|
6071
|
+
shouldForwardProp: (prop) => !["animation", "backgroundColor", "open"].includes(prop.toString())
|
|
6072
|
+
})`
|
|
5825
6073
|
position: fixed;
|
|
5826
6074
|
flex-direction: column;
|
|
5827
6075
|
width: 100%;
|
|
@@ -5853,7 +6101,9 @@ const Container$3 = styled.div`
|
|
|
5853
6101
|
}[animation]}
|
|
5854
6102
|
`)}
|
|
5855
6103
|
`;
|
|
5856
|
-
const CloseIconContainer = styled.button
|
|
6104
|
+
const CloseIconContainer = styled.button.withConfig({
|
|
6105
|
+
shouldForwardProp: (prop) => !["color"].includes(prop.toString())
|
|
6106
|
+
})`
|
|
5857
6107
|
position: absolute;
|
|
5858
6108
|
top: 15px;
|
|
5859
6109
|
right: 15px;
|
|
@@ -5901,7 +6151,9 @@ function MobileMenu({
|
|
|
5901
6151
|
})]
|
|
5902
6152
|
});
|
|
5903
6153
|
}
|
|
5904
|
-
const Container$2 = styled.nav
|
|
6154
|
+
const Container$2 = styled.nav.withConfig({
|
|
6155
|
+
shouldForwardProp: (prop) => !["margin", "textStyle", "gutter"].includes(prop.toString())
|
|
6156
|
+
})`
|
|
5905
6157
|
display: flex;
|
|
5906
6158
|
align-items: center;
|
|
5907
6159
|
${cssMargin()}
|
|
@@ -5913,7 +6165,9 @@ const Container$2 = styled.nav`
|
|
|
5913
6165
|
gap: ${gutter.value}${gutter.unit};
|
|
5914
6166
|
`)}
|
|
5915
6167
|
`;
|
|
5916
|
-
const LinksContainer = styled.div
|
|
6168
|
+
const LinksContainer = styled.div.withConfig({
|
|
6169
|
+
shouldForwardProp: (prop) => !["alignment", "mobileMenuAnimation"].includes(prop.toString())
|
|
6170
|
+
})`
|
|
5917
6171
|
display: flex;
|
|
5918
6172
|
align-items: center;
|
|
5919
6173
|
flex-grow: 1;
|
|
@@ -5922,7 +6176,9 @@ const LinksContainer = styled.div`
|
|
|
5922
6176
|
justify-content: ${alignment};
|
|
5923
6177
|
`)}
|
|
5924
6178
|
`;
|
|
5925
|
-
const OpenIconContainer = styled.button
|
|
6179
|
+
const OpenIconContainer = styled.button.withConfig({
|
|
6180
|
+
shouldForwardProp: (prop) => !["mobileMenuAnimation", "alignment", "color"].includes(prop.toString())
|
|
6181
|
+
})`
|
|
5926
6182
|
display: none;
|
|
5927
6183
|
flex-grow: 1;
|
|
5928
6184
|
align-items: center;
|
|
@@ -6203,7 +6459,9 @@ const Grid = styled.div`
|
|
|
6203
6459
|
flex-wrap: wrap;
|
|
6204
6460
|
width: 100%;
|
|
6205
6461
|
`;
|
|
6206
|
-
const GridItem = styled.div
|
|
6462
|
+
const GridItem = styled.div.withConfig({
|
|
6463
|
+
shouldForwardProp: (prop) => !["grid", "index", "rowGap", "columnGap"].includes(prop.toString())
|
|
6464
|
+
})`
|
|
6207
6465
|
display: flex;
|
|
6208
6466
|
align-items: flex-start;
|
|
6209
6467
|
${cssGridItem()}
|
|
@@ -6934,7 +7192,9 @@ function SocialLinksPlaceholder({
|
|
|
6934
7192
|
}, link.id))
|
|
6935
7193
|
});
|
|
6936
7194
|
}
|
|
6937
|
-
const Container$1 = styled.div
|
|
7195
|
+
const Container$1 = styled.div.withConfig({
|
|
7196
|
+
shouldForwardProp: (prop) => !["width", "margin", "alignment"].includes(prop.toString())
|
|
7197
|
+
})`
|
|
6938
7198
|
display: flex;
|
|
6939
7199
|
flex-direction: row;
|
|
6940
7200
|
flex-wrap: wrap;
|
|
@@ -6943,7 +7203,9 @@ const Container$1 = styled.div`
|
|
|
6943
7203
|
justify-content: ${alignment};
|
|
6944
7204
|
`)}
|
|
6945
7205
|
`;
|
|
6946
|
-
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
|
+
})`
|
|
6947
7209
|
display: block;
|
|
6948
7210
|
color: ${(props) => props.brandColor};
|
|
6949
7211
|
transition: transform, opacity 0.18s;
|
|
@@ -7511,7 +7773,9 @@ const RichTextEditor = styled(forwardRef(function RichTextEditor2(_ca, ref) {
|
|
|
7511
7773
|
margin: 0;
|
|
7512
7774
|
}
|
|
7513
7775
|
`;
|
|
7514
|
-
const StyledRichTextEditor = styled(RichTextEditor)
|
|
7776
|
+
const StyledRichTextEditor = styled(RichTextEditor).withConfig({
|
|
7777
|
+
shouldForwardProp: (prop) => !["margin"].includes(prop.toString())
|
|
7778
|
+
})`
|
|
7515
7779
|
${cssMargin()}
|
|
7516
7780
|
`;
|
|
7517
7781
|
const defaultText = {
|
|
@@ -7695,7 +7959,9 @@ function registerComponent$1(runtime) {
|
|
|
7695
7959
|
}
|
|
7696
7960
|
});
|
|
7697
7961
|
}
|
|
7698
|
-
const Container = styled.div
|
|
7962
|
+
const Container = styled.div.withConfig({
|
|
7963
|
+
shouldForwardProp: (prop) => !["margin", "borderRadius"].includes(prop.toString())
|
|
7964
|
+
})`
|
|
7699
7965
|
display: flex;
|
|
7700
7966
|
flex-direction: column;
|
|
7701
7967
|
overflow: hidden;
|
|
@@ -8546,6 +8812,9 @@ function useColorValue(data, definition) {
|
|
|
8546
8812
|
const [swatch] = (_b = (_a = result.data) == null ? void 0 : _a.swatches) != null ? _b : [null];
|
|
8547
8813
|
return ColorHelper({ 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();
|
|
8548
8814
|
}
|
|
8815
|
+
function useComboboxControlValue(data) {
|
|
8816
|
+
return data == null ? void 0 : data.value;
|
|
8817
|
+
}
|
|
8549
8818
|
function useImageControlValue(data) {
|
|
8550
8819
|
var _a;
|
|
8551
8820
|
return (_a = useFile(data)) == null ? void 0 : _a.publicUrl;
|
|
@@ -8634,6 +8903,12 @@ function ControlValue({
|
|
|
8634
8903
|
parameters: [data],
|
|
8635
8904
|
children: (value) => children(value)
|
|
8636
8905
|
}, definition.type);
|
|
8906
|
+
case ComboboxControlType:
|
|
8907
|
+
return /* @__PURE__ */ jsx(RenderHook, {
|
|
8908
|
+
hook: useComboboxControlValue,
|
|
8909
|
+
parameters: [data],
|
|
8910
|
+
children: (value) => children(value)
|
|
8911
|
+
}, definition.type);
|
|
8637
8912
|
case ShapeControlType:
|
|
8638
8913
|
return /* @__PURE__ */ jsx(ShapeControlValue, {
|
|
8639
8914
|
definition,
|
|
@@ -8675,6 +8950,7 @@ function PropsValue({
|
|
|
8675
8950
|
case SelectControlType:
|
|
8676
8951
|
case ColorControlType:
|
|
8677
8952
|
case ImageControlType:
|
|
8953
|
+
case ComboboxControlType:
|
|
8678
8954
|
case ShapeControlType:
|
|
8679
8955
|
case ListControlType:
|
|
8680
8956
|
return /* @__PURE__ */ jsx(ControlValue, {
|
|
@@ -8755,7 +9031,7 @@ const FindDomNode = forwardRef(function FindDomNode2(props, ref) {
|
|
|
8755
9031
|
innerRef: ref
|
|
8756
9032
|
}));
|
|
8757
9033
|
});
|
|
8758
|
-
const
|
|
9034
|
+
const storeContextDefaultValue = configureStore();
|
|
8759
9035
|
function createReactRuntime(store) {
|
|
8760
9036
|
return {
|
|
8761
9037
|
registerComponent(component, {
|
|
@@ -8778,8 +9054,9 @@ function createReactRuntime(store) {
|
|
|
8778
9054
|
}
|
|
8779
9055
|
};
|
|
8780
9056
|
}
|
|
8781
|
-
const ReactRuntime = createReactRuntime(
|
|
8782
|
-
|
|
9057
|
+
const ReactRuntime = createReactRuntime(storeContextDefaultValue);
|
|
9058
|
+
registerBuiltinComponents(ReactRuntime);
|
|
9059
|
+
const Context = createContext(storeContextDefaultValue);
|
|
8783
9060
|
function RuntimeProvider({
|
|
8784
9061
|
client,
|
|
8785
9062
|
children,
|
|
@@ -8787,16 +9064,11 @@ function RuntimeProvider({
|
|
|
8787
9064
|
}) {
|
|
8788
9065
|
const [store, setStore] = useState(() => {
|
|
8789
9066
|
const store2 = configureStore({
|
|
8790
|
-
preloadedState:
|
|
9067
|
+
preloadedState: storeContextDefaultValue.getState(),
|
|
8791
9068
|
rootElements
|
|
8792
9069
|
});
|
|
8793
|
-
const runtime = createReactRuntime(store2);
|
|
8794
|
-
registerBuiltinComponents(runtime);
|
|
8795
9070
|
return store2;
|
|
8796
9071
|
});
|
|
8797
|
-
useEffect(() => {
|
|
8798
|
-
return registerBuiltinComponents(createReactRuntime(store));
|
|
8799
|
-
}, [store]);
|
|
8800
9072
|
useEffect(() => {
|
|
8801
9073
|
var _a;
|
|
8802
9074
|
const unregisterDocuments = Array.from((_a = rootElements == null ? void 0 : rootElements.entries()) != null ? _a : []).map(([documentKey, rootElement]) => store.dispatch(registerDocumentEffect(createDocument(documentKey, rootElement))));
|
|
@@ -8919,14 +9191,7 @@ const ElementReference = memo(forwardRef(function ElementReference2({
|
|
|
8919
9191
|
const {
|
|
8920
9192
|
error,
|
|
8921
9193
|
data
|
|
8922
|
-
} = useQuery(
|
|
8923
|
-
query ElementReferenceGlobalElement($id: ID!) {
|
|
8924
|
-
globalElement(id: $id) {
|
|
8925
|
-
id
|
|
8926
|
-
data
|
|
8927
|
-
}
|
|
8928
|
-
}
|
|
8929
|
-
`, {
|
|
9194
|
+
} = useQuery(ELEMENT_REFERENCE_GLOBAL_ELEMENT, {
|
|
8930
9195
|
variables: {
|
|
8931
9196
|
id: elementReference.value
|
|
8932
9197
|
}
|
|
@@ -9009,5 +9274,5 @@ const DocumentReference = memo(forwardRef(function DocumentReference2({
|
|
|
9009
9274
|
document: document2
|
|
9010
9275
|
});
|
|
9011
9276
|
}));
|
|
9012
|
-
export { useBackgrounds as A, Box as B, Carousel as C, DocumentReference as D, Element$1 as E, Form as F, useBorder as G, useBoxShadow as H, ImageComponent as I, useResponsiveColor as J, useFile as K, useMediaQuery as L, usePage as M, Navigation as N, useTable as O, PageProvider as P, PAGE_SNIPPETS_QUERY as Q, RuntimeProvider as R, SocialLinks as S, Text as T, SITE_FONTS_QUERY as U, Page2 as V,
|
|
9277
|
+
export { useBackgrounds as A, Box as B, Carousel as C, DocumentReference as D, Element$1 as E, Form as F, useBorder as G, useBoxShadow as H, ImageComponent as I, useResponsiveColor as J, useFile as K, useMediaQuery as L, usePage as M, Navigation as N, useTable as O, PageProvider as P, PAGE_SNIPPETS_QUERY as Q, RuntimeProvider as R, SocialLinks as S, Text as T, SITE_FONTS_QUERY as U, Page2 as V, MakeswiftClient as W, deepEqual as X, ReactRuntime as a, usePageId as b, Button$1 as c, Countdown as d, Divider as e, Embed as f, Root as g, registerComponent$c as h, DEFAULT_BOX_ANIMATE_TYPE as i, DEFAULT_BOX_ANIMATE_DELAY as j, DEFAULT_BOX_ANIMATE_DURATION as k, DEFAULT_ITEM_ANIMATE_TYPE as l, DEFAULT_ITEM_ANIMATE_DELAY as m, DEFAULT_ITEM_ANIMATE_DURATION as n, DEFAULT_ITEM_STAGGER_DURATION as o, cssMediaRules as p, cssWidth as q, registerBuiltinComponents as r, cssMargin as s, cssPadding as t, useIsInBuilder as u, cssBorder as v, cssBorderRadius as w, cssBoxShadow as x, cssGridItem as y, cssTextStyle as z };
|
|
9013
9278
|
//# sourceMappingURL=index.es.js.map
|