@builder.io/sdk-react-nextjs 0.8.1 → 0.9.0
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-bf9c49b7.cjs +23 -0
- package/lib/browser/{USE_CLIENT_BUNDLE-0479ddc8.js → USE_CLIENT_BUNDLE-dfea4654.js} +195 -189
- package/lib/{edge/USE_SERVER_BUNDLE-70f5e4b2.cjs → browser/USE_SERVER_BUNDLE-ad40cda1.cjs} +1 -1
- package/lib/{edge/USE_SERVER_BUNDLE-de23a873.js → browser/USE_SERVER_BUNDLE-b7c58bed.js} +1 -1
- package/lib/browser/{bundle-179c65a2.js → bundle-a454b553.js} +285 -265
- package/lib/browser/{bundle-e4200429.cjs → bundle-dc5a8b6f.cjs} +10 -10
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +3 -3
- package/lib/{node/USE_CLIENT_BUNDLE-ac10325c.js → edge/USE_CLIENT_BUNDLE-ab37324a.js} +195 -189
- package/lib/edge/USE_CLIENT_BUNDLE-e6667575.cjs +23 -0
- package/lib/{node/USE_SERVER_BUNDLE-2b7a9305.js → edge/USE_SERVER_BUNDLE-839ea6b2.js} +1 -1
- package/lib/{node/USE_SERVER_BUNDLE-de4b4ff0.cjs → edge/USE_SERVER_BUNDLE-fce92ad5.cjs} +1 -1
- package/lib/edge/{bundle-a1501121.cjs → bundle-af3f93cf.cjs} +30 -30
- package/lib/edge/{bundle-a958c31b.js → bundle-c0cd3b98.js} +1034 -1014
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +3 -3
- package/lib/node/USE_CLIENT_BUNDLE-ed964e93.cjs +23 -0
- package/lib/{edge/USE_CLIENT_BUNDLE-8c3da5c9.js → node/USE_CLIENT_BUNDLE-f9aeb249.js} +195 -189
- package/lib/{browser/USE_SERVER_BUNDLE-88940a10.js → node/USE_SERVER_BUNDLE-4a85453c.js} +1 -1
- package/lib/{browser/USE_SERVER_BUNDLE-71c86494.cjs → node/USE_SERVER_BUNDLE-8da077cb.cjs} +1 -1
- package/lib/node/{bundle-ef482315.cjs → bundle-0a83b0be.cjs} +9 -9
- package/lib/node/{bundle-59bd1206.js → bundle-1b559f4d.js} +185 -165
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +3 -3
- package/package.json +1 -1
- package/types/cjs/components/blocks/blocks-wrapper.d.ts +8 -0
- package/types/cjs/components/blocks/blocks.d.ts +1 -1
- package/types/cjs/components/content/components/enable-editor.d.ts +1 -1
- package/types/cjs/components/content-variants/content-variants.types.d.ts +16 -0
- package/types/cjs/constants/sdk-version.d.ts +1 -1
- package/types/cjs/context/types.d.ts +2 -1
- package/types/cjs/functions/transform-block-properties.d.ts +5 -1
- package/types/cjs/types/enforced-partials.d.ts +7 -2
- package/types/esm/components/blocks/blocks-wrapper.d.ts +8 -0
- package/types/esm/components/blocks/blocks.d.ts +1 -1
- package/types/esm/components/content/components/enable-editor.d.ts +1 -1
- package/types/esm/components/content-variants/content-variants.types.d.ts +16 -0
- package/types/esm/constants/sdk-version.d.ts +1 -1
- package/types/esm/context/types.d.ts +2 -1
- package/types/esm/functions/transform-block-properties.d.ts +5 -1
- package/types/esm/types/enforced-partials.d.ts +7 -2
- package/lib/browser/USE_CLIENT_BUNDLE-38635250.cjs +0 -23
- package/lib/edge/USE_CLIENT_BUNDLE-7d1db7a7.cjs +0 -23
- package/lib/node/USE_CLIENT_BUNDLE-1fd9261f.cjs +0 -23
- package/types/cjs/functions/get-react-native-block-styles.d.ts +0 -7
- package/types/cjs/functions/sanitize-react-native-block-styles.d.ts +0 -3
- package/types/esm/functions/get-react-native-block-styles.d.ts +0 -7
- package/types/esm/functions/sanitize-react-native-block-styles.d.ts +0 -3
package/lib/node/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./bundle-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./bundle-0a83b0be.cjs"),t=require("./USE_CLIENT_BUNDLE-ed964e93.cjs");require("lru-cache");require("react/jsx-runtime");require("react");require("next/navigation");require("./USE_SERVER_BUNDLE-8da077cb.cjs");exports.Blocks=e.Blocks;exports.Columns=e.Columns;exports.Content=e.ContentVariants;exports.RenderBlocks=e.RenderBlocks;exports.RenderContent=e.RenderContent;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.getAllContent=e.getAllContent;exports.getBuilderSearchParams=e.getBuilderSearchParams;exports.getContent=e.getContent;exports.isEditing=e.isEditing;exports.isPreviewing=e.isPreviewing;exports.register=e.register;exports.setEditorSettings=e.setEditorSettings;exports.track=e.track;exports.Button=t.Button;exports.Fragment=t.FragmentComponent;exports.Image=t.Image;exports.Section=t.SectionComponent;exports.Video=t.Video;
|
package/lib/node/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { B as i, t as m, C as c, R as g, q as p, S as l, T as C, w as d, m as f, E as u, x as B, n as S, y as E, A as R, z as h, i as x, f as k, u as y, v as P, D as b } from "./bundle-
|
|
2
|
-
import { b as w, F as A, c as F, S as T, V } from "./USE_CLIENT_BUNDLE-
|
|
1
|
+
import { B as i, t as m, C as c, R as g, q as p, S as l, T as C, w as d, m as f, E as u, x as B, n as S, y as E, A as R, z as h, i as x, f as k, u as y, v as P, D as b } from "./bundle-1b559f4d.js";
|
|
2
|
+
import { b as w, F as A, c as F, S as T, V } from "./USE_CLIENT_BUNDLE-f9aeb249.js";
|
|
3
3
|
import "lru-cache";
|
|
4
4
|
import "react/jsx-runtime";
|
|
5
5
|
import "react";
|
|
6
6
|
import "next/navigation";
|
|
7
|
-
import "./USE_SERVER_BUNDLE-
|
|
7
|
+
import "./USE_SERVER_BUNDLE-4a85453c.js";
|
|
8
8
|
export {
|
|
9
9
|
i as Blocks,
|
|
10
10
|
w as Button,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@builder.io/sdk-react-nextjs",
|
|
3
3
|
"description": "Builder.io RSC SDK for NextJS App Directory",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.9.0",
|
|
5
5
|
"homepage": "https://github.com/BuilderIO/builder/tree/main/packages/sdks/output/nextjs",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -4,6 +4,14 @@ export type BlocksWrapperProps = {
|
|
|
4
4
|
parent: string | undefined;
|
|
5
5
|
path: string | undefined;
|
|
6
6
|
styleProp: Record<string, any> | undefined;
|
|
7
|
+
/**
|
|
8
|
+
* The element that wraps each list of blocks. Defaults to a `div` element ('ScrollView' in React Native).
|
|
9
|
+
*/
|
|
10
|
+
BlocksWrapper: any;
|
|
11
|
+
/**
|
|
12
|
+
* Additonal props to pass to `blocksWrapper`. Defaults to `{}`.
|
|
13
|
+
*/
|
|
14
|
+
BlocksWrapperProps: any;
|
|
7
15
|
};
|
|
8
16
|
import type { BuilderBlock } from "../../types/builder-block.js";
|
|
9
17
|
import type { PropsWithChildren } from "../../types/typescript.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
export type BlocksProps = Partial<BlocksWrapperProps
|
|
2
|
+
export type BlocksProps = Partial<Omit<BlocksWrapperProps, "BlocksWrapper" | "BlocksWrapperProps">> & {
|
|
3
3
|
context?: BuilderContextInterface;
|
|
4
4
|
registeredComponents?: RegisteredComponents;
|
|
5
5
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
type BuilderEditorProps = Omit<ContentProps, "customComponents" | "data" | "apiVersion" | "isSsrAbTest"> & {
|
|
2
|
+
type BuilderEditorProps = Omit<ContentProps, "customComponents" | "data" | "apiVersion" | "isSsrAbTest" | "blocksWrapper" | "blocksWrapperProps"> & {
|
|
3
3
|
builderContextSignal: BuilderContextInterface;
|
|
4
4
|
setBuilderContextSignal?: (signal: any) => any;
|
|
5
5
|
children?: any;
|
|
@@ -17,4 +17,20 @@ export interface ContentVariantsPrps {
|
|
|
17
17
|
/** @deprecated use `enrich` instead **/
|
|
18
18
|
includeRefs?: boolean;
|
|
19
19
|
enrich?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* The element that wraps your content. Defaults to `div` ('ScrollView' in React Native).
|
|
22
|
+
*/
|
|
23
|
+
contentWrapper?: any;
|
|
24
|
+
/**
|
|
25
|
+
* Additonal props to pass to `contentWrapper`. Defaults to `{}`.
|
|
26
|
+
*/
|
|
27
|
+
contentWrapperProps?: any;
|
|
28
|
+
/**
|
|
29
|
+
* The element that wraps your blocks. Defaults to `div` ('ScrollView' in React Native).
|
|
30
|
+
*/
|
|
31
|
+
blocksWrapper?: any;
|
|
32
|
+
/**
|
|
33
|
+
* Additonal props to pass to `blocksWrapper`. Defaults to `{}`.
|
|
34
|
+
*/
|
|
35
|
+
blocksWrapperProps?: any;
|
|
20
36
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.
|
|
1
|
+
export declare const SDK_VERSION = "0.9.0";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { BlocksWrapperProps } from '../components/blocks/blocks-wrapper.js';
|
|
1
2
|
import type { ApiVersion } from '../types/api-version.js';
|
|
2
3
|
import type { BuilderContent } from '../types/builder-content.js';
|
|
3
4
|
import type { ComponentInfo } from '../types/components.js';
|
|
@@ -8,7 +9,7 @@ export type RegisteredComponent = ComponentInfo & {
|
|
|
8
9
|
export type RegisteredComponents = Dictionary<RegisteredComponent>;
|
|
9
10
|
export type BuilderRenderState = Record<string, unknown>;
|
|
10
11
|
export type BuilderRenderContext = Record<string, unknown>;
|
|
11
|
-
export interface BuilderContextInterface {
|
|
12
|
+
export interface BuilderContextInterface extends Pick<BlocksWrapperProps, 'BlocksWrapper' | 'BlocksWrapperProps'> {
|
|
12
13
|
content: Nullable<BuilderContent>;
|
|
13
14
|
context: BuilderRenderContext;
|
|
14
15
|
/**
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import type { Prettify } from './typescript.js';
|
|
2
|
+
/**
|
|
3
|
+
* Lol Typescript
|
|
4
|
+
* https://stackoverflow.com/questions/49927523/disallow-call-with-any/49928360#49928360
|
|
5
|
+
*/
|
|
6
|
+
type IfAny<T, Y, N> = 0 extends 1 & T ? Y : N;
|
|
2
7
|
type OptionalFieldsOnly<T> = {
|
|
3
|
-
[K in keyof T as T[K] extends Required<T>[K] ? never : K]: T[K];
|
|
8
|
+
[K in keyof T as T[K] extends Required<T>[K] ? IfAny<T[K], K, never> : K]: T[K];
|
|
4
9
|
};
|
|
5
10
|
type RequiredFieldsOnly<T> = {
|
|
6
|
-
[K in keyof T as T[K] extends Required<T>[K] ? K : never]: T[K];
|
|
11
|
+
[K in keyof T as T[K] extends Required<T>[K] ? IfAny<T[K], never, K> : never]: T[K];
|
|
7
12
|
};
|
|
8
13
|
type Enforced<T> = {
|
|
9
14
|
[K in keyof T]-?: T[K];
|
|
@@ -4,6 +4,14 @@ export type BlocksWrapperProps = {
|
|
|
4
4
|
parent: string | undefined;
|
|
5
5
|
path: string | undefined;
|
|
6
6
|
styleProp: Record<string, any> | undefined;
|
|
7
|
+
/**
|
|
8
|
+
* The element that wraps each list of blocks. Defaults to a `div` element ('ScrollView' in React Native).
|
|
9
|
+
*/
|
|
10
|
+
BlocksWrapper: any;
|
|
11
|
+
/**
|
|
12
|
+
* Additonal props to pass to `blocksWrapper`. Defaults to `{}`.
|
|
13
|
+
*/
|
|
14
|
+
BlocksWrapperProps: any;
|
|
7
15
|
};
|
|
8
16
|
import type { BuilderBlock } from "../../types/builder-block.js";
|
|
9
17
|
import type { PropsWithChildren } from "../../types/typescript.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
export type BlocksProps = Partial<BlocksWrapperProps
|
|
2
|
+
export type BlocksProps = Partial<Omit<BlocksWrapperProps, "BlocksWrapper" | "BlocksWrapperProps">> & {
|
|
3
3
|
context?: BuilderContextInterface;
|
|
4
4
|
registeredComponents?: RegisteredComponents;
|
|
5
5
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
type BuilderEditorProps = Omit<ContentProps, "customComponents" | "data" | "apiVersion" | "isSsrAbTest"> & {
|
|
2
|
+
type BuilderEditorProps = Omit<ContentProps, "customComponents" | "data" | "apiVersion" | "isSsrAbTest" | "blocksWrapper" | "blocksWrapperProps"> & {
|
|
3
3
|
builderContextSignal: BuilderContextInterface;
|
|
4
4
|
setBuilderContextSignal?: (signal: any) => any;
|
|
5
5
|
children?: any;
|
|
@@ -17,4 +17,20 @@ export interface ContentVariantsPrps {
|
|
|
17
17
|
/** @deprecated use `enrich` instead **/
|
|
18
18
|
includeRefs?: boolean;
|
|
19
19
|
enrich?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* The element that wraps your content. Defaults to `div` ('ScrollView' in React Native).
|
|
22
|
+
*/
|
|
23
|
+
contentWrapper?: any;
|
|
24
|
+
/**
|
|
25
|
+
* Additonal props to pass to `contentWrapper`. Defaults to `{}`.
|
|
26
|
+
*/
|
|
27
|
+
contentWrapperProps?: any;
|
|
28
|
+
/**
|
|
29
|
+
* The element that wraps your blocks. Defaults to `div` ('ScrollView' in React Native).
|
|
30
|
+
*/
|
|
31
|
+
blocksWrapper?: any;
|
|
32
|
+
/**
|
|
33
|
+
* Additonal props to pass to `blocksWrapper`. Defaults to `{}`.
|
|
34
|
+
*/
|
|
35
|
+
blocksWrapperProps?: any;
|
|
20
36
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.
|
|
1
|
+
export declare const SDK_VERSION = "0.9.0";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { BlocksWrapperProps } from '../components/blocks/blocks-wrapper.js';
|
|
1
2
|
import type { ApiVersion } from '../types/api-version.js';
|
|
2
3
|
import type { BuilderContent } from '../types/builder-content.js';
|
|
3
4
|
import type { ComponentInfo } from '../types/components.js';
|
|
@@ -8,7 +9,7 @@ export type RegisteredComponent = ComponentInfo & {
|
|
|
8
9
|
export type RegisteredComponents = Dictionary<RegisteredComponent>;
|
|
9
10
|
export type BuilderRenderState = Record<string, unknown>;
|
|
10
11
|
export type BuilderRenderContext = Record<string, unknown>;
|
|
11
|
-
export interface BuilderContextInterface {
|
|
12
|
+
export interface BuilderContextInterface extends Pick<BlocksWrapperProps, 'BlocksWrapper' | 'BlocksWrapperProps'> {
|
|
12
13
|
content: Nullable<BuilderContent>;
|
|
13
14
|
context: BuilderRenderContext;
|
|
14
15
|
/**
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import type { Prettify } from './typescript.js';
|
|
2
|
+
/**
|
|
3
|
+
* Lol Typescript
|
|
4
|
+
* https://stackoverflow.com/questions/49927523/disallow-call-with-any/49928360#49928360
|
|
5
|
+
*/
|
|
6
|
+
type IfAny<T, Y, N> = 0 extends 1 & T ? Y : N;
|
|
2
7
|
type OptionalFieldsOnly<T> = {
|
|
3
|
-
[K in keyof T as T[K] extends Required<T>[K] ? never : K]: T[K];
|
|
8
|
+
[K in keyof T as T[K] extends Required<T>[K] ? IfAny<T[K], K, never> : K]: T[K];
|
|
4
9
|
};
|
|
5
10
|
type RequiredFieldsOnly<T> = {
|
|
6
|
-
[K in keyof T as T[K] extends Required<T>[K] ? K : never]: T[K];
|
|
11
|
+
[K in keyof T as T[K] extends Required<T>[K] ? IfAny<T[K], never, K> : never]: T[K];
|
|
7
12
|
};
|
|
8
13
|
type Enforced<T> = {
|
|
9
14
|
[K in keyof T]-?: T[K];
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use client";"use strict";const t=require("react/jsx-runtime"),c=require("./bundle-e4200429.cjs"),l=require("react"),M=require("./USE_SERVER_BUNDLE-71c86494.cjs"),V=require("next/navigation");function W(e){return t.jsxs(t.Fragment,{children:[e.link?t.jsx(t.Fragment,{children:t.jsx("a",{...e.attributes,href:e.link,target:e.openLinkInNewTab?"_blank":void 0,role:"button",children:e.text})}):t.jsx(t.Fragment,{children:t.jsx("button",{...e.attributes,style:e.attributes.style,className:e.attributes.className+" button-5294b10c",children:e.text})}),t.jsx("style",{children:`.button-5294b10c {
|
|
2
|
-
all: unset;
|
|
3
|
-
}`})]})}function A(e){return t.jsxs(t.Fragment,{children:[" ",e.hasChildren?t.jsx(t.Fragment,{children:t.jsxs(e.Wrapper,{...c.getBlockProperties({block:e.block,context:e.context}),...c.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," "]})}):t.jsx(t.Fragment,{children:t.jsx(e.Wrapper,{...c.getBlockProperties({block:e.block,context:e.context}),...c.getBlockActions({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context,stripPrefix:!0})})})," "]})}function D(e){return t.jsx(e.Wrapper,{...e.wrapperProps,attributes:{...c.getBlockProperties({block:e.block,context:e.context}),...c.getBlockActions({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context})},children:e.children})}function U(e){function a(){var o;return"builder-blocks"+((o=e.blocks)!=null&&o.length?"":" no-blocks")}function g(){var o,h;c.isEditing()&&!((o=e.blocks)!=null&&o.length)&&((h=window.parent)==null||h.postMessage({type:"builder.clickEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}function S(){var o,h;c.isEditing()&&!((o=e.blocks)!=null&&o.length)&&((h=window.parent)==null||h.postMessage({type:"builder.hoverEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}return t.jsxs(t.Fragment,{children:[t.jsx("div",{className:a()+" div-02c7a115","builder-path":e.path,"builder-parent-id":e.parent,style:e.styleProp,onClick:o=>g(),onMouseEnter:o=>S(),onKeyPress:o=>g(),children:e.children}),t.jsx("style",{children:`.div-02c7a115 {
|
|
4
|
-
display: flex;
|
|
5
|
-
flex-direction: column;
|
|
6
|
-
align-items: stretch;
|
|
7
|
-
}`})]})}function H(e){return t.jsx("span",{children:e.children})}function O(e){var o,h,v,b;function a(){var x;const s=e.image||e.src;if(!s||!(s.match(/builder\.io/)||s.match(/cdn\.shopify\.com/)))return e.srcset;if(e.srcset&&((x=e.image)!=null&&x.includes("builder.io/api/v1/image"))){if(!e.srcset.includes(e.image.split("?")[0]))return console.debug("Removed given srcset"),c.getSrcSet(s)}else if(e.image&&!e.srcset)return c.getSrcSet(s);return c.getSrcSet(s)}function g(){var m;return(m=a==null?void 0:a())!=null&&m.match(/builder\.io/)&&!e.noWebp?a().replace(/\?/g,"?format=webp&"):""}function S(){const m={position:"absolute",height:"100%",width:"100%",left:"0px",top:"0px"};return e.aspectRatio?m:void 0}return t.jsxs(t.Fragment,{children:[t.jsxs(t.Fragment,{children:[t.jsxs("picture",{children:[g()?t.jsx(t.Fragment,{children:t.jsx("source",{type:"image/webp",srcSet:g()})}):null,t.jsx("img",{loading:"lazy",alt:e.altText,role:e.altText?"presentation":void 0,style:{objectPosition:e.backgroundPosition||"center",objectFit:e.backgroundSize||"cover",...S()},className:"builder-image"+(e.className?" "+e.className:"")+" img-dbab4030",src:e.image,srcSet:a(),sizes:e.sizes})]}),e.aspectRatio&&!((h=(o=e.builderBlock)==null?void 0:o.children)!=null&&h.length&&e.fitContent)?t.jsx(t.Fragment,{children:t.jsx("div",{className:"builder-image-sizer div-dbab4030",style:{paddingTop:e.aspectRatio*100+"%"}})}):null,(b=(v=e.builderBlock)==null?void 0:v.children)!=null&&b.length&&e.fitContent?t.jsx(t.Fragment,{children:e.children}):null,!e.fitContent&&e.children?t.jsx(t.Fragment,{children:t.jsx("div",{className:"div-dbab4030-2",children:e.children})}):null]}),t.jsx("style",{children:`.img-dbab4030 {
|
|
8
|
-
opacity: 1;
|
|
9
|
-
transition: opacity 0.2s ease-in-out;
|
|
10
|
-
}.div-dbab4030 {
|
|
11
|
-
width: 100%;
|
|
12
|
-
pointer-events: none;
|
|
13
|
-
font-size: 0;
|
|
14
|
-
}.div-dbab4030-2 {
|
|
15
|
-
display: flex;
|
|
16
|
-
flex-direction: column;
|
|
17
|
-
align-items: stretch;
|
|
18
|
-
position: absolute;
|
|
19
|
-
top: 0;
|
|
20
|
-
left: 0;
|
|
21
|
-
width: 100%;
|
|
22
|
-
height: 100%;
|
|
23
|
-
}`})]})}function J(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 $(e){const a=l.useRef(null),[g,S]=l.useState(()=>[]),[o,h]=l.useState(()=>[]);return l.useEffect(()=>{var b;if(!((b=a.current)!=null&&b.getElementsByTagName)||typeof window>"u")return;const v=a.current.getElementsByTagName("script");for(let m=0;m<v.length;m++){const s=v[m];if(s.src){if(g.includes(s.src))continue;g.push(s.src);const x=document.createElement("script");x.async=!0,x.src=s.src,document.head.appendChild(x)}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(x){console.warn("`CustomCode`: Error running script:",x)}}}},[]),t.jsx("div",{ref:a,className:"builder-custom-code"+(e.replaceNodes?" replace-nodes":""),dangerouslySetInnerHTML:{__html:e.code}})}function G(e){const a=l.useRef(null),[g,S]=l.useState(()=>[]),[o,h]=l.useState(()=>[]),[v,b]=l.useState(()=>!1);function m(){if(!a.current||!a.current.getElementsByTagName)return;const s=a.current.getElementsByTagName("script");for(let x=0;x<s.length;x++){const y=s[x];if(y.src&&!g.includes(y.src)){g.push(y.src);const k=document.createElement("script");k.async=!0,k.src=y.src,document.head.appendChild(k)}else if(c.isJsScript(y)&&!o.includes(y.innerText))try{o.push(y.innerText),new Function(y.innerText)()}catch(k){console.warn("`Embed`: Error running script:",k)}}}return l.useEffect(()=>{a.current&&!v&&(b(!0),m())},[a.current,v]),t.jsx("div",{className:"builder-embed",ref:a,dangerouslySetInnerHTML:{__html:e.content}})}function Q(e){return t.jsx("img",{style:{objectFit:e.backgroundSize||"cover",objectPosition:e.backgroundPosition||"center"},alt:e.altText,src:e.imgSrc||e.image,...e.attributes},c.isEditing()&&e.imgSrc||"default-key")}function X(e){var S,o,h,v,b,m,s;function a(){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{...a()}}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&&((h=(o=e.builderBlock)==null?void 0:o.children)!=null&&h.length))?t.jsx(t.Fragment,{children:t.jsx("div",{style:{width:"100%",paddingTop:e.aspectRatio*100+"%",pointerEvents:"none",fontSize:"0px"}})}):null,(b=(v=e.builderBlock)==null?void 0:v.children)!=null&&b.length&&e.fitContent?t.jsx(t.Fragment,{children:t.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"stretch"},children:e.children})}):null,(s=(m=e.builderBlock)==null?void 0:m.children)!=null&&s.length&&!e.fitContent?t.jsx(t.Fragment,{children: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 Y=l.createContext({content:null,context:{},localState:void 0,rootSetState(){},rootState:{},apiKey:null,apiVersion:void 0,componentInfos:{},inheritedStyles:{}});function Z(e){var R,I,P,F,B,T,N;const a=l.useRef(null),[g,S]=l.useState(()=>0);function o(n){var r,d,u,f,L;const i={...e.builderContextSignal.content,...n,data:{...(r=e.builderContextSignal.content)==null?void 0:r.data,...n==null?void 0:n.data},meta:{...(d=e.builderContextSignal.content)==null?void 0:d.meta,...n==null?void 0:n.meta,breakpoints:((u=n==null?void 0:n.meta)==null?void 0:u.breakpoints)||((L=(f=e.builderContextSignal.content)==null?void 0:f.meta)==null?void 0:L.breakpoints)}};M.postPreviewContent({value:i,key:i.id}).then(()=>{z.refresh()})}l.useState(()=>0);const[h,v]=l.useState(()=>!1);function b(n){var r;const{data:i}=n;if(i)switch(i.type){case"builder.configureSdk":{const d=i.data,{breakpoints:u,contentId:f}=d;if(!f||f!==((r=e.builderContextSignal.content)==null?void 0:r.id))return;u&&o({meta:{breakpoints:u}}),S(g+1);break}case"builder.contentUpdate":{const d=i.data,u=d.key||d.alias||d.entry||d.modelName,f=d.data;u===e.model&&(o(f),S(g+1));break}}}function m(){var i,r;const n=(r=(i=e.builderContextSignal.content)==null?void 0:i.data)==null?void 0:r.jsCode;n&&c.evaluate({code:n,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState})}const[s,x]=l.useState(()=>({})),[y,k]=l.useState(()=>!1);function K(n){var i,r;if(e.builderContextSignal.content){const d=(i=e.builderContextSignal.content)==null?void 0:i.testVariationId,u=(r=e.builderContextSignal.content)==null?void 0:r.id;c._track({type:"click",canTrack:c.getDefaultCanTrack(e.canTrack),contentId:u,apiKey:e.apiKey,variationId:d!==u?d:void 0,...c.getInteractionPropertiesForEvent(n),unique:!y})}y||k(!0)}function q(n){return n.replace(/{{([^}]+)}}/g,(i,r)=>c.evaluate({code:r,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState}))}function _({url:n,key:i}){c.fetch(n).then(r=>r.json()).then(r=>{var u,f;const d={...e.builderContextSignal.rootState,[i]:r};(f=(u=e.builderContextSignal).rootSetState)==null||f.call(u,d),s[i]=!0}).catch(r=>{console.error("error fetching dynamic data",n,r)})}function C(){var i,r;const n=((r=(i=e.builderContextSignal.content)==null?void 0:i.data)==null?void 0:r.httpRequests)??{};Object.entries(n).forEach(([d,u])=>{if(u&&(!s[d]||c.isEditing())){const f=q(u);_({url:f,key:d})}})}function E(){c.isEditing()&&window.dispatchEvent(new CustomEvent("builder:component:stateChange",{detail:{state:c.fastClone(e.builderContextSignal.rootState),ref:{name:e.model}}}))}function j(n){S(g+1),window.addEventListener("message",b),c.registerInsertMenu(),c.setupBrowserForEditing({...e.locale?{locale:e.locale}:{},...e.includeRefs?{includeRefs:e.includeRefs}:{},...e.enrich?{enrich:e.enrich}:{}}),Object.values(e.builderContextSignal.componentInfos).forEach(i=>{var d;const r=c.createRegisterComponentMessage(i);(d=window.parent)==null||d.postMessage(r,"*")}),window.addEventListener("builder:component:stateChangeListenerActivated",E)}function w(n){const i=new URL(location.href).searchParams,r=i.get("builder.preview"),d=i.get(`builder.preview.${r}`),u=i.get("apiKey")||i.get("builder.space");r===e.model&&u===e.apiKey&&(!e.content||d===e.content.id)&&c.fetchOneEntry({model:e.model,apiKey:e.apiKey,apiVersion:e.builderContextSignal.apiVersion}).then(f=>{f&&o(f)})}const z=V.useRouter();return l.useEffect(()=>{var n;return(n=a.current)==null||n.addEventListener("initeditingbldr",j),()=>{var i;return(i=a.current)==null?void 0:i.removeEventListener("initeditingbldr",j)}},[]),l.useEffect(()=>{var n;return(n=a.current)==null||n.addEventListener("initpreviewingbldr",w),()=>{var i;return(i=a.current)==null?void 0:i.removeEventListener("initpreviewingbldr",w)}},[]),l.useEffect(()=>{var n,i;if(c.isBrowser()){if(c.isEditing()&&a.current&&a.current.dispatchEvent(new CustomEvent("initeditingbldr")),e.builderContextSignal.content&&c.getDefaultCanTrack(e.canTrack)){const d=(n=e.builderContextSignal.content)==null?void 0:n.testVariationId,u=(i=e.builderContextSignal.content)==null?void 0:i.id,f=e.apiKey;c._track({type:"impression",canTrack:!0,contentId:u,apiKey:f,variationId:d!==u?d:void 0})}c.isPreviewing()&&a.current}},[]),l.useEffect(()=>{e.apiKey||c.logger.error("No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."),m(),C(),E()},[]),l.useEffect(()=>{},[e.content]),l.useEffect(()=>{c.isBrowser()&&(window.removeEventListener("message",b),window.addEventListener("message",b))},[h]),l.useEffect(()=>{m()},[(I=(R=e.builderContextSignal.content)==null?void 0:R.data)==null?void 0:I.jsCode,e.builderContextSignal.rootState]),l.useEffect(()=>{C()},[(F=(P=e.builderContextSignal.content)==null?void 0:P.data)==null?void 0:F.httpRequests]),l.useEffect(()=>{E()},[e.builderContextSignal.rootState]),l.useEffect(()=>()=>{c.isBrowser()&&(window.removeEventListener("message",b),window.removeEventListener("builder:component:stateChangeListenerActivated",E))},[]),t.jsx(Y.Provider,{value:e.builderContextSignal,children:e.builderContextSignal.content?t.jsx(t.Fragment,{children:l.createElement("div",{key:g,ref:a,onClick:n=>K(n),"builder-content-id":(B=e.builderContextSignal.content)==null?void 0:B.id,"builder-model":e.model,...e.showContent?{}:{hidden:!0,"aria-hidden":!0},className:`variant-${((T=e.content)==null?void 0:T.testVariationId)||((N=e.content)==null?void 0:N.id)}`},e.children)}):null})}exports.BlockWrapper=A;exports.BlocksWrapper=U;exports.Button=W;exports.CustomCode=$;exports.Embed=G;exports.EnableEditor=Z;exports.FragmentComponent=H;exports.Image=O;exports.ImgComponent=Q;exports.InteractiveElement=D;exports.SectionComponent=J;exports.Video=X;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use client";"use strict";const t=require("react/jsx-runtime"),c=require("./bundle-a1501121.cjs"),l=require("react"),M=require("./USE_SERVER_BUNDLE-70f5e4b2.cjs"),V=require("next/navigation");function W(e){return t.jsxs(t.Fragment,{children:[e.link?t.jsx(t.Fragment,{children:t.jsx("a",{...e.attributes,href:e.link,target:e.openLinkInNewTab?"_blank":void 0,role:"button",children:e.text})}):t.jsx(t.Fragment,{children:t.jsx("button",{...e.attributes,style:e.attributes.style,className:e.attributes.className+" button-5294b10c",children:e.text})}),t.jsx("style",{children:`.button-5294b10c {
|
|
2
|
-
all: unset;
|
|
3
|
-
}`})]})}function A(e){return t.jsxs(t.Fragment,{children:[" ",e.hasChildren?t.jsx(t.Fragment,{children:t.jsxs(e.Wrapper,{...c.getBlockProperties({block:e.block,context:e.context}),...c.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," "]})}):t.jsx(t.Fragment,{children:t.jsx(e.Wrapper,{...c.getBlockProperties({block:e.block,context:e.context}),...c.getBlockActions({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context,stripPrefix:!0})})})," "]})}function D(e){return t.jsx(e.Wrapper,{...e.wrapperProps,attributes:{...c.getBlockProperties({block:e.block,context:e.context}),...c.getBlockActions({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context})},children:e.children})}function U(e){function a(){var o;return"builder-blocks"+((o=e.blocks)!=null&&o.length?"":" no-blocks")}function g(){var o,h;c.isEditing()&&!((o=e.blocks)!=null&&o.length)&&((h=window.parent)==null||h.postMessage({type:"builder.clickEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}function S(){var o,h;c.isEditing()&&!((o=e.blocks)!=null&&o.length)&&((h=window.parent)==null||h.postMessage({type:"builder.hoverEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}return t.jsxs(t.Fragment,{children:[t.jsx("div",{className:a()+" div-02c7a115","builder-path":e.path,"builder-parent-id":e.parent,style:e.styleProp,onClick:o=>g(),onMouseEnter:o=>S(),onKeyPress:o=>g(),children:e.children}),t.jsx("style",{children:`.div-02c7a115 {
|
|
4
|
-
display: flex;
|
|
5
|
-
flex-direction: column;
|
|
6
|
-
align-items: stretch;
|
|
7
|
-
}`})]})}function H(e){return t.jsx("span",{children:e.children})}function O(e){var o,h,v,b;function a(){var x;const s=e.image||e.src;if(!s||!(s.match(/builder\.io/)||s.match(/cdn\.shopify\.com/)))return e.srcset;if(e.srcset&&((x=e.image)!=null&&x.includes("builder.io/api/v1/image"))){if(!e.srcset.includes(e.image.split("?")[0]))return console.debug("Removed given srcset"),c.getSrcSet(s)}else if(e.image&&!e.srcset)return c.getSrcSet(s);return c.getSrcSet(s)}function g(){var m;return(m=a==null?void 0:a())!=null&&m.match(/builder\.io/)&&!e.noWebp?a().replace(/\?/g,"?format=webp&"):""}function S(){const m={position:"absolute",height:"100%",width:"100%",left:"0px",top:"0px"};return e.aspectRatio?m:void 0}return t.jsxs(t.Fragment,{children:[t.jsxs(t.Fragment,{children:[t.jsxs("picture",{children:[g()?t.jsx(t.Fragment,{children:t.jsx("source",{type:"image/webp",srcSet:g()})}):null,t.jsx("img",{loading:"lazy",alt:e.altText,role:e.altText?"presentation":void 0,style:{objectPosition:e.backgroundPosition||"center",objectFit:e.backgroundSize||"cover",...S()},className:"builder-image"+(e.className?" "+e.className:"")+" img-dbab4030",src:e.image,srcSet:a(),sizes:e.sizes})]}),e.aspectRatio&&!((h=(o=e.builderBlock)==null?void 0:o.children)!=null&&h.length&&e.fitContent)?t.jsx(t.Fragment,{children:t.jsx("div",{className:"builder-image-sizer div-dbab4030",style:{paddingTop:e.aspectRatio*100+"%"}})}):null,(b=(v=e.builderBlock)==null?void 0:v.children)!=null&&b.length&&e.fitContent?t.jsx(t.Fragment,{children:e.children}):null,!e.fitContent&&e.children?t.jsx(t.Fragment,{children:t.jsx("div",{className:"div-dbab4030-2",children:e.children})}):null]}),t.jsx("style",{children:`.img-dbab4030 {
|
|
8
|
-
opacity: 1;
|
|
9
|
-
transition: opacity 0.2s ease-in-out;
|
|
10
|
-
}.div-dbab4030 {
|
|
11
|
-
width: 100%;
|
|
12
|
-
pointer-events: none;
|
|
13
|
-
font-size: 0;
|
|
14
|
-
}.div-dbab4030-2 {
|
|
15
|
-
display: flex;
|
|
16
|
-
flex-direction: column;
|
|
17
|
-
align-items: stretch;
|
|
18
|
-
position: absolute;
|
|
19
|
-
top: 0;
|
|
20
|
-
left: 0;
|
|
21
|
-
width: 100%;
|
|
22
|
-
height: 100%;
|
|
23
|
-
}`})]})}function J(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 $(e){const a=l.useRef(null),[g,S]=l.useState(()=>[]),[o,h]=l.useState(()=>[]);return l.useEffect(()=>{var b;if(!((b=a.current)!=null&&b.getElementsByTagName)||typeof window>"u")return;const v=a.current.getElementsByTagName("script");for(let m=0;m<v.length;m++){const s=v[m];if(s.src){if(g.includes(s.src))continue;g.push(s.src);const x=document.createElement("script");x.async=!0,x.src=s.src,document.head.appendChild(x)}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(x){console.warn("`CustomCode`: Error running script:",x)}}}},[]),t.jsx("div",{ref:a,className:"builder-custom-code"+(e.replaceNodes?" replace-nodes":""),dangerouslySetInnerHTML:{__html:e.code}})}function G(e){const a=l.useRef(null),[g,S]=l.useState(()=>[]),[o,h]=l.useState(()=>[]),[v,b]=l.useState(()=>!1);function m(){if(!a.current||!a.current.getElementsByTagName)return;const s=a.current.getElementsByTagName("script");for(let x=0;x<s.length;x++){const y=s[x];if(y.src&&!g.includes(y.src)){g.push(y.src);const k=document.createElement("script");k.async=!0,k.src=y.src,document.head.appendChild(k)}else if(c.isJsScript(y)&&!o.includes(y.innerText))try{o.push(y.innerText),new Function(y.innerText)()}catch(k){console.warn("`Embed`: Error running script:",k)}}}return l.useEffect(()=>{a.current&&!v&&(b(!0),m())},[a.current,v]),t.jsx("div",{className:"builder-embed",ref:a,dangerouslySetInnerHTML:{__html:e.content}})}function Q(e){return t.jsx("img",{style:{objectFit:e.backgroundSize||"cover",objectPosition:e.backgroundPosition||"center"},alt:e.altText,src:e.imgSrc||e.image,...e.attributes},c.isEditing()&&e.imgSrc||"default-key")}function X(e){var S,o,h,v,b,m,s;function a(){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{...a()}}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&&((h=(o=e.builderBlock)==null?void 0:o.children)!=null&&h.length))?t.jsx(t.Fragment,{children:t.jsx("div",{style:{width:"100%",paddingTop:e.aspectRatio*100+"%",pointerEvents:"none",fontSize:"0px"}})}):null,(b=(v=e.builderBlock)==null?void 0:v.children)!=null&&b.length&&e.fitContent?t.jsx(t.Fragment,{children:t.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"stretch"},children:e.children})}):null,(s=(m=e.builderBlock)==null?void 0:m.children)!=null&&s.length&&!e.fitContent?t.jsx(t.Fragment,{children: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 Y=l.createContext({content:null,context:{},localState:void 0,rootSetState(){},rootState:{},apiKey:null,apiVersion:void 0,componentInfos:{},inheritedStyles:{}});function Z(e){var R,I,P,F,B,T,N;const a=l.useRef(null),[g,S]=l.useState(()=>0);function o(n){var r,d,u,f,L;const i={...e.builderContextSignal.content,...n,data:{...(r=e.builderContextSignal.content)==null?void 0:r.data,...n==null?void 0:n.data},meta:{...(d=e.builderContextSignal.content)==null?void 0:d.meta,...n==null?void 0:n.meta,breakpoints:((u=n==null?void 0:n.meta)==null?void 0:u.breakpoints)||((L=(f=e.builderContextSignal.content)==null?void 0:f.meta)==null?void 0:L.breakpoints)}};M.postPreviewContent({value:i,key:i.id}).then(()=>{z.refresh()})}l.useState(()=>0);const[h,v]=l.useState(()=>!1);function b(n){var r;const{data:i}=n;if(i)switch(i.type){case"builder.configureSdk":{const d=i.data,{breakpoints:u,contentId:f}=d;if(!f||f!==((r=e.builderContextSignal.content)==null?void 0:r.id))return;u&&o({meta:{breakpoints:u}}),S(g+1);break}case"builder.contentUpdate":{const d=i.data,u=d.key||d.alias||d.entry||d.modelName,f=d.data;u===e.model&&(o(f),S(g+1));break}}}function m(){var i,r;const n=(r=(i=e.builderContextSignal.content)==null?void 0:i.data)==null?void 0:r.jsCode;n&&c.evaluate({code:n,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState})}const[s,x]=l.useState(()=>({})),[y,k]=l.useState(()=>!1);function K(n){var i,r;if(e.builderContextSignal.content){const d=(i=e.builderContextSignal.content)==null?void 0:i.testVariationId,u=(r=e.builderContextSignal.content)==null?void 0:r.id;c._track({type:"click",canTrack:c.getDefaultCanTrack(e.canTrack),contentId:u,apiKey:e.apiKey,variationId:d!==u?d:void 0,...c.getInteractionPropertiesForEvent(n),unique:!y})}y||k(!0)}function q(n){return n.replace(/{{([^}]+)}}/g,(i,r)=>c.evaluate({code:r,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState}))}function _({url:n,key:i}){c.fetch(n).then(r=>r.json()).then(r=>{var u,f;const d={...e.builderContextSignal.rootState,[i]:r};(f=(u=e.builderContextSignal).rootSetState)==null||f.call(u,d),s[i]=!0}).catch(r=>{console.error("error fetching dynamic data",n,r)})}function C(){var i,r;const n=((r=(i=e.builderContextSignal.content)==null?void 0:i.data)==null?void 0:r.httpRequests)??{};Object.entries(n).forEach(([d,u])=>{if(u&&(!s[d]||c.isEditing())){const f=q(u);_({url:f,key:d})}})}function E(){c.isEditing()&&window.dispatchEvent(new CustomEvent("builder:component:stateChange",{detail:{state:c.fastClone(e.builderContextSignal.rootState),ref:{name:e.model}}}))}function j(n){S(g+1),window.addEventListener("message",b),c.registerInsertMenu(),c.setupBrowserForEditing({...e.locale?{locale:e.locale}:{},...e.includeRefs?{includeRefs:e.includeRefs}:{},...e.enrich?{enrich:e.enrich}:{}}),Object.values(e.builderContextSignal.componentInfos).forEach(i=>{var d;const r=c.createRegisterComponentMessage(i);(d=window.parent)==null||d.postMessage(r,"*")}),window.addEventListener("builder:component:stateChangeListenerActivated",E)}function w(n){const i=new URL(location.href).searchParams,r=i.get("builder.preview"),d=i.get(`builder.preview.${r}`),u=i.get("apiKey")||i.get("builder.space");r===e.model&&u===e.apiKey&&(!e.content||d===e.content.id)&&c.fetchOneEntry({model:e.model,apiKey:e.apiKey,apiVersion:e.builderContextSignal.apiVersion}).then(f=>{f&&o(f)})}const z=V.useRouter();return l.useEffect(()=>{var n;return(n=a.current)==null||n.addEventListener("initeditingbldr",j),()=>{var i;return(i=a.current)==null?void 0:i.removeEventListener("initeditingbldr",j)}},[]),l.useEffect(()=>{var n;return(n=a.current)==null||n.addEventListener("initpreviewingbldr",w),()=>{var i;return(i=a.current)==null?void 0:i.removeEventListener("initpreviewingbldr",w)}},[]),l.useEffect(()=>{var n,i;if(c.isBrowser()){if(c.isEditing()&&a.current&&a.current.dispatchEvent(new CustomEvent("initeditingbldr")),e.builderContextSignal.content&&c.getDefaultCanTrack(e.canTrack)){const d=(n=e.builderContextSignal.content)==null?void 0:n.testVariationId,u=(i=e.builderContextSignal.content)==null?void 0:i.id,f=e.apiKey;c._track({type:"impression",canTrack:!0,contentId:u,apiKey:f,variationId:d!==u?d:void 0})}c.isPreviewing()&&a.current}},[]),l.useEffect(()=>{e.apiKey||c.logger.error("No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."),m(),C(),E()},[]),l.useEffect(()=>{},[e.content]),l.useEffect(()=>{c.isBrowser()&&(window.removeEventListener("message",b),window.addEventListener("message",b))},[h]),l.useEffect(()=>{m()},[(I=(R=e.builderContextSignal.content)==null?void 0:R.data)==null?void 0:I.jsCode,e.builderContextSignal.rootState]),l.useEffect(()=>{C()},[(F=(P=e.builderContextSignal.content)==null?void 0:P.data)==null?void 0:F.httpRequests]),l.useEffect(()=>{E()},[e.builderContextSignal.rootState]),l.useEffect(()=>()=>{c.isBrowser()&&(window.removeEventListener("message",b),window.removeEventListener("builder:component:stateChangeListenerActivated",E))},[]),t.jsx(Y.Provider,{value:e.builderContextSignal,children:e.builderContextSignal.content?t.jsx(t.Fragment,{children:l.createElement("div",{key:g,ref:a,onClick:n=>K(n),"builder-content-id":(B=e.builderContextSignal.content)==null?void 0:B.id,"builder-model":e.model,...e.showContent?{}:{hidden:!0,"aria-hidden":!0},className:`variant-${((T=e.content)==null?void 0:T.testVariationId)||((N=e.content)==null?void 0:N.id)}`},e.children)}):null})}exports.BlockWrapper=A;exports.BlocksWrapper=U;exports.Button=W;exports.CustomCode=$;exports.Embed=G;exports.EnableEditor=Z;exports.FragmentComponent=H;exports.Image=O;exports.ImgComponent=Q;exports.InteractiveElement=D;exports.SectionComponent=J;exports.Video=X;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use client";"use strict";const t=require("react/jsx-runtime"),c=require("./bundle-ef482315.cjs"),l=require("react"),M=require("./USE_SERVER_BUNDLE-de4b4ff0.cjs"),V=require("next/navigation");function W(e){return t.jsxs(t.Fragment,{children:[e.link?t.jsx(t.Fragment,{children:t.jsx("a",{...e.attributes,href:e.link,target:e.openLinkInNewTab?"_blank":void 0,role:"button",children:e.text})}):t.jsx(t.Fragment,{children:t.jsx("button",{...e.attributes,style:e.attributes.style,className:e.attributes.className+" button-5294b10c",children:e.text})}),t.jsx("style",{children:`.button-5294b10c {
|
|
2
|
-
all: unset;
|
|
3
|
-
}`})]})}function A(e){return t.jsxs(t.Fragment,{children:[" ",e.hasChildren?t.jsx(t.Fragment,{children:t.jsxs(e.Wrapper,{...c.getBlockProperties({block:e.block,context:e.context}),...c.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," "]})}):t.jsx(t.Fragment,{children:t.jsx(e.Wrapper,{...c.getBlockProperties({block:e.block,context:e.context}),...c.getBlockActions({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context,stripPrefix:!0})})})," "]})}function D(e){return t.jsx(e.Wrapper,{...e.wrapperProps,attributes:{...c.getBlockProperties({block:e.block,context:e.context}),...c.getBlockActions({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context})},children:e.children})}function U(e){function a(){var o;return"builder-blocks"+((o=e.blocks)!=null&&o.length?"":" no-blocks")}function g(){var o,h;c.isEditing()&&!((o=e.blocks)!=null&&o.length)&&((h=window.parent)==null||h.postMessage({type:"builder.clickEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}function S(){var o,h;c.isEditing()&&!((o=e.blocks)!=null&&o.length)&&((h=window.parent)==null||h.postMessage({type:"builder.hoverEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}return t.jsxs(t.Fragment,{children:[t.jsx("div",{className:a()+" div-02c7a115","builder-path":e.path,"builder-parent-id":e.parent,style:e.styleProp,onClick:o=>g(),onMouseEnter:o=>S(),onKeyPress:o=>g(),children:e.children}),t.jsx("style",{children:`.div-02c7a115 {
|
|
4
|
-
display: flex;
|
|
5
|
-
flex-direction: column;
|
|
6
|
-
align-items: stretch;
|
|
7
|
-
}`})]})}function H(e){return t.jsx("span",{children:e.children})}function O(e){var o,h,v,b;function a(){var x;const s=e.image||e.src;if(!s||!(s.match(/builder\.io/)||s.match(/cdn\.shopify\.com/)))return e.srcset;if(e.srcset&&((x=e.image)!=null&&x.includes("builder.io/api/v1/image"))){if(!e.srcset.includes(e.image.split("?")[0]))return console.debug("Removed given srcset"),c.getSrcSet(s)}else if(e.image&&!e.srcset)return c.getSrcSet(s);return c.getSrcSet(s)}function g(){var m;return(m=a==null?void 0:a())!=null&&m.match(/builder\.io/)&&!e.noWebp?a().replace(/\?/g,"?format=webp&"):""}function S(){const m={position:"absolute",height:"100%",width:"100%",left:"0px",top:"0px"};return e.aspectRatio?m:void 0}return t.jsxs(t.Fragment,{children:[t.jsxs(t.Fragment,{children:[t.jsxs("picture",{children:[g()?t.jsx(t.Fragment,{children:t.jsx("source",{type:"image/webp",srcSet:g()})}):null,t.jsx("img",{loading:"lazy",alt:e.altText,role:e.altText?"presentation":void 0,style:{objectPosition:e.backgroundPosition||"center",objectFit:e.backgroundSize||"cover",...S()},className:"builder-image"+(e.className?" "+e.className:"")+" img-dbab4030",src:e.image,srcSet:a(),sizes:e.sizes})]}),e.aspectRatio&&!((h=(o=e.builderBlock)==null?void 0:o.children)!=null&&h.length&&e.fitContent)?t.jsx(t.Fragment,{children:t.jsx("div",{className:"builder-image-sizer div-dbab4030",style:{paddingTop:e.aspectRatio*100+"%"}})}):null,(b=(v=e.builderBlock)==null?void 0:v.children)!=null&&b.length&&e.fitContent?t.jsx(t.Fragment,{children:e.children}):null,!e.fitContent&&e.children?t.jsx(t.Fragment,{children:t.jsx("div",{className:"div-dbab4030-2",children:e.children})}):null]}),t.jsx("style",{children:`.img-dbab4030 {
|
|
8
|
-
opacity: 1;
|
|
9
|
-
transition: opacity 0.2s ease-in-out;
|
|
10
|
-
}.div-dbab4030 {
|
|
11
|
-
width: 100%;
|
|
12
|
-
pointer-events: none;
|
|
13
|
-
font-size: 0;
|
|
14
|
-
}.div-dbab4030-2 {
|
|
15
|
-
display: flex;
|
|
16
|
-
flex-direction: column;
|
|
17
|
-
align-items: stretch;
|
|
18
|
-
position: absolute;
|
|
19
|
-
top: 0;
|
|
20
|
-
left: 0;
|
|
21
|
-
width: 100%;
|
|
22
|
-
height: 100%;
|
|
23
|
-
}`})]})}function J(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 $(e){const a=l.useRef(null),[g,S]=l.useState(()=>[]),[o,h]=l.useState(()=>[]);return l.useEffect(()=>{var b;if(!((b=a.current)!=null&&b.getElementsByTagName)||typeof window>"u")return;const v=a.current.getElementsByTagName("script");for(let m=0;m<v.length;m++){const s=v[m];if(s.src){if(g.includes(s.src))continue;g.push(s.src);const x=document.createElement("script");x.async=!0,x.src=s.src,document.head.appendChild(x)}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(x){console.warn("`CustomCode`: Error running script:",x)}}}},[]),t.jsx("div",{ref:a,className:"builder-custom-code"+(e.replaceNodes?" replace-nodes":""),dangerouslySetInnerHTML:{__html:e.code}})}function G(e){const a=l.useRef(null),[g,S]=l.useState(()=>[]),[o,h]=l.useState(()=>[]),[v,b]=l.useState(()=>!1);function m(){if(!a.current||!a.current.getElementsByTagName)return;const s=a.current.getElementsByTagName("script");for(let x=0;x<s.length;x++){const y=s[x];if(y.src&&!g.includes(y.src)){g.push(y.src);const k=document.createElement("script");k.async=!0,k.src=y.src,document.head.appendChild(k)}else if(c.isJsScript(y)&&!o.includes(y.innerText))try{o.push(y.innerText),new Function(y.innerText)()}catch(k){console.warn("`Embed`: Error running script:",k)}}}return l.useEffect(()=>{a.current&&!v&&(b(!0),m())},[a.current,v]),t.jsx("div",{className:"builder-embed",ref:a,dangerouslySetInnerHTML:{__html:e.content}})}function Q(e){return t.jsx("img",{style:{objectFit:e.backgroundSize||"cover",objectPosition:e.backgroundPosition||"center"},alt:e.altText,src:e.imgSrc||e.image,...e.attributes},c.isEditing()&&e.imgSrc||"default-key")}function X(e){var S,o,h,v,b,m,s;function a(){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{...a()}}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&&((h=(o=e.builderBlock)==null?void 0:o.children)!=null&&h.length))?t.jsx(t.Fragment,{children:t.jsx("div",{style:{width:"100%",paddingTop:e.aspectRatio*100+"%",pointerEvents:"none",fontSize:"0px"}})}):null,(b=(v=e.builderBlock)==null?void 0:v.children)!=null&&b.length&&e.fitContent?t.jsx(t.Fragment,{children:t.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"stretch"},children:e.children})}):null,(s=(m=e.builderBlock)==null?void 0:m.children)!=null&&s.length&&!e.fitContent?t.jsx(t.Fragment,{children: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 Y=l.createContext({content:null,context:{},localState:void 0,rootSetState(){},rootState:{},apiKey:null,apiVersion:void 0,componentInfos:{},inheritedStyles:{}});function Z(e){var R,I,P,F,B,T,N;const a=l.useRef(null),[g,S]=l.useState(()=>0);function o(n){var r,d,u,f,L;const i={...e.builderContextSignal.content,...n,data:{...(r=e.builderContextSignal.content)==null?void 0:r.data,...n==null?void 0:n.data},meta:{...(d=e.builderContextSignal.content)==null?void 0:d.meta,...n==null?void 0:n.meta,breakpoints:((u=n==null?void 0:n.meta)==null?void 0:u.breakpoints)||((L=(f=e.builderContextSignal.content)==null?void 0:f.meta)==null?void 0:L.breakpoints)}};M.postPreviewContent({value:i,key:i.id}).then(()=>{z.refresh()})}l.useState(()=>0);const[h,v]=l.useState(()=>!1);function b(n){var r;const{data:i}=n;if(i)switch(i.type){case"builder.configureSdk":{const d=i.data,{breakpoints:u,contentId:f}=d;if(!f||f!==((r=e.builderContextSignal.content)==null?void 0:r.id))return;u&&o({meta:{breakpoints:u}}),S(g+1);break}case"builder.contentUpdate":{const d=i.data,u=d.key||d.alias||d.entry||d.modelName,f=d.data;u===e.model&&(o(f),S(g+1));break}}}function m(){var i,r;const n=(r=(i=e.builderContextSignal.content)==null?void 0:i.data)==null?void 0:r.jsCode;n&&c.evaluate({code:n,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState})}const[s,x]=l.useState(()=>({})),[y,k]=l.useState(()=>!1);function K(n){var i,r;if(e.builderContextSignal.content){const d=(i=e.builderContextSignal.content)==null?void 0:i.testVariationId,u=(r=e.builderContextSignal.content)==null?void 0:r.id;c._track({type:"click",canTrack:c.getDefaultCanTrack(e.canTrack),contentId:u,apiKey:e.apiKey,variationId:d!==u?d:void 0,...c.getInteractionPropertiesForEvent(n),unique:!y})}y||k(!0)}function q(n){return n.replace(/{{([^}]+)}}/g,(i,r)=>c.evaluate({code:r,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState}))}function _({url:n,key:i}){c.fetch(n).then(r=>r.json()).then(r=>{var u,f;const d={...e.builderContextSignal.rootState,[i]:r};(f=(u=e.builderContextSignal).rootSetState)==null||f.call(u,d),s[i]=!0}).catch(r=>{console.error("error fetching dynamic data",n,r)})}function C(){var i,r;const n=((r=(i=e.builderContextSignal.content)==null?void 0:i.data)==null?void 0:r.httpRequests)??{};Object.entries(n).forEach(([d,u])=>{if(u&&(!s[d]||c.isEditing())){const f=q(u);_({url:f,key:d})}})}function E(){c.isEditing()&&window.dispatchEvent(new CustomEvent("builder:component:stateChange",{detail:{state:c.fastClone(e.builderContextSignal.rootState),ref:{name:e.model}}}))}function j(n){S(g+1),window.addEventListener("message",b),c.registerInsertMenu(),c.setupBrowserForEditing({...e.locale?{locale:e.locale}:{},...e.includeRefs?{includeRefs:e.includeRefs}:{},...e.enrich?{enrich:e.enrich}:{}}),Object.values(e.builderContextSignal.componentInfos).forEach(i=>{var d;const r=c.createRegisterComponentMessage(i);(d=window.parent)==null||d.postMessage(r,"*")}),window.addEventListener("builder:component:stateChangeListenerActivated",E)}function w(n){const i=new URL(location.href).searchParams,r=i.get("builder.preview"),d=i.get(`builder.preview.${r}`),u=i.get("apiKey")||i.get("builder.space");r===e.model&&u===e.apiKey&&(!e.content||d===e.content.id)&&c.fetchOneEntry({model:e.model,apiKey:e.apiKey,apiVersion:e.builderContextSignal.apiVersion}).then(f=>{f&&o(f)})}const z=V.useRouter();return l.useEffect(()=>{var n;return(n=a.current)==null||n.addEventListener("initeditingbldr",j),()=>{var i;return(i=a.current)==null?void 0:i.removeEventListener("initeditingbldr",j)}},[]),l.useEffect(()=>{var n;return(n=a.current)==null||n.addEventListener("initpreviewingbldr",w),()=>{var i;return(i=a.current)==null?void 0:i.removeEventListener("initpreviewingbldr",w)}},[]),l.useEffect(()=>{var n,i;if(c.isBrowser()){if(c.isEditing()&&a.current&&a.current.dispatchEvent(new CustomEvent("initeditingbldr")),e.builderContextSignal.content&&c.getDefaultCanTrack(e.canTrack)){const d=(n=e.builderContextSignal.content)==null?void 0:n.testVariationId,u=(i=e.builderContextSignal.content)==null?void 0:i.id,f=e.apiKey;c._track({type:"impression",canTrack:!0,contentId:u,apiKey:f,variationId:d!==u?d:void 0})}c.isPreviewing()&&a.current}},[]),l.useEffect(()=>{e.apiKey||c.logger.error("No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."),m(),C(),E()},[]),l.useEffect(()=>{},[e.content]),l.useEffect(()=>{c.isBrowser()&&(window.removeEventListener("message",b),window.addEventListener("message",b))},[h]),l.useEffect(()=>{m()},[(I=(R=e.builderContextSignal.content)==null?void 0:R.data)==null?void 0:I.jsCode,e.builderContextSignal.rootState]),l.useEffect(()=>{C()},[(F=(P=e.builderContextSignal.content)==null?void 0:P.data)==null?void 0:F.httpRequests]),l.useEffect(()=>{E()},[e.builderContextSignal.rootState]),l.useEffect(()=>()=>{c.isBrowser()&&(window.removeEventListener("message",b),window.removeEventListener("builder:component:stateChangeListenerActivated",E))},[]),t.jsx(Y.Provider,{value:e.builderContextSignal,children:e.builderContextSignal.content?t.jsx(t.Fragment,{children:l.createElement("div",{key:g,ref:a,onClick:n=>K(n),"builder-content-id":(B=e.builderContextSignal.content)==null?void 0:B.id,"builder-model":e.model,...e.showContent?{}:{hidden:!0,"aria-hidden":!0},className:`variant-${((T=e.content)==null?void 0:T.testVariationId)||((N=e.content)==null?void 0:N.id)}`},e.children)}):null})}exports.BlockWrapper=A;exports.BlocksWrapper=U;exports.Button=W;exports.CustomCode=$;exports.Embed=G;exports.EnableEditor=Z;exports.FragmentComponent=H;exports.Image=O;exports.ImgComponent=Q;exports.InteractiveElement=D;exports.SectionComponent=J;exports.Video=X;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { BuilderContextInterface } from '../context/types.js';
|
|
2
|
-
import type { BuilderBlock } from '../types/builder-block.js';
|
|
3
|
-
export declare function getReactNativeBlockStyles({ block, context, blockStyles }: {
|
|
4
|
-
block: BuilderBlock;
|
|
5
|
-
context: BuilderContextInterface;
|
|
6
|
-
blockStyles: any;
|
|
7
|
-
}): CSSStyleDeclaration | Record<string, string | undefined>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { BuilderContextInterface } from '../context/types.js';
|
|
2
|
-
import type { BuilderBlock } from '../types/builder-block.js';
|
|
3
|
-
export declare function getReactNativeBlockStyles({ block, context, blockStyles }: {
|
|
4
|
-
block: BuilderBlock;
|
|
5
|
-
context: BuilderContextInterface;
|
|
6
|
-
blockStyles: any;
|
|
7
|
-
}): CSSStyleDeclaration | Record<string, string | undefined>;
|