@builder.io/sdk-solid 1.0.27 → 1.0.29
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/dist/index.d.ts +1 -1
- package/lib/browser/dev.js +409 -95
- package/lib/browser/dev.jsx +421 -144
- package/lib/browser/index.js +409 -95
- package/lib/browser/index.jsx +421 -144
- package/lib/edge/dev.js +409 -95
- package/lib/edge/dev.jsx +421 -144
- package/lib/edge/index.js +409 -95
- package/lib/edge/index.jsx +421 -144
- package/lib/node/dev.js +409 -95
- package/lib/node/dev.jsx +421 -144
- package/lib/node/index.js +409 -95
- package/lib/node/index.jsx +421 -144
- package/package.json +3 -3
package/lib/browser/index.js
CHANGED
|
@@ -481,6 +481,9 @@ function getProcessedBlock({
|
|
|
481
481
|
}
|
|
482
482
|
}
|
|
483
483
|
|
|
484
|
+
// src/functions/camel-to-kebab-case.ts
|
|
485
|
+
var camelToKebabCase = (str) => str ? str.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase() : "";
|
|
486
|
+
|
|
484
487
|
// src/components/block/animator.ts
|
|
485
488
|
function throttle(func, wait, options = {}) {
|
|
486
489
|
let context;
|
|
@@ -531,7 +534,6 @@ function assign(target, ..._args) {
|
|
|
531
534
|
}
|
|
532
535
|
return to;
|
|
533
536
|
}
|
|
534
|
-
var camelCaseToKebabCase = (str) => str ? str.replace(/([A-Z])/g, (g) => `-${g[0].toLowerCase()}`) : "";
|
|
535
537
|
function bindAnimations(animations) {
|
|
536
538
|
for (const animation of animations) {
|
|
537
539
|
switch (animation.trigger) {
|
|
@@ -583,7 +585,7 @@ function triggerAnimation(animation) {
|
|
|
583
585
|
element.style.transitionDelay = "0";
|
|
584
586
|
assign(element.style, animation.steps[0].styles);
|
|
585
587
|
setTimeout(() => {
|
|
586
|
-
element.style.transition = `all ${animation.duration}s ${
|
|
588
|
+
element.style.transition = `all ${animation.duration}s ${camelToKebabCase(animation.easing)}`;
|
|
587
589
|
if (animation.delay) {
|
|
588
590
|
element.style.transitionDelay = animation.delay + "s";
|
|
589
591
|
}
|
|
@@ -643,7 +645,7 @@ function bindScrollInViewAnimation(animation) {
|
|
|
643
645
|
}
|
|
644
646
|
attachDefaultState();
|
|
645
647
|
setTimeout(() => {
|
|
646
|
-
element.style.transition = `all ${animation.duration}s ${
|
|
648
|
+
element.style.transition = `all ${animation.duration}s ${camelToKebabCase(animation.easing)}`;
|
|
647
649
|
if (animation.delay) {
|
|
648
650
|
element.style.transitionDelay = animation.delay + "s";
|
|
649
651
|
}
|
|
@@ -656,9 +658,6 @@ function bindScrollInViewAnimation(animation) {
|
|
|
656
658
|
});
|
|
657
659
|
}
|
|
658
660
|
|
|
659
|
-
// src/functions/camel-to-kebab-case.ts
|
|
660
|
-
var camelToKebabCase = (string) => string.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase();
|
|
661
|
-
|
|
662
661
|
// src/helpers/css.ts
|
|
663
662
|
var convertStyleMapToCSSArray = (style) => {
|
|
664
663
|
const cssProps = Object.entries(style).map(([key, value]) => {
|
|
@@ -785,10 +784,10 @@ var getRepeatItemData = ({
|
|
|
785
784
|
return repeatArray;
|
|
786
785
|
};
|
|
787
786
|
var shouldPassLinkComponent = (block) => {
|
|
788
|
-
return block && (block.isRSC || ["Core:Button", "Symbol", "Columns", "Form:Form", "Builder: Tabs"].includes(block.name));
|
|
787
|
+
return block && (block.isRSC || ["Core:Button", "Symbol", "Columns", "Form:Form", "Builder: Tabs", "Builder:Accordion"].includes(block.name));
|
|
789
788
|
};
|
|
790
789
|
var shouldPassRegisteredComponents = (block) => {
|
|
791
|
-
return block && (block.isRSC || ["Symbol", "Columns", "Form:Form", "Builder: Tabs"].includes(block.name));
|
|
790
|
+
return block && (block.isRSC || ["Symbol", "Columns", "Form:Form", "Builder: Tabs", "Builder:Accordion"].includes(block.name));
|
|
792
791
|
};
|
|
793
792
|
|
|
794
793
|
// src/constants/device-sizes.ts
|
|
@@ -917,7 +916,7 @@ function BlockStyles(props) {
|
|
|
917
916
|
className: `${className}:hover`,
|
|
918
917
|
styles: {
|
|
919
918
|
...hoverStyles,
|
|
920
|
-
transition: `all ${hoverAnimation.duration}s ${
|
|
919
|
+
transition: `all ${hoverAnimation.duration}s ${camelToKebabCase(hoverAnimation.easing)}`,
|
|
921
920
|
transitionDelay: hoverAnimation.delay ? `${hoverAnimation.delay}s` : "0s"
|
|
922
921
|
}
|
|
923
922
|
}) || "";
|
|
@@ -2123,8 +2122,320 @@ var handleABTesting = async ({
|
|
|
2123
2122
|
// src/helpers/canTrack.ts
|
|
2124
2123
|
var getDefaultCanTrack = (canTrack) => checkIsDefined(canTrack) ? canTrack : true;
|
|
2125
2124
|
|
|
2126
|
-
// src/blocks/
|
|
2125
|
+
// src/blocks/accordion/component-info.ts
|
|
2126
|
+
var defaultTitle = {
|
|
2127
|
+
"@type": "@builder.io/sdk:Element",
|
|
2128
|
+
layerName: "Accordion item title",
|
|
2129
|
+
responsiveStyles: {
|
|
2130
|
+
large: {
|
|
2131
|
+
marginTop: "10px",
|
|
2132
|
+
position: "relative",
|
|
2133
|
+
display: "flex",
|
|
2134
|
+
alignItems: "stretch",
|
|
2135
|
+
flexDirection: "column",
|
|
2136
|
+
paddingBottom: "10px"
|
|
2137
|
+
}
|
|
2138
|
+
},
|
|
2139
|
+
children: [{
|
|
2140
|
+
"@type": "@builder.io/sdk:Element",
|
|
2141
|
+
responsiveStyles: {
|
|
2142
|
+
large: {
|
|
2143
|
+
textAlign: "left",
|
|
2144
|
+
display: "flex",
|
|
2145
|
+
flexDirection: "column"
|
|
2146
|
+
}
|
|
2147
|
+
},
|
|
2148
|
+
component: {
|
|
2149
|
+
name: "Text",
|
|
2150
|
+
options: {
|
|
2151
|
+
text: "I am an accordion title. Click me!"
|
|
2152
|
+
}
|
|
2153
|
+
}
|
|
2154
|
+
}]
|
|
2155
|
+
};
|
|
2156
|
+
var defaultDetail = {
|
|
2157
|
+
"@type": "@builder.io/sdk:Element",
|
|
2158
|
+
layerName: "Accordion item detail",
|
|
2159
|
+
responsiveStyles: {
|
|
2160
|
+
large: {
|
|
2161
|
+
position: "relative",
|
|
2162
|
+
display: "flex",
|
|
2163
|
+
alignItems: "stretch",
|
|
2164
|
+
flexDirection: "column",
|
|
2165
|
+
marginTop: "10px",
|
|
2166
|
+
paddingBottom: "10px"
|
|
2167
|
+
}
|
|
2168
|
+
},
|
|
2169
|
+
children: [{
|
|
2170
|
+
"@type": "@builder.io/sdk:Element",
|
|
2171
|
+
responsiveStyles: {
|
|
2172
|
+
large: {
|
|
2173
|
+
paddingTop: "50px",
|
|
2174
|
+
textAlign: "left",
|
|
2175
|
+
display: "flex",
|
|
2176
|
+
flexDirection: "column",
|
|
2177
|
+
paddingBottom: "50px"
|
|
2178
|
+
}
|
|
2179
|
+
},
|
|
2180
|
+
component: {
|
|
2181
|
+
name: "Text",
|
|
2182
|
+
options: {
|
|
2183
|
+
text: "I am an accordion detail, hello!"
|
|
2184
|
+
}
|
|
2185
|
+
}
|
|
2186
|
+
}]
|
|
2187
|
+
};
|
|
2127
2188
|
var componentInfo = {
|
|
2189
|
+
name: "Builder:Accordion",
|
|
2190
|
+
canHaveChildren: true,
|
|
2191
|
+
image: "https://cdn.builder.io/api/v1/image/assets%2FagZ9n5CUKRfbL9t6CaJOyVSK4Es2%2Ffab6c1fd3fe542408cbdec078bca7f35",
|
|
2192
|
+
defaultStyles: {
|
|
2193
|
+
display: "flex",
|
|
2194
|
+
flexDirection: "column",
|
|
2195
|
+
alignItems: "stretch"
|
|
2196
|
+
},
|
|
2197
|
+
inputs: [{
|
|
2198
|
+
name: "items",
|
|
2199
|
+
type: "list",
|
|
2200
|
+
broadcast: true,
|
|
2201
|
+
subFields: [{
|
|
2202
|
+
name: "title",
|
|
2203
|
+
type: "uiBlocks",
|
|
2204
|
+
hideFromUI: true,
|
|
2205
|
+
defaultValue: [defaultTitle]
|
|
2206
|
+
}, {
|
|
2207
|
+
name: "detail",
|
|
2208
|
+
type: "uiBlocks",
|
|
2209
|
+
hideFromUI: true,
|
|
2210
|
+
defaultValue: [defaultDetail]
|
|
2211
|
+
}],
|
|
2212
|
+
defaultValue: [{
|
|
2213
|
+
title: [defaultTitle],
|
|
2214
|
+
detail: [defaultDetail]
|
|
2215
|
+
}, {
|
|
2216
|
+
title: [defaultTitle],
|
|
2217
|
+
detail: [defaultDetail]
|
|
2218
|
+
}],
|
|
2219
|
+
showIf: (options) => !options.get("useChildrenForItems")
|
|
2220
|
+
}, {
|
|
2221
|
+
name: "oneAtATime",
|
|
2222
|
+
helperText: "Only allow opening one at a time (collapse all others when new item openned)",
|
|
2223
|
+
type: "boolean",
|
|
2224
|
+
defaultValue: false
|
|
2225
|
+
}, {
|
|
2226
|
+
name: "grid",
|
|
2227
|
+
helperText: "Display as a grid",
|
|
2228
|
+
type: "boolean",
|
|
2229
|
+
defaultValue: false
|
|
2230
|
+
}, {
|
|
2231
|
+
name: "gridRowWidth",
|
|
2232
|
+
helperText: "Display as a grid",
|
|
2233
|
+
type: "string",
|
|
2234
|
+
showIf: (options) => options.get("grid"),
|
|
2235
|
+
defaultValue: "25%"
|
|
2236
|
+
}, {
|
|
2237
|
+
name: "useChildrenForItems",
|
|
2238
|
+
type: "boolean",
|
|
2239
|
+
helperText: "Use child elements for each slide, instead of the array. Useful for dynamically repeating items",
|
|
2240
|
+
advanced: true,
|
|
2241
|
+
defaultValue: false,
|
|
2242
|
+
onChange: (options) => {
|
|
2243
|
+
if (options.get("useChildrenForItems") === true) {
|
|
2244
|
+
options.set("items", []);
|
|
2245
|
+
}
|
|
2246
|
+
}
|
|
2247
|
+
}]
|
|
2248
|
+
};
|
|
2249
|
+
|
|
2250
|
+
// src/blocks/accordion/helpers.ts
|
|
2251
|
+
var convertOrderNumberToString = (order) => {
|
|
2252
|
+
return order.toString();
|
|
2253
|
+
};
|
|
2254
|
+
|
|
2255
|
+
// src/blocks/accordion/accordion.tsx
|
|
2256
|
+
var _tmpl$6 = /* @__PURE__ */ template(`<div class=builder-accordion>`);
|
|
2257
|
+
var _tmpl$23 = /* @__PURE__ */ template(`<div>`);
|
|
2258
|
+
function Accordion(props) {
|
|
2259
|
+
const [open, setOpen] = createSignal([]);
|
|
2260
|
+
const onlyOneAtATime = createMemo(() => {
|
|
2261
|
+
return Boolean(props.grid || props.oneAtATime);
|
|
2262
|
+
});
|
|
2263
|
+
const accordionStyles = createMemo(() => {
|
|
2264
|
+
const styles = {
|
|
2265
|
+
display: "flex",
|
|
2266
|
+
alignItems: "stretch",
|
|
2267
|
+
flexDirection: "column",
|
|
2268
|
+
...props.grid && {
|
|
2269
|
+
flexDirection: "row",
|
|
2270
|
+
alignItems: "flex-start",
|
|
2271
|
+
flexWrap: "wrap"
|
|
2272
|
+
}
|
|
2273
|
+
};
|
|
2274
|
+
return Object.fromEntries(Object.entries(styles).map(([key, value]) => [camelToKebabCase(key), value]));
|
|
2275
|
+
});
|
|
2276
|
+
const accordionTitleStyles = createMemo(() => {
|
|
2277
|
+
const shared = {
|
|
2278
|
+
display: "flex",
|
|
2279
|
+
flexDirection: "column"
|
|
2280
|
+
};
|
|
2281
|
+
const styles = Object.fromEntries(Object.entries({
|
|
2282
|
+
...shared,
|
|
2283
|
+
alignItems: "stretch",
|
|
2284
|
+
cursor: "pointer"
|
|
2285
|
+
}).map(([key, value]) => [camelToKebabCase(key), value]));
|
|
2286
|
+
return Object.fromEntries(Object.entries(styles).filter(([_, value]) => value !== void 0));
|
|
2287
|
+
});
|
|
2288
|
+
function getAccordionTitleClassName(index) {
|
|
2289
|
+
return `builder-accordion-title builder-accordion-title-${open().includes(index) ? "open" : "closed"}`;
|
|
2290
|
+
}
|
|
2291
|
+
function getAccordionDetailClassName(index) {
|
|
2292
|
+
return `builder-accordion-detail builder-accordion-detail-${open().includes(index) ? "open" : "closed"}`;
|
|
2293
|
+
}
|
|
2294
|
+
const openGridItemOrder = createMemo(() => {
|
|
2295
|
+
let itemOrder = null;
|
|
2296
|
+
const getOpenGridItemPosition = props.grid && open().length;
|
|
2297
|
+
if (getOpenGridItemPosition && document) {
|
|
2298
|
+
const openItemIndex = open()[0];
|
|
2299
|
+
const openItem = document.querySelector(`.builder-accordion-title[data-index="${openItemIndex}"]`);
|
|
2300
|
+
let subjectItem = openItem;
|
|
2301
|
+
itemOrder = openItemIndex;
|
|
2302
|
+
if (subjectItem) {
|
|
2303
|
+
let prevItemRect = subjectItem.getBoundingClientRect();
|
|
2304
|
+
while (subjectItem = subjectItem && subjectItem.nextElementSibling) {
|
|
2305
|
+
if (subjectItem) {
|
|
2306
|
+
if (subjectItem.classList.contains("builder-accordion-detail")) {
|
|
2307
|
+
continue;
|
|
2308
|
+
}
|
|
2309
|
+
const subjectItemRect = subjectItem.getBoundingClientRect();
|
|
2310
|
+
if (subjectItemRect.left > prevItemRect.left) {
|
|
2311
|
+
const index = parseInt(subjectItem.getAttribute("data-index") || "", 10);
|
|
2312
|
+
if (!isNaN(index)) {
|
|
2313
|
+
prevItemRect = subjectItemRect;
|
|
2314
|
+
itemOrder = index;
|
|
2315
|
+
}
|
|
2316
|
+
} else {
|
|
2317
|
+
break;
|
|
2318
|
+
}
|
|
2319
|
+
}
|
|
2320
|
+
}
|
|
2321
|
+
}
|
|
2322
|
+
}
|
|
2323
|
+
if (typeof itemOrder === "number") {
|
|
2324
|
+
itemOrder = itemOrder + 1;
|
|
2325
|
+
}
|
|
2326
|
+
return itemOrder;
|
|
2327
|
+
});
|
|
2328
|
+
const accordionDetailStyles = createMemo(() => {
|
|
2329
|
+
const styles = {
|
|
2330
|
+
...{
|
|
2331
|
+
order: typeof openGridItemOrder() === "number" ? openGridItemOrder() : void 0
|
|
2332
|
+
},
|
|
2333
|
+
...props.grid && {
|
|
2334
|
+
width: "100%"
|
|
2335
|
+
}
|
|
2336
|
+
};
|
|
2337
|
+
return Object.fromEntries(Object.entries(styles).filter(([_, value]) => value !== void 0));
|
|
2338
|
+
});
|
|
2339
|
+
function onClick(index) {
|
|
2340
|
+
if (open().includes(index)) {
|
|
2341
|
+
setOpen(onlyOneAtATime() ? [] : open().filter((item) => item !== index));
|
|
2342
|
+
} else {
|
|
2343
|
+
setOpen(onlyOneAtATime() ? [index] : open().concat(index));
|
|
2344
|
+
}
|
|
2345
|
+
}
|
|
2346
|
+
return (() => {
|
|
2347
|
+
const _el$ = _tmpl$6();
|
|
2348
|
+
insert(_el$, createComponent(For, {
|
|
2349
|
+
get each() {
|
|
2350
|
+
return props.items;
|
|
2351
|
+
},
|
|
2352
|
+
children: (item, _index) => {
|
|
2353
|
+
const index = _index();
|
|
2354
|
+
return [(() => {
|
|
2355
|
+
const _el$2 = _tmpl$23();
|
|
2356
|
+
_el$2.$$click = (event) => onClick(index);
|
|
2357
|
+
setAttribute(_el$2, "data-index", index);
|
|
2358
|
+
insert(_el$2, createComponent(blocks_default, {
|
|
2359
|
+
get blocks() {
|
|
2360
|
+
return item.title;
|
|
2361
|
+
},
|
|
2362
|
+
path: `items.${index}.title`,
|
|
2363
|
+
get parent() {
|
|
2364
|
+
return props.builderBlock.id;
|
|
2365
|
+
},
|
|
2366
|
+
get context() {
|
|
2367
|
+
return props.builderContext;
|
|
2368
|
+
},
|
|
2369
|
+
get registeredComponents() {
|
|
2370
|
+
return props.builderComponents;
|
|
2371
|
+
},
|
|
2372
|
+
get linkComponent() {
|
|
2373
|
+
return props.builderLinkComponent;
|
|
2374
|
+
}
|
|
2375
|
+
}));
|
|
2376
|
+
effect((_p$) => {
|
|
2377
|
+
const _v$ = getAccordionTitleClassName(index), _v$2 = {
|
|
2378
|
+
...accordionTitleStyles(),
|
|
2379
|
+
width: props.grid ? props.gridRowWidth : void 0,
|
|
2380
|
+
...{
|
|
2381
|
+
order: openGridItemOrder() !== null ? convertOrderNumberToString(index) : convertOrderNumberToString(index + 1)
|
|
2382
|
+
}
|
|
2383
|
+
};
|
|
2384
|
+
_v$ !== _p$._v$ && className(_el$2, _p$._v$ = _v$);
|
|
2385
|
+
_p$._v$2 = style(_el$2, _v$2, _p$._v$2);
|
|
2386
|
+
return _p$;
|
|
2387
|
+
}, {
|
|
2388
|
+
_v$: void 0,
|
|
2389
|
+
_v$2: void 0
|
|
2390
|
+
});
|
|
2391
|
+
return _el$2;
|
|
2392
|
+
})(), createComponent(Show, {
|
|
2393
|
+
get when() {
|
|
2394
|
+
return open().includes(index);
|
|
2395
|
+
},
|
|
2396
|
+
get children() {
|
|
2397
|
+
const _el$3 = _tmpl$23();
|
|
2398
|
+
insert(_el$3, createComponent(blocks_default, {
|
|
2399
|
+
get blocks() {
|
|
2400
|
+
return item.detail;
|
|
2401
|
+
},
|
|
2402
|
+
path: `items.${index}.detail`,
|
|
2403
|
+
get parent() {
|
|
2404
|
+
return props.builderBlock.id;
|
|
2405
|
+
},
|
|
2406
|
+
get context() {
|
|
2407
|
+
return props.builderContext;
|
|
2408
|
+
},
|
|
2409
|
+
get registeredComponents() {
|
|
2410
|
+
return props.builderComponents;
|
|
2411
|
+
},
|
|
2412
|
+
get linkComponent() {
|
|
2413
|
+
return props.builderLinkComponent;
|
|
2414
|
+
}
|
|
2415
|
+
}));
|
|
2416
|
+
effect((_p$) => {
|
|
2417
|
+
const _v$3 = getAccordionDetailClassName(index), _v$4 = accordionDetailStyles();
|
|
2418
|
+
_v$3 !== _p$._v$3 && className(_el$3, _p$._v$3 = _v$3);
|
|
2419
|
+
_p$._v$4 = style(_el$3, _v$4, _p$._v$4);
|
|
2420
|
+
return _p$;
|
|
2421
|
+
}, {
|
|
2422
|
+
_v$3: void 0,
|
|
2423
|
+
_v$4: void 0
|
|
2424
|
+
});
|
|
2425
|
+
return _el$3;
|
|
2426
|
+
}
|
|
2427
|
+
})];
|
|
2428
|
+
}
|
|
2429
|
+
}));
|
|
2430
|
+
effect((_$p) => style(_el$, accordionStyles(), _$p));
|
|
2431
|
+
return _el$;
|
|
2432
|
+
})();
|
|
2433
|
+
}
|
|
2434
|
+
var accordion_default = Accordion;
|
|
2435
|
+
delegateEvents(["click"]);
|
|
2436
|
+
|
|
2437
|
+
// src/blocks/button/component-info.ts
|
|
2438
|
+
var componentInfo2 = {
|
|
2128
2439
|
name: "Core:Button",
|
|
2129
2440
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
|
|
2130
2441
|
defaultStyles: {
|
|
@@ -2160,7 +2471,7 @@ var componentInfo = {
|
|
|
2160
2471
|
};
|
|
2161
2472
|
|
|
2162
2473
|
// src/blocks/columns/component-info.ts
|
|
2163
|
-
var
|
|
2474
|
+
var componentInfo3 = {
|
|
2164
2475
|
// TODO: ways to statically preprocess JSON for references, functions, etc
|
|
2165
2476
|
name: "Columns",
|
|
2166
2477
|
isRSC: true,
|
|
@@ -2380,7 +2691,7 @@ var componentInfo2 = {
|
|
|
2380
2691
|
};
|
|
2381
2692
|
|
|
2382
2693
|
// src/blocks/fragment/component-info.ts
|
|
2383
|
-
var
|
|
2694
|
+
var componentInfo4 = {
|
|
2384
2695
|
name: "Fragment",
|
|
2385
2696
|
static: true,
|
|
2386
2697
|
hidden: true,
|
|
@@ -2389,7 +2700,7 @@ var componentInfo3 = {
|
|
|
2389
2700
|
};
|
|
2390
2701
|
|
|
2391
2702
|
// src/blocks/image/component-info.ts
|
|
2392
|
-
var
|
|
2703
|
+
var componentInfo5 = {
|
|
2393
2704
|
name: "Image",
|
|
2394
2705
|
static: true,
|
|
2395
2706
|
image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",
|
|
@@ -2511,7 +2822,7 @@ var componentInfo4 = {
|
|
|
2511
2822
|
};
|
|
2512
2823
|
|
|
2513
2824
|
// src/blocks/section/component-info.ts
|
|
2514
|
-
var
|
|
2825
|
+
var componentInfo6 = {
|
|
2515
2826
|
name: "Core:Section",
|
|
2516
2827
|
static: true,
|
|
2517
2828
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
|
|
@@ -2553,7 +2864,7 @@ var componentInfo5 = {
|
|
|
2553
2864
|
};
|
|
2554
2865
|
|
|
2555
2866
|
// src/blocks/slot/component-info.ts
|
|
2556
|
-
var
|
|
2867
|
+
var componentInfo7 = {
|
|
2557
2868
|
name: "Slot",
|
|
2558
2869
|
isRSC: true,
|
|
2559
2870
|
description: "Allow child blocks to be inserted into this content when used as a Symbol",
|
|
@@ -2567,10 +2878,10 @@ var componentInfo6 = {
|
|
|
2567
2878
|
defaultValue: "children"
|
|
2568
2879
|
}]
|
|
2569
2880
|
};
|
|
2570
|
-
var _tmpl$
|
|
2881
|
+
var _tmpl$7 = /* @__PURE__ */ template(`<div>`);
|
|
2571
2882
|
function Slot(props) {
|
|
2572
2883
|
return (() => {
|
|
2573
|
-
const _el$ = _tmpl$
|
|
2884
|
+
const _el$ = _tmpl$7();
|
|
2574
2885
|
_el$.style.setProperty("pointer-events", "auto");
|
|
2575
2886
|
spread(_el$, mergeProps(() => !props.builderContext.context?.symbolId && {
|
|
2576
2887
|
"builder-slot": props.name
|
|
@@ -2595,7 +2906,7 @@ function Slot(props) {
|
|
|
2595
2906
|
var slot_default = Slot;
|
|
2596
2907
|
|
|
2597
2908
|
// src/blocks/symbol/component-info.ts
|
|
2598
|
-
var
|
|
2909
|
+
var componentInfo8 = {
|
|
2599
2910
|
name: "Symbol",
|
|
2600
2911
|
noWrap: true,
|
|
2601
2912
|
static: true,
|
|
@@ -2671,7 +2982,7 @@ var defaultElement = {
|
|
|
2671
2982
|
}
|
|
2672
2983
|
}
|
|
2673
2984
|
};
|
|
2674
|
-
var
|
|
2985
|
+
var componentInfo9 = {
|
|
2675
2986
|
name: "Builder: Tabs",
|
|
2676
2987
|
inputs: [{
|
|
2677
2988
|
name: "tabs",
|
|
@@ -2769,19 +3080,23 @@ var componentInfo8 = {
|
|
|
2769
3080
|
}]
|
|
2770
3081
|
}]
|
|
2771
3082
|
};
|
|
2772
|
-
var _tmpl$
|
|
2773
|
-
var _tmpl$
|
|
3083
|
+
var _tmpl$8 = /* @__PURE__ */ template(`<div>`);
|
|
3084
|
+
var _tmpl$24 = /* @__PURE__ */ template(`<div><div class=builder-tabs-wrap>`);
|
|
2774
3085
|
var _tmpl$33 = /* @__PURE__ */ template(`<span>`);
|
|
2775
3086
|
function Tabs(props) {
|
|
2776
3087
|
const [activeTab, setActiveTab] = createSignal(props.defaultActiveTab ? props.defaultActiveTab - 1 : 0);
|
|
2777
3088
|
function activeTabContent(active) {
|
|
2778
3089
|
return props.tabs && props.tabs[active].content;
|
|
2779
3090
|
}
|
|
2780
|
-
function
|
|
2781
|
-
|
|
3091
|
+
function onClick(index) {
|
|
3092
|
+
if (index === activeTab() && props.collapsible) {
|
|
3093
|
+
setActiveTab(-1);
|
|
3094
|
+
} else {
|
|
3095
|
+
setActiveTab(index);
|
|
3096
|
+
}
|
|
2782
3097
|
}
|
|
2783
3098
|
return (() => {
|
|
2784
|
-
const _el$ = _tmpl$
|
|
3099
|
+
const _el$ = _tmpl$24(), _el$2 = _el$.firstChild;
|
|
2785
3100
|
_el$2.style.setProperty("display", "flex");
|
|
2786
3101
|
_el$2.style.setProperty("flex-direction", "row");
|
|
2787
3102
|
_el$2.style.setProperty("overflow", "auto");
|
|
@@ -2793,13 +3108,7 @@ function Tabs(props) {
|
|
|
2793
3108
|
const index = _index();
|
|
2794
3109
|
return (() => {
|
|
2795
3110
|
const _el$4 = _tmpl$33();
|
|
2796
|
-
_el$4.$$click = (event) =>
|
|
2797
|
-
if (index === activeTab() && props.collapsible) {
|
|
2798
|
-
setActiveTab(-1);
|
|
2799
|
-
} else {
|
|
2800
|
-
setActiveTab(index);
|
|
2801
|
-
}
|
|
2802
|
-
};
|
|
3111
|
+
_el$4.$$click = (event) => onClick(index);
|
|
2803
3112
|
setAttribute(_el$4, "key", index);
|
|
2804
3113
|
insert(_el$4, createComponent(blocks_default, {
|
|
2805
3114
|
get parent() {
|
|
@@ -2820,7 +3129,9 @@ function Tabs(props) {
|
|
|
2820
3129
|
}
|
|
2821
3130
|
}));
|
|
2822
3131
|
effect((_p$) => {
|
|
2823
|
-
const _v$ = `builder-tab-wrap ${activeTab() === index ? "builder-tab-active" : ""}`, _v$2 =
|
|
3132
|
+
const _v$ = `builder-tab-wrap ${activeTab() === index ? "builder-tab-active" : ""}`, _v$2 = {
|
|
3133
|
+
...activeTab() === index ? props.activeTabStyle : {}
|
|
3134
|
+
};
|
|
2824
3135
|
_v$ !== _p$._v$ && className(_el$4, _p$._v$ = _v$);
|
|
2825
3136
|
_p$._v$2 = style(_el$4, _v$2, _p$._v$2);
|
|
2826
3137
|
return _p$;
|
|
@@ -2837,7 +3148,7 @@ function Tabs(props) {
|
|
|
2837
3148
|
return activeTabContent(activeTab());
|
|
2838
3149
|
},
|
|
2839
3150
|
get children() {
|
|
2840
|
-
const _el$3 = _tmpl$
|
|
3151
|
+
const _el$3 = _tmpl$8();
|
|
2841
3152
|
insert(_el$3, createComponent(blocks_default, {
|
|
2842
3153
|
get parent() {
|
|
2843
3154
|
return props.builderBlock.id;
|
|
@@ -2869,7 +3180,7 @@ var tabs_default = Tabs;
|
|
|
2869
3180
|
delegateEvents(["click"]);
|
|
2870
3181
|
|
|
2871
3182
|
// src/blocks/text/component-info.ts
|
|
2872
|
-
var
|
|
3183
|
+
var componentInfo10 = {
|
|
2873
3184
|
name: "Text",
|
|
2874
3185
|
static: true,
|
|
2875
3186
|
isRSC: true,
|
|
@@ -2888,10 +3199,10 @@ var componentInfo9 = {
|
|
|
2888
3199
|
textAlign: "center"
|
|
2889
3200
|
}
|
|
2890
3201
|
};
|
|
2891
|
-
var _tmpl$
|
|
3202
|
+
var _tmpl$9 = /* @__PURE__ */ template(`<div class=builder-text>`);
|
|
2892
3203
|
function Text(props) {
|
|
2893
3204
|
return (() => {
|
|
2894
|
-
const _el$ = _tmpl$
|
|
3205
|
+
const _el$ = _tmpl$9();
|
|
2895
3206
|
_el$.style.setProperty("outline", "none");
|
|
2896
3207
|
effect(() => _el$.innerHTML = props.text?.toString() || "");
|
|
2897
3208
|
return _el$;
|
|
@@ -2900,7 +3211,7 @@ function Text(props) {
|
|
|
2900
3211
|
var text_default = Text;
|
|
2901
3212
|
|
|
2902
3213
|
// src/blocks/custom-code/component-info.ts
|
|
2903
|
-
var
|
|
3214
|
+
var componentInfo11 = {
|
|
2904
3215
|
name: "Custom Code",
|
|
2905
3216
|
static: true,
|
|
2906
3217
|
requiredPermissions: ["editCode"],
|
|
@@ -2923,7 +3234,7 @@ var componentInfo10 = {
|
|
|
2923
3234
|
advanced: true
|
|
2924
3235
|
}]
|
|
2925
3236
|
};
|
|
2926
|
-
var _tmpl$
|
|
3237
|
+
var _tmpl$10 = /* @__PURE__ */ template(`<div>`);
|
|
2927
3238
|
function CustomCode(props) {
|
|
2928
3239
|
const [scriptsInserted, setScriptsInserted] = createSignal([]);
|
|
2929
3240
|
const [scriptsRun, setScriptsRun] = createSignal([]);
|
|
@@ -2957,7 +3268,7 @@ function CustomCode(props) {
|
|
|
2957
3268
|
}
|
|
2958
3269
|
});
|
|
2959
3270
|
return (() => {
|
|
2960
|
-
const _el$ = _tmpl$
|
|
3271
|
+
const _el$ = _tmpl$10();
|
|
2961
3272
|
const _ref$ = elementRef;
|
|
2962
3273
|
typeof _ref$ === "function" ? use(_ref$, _el$) : elementRef = _el$;
|
|
2963
3274
|
effect((_p$) => {
|
|
@@ -2975,7 +3286,7 @@ function CustomCode(props) {
|
|
|
2975
3286
|
var custom_code_default = CustomCode;
|
|
2976
3287
|
|
|
2977
3288
|
// src/blocks/embed/component-info.ts
|
|
2978
|
-
var
|
|
3289
|
+
var componentInfo12 = {
|
|
2979
3290
|
name: "Embed",
|
|
2980
3291
|
static: true,
|
|
2981
3292
|
inputs: [{
|
|
@@ -3017,7 +3328,7 @@ var SCRIPT_MIME_TYPES = ["text/javascript", "application/javascript", "applicati
|
|
|
3017
3328
|
var isJsScript = (script) => SCRIPT_MIME_TYPES.includes(script.type);
|
|
3018
3329
|
|
|
3019
3330
|
// src/blocks/embed/embed.tsx
|
|
3020
|
-
var _tmpl$
|
|
3331
|
+
var _tmpl$11 = /* @__PURE__ */ template(`<div class=builder-embed>`);
|
|
3021
3332
|
function Embed(props) {
|
|
3022
3333
|
const [scriptsInserted, setScriptsInserted] = createSignal([]);
|
|
3023
3334
|
const [scriptsRun, setScriptsRun] = createSignal([]);
|
|
@@ -3054,7 +3365,7 @@ function Embed(props) {
|
|
|
3054
3365
|
}
|
|
3055
3366
|
createEffect(on(() => [onUpdateFn_0_elem(), onUpdateFn_0_ranInitFn__()], onUpdateFn_0));
|
|
3056
3367
|
return (() => {
|
|
3057
|
-
const _el$ = _tmpl$
|
|
3368
|
+
const _el$ = _tmpl$11();
|
|
3058
3369
|
const _ref$ = elem;
|
|
3059
3370
|
typeof _ref$ === "function" ? use(_ref$, _el$) : elem = _el$;
|
|
3060
3371
|
effect(() => _el$.innerHTML = props.content);
|
|
@@ -3064,7 +3375,7 @@ function Embed(props) {
|
|
|
3064
3375
|
var embed_default = Embed;
|
|
3065
3376
|
|
|
3066
3377
|
// src/blocks/form/form/component-info.ts
|
|
3067
|
-
var
|
|
3378
|
+
var componentInfo13 = {
|
|
3068
3379
|
name: "Form:Form",
|
|
3069
3380
|
// editableTags: ['builder-form-error']
|
|
3070
3381
|
defaults: {
|
|
@@ -3311,8 +3622,8 @@ var get = (obj, path, defaultValue) => {
|
|
|
3311
3622
|
};
|
|
3312
3623
|
|
|
3313
3624
|
// src/blocks/form/form/form.tsx
|
|
3314
|
-
var _tmpl$
|
|
3315
|
-
var _tmpl$
|
|
3625
|
+
var _tmpl$12 = /* @__PURE__ */ template(`<pre>`);
|
|
3626
|
+
var _tmpl$25 = /* @__PURE__ */ template(`<form>`);
|
|
3316
3627
|
function FormComponent(props) {
|
|
3317
3628
|
const [formState, setFormState] = createSignal("unsubmitted");
|
|
3318
3629
|
const [responseData, setResponseData] = createSignal(null);
|
|
@@ -3341,11 +3652,11 @@ function FormComponent(props) {
|
|
|
3341
3652
|
return;
|
|
3342
3653
|
}
|
|
3343
3654
|
event.preventDefault();
|
|
3344
|
-
const el = event.currentTarget;
|
|
3655
|
+
const el = event.currentTarget || event.target;
|
|
3345
3656
|
const headers = props.customHeaders || {};
|
|
3346
3657
|
let body;
|
|
3347
3658
|
const formData = new FormData(el);
|
|
3348
|
-
const formPairs = Array.from(
|
|
3659
|
+
const formPairs = Array.from(el.querySelectorAll("input,select,textarea")).filter((el2) => !!el2.name).map((el2) => {
|
|
3349
3660
|
let value;
|
|
3350
3661
|
const key = el2.name;
|
|
3351
3662
|
if (el2 instanceof HTMLInputElement) {
|
|
@@ -3498,7 +3809,7 @@ function FormComponent(props) {
|
|
|
3498
3809
|
}
|
|
3499
3810
|
let formRef;
|
|
3500
3811
|
return (() => {
|
|
3501
|
-
const _el$ = _tmpl$
|
|
3812
|
+
const _el$ = _tmpl$25();
|
|
3502
3813
|
_el$.addEventListener("submit", (event) => onSubmit(event));
|
|
3503
3814
|
const _ref$ = formRef;
|
|
3504
3815
|
typeof _ref$ === "function" ? use(_ref$, _el$) : formRef = _el$;
|
|
@@ -3515,7 +3826,7 @@ function FormComponent(props) {
|
|
|
3515
3826
|
get name() {
|
|
3516
3827
|
return props.name;
|
|
3517
3828
|
}
|
|
3518
|
-
}, {}, () => props.attributes), false, true);
|
|
3829
|
+
}, {}, {}, () => props.attributes), false, true);
|
|
3519
3830
|
insert(_el$, createComponent(Show, {
|
|
3520
3831
|
get when() {
|
|
3521
3832
|
return props.builderBlock && props.builderBlock.children;
|
|
@@ -3581,7 +3892,7 @@ function FormComponent(props) {
|
|
|
3581
3892
|
return memo(() => submissionState() === "error")() && responseData();
|
|
3582
3893
|
},
|
|
3583
3894
|
get children() {
|
|
3584
|
-
const _el$2 = _tmpl$
|
|
3895
|
+
const _el$2 = _tmpl$12();
|
|
3585
3896
|
insert(_el$2, () => JSON.stringify(responseData(), null, 2));
|
|
3586
3897
|
effect(() => className(_el$2, "builder-form-error-text " + css({
|
|
3587
3898
|
padding: "10px",
|
|
@@ -3613,7 +3924,7 @@ function FormComponent(props) {
|
|
|
3613
3924
|
var form_default = FormComponent;
|
|
3614
3925
|
|
|
3615
3926
|
// src/blocks/form/input/component-info.ts
|
|
3616
|
-
var
|
|
3927
|
+
var componentInfo14 = {
|
|
3617
3928
|
name: "Form:Input",
|
|
3618
3929
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",
|
|
3619
3930
|
inputs: [
|
|
@@ -3665,10 +3976,10 @@ var componentInfo13 = {
|
|
|
3665
3976
|
borderColor: "#ccc"
|
|
3666
3977
|
}
|
|
3667
3978
|
};
|
|
3668
|
-
var _tmpl$
|
|
3979
|
+
var _tmpl$13 = /* @__PURE__ */ template(`<input>`);
|
|
3669
3980
|
function FormInputComponent(props) {
|
|
3670
3981
|
return (() => {
|
|
3671
|
-
const _el$ = _tmpl$
|
|
3982
|
+
const _el$ = _tmpl$13();
|
|
3672
3983
|
spread(_el$, mergeProps({}, () => props.attributes, {
|
|
3673
3984
|
get key() {
|
|
3674
3985
|
return isEditing() && props.defaultValue ? props.defaultValue : "default-key";
|
|
@@ -3698,7 +4009,7 @@ function FormInputComponent(props) {
|
|
|
3698
4009
|
var input_default = FormInputComponent;
|
|
3699
4010
|
|
|
3700
4011
|
// src/blocks/form/select/component-info.ts
|
|
3701
|
-
var
|
|
4012
|
+
var componentInfo15 = {
|
|
3702
4013
|
name: "Form:Select",
|
|
3703
4014
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045",
|
|
3704
4015
|
defaultStyles: {
|
|
@@ -3741,11 +4052,11 @@ var componentInfo14 = {
|
|
|
3741
4052
|
static: true,
|
|
3742
4053
|
noWrap: true
|
|
3743
4054
|
};
|
|
3744
|
-
var _tmpl$
|
|
3745
|
-
var _tmpl$
|
|
4055
|
+
var _tmpl$14 = /* @__PURE__ */ template(`<select>`);
|
|
4056
|
+
var _tmpl$26 = /* @__PURE__ */ template(`<option>`);
|
|
3746
4057
|
function SelectComponent(props) {
|
|
3747
4058
|
return (() => {
|
|
3748
|
-
const _el$ = _tmpl$
|
|
4059
|
+
const _el$ = _tmpl$14();
|
|
3749
4060
|
spread(_el$, mergeProps({}, () => props.attributes, {
|
|
3750
4061
|
get value() {
|
|
3751
4062
|
return props.value;
|
|
@@ -3767,7 +4078,7 @@ function SelectComponent(props) {
|
|
|
3767
4078
|
children: (option, _index) => {
|
|
3768
4079
|
const index = _index();
|
|
3769
4080
|
return (() => {
|
|
3770
|
-
const _el$2 = _tmpl$
|
|
4081
|
+
const _el$2 = _tmpl$26();
|
|
3771
4082
|
insert(_el$2, () => option.name || option.value);
|
|
3772
4083
|
effect(() => setAttribute(_el$2, "key", `${option.name}-${index}`));
|
|
3773
4084
|
effect(() => _el$2.value = option.value);
|
|
@@ -3781,7 +4092,7 @@ function SelectComponent(props) {
|
|
|
3781
4092
|
var select_default = SelectComponent;
|
|
3782
4093
|
|
|
3783
4094
|
// src/blocks/form/submit-button/component-info.ts
|
|
3784
|
-
var
|
|
4095
|
+
var componentInfo16 = {
|
|
3785
4096
|
name: "Form:SubmitButton",
|
|
3786
4097
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",
|
|
3787
4098
|
defaultStyles: {
|
|
@@ -3807,10 +4118,10 @@ var componentInfo15 = {
|
|
|
3807
4118
|
// TODO: defaultChildren
|
|
3808
4119
|
// canHaveChildren: true,
|
|
3809
4120
|
};
|
|
3810
|
-
var _tmpl$
|
|
4121
|
+
var _tmpl$15 = /* @__PURE__ */ template(`<button type=submit>`);
|
|
3811
4122
|
function SubmitButton(props) {
|
|
3812
4123
|
return (() => {
|
|
3813
|
-
const _el$ = _tmpl$
|
|
4124
|
+
const _el$ = _tmpl$15();
|
|
3814
4125
|
spread(_el$, mergeProps({}, () => props.attributes), false, true);
|
|
3815
4126
|
insert(_el$, () => props.text);
|
|
3816
4127
|
return _el$;
|
|
@@ -3819,7 +4130,7 @@ function SubmitButton(props) {
|
|
|
3819
4130
|
var submit_button_default = SubmitButton;
|
|
3820
4131
|
|
|
3821
4132
|
// src/blocks/img/component-info.ts
|
|
3822
|
-
var
|
|
4133
|
+
var componentInfo17 = {
|
|
3823
4134
|
// friendlyName?
|
|
3824
4135
|
name: "Raw:Img",
|
|
3825
4136
|
hideFromInsertMenu: true,
|
|
@@ -3834,10 +4145,10 @@ var componentInfo16 = {
|
|
|
3834
4145
|
noWrap: true,
|
|
3835
4146
|
static: true
|
|
3836
4147
|
};
|
|
3837
|
-
var _tmpl$
|
|
4148
|
+
var _tmpl$16 = /* @__PURE__ */ template(`<img>`);
|
|
3838
4149
|
function ImgComponent(props) {
|
|
3839
4150
|
return (() => {
|
|
3840
|
-
const _el$ = _tmpl$
|
|
4151
|
+
const _el$ = _tmpl$16();
|
|
3841
4152
|
spread(_el$, mergeProps({
|
|
3842
4153
|
get style() {
|
|
3843
4154
|
return {
|
|
@@ -3861,7 +4172,7 @@ function ImgComponent(props) {
|
|
|
3861
4172
|
var img_default = ImgComponent;
|
|
3862
4173
|
|
|
3863
4174
|
// src/blocks/video/component-info.ts
|
|
3864
|
-
var
|
|
4175
|
+
var componentInfo18 = {
|
|
3865
4176
|
name: "Video",
|
|
3866
4177
|
canHaveChildren: true,
|
|
3867
4178
|
defaultStyles: {
|
|
@@ -3943,8 +4254,8 @@ var componentInfo17 = {
|
|
|
3943
4254
|
advanced: true
|
|
3944
4255
|
}]
|
|
3945
4256
|
};
|
|
3946
|
-
var _tmpl$
|
|
3947
|
-
var _tmpl$
|
|
4257
|
+
var _tmpl$17 = /* @__PURE__ */ template(`<source type=video/mp4>`);
|
|
4258
|
+
var _tmpl$27 = /* @__PURE__ */ template(`<div>`);
|
|
3948
4259
|
var _tmpl$34 = /* @__PURE__ */ template(`<div><video class=builder-video>`);
|
|
3949
4260
|
function Video(props) {
|
|
3950
4261
|
const videoProps = createMemo(() => {
|
|
@@ -4006,7 +4317,7 @@ function Video(props) {
|
|
|
4006
4317
|
return !props.lazyLoad;
|
|
4007
4318
|
},
|
|
4008
4319
|
get children() {
|
|
4009
|
-
const _el$3 = _tmpl$
|
|
4320
|
+
const _el$3 = _tmpl$17();
|
|
4010
4321
|
effect(() => setAttribute(_el$3, "src", props.video));
|
|
4011
4322
|
return _el$3;
|
|
4012
4323
|
}
|
|
@@ -4016,7 +4327,7 @@ function Video(props) {
|
|
|
4016
4327
|
return props.aspectRatio && !(props.fitContent && props.builderBlock?.children?.length);
|
|
4017
4328
|
},
|
|
4018
4329
|
get children() {
|
|
4019
|
-
const _el$4 = _tmpl$
|
|
4330
|
+
const _el$4 = _tmpl$27();
|
|
4020
4331
|
_el$4.style.setProperty("width", "100%");
|
|
4021
4332
|
_el$4.style.setProperty("pointer-events", "none");
|
|
4022
4333
|
_el$4.style.setProperty("font-size", "0px");
|
|
@@ -4029,7 +4340,7 @@ function Video(props) {
|
|
|
4029
4340
|
return props.builderBlock?.children?.length && props.fitContent;
|
|
4030
4341
|
},
|
|
4031
4342
|
get children() {
|
|
4032
|
-
const _el$5 = _tmpl$
|
|
4343
|
+
const _el$5 = _tmpl$27();
|
|
4033
4344
|
_el$5.style.setProperty("display", "flex");
|
|
4034
4345
|
_el$5.style.setProperty("flex-direction", "column");
|
|
4035
4346
|
_el$5.style.setProperty("align-items", "stretch");
|
|
@@ -4042,7 +4353,7 @@ function Video(props) {
|
|
|
4042
4353
|
return props.builderBlock?.children?.length && !props.fitContent;
|
|
4043
4354
|
},
|
|
4044
4355
|
get children() {
|
|
4045
|
-
const _el$6 = _tmpl$
|
|
4356
|
+
const _el$6 = _tmpl$27();
|
|
4046
4357
|
_el$6.style.setProperty("pointer-events", "none");
|
|
4047
4358
|
_el$6.style.setProperty("display", "flex");
|
|
4048
4359
|
_el$6.style.setProperty("flex-direction", "column");
|
|
@@ -4064,58 +4375,61 @@ var video_default = Video;
|
|
|
4064
4375
|
// src/constants/extra-components.ts
|
|
4065
4376
|
var getExtraComponents = () => [{
|
|
4066
4377
|
component: custom_code_default,
|
|
4067
|
-
...
|
|
4378
|
+
...componentInfo11
|
|
4068
4379
|
}, {
|
|
4069
4380
|
component: embed_default,
|
|
4070
|
-
...
|
|
4381
|
+
...componentInfo12
|
|
4071
4382
|
}, ...TARGET === "rsc" ? [] : [{
|
|
4072
4383
|
component: form_default,
|
|
4073
|
-
...
|
|
4384
|
+
...componentInfo13
|
|
4074
4385
|
}, {
|
|
4075
4386
|
component: input_default,
|
|
4076
|
-
...
|
|
4387
|
+
...componentInfo14
|
|
4077
4388
|
}, {
|
|
4078
4389
|
component: submit_button_default,
|
|
4079
|
-
...
|
|
4390
|
+
...componentInfo16
|
|
4080
4391
|
}, {
|
|
4081
4392
|
component: select_default,
|
|
4082
|
-
...
|
|
4393
|
+
...componentInfo15
|
|
4083
4394
|
}], {
|
|
4084
4395
|
component: img_default,
|
|
4085
|
-
...
|
|
4396
|
+
...componentInfo17
|
|
4086
4397
|
}, {
|
|
4087
4398
|
component: video_default,
|
|
4088
|
-
...
|
|
4399
|
+
...componentInfo18
|
|
4089
4400
|
}];
|
|
4090
4401
|
|
|
4091
4402
|
// src/constants/builder-registered-components.ts
|
|
4092
4403
|
var getDefaultRegisteredComponents = () => [{
|
|
4093
4404
|
component: button_default,
|
|
4094
|
-
...
|
|
4405
|
+
...componentInfo2
|
|
4095
4406
|
}, {
|
|
4096
4407
|
component: columns_default,
|
|
4097
|
-
...
|
|
4408
|
+
...componentInfo3
|
|
4098
4409
|
}, {
|
|
4099
4410
|
component: fragment_default,
|
|
4100
|
-
...
|
|
4411
|
+
...componentInfo4
|
|
4101
4412
|
}, {
|
|
4102
4413
|
component: image_default,
|
|
4103
|
-
...
|
|
4414
|
+
...componentInfo5
|
|
4104
4415
|
}, {
|
|
4105
4416
|
component: section_default,
|
|
4106
|
-
...
|
|
4417
|
+
...componentInfo6
|
|
4107
4418
|
}, {
|
|
4108
4419
|
component: slot_default,
|
|
4109
|
-
...
|
|
4420
|
+
...componentInfo7
|
|
4110
4421
|
}, {
|
|
4111
4422
|
component: symbol_default,
|
|
4112
|
-
...
|
|
4423
|
+
...componentInfo8
|
|
4113
4424
|
}, {
|
|
4114
4425
|
component: text_default,
|
|
4115
|
-
...
|
|
4426
|
+
...componentInfo10
|
|
4116
4427
|
}, ...TARGET === "rsc" ? [] : [{
|
|
4117
4428
|
component: tabs_default,
|
|
4118
|
-
...
|
|
4429
|
+
...componentInfo9
|
|
4430
|
+
}, {
|
|
4431
|
+
component: accordion_default,
|
|
4432
|
+
...componentInfo
|
|
4119
4433
|
}], ...getExtraComponents()];
|
|
4120
4434
|
|
|
4121
4435
|
// src/functions/register-component.ts
|
|
@@ -4185,10 +4499,10 @@ var getUpdateVariantVisibilityScript = ({
|
|
|
4185
4499
|
}) => `window.${UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME}(
|
|
4186
4500
|
"${variationId}", "${contentId}", ${isHydrationTarget}
|
|
4187
4501
|
)`;
|
|
4188
|
-
var _tmpl$
|
|
4502
|
+
var _tmpl$18 = /* @__PURE__ */ template(`<script>`);
|
|
4189
4503
|
function InlinedScript(props) {
|
|
4190
4504
|
return (() => {
|
|
4191
|
-
const _el$ = _tmpl$
|
|
4505
|
+
const _el$ = _tmpl$18();
|
|
4192
4506
|
effect((_p$) => {
|
|
4193
4507
|
const _v$ = props.scriptStr, _v$2 = props.id;
|
|
4194
4508
|
_v$ !== _p$._v$ && (_el$.innerHTML = _p$._v$ = _v$);
|
|
@@ -4694,7 +5008,7 @@ function isFromTrustedHost(trustedHosts, e) {
|
|
|
4694
5008
|
}
|
|
4695
5009
|
|
|
4696
5010
|
// src/constants/sdk-version.ts
|
|
4697
|
-
var SDK_VERSION = "1.0.
|
|
5011
|
+
var SDK_VERSION = "1.0.29";
|
|
4698
5012
|
|
|
4699
5013
|
// src/functions/register.ts
|
|
4700
5014
|
var registry = {};
|
|
@@ -5158,7 +5472,7 @@ function EnableEditor(props) {
|
|
|
5158
5472
|
if (isPreviewing() && !isEditing()) {
|
|
5159
5473
|
const searchParams = new URL(location.href).searchParams;
|
|
5160
5474
|
const searchParamPreviewModel = searchParams.get("builder.preview");
|
|
5161
|
-
const searchParamPreviewId = searchParams.get(`builder.
|
|
5475
|
+
const searchParamPreviewId = searchParams.get(`builder.overrides.${searchParamPreviewModel}`);
|
|
5162
5476
|
const previewApiKey = searchParams.get("apiKey") || searchParams.get("builder.space");
|
|
5163
5477
|
if (searchParamPreviewModel === props.model && previewApiKey === props.apiKey && (!props.content || searchParamPreviewId === props.content.id)) {
|
|
5164
5478
|
fetchOneEntry({
|
|
@@ -5176,7 +5490,7 @@ function EnableEditor(props) {
|
|
|
5176
5490
|
});
|
|
5177
5491
|
onMount(() => {
|
|
5178
5492
|
if (!props.apiKey) {
|
|
5179
|
-
logger.error("No API key provided to `
|
|
5493
|
+
logger.error("No API key provided to `Content` component. This can cause issues. Please provide an API key using the `apiKey` prop.");
|
|
5180
5494
|
}
|
|
5181
5495
|
evaluateJsCode();
|
|
5182
5496
|
runHttpRequests();
|
|
@@ -5678,7 +5992,7 @@ var fetchSymbolContent = async ({
|
|
|
5678
5992
|
};
|
|
5679
5993
|
|
|
5680
5994
|
// src/blocks/symbol/symbol.tsx
|
|
5681
|
-
var _tmpl$
|
|
5995
|
+
var _tmpl$19 = /* @__PURE__ */ template(`<div>`);
|
|
5682
5996
|
function Symbol(props) {
|
|
5683
5997
|
const [contentToUse, setContentToUse] = createSignal(props.symbol?.content);
|
|
5684
5998
|
const blocksWrapper = createMemo(() => {
|
|
@@ -5710,7 +6024,7 @@ function Symbol(props) {
|
|
|
5710
6024
|
}
|
|
5711
6025
|
createEffect(on(() => [onUpdateFn_0_props_symbol()], onUpdateFn_0));
|
|
5712
6026
|
return (() => {
|
|
5713
|
-
const _el$ = _tmpl$
|
|
6027
|
+
const _el$ = _tmpl$19();
|
|
5714
6028
|
spread(_el$, mergeProps({
|
|
5715
6029
|
get ["class"]() {
|
|
5716
6030
|
return className();
|