@builder.io/sdk-qwik 0.12.2 → 0.12.4
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/index.qwik.cjs +255 -128
- package/lib/browser/index.qwik.mjs +256 -129
- package/lib/edge/index.qwik.cjs +255 -128
- package/lib/edge/index.qwik.mjs +256 -129
- package/lib/node/index.qwik.cjs +255 -128
- package/lib/node/index.qwik.mjs +256 -129
- package/package.json +1 -1
- package/types/src/blocks/button/button.d.ts +0 -1
- package/types/src/blocks/button/button.types.d.ts +2 -1
- package/types/src/blocks/columns/columns.d.ts +1 -1
- package/types/src/blocks/columns/columns.types.d.ts +3 -3
- package/types/src/blocks/symbol/symbol.types.d.ts +2 -2
- package/types/src/components/block/block.d.ts +1 -0
- package/types/src/components/block/components/block-wrapper.d.ts +1 -0
- package/types/src/components/block/components/component-ref/component-ref.helpers.d.ts +2 -2
- package/types/src/components/block/components/repeated-block.d.ts +3 -5
- package/types/src/components/blocks/blocks.types.d.ts +1 -0
- package/types/src/components/content-variants/content-variants.types.d.ts +6 -2
- package/types/src/constants/sdk-version.d.ts +1 -1
- package/types/src/functions/get-block-properties.d.ts +1 -2
- package/types/src/functions/get-class-prop-name.d.ts +1 -0
- package/types/src/functions/get-style.d.ts +12 -0
- package/types/src/functions/transform-block-properties.d.ts +2 -2
- package/types/src/functions/transform-style-property.d.ts +7 -0
- package/types/src/helpers/omit.d.ts +1 -0
- package/types/src/types/builder-block.d.ts +1 -0
- package/types/src/types/builder-props.d.ts +3 -0
|
@@ -1,42 +1,85 @@
|
|
|
1
|
-
import { componentQrl, inlinedQrl,
|
|
1
|
+
import { componentQrl, inlinedQrl, _jsxBranch, _jsxC, Slot as Slot$1, _fnSignal, _IMMUTABLE, createContextId, _jsxQ, useComputedQrl, useLexicalScope, useStore, useContextProvider, _wrapProp, useStylesScopedQrl, useContext, Fragment as Fragment$1, _jsxS, useSignal, useOn, useTaskQrl, createElement } from "@builder.io/qwik";
|
|
2
2
|
import { Fragment } from "@builder.io/qwik/jsx-runtime";
|
|
3
3
|
import { isServer } from "@builder.io/qwik/build";
|
|
4
|
-
const
|
|
5
|
-
|
|
4
|
+
const EMPTY_HTML_ELEMENTS = /* @__PURE__ */ new Set([
|
|
5
|
+
"area",
|
|
6
|
+
"base",
|
|
7
|
+
"br",
|
|
8
|
+
"col",
|
|
9
|
+
"embed",
|
|
10
|
+
"hr",
|
|
11
|
+
"img",
|
|
12
|
+
"input",
|
|
13
|
+
"keygen",
|
|
14
|
+
"link",
|
|
15
|
+
"meta",
|
|
16
|
+
"param",
|
|
17
|
+
"source",
|
|
18
|
+
"track",
|
|
19
|
+
"wbr"
|
|
20
|
+
]);
|
|
21
|
+
const isEmptyElement = (tagName) => {
|
|
22
|
+
return typeof tagName === "string" && EMPTY_HTML_ELEMENTS.has(tagName.toLowerCase());
|
|
23
|
+
};
|
|
24
|
+
const DynamicRenderer = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
|
|
25
|
+
_jsxBranch();
|
|
6
26
|
return /* @__PURE__ */ _jsxC(Fragment, {
|
|
7
|
-
children: props.
|
|
27
|
+
children: !isEmptyElement(props.TagName) ? typeof props.TagName === "string" ? /* @__PURE__ */ _jsxC(props.TagName, {
|
|
8
28
|
...props.attributes,
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}, {
|
|
13
|
-
href: _fnSignal((p0) => p0.link, [
|
|
14
|
-
props
|
|
15
|
-
], "p0.link"),
|
|
16
|
-
role: "button",
|
|
17
|
-
target: _fnSignal((p0) => p0.openLinkInNewTab ? "_blank" : void 0, [
|
|
18
|
-
props
|
|
19
|
-
], 'p0.openLinkInNewTab?"_blank":undefined')
|
|
20
|
-
}, 0, "jc_0") : /* @__PURE__ */ _jsxS("button", {
|
|
29
|
+
...props.actionAttributes,
|
|
30
|
+
children: /* @__PURE__ */ _jsxC(Slot$1, null, 3, "yW_0")
|
|
31
|
+
}, 0, "yW_1") : /* @__PURE__ */ _jsxC(props.TagName, {
|
|
21
32
|
...props.attributes,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
33
|
+
...props.actionAttributes,
|
|
34
|
+
children: /* @__PURE__ */ _jsxC(Slot$1, null, 3, "yW_2")
|
|
35
|
+
}, 0, "yW_3") : /* @__PURE__ */ _jsxC(props.TagName, {
|
|
36
|
+
...props.attributes,
|
|
37
|
+
...props.actionAttributes
|
|
38
|
+
}, 0, "yW_4")
|
|
39
|
+
}, 1, "yW_5");
|
|
40
|
+
}, "DynamicRenderer_component_1Co0xkmyAfQ"));
|
|
41
|
+
const TARGET = "qwik";
|
|
42
|
+
const getClassPropName = () => {
|
|
43
|
+
switch (TARGET) {
|
|
44
|
+
case "react":
|
|
45
|
+
case "reactNative":
|
|
46
|
+
case "rsc":
|
|
47
|
+
return "className";
|
|
48
|
+
case "svelte":
|
|
49
|
+
case "vue":
|
|
50
|
+
case "solid":
|
|
51
|
+
case "qwik":
|
|
52
|
+
return "class";
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
const Button = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
|
|
56
|
+
return /* @__PURE__ */ _jsxC(DynamicRenderer, {
|
|
57
|
+
get TagName() {
|
|
58
|
+
return props.link ? props.builderLinkComponent || "a" : "button";
|
|
59
|
+
},
|
|
60
|
+
actionAttributes: {},
|
|
61
|
+
attributes: {
|
|
62
|
+
...props.attributes,
|
|
63
|
+
[getClassPropName()]: `${props.link ? "" : "builder-button"} ${props.attributes[getClassPropName()] || ""}`,
|
|
64
|
+
...props.link ? {
|
|
65
|
+
href: props.link,
|
|
66
|
+
target: props.openLinkInNewTab ? "_blank" : void 0,
|
|
67
|
+
role: "link"
|
|
68
|
+
} : {
|
|
69
|
+
role: "button"
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
children: _fnSignal((p0) => p0.text, [
|
|
73
|
+
props
|
|
74
|
+
], "p0.text"),
|
|
75
|
+
[_IMMUTABLE]: {
|
|
76
|
+
TagName: _fnSignal((p0) => p0.link ? p0.builderLinkComponent || "a" : "button", [
|
|
30
77
|
props
|
|
31
|
-
],
|
|
32
|
-
|
|
33
|
-
|
|
78
|
+
], 'p0.link?p0.builderLinkComponent||"a":"button"'),
|
|
79
|
+
actionAttributes: _IMMUTABLE
|
|
80
|
+
}
|
|
81
|
+
}, 3, "jc_0");
|
|
34
82
|
}, "Button_component_gJoMUICXoUQ"));
|
|
35
|
-
const STYLES$3 = `
|
|
36
|
-
.button-Button {
|
|
37
|
-
all: unset;
|
|
38
|
-
}
|
|
39
|
-
`;
|
|
40
83
|
const builderContext = createContextId("Builder");
|
|
41
84
|
const ComponentsContext = createContextId("Components");
|
|
42
85
|
function getBlockComponentOptions(block) {
|
|
@@ -60,7 +103,6 @@ const logger = {
|
|
|
60
103
|
function isBrowser() {
|
|
61
104
|
return typeof window !== "undefined" && typeof document !== "undefined";
|
|
62
105
|
}
|
|
63
|
-
const TARGET = "qwik";
|
|
64
106
|
function isIframe() {
|
|
65
107
|
return isBrowser() && window.self !== window.top;
|
|
66
108
|
}
|
|
@@ -479,6 +521,29 @@ function getBlockActions(options) {
|
|
|
479
521
|
}
|
|
480
522
|
return obj;
|
|
481
523
|
}
|
|
524
|
+
function transformStyleProperty({ style }) {
|
|
525
|
+
return style;
|
|
526
|
+
}
|
|
527
|
+
const getStyle = ({ block, context }) => {
|
|
528
|
+
return mapStyleObjToStrIfNeeded(transformStyleProperty({
|
|
529
|
+
style: block.style || {},
|
|
530
|
+
context,
|
|
531
|
+
block
|
|
532
|
+
}));
|
|
533
|
+
};
|
|
534
|
+
function mapStyleObjToStrIfNeeded(style) {
|
|
535
|
+
switch (TARGET) {
|
|
536
|
+
case "svelte":
|
|
537
|
+
case "vue":
|
|
538
|
+
case "solid":
|
|
539
|
+
return convertStyleMapToCSSArray(style).join(" ");
|
|
540
|
+
case "qwik":
|
|
541
|
+
case "reactNative":
|
|
542
|
+
case "react":
|
|
543
|
+
case "rsc":
|
|
544
|
+
return style;
|
|
545
|
+
}
|
|
546
|
+
}
|
|
482
547
|
function transformBlockProperties({ properties }) {
|
|
483
548
|
return properties;
|
|
484
549
|
}
|
|
@@ -493,8 +558,11 @@ function getBlockProperties({ block, context }) {
|
|
|
493
558
|
...extractRelevantRootBlockProperties(block),
|
|
494
559
|
...block.properties,
|
|
495
560
|
"builder-id": block.id,
|
|
496
|
-
style:
|
|
497
|
-
|
|
561
|
+
style: getStyle({
|
|
562
|
+
block,
|
|
563
|
+
context
|
|
564
|
+
}),
|
|
565
|
+
[getClassPropName()]: [
|
|
498
566
|
block.id,
|
|
499
567
|
"builder-block",
|
|
500
568
|
block.class,
|
|
@@ -507,56 +575,6 @@ function getBlockProperties({ block, context }) {
|
|
|
507
575
|
block
|
|
508
576
|
});
|
|
509
577
|
}
|
|
510
|
-
function getStyleAttribute(style) {
|
|
511
|
-
switch (TARGET) {
|
|
512
|
-
case "svelte":
|
|
513
|
-
case "vue":
|
|
514
|
-
case "solid":
|
|
515
|
-
return convertStyleMapToCSSArray(style).join(" ");
|
|
516
|
-
case "qwik":
|
|
517
|
-
case "reactNative":
|
|
518
|
-
case "react":
|
|
519
|
-
case "rsc":
|
|
520
|
-
return style;
|
|
521
|
-
}
|
|
522
|
-
}
|
|
523
|
-
const EMPTY_HTML_ELEMENTS = /* @__PURE__ */ new Set([
|
|
524
|
-
"area",
|
|
525
|
-
"base",
|
|
526
|
-
"br",
|
|
527
|
-
"col",
|
|
528
|
-
"embed",
|
|
529
|
-
"hr",
|
|
530
|
-
"img",
|
|
531
|
-
"input",
|
|
532
|
-
"keygen",
|
|
533
|
-
"link",
|
|
534
|
-
"meta",
|
|
535
|
-
"param",
|
|
536
|
-
"source",
|
|
537
|
-
"track",
|
|
538
|
-
"wbr"
|
|
539
|
-
]);
|
|
540
|
-
const isEmptyElement = (tagName) => {
|
|
541
|
-
return typeof tagName === "string" && EMPTY_HTML_ELEMENTS.has(tagName.toLowerCase());
|
|
542
|
-
};
|
|
543
|
-
const DynamicRenderer = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
|
|
544
|
-
_jsxBranch();
|
|
545
|
-
return /* @__PURE__ */ _jsxC(Fragment, {
|
|
546
|
-
children: !isEmptyElement(props.TagName) ? typeof props.TagName === "string" ? /* @__PURE__ */ _jsxC(props.TagName, {
|
|
547
|
-
...props.attributes,
|
|
548
|
-
...props.actionAttributes,
|
|
549
|
-
children: /* @__PURE__ */ _jsxC(Slot$1, null, 3, "yW_0")
|
|
550
|
-
}, 0, "yW_1") : /* @__PURE__ */ _jsxC(props.TagName, {
|
|
551
|
-
...props.attributes,
|
|
552
|
-
...props.actionAttributes,
|
|
553
|
-
children: /* @__PURE__ */ _jsxC(Slot$1, null, 3, "yW_2")
|
|
554
|
-
}, 0, "yW_3") : /* @__PURE__ */ _jsxC(props.TagName, {
|
|
555
|
-
...props.attributes,
|
|
556
|
-
...props.actionAttributes
|
|
557
|
-
}, 0, "yW_4")
|
|
558
|
-
}, 1, "yW_5");
|
|
559
|
-
}, "DynamicRenderer_component_1Co0xkmyAfQ"));
|
|
560
578
|
const BlockWrapper = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
|
|
561
579
|
return /* @__PURE__ */ _jsxC(DynamicRenderer, {
|
|
562
580
|
get TagName() {
|
|
@@ -635,6 +653,7 @@ const ComponentRef = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pr
|
|
|
635
653
|
builderBlock: props.builderBlock,
|
|
636
654
|
context: props.context,
|
|
637
655
|
componentRef: props.componentRef,
|
|
656
|
+
linkComponent: props.linkComponent,
|
|
638
657
|
includeBlockProps: props.includeBlockProps,
|
|
639
658
|
isInteractive: props.isInteractive,
|
|
640
659
|
contextValue: props.context
|
|
@@ -648,10 +667,16 @@ const ComponentRef = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pr
|
|
|
648
667
|
get registeredComponents() {
|
|
649
668
|
return props.registeredComponents;
|
|
650
669
|
},
|
|
670
|
+
get linkComponent() {
|
|
671
|
+
return props.linkComponent;
|
|
672
|
+
},
|
|
651
673
|
[_IMMUTABLE]: {
|
|
652
674
|
context: _fnSignal((p0) => p0.context, [
|
|
653
675
|
props
|
|
654
676
|
], "p0.context"),
|
|
677
|
+
linkComponent: _fnSignal((p0) => p0.linkComponent, [
|
|
678
|
+
props
|
|
679
|
+
], "p0.linkComponent"),
|
|
655
680
|
registeredComponents: _fnSignal((p0) => p0.registeredComponents, [
|
|
656
681
|
props
|
|
657
682
|
], "p0.registeredComponents")
|
|
@@ -676,6 +701,9 @@ const RepeatedBlock = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((p
|
|
|
676
701
|
get registeredComponents() {
|
|
677
702
|
return props.registeredComponents;
|
|
678
703
|
},
|
|
704
|
+
get linkComponent() {
|
|
705
|
+
return props.linkComponent;
|
|
706
|
+
},
|
|
679
707
|
[_IMMUTABLE]: {
|
|
680
708
|
block: _fnSignal((p0) => p0.block, [
|
|
681
709
|
props
|
|
@@ -683,6 +711,9 @@ const RepeatedBlock = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((p
|
|
|
683
711
|
context: _fnSignal((p0) => p0.store, [
|
|
684
712
|
state
|
|
685
713
|
], "p0.store"),
|
|
714
|
+
linkComponent: _fnSignal((p0) => p0.linkComponent, [
|
|
715
|
+
props
|
|
716
|
+
], "p0.linkComponent"),
|
|
686
717
|
registeredComponents: _fnSignal((p0) => p0.registeredComponents, [
|
|
687
718
|
props
|
|
688
719
|
], "p0.registeredComponents")
|
|
@@ -729,9 +760,14 @@ const Block = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
|
|
|
729
760
|
props
|
|
730
761
|
]));
|
|
731
762
|
const Tag = useComputedQrl(/* @__PURE__ */ inlinedQrl(() => {
|
|
732
|
-
|
|
763
|
+
var _a2;
|
|
764
|
+
const [processedBlock2, props2] = useLexicalScope();
|
|
765
|
+
const shouldUseLink = props2.block.tagName === "a" || ((_a2 = processedBlock2.value.properties) == null ? void 0 : _a2.href) || processedBlock2.value.href;
|
|
766
|
+
if (shouldUseLink)
|
|
767
|
+
return props2.linkComponent || "a";
|
|
733
768
|
return props2.block.tagName || "div";
|
|
734
769
|
}, "Block_component_Tag_useComputed_eQnDgbcBW2A", [
|
|
770
|
+
processedBlock,
|
|
735
771
|
props
|
|
736
772
|
]));
|
|
737
773
|
const canShowBlock = useComputedQrl(/* @__PURE__ */ inlinedQrl(() => {
|
|
@@ -761,7 +797,7 @@ const Block = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
|
|
|
761
797
|
repeatItem
|
|
762
798
|
]));
|
|
763
799
|
const componentRefProps = useComputedQrl(/* @__PURE__ */ inlinedQrl(() => {
|
|
764
|
-
var _a2, _b, _c, _d, _e;
|
|
800
|
+
var _a2, _b, _c, _d, _e, _f, _g, _h;
|
|
765
801
|
const [blockComponent2, processedBlock2, props2, state2] = useLexicalScope();
|
|
766
802
|
return {
|
|
767
803
|
blockChildren: processedBlock2.value.children ?? [],
|
|
@@ -769,15 +805,19 @@ const Block = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
|
|
|
769
805
|
componentOptions: {
|
|
770
806
|
...getBlockComponentOptions(processedBlock2.value),
|
|
771
807
|
builderContext: props2.context,
|
|
772
|
-
...((_b = blockComponent2.value) == null ? void 0 : _b.name) === "
|
|
808
|
+
...((_b = blockComponent2.value) == null ? void 0 : _b.name) === "Core:Button" || ((_c = blockComponent2.value) == null ? void 0 : _c.name) === "Symbol" || ((_d = blockComponent2.value) == null ? void 0 : _d.name) === "Columns" ? {
|
|
809
|
+
builderLinkComponent: props2.linkComponent
|
|
810
|
+
} : {},
|
|
811
|
+
...((_e = blockComponent2.value) == null ? void 0 : _e.name) === "Symbol" || ((_f = blockComponent2.value) == null ? void 0 : _f.name) === "Columns" ? {
|
|
773
812
|
builderComponents: props2.registeredComponents
|
|
774
813
|
} : {}
|
|
775
814
|
},
|
|
776
815
|
context: state2.childrenContext,
|
|
816
|
+
linkComponent: props2.linkComponent,
|
|
777
817
|
registeredComponents: props2.registeredComponents,
|
|
778
818
|
builderBlock: processedBlock2.value,
|
|
779
|
-
includeBlockProps: ((
|
|
780
|
-
isInteractive: !((
|
|
819
|
+
includeBlockProps: ((_g = blockComponent2.value) == null ? void 0 : _g.noWrap) === true,
|
|
820
|
+
isInteractive: !((_h = blockComponent2.value) == null ? void 0 : _h.isRSC)
|
|
781
821
|
};
|
|
782
822
|
}, "Block_component_componentRefProps_useComputed_Ikbl8VO04ho", [
|
|
783
823
|
blockComponent,
|
|
@@ -814,6 +854,9 @@ const Block = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
|
|
|
814
854
|
get context() {
|
|
815
855
|
return props.context;
|
|
816
856
|
},
|
|
857
|
+
get linkComponent() {
|
|
858
|
+
return props.linkComponent;
|
|
859
|
+
},
|
|
817
860
|
children: [
|
|
818
861
|
/* @__PURE__ */ _jsxC(ComponentRef, {
|
|
819
862
|
get componentRef() {
|
|
@@ -831,6 +874,9 @@ const Block = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
|
|
|
831
874
|
get registeredComponents() {
|
|
832
875
|
return componentRefProps.value.registeredComponents;
|
|
833
876
|
},
|
|
877
|
+
get linkComponent() {
|
|
878
|
+
return componentRefProps.value.linkComponent;
|
|
879
|
+
},
|
|
834
880
|
get builderBlock() {
|
|
835
881
|
return componentRefProps.value.builderBlock;
|
|
836
882
|
},
|
|
@@ -862,6 +908,9 @@ const Block = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
|
|
|
862
908
|
isInteractive: _fnSignal((p0) => p0.value.isInteractive, [
|
|
863
909
|
componentRefProps
|
|
864
910
|
], "p0.value.isInteractive"),
|
|
911
|
+
linkComponent: _fnSignal((p0) => p0.value.linkComponent, [
|
|
912
|
+
componentRefProps
|
|
913
|
+
], "p0.value.linkComponent"),
|
|
865
914
|
registeredComponents: _fnSignal((p0) => p0.value.registeredComponents, [
|
|
866
915
|
componentRefProps
|
|
867
916
|
], "p0.value.registeredComponents")
|
|
@@ -876,10 +925,16 @@ const Block = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
|
|
|
876
925
|
get registeredComponents() {
|
|
877
926
|
return props.registeredComponents;
|
|
878
927
|
},
|
|
928
|
+
get linkComponent() {
|
|
929
|
+
return props.linkComponent;
|
|
930
|
+
},
|
|
879
931
|
[_IMMUTABLE]: {
|
|
880
932
|
context: _fnSignal((p0) => p0.childrenContext, [
|
|
881
933
|
state
|
|
882
934
|
], "p0.childrenContext"),
|
|
935
|
+
linkComponent: _fnSignal((p0) => p0.linkComponent, [
|
|
936
|
+
props
|
|
937
|
+
], "p0.linkComponent"),
|
|
883
938
|
registeredComponents: _fnSignal((p0) => p0.registeredComponents, [
|
|
884
939
|
props
|
|
885
940
|
], "p0.registeredComponents")
|
|
@@ -896,7 +951,10 @@ const Block = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
|
|
|
896
951
|
], "p0.value"),
|
|
897
952
|
context: _fnSignal((p0) => p0.context, [
|
|
898
953
|
props
|
|
899
|
-
], "p0.context")
|
|
954
|
+
], "p0.context"),
|
|
955
|
+
linkComponent: _fnSignal((p0) => p0.linkComponent, [
|
|
956
|
+
props
|
|
957
|
+
], "p0.linkComponent")
|
|
900
958
|
}
|
|
901
959
|
}, 1, "jN_2") : (repeatItem.value || []).map((data, index) => {
|
|
902
960
|
return /* @__PURE__ */ _jsxC(RepeatedBlock, {
|
|
@@ -909,8 +967,14 @@ const Block = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
|
|
|
909
967
|
get registeredComponents() {
|
|
910
968
|
return props.registeredComponents;
|
|
911
969
|
},
|
|
970
|
+
get linkComponent() {
|
|
971
|
+
return props.linkComponent;
|
|
972
|
+
},
|
|
912
973
|
[_IMMUTABLE]: {
|
|
913
974
|
block: _wrapProp(data, "block"),
|
|
975
|
+
linkComponent: _fnSignal((p0) => p0.linkComponent, [
|
|
976
|
+
props
|
|
977
|
+
], "p0.linkComponent"),
|
|
914
978
|
registeredComponents: _fnSignal((p0) => p0.registeredComponents, [
|
|
915
979
|
props
|
|
916
980
|
], "p0.registeredComponents"),
|
|
@@ -933,6 +997,9 @@ const Block = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
|
|
|
933
997
|
get registeredComponents() {
|
|
934
998
|
return componentRefProps.value.registeredComponents;
|
|
935
999
|
},
|
|
1000
|
+
get linkComponent() {
|
|
1001
|
+
return componentRefProps.value.linkComponent;
|
|
1002
|
+
},
|
|
936
1003
|
get builderBlock() {
|
|
937
1004
|
return componentRefProps.value.builderBlock;
|
|
938
1005
|
},
|
|
@@ -964,6 +1031,9 @@ const Block = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
|
|
|
964
1031
|
isInteractive: _fnSignal((p0) => p0.value.isInteractive, [
|
|
965
1032
|
componentRefProps
|
|
966
1033
|
], "p0.value.isInteractive"),
|
|
1034
|
+
linkComponent: _fnSignal((p0) => p0.value.linkComponent, [
|
|
1035
|
+
componentRefProps
|
|
1036
|
+
], "p0.value.linkComponent"),
|
|
967
1037
|
registeredComponents: _fnSignal((p0) => p0.value.registeredComponents, [
|
|
968
1038
|
componentRefProps
|
|
969
1039
|
], "p0.value.registeredComponents")
|
|
@@ -1091,6 +1161,9 @@ const Blocks = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =
|
|
|
1091
1161
|
children: props.blocks ? (props.blocks || []).map((block) => {
|
|
1092
1162
|
return /* @__PURE__ */ _jsxC(Block, {
|
|
1093
1163
|
block,
|
|
1164
|
+
get linkComponent() {
|
|
1165
|
+
return props.linkComponent;
|
|
1166
|
+
},
|
|
1094
1167
|
get context() {
|
|
1095
1168
|
return props.context || builderContext$1;
|
|
1096
1169
|
},
|
|
@@ -1102,6 +1175,9 @@ const Blocks = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =
|
|
|
1102
1175
|
builderContext$1,
|
|
1103
1176
|
props
|
|
1104
1177
|
], "p1.context||p0"),
|
|
1178
|
+
linkComponent: _fnSignal((p0) => p0.linkComponent, [
|
|
1179
|
+
props
|
|
1180
|
+
], "p0.linkComponent"),
|
|
1105
1181
|
registeredComponents: _fnSignal((p0, p1) => p1.registeredComponents || p0.registeredComponents, [
|
|
1106
1182
|
componentsContext,
|
|
1107
1183
|
props
|
|
@@ -1161,7 +1237,13 @@ const columnCssVars = function columnCssVars2(props, state, index) {
|
|
|
1161
1237
|
const mobileWidth = "100%";
|
|
1162
1238
|
const mobileMarginLeft = 0;
|
|
1163
1239
|
const marginLeftKey = "margin-left";
|
|
1240
|
+
const sharedStyles = {
|
|
1241
|
+
display: "flex",
|
|
1242
|
+
flexDirection: "column",
|
|
1243
|
+
alignItems: "stretch"
|
|
1244
|
+
};
|
|
1164
1245
|
return {
|
|
1246
|
+
...sharedStyles,
|
|
1165
1247
|
width,
|
|
1166
1248
|
[marginLeftKey]: gutterPixels,
|
|
1167
1249
|
"--column-width-mobile": getMobileStyle(props, state, {
|
|
@@ -1259,40 +1341,56 @@ const Columns = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props)
|
|
|
1259
1341
|
}
|
|
1260
1342
|
}, 3, "c0_0"),
|
|
1261
1343
|
(props.columns || []).map((column, index) => {
|
|
1262
|
-
return /* @__PURE__ */
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
get styleProp() {
|
|
1272
|
-
return {
|
|
1273
|
-
flexGrow: "1"
|
|
1274
|
-
};
|
|
1275
|
-
},
|
|
1276
|
-
get context() {
|
|
1277
|
-
return props.builderContext;
|
|
1344
|
+
return /* @__PURE__ */ _jsxC(DynamicRenderer, {
|
|
1345
|
+
TagName: column.link ? props.builderLinkComponent || "a" : "div",
|
|
1346
|
+
actionAttributes: {},
|
|
1347
|
+
attributes: {
|
|
1348
|
+
...column.link ? {
|
|
1349
|
+
href: column.link
|
|
1350
|
+
} : {},
|
|
1351
|
+
[getClassPropName()]: "builder-column",
|
|
1352
|
+
style: mapStyleObjToStrIfNeeded(columnCssVars(props, state, index))
|
|
1278
1353
|
},
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1354
|
+
children: /* @__PURE__ */ _jsxC(Blocks, {
|
|
1355
|
+
path: `component.options.columns.${index}.blocks`,
|
|
1356
|
+
get parent() {
|
|
1357
|
+
return props.builderBlock.id;
|
|
1358
|
+
},
|
|
1359
|
+
get styleProp() {
|
|
1360
|
+
return {
|
|
1361
|
+
flexGrow: "1"
|
|
1362
|
+
};
|
|
1363
|
+
},
|
|
1364
|
+
get context() {
|
|
1365
|
+
return props.builderContext;
|
|
1366
|
+
},
|
|
1367
|
+
get registeredComponents() {
|
|
1368
|
+
return props.builderComponents;
|
|
1369
|
+
},
|
|
1370
|
+
get linkComponent() {
|
|
1371
|
+
return props.builderLinkComponent;
|
|
1372
|
+
},
|
|
1373
|
+
blocks: deoptSignal(column.blocks),
|
|
1374
|
+
[_IMMUTABLE]: {
|
|
1375
|
+
context: _fnSignal((p0) => p0.builderContext, [
|
|
1376
|
+
props
|
|
1377
|
+
], "p0.builderContext"),
|
|
1378
|
+
linkComponent: _fnSignal((p0) => p0.builderLinkComponent, [
|
|
1379
|
+
props
|
|
1380
|
+
], "p0.builderLinkComponent"),
|
|
1381
|
+
parent: _fnSignal((p0) => p0.builderBlock.id, [
|
|
1382
|
+
props
|
|
1383
|
+
], "p0.builderBlock.id"),
|
|
1384
|
+
registeredComponents: _fnSignal((p0) => p0.builderComponents, [
|
|
1385
|
+
props
|
|
1386
|
+
], "p0.builderComponents"),
|
|
1387
|
+
styleProp: _IMMUTABLE
|
|
1388
|
+
}
|
|
1389
|
+
}, 3, "c0_1"),
|
|
1283
1390
|
[_IMMUTABLE]: {
|
|
1284
|
-
|
|
1285
|
-
props
|
|
1286
|
-
], "p0.builderContext"),
|
|
1287
|
-
parent: _fnSignal((p0) => p0.builderBlock.id, [
|
|
1288
|
-
props
|
|
1289
|
-
], "p0.builderBlock.id"),
|
|
1290
|
-
registeredComponents: _fnSignal((p0) => p0.builderComponents, [
|
|
1291
|
-
props
|
|
1292
|
-
], "p0.builderComponents"),
|
|
1293
|
-
styleProp: _IMMUTABLE
|
|
1391
|
+
actionAttributes: _IMMUTABLE
|
|
1294
1392
|
}
|
|
1295
|
-
},
|
|
1393
|
+
}, 1, index);
|
|
1296
1394
|
})
|
|
1297
1395
|
], 1, "c0_2");
|
|
1298
1396
|
}, "Columns_component_7yLj4bxdI6c"));
|
|
@@ -1301,11 +1399,6 @@ const STYLES$1 = `
|
|
|
1301
1399
|
display: flex;
|
|
1302
1400
|
line-height: normal;
|
|
1303
1401
|
}
|
|
1304
|
-
.div-Columns-2 {
|
|
1305
|
-
display: flex;
|
|
1306
|
-
flex-direction: column;
|
|
1307
|
-
align-items: stretch;
|
|
1308
|
-
}
|
|
1309
1402
|
`;
|
|
1310
1403
|
const FragmentComponent = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
|
|
1311
1404
|
return /* @__PURE__ */ _jsxQ("span", null, null, /* @__PURE__ */ _jsxC(Slot$1, null, 3, "oj_0"), 1, "oj_1");
|
|
@@ -3228,7 +3321,7 @@ const getInteractionPropertiesForEvent = (event) => {
|
|
|
3228
3321
|
}
|
|
3229
3322
|
};
|
|
3230
3323
|
};
|
|
3231
|
-
const SDK_VERSION = "0.12.
|
|
3324
|
+
const SDK_VERSION = "0.12.4";
|
|
3232
3325
|
const registry = {};
|
|
3233
3326
|
function register(type, info) {
|
|
3234
3327
|
let typeList = registry[type];
|
|
@@ -3755,6 +3848,10 @@ ${getFontCss({
|
|
|
3755
3848
|
customFonts: props.customFonts
|
|
3756
3849
|
})}
|
|
3757
3850
|
|
|
3851
|
+
.builder-button {
|
|
3852
|
+
all: unset;
|
|
3853
|
+
}
|
|
3854
|
+
|
|
3758
3855
|
.builder-text > p:first-of-type, .builder-text > .builder-paragraph:first-of-type {
|
|
3759
3856
|
margin: 0;
|
|
3760
3857
|
}
|
|
@@ -3911,6 +4008,9 @@ const ContentComponent = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl
|
|
|
3911
4008
|
get contentWrapperProps() {
|
|
3912
4009
|
return props.contentWrapperProps;
|
|
3913
4010
|
},
|
|
4011
|
+
get linkComponent() {
|
|
4012
|
+
return props.linkComponent;
|
|
4013
|
+
},
|
|
3914
4014
|
get trustedHosts() {
|
|
3915
4015
|
return props.trustedHosts;
|
|
3916
4016
|
},
|
|
@@ -3970,6 +4070,9 @@ const ContentComponent = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl
|
|
|
3970
4070
|
get registeredComponents() {
|
|
3971
4071
|
return state.registeredComponents;
|
|
3972
4072
|
},
|
|
4073
|
+
get linkComponent() {
|
|
4074
|
+
return props.linkComponent;
|
|
4075
|
+
},
|
|
3973
4076
|
[_IMMUTABLE]: {
|
|
3974
4077
|
blocks: _fnSignal((p0) => {
|
|
3975
4078
|
var _a2, _b2;
|
|
@@ -3980,6 +4083,9 @@ const ContentComponent = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl
|
|
|
3980
4083
|
context: _fnSignal((p0) => p0.builderContextSignal, [
|
|
3981
4084
|
state
|
|
3982
4085
|
], "p0.builderContextSignal"),
|
|
4086
|
+
linkComponent: _fnSignal((p0) => p0.linkComponent, [
|
|
4087
|
+
props
|
|
4088
|
+
], "p0.linkComponent"),
|
|
3983
4089
|
registeredComponents: _fnSignal((p0) => p0.registeredComponents, [
|
|
3984
4090
|
state
|
|
3985
4091
|
], "p0.registeredComponents")
|
|
@@ -4017,6 +4123,9 @@ const ContentComponent = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl
|
|
|
4017
4123
|
includeRefs: _fnSignal((p0) => p0.includeRefs, [
|
|
4018
4124
|
props
|
|
4019
4125
|
], "p0.includeRefs"),
|
|
4126
|
+
linkComponent: _fnSignal((p0) => p0.linkComponent, [
|
|
4127
|
+
props
|
|
4128
|
+
], "p0.linkComponent"),
|
|
4020
4129
|
locale: _fnSignal((p0) => p0.locale, [
|
|
4021
4130
|
props
|
|
4022
4131
|
], "p0.locale"),
|
|
@@ -4134,6 +4243,9 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
|
|
|
4134
4243
|
get customComponents() {
|
|
4135
4244
|
return props.customComponents;
|
|
4136
4245
|
},
|
|
4246
|
+
get linkComponent() {
|
|
4247
|
+
return props.linkComponent;
|
|
4248
|
+
},
|
|
4137
4249
|
get canTrack() {
|
|
4138
4250
|
return props.canTrack;
|
|
4139
4251
|
},
|
|
@@ -4204,6 +4316,9 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
|
|
|
4204
4316
|
isSsrAbTest: _fnSignal((p0) => p0.shouldRenderVariants, [
|
|
4205
4317
|
state
|
|
4206
4318
|
], "p0.shouldRenderVariants"),
|
|
4319
|
+
linkComponent: _fnSignal((p0) => p0.linkComponent, [
|
|
4320
|
+
props
|
|
4321
|
+
], "p0.linkComponent"),
|
|
4207
4322
|
locale: _fnSignal((p0) => p0.locale, [
|
|
4208
4323
|
props
|
|
4209
4324
|
], "p0.locale"),
|
|
@@ -4242,6 +4357,9 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
|
|
|
4242
4357
|
get customComponents() {
|
|
4243
4358
|
return props.customComponents;
|
|
4244
4359
|
},
|
|
4360
|
+
get linkComponent() {
|
|
4361
|
+
return props.linkComponent;
|
|
4362
|
+
},
|
|
4245
4363
|
get canTrack() {
|
|
4246
4364
|
return props.canTrack;
|
|
4247
4365
|
},
|
|
@@ -4315,6 +4433,9 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
|
|
|
4315
4433
|
isSsrAbTest: _fnSignal((p0) => p0.shouldRenderVariants, [
|
|
4316
4434
|
state
|
|
4317
4435
|
], "p0.shouldRenderVariants"),
|
|
4436
|
+
linkComponent: _fnSignal((p0) => p0.linkComponent, [
|
|
4437
|
+
props
|
|
4438
|
+
], "p0.linkComponent"),
|
|
4318
4439
|
locale: _fnSignal((p0) => p0.locale, [
|
|
4319
4440
|
props
|
|
4320
4441
|
], "p0.locale"),
|
|
@@ -4365,7 +4486,7 @@ const Symbol$1 = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props)
|
|
|
4365
4486
|
var _a2, _b;
|
|
4366
4487
|
const [props2] = useLexicalScope();
|
|
4367
4488
|
return [
|
|
4368
|
-
props2.attributes
|
|
4489
|
+
props2.attributes[getClassPropName()],
|
|
4369
4490
|
"builder-symbol",
|
|
4370
4491
|
((_a2 = props2.symbol) == null ? void 0 : _a2.inline) ? "builder-inline-symbol" : void 0,
|
|
4371
4492
|
((_b = props2.symbol) == null ? void 0 : _b.dynamic) || props2.dynamic ? "builder-dynamic-symbol" : void 0
|
|
@@ -4418,6 +4539,9 @@ const Symbol$1 = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props)
|
|
|
4418
4539
|
get content() {
|
|
4419
4540
|
return state.contentToUse;
|
|
4420
4541
|
},
|
|
4542
|
+
get linkComponent() {
|
|
4543
|
+
return props.builderLinkComponent;
|
|
4544
|
+
},
|
|
4421
4545
|
[_IMMUTABLE]: {
|
|
4422
4546
|
apiKey: _fnSignal((p0) => p0.builderContext.apiKey, [
|
|
4423
4547
|
props
|
|
@@ -4451,6 +4575,9 @@ const Symbol$1 = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props)
|
|
|
4451
4575
|
props,
|
|
4452
4576
|
state
|
|
4453
4577
|
], "{...p0.symbol?.data,...p0.builderContext.localState,...p1.contentToUse?.data?.state}"),
|
|
4578
|
+
linkComponent: _fnSignal((p0) => p0.builderLinkComponent, [
|
|
4579
|
+
props
|
|
4580
|
+
], "p0.builderLinkComponent"),
|
|
4454
4581
|
model: _fnSignal((p0) => {
|
|
4455
4582
|
var _a2;
|
|
4456
4583
|
return (_a2 = p0.symbol) == null ? void 0 : _a2.model;
|