@makeswift/runtime 0.2.19 → 0.3.1
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/Box.cjs.js +35 -70
- package/dist/Box.cjs.js.map +1 -1
- package/dist/Box.es.js +34 -65
- package/dist/Box.es.js.map +1 -1
- package/dist/Button.cjs.js +176 -208
- package/dist/Button.cjs.js.map +1 -1
- package/dist/Button.es.js +177 -208
- package/dist/Button.es.js.map +1 -1
- package/dist/Carousel.cjs.js +227 -249
- package/dist/Carousel.cjs.js.map +1 -1
- package/dist/Carousel.es.js +229 -247
- package/dist/Carousel.es.js.map +1 -1
- package/dist/Countdown.cjs.js +270 -203
- package/dist/Countdown.cjs.js.map +1 -1
- package/dist/Countdown.es.js +273 -202
- package/dist/Countdown.es.js.map +1 -1
- package/dist/Divider.cjs.js +50 -71
- package/dist/Divider.cjs.js.map +1 -1
- package/dist/Divider.es.js +51 -68
- package/dist/Divider.es.js.map +1 -1
- package/dist/Embed.cjs.js +6 -17
- package/dist/Embed.cjs.js.map +1 -1
- package/dist/Embed.es.js +7 -14
- package/dist/Embed.es.js.map +1 -1
- package/dist/Form.cjs.js +723 -553
- package/dist/Form.cjs.js.map +1 -1
- package/dist/Form.es.js +723 -552
- package/dist/Form.es.js.map +1 -1
- package/dist/Image.cjs.js +16 -38
- package/dist/Image.cjs.js.map +1 -1
- package/dist/Image.es.js +17 -38
- package/dist/Image.es.js.map +1 -1
- package/dist/Navigation.cjs.js +318 -224
- package/dist/Navigation.cjs.js.map +1 -1
- package/dist/Navigation.es.js +318 -220
- package/dist/Navigation.es.js.map +1 -1
- package/dist/Root.cjs.js +116 -78
- package/dist/Root.cjs.js.map +1 -1
- package/dist/Root.es.js +99 -77
- package/dist/Root.es.js.map +1 -1
- package/dist/SocialLinks.cjs.js +119 -86
- package/dist/SocialLinks.cjs.js.map +1 -1
- package/dist/SocialLinks.es.js +120 -83
- package/dist/SocialLinks.es.js.map +1 -1
- package/dist/Text.cjs.js +83 -99
- package/dist/Text.cjs.js.map +1 -1
- package/dist/Text.es.js +84 -99
- package/dist/Text.es.js.map +1 -1
- package/dist/Video.cjs.js +8 -19
- package/dist/Video.cjs.js.map +1 -1
- package/dist/Video.es.js +8 -18
- package/dist/Video.es.js.map +1 -1
- package/dist/components.cjs.js +6 -18
- package/dist/components.cjs.js.map +1 -1
- package/dist/components.es.js +5 -8
- package/dist/components.es.js.map +1 -1
- package/dist/controls.es.js +1 -1
- package/dist/grid-item.cjs.js +612 -0
- package/dist/grid-item.cjs.js.map +1 -0
- package/dist/grid-item.es.js +604 -0
- package/dist/grid-item.es.js.map +1 -0
- package/dist/index.cjs.js +594 -275
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.cjs2.js +98 -474
- package/dist/index.cjs2.js.map +1 -1
- package/dist/index.cjs3.js +20 -107
- package/dist/index.cjs3.js.map +1 -1
- package/dist/index.es.js +589 -274
- package/dist/index.es.js.map +1 -1
- package/dist/index.es2.js +99 -473
- package/dist/index.es2.js.map +1 -1
- package/dist/index.es3.js +21 -103
- package/dist/index.es3.js.map +1 -1
- package/dist/next.cjs.js +1 -2
- package/dist/next.cjs.js.map +1 -1
- package/dist/next.es.js +2 -3
- package/dist/next.es.js.map +1 -1
- package/dist/react-builder-preview.cjs.js +1 -2
- package/dist/react-builder-preview.cjs.js.map +1 -1
- package/dist/react-builder-preview.es.js +3 -4
- package/dist/react-builder-preview.es.js.map +1 -1
- package/dist/react.cjs.js +1 -2
- package/dist/react.cjs.js.map +1 -1
- package/dist/react.es.js +1 -2
- package/dist/react.es.js.map +1 -1
- package/dist/slot.cjs.js +41 -6
- package/dist/slot.cjs.js.map +1 -1
- package/dist/slot.es.js +36 -6
- package/dist/slot.es.js.map +1 -1
- package/dist/types/src/components/builtin/Box/Box.d.ts +7 -7
- package/dist/types/src/components/builtin/Box/Box.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Box/components/Placeholder/index.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Box/register.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Button/Button.d.ts +46 -34
- package/dist/types/src/components/builtin/Button/Button.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Carousel/Carousel.d.ts +5 -5
- package/dist/types/src/components/builtin/Carousel/Carousel.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Carousel/register.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Countdown/Countdown.d.ts +3 -3
- package/dist/types/src/components/builtin/Countdown/Countdown.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Countdown/register.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Divider/Divider.d.ts +3 -3
- package/dist/types/src/components/builtin/Divider/Divider.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Divider/register.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Embed/Embed.d.ts +3 -3
- package/dist/types/src/components/builtin/Embed/Embed.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Form/Form.d.ts +3 -3
- package/dist/types/src/components/builtin/Form/Form.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Form/components/Field/components/Checkbox/index.d.ts +4 -6
- package/dist/types/src/components/builtin/Form/components/Field/components/Checkbox/index.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Form/components/Field/components/CheckboxTableField/index.d.ts +3 -0
- package/dist/types/src/components/builtin/Form/components/Field/components/CheckboxTableField/index.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Form/components/Field/components/EmailTableField/index.d.ts +2 -0
- package/dist/types/src/components/builtin/Form/components/Field/components/EmailTableField/index.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Form/components/Field/components/Input/index.d.ts +3 -7
- package/dist/types/src/components/builtin/Form/components/Field/components/Input/index.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Form/components/Field/components/Label/index.d.ts +7 -13
- package/dist/types/src/components/builtin/Form/components/Field/components/Label/index.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Form/components/Field/components/LongTextTableField/index.d.ts +2 -0
- package/dist/types/src/components/builtin/Form/components/Field/components/LongTextTableField/index.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Form/components/Field/components/MultipleSelectTableField/index.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Form/components/Field/components/NumberTableField/index.d.ts +2 -0
- package/dist/types/src/components/builtin/Form/components/Field/components/NumberTableField/index.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Form/components/Field/components/PhoneNumberTableField/index.d.ts +2 -0
- package/dist/types/src/components/builtin/Form/components/Field/components/PhoneNumberTableField/index.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Form/components/Field/components/PlaceholderTableField/index.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Form/components/Field/components/RadioButton/index.d.ts +4 -8
- package/dist/types/src/components/builtin/Form/components/Field/components/RadioButton/index.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Form/components/Field/components/SingleLineTextTableField/index.d.ts +2 -0
- package/dist/types/src/components/builtin/Form/components/Field/components/SingleLineTextTableField/index.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Form/components/Field/components/SingleSelectTableField/components/TableColumnRadioButtonGroup/index.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Form/components/Field/components/SingleSelectTableField/components/TableColumnSingleSelect/index.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Form/components/Field/components/TextArea/index.d.ts +2 -7
- package/dist/types/src/components/builtin/Form/components/Field/components/TextArea/index.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Form/components/Field/components/URLTableField/index.d.ts +2 -0
- package/dist/types/src/components/builtin/Form/components/Field/components/URLTableField/index.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Form/components/Field/services/{cssField.d.ts → responsiveField.d.ts} +5 -4
- package/dist/types/src/components/builtin/Form/components/Field/services/responsiveField.d.ts.map +1 -0
- package/dist/types/src/components/builtin/Form/components/Placeholder/index.d.ts +2 -3
- package/dist/types/src/components/builtin/Form/components/Placeholder/index.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Form/components/Spinner/index.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Form/register.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Image/Image.d.ts +7 -7
- package/dist/types/src/components/builtin/Image/Image.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Navigation/Navigation.d.ts +3 -3
- package/dist/types/src/components/builtin/Navigation/Navigation.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Navigation/components/DropDownButton/index.d.ts +8 -81
- package/dist/types/src/components/builtin/Navigation/components/DropDownButton/index.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Navigation/components/LinksPlaceholder/index.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Navigation/components/MobileMenu/components/MobileDropDownButton/index.d.ts +8 -81
- package/dist/types/src/components/builtin/Navigation/components/MobileMenu/components/MobileDropDownButton/index.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Navigation/components/MobileMenu/index.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Navigation/register.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Root/Root.d.ts +1 -2
- package/dist/types/src/components/builtin/Root/Root.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Root/components/Placeholder/index.d.ts +1 -2
- package/dist/types/src/components/builtin/Root/components/Placeholder/index.d.ts.map +1 -1
- package/dist/types/src/components/builtin/SocialLinks/SocialLinks.d.ts +3 -3
- package/dist/types/src/components/builtin/SocialLinks/SocialLinks.d.ts.map +1 -1
- package/dist/types/src/components/builtin/SocialLinks/components/SocialLinksPlaceholder/index.d.ts.map +1 -1
- package/dist/types/src/components/builtin/SocialLinks/register.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Text/Text.d.ts +3 -3
- package/dist/types/src/components/builtin/Text/Text.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Text/components/RichTextEditor/components/Block/index.d.ts +8 -11
- package/dist/types/src/components/builtin/Text/components/RichTextEditor/components/Block/index.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Text/components/RichTextEditor/components/Mark/index.d.ts +3 -6
- package/dist/types/src/components/builtin/Text/components/RichTextEditor/components/Mark/index.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Text/components/RichTextEditor/index.d.ts +1 -1
- package/dist/types/src/components/builtin/Text/components/RichTextEditor/index.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Text/components/RichTextEditor/plugins/Link.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Text/register.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Video/Video.d.ts +4 -4
- package/dist/types/src/components/builtin/Video/Video.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Video/register.d.ts.map +1 -1
- package/dist/types/src/components/hooks/useBackgrounds.d.ts +1 -1
- package/dist/types/src/components/hooks/useBackgrounds.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +0 -1
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/components/shared/BackgroundsContainer/components/BackgroundVideo/index.d.ts.map +1 -1
- package/dist/types/src/components/shared/BackgroundsContainer/components/Backgrounds/index.d.ts.map +1 -1
- package/dist/types/src/components/shared/BackgroundsContainer/index.d.ts +255 -4
- package/dist/types/src/components/shared/BackgroundsContainer/index.d.ts.map +1 -1
- package/dist/types/src/components/shared/FallbackComponent/FallbackComponent.d.ts.map +1 -1
- package/dist/types/src/components/shared/GutterContainer/index.d.ts +8 -4
- package/dist/types/src/components/shared/GutterContainer/index.d.ts.map +1 -1
- package/dist/types/src/components/shared/grid-item.d.ts +17 -0
- package/dist/types/src/components/shared/grid-item.d.ts.map +1 -0
- package/dist/types/src/components/utils/responsive-style.d.ts +22 -1
- package/dist/types/src/components/utils/responsive-style.d.ts.map +1 -1
- package/dist/types/src/controls/style.d.ts +5 -65
- package/dist/types/src/controls/style.d.ts.map +1 -1
- package/dist/types/src/css/border-radius.d.ts +20 -0
- package/dist/types/src/css/border-radius.d.ts.map +1 -0
- package/dist/types/src/css/border.d.ts +31 -0
- package/dist/types/src/css/border.d.ts.map +1 -0
- package/dist/types/src/css/length-percentage.d.ts +10 -0
- package/dist/types/src/css/length-percentage.d.ts.map +1 -0
- package/dist/types/src/css/length.d.ts +14 -0
- package/dist/types/src/css/length.d.ts.map +1 -0
- package/dist/types/src/css/margin.d.ts +20 -0
- package/dist/types/src/css/margin.d.ts.map +1 -0
- package/dist/types/src/css/padding.d.ts +20 -0
- package/dist/types/src/css/padding.d.ts.map +1 -0
- package/dist/types/src/next/document.d.ts.map +1 -1
- package/dist/types/src/prop-controllers/descriptors.d.ts +96 -33
- package/dist/types/src/prop-controllers/descriptors.d.ts.map +1 -1
- package/dist/types/src/runtimes/react/controls/style.d.ts.map +1 -1
- package/dist/types/src/runtimes/react/controls.d.ts +10 -2
- package/dist/types/src/runtimes/react/controls.d.ts.map +1 -1
- package/dist/types/src/runtimes/react/use-global-style.d.ts +3 -0
- package/dist/types/src/runtimes/react/use-global-style.d.ts.map +1 -0
- package/dist/useMediaQuery.es.js +1 -1
- package/package.json +2 -4
- package/dist/cssMediaRules.cjs.js +0 -210
- package/dist/cssMediaRules.cjs.js.map +0 -1
- package/dist/cssMediaRules.es.js +0 -201
- package/dist/cssMediaRules.es.js.map +0 -1
- package/dist/index.cjs4.js +0 -18
- package/dist/index.cjs4.js.map +0 -1
- package/dist/index.es4.js +0 -13
- package/dist/index.es4.js.map +0 -1
- package/dist/types/src/components/builtin/Form/components/Field/services/cssField.d.ts.map +0 -1
- package/dist/types/src/components/utils/cssMediaRules.d.ts +0 -69
- package/dist/types/src/components/utils/cssMediaRules.d.ts.map +0 -1
- package/dist/useBoxShadow.cjs.js +0 -78
- package/dist/useBoxShadow.cjs.js.map +0 -1
- package/dist/useBoxShadow.es.js +0 -77
- package/dist/useBoxShadow.es.js.map +0 -1
package/dist/index.cjs.js
CHANGED
|
@@ -35,7 +35,7 @@ var __publicField = (obj, key, value) => {
|
|
|
35
35
|
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
36
36
|
return value;
|
|
37
37
|
};
|
|
38
|
-
var
|
|
38
|
+
var _c;
|
|
39
39
|
var React = require("react");
|
|
40
40
|
var withSelector = require("use-sync-external-store/shim/with-selector");
|
|
41
41
|
var reactPage = require("./react-page.cjs.js");
|
|
@@ -48,10 +48,9 @@ var graphql = require("./graphql.cjs.js");
|
|
|
48
48
|
var slot = require("./slot.cjs.js");
|
|
49
49
|
var control = require("./control.cjs.js");
|
|
50
50
|
var jsxRuntime = require("react/jsx-runtime");
|
|
51
|
-
var
|
|
51
|
+
var css = require("@emotion/css");
|
|
52
52
|
var textInput = require("./text-input.cjs.js");
|
|
53
53
|
var combobox = require("./combobox.cjs.js");
|
|
54
|
-
var css = require("@emotion/css");
|
|
55
54
|
var ColorHelper = require("color");
|
|
56
55
|
var scrollIntoView = require("scroll-into-view-if-needed");
|
|
57
56
|
var boxModels = require("./box-models.cjs.js");
|
|
@@ -91,7 +90,6 @@ function _interopNamespace(e) {
|
|
|
91
90
|
}
|
|
92
91
|
var React__namespace = /* @__PURE__ */ _interopNamespace(React);
|
|
93
92
|
var dynamic__default = /* @__PURE__ */ _interopDefaultLegacy(dynamic);
|
|
94
|
-
var styled__default = /* @__PURE__ */ _interopDefaultLegacy(styled);
|
|
95
93
|
var ColorHelper__default = /* @__PURE__ */ _interopDefaultLegacy(ColorHelper);
|
|
96
94
|
var scrollIntoView__default = /* @__PURE__ */ _interopDefaultLegacy(scrollIntoView);
|
|
97
95
|
var parse__default = /* @__PURE__ */ _interopDefaultLegacy(parse);
|
|
@@ -320,7 +318,7 @@ const INTROSPECTION_QUERY = client.gql`
|
|
|
320
318
|
${TYPOGRAPHY_FRAGMENT}
|
|
321
319
|
`;
|
|
322
320
|
async function introspect(element, client2, store) {
|
|
323
|
-
var _a, _b,
|
|
321
|
+
var _a, _b, _c2;
|
|
324
322
|
const descriptors = reactPage.getPropControllerDescriptors(store.getState());
|
|
325
323
|
const swatchIds = /* @__PURE__ */ new Set();
|
|
326
324
|
const fileIds = /* @__PURE__ */ new Set();
|
|
@@ -392,7 +390,7 @@ async function introspect(element, client2, store) {
|
|
|
392
390
|
query: TYPOGRAPHIES_BY_ID,
|
|
393
391
|
variables: { ids: [...typographyIds] }
|
|
394
392
|
});
|
|
395
|
-
(
|
|
393
|
+
(_c2 = typographiesResult == null ? void 0 : typographiesResult.data) == null ? void 0 : _c2.typographies.forEach((typography) => {
|
|
396
394
|
typography == null ? void 0 : typography.style.forEach((style) => {
|
|
397
395
|
var _a2;
|
|
398
396
|
const swatchId = (_a2 = style.value.color) == null ? void 0 : _a2.swatchId;
|
|
@@ -963,34 +961,25 @@ if (originalUrl.searchParams.has(searchParamName)) {
|
|
|
963
961
|
}
|
|
964
962
|
class Document$1 extends NextDocument__default["default"] {
|
|
965
963
|
static async getInitialProps(ctx) {
|
|
966
|
-
const
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
dangerouslySetInnerHTML: {
|
|
986
|
-
__html: css$1
|
|
987
|
-
}
|
|
988
|
-
})]
|
|
989
|
-
})
|
|
990
|
-
});
|
|
991
|
-
} finally {
|
|
992
|
-
sheet.seal();
|
|
993
|
-
}
|
|
964
|
+
const initialProps = await NextDocument__default["default"].getInitialProps(ctx);
|
|
965
|
+
slate.KeyUtils.resetGenerator();
|
|
966
|
+
const {
|
|
967
|
+
extractCritical
|
|
968
|
+
} = createEmotionServer__default["default"](css.cache);
|
|
969
|
+
const {
|
|
970
|
+
ids,
|
|
971
|
+
css: css$1
|
|
972
|
+
} = extractCritical(initialProps.html);
|
|
973
|
+
return __spreadProps(__spreadValues({}, initialProps), {
|
|
974
|
+
styles: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
975
|
+
children: [initialProps.styles, /* @__PURE__ */ jsxRuntime.jsx("style", {
|
|
976
|
+
"data-emotion": `css ${ids.join(" ")}`,
|
|
977
|
+
dangerouslySetInnerHTML: {
|
|
978
|
+
__html: css$1
|
|
979
|
+
}
|
|
980
|
+
})]
|
|
981
|
+
})
|
|
982
|
+
});
|
|
994
983
|
}
|
|
995
984
|
render() {
|
|
996
985
|
const {
|
|
@@ -1007,7 +996,7 @@ class Document$1 extends NextDocument__default["default"] {
|
|
|
1007
996
|
});
|
|
1008
997
|
}
|
|
1009
998
|
}
|
|
1010
|
-
const version = "0.
|
|
999
|
+
const version = "0.3.1";
|
|
1011
1000
|
function isErrorWithMessage(error) {
|
|
1012
1001
|
return typeof error === "object" && error !== null && "message" in error && typeof error.message === "string";
|
|
1013
1002
|
}
|
|
@@ -1197,14 +1186,14 @@ async function getStaticPaths() {
|
|
|
1197
1186
|
}
|
|
1198
1187
|
const REVALIDATE_SECONDS = 1;
|
|
1199
1188
|
async function getStaticProps(ctx) {
|
|
1200
|
-
var _a, _b,
|
|
1189
|
+
var _a, _b, _c2;
|
|
1201
1190
|
deprecationWarning("getStaticProps");
|
|
1202
1191
|
const makeswift = new Makeswift(getApiKey(), {
|
|
1203
1192
|
apiOrigin: getApiOrigin()
|
|
1204
1193
|
});
|
|
1205
1194
|
const path = "/" + ((_b = (_a = ctx.params) == null ? void 0 : _a.path) != null ? _b : []).join("/");
|
|
1206
1195
|
const snapshot = await makeswift.getPageSnapshot(path, {
|
|
1207
|
-
preview: ((
|
|
1196
|
+
preview: ((_c2 = ctx.previewData) == null ? void 0 : _c2.makeswift) === true
|
|
1208
1197
|
});
|
|
1209
1198
|
if (snapshot == null)
|
|
1210
1199
|
return {
|
|
@@ -1357,7 +1346,7 @@ function registerComponent$c(runtime) {
|
|
|
1357
1346
|
props: {
|
|
1358
1347
|
id: slot.ElementID(),
|
|
1359
1348
|
backgrounds: slot.Backgrounds(),
|
|
1360
|
-
width: slot.Width(),
|
|
1349
|
+
width: slot.Width({ format: slot.Width.Format.ClassName }),
|
|
1361
1350
|
height: slot.ResponsiveIconRadioGroup({
|
|
1362
1351
|
label: "Height",
|
|
1363
1352
|
options: [
|
|
@@ -1380,8 +1369,9 @@ function registerComponent$c(runtime) {
|
|
|
1380
1369
|
],
|
|
1381
1370
|
defaultValue: "flex-start"
|
|
1382
1371
|
}),
|
|
1383
|
-
margin: slot.Margin(),
|
|
1372
|
+
margin: slot.Margin({ format: slot.Margin.Format.ClassName }),
|
|
1384
1373
|
padding: slot.Padding({
|
|
1374
|
+
format: slot.Padding.Format.ClassName,
|
|
1385
1375
|
preset: [
|
|
1386
1376
|
{
|
|
1387
1377
|
deviceId: "desktop",
|
|
@@ -1394,9 +1384,9 @@ function registerComponent$c(runtime) {
|
|
|
1394
1384
|
}
|
|
1395
1385
|
]
|
|
1396
1386
|
}),
|
|
1397
|
-
border: slot.Border(),
|
|
1398
|
-
borderRadius: slot.BorderRadius(),
|
|
1399
|
-
boxShadow: slot.Shadows(),
|
|
1387
|
+
border: slot.Border({ format: slot.Border.Format.ClassName }),
|
|
1388
|
+
borderRadius: slot.BorderRadius({ format: slot.BorderRadius.Format.ClassName }),
|
|
1389
|
+
boxShadow: slot.Shadows({ format: slot.Shadows.Format.ClassName }),
|
|
1400
1390
|
rowGap: slot.GapY((props) => ({
|
|
1401
1391
|
hidden: props.children == null
|
|
1402
1392
|
})),
|
|
@@ -1545,7 +1535,7 @@ function registerComponent$b(runtime) {
|
|
|
1545
1535
|
}),
|
|
1546
1536
|
textStyle: slot.TextStyle(),
|
|
1547
1537
|
width: slot.Width(),
|
|
1548
|
-
margin: slot.Margin()
|
|
1538
|
+
margin: slot.Margin({ format: slot.Margin.Format.ClassName })
|
|
1549
1539
|
}
|
|
1550
1540
|
});
|
|
1551
1541
|
}
|
|
@@ -1565,8 +1555,11 @@ function registerComponent$a(runtime) {
|
|
|
1565
1555
|
{ key: uuid__default["default"](), props: {} }
|
|
1566
1556
|
]
|
|
1567
1557
|
}),
|
|
1568
|
-
width: slot.Width({
|
|
1569
|
-
|
|
1558
|
+
width: slot.Width({
|
|
1559
|
+
format: slot.Width.Format.ClassName,
|
|
1560
|
+
defaultValue: { value: 400, unit: "px" }
|
|
1561
|
+
}),
|
|
1562
|
+
margin: slot.Margin({ format: slot.Margin.Format.ClassName }),
|
|
1570
1563
|
pageSize: slot.ResponsiveNumber((props) => {
|
|
1571
1564
|
var _a;
|
|
1572
1565
|
const images = props.images;
|
|
@@ -1641,8 +1634,8 @@ function registerComponent$a(runtime) {
|
|
|
1641
1634
|
placeholder: "black",
|
|
1642
1635
|
hidden: props.showDots === false
|
|
1643
1636
|
})),
|
|
1644
|
-
slideBorder: slot.Border(),
|
|
1645
|
-
slideBorderRadius: slot.BorderRadius()
|
|
1637
|
+
slideBorder: slot.Border({ format: slot.Border.Format.ClassName }),
|
|
1638
|
+
slideBorderRadius: slot.BorderRadius({ format: slot.BorderRadius.Format.ClassName })
|
|
1646
1639
|
}
|
|
1647
1640
|
});
|
|
1648
1641
|
}
|
|
@@ -1717,8 +1710,11 @@ function registerComponent$9(runtime) {
|
|
|
1717
1710
|
label: "Label color",
|
|
1718
1711
|
placeholder: "black"
|
|
1719
1712
|
}),
|
|
1720
|
-
width: slot.Width({
|
|
1721
|
-
|
|
1713
|
+
width: slot.Width({
|
|
1714
|
+
format: slot.Width.Format.ClassName,
|
|
1715
|
+
defaultValue: { value: 560, unit: "px" }
|
|
1716
|
+
}),
|
|
1717
|
+
margin: slot.Margin({ format: slot.Margin.Format.ClassName }),
|
|
1722
1718
|
daysLabel: slot.TextInput({ label: "Days label", placeholder: "Days" }),
|
|
1723
1719
|
hoursLabel: slot.TextInput({ label: "Hours label", placeholder: "Hours" }),
|
|
1724
1720
|
minutesLabel: slot.TextInput({
|
|
@@ -1758,8 +1754,11 @@ function registerComponent$8(runtime) {
|
|
|
1758
1754
|
options: [{ value: "px", label: "Pixels", icon: "Px16" }]
|
|
1759
1755
|
}),
|
|
1760
1756
|
color: slot.ResponsiveColor({ placeholder: "black" }),
|
|
1761
|
-
width: slot.Width({
|
|
1762
|
-
|
|
1757
|
+
width: slot.Width({
|
|
1758
|
+
format: slot.Width.Format.ClassName,
|
|
1759
|
+
defaultValue: { value: 100, unit: "%" }
|
|
1760
|
+
}),
|
|
1761
|
+
margin: slot.Margin({ format: slot.Margin.Format.ClassName })
|
|
1763
1762
|
}
|
|
1764
1763
|
});
|
|
1765
1764
|
}
|
|
@@ -1773,8 +1772,8 @@ function registerComponent$7(runtime) {
|
|
|
1773
1772
|
props: {
|
|
1774
1773
|
id: slot.ElementID(),
|
|
1775
1774
|
html: slot.TextArea({ label: "Code", rows: 20 }),
|
|
1776
|
-
width: slot.Width({}),
|
|
1777
|
-
margin: slot.Margin()
|
|
1775
|
+
width: slot.Width({ format: slot.Width.Format.ClassName }),
|
|
1776
|
+
margin: slot.Margin({ format: slot.Margin.Format.ClassName })
|
|
1778
1777
|
}
|
|
1779
1778
|
});
|
|
1780
1779
|
}
|
|
@@ -1913,9 +1912,10 @@ function registerComponent$6(runtime) {
|
|
|
1913
1912
|
})),
|
|
1914
1913
|
width: slot.Width({
|
|
1915
1914
|
preset: [{ deviceId: "desktop", value: { value: 550, unit: "px" } }],
|
|
1916
|
-
defaultValue: { value: 100, unit: "%" }
|
|
1915
|
+
defaultValue: { value: 100, unit: "%" },
|
|
1916
|
+
format: slot.Width.Format.ClassName
|
|
1917
1917
|
}),
|
|
1918
|
-
margin: slot.Margin()
|
|
1918
|
+
margin: slot.Margin({ format: slot.Margin.Format.ClassName })
|
|
1919
1919
|
}
|
|
1920
1920
|
});
|
|
1921
1921
|
}
|
|
@@ -1931,11 +1931,11 @@ function registerComponent$5(runtime) {
|
|
|
1931
1931
|
altText: slot.TextInput({ label: "Alt text" }),
|
|
1932
1932
|
link: slot.Link({ label: "On click" }),
|
|
1933
1933
|
width: slot.Width(),
|
|
1934
|
-
margin: slot.Margin(),
|
|
1935
|
-
padding: slot.Padding(),
|
|
1936
|
-
border: slot.Border(),
|
|
1937
|
-
borderRadius: slot.BorderRadius(),
|
|
1938
|
-
boxShadow: slot.Shadows(),
|
|
1934
|
+
margin: slot.Margin({ format: slot.Margin.Format.ClassName }),
|
|
1935
|
+
padding: slot.Padding({ format: slot.Padding.Format.ClassName }),
|
|
1936
|
+
border: slot.Border({ format: slot.Border.Format.ClassName }),
|
|
1937
|
+
borderRadius: slot.BorderRadius({ format: slot.BorderRadius.Format.ClassName }),
|
|
1938
|
+
boxShadow: slot.Shadows({ format: slot.Shadows.Format.ClassName }),
|
|
1939
1939
|
opacity: slot.ResponsiveOpacity()
|
|
1940
1940
|
}
|
|
1941
1941
|
});
|
|
@@ -2029,8 +2029,11 @@ function registerComponent$4(runtime) {
|
|
|
2029
2029
|
hidden
|
|
2030
2030
|
};
|
|
2031
2031
|
}),
|
|
2032
|
-
width: slot.Width({
|
|
2033
|
-
|
|
2032
|
+
width: slot.Width({
|
|
2033
|
+
format: slot.Width.Format.ClassName,
|
|
2034
|
+
defaultValue: { value: 100, unit: "%" }
|
|
2035
|
+
}),
|
|
2036
|
+
margin: slot.Margin({ format: slot.Margin.Format.ClassName })
|
|
2034
2037
|
}
|
|
2035
2038
|
});
|
|
2036
2039
|
}
|
|
@@ -2153,8 +2156,12 @@ function registerComponent$2(runtime) {
|
|
|
2153
2156
|
step: 1,
|
|
2154
2157
|
defaultValue: { value: 0, unit: "px" }
|
|
2155
2158
|
}),
|
|
2156
|
-
width: slot.Width({
|
|
2159
|
+
width: slot.Width({
|
|
2160
|
+
format: slot.Width.Format.ClassName,
|
|
2161
|
+
defaultValue: { value: 100, unit: "%" }
|
|
2162
|
+
}),
|
|
2157
2163
|
margin: slot.Margin({
|
|
2164
|
+
format: slot.Margin.Format.ClassName,
|
|
2158
2165
|
preset: [
|
|
2159
2166
|
{
|
|
2160
2167
|
deviceId: "desktop",
|
|
@@ -2222,10 +2229,12 @@ function registerComponent$1(runtime) {
|
|
|
2222
2229
|
}
|
|
2223
2230
|
})),
|
|
2224
2231
|
width: slot.Width({
|
|
2232
|
+
format: slot.Width.Format.ClassName,
|
|
2225
2233
|
preset: [{ deviceId: "desktop", value: { value: 700, unit: "px" } }],
|
|
2226
2234
|
defaultValue: { value: 100, unit: "%" }
|
|
2227
2235
|
}),
|
|
2228
2236
|
margin: slot.Margin({
|
|
2237
|
+
format: slot.Margin.Format.ClassName,
|
|
2229
2238
|
preset: [
|
|
2230
2239
|
{
|
|
2231
2240
|
deviceId: "desktop",
|
|
@@ -2251,9 +2260,12 @@ function registerComponent(runtime) {
|
|
|
2251
2260
|
props: {
|
|
2252
2261
|
id: slot.ElementID(),
|
|
2253
2262
|
video: slot.Video({ preset: { controls: true } }),
|
|
2254
|
-
width: slot.Width({
|
|
2255
|
-
|
|
2256
|
-
|
|
2263
|
+
width: slot.Width({
|
|
2264
|
+
format: slot.Width.Format.ClassName,
|
|
2265
|
+
defaultValue: { value: 560, unit: "px" }
|
|
2266
|
+
}),
|
|
2267
|
+
margin: slot.Margin({ format: slot.Margin.Format.ClassName }),
|
|
2268
|
+
borderRadius: slot.BorderRadius({ format: slot.BorderRadius.Format.ClassName })
|
|
2257
2269
|
}
|
|
2258
2270
|
});
|
|
2259
2271
|
}
|
|
@@ -2288,149 +2300,6 @@ function registerBuiltinComponents(runtime) {
|
|
|
2288
2300
|
unregisterVideoComponent();
|
|
2289
2301
|
};
|
|
2290
2302
|
}
|
|
2291
|
-
var _path;
|
|
2292
|
-
function _extends() {
|
|
2293
|
-
_extends = Object.assign || function(target) {
|
|
2294
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
2295
|
-
var source = arguments[i];
|
|
2296
|
-
for (var key in source) {
|
|
2297
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
2298
|
-
target[key] = source[key];
|
|
2299
|
-
}
|
|
2300
|
-
}
|
|
2301
|
-
}
|
|
2302
|
-
return target;
|
|
2303
|
-
};
|
|
2304
|
-
return _extends.apply(this, arguments);
|
|
2305
|
-
}
|
|
2306
|
-
var SvgWarning20 = function SvgWarning202(props) {
|
|
2307
|
-
return /* @__PURE__ */ React__namespace.createElement("svg", _extends({
|
|
2308
|
-
width: 20,
|
|
2309
|
-
height: 20,
|
|
2310
|
-
viewBox: "0 0 20 20",
|
|
2311
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
2312
|
-
}, props), _path || (_path = /* @__PURE__ */ React__namespace.createElement("path", {
|
|
2313
|
-
fillRule: "evenodd",
|
|
2314
|
-
clipRule: "evenodd",
|
|
2315
|
-
d: "M2.89864 18H17.1014C18.4183 18 19.2633 16.6003 18.65 15.4349L11.5486 1.94236C10.8925 0.69577 9.10749 0.695766 8.45139 1.94236L1.35003 15.4349C0.736692 16.6003 1.58174 18 2.89864 18ZM9 6C9 5.44772 9.44771 5 10 5C10.5523 5 11 5.44772 11 6V11C11 11.5523 10.5523 12 10 12C9.44771 12 9 11.5523 9 11V6ZM11.25 14.75C11.25 15.4404 10.6904 16 10 16C9.30964 16 8.75 15.4404 8.75 14.75C8.75 14.0596 9.30964 13.5 10 13.5C10.6904 13.5 11.25 14.0596 11.25 14.75Z"
|
|
2316
|
-
})));
|
|
2317
|
-
};
|
|
2318
|
-
const ErrorDiv = styled__default["default"]("div")`
|
|
2319
|
-
width: 100%;
|
|
2320
|
-
height: 54px;
|
|
2321
|
-
background-color: #fcedf2;
|
|
2322
|
-
border-radius: 6px;
|
|
2323
|
-
padding: 16px;
|
|
2324
|
-
display: flex;
|
|
2325
|
-
align-items: center;
|
|
2326
|
-
gap: 8px;
|
|
2327
|
-
color: #c73e6d;
|
|
2328
|
-
fill: currentColor;
|
|
2329
|
-
font-family: Heebo, sans-serif;
|
|
2330
|
-
font-size: 16px;
|
|
2331
|
-
`;
|
|
2332
|
-
const FallbackComponent = React.forwardRef(function FallbackComponent2({
|
|
2333
|
-
text
|
|
2334
|
-
}, ref) {
|
|
2335
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(ErrorDiv, {
|
|
2336
|
-
ref,
|
|
2337
|
-
children: [/* @__PURE__ */ jsxRuntime.jsx(SvgWarning20, {}), /* @__PURE__ */ jsxRuntime.jsx("span", {
|
|
2338
|
-
children: text
|
|
2339
|
-
})]
|
|
2340
|
-
});
|
|
2341
|
-
});
|
|
2342
|
-
function isNonNullable(value) {
|
|
2343
|
-
return value != null;
|
|
2344
|
-
}
|
|
2345
|
-
function mapSideColor(swatches, _c) {
|
|
2346
|
-
var _d = _c, { color } = _d, restOfSide = __objRest(_d, ["color"]);
|
|
2347
|
-
return __spreadProps(__spreadValues({}, restOfSide), {
|
|
2348
|
-
color: color && {
|
|
2349
|
-
alpha: color.alpha,
|
|
2350
|
-
swatch: swatches.find((s) => s && s.id === color.swatchId)
|
|
2351
|
-
}
|
|
2352
|
-
});
|
|
2353
|
-
}
|
|
2354
|
-
function useBorder(value) {
|
|
2355
|
-
const swatchIds = value == null ? [] : [
|
|
2356
|
-
...Array.from(new Set(value.map(({ value: { borderTop, borderLeft, borderBottom, borderRight } }) => [
|
|
2357
|
-
borderTop && borderTop.color && borderTop.color.swatchId,
|
|
2358
|
-
borderBottom && borderBottom.color && borderBottom.color.swatchId,
|
|
2359
|
-
borderLeft && borderLeft.color && borderLeft.color.swatchId,
|
|
2360
|
-
borderRight && borderRight.color && borderRight.color.swatchId
|
|
2361
|
-
]).reduce((a, b) => a.concat(b)).filter(isNonNullable)))
|
|
2362
|
-
];
|
|
2363
|
-
const skip = value == null || swatchIds.length === 0;
|
|
2364
|
-
const { error, data = {} } = useQuery(SWATCHES_BY_ID, { skip, variables: { ids: swatchIds } });
|
|
2365
|
-
if (value == null || error != null)
|
|
2366
|
-
return null;
|
|
2367
|
-
const { swatches = [] } = data;
|
|
2368
|
-
return value.map((_a) => {
|
|
2369
|
-
var _b = _a, { value: { borderTop, borderBottom, borderLeft, borderRight } } = _b, rest = __objRest(_b, ["value"]);
|
|
2370
|
-
return __spreadProps(__spreadValues({}, rest), {
|
|
2371
|
-
value: {
|
|
2372
|
-
borderTop: borderTop && mapSideColor(swatches, borderTop),
|
|
2373
|
-
borderBottom: borderBottom && mapSideColor(swatches, borderBottom),
|
|
2374
|
-
borderLeft: borderLeft && mapSideColor(swatches, borderLeft),
|
|
2375
|
-
borderRight: borderRight && mapSideColor(swatches, borderRight)
|
|
2376
|
-
}
|
|
2377
|
-
});
|
|
2378
|
-
});
|
|
2379
|
-
}
|
|
2380
|
-
function useResponsiveColor(color) {
|
|
2381
|
-
const swatchIds = color == null ? [] : [...Array.from(new Set(color.map(({ value: v }) => v && v.swatchId).filter(isNonNullable)))];
|
|
2382
|
-
const skip = swatchIds.length === 0;
|
|
2383
|
-
const { error, data = {} } = useQuery(SWATCHES_BY_ID, { skip, variables: { ids: swatchIds } });
|
|
2384
|
-
if (color == null || error != null)
|
|
2385
|
-
return null;
|
|
2386
|
-
const { swatches = [] } = data;
|
|
2387
|
-
return color.map((_a) => {
|
|
2388
|
-
var _b = _a, { value: v } = _b, rest = __objRest(_b, ["value"]);
|
|
2389
|
-
const { swatchId, alpha } = v;
|
|
2390
|
-
const swatch = swatches.find((s) => s && s.id === swatchId);
|
|
2391
|
-
return swatch == null ? null : __spreadProps(__spreadValues({}, rest), { value: { swatch, alpha } });
|
|
2392
|
-
}).filter(isNonNullable);
|
|
2393
|
-
}
|
|
2394
|
-
function useFile(fileId) {
|
|
2395
|
-
const { error, data = {} } = useQuery(FILE_BY_ID, {
|
|
2396
|
-
skip: fileId == null,
|
|
2397
|
-
variables: { id: fileId }
|
|
2398
|
-
});
|
|
2399
|
-
if (fileId == null || error != null)
|
|
2400
|
-
return null;
|
|
2401
|
-
return data.file;
|
|
2402
|
-
}
|
|
2403
|
-
const isSSR = typeof window === "undefined" || /ServerSideRendering/.test(window.navigator && window.navigator.userAgent);
|
|
2404
|
-
const useIsomorphicLayoutEffect = isSSR ? React.useEffect : React.useLayoutEffect;
|
|
2405
|
-
function usePage(pageId) {
|
|
2406
|
-
const { error, data = {} } = useQuery(PAGE_PATHNAMES_BY_ID, {
|
|
2407
|
-
skip: pageId == null,
|
|
2408
|
-
variables: { ids: [pageId] }
|
|
2409
|
-
});
|
|
2410
|
-
if (pageId == null || error != null)
|
|
2411
|
-
return null;
|
|
2412
|
-
const { pagePathnamesById: [page] = [] } = data;
|
|
2413
|
-
return page;
|
|
2414
|
-
}
|
|
2415
|
-
function responsiveStyle(responsiveValues, join$1, strategy) {
|
|
2416
|
-
return join(responsiveValues, join$1, strategy).reduce((acc, { deviceId, value }) => {
|
|
2417
|
-
const device = getDevice(deviceId);
|
|
2418
|
-
const mediaQuery = getDeviceMediaQuery(device);
|
|
2419
|
-
return __spreadProps(__spreadValues({}, acc), {
|
|
2420
|
-
[mediaQuery]: __spreadValues(__spreadValues({}, acc[mediaQuery]), value)
|
|
2421
|
-
});
|
|
2422
|
-
}, {});
|
|
2423
|
-
}
|
|
2424
|
-
function responsiveWidth(widthData, defaultValue = "100%") {
|
|
2425
|
-
return __spreadValues({
|
|
2426
|
-
maxWidth: "100%"
|
|
2427
|
-
}, responsiveStyle([widthData], ([width = defaultValue]) => ({
|
|
2428
|
-
width: typeof width === "object" ? `${width.value}${width.unit}` : width
|
|
2429
|
-
})));
|
|
2430
|
-
}
|
|
2431
|
-
function colorToString(color) {
|
|
2432
|
-
return color && color.swatch ? `hsla(${color.swatch.hue},${color.swatch.saturation}%,${color.swatch.lightness}%,${color.alpha})` : "";
|
|
2433
|
-
}
|
|
2434
2303
|
function murmur2(str) {
|
|
2435
2304
|
var h = 0;
|
|
2436
2305
|
var k, i = 0, len = str.length;
|
|
@@ -2691,7 +2560,7 @@ var insertStyles = function insertStyles2(cache, serialized, isStringTag) {
|
|
|
2691
2560
|
};
|
|
2692
2561
|
const isServer = typeof window === "undefined";
|
|
2693
2562
|
const useInsertionEffectSpecifier = "useInsertionEffect";
|
|
2694
|
-
const useInsertionEffect = (
|
|
2563
|
+
const useInsertionEffect = (_c = React__namespace[useInsertionEffectSpecifier]) != null ? _c : React__namespace.useLayoutEffect;
|
|
2695
2564
|
function useStyle(style) {
|
|
2696
2565
|
const serialized = serializeStyles([style], css.cache.registered);
|
|
2697
2566
|
registerStyles(css.cache, serialized, false);
|
|
@@ -2702,6 +2571,391 @@ function useStyle(style) {
|
|
|
2702
2571
|
insertStyles(css.cache, serialized, false);
|
|
2703
2572
|
return `${css.cache.key}-${serialized.name}`;
|
|
2704
2573
|
}
|
|
2574
|
+
var _path;
|
|
2575
|
+
function _extends() {
|
|
2576
|
+
_extends = Object.assign || function(target) {
|
|
2577
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
2578
|
+
var source = arguments[i];
|
|
2579
|
+
for (var key in source) {
|
|
2580
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
2581
|
+
target[key] = source[key];
|
|
2582
|
+
}
|
|
2583
|
+
}
|
|
2584
|
+
}
|
|
2585
|
+
return target;
|
|
2586
|
+
};
|
|
2587
|
+
return _extends.apply(this, arguments);
|
|
2588
|
+
}
|
|
2589
|
+
var SvgWarning20 = function SvgWarning202(props) {
|
|
2590
|
+
return /* @__PURE__ */ React__namespace.createElement("svg", _extends({
|
|
2591
|
+
width: 20,
|
|
2592
|
+
height: 20,
|
|
2593
|
+
viewBox: "0 0 20 20",
|
|
2594
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
2595
|
+
}, props), _path || (_path = /* @__PURE__ */ React__namespace.createElement("path", {
|
|
2596
|
+
fillRule: "evenodd",
|
|
2597
|
+
clipRule: "evenodd",
|
|
2598
|
+
d: "M2.89864 18H17.1014C18.4183 18 19.2633 16.6003 18.65 15.4349L11.5486 1.94236C10.8925 0.69577 9.10749 0.695766 8.45139 1.94236L1.35003 15.4349C0.736692 16.6003 1.58174 18 2.89864 18ZM9 6C9 5.44772 9.44771 5 10 5C10.5523 5 11 5.44772 11 6V11C11 11.5523 10.5523 12 10 12C9.44771 12 9 11.5523 9 11V6ZM11.25 14.75C11.25 15.4404 10.6904 16 10 16C9.30964 16 8.75 15.4404 8.75 14.75C8.75 14.0596 9.30964 13.5 10 13.5C10.6904 13.5 11.25 14.0596 11.25 14.75Z"
|
|
2599
|
+
})));
|
|
2600
|
+
};
|
|
2601
|
+
const FallbackComponent = React.forwardRef(function FallbackComponent2({
|
|
2602
|
+
text
|
|
2603
|
+
}, ref) {
|
|
2604
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
2605
|
+
ref,
|
|
2606
|
+
className: useStyle({
|
|
2607
|
+
width: "100%",
|
|
2608
|
+
height: 54,
|
|
2609
|
+
backgroundColor: "#fcedf2",
|
|
2610
|
+
borderRadius: 6,
|
|
2611
|
+
padding: 16,
|
|
2612
|
+
display: "flex",
|
|
2613
|
+
alignItems: "center",
|
|
2614
|
+
gap: 8,
|
|
2615
|
+
color: "#c73e6d",
|
|
2616
|
+
fill: "currentColor",
|
|
2617
|
+
fontFamily: "Heebo, sans-serif",
|
|
2618
|
+
fontSize: 16
|
|
2619
|
+
}),
|
|
2620
|
+
children: [/* @__PURE__ */ jsxRuntime.jsx(SvgWarning20, {}), /* @__PURE__ */ jsxRuntime.jsx("span", {
|
|
2621
|
+
children: text
|
|
2622
|
+
})]
|
|
2623
|
+
});
|
|
2624
|
+
});
|
|
2625
|
+
function isNonNullable(value) {
|
|
2626
|
+
return value != null;
|
|
2627
|
+
}
|
|
2628
|
+
function mapSideColor(swatches, _d) {
|
|
2629
|
+
var _e = _d, { color } = _e, restOfSide = __objRest(_e, ["color"]);
|
|
2630
|
+
return __spreadProps(__spreadValues({}, restOfSide), {
|
|
2631
|
+
color: color && {
|
|
2632
|
+
alpha: color.alpha,
|
|
2633
|
+
swatch: swatches.find((s) => s && s.id === color.swatchId)
|
|
2634
|
+
}
|
|
2635
|
+
});
|
|
2636
|
+
}
|
|
2637
|
+
function useBorder(value) {
|
|
2638
|
+
const swatchIds = value == null ? [] : [
|
|
2639
|
+
...Array.from(new Set(value.map(({ value: { borderTop, borderLeft, borderBottom, borderRight } }) => [
|
|
2640
|
+
borderTop && borderTop.color && borderTop.color.swatchId,
|
|
2641
|
+
borderBottom && borderBottom.color && borderBottom.color.swatchId,
|
|
2642
|
+
borderLeft && borderLeft.color && borderLeft.color.swatchId,
|
|
2643
|
+
borderRight && borderRight.color && borderRight.color.swatchId
|
|
2644
|
+
]).reduce((a, b) => a.concat(b)).filter(isNonNullable)))
|
|
2645
|
+
];
|
|
2646
|
+
const skip = value == null || swatchIds.length === 0;
|
|
2647
|
+
const { error, data = {} } = useQuery(SWATCHES_BY_ID, { skip, variables: { ids: swatchIds } });
|
|
2648
|
+
if (value == null || error != null)
|
|
2649
|
+
return null;
|
|
2650
|
+
const { swatches = [] } = data;
|
|
2651
|
+
return value.map((_a) => {
|
|
2652
|
+
var _b = _a, { value: { borderTop, borderBottom, borderLeft, borderRight } } = _b, rest = __objRest(_b, ["value"]);
|
|
2653
|
+
return __spreadProps(__spreadValues({}, rest), {
|
|
2654
|
+
value: {
|
|
2655
|
+
borderTop: borderTop && mapSideColor(swatches, borderTop),
|
|
2656
|
+
borderBottom: borderBottom && mapSideColor(swatches, borderBottom),
|
|
2657
|
+
borderLeft: borderLeft && mapSideColor(swatches, borderLeft),
|
|
2658
|
+
borderRight: borderRight && mapSideColor(swatches, borderRight)
|
|
2659
|
+
}
|
|
2660
|
+
});
|
|
2661
|
+
});
|
|
2662
|
+
}
|
|
2663
|
+
const ShadowDefaultValue = {
|
|
2664
|
+
inset: false,
|
|
2665
|
+
offsetX: 0,
|
|
2666
|
+
offsetY: 2,
|
|
2667
|
+
blurRadius: 4,
|
|
2668
|
+
spreadRadius: 0,
|
|
2669
|
+
color: null
|
|
2670
|
+
};
|
|
2671
|
+
function useBoxShadow(value) {
|
|
2672
|
+
const swatchIds = value == null ? [] : [
|
|
2673
|
+
...Array.from(new Set(value.map(({ value: shadows }) => shadows.map(({ payload: { color } }) => color && color.swatchId)).reduce((a, b) => a.concat(b), []).filter(isNonNullable)))
|
|
2674
|
+
];
|
|
2675
|
+
const skip = value == null || swatchIds.length === 0;
|
|
2676
|
+
const { error, data = {} } = useQuery(SWATCHES_BY_ID, { skip, variables: { ids: swatchIds } });
|
|
2677
|
+
if (value == null || error != null)
|
|
2678
|
+
return null;
|
|
2679
|
+
const { swatches = [] } = data;
|
|
2680
|
+
return value.map((_a) => {
|
|
2681
|
+
var _b = _a, { value: shadows } = _b, restOfValue = __objRest(_b, ["value"]);
|
|
2682
|
+
return __spreadProps(__spreadValues({}, restOfValue), {
|
|
2683
|
+
value: shadows.map((_a2) => {
|
|
2684
|
+
var _b2 = _a2, {
|
|
2685
|
+
payload: { color, inset, offsetX, offsetY, blurRadius, spreadRadius }
|
|
2686
|
+
} = _b2, restOfShadow = __objRest(_b2, [
|
|
2687
|
+
"payload"
|
|
2688
|
+
]);
|
|
2689
|
+
return __spreadProps(__spreadValues({}, restOfShadow), {
|
|
2690
|
+
payload: {
|
|
2691
|
+
color: color != null ? {
|
|
2692
|
+
swatch: swatches.find((s) => s && s.id === color.swatchId),
|
|
2693
|
+
alpha: color.alpha
|
|
2694
|
+
} : null,
|
|
2695
|
+
inset: inset != null ? inset : ShadowDefaultValue.inset,
|
|
2696
|
+
offsetX: offsetX != null ? offsetX : ShadowDefaultValue.offsetX,
|
|
2697
|
+
offsetY: offsetY != null ? offsetY : ShadowDefaultValue.offsetY,
|
|
2698
|
+
blurRadius: blurRadius != null ? blurRadius : ShadowDefaultValue.blurRadius,
|
|
2699
|
+
spreadRadius: spreadRadius != null ? spreadRadius : ShadowDefaultValue.spreadRadius
|
|
2700
|
+
}
|
|
2701
|
+
});
|
|
2702
|
+
})
|
|
2703
|
+
});
|
|
2704
|
+
});
|
|
2705
|
+
}
|
|
2706
|
+
function useResponsiveColor(color) {
|
|
2707
|
+
const swatchIds = color == null ? [] : [...Array.from(new Set(color.map(({ value: v }) => v && v.swatchId).filter(isNonNullable)))];
|
|
2708
|
+
const skip = swatchIds.length === 0;
|
|
2709
|
+
const { error, data = {} } = useQuery(SWATCHES_BY_ID, { skip, variables: { ids: swatchIds } });
|
|
2710
|
+
if (color == null || error != null)
|
|
2711
|
+
return null;
|
|
2712
|
+
const { swatches = [] } = data;
|
|
2713
|
+
return color.map((_a) => {
|
|
2714
|
+
var _b = _a, { value: v } = _b, rest = __objRest(_b, ["value"]);
|
|
2715
|
+
const { swatchId, alpha } = v;
|
|
2716
|
+
const swatch = swatches.find((s) => s && s.id === swatchId);
|
|
2717
|
+
return swatch == null ? null : __spreadProps(__spreadValues({}, rest), { value: { swatch, alpha } });
|
|
2718
|
+
}).filter(isNonNullable);
|
|
2719
|
+
}
|
|
2720
|
+
function useFile(fileId) {
|
|
2721
|
+
const { error, data = {} } = useQuery(FILE_BY_ID, {
|
|
2722
|
+
skip: fileId == null,
|
|
2723
|
+
variables: { id: fileId }
|
|
2724
|
+
});
|
|
2725
|
+
if (fileId == null || error != null)
|
|
2726
|
+
return null;
|
|
2727
|
+
return data.file;
|
|
2728
|
+
}
|
|
2729
|
+
const isSSR = typeof window === "undefined" || /ServerSideRendering/.test(window.navigator && window.navigator.userAgent);
|
|
2730
|
+
const useIsomorphicLayoutEffect = isSSR ? React.useEffect : React.useLayoutEffect;
|
|
2731
|
+
function usePage(pageId) {
|
|
2732
|
+
const { error, data = {} } = useQuery(PAGE_PATHNAMES_BY_ID, {
|
|
2733
|
+
skip: pageId == null,
|
|
2734
|
+
variables: { ids: [pageId] }
|
|
2735
|
+
});
|
|
2736
|
+
if (pageId == null || error != null)
|
|
2737
|
+
return null;
|
|
2738
|
+
const { pagePathnamesById: [page] = [] } = data;
|
|
2739
|
+
return page;
|
|
2740
|
+
}
|
|
2741
|
+
const getIndexes = (spans, index) => {
|
|
2742
|
+
const flattened = spans.reduce((a, s) => a.concat(s), []);
|
|
2743
|
+
if (index < 0 || index > flattened.length)
|
|
2744
|
+
throw new RangeError();
|
|
2745
|
+
let remainder = index;
|
|
2746
|
+
let rowIndex = 0;
|
|
2747
|
+
while (rowIndex < spans.length - 1 && remainder >= spans[rowIndex].length) {
|
|
2748
|
+
remainder -= spans[rowIndex].length;
|
|
2749
|
+
rowIndex += 1;
|
|
2750
|
+
}
|
|
2751
|
+
return [rowIndex, remainder];
|
|
2752
|
+
};
|
|
2753
|
+
function lengthDataToString(data) {
|
|
2754
|
+
if (typeof data === "object")
|
|
2755
|
+
return `${data.value}${data.unit}`;
|
|
2756
|
+
if (typeof data === "number")
|
|
2757
|
+
return `${data}px`;
|
|
2758
|
+
return data;
|
|
2759
|
+
}
|
|
2760
|
+
function paddingPropertyDataToStyle(data, defaultValue = {}) {
|
|
2761
|
+
var _a, _b, _c2, _d;
|
|
2762
|
+
const paddingTop = (_a = data.paddingTop) != null ? _a : defaultValue.paddingTop;
|
|
2763
|
+
const paddingRight = (_b = data.paddingRight) != null ? _b : defaultValue.paddingRight;
|
|
2764
|
+
const paddingBottom = (_c2 = data.paddingBottom) != null ? _c2 : defaultValue.paddingBottom;
|
|
2765
|
+
const paddingLeft = (_d = data.paddingLeft) != null ? _d : defaultValue.paddingLeft;
|
|
2766
|
+
const style = {};
|
|
2767
|
+
if (paddingTop)
|
|
2768
|
+
style.paddingTop = lengthDataToString(paddingTop);
|
|
2769
|
+
if (paddingRight)
|
|
2770
|
+
style.paddingRight = lengthDataToString(paddingRight);
|
|
2771
|
+
if (paddingBottom)
|
|
2772
|
+
style.paddingBottom = lengthDataToString(paddingBottom);
|
|
2773
|
+
if (paddingLeft)
|
|
2774
|
+
style.paddingLeft = lengthDataToString(paddingLeft);
|
|
2775
|
+
return style;
|
|
2776
|
+
}
|
|
2777
|
+
function marginPropertyDataToStyle(data, defaultValue = {}) {
|
|
2778
|
+
var _a, _b, _c2, _d;
|
|
2779
|
+
const marginTop = (_a = data.marginTop) != null ? _a : defaultValue.marginTop;
|
|
2780
|
+
const marginRight = (_b = data.marginRight) != null ? _b : defaultValue.marginRight;
|
|
2781
|
+
const marginBottom = (_c2 = data.marginBottom) != null ? _c2 : defaultValue.marginBottom;
|
|
2782
|
+
const marginLeft = (_d = data.marginLeft) != null ? _d : defaultValue.marginLeft;
|
|
2783
|
+
const style = {};
|
|
2784
|
+
if (marginTop)
|
|
2785
|
+
style.marginTop = lengthDataToString(marginTop);
|
|
2786
|
+
if (marginRight)
|
|
2787
|
+
style.marginRight = lengthDataToString(marginRight);
|
|
2788
|
+
if (marginBottom)
|
|
2789
|
+
style.marginBottom = lengthDataToString(marginBottom);
|
|
2790
|
+
if (marginLeft)
|
|
2791
|
+
style.marginLeft = lengthDataToString(marginLeft);
|
|
2792
|
+
return style;
|
|
2793
|
+
}
|
|
2794
|
+
function lengthPercentageDataToString(data) {
|
|
2795
|
+
if (typeof data === "object")
|
|
2796
|
+
return `${data.value}${data.unit}`;
|
|
2797
|
+
if (typeof data === "number")
|
|
2798
|
+
return `${data}px`;
|
|
2799
|
+
return data;
|
|
2800
|
+
}
|
|
2801
|
+
function borderRadiusPropertyDataToStyle(data, defaultValue = {}) {
|
|
2802
|
+
var _a, _b, _c2, _d;
|
|
2803
|
+
const borderTopLeftRadius = (_a = data.borderTopLeftRadius) != null ? _a : defaultValue.borderTopLeftRadius;
|
|
2804
|
+
const borderTopRightRadius = (_b = data.borderTopRightRadius) != null ? _b : defaultValue.borderTopRightRadius;
|
|
2805
|
+
const borderBottomRightRadius = (_c2 = data.borderBottomRightRadius) != null ? _c2 : defaultValue.borderBottomRightRadius;
|
|
2806
|
+
const borderBottomLeftRadius = (_d = data.borderBottomLeftRadius) != null ? _d : defaultValue.borderBottomLeftRadius;
|
|
2807
|
+
const style = {};
|
|
2808
|
+
if (borderTopLeftRadius) {
|
|
2809
|
+
style.borderTopLeftRadius = lengthPercentageDataToString(borderTopLeftRadius);
|
|
2810
|
+
}
|
|
2811
|
+
if (borderTopRightRadius) {
|
|
2812
|
+
style.borderTopRightRadius = lengthPercentageDataToString(borderTopRightRadius);
|
|
2813
|
+
}
|
|
2814
|
+
if (borderBottomRightRadius) {
|
|
2815
|
+
style.borderBottomRightRadius = lengthPercentageDataToString(borderBottomRightRadius);
|
|
2816
|
+
}
|
|
2817
|
+
if (borderBottomLeftRadius) {
|
|
2818
|
+
style.borderBottomLeftRadius = lengthPercentageDataToString(borderBottomLeftRadius);
|
|
2819
|
+
}
|
|
2820
|
+
return style;
|
|
2821
|
+
}
|
|
2822
|
+
function colorToString(color) {
|
|
2823
|
+
return color && color.swatch ? `hsla(${color.swatch.hue},${color.swatch.saturation}%,${color.swatch.lightness}%,${color.alpha})` : "";
|
|
2824
|
+
}
|
|
2825
|
+
function borderPropertyDataToStyle(data, defaultValue = {}) {
|
|
2826
|
+
var _a, _b, _c2, _d;
|
|
2827
|
+
const borderTop = (_a = data.borderTop) != null ? _a : defaultValue.borderTop;
|
|
2828
|
+
const borderRight = (_b = data.borderRight) != null ? _b : defaultValue.borderRight;
|
|
2829
|
+
const borderBottom = (_c2 = data.borderBottom) != null ? _c2 : defaultValue.borderBottom;
|
|
2830
|
+
const borderLeft = (_d = data.borderLeft) != null ? _d : defaultValue.borderLeft;
|
|
2831
|
+
const style = {};
|
|
2832
|
+
if (borderTop)
|
|
2833
|
+
style.borderTop = borderSideToString(borderTop);
|
|
2834
|
+
if (borderRight)
|
|
2835
|
+
style.borderRight = borderSideToString(borderRight);
|
|
2836
|
+
if (borderBottom)
|
|
2837
|
+
style.borderBottom = borderSideToString(borderBottom);
|
|
2838
|
+
if (borderLeft)
|
|
2839
|
+
style.borderLeft = borderSideToString(borderLeft);
|
|
2840
|
+
return style;
|
|
2841
|
+
}
|
|
2842
|
+
function borderSideToString(borderSide) {
|
|
2843
|
+
if (typeof borderSide === "string")
|
|
2844
|
+
return borderSide;
|
|
2845
|
+
if (typeof borderSide === "number")
|
|
2846
|
+
return `${borderSide}px`;
|
|
2847
|
+
const { width, color, style } = borderSide;
|
|
2848
|
+
return `${width != null ? width : 0}px ${style} ${color != null ? colorToString(color) : "black"}`;
|
|
2849
|
+
}
|
|
2850
|
+
function responsiveStyle(responsiveValues, join$1, strategy) {
|
|
2851
|
+
return join(responsiveValues, join$1, strategy).reduce((acc, { deviceId, value }) => {
|
|
2852
|
+
const device = getDevice(deviceId);
|
|
2853
|
+
const mediaQuery = getDeviceMediaQuery(device);
|
|
2854
|
+
return __spreadProps(__spreadValues({}, acc), {
|
|
2855
|
+
[mediaQuery]: __spreadValues(__spreadValues({}, acc[mediaQuery]), value)
|
|
2856
|
+
});
|
|
2857
|
+
}, {});
|
|
2858
|
+
}
|
|
2859
|
+
function responsiveWidth(widthData, defaultValue = "100%") {
|
|
2860
|
+
return __spreadValues({
|
|
2861
|
+
maxWidth: "100%"
|
|
2862
|
+
}, responsiveStyle([widthData], ([width = defaultValue]) => ({
|
|
2863
|
+
width: typeof width === "object" ? `${width.value}${width.unit}` : width
|
|
2864
|
+
})));
|
|
2865
|
+
}
|
|
2866
|
+
function responsivePadding(paddingData, defaultValue = {}) {
|
|
2867
|
+
return responsiveStyle([paddingData], ([padding = {}]) => paddingPropertyDataToStyle(padding, Object.assign({ paddingTop: 0, paddingRight: 0, paddingBottom: 0, paddingLeft: 0 }, defaultValue)));
|
|
2868
|
+
}
|
|
2869
|
+
function responsiveMargin(marginData, defaultValue = {}) {
|
|
2870
|
+
return responsiveStyle([marginData], ([margin = {}]) => marginPropertyDataToStyle(margin, Object.assign({ marginTop: 0, marginRight: "auto", marginBottom: 0, marginLeft: "auto" }, defaultValue)));
|
|
2871
|
+
}
|
|
2872
|
+
function responsiveBorderRadius(borderRadiusData, defaultValue = {}) {
|
|
2873
|
+
return responsiveStyle([borderRadiusData], ([borderRadius = {}]) => borderRadiusPropertyDataToStyle(borderRadius, Object.assign({
|
|
2874
|
+
borderTopLeftRadius: 0,
|
|
2875
|
+
borderTopRightRadius: 0,
|
|
2876
|
+
borderBottomRightRadius: 0,
|
|
2877
|
+
borderBottomLeftRadius: 0
|
|
2878
|
+
}, defaultValue)));
|
|
2879
|
+
}
|
|
2880
|
+
function responsiveBorder(borderData, defaultValue = {}) {
|
|
2881
|
+
return responsiveStyle([borderData], ([border = {}]) => borderPropertyDataToStyle(border, Object.assign({
|
|
2882
|
+
borderTop: "0px solid black",
|
|
2883
|
+
borderRight: "0px solid black",
|
|
2884
|
+
borderBottom: "0px solid black",
|
|
2885
|
+
borderLeft: "0px solid black"
|
|
2886
|
+
}, defaultValue)));
|
|
2887
|
+
}
|
|
2888
|
+
const floor = (d) => (v) => Math.floor(10 ** d * v) / 10 ** d;
|
|
2889
|
+
function responsiveGridItem(props) {
|
|
2890
|
+
return __spreadValues({
|
|
2891
|
+
display: "flex"
|
|
2892
|
+
}, responsiveStyle([props.grid, props.columnGap, props.rowGap], ([
|
|
2893
|
+
{ spans, count } = { spans: [[12]], count: 12 },
|
|
2894
|
+
columnGap = { value: 0, unit: "px" },
|
|
2895
|
+
rowGap = { value: 0, unit: "px" }
|
|
2896
|
+
]) => {
|
|
2897
|
+
const [rowIndex, columnIndex] = getIndexes(spans, props.index);
|
|
2898
|
+
const firstCol = columnIndex === 0;
|
|
2899
|
+
const lastCol = columnIndex === spans[rowIndex].length - 1;
|
|
2900
|
+
const span = spans[rowIndex][columnIndex];
|
|
2901
|
+
const fraction = floor(5)(span / count);
|
|
2902
|
+
const width = `${fraction} * (100% + ${columnGap.value}${columnGap.unit})`;
|
|
2903
|
+
const excessWidth = `${Number(firstCol) + Number(lastCol)} * ${columnGap.value}${columnGap.unit} / 2`;
|
|
2904
|
+
const iePrecisionError = "0.01px";
|
|
2905
|
+
const flexBasis = `calc(${width} - ${excessWidth} - ${iePrecisionError})`;
|
|
2906
|
+
const firstRow = rowIndex === 0;
|
|
2907
|
+
const lastRow = rowIndex === spans.length - 1;
|
|
2908
|
+
return span === 0 ? { display: "none" } : {
|
|
2909
|
+
flexBasis,
|
|
2910
|
+
minWidth: flexBasis,
|
|
2911
|
+
maxWidth: flexBasis,
|
|
2912
|
+
paddingLeft: firstCol ? 0 : `${columnGap.value / 2}${columnGap.unit}`,
|
|
2913
|
+
paddingRight: lastCol ? 0 : `${columnGap.value / 2}${columnGap.unit}`,
|
|
2914
|
+
paddingTop: firstRow ? 0 : `${rowGap.value / 2}${rowGap.unit}`,
|
|
2915
|
+
paddingBottom: lastRow ? 0 : `${rowGap.value / 2}${rowGap.unit}`
|
|
2916
|
+
};
|
|
2917
|
+
}));
|
|
2918
|
+
}
|
|
2919
|
+
const getBoxShadow = (shadows) => shadows.map(({ payload: { inset, offsetX, offsetY, blurRadius, spreadRadius, color } }) => `${inset ? "inset " : ""}${offsetX.toFixed(1)}px ${offsetY.toFixed(1)}px ${blurRadius}px ${spreadRadius}px ${color != null ? colorToString(color) : "rgba(0,0,0,0.2)"}`).filter(Boolean).join();
|
|
2920
|
+
function responsiveShadow(value) {
|
|
2921
|
+
return responsiveStyle([value], ([shadow = []]) => ({
|
|
2922
|
+
boxShadow: getBoxShadow(shadow)
|
|
2923
|
+
}));
|
|
2924
|
+
}
|
|
2925
|
+
function responsiveTextStyle(value) {
|
|
2926
|
+
return responsiveStyle([value], ([
|
|
2927
|
+
textStyle = {
|
|
2928
|
+
fontFamily: null,
|
|
2929
|
+
letterSpacing: null,
|
|
2930
|
+
fontSize: null,
|
|
2931
|
+
fontWeight: null,
|
|
2932
|
+
textTransform: [],
|
|
2933
|
+
fontStyle: []
|
|
2934
|
+
}
|
|
2935
|
+
]) => {
|
|
2936
|
+
const {
|
|
2937
|
+
fontSize,
|
|
2938
|
+
fontWeight,
|
|
2939
|
+
fontStyle = [],
|
|
2940
|
+
textTransform = [],
|
|
2941
|
+
letterSpacing,
|
|
2942
|
+
fontFamily
|
|
2943
|
+
} = textStyle;
|
|
2944
|
+
return __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, fontFamily == null ? {} : { fontFamily }), fontWeight == null ? {} : { fontWeight }), letterSpacing == null ? {} : { letterSpacing }), fontSize == null ? {} : { fontSize: `${fontSize.value}${fontSize.unit}` }), textTransform.includes("uppercase") ? { textTransform: "uppercase" } : {}), fontStyle.includes("italic") ? { fontStyle: "italic" } : {});
|
|
2945
|
+
});
|
|
2946
|
+
}
|
|
2947
|
+
const defaultMargin = {
|
|
2948
|
+
marginTop: 0,
|
|
2949
|
+
marginRight: "auto",
|
|
2950
|
+
marginBottom: 0,
|
|
2951
|
+
marginLeft: "auto"
|
|
2952
|
+
};
|
|
2953
|
+
const defaultPadding = {
|
|
2954
|
+
paddingTop: 0,
|
|
2955
|
+
paddingRight: 0,
|
|
2956
|
+
paddingBottom: 0,
|
|
2957
|
+
paddingLeft: 0
|
|
2958
|
+
};
|
|
2705
2959
|
function useStyleControlCssObject(style, controlDefinition) {
|
|
2706
2960
|
const { properties } = controlDefinition.config;
|
|
2707
2961
|
return __spreadValues(__spreadValues({}, properties.includes(slot.StyleControlProperty.Width) && {
|
|
@@ -2714,52 +2968,30 @@ function useStyleControlCssObject(style, controlDefinition) {
|
|
|
2714
2968
|
style == null ? void 0 : style.borderRadius,
|
|
2715
2969
|
style == null ? void 0 : style.textStyle
|
|
2716
2970
|
], ([width, margin, padding, border, borderRadius, textStyle]) => {
|
|
2717
|
-
var _a, _b,
|
|
2971
|
+
var _a, _b, _c2, _d, _e, _f, _g, _h, _i, _j, _k;
|
|
2718
2972
|
return __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, properties.includes(slot.StyleControlProperty.Width) && {
|
|
2719
2973
|
width: (_a = widthToString(width)) != null ? _a : "100%"
|
|
2720
|
-
}), properties.includes(slot.StyleControlProperty.Margin) && {
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
}), properties.includes(slot.StyleControlProperty.Padding) && {
|
|
2726
|
-
paddingTop: (_f = paddingToString(padding == null ? void 0 : padding.paddingTop)) != null ? _f : 0,
|
|
2727
|
-
paddingRight: (_g = paddingToString(padding == null ? void 0 : padding.paddingRight)) != null ? _g : 0,
|
|
2728
|
-
paddingBottom: (_h = paddingToString(padding == null ? void 0 : padding.paddingBottom)) != null ? _h : 0,
|
|
2729
|
-
paddingLeft: (_i = paddingToString(padding == null ? void 0 : padding.paddingLeft)) != null ? _i : 0
|
|
2730
|
-
}), properties.includes(slot.StyleControlProperty.Border) && {
|
|
2731
|
-
borderTop: (_j = borderSideToString(border == null ? void 0 : border.borderTop)) != null ? _j : "0 solid black",
|
|
2732
|
-
borderRight: (_k = borderSideToString(border == null ? void 0 : border.borderRight)) != null ? _k : "0 solid black",
|
|
2733
|
-
borderBottom: (_l = borderSideToString(border == null ? void 0 : border.borderBottom)) != null ? _l : "0 solid black",
|
|
2734
|
-
borderLeft: (_m = borderSideToString(border == null ? void 0 : border.borderLeft)) != null ? _m : "0 solid black"
|
|
2974
|
+
}), properties.includes(slot.StyleControlProperty.Margin) && marginPropertyDataToStyle(margin != null ? margin : defaultMargin, defaultMargin)), properties.includes(slot.StyleControlProperty.Padding) && paddingPropertyDataToStyle(padding != null ? padding : defaultPadding, defaultPadding)), properties.includes(slot.StyleControlProperty.Border) && {
|
|
2975
|
+
borderTop: (_b = borderSideToString2(border == null ? void 0 : border.borderTop)) != null ? _b : "0 solid black",
|
|
2976
|
+
borderRight: (_c2 = borderSideToString2(border == null ? void 0 : border.borderRight)) != null ? _c2 : "0 solid black",
|
|
2977
|
+
borderBottom: (_d = borderSideToString2(border == null ? void 0 : border.borderBottom)) != null ? _d : "0 solid black",
|
|
2978
|
+
borderLeft: (_e = borderSideToString2(border == null ? void 0 : border.borderLeft)) != null ? _e : "0 solid black"
|
|
2735
2979
|
}), properties.includes(slot.StyleControlProperty.BorderRadius) && {
|
|
2736
|
-
borderTopLeftRadius: (
|
|
2737
|
-
borderTopRightRadius: (
|
|
2738
|
-
borderBottomRightRadius: (
|
|
2739
|
-
borderBottomLeftRadius: (
|
|
2980
|
+
borderTopLeftRadius: (_f = borderRadiusToString(borderRadius == null ? void 0 : borderRadius.borderTopLeftRadius)) != null ? _f : 0,
|
|
2981
|
+
borderTopRightRadius: (_g = borderRadiusToString(borderRadius == null ? void 0 : borderRadius.borderTopRightRadius)) != null ? _g : 0,
|
|
2982
|
+
borderBottomRightRadius: (_h = borderRadiusToString(borderRadius == null ? void 0 : borderRadius.borderBottomRightRadius)) != null ? _h : 0,
|
|
2983
|
+
borderBottomLeftRadius: (_i = borderRadiusToString(borderRadius == null ? void 0 : borderRadius.borderBottomLeftRadius)) != null ? _i : 0
|
|
2740
2984
|
}), properties.includes(slot.StyleControlProperty.TextStyle) && __spreadProps(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, (textStyle == null ? void 0 : textStyle.fontFamily) && { fontFamily: textStyle.fontFamily }), (textStyle == null ? void 0 : textStyle.letterSpacing) && { letterSpacing: textStyle.letterSpacing }), (textStyle == null ? void 0 : textStyle.fontSize) && { fontSize: fontSizeToString(textStyle.fontSize) }), (textStyle == null ? void 0 : textStyle.fontWeight) && { fontWeight: textStyle.fontWeight }), {
|
|
2741
|
-
textTransform: (
|
|
2742
|
-
fontStyle: (
|
|
2985
|
+
textTransform: (_j = textStyle == null ? void 0 : textStyle.textTransform) != null ? _j : [],
|
|
2986
|
+
fontStyle: (_k = textStyle == null ? void 0 : textStyle.fontStyle) != null ? _k : []
|
|
2743
2987
|
}));
|
|
2744
2988
|
}));
|
|
2745
2989
|
function widthToString(widthProperty) {
|
|
2746
2990
|
if (widthProperty == null)
|
|
2747
2991
|
return null;
|
|
2748
|
-
return
|
|
2749
|
-
}
|
|
2750
|
-
function marginToString(marginProperty) {
|
|
2751
|
-
if (marginProperty == null)
|
|
2752
|
-
return null;
|
|
2753
|
-
if (marginProperty === "auto")
|
|
2754
|
-
return marginProperty;
|
|
2755
|
-
return `${marginProperty.value}${marginProperty.unit}`;
|
|
2756
|
-
}
|
|
2757
|
-
function paddingToString(paddingProperty) {
|
|
2758
|
-
if (paddingProperty == null)
|
|
2759
|
-
return null;
|
|
2760
|
-
return `${paddingProperty.value}${paddingProperty.unit}`;
|
|
2992
|
+
return lengthPercentageDataToString(widthProperty);
|
|
2761
2993
|
}
|
|
2762
|
-
function
|
|
2994
|
+
function borderSideToString2(borderSide) {
|
|
2763
2995
|
if (borderSide == null)
|
|
2764
2996
|
return null;
|
|
2765
2997
|
const { width, color, style: style2 } = borderSide;
|
|
@@ -2768,7 +3000,7 @@ function useStyleControlCssObject(style, controlDefinition) {
|
|
|
2768
3000
|
function borderRadiusToString(borderRadius) {
|
|
2769
3001
|
if (borderRadius == null)
|
|
2770
3002
|
return null;
|
|
2771
|
-
return
|
|
3003
|
+
return lengthPercentageDataToString(borderRadius);
|
|
2772
3004
|
}
|
|
2773
3005
|
function fontSizeToString(fontSize) {
|
|
2774
3006
|
return `${fontSize.value}${fontSize.unit}`;
|
|
@@ -3003,18 +3235,6 @@ function ControlValue({
|
|
|
3003
3235
|
return children(data);
|
|
3004
3236
|
}
|
|
3005
3237
|
}
|
|
3006
|
-
const getIndexes = (spans, index) => {
|
|
3007
|
-
const flattened = spans.reduce((a, s) => a.concat(s), []);
|
|
3008
|
-
if (index < 0 || index > flattened.length)
|
|
3009
|
-
throw new RangeError();
|
|
3010
|
-
let remainder = index;
|
|
3011
|
-
let rowIndex = 0;
|
|
3012
|
-
while (rowIndex < spans.length - 1 && remainder >= spans[rowIndex].length) {
|
|
3013
|
-
remainder -= spans[rowIndex].length;
|
|
3014
|
-
rowIndex += 1;
|
|
3015
|
-
}
|
|
3016
|
-
return [rowIndex, remainder];
|
|
3017
|
-
};
|
|
3018
3238
|
function useSlot(data, control2) {
|
|
3019
3239
|
if (data == null || data.elements.length === 0) {
|
|
3020
3240
|
return /* @__PURE__ */ jsxRuntime.jsx(Slot.Placeholder, {
|
|
@@ -3177,13 +3397,25 @@ function pollBoxModel({
|
|
|
3177
3397
|
onBoxModelChange(null);
|
|
3178
3398
|
};
|
|
3179
3399
|
}
|
|
3180
|
-
function
|
|
3181
|
-
return
|
|
3400
|
+
function useWidthStyle(value, descriptor) {
|
|
3401
|
+
return useStyle(responsiveWidth(value, descriptor.options.defaultValue));
|
|
3402
|
+
}
|
|
3403
|
+
function usePaddingStyle(value) {
|
|
3404
|
+
return useStyle(responsivePadding(value));
|
|
3405
|
+
}
|
|
3406
|
+
function useMarginStyle(value) {
|
|
3407
|
+
return useStyle(responsiveMargin(value));
|
|
3408
|
+
}
|
|
3409
|
+
function useBorderRadiusStyle(value) {
|
|
3410
|
+
return useStyle(responsiveBorderRadius(value));
|
|
3411
|
+
}
|
|
3412
|
+
function useShadowsStyle(value) {
|
|
3413
|
+
const shadowValue = useBoxShadow(value);
|
|
3414
|
+
return useStyle(responsiveShadow(shadowValue != null ? shadowValue : void 0));
|
|
3182
3415
|
}
|
|
3183
|
-
function
|
|
3184
|
-
const
|
|
3185
|
-
|
|
3186
|
-
return React.useMemo(() => options.format === slot.WidthControlValueFormats.ClassName ? css.css(responsiveWidth(value, options.defaultValue)) : value, [value, options.defaultValue, options.format]);
|
|
3416
|
+
function useBorderStyle(value) {
|
|
3417
|
+
const borderData = useBorder(value);
|
|
3418
|
+
return useStyle(responsiveBorder(borderData != null ? borderData : void 0));
|
|
3187
3419
|
}
|
|
3188
3420
|
function PropsValue({
|
|
3189
3421
|
element,
|
|
@@ -3239,13 +3471,95 @@ function PropsValue({
|
|
|
3239
3471
|
}, descriptor.type);
|
|
3240
3472
|
}
|
|
3241
3473
|
case slot.Types.Width:
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3474
|
+
switch (descriptor.options.format) {
|
|
3475
|
+
case slot.WidthPropControllerFormat.ClassName:
|
|
3476
|
+
return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
|
|
3477
|
+
hook: useWidthStyle,
|
|
3478
|
+
parameters: [props[propName], descriptor],
|
|
3479
|
+
children: (value) => renderFn(__spreadProps(__spreadValues({}, propsValue), {
|
|
3480
|
+
[propName]: value
|
|
3481
|
+
}))
|
|
3482
|
+
}, descriptor.type);
|
|
3483
|
+
default:
|
|
3484
|
+
return renderFn(__spreadProps(__spreadValues({}, propsValue), {
|
|
3485
|
+
[propName]: props[propName]
|
|
3486
|
+
}));
|
|
3487
|
+
}
|
|
3488
|
+
case slot.Types.Padding:
|
|
3489
|
+
switch (descriptor.options.format) {
|
|
3490
|
+
case slot.PaddingPropControllerFormat.ClassName:
|
|
3491
|
+
return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
|
|
3492
|
+
hook: usePaddingStyle,
|
|
3493
|
+
parameters: [props[propName]],
|
|
3494
|
+
children: (value) => renderFn(__spreadProps(__spreadValues({}, propsValue), {
|
|
3495
|
+
[propName]: value
|
|
3496
|
+
}))
|
|
3497
|
+
}, descriptor.type);
|
|
3498
|
+
default:
|
|
3499
|
+
return renderFn(__spreadProps(__spreadValues({}, propsValue), {
|
|
3500
|
+
[propName]: props[propName]
|
|
3501
|
+
}));
|
|
3502
|
+
}
|
|
3503
|
+
case slot.Types.Margin:
|
|
3504
|
+
switch (descriptor.options.format) {
|
|
3505
|
+
case slot.MarginPropControllerFormat.ClassName:
|
|
3506
|
+
return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
|
|
3507
|
+
hook: useMarginStyle,
|
|
3508
|
+
parameters: [props[propName]],
|
|
3509
|
+
children: (value) => renderFn(__spreadProps(__spreadValues({}, propsValue), {
|
|
3510
|
+
[propName]: value
|
|
3511
|
+
}))
|
|
3512
|
+
}, descriptor.type);
|
|
3513
|
+
default:
|
|
3514
|
+
return renderFn(__spreadProps(__spreadValues({}, propsValue), {
|
|
3515
|
+
[propName]: props[propName]
|
|
3516
|
+
}));
|
|
3517
|
+
}
|
|
3518
|
+
case slot.Types.BorderRadius:
|
|
3519
|
+
switch (descriptor.options.format) {
|
|
3520
|
+
case slot.BorderRadiusPropControllerFormat.ClassName:
|
|
3521
|
+
return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
|
|
3522
|
+
hook: useBorderRadiusStyle,
|
|
3523
|
+
parameters: [props[propName]],
|
|
3524
|
+
children: (value) => renderFn(__spreadProps(__spreadValues({}, propsValue), {
|
|
3525
|
+
[propName]: value
|
|
3526
|
+
}))
|
|
3527
|
+
}, descriptor.type);
|
|
3528
|
+
default:
|
|
3529
|
+
return renderFn(__spreadProps(__spreadValues({}, propsValue), {
|
|
3530
|
+
[propName]: props[propName]
|
|
3531
|
+
}));
|
|
3532
|
+
}
|
|
3533
|
+
case slot.Types.Shadows:
|
|
3534
|
+
switch (descriptor.options.format) {
|
|
3535
|
+
case slot.ShadowsPropControllerFormat.ClassName:
|
|
3536
|
+
return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
|
|
3537
|
+
hook: useShadowsStyle,
|
|
3538
|
+
parameters: [props[propName]],
|
|
3539
|
+
children: (value) => renderFn(__spreadProps(__spreadValues({}, propsValue), {
|
|
3540
|
+
[propName]: value
|
|
3541
|
+
}))
|
|
3542
|
+
}, descriptor.type);
|
|
3543
|
+
default:
|
|
3544
|
+
return renderFn(__spreadProps(__spreadValues({}, propsValue), {
|
|
3545
|
+
[propName]: props[propName]
|
|
3546
|
+
}));
|
|
3547
|
+
}
|
|
3548
|
+
case slot.Types.Border:
|
|
3549
|
+
switch (descriptor.options.format) {
|
|
3550
|
+
case slot.BorderPropControllerFormat.ClassName:
|
|
3551
|
+
return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
|
|
3552
|
+
hook: useBorderStyle,
|
|
3553
|
+
parameters: [props[propName]],
|
|
3554
|
+
children: (value) => renderFn(__spreadProps(__spreadValues({}, propsValue), {
|
|
3555
|
+
[propName]: value
|
|
3556
|
+
}))
|
|
3557
|
+
}, descriptor.type);
|
|
3558
|
+
default:
|
|
3559
|
+
return renderFn(__spreadProps(__spreadValues({}, propsValue), {
|
|
3560
|
+
[propName]: props[propName]
|
|
3561
|
+
}));
|
|
3562
|
+
}
|
|
3249
3563
|
case slot.Types.ResponsiveColor:
|
|
3250
3564
|
return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
|
|
3251
3565
|
hook: useResponsiveColor,
|
|
@@ -3585,16 +3899,20 @@ exports.colorToString = colorToString;
|
|
|
3585
3899
|
exports.deepEqual = deepEqual;
|
|
3586
3900
|
exports.findDeviceOverride = findDeviceOverride;
|
|
3587
3901
|
exports.forwardNextDynamicRef = forwardNextDynamicRef;
|
|
3588
|
-
exports.getDevice = getDevice;
|
|
3589
3902
|
exports.getDeviceMediaQuery = getDeviceMediaQuery;
|
|
3590
|
-
exports.getIndexes = getIndexes;
|
|
3591
3903
|
exports.getServerSideProps = getServerSideProps;
|
|
3592
3904
|
exports.getStaticPaths = getStaticPaths;
|
|
3593
3905
|
exports.getStaticProps = getStaticProps;
|
|
3906
|
+
exports.insertStyles = insertStyles;
|
|
3594
3907
|
exports.isNonNullable = isNonNullable;
|
|
3595
|
-
exports.
|
|
3908
|
+
exports.responsiveGridItem = responsiveGridItem;
|
|
3909
|
+
exports.responsiveStyle = responsiveStyle;
|
|
3910
|
+
exports.responsiveTextStyle = responsiveTextStyle;
|
|
3911
|
+
exports.responsiveWidth = responsiveWidth;
|
|
3912
|
+
exports.serializeStyles = serializeStyles;
|
|
3596
3913
|
exports.shallowMergeFallbacks = shallowMergeFallbacks;
|
|
3597
3914
|
exports.useBorder = useBorder;
|
|
3915
|
+
exports.useBoxShadow = useBoxShadow;
|
|
3598
3916
|
exports.useElementId = useElementId;
|
|
3599
3917
|
exports.useFile = useFile;
|
|
3600
3918
|
exports.useFormContext = useFormContext;
|
|
@@ -3605,4 +3923,5 @@ exports.usePage = usePage;
|
|
|
3605
3923
|
exports.usePageId = usePageId;
|
|
3606
3924
|
exports.useQuery = useQuery;
|
|
3607
3925
|
exports.useResponsiveColor = useResponsiveColor;
|
|
3926
|
+
exports.useStyle = useStyle;
|
|
3608
3927
|
//# sourceMappingURL=index.cjs.js.map
|