@builder.io/sdk-vue 0.2.3 → 0.3.2-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/package.json +2 -5
- package/packages/_vue2/dist/block-styles.22c50e60.js +75 -0
- package/packages/_vue2/dist/block-styles.82ffdfab.cjs +1 -0
- package/packages/_vue2/dist/css.d1f35fa9.js +74 -0
- package/packages/_vue2/dist/css.d67364ee.cjs +6 -0
- package/packages/_vue2/dist/{index.6a9eec41.js → index.1955e2ac.js} +506 -470
- package/packages/_vue2/dist/index.2eccdb53.cjs +29 -0
- package/packages/_vue2/dist/{render-block.4c7d7ca1.js → render-block.11a66585.js} +92 -87
- package/packages/_vue2/dist/render-block.742f7d9b.cjs +3 -0
- package/packages/_vue2/dist/{render-component.90275cfa.cjs → render-component.8f5204ca.cjs} +1 -1
- package/packages/_vue2/dist/{render-component.84d45798.js → render-component.dc53dbd0.js} +3 -3
- package/packages/_vue2/dist/{render-inlined-styles.1999f52e.cjs → render-inlined-styles.1887b766.cjs} +1 -1
- package/packages/_vue2/dist/{render-inlined-styles.1fa49816.js → render-inlined-styles.955770d4.js} +1 -1
- package/packages/_vue2/dist/render-repeated-block.1cb6b42e.cjs +1 -0
- package/packages/_vue2/dist/{render-repeated-block.900e2543.js → render-repeated-block.7b83bd13.js} +13 -12
- package/packages/_vue2/dist/{render-styles.591ca7be.js → render-styles.37cf66d9.js} +2 -2
- package/packages/_vue2/dist/{render-styles.15b8cdf0.cjs → render-styles.fe76b092.cjs} +3 -3
- package/packages/_vue2/dist/sdk.cjs +1 -1
- package/packages/_vue2/dist/sdk.js +1 -1
- package/packages/_vue2/dist/src/components/render-block/render-block.helpers.d.ts +0 -1
- package/packages/_vue2/dist/src/components/render-content/render-content.types.d.ts +2 -0
- package/packages/_vue2/dist/src/components/render-content/render-content.vue.d.ts +1 -1
- package/packages/_vue2/dist/src/components/render-content/wrap-component-ref.d.ts +6 -0
- package/packages/_vue2/dist/src/components/render-inlined-styles.vue.d.ts +1 -1
- package/packages/_vue2/dist/src/constants/sdk-version.d.ts +1 -0
- package/packages/_vue2/dist/src/context/builder.context.d.ts +3 -2
- package/packages/_vue2/dist/src/context/types.d.ts +17 -2
- package/packages/_vue2/dist/src/functions/evaluate.d.ts +4 -3
- package/packages/_vue2/dist/src/functions/get-block-actions-handler.d.ts +1 -1
- package/packages/_vue2/dist/src/functions/get-block-actions.d.ts +1 -1
- package/packages/_vue2/dist/src/functions/get-content/types.d.ts +6 -0
- package/packages/_vue2/dist/src/functions/get-processed-block.d.ts +2 -2
- package/packages/_vue2/dist/src/scripts/init-editing.d.ts +1 -0
- package/packages/_vue2/dist/style.css +1 -1
- package/packages/_vue3/dist/block-styles.18a1a0e6.cjs +1 -0
- package/packages/_vue3/dist/{block-styles.f06f105b.js → block-styles.c0e7bfbe.js} +19 -17
- package/packages/_vue3/dist/css.7a6108f3.cjs +6 -0
- package/packages/_vue3/dist/css.ee7d0ab8.js +74 -0
- package/packages/_vue3/dist/{index.0aed90df.js → index.c3536d81.js} +395 -359
- package/packages/_vue3/dist/index.e7a22b43.cjs +29 -0
- package/packages/_vue3/dist/render-block.bcafe494.cjs +3 -0
- package/packages/_vue3/dist/render-block.d0ed34b4.js +285 -0
- package/packages/_vue3/dist/{render-component.b4a311b8.js → render-component.268e7bd8.js} +3 -3
- package/packages/_vue3/dist/{render-component.0a7c094b.cjs → render-component.77f33093.cjs} +1 -1
- package/packages/_vue3/dist/{render-inlined-styles.454bc38b.js → render-inlined-styles.5aa04bb8.js} +1 -1
- package/packages/_vue3/dist/{render-inlined-styles.a596482a.cjs → render-inlined-styles.86c0a89d.cjs} +1 -1
- package/packages/_vue3/dist/render-repeated-block.0d46ab69.cjs +1 -0
- package/packages/_vue3/dist/{render-repeated-block.12894c71.js → render-repeated-block.b1101852.js} +12 -11
- package/packages/_vue3/dist/{render-styles.b6bf070d.cjs → render-styles.5073866f.cjs} +2 -2
- package/packages/_vue3/dist/{render-styles.90b25836.js → render-styles.7f31b369.js} +2 -2
- package/packages/_vue3/dist/sdk.cjs +1 -1
- package/packages/_vue3/dist/sdk.js +1 -1
- package/packages/_vue3/dist/src/components/render-block/render-block.helpers.d.ts +0 -1
- package/packages/_vue3/dist/src/components/render-content/render-content.types.d.ts +2 -0
- package/packages/_vue3/dist/src/components/render-content/render-content.vue.d.ts +4 -1
- package/packages/_vue3/dist/src/components/render-content/wrap-component-ref.d.ts +6 -0
- package/packages/_vue3/dist/src/components/render-inlined-styles.vue.d.ts +1 -1
- package/packages/_vue3/dist/src/constants/sdk-version.d.ts +1 -0
- package/packages/_vue3/dist/src/context/builder.context.d.ts +3 -2
- package/packages/_vue3/dist/src/context/types.d.ts +17 -2
- package/packages/_vue3/dist/src/functions/evaluate.d.ts +4 -3
- package/packages/_vue3/dist/src/functions/get-block-actions-handler.d.ts +1 -1
- package/packages/_vue3/dist/src/functions/get-block-actions.d.ts +1 -1
- package/packages/_vue3/dist/src/functions/get-content/types.d.ts +6 -0
- package/packages/_vue3/dist/src/functions/get-processed-block.d.ts +2 -2
- package/packages/_vue3/dist/src/scripts/init-editing.d.ts +1 -0
- package/packages/_vue3/dist/style.css +1 -1
- package/packages/_vue2/dist/block-styles.5729b057.js +0 -73
- package/packages/_vue2/dist/block-styles.cb3c2dd0.cjs +0 -1
- package/packages/_vue2/dist/css.2efa95fa.cjs +0 -6
- package/packages/_vue2/dist/css.a54ddc90.js +0 -58
- package/packages/_vue2/dist/index.8547cce2.cjs +0 -29
- package/packages/_vue2/dist/render-block.753d2325.cjs +0 -3
- package/packages/_vue2/dist/render-repeated-block.f522a309.cjs +0 -1
- package/packages/_vue3/dist/block-styles.56f7b28a.cjs +0 -1
- package/packages/_vue3/dist/css.2ff361fc.js +0 -58
- package/packages/_vue3/dist/css.f83437ab.cjs +0 -6
- package/packages/_vue3/dist/index.d72bde22.cjs +0 -29
- package/packages/_vue3/dist/render-block.4e95bb8d.cjs +0 -3
- package/packages/_vue3/dist/render-block.905bcce5.js +0 -280
- package/packages/_vue3/dist/render-repeated-block.a95715ec.cjs +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("vue"),d=require("./index.2eccdb53.cjs"),f=e=>{var o,a;const t=e.family+(e.kind&&!e.kind.includes("#")?", "+e.kind:""),n=t.split(",")[0],i=(a=e.fileUrl)!=null?a:(o=e==null?void 0:e.files)==null?void 0:o.regular;let l="";if(i&&t&&n&&(l+=`
|
|
2
2
|
@font-face {
|
|
3
3
|
font-family: "${t}";
|
|
4
4
|
src: local("${n}"), url('${i}') format('woff2');
|
|
@@ -12,7 +12,7 @@ src: url('${s}') format('woff2');
|
|
|
12
12
|
font-display: fallback;
|
|
13
13
|
font-weight: ${r};
|
|
14
14
|
}
|
|
15
|
-
`.trim())}return l},u=({customFonts:e})=>{var t;return((t=e==null?void 0:e.map(n=>
|
|
15
|
+
`.trim())}return l},u=({customFonts:e})=>{var t;return((t=e==null?void 0:e.map(n=>f(n)))==null?void 0:t.join(" "))||""},m=({cssCode:e,contentId:t})=>e?t?(e==null?void 0:e.replace(/&/g,`div[builder-content-id="${t}"]`))||"":e:"",p=()=>Promise.resolve().then(()=>require("./render-inlined-styles.1887b766.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderInlinedStyles at ../../render-inlined-styles.vue",e),e}),h=c.defineComponent({name:"render-content-styles",components:{RenderInlinedStyles:p},props:["cssCode","contentId","customFonts"],data(){return{injectedStyles:`
|
|
16
16
|
${m({cssCode:this.cssCode,contentId:this.contentId})}
|
|
17
17
|
${u({customFonts:this.customFonts})}
|
|
18
18
|
|
|
@@ -28,4 +28,4 @@ ${u({customFonts:this.customFonts})}
|
|
|
28
28
|
text-align: inherit;
|
|
29
29
|
font-family: inherit;
|
|
30
30
|
}
|
|
31
|
-
`}}});var y=function(){var t=this,n=t._self._c;return t._self._setupProxy,n("render-inlined-styles",{attrs:{styles:t.injectedStyles}})},g=[],
|
|
31
|
+
`}}});var y=function(){var t=this,n=t._self._c;return t._self._setupProxy,n("render-inlined-styles",{attrs:{styles:t.injectedStyles}})},g=[],b=d.normalizeComponent(h,y,g,!1,null,null,null,null);const _=b.exports;exports.default=_;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./index.
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./index.2eccdb53.cjs");require("vue");exports.Button=e.Button;exports.Columns=e.Columns;exports.Fragment=e.Fragment;exports.Image=e.Image;exports.RenderBlocks=e.renderBlocks;exports.RenderContent=e.renderContent;exports.Section=e.Section;exports.Symbol=e.Symbol;exports.Text=e.Text;exports.Video=e.Video;exports.components=e.components;exports.convertSearchParamsToQueryObject=e.convertSearchParamsToQueryObject;exports.createRegisterComponentMessage=e.createRegisterComponentMessage;exports.getAllContent=e.getAllContent;exports.getBuilderSearchParams=e.getBuilderSearchParams;exports.getBuilderSearchParamsFromWindow=e.getBuilderSearchParamsFromWindow;exports.getContent=e.getContent;exports.isEditing=e.isEditing;exports.isPreviewing=e.isPreviewing;exports.normalizeSearchParams=e.normalizeSearchParams;exports.register=e.register;exports.registerComponent=e.registerComponent;exports.setEditorSettings=e.setEditorSettings;exports.track=e.track;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as t, C as r, F as o, I as n, r as i, d as m, S as g, h as c, i as d, V as l, l as S, v as C, o as p, u, w as h, x as P, q as B, j as b, k, y as v, p as w, m as x, s as y, t as F } from "./index.
|
|
1
|
+
import { b as t, C as r, F as o, I as n, r as i, d as m, S as g, h as c, i as d, V as l, l as S, v as C, o as p, u, w as h, x as P, q as B, j as b, k, y as v, p as w, m as x, s as y, t as F } from "./index.1955e2ac.js";
|
|
2
2
|
import "vue";
|
|
3
3
|
export {
|
|
4
4
|
t as Button,
|
|
@@ -14,7 +14,9 @@ export type RenderContentProps = {
|
|
|
14
14
|
customComponents?: RegisteredComponent[];
|
|
15
15
|
canTrack?: boolean;
|
|
16
16
|
locale?: string;
|
|
17
|
+
/** @deprecated use `enrich` instead **/
|
|
17
18
|
includeRefs?: boolean;
|
|
19
|
+
enrich?: boolean;
|
|
18
20
|
};
|
|
19
21
|
export interface BuilderComponentStateChange {
|
|
20
22
|
state: BuilderRenderState;
|
|
@@ -37,7 +37,7 @@ declare const _sfc_main: import("vue").DefineComponent<string[], {}, {
|
|
|
37
37
|
}, {
|
|
38
38
|
mergeNewContent(newContent: BuilderContent): void;
|
|
39
39
|
setBreakpoints(breakpoints: Breakpoints): void;
|
|
40
|
-
|
|
40
|
+
contentSetState(newRootState: BuilderRenderState): void;
|
|
41
41
|
processMessage(event: MessageEvent): void;
|
|
42
42
|
evaluateJsCode(): void;
|
|
43
43
|
onClick(event: any): void;
|
|
@@ -3,7 +3,7 @@ declare const _sfc_main: import("vue").DefineComponent<Readonly<{
|
|
|
3
3
|
}>, {}, {
|
|
4
4
|
TARGET: string;
|
|
5
5
|
}, {
|
|
6
|
-
tag():
|
|
6
|
+
tag(): any;
|
|
7
7
|
injectedStyleScript(): string;
|
|
8
8
|
}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<Readonly<{
|
|
9
9
|
styles?: any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const SDK_VERSION = "0.3.2-0";
|
|
@@ -11,8 +11,23 @@ export type BuilderRenderContext = Record<string, unknown>;
|
|
|
11
11
|
export interface BuilderContextInterface {
|
|
12
12
|
content: Nullable<BuilderContent>;
|
|
13
13
|
context: BuilderRenderContext;
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
/**
|
|
15
|
+
* The state of the application.
|
|
16
|
+
*
|
|
17
|
+
* NOTE: see `localState` below to understand how it is different from `rootState`.
|
|
18
|
+
*/
|
|
19
|
+
rootState: BuilderRenderState;
|
|
20
|
+
/**
|
|
21
|
+
* Some frameworks have a `setState` function which needs to be invoked to notify
|
|
22
|
+
* the framework of state change. (other frameworks don't in which case it is `undefined')
|
|
23
|
+
*/
|
|
24
|
+
rootSetState: ((rootState: BuilderRenderState) => void) | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* The local state of the current component. This is different from `rootState` in that
|
|
27
|
+
* it can be a child state created by a repeater containing local state.
|
|
28
|
+
* The `rootState` is where all of the state mutations are actually stored.
|
|
29
|
+
*/
|
|
30
|
+
localState: BuilderRenderState | undefined;
|
|
16
31
|
apiKey: string | null;
|
|
17
32
|
apiVersion: ApiVersion | undefined;
|
|
18
33
|
registeredComponents: RegisteredComponents;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type { BuilderContextInterface } from '../context/types.js';
|
|
2
|
-
export declare function evaluate({ code, context,
|
|
1
|
+
import type { BuilderContextInterface, BuilderRenderState } from '../context/types.js';
|
|
2
|
+
export declare function evaluate({ code, context, localState, rootState, rootSetState, event, isExpression, }: {
|
|
3
3
|
code: string;
|
|
4
4
|
event?: Event;
|
|
5
5
|
isExpression?: boolean;
|
|
6
|
-
} & Pick<BuilderContextInterface, '
|
|
6
|
+
} & Pick<BuilderContextInterface, 'localState' | 'context' | 'rootState' | 'rootSetState'>): any;
|
|
7
|
+
export declare function flattenState(rootState: Record<string | symbol, any>, localState: Record<string | symbol, any> | undefined, rootSetState: ((rootState: BuilderRenderState) => void) | undefined): BuilderRenderState;
|
|
@@ -2,7 +2,7 @@ import type { BuilderContextInterface } from '../context/types.js';
|
|
|
2
2
|
import type { BuilderBlock } from '../types/builder-block.js';
|
|
3
3
|
type Options = {
|
|
4
4
|
block: BuilderBlock;
|
|
5
|
-
} & Pick<BuilderContextInterface, '
|
|
5
|
+
} & Pick<BuilderContextInterface, 'localState' | 'context' | 'rootState' | 'rootSetState'>;
|
|
6
6
|
type EventHandler = (event: Event) => any;
|
|
7
7
|
export declare const createEventHandler: (value: string, options: Options) => EventHandler;
|
|
8
8
|
export {};
|
|
@@ -5,5 +5,5 @@ type Actions = {
|
|
|
5
5
|
};
|
|
6
6
|
export declare function getBlockActions(options: {
|
|
7
7
|
block: BuilderBlock;
|
|
8
|
-
} & Pick<BuilderContextInterface, '
|
|
8
|
+
} & Pick<BuilderContextInterface, 'localState' | 'context' | 'rootState' | 'rootSetState'>): Actions;
|
|
9
9
|
export {};
|
|
@@ -19,6 +19,7 @@ export interface GetContentOptions {
|
|
|
19
19
|
/**
|
|
20
20
|
* If set to `true`, it will lazy load symbols/references.
|
|
21
21
|
* If set to `false`, it will render the entire content tree eagerly.
|
|
22
|
+
* @deprecated use `enrich` instead
|
|
22
23
|
*/
|
|
23
24
|
noTraverse?: boolean;
|
|
24
25
|
/**
|
|
@@ -30,8 +31,13 @@ export interface GetContentOptions {
|
|
|
30
31
|
canTrack?: boolean;
|
|
31
32
|
/**
|
|
32
33
|
* Include references in the response. Defaults to `true`.
|
|
34
|
+
* @deprecated use `enrich` instead
|
|
33
35
|
*/
|
|
34
36
|
includeRefs?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Include multilevel references in the response.
|
|
39
|
+
*/
|
|
40
|
+
enrich?: boolean;
|
|
35
41
|
/**
|
|
36
42
|
* If provided, the API will auto-resolve localized objects to the value of this `locale` key.
|
|
37
43
|
*/
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { BuilderContextInterface } from '../context/types.js';
|
|
2
2
|
import type { BuilderBlock } from '../types/builder-block.js';
|
|
3
|
-
export declare function getProcessedBlock({ block, context, shouldEvaluateBindings,
|
|
3
|
+
export declare function getProcessedBlock({ block, context, shouldEvaluateBindings, localState, rootState, rootSetState, }: {
|
|
4
4
|
block: BuilderBlock;
|
|
5
5
|
/**
|
|
6
6
|
* In some cases, we want to avoid evaluating bindings and only want framework-specific block transformation. It is
|
|
7
7
|
* also sometimes too early to consider bindings, e.g. when we might be looking at a repeated block.
|
|
8
8
|
*/
|
|
9
9
|
shouldEvaluateBindings: boolean;
|
|
10
|
-
} & Pick<BuilderContextInterface, '
|
|
10
|
+
} & Pick<BuilderContextInterface, 'localState' | 'context' | 'rootState' | 'rootSetState'>): BuilderBlock;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.button-2fnk003dqad[data-v-5f197ca9]{all:unset}.div-t9spj7joih[data-v-
|
|
1
|
+
.button-2fnk003dqad[data-v-5f197ca9]{all:unset}.div-t9spj7joih[data-v-1cba7386]{display:flex;line-height:normal}.div-t9spj7joih-2[data-v-1cba7386]{display:flex;flex-direction:column;align-items:stretch}.img-1pl23ac79ld[data-v-0d553173]{opacity:1;transition:opacity .2s ease-in-out}.div-1pl23ac79ld[data-v-0d553173]{width:100%;pointer-events:none;font-size:0}.div-1pl23ac79ld-2[data-v-0d553173]{display:flex;flex-direction:column;align-items:stretch;position:absolute;top:0;left:0;width:100%;height:100%}.div-21azgz5avex[data-v-e4c3b2b6]{display:flex;flex-direction:column;align-items:stretch}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),t=require("./index.e7a22b43.cjs"),r=require("./css.7a6108f3.cjs"),y=()=>Promise.resolve().then(()=>require("./render-inlined-styles.86c0a89d.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderInlinedStyles at ../render-inlined-styles.vue",e),e}),S=o.defineComponent({name:"block-styles",components:{RenderInlinedStyles:o.defineAsyncComponent(y)},props:["block","context"],data(){return{TARGET:t.TARGET}},computed:{useBlock(){return r.getProcessedBlock({block:this.block,localState:this.context.localState,rootState:this.context.rootState,rootSetState:this.context.rootSetState,context:this.context.context,shouldEvaluateBindings:!0})},canShowBlock(){return t.checkIsDefined(this.useBlock.hide)?!this.useBlock.hide:t.checkIsDefined(this.useBlock.show)?this.useBlock.show:!0},css(){var d;const e=this.useBlock.responsiveStyles,n=this.context.content,c=t.getSizesForBreakpoints(((d=n==null?void 0:n.meta)==null?void 0:d.breakpoints)||{}),l=e==null?void 0:e.large,i=e==null?void 0:e.medium,a=e==null?void 0:e.small,s=this.useBlock.id;if(!s)return"";const u=l?r.createCssClass({className:s,styles:l}):"",m=i?r.createCssClass({className:s,styles:i,mediaQuery:t.getMaxWidthQueryForSize("medium",c)}):"",h=a?r.createCssClass({className:s,styles:a,mediaQuery:t.getMaxWidthQueryForSize("small",c)}):"";return[u,m,h].join(" ")}}});function k(e,n,c,l,i,a){const s=o.resolveComponent("render-inlined-styles");return e.TARGET!=="reactNative"&&e.css&&e.canShowBlock?(o.openBlock(),o.createBlock(s,{key:0,styles:e.css},null,8,["styles"])):o.createCommentVNode("",!0)}const p=t._export_sfc(S,[["render",k]]);exports.default=p;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { T as g, c as
|
|
3
|
-
import { g as
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as p, defineAsyncComponent as S, resolveComponent as k, openBlock as y, createBlock as f, createCommentVNode as B } from "vue";
|
|
2
|
+
import { T as g, c as i, g as C, a as d, _ } from "./index.c3536d81.js";
|
|
3
|
+
import { g as x, c } from "./css.ee7d0ab8.js";
|
|
4
|
+
const b = () => import("./render-inlined-styles.5aa04bb8.js").then((e) => e.default).catch((e) => {
|
|
5
5
|
throw console.error(
|
|
6
6
|
"Error while attempting to dynamically import component RenderInlinedStyles at ../render-inlined-styles.vue",
|
|
7
7
|
e
|
|
8
8
|
), e;
|
|
9
|
-
}),
|
|
9
|
+
}), w = p({
|
|
10
10
|
name: "block-styles",
|
|
11
11
|
components: {
|
|
12
|
-
RenderInlinedStyles:
|
|
12
|
+
RenderInlinedStyles: S(b)
|
|
13
13
|
},
|
|
14
14
|
props: ["block", "context"],
|
|
15
15
|
data() {
|
|
@@ -17,20 +17,22 @@ const w = () => import("./render-inlined-styles.454bc38b.js").then((e) => e.defa
|
|
|
17
17
|
},
|
|
18
18
|
computed: {
|
|
19
19
|
useBlock() {
|
|
20
|
-
return
|
|
20
|
+
return x({
|
|
21
21
|
block: this.block,
|
|
22
|
-
|
|
22
|
+
localState: this.context.localState,
|
|
23
|
+
rootState: this.context.rootState,
|
|
24
|
+
rootSetState: this.context.rootSetState,
|
|
23
25
|
context: this.context.context,
|
|
24
26
|
shouldEvaluateBindings: !0
|
|
25
27
|
});
|
|
26
28
|
},
|
|
27
29
|
canShowBlock() {
|
|
28
|
-
return
|
|
30
|
+
return i(this.useBlock.hide) ? !this.useBlock.hide : i(this.useBlock.show) ? this.useBlock.show : !0;
|
|
29
31
|
},
|
|
30
32
|
css() {
|
|
31
|
-
var
|
|
33
|
+
var a;
|
|
32
34
|
const e = this.useBlock.responsiveStyles, s = this.context.content, o = C(
|
|
33
|
-
((
|
|
35
|
+
((a = s == null ? void 0 : s.meta) == null ? void 0 : a.breakpoints) || {}
|
|
34
36
|
), n = e == null ? void 0 : e.large, r = e == null ? void 0 : e.medium, l = e == null ? void 0 : e.small, t = this.useBlock.id;
|
|
35
37
|
if (!t)
|
|
36
38
|
return "";
|
|
@@ -44,7 +46,7 @@ const w = () => import("./render-inlined-styles.454bc38b.js").then((e) => e.defa
|
|
|
44
46
|
"medium",
|
|
45
47
|
o
|
|
46
48
|
)
|
|
47
|
-
}) : "",
|
|
49
|
+
}) : "", h = l ? c({
|
|
48
50
|
className: t,
|
|
49
51
|
styles: l,
|
|
50
52
|
mediaQuery: d(
|
|
@@ -52,18 +54,18 @@ const w = () => import("./render-inlined-styles.454bc38b.js").then((e) => e.defa
|
|
|
52
54
|
o
|
|
53
55
|
)
|
|
54
56
|
}) : "";
|
|
55
|
-
return [m, u,
|
|
57
|
+
return [m, u, h].join(" ");
|
|
56
58
|
}
|
|
57
59
|
}
|
|
58
60
|
});
|
|
59
61
|
function v(e, s, o, n, r, l) {
|
|
60
|
-
const t =
|
|
61
|
-
return e.TARGET !== "reactNative" && e.css && e.canShowBlock ? (
|
|
62
|
+
const t = k("render-inlined-styles");
|
|
63
|
+
return e.TARGET !== "reactNative" && e.css && e.canShowBlock ? (y(), f(t, {
|
|
62
64
|
key: 0,
|
|
63
65
|
styles: e.css
|
|
64
|
-
}, null, 8, ["styles"])) :
|
|
66
|
+
}, null, 8, ["styles"])) : B("", !0);
|
|
65
67
|
}
|
|
66
|
-
const I = /* @__PURE__ */ _(
|
|
68
|
+
const I = /* @__PURE__ */ _(w, [["render", v]]);
|
|
67
69
|
export {
|
|
68
70
|
I as default
|
|
69
71
|
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";const i=require("./index.e7a22b43.cjs"),f=(e,t,r)=>{if(Object(e)!==e)return e;const s=Array.isArray(t)?t:t.toString().match(/[^.[\]]+/g);return s.slice(0,-1).reduce((o,n,c)=>Object(o[n])===o[n]?o[n]:o[n]=Math.abs(Number(s[c+1]))>>0===+s[c+1]?[]:{},e)[s[s.length-1]]=r,e};const p=({block:e,context:t,localState:r,rootState:s,rootSetState:o})=>{if(!e.bindings)return e;const n=i.fastClone(e),c={...n,properties:{...n.properties},actions:{...n.actions}};for(const a in e.bindings){const l=e.bindings[a],d=i.evaluate({code:l,localState:r,rootState:s,rootSetState:o,context:t});f(c,a,d)}return c};function g({block:e,context:t,shouldEvaluateBindings:r,localState:s,rootState:o,rootSetState:n}){const c=e;return r?p({block:c,localState:s,rootState:o,rootSetState:n,context:t}):c}const C=e=>e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase(),u=e=>Object.entries(e).map(([r,s])=>{if(typeof s=="string")return`${C(r)}: ${s};`}).filter(i.checkIsDefined),S=e=>u(e).join(`
|
|
2
|
+
`),y=({mediaQuery:e,className:t,styles:r})=>{const s=`.${t} {
|
|
3
|
+
${S(r)}
|
|
4
|
+
}`;return e?`${e} {
|
|
5
|
+
${s}
|
|
6
|
+
}`:s};exports.convertStyleMapToCSSArray=u;exports.createCssClass=y;exports.getProcessedBlock=g;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { f, e as l, c as p } from "./index.c3536d81.js";
|
|
2
|
+
const g = (e, t, r) => {
|
|
3
|
+
if (Object(e) !== e)
|
|
4
|
+
return e;
|
|
5
|
+
const s = Array.isArray(t) ? t : t.toString().match(/[^.[\]]+/g);
|
|
6
|
+
return s.slice(0, -1).reduce(
|
|
7
|
+
(o, n, c) => Object(o[n]) === o[n] ? o[n] : o[n] = Math.abs(Number(s[c + 1])) >> 0 === +s[c + 1] ? [] : {},
|
|
8
|
+
e
|
|
9
|
+
)[s[s.length - 1]] = r, e;
|
|
10
|
+
};
|
|
11
|
+
const d = ({
|
|
12
|
+
block: e,
|
|
13
|
+
context: t,
|
|
14
|
+
localState: r,
|
|
15
|
+
rootState: s,
|
|
16
|
+
rootSetState: o
|
|
17
|
+
}) => {
|
|
18
|
+
if (!e.bindings)
|
|
19
|
+
return e;
|
|
20
|
+
const n = f(e), c = {
|
|
21
|
+
...n,
|
|
22
|
+
properties: { ...n.properties },
|
|
23
|
+
actions: { ...n.actions }
|
|
24
|
+
};
|
|
25
|
+
for (const i in e.bindings) {
|
|
26
|
+
const a = e.bindings[i], u = l({
|
|
27
|
+
code: a,
|
|
28
|
+
localState: r,
|
|
29
|
+
rootState: s,
|
|
30
|
+
rootSetState: o,
|
|
31
|
+
context: t
|
|
32
|
+
});
|
|
33
|
+
g(c, i, u);
|
|
34
|
+
}
|
|
35
|
+
return c;
|
|
36
|
+
};
|
|
37
|
+
function y({
|
|
38
|
+
block: e,
|
|
39
|
+
context: t,
|
|
40
|
+
shouldEvaluateBindings: r,
|
|
41
|
+
localState: s,
|
|
42
|
+
rootState: o,
|
|
43
|
+
rootSetState: n
|
|
44
|
+
}) {
|
|
45
|
+
const c = e;
|
|
46
|
+
return r ? d({
|
|
47
|
+
block: c,
|
|
48
|
+
localState: s,
|
|
49
|
+
rootState: o,
|
|
50
|
+
rootSetState: n,
|
|
51
|
+
context: t
|
|
52
|
+
}) : c;
|
|
53
|
+
}
|
|
54
|
+
const C = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), $ = (e) => Object.entries(e).map(([r, s]) => {
|
|
55
|
+
if (typeof s == "string")
|
|
56
|
+
return `${C(r)}: ${s};`;
|
|
57
|
+
}).filter(p), m = (e) => $(e).join(`
|
|
58
|
+
`), v = ({
|
|
59
|
+
mediaQuery: e,
|
|
60
|
+
className: t,
|
|
61
|
+
styles: r
|
|
62
|
+
}) => {
|
|
63
|
+
const s = `.${t} {
|
|
64
|
+
${m(r)}
|
|
65
|
+
}`;
|
|
66
|
+
return e ? `${e} {
|
|
67
|
+
${s}
|
|
68
|
+
}` : s;
|
|
69
|
+
};
|
|
70
|
+
export {
|
|
71
|
+
$ as a,
|
|
72
|
+
v as c,
|
|
73
|
+
y as g
|
|
74
|
+
};
|