@builder.io/sdk-qwik 0.12.1 → 0.12.3
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 +210 -196
- package/lib/browser/index.qwik.mjs +211 -197
- package/lib/edge/index.qwik.cjs +210 -196
- package/lib/edge/index.qwik.mjs +211 -197
- package/lib/node/index.qwik.cjs +210 -196
- package/lib/node/index.qwik.mjs +211 -197
- package/package.json +1 -1
- package/types/src/blocks/button/button.d.ts +0 -1
- package/types/src/components/block/block.helpers.d.ts +0 -1
- package/types/src/components/block/components/block-wrapper.d.ts +0 -8
- package/types/src/components/content-variants/content-variants.types.d.ts +4 -0
- package/types/src/components/dynamic-renderer/dynamic-renderer.d.ts +7 -0
- package/types/src/components/dynamic-renderer/dynamic-renderer.helpers.d.ts +1 -0
- package/types/src/constants/sdk-version.d.ts +1 -1
- package/types/src/functions/is-from-trusted-host.d.ts +3 -0
- package/types/src/scripts/init-editing.d.ts +1 -0
|
@@ -4,7 +4,6 @@ const qwik = require("@builder.io/qwik");
|
|
|
4
4
|
const jsxRuntime = require("@builder.io/qwik/jsx-runtime");
|
|
5
5
|
const build = require("@builder.io/qwik/build");
|
|
6
6
|
const Button = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
|
|
7
|
-
qwik.useStylesScopedQrl(/* @__PURE__ */ qwik.inlinedQrl(STYLES$3, "Button_component_useStylesScoped_a1JZ0Q0Q2Oc"));
|
|
8
7
|
return /* @__PURE__ */ qwik._jsxC(jsxRuntime.Fragment, {
|
|
9
8
|
children: props.link ? /* @__PURE__ */ qwik._jsxS("a", {
|
|
10
9
|
...props.attributes,
|
|
@@ -25,20 +24,16 @@ const Button = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl
|
|
|
25
24
|
props
|
|
26
25
|
], "p0.text")
|
|
27
26
|
}, {
|
|
28
|
-
class: qwik._fnSignal((p0) => p0.attributes.class
|
|
27
|
+
class: qwik._fnSignal((p0) => `builder-button ${p0.attributes.class}`, [
|
|
29
28
|
props
|
|
30
|
-
],
|
|
29
|
+
], "`builder-button ${p0.attributes.class}`"),
|
|
30
|
+
role: "button",
|
|
31
31
|
style: qwik._fnSignal((p0) => p0.attributes.style, [
|
|
32
32
|
props
|
|
33
33
|
], "p0.attributes.style")
|
|
34
34
|
}, 0, null)
|
|
35
35
|
}, 1, "jc_1");
|
|
36
36
|
}, "Button_component_gJoMUICXoUQ"));
|
|
37
|
-
const STYLES$3 = `
|
|
38
|
-
.button-Button {
|
|
39
|
-
all: unset;
|
|
40
|
-
}
|
|
41
|
-
`;
|
|
42
37
|
const builderContext = qwik.createContextId("Builder");
|
|
43
38
|
const ComponentsContext = qwik.createContextId("Components");
|
|
44
39
|
function getBlockComponentOptions(block) {
|
|
@@ -238,26 +233,6 @@ function getProcessedBlock({ block, context, shouldEvaluateBindings, localState,
|
|
|
238
233
|
else
|
|
239
234
|
return transformedBlock;
|
|
240
235
|
}
|
|
241
|
-
const EMPTY_HTML_ELEMENTS = [
|
|
242
|
-
"area",
|
|
243
|
-
"base",
|
|
244
|
-
"br",
|
|
245
|
-
"col",
|
|
246
|
-
"embed",
|
|
247
|
-
"hr",
|
|
248
|
-
"img",
|
|
249
|
-
"input",
|
|
250
|
-
"keygen",
|
|
251
|
-
"link",
|
|
252
|
-
"meta",
|
|
253
|
-
"param",
|
|
254
|
-
"source",
|
|
255
|
-
"track",
|
|
256
|
-
"wbr"
|
|
257
|
-
];
|
|
258
|
-
const isEmptyHtmlElement = (tagName) => {
|
|
259
|
-
return typeof tagName === "string" && EMPTY_HTML_ELEMENTS.includes(tagName.toLowerCase());
|
|
260
|
-
};
|
|
261
236
|
const getComponent = ({ block, context, registeredComponents }) => {
|
|
262
237
|
var _a;
|
|
263
238
|
const componentName = (_a = getProcessedBlock({
|
|
@@ -542,38 +517,67 @@ function getStyleAttribute(style) {
|
|
|
542
517
|
return style;
|
|
543
518
|
}
|
|
544
519
|
}
|
|
545
|
-
const
|
|
520
|
+
const EMPTY_HTML_ELEMENTS = /* @__PURE__ */ new Set([
|
|
521
|
+
"area",
|
|
522
|
+
"base",
|
|
523
|
+
"br",
|
|
524
|
+
"col",
|
|
525
|
+
"embed",
|
|
526
|
+
"hr",
|
|
527
|
+
"img",
|
|
528
|
+
"input",
|
|
529
|
+
"keygen",
|
|
530
|
+
"link",
|
|
531
|
+
"meta",
|
|
532
|
+
"param",
|
|
533
|
+
"source",
|
|
534
|
+
"track",
|
|
535
|
+
"wbr"
|
|
536
|
+
]);
|
|
537
|
+
const isEmptyElement = (tagName) => {
|
|
538
|
+
return typeof tagName === "string" && EMPTY_HTML_ELEMENTS.has(tagName.toLowerCase());
|
|
539
|
+
};
|
|
540
|
+
const DynamicRenderer = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
|
|
546
541
|
qwik._jsxBranch();
|
|
547
542
|
return /* @__PURE__ */ qwik._jsxC(jsxRuntime.Fragment, {
|
|
548
|
-
children: props.
|
|
549
|
-
...
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
...
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
543
|
+
children: !isEmptyElement(props.TagName) ? typeof props.TagName === "string" ? /* @__PURE__ */ qwik._jsxC(props.TagName, {
|
|
544
|
+
...props.attributes,
|
|
545
|
+
...props.actionAttributes,
|
|
546
|
+
children: /* @__PURE__ */ qwik._jsxC(qwik.Slot, null, 3, "yW_0")
|
|
547
|
+
}, 0, "yW_1") : /* @__PURE__ */ qwik._jsxC(props.TagName, {
|
|
548
|
+
...props.attributes,
|
|
549
|
+
...props.actionAttributes,
|
|
550
|
+
children: /* @__PURE__ */ qwik._jsxC(qwik.Slot, null, 3, "yW_2")
|
|
551
|
+
}, 0, "yW_3") : /* @__PURE__ */ qwik._jsxC(props.TagName, {
|
|
552
|
+
...props.attributes,
|
|
553
|
+
...props.actionAttributes
|
|
554
|
+
}, 0, "yW_4")
|
|
555
|
+
}, 1, "yW_5");
|
|
556
|
+
}, "DynamicRenderer_component_1Co0xkmyAfQ"));
|
|
557
|
+
const BlockWrapper = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
|
|
558
|
+
return /* @__PURE__ */ qwik._jsxC(DynamicRenderer, {
|
|
559
|
+
get TagName() {
|
|
560
|
+
return props.Wrapper;
|
|
561
|
+
},
|
|
562
|
+
actionAttributes: getBlockActions({
|
|
563
|
+
block: props.block,
|
|
564
|
+
rootState: props.context.rootState,
|
|
565
|
+
rootSetState: props.context.rootSetState,
|
|
566
|
+
localState: props.context.localState,
|
|
567
|
+
context: props.context.context,
|
|
568
|
+
stripPrefix: true
|
|
569
|
+
}),
|
|
570
|
+
attributes: getBlockProperties({
|
|
571
|
+
block: props.block,
|
|
572
|
+
context: props.context
|
|
573
|
+
}),
|
|
574
|
+
children: /* @__PURE__ */ qwik._jsxC(qwik.Slot, null, 3, "87_0"),
|
|
575
|
+
[qwik._IMMUTABLE]: {
|
|
576
|
+
TagName: qwik._fnSignal((p0) => p0.Wrapper, [
|
|
577
|
+
props
|
|
578
|
+
], "p0.Wrapper")
|
|
579
|
+
}
|
|
580
|
+
}, 1, "87_1");
|
|
577
581
|
}, "BlockWrapper_component_kOI0j0aW8Nw"));
|
|
578
582
|
const InteractiveElement = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
|
|
579
583
|
return /* @__PURE__ */ qwik._jsxC(props.Wrapper, {
|
|
@@ -797,151 +801,120 @@ const Block = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl(
|
|
|
797
801
|
], "p0.context")
|
|
798
802
|
}
|
|
799
803
|
}, 3, "jN_0"),
|
|
800
|
-
!((_a = blockComponent.value) == null ? void 0 : _a.noWrap) ? /* @__PURE__ */ qwik._jsxC(
|
|
804
|
+
!((_a = blockComponent.value) == null ? void 0 : _a.noWrap) ? !repeatItem.value ? /* @__PURE__ */ qwik._jsxC(BlockWrapper, {
|
|
805
|
+
get Wrapper() {
|
|
806
|
+
return Tag.value;
|
|
807
|
+
},
|
|
808
|
+
get block() {
|
|
809
|
+
return processedBlock.value;
|
|
810
|
+
},
|
|
811
|
+
get context() {
|
|
812
|
+
return props.context;
|
|
813
|
+
},
|
|
801
814
|
children: [
|
|
802
|
-
|
|
803
|
-
get
|
|
804
|
-
return
|
|
815
|
+
/* @__PURE__ */ qwik._jsxC(ComponentRef, {
|
|
816
|
+
get componentRef() {
|
|
817
|
+
return componentRefProps.value.componentRef;
|
|
818
|
+
},
|
|
819
|
+
get componentOptions() {
|
|
820
|
+
return componentRefProps.value.componentOptions;
|
|
805
821
|
},
|
|
806
|
-
get
|
|
807
|
-
return
|
|
822
|
+
get blockChildren() {
|
|
823
|
+
return componentRefProps.value.blockChildren;
|
|
808
824
|
},
|
|
809
825
|
get context() {
|
|
810
|
-
return
|
|
826
|
+
return componentRefProps.value.context;
|
|
827
|
+
},
|
|
828
|
+
get registeredComponents() {
|
|
829
|
+
return componentRefProps.value.registeredComponents;
|
|
830
|
+
},
|
|
831
|
+
get builderBlock() {
|
|
832
|
+
return componentRefProps.value.builderBlock;
|
|
833
|
+
},
|
|
834
|
+
get includeBlockProps() {
|
|
835
|
+
return componentRefProps.value.includeBlockProps;
|
|
836
|
+
},
|
|
837
|
+
get isInteractive() {
|
|
838
|
+
return componentRefProps.value.isInteractive;
|
|
811
839
|
},
|
|
812
|
-
hasChildren: false,
|
|
813
840
|
[qwik._IMMUTABLE]: {
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
], "p0.value"),
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
], "p0.value"),
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
], "p0.
|
|
823
|
-
|
|
841
|
+
blockChildren: qwik._fnSignal((p0) => p0.value.blockChildren, [
|
|
842
|
+
componentRefProps
|
|
843
|
+
], "p0.value.blockChildren"),
|
|
844
|
+
builderBlock: qwik._fnSignal((p0) => p0.value.builderBlock, [
|
|
845
|
+
componentRefProps
|
|
846
|
+
], "p0.value.builderBlock"),
|
|
847
|
+
componentOptions: qwik._fnSignal((p0) => p0.value.componentOptions, [
|
|
848
|
+
componentRefProps
|
|
849
|
+
], "p0.value.componentOptions"),
|
|
850
|
+
componentRef: qwik._fnSignal((p0) => p0.value.componentRef, [
|
|
851
|
+
componentRefProps
|
|
852
|
+
], "p0.value.componentRef"),
|
|
853
|
+
context: qwik._fnSignal((p0) => p0.value.context, [
|
|
854
|
+
componentRefProps
|
|
855
|
+
], "p0.value.context"),
|
|
856
|
+
includeBlockProps: qwik._fnSignal((p0) => p0.value.includeBlockProps, [
|
|
857
|
+
componentRefProps
|
|
858
|
+
], "p0.value.includeBlockProps"),
|
|
859
|
+
isInteractive: qwik._fnSignal((p0) => p0.value.isInteractive, [
|
|
860
|
+
componentRefProps
|
|
861
|
+
], "p0.value.isInteractive"),
|
|
862
|
+
registeredComponents: qwik._fnSignal((p0) => p0.value.registeredComponents, [
|
|
863
|
+
componentRefProps
|
|
864
|
+
], "p0.value.registeredComponents")
|
|
824
865
|
}
|
|
825
|
-
}, 3, "jN_1")
|
|
826
|
-
|
|
827
|
-
return /* @__PURE__ */ qwik._jsxC(
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
get block() {
|
|
832
|
-
return data.block;
|
|
866
|
+
}, 3, "jN_1"),
|
|
867
|
+
(childrenWithoutParentComponent.value || []).map((child) => {
|
|
868
|
+
return /* @__PURE__ */ qwik._jsxC(Block, {
|
|
869
|
+
block: child,
|
|
870
|
+
get context() {
|
|
871
|
+
return state.childrenContext;
|
|
833
872
|
},
|
|
834
873
|
get registeredComponents() {
|
|
835
874
|
return props.registeredComponents;
|
|
836
875
|
},
|
|
837
876
|
[qwik._IMMUTABLE]: {
|
|
838
|
-
|
|
877
|
+
context: qwik._fnSignal((p0) => p0.childrenContext, [
|
|
878
|
+
state
|
|
879
|
+
], "p0.childrenContext"),
|
|
839
880
|
registeredComponents: qwik._fnSignal((p0) => p0.registeredComponents, [
|
|
840
881
|
props
|
|
841
|
-
], "p0.registeredComponents")
|
|
842
|
-
repeatContext: qwik._wrapProp(data, "context")
|
|
882
|
+
], "p0.registeredComponents")
|
|
843
883
|
}
|
|
844
|
-
}, 3,
|
|
845
|
-
})
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
},
|
|
879
|
-
get isInteractive() {
|
|
880
|
-
return componentRefProps.value.isInteractive;
|
|
881
|
-
},
|
|
882
|
-
[qwik._IMMUTABLE]: {
|
|
883
|
-
blockChildren: qwik._fnSignal((p0) => p0.value.blockChildren, [
|
|
884
|
-
componentRefProps
|
|
885
|
-
], "p0.value.blockChildren"),
|
|
886
|
-
builderBlock: qwik._fnSignal((p0) => p0.value.builderBlock, [
|
|
887
|
-
componentRefProps
|
|
888
|
-
], "p0.value.builderBlock"),
|
|
889
|
-
componentOptions: qwik._fnSignal((p0) => p0.value.componentOptions, [
|
|
890
|
-
componentRefProps
|
|
891
|
-
], "p0.value.componentOptions"),
|
|
892
|
-
componentRef: qwik._fnSignal((p0) => p0.value.componentRef, [
|
|
893
|
-
componentRefProps
|
|
894
|
-
], "p0.value.componentRef"),
|
|
895
|
-
context: qwik._fnSignal((p0) => p0.value.context, [
|
|
896
|
-
componentRefProps
|
|
897
|
-
], "p0.value.context"),
|
|
898
|
-
includeBlockProps: qwik._fnSignal((p0) => p0.value.includeBlockProps, [
|
|
899
|
-
componentRefProps
|
|
900
|
-
], "p0.value.includeBlockProps"),
|
|
901
|
-
isInteractive: qwik._fnSignal((p0) => p0.value.isInteractive, [
|
|
902
|
-
componentRefProps
|
|
903
|
-
], "p0.value.isInteractive"),
|
|
904
|
-
registeredComponents: qwik._fnSignal((p0) => p0.value.registeredComponents, [
|
|
905
|
-
componentRefProps
|
|
906
|
-
], "p0.value.registeredComponents")
|
|
907
|
-
}
|
|
908
|
-
}, 3, "jN_2"),
|
|
909
|
-
(childrenWithoutParentComponent.value || []).map((child) => {
|
|
910
|
-
return /* @__PURE__ */ qwik._jsxC(Block, {
|
|
911
|
-
block: child,
|
|
912
|
-
get context() {
|
|
913
|
-
return state.childrenContext;
|
|
914
|
-
},
|
|
915
|
-
get registeredComponents() {
|
|
916
|
-
return props.registeredComponents;
|
|
917
|
-
},
|
|
918
|
-
[qwik._IMMUTABLE]: {
|
|
919
|
-
context: qwik._fnSignal((p0) => p0.childrenContext, [
|
|
920
|
-
state
|
|
921
|
-
], "p0.childrenContext"),
|
|
922
|
-
registeredComponents: qwik._fnSignal((p0) => p0.registeredComponents, [
|
|
923
|
-
props
|
|
924
|
-
], "p0.registeredComponents")
|
|
925
|
-
}
|
|
926
|
-
}, 3, child.id);
|
|
927
|
-
})
|
|
928
|
-
],
|
|
929
|
-
hasChildren: true,
|
|
930
|
-
[qwik._IMMUTABLE]: {
|
|
931
|
-
Wrapper: qwik._fnSignal((p0) => p0.value, [
|
|
932
|
-
Tag
|
|
933
|
-
], "p0.value"),
|
|
934
|
-
block: qwik._fnSignal((p0) => p0.value, [
|
|
935
|
-
processedBlock
|
|
936
|
-
], "p0.value"),
|
|
937
|
-
context: qwik._fnSignal((p0) => p0.context, [
|
|
938
|
-
props
|
|
939
|
-
], "p0.context"),
|
|
940
|
-
hasChildren: qwik._IMMUTABLE
|
|
941
|
-
}
|
|
942
|
-
}, 1, "jN_3") : null
|
|
943
|
-
]
|
|
944
|
-
}, 1, "jN_4") : /* @__PURE__ */ qwik._jsxC(ComponentRef, {
|
|
884
|
+
}, 3, child.id);
|
|
885
|
+
})
|
|
886
|
+
],
|
|
887
|
+
[qwik._IMMUTABLE]: {
|
|
888
|
+
Wrapper: qwik._fnSignal((p0) => p0.value, [
|
|
889
|
+
Tag
|
|
890
|
+
], "p0.value"),
|
|
891
|
+
block: qwik._fnSignal((p0) => p0.value, [
|
|
892
|
+
processedBlock
|
|
893
|
+
], "p0.value"),
|
|
894
|
+
context: qwik._fnSignal((p0) => p0.context, [
|
|
895
|
+
props
|
|
896
|
+
], "p0.context")
|
|
897
|
+
}
|
|
898
|
+
}, 1, "jN_2") : (repeatItem.value || []).map((data, index) => {
|
|
899
|
+
return /* @__PURE__ */ qwik._jsxC(RepeatedBlock, {
|
|
900
|
+
get repeatContext() {
|
|
901
|
+
return data.context;
|
|
902
|
+
},
|
|
903
|
+
get block() {
|
|
904
|
+
return data.block;
|
|
905
|
+
},
|
|
906
|
+
get registeredComponents() {
|
|
907
|
+
return props.registeredComponents;
|
|
908
|
+
},
|
|
909
|
+
[qwik._IMMUTABLE]: {
|
|
910
|
+
block: qwik._wrapProp(data, "block"),
|
|
911
|
+
registeredComponents: qwik._fnSignal((p0) => p0.registeredComponents, [
|
|
912
|
+
props
|
|
913
|
+
], "p0.registeredComponents"),
|
|
914
|
+
repeatContext: qwik._wrapProp(data, "context")
|
|
915
|
+
}
|
|
916
|
+
}, 3, index);
|
|
917
|
+
}) : /* @__PURE__ */ qwik._jsxC(ComponentRef, {
|
|
945
918
|
get componentRef() {
|
|
946
919
|
return componentRefProps.value.componentRef;
|
|
947
920
|
},
|
|
@@ -992,10 +965,10 @@ const Block = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl(
|
|
|
992
965
|
componentRefProps
|
|
993
966
|
], "p0.value.registeredComponents")
|
|
994
967
|
}
|
|
995
|
-
}, 3, "
|
|
968
|
+
}, 3, "jN_3")
|
|
996
969
|
]
|
|
997
|
-
}, 1, "
|
|
998
|
-
}, 1, "
|
|
970
|
+
}, 1, "jN_4") : null
|
|
971
|
+
}, 1, "jN_5");
|
|
999
972
|
}, "Block_component_nnPv0RY0U0k"));
|
|
1000
973
|
const onClick$1 = function onClick2(props, state) {
|
|
1001
974
|
var _a, _b;
|
|
@@ -3042,6 +3015,17 @@ async function fetchEntries(options) {
|
|
|
3042
3015
|
}
|
|
3043
3016
|
}
|
|
3044
3017
|
const getAllContent = fetchEntries;
|
|
3018
|
+
const DEFAULT_TRUSTED_HOSTS = [
|
|
3019
|
+
"*.beta.builder.io",
|
|
3020
|
+
"beta.builder.io",
|
|
3021
|
+
"builder.io",
|
|
3022
|
+
"localhost",
|
|
3023
|
+
"qa.builder.io"
|
|
3024
|
+
];
|
|
3025
|
+
function isFromTrustedHost(trustedHosts, e) {
|
|
3026
|
+
const url = new URL(e.origin), hostname = url.hostname;
|
|
3027
|
+
return (trustedHosts || DEFAULT_TRUSTED_HOSTS).findIndex((trustedHost) => trustedHost.startsWith("*.") ? hostname.endsWith(trustedHost.slice(1)) : trustedHost === hostname) > -1;
|
|
3028
|
+
}
|
|
3045
3029
|
function isPreviewing() {
|
|
3046
3030
|
if (!isBrowser())
|
|
3047
3031
|
return false;
|
|
@@ -3241,7 +3225,7 @@ const getInteractionPropertiesForEvent = (event) => {
|
|
|
3241
3225
|
}
|
|
3242
3226
|
};
|
|
3243
3227
|
};
|
|
3244
|
-
const SDK_VERSION = "0.12.
|
|
3228
|
+
const SDK_VERSION = "0.12.3";
|
|
3245
3229
|
const registry = {};
|
|
3246
3230
|
function register(type, info) {
|
|
3247
3231
|
let typeList = registry[type];
|
|
@@ -3324,8 +3308,11 @@ const setupBrowserForEditing = (options = {}) => {
|
|
|
3324
3308
|
options
|
|
3325
3309
|
}
|
|
3326
3310
|
}, "*");
|
|
3327
|
-
window.addEventListener("message", (
|
|
3311
|
+
window.addEventListener("message", (event) => {
|
|
3328
3312
|
var _a2, _b2;
|
|
3313
|
+
if (!isFromTrustedHost(options.trustedHosts, event))
|
|
3314
|
+
return;
|
|
3315
|
+
const { data } = event;
|
|
3329
3316
|
if (!(data == null ? void 0 : data.type))
|
|
3330
3317
|
return;
|
|
3331
3318
|
switch (data.type) {
|
|
@@ -3404,6 +3391,8 @@ const mergeNewContent = function mergeNewContent2(props, state, elementRef, newC
|
|
|
3404
3391
|
};
|
|
3405
3392
|
const processMessage = function processMessage2(props, state, elementRef, event) {
|
|
3406
3393
|
var _a;
|
|
3394
|
+
if (!isFromTrustedHost(props.trustedHosts, event))
|
|
3395
|
+
return;
|
|
3407
3396
|
const { data } = event;
|
|
3408
3397
|
if (data)
|
|
3409
3398
|
switch (data.type) {
|
|
@@ -3538,6 +3527,9 @@ const EnableEditor = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inli
|
|
|
3538
3527
|
} : {},
|
|
3539
3528
|
...props2.enrich ? {
|
|
3540
3529
|
enrich: props2.enrich
|
|
3530
|
+
} : {},
|
|
3531
|
+
...props2.trustedHosts ? {
|
|
3532
|
+
trustedHosts: props2.trustedHosts
|
|
3541
3533
|
} : {}
|
|
3542
3534
|
});
|
|
3543
3535
|
Object.values(props2.builderContextSignal.componentInfos).forEach((registeredComponent) => {
|
|
@@ -3760,6 +3752,10 @@ ${getFontCss({
|
|
|
3760
3752
|
customFonts: props.customFonts
|
|
3761
3753
|
})}
|
|
3762
3754
|
|
|
3755
|
+
.builder-button {
|
|
3756
|
+
all: unset;
|
|
3757
|
+
}
|
|
3758
|
+
|
|
3763
3759
|
.builder-text > p:first-of-type, .builder-text > .builder-paragraph:first-of-type {
|
|
3764
3760
|
margin: 0;
|
|
3765
3761
|
}
|
|
@@ -3916,6 +3912,9 @@ const ContentComponent = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.
|
|
|
3916
3912
|
get contentWrapperProps() {
|
|
3917
3913
|
return props.contentWrapperProps;
|
|
3918
3914
|
},
|
|
3915
|
+
get trustedHosts() {
|
|
3916
|
+
return props.trustedHosts;
|
|
3917
|
+
},
|
|
3919
3918
|
children: [
|
|
3920
3919
|
props.isSsrAbTest ? /* @__PURE__ */ qwik._jsxC(InlinedScript, {
|
|
3921
3920
|
get scriptStr() {
|
|
@@ -4027,7 +4026,10 @@ const ContentComponent = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.
|
|
|
4027
4026
|
], "p0.model"),
|
|
4028
4027
|
showContent: qwik._fnSignal((p0) => p0.showContent, [
|
|
4029
4028
|
props
|
|
4030
|
-
], "p0.showContent")
|
|
4029
|
+
], "p0.showContent"),
|
|
4030
|
+
trustedHosts: qwik._fnSignal((p0) => p0.trustedHosts, [
|
|
4031
|
+
props
|
|
4032
|
+
], "p0.trustedHosts")
|
|
4031
4033
|
}
|
|
4032
4034
|
}, 1, "LQ_3");
|
|
4033
4035
|
}, "ContentComponent_component_HIsczUcxjCE"));
|
|
@@ -4160,6 +4162,9 @@ const ContentVariants = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
|
|
|
4160
4162
|
get contentWrapperProps() {
|
|
4161
4163
|
return props.contentWrapperProps;
|
|
4162
4164
|
},
|
|
4165
|
+
get trustedHosts() {
|
|
4166
|
+
return props.trustedHosts;
|
|
4167
|
+
},
|
|
4163
4168
|
[qwik._IMMUTABLE]: {
|
|
4164
4169
|
apiKey: qwik._fnSignal((p0) => p0.apiKey, [
|
|
4165
4170
|
props
|
|
@@ -4206,7 +4211,10 @@ const ContentVariants = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
|
|
|
4206
4211
|
model: qwik._fnSignal((p0) => p0.model, [
|
|
4207
4212
|
props
|
|
4208
4213
|
], "p0.model"),
|
|
4209
|
-
showContent: qwik._IMMUTABLE
|
|
4214
|
+
showContent: qwik._IMMUTABLE,
|
|
4215
|
+
trustedHosts: qwik._fnSignal((p0) => p0.trustedHosts, [
|
|
4216
|
+
props
|
|
4217
|
+
], "p0.trustedHosts")
|
|
4210
4218
|
}
|
|
4211
4219
|
}, 3, variant.testVariationId);
|
|
4212
4220
|
})
|
|
@@ -4262,6 +4270,9 @@ const ContentVariants = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
|
|
|
4262
4270
|
get contentWrapperProps() {
|
|
4263
4271
|
return props.contentWrapperProps;
|
|
4264
4272
|
},
|
|
4273
|
+
get trustedHosts() {
|
|
4274
|
+
return props.trustedHosts;
|
|
4275
|
+
},
|
|
4265
4276
|
[qwik._IMMUTABLE]: {
|
|
4266
4277
|
apiKey: qwik._fnSignal((p0) => p0.apiKey, [
|
|
4267
4278
|
props
|
|
@@ -4311,7 +4322,10 @@ const ContentVariants = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
|
|
|
4311
4322
|
model: qwik._fnSignal((p0) => p0.model, [
|
|
4312
4323
|
props
|
|
4313
4324
|
], "p0.model"),
|
|
4314
|
-
showContent: qwik._IMMUTABLE
|
|
4325
|
+
showContent: qwik._IMMUTABLE,
|
|
4326
|
+
trustedHosts: qwik._fnSignal((p0) => p0.trustedHosts, [
|
|
4327
|
+
props
|
|
4328
|
+
], "p0.trustedHosts")
|
|
4315
4329
|
}
|
|
4316
4330
|
}, 3, "XM_4")
|
|
4317
4331
|
]
|