@builder.io/sdk-solid 0.12.0 → 0.12.1
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/dev.js +64 -16
- package/lib/browser/dev.jsx +48 -8
- package/lib/browser/index.js +64 -16
- package/lib/browser/index.jsx +48 -8
- package/lib/edge/dev.js +64 -16
- package/lib/edge/dev.jsx +48 -8
- package/lib/edge/index.js +64 -16
- package/lib/edge/index.jsx +48 -8
- package/lib/node/dev.js +64 -16
- package/lib/node/dev.jsx +48 -8
- package/lib/node/index.js +64 -16
- package/lib/node/index.jsx +48 -8
- package/package.json +1 -1
package/lib/edge/dev.js
CHANGED
|
@@ -5528,8 +5528,50 @@ var componentInfo8 = {
|
|
|
5528
5528
|
}]
|
|
5529
5529
|
};
|
|
5530
5530
|
|
|
5531
|
-
// src/blocks/
|
|
5531
|
+
// src/blocks/slot/component-info.ts
|
|
5532
5532
|
var componentInfo9 = {
|
|
5533
|
+
name: "Slot",
|
|
5534
|
+
isRSC: true,
|
|
5535
|
+
description: "Allow child blocks to be inserted into this content when used as a Symbol",
|
|
5536
|
+
docsLink: "https://www.builder.io/c/docs/symbols-with-blocks",
|
|
5537
|
+
image: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F3aad6de36eae43b59b52c85190fdef56",
|
|
5538
|
+
// Maybe wrap this for canHaveChildren so bind children to this hm
|
|
5539
|
+
inputs: [{
|
|
5540
|
+
name: "name",
|
|
5541
|
+
type: "string",
|
|
5542
|
+
required: true,
|
|
5543
|
+
defaultValue: "children"
|
|
5544
|
+
}]
|
|
5545
|
+
};
|
|
5546
|
+
var _tmpl$11 = /* @__PURE__ */ template(`<div>`);
|
|
5547
|
+
function Slot(props) {
|
|
5548
|
+
return (() => {
|
|
5549
|
+
const _el$ = _tmpl$11();
|
|
5550
|
+
_el$.style.setProperty("pointer-events", "auto");
|
|
5551
|
+
spread(_el$, mergeProps(() => !props.builderContext.context?.symbolId && {
|
|
5552
|
+
"builder-slot": props.name
|
|
5553
|
+
}), false, true);
|
|
5554
|
+
insert(_el$, createComponent(blocks_default, {
|
|
5555
|
+
get parent() {
|
|
5556
|
+
return props.builderContext.context?.symbolId;
|
|
5557
|
+
},
|
|
5558
|
+
get path() {
|
|
5559
|
+
return `symbol.data.${props.name}`;
|
|
5560
|
+
},
|
|
5561
|
+
get context() {
|
|
5562
|
+
return props.builderContext;
|
|
5563
|
+
},
|
|
5564
|
+
get blocks() {
|
|
5565
|
+
return props.builderContext.rootState?.[props.name];
|
|
5566
|
+
}
|
|
5567
|
+
}));
|
|
5568
|
+
return _el$;
|
|
5569
|
+
})();
|
|
5570
|
+
}
|
|
5571
|
+
var slot_default = Slot;
|
|
5572
|
+
|
|
5573
|
+
// src/blocks/symbol/component-info.ts
|
|
5574
|
+
var componentInfo10 = {
|
|
5533
5575
|
name: "Symbol",
|
|
5534
5576
|
noWrap: true,
|
|
5535
5577
|
static: true,
|
|
@@ -5565,7 +5607,7 @@ var componentInfo9 = {
|
|
|
5565
5607
|
};
|
|
5566
5608
|
|
|
5567
5609
|
// src/blocks/text/component-info.ts
|
|
5568
|
-
var
|
|
5610
|
+
var componentInfo11 = {
|
|
5569
5611
|
name: "Text",
|
|
5570
5612
|
static: true,
|
|
5571
5613
|
isRSC: true,
|
|
@@ -5584,10 +5626,10 @@ var componentInfo10 = {
|
|
|
5584
5626
|
textAlign: "center"
|
|
5585
5627
|
}
|
|
5586
5628
|
};
|
|
5587
|
-
var _tmpl$
|
|
5629
|
+
var _tmpl$12 = /* @__PURE__ */ template(`<div class=builder-text>`);
|
|
5588
5630
|
function Text(props) {
|
|
5589
5631
|
return (() => {
|
|
5590
|
-
const _el$ = _tmpl$
|
|
5632
|
+
const _el$ = _tmpl$12();
|
|
5591
5633
|
_el$.style.setProperty("outline", "none");
|
|
5592
5634
|
effect(() => _el$.innerHTML = props.text?.toString() || "");
|
|
5593
5635
|
return _el$;
|
|
@@ -5596,7 +5638,7 @@ function Text(props) {
|
|
|
5596
5638
|
var text_default = Text;
|
|
5597
5639
|
|
|
5598
5640
|
// src/blocks/video/component-info.ts
|
|
5599
|
-
var
|
|
5641
|
+
var componentInfo12 = {
|
|
5600
5642
|
name: "Video",
|
|
5601
5643
|
canHaveChildren: true,
|
|
5602
5644
|
defaultStyles: {
|
|
@@ -5678,7 +5720,7 @@ var componentInfo11 = {
|
|
|
5678
5720
|
advanced: true
|
|
5679
5721
|
}]
|
|
5680
5722
|
};
|
|
5681
|
-
var _tmpl$
|
|
5723
|
+
var _tmpl$13 = /* @__PURE__ */ template(`<source type=video/mp4>`);
|
|
5682
5724
|
var _tmpl$23 = /* @__PURE__ */ template(`<div>`);
|
|
5683
5725
|
var _tmpl$33 = /* @__PURE__ */ template(`<div><video class=builder-video>`);
|
|
5684
5726
|
function Video(props) {
|
|
@@ -5741,7 +5783,7 @@ function Video(props) {
|
|
|
5741
5783
|
return !props.lazyLoad;
|
|
5742
5784
|
},
|
|
5743
5785
|
get children() {
|
|
5744
|
-
const _el$3 = _tmpl$
|
|
5786
|
+
const _el$3 = _tmpl$13();
|
|
5745
5787
|
effect(() => setAttribute(_el$3, "src", props.video));
|
|
5746
5788
|
return _el$3;
|
|
5747
5789
|
}
|
|
@@ -5823,13 +5865,16 @@ var getDefaultRegisteredComponents = () => [{
|
|
|
5823
5865
|
...componentInfo8
|
|
5824
5866
|
}, {
|
|
5825
5867
|
component: symbol_default,
|
|
5826
|
-
...
|
|
5868
|
+
...componentInfo10
|
|
5827
5869
|
}, {
|
|
5828
5870
|
component: text_default,
|
|
5829
|
-
...
|
|
5871
|
+
...componentInfo11
|
|
5830
5872
|
}, {
|
|
5831
5873
|
component: video_default,
|
|
5832
|
-
...
|
|
5874
|
+
...componentInfo12
|
|
5875
|
+
}, {
|
|
5876
|
+
component: slot_default,
|
|
5877
|
+
...componentInfo9
|
|
5833
5878
|
}];
|
|
5834
5879
|
|
|
5835
5880
|
// src/functions/register-component.ts
|
|
@@ -5900,10 +5945,10 @@ var getUpdateVariantVisibilityScript = ({
|
|
|
5900
5945
|
}) => `window.${UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME}(
|
|
5901
5946
|
"${variationId}", "${contentId}", ${isHydrationTarget}
|
|
5902
5947
|
)`;
|
|
5903
|
-
var _tmpl$
|
|
5948
|
+
var _tmpl$14 = /* @__PURE__ */ template(`<script>`);
|
|
5904
5949
|
function InlinedScript(props) {
|
|
5905
5950
|
return (() => {
|
|
5906
|
-
const _el$ = _tmpl$
|
|
5951
|
+
const _el$ = _tmpl$14();
|
|
5907
5952
|
effect((_p$) => {
|
|
5908
5953
|
const _v$ = props.scriptStr, _v$2 = props.id || "";
|
|
5909
5954
|
_v$ !== _p$._v$ && (_el$.innerHTML = _p$._v$ = _v$);
|
|
@@ -6403,7 +6448,7 @@ var getInteractionPropertiesForEvent = (event) => {
|
|
|
6403
6448
|
};
|
|
6404
6449
|
|
|
6405
6450
|
// src/constants/sdk-version.ts
|
|
6406
|
-
var SDK_VERSION = "0.12.
|
|
6451
|
+
var SDK_VERSION = "0.12.1";
|
|
6407
6452
|
|
|
6408
6453
|
// src/functions/register.ts
|
|
6409
6454
|
var registry = {};
|
|
@@ -7320,7 +7365,7 @@ var fetchSymbolContent = async ({
|
|
|
7320
7365
|
};
|
|
7321
7366
|
|
|
7322
7367
|
// src/blocks/symbol/symbol.tsx
|
|
7323
|
-
var _tmpl$
|
|
7368
|
+
var _tmpl$15 = /* @__PURE__ */ template(`<div>`);
|
|
7324
7369
|
function Symbol2(props) {
|
|
7325
7370
|
const [contentToUse, setContentToUse] = createSignal(props.symbol?.content);
|
|
7326
7371
|
function className() {
|
|
@@ -7346,7 +7391,7 @@ function Symbol2(props) {
|
|
|
7346
7391
|
}
|
|
7347
7392
|
createEffect(on(() => [props.symbol], onUpdateFn_0));
|
|
7348
7393
|
return (() => {
|
|
7349
|
-
const _el$ = _tmpl$
|
|
7394
|
+
const _el$ = _tmpl$15();
|
|
7350
7395
|
spread(_el$, mergeProps({
|
|
7351
7396
|
get ["class"]() {
|
|
7352
7397
|
return className();
|
|
@@ -7361,7 +7406,10 @@ function Symbol2(props) {
|
|
|
7361
7406
|
return props.builderContext.apiKey;
|
|
7362
7407
|
},
|
|
7363
7408
|
get context() {
|
|
7364
|
-
return
|
|
7409
|
+
return {
|
|
7410
|
+
...props.builderContext.context,
|
|
7411
|
+
symbolId: props.builderBlock?.id
|
|
7412
|
+
};
|
|
7365
7413
|
},
|
|
7366
7414
|
get customComponents() {
|
|
7367
7415
|
return Object.values(props.builderComponents);
|
package/lib/edge/dev.jsx
CHANGED
|
@@ -5253,8 +5253,42 @@ var componentInfo8 = {
|
|
|
5253
5253
|
}]
|
|
5254
5254
|
};
|
|
5255
5255
|
|
|
5256
|
-
// src/blocks/
|
|
5256
|
+
// src/blocks/slot/component-info.ts
|
|
5257
5257
|
var componentInfo9 = {
|
|
5258
|
+
name: "Slot",
|
|
5259
|
+
isRSC: true,
|
|
5260
|
+
description: "Allow child blocks to be inserted into this content when used as a Symbol",
|
|
5261
|
+
docsLink: "https://www.builder.io/c/docs/symbols-with-blocks",
|
|
5262
|
+
image: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F3aad6de36eae43b59b52c85190fdef56",
|
|
5263
|
+
// Maybe wrap this for canHaveChildren so bind children to this hm
|
|
5264
|
+
inputs: [{
|
|
5265
|
+
name: "name",
|
|
5266
|
+
type: "string",
|
|
5267
|
+
required: true,
|
|
5268
|
+
defaultValue: "children"
|
|
5269
|
+
}]
|
|
5270
|
+
};
|
|
5271
|
+
|
|
5272
|
+
// src/blocks/slot/slot.tsx
|
|
5273
|
+
function Slot(props) {
|
|
5274
|
+
return <div
|
|
5275
|
+
style={{
|
|
5276
|
+
"pointer-events": "auto"
|
|
5277
|
+
}}
|
|
5278
|
+
{...!props.builderContext.context?.symbolId && {
|
|
5279
|
+
"builder-slot": props.name
|
|
5280
|
+
}}
|
|
5281
|
+
><Blocks_default
|
|
5282
|
+
parent={props.builderContext.context?.symbolId}
|
|
5283
|
+
path={`symbol.data.${props.name}`}
|
|
5284
|
+
context={props.builderContext}
|
|
5285
|
+
blocks={props.builderContext.rootState?.[props.name]}
|
|
5286
|
+
/></div>;
|
|
5287
|
+
}
|
|
5288
|
+
var slot_default = Slot;
|
|
5289
|
+
|
|
5290
|
+
// src/blocks/symbol/component-info.ts
|
|
5291
|
+
var componentInfo10 = {
|
|
5258
5292
|
name: "Symbol",
|
|
5259
5293
|
noWrap: true,
|
|
5260
5294
|
static: true,
|
|
@@ -5290,7 +5324,7 @@ var componentInfo9 = {
|
|
|
5290
5324
|
};
|
|
5291
5325
|
|
|
5292
5326
|
// src/blocks/text/component-info.ts
|
|
5293
|
-
var
|
|
5327
|
+
var componentInfo11 = {
|
|
5294
5328
|
name: "Text",
|
|
5295
5329
|
static: true,
|
|
5296
5330
|
isRSC: true,
|
|
@@ -5323,7 +5357,7 @@ function Text(props) {
|
|
|
5323
5357
|
var text_default = Text;
|
|
5324
5358
|
|
|
5325
5359
|
// src/blocks/video/component-info.ts
|
|
5326
|
-
var
|
|
5360
|
+
var componentInfo12 = {
|
|
5327
5361
|
name: "Video",
|
|
5328
5362
|
canHaveChildren: true,
|
|
5329
5363
|
defaultStyles: {
|
|
@@ -5520,13 +5554,16 @@ var getDefaultRegisteredComponents = () => [{
|
|
|
5520
5554
|
...componentInfo8
|
|
5521
5555
|
}, {
|
|
5522
5556
|
component: symbol_default,
|
|
5523
|
-
...
|
|
5557
|
+
...componentInfo10
|
|
5524
5558
|
}, {
|
|
5525
5559
|
component: text_default,
|
|
5526
|
-
...
|
|
5560
|
+
...componentInfo11
|
|
5527
5561
|
}, {
|
|
5528
5562
|
component: video_default,
|
|
5529
|
-
...
|
|
5563
|
+
...componentInfo12
|
|
5564
|
+
}, {
|
|
5565
|
+
component: slot_default,
|
|
5566
|
+
...componentInfo9
|
|
5530
5567
|
}];
|
|
5531
5568
|
|
|
5532
5569
|
// src/functions/register-component.ts
|
|
@@ -6093,7 +6130,7 @@ var getInteractionPropertiesForEvent = (event) => {
|
|
|
6093
6130
|
};
|
|
6094
6131
|
|
|
6095
6132
|
// src/constants/sdk-version.ts
|
|
6096
|
-
var SDK_VERSION = "0.12.
|
|
6133
|
+
var SDK_VERSION = "0.12.1";
|
|
6097
6134
|
|
|
6098
6135
|
// src/functions/register.ts
|
|
6099
6136
|
var registry = {};
|
|
@@ -6907,7 +6944,10 @@ function Symbol2(props) {
|
|
|
6907
6944
|
__isNestedRender={true}
|
|
6908
6945
|
apiVersion={props.builderContext.apiVersion}
|
|
6909
6946
|
apiKey={props.builderContext.apiKey}
|
|
6910
|
-
context={
|
|
6947
|
+
context={{
|
|
6948
|
+
...props.builderContext.context,
|
|
6949
|
+
symbolId: props.builderBlock?.id
|
|
6950
|
+
}}
|
|
6911
6951
|
customComponents={Object.values(props.builderComponents)}
|
|
6912
6952
|
data={{
|
|
6913
6953
|
...props.symbol?.data,
|
package/lib/edge/index.js
CHANGED
|
@@ -5519,8 +5519,50 @@ var componentInfo8 = {
|
|
|
5519
5519
|
}]
|
|
5520
5520
|
};
|
|
5521
5521
|
|
|
5522
|
-
// src/blocks/
|
|
5522
|
+
// src/blocks/slot/component-info.ts
|
|
5523
5523
|
var componentInfo9 = {
|
|
5524
|
+
name: "Slot",
|
|
5525
|
+
isRSC: true,
|
|
5526
|
+
description: "Allow child blocks to be inserted into this content when used as a Symbol",
|
|
5527
|
+
docsLink: "https://www.builder.io/c/docs/symbols-with-blocks",
|
|
5528
|
+
image: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F3aad6de36eae43b59b52c85190fdef56",
|
|
5529
|
+
// Maybe wrap this for canHaveChildren so bind children to this hm
|
|
5530
|
+
inputs: [{
|
|
5531
|
+
name: "name",
|
|
5532
|
+
type: "string",
|
|
5533
|
+
required: true,
|
|
5534
|
+
defaultValue: "children"
|
|
5535
|
+
}]
|
|
5536
|
+
};
|
|
5537
|
+
var _tmpl$11 = /* @__PURE__ */ template(`<div>`);
|
|
5538
|
+
function Slot(props) {
|
|
5539
|
+
return (() => {
|
|
5540
|
+
const _el$ = _tmpl$11();
|
|
5541
|
+
_el$.style.setProperty("pointer-events", "auto");
|
|
5542
|
+
spread(_el$, mergeProps(() => !props.builderContext.context?.symbolId && {
|
|
5543
|
+
"builder-slot": props.name
|
|
5544
|
+
}), false, true);
|
|
5545
|
+
insert(_el$, createComponent(blocks_default, {
|
|
5546
|
+
get parent() {
|
|
5547
|
+
return props.builderContext.context?.symbolId;
|
|
5548
|
+
},
|
|
5549
|
+
get path() {
|
|
5550
|
+
return `symbol.data.${props.name}`;
|
|
5551
|
+
},
|
|
5552
|
+
get context() {
|
|
5553
|
+
return props.builderContext;
|
|
5554
|
+
},
|
|
5555
|
+
get blocks() {
|
|
5556
|
+
return props.builderContext.rootState?.[props.name];
|
|
5557
|
+
}
|
|
5558
|
+
}));
|
|
5559
|
+
return _el$;
|
|
5560
|
+
})();
|
|
5561
|
+
}
|
|
5562
|
+
var slot_default = Slot;
|
|
5563
|
+
|
|
5564
|
+
// src/blocks/symbol/component-info.ts
|
|
5565
|
+
var componentInfo10 = {
|
|
5524
5566
|
name: "Symbol",
|
|
5525
5567
|
noWrap: true,
|
|
5526
5568
|
static: true,
|
|
@@ -5556,7 +5598,7 @@ var componentInfo9 = {
|
|
|
5556
5598
|
};
|
|
5557
5599
|
|
|
5558
5600
|
// src/blocks/text/component-info.ts
|
|
5559
|
-
var
|
|
5601
|
+
var componentInfo11 = {
|
|
5560
5602
|
name: "Text",
|
|
5561
5603
|
static: true,
|
|
5562
5604
|
isRSC: true,
|
|
@@ -5575,10 +5617,10 @@ var componentInfo10 = {
|
|
|
5575
5617
|
textAlign: "center"
|
|
5576
5618
|
}
|
|
5577
5619
|
};
|
|
5578
|
-
var _tmpl$
|
|
5620
|
+
var _tmpl$12 = /* @__PURE__ */ template(`<div class=builder-text>`);
|
|
5579
5621
|
function Text(props) {
|
|
5580
5622
|
return (() => {
|
|
5581
|
-
const _el$ = _tmpl$
|
|
5623
|
+
const _el$ = _tmpl$12();
|
|
5582
5624
|
_el$.style.setProperty("outline", "none");
|
|
5583
5625
|
effect(() => _el$.innerHTML = props.text?.toString() || "");
|
|
5584
5626
|
return _el$;
|
|
@@ -5587,7 +5629,7 @@ function Text(props) {
|
|
|
5587
5629
|
var text_default = Text;
|
|
5588
5630
|
|
|
5589
5631
|
// src/blocks/video/component-info.ts
|
|
5590
|
-
var
|
|
5632
|
+
var componentInfo12 = {
|
|
5591
5633
|
name: "Video",
|
|
5592
5634
|
canHaveChildren: true,
|
|
5593
5635
|
defaultStyles: {
|
|
@@ -5669,7 +5711,7 @@ var componentInfo11 = {
|
|
|
5669
5711
|
advanced: true
|
|
5670
5712
|
}]
|
|
5671
5713
|
};
|
|
5672
|
-
var _tmpl$
|
|
5714
|
+
var _tmpl$13 = /* @__PURE__ */ template(`<source type=video/mp4>`);
|
|
5673
5715
|
var _tmpl$23 = /* @__PURE__ */ template(`<div>`);
|
|
5674
5716
|
var _tmpl$33 = /* @__PURE__ */ template(`<div><video class=builder-video>`);
|
|
5675
5717
|
function Video(props) {
|
|
@@ -5732,7 +5774,7 @@ function Video(props) {
|
|
|
5732
5774
|
return !props.lazyLoad;
|
|
5733
5775
|
},
|
|
5734
5776
|
get children() {
|
|
5735
|
-
const _el$3 = _tmpl$
|
|
5777
|
+
const _el$3 = _tmpl$13();
|
|
5736
5778
|
effect(() => setAttribute(_el$3, "src", props.video));
|
|
5737
5779
|
return _el$3;
|
|
5738
5780
|
}
|
|
@@ -5814,13 +5856,16 @@ var getDefaultRegisteredComponents = () => [{
|
|
|
5814
5856
|
...componentInfo8
|
|
5815
5857
|
}, {
|
|
5816
5858
|
component: symbol_default,
|
|
5817
|
-
...
|
|
5859
|
+
...componentInfo10
|
|
5818
5860
|
}, {
|
|
5819
5861
|
component: text_default,
|
|
5820
|
-
...
|
|
5862
|
+
...componentInfo11
|
|
5821
5863
|
}, {
|
|
5822
5864
|
component: video_default,
|
|
5823
|
-
...
|
|
5865
|
+
...componentInfo12
|
|
5866
|
+
}, {
|
|
5867
|
+
component: slot_default,
|
|
5868
|
+
...componentInfo9
|
|
5824
5869
|
}];
|
|
5825
5870
|
|
|
5826
5871
|
// src/functions/register-component.ts
|
|
@@ -5891,10 +5936,10 @@ var getUpdateVariantVisibilityScript = ({
|
|
|
5891
5936
|
}) => `window.${UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME}(
|
|
5892
5937
|
"${variationId}", "${contentId}", ${isHydrationTarget}
|
|
5893
5938
|
)`;
|
|
5894
|
-
var _tmpl$
|
|
5939
|
+
var _tmpl$14 = /* @__PURE__ */ template(`<script>`);
|
|
5895
5940
|
function InlinedScript(props) {
|
|
5896
5941
|
return (() => {
|
|
5897
|
-
const _el$ = _tmpl$
|
|
5942
|
+
const _el$ = _tmpl$14();
|
|
5898
5943
|
effect((_p$) => {
|
|
5899
5944
|
const _v$ = props.scriptStr, _v$2 = props.id || "";
|
|
5900
5945
|
_v$ !== _p$._v$ && (_el$.innerHTML = _p$._v$ = _v$);
|
|
@@ -6389,7 +6434,7 @@ var getInteractionPropertiesForEvent = (event) => {
|
|
|
6389
6434
|
};
|
|
6390
6435
|
|
|
6391
6436
|
// src/constants/sdk-version.ts
|
|
6392
|
-
var SDK_VERSION = "0.12.
|
|
6437
|
+
var SDK_VERSION = "0.12.1";
|
|
6393
6438
|
|
|
6394
6439
|
// src/functions/register.ts
|
|
6395
6440
|
var registry = {};
|
|
@@ -7304,7 +7349,7 @@ var fetchSymbolContent = async ({
|
|
|
7304
7349
|
};
|
|
7305
7350
|
|
|
7306
7351
|
// src/blocks/symbol/symbol.tsx
|
|
7307
|
-
var _tmpl$
|
|
7352
|
+
var _tmpl$15 = /* @__PURE__ */ template(`<div>`);
|
|
7308
7353
|
function Symbol2(props) {
|
|
7309
7354
|
const [contentToUse, setContentToUse] = createSignal(props.symbol?.content);
|
|
7310
7355
|
function className() {
|
|
@@ -7330,7 +7375,7 @@ function Symbol2(props) {
|
|
|
7330
7375
|
}
|
|
7331
7376
|
createEffect(on(() => [props.symbol], onUpdateFn_0));
|
|
7332
7377
|
return (() => {
|
|
7333
|
-
const _el$ = _tmpl$
|
|
7378
|
+
const _el$ = _tmpl$15();
|
|
7334
7379
|
spread(_el$, mergeProps({
|
|
7335
7380
|
get ["class"]() {
|
|
7336
7381
|
return className();
|
|
@@ -7345,7 +7390,10 @@ function Symbol2(props) {
|
|
|
7345
7390
|
return props.builderContext.apiKey;
|
|
7346
7391
|
},
|
|
7347
7392
|
get context() {
|
|
7348
|
-
return
|
|
7393
|
+
return {
|
|
7394
|
+
...props.builderContext.context,
|
|
7395
|
+
symbolId: props.builderBlock?.id
|
|
7396
|
+
};
|
|
7349
7397
|
},
|
|
7350
7398
|
get customComponents() {
|
|
7351
7399
|
return Object.values(props.builderComponents);
|
package/lib/edge/index.jsx
CHANGED
|
@@ -5244,8 +5244,42 @@ var componentInfo8 = {
|
|
|
5244
5244
|
}]
|
|
5245
5245
|
};
|
|
5246
5246
|
|
|
5247
|
-
// src/blocks/
|
|
5247
|
+
// src/blocks/slot/component-info.ts
|
|
5248
5248
|
var componentInfo9 = {
|
|
5249
|
+
name: "Slot",
|
|
5250
|
+
isRSC: true,
|
|
5251
|
+
description: "Allow child blocks to be inserted into this content when used as a Symbol",
|
|
5252
|
+
docsLink: "https://www.builder.io/c/docs/symbols-with-blocks",
|
|
5253
|
+
image: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F3aad6de36eae43b59b52c85190fdef56",
|
|
5254
|
+
// Maybe wrap this for canHaveChildren so bind children to this hm
|
|
5255
|
+
inputs: [{
|
|
5256
|
+
name: "name",
|
|
5257
|
+
type: "string",
|
|
5258
|
+
required: true,
|
|
5259
|
+
defaultValue: "children"
|
|
5260
|
+
}]
|
|
5261
|
+
};
|
|
5262
|
+
|
|
5263
|
+
// src/blocks/slot/slot.tsx
|
|
5264
|
+
function Slot(props) {
|
|
5265
|
+
return <div
|
|
5266
|
+
style={{
|
|
5267
|
+
"pointer-events": "auto"
|
|
5268
|
+
}}
|
|
5269
|
+
{...!props.builderContext.context?.symbolId && {
|
|
5270
|
+
"builder-slot": props.name
|
|
5271
|
+
}}
|
|
5272
|
+
><Blocks_default
|
|
5273
|
+
parent={props.builderContext.context?.symbolId}
|
|
5274
|
+
path={`symbol.data.${props.name}`}
|
|
5275
|
+
context={props.builderContext}
|
|
5276
|
+
blocks={props.builderContext.rootState?.[props.name]}
|
|
5277
|
+
/></div>;
|
|
5278
|
+
}
|
|
5279
|
+
var slot_default = Slot;
|
|
5280
|
+
|
|
5281
|
+
// src/blocks/symbol/component-info.ts
|
|
5282
|
+
var componentInfo10 = {
|
|
5249
5283
|
name: "Symbol",
|
|
5250
5284
|
noWrap: true,
|
|
5251
5285
|
static: true,
|
|
@@ -5281,7 +5315,7 @@ var componentInfo9 = {
|
|
|
5281
5315
|
};
|
|
5282
5316
|
|
|
5283
5317
|
// src/blocks/text/component-info.ts
|
|
5284
|
-
var
|
|
5318
|
+
var componentInfo11 = {
|
|
5285
5319
|
name: "Text",
|
|
5286
5320
|
static: true,
|
|
5287
5321
|
isRSC: true,
|
|
@@ -5314,7 +5348,7 @@ function Text(props) {
|
|
|
5314
5348
|
var text_default = Text;
|
|
5315
5349
|
|
|
5316
5350
|
// src/blocks/video/component-info.ts
|
|
5317
|
-
var
|
|
5351
|
+
var componentInfo12 = {
|
|
5318
5352
|
name: "Video",
|
|
5319
5353
|
canHaveChildren: true,
|
|
5320
5354
|
defaultStyles: {
|
|
@@ -5511,13 +5545,16 @@ var getDefaultRegisteredComponents = () => [{
|
|
|
5511
5545
|
...componentInfo8
|
|
5512
5546
|
}, {
|
|
5513
5547
|
component: symbol_default,
|
|
5514
|
-
...
|
|
5548
|
+
...componentInfo10
|
|
5515
5549
|
}, {
|
|
5516
5550
|
component: text_default,
|
|
5517
|
-
...
|
|
5551
|
+
...componentInfo11
|
|
5518
5552
|
}, {
|
|
5519
5553
|
component: video_default,
|
|
5520
|
-
...
|
|
5554
|
+
...componentInfo12
|
|
5555
|
+
}, {
|
|
5556
|
+
component: slot_default,
|
|
5557
|
+
...componentInfo9
|
|
5521
5558
|
}];
|
|
5522
5559
|
|
|
5523
5560
|
// src/functions/register-component.ts
|
|
@@ -6079,7 +6116,7 @@ var getInteractionPropertiesForEvent = (event) => {
|
|
|
6079
6116
|
};
|
|
6080
6117
|
|
|
6081
6118
|
// src/constants/sdk-version.ts
|
|
6082
|
-
var SDK_VERSION = "0.12.
|
|
6119
|
+
var SDK_VERSION = "0.12.1";
|
|
6083
6120
|
|
|
6084
6121
|
// src/functions/register.ts
|
|
6085
6122
|
var registry = {};
|
|
@@ -6891,7 +6928,10 @@ function Symbol2(props) {
|
|
|
6891
6928
|
__isNestedRender={true}
|
|
6892
6929
|
apiVersion={props.builderContext.apiVersion}
|
|
6893
6930
|
apiKey={props.builderContext.apiKey}
|
|
6894
|
-
context={
|
|
6931
|
+
context={{
|
|
6932
|
+
...props.builderContext.context,
|
|
6933
|
+
symbolId: props.builderBlock?.id
|
|
6934
|
+
}}
|
|
6895
6935
|
customComponents={Object.values(props.builderComponents)}
|
|
6896
6936
|
data={{
|
|
6897
6937
|
...props.symbol?.data,
|