@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/node/dev.js
CHANGED
|
@@ -2499,8 +2499,50 @@ var componentInfo8 = {
|
|
|
2499
2499
|
}]
|
|
2500
2500
|
};
|
|
2501
2501
|
|
|
2502
|
-
// src/blocks/
|
|
2502
|
+
// src/blocks/slot/component-info.ts
|
|
2503
2503
|
var componentInfo9 = {
|
|
2504
|
+
name: "Slot",
|
|
2505
|
+
isRSC: true,
|
|
2506
|
+
description: "Allow child blocks to be inserted into this content when used as a Symbol",
|
|
2507
|
+
docsLink: "https://www.builder.io/c/docs/symbols-with-blocks",
|
|
2508
|
+
image: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F3aad6de36eae43b59b52c85190fdef56",
|
|
2509
|
+
// Maybe wrap this for canHaveChildren so bind children to this hm
|
|
2510
|
+
inputs: [{
|
|
2511
|
+
name: "name",
|
|
2512
|
+
type: "string",
|
|
2513
|
+
required: true,
|
|
2514
|
+
defaultValue: "children"
|
|
2515
|
+
}]
|
|
2516
|
+
};
|
|
2517
|
+
var _tmpl$11 = /* @__PURE__ */ template(`<div>`);
|
|
2518
|
+
function Slot(props) {
|
|
2519
|
+
return (() => {
|
|
2520
|
+
const _el$ = _tmpl$11();
|
|
2521
|
+
_el$.style.setProperty("pointer-events", "auto");
|
|
2522
|
+
spread(_el$, mergeProps(() => !props.builderContext.context?.symbolId && {
|
|
2523
|
+
"builder-slot": props.name
|
|
2524
|
+
}), false, true);
|
|
2525
|
+
insert(_el$, createComponent(blocks_default, {
|
|
2526
|
+
get parent() {
|
|
2527
|
+
return props.builderContext.context?.symbolId;
|
|
2528
|
+
},
|
|
2529
|
+
get path() {
|
|
2530
|
+
return `symbol.data.${props.name}`;
|
|
2531
|
+
},
|
|
2532
|
+
get context() {
|
|
2533
|
+
return props.builderContext;
|
|
2534
|
+
},
|
|
2535
|
+
get blocks() {
|
|
2536
|
+
return props.builderContext.rootState?.[props.name];
|
|
2537
|
+
}
|
|
2538
|
+
}));
|
|
2539
|
+
return _el$;
|
|
2540
|
+
})();
|
|
2541
|
+
}
|
|
2542
|
+
var slot_default = Slot;
|
|
2543
|
+
|
|
2544
|
+
// src/blocks/symbol/component-info.ts
|
|
2545
|
+
var componentInfo10 = {
|
|
2504
2546
|
name: "Symbol",
|
|
2505
2547
|
noWrap: true,
|
|
2506
2548
|
static: true,
|
|
@@ -2536,7 +2578,7 @@ var componentInfo9 = {
|
|
|
2536
2578
|
};
|
|
2537
2579
|
|
|
2538
2580
|
// src/blocks/text/component-info.ts
|
|
2539
|
-
var
|
|
2581
|
+
var componentInfo11 = {
|
|
2540
2582
|
name: "Text",
|
|
2541
2583
|
static: true,
|
|
2542
2584
|
isRSC: true,
|
|
@@ -2555,10 +2597,10 @@ var componentInfo10 = {
|
|
|
2555
2597
|
textAlign: "center"
|
|
2556
2598
|
}
|
|
2557
2599
|
};
|
|
2558
|
-
var _tmpl$
|
|
2600
|
+
var _tmpl$12 = /* @__PURE__ */ template(`<div class=builder-text>`);
|
|
2559
2601
|
function Text(props) {
|
|
2560
2602
|
return (() => {
|
|
2561
|
-
const _el$ = _tmpl$
|
|
2603
|
+
const _el$ = _tmpl$12();
|
|
2562
2604
|
_el$.style.setProperty("outline", "none");
|
|
2563
2605
|
effect(() => _el$.innerHTML = props.text?.toString() || "");
|
|
2564
2606
|
return _el$;
|
|
@@ -2567,7 +2609,7 @@ function Text(props) {
|
|
|
2567
2609
|
var text_default = Text;
|
|
2568
2610
|
|
|
2569
2611
|
// src/blocks/video/component-info.ts
|
|
2570
|
-
var
|
|
2612
|
+
var componentInfo12 = {
|
|
2571
2613
|
name: "Video",
|
|
2572
2614
|
canHaveChildren: true,
|
|
2573
2615
|
defaultStyles: {
|
|
@@ -2649,7 +2691,7 @@ var componentInfo11 = {
|
|
|
2649
2691
|
advanced: true
|
|
2650
2692
|
}]
|
|
2651
2693
|
};
|
|
2652
|
-
var _tmpl$
|
|
2694
|
+
var _tmpl$13 = /* @__PURE__ */ template(`<source type=video/mp4>`);
|
|
2653
2695
|
var _tmpl$23 = /* @__PURE__ */ template(`<div>`);
|
|
2654
2696
|
var _tmpl$33 = /* @__PURE__ */ template(`<div><video class=builder-video>`);
|
|
2655
2697
|
function Video(props) {
|
|
@@ -2712,7 +2754,7 @@ function Video(props) {
|
|
|
2712
2754
|
return !props.lazyLoad;
|
|
2713
2755
|
},
|
|
2714
2756
|
get children() {
|
|
2715
|
-
const _el$3 = _tmpl$
|
|
2757
|
+
const _el$3 = _tmpl$13();
|
|
2716
2758
|
effect(() => setAttribute(_el$3, "src", props.video));
|
|
2717
2759
|
return _el$3;
|
|
2718
2760
|
}
|
|
@@ -2794,13 +2836,16 @@ var getDefaultRegisteredComponents = () => [{
|
|
|
2794
2836
|
...componentInfo8
|
|
2795
2837
|
}, {
|
|
2796
2838
|
component: symbol_default,
|
|
2797
|
-
...
|
|
2839
|
+
...componentInfo10
|
|
2798
2840
|
}, {
|
|
2799
2841
|
component: text_default,
|
|
2800
|
-
...
|
|
2842
|
+
...componentInfo11
|
|
2801
2843
|
}, {
|
|
2802
2844
|
component: video_default,
|
|
2803
|
-
...
|
|
2845
|
+
...componentInfo12
|
|
2846
|
+
}, {
|
|
2847
|
+
component: slot_default,
|
|
2848
|
+
...componentInfo9
|
|
2804
2849
|
}];
|
|
2805
2850
|
|
|
2806
2851
|
// src/functions/register-component.ts
|
|
@@ -2871,10 +2916,10 @@ var getUpdateVariantVisibilityScript = ({
|
|
|
2871
2916
|
}) => `window.${UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME}(
|
|
2872
2917
|
"${variationId}", "${contentId}", ${isHydrationTarget}
|
|
2873
2918
|
)`;
|
|
2874
|
-
var _tmpl$
|
|
2919
|
+
var _tmpl$14 = /* @__PURE__ */ template(`<script>`);
|
|
2875
2920
|
function InlinedScript(props) {
|
|
2876
2921
|
return (() => {
|
|
2877
|
-
const _el$ = _tmpl$
|
|
2922
|
+
const _el$ = _tmpl$14();
|
|
2878
2923
|
effect((_p$) => {
|
|
2879
2924
|
const _v$ = props.scriptStr, _v$2 = props.id || "";
|
|
2880
2925
|
_v$ !== _p$._v$ && (_el$.innerHTML = _p$._v$ = _v$);
|
|
@@ -3374,7 +3419,7 @@ var getInteractionPropertiesForEvent = (event) => {
|
|
|
3374
3419
|
};
|
|
3375
3420
|
|
|
3376
3421
|
// src/constants/sdk-version.ts
|
|
3377
|
-
var SDK_VERSION = "0.12.
|
|
3422
|
+
var SDK_VERSION = "0.12.1";
|
|
3378
3423
|
|
|
3379
3424
|
// src/functions/register.ts
|
|
3380
3425
|
var registry = {};
|
|
@@ -4291,7 +4336,7 @@ var fetchSymbolContent = async ({
|
|
|
4291
4336
|
};
|
|
4292
4337
|
|
|
4293
4338
|
// src/blocks/symbol/symbol.tsx
|
|
4294
|
-
var _tmpl$
|
|
4339
|
+
var _tmpl$15 = /* @__PURE__ */ template(`<div>`);
|
|
4295
4340
|
function Symbol(props) {
|
|
4296
4341
|
const [contentToUse, setContentToUse] = createSignal(props.symbol?.content);
|
|
4297
4342
|
function className() {
|
|
@@ -4317,7 +4362,7 @@ function Symbol(props) {
|
|
|
4317
4362
|
}
|
|
4318
4363
|
createEffect(on(() => [props.symbol], onUpdateFn_0));
|
|
4319
4364
|
return (() => {
|
|
4320
|
-
const _el$ = _tmpl$
|
|
4365
|
+
const _el$ = _tmpl$15();
|
|
4321
4366
|
spread(_el$, mergeProps({
|
|
4322
4367
|
get ["class"]() {
|
|
4323
4368
|
return className();
|
|
@@ -4332,7 +4377,10 @@ function Symbol(props) {
|
|
|
4332
4377
|
return props.builderContext.apiKey;
|
|
4333
4378
|
},
|
|
4334
4379
|
get context() {
|
|
4335
|
-
return
|
|
4380
|
+
return {
|
|
4381
|
+
...props.builderContext.context,
|
|
4382
|
+
symbolId: props.builderBlock?.id
|
|
4383
|
+
};
|
|
4336
4384
|
},
|
|
4337
4385
|
get customComponents() {
|
|
4338
4386
|
return Object.values(props.builderComponents);
|
package/lib/node/dev.jsx
CHANGED
|
@@ -2224,8 +2224,42 @@ var componentInfo8 = {
|
|
|
2224
2224
|
}]
|
|
2225
2225
|
};
|
|
2226
2226
|
|
|
2227
|
-
// src/blocks/
|
|
2227
|
+
// src/blocks/slot/component-info.ts
|
|
2228
2228
|
var componentInfo9 = {
|
|
2229
|
+
name: "Slot",
|
|
2230
|
+
isRSC: true,
|
|
2231
|
+
description: "Allow child blocks to be inserted into this content when used as a Symbol",
|
|
2232
|
+
docsLink: "https://www.builder.io/c/docs/symbols-with-blocks",
|
|
2233
|
+
image: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F3aad6de36eae43b59b52c85190fdef56",
|
|
2234
|
+
// Maybe wrap this for canHaveChildren so bind children to this hm
|
|
2235
|
+
inputs: [{
|
|
2236
|
+
name: "name",
|
|
2237
|
+
type: "string",
|
|
2238
|
+
required: true,
|
|
2239
|
+
defaultValue: "children"
|
|
2240
|
+
}]
|
|
2241
|
+
};
|
|
2242
|
+
|
|
2243
|
+
// src/blocks/slot/slot.tsx
|
|
2244
|
+
function Slot(props) {
|
|
2245
|
+
return <div
|
|
2246
|
+
style={{
|
|
2247
|
+
"pointer-events": "auto"
|
|
2248
|
+
}}
|
|
2249
|
+
{...!props.builderContext.context?.symbolId && {
|
|
2250
|
+
"builder-slot": props.name
|
|
2251
|
+
}}
|
|
2252
|
+
><Blocks_default
|
|
2253
|
+
parent={props.builderContext.context?.symbolId}
|
|
2254
|
+
path={`symbol.data.${props.name}`}
|
|
2255
|
+
context={props.builderContext}
|
|
2256
|
+
blocks={props.builderContext.rootState?.[props.name]}
|
|
2257
|
+
/></div>;
|
|
2258
|
+
}
|
|
2259
|
+
var slot_default = Slot;
|
|
2260
|
+
|
|
2261
|
+
// src/blocks/symbol/component-info.ts
|
|
2262
|
+
var componentInfo10 = {
|
|
2229
2263
|
name: "Symbol",
|
|
2230
2264
|
noWrap: true,
|
|
2231
2265
|
static: true,
|
|
@@ -2261,7 +2295,7 @@ var componentInfo9 = {
|
|
|
2261
2295
|
};
|
|
2262
2296
|
|
|
2263
2297
|
// src/blocks/text/component-info.ts
|
|
2264
|
-
var
|
|
2298
|
+
var componentInfo11 = {
|
|
2265
2299
|
name: "Text",
|
|
2266
2300
|
static: true,
|
|
2267
2301
|
isRSC: true,
|
|
@@ -2294,7 +2328,7 @@ function Text(props) {
|
|
|
2294
2328
|
var text_default = Text;
|
|
2295
2329
|
|
|
2296
2330
|
// src/blocks/video/component-info.ts
|
|
2297
|
-
var
|
|
2331
|
+
var componentInfo12 = {
|
|
2298
2332
|
name: "Video",
|
|
2299
2333
|
canHaveChildren: true,
|
|
2300
2334
|
defaultStyles: {
|
|
@@ -2491,13 +2525,16 @@ var getDefaultRegisteredComponents = () => [{
|
|
|
2491
2525
|
...componentInfo8
|
|
2492
2526
|
}, {
|
|
2493
2527
|
component: symbol_default,
|
|
2494
|
-
...
|
|
2528
|
+
...componentInfo10
|
|
2495
2529
|
}, {
|
|
2496
2530
|
component: text_default,
|
|
2497
|
-
...
|
|
2531
|
+
...componentInfo11
|
|
2498
2532
|
}, {
|
|
2499
2533
|
component: video_default,
|
|
2500
|
-
...
|
|
2534
|
+
...componentInfo12
|
|
2535
|
+
}, {
|
|
2536
|
+
component: slot_default,
|
|
2537
|
+
...componentInfo9
|
|
2501
2538
|
}];
|
|
2502
2539
|
|
|
2503
2540
|
// src/functions/register-component.ts
|
|
@@ -3064,7 +3101,7 @@ var getInteractionPropertiesForEvent = (event) => {
|
|
|
3064
3101
|
};
|
|
3065
3102
|
|
|
3066
3103
|
// src/constants/sdk-version.ts
|
|
3067
|
-
var SDK_VERSION = "0.12.
|
|
3104
|
+
var SDK_VERSION = "0.12.1";
|
|
3068
3105
|
|
|
3069
3106
|
// src/functions/register.ts
|
|
3070
3107
|
var registry = {};
|
|
@@ -3878,7 +3915,10 @@ function Symbol(props) {
|
|
|
3878
3915
|
__isNestedRender={true}
|
|
3879
3916
|
apiVersion={props.builderContext.apiVersion}
|
|
3880
3917
|
apiKey={props.builderContext.apiKey}
|
|
3881
|
-
context={
|
|
3918
|
+
context={{
|
|
3919
|
+
...props.builderContext.context,
|
|
3920
|
+
symbolId: props.builderBlock?.id
|
|
3921
|
+
}}
|
|
3882
3922
|
customComponents={Object.values(props.builderComponents)}
|
|
3883
3923
|
data={{
|
|
3884
3924
|
...props.symbol?.data,
|
package/lib/node/index.js
CHANGED
|
@@ -2489,8 +2489,50 @@ var componentInfo8 = {
|
|
|
2489
2489
|
}]
|
|
2490
2490
|
};
|
|
2491
2491
|
|
|
2492
|
-
// src/blocks/
|
|
2492
|
+
// src/blocks/slot/component-info.ts
|
|
2493
2493
|
var componentInfo9 = {
|
|
2494
|
+
name: "Slot",
|
|
2495
|
+
isRSC: true,
|
|
2496
|
+
description: "Allow child blocks to be inserted into this content when used as a Symbol",
|
|
2497
|
+
docsLink: "https://www.builder.io/c/docs/symbols-with-blocks",
|
|
2498
|
+
image: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F3aad6de36eae43b59b52c85190fdef56",
|
|
2499
|
+
// Maybe wrap this for canHaveChildren so bind children to this hm
|
|
2500
|
+
inputs: [{
|
|
2501
|
+
name: "name",
|
|
2502
|
+
type: "string",
|
|
2503
|
+
required: true,
|
|
2504
|
+
defaultValue: "children"
|
|
2505
|
+
}]
|
|
2506
|
+
};
|
|
2507
|
+
var _tmpl$11 = /* @__PURE__ */ template(`<div>`);
|
|
2508
|
+
function Slot(props) {
|
|
2509
|
+
return (() => {
|
|
2510
|
+
const _el$ = _tmpl$11();
|
|
2511
|
+
_el$.style.setProperty("pointer-events", "auto");
|
|
2512
|
+
spread(_el$, mergeProps(() => !props.builderContext.context?.symbolId && {
|
|
2513
|
+
"builder-slot": props.name
|
|
2514
|
+
}), false, true);
|
|
2515
|
+
insert(_el$, createComponent(blocks_default, {
|
|
2516
|
+
get parent() {
|
|
2517
|
+
return props.builderContext.context?.symbolId;
|
|
2518
|
+
},
|
|
2519
|
+
get path() {
|
|
2520
|
+
return `symbol.data.${props.name}`;
|
|
2521
|
+
},
|
|
2522
|
+
get context() {
|
|
2523
|
+
return props.builderContext;
|
|
2524
|
+
},
|
|
2525
|
+
get blocks() {
|
|
2526
|
+
return props.builderContext.rootState?.[props.name];
|
|
2527
|
+
}
|
|
2528
|
+
}));
|
|
2529
|
+
return _el$;
|
|
2530
|
+
})();
|
|
2531
|
+
}
|
|
2532
|
+
var slot_default = Slot;
|
|
2533
|
+
|
|
2534
|
+
// src/blocks/symbol/component-info.ts
|
|
2535
|
+
var componentInfo10 = {
|
|
2494
2536
|
name: "Symbol",
|
|
2495
2537
|
noWrap: true,
|
|
2496
2538
|
static: true,
|
|
@@ -2526,7 +2568,7 @@ var componentInfo9 = {
|
|
|
2526
2568
|
};
|
|
2527
2569
|
|
|
2528
2570
|
// src/blocks/text/component-info.ts
|
|
2529
|
-
var
|
|
2571
|
+
var componentInfo11 = {
|
|
2530
2572
|
name: "Text",
|
|
2531
2573
|
static: true,
|
|
2532
2574
|
isRSC: true,
|
|
@@ -2545,10 +2587,10 @@ var componentInfo10 = {
|
|
|
2545
2587
|
textAlign: "center"
|
|
2546
2588
|
}
|
|
2547
2589
|
};
|
|
2548
|
-
var _tmpl$
|
|
2590
|
+
var _tmpl$12 = /* @__PURE__ */ template(`<div class=builder-text>`);
|
|
2549
2591
|
function Text(props) {
|
|
2550
2592
|
return (() => {
|
|
2551
|
-
const _el$ = _tmpl$
|
|
2593
|
+
const _el$ = _tmpl$12();
|
|
2552
2594
|
_el$.style.setProperty("outline", "none");
|
|
2553
2595
|
effect(() => _el$.innerHTML = props.text?.toString() || "");
|
|
2554
2596
|
return _el$;
|
|
@@ -2557,7 +2599,7 @@ function Text(props) {
|
|
|
2557
2599
|
var text_default = Text;
|
|
2558
2600
|
|
|
2559
2601
|
// src/blocks/video/component-info.ts
|
|
2560
|
-
var
|
|
2602
|
+
var componentInfo12 = {
|
|
2561
2603
|
name: "Video",
|
|
2562
2604
|
canHaveChildren: true,
|
|
2563
2605
|
defaultStyles: {
|
|
@@ -2639,7 +2681,7 @@ var componentInfo11 = {
|
|
|
2639
2681
|
advanced: true
|
|
2640
2682
|
}]
|
|
2641
2683
|
};
|
|
2642
|
-
var _tmpl$
|
|
2684
|
+
var _tmpl$13 = /* @__PURE__ */ template(`<source type=video/mp4>`);
|
|
2643
2685
|
var _tmpl$23 = /* @__PURE__ */ template(`<div>`);
|
|
2644
2686
|
var _tmpl$33 = /* @__PURE__ */ template(`<div><video class=builder-video>`);
|
|
2645
2687
|
function Video(props) {
|
|
@@ -2702,7 +2744,7 @@ function Video(props) {
|
|
|
2702
2744
|
return !props.lazyLoad;
|
|
2703
2745
|
},
|
|
2704
2746
|
get children() {
|
|
2705
|
-
const _el$3 = _tmpl$
|
|
2747
|
+
const _el$3 = _tmpl$13();
|
|
2706
2748
|
effect(() => setAttribute(_el$3, "src", props.video));
|
|
2707
2749
|
return _el$3;
|
|
2708
2750
|
}
|
|
@@ -2784,13 +2826,16 @@ var getDefaultRegisteredComponents = () => [{
|
|
|
2784
2826
|
...componentInfo8
|
|
2785
2827
|
}, {
|
|
2786
2828
|
component: symbol_default,
|
|
2787
|
-
...
|
|
2829
|
+
...componentInfo10
|
|
2788
2830
|
}, {
|
|
2789
2831
|
component: text_default,
|
|
2790
|
-
...
|
|
2832
|
+
...componentInfo11
|
|
2791
2833
|
}, {
|
|
2792
2834
|
component: video_default,
|
|
2793
|
-
...
|
|
2835
|
+
...componentInfo12
|
|
2836
|
+
}, {
|
|
2837
|
+
component: slot_default,
|
|
2838
|
+
...componentInfo9
|
|
2794
2839
|
}];
|
|
2795
2840
|
|
|
2796
2841
|
// src/functions/register-component.ts
|
|
@@ -2861,10 +2906,10 @@ var getUpdateVariantVisibilityScript = ({
|
|
|
2861
2906
|
}) => `window.${UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME}(
|
|
2862
2907
|
"${variationId}", "${contentId}", ${isHydrationTarget}
|
|
2863
2908
|
)`;
|
|
2864
|
-
var _tmpl$
|
|
2909
|
+
var _tmpl$14 = /* @__PURE__ */ template(`<script>`);
|
|
2865
2910
|
function InlinedScript(props) {
|
|
2866
2911
|
return (() => {
|
|
2867
|
-
const _el$ = _tmpl$
|
|
2912
|
+
const _el$ = _tmpl$14();
|
|
2868
2913
|
effect((_p$) => {
|
|
2869
2914
|
const _v$ = props.scriptStr, _v$2 = props.id || "";
|
|
2870
2915
|
_v$ !== _p$._v$ && (_el$.innerHTML = _p$._v$ = _v$);
|
|
@@ -3359,7 +3404,7 @@ var getInteractionPropertiesForEvent = (event) => {
|
|
|
3359
3404
|
};
|
|
3360
3405
|
|
|
3361
3406
|
// src/constants/sdk-version.ts
|
|
3362
|
-
var SDK_VERSION = "0.12.
|
|
3407
|
+
var SDK_VERSION = "0.12.1";
|
|
3363
3408
|
|
|
3364
3409
|
// src/functions/register.ts
|
|
3365
3410
|
var registry = {};
|
|
@@ -4274,7 +4319,7 @@ var fetchSymbolContent = async ({
|
|
|
4274
4319
|
};
|
|
4275
4320
|
|
|
4276
4321
|
// src/blocks/symbol/symbol.tsx
|
|
4277
|
-
var _tmpl$
|
|
4322
|
+
var _tmpl$15 = /* @__PURE__ */ template(`<div>`);
|
|
4278
4323
|
function Symbol(props) {
|
|
4279
4324
|
const [contentToUse, setContentToUse] = createSignal(props.symbol?.content);
|
|
4280
4325
|
function className() {
|
|
@@ -4300,7 +4345,7 @@ function Symbol(props) {
|
|
|
4300
4345
|
}
|
|
4301
4346
|
createEffect(on(() => [props.symbol], onUpdateFn_0));
|
|
4302
4347
|
return (() => {
|
|
4303
|
-
const _el$ = _tmpl$
|
|
4348
|
+
const _el$ = _tmpl$15();
|
|
4304
4349
|
spread(_el$, mergeProps({
|
|
4305
4350
|
get ["class"]() {
|
|
4306
4351
|
return className();
|
|
@@ -4315,7 +4360,10 @@ function Symbol(props) {
|
|
|
4315
4360
|
return props.builderContext.apiKey;
|
|
4316
4361
|
},
|
|
4317
4362
|
get context() {
|
|
4318
|
-
return
|
|
4363
|
+
return {
|
|
4364
|
+
...props.builderContext.context,
|
|
4365
|
+
symbolId: props.builderBlock?.id
|
|
4366
|
+
};
|
|
4319
4367
|
},
|
|
4320
4368
|
get customComponents() {
|
|
4321
4369
|
return Object.values(props.builderComponents);
|
package/lib/node/index.jsx
CHANGED
|
@@ -2214,8 +2214,42 @@ var componentInfo8 = {
|
|
|
2214
2214
|
}]
|
|
2215
2215
|
};
|
|
2216
2216
|
|
|
2217
|
-
// src/blocks/
|
|
2217
|
+
// src/blocks/slot/component-info.ts
|
|
2218
2218
|
var componentInfo9 = {
|
|
2219
|
+
name: "Slot",
|
|
2220
|
+
isRSC: true,
|
|
2221
|
+
description: "Allow child blocks to be inserted into this content when used as a Symbol",
|
|
2222
|
+
docsLink: "https://www.builder.io/c/docs/symbols-with-blocks",
|
|
2223
|
+
image: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F3aad6de36eae43b59b52c85190fdef56",
|
|
2224
|
+
// Maybe wrap this for canHaveChildren so bind children to this hm
|
|
2225
|
+
inputs: [{
|
|
2226
|
+
name: "name",
|
|
2227
|
+
type: "string",
|
|
2228
|
+
required: true,
|
|
2229
|
+
defaultValue: "children"
|
|
2230
|
+
}]
|
|
2231
|
+
};
|
|
2232
|
+
|
|
2233
|
+
// src/blocks/slot/slot.tsx
|
|
2234
|
+
function Slot(props) {
|
|
2235
|
+
return <div
|
|
2236
|
+
style={{
|
|
2237
|
+
"pointer-events": "auto"
|
|
2238
|
+
}}
|
|
2239
|
+
{...!props.builderContext.context?.symbolId && {
|
|
2240
|
+
"builder-slot": props.name
|
|
2241
|
+
}}
|
|
2242
|
+
><Blocks_default
|
|
2243
|
+
parent={props.builderContext.context?.symbolId}
|
|
2244
|
+
path={`symbol.data.${props.name}`}
|
|
2245
|
+
context={props.builderContext}
|
|
2246
|
+
blocks={props.builderContext.rootState?.[props.name]}
|
|
2247
|
+
/></div>;
|
|
2248
|
+
}
|
|
2249
|
+
var slot_default = Slot;
|
|
2250
|
+
|
|
2251
|
+
// src/blocks/symbol/component-info.ts
|
|
2252
|
+
var componentInfo10 = {
|
|
2219
2253
|
name: "Symbol",
|
|
2220
2254
|
noWrap: true,
|
|
2221
2255
|
static: true,
|
|
@@ -2251,7 +2285,7 @@ var componentInfo9 = {
|
|
|
2251
2285
|
};
|
|
2252
2286
|
|
|
2253
2287
|
// src/blocks/text/component-info.ts
|
|
2254
|
-
var
|
|
2288
|
+
var componentInfo11 = {
|
|
2255
2289
|
name: "Text",
|
|
2256
2290
|
static: true,
|
|
2257
2291
|
isRSC: true,
|
|
@@ -2284,7 +2318,7 @@ function Text(props) {
|
|
|
2284
2318
|
var text_default = Text;
|
|
2285
2319
|
|
|
2286
2320
|
// src/blocks/video/component-info.ts
|
|
2287
|
-
var
|
|
2321
|
+
var componentInfo12 = {
|
|
2288
2322
|
name: "Video",
|
|
2289
2323
|
canHaveChildren: true,
|
|
2290
2324
|
defaultStyles: {
|
|
@@ -2481,13 +2515,16 @@ var getDefaultRegisteredComponents = () => [{
|
|
|
2481
2515
|
...componentInfo8
|
|
2482
2516
|
}, {
|
|
2483
2517
|
component: symbol_default,
|
|
2484
|
-
...
|
|
2518
|
+
...componentInfo10
|
|
2485
2519
|
}, {
|
|
2486
2520
|
component: text_default,
|
|
2487
|
-
...
|
|
2521
|
+
...componentInfo11
|
|
2488
2522
|
}, {
|
|
2489
2523
|
component: video_default,
|
|
2490
|
-
...
|
|
2524
|
+
...componentInfo12
|
|
2525
|
+
}, {
|
|
2526
|
+
component: slot_default,
|
|
2527
|
+
...componentInfo9
|
|
2491
2528
|
}];
|
|
2492
2529
|
|
|
2493
2530
|
// src/functions/register-component.ts
|
|
@@ -3049,7 +3086,7 @@ var getInteractionPropertiesForEvent = (event) => {
|
|
|
3049
3086
|
};
|
|
3050
3087
|
|
|
3051
3088
|
// src/constants/sdk-version.ts
|
|
3052
|
-
var SDK_VERSION = "0.12.
|
|
3089
|
+
var SDK_VERSION = "0.12.1";
|
|
3053
3090
|
|
|
3054
3091
|
// src/functions/register.ts
|
|
3055
3092
|
var registry = {};
|
|
@@ -3861,7 +3898,10 @@ function Symbol(props) {
|
|
|
3861
3898
|
__isNestedRender={true}
|
|
3862
3899
|
apiVersion={props.builderContext.apiVersion}
|
|
3863
3900
|
apiKey={props.builderContext.apiKey}
|
|
3864
|
-
context={
|
|
3901
|
+
context={{
|
|
3902
|
+
...props.builderContext.context,
|
|
3903
|
+
symbolId: props.builderBlock?.id
|
|
3904
|
+
}}
|
|
3865
3905
|
customComponents={Object.values(props.builderComponents)}
|
|
3866
3906
|
data={{
|
|
3867
3907
|
...props.symbol?.data,
|