@builder.io/sdk-qwik 0.1.15 → 0.1.16
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/README.md +57 -0
- package/lib/index.qwik.cjs +448 -430
- package/lib/index.qwik.mjs +450 -432
- package/package.json +2 -2
- package/types/blocks/columns/columns.d.ts +3 -3
- package/types/blocks/image/image.d.ts +2 -2
- package/types/blocks/symbol/symbol.d.ts +2 -2
- package/types/components/render-block/block-styles.d.ts +2 -2
- package/types/components/render-block/render-block.d.ts +4 -2
- package/types/components/render-block/render-component.d.ts +2 -2
- package/types/components/render-block/render-repeated-block.d.ts +2 -2
- package/types/components/render-blocks.d.ts +1 -1
- package/types/components/render-content/components/render-styles.d.ts +1 -1
- package/types/components/render-content/render-content.d.ts +3 -3
- package/types/context/builder.context.d.ts +1 -1
- package/types/context/types.d.ts +1 -1
- package/types/functions/get-content/index.d.ts +5 -5
- package/types/functions/get-global-this.d.ts +4 -2
package/lib/index.qwik.mjs
CHANGED
|
@@ -1,35 +1,36 @@
|
|
|
1
|
-
import { componentQrl, inlinedQrl, useStylesScopedQrl,
|
|
2
|
-
import {
|
|
3
|
-
const Button = /* @__PURE__ */ componentQrl(inlinedQrl((props) => {
|
|
4
|
-
useStylesScopedQrl(inlinedQrl(STYLES$3, "Button_component_useStylesScoped_a1JZ0Q0Q2Oc"));
|
|
5
|
-
return /* @__PURE__ */
|
|
6
|
-
children: props.link ? /* @__PURE__ */
|
|
1
|
+
import { componentQrl, inlinedQrl, useStylesScopedQrl, _jsxC, _jsxQ, _fnSignal, createContextId, _wrapSignal, _jsxBranch, useLexicalScope, _IMMUTABLE, _wrapProp, useContextProvider, useStore, useContext, Slot, Fragment as Fragment$1, useVisibleTaskQrl, useTaskQrl, useSignal } from "@builder.io/qwik";
|
|
2
|
+
import { Fragment } from "@builder.io/qwik/jsx-runtime";
|
|
3
|
+
const Button = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
|
|
4
|
+
useStylesScopedQrl(/* @__PURE__ */ inlinedQrl(STYLES$3, "Button_component_useStylesScoped_a1JZ0Q0Q2Oc"));
|
|
5
|
+
return /* @__PURE__ */ _jsxC(Fragment, {
|
|
6
|
+
children: props.link ? /* @__PURE__ */ _jsxQ("a", {
|
|
7
|
+
...props.attributes
|
|
8
|
+
}, {
|
|
7
9
|
role: "button",
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}),
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}, "jc_0");
|
|
10
|
+
href: _fnSignal((p0) => p0.link, [
|
|
11
|
+
props
|
|
12
|
+
], "p0.link"),
|
|
13
|
+
target: _fnSignal((p0) => p0.openLinkInNewTab ? "_blank" : void 0, [
|
|
14
|
+
props
|
|
15
|
+
], 'p0.openLinkInNewTab?"_blank":undefined')
|
|
16
|
+
}, _fnSignal((p0) => p0.text, [
|
|
17
|
+
props
|
|
18
|
+
], "p0.text"), 2, "jc_0") : /* @__PURE__ */ _jsxQ("button", {
|
|
19
|
+
class: (() => {
|
|
20
|
+
props.attributes.class;
|
|
21
|
+
})(),
|
|
22
|
+
...props.attributes
|
|
23
|
+
}, null, _fnSignal((p0) => p0.text, [
|
|
24
|
+
props
|
|
25
|
+
], "p0.text"), 2, null)
|
|
26
|
+
}, 1, "jc_1");
|
|
26
27
|
}, "Button_component_gJoMUICXoUQ"));
|
|
27
28
|
const STYLES$3 = `
|
|
28
29
|
.button-Button {
|
|
29
30
|
all: unset;
|
|
30
31
|
}
|
|
31
32
|
`;
|
|
32
|
-
const builderContext =
|
|
33
|
+
const builderContext = createContextId("Builder");
|
|
33
34
|
const TARGET = "qwik";
|
|
34
35
|
function isBrowser() {
|
|
35
36
|
return typeof window !== "undefined" && typeof document !== "undefined";
|
|
@@ -175,19 +176,11 @@ const tag$1 = function tag2(props, state) {
|
|
|
175
176
|
const RenderInlinedStyles = (props) => {
|
|
176
177
|
const state = {};
|
|
177
178
|
state.tag = tag$1();
|
|
178
|
-
return /* @__PURE__ */
|
|
179
|
-
children: /* @__PURE__ */
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
[_IMMUTABLE]: {
|
|
184
|
-
dangerouslySetInnerHTML: _wrapSignal(props, "styles")
|
|
185
|
-
}
|
|
186
|
-
}),
|
|
187
|
-
[_IMMUTABLE]: {
|
|
188
|
-
children: false
|
|
189
|
-
}
|
|
190
|
-
}, "zz_0");
|
|
179
|
+
return /* @__PURE__ */ _jsxC(Fragment, {
|
|
180
|
+
children: /* @__PURE__ */ _jsxQ("style", {
|
|
181
|
+
dangerouslySetInnerHTML: _wrapSignal(props, "styles")
|
|
182
|
+
}, null, null, 3, "zz_0")
|
|
183
|
+
}, 1, "zz_2");
|
|
191
184
|
};
|
|
192
185
|
const useBlock$1 = function useBlock2(props, state) {
|
|
193
186
|
return getProcessedBlock({
|
|
@@ -233,21 +226,19 @@ const css = function css2(props, state) {
|
|
|
233
226
|
].join(" ");
|
|
234
227
|
};
|
|
235
228
|
const BlockStyles = (props) => {
|
|
236
|
-
|
|
237
|
-
|
|
229
|
+
_jsxBranch();
|
|
230
|
+
return /* @__PURE__ */ _jsxC(Fragment, {
|
|
231
|
+
children: css(props) && canShowBlock$1(props) ? /* @__PURE__ */ _jsxC(RenderInlinedStyles, {
|
|
238
232
|
styles: css(props)
|
|
239
|
-
}, "LQ_0") : null
|
|
240
|
-
|
|
241
|
-
children: false
|
|
242
|
-
}
|
|
243
|
-
}, "LQ_1");
|
|
233
|
+
}, 3, "LQ_0") : null
|
|
234
|
+
}, 1, "LQ_1");
|
|
244
235
|
};
|
|
245
236
|
function capitalizeFirstLetter(string) {
|
|
246
237
|
return string.charAt(0).toUpperCase() + string.slice(1);
|
|
247
238
|
}
|
|
248
239
|
const getEventHandlerName = (key) => `on${capitalizeFirstLetter(key)}$`;
|
|
249
240
|
function createEventHandler(value, options) {
|
|
250
|
-
return inlinedQrl((event) => {
|
|
241
|
+
return /* @__PURE__ */ inlinedQrl((event) => {
|
|
251
242
|
const [options2, value2] = useLexicalScope();
|
|
252
243
|
return evaluate({
|
|
253
244
|
code: value2,
|
|
@@ -380,40 +371,37 @@ const getRepeatItemData = ({ block, context }) => {
|
|
|
380
371
|
return repeatArray;
|
|
381
372
|
};
|
|
382
373
|
const RenderComponent = (props) => {
|
|
383
|
-
return /* @__PURE__ */
|
|
384
|
-
children: props.componentRef ? /* @__PURE__ */
|
|
374
|
+
return /* @__PURE__ */ _jsxC(Fragment, {
|
|
375
|
+
children: props.componentRef ? /* @__PURE__ */ _jsxC(props.componentRef, {
|
|
385
376
|
...props.componentOptions,
|
|
386
377
|
children: [
|
|
387
378
|
(props.blockChildren || []).map(function(child) {
|
|
388
|
-
return /* @__PURE__ */
|
|
379
|
+
return /* @__PURE__ */ _jsxC(RenderBlock, {
|
|
389
380
|
block: child,
|
|
390
381
|
get context() {
|
|
391
382
|
return props.context;
|
|
392
383
|
},
|
|
393
384
|
[_IMMUTABLE]: {
|
|
394
|
-
context:
|
|
385
|
+
context: _wrapProp(props, "context")
|
|
395
386
|
}
|
|
396
|
-
}, "render-block-" + child.id);
|
|
387
|
+
}, 3, "render-block-" + child.id);
|
|
397
388
|
}),
|
|
398
389
|
(props.blockChildren || []).map(function(child) {
|
|
399
|
-
return /* @__PURE__ */
|
|
390
|
+
return /* @__PURE__ */ _jsxC(BlockStyles, {
|
|
400
391
|
block: child,
|
|
401
392
|
get context() {
|
|
402
393
|
return props.context;
|
|
403
394
|
},
|
|
404
395
|
[_IMMUTABLE]: {
|
|
405
|
-
context:
|
|
396
|
+
context: _wrapProp(props, "context")
|
|
406
397
|
}
|
|
407
|
-
}, "block-style-" + child.id);
|
|
398
|
+
}, 3, "block-style-" + child.id);
|
|
408
399
|
})
|
|
409
400
|
]
|
|
410
|
-
}) : null
|
|
411
|
-
|
|
412
|
-
children: false
|
|
413
|
-
}
|
|
414
|
-
}, "R9_0");
|
|
401
|
+
}, 0, "R9_0") : null
|
|
402
|
+
}, 1, "R9_1");
|
|
415
403
|
};
|
|
416
|
-
const RenderRepeatedBlock = /* @__PURE__ */ componentQrl(inlinedQrl((props) => {
|
|
404
|
+
const RenderRepeatedBlock = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
|
|
417
405
|
useContextProvider(builderContext, useStore({
|
|
418
406
|
content: props.repeatContext.content,
|
|
419
407
|
state: props.repeatContext.state,
|
|
@@ -422,7 +410,7 @@ const RenderRepeatedBlock = /* @__PURE__ */ componentQrl(inlinedQrl((props) => {
|
|
|
422
410
|
registeredComponents: props.repeatContext.registeredComponents,
|
|
423
411
|
inheritedStyles: props.repeatContext.inheritedStyles
|
|
424
412
|
}));
|
|
425
|
-
return /* @__PURE__ */
|
|
413
|
+
return /* @__PURE__ */ _jsxC(RenderBlock, {
|
|
426
414
|
get block() {
|
|
427
415
|
return props.block;
|
|
428
416
|
},
|
|
@@ -430,10 +418,14 @@ const RenderRepeatedBlock = /* @__PURE__ */ componentQrl(inlinedQrl((props) => {
|
|
|
430
418
|
return props.repeatContext;
|
|
431
419
|
},
|
|
432
420
|
[_IMMUTABLE]: {
|
|
433
|
-
block:
|
|
434
|
-
|
|
421
|
+
block: _fnSignal((p0) => p0.block, [
|
|
422
|
+
props
|
|
423
|
+
], "p0.block"),
|
|
424
|
+
context: _fnSignal((p0) => p0.repeatContext, [
|
|
425
|
+
props
|
|
426
|
+
], "p0.repeatContext")
|
|
435
427
|
}
|
|
436
|
-
}, "K5_0");
|
|
428
|
+
}, 3, "K5_0");
|
|
437
429
|
}, "RenderRepeatedBlock_component_nRyVBtbGKc8"));
|
|
438
430
|
const component = function component2(props, state) {
|
|
439
431
|
return getComponent({
|
|
@@ -519,6 +511,7 @@ const childrenContext = function childrenContext2(props, state) {
|
|
|
519
511
|
};
|
|
520
512
|
return {
|
|
521
513
|
apiKey: props.context.apiKey,
|
|
514
|
+
apiVersion: props.context.apiVersion,
|
|
522
515
|
state: props.context.state,
|
|
523
516
|
content: props.context.content,
|
|
524
517
|
context: props.context.context,
|
|
@@ -528,17 +521,18 @@ const childrenContext = function childrenContext2(props, state) {
|
|
|
528
521
|
};
|
|
529
522
|
};
|
|
530
523
|
const RenderBlock = (props) => {
|
|
524
|
+
_jsxBranch();
|
|
531
525
|
const state = {};
|
|
532
526
|
state.tag = tag(props);
|
|
533
|
-
return /* @__PURE__ */
|
|
534
|
-
children: canShowBlock(props) ? !component(props)?.noWrap ? /* @__PURE__ */
|
|
527
|
+
return /* @__PURE__ */ _jsxC(Fragment, {
|
|
528
|
+
children: canShowBlock(props) ? !component(props)?.noWrap ? /* @__PURE__ */ _jsxC(Fragment, {
|
|
535
529
|
children: [
|
|
536
|
-
isEmptyHtmlElement(tag(props)) ? /* @__PURE__ */
|
|
530
|
+
isEmptyHtmlElement(tag(props)) ? /* @__PURE__ */ _jsxC(state.tag, {
|
|
537
531
|
...attributes(props),
|
|
538
532
|
...actions(props)
|
|
539
|
-
}) : null,
|
|
533
|
+
}, 2, "9d_0") : null,
|
|
540
534
|
!isEmptyHtmlElement(tag(props)) && repeatItemData(props) ? (repeatItemData(props) || []).map(function(data, index) {
|
|
541
|
-
return /* @__PURE__ */
|
|
535
|
+
return /* @__PURE__ */ _jsxC(RenderRepeatedBlock, {
|
|
542
536
|
get repeatContext() {
|
|
543
537
|
return data.context;
|
|
544
538
|
},
|
|
@@ -546,45 +540,38 @@ const RenderBlock = (props) => {
|
|
|
546
540
|
return data.block;
|
|
547
541
|
},
|
|
548
542
|
[_IMMUTABLE]: {
|
|
549
|
-
repeatContext:
|
|
550
|
-
block:
|
|
543
|
+
repeatContext: _wrapProp(data, "context"),
|
|
544
|
+
block: _wrapProp(data, "block")
|
|
551
545
|
}
|
|
552
|
-
}, index);
|
|
546
|
+
}, 3, index);
|
|
553
547
|
}) : null,
|
|
554
|
-
!isEmptyHtmlElement(tag(props)) && !repeatItemData(props) ? /* @__PURE__ */
|
|
548
|
+
!isEmptyHtmlElement(tag(props)) && !repeatItemData(props) ? /* @__PURE__ */ _jsxC(state.tag, {
|
|
555
549
|
...attributes(props),
|
|
556
550
|
...actions(props),
|
|
557
551
|
children: [
|
|
558
|
-
/* @__PURE__ */
|
|
552
|
+
/* @__PURE__ */ _jsxC(RenderComponent, {
|
|
559
553
|
...renderComponentProps(props)
|
|
560
|
-
}, "
|
|
554
|
+
}, 2, "9d_1"),
|
|
561
555
|
(childrenWithoutParentComponent(props) || []).map(function(child) {
|
|
562
|
-
return /* @__PURE__ */
|
|
556
|
+
return /* @__PURE__ */ _jsxC(RenderBlock, {
|
|
563
557
|
block: child,
|
|
564
558
|
context: childrenContext(props)
|
|
565
|
-
}, "render-block-" + child.id);
|
|
559
|
+
}, 3, "render-block-" + child.id);
|
|
566
560
|
}),
|
|
567
561
|
(childrenWithoutParentComponent(props) || []).map(function(child) {
|
|
568
|
-
return /* @__PURE__ */
|
|
562
|
+
return /* @__PURE__ */ _jsxC(BlockStyles, {
|
|
569
563
|
block: child,
|
|
570
564
|
context: childrenContext(props)
|
|
571
|
-
}, "block-style-" + child.id);
|
|
565
|
+
}, 3, "block-style-" + child.id);
|
|
572
566
|
})
|
|
573
567
|
]
|
|
574
|
-
}) : null
|
|
575
|
-
]
|
|
576
|
-
|
|
577
|
-
children: false
|
|
578
|
-
}
|
|
579
|
-
}, "9d_1") : /* @__PURE__ */ jsx(RenderComponent, {
|
|
568
|
+
}, 0, "9d_2") : null
|
|
569
|
+
]
|
|
570
|
+
}, 1, "9d_3") : /* @__PURE__ */ _jsxC(RenderComponent, {
|
|
580
571
|
...renderComponentProps(props)
|
|
581
|
-
}, "
|
|
582
|
-
|
|
583
|
-
children: false
|
|
584
|
-
}
|
|
585
|
-
}, "9d_3");
|
|
572
|
+
}, 2, "9d_4") : null
|
|
573
|
+
}, 1, "9d_5");
|
|
586
574
|
};
|
|
587
|
-
const RenderBlock$1 = RenderBlock;
|
|
588
575
|
const className = function className2(props, state, builderContext2) {
|
|
589
576
|
return "builder-blocks" + (!props.blocks?.length ? " no-blocks" : "");
|
|
590
577
|
};
|
|
@@ -608,22 +595,13 @@ const onMouseEnter = function onMouseEnter2(props, state, builderContext2) {
|
|
|
608
595
|
}
|
|
609
596
|
}, "*");
|
|
610
597
|
};
|
|
611
|
-
const RenderBlocks = /* @__PURE__ */ componentQrl(inlinedQrl((props) => {
|
|
612
|
-
useStylesScopedQrl(inlinedQrl(STYLES$2, "RenderBlocks_component_useStylesScoped_0XKYzaR059E"));
|
|
598
|
+
const RenderBlocks = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
|
|
599
|
+
useStylesScopedQrl(/* @__PURE__ */ inlinedQrl(STYLES$2, "RenderBlocks_component_useStylesScoped_0XKYzaR059E"));
|
|
613
600
|
const builderContext$1 = useContext(builderContext);
|
|
614
601
|
const state = {};
|
|
615
|
-
return /* @__PURE__ */
|
|
602
|
+
return /* @__PURE__ */ _jsxQ("div", {
|
|
616
603
|
class: className(props) + " div-RenderBlocks",
|
|
617
|
-
|
|
618
|
-
return props.path;
|
|
619
|
-
},
|
|
620
|
-
get "builder-parent-id"() {
|
|
621
|
-
return props.parent;
|
|
622
|
-
},
|
|
623
|
-
get style() {
|
|
624
|
-
return props.styleProp;
|
|
625
|
-
},
|
|
626
|
-
onClick$: inlinedQrl((event) => {
|
|
604
|
+
onClick$: /* @__PURE__ */ inlinedQrl((event) => {
|
|
627
605
|
const [builderContext2, props2, state2] = useLexicalScope();
|
|
628
606
|
return onClick$1(props2);
|
|
629
607
|
}, "RenderBlocks_component_div_onClick_RzhhZa265Yg", [
|
|
@@ -631,35 +609,44 @@ const RenderBlocks = /* @__PURE__ */ componentQrl(inlinedQrl((props) => {
|
|
|
631
609
|
props,
|
|
632
610
|
state
|
|
633
611
|
]),
|
|
634
|
-
onMouseEnter$: inlinedQrl((event) => {
|
|
612
|
+
onMouseEnter$: /* @__PURE__ */ inlinedQrl((event) => {
|
|
635
613
|
const [builderContext2, props2, state2] = useLexicalScope();
|
|
636
614
|
return onMouseEnter(props2);
|
|
637
615
|
}, "RenderBlocks_component_div_onMouseEnter_nG7I7RYG3JQ", [
|
|
638
616
|
builderContext$1,
|
|
639
617
|
props,
|
|
640
618
|
state
|
|
641
|
-
])
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
}
|
|
662
|
-
|
|
619
|
+
])
|
|
620
|
+
}, {
|
|
621
|
+
"builder-path": _fnSignal((p0) => p0.path, [
|
|
622
|
+
props
|
|
623
|
+
], "p0.path"),
|
|
624
|
+
"builder-parent-id": _fnSignal((p0) => p0.parent, [
|
|
625
|
+
props
|
|
626
|
+
], "p0.parent"),
|
|
627
|
+
style: _fnSignal((p0) => p0.styleProp, [
|
|
628
|
+
props
|
|
629
|
+
], "p0.styleProp")
|
|
630
|
+
}, [
|
|
631
|
+
props.blocks ? (props.blocks || []).map(function(block) {
|
|
632
|
+
return /* @__PURE__ */ _jsxC(RenderBlock, {
|
|
633
|
+
block,
|
|
634
|
+
context: builderContext$1,
|
|
635
|
+
[_IMMUTABLE]: {
|
|
636
|
+
context: _IMMUTABLE
|
|
637
|
+
}
|
|
638
|
+
}, 3, "render-block-" + block.id);
|
|
639
|
+
}) : null,
|
|
640
|
+
props.blocks ? (props.blocks || []).map(function(block) {
|
|
641
|
+
return /* @__PURE__ */ _jsxC(BlockStyles, {
|
|
642
|
+
block,
|
|
643
|
+
context: builderContext$1,
|
|
644
|
+
[_IMMUTABLE]: {
|
|
645
|
+
context: _IMMUTABLE
|
|
646
|
+
}
|
|
647
|
+
}, 3, "block-style-" + block.id);
|
|
648
|
+
}) : null
|
|
649
|
+
], 0, "9R_0");
|
|
663
650
|
}, "RenderBlocks_component_MYUZ0j1uLsw"));
|
|
664
651
|
const STYLES$2 = `
|
|
665
652
|
.div-RenderBlocks {
|
|
@@ -694,25 +681,23 @@ const columnCssVars = function columnCssVars2(props, state, builderContext2, ind
|
|
|
694
681
|
index === 0 ? 0 : state.gutterSize;
|
|
695
682
|
const width = getColumnCssWidth(props, state, builderContext2, index);
|
|
696
683
|
const gutterPixels = `${state.gutterSize}px`;
|
|
697
|
-
const mobileWidth = "100%";
|
|
698
|
-
const mobileMarginLeft = 0;
|
|
699
684
|
return {
|
|
700
685
|
width,
|
|
701
686
|
"margin-left": gutterPixels,
|
|
702
687
|
"--column-width-mobile": getMobileStyle(props, state, builderContext2, {
|
|
703
|
-
stackedStyle:
|
|
688
|
+
stackedStyle: "100%",
|
|
704
689
|
desktopStyle: width
|
|
705
690
|
}),
|
|
706
691
|
"--column-margin-left-mobile": getMobileStyle(props, state, builderContext2, {
|
|
707
|
-
stackedStyle:
|
|
692
|
+
stackedStyle: 0,
|
|
708
693
|
desktopStyle: gutterPixels
|
|
709
694
|
}),
|
|
710
695
|
"--column-width-tablet": getTabletStyle(props, state, builderContext2, {
|
|
711
|
-
stackedStyle:
|
|
696
|
+
stackedStyle: "100%",
|
|
712
697
|
desktopStyle: width
|
|
713
698
|
}),
|
|
714
699
|
"--column-margin-left-tablet": getTabletStyle(props, state, builderContext2, {
|
|
715
|
-
stackedStyle:
|
|
700
|
+
stackedStyle: 0,
|
|
716
701
|
desktopStyle: gutterPixels
|
|
717
702
|
})
|
|
718
703
|
};
|
|
@@ -748,8 +733,9 @@ const columnsStyles = function columnsStyles2(props, state, builderContext2) {
|
|
|
748
733
|
},
|
|
749
734
|
`;
|
|
750
735
|
};
|
|
751
|
-
const Columns = /* @__PURE__ */ componentQrl(inlinedQrl((props) => {
|
|
752
|
-
|
|
736
|
+
const Columns = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
|
|
737
|
+
_jsxBranch();
|
|
738
|
+
useStylesScopedQrl(/* @__PURE__ */ inlinedQrl(STYLES$1, "Columns_component_useStylesScoped_s7JLZz7MCCQ"));
|
|
753
739
|
const builderContext$1 = useContext(builderContext);
|
|
754
740
|
const state = useStore({
|
|
755
741
|
cols: props.columns || [],
|
|
@@ -757,40 +743,41 @@ const Columns = /* @__PURE__ */ componentQrl(inlinedQrl((props) => {
|
|
|
757
743
|
gutterSize: typeof props.space === "number" ? props.space || 0 : 20,
|
|
758
744
|
stackAt: props.stackColumnsAt || "tablet"
|
|
759
745
|
});
|
|
760
|
-
return /* @__PURE__ */
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
746
|
+
return /* @__PURE__ */ _jsxQ("div", {
|
|
747
|
+
style: columnsCssVars(props, state, builderContext$1)
|
|
748
|
+
}, {
|
|
749
|
+
class: _fnSignal((p0) => `builder-columns ${p0.builderBlock.id}-breakpoints div-Columns`, [
|
|
750
|
+
props
|
|
751
|
+
], '`builder-columns ${p0.builderBlock.id}-breakpoints`+" div-Columns"')
|
|
752
|
+
}, [
|
|
753
|
+
/* @__PURE__ */ _jsxC(RenderInlinedStyles, {
|
|
754
|
+
styles: columnsStyles(props, state, builderContext$1)
|
|
755
|
+
}, 3, "c0_0"),
|
|
756
|
+
(props.columns || []).map(function(column, index) {
|
|
757
|
+
return /* @__PURE__ */ _jsxQ("div", {
|
|
758
|
+
style: columnCssVars(props, state, builderContext$1, index)
|
|
759
|
+
}, {
|
|
760
|
+
class: "builder-column div-Columns-2"
|
|
761
|
+
}, /* @__PURE__ */ _jsxC(RenderBlocks, {
|
|
762
|
+
get blocks() {
|
|
763
|
+
return column.blocks;
|
|
764
|
+
},
|
|
765
|
+
path: `component.options.columns.${index}.blocks`,
|
|
766
|
+
get parent() {
|
|
767
|
+
return props.builderBlock.id;
|
|
768
|
+
},
|
|
769
|
+
styleProp: {
|
|
770
|
+
flexGrow: "1"
|
|
771
|
+
},
|
|
772
|
+
[_IMMUTABLE]: {
|
|
773
|
+
blocks: _wrapProp(column, "blocks"),
|
|
774
|
+
parent: _fnSignal((p0) => p0.builderBlock.id, [
|
|
775
|
+
props
|
|
776
|
+
], "p0.builderBlock.id")
|
|
777
|
+
}
|
|
778
|
+
}, 3, "c0_1"), 1, index);
|
|
779
|
+
})
|
|
780
|
+
], 1, "c0_2");
|
|
794
781
|
}, "Columns_component_7yLj4bxdI6c"));
|
|
795
782
|
const STYLES$1 = `
|
|
796
783
|
.div-Columns {
|
|
@@ -803,10 +790,8 @@ const STYLES$1 = `
|
|
|
803
790
|
align-items: stretch;
|
|
804
791
|
}
|
|
805
792
|
`;
|
|
806
|
-
const FragmentComponent = /* @__PURE__ */ componentQrl(inlinedQrl((props) => {
|
|
807
|
-
return /* @__PURE__ */
|
|
808
|
-
children: /* @__PURE__ */ jsx(Slot, {}, "oj_0")
|
|
809
|
-
});
|
|
793
|
+
const FragmentComponent = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
|
|
794
|
+
return /* @__PURE__ */ _jsxQ("span", null, null, /* @__PURE__ */ _jsxC(Slot, null, 3, "oj_0"), 1, "oj_1");
|
|
810
795
|
}, "FragmentComponent_component_T0AypnadAK0"));
|
|
811
796
|
function removeProtocol(path) {
|
|
812
797
|
return path.replace(/http(s)?:/, "");
|
|
@@ -864,17 +849,16 @@ function getSrcSet(url) {
|
|
|
864
849
|
}
|
|
865
850
|
const srcSetToUse = function srcSetToUse2(props, state) {
|
|
866
851
|
const imageToUse = props.image || props.src;
|
|
867
|
-
|
|
868
|
-
if (!url || !(url.match(/builder\.io/) || url.match(/cdn\.shopify\.com/)))
|
|
852
|
+
if (!imageToUse || !(imageToUse.match(/builder\.io/) || imageToUse.match(/cdn\.shopify\.com/)))
|
|
869
853
|
return props.srcset;
|
|
870
854
|
if (props.srcset && props.image?.includes("builder.io/api/v1/image")) {
|
|
871
855
|
if (!props.srcset.includes(props.image.split("?")[0])) {
|
|
872
856
|
console.debug("Removed given srcset");
|
|
873
|
-
return getSrcSet(
|
|
857
|
+
return getSrcSet(imageToUse);
|
|
874
858
|
}
|
|
875
859
|
} else if (props.image && !props.srcset)
|
|
876
|
-
return getSrcSet(
|
|
877
|
-
return getSrcSet(
|
|
860
|
+
return getSrcSet(imageToUse);
|
|
861
|
+
return getSrcSet(imageToUse);
|
|
878
862
|
};
|
|
879
863
|
const webpSrcSet = function webpSrcSet2(props, state) {
|
|
880
864
|
if (srcSetToUse(props)?.match(/builder\.io/) && !props.noWebp)
|
|
@@ -893,62 +877,57 @@ const aspectRatioCss = function aspectRatioCss2(props, state) {
|
|
|
893
877
|
const out = props.aspectRatio ? aspectRatioStyles : void 0;
|
|
894
878
|
return out;
|
|
895
879
|
};
|
|
896
|
-
const Image = /* @__PURE__ */ componentQrl(inlinedQrl((props) => {
|
|
897
|
-
|
|
898
|
-
|
|
880
|
+
const Image = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
|
|
881
|
+
_jsxBranch();
|
|
882
|
+
useStylesScopedQrl(/* @__PURE__ */ inlinedQrl(STYLES, "Image_component_useStylesScoped_fBMYiVf9fuU"));
|
|
883
|
+
return /* @__PURE__ */ _jsxC(Fragment$1, {
|
|
899
884
|
children: [
|
|
900
|
-
/* @__PURE__ */
|
|
901
|
-
|
|
902
|
-
webpSrcSet(props)
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
children: false
|
|
934
|
-
}
|
|
935
|
-
}),
|
|
936
|
-
props.aspectRatio && !(props.builderBlock?.children?.length && props.fitContent) ? /* @__PURE__ */ jsx("div", {
|
|
885
|
+
/* @__PURE__ */ _jsxQ("picture", null, null, [
|
|
886
|
+
webpSrcSet(props) ? /* @__PURE__ */ _jsxQ("source", {
|
|
887
|
+
srcSet: webpSrcSet(props)
|
|
888
|
+
}, {
|
|
889
|
+
type: "image/webp"
|
|
890
|
+
}, null, 3, "0A_0") : null,
|
|
891
|
+
/* @__PURE__ */ _jsxQ("img", {
|
|
892
|
+
style: {
|
|
893
|
+
objectPosition: props.backgroundPosition || "center",
|
|
894
|
+
objectFit: props.backgroundSize || "cover",
|
|
895
|
+
...aspectRatioCss(props)
|
|
896
|
+
},
|
|
897
|
+
srcSet: srcSetToUse(props)
|
|
898
|
+
}, {
|
|
899
|
+
loading: "lazy",
|
|
900
|
+
alt: _fnSignal((p0) => p0.altText, [
|
|
901
|
+
props
|
|
902
|
+
], "p0.altText"),
|
|
903
|
+
role: _fnSignal((p0) => p0.altText ? "presentation" : void 0, [
|
|
904
|
+
props
|
|
905
|
+
], 'p0.altText?"presentation":undefined'),
|
|
906
|
+
class: _fnSignal((p0) => "builder-image" + (p0.className ? " " + p0.className : "") + " img-Image", [
|
|
907
|
+
props
|
|
908
|
+
], '"builder-image"+(p0.className?" "+p0.className:"")+" img-Image"'),
|
|
909
|
+
src: _fnSignal((p0) => p0.image, [
|
|
910
|
+
props
|
|
911
|
+
], "p0.image"),
|
|
912
|
+
sizes: _fnSignal((p0) => p0.sizes, [
|
|
913
|
+
props
|
|
914
|
+
], "p0.sizes")
|
|
915
|
+
}, null, 3, null)
|
|
916
|
+
], 1, null),
|
|
917
|
+
props.aspectRatio && !(props.builderBlock?.children?.length && props.fitContent) ? /* @__PURE__ */ _jsxQ("div", null, {
|
|
937
918
|
class: "builder-image-sizer div-Image",
|
|
938
|
-
style: {
|
|
939
|
-
paddingTop:
|
|
940
|
-
}
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
}
|
|
951
|
-
}, "0A_2");
|
|
919
|
+
style: _fnSignal((p0) => ({
|
|
920
|
+
paddingTop: p0.aspectRatio * 100 + "%"
|
|
921
|
+
}), [
|
|
922
|
+
props
|
|
923
|
+
], '{paddingTop:p0.aspectRatio*100+"%"}')
|
|
924
|
+
}, null, 3, "0A_1") : null,
|
|
925
|
+
props.builderBlock?.children?.length && props.fitContent ? /* @__PURE__ */ _jsxC(Slot, null, 3, "0A_2") : null,
|
|
926
|
+
!props.fitContent && props.children ? /* @__PURE__ */ _jsxQ("div", null, {
|
|
927
|
+
class: "div-Image-2"
|
|
928
|
+
}, /* @__PURE__ */ _jsxC(Slot, null, 3, "0A_3"), 1, "0A_4") : null
|
|
929
|
+
]
|
|
930
|
+
}, 1, "0A_5");
|
|
952
931
|
}, "Image_component_LRxDkFa1EfU"));
|
|
953
932
|
const STYLES = `
|
|
954
933
|
.img-Image {
|
|
@@ -1285,7 +1264,6 @@ const componentInfo$7 = {
|
|
|
1285
1264
|
required: true,
|
|
1286
1265
|
defaultValue: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",
|
|
1287
1266
|
onChange: serializeFn((options) => {
|
|
1288
|
-
const DEFAULT_ASPECT_RATIO = 0.7041;
|
|
1289
1267
|
options.delete("srcset");
|
|
1290
1268
|
options.delete("noWebp");
|
|
1291
1269
|
function loadImage(url, timeout = 6e4) {
|
|
@@ -1316,10 +1294,10 @@ const componentInfo$7 = {
|
|
|
1316
1294
|
if (blob.type.includes("svg"))
|
|
1317
1295
|
options.set("noWebp", true);
|
|
1318
1296
|
});
|
|
1319
|
-
if (value && (!aspectRatio || aspectRatio ===
|
|
1297
|
+
if (value && (!aspectRatio || aspectRatio === 0.7041))
|
|
1320
1298
|
return loadImage(value).then((img) => {
|
|
1321
1299
|
const possiblyUpdatedAspectRatio = options.get("aspectRatio");
|
|
1322
|
-
if (options.get("image") === value && (!possiblyUpdatedAspectRatio || possiblyUpdatedAspectRatio ===
|
|
1300
|
+
if (options.get("image") === value && (!possiblyUpdatedAspectRatio || possiblyUpdatedAspectRatio === 0.7041)) {
|
|
1323
1301
|
if (img.width && img.height) {
|
|
1324
1302
|
options.set("aspectRatio", round2(img.height / img.width));
|
|
1325
1303
|
options.set("height", img.height);
|
|
@@ -1453,8 +1431,8 @@ const componentInfo$6 = {
|
|
|
1453
1431
|
}
|
|
1454
1432
|
]
|
|
1455
1433
|
};
|
|
1456
|
-
const SectionComponent = /* @__PURE__ */ componentQrl(inlinedQrl((props) => {
|
|
1457
|
-
return /* @__PURE__ */
|
|
1434
|
+
const SectionComponent = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
|
|
1435
|
+
return /* @__PURE__ */ _jsxQ("section", {
|
|
1458
1436
|
...props.attributes,
|
|
1459
1437
|
style: {
|
|
1460
1438
|
width: "100%",
|
|
@@ -1467,9 +1445,8 @@ const SectionComponent = /* @__PURE__ */ componentQrl(inlinedQrl((props) => {
|
|
|
1467
1445
|
alignItems: "stretch",
|
|
1468
1446
|
marginLeft: "auto",
|
|
1469
1447
|
marginRight: "auto"
|
|
1470
|
-
}
|
|
1471
|
-
|
|
1472
|
-
});
|
|
1448
|
+
}
|
|
1449
|
+
}, null, /* @__PURE__ */ _jsxC(Slot, null, 3, "2Y_0"), 0, "2Y_1");
|
|
1473
1450
|
}, "SectionComponent_component_ZWF9iD5WeLg"));
|
|
1474
1451
|
const componentInfo$5 = {
|
|
1475
1452
|
name: "Symbol",
|
|
@@ -1606,8 +1583,7 @@ const setCookie = async ({ name, value, expires, canTrack }) => {
|
|
|
1606
1583
|
console.warn("[COOKIE] SET error: ", err);
|
|
1607
1584
|
}
|
|
1608
1585
|
};
|
|
1609
|
-
const
|
|
1610
|
-
const getContentTestKey = (id) => `${BUILDER_STORE_PREFIX}.${id}`;
|
|
1586
|
+
const getContentTestKey = (id) => `${"builderio.variations"}.${id}`;
|
|
1611
1587
|
const getContentVariationCookie = ({ contentId, canTrack }) => getCookie({
|
|
1612
1588
|
name: getContentTestKey(contentId),
|
|
1613
1589
|
canTrack
|
|
@@ -1621,11 +1597,11 @@ const checkIsBuilderContentWithVariations = (item) => checkIsDefined(item.id) &&
|
|
|
1621
1597
|
const getRandomVariationId = ({ id, variations }) => {
|
|
1622
1598
|
let n = 0;
|
|
1623
1599
|
const random = Math.random();
|
|
1624
|
-
for (const
|
|
1625
|
-
const testRatio = variations[
|
|
1600
|
+
for (const id2 in variations) {
|
|
1601
|
+
const testRatio = variations[id2]?.testRatio;
|
|
1626
1602
|
n += testRatio;
|
|
1627
1603
|
if (random < n)
|
|
1628
|
-
return
|
|
1604
|
+
return id2;
|
|
1629
1605
|
}
|
|
1630
1606
|
return id;
|
|
1631
1607
|
};
|
|
@@ -1702,8 +1678,6 @@ function flatten(object, path = null, separator = ".") {
|
|
|
1702
1678
|
};
|
|
1703
1679
|
}, {});
|
|
1704
1680
|
}
|
|
1705
|
-
const BUILDER_SEARCHPARAMS_PREFIX = "builder.";
|
|
1706
|
-
const BUILDER_OPTIONS_PREFIX = "options.";
|
|
1707
1681
|
const convertSearchParamsToQueryObject = (searchParams) => {
|
|
1708
1682
|
const options = {};
|
|
1709
1683
|
searchParams.forEach((value, key) => {
|
|
@@ -1717,8 +1691,8 @@ const getBuilderSearchParams = (_options) => {
|
|
|
1717
1691
|
const options = normalizeSearchParams(_options);
|
|
1718
1692
|
const newOptions = {};
|
|
1719
1693
|
Object.keys(options).forEach((key) => {
|
|
1720
|
-
if (key.startsWith(
|
|
1721
|
-
const trimmedKey = key.replace(
|
|
1694
|
+
if (key.startsWith("builder.")) {
|
|
1695
|
+
const trimmedKey = key.replace("builder.", "").replace("options.", "");
|
|
1722
1696
|
newOptions[trimmedKey] = options[key];
|
|
1723
1697
|
}
|
|
1724
1698
|
});
|
|
@@ -1751,31 +1725,42 @@ const generateContentUrl = (options) => {
|
|
|
1751
1725
|
if (userAttributes)
|
|
1752
1726
|
url.searchParams.set("userAttributes", JSON.stringify(userAttributes));
|
|
1753
1727
|
if (query) {
|
|
1754
|
-
const
|
|
1728
|
+
const flattened2 = flatten({
|
|
1755
1729
|
query
|
|
1756
1730
|
});
|
|
1757
|
-
for (const
|
|
1758
|
-
url.searchParams.set(
|
|
1731
|
+
for (const key in flattened2)
|
|
1732
|
+
url.searchParams.set(key, JSON.stringify(flattened2[key]));
|
|
1759
1733
|
}
|
|
1760
1734
|
return url;
|
|
1761
1735
|
};
|
|
1762
1736
|
async function getContent(options) {
|
|
1763
|
-
|
|
1737
|
+
const allContent = await getAllContent({
|
|
1764
1738
|
...options,
|
|
1765
1739
|
limit: 1
|
|
1766
|
-
})
|
|
1740
|
+
});
|
|
1741
|
+
if ("results" in allContent)
|
|
1742
|
+
return allContent?.results[0] || null;
|
|
1743
|
+
return null;
|
|
1767
1744
|
}
|
|
1768
1745
|
async function getAllContent(options) {
|
|
1769
1746
|
const url = generateContentUrl(options);
|
|
1770
1747
|
const res = await fetch$1(url.href);
|
|
1771
1748
|
const content = await res.json();
|
|
1749
|
+
if ("status" in content && !("results" in content)) {
|
|
1750
|
+
console.error("[Builder.io]: Error fetching data. ", content, options);
|
|
1751
|
+
return content;
|
|
1752
|
+
}
|
|
1772
1753
|
const canTrack = options.canTrack !== false;
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1754
|
+
try {
|
|
1755
|
+
if (canTrack && Array.isArray(content.results))
|
|
1756
|
+
for (const item of content.results)
|
|
1757
|
+
await handleABTesting({
|
|
1758
|
+
item,
|
|
1759
|
+
canTrack
|
|
1760
|
+
});
|
|
1761
|
+
} catch (e) {
|
|
1762
|
+
console.error("[Builder.io]: Could not setup A/B testing. ", e);
|
|
1763
|
+
}
|
|
1779
1764
|
return content;
|
|
1780
1765
|
}
|
|
1781
1766
|
const fetchContent = function fetchContent2(props, state, builderContext2) {
|
|
@@ -1794,7 +1779,7 @@ const fetchContent = function fetchContent2(props, state, builderContext2) {
|
|
|
1794
1779
|
console.error("[Builder.io]: Could not fetch symbol content: ", err);
|
|
1795
1780
|
});
|
|
1796
1781
|
};
|
|
1797
|
-
const Symbol$1 = /* @__PURE__ */ componentQrl(inlinedQrl((props) => {
|
|
1782
|
+
const Symbol$1 = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
|
|
1798
1783
|
const builderContext$1 = useContext(builderContext);
|
|
1799
1784
|
const state = useStore({
|
|
1800
1785
|
className: [
|
|
@@ -1807,15 +1792,15 @@ const Symbol$1 = /* @__PURE__ */ componentQrl(inlinedQrl((props) => {
|
|
|
1807
1792
|
].filter(Boolean).join(" "),
|
|
1808
1793
|
contentToUse: props.symbol?.content
|
|
1809
1794
|
});
|
|
1810
|
-
|
|
1795
|
+
useVisibleTaskQrl(/* @__PURE__ */ inlinedQrl(() => {
|
|
1811
1796
|
const [builderContext2, props2, state2] = useLexicalScope();
|
|
1812
1797
|
fetchContent(props2, state2, builderContext2);
|
|
1813
|
-
}, "
|
|
1798
|
+
}, "Symbol_component_useVisibleTask_oMPs8W5ZhwE", [
|
|
1814
1799
|
builderContext$1,
|
|
1815
1800
|
props,
|
|
1816
1801
|
state
|
|
1817
1802
|
]));
|
|
1818
|
-
useTaskQrl(inlinedQrl(({ track: track2 }) => {
|
|
1803
|
+
useTaskQrl(/* @__PURE__ */ inlinedQrl(({ track: track2 }) => {
|
|
1819
1804
|
const [builderContext2, props2, state2] = useLexicalScope();
|
|
1820
1805
|
track2(() => props2.symbol);
|
|
1821
1806
|
fetchContent(props2, state2, builderContext2);
|
|
@@ -1824,42 +1809,68 @@ const Symbol$1 = /* @__PURE__ */ componentQrl(inlinedQrl((props) => {
|
|
|
1824
1809
|
props,
|
|
1825
1810
|
state
|
|
1826
1811
|
]));
|
|
1827
|
-
return /* @__PURE__ */
|
|
1828
|
-
...props.attributes
|
|
1829
|
-
|
|
1830
|
-
|
|
1812
|
+
return /* @__PURE__ */ _jsxQ("div", {
|
|
1813
|
+
...props.attributes
|
|
1814
|
+
}, {
|
|
1815
|
+
class: _fnSignal((p0) => p0.className, [
|
|
1816
|
+
state
|
|
1817
|
+
], "p0.className")
|
|
1818
|
+
}, /* @__PURE__ */ _jsxC(RenderContent, {
|
|
1819
|
+
get apiVersion() {
|
|
1820
|
+
return builderContext$1.apiVersion;
|
|
1831
1821
|
},
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
data: {
|
|
1822
|
+
get apiKey() {
|
|
1823
|
+
return builderContext$1.apiKey;
|
|
1824
|
+
},
|
|
1825
|
+
get context() {
|
|
1826
|
+
return builderContext$1.context;
|
|
1827
|
+
},
|
|
1828
|
+
get customComponents() {
|
|
1829
|
+
return Object.values(builderContext$1.registeredComponents);
|
|
1830
|
+
},
|
|
1831
|
+
get data() {
|
|
1832
|
+
return {
|
|
1844
1833
|
...props.symbol?.data,
|
|
1845
1834
|
...builderContext$1.state,
|
|
1846
1835
|
...state.contentToUse?.data?.state
|
|
1847
|
-
}
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
context: _wrapSignal(builderContext$1, "context"),
|
|
1856
|
-
content: _wrapSignal(state, "contentToUse")
|
|
1857
|
-
}
|
|
1858
|
-
}, "Wt_0"),
|
|
1836
|
+
};
|
|
1837
|
+
},
|
|
1838
|
+
get model() {
|
|
1839
|
+
return props.symbol?.model;
|
|
1840
|
+
},
|
|
1841
|
+
get content() {
|
|
1842
|
+
return state.contentToUse;
|
|
1843
|
+
},
|
|
1859
1844
|
[_IMMUTABLE]: {
|
|
1860
|
-
|
|
1845
|
+
apiVersion: _fnSignal((p0) => p0.apiVersion, [
|
|
1846
|
+
builderContext$1
|
|
1847
|
+
], "p0.apiVersion"),
|
|
1848
|
+
apiKey: _fnSignal((p0) => p0.apiKey, [
|
|
1849
|
+
builderContext$1
|
|
1850
|
+
], "p0.apiKey"),
|
|
1851
|
+
context: _fnSignal((p0) => p0.context, [
|
|
1852
|
+
builderContext$1
|
|
1853
|
+
], "p0.context"),
|
|
1854
|
+
customComponents: _fnSignal((p0) => Object.values(p0.registeredComponents), [
|
|
1855
|
+
builderContext$1
|
|
1856
|
+
], "Object.values(p0.registeredComponents)"),
|
|
1857
|
+
data: _fnSignal((p0, p1, p2) => ({
|
|
1858
|
+
...p1.symbol?.data,
|
|
1859
|
+
...p0.state,
|
|
1860
|
+
...p2.contentToUse?.data?.state
|
|
1861
|
+
}), [
|
|
1862
|
+
builderContext$1,
|
|
1863
|
+
props,
|
|
1864
|
+
state
|
|
1865
|
+
], "{...p1.symbol?.data,...p0.state,...p2.contentToUse?.data?.state}"),
|
|
1866
|
+
model: _fnSignal((p0) => p0.symbol?.model, [
|
|
1867
|
+
props
|
|
1868
|
+
], "p0.symbol?.model"),
|
|
1869
|
+
content: _fnSignal((p0) => p0.contentToUse, [
|
|
1870
|
+
state
|
|
1871
|
+
], "p0.contentToUse")
|
|
1861
1872
|
}
|
|
1862
|
-
});
|
|
1873
|
+
}, 3, "Wt_0"), 0, "Wt_1");
|
|
1863
1874
|
}, "Symbol_component_WVvggdkUPdk"));
|
|
1864
1875
|
const componentInfo$4 = {
|
|
1865
1876
|
name: "Text",
|
|
@@ -1881,19 +1892,17 @@ const componentInfo$4 = {
|
|
|
1881
1892
|
textAlign: "center"
|
|
1882
1893
|
}
|
|
1883
1894
|
};
|
|
1884
|
-
const Text = /* @__PURE__ */ componentQrl(inlinedQrl((props) => {
|
|
1885
|
-
return /* @__PURE__ */
|
|
1886
|
-
class: "builder-text",
|
|
1887
|
-
get dangerouslySetInnerHTML() {
|
|
1888
|
-
return props.text;
|
|
1889
|
-
},
|
|
1895
|
+
const Text = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
|
|
1896
|
+
return /* @__PURE__ */ _jsxQ("span", {
|
|
1890
1897
|
style: {
|
|
1891
1898
|
outline: "none"
|
|
1892
|
-
},
|
|
1893
|
-
[_IMMUTABLE]: {
|
|
1894
|
-
dangerouslySetInnerHTML: _wrapSignal(props, "text")
|
|
1895
1899
|
}
|
|
1896
|
-
}
|
|
1900
|
+
}, {
|
|
1901
|
+
class: "builder-text",
|
|
1902
|
+
dangerouslySetInnerHTML: _fnSignal((p0) => p0.text, [
|
|
1903
|
+
props
|
|
1904
|
+
], "p0.text")
|
|
1905
|
+
}, null, 3, "yO_0");
|
|
1897
1906
|
}, "Text_component_15p0cKUxgIE"));
|
|
1898
1907
|
const componentInfo$3 = {
|
|
1899
1908
|
name: "Video",
|
|
@@ -2032,25 +2041,27 @@ const spreadProps = function spreadProps2(props, state) {
|
|
|
2032
2041
|
...videoProps(props)
|
|
2033
2042
|
};
|
|
2034
2043
|
};
|
|
2035
|
-
const Video = /* @__PURE__ */ componentQrl(inlinedQrl((props) => {
|
|
2036
|
-
return /* @__PURE__ */
|
|
2037
|
-
...spreadProps(props)
|
|
2038
|
-
|
|
2044
|
+
const Video = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
|
|
2045
|
+
return /* @__PURE__ */ _jsxQ("video", {
|
|
2046
|
+
...spreadProps(props)
|
|
2047
|
+
}, {
|
|
2048
|
+
style: _fnSignal((p0) => ({
|
|
2039
2049
|
width: "100%",
|
|
2040
2050
|
height: "100%",
|
|
2041
|
-
...
|
|
2042
|
-
objectFit:
|
|
2043
|
-
objectPosition:
|
|
2051
|
+
...p0.attributes?.style,
|
|
2052
|
+
objectFit: p0.fit,
|
|
2053
|
+
objectPosition: p0.position,
|
|
2044
2054
|
borderRadius: 1
|
|
2045
|
-
},
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2055
|
+
}), [
|
|
2056
|
+
props
|
|
2057
|
+
], '{width:"100%",height:"100%",...p0.attributes?.style,objectFit:p0.fit,objectPosition:p0.position,borderRadius:1}'),
|
|
2058
|
+
src: _fnSignal((p0) => p0.video || "no-src", [
|
|
2059
|
+
props
|
|
2060
|
+
], 'p0.video||"no-src"'),
|
|
2061
|
+
poster: _fnSignal((p0) => p0.posterImage, [
|
|
2062
|
+
props
|
|
2063
|
+
], "p0.posterImage")
|
|
2064
|
+
}, null, 2, "j7_0");
|
|
2054
2065
|
}, "Video_component_qdcTZflYyoQ"));
|
|
2055
2066
|
const componentInfo$2 = {
|
|
2056
2067
|
name: "Embed",
|
|
@@ -2066,8 +2077,7 @@ const componentInfo$2 = {
|
|
|
2066
2077
|
const url = options.get("url");
|
|
2067
2078
|
if (url) {
|
|
2068
2079
|
options.set("content", "Loading...");
|
|
2069
|
-
|
|
2070
|
-
return fetch(`https://iframe.ly/api/iframely?url=${url}&api_key=${apiKey}`).then((res) => res.json()).then((data) => {
|
|
2080
|
+
return fetch(`https://iframe.ly/api/iframely?url=${url}&api_key=${"ae0e60e78201a3f2b0de4b"}`).then((res) => res.json()).then((data) => {
|
|
2071
2081
|
if (options.get("url") === url) {
|
|
2072
2082
|
if (data.html)
|
|
2073
2083
|
options.set("content", data.html);
|
|
@@ -2096,9 +2106,9 @@ const SCRIPT_MIME_TYPES = [
|
|
|
2096
2106
|
];
|
|
2097
2107
|
const isJsScript = (script) => SCRIPT_MIME_TYPES.includes(script.type);
|
|
2098
2108
|
const findAndRunScripts$1 = function findAndRunScripts2(props, state, elem) {
|
|
2099
|
-
if (!elem || !elem.getElementsByTagName)
|
|
2109
|
+
if (!elem.value || !elem.value.getElementsByTagName)
|
|
2100
2110
|
return;
|
|
2101
|
-
const scripts = elem.getElementsByTagName("script");
|
|
2111
|
+
const scripts = elem.value.getElementsByTagName("script");
|
|
2102
2112
|
for (let i = 0; i < scripts.length; i++) {
|
|
2103
2113
|
const script = scripts[i];
|
|
2104
2114
|
if (script.src && !state.scriptsInserted.includes(script.src)) {
|
|
@@ -2116,18 +2126,18 @@ const findAndRunScripts$1 = function findAndRunScripts2(props, state, elem) {
|
|
|
2116
2126
|
}
|
|
2117
2127
|
}
|
|
2118
2128
|
};
|
|
2119
|
-
const Embed = /* @__PURE__ */ componentQrl(inlinedQrl((props) => {
|
|
2120
|
-
const elem =
|
|
2129
|
+
const Embed = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
|
|
2130
|
+
const elem = useSignal();
|
|
2121
2131
|
const state = useStore({
|
|
2122
2132
|
ranInitFn: false,
|
|
2123
2133
|
scriptsInserted: [],
|
|
2124
2134
|
scriptsRun: []
|
|
2125
2135
|
});
|
|
2126
|
-
useTaskQrl(inlinedQrl(({ track: track2 }) => {
|
|
2136
|
+
useTaskQrl(/* @__PURE__ */ inlinedQrl(({ track: track2 }) => {
|
|
2127
2137
|
const [elem2, props2, state2] = useLexicalScope();
|
|
2128
|
-
track2(() => elem2);
|
|
2138
|
+
track2(() => elem2.value);
|
|
2129
2139
|
track2(() => state2.ranInitFn);
|
|
2130
|
-
if (elem2 && !state2.ranInitFn) {
|
|
2140
|
+
if (elem2.value && !state2.ranInitFn) {
|
|
2131
2141
|
state2.ranInitFn = true;
|
|
2132
2142
|
findAndRunScripts$1(props2, state2, elem2);
|
|
2133
2143
|
}
|
|
@@ -2136,32 +2146,32 @@ const Embed = /* @__PURE__ */ componentQrl(inlinedQrl((props) => {
|
|
|
2136
2146
|
props,
|
|
2137
2147
|
state
|
|
2138
2148
|
]));
|
|
2139
|
-
return /* @__PURE__ */
|
|
2149
|
+
return /* @__PURE__ */ _jsxQ("div", {
|
|
2150
|
+
ref: elem
|
|
2151
|
+
}, {
|
|
2140
2152
|
class: "builder-embed",
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
[_IMMUTABLE]: {
|
|
2146
|
-
dangerouslySetInnerHTML: _wrapSignal(props, "content")
|
|
2147
|
-
}
|
|
2148
|
-
});
|
|
2153
|
+
dangerouslySetInnerHTML: _fnSignal((p0) => p0.content, [
|
|
2154
|
+
props
|
|
2155
|
+
], "p0.content")
|
|
2156
|
+
}, null, 3, "9r_0");
|
|
2149
2157
|
}, "Embed_component_Uji08ORjXbE"));
|
|
2150
|
-
const ImgComponent = /* @__PURE__ */ componentQrl(inlinedQrl((props) => {
|
|
2151
|
-
return /* @__PURE__ */
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2158
|
+
const ImgComponent = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
|
|
2159
|
+
return /* @__PURE__ */ _jsxQ("img", {
|
|
2160
|
+
...props.attributes
|
|
2161
|
+
}, {
|
|
2162
|
+
style: _fnSignal((p0) => ({
|
|
2163
|
+
objectFit: p0.backgroundSize || "cover",
|
|
2164
|
+
objectPosition: p0.backgroundPosition || "center"
|
|
2165
|
+
}), [
|
|
2166
|
+
props
|
|
2167
|
+
], '{objectFit:p0.backgroundSize||"cover",objectPosition:p0.backgroundPosition||"center"}'),
|
|
2168
|
+
alt: _fnSignal((p0) => p0.altText, [
|
|
2169
|
+
props
|
|
2170
|
+
], "p0.altText"),
|
|
2171
|
+
src: _fnSignal((p0) => p0.imgSrc || p0.image, [
|
|
2172
|
+
props
|
|
2173
|
+
], "p0.imgSrc||p0.image")
|
|
2174
|
+
}, null, 2, isEditing() && props.imgSrc || "default-key");
|
|
2165
2175
|
}, "ImgComponent_component_FXvIDBSffO8"));
|
|
2166
2176
|
const componentInfo$1 = {
|
|
2167
2177
|
name: "Raw:Img",
|
|
@@ -2185,8 +2195,8 @@ const componentInfo$1 = {
|
|
|
2185
2195
|
static: true
|
|
2186
2196
|
};
|
|
2187
2197
|
const findAndRunScripts = function findAndRunScripts22(props, state, elem) {
|
|
2188
|
-
if (elem && elem.getElementsByTagName && typeof window !== "undefined") {
|
|
2189
|
-
const scripts = elem.getElementsByTagName("script");
|
|
2198
|
+
if (elem.value && elem.value.getElementsByTagName && typeof window !== "undefined") {
|
|
2199
|
+
const scripts = elem.value.getElementsByTagName("script");
|
|
2190
2200
|
for (let i = 0; i < scripts.length; i++) {
|
|
2191
2201
|
const script = scripts[i];
|
|
2192
2202
|
if (script.src) {
|
|
@@ -2214,30 +2224,30 @@ const findAndRunScripts = function findAndRunScripts22(props, state, elem) {
|
|
|
2214
2224
|
}
|
|
2215
2225
|
}
|
|
2216
2226
|
};
|
|
2217
|
-
const CustomCode = /* @__PURE__ */ componentQrl(inlinedQrl((props) => {
|
|
2218
|
-
const elem =
|
|
2227
|
+
const CustomCode = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
|
|
2228
|
+
const elem = useSignal();
|
|
2219
2229
|
const state = useStore({
|
|
2220
2230
|
scriptsInserted: [],
|
|
2221
2231
|
scriptsRun: []
|
|
2222
2232
|
});
|
|
2223
|
-
|
|
2233
|
+
useVisibleTaskQrl(/* @__PURE__ */ inlinedQrl(() => {
|
|
2224
2234
|
const [elem2, props2, state2] = useLexicalScope();
|
|
2225
2235
|
findAndRunScripts(props2, state2, elem2);
|
|
2226
|
-
}, "
|
|
2236
|
+
}, "CustomCode_component_useVisibleTask_S5QgEQZj6YE", [
|
|
2227
2237
|
elem,
|
|
2228
2238
|
props,
|
|
2229
2239
|
state
|
|
2230
2240
|
]));
|
|
2231
|
-
return /* @__PURE__ */
|
|
2232
|
-
ref: elem
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
});
|
|
2241
|
+
return /* @__PURE__ */ _jsxQ("div", {
|
|
2242
|
+
ref: elem
|
|
2243
|
+
}, {
|
|
2244
|
+
class: _fnSignal((p0) => "builder-custom-code" + (p0.replaceNodes ? " replace-nodes" : ""), [
|
|
2245
|
+
props
|
|
2246
|
+
], '"builder-custom-code"+(p0.replaceNodes?" replace-nodes":"")'),
|
|
2247
|
+
dangerouslySetInnerHTML: _fnSignal((p0) => p0.code, [
|
|
2248
|
+
props
|
|
2249
|
+
], "p0.code")
|
|
2250
|
+
}, null, 3, "bY_0");
|
|
2241
2251
|
}, "CustomCode_component_uYOSy7w7Zqw"));
|
|
2242
2252
|
const componentInfo = {
|
|
2243
2253
|
name: "Custom Code",
|
|
@@ -2351,12 +2361,11 @@ function uuidv4() {
|
|
|
2351
2361
|
function uuid() {
|
|
2352
2362
|
return uuidv4().replace(/-/g, "");
|
|
2353
2363
|
}
|
|
2354
|
-
const SESSION_LOCAL_STORAGE_KEY = "builderSessionId";
|
|
2355
2364
|
const getSessionId = async ({ canTrack }) => {
|
|
2356
2365
|
if (!canTrack)
|
|
2357
2366
|
return void 0;
|
|
2358
2367
|
const sessionId = await getCookie({
|
|
2359
|
-
name:
|
|
2368
|
+
name: "builderSessionId",
|
|
2360
2369
|
canTrack
|
|
2361
2370
|
});
|
|
2362
2371
|
if (checkIsDefined(sessionId))
|
|
@@ -2372,7 +2381,7 @@ const getSessionId = async ({ canTrack }) => {
|
|
|
2372
2381
|
};
|
|
2373
2382
|
const createSessionId = () => uuid();
|
|
2374
2383
|
const setSessionId = ({ id, canTrack }) => setCookie({
|
|
2375
|
-
name:
|
|
2384
|
+
name: "builderSessionId",
|
|
2376
2385
|
value: id,
|
|
2377
2386
|
canTrack
|
|
2378
2387
|
});
|
|
@@ -2395,12 +2404,11 @@ const setLocalStorageItem = ({ key, canTrack, value }) => {
|
|
|
2395
2404
|
console.debug("[LocalStorage] SET error: ", err);
|
|
2396
2405
|
}
|
|
2397
2406
|
};
|
|
2398
|
-
const VISITOR_LOCAL_STORAGE_KEY = "builderVisitorId";
|
|
2399
2407
|
const getVisitorId = ({ canTrack }) => {
|
|
2400
2408
|
if (!canTrack)
|
|
2401
2409
|
return void 0;
|
|
2402
2410
|
const visitorId = getLocalStorageItem({
|
|
2403
|
-
key:
|
|
2411
|
+
key: "builderVisitorId",
|
|
2404
2412
|
canTrack
|
|
2405
2413
|
});
|
|
2406
2414
|
if (checkIsDefined(visitorId))
|
|
@@ -2416,7 +2424,7 @@ const getVisitorId = ({ canTrack }) => {
|
|
|
2416
2424
|
};
|
|
2417
2425
|
const createVisitorId = () => uuid();
|
|
2418
2426
|
const setVisitorId = ({ id, canTrack }) => setLocalStorageItem({
|
|
2419
|
-
key:
|
|
2427
|
+
key: "builderVisitorId",
|
|
2420
2428
|
value: id,
|
|
2421
2429
|
canTrack
|
|
2422
2430
|
});
|
|
@@ -2742,7 +2750,7 @@ const getCss = ({ cssCode, contentId }) => {
|
|
|
2742
2750
|
return cssCode;
|
|
2743
2751
|
return cssCode?.replace(/&/g, `div[builder-content-id="${contentId}"]`) || "";
|
|
2744
2752
|
};
|
|
2745
|
-
const RenderContentStyles = /* @__PURE__ */ componentQrl(inlinedQrl((props) => {
|
|
2753
|
+
const RenderContentStyles = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
|
|
2746
2754
|
const state = useStore({
|
|
2747
2755
|
injectedStyles: `
|
|
2748
2756
|
${getCss({
|
|
@@ -2767,14 +2775,16 @@ ${getFontCss({
|
|
|
2767
2775
|
}
|
|
2768
2776
|
`
|
|
2769
2777
|
});
|
|
2770
|
-
return /* @__PURE__ */
|
|
2778
|
+
return /* @__PURE__ */ _jsxC(RenderInlinedStyles, {
|
|
2771
2779
|
get styles() {
|
|
2772
2780
|
return state.injectedStyles;
|
|
2773
2781
|
},
|
|
2774
2782
|
[_IMMUTABLE]: {
|
|
2775
|
-
styles:
|
|
2783
|
+
styles: _fnSignal((p0) => p0.injectedStyles, [
|
|
2784
|
+
state
|
|
2785
|
+
], "p0.injectedStyles")
|
|
2776
2786
|
}
|
|
2777
|
-
}, "V0_0");
|
|
2787
|
+
}, 3, "V0_0");
|
|
2778
2788
|
}, "RenderContentStyles_component_Og0xL34Zbvc"));
|
|
2779
2789
|
const getContextStateInitialValue = ({ content, data, locale }) => {
|
|
2780
2790
|
const defaultValues = {};
|
|
@@ -2846,9 +2856,9 @@ const processMessage = function processMessage2(props, state, elementRef, event)
|
|
|
2846
2856
|
break;
|
|
2847
2857
|
}
|
|
2848
2858
|
case "builder.contentUpdate": {
|
|
2849
|
-
const
|
|
2850
|
-
const key =
|
|
2851
|
-
const contentData =
|
|
2859
|
+
const messageContent = data.data;
|
|
2860
|
+
const key = messageContent.key || messageContent.alias || messageContent.entry || messageContent.modelName;
|
|
2861
|
+
const contentData = messageContent.data;
|
|
2852
2862
|
if (key === props.model) {
|
|
2853
2863
|
mergeNewContent(props, state, elementRef, contentData);
|
|
2854
2864
|
state.forceReRenderCount = state.forceReRenderCount + 1;
|
|
@@ -2898,7 +2908,7 @@ const handleRequest = function handleRequest2(props, state, elementRef, { url, k
|
|
|
2898
2908
|
};
|
|
2899
2909
|
setContextState(props, state, elementRef, newState);
|
|
2900
2910
|
}).catch((err) => {
|
|
2901
|
-
console.
|
|
2911
|
+
console.error("error fetching dynamic data", url, err);
|
|
2902
2912
|
});
|
|
2903
2913
|
};
|
|
2904
2914
|
const runHttpRequests = function runHttpRequests2(props, state, elementRef) {
|
|
@@ -2924,8 +2934,9 @@ const emitStateUpdate = function emitStateUpdate2(props, state, elementRef) {
|
|
|
2924
2934
|
}
|
|
2925
2935
|
}));
|
|
2926
2936
|
};
|
|
2927
|
-
const RenderContent = /* @__PURE__ */ componentQrl(inlinedQrl((props) => {
|
|
2928
|
-
|
|
2937
|
+
const RenderContent = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
|
|
2938
|
+
_jsxBranch();
|
|
2939
|
+
const elementRef = useSignal();
|
|
2929
2940
|
const state = useStore({
|
|
2930
2941
|
allRegisteredComponents: [
|
|
2931
2942
|
...getDefaultRegisteredComponents(),
|
|
@@ -2959,7 +2970,7 @@ const RenderContent = /* @__PURE__ */ componentQrl(inlinedQrl((props) => {
|
|
|
2959
2970
|
apiVersion: props.apiVersion,
|
|
2960
2971
|
registeredComponents: state.allRegisteredComponents
|
|
2961
2972
|
}));
|
|
2962
|
-
|
|
2973
|
+
useVisibleTaskQrl(/* @__PURE__ */ inlinedQrl(() => {
|
|
2963
2974
|
const [elementRef2, props2, state2] = useLexicalScope();
|
|
2964
2975
|
if (!props2.apiKey)
|
|
2965
2976
|
console.error("[Builder.io]: No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop.");
|
|
@@ -3011,12 +3022,12 @@ const RenderContent = /* @__PURE__ */ componentQrl(inlinedQrl((props) => {
|
|
|
3011
3022
|
runHttpRequests(props2, state2, elementRef2);
|
|
3012
3023
|
emitStateUpdate(props2, state2);
|
|
3013
3024
|
}
|
|
3014
|
-
}, "
|
|
3025
|
+
}, "RenderContent_component_useVisibleTask_n50dgqWW6pY", [
|
|
3015
3026
|
elementRef,
|
|
3016
3027
|
props,
|
|
3017
3028
|
state
|
|
3018
3029
|
]));
|
|
3019
|
-
useTaskQrl(inlinedQrl(({ track: track2 }) => {
|
|
3030
|
+
useTaskQrl(/* @__PURE__ */ inlinedQrl(({ track: track2 }) => {
|
|
3020
3031
|
const [elementRef2, props2, state2] = useLexicalScope();
|
|
3021
3032
|
track2(() => props2.content);
|
|
3022
3033
|
if (props2.content)
|
|
@@ -3026,7 +3037,7 @@ const RenderContent = /* @__PURE__ */ componentQrl(inlinedQrl((props) => {
|
|
|
3026
3037
|
props,
|
|
3027
3038
|
state
|
|
3028
3039
|
]));
|
|
3029
|
-
useTaskQrl(inlinedQrl(({ track: track2 }) => {
|
|
3040
|
+
useTaskQrl(/* @__PURE__ */ inlinedQrl(({ track: track2 }) => {
|
|
3030
3041
|
const [elementRef2, props2, state2] = useLexicalScope();
|
|
3031
3042
|
track2(() => state2.useContent?.data?.jsCode);
|
|
3032
3043
|
track2(() => state2.contentState);
|
|
@@ -3036,7 +3047,7 @@ const RenderContent = /* @__PURE__ */ componentQrl(inlinedQrl((props) => {
|
|
|
3036
3047
|
props,
|
|
3037
3048
|
state
|
|
3038
3049
|
]));
|
|
3039
|
-
useTaskQrl(inlinedQrl(({ track: track2 }) => {
|
|
3050
|
+
useTaskQrl(/* @__PURE__ */ inlinedQrl(({ track: track2 }) => {
|
|
3040
3051
|
const [elementRef2, props2, state2] = useLexicalScope();
|
|
3041
3052
|
track2(() => state2.useContent?.data?.httpRequests);
|
|
3042
3053
|
runHttpRequests(props2, state2, elementRef2);
|
|
@@ -3045,7 +3056,7 @@ const RenderContent = /* @__PURE__ */ componentQrl(inlinedQrl((props) => {
|
|
|
3045
3056
|
props,
|
|
3046
3057
|
state
|
|
3047
3058
|
]));
|
|
3048
|
-
useTaskQrl(inlinedQrl(({ track: track2 }) => {
|
|
3059
|
+
useTaskQrl(/* @__PURE__ */ inlinedQrl(({ track: track2 }) => {
|
|
3049
3060
|
const [elementRef2, props2, state2] = useLexicalScope();
|
|
3050
3061
|
track2(() => state2.contentState);
|
|
3051
3062
|
emitStateUpdate(props2, state2);
|
|
@@ -3054,53 +3065,60 @@ const RenderContent = /* @__PURE__ */ componentQrl(inlinedQrl((props) => {
|
|
|
3054
3065
|
props,
|
|
3055
3066
|
state
|
|
3056
3067
|
]));
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
return /* @__PURE__ */ jsx(Fragment, {
|
|
3069
|
-
children: state.useContent ? /* @__PURE__ */ jsxs("div", {
|
|
3070
|
-
ref: elementRef,
|
|
3071
|
-
onClick$: inlinedQrl((event) => {
|
|
3068
|
+
return /* @__PURE__ */ _jsxC(Fragment, {
|
|
3069
|
+
children: state.useContent ? /* @__PURE__ */ _jsxQ("div", {
|
|
3070
|
+
ref: elementRef
|
|
3071
|
+
}, {
|
|
3072
|
+
"builder-content-id": _fnSignal((p0) => p0.useContent?.id, [
|
|
3073
|
+
state
|
|
3074
|
+
], "p0.useContent?.id"),
|
|
3075
|
+
"builder-model": _fnSignal((p0) => p0.model, [
|
|
3076
|
+
props
|
|
3077
|
+
], "p0.model"),
|
|
3078
|
+
onClick$: /* @__PURE__ */ inlinedQrl((event) => {
|
|
3072
3079
|
const [elementRef2, props2, state2] = useLexicalScope();
|
|
3073
3080
|
return onClick(props2, state2, elementRef2, event);
|
|
3074
3081
|
}, "RenderContent_component__Fragment_div_onClick_wLg5o3ZkpC0", [
|
|
3075
3082
|
elementRef,
|
|
3076
3083
|
props,
|
|
3077
3084
|
state
|
|
3078
|
-
])
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3085
|
+
])
|
|
3086
|
+
}, [
|
|
3087
|
+
/* @__PURE__ */ _jsxC(RenderContentStyles, {
|
|
3088
|
+
get contentId() {
|
|
3089
|
+
return state.useContent?.id;
|
|
3090
|
+
},
|
|
3091
|
+
get cssCode() {
|
|
3092
|
+
return state.useContent?.data?.cssCode;
|
|
3093
|
+
},
|
|
3094
|
+
get customFonts() {
|
|
3095
|
+
return state.useContent?.data?.customFonts;
|
|
3096
|
+
},
|
|
3097
|
+
[_IMMUTABLE]: {
|
|
3098
|
+
contentId: _fnSignal((p0) => p0.useContent?.id, [
|
|
3099
|
+
state
|
|
3100
|
+
], "p0.useContent?.id"),
|
|
3101
|
+
cssCode: _fnSignal((p0) => p0.useContent?.data?.cssCode, [
|
|
3102
|
+
state
|
|
3103
|
+
], "p0.useContent?.data?.cssCode"),
|
|
3104
|
+
customFonts: _fnSignal((p0) => p0.useContent?.data?.customFonts, [
|
|
3105
|
+
state
|
|
3106
|
+
], "p0.useContent?.data?.customFonts")
|
|
3107
|
+
}
|
|
3108
|
+
}, 3, "03_0"),
|
|
3109
|
+
/* @__PURE__ */ _jsxC(RenderBlocks, {
|
|
3110
|
+
get blocks() {
|
|
3111
|
+
return state.useContent?.data?.blocks;
|
|
3112
|
+
},
|
|
3113
|
+
[_IMMUTABLE]: {
|
|
3114
|
+
blocks: _fnSignal((p0) => p0.useContent?.data?.blocks, [
|
|
3115
|
+
state
|
|
3116
|
+
], "p0.useContent?.data?.blocks")
|
|
3117
|
+
}
|
|
3118
|
+
}, 3, state.forceReRenderCount)
|
|
3119
|
+
], 1, "03_1") : null
|
|
3120
|
+
}, 1, "03_2");
|
|
3102
3121
|
}, "RenderContent_component_hEAI0ahViXM"));
|
|
3103
|
-
const RenderContent$1 = RenderContent;
|
|
3104
3122
|
const settings = {};
|
|
3105
3123
|
function setEditorSettings(newSettings) {
|
|
3106
3124
|
if (isBrowser()) {
|
|
@@ -3118,7 +3136,7 @@ export {
|
|
|
3118
3136
|
FragmentComponent as Fragment,
|
|
3119
3137
|
Image,
|
|
3120
3138
|
RenderBlocks,
|
|
3121
|
-
RenderContent
|
|
3139
|
+
RenderContent,
|
|
3122
3140
|
SectionComponent as Section,
|
|
3123
3141
|
Symbol$1 as Symbol,
|
|
3124
3142
|
Text,
|