@builder.io/sdk-react-nextjs 0.14.21 → 0.14.25
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/lib/browser/{USE_CLIENT_BUNDLE-421209ac.cjs → USE_CLIENT_BUNDLE-1ddfeb58.cjs} +2 -2
- package/lib/{node/USE_CLIENT_BUNDLE-14685e18.js → browser/USE_CLIENT_BUNDLE-8cd3386f.js} +21 -21
- package/lib/{edge/USE_SERVER_BUNDLE-81678d13.js → browser/USE_SERVER_BUNDLE-457ff39c.js} +1 -1
- package/lib/{edge/USE_SERVER_BUNDLE-53f11a34.cjs → browser/USE_SERVER_BUNDLE-7b480ad5.cjs} +1 -1
- package/lib/browser/{bundle-8e752d91.js → bundle-761961a0.js} +333 -333
- package/lib/browser/{bundle-1e8b30d0.cjs → bundle-9d1d2542.cjs} +20 -20
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +3 -3
- package/lib/{node/USE_CLIENT_BUNDLE-80d049f9.cjs → edge/USE_CLIENT_BUNDLE-2ee56c62.cjs} +2 -2
- package/lib/{browser/USE_CLIENT_BUNDLE-85cd491c.js → edge/USE_CLIENT_BUNDLE-e4abd45c.js} +21 -21
- package/lib/{node/USE_SERVER_BUNDLE-c11df0b0.cjs → edge/USE_SERVER_BUNDLE-78eb2f70.cjs} +1 -1
- package/lib/{node/USE_SERVER_BUNDLE-c93447b3.js → edge/USE_SERVER_BUNDLE-f025d6d8.js} +1 -1
- package/lib/edge/{bundle-ad170624.js → bundle-2dc98ad8.js} +421 -421
- package/lib/edge/{bundle-4d349481.cjs → bundle-8f003cc6.cjs} +27 -27
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +3 -3
- package/lib/{edge/USE_CLIENT_BUNDLE-e965200b.js → node/USE_CLIENT_BUNDLE-ef4baa66.js} +21 -21
- package/lib/{edge/USE_CLIENT_BUNDLE-1d5cd7a9.cjs → node/USE_CLIENT_BUNDLE-f7463aa3.cjs} +2 -2
- package/lib/{browser/USE_SERVER_BUNDLE-c44b1000.js → node/USE_SERVER_BUNDLE-3c35d11e.js} +1 -1
- package/lib/{browser/USE_SERVER_BUNDLE-7f959896.cjs → node/USE_SERVER_BUNDLE-e5e233d2.cjs} +1 -1
- package/lib/node/{bundle-5c7927a4.js → bundle-90827143.js} +49 -49
- package/lib/node/{bundle-8a453488.cjs → bundle-df5510f7.cjs} +5 -5
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +3 -3
- package/package.json +4 -4
- package/types/cjs/blocks/accordion/accordion.d.ts +4 -0
- package/types/cjs/blocks/accordion/accordion.types.d.ts +12 -0
- package/types/cjs/blocks/accordion/component-info.d.ts +2 -0
- package/types/cjs/blocks/accordion/helpers.d.ts +1 -0
- package/types/cjs/blocks/accordion/index.d.ts +1 -0
- package/types/cjs/components/block/animator.d.ts +0 -1
- package/types/cjs/components/content-variants/content-variants.types.d.ts +1 -1
- package/types/cjs/constants/sdk-version.d.ts +1 -1
- package/types/cjs/functions/camel-to-kebab-case.d.ts +1 -1
- package/types/esm/blocks/accordion/accordion.d.ts +4 -0
- package/types/esm/blocks/accordion/accordion.types.d.ts +12 -0
- package/types/esm/blocks/accordion/component-info.d.ts +2 -0
- package/types/esm/blocks/accordion/helpers.d.ts +1 -0
- package/types/esm/blocks/accordion/index.d.ts +1 -0
- package/types/esm/components/block/animator.d.ts +0 -1
- package/types/esm/components/content-variants/content-variants.types.d.ts +1 -1
- package/types/esm/constants/sdk-version.d.ts +1 -1
- package/types/esm/functions/camel-to-kebab-case.d.ts +1 -1
package/lib/edge/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./USE_CLIENT_BUNDLE-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./USE_CLIENT_BUNDLE-2ee56c62.cjs"),e=require("./bundle-8f003cc6.cjs");require("react/jsx-runtime");require("react");require("./USE_SERVER_BUNDLE-78eb2f70.cjs");require("next/navigation");require("lru-cache");exports.BuilderContext=t.builderContext;exports.Button=t.Button;exports.Fragment=t.FragmentComponent;exports.Image=t.Image;exports.Section=t.SectionComponent;exports.Video=t.Video;exports.Blocks=e.Blocks;exports.Columns=e.Columns;exports.Content=e.ContentVariants;exports.Symbol=e.Symbol;exports.Text=e.Text;exports._processContentResult=e._processContentResult;exports.createRegisterComponentMessage=e.createRegisterComponentMessage;exports.fetchBuilderProps=e.fetchBuilderProps;exports.fetchEntries=e.fetchEntries;exports.fetchOneEntry=e.fetchOneEntry;exports.getBuilderSearchParams=e.getBuilderSearchParams;exports.isEditing=e.isEditing;exports.isPreviewing=e.isPreviewing;exports.register=e.register;exports.setEditorSettings=e.setEditorSettings;exports.subscribeToEditor=e.subscribeToEditor;exports.track=e.track;
|
package/lib/edge/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { f as n, c as m, F as c, d as p, S as g, V as d } from "./USE_CLIENT_BUNDLE-
|
|
2
|
-
import { B as l, C as f, x as B, S as C, T as E, G as S, u as x, F as h, H as b, v as y, A as F, c as P, j as T, y as k, z as v, E as R, D as V } from "./bundle-
|
|
1
|
+
import { f as n, c as m, F as c, d as p, S as g, V as d } from "./USE_CLIENT_BUNDLE-e4abd45c.js";
|
|
2
|
+
import { B as l, C as f, x as B, S as C, T as E, G as S, u as x, F as h, H as b, v as y, A as F, c as P, j as T, y as k, z as v, E as R, D as V } from "./bundle-2dc98ad8.js";
|
|
3
3
|
import "react/jsx-runtime";
|
|
4
4
|
import "react";
|
|
5
|
-
import "./USE_SERVER_BUNDLE-
|
|
5
|
+
import "./USE_SERVER_BUNDLE-f025d6d8.js";
|
|
6
6
|
import "next/navigation";
|
|
7
7
|
import "lru-cache";
|
|
8
8
|
export {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as a, Fragment as
|
|
3
|
-
import { i as Z, g as H, a as $, b as O, c as
|
|
2
|
+
import { jsx as a, Fragment as w, jsxs as I } from "react/jsx-runtime";
|
|
3
|
+
import { i as Z, g as H, a as $, b as O, c as E, d as R, e as p, f as _, h as V, _ as D, j as ee, l as te, k as ne, m as ie, t as ae, n as U, o as ce, p as re, q as le, r as oe, s as de, u as se, v as ue } from "./bundle-90827143.js";
|
|
4
4
|
import { useRef as T, useState as C, useEffect as f, createContext as me } from "react";
|
|
5
|
-
import { p as ge } from "./USE_SERVER_BUNDLE-
|
|
5
|
+
import { p as ge } from "./USE_SERVER_BUNDLE-3c35d11e.js";
|
|
6
6
|
import { useRouter as be } from "next/navigation";
|
|
7
7
|
function J(e) {
|
|
8
|
-
return /* @__PURE__ */ a(
|
|
8
|
+
return /* @__PURE__ */ a(w, { children: Z(e.TagName) ? /* @__PURE__ */ a(w, { children: /* @__PURE__ */ a(e.TagName, { ...e.attributes, ...e.actionAttributes }) }) : /* @__PURE__ */ a(w, { children: typeof e.TagName == "string" ? /* @__PURE__ */ a(e.TagName, { ...e.attributes, ...e.actionAttributes, children: e.children }) : /* @__PURE__ */ a(e.TagName, { ...e.attributes, ...e.actionAttributes, children: e.children }) }) });
|
|
9
9
|
}
|
|
10
10
|
function ke(e) {
|
|
11
11
|
function i() {
|
|
@@ -52,7 +52,7 @@ function Ce(e) {
|
|
|
52
52
|
}
|
|
53
53
|
);
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function Ee(e) {
|
|
56
56
|
function i() {
|
|
57
57
|
return e.includeBlockProps ? {
|
|
58
58
|
...$({
|
|
@@ -70,14 +70,14 @@ function we(e) {
|
|
|
70
70
|
}
|
|
71
71
|
return /* @__PURE__ */ a(e.Wrapper, { ...e.wrapperProps, attributes: i(), children: e.children });
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function we(e) {
|
|
74
74
|
function i() {
|
|
75
75
|
var r;
|
|
76
76
|
return "builder-blocks" + ((r = e.blocks) != null && r.length ? "" : " no-blocks");
|
|
77
77
|
}
|
|
78
78
|
function s() {
|
|
79
79
|
var r, g;
|
|
80
|
-
|
|
80
|
+
E() && !((r = e.blocks) != null && r.length) && ((g = window.parent) == null || g.postMessage(
|
|
81
81
|
{
|
|
82
82
|
type: "builder.clickEmptyBlocks",
|
|
83
83
|
data: {
|
|
@@ -90,7 +90,7 @@ function Ee(e) {
|
|
|
90
90
|
}
|
|
91
91
|
function S() {
|
|
92
92
|
var r, g;
|
|
93
|
-
|
|
93
|
+
E() && !((r = e.blocks) != null && r.length) && ((g = window.parent) == null || g.postMessage(
|
|
94
94
|
{
|
|
95
95
|
type: "builder.hoverEmptyBlocks",
|
|
96
96
|
data: {
|
|
@@ -101,7 +101,7 @@ function Ee(e) {
|
|
|
101
101
|
"*"
|
|
102
102
|
));
|
|
103
103
|
}
|
|
104
|
-
return /* @__PURE__ */ I(
|
|
104
|
+
return /* @__PURE__ */ I(w, { children: [
|
|
105
105
|
/* @__PURE__ */ a(
|
|
106
106
|
e.BlocksWrapper,
|
|
107
107
|
{
|
|
@@ -156,8 +156,8 @@ function Pe(e) {
|
|
|
156
156
|
};
|
|
157
157
|
return e.aspectRatio ? m : void 0;
|
|
158
158
|
}
|
|
159
|
-
return /* @__PURE__ */ I(
|
|
160
|
-
/* @__PURE__ */ I(
|
|
159
|
+
return /* @__PURE__ */ I(w, { children: [
|
|
160
|
+
/* @__PURE__ */ I(w, { children: [
|
|
161
161
|
/* @__PURE__ */ I("picture", { children: [
|
|
162
162
|
s() ? /* @__PURE__ */ a("source", { type: "image/webp", srcSet: s() }) : null,
|
|
163
163
|
/* @__PURE__ */ a(
|
|
@@ -187,7 +187,7 @@ function Pe(e) {
|
|
|
187
187
|
}
|
|
188
188
|
}
|
|
189
189
|
) : null,
|
|
190
|
-
(h = (v = e.builderBlock) == null ? void 0 : v.children) != null && h.length && e.fitContent ? /* @__PURE__ */ a(
|
|
190
|
+
(h = (v = e.builderBlock) == null ? void 0 : v.children) != null && h.length && e.fitContent ? /* @__PURE__ */ a(w, { children: e.children }) : null,
|
|
191
191
|
!e.fitContent && ((o = (b = e.builderBlock) == null ? void 0 : b.children) != null && o.length) ? /* @__PURE__ */ a("div", { className: "div-3ac67dd4-2", children: e.children }) : null
|
|
192
192
|
] }),
|
|
193
193
|
/* @__PURE__ */ a("style", { children: `.img-3ac67dd4 {
|
|
@@ -311,7 +311,7 @@ function Be(e) {
|
|
|
311
311
|
src: e.imgSrc || e.image,
|
|
312
312
|
...e.attributes
|
|
313
313
|
},
|
|
314
|
-
|
|
314
|
+
E() && e.imgSrc || "default-key"
|
|
315
315
|
);
|
|
316
316
|
}
|
|
317
317
|
function Le(e) {
|
|
@@ -530,7 +530,7 @@ function je(e) {
|
|
|
530
530
|
var t, l;
|
|
531
531
|
const n = ((l = (t = e.builderContextSignal.content) == null ? void 0 : t.data) == null ? void 0 : l.httpRequests) ?? {};
|
|
532
532
|
Object.entries(n).forEach(([c, u]) => {
|
|
533
|
-
if (!u || d[c] || o[c] && !
|
|
533
|
+
if (!u || d[c] || o[c] && !E())
|
|
534
534
|
return;
|
|
535
535
|
d[c] = !0;
|
|
536
536
|
const y = u.replace(
|
|
@@ -558,7 +558,7 @@ function je(e) {
|
|
|
558
558
|
});
|
|
559
559
|
}
|
|
560
560
|
function P() {
|
|
561
|
-
|
|
561
|
+
E() && window.dispatchEvent(
|
|
562
562
|
new CustomEvent(
|
|
563
563
|
"builder:component:stateChange",
|
|
564
564
|
{
|
|
@@ -596,7 +596,7 @@ function je(e) {
|
|
|
596
596
|
}
|
|
597
597
|
function j(n) {
|
|
598
598
|
const t = new URL(location.href).searchParams, l = t.get("builder.preview"), c = t.get(
|
|
599
|
-
`builder.
|
|
599
|
+
`builder.overrides.${l}`
|
|
600
600
|
), u = t.get("apiKey") || t.get("builder.space");
|
|
601
601
|
l === e.model && u === e.apiKey && (!e.content || c === e.content.id) && ue({
|
|
602
602
|
model: e.model,
|
|
@@ -634,7 +634,7 @@ function je(e) {
|
|
|
634
634
|
}, []), f(() => {
|
|
635
635
|
var n, t;
|
|
636
636
|
if (_()) {
|
|
637
|
-
if (
|
|
637
|
+
if (E() && i.current && i.current.dispatchEvent(new CustomEvent("initeditingbldr")), e.builderContextSignal.content && V(e.canTrack)) {
|
|
638
638
|
const c = (n = e.builderContextSignal.content) == null ? void 0 : n.testVariationId, u = (t = e.builderContextSignal.content) == null ? void 0 : t.id, y = e.apiKey;
|
|
639
639
|
D({
|
|
640
640
|
type: "impression",
|
|
@@ -644,11 +644,11 @@ function je(e) {
|
|
|
644
644
|
variationId: c !== u ? c : void 0
|
|
645
645
|
});
|
|
646
646
|
}
|
|
647
|
-
ee() &&
|
|
647
|
+
ee() && E();
|
|
648
648
|
}
|
|
649
649
|
}, []), f(() => {
|
|
650
650
|
e.apiKey || te.error(
|
|
651
|
-
"No API key provided to `
|
|
651
|
+
"No API key provided to `Content` component. This can cause issues. Please provide an API key using the `apiKey` prop."
|
|
652
652
|
), b(), B(), P();
|
|
653
653
|
}, []), f(() => {
|
|
654
654
|
}, [e.content]), f(() => {
|
|
@@ -690,10 +690,10 @@ export {
|
|
|
690
690
|
J as D,
|
|
691
691
|
Ne as E,
|
|
692
692
|
Ie as F,
|
|
693
|
-
|
|
693
|
+
Ee as I,
|
|
694
694
|
Re as S,
|
|
695
695
|
Le as V,
|
|
696
|
-
|
|
696
|
+
we as a,
|
|
697
697
|
Be as b,
|
|
698
698
|
ke as c,
|
|
699
699
|
Pe as d,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use client";"use strict";const t=require("react/jsx-runtime"),n=require("./bundle-
|
|
1
|
+
"use client";"use strict";const t=require("react/jsx-runtime"),n=require("./bundle-df5510f7.cjs"),l=require("react"),D=require("./USE_SERVER_BUNDLE-e5e233d2.cjs"),H=require("next/navigation");function j(e){return t.jsx(t.Fragment,{children:n.isEmptyElement(e.TagName)?t.jsx(t.Fragment,{children:t.jsx(e.TagName,{...e.attributes,...e.actionAttributes})}):t.jsx(t.Fragment,{children:typeof e.TagName=="string"?t.jsx(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children}):t.jsx(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children})})})}function V(e){function c(){return{...e.attributes,[n.getClassPropName()]:`${e.link?"":"builder-button"} ${e.attributes[n.getClassPropName()]||""}`,...e.link?{href:e.link,target:e.openLinkInNewTab?"_blank":void 0,role:"link"}:{role:"button"}}}return t.jsx(j,{attributes:c(),TagName:e.link?e.builderLinkComponent||"a":"button",actionAttributes:{},children:e.text})}function U(e){return t.jsx(j,{TagName:e.Wrapper,attributes:n.getBlockProperties({block:e.block,context:e.context}),actionAttributes:n.getBlockActions({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context,stripPrefix:!0}),children:e.children})}function O(e){function c(){return e.includeBlockProps?{...n.getBlockProperties({block:e.block,context:e.context}),...n.getBlockActions({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context})}:{}}return t.jsx(e.Wrapper,{...e.wrapperProps,attributes:c(),children:e.children})}function $(e){function c(){var o;return"builder-blocks"+((o=e.blocks)!=null&&o.length?"":" no-blocks")}function g(){var o,b;n.isEditing()&&!((o=e.blocks)!=null&&o.length)&&((b=window.parent)==null||b.postMessage({type:"builder.clickEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}function S(){var o,b;n.isEditing()&&!((o=e.blocks)!=null&&o.length)&&((b=window.parent)==null||b.postMessage({type:"builder.hoverEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}return t.jsxs(t.Fragment,{children:[t.jsx(e.BlocksWrapper,{className:c()+" props-blocks-wrapper-7cd1560e","builder-path":e.path,"builder-parent-id":e.parent,style:e.styleProp,onClick:o=>g(),onMouseEnter:o=>S(),onKeyPress:o=>g(),...e.BlocksWrapperProps,children:e.children}),t.jsx("style",{children:`.props-blocks-wrapper-7cd1560e {
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
align-items: stretch;
|
|
@@ -18,4 +18,4 @@
|
|
|
18
18
|
left: 0;
|
|
19
19
|
width: 100%;
|
|
20
20
|
height: 100%;
|
|
21
|
-
}`})]})}function Q(e){return t.jsx("section",{...e.attributes,style:{width:"100%",alignSelf:"stretch",flexGrow:1,boxSizing:"border-box",maxWidth:e.maxWidth||1200,display:"flex",flexDirection:"column",alignItems:"stretch",marginLeft:"auto",marginRight:"auto"},children:e.children})}function X(e){const c=l.useRef(null),[g,S]=l.useState(()=>[]),[o,b]=l.useState(()=>[]);return l.useEffect(()=>{var x;if(!((x=c.current)!=null&&x.getElementsByTagName)||typeof window>"u")return;const v=c.current.getElementsByTagName("script");for(let h=0;h<v.length;h++){const s=v[h];if(s.src){if(g.includes(s.src))continue;g.push(s.src);const f=document.createElement("script");f.async=!0,f.src=s.src,document.head.appendChild(f)}else if(!s.type||["text/javascript","application/javascript","application/ecmascript"].includes(s.type)){if(o.includes(s.innerText))continue;try{o.push(s.innerText),new Function(s.innerText)()}catch(f){console.warn("`CustomCode`: Error running script:",f)}}}},[]),t.jsx("div",{ref:c,className:"builder-custom-code"+(e.replaceNodes?" replace-nodes":""),dangerouslySetInnerHTML:{__html:e.code}})}function Y(e){const c=l.useRef(null),[g,S]=l.useState(()=>[]),[o,b]=l.useState(()=>[]),[v,x]=l.useState(()=>!1);function h(){if(!c.current||!c.current.getElementsByTagName)return;const s=c.current.getElementsByTagName("script");for(let f=0;f<s.length;f++){const u=s[f];if(u.src&&!g.includes(u.src)){g.push(u.src);const k=document.createElement("script");k.async=!0,k.src=u.src,document.head.appendChild(k)}else if(n.isJsScript(u)&&!o.includes(u.innerText))try{o.push(u.innerText),new Function(u.innerText)()}catch(k){console.warn("`Embed`: Error running script:",k)}}}return l.useEffect(()=>{c.current&&!v&&(x(!0),h())},[c.current,v]),t.jsx("div",{className:"builder-embed",ref:c,dangerouslySetInnerHTML:{__html:e.content}})}function Z(e){return t.jsx("img",{style:{objectFit:e.backgroundSize||"cover",objectPosition:e.backgroundPosition||"center"},alt:e.altText,src:e.imgSrc||e.image,...e.attributes},n.isEditing()&&e.imgSrc||"default-key")}function p(e){var S,o,b,v,x,h,s;function c(){return{...e.autoPlay===!0?{autoPlay:!0}:{},...e.muted===!0?{muted:!0}:{},...e.controls===!0?{controls:!0}:{},...e.loop===!0?{loop:!0}:{},...e.playsInline===!0?{playsInline:!0}:{}}}function g(){return{...c()}}return t.jsxs("div",{style:{position:"relative"},children:[t.jsx("video",{className:"builder-video",...g(),preload:e.preload||"metadata",style:{width:"100%",height:"100%",...(S=e.attributes)==null?void 0:S.style,objectFit:e.fit,objectPosition:e.position,zIndex:2,borderRadius:"1px",...e.aspectRatio?{position:"absolute"}:null},src:e.video||"no-src",poster:e.posterImage,children:e.lazyLoad?null:t.jsx("source",{type:"video/mp4",src:e.video})}),e.aspectRatio&&!(e.fitContent&&((b=(o=e.builderBlock)==null?void 0:o.children)!=null&&b.length))?t.jsx("div",{style:{width:"100%",paddingTop:e.aspectRatio*100+"%",pointerEvents:"none",fontSize:"0px"}}):null,(x=(v=e.builderBlock)==null?void 0:v.children)!=null&&x.length&&e.fitContent?t.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"stretch"},children:e.children}):null,(s=(h=e.builderBlock)==null?void 0:h.children)!=null&&s.length&&!e.fitContent?t.jsx("div",{style:{pointerEvents:"none",display:"flex",flexDirection:"column",alignItems:"stretch",position:"absolute",top:"0",left:"0",width:"100%",height:"100%"},children:e.children}):null]})}const A=l.createContext({content:null,context:{},localState:void 0,rootSetState(){},rootState:{},apiKey:null,apiVersion:void 0,componentInfos:{},inheritedStyles:{},BlocksWrapper:"div",BlocksWrapperProps:{}});function ee(e){var T,B,N,L,F,W,q;const c=l.useRef(null);function g(a){var d,r;const i={...e.builderContextSignal.rootState,...a};e.builderContextSignal.rootSetState?(r=(d=e.builderContextSignal).rootSetState)==null||r.call(d,i):e.builderContextSignal.rootState=i}function S(a){var d,r,m,y,C;const i={...e.builderContextSignal.content,...a,data:{...(d=e.builderContextSignal.content)==null?void 0:d.data,...a==null?void 0:a.data},meta:{...(r=e.builderContextSignal.content)==null?void 0:r.meta,...a==null?void 0:a.meta,breakpoints:((m=a==null?void 0:a.meta)==null?void 0:m.breakpoints)||((C=(y=e.builderContextSignal.content)==null?void 0:y.meta)==null?void 0:C.breakpoints)}};D.postPreviewContent({value:i,key:i.id}).then(()=>{z.refresh()})}function o(){return e.showContent?{}:{hidden:!0,"aria-hidden":!0}}const[b,v]=l.useState(()=>e.contentWrapper||"div");function x(a){return n.createEditorListener({model:e.model,trustedHosts:e.trustedHosts,callbacks:{configureSdk:i=>{var m;const{breakpoints:d,contentId:r}=i;!r||r!==((m=e.builderContextSignal.content)==null?void 0:m.id)||d&&S({meta:{breakpoints:d}})},animation:i=>{n.triggerAnimation(i)},contentUpdate:i=>{S(i)}}})(a)}function h(){var i,d;const a=(d=(i=e.builderContextSignal.content)==null?void 0:i.data)==null?void 0:d.jsCode;a&&n.evaluate({code:a,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState,enableCache:!1})}const[s,f]=l.useState(()=>({})),[u,k]=l.useState(()=>({})),[
|
|
21
|
+
}`})]})}function Q(e){return t.jsx("section",{...e.attributes,style:{width:"100%",alignSelf:"stretch",flexGrow:1,boxSizing:"border-box",maxWidth:e.maxWidth||1200,display:"flex",flexDirection:"column",alignItems:"stretch",marginLeft:"auto",marginRight:"auto"},children:e.children})}function X(e){const c=l.useRef(null),[g,S]=l.useState(()=>[]),[o,b]=l.useState(()=>[]);return l.useEffect(()=>{var x;if(!((x=c.current)!=null&&x.getElementsByTagName)||typeof window>"u")return;const v=c.current.getElementsByTagName("script");for(let h=0;h<v.length;h++){const s=v[h];if(s.src){if(g.includes(s.src))continue;g.push(s.src);const f=document.createElement("script");f.async=!0,f.src=s.src,document.head.appendChild(f)}else if(!s.type||["text/javascript","application/javascript","application/ecmascript"].includes(s.type)){if(o.includes(s.innerText))continue;try{o.push(s.innerText),new Function(s.innerText)()}catch(f){console.warn("`CustomCode`: Error running script:",f)}}}},[]),t.jsx("div",{ref:c,className:"builder-custom-code"+(e.replaceNodes?" replace-nodes":""),dangerouslySetInnerHTML:{__html:e.code}})}function Y(e){const c=l.useRef(null),[g,S]=l.useState(()=>[]),[o,b]=l.useState(()=>[]),[v,x]=l.useState(()=>!1);function h(){if(!c.current||!c.current.getElementsByTagName)return;const s=c.current.getElementsByTagName("script");for(let f=0;f<s.length;f++){const u=s[f];if(u.src&&!g.includes(u.src)){g.push(u.src);const k=document.createElement("script");k.async=!0,k.src=u.src,document.head.appendChild(k)}else if(n.isJsScript(u)&&!o.includes(u.innerText))try{o.push(u.innerText),new Function(u.innerText)()}catch(k){console.warn("`Embed`: Error running script:",k)}}}return l.useEffect(()=>{c.current&&!v&&(x(!0),h())},[c.current,v]),t.jsx("div",{className:"builder-embed",ref:c,dangerouslySetInnerHTML:{__html:e.content}})}function Z(e){return t.jsx("img",{style:{objectFit:e.backgroundSize||"cover",objectPosition:e.backgroundPosition||"center"},alt:e.altText,src:e.imgSrc||e.image,...e.attributes},n.isEditing()&&e.imgSrc||"default-key")}function p(e){var S,o,b,v,x,h,s;function c(){return{...e.autoPlay===!0?{autoPlay:!0}:{},...e.muted===!0?{muted:!0}:{},...e.controls===!0?{controls:!0}:{},...e.loop===!0?{loop:!0}:{},...e.playsInline===!0?{playsInline:!0}:{}}}function g(){return{...c()}}return t.jsxs("div",{style:{position:"relative"},children:[t.jsx("video",{className:"builder-video",...g(),preload:e.preload||"metadata",style:{width:"100%",height:"100%",...(S=e.attributes)==null?void 0:S.style,objectFit:e.fit,objectPosition:e.position,zIndex:2,borderRadius:"1px",...e.aspectRatio?{position:"absolute"}:null},src:e.video||"no-src",poster:e.posterImage,children:e.lazyLoad?null:t.jsx("source",{type:"video/mp4",src:e.video})}),e.aspectRatio&&!(e.fitContent&&((b=(o=e.builderBlock)==null?void 0:o.children)!=null&&b.length))?t.jsx("div",{style:{width:"100%",paddingTop:e.aspectRatio*100+"%",pointerEvents:"none",fontSize:"0px"}}):null,(x=(v=e.builderBlock)==null?void 0:v.children)!=null&&x.length&&e.fitContent?t.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"stretch"},children:e.children}):null,(s=(h=e.builderBlock)==null?void 0:h.children)!=null&&s.length&&!e.fitContent?t.jsx("div",{style:{pointerEvents:"none",display:"flex",flexDirection:"column",alignItems:"stretch",position:"absolute",top:"0",left:"0",width:"100%",height:"100%"},children:e.children}):null]})}const A=l.createContext({content:null,context:{},localState:void 0,rootSetState(){},rootState:{},apiKey:null,apiVersion:void 0,componentInfos:{},inheritedStyles:{},BlocksWrapper:"div",BlocksWrapperProps:{}});function ee(e){var T,B,N,L,F,W,q;const c=l.useRef(null);function g(a){var d,r;const i={...e.builderContextSignal.rootState,...a};e.builderContextSignal.rootSetState?(r=(d=e.builderContextSignal).rootSetState)==null||r.call(d,i):e.builderContextSignal.rootState=i}function S(a){var d,r,m,y,C;const i={...e.builderContextSignal.content,...a,data:{...(d=e.builderContextSignal.content)==null?void 0:d.data,...a==null?void 0:a.data},meta:{...(r=e.builderContextSignal.content)==null?void 0:r.meta,...a==null?void 0:a.meta,breakpoints:((m=a==null?void 0:a.meta)==null?void 0:m.breakpoints)||((C=(y=e.builderContextSignal.content)==null?void 0:y.meta)==null?void 0:C.breakpoints)}};D.postPreviewContent({value:i,key:i.id}).then(()=>{z.refresh()})}function o(){return e.showContent?{}:{hidden:!0,"aria-hidden":!0}}const[b,v]=l.useState(()=>e.contentWrapper||"div");function x(a){return n.createEditorListener({model:e.model,trustedHosts:e.trustedHosts,callbacks:{configureSdk:i=>{var m;const{breakpoints:d,contentId:r}=i;!r||r!==((m=e.builderContextSignal.content)==null?void 0:m.id)||d&&S({meta:{breakpoints:d}})},animation:i=>{n.triggerAnimation(i)},contentUpdate:i=>{S(i)}}})(a)}function h(){var i,d;const a=(d=(i=e.builderContextSignal.content)==null?void 0:i.data)==null?void 0:d.jsCode;a&&n.evaluate({code:a,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState,enableCache:!1})}const[s,f]=l.useState(()=>({})),[u,k]=l.useState(()=>({})),[I,K]=l.useState(()=>!1);function _(a){var i,d;if(e.builderContextSignal.content){const r=(i=e.builderContextSignal.content)==null?void 0:i.testVariationId,m=(d=e.builderContextSignal.content)==null?void 0:d.id;n._track({type:"click",canTrack:n.getDefaultCanTrack(e.canTrack),contentId:m,apiKey:e.apiKey,variationId:r!==m?r:void 0,...n.getInteractionPropertiesForEvent(a),unique:!I})}I||K(!0)}function w(){var i,d;const a=((d=(i=e.builderContextSignal.content)==null?void 0:i.data)==null?void 0:d.httpRequests)??{};Object.entries(a).forEach(([r,m])=>{if(!m||u[r]||s[r]&&!n.isEditing())return;u[r]=!0;const y=m.replace(/{{([^}]+)}}/g,(C,M)=>String(n.evaluate({code:M,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState,enableCache:!0})));n.fetch(y).then(C=>C.json()).then(C=>{g({[r]:C}),s[r]=!0}).catch(C=>{console.error("error fetching dynamic data",m,C)}).finally(()=>{u[r]=!1})})}function E(){n.isEditing()&&window.dispatchEvent(new CustomEvent("builder:component:stateChange",{detail:{state:n.fastClone(e.builderContextSignal.rootState),ref:{name:e.model}}}))}function P(a){window.addEventListener("message",x),n.registerInsertMenu(),n.setupBrowserForEditing({...e.locale?{locale:e.locale}:{},...e.enrich?{enrich:e.enrich}:{},...e.trustedHosts?{trustedHosts:e.trustedHosts}:{}}),Object.values(e.builderContextSignal.componentInfos).forEach(i=>{var r;const d=n.createRegisterComponentMessage(i);(r=window.parent)==null||r.postMessage(d,"*")}),window.addEventListener("builder:component:stateChangeListenerActivated",E)}function R(a){const i=new URL(location.href).searchParams,d=i.get("builder.preview"),r=i.get(`builder.overrides.${d}`),m=i.get("apiKey")||i.get("builder.space");d===e.model&&m===e.apiKey&&(!e.content||r===e.content.id)&&n.fetchOneEntry({model:e.model,apiKey:e.apiKey,apiVersion:e.builderContextSignal.apiVersion}).then(y=>{y&&S(y)})}const z=H.useRouter();return l.useEffect(()=>{var a;return(a=c.current)==null||a.addEventListener("initeditingbldr",P),()=>{var i;return(i=c.current)==null?void 0:i.removeEventListener("initeditingbldr",P)}},[]),l.useEffect(()=>{var a;return(a=c.current)==null||a.addEventListener("initpreviewingbldr",R),()=>{var i;return(i=c.current)==null?void 0:i.removeEventListener("initpreviewingbldr",R)}},[]),l.useEffect(()=>{var a,i;if(n.isBrowser()){if(n.isEditing()&&c.current&&c.current.dispatchEvent(new CustomEvent("initeditingbldr")),e.builderContextSignal.content&&n.getDefaultCanTrack(e.canTrack)){const r=(a=e.builderContextSignal.content)==null?void 0:a.testVariationId,m=(i=e.builderContextSignal.content)==null?void 0:i.id,y=e.apiKey;n._track({type:"impression",canTrack:!0,contentId:m,apiKey:y,variationId:r!==m?r:void 0})}n.isPreviewing()&&n.isEditing()}},[]),l.useEffect(()=>{e.apiKey||n.logger.error("No API key provided to `Content` component. This can cause issues. Please provide an API key using the `apiKey` prop."),h(),w(),E()},[]),l.useEffect(()=>{},[e.content]),l.useEffect(()=>{h()},[(B=(T=e.builderContextSignal.content)==null?void 0:T.data)==null?void 0:B.jsCode]),l.useEffect(()=>{w()},[(L=(N=e.builderContextSignal.content)==null?void 0:N.data)==null?void 0:L.httpRequests]),l.useEffect(()=>{E()},[e.builderContextSignal.rootState]),l.useEffect(()=>{e.data&&g(e.data)},[e.data]),l.useEffect(()=>{e.locale&&g({locale:e.locale})},[e.locale]),l.useEffect(()=>()=>{n.isBrowser()&&(window.removeEventListener("message",x),window.removeEventListener("builder:component:stateChangeListenerActivated",E))},[]),t.jsx(A.Provider,{value:e.builderContextSignal,children:e.builderContextSignal.content?t.jsx(b,{ref:c,onClick:a=>_(a),"builder-content-id":(F=e.builderContextSignal.content)==null?void 0:F.id,"builder-model":e.model,...o(),...e.contentWrapperProps,className:n.getWrapperClassName(((W=e.content)==null?void 0:W.testVariationId)||((q=e.content)==null?void 0:q.id)),children:e.children}):null})}exports.BlockWrapper=U;exports.BlocksWrapper=$;exports.Button=V;exports.CustomCode=X;exports.DynamicRenderer=j;exports.Embed=Y;exports.EnableEditor=ee;exports.FragmentComponent=J;exports.Image=G;exports.ImgComponent=Z;exports.InteractiveElement=O;exports.SectionComponent=Q;exports.Video=p;exports.builderContext=A;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use server";"use strict";const n=require("./bundle-
|
|
1
|
+
"use server";"use strict";const n=require("./bundle-df5510f7.cjs");async function s({key:e,value:t}){return n.init(),globalThis._BUILDER_PREVIEW_LRU_CACHE.set(e,t),{[e]:t}}exports.postPreviewContent=s;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, Fragment, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
3
|
import { LRUCache } from "lru-cache";
|
|
4
|
-
import { I as InteractiveElement, B as BlockWrapper, a as BlocksWrapper, D as DynamicRenderer, C as CustomCode, E as Embed, b as ImgComponent, V as Video, c as Button, F as FragmentComponent, d as Image, S as SectionComponent, e as EnableEditor } from "./USE_CLIENT_BUNDLE-
|
|
4
|
+
import { I as InteractiveElement, B as BlockWrapper, a as BlocksWrapper, D as DynamicRenderer, C as CustomCode, E as Embed, b as ImgComponent, V as Video, c as Button, F as FragmentComponent, d as Image, S as SectionComponent, e as EnableEditor } from "./USE_CLIENT_BUNDLE-ef4baa66.js";
|
|
5
5
|
import "next/navigation";
|
|
6
6
|
const EMPTY_HTML_ELEMENTS = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), isEmptyElement = (e) => typeof e == "string" && EMPTY_HTML_ELEMENTS.has(e.toLowerCase()), TARGET = "rsc", getClassPropName = () => {
|
|
7
7
|
switch (TARGET) {
|
|
@@ -396,7 +396,7 @@ function getProcessedBlock({
|
|
|
396
396
|
context: t
|
|
397
397
|
}) : a;
|
|
398
398
|
}
|
|
399
|
-
const camelToKebabCase = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), convertStyleMapToCSSArray = (e) => Object.entries(e).map(([n, o]) => {
|
|
399
|
+
const camelToKebabCase = (e) => e ? e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase() : "", convertStyleMapToCSSArray = (e) => Object.entries(e).map(([n, o]) => {
|
|
400
400
|
if (typeof o == "string")
|
|
401
401
|
return `${camelToKebabCase(n)}: ${o};`;
|
|
402
402
|
}).filter(checkIsDefined), convertStyleMapToCSS = (e) => convertStyleMapToCSSArray(e).join(`
|
|
@@ -495,7 +495,7 @@ const getComponent = ({
|
|
|
495
495
|
},
|
|
496
496
|
block: o
|
|
497
497
|
}));
|
|
498
|
-
}, shouldPassLinkComponent = (e) => e && (e.isRSC || ["Core:Button", "Symbol", "Columns", "Form:Form", "Builder: Tabs"].includes(e.name)), shouldPassRegisteredComponents = (e) => e && (e.isRSC || ["Symbol", "Columns", "Form:Form", "Builder: Tabs"].includes(e.name)), SIZES = {
|
|
498
|
+
}, shouldPassLinkComponent = (e) => e && (e.isRSC || ["Core:Button", "Symbol", "Columns", "Form:Form", "Builder: Tabs", "Builder:Accordion"].includes(e.name)), shouldPassRegisteredComponents = (e) => e && (e.isRSC || ["Symbol", "Columns", "Form:Form", "Builder: Tabs", "Builder:Accordion"].includes(e.name)), SIZES = {
|
|
499
499
|
small: {
|
|
500
500
|
min: 320,
|
|
501
501
|
default: 321,
|
|
@@ -547,47 +547,6 @@ function InlinedStyles(e) {
|
|
|
547
547
|
}
|
|
548
548
|
);
|
|
549
549
|
}
|
|
550
|
-
function assign(e, ...t) {
|
|
551
|
-
const n = Object(e);
|
|
552
|
-
for (let o = 1; o < arguments.length; o++) {
|
|
553
|
-
const r = arguments[o];
|
|
554
|
-
if (r != null)
|
|
555
|
-
for (const i in r)
|
|
556
|
-
Object.prototype.hasOwnProperty.call(r, i) && (n[i] = r[i]);
|
|
557
|
-
}
|
|
558
|
-
return n;
|
|
559
|
-
}
|
|
560
|
-
const camelCaseToKebabCase = (e) => e ? e.replace(/([A-Z])/g, (t) => `-${t[0].toLowerCase()}`) : "";
|
|
561
|
-
function warnElementNotPresent(e) {
|
|
562
|
-
console.warn(`Cannot animate element: element with ID ${e} not found!`);
|
|
563
|
-
}
|
|
564
|
-
function augmentAnimation(e, t) {
|
|
565
|
-
const n = getAllStylesUsed(e), o = getComputedStyle(t), r = e.steps[0].styles, i = e.steps[e.steps.length - 1].styles, a = [r, i];
|
|
566
|
-
for (const s of a)
|
|
567
|
-
for (const c of n)
|
|
568
|
-
c in s || (s[c] = o[c]);
|
|
569
|
-
}
|
|
570
|
-
function getAllStylesUsed(e) {
|
|
571
|
-
const t = [];
|
|
572
|
-
for (const n of e.steps)
|
|
573
|
-
for (const o in n.styles)
|
|
574
|
-
t.indexOf(o) === -1 && t.push(o);
|
|
575
|
-
return t;
|
|
576
|
-
}
|
|
577
|
-
function triggerAnimation(e) {
|
|
578
|
-
const t = Array.prototype.slice.call(document.getElementsByClassName(e.elementId || e.id || ""));
|
|
579
|
-
if (!t.length) {
|
|
580
|
-
warnElementNotPresent(e.elementId || e.id || "");
|
|
581
|
-
return;
|
|
582
|
-
}
|
|
583
|
-
Array.from(t).forEach((n) => {
|
|
584
|
-
augmentAnimation(e, n), n.style.transition = "none", n.style.transitionDelay = "0", assign(n.style, e.steps[0].styles), setTimeout(() => {
|
|
585
|
-
n.style.transition = `all ${e.duration}s ${camelCaseToKebabCase(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s"), assign(n.style, e.steps[1].styles), setTimeout(() => {
|
|
586
|
-
n.style.transition = "", n.style.transitionDelay = "";
|
|
587
|
-
}, (e.delay || 0) * 1e3 + e.duration * 1e3 + 100);
|
|
588
|
-
});
|
|
589
|
-
});
|
|
590
|
-
}
|
|
591
550
|
function BlockStyles(e) {
|
|
592
551
|
const t = function() {
|
|
593
552
|
const r = getProcessedBlock({
|
|
@@ -638,7 +597,7 @@ function BlockStyles(e) {
|
|
|
638
597
|
className: `${l}:hover`,
|
|
639
598
|
styles: {
|
|
640
599
|
...S,
|
|
641
|
-
transition: `all ${p.duration}s ${
|
|
600
|
+
transition: `all ${p.duration}s ${camelToKebabCase(
|
|
642
601
|
p.easing
|
|
643
602
|
)}`,
|
|
644
603
|
transitionDelay: p.delay ? `${p.delay}s` : "0s"
|
|
@@ -1030,7 +989,7 @@ function Columns(e) {
|
|
|
1030
989
|
/* @__PURE__ */ jsxs(
|
|
1031
990
|
"div",
|
|
1032
991
|
{
|
|
1033
|
-
className: getColumnsClass((p = e.builderBlock) == null ? void 0 : p.id) + " div-
|
|
992
|
+
className: getColumnsClass((p = e.builderBlock) == null ? void 0 : p.id) + " div-eeca3604",
|
|
1034
993
|
style: f(),
|
|
1035
994
|
children: [
|
|
1036
995
|
/* @__PURE__ */ jsx(InlinedStyles, { id: "builderio-columns", styles: g() }),
|
|
@@ -1060,7 +1019,7 @@ function Columns(e) {
|
|
|
1060
1019
|
]
|
|
1061
1020
|
}
|
|
1062
1021
|
),
|
|
1063
|
-
/* @__PURE__ */ jsx("style", { children: `.div-
|
|
1022
|
+
/* @__PURE__ */ jsx("style", { children: `.div-eeca3604 {
|
|
1064
1023
|
display: flex;
|
|
1065
1024
|
line-height: normal;
|
|
1066
1025
|
}` })
|
|
@@ -2369,7 +2328,7 @@ function isFromTrustedHost(e, t) {
|
|
|
2369
2328
|
const n = new URL(t.origin), o = n.hostname;
|
|
2370
2329
|
return (e || DEFAULT_TRUSTED_HOSTS).findIndex((r) => r.startsWith("*.") ? o.endsWith(r.slice(1)) : r === o) > -1;
|
|
2371
2330
|
}
|
|
2372
|
-
const SDK_VERSION = "0.14.
|
|
2331
|
+
const SDK_VERSION = "0.14.25", registry = {};
|
|
2373
2332
|
function register(e, t) {
|
|
2374
2333
|
let n = registry[e];
|
|
2375
2334
|
if (n || (n = registry[e] = []), n.push(t), isBrowser()) {
|
|
@@ -2517,7 +2476,48 @@ const setupBrowserForEditing = (e = {}) => {
|
|
|
2517
2476
|
return window.addEventListener("message", o), () => {
|
|
2518
2477
|
window.removeEventListener("message", o);
|
|
2519
2478
|
};
|
|
2520
|
-
}
|
|
2479
|
+
};
|
|
2480
|
+
function assign(e, ...t) {
|
|
2481
|
+
const n = Object(e);
|
|
2482
|
+
for (let o = 1; o < arguments.length; o++) {
|
|
2483
|
+
const r = arguments[o];
|
|
2484
|
+
if (r != null)
|
|
2485
|
+
for (const i in r)
|
|
2486
|
+
Object.prototype.hasOwnProperty.call(r, i) && (n[i] = r[i]);
|
|
2487
|
+
}
|
|
2488
|
+
return n;
|
|
2489
|
+
}
|
|
2490
|
+
function warnElementNotPresent(e) {
|
|
2491
|
+
console.warn(`Cannot animate element: element with ID ${e} not found!`);
|
|
2492
|
+
}
|
|
2493
|
+
function augmentAnimation(e, t) {
|
|
2494
|
+
const n = getAllStylesUsed(e), o = getComputedStyle(t), r = e.steps[0].styles, i = e.steps[e.steps.length - 1].styles, a = [r, i];
|
|
2495
|
+
for (const s of a)
|
|
2496
|
+
for (const c of n)
|
|
2497
|
+
c in s || (s[c] = o[c]);
|
|
2498
|
+
}
|
|
2499
|
+
function getAllStylesUsed(e) {
|
|
2500
|
+
const t = [];
|
|
2501
|
+
for (const n of e.steps)
|
|
2502
|
+
for (const o in n.styles)
|
|
2503
|
+
t.indexOf(o) === -1 && t.push(o);
|
|
2504
|
+
return t;
|
|
2505
|
+
}
|
|
2506
|
+
function triggerAnimation(e) {
|
|
2507
|
+
const t = Array.prototype.slice.call(document.getElementsByClassName(e.elementId || e.id || ""));
|
|
2508
|
+
if (!t.length) {
|
|
2509
|
+
warnElementNotPresent(e.elementId || e.id || "");
|
|
2510
|
+
return;
|
|
2511
|
+
}
|
|
2512
|
+
Array.from(t).forEach((n) => {
|
|
2513
|
+
augmentAnimation(e, n), n.style.transition = "none", n.style.transitionDelay = "0", assign(n.style, e.steps[0].styles), setTimeout(() => {
|
|
2514
|
+
n.style.transition = `all ${e.duration}s ${camelToKebabCase(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s"), assign(n.style, e.steps[1].styles), setTimeout(() => {
|
|
2515
|
+
n.style.transition = "", n.style.transitionDelay = "";
|
|
2516
|
+
}, (e.delay || 0) * 1e3 + e.duration * 1e3 + 100);
|
|
2517
|
+
});
|
|
2518
|
+
});
|
|
2519
|
+
}
|
|
2520
|
+
const getCssFromFont = (e) => {
|
|
2521
2521
|
var i;
|
|
2522
2522
|
const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], o = e.fileUrl ?? ((i = e == null ? void 0 : e.files) == null ? void 0 : i.regular);
|
|
2523
2523
|
let r = "";
|