@builder.io/sdk-qwik 0.12.3 → 0.12.5

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.
Files changed (27) hide show
  1. package/lib/browser/index.qwik.cjs +273 -125
  2. package/lib/browser/index.qwik.mjs +275 -127
  3. package/lib/edge/index.qwik.cjs +306 -158
  4. package/lib/edge/index.qwik.mjs +308 -160
  5. package/lib/node/index.qwik.cjs +308 -160
  6. package/lib/node/index.qwik.mjs +309 -161
  7. package/package.json +1 -1
  8. package/types/src/blocks/button/button.types.d.ts +2 -1
  9. package/types/src/blocks/columns/columns.d.ts +1 -1
  10. package/types/src/blocks/columns/columns.types.d.ts +3 -3
  11. package/types/src/blocks/symbol/symbol.types.d.ts +2 -2
  12. package/types/src/components/block/block.d.ts +1 -0
  13. package/types/src/components/block/components/block-wrapper.d.ts +1 -0
  14. package/types/src/components/block/components/component-ref/component-ref.helpers.d.ts +2 -2
  15. package/types/src/components/block/components/repeated-block.d.ts +3 -5
  16. package/types/src/components/blocks/blocks.types.d.ts +1 -0
  17. package/types/src/components/content-variants/content-variants.types.d.ts +6 -2
  18. package/types/src/constants/sdk-version.d.ts +1 -1
  19. package/types/src/functions/evaluate/should-force-browser-runtime-in-node.d.ts +1 -0
  20. package/types/src/functions/get-block-properties.d.ts +1 -2
  21. package/types/src/functions/get-class-prop-name.d.ts +1 -0
  22. package/types/src/functions/get-style.d.ts +12 -0
  23. package/types/src/functions/transform-block-properties.d.ts +2 -2
  24. package/types/src/functions/transform-style-property.d.ts +7 -0
  25. package/types/src/helpers/omit.d.ts +1 -0
  26. package/types/src/types/builder-block.d.ts +1 -0
  27. package/types/src/types/builder-props.d.ts +3 -0
@@ -1,38 +1,86 @@
1
- import { componentQrl, inlinedQrl, _jsxC, _jsxS, _fnSignal, createContextId, _jsxQ, _jsxBranch, useComputedQrl, useLexicalScope, _IMMUTABLE, Slot as Slot$1, useStore, useContextProvider, _wrapProp, useStylesScopedQrl, useContext, createElement, Fragment as Fragment$1, useSignal, useOn, useTaskQrl } from "@builder.io/qwik";
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
+ import { isBrowser as isBrowser$1 } from "@builder.io/qwik/build";
3
4
  import { s as safeDynamicRequire } from "./node-evaluate-db446d2b.js";
4
- import { isServer } from "@builder.io/qwik/build";
5
5
  import "node:module";
6
- const Button = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
6
+ const EMPTY_HTML_ELEMENTS = /* @__PURE__ */ new Set([
7
+ "area",
8
+ "base",
9
+ "br",
10
+ "col",
11
+ "embed",
12
+ "hr",
13
+ "img",
14
+ "input",
15
+ "keygen",
16
+ "link",
17
+ "meta",
18
+ "param",
19
+ "source",
20
+ "track",
21
+ "wbr"
22
+ ]);
23
+ const isEmptyElement = (tagName) => {
24
+ return typeof tagName === "string" && EMPTY_HTML_ELEMENTS.has(tagName.toLowerCase());
25
+ };
26
+ const DynamicRenderer = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
27
+ _jsxBranch();
7
28
  return /* @__PURE__ */ _jsxC(Fragment, {
8
- children: props.link ? /* @__PURE__ */ _jsxS("a", {
29
+ children: !isEmptyElement(props.TagName) ? typeof props.TagName === "string" ? /* @__PURE__ */ _jsxC(props.TagName, {
9
30
  ...props.attributes,
10
- children: _fnSignal((p0) => p0.text, [
11
- props
12
- ], "p0.text")
13
- }, {
14
- href: _fnSignal((p0) => p0.link, [
15
- props
16
- ], "p0.link"),
17
- role: "button",
18
- target: _fnSignal((p0) => p0.openLinkInNewTab ? "_blank" : void 0, [
19
- props
20
- ], 'p0.openLinkInNewTab?"_blank":undefined')
21
- }, 0, "jc_0") : /* @__PURE__ */ _jsxS("button", {
31
+ ...props.actionAttributes,
32
+ children: /* @__PURE__ */ _jsxC(Slot$1, null, 3, "yW_0")
33
+ }, 0, "yW_1") : /* @__PURE__ */ _jsxC(props.TagName, {
22
34
  ...props.attributes,
23
- children: _fnSignal((p0) => p0.text, [
24
- props
25
- ], "p0.text")
26
- }, {
27
- class: _fnSignal((p0) => `builder-button ${p0.attributes.class}`, [
28
- props
29
- ], "`builder-button ${p0.attributes.class}`"),
30
- role: "button",
31
- style: _fnSignal((p0) => p0.attributes.style, [
35
+ ...props.actionAttributes,
36
+ children: /* @__PURE__ */ _jsxC(Slot$1, null, 3, "yW_2")
37
+ }, 0, "yW_3") : /* @__PURE__ */ _jsxC(props.TagName, {
38
+ ...props.attributes,
39
+ ...props.actionAttributes
40
+ }, 0, "yW_4")
41
+ }, 1, "yW_5");
42
+ }, "DynamicRenderer_component_1Co0xkmyAfQ"));
43
+ const TARGET = "qwik";
44
+ const getClassPropName = () => {
45
+ switch (TARGET) {
46
+ case "react":
47
+ case "reactNative":
48
+ case "rsc":
49
+ return "className";
50
+ case "svelte":
51
+ case "vue":
52
+ case "solid":
53
+ case "qwik":
54
+ return "class";
55
+ }
56
+ };
57
+ const Button = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
58
+ return /* @__PURE__ */ _jsxC(DynamicRenderer, {
59
+ get TagName() {
60
+ return props.link ? props.builderLinkComponent || "a" : "button";
61
+ },
62
+ actionAttributes: {},
63
+ attributes: {
64
+ ...props.attributes,
65
+ [getClassPropName()]: `${props.link ? "" : "builder-button"} ${props.attributes[getClassPropName()] || ""}`,
66
+ ...props.link ? {
67
+ href: props.link,
68
+ target: props.openLinkInNewTab ? "_blank" : void 0,
69
+ role: "link"
70
+ } : {
71
+ role: "button"
72
+ }
73
+ },
74
+ children: _fnSignal((p0) => p0.text, [
75
+ props
76
+ ], "p0.text"),
77
+ [_IMMUTABLE]: {
78
+ TagName: _fnSignal((p0) => p0.link ? p0.builderLinkComponent || "a" : "button", [
32
79
  props
33
- ], "p0.attributes.style")
34
- }, 0, null)
35
- }, 1, "jc_1");
80
+ ], 'p0.link?p0.builderLinkComponent||"a":"button"'),
81
+ actionAttributes: _IMMUTABLE
82
+ }
83
+ }, 3, "jc_0");
36
84
  }, "Button_component_gJoMUICXoUQ"));
37
85
  const builderContext = createContextId("Builder");
38
86
  const ComponentsContext = createContextId("Components");
@@ -54,18 +102,9 @@ const logger = {
54
102
  warn: (...message) => console.warn(MSG_PREFIX, ...message),
55
103
  debug: (...message) => console.debug(MSG_PREFIX, ...message)
56
104
  };
57
- const fastClone = (obj) => JSON.parse(JSON.stringify(obj));
58
- const set = (obj, _path, value) => {
59
- if (Object(obj) !== obj)
60
- return obj;
61
- const path = Array.isArray(_path) ? _path : _path.toString().match(/[^.[\]]+/g);
62
- path.slice(0, -1).reduce((a, c, i) => Object(a[c]) === a[c] ? a[c] : a[c] = Math.abs(Number(path[i + 1])) >> 0 === +path[i + 1] ? [] : {}, obj)[path[path.length - 1]] = value;
63
- return obj;
64
- };
65
105
  function isBrowser() {
66
106
  return typeof window !== "undefined" && typeof document !== "undefined";
67
107
  }
68
- const TARGET = "qwik";
69
108
  function isIframe() {
70
109
  return isBrowser() && window.self !== window.top;
71
110
  }
@@ -138,6 +177,41 @@ const parseCode = (code, { isExpression = true }) => {
138
177
  const useCode = useReturn ? `return (${code});` : code;
139
178
  return useCode;
140
179
  };
180
+ const runInBrowser = ({ code, builder, context, event, localState, rootSetState, rootState }) => {
181
+ const functionArgs = getFunctionArguments({
182
+ builder,
183
+ context,
184
+ event,
185
+ state: flattenState(rootState, localState, rootSetState)
186
+ });
187
+ return new Function(...functionArgs.map(([name]) => name), code)(...functionArgs.map(([, value]) => value));
188
+ };
189
+ function flattenState(rootState, localState, rootSetState) {
190
+ if (rootState === localState)
191
+ throw new Error("rootState === localState");
192
+ return new Proxy(rootState, {
193
+ get: (_, prop) => {
194
+ if (localState && prop in localState)
195
+ return localState[prop];
196
+ return rootState[prop];
197
+ },
198
+ set: (_, prop, value) => {
199
+ if (localState && prop in localState)
200
+ throw new Error("Writing to local state is not allowed as it is read-only.");
201
+ rootState[prop] = value;
202
+ rootSetState == null ? void 0 : rootSetState(rootState);
203
+ return true;
204
+ }
205
+ });
206
+ }
207
+ const fastClone = (obj) => JSON.parse(JSON.stringify(obj));
208
+ const set = (obj, _path, value) => {
209
+ if (Object(obj) !== obj)
210
+ return obj;
211
+ const path = Array.isArray(_path) ? _path : _path.toString().match(/[^.[\]]+/g);
212
+ path.slice(0, -1).reduce((a, c, i) => Object(a[c]) === a[c] ? a[c] : a[c] = Math.abs(Number(path[i + 1])) >> 0 === +path[i + 1] ? [] : {}, obj)[path[path.length - 1]] = value;
213
+ return obj;
214
+ };
141
215
  const ivm = safeDynamicRequire("isolated-vm");
142
216
  const getSyncValName = (key) => `bldr_${key}_sync`;
143
217
  const BUILDER_SET_STATE_NAME = "BUILDER_SET_STATE";
@@ -237,34 +311,28 @@ const runInNode = ({ code, builder, context, event, localState, rootSetState, ro
237
311
  return resultStr;
238
312
  }
239
313
  };
240
- const runInBrowser = ({ code, builder, context, event, localState, rootSetState, rootState }) => {
241
- const functionArgs = getFunctionArguments({
242
- builder,
243
- context,
244
- event,
245
- state: flattenState(rootState, localState, rootSetState)
246
- });
247
- return new Function(...functionArgs.map(([name]) => name), code)(...functionArgs.map(([, value]) => value));
248
- };
249
- function flattenState(rootState, localState, rootSetState) {
250
- if (rootState === localState)
251
- throw new Error("rootState === localState");
252
- return new Proxy(rootState, {
253
- get: (_, prop) => {
254
- if (localState && prop in localState)
255
- return localState[prop];
256
- return rootState[prop];
257
- },
258
- set: (_, prop, value) => {
259
- if (localState && prop in localState)
260
- throw new Error("Writing to local state is not allowed as it is read-only.");
261
- rootState[prop] = value;
262
- rootSetState == null ? void 0 : rootSetState(rootState);
263
- return true;
264
- }
265
- });
314
+ const checkIsDefined = (maybeT) => maybeT !== null && maybeT !== void 0;
315
+ function isNodeRuntime() {
316
+ var _a;
317
+ return typeof process !== "undefined" && checkIsDefined((_a = process == null ? void 0 : process.versions) == null ? void 0 : _a.node);
266
318
  }
267
- const chooseBrowserOrServerEval = (args) => !isServer ? runInBrowser(args) : runInNode(args);
319
+ const shouldForceBrowserRuntimeInNode = () => {
320
+ var _a;
321
+ if (!isNodeRuntime())
322
+ return false;
323
+ const isArm64 = process.arch === "arm64";
324
+ const isNode20 = process.version.startsWith("v20");
325
+ const hasNoNodeSnapshotNodeOption = (_a = process.env.NODE_OPTIONS) == null ? void 0 : _a.includes("--no-node-snapshot");
326
+ if (isArm64 && isNode20 && !hasNoNodeSnapshotNodeOption) {
327
+ logger.log(`Skipping usage of \`isolated-vm\` to avoid crashes in Node v20 on an arm64 machine.
328
+ If you would like to use the \`isolated-vm\` package on this machine, please provide the \`NODE_OPTIONS=--no-node-snapshot\` config to your Node process.
329
+ See https://github.com/BuilderIO/builder/blob/main/packages/sdks/README.md#node-v20--m1-macs-apple-silicon-support for more information.
330
+ `);
331
+ return true;
332
+ }
333
+ return false;
334
+ };
335
+ const chooseBrowserOrServerEval = (args) => isBrowser$1 || shouldForceBrowserRuntimeInNode() ? runInBrowser(args) : runInNode(args);
268
336
  function evaluate({ code, context, localState, rootState, rootSetState, event, isExpression = true }) {
269
337
  if (code === "") {
270
338
  logger.warn("Skipping evaluation of empty code block.");
@@ -427,7 +495,6 @@ const getSizesForBreakpoints = ({ small, medium }) => {
427
495
  return newSizes;
428
496
  };
429
497
  const camelToKebabCase = (string) => string.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase();
430
- const checkIsDefined = (maybeT) => maybeT !== null && maybeT !== void 0;
431
498
  const convertStyleMapToCSSArray = (style) => {
432
499
  const cssProps = Object.entries(style).map(([key, value]) => {
433
500
  if (typeof value === "string")
@@ -575,6 +642,29 @@ function getBlockActions(options) {
575
642
  }
576
643
  return obj;
577
644
  }
645
+ function transformStyleProperty({ style }) {
646
+ return style;
647
+ }
648
+ const getStyle = ({ block, context }) => {
649
+ return mapStyleObjToStrIfNeeded(transformStyleProperty({
650
+ style: block.style || {},
651
+ context,
652
+ block
653
+ }));
654
+ };
655
+ function mapStyleObjToStrIfNeeded(style) {
656
+ switch (TARGET) {
657
+ case "svelte":
658
+ case "vue":
659
+ case "solid":
660
+ return convertStyleMapToCSSArray(style).join(" ");
661
+ case "qwik":
662
+ case "reactNative":
663
+ case "react":
664
+ case "rsc":
665
+ return style;
666
+ }
667
+ }
578
668
  function transformBlockProperties({ properties }) {
579
669
  return properties;
580
670
  }
@@ -589,8 +679,11 @@ function getBlockProperties({ block, context }) {
589
679
  ...extractRelevantRootBlockProperties(block),
590
680
  ...block.properties,
591
681
  "builder-id": block.id,
592
- style: block.style ? getStyleAttribute(block.style) : void 0,
593
- class: [
682
+ style: getStyle({
683
+ block,
684
+ context
685
+ }),
686
+ [getClassPropName()]: [
594
687
  block.id,
595
688
  "builder-block",
596
689
  block.class,
@@ -603,56 +696,6 @@ function getBlockProperties({ block, context }) {
603
696
  block
604
697
  });
605
698
  }
606
- function getStyleAttribute(style) {
607
- switch (TARGET) {
608
- case "svelte":
609
- case "vue":
610
- case "solid":
611
- return convertStyleMapToCSSArray(style).join(" ");
612
- case "qwik":
613
- case "reactNative":
614
- case "react":
615
- case "rsc":
616
- return style;
617
- }
618
- }
619
- const EMPTY_HTML_ELEMENTS = /* @__PURE__ */ new Set([
620
- "area",
621
- "base",
622
- "br",
623
- "col",
624
- "embed",
625
- "hr",
626
- "img",
627
- "input",
628
- "keygen",
629
- "link",
630
- "meta",
631
- "param",
632
- "source",
633
- "track",
634
- "wbr"
635
- ]);
636
- const isEmptyElement = (tagName) => {
637
- return typeof tagName === "string" && EMPTY_HTML_ELEMENTS.has(tagName.toLowerCase());
638
- };
639
- const DynamicRenderer = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
640
- _jsxBranch();
641
- return /* @__PURE__ */ _jsxC(Fragment, {
642
- children: !isEmptyElement(props.TagName) ? typeof props.TagName === "string" ? /* @__PURE__ */ _jsxC(props.TagName, {
643
- ...props.attributes,
644
- ...props.actionAttributes,
645
- children: /* @__PURE__ */ _jsxC(Slot$1, null, 3, "yW_0")
646
- }, 0, "yW_1") : /* @__PURE__ */ _jsxC(props.TagName, {
647
- ...props.attributes,
648
- ...props.actionAttributes,
649
- children: /* @__PURE__ */ _jsxC(Slot$1, null, 3, "yW_2")
650
- }, 0, "yW_3") : /* @__PURE__ */ _jsxC(props.TagName, {
651
- ...props.attributes,
652
- ...props.actionAttributes
653
- }, 0, "yW_4")
654
- }, 1, "yW_5");
655
- }, "DynamicRenderer_component_1Co0xkmyAfQ"));
656
699
  const BlockWrapper = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
657
700
  return /* @__PURE__ */ _jsxC(DynamicRenderer, {
658
701
  get TagName() {
@@ -731,6 +774,7 @@ const ComponentRef = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pr
731
774
  builderBlock: props.builderBlock,
732
775
  context: props.context,
733
776
  componentRef: props.componentRef,
777
+ linkComponent: props.linkComponent,
734
778
  includeBlockProps: props.includeBlockProps,
735
779
  isInteractive: props.isInteractive,
736
780
  contextValue: props.context
@@ -744,10 +788,16 @@ const ComponentRef = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pr
744
788
  get registeredComponents() {
745
789
  return props.registeredComponents;
746
790
  },
791
+ get linkComponent() {
792
+ return props.linkComponent;
793
+ },
747
794
  [_IMMUTABLE]: {
748
795
  context: _fnSignal((p0) => p0.context, [
749
796
  props
750
797
  ], "p0.context"),
798
+ linkComponent: _fnSignal((p0) => p0.linkComponent, [
799
+ props
800
+ ], "p0.linkComponent"),
751
801
  registeredComponents: _fnSignal((p0) => p0.registeredComponents, [
752
802
  props
753
803
  ], "p0.registeredComponents")
@@ -772,6 +822,9 @@ const RepeatedBlock = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((p
772
822
  get registeredComponents() {
773
823
  return props.registeredComponents;
774
824
  },
825
+ get linkComponent() {
826
+ return props.linkComponent;
827
+ },
775
828
  [_IMMUTABLE]: {
776
829
  block: _fnSignal((p0) => p0.block, [
777
830
  props
@@ -779,6 +832,9 @@ const RepeatedBlock = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((p
779
832
  context: _fnSignal((p0) => p0.store, [
780
833
  state
781
834
  ], "p0.store"),
835
+ linkComponent: _fnSignal((p0) => p0.linkComponent, [
836
+ props
837
+ ], "p0.linkComponent"),
782
838
  registeredComponents: _fnSignal((p0) => p0.registeredComponents, [
783
839
  props
784
840
  ], "p0.registeredComponents")
@@ -825,9 +881,14 @@ const Block = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
825
881
  props
826
882
  ]));
827
883
  const Tag = useComputedQrl(/* @__PURE__ */ inlinedQrl(() => {
828
- const [props2] = useLexicalScope();
884
+ var _a2;
885
+ const [processedBlock2, props2] = useLexicalScope();
886
+ const shouldUseLink = props2.block.tagName === "a" || ((_a2 = processedBlock2.value.properties) == null ? void 0 : _a2.href) || processedBlock2.value.href;
887
+ if (shouldUseLink)
888
+ return props2.linkComponent || "a";
829
889
  return props2.block.tagName || "div";
830
890
  }, "Block_component_Tag_useComputed_eQnDgbcBW2A", [
891
+ processedBlock,
831
892
  props
832
893
  ]));
833
894
  const canShowBlock = useComputedQrl(/* @__PURE__ */ inlinedQrl(() => {
@@ -857,7 +918,7 @@ const Block = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
857
918
  repeatItem
858
919
  ]));
859
920
  const componentRefProps = useComputedQrl(/* @__PURE__ */ inlinedQrl(() => {
860
- var _a2, _b, _c, _d, _e;
921
+ var _a2, _b, _c, _d, _e, _f, _g, _h;
861
922
  const [blockComponent2, processedBlock2, props2, state2] = useLexicalScope();
862
923
  return {
863
924
  blockChildren: processedBlock2.value.children ?? [],
@@ -865,15 +926,19 @@ const Block = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
865
926
  componentOptions: {
866
927
  ...getBlockComponentOptions(processedBlock2.value),
867
928
  builderContext: props2.context,
868
- ...((_b = blockComponent2.value) == null ? void 0 : _b.name) === "Symbol" || ((_c = blockComponent2.value) == null ? void 0 : _c.name) === "Columns" ? {
929
+ ...((_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" ? {
930
+ builderLinkComponent: props2.linkComponent
931
+ } : {},
932
+ ...((_e = blockComponent2.value) == null ? void 0 : _e.name) === "Symbol" || ((_f = blockComponent2.value) == null ? void 0 : _f.name) === "Columns" ? {
869
933
  builderComponents: props2.registeredComponents
870
934
  } : {}
871
935
  },
872
936
  context: state2.childrenContext,
937
+ linkComponent: props2.linkComponent,
873
938
  registeredComponents: props2.registeredComponents,
874
939
  builderBlock: processedBlock2.value,
875
- includeBlockProps: ((_d = blockComponent2.value) == null ? void 0 : _d.noWrap) === true,
876
- isInteractive: !((_e = blockComponent2.value) == null ? void 0 : _e.isRSC)
940
+ includeBlockProps: ((_g = blockComponent2.value) == null ? void 0 : _g.noWrap) === true,
941
+ isInteractive: !((_h = blockComponent2.value) == null ? void 0 : _h.isRSC)
877
942
  };
878
943
  }, "Block_component_componentRefProps_useComputed_Ikbl8VO04ho", [
879
944
  blockComponent,
@@ -910,6 +975,9 @@ const Block = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
910
975
  get context() {
911
976
  return props.context;
912
977
  },
978
+ get linkComponent() {
979
+ return props.linkComponent;
980
+ },
913
981
  children: [
914
982
  /* @__PURE__ */ _jsxC(ComponentRef, {
915
983
  get componentRef() {
@@ -927,6 +995,9 @@ const Block = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
927
995
  get registeredComponents() {
928
996
  return componentRefProps.value.registeredComponents;
929
997
  },
998
+ get linkComponent() {
999
+ return componentRefProps.value.linkComponent;
1000
+ },
930
1001
  get builderBlock() {
931
1002
  return componentRefProps.value.builderBlock;
932
1003
  },
@@ -958,6 +1029,9 @@ const Block = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
958
1029
  isInteractive: _fnSignal((p0) => p0.value.isInteractive, [
959
1030
  componentRefProps
960
1031
  ], "p0.value.isInteractive"),
1032
+ linkComponent: _fnSignal((p0) => p0.value.linkComponent, [
1033
+ componentRefProps
1034
+ ], "p0.value.linkComponent"),
961
1035
  registeredComponents: _fnSignal((p0) => p0.value.registeredComponents, [
962
1036
  componentRefProps
963
1037
  ], "p0.value.registeredComponents")
@@ -972,10 +1046,16 @@ const Block = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
972
1046
  get registeredComponents() {
973
1047
  return props.registeredComponents;
974
1048
  },
1049
+ get linkComponent() {
1050
+ return props.linkComponent;
1051
+ },
975
1052
  [_IMMUTABLE]: {
976
1053
  context: _fnSignal((p0) => p0.childrenContext, [
977
1054
  state
978
1055
  ], "p0.childrenContext"),
1056
+ linkComponent: _fnSignal((p0) => p0.linkComponent, [
1057
+ props
1058
+ ], "p0.linkComponent"),
979
1059
  registeredComponents: _fnSignal((p0) => p0.registeredComponents, [
980
1060
  props
981
1061
  ], "p0.registeredComponents")
@@ -992,7 +1072,10 @@ const Block = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
992
1072
  ], "p0.value"),
993
1073
  context: _fnSignal((p0) => p0.context, [
994
1074
  props
995
- ], "p0.context")
1075
+ ], "p0.context"),
1076
+ linkComponent: _fnSignal((p0) => p0.linkComponent, [
1077
+ props
1078
+ ], "p0.linkComponent")
996
1079
  }
997
1080
  }, 1, "jN_2") : (repeatItem.value || []).map((data, index) => {
998
1081
  return /* @__PURE__ */ _jsxC(RepeatedBlock, {
@@ -1005,8 +1088,14 @@ const Block = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
1005
1088
  get registeredComponents() {
1006
1089
  return props.registeredComponents;
1007
1090
  },
1091
+ get linkComponent() {
1092
+ return props.linkComponent;
1093
+ },
1008
1094
  [_IMMUTABLE]: {
1009
1095
  block: _wrapProp(data, "block"),
1096
+ linkComponent: _fnSignal((p0) => p0.linkComponent, [
1097
+ props
1098
+ ], "p0.linkComponent"),
1010
1099
  registeredComponents: _fnSignal((p0) => p0.registeredComponents, [
1011
1100
  props
1012
1101
  ], "p0.registeredComponents"),
@@ -1029,6 +1118,9 @@ const Block = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
1029
1118
  get registeredComponents() {
1030
1119
  return componentRefProps.value.registeredComponents;
1031
1120
  },
1121
+ get linkComponent() {
1122
+ return componentRefProps.value.linkComponent;
1123
+ },
1032
1124
  get builderBlock() {
1033
1125
  return componentRefProps.value.builderBlock;
1034
1126
  },
@@ -1060,6 +1152,9 @@ const Block = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
1060
1152
  isInteractive: _fnSignal((p0) => p0.value.isInteractive, [
1061
1153
  componentRefProps
1062
1154
  ], "p0.value.isInteractive"),
1155
+ linkComponent: _fnSignal((p0) => p0.value.linkComponent, [
1156
+ componentRefProps
1157
+ ], "p0.value.linkComponent"),
1063
1158
  registeredComponents: _fnSignal((p0) => p0.value.registeredComponents, [
1064
1159
  componentRefProps
1065
1160
  ], "p0.value.registeredComponents")
@@ -1187,6 +1282,9 @@ const Blocks = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =
1187
1282
  children: props.blocks ? (props.blocks || []).map((block) => {
1188
1283
  return /* @__PURE__ */ _jsxC(Block, {
1189
1284
  block,
1285
+ get linkComponent() {
1286
+ return props.linkComponent;
1287
+ },
1190
1288
  get context() {
1191
1289
  return props.context || builderContext$1;
1192
1290
  },
@@ -1198,6 +1296,9 @@ const Blocks = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =
1198
1296
  builderContext$1,
1199
1297
  props
1200
1298
  ], "p1.context||p0"),
1299
+ linkComponent: _fnSignal((p0) => p0.linkComponent, [
1300
+ props
1301
+ ], "p0.linkComponent"),
1201
1302
  registeredComponents: _fnSignal((p0, p1) => p1.registeredComponents || p0.registeredComponents, [
1202
1303
  componentsContext,
1203
1304
  props
@@ -1257,7 +1358,13 @@ const columnCssVars = function columnCssVars2(props, state, index) {
1257
1358
  const mobileWidth = "100%";
1258
1359
  const mobileMarginLeft = 0;
1259
1360
  const marginLeftKey = "margin-left";
1361
+ const sharedStyles = {
1362
+ display: "flex",
1363
+ flexDirection: "column",
1364
+ alignItems: "stretch"
1365
+ };
1260
1366
  return {
1367
+ ...sharedStyles,
1261
1368
  width,
1262
1369
  [marginLeftKey]: gutterPixels,
1263
1370
  "--column-width-mobile": getMobileStyle(props, state, {
@@ -1355,40 +1462,56 @@ const Columns = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props)
1355
1462
  }
1356
1463
  }, 3, "c0_0"),
1357
1464
  (props.columns || []).map((column, index) => {
1358
- return /* @__PURE__ */ createElement("div", {
1359
- class: "builder-column div-Columns-2",
1360
- style: columnCssVars(props, state, index),
1361
- key: index
1362
- }, /* @__PURE__ */ _jsxC(Blocks, {
1363
- path: `component.options.columns.${index}.blocks`,
1364
- get parent() {
1365
- return props.builderBlock.id;
1366
- },
1367
- get styleProp() {
1368
- return {
1369
- flexGrow: "1"
1370
- };
1371
- },
1372
- get context() {
1373
- return props.builderContext;
1465
+ return /* @__PURE__ */ _jsxC(DynamicRenderer, {
1466
+ TagName: column.link ? props.builderLinkComponent || "a" : "div",
1467
+ actionAttributes: {},
1468
+ attributes: {
1469
+ ...column.link ? {
1470
+ href: column.link
1471
+ } : {},
1472
+ [getClassPropName()]: "builder-column",
1473
+ style: mapStyleObjToStrIfNeeded(columnCssVars(props, state, index))
1374
1474
  },
1375
- get registeredComponents() {
1376
- return props.builderComponents;
1377
- },
1378
- blocks: deoptSignal(column.blocks),
1475
+ children: /* @__PURE__ */ _jsxC(Blocks, {
1476
+ path: `component.options.columns.${index}.blocks`,
1477
+ get parent() {
1478
+ return props.builderBlock.id;
1479
+ },
1480
+ get styleProp() {
1481
+ return {
1482
+ flexGrow: "1"
1483
+ };
1484
+ },
1485
+ get context() {
1486
+ return props.builderContext;
1487
+ },
1488
+ get registeredComponents() {
1489
+ return props.builderComponents;
1490
+ },
1491
+ get linkComponent() {
1492
+ return props.builderLinkComponent;
1493
+ },
1494
+ blocks: deoptSignal(column.blocks),
1495
+ [_IMMUTABLE]: {
1496
+ context: _fnSignal((p0) => p0.builderContext, [
1497
+ props
1498
+ ], "p0.builderContext"),
1499
+ linkComponent: _fnSignal((p0) => p0.builderLinkComponent, [
1500
+ props
1501
+ ], "p0.builderLinkComponent"),
1502
+ parent: _fnSignal((p0) => p0.builderBlock.id, [
1503
+ props
1504
+ ], "p0.builderBlock.id"),
1505
+ registeredComponents: _fnSignal((p0) => p0.builderComponents, [
1506
+ props
1507
+ ], "p0.builderComponents"),
1508
+ styleProp: _IMMUTABLE
1509
+ }
1510
+ }, 3, "c0_1"),
1379
1511
  [_IMMUTABLE]: {
1380
- context: _fnSignal((p0) => p0.builderContext, [
1381
- props
1382
- ], "p0.builderContext"),
1383
- parent: _fnSignal((p0) => p0.builderBlock.id, [
1384
- props
1385
- ], "p0.builderBlock.id"),
1386
- registeredComponents: _fnSignal((p0) => p0.builderComponents, [
1387
- props
1388
- ], "p0.builderComponents"),
1389
- styleProp: _IMMUTABLE
1512
+ actionAttributes: _IMMUTABLE
1390
1513
  }
1391
- }, 3, "c0_1"));
1514
+ }, 1, index);
1392
1515
  })
1393
1516
  ], 1, "c0_2");
1394
1517
  }, "Columns_component_7yLj4bxdI6c"));
@@ -1397,11 +1520,6 @@ const STYLES$1 = `
1397
1520
  display: flex;
1398
1521
  line-height: normal;
1399
1522
  }
1400
- .div-Columns-2 {
1401
- display: flex;
1402
- flex-direction: column;
1403
- align-items: stretch;
1404
- }
1405
1523
  `;
1406
1524
  const FragmentComponent = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
1407
1525
  return /* @__PURE__ */ _jsxQ("span", null, null, /* @__PURE__ */ _jsxC(Slot$1, null, 3, "oj_0"), 1, "oj_1");
@@ -3324,7 +3442,7 @@ const getInteractionPropertiesForEvent = (event) => {
3324
3442
  }
3325
3443
  };
3326
3444
  };
3327
- const SDK_VERSION = "0.12.3";
3445
+ const SDK_VERSION = "0.12.5";
3328
3446
  const registry = {};
3329
3447
  function register(type, info) {
3330
3448
  let typeList = registry[type];
@@ -4011,6 +4129,9 @@ const ContentComponent = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl
4011
4129
  get contentWrapperProps() {
4012
4130
  return props.contentWrapperProps;
4013
4131
  },
4132
+ get linkComponent() {
4133
+ return props.linkComponent;
4134
+ },
4014
4135
  get trustedHosts() {
4015
4136
  return props.trustedHosts;
4016
4137
  },
@@ -4070,6 +4191,9 @@ const ContentComponent = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl
4070
4191
  get registeredComponents() {
4071
4192
  return state.registeredComponents;
4072
4193
  },
4194
+ get linkComponent() {
4195
+ return props.linkComponent;
4196
+ },
4073
4197
  [_IMMUTABLE]: {
4074
4198
  blocks: _fnSignal((p0) => {
4075
4199
  var _a2, _b2;
@@ -4080,6 +4204,9 @@ const ContentComponent = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl
4080
4204
  context: _fnSignal((p0) => p0.builderContextSignal, [
4081
4205
  state
4082
4206
  ], "p0.builderContextSignal"),
4207
+ linkComponent: _fnSignal((p0) => p0.linkComponent, [
4208
+ props
4209
+ ], "p0.linkComponent"),
4083
4210
  registeredComponents: _fnSignal((p0) => p0.registeredComponents, [
4084
4211
  state
4085
4212
  ], "p0.registeredComponents")
@@ -4117,6 +4244,9 @@ const ContentComponent = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl
4117
4244
  includeRefs: _fnSignal((p0) => p0.includeRefs, [
4118
4245
  props
4119
4246
  ], "p0.includeRefs"),
4247
+ linkComponent: _fnSignal((p0) => p0.linkComponent, [
4248
+ props
4249
+ ], "p0.linkComponent"),
4120
4250
  locale: _fnSignal((p0) => p0.locale, [
4121
4251
  props
4122
4252
  ], "p0.locale"),
@@ -4234,6 +4364,9 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
4234
4364
  get customComponents() {
4235
4365
  return props.customComponents;
4236
4366
  },
4367
+ get linkComponent() {
4368
+ return props.linkComponent;
4369
+ },
4237
4370
  get canTrack() {
4238
4371
  return props.canTrack;
4239
4372
  },
@@ -4304,6 +4437,9 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
4304
4437
  isSsrAbTest: _fnSignal((p0) => p0.shouldRenderVariants, [
4305
4438
  state
4306
4439
  ], "p0.shouldRenderVariants"),
4440
+ linkComponent: _fnSignal((p0) => p0.linkComponent, [
4441
+ props
4442
+ ], "p0.linkComponent"),
4307
4443
  locale: _fnSignal((p0) => p0.locale, [
4308
4444
  props
4309
4445
  ], "p0.locale"),
@@ -4342,6 +4478,9 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
4342
4478
  get customComponents() {
4343
4479
  return props.customComponents;
4344
4480
  },
4481
+ get linkComponent() {
4482
+ return props.linkComponent;
4483
+ },
4345
4484
  get canTrack() {
4346
4485
  return props.canTrack;
4347
4486
  },
@@ -4415,6 +4554,9 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
4415
4554
  isSsrAbTest: _fnSignal((p0) => p0.shouldRenderVariants, [
4416
4555
  state
4417
4556
  ], "p0.shouldRenderVariants"),
4557
+ linkComponent: _fnSignal((p0) => p0.linkComponent, [
4558
+ props
4559
+ ], "p0.linkComponent"),
4418
4560
  locale: _fnSignal((p0) => p0.locale, [
4419
4561
  props
4420
4562
  ], "p0.locale"),
@@ -4465,7 +4607,7 @@ const Symbol$1 = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props)
4465
4607
  var _a2, _b;
4466
4608
  const [props2] = useLexicalScope();
4467
4609
  return [
4468
- props2.attributes.class,
4610
+ props2.attributes[getClassPropName()],
4469
4611
  "builder-symbol",
4470
4612
  ((_a2 = props2.symbol) == null ? void 0 : _a2.inline) ? "builder-inline-symbol" : void 0,
4471
4613
  ((_b = props2.symbol) == null ? void 0 : _b.dynamic) || props2.dynamic ? "builder-dynamic-symbol" : void 0
@@ -4518,6 +4660,9 @@ const Symbol$1 = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props)
4518
4660
  get content() {
4519
4661
  return state.contentToUse;
4520
4662
  },
4663
+ get linkComponent() {
4664
+ return props.builderLinkComponent;
4665
+ },
4521
4666
  [_IMMUTABLE]: {
4522
4667
  apiKey: _fnSignal((p0) => p0.builderContext.apiKey, [
4523
4668
  props
@@ -4551,6 +4696,9 @@ const Symbol$1 = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props)
4551
4696
  props,
4552
4697
  state
4553
4698
  ], "{...p0.symbol?.data,...p0.builderContext.localState,...p1.contentToUse?.data?.state}"),
4699
+ linkComponent: _fnSignal((p0) => p0.builderLinkComponent, [
4700
+ props
4701
+ ], "p0.builderLinkComponent"),
4554
4702
  model: _fnSignal((p0) => {
4555
4703
  var _a2;
4556
4704
  return (_a2 = p0.symbol) == null ? void 0 : _a2.model;