@builder.io/sdk-qwik 0.8.1 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -603,7 +603,7 @@ function getBlockActions(options) {
603
603
  }
604
604
  return obj;
605
605
  }
606
- function transformBlockProperties(properties) {
606
+ function transformBlockProperties({ properties }) {
607
607
  return properties;
608
608
  }
609
609
  const extractRelevantRootBlockProperties = (block) => {
@@ -625,7 +625,11 @@ function getBlockProperties({ block, context }) {
625
625
  (_a = block.properties) == null ? void 0 : _a.class
626
626
  ].filter(Boolean).join(" ")
627
627
  };
628
- return transformBlockProperties(properties);
628
+ return transformBlockProperties({
629
+ properties,
630
+ context,
631
+ block
632
+ });
629
633
  }
630
634
  function getStyleAttribute(style) {
631
635
  switch (TARGET) {
@@ -1134,45 +1138,60 @@ const BlocksWrapper = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inl
1134
1138
  props
1135
1139
  ]));
1136
1140
  const state = {};
1137
- return /* @__PURE__ */ qwik._jsxQ("div", {
1141
+ return /* @__PURE__ */ qwik._jsxC(props.BlocksWrapper, {
1142
+ get class() {
1143
+ return className.value + " props-blocks-wrapper-BlocksWrapper";
1144
+ },
1145
+ get "builder-path"() {
1146
+ return props.path;
1147
+ },
1148
+ get "builder-parent-id"() {
1149
+ return props.parent;
1150
+ },
1151
+ get style() {
1152
+ return props.styleProp;
1153
+ },
1138
1154
  onClick$: /* @__PURE__ */ qwik.inlinedQrl((event) => {
1139
1155
  const [props2, state2] = qwik.useLexicalScope();
1140
1156
  return onClick$1(props2);
1141
- }, "BlocksWrapper_component_div_onClick_1NkidSBS3D0", [
1157
+ }, "BlocksWrapper_component_onClick_ufezvOupQrM", [
1142
1158
  props,
1143
1159
  state
1144
1160
  ]),
1145
1161
  onKeyPress$: /* @__PURE__ */ qwik.inlinedQrl((event) => {
1146
1162
  const [props2, state2] = qwik.useLexicalScope();
1147
1163
  return onClick$1(props2);
1148
- }, "BlocksWrapper_component_div_onKeyPress_Aaf0oNYOi80", [
1164
+ }, "BlocksWrapper_component_onKeyPress_9bz8vCQc3kg", [
1149
1165
  props,
1150
1166
  state
1151
1167
  ]),
1152
1168
  onMouseEnter$: /* @__PURE__ */ qwik.inlinedQrl((event) => {
1153
1169
  const [props2, state2] = qwik.useLexicalScope();
1154
1170
  return onMouseEnter(props2);
1155
- }, "BlocksWrapper_component_div_onMouseEnter_TxzAP5tI9Zc", [
1171
+ }, "BlocksWrapper_component_onMouseEnter_j4FJjnLtraQ", [
1156
1172
  props,
1157
1173
  state
1158
- ])
1159
- }, {
1160
- "builder-parent-id": qwik._fnSignal((p0) => p0.parent, [
1161
- props
1162
- ], "p0.parent"),
1163
- "builder-path": qwik._fnSignal((p0) => p0.path, [
1164
- props
1165
- ], "p0.path"),
1166
- class: qwik._fnSignal((p0) => p0.value + " div-BlocksWrapper", [
1167
- className
1168
- ], 'p0.value+" div-BlocksWrapper"'),
1169
- style: qwik._fnSignal((p0) => p0.styleProp, [
1170
- props
1171
- ], "p0.styleProp")
1172
- }, /* @__PURE__ */ qwik._jsxC(qwik.Slot, null, 3, "3u_0"), 0, "3u_1");
1174
+ ]),
1175
+ ...props.BlocksWrapperProps,
1176
+ children: /* @__PURE__ */ qwik._jsxC(qwik.Slot, null, 3, "3u_0"),
1177
+ [qwik._IMMUTABLE]: {
1178
+ "builder-parent-id": qwik._fnSignal((p0) => p0.parent, [
1179
+ props
1180
+ ], "p0.parent"),
1181
+ "builder-path": qwik._fnSignal((p0) => p0.path, [
1182
+ props
1183
+ ], "p0.path"),
1184
+ class: qwik._fnSignal((p0) => p0.value + " props-blocks-wrapper-BlocksWrapper", [
1185
+ className
1186
+ ], 'p0.value+" props-blocks-wrapper-BlocksWrapper"'),
1187
+ style: qwik._fnSignal((p0) => p0.styleProp, [
1188
+ props
1189
+ ], "p0.styleProp")
1190
+ }
1191
+ }, 0, "3u_1");
1173
1192
  }, "BlocksWrapper_component_45hR0o6abzg"));
1174
1193
  const STYLES$2 = `
1175
- .div-BlocksWrapper {
1194
+ .props-blocks-wrapper-BlocksWrapper {
1176
1195
  display: flex;
1177
1196
  flex-direction: column;
1178
1197
  align-items: stretch;
@@ -1194,6 +1213,14 @@ const Blocks = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl
1194
1213
  get styleProp() {
1195
1214
  return props.styleProp;
1196
1215
  },
1216
+ get BlocksWrapper() {
1217
+ var _a;
1218
+ return (_a = props.context) == null ? void 0 : _a.BlocksWrapper;
1219
+ },
1220
+ get BlocksWrapperProps() {
1221
+ var _a;
1222
+ return (_a = props.context) == null ? void 0 : _a.BlocksWrapperProps;
1223
+ },
1197
1224
  children: [
1198
1225
  props.blocks ? (props.blocks || []).map((block) => {
1199
1226
  return /* @__PURE__ */ qwik._jsxC(Block, {
@@ -1232,6 +1259,18 @@ const Blocks = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl
1232
1259
  }) : null
1233
1260
  ],
1234
1261
  [qwik._IMMUTABLE]: {
1262
+ BlocksWrapper: qwik._fnSignal((p0) => {
1263
+ var _a;
1264
+ return (_a = p0.context) == null ? void 0 : _a.BlocksWrapper;
1265
+ }, [
1266
+ props
1267
+ ], "p0.context?.BlocksWrapper"),
1268
+ BlocksWrapperProps: qwik._fnSignal((p0) => {
1269
+ var _a;
1270
+ return (_a = p0.context) == null ? void 0 : _a.BlocksWrapperProps;
1271
+ }, [
1272
+ props
1273
+ ], "p0.context?.BlocksWrapperProps"),
1235
1274
  blocks: qwik._fnSignal((p0) => p0.blocks, [
1236
1275
  props
1237
1276
  ], "p0.blocks"),
@@ -3268,7 +3307,7 @@ const getInteractionPropertiesForEvent = (event) => {
3268
3307
  }
3269
3308
  };
3270
3309
  };
3271
- const SDK_VERSION = "0.8.1";
3310
+ const SDK_VERSION = "0.9.0";
3272
3311
  const registry = {};
3273
3312
  function register(type, info) {
3274
3313
  let typeList = registry[type];
@@ -3530,6 +3569,7 @@ const EnableEditor = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inli
3530
3569
  qwik._jsxBranch();
3531
3570
  const elementRef = qwik.useSignal();
3532
3571
  const state = qwik.useStore({
3572
+ ContentWrapper: props.contentWrapper || "div",
3533
3573
  clicked: false,
3534
3574
  forceReRenderCount: 0,
3535
3575
  httpReqsData: {},
@@ -3671,7 +3711,7 @@ const EnableEditor = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inli
3671
3711
  state
3672
3712
  ]));
3673
3713
  return /* @__PURE__ */ qwik._jsxC(jsxRuntime.Fragment, {
3674
- children: props.builderContextSignal.content ? /* @__PURE__ */ qwik.createElement("div", {
3714
+ children: props.builderContextSignal.content ? /* @__PURE__ */ qwik.createElement(state.ContentWrapper, {
3675
3715
  apiKey: props.apiKey,
3676
3716
  contentId: (_a = props.builderContextSignal.content) == null ? void 0 : _a.id,
3677
3717
  variationId: (_b = props.builderContextSignal.content) == null ? void 0 : _b.testVariationId,
@@ -3692,6 +3732,7 @@ const EnableEditor = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inli
3692
3732
  hidden: true,
3693
3733
  "aria-hidden": true
3694
3734
  },
3735
+ ...props.contentWrapperProps,
3695
3736
  class: `variant-${((_d = props.content) == null ? void 0 : _d.testVariationId) || ((_e = props.content) == null ? void 0 : _e.id)}`
3696
3737
  }, /* @__PURE__ */ qwik._jsxC(qwik.Slot, null, 3, "06_0")) : null
3697
3738
  }, 1, "06_1");
@@ -3835,7 +3876,9 @@ const ContentComponent = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.
3835
3876
  ...acc,
3836
3877
  [info.name]: serializeComponentInfo(info)
3837
3878
  }), {}),
3838
- inheritedStyles: {}
3879
+ inheritedStyles: {},
3880
+ BlocksWrapper: props.blocksWrapper || "div",
3881
+ BlocksWrapperProps: props.blocksWrapperProps || {}
3839
3882
  },
3840
3883
  registeredComponents: [
3841
3884
  ...getDefaultRegisteredComponents(),
@@ -3896,6 +3939,12 @@ const ContentComponent = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.
3896
3939
  get builderContextSignal() {
3897
3940
  return state.builderContextSignal;
3898
3941
  },
3942
+ get contentWrapper() {
3943
+ return props.contentWrapper;
3944
+ },
3945
+ get contentWrapperProps() {
3946
+ return props.contentWrapperProps;
3947
+ },
3899
3948
  children: [
3900
3949
  props.isSsrAbTest ? /* @__PURE__ */ qwik._jsxC(InlinedScript, {
3901
3950
  get scriptStr() {
@@ -3981,6 +4030,12 @@ const ContentComponent = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.
3981
4030
  content: qwik._fnSignal((p0) => p0.content, [
3982
4031
  props
3983
4032
  ], "p0.content"),
4033
+ contentWrapper: qwik._fnSignal((p0) => p0.contentWrapper, [
4034
+ props
4035
+ ], "p0.contentWrapper"),
4036
+ contentWrapperProps: qwik._fnSignal((p0) => p0.contentWrapperProps, [
4037
+ props
4038
+ ], "p0.contentWrapperProps"),
3984
4039
  context: qwik._fnSignal((p0) => p0.context, [
3985
4040
  props
3986
4041
  ], "p0.context"),
@@ -4119,6 +4174,18 @@ const ContentVariants = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
4119
4174
  get isSsrAbTest() {
4120
4175
  return state.shouldRenderVariants;
4121
4176
  },
4177
+ get blocksWrapper() {
4178
+ return props.blocksWrapper;
4179
+ },
4180
+ get blocksWrapperProps() {
4181
+ return props.blocksWrapperProps;
4182
+ },
4183
+ get contentWrapper() {
4184
+ return props.contentWrapper;
4185
+ },
4186
+ get contentWrapperProps() {
4187
+ return props.contentWrapperProps;
4188
+ },
4122
4189
  [qwik._IMMUTABLE]: {
4123
4190
  apiKey: qwik._fnSignal((p0) => p0.apiKey, [
4124
4191
  props
@@ -4126,9 +4193,21 @@ const ContentVariants = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
4126
4193
  apiVersion: qwik._fnSignal((p0) => p0.apiVersion, [
4127
4194
  props
4128
4195
  ], "p0.apiVersion"),
4196
+ blocksWrapper: qwik._fnSignal((p0) => p0.blocksWrapper, [
4197
+ props
4198
+ ], "p0.blocksWrapper"),
4199
+ blocksWrapperProps: qwik._fnSignal((p0) => p0.blocksWrapperProps, [
4200
+ props
4201
+ ], "p0.blocksWrapperProps"),
4129
4202
  canTrack: qwik._fnSignal((p0) => p0.canTrack, [
4130
4203
  props
4131
4204
  ], "p0.canTrack"),
4205
+ contentWrapper: qwik._fnSignal((p0) => p0.contentWrapper, [
4206
+ props
4207
+ ], "p0.contentWrapper"),
4208
+ contentWrapperProps: qwik._fnSignal((p0) => p0.contentWrapperProps, [
4209
+ props
4210
+ ], "p0.contentWrapperProps"),
4132
4211
  context: qwik._fnSignal((p0) => p0.context, [
4133
4212
  props
4134
4213
  ], "p0.context"),
@@ -4197,6 +4276,18 @@ const ContentVariants = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
4197
4276
  get isSsrAbTest() {
4198
4277
  return state.shouldRenderVariants;
4199
4278
  },
4279
+ get blocksWrapper() {
4280
+ return props.blocksWrapper;
4281
+ },
4282
+ get blocksWrapperProps() {
4283
+ return props.blocksWrapperProps;
4284
+ },
4285
+ get contentWrapper() {
4286
+ return props.contentWrapper;
4287
+ },
4288
+ get contentWrapperProps() {
4289
+ return props.contentWrapperProps;
4290
+ },
4200
4291
  [qwik._IMMUTABLE]: {
4201
4292
  apiKey: qwik._fnSignal((p0) => p0.apiKey, [
4202
4293
  props
@@ -4204,12 +4295,24 @@ const ContentVariants = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
4204
4295
  apiVersion: qwik._fnSignal((p0) => p0.apiVersion, [
4205
4296
  props
4206
4297
  ], "p0.apiVersion"),
4298
+ blocksWrapper: qwik._fnSignal((p0) => p0.blocksWrapper, [
4299
+ props
4300
+ ], "p0.blocksWrapper"),
4301
+ blocksWrapperProps: qwik._fnSignal((p0) => p0.blocksWrapperProps, [
4302
+ props
4303
+ ], "p0.blocksWrapperProps"),
4207
4304
  canTrack: qwik._fnSignal((p0) => p0.canTrack, [
4208
4305
  props
4209
4306
  ], "p0.canTrack"),
4210
4307
  content: qwik._fnSignal((p0) => p0.value, [
4211
4308
  defaultContent
4212
4309
  ], "p0.value"),
4310
+ contentWrapper: qwik._fnSignal((p0) => p0.contentWrapper, [
4311
+ props
4312
+ ], "p0.contentWrapper"),
4313
+ contentWrapperProps: qwik._fnSignal((p0) => p0.contentWrapperProps, [
4314
+ props
4315
+ ], "p0.contentWrapperProps"),
4213
4316
  context: qwik._fnSignal((p0) => p0.context, [
4214
4317
  props
4215
4318
  ], "p0.context"),
@@ -601,7 +601,7 @@ function getBlockActions(options) {
601
601
  }
602
602
  return obj;
603
603
  }
604
- function transformBlockProperties(properties) {
604
+ function transformBlockProperties({ properties }) {
605
605
  return properties;
606
606
  }
607
607
  const extractRelevantRootBlockProperties = (block) => {
@@ -623,7 +623,11 @@ function getBlockProperties({ block, context }) {
623
623
  (_a = block.properties) == null ? void 0 : _a.class
624
624
  ].filter(Boolean).join(" ")
625
625
  };
626
- return transformBlockProperties(properties);
626
+ return transformBlockProperties({
627
+ properties,
628
+ context,
629
+ block
630
+ });
627
631
  }
628
632
  function getStyleAttribute(style) {
629
633
  switch (TARGET) {
@@ -1132,45 +1136,60 @@ const BlocksWrapper = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((p
1132
1136
  props
1133
1137
  ]));
1134
1138
  const state = {};
1135
- return /* @__PURE__ */ _jsxQ("div", {
1139
+ return /* @__PURE__ */ _jsxC(props.BlocksWrapper, {
1140
+ get class() {
1141
+ return className.value + " props-blocks-wrapper-BlocksWrapper";
1142
+ },
1143
+ get "builder-path"() {
1144
+ return props.path;
1145
+ },
1146
+ get "builder-parent-id"() {
1147
+ return props.parent;
1148
+ },
1149
+ get style() {
1150
+ return props.styleProp;
1151
+ },
1136
1152
  onClick$: /* @__PURE__ */ inlinedQrl((event) => {
1137
1153
  const [props2, state2] = useLexicalScope();
1138
1154
  return onClick$1(props2);
1139
- }, "BlocksWrapper_component_div_onClick_1NkidSBS3D0", [
1155
+ }, "BlocksWrapper_component_onClick_ufezvOupQrM", [
1140
1156
  props,
1141
1157
  state
1142
1158
  ]),
1143
1159
  onKeyPress$: /* @__PURE__ */ inlinedQrl((event) => {
1144
1160
  const [props2, state2] = useLexicalScope();
1145
1161
  return onClick$1(props2);
1146
- }, "BlocksWrapper_component_div_onKeyPress_Aaf0oNYOi80", [
1162
+ }, "BlocksWrapper_component_onKeyPress_9bz8vCQc3kg", [
1147
1163
  props,
1148
1164
  state
1149
1165
  ]),
1150
1166
  onMouseEnter$: /* @__PURE__ */ inlinedQrl((event) => {
1151
1167
  const [props2, state2] = useLexicalScope();
1152
1168
  return onMouseEnter(props2);
1153
- }, "BlocksWrapper_component_div_onMouseEnter_TxzAP5tI9Zc", [
1169
+ }, "BlocksWrapper_component_onMouseEnter_j4FJjnLtraQ", [
1154
1170
  props,
1155
1171
  state
1156
- ])
1157
- }, {
1158
- "builder-parent-id": _fnSignal((p0) => p0.parent, [
1159
- props
1160
- ], "p0.parent"),
1161
- "builder-path": _fnSignal((p0) => p0.path, [
1162
- props
1163
- ], "p0.path"),
1164
- class: _fnSignal((p0) => p0.value + " div-BlocksWrapper", [
1165
- className
1166
- ], 'p0.value+" div-BlocksWrapper"'),
1167
- style: _fnSignal((p0) => p0.styleProp, [
1168
- props
1169
- ], "p0.styleProp")
1170
- }, /* @__PURE__ */ _jsxC(Slot, null, 3, "3u_0"), 0, "3u_1");
1172
+ ]),
1173
+ ...props.BlocksWrapperProps,
1174
+ children: /* @__PURE__ */ _jsxC(Slot, null, 3, "3u_0"),
1175
+ [_IMMUTABLE]: {
1176
+ "builder-parent-id": _fnSignal((p0) => p0.parent, [
1177
+ props
1178
+ ], "p0.parent"),
1179
+ "builder-path": _fnSignal((p0) => p0.path, [
1180
+ props
1181
+ ], "p0.path"),
1182
+ class: _fnSignal((p0) => p0.value + " props-blocks-wrapper-BlocksWrapper", [
1183
+ className
1184
+ ], 'p0.value+" props-blocks-wrapper-BlocksWrapper"'),
1185
+ style: _fnSignal((p0) => p0.styleProp, [
1186
+ props
1187
+ ], "p0.styleProp")
1188
+ }
1189
+ }, 0, "3u_1");
1171
1190
  }, "BlocksWrapper_component_45hR0o6abzg"));
1172
1191
  const STYLES$2 = `
1173
- .div-BlocksWrapper {
1192
+ .props-blocks-wrapper-BlocksWrapper {
1174
1193
  display: flex;
1175
1194
  flex-direction: column;
1176
1195
  align-items: stretch;
@@ -1192,6 +1211,14 @@ const Blocks = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =
1192
1211
  get styleProp() {
1193
1212
  return props.styleProp;
1194
1213
  },
1214
+ get BlocksWrapper() {
1215
+ var _a;
1216
+ return (_a = props.context) == null ? void 0 : _a.BlocksWrapper;
1217
+ },
1218
+ get BlocksWrapperProps() {
1219
+ var _a;
1220
+ return (_a = props.context) == null ? void 0 : _a.BlocksWrapperProps;
1221
+ },
1195
1222
  children: [
1196
1223
  props.blocks ? (props.blocks || []).map((block) => {
1197
1224
  return /* @__PURE__ */ _jsxC(Block, {
@@ -1230,6 +1257,18 @@ const Blocks = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =
1230
1257
  }) : null
1231
1258
  ],
1232
1259
  [_IMMUTABLE]: {
1260
+ BlocksWrapper: _fnSignal((p0) => {
1261
+ var _a;
1262
+ return (_a = p0.context) == null ? void 0 : _a.BlocksWrapper;
1263
+ }, [
1264
+ props
1265
+ ], "p0.context?.BlocksWrapper"),
1266
+ BlocksWrapperProps: _fnSignal((p0) => {
1267
+ var _a;
1268
+ return (_a = p0.context) == null ? void 0 : _a.BlocksWrapperProps;
1269
+ }, [
1270
+ props
1271
+ ], "p0.context?.BlocksWrapperProps"),
1233
1272
  blocks: _fnSignal((p0) => p0.blocks, [
1234
1273
  props
1235
1274
  ], "p0.blocks"),
@@ -3266,7 +3305,7 @@ const getInteractionPropertiesForEvent = (event) => {
3266
3305
  }
3267
3306
  };
3268
3307
  };
3269
- const SDK_VERSION = "0.8.1";
3308
+ const SDK_VERSION = "0.9.0";
3270
3309
  const registry = {};
3271
3310
  function register(type, info) {
3272
3311
  let typeList = registry[type];
@@ -3528,6 +3567,7 @@ const EnableEditor = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pr
3528
3567
  _jsxBranch();
3529
3568
  const elementRef = useSignal();
3530
3569
  const state = useStore({
3570
+ ContentWrapper: props.contentWrapper || "div",
3531
3571
  clicked: false,
3532
3572
  forceReRenderCount: 0,
3533
3573
  httpReqsData: {},
@@ -3669,7 +3709,7 @@ const EnableEditor = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pr
3669
3709
  state
3670
3710
  ]));
3671
3711
  return /* @__PURE__ */ _jsxC(Fragment, {
3672
- children: props.builderContextSignal.content ? /* @__PURE__ */ createElement("div", {
3712
+ children: props.builderContextSignal.content ? /* @__PURE__ */ createElement(state.ContentWrapper, {
3673
3713
  apiKey: props.apiKey,
3674
3714
  contentId: (_a = props.builderContextSignal.content) == null ? void 0 : _a.id,
3675
3715
  variationId: (_b = props.builderContextSignal.content) == null ? void 0 : _b.testVariationId,
@@ -3690,6 +3730,7 @@ const EnableEditor = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pr
3690
3730
  hidden: true,
3691
3731
  "aria-hidden": true
3692
3732
  },
3733
+ ...props.contentWrapperProps,
3693
3734
  class: `variant-${((_d = props.content) == null ? void 0 : _d.testVariationId) || ((_e = props.content) == null ? void 0 : _e.id)}`
3694
3735
  }, /* @__PURE__ */ _jsxC(Slot, null, 3, "06_0")) : null
3695
3736
  }, 1, "06_1");
@@ -3833,7 +3874,9 @@ const ContentComponent = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl
3833
3874
  ...acc,
3834
3875
  [info.name]: serializeComponentInfo(info)
3835
3876
  }), {}),
3836
- inheritedStyles: {}
3877
+ inheritedStyles: {},
3878
+ BlocksWrapper: props.blocksWrapper || "div",
3879
+ BlocksWrapperProps: props.blocksWrapperProps || {}
3837
3880
  },
3838
3881
  registeredComponents: [
3839
3882
  ...getDefaultRegisteredComponents(),
@@ -3894,6 +3937,12 @@ const ContentComponent = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl
3894
3937
  get builderContextSignal() {
3895
3938
  return state.builderContextSignal;
3896
3939
  },
3940
+ get contentWrapper() {
3941
+ return props.contentWrapper;
3942
+ },
3943
+ get contentWrapperProps() {
3944
+ return props.contentWrapperProps;
3945
+ },
3897
3946
  children: [
3898
3947
  props.isSsrAbTest ? /* @__PURE__ */ _jsxC(InlinedScript, {
3899
3948
  get scriptStr() {
@@ -3979,6 +4028,12 @@ const ContentComponent = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl
3979
4028
  content: _fnSignal((p0) => p0.content, [
3980
4029
  props
3981
4030
  ], "p0.content"),
4031
+ contentWrapper: _fnSignal((p0) => p0.contentWrapper, [
4032
+ props
4033
+ ], "p0.contentWrapper"),
4034
+ contentWrapperProps: _fnSignal((p0) => p0.contentWrapperProps, [
4035
+ props
4036
+ ], "p0.contentWrapperProps"),
3982
4037
  context: _fnSignal((p0) => p0.context, [
3983
4038
  props
3984
4039
  ], "p0.context"),
@@ -4117,6 +4172,18 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
4117
4172
  get isSsrAbTest() {
4118
4173
  return state.shouldRenderVariants;
4119
4174
  },
4175
+ get blocksWrapper() {
4176
+ return props.blocksWrapper;
4177
+ },
4178
+ get blocksWrapperProps() {
4179
+ return props.blocksWrapperProps;
4180
+ },
4181
+ get contentWrapper() {
4182
+ return props.contentWrapper;
4183
+ },
4184
+ get contentWrapperProps() {
4185
+ return props.contentWrapperProps;
4186
+ },
4120
4187
  [_IMMUTABLE]: {
4121
4188
  apiKey: _fnSignal((p0) => p0.apiKey, [
4122
4189
  props
@@ -4124,9 +4191,21 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
4124
4191
  apiVersion: _fnSignal((p0) => p0.apiVersion, [
4125
4192
  props
4126
4193
  ], "p0.apiVersion"),
4194
+ blocksWrapper: _fnSignal((p0) => p0.blocksWrapper, [
4195
+ props
4196
+ ], "p0.blocksWrapper"),
4197
+ blocksWrapperProps: _fnSignal((p0) => p0.blocksWrapperProps, [
4198
+ props
4199
+ ], "p0.blocksWrapperProps"),
4127
4200
  canTrack: _fnSignal((p0) => p0.canTrack, [
4128
4201
  props
4129
4202
  ], "p0.canTrack"),
4203
+ contentWrapper: _fnSignal((p0) => p0.contentWrapper, [
4204
+ props
4205
+ ], "p0.contentWrapper"),
4206
+ contentWrapperProps: _fnSignal((p0) => p0.contentWrapperProps, [
4207
+ props
4208
+ ], "p0.contentWrapperProps"),
4130
4209
  context: _fnSignal((p0) => p0.context, [
4131
4210
  props
4132
4211
  ], "p0.context"),
@@ -4195,6 +4274,18 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
4195
4274
  get isSsrAbTest() {
4196
4275
  return state.shouldRenderVariants;
4197
4276
  },
4277
+ get blocksWrapper() {
4278
+ return props.blocksWrapper;
4279
+ },
4280
+ get blocksWrapperProps() {
4281
+ return props.blocksWrapperProps;
4282
+ },
4283
+ get contentWrapper() {
4284
+ return props.contentWrapper;
4285
+ },
4286
+ get contentWrapperProps() {
4287
+ return props.contentWrapperProps;
4288
+ },
4198
4289
  [_IMMUTABLE]: {
4199
4290
  apiKey: _fnSignal((p0) => p0.apiKey, [
4200
4291
  props
@@ -4202,12 +4293,24 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
4202
4293
  apiVersion: _fnSignal((p0) => p0.apiVersion, [
4203
4294
  props
4204
4295
  ], "p0.apiVersion"),
4296
+ blocksWrapper: _fnSignal((p0) => p0.blocksWrapper, [
4297
+ props
4298
+ ], "p0.blocksWrapper"),
4299
+ blocksWrapperProps: _fnSignal((p0) => p0.blocksWrapperProps, [
4300
+ props
4301
+ ], "p0.blocksWrapperProps"),
4205
4302
  canTrack: _fnSignal((p0) => p0.canTrack, [
4206
4303
  props
4207
4304
  ], "p0.canTrack"),
4208
4305
  content: _fnSignal((p0) => p0.value, [
4209
4306
  defaultContent
4210
4307
  ], "p0.value"),
4308
+ contentWrapper: _fnSignal((p0) => p0.contentWrapper, [
4309
+ props
4310
+ ], "p0.contentWrapper"),
4311
+ contentWrapperProps: _fnSignal((p0) => p0.contentWrapperProps, [
4312
+ props
4313
+ ], "p0.contentWrapperProps"),
4211
4314
  context: _fnSignal((p0) => p0.context, [
4212
4315
  props
4213
4316
  ], "p0.context"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@builder.io/sdk-qwik",
3
- "version": "0.8.1",
3
+ "version": "0.9.0",
4
4
  "homepage": "https://github.com/BuilderIO/builder/tree/main/packages/sdks/output/qwik",
5
5
  "repository": {
6
6
  "type": "git",
@@ -5,9 +5,17 @@ export type BlocksWrapperProps = {
5
5
  parent: string | undefined;
6
6
  path: string | undefined;
7
7
  styleProp: Record<string, any> | undefined;
8
+ /**
9
+ * The element that wraps each list of blocks. Defaults to a `div` element ('ScrollView' in React Native).
10
+ */
11
+ BlocksWrapper: any;
12
+ /**
13
+ * Additonal props to pass to `blocksWrapper`. Defaults to `{}`.
14
+ */
15
+ BlocksWrapperProps: any;
8
16
  };
9
17
  export declare const onClick: (props: any, state: any) => void;
10
18
  export declare const onMouseEnter: (props: any, state: any) => void;
11
19
  export declare const BlocksWrapper: import("@builder.io/qwik").Component<PropsWithChildren<BlocksWrapperProps>>;
12
20
  export default BlocksWrapper;
13
- export declare const STYLES = "\n.div-BlocksWrapper {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n}\n";
21
+ export declare const STYLES = "\n.props-blocks-wrapper-BlocksWrapper {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n}\n";
@@ -1,6 +1,6 @@
1
1
  import { BuilderContextInterface, RegisteredComponents } from "../../context/types.js";
2
2
  import { BlocksWrapperProps } from "./blocks-wrapper.jsx";
3
- export type BlocksProps = Partial<BlocksWrapperProps> & {
3
+ export type BlocksProps = Partial<Omit<BlocksWrapperProps, "BlocksWrapper" | "BlocksWrapperProps">> & {
4
4
  context?: BuilderContextInterface;
5
5
  registeredComponents?: RegisteredComponents;
6
6
  };
@@ -1,7 +1,7 @@
1
1
  import { BuilderContextInterface } from "../../../context/types.js";
2
2
  import { BuilderContent } from "../../../types/builder-content.js";
3
3
  import { ContentProps } from "../content.types.js";
4
- type BuilderEditorProps = Omit<ContentProps, "customComponents" | "data" | "apiVersion" | "isSsrAbTest"> & {
4
+ type BuilderEditorProps = Omit<ContentProps, "customComponents" | "data" | "apiVersion" | "isSsrAbTest" | "blocksWrapper" | "blocksWrapperProps"> & {
5
5
  builderContextSignal: BuilderContextInterface;
6
6
  setBuilderContextSignal?: (signal: any) => any;
7
7
  children?: any;
@@ -17,4 +17,20 @@ export interface ContentVariantsPrps {
17
17
  /** @deprecated use `enrich` instead **/
18
18
  includeRefs?: boolean;
19
19
  enrich?: boolean;
20
+ /**
21
+ * The element that wraps your content. Defaults to `div` ('ScrollView' in React Native).
22
+ */
23
+ contentWrapper?: any;
24
+ /**
25
+ * Additonal props to pass to `contentWrapper`. Defaults to `{}`.
26
+ */
27
+ contentWrapperProps?: any;
28
+ /**
29
+ * The element that wraps your blocks. Defaults to `div` ('ScrollView' in React Native).
30
+ */
31
+ blocksWrapper?: any;
32
+ /**
33
+ * Additonal props to pass to `blocksWrapper`. Defaults to `{}`.
34
+ */
35
+ blocksWrapperProps?: any;
20
36
  }
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.8.1";
1
+ export declare const SDK_VERSION = "0.9.0";
@@ -1,3 +1,4 @@
1
+ import type { BlocksWrapperProps } from '../components/blocks/blocks-wrapper.jsx';
1
2
  import type { ApiVersion } from '../types/api-version.js';
2
3
  import type { BuilderContent } from '../types/builder-content.js';
3
4
  import type { ComponentInfo } from '../types/components.js';
@@ -8,7 +9,7 @@ export type RegisteredComponent = ComponentInfo & {
8
9
  export type RegisteredComponents = Dictionary<RegisteredComponent>;
9
10
  export type BuilderRenderState = Record<string, unknown>;
10
11
  export type BuilderRenderContext = Record<string, unknown>;
11
- export interface BuilderContextInterface {
12
+ export interface BuilderContextInterface extends Pick<BlocksWrapperProps, 'BlocksWrapper' | 'BlocksWrapperProps'> {
12
13
  content: Nullable<BuilderContent>;
13
14
  context: BuilderRenderContext;
14
15
  /**
@@ -1 +1,7 @@
1
- export declare function transformBlockProperties<T>(properties: T): T;
1
+ import type { BuilderContextInterface } from '../context/types';
2
+ import type { BuilderBlock } from '../types/builder-block';
3
+ export declare function transformBlockProperties<T>({ properties }: {
4
+ properties: T;
5
+ context: BuilderContextInterface;
6
+ block: BuilderBlock;
7
+ }): T;