@makeswift/runtime 0.0.11 → 0.0.12
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/actions.cjs.js +6 -1
- package/dist/actions.cjs.js.map +1 -1
- package/dist/actions.es.js +6 -2
- package/dist/actions.es.js.map +1 -1
- package/dist/components.cjs.js +3 -2
- package/dist/components.cjs.js.map +1 -1
- package/dist/components.es.js +1 -2
- package/dist/components.es.js.map +1 -1
- package/dist/constants.cjs.js +128 -1
- package/dist/constants.cjs.js.map +1 -1
- package/dist/constants.es.js +128 -1
- package/dist/constants.es.js.map +1 -1
- package/dist/index.cjs.js +357 -14
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +353 -16
- package/dist/index.es.js.map +1 -1
- package/dist/next.cjs.js +9 -6
- package/dist/next.cjs.js.map +1 -1
- package/dist/next.es.js +10 -7
- package/dist/next.es.js.map +1 -1
- package/dist/react-builder-preview.cjs.js +45 -45
- package/dist/react-builder-preview.cjs.js.map +1 -1
- package/dist/react-builder-preview.es.js +44 -44
- package/dist/react-builder-preview.es.js.map +1 -1
- package/dist/types/api/constants.d.ts.map +1 -1
- package/dist/types/api/generated/graphql.d.ts +55 -0
- package/dist/types/api/generated/graphql.d.ts.map +1 -1
- package/dist/types/api/react.d.ts.map +1 -1
- package/dist/types/api/types.d.ts +2 -2
- package/dist/types/api/types.d.ts.map +1 -1
- package/dist/types/components/page/Page.d.ts +23 -0
- package/dist/types/components/page/Page.d.ts.map +1 -1
- package/dist/types/next.d.ts +2 -1
- package/dist/types/next.d.ts.map +1 -1
- package/dist/types/state/actions.d.ts +13 -1
- package/dist/types/state/actions.d.ts.map +1 -1
- package/dist/types/state/react-builder-preview.d.ts.map +1 -1
- package/package.json +2 -1
- package/dist/Page.cjs.js +0 -222
- package/dist/Page.cjs.js.map +0 -1
- package/dist/Page.es.js +0 -216
- package/dist/Page.es.js.map +0 -1
package/dist/index.es.js
CHANGED
|
@@ -47,8 +47,8 @@ import { getDataFromTree } from "@apollo/client/react/ssr";
|
|
|
47
47
|
import { KeyUtils, Value } from "slate";
|
|
48
48
|
import uuid from "uuid/v4";
|
|
49
49
|
import { jsx, Fragment, jsxs } from "react/jsx-runtime";
|
|
50
|
-
import "html-react-parser";
|
|
51
|
-
import "next/head";
|
|
50
|
+
import parse$1 from "html-react-parser";
|
|
51
|
+
import Head from "next/head";
|
|
52
52
|
import { E as ElementID, B as Backgrounds$1, W as Width, R as ResponsiveIconRadioGroup, M as Margin, P as Padding, a as Border, b as BorderRadius, S as Shadows, G as GapY, c as GapX, e as ResponsiveSelect, f as ResponsiveNumber, C as Checkbox$1, g as Grid$2, h as TextInput, L as Link$1, i as ResponsiveColor, j as TextStyle, I as Image$1, k as ResponsiveOpacity, l as Images, N as Number$1, D as Date$1, F as Font, m as ResponsiveLength, n as TextArea$1, o as Table, p as TableFormFields, q as NavigationLinks, r as SocialLinks$1, s as RichText, V as Video$1, T as Types, t as WidthControlValueFormats } from "./descriptors.es.js";
|
|
53
53
|
import ColorHelper from "color";
|
|
54
54
|
import scrollIntoView from "scroll-into-view-if-needed";
|
|
@@ -284,6 +284,24 @@ const typePolicies = {
|
|
|
284
284
|
__typename: "Table",
|
|
285
285
|
id: args == null ? void 0 : args.id
|
|
286
286
|
}, true);
|
|
287
|
+
},
|
|
288
|
+
page(existingData, {
|
|
289
|
+
args,
|
|
290
|
+
toReference
|
|
291
|
+
}) {
|
|
292
|
+
return existingData != null ? existingData : toReference({
|
|
293
|
+
__typename: "Page",
|
|
294
|
+
id: args == null ? void 0 : args.id
|
|
295
|
+
}, true);
|
|
296
|
+
},
|
|
297
|
+
site(existingData, {
|
|
298
|
+
args,
|
|
299
|
+
toReference
|
|
300
|
+
}) {
|
|
301
|
+
return existingData != null ? existingData : toReference({
|
|
302
|
+
__typename: "Site",
|
|
303
|
+
id: args == null ? void 0 : args.id
|
|
304
|
+
}, true);
|
|
287
305
|
}
|
|
288
306
|
}
|
|
289
307
|
}
|
|
@@ -2516,7 +2534,7 @@ const Reel = styled(motion.div)`
|
|
|
2516
2534
|
}
|
|
2517
2535
|
`)}
|
|
2518
2536
|
`;
|
|
2519
|
-
const Page = styled(motion.div)`
|
|
2537
|
+
const Page$1 = styled(motion.div)`
|
|
2520
2538
|
position: relative;
|
|
2521
2539
|
width: 100%;
|
|
2522
2540
|
`;
|
|
@@ -2729,7 +2747,7 @@ const Carousel = forwardRef(function Carousel2({
|
|
|
2729
2747
|
},
|
|
2730
2748
|
children: [/* @__PURE__ */ jsxs(Container$b, {
|
|
2731
2749
|
children: [/* @__PURE__ */ jsx(ClipMask, {
|
|
2732
|
-
children: /* @__PURE__ */ jsx(Page, __spreadProps(__spreadValues({}, bindPage()), {
|
|
2750
|
+
children: /* @__PURE__ */ jsx(Page$1, __spreadProps(__spreadValues({}, bindPage()), {
|
|
2733
2751
|
animate: animation,
|
|
2734
2752
|
children: /* @__PURE__ */ jsx(Reel, {
|
|
2735
2753
|
gap,
|
|
@@ -3518,7 +3536,7 @@ const defaultHtml = `<div style="padding: 24px; background-color: rgba(161, 168,
|
|
|
3518
3536
|
<rect y="160" width="40" height="8" rx="2" fill="#A1A8C2" fill-opacity="0.5"/>
|
|
3519
3537
|
</svg>
|
|
3520
3538
|
</div>`;
|
|
3521
|
-
const SCRIPT_TAG = "script";
|
|
3539
|
+
const SCRIPT_TAG$1 = "script";
|
|
3522
3540
|
const Embed = forwardRef(function Embed2({
|
|
3523
3541
|
id,
|
|
3524
3542
|
width,
|
|
@@ -3536,7 +3554,7 @@ const Embed = forwardRef(function Embed2({
|
|
|
3536
3554
|
return;
|
|
3537
3555
|
const walker = container.ownerDocument.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {
|
|
3538
3556
|
acceptNode(node) {
|
|
3539
|
-
return node.tagName.toLowerCase() === SCRIPT_TAG ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_REJECT;
|
|
3557
|
+
return node.tagName.toLowerCase() === SCRIPT_TAG$1 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_REJECT;
|
|
3540
3558
|
}
|
|
3541
3559
|
});
|
|
3542
3560
|
const nodes = [];
|
|
@@ -3547,7 +3565,7 @@ const Embed = forwardRef(function Embed2({
|
|
|
3547
3565
|
await new Promise((resolve) => {
|
|
3548
3566
|
var _a, _b;
|
|
3549
3567
|
const node = nodes[i];
|
|
3550
|
-
const script = node.ownerDocument.createElement(SCRIPT_TAG);
|
|
3568
|
+
const script = node.ownerDocument.createElement(SCRIPT_TAG$1);
|
|
3551
3569
|
script.textContent = node.textContent;
|
|
3552
3570
|
Array.from(node.attributes).forEach(({
|
|
3553
3571
|
name,
|
|
@@ -4876,7 +4894,7 @@ function useTableFormFieldRefs(propController, { fieldsCount }) {
|
|
|
4876
4894
|
}
|
|
4877
4895
|
}, [propController, container, items, isInBuilder]);
|
|
4878
4896
|
const itemRefs = useMemo(() => Array.from({ length: fieldsCount + 1 }).map((_, index) => (item) => {
|
|
4879
|
-
setItems((
|
|
4897
|
+
setItems((is2) => [...is2.slice(0, index), item, ...is2.slice(index + 1)]);
|
|
4880
4898
|
}), [fieldsCount, setItems]);
|
|
4881
4899
|
return { container: setContainer, items: itemRefs };
|
|
4882
4900
|
}
|
|
@@ -6202,7 +6220,7 @@ const GridItem = styled.div`
|
|
|
6202
6220
|
align-items: flex-start;
|
|
6203
6221
|
${cssGridItem()}
|
|
6204
6222
|
`;
|
|
6205
|
-
const Root = forwardRef(function
|
|
6223
|
+
const Root = forwardRef(function Page({
|
|
6206
6224
|
children,
|
|
6207
6225
|
backgrounds,
|
|
6208
6226
|
rowGap,
|
|
@@ -7803,6 +7821,325 @@ function registerBuiltinComponents(runtime) {
|
|
|
7803
7821
|
unregisterVideoComponent();
|
|
7804
7822
|
};
|
|
7805
7823
|
}
|
|
7824
|
+
const SCRIPT_TAG = "script";
|
|
7825
|
+
function BodySnippet({
|
|
7826
|
+
code,
|
|
7827
|
+
cleanup
|
|
7828
|
+
}) {
|
|
7829
|
+
useEffect(() => {
|
|
7830
|
+
const container = document.createElement("div");
|
|
7831
|
+
container.innerHTML = code;
|
|
7832
|
+
const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT);
|
|
7833
|
+
const scripts = [];
|
|
7834
|
+
while (walker.nextNode()) {
|
|
7835
|
+
if (walker.currentNode instanceof HTMLScriptElement)
|
|
7836
|
+
scripts.push(walker.currentNode);
|
|
7837
|
+
}
|
|
7838
|
+
scripts.forEach((inlineScript) => {
|
|
7839
|
+
var _a;
|
|
7840
|
+
const executableScript = document.createElement(SCRIPT_TAG);
|
|
7841
|
+
executableScript.textContent = inlineScript.textContent;
|
|
7842
|
+
Array.from(inlineScript.attributes).forEach(({
|
|
7843
|
+
name,
|
|
7844
|
+
value
|
|
7845
|
+
}) => {
|
|
7846
|
+
executableScript.setAttribute(name, value);
|
|
7847
|
+
});
|
|
7848
|
+
(_a = inlineScript.parentNode) == null ? void 0 : _a.replaceChild(executableScript, inlineScript);
|
|
7849
|
+
});
|
|
7850
|
+
const nodes = Array.from(container.childNodes);
|
|
7851
|
+
document.body.append(...nodes);
|
|
7852
|
+
return () => {
|
|
7853
|
+
nodes.forEach((node) => {
|
|
7854
|
+
var _a;
|
|
7855
|
+
(_a = node.parentNode) == null ? void 0 : _a.removeChild(node);
|
|
7856
|
+
});
|
|
7857
|
+
if (cleanup == null)
|
|
7858
|
+
return;
|
|
7859
|
+
const cleanUp = new Function(cleanup);
|
|
7860
|
+
try {
|
|
7861
|
+
cleanUp();
|
|
7862
|
+
} catch {
|
|
7863
|
+
}
|
|
7864
|
+
};
|
|
7865
|
+
}, [code, cleanup]);
|
|
7866
|
+
return null;
|
|
7867
|
+
}
|
|
7868
|
+
function is(x, y) {
|
|
7869
|
+
if (x === y)
|
|
7870
|
+
return x !== 0 || y !== 0 || 1 / x === 1 / y;
|
|
7871
|
+
return x !== x && y !== y;
|
|
7872
|
+
}
|
|
7873
|
+
const { hasOwnProperty: hasOwnProperty$1 } = Object.prototype;
|
|
7874
|
+
const shallowEqual = (a, b) => {
|
|
7875
|
+
if (is(a, b))
|
|
7876
|
+
return true;
|
|
7877
|
+
if (typeof a !== "object" || a === null || typeof b !== "object" || b === null)
|
|
7878
|
+
return false;
|
|
7879
|
+
const keysA = Object.keys(a);
|
|
7880
|
+
const keysB = Object.keys(b);
|
|
7881
|
+
if (keysA.length !== keysB.length)
|
|
7882
|
+
return false;
|
|
7883
|
+
for (let i = 0; i < keysA.length; i += 1) {
|
|
7884
|
+
if (!hasOwnProperty$1.call(b, keysA[i]) || !is(a[keysA[i]], b[keysA[i]]))
|
|
7885
|
+
return false;
|
|
7886
|
+
}
|
|
7887
|
+
return true;
|
|
7888
|
+
};
|
|
7889
|
+
const { hasOwnProperty } = Object.prototype;
|
|
7890
|
+
const deepEqual = (a, b) => {
|
|
7891
|
+
if (shallowEqual(a, b))
|
|
7892
|
+
return true;
|
|
7893
|
+
if (typeof a !== "object" || a === null || typeof b !== "object" || b === null)
|
|
7894
|
+
return false;
|
|
7895
|
+
const keysA = Object.keys(a);
|
|
7896
|
+
const keysB = Object.keys(b);
|
|
7897
|
+
if (keysA.length !== keysB.length)
|
|
7898
|
+
return false;
|
|
7899
|
+
for (let i = 0; i < keysA.length; i += 1) {
|
|
7900
|
+
if (!hasOwnProperty.call(b, keysA[i]) || !deepEqual(a[keysA[i]], b[keysA[i]]))
|
|
7901
|
+
return false;
|
|
7902
|
+
}
|
|
7903
|
+
return true;
|
|
7904
|
+
};
|
|
7905
|
+
const defaultFavicon = {
|
|
7906
|
+
mimetype: "image/png",
|
|
7907
|
+
publicUrl: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAAiCAYAAAA6RwvCAAAACXBIWXMAABcRAAAXEQHKJvM/AAABjElEQVRYhc2XzU3EMBCFB8TddAAXn6EE6GCpgNABZ1/IXnymBOgAOmA7YM8+ABVsXEHQQFaKQryeN3Yk3ilKJtEnv/nLUd/3pFG0riGi88yrnQn+UfJ5FUi0riWiB2H4nQn+KRd0DFP8agXEfkqCYJBoHdtxIQxfm+DfFgEhoith3NYE30o/qgGR2BJB+xY7kdYEL8oNFUi0jiFMJuxVWrJqEMFxsyUNCsE6AeNztvBp7aJ143vXksoRnwhYtmNdSoIQa6RlO9YXEWW7KgoCleOgxgTf1QZBT+RZ2lXFING6UxCCq+ceeUE8fYdknY599v9sJvzGBP+yCEgC7GPmETc0OJ+0awAlkhe2pAbIXAeFZ8xe2g2Nk3c3ub0xwWt6zY9qbmiqGVMbZK21ZC/YmhlbeBMTzZNDQqcvDb1kM1x32iqZSt1HaqukfKvq34BAOTLsrH+ETNmUkKHHA+428RgeclPVWozeSyAI2EdWB34jtqXNTAySOY3i/KgFIlqOa4GkFmBegorzg4joG07he/M7zl6jAAAAAElFTkSuQmCC"
|
|
7908
|
+
};
|
|
7909
|
+
const VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_.\-\d]*$/;
|
|
7910
|
+
const VALID_HEAD_ELEMENT_TYPES = ["title", "base", "link", "style", "meta", "script", "noscript", "template"];
|
|
7911
|
+
function snippetToElement(snippet) {
|
|
7912
|
+
return Children.map(parse$1(snippet.code), (element) => {
|
|
7913
|
+
if (typeof element === "string")
|
|
7914
|
+
return element;
|
|
7915
|
+
if (!VALID_TAG_REGEX.test(element.type))
|
|
7916
|
+
return null;
|
|
7917
|
+
const key = element.key ? `${snippet.id}:${element.key}` : snippet.id;
|
|
7918
|
+
return createElement(element.type, __spreadProps(__spreadValues({}, element.props), {
|
|
7919
|
+
key
|
|
7920
|
+
}));
|
|
7921
|
+
});
|
|
7922
|
+
}
|
|
7923
|
+
const filterUsedSnippetProperties = ({
|
|
7924
|
+
code,
|
|
7925
|
+
builderEnabled,
|
|
7926
|
+
liveEnabled,
|
|
7927
|
+
location,
|
|
7928
|
+
cleanup
|
|
7929
|
+
}) => ({
|
|
7930
|
+
code,
|
|
7931
|
+
builderEnabled,
|
|
7932
|
+
liveEnabled,
|
|
7933
|
+
location,
|
|
7934
|
+
cleanup
|
|
7935
|
+
});
|
|
7936
|
+
const PAGE_SNIPPETS_QUERY = gql`
|
|
7937
|
+
query PageById($id: ID!) {
|
|
7938
|
+
page(id: $id) {
|
|
7939
|
+
__typename
|
|
7940
|
+
id
|
|
7941
|
+
snippets {
|
|
7942
|
+
__typename
|
|
7943
|
+
id
|
|
7944
|
+
name
|
|
7945
|
+
code
|
|
7946
|
+
cleanup
|
|
7947
|
+
location
|
|
7948
|
+
shouldAddToNewPages
|
|
7949
|
+
liveEnabled
|
|
7950
|
+
builderEnabled
|
|
7951
|
+
}
|
|
7952
|
+
}
|
|
7953
|
+
}
|
|
7954
|
+
`;
|
|
7955
|
+
const SITE_FONTS_QUERY = gql`
|
|
7956
|
+
query SiteById($id: ID!) {
|
|
7957
|
+
site(id: $id) {
|
|
7958
|
+
id
|
|
7959
|
+
googleFonts {
|
|
7960
|
+
edges {
|
|
7961
|
+
activeVariants {
|
|
7962
|
+
specifier
|
|
7963
|
+
}
|
|
7964
|
+
node {
|
|
7965
|
+
family
|
|
7966
|
+
variants {
|
|
7967
|
+
specifier
|
|
7968
|
+
}
|
|
7969
|
+
}
|
|
7970
|
+
}
|
|
7971
|
+
}
|
|
7972
|
+
}
|
|
7973
|
+
}
|
|
7974
|
+
`;
|
|
7975
|
+
function Page2({
|
|
7976
|
+
page,
|
|
7977
|
+
preview = false
|
|
7978
|
+
}) {
|
|
7979
|
+
var _a;
|
|
7980
|
+
const isInBuilder = useIsInBuilder();
|
|
7981
|
+
const [snippets, setSnippets] = useState(page.snippets);
|
|
7982
|
+
useQuery(PAGE_SNIPPETS_QUERY, {
|
|
7983
|
+
variables: {
|
|
7984
|
+
id: page.id
|
|
7985
|
+
},
|
|
7986
|
+
skip: isInBuilder === false,
|
|
7987
|
+
fetchPolicy: "cache-only",
|
|
7988
|
+
onCompleted(data) {
|
|
7989
|
+
if (data == null)
|
|
7990
|
+
return;
|
|
7991
|
+
const oldSnippets = snippets.map(filterUsedSnippetProperties);
|
|
7992
|
+
const newSnippets = data.page.snippets.map(filterUsedSnippetProperties);
|
|
7993
|
+
if (deepEqual(newSnippets, oldSnippets))
|
|
7994
|
+
return;
|
|
7995
|
+
setSnippets(data.page.snippets);
|
|
7996
|
+
}
|
|
7997
|
+
});
|
|
7998
|
+
const {
|
|
7999
|
+
data: siteData
|
|
8000
|
+
} = useQuery(SITE_FONTS_QUERY, {
|
|
8001
|
+
variables: {
|
|
8002
|
+
id: page.site.id
|
|
8003
|
+
},
|
|
8004
|
+
skip: isInBuilder === false,
|
|
8005
|
+
fetchPolicy: "cache-only"
|
|
8006
|
+
});
|
|
8007
|
+
const favicon = (_a = page.meta.favicon) != null ? _a : defaultFavicon;
|
|
8008
|
+
const {
|
|
8009
|
+
title,
|
|
8010
|
+
description,
|
|
8011
|
+
keywords,
|
|
8012
|
+
socialImage
|
|
8013
|
+
} = page.meta;
|
|
8014
|
+
const {
|
|
8015
|
+
canonicalUrl,
|
|
8016
|
+
isIndexingBlocked
|
|
8017
|
+
} = page.seo;
|
|
8018
|
+
const fontFamilyParamValue = useMemo(() => {
|
|
8019
|
+
if ((siteData == null ? void 0 : siteData.site) == null) {
|
|
8020
|
+
return page.fonts.map(({
|
|
8021
|
+
family,
|
|
8022
|
+
variants
|
|
8023
|
+
}) => {
|
|
8024
|
+
return `${family.replace(/ /g, "+")}:${variants.join()}`;
|
|
8025
|
+
}).join("|");
|
|
8026
|
+
}
|
|
8027
|
+
return siteData.site.googleFonts.edges.filter((edge) => edge != null).map(({
|
|
8028
|
+
activeVariants,
|
|
8029
|
+
node: {
|
|
8030
|
+
family,
|
|
8031
|
+
variants
|
|
8032
|
+
}
|
|
8033
|
+
}) => {
|
|
8034
|
+
const activeVariantSpecifiers = variants.filter((variant) => activeVariants.some((activeVariant) => activeVariant.specifier === variant.specifier)).map((variant) => variant.specifier).join();
|
|
8035
|
+
return `${family.replace(/ /g, "+")}:${activeVariantSpecifiers}`;
|
|
8036
|
+
}).join("|");
|
|
8037
|
+
}, [siteData, page]);
|
|
8038
|
+
const filteredSnippets = useMemo(() => snippets.filter((snippet) => preview ? snippet.builderEnabled : snippet.liveEnabled), [snippets]);
|
|
8039
|
+
const headSnippets = useMemo(() => filteredSnippets.filter((snippet) => snippet.location === "HEAD"), [filteredSnippets]);
|
|
8040
|
+
const previousHeadSnippets = useRef(null);
|
|
8041
|
+
useEffect(() => {
|
|
8042
|
+
var _a2;
|
|
8043
|
+
const headSnippetsToCleanUp = ((_a2 = previousHeadSnippets.current) != null ? _a2 : []).filter((previousSnippet) => previousSnippet.cleanup != null).filter((previousSnippet) => !headSnippets.some((snippet) => previousSnippet.id === snippet.id));
|
|
8044
|
+
headSnippetsToCleanUp.forEach((snippetToCleanUp) => {
|
|
8045
|
+
if (snippetToCleanUp.cleanup == null)
|
|
8046
|
+
return;
|
|
8047
|
+
const cleanUp = new Function(snippetToCleanUp.cleanup);
|
|
8048
|
+
try {
|
|
8049
|
+
cleanUp();
|
|
8050
|
+
} catch {
|
|
8051
|
+
}
|
|
8052
|
+
});
|
|
8053
|
+
previousHeadSnippets.current = headSnippets;
|
|
8054
|
+
}, [headSnippets]);
|
|
8055
|
+
return /* @__PURE__ */ jsxs(Fragment, {
|
|
8056
|
+
children: [/* @__PURE__ */ jsxs(Head, {
|
|
8057
|
+
children: [/* @__PURE__ */ jsx("style", {
|
|
8058
|
+
children: `
|
|
8059
|
+
html {
|
|
8060
|
+
font-family: sans-serif;
|
|
8061
|
+
}
|
|
8062
|
+
div#__next {
|
|
8063
|
+
overflow: hidden;
|
|
8064
|
+
}
|
|
8065
|
+
`
|
|
8066
|
+
}), /* @__PURE__ */ jsx("link", {
|
|
8067
|
+
rel: "icon",
|
|
8068
|
+
type: favicon.mimetype,
|
|
8069
|
+
href: favicon.publicUrl
|
|
8070
|
+
}), canonicalUrl && /* @__PURE__ */ jsx("link", {
|
|
8071
|
+
rel: "canonical",
|
|
8072
|
+
href: canonicalUrl
|
|
8073
|
+
}), isIndexingBlocked && /* @__PURE__ */ jsx("meta", {
|
|
8074
|
+
name: "robots",
|
|
8075
|
+
content: "noindex"
|
|
8076
|
+
}), title && /* @__PURE__ */ jsxs(Fragment, {
|
|
8077
|
+
children: [/* @__PURE__ */ jsx("title", {
|
|
8078
|
+
children: title
|
|
8079
|
+
}), /* @__PURE__ */ jsx("meta", {
|
|
8080
|
+
property: "og:title",
|
|
8081
|
+
content: title
|
|
8082
|
+
}), /* @__PURE__ */ jsx("meta", {
|
|
8083
|
+
name: "twitter:title",
|
|
8084
|
+
content: title
|
|
8085
|
+
}), /* @__PURE__ */ jsx("meta", {
|
|
8086
|
+
itemProp: "name",
|
|
8087
|
+
content: title
|
|
8088
|
+
})]
|
|
8089
|
+
}), description && /* @__PURE__ */ jsxs(Fragment, {
|
|
8090
|
+
children: [/* @__PURE__ */ jsx("meta", {
|
|
8091
|
+
name: "description",
|
|
8092
|
+
content: description
|
|
8093
|
+
}), /* @__PURE__ */ jsx("meta", {
|
|
8094
|
+
property: "og:description",
|
|
8095
|
+
content: description
|
|
8096
|
+
}), /* @__PURE__ */ jsx("meta", {
|
|
8097
|
+
name: "twitter:description",
|
|
8098
|
+
content: description
|
|
8099
|
+
}), /* @__PURE__ */ jsx("meta", {
|
|
8100
|
+
itemProp: "description",
|
|
8101
|
+
content: description
|
|
8102
|
+
})]
|
|
8103
|
+
}), keywords && /* @__PURE__ */ jsx("meta", {
|
|
8104
|
+
name: "keywords",
|
|
8105
|
+
content: keywords
|
|
8106
|
+
}), socialImage && /* @__PURE__ */ jsxs(Fragment, {
|
|
8107
|
+
children: [/* @__PURE__ */ jsx("meta", {
|
|
8108
|
+
property: "og:image",
|
|
8109
|
+
content: socialImage.publicUrl
|
|
8110
|
+
}), /* @__PURE__ */ jsx("meta", {
|
|
8111
|
+
property: "og:image:type",
|
|
8112
|
+
content: socialImage.publicUrl
|
|
8113
|
+
}), /* @__PURE__ */ jsx("meta", {
|
|
8114
|
+
name: "twitter:image",
|
|
8115
|
+
content: socialImage.publicUrl
|
|
8116
|
+
}), /* @__PURE__ */ jsx("meta", {
|
|
8117
|
+
name: "twitter:card",
|
|
8118
|
+
content: socialImage.publicUrl
|
|
8119
|
+
}), /* @__PURE__ */ jsx("meta", {
|
|
8120
|
+
itemProp: "image",
|
|
8121
|
+
content: socialImage.publicUrl
|
|
8122
|
+
})]
|
|
8123
|
+
}), fontFamilyParamValue !== "" && /* @__PURE__ */ jsx(Fragment, {
|
|
8124
|
+
children: /* @__PURE__ */ jsx("link", {
|
|
8125
|
+
rel: "stylesheet",
|
|
8126
|
+
href: `https://fonts.googleapis.com/css?family=${fontFamilyParamValue}&display=swap`
|
|
8127
|
+
})
|
|
8128
|
+
}), headSnippets.map(snippetToElement).map((children) => Children.map(children, (child) => {
|
|
8129
|
+
if (typeof child === "string")
|
|
8130
|
+
return child;
|
|
8131
|
+
if (VALID_HEAD_ELEMENT_TYPES.includes(child.type))
|
|
8132
|
+
return child;
|
|
8133
|
+
return null;
|
|
8134
|
+
}))]
|
|
8135
|
+
}), /* @__PURE__ */ jsx(DocumentReference, {
|
|
8136
|
+
documentReference: createDocumentReference(page.id)
|
|
8137
|
+
}), filteredSnippets.filter((snippet) => snippet.location === "BODY").map((snippet) => /* @__PURE__ */ jsx(BodySnippet, {
|
|
8138
|
+
code: snippet.code,
|
|
8139
|
+
cleanup: snippet.cleanup
|
|
8140
|
+
}, snippet.id))]
|
|
8141
|
+
});
|
|
8142
|
+
}
|
|
7806
8143
|
var _path;
|
|
7807
8144
|
function _extends() {
|
|
7808
8145
|
_extends = Object.assign || function(target) {
|
|
@@ -8656,21 +8993,21 @@ const Element$1 = memo(forwardRef(function Element2({
|
|
|
8656
8993
|
}, elementKey);
|
|
8657
8994
|
}));
|
|
8658
8995
|
const Document = memo(forwardRef(function Document2({
|
|
8659
|
-
document
|
|
8996
|
+
document: document2
|
|
8660
8997
|
}, ref) {
|
|
8661
8998
|
return /* @__PURE__ */ jsx(DocumentContext.Provider, {
|
|
8662
|
-
value:
|
|
8999
|
+
value: document2.key,
|
|
8663
9000
|
children: /* @__PURE__ */ jsx(Element$1, {
|
|
8664
9001
|
ref,
|
|
8665
|
-
element:
|
|
9002
|
+
element: document2.rootElement
|
|
8666
9003
|
})
|
|
8667
9004
|
});
|
|
8668
9005
|
}));
|
|
8669
9006
|
const DocumentReference = memo(forwardRef(function DocumentReference2({
|
|
8670
9007
|
documentReference
|
|
8671
9008
|
}, ref) {
|
|
8672
|
-
const
|
|
8673
|
-
if (
|
|
9009
|
+
const document2 = useDocument(documentReference.key);
|
|
9010
|
+
if (document2 == null) {
|
|
8674
9011
|
return /* @__PURE__ */ jsx(FallbackComponent, {
|
|
8675
9012
|
ref,
|
|
8676
9013
|
text: "Document not found"
|
|
@@ -8678,8 +9015,8 @@ const DocumentReference = memo(forwardRef(function DocumentReference2({
|
|
|
8678
9015
|
}
|
|
8679
9016
|
return /* @__PURE__ */ jsx(Document, {
|
|
8680
9017
|
ref,
|
|
8681
|
-
document
|
|
9018
|
+
document: document2
|
|
8682
9019
|
});
|
|
8683
9020
|
}));
|
|
8684
|
-
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,
|
|
9021
|
+
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 };
|
|
8685
9022
|
//# sourceMappingURL=index.es.js.map
|