@builder.io/sdk-solid 0.11.5 → 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/browser/dev.js
CHANGED
|
@@ -2375,8 +2375,50 @@ var componentInfo8 = {
|
|
|
2375
2375
|
}]
|
|
2376
2376
|
};
|
|
2377
2377
|
|
|
2378
|
-
// src/blocks/
|
|
2378
|
+
// src/blocks/slot/component-info.ts
|
|
2379
2379
|
var componentInfo9 = {
|
|
2380
|
+
name: "Slot",
|
|
2381
|
+
isRSC: true,
|
|
2382
|
+
description: "Allow child blocks to be inserted into this content when used as a Symbol",
|
|
2383
|
+
docsLink: "https://www.builder.io/c/docs/symbols-with-blocks",
|
|
2384
|
+
image: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F3aad6de36eae43b59b52c85190fdef56",
|
|
2385
|
+
// Maybe wrap this for canHaveChildren so bind children to this hm
|
|
2386
|
+
inputs: [{
|
|
2387
|
+
name: "name",
|
|
2388
|
+
type: "string",
|
|
2389
|
+
required: true,
|
|
2390
|
+
defaultValue: "children"
|
|
2391
|
+
}]
|
|
2392
|
+
};
|
|
2393
|
+
var _tmpl$11 = /* @__PURE__ */ template(`<div>`);
|
|
2394
|
+
function Slot(props) {
|
|
2395
|
+
return (() => {
|
|
2396
|
+
const _el$ = _tmpl$11();
|
|
2397
|
+
_el$.style.setProperty("pointer-events", "auto");
|
|
2398
|
+
spread(_el$, mergeProps(() => !props.builderContext.context?.symbolId && {
|
|
2399
|
+
"builder-slot": props.name
|
|
2400
|
+
}), false, true);
|
|
2401
|
+
insert(_el$, createComponent(blocks_default, {
|
|
2402
|
+
get parent() {
|
|
2403
|
+
return props.builderContext.context?.symbolId;
|
|
2404
|
+
},
|
|
2405
|
+
get path() {
|
|
2406
|
+
return `symbol.data.${props.name}`;
|
|
2407
|
+
},
|
|
2408
|
+
get context() {
|
|
2409
|
+
return props.builderContext;
|
|
2410
|
+
},
|
|
2411
|
+
get blocks() {
|
|
2412
|
+
return props.builderContext.rootState?.[props.name];
|
|
2413
|
+
}
|
|
2414
|
+
}));
|
|
2415
|
+
return _el$;
|
|
2416
|
+
})();
|
|
2417
|
+
}
|
|
2418
|
+
var slot_default = Slot;
|
|
2419
|
+
|
|
2420
|
+
// src/blocks/symbol/component-info.ts
|
|
2421
|
+
var componentInfo10 = {
|
|
2380
2422
|
name: "Symbol",
|
|
2381
2423
|
noWrap: true,
|
|
2382
2424
|
static: true,
|
|
@@ -2412,7 +2454,7 @@ var componentInfo9 = {
|
|
|
2412
2454
|
};
|
|
2413
2455
|
|
|
2414
2456
|
// src/blocks/text/component-info.ts
|
|
2415
|
-
var
|
|
2457
|
+
var componentInfo11 = {
|
|
2416
2458
|
name: "Text",
|
|
2417
2459
|
static: true,
|
|
2418
2460
|
isRSC: true,
|
|
@@ -2431,10 +2473,10 @@ var componentInfo10 = {
|
|
|
2431
2473
|
textAlign: "center"
|
|
2432
2474
|
}
|
|
2433
2475
|
};
|
|
2434
|
-
var _tmpl$
|
|
2476
|
+
var _tmpl$12 = /* @__PURE__ */ template(`<div class=builder-text>`);
|
|
2435
2477
|
function Text(props) {
|
|
2436
2478
|
return (() => {
|
|
2437
|
-
const _el$ = _tmpl$
|
|
2479
|
+
const _el$ = _tmpl$12();
|
|
2438
2480
|
_el$.style.setProperty("outline", "none");
|
|
2439
2481
|
effect(() => _el$.innerHTML = props.text?.toString() || "");
|
|
2440
2482
|
return _el$;
|
|
@@ -2443,7 +2485,7 @@ function Text(props) {
|
|
|
2443
2485
|
var text_default = Text;
|
|
2444
2486
|
|
|
2445
2487
|
// src/blocks/video/component-info.ts
|
|
2446
|
-
var
|
|
2488
|
+
var componentInfo12 = {
|
|
2447
2489
|
name: "Video",
|
|
2448
2490
|
canHaveChildren: true,
|
|
2449
2491
|
defaultStyles: {
|
|
@@ -2525,7 +2567,7 @@ var componentInfo11 = {
|
|
|
2525
2567
|
advanced: true
|
|
2526
2568
|
}]
|
|
2527
2569
|
};
|
|
2528
|
-
var _tmpl$
|
|
2570
|
+
var _tmpl$13 = /* @__PURE__ */ template(`<source type=video/mp4>`);
|
|
2529
2571
|
var _tmpl$23 = /* @__PURE__ */ template(`<div>`);
|
|
2530
2572
|
var _tmpl$33 = /* @__PURE__ */ template(`<div><video class=builder-video>`);
|
|
2531
2573
|
function Video(props) {
|
|
@@ -2588,7 +2630,7 @@ function Video(props) {
|
|
|
2588
2630
|
return !props.lazyLoad;
|
|
2589
2631
|
},
|
|
2590
2632
|
get children() {
|
|
2591
|
-
const _el$3 = _tmpl$
|
|
2633
|
+
const _el$3 = _tmpl$13();
|
|
2592
2634
|
effect(() => setAttribute(_el$3, "src", props.video));
|
|
2593
2635
|
return _el$3;
|
|
2594
2636
|
}
|
|
@@ -2670,13 +2712,16 @@ var getDefaultRegisteredComponents = () => [{
|
|
|
2670
2712
|
...componentInfo8
|
|
2671
2713
|
}, {
|
|
2672
2714
|
component: symbol_default,
|
|
2673
|
-
...
|
|
2715
|
+
...componentInfo10
|
|
2674
2716
|
}, {
|
|
2675
2717
|
component: text_default,
|
|
2676
|
-
...
|
|
2718
|
+
...componentInfo11
|
|
2677
2719
|
}, {
|
|
2678
2720
|
component: video_default,
|
|
2679
|
-
...
|
|
2721
|
+
...componentInfo12
|
|
2722
|
+
}, {
|
|
2723
|
+
component: slot_default,
|
|
2724
|
+
...componentInfo9
|
|
2680
2725
|
}];
|
|
2681
2726
|
|
|
2682
2727
|
// src/functions/register-component.ts
|
|
@@ -2747,10 +2792,10 @@ var getUpdateVariantVisibilityScript = ({
|
|
|
2747
2792
|
}) => `window.${UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME}(
|
|
2748
2793
|
"${variationId}", "${contentId}", ${isHydrationTarget}
|
|
2749
2794
|
)`;
|
|
2750
|
-
var _tmpl$
|
|
2795
|
+
var _tmpl$14 = /* @__PURE__ */ template(`<script>`);
|
|
2751
2796
|
function InlinedScript(props) {
|
|
2752
2797
|
return (() => {
|
|
2753
|
-
const _el$ = _tmpl$
|
|
2798
|
+
const _el$ = _tmpl$14();
|
|
2754
2799
|
effect((_p$) => {
|
|
2755
2800
|
const _v$ = props.scriptStr, _v$2 = props.id || "";
|
|
2756
2801
|
_v$ !== _p$._v$ && (_el$.innerHTML = _p$._v$ = _v$);
|
|
@@ -3250,7 +3295,7 @@ var getInteractionPropertiesForEvent = (event) => {
|
|
|
3250
3295
|
};
|
|
3251
3296
|
|
|
3252
3297
|
// src/constants/sdk-version.ts
|
|
3253
|
-
var SDK_VERSION = "0.
|
|
3298
|
+
var SDK_VERSION = "0.12.1";
|
|
3254
3299
|
|
|
3255
3300
|
// src/functions/register.ts
|
|
3256
3301
|
var registry = {};
|
|
@@ -4167,7 +4212,7 @@ var fetchSymbolContent = async ({
|
|
|
4167
4212
|
};
|
|
4168
4213
|
|
|
4169
4214
|
// src/blocks/symbol/symbol.tsx
|
|
4170
|
-
var _tmpl$
|
|
4215
|
+
var _tmpl$15 = /* @__PURE__ */ template(`<div>`);
|
|
4171
4216
|
function Symbol(props) {
|
|
4172
4217
|
const [contentToUse, setContentToUse] = createSignal(props.symbol?.content);
|
|
4173
4218
|
function className() {
|
|
@@ -4193,7 +4238,7 @@ function Symbol(props) {
|
|
|
4193
4238
|
}
|
|
4194
4239
|
createEffect(on(() => [props.symbol], onUpdateFn_0));
|
|
4195
4240
|
return (() => {
|
|
4196
|
-
const _el$ = _tmpl$
|
|
4241
|
+
const _el$ = _tmpl$15();
|
|
4197
4242
|
spread(_el$, mergeProps({
|
|
4198
4243
|
get ["class"]() {
|
|
4199
4244
|
return className();
|
|
@@ -4208,7 +4253,10 @@ function Symbol(props) {
|
|
|
4208
4253
|
return props.builderContext.apiKey;
|
|
4209
4254
|
},
|
|
4210
4255
|
get context() {
|
|
4211
|
-
return
|
|
4256
|
+
return {
|
|
4257
|
+
...props.builderContext.context,
|
|
4258
|
+
symbolId: props.builderBlock?.id
|
|
4259
|
+
};
|
|
4212
4260
|
},
|
|
4213
4261
|
get customComponents() {
|
|
4214
4262
|
return Object.values(props.builderComponents);
|
package/lib/browser/dev.jsx
CHANGED
|
@@ -2098,8 +2098,42 @@ var componentInfo8 = {
|
|
|
2098
2098
|
}]
|
|
2099
2099
|
};
|
|
2100
2100
|
|
|
2101
|
-
// src/blocks/
|
|
2101
|
+
// src/blocks/slot/component-info.ts
|
|
2102
2102
|
var componentInfo9 = {
|
|
2103
|
+
name: "Slot",
|
|
2104
|
+
isRSC: true,
|
|
2105
|
+
description: "Allow child blocks to be inserted into this content when used as a Symbol",
|
|
2106
|
+
docsLink: "https://www.builder.io/c/docs/symbols-with-blocks",
|
|
2107
|
+
image: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F3aad6de36eae43b59b52c85190fdef56",
|
|
2108
|
+
// Maybe wrap this for canHaveChildren so bind children to this hm
|
|
2109
|
+
inputs: [{
|
|
2110
|
+
name: "name",
|
|
2111
|
+
type: "string",
|
|
2112
|
+
required: true,
|
|
2113
|
+
defaultValue: "children"
|
|
2114
|
+
}]
|
|
2115
|
+
};
|
|
2116
|
+
|
|
2117
|
+
// src/blocks/slot/slot.tsx
|
|
2118
|
+
function Slot(props) {
|
|
2119
|
+
return <div
|
|
2120
|
+
style={{
|
|
2121
|
+
"pointer-events": "auto"
|
|
2122
|
+
}}
|
|
2123
|
+
{...!props.builderContext.context?.symbolId && {
|
|
2124
|
+
"builder-slot": props.name
|
|
2125
|
+
}}
|
|
2126
|
+
><Blocks_default
|
|
2127
|
+
parent={props.builderContext.context?.symbolId}
|
|
2128
|
+
path={`symbol.data.${props.name}`}
|
|
2129
|
+
context={props.builderContext}
|
|
2130
|
+
blocks={props.builderContext.rootState?.[props.name]}
|
|
2131
|
+
/></div>;
|
|
2132
|
+
}
|
|
2133
|
+
var slot_default = Slot;
|
|
2134
|
+
|
|
2135
|
+
// src/blocks/symbol/component-info.ts
|
|
2136
|
+
var componentInfo10 = {
|
|
2103
2137
|
name: "Symbol",
|
|
2104
2138
|
noWrap: true,
|
|
2105
2139
|
static: true,
|
|
@@ -2135,7 +2169,7 @@ var componentInfo9 = {
|
|
|
2135
2169
|
};
|
|
2136
2170
|
|
|
2137
2171
|
// src/blocks/text/component-info.ts
|
|
2138
|
-
var
|
|
2172
|
+
var componentInfo11 = {
|
|
2139
2173
|
name: "Text",
|
|
2140
2174
|
static: true,
|
|
2141
2175
|
isRSC: true,
|
|
@@ -2168,7 +2202,7 @@ function Text(props) {
|
|
|
2168
2202
|
var text_default = Text;
|
|
2169
2203
|
|
|
2170
2204
|
// src/blocks/video/component-info.ts
|
|
2171
|
-
var
|
|
2205
|
+
var componentInfo12 = {
|
|
2172
2206
|
name: "Video",
|
|
2173
2207
|
canHaveChildren: true,
|
|
2174
2208
|
defaultStyles: {
|
|
@@ -2365,13 +2399,16 @@ var getDefaultRegisteredComponents = () => [{
|
|
|
2365
2399
|
...componentInfo8
|
|
2366
2400
|
}, {
|
|
2367
2401
|
component: symbol_default,
|
|
2368
|
-
...
|
|
2402
|
+
...componentInfo10
|
|
2369
2403
|
}, {
|
|
2370
2404
|
component: text_default,
|
|
2371
|
-
...
|
|
2405
|
+
...componentInfo11
|
|
2372
2406
|
}, {
|
|
2373
2407
|
component: video_default,
|
|
2374
|
-
...
|
|
2408
|
+
...componentInfo12
|
|
2409
|
+
}, {
|
|
2410
|
+
component: slot_default,
|
|
2411
|
+
...componentInfo9
|
|
2375
2412
|
}];
|
|
2376
2413
|
|
|
2377
2414
|
// src/functions/register-component.ts
|
|
@@ -2938,7 +2975,7 @@ var getInteractionPropertiesForEvent = (event) => {
|
|
|
2938
2975
|
};
|
|
2939
2976
|
|
|
2940
2977
|
// src/constants/sdk-version.ts
|
|
2941
|
-
var SDK_VERSION = "0.
|
|
2978
|
+
var SDK_VERSION = "0.12.1";
|
|
2942
2979
|
|
|
2943
2980
|
// src/functions/register.ts
|
|
2944
2981
|
var registry = {};
|
|
@@ -3752,7 +3789,10 @@ function Symbol(props) {
|
|
|
3752
3789
|
__isNestedRender={true}
|
|
3753
3790
|
apiVersion={props.builderContext.apiVersion}
|
|
3754
3791
|
apiKey={props.builderContext.apiKey}
|
|
3755
|
-
context={
|
|
3792
|
+
context={{
|
|
3793
|
+
...props.builderContext.context,
|
|
3794
|
+
symbolId: props.builderBlock?.id
|
|
3795
|
+
}}
|
|
3756
3796
|
customComponents={Object.values(props.builderComponents)}
|
|
3757
3797
|
data={{
|
|
3758
3798
|
...props.symbol?.data,
|
package/lib/browser/index.js
CHANGED
|
@@ -2366,8 +2366,50 @@ var componentInfo8 = {
|
|
|
2366
2366
|
}]
|
|
2367
2367
|
};
|
|
2368
2368
|
|
|
2369
|
-
// src/blocks/
|
|
2369
|
+
// src/blocks/slot/component-info.ts
|
|
2370
2370
|
var componentInfo9 = {
|
|
2371
|
+
name: "Slot",
|
|
2372
|
+
isRSC: true,
|
|
2373
|
+
description: "Allow child blocks to be inserted into this content when used as a Symbol",
|
|
2374
|
+
docsLink: "https://www.builder.io/c/docs/symbols-with-blocks",
|
|
2375
|
+
image: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F3aad6de36eae43b59b52c85190fdef56",
|
|
2376
|
+
// Maybe wrap this for canHaveChildren so bind children to this hm
|
|
2377
|
+
inputs: [{
|
|
2378
|
+
name: "name",
|
|
2379
|
+
type: "string",
|
|
2380
|
+
required: true,
|
|
2381
|
+
defaultValue: "children"
|
|
2382
|
+
}]
|
|
2383
|
+
};
|
|
2384
|
+
var _tmpl$11 = /* @__PURE__ */ template(`<div>`);
|
|
2385
|
+
function Slot(props) {
|
|
2386
|
+
return (() => {
|
|
2387
|
+
const _el$ = _tmpl$11();
|
|
2388
|
+
_el$.style.setProperty("pointer-events", "auto");
|
|
2389
|
+
spread(_el$, mergeProps(() => !props.builderContext.context?.symbolId && {
|
|
2390
|
+
"builder-slot": props.name
|
|
2391
|
+
}), false, true);
|
|
2392
|
+
insert(_el$, createComponent(blocks_default, {
|
|
2393
|
+
get parent() {
|
|
2394
|
+
return props.builderContext.context?.symbolId;
|
|
2395
|
+
},
|
|
2396
|
+
get path() {
|
|
2397
|
+
return `symbol.data.${props.name}`;
|
|
2398
|
+
},
|
|
2399
|
+
get context() {
|
|
2400
|
+
return props.builderContext;
|
|
2401
|
+
},
|
|
2402
|
+
get blocks() {
|
|
2403
|
+
return props.builderContext.rootState?.[props.name];
|
|
2404
|
+
}
|
|
2405
|
+
}));
|
|
2406
|
+
return _el$;
|
|
2407
|
+
})();
|
|
2408
|
+
}
|
|
2409
|
+
var slot_default = Slot;
|
|
2410
|
+
|
|
2411
|
+
// src/blocks/symbol/component-info.ts
|
|
2412
|
+
var componentInfo10 = {
|
|
2371
2413
|
name: "Symbol",
|
|
2372
2414
|
noWrap: true,
|
|
2373
2415
|
static: true,
|
|
@@ -2403,7 +2445,7 @@ var componentInfo9 = {
|
|
|
2403
2445
|
};
|
|
2404
2446
|
|
|
2405
2447
|
// src/blocks/text/component-info.ts
|
|
2406
|
-
var
|
|
2448
|
+
var componentInfo11 = {
|
|
2407
2449
|
name: "Text",
|
|
2408
2450
|
static: true,
|
|
2409
2451
|
isRSC: true,
|
|
@@ -2422,10 +2464,10 @@ var componentInfo10 = {
|
|
|
2422
2464
|
textAlign: "center"
|
|
2423
2465
|
}
|
|
2424
2466
|
};
|
|
2425
|
-
var _tmpl$
|
|
2467
|
+
var _tmpl$12 = /* @__PURE__ */ template(`<div class=builder-text>`);
|
|
2426
2468
|
function Text(props) {
|
|
2427
2469
|
return (() => {
|
|
2428
|
-
const _el$ = _tmpl$
|
|
2470
|
+
const _el$ = _tmpl$12();
|
|
2429
2471
|
_el$.style.setProperty("outline", "none");
|
|
2430
2472
|
effect(() => _el$.innerHTML = props.text?.toString() || "");
|
|
2431
2473
|
return _el$;
|
|
@@ -2434,7 +2476,7 @@ function Text(props) {
|
|
|
2434
2476
|
var text_default = Text;
|
|
2435
2477
|
|
|
2436
2478
|
// src/blocks/video/component-info.ts
|
|
2437
|
-
var
|
|
2479
|
+
var componentInfo12 = {
|
|
2438
2480
|
name: "Video",
|
|
2439
2481
|
canHaveChildren: true,
|
|
2440
2482
|
defaultStyles: {
|
|
@@ -2516,7 +2558,7 @@ var componentInfo11 = {
|
|
|
2516
2558
|
advanced: true
|
|
2517
2559
|
}]
|
|
2518
2560
|
};
|
|
2519
|
-
var _tmpl$
|
|
2561
|
+
var _tmpl$13 = /* @__PURE__ */ template(`<source type=video/mp4>`);
|
|
2520
2562
|
var _tmpl$23 = /* @__PURE__ */ template(`<div>`);
|
|
2521
2563
|
var _tmpl$33 = /* @__PURE__ */ template(`<div><video class=builder-video>`);
|
|
2522
2564
|
function Video(props) {
|
|
@@ -2579,7 +2621,7 @@ function Video(props) {
|
|
|
2579
2621
|
return !props.lazyLoad;
|
|
2580
2622
|
},
|
|
2581
2623
|
get children() {
|
|
2582
|
-
const _el$3 = _tmpl$
|
|
2624
|
+
const _el$3 = _tmpl$13();
|
|
2583
2625
|
effect(() => setAttribute(_el$3, "src", props.video));
|
|
2584
2626
|
return _el$3;
|
|
2585
2627
|
}
|
|
@@ -2661,13 +2703,16 @@ var getDefaultRegisteredComponents = () => [{
|
|
|
2661
2703
|
...componentInfo8
|
|
2662
2704
|
}, {
|
|
2663
2705
|
component: symbol_default,
|
|
2664
|
-
...
|
|
2706
|
+
...componentInfo10
|
|
2665
2707
|
}, {
|
|
2666
2708
|
component: text_default,
|
|
2667
|
-
...
|
|
2709
|
+
...componentInfo11
|
|
2668
2710
|
}, {
|
|
2669
2711
|
component: video_default,
|
|
2670
|
-
...
|
|
2712
|
+
...componentInfo12
|
|
2713
|
+
}, {
|
|
2714
|
+
component: slot_default,
|
|
2715
|
+
...componentInfo9
|
|
2671
2716
|
}];
|
|
2672
2717
|
|
|
2673
2718
|
// src/functions/register-component.ts
|
|
@@ -2738,10 +2783,10 @@ var getUpdateVariantVisibilityScript = ({
|
|
|
2738
2783
|
}) => `window.${UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME}(
|
|
2739
2784
|
"${variationId}", "${contentId}", ${isHydrationTarget}
|
|
2740
2785
|
)`;
|
|
2741
|
-
var _tmpl$
|
|
2786
|
+
var _tmpl$14 = /* @__PURE__ */ template(`<script>`);
|
|
2742
2787
|
function InlinedScript(props) {
|
|
2743
2788
|
return (() => {
|
|
2744
|
-
const _el$ = _tmpl$
|
|
2789
|
+
const _el$ = _tmpl$14();
|
|
2745
2790
|
effect((_p$) => {
|
|
2746
2791
|
const _v$ = props.scriptStr, _v$2 = props.id || "";
|
|
2747
2792
|
_v$ !== _p$._v$ && (_el$.innerHTML = _p$._v$ = _v$);
|
|
@@ -3236,7 +3281,7 @@ var getInteractionPropertiesForEvent = (event) => {
|
|
|
3236
3281
|
};
|
|
3237
3282
|
|
|
3238
3283
|
// src/constants/sdk-version.ts
|
|
3239
|
-
var SDK_VERSION = "0.
|
|
3284
|
+
var SDK_VERSION = "0.12.1";
|
|
3240
3285
|
|
|
3241
3286
|
// src/functions/register.ts
|
|
3242
3287
|
var registry = {};
|
|
@@ -4151,7 +4196,7 @@ var fetchSymbolContent = async ({
|
|
|
4151
4196
|
};
|
|
4152
4197
|
|
|
4153
4198
|
// src/blocks/symbol/symbol.tsx
|
|
4154
|
-
var _tmpl$
|
|
4199
|
+
var _tmpl$15 = /* @__PURE__ */ template(`<div>`);
|
|
4155
4200
|
function Symbol(props) {
|
|
4156
4201
|
const [contentToUse, setContentToUse] = createSignal(props.symbol?.content);
|
|
4157
4202
|
function className() {
|
|
@@ -4177,7 +4222,7 @@ function Symbol(props) {
|
|
|
4177
4222
|
}
|
|
4178
4223
|
createEffect(on(() => [props.symbol], onUpdateFn_0));
|
|
4179
4224
|
return (() => {
|
|
4180
|
-
const _el$ = _tmpl$
|
|
4225
|
+
const _el$ = _tmpl$15();
|
|
4181
4226
|
spread(_el$, mergeProps({
|
|
4182
4227
|
get ["class"]() {
|
|
4183
4228
|
return className();
|
|
@@ -4192,7 +4237,10 @@ function Symbol(props) {
|
|
|
4192
4237
|
return props.builderContext.apiKey;
|
|
4193
4238
|
},
|
|
4194
4239
|
get context() {
|
|
4195
|
-
return
|
|
4240
|
+
return {
|
|
4241
|
+
...props.builderContext.context,
|
|
4242
|
+
symbolId: props.builderBlock?.id
|
|
4243
|
+
};
|
|
4196
4244
|
},
|
|
4197
4245
|
get customComponents() {
|
|
4198
4246
|
return Object.values(props.builderComponents);
|
package/lib/browser/index.jsx
CHANGED
|
@@ -2089,8 +2089,42 @@ var componentInfo8 = {
|
|
|
2089
2089
|
}]
|
|
2090
2090
|
};
|
|
2091
2091
|
|
|
2092
|
-
// src/blocks/
|
|
2092
|
+
// src/blocks/slot/component-info.ts
|
|
2093
2093
|
var componentInfo9 = {
|
|
2094
|
+
name: "Slot",
|
|
2095
|
+
isRSC: true,
|
|
2096
|
+
description: "Allow child blocks to be inserted into this content when used as a Symbol",
|
|
2097
|
+
docsLink: "https://www.builder.io/c/docs/symbols-with-blocks",
|
|
2098
|
+
image: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F3aad6de36eae43b59b52c85190fdef56",
|
|
2099
|
+
// Maybe wrap this for canHaveChildren so bind children to this hm
|
|
2100
|
+
inputs: [{
|
|
2101
|
+
name: "name",
|
|
2102
|
+
type: "string",
|
|
2103
|
+
required: true,
|
|
2104
|
+
defaultValue: "children"
|
|
2105
|
+
}]
|
|
2106
|
+
};
|
|
2107
|
+
|
|
2108
|
+
// src/blocks/slot/slot.tsx
|
|
2109
|
+
function Slot(props) {
|
|
2110
|
+
return <div
|
|
2111
|
+
style={{
|
|
2112
|
+
"pointer-events": "auto"
|
|
2113
|
+
}}
|
|
2114
|
+
{...!props.builderContext.context?.symbolId && {
|
|
2115
|
+
"builder-slot": props.name
|
|
2116
|
+
}}
|
|
2117
|
+
><Blocks_default
|
|
2118
|
+
parent={props.builderContext.context?.symbolId}
|
|
2119
|
+
path={`symbol.data.${props.name}`}
|
|
2120
|
+
context={props.builderContext}
|
|
2121
|
+
blocks={props.builderContext.rootState?.[props.name]}
|
|
2122
|
+
/></div>;
|
|
2123
|
+
}
|
|
2124
|
+
var slot_default = Slot;
|
|
2125
|
+
|
|
2126
|
+
// src/blocks/symbol/component-info.ts
|
|
2127
|
+
var componentInfo10 = {
|
|
2094
2128
|
name: "Symbol",
|
|
2095
2129
|
noWrap: true,
|
|
2096
2130
|
static: true,
|
|
@@ -2126,7 +2160,7 @@ var componentInfo9 = {
|
|
|
2126
2160
|
};
|
|
2127
2161
|
|
|
2128
2162
|
// src/blocks/text/component-info.ts
|
|
2129
|
-
var
|
|
2163
|
+
var componentInfo11 = {
|
|
2130
2164
|
name: "Text",
|
|
2131
2165
|
static: true,
|
|
2132
2166
|
isRSC: true,
|
|
@@ -2159,7 +2193,7 @@ function Text(props) {
|
|
|
2159
2193
|
var text_default = Text;
|
|
2160
2194
|
|
|
2161
2195
|
// src/blocks/video/component-info.ts
|
|
2162
|
-
var
|
|
2196
|
+
var componentInfo12 = {
|
|
2163
2197
|
name: "Video",
|
|
2164
2198
|
canHaveChildren: true,
|
|
2165
2199
|
defaultStyles: {
|
|
@@ -2356,13 +2390,16 @@ var getDefaultRegisteredComponents = () => [{
|
|
|
2356
2390
|
...componentInfo8
|
|
2357
2391
|
}, {
|
|
2358
2392
|
component: symbol_default,
|
|
2359
|
-
...
|
|
2393
|
+
...componentInfo10
|
|
2360
2394
|
}, {
|
|
2361
2395
|
component: text_default,
|
|
2362
|
-
...
|
|
2396
|
+
...componentInfo11
|
|
2363
2397
|
}, {
|
|
2364
2398
|
component: video_default,
|
|
2365
|
-
...
|
|
2399
|
+
...componentInfo12
|
|
2400
|
+
}, {
|
|
2401
|
+
component: slot_default,
|
|
2402
|
+
...componentInfo9
|
|
2366
2403
|
}];
|
|
2367
2404
|
|
|
2368
2405
|
// src/functions/register-component.ts
|
|
@@ -2924,7 +2961,7 @@ var getInteractionPropertiesForEvent = (event) => {
|
|
|
2924
2961
|
};
|
|
2925
2962
|
|
|
2926
2963
|
// src/constants/sdk-version.ts
|
|
2927
|
-
var SDK_VERSION = "0.
|
|
2964
|
+
var SDK_VERSION = "0.12.1";
|
|
2928
2965
|
|
|
2929
2966
|
// src/functions/register.ts
|
|
2930
2967
|
var registry = {};
|
|
@@ -3736,7 +3773,10 @@ function Symbol(props) {
|
|
|
3736
3773
|
__isNestedRender={true}
|
|
3737
3774
|
apiVersion={props.builderContext.apiVersion}
|
|
3738
3775
|
apiKey={props.builderContext.apiKey}
|
|
3739
|
-
context={
|
|
3776
|
+
context={{
|
|
3777
|
+
...props.builderContext.context,
|
|
3778
|
+
symbolId: props.builderBlock?.id
|
|
3779
|
+
}}
|
|
3740
3780
|
customComponents={Object.values(props.builderComponents)}
|
|
3741
3781
|
data={{
|
|
3742
3782
|
...props.symbol?.data,
|