@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/dev.js
CHANGED
|
@@ -483,6 +483,9 @@ function getProcessedBlock({
|
|
|
483
483
|
}
|
|
484
484
|
}
|
|
485
485
|
|
|
486
|
+
// src/functions/camel-to-kebab-case.ts
|
|
487
|
+
var camelToKebabCase = (str) => str ? str.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase() : "";
|
|
488
|
+
|
|
486
489
|
// src/components/block/animator.ts
|
|
487
490
|
function throttle(func, wait, options = {}) {
|
|
488
491
|
let context;
|
|
@@ -533,7 +536,6 @@ function assign(target, ..._args) {
|
|
|
533
536
|
}
|
|
534
537
|
return to;
|
|
535
538
|
}
|
|
536
|
-
var camelCaseToKebabCase = (str) => str ? str.replace(/([A-Z])/g, (g) => `-${g[0].toLowerCase()}`) : "";
|
|
537
539
|
function bindAnimations(animations) {
|
|
538
540
|
for (const animation of animations) {
|
|
539
541
|
switch (animation.trigger) {
|
|
@@ -586,7 +588,7 @@ function triggerAnimation(animation) {
|
|
|
586
588
|
element.style.transitionDelay = "0";
|
|
587
589
|
assign(element.style, animation.steps[0].styles);
|
|
588
590
|
setTimeout(() => {
|
|
589
|
-
element.style.transition = `all ${animation.duration}s ${
|
|
591
|
+
element.style.transition = `all ${animation.duration}s ${camelToKebabCase(animation.easing)}`;
|
|
590
592
|
if (animation.delay) {
|
|
591
593
|
element.style.transitionDelay = animation.delay + "s";
|
|
592
594
|
}
|
|
@@ -646,7 +648,7 @@ function bindScrollInViewAnimation(animation) {
|
|
|
646
648
|
}
|
|
647
649
|
attachDefaultState();
|
|
648
650
|
setTimeout(() => {
|
|
649
|
-
element.style.transition = `all ${animation.duration}s ${
|
|
651
|
+
element.style.transition = `all ${animation.duration}s ${camelToKebabCase(animation.easing)}`;
|
|
650
652
|
if (animation.delay) {
|
|
651
653
|
element.style.transitionDelay = animation.delay + "s";
|
|
652
654
|
}
|
|
@@ -659,9 +661,6 @@ function bindScrollInViewAnimation(animation) {
|
|
|
659
661
|
});
|
|
660
662
|
}
|
|
661
663
|
|
|
662
|
-
// src/functions/camel-to-kebab-case.ts
|
|
663
|
-
var camelToKebabCase = (string) => string.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase();
|
|
664
|
-
|
|
665
664
|
// src/helpers/css.ts
|
|
666
665
|
var convertStyleMapToCSSArray = (style) => {
|
|
667
666
|
const cssProps = Object.entries(style).map(([key, value]) => {
|
|
@@ -791,10 +790,10 @@ var getRepeatItemData = ({
|
|
|
791
790
|
return repeatArray;
|
|
792
791
|
};
|
|
793
792
|
var shouldPassLinkComponent = (block) => {
|
|
794
|
-
return block && (block.isRSC || ["Core:Button", "Symbol", "Columns", "Form:Form", "Builder: Tabs"].includes(block.name));
|
|
793
|
+
return block && (block.isRSC || ["Core:Button", "Symbol", "Columns", "Form:Form", "Builder: Tabs", "Builder:Accordion"].includes(block.name));
|
|
795
794
|
};
|
|
796
795
|
var shouldPassRegisteredComponents = (block) => {
|
|
797
|
-
return block && (block.isRSC || ["Symbol", "Columns", "Form:Form", "Builder: Tabs"].includes(block.name));
|
|
796
|
+
return block && (block.isRSC || ["Symbol", "Columns", "Form:Form", "Builder: Tabs", "Builder:Accordion"].includes(block.name));
|
|
798
797
|
};
|
|
799
798
|
|
|
800
799
|
// src/constants/device-sizes.ts
|
|
@@ -923,7 +922,7 @@ function BlockStyles(props) {
|
|
|
923
922
|
className: `${className}:hover`,
|
|
924
923
|
styles: {
|
|
925
924
|
...hoverStyles,
|
|
926
|
-
transition: `all ${hoverAnimation.duration}s ${
|
|
925
|
+
transition: `all ${hoverAnimation.duration}s ${camelToKebabCase(hoverAnimation.easing)}`,
|
|
927
926
|
transitionDelay: hoverAnimation.delay ? `${hoverAnimation.delay}s` : "0s"
|
|
928
927
|
}
|
|
929
928
|
}) || "";
|
|
@@ -2130,8 +2129,320 @@ var handleABTesting = async ({
|
|
|
2130
2129
|
// src/helpers/canTrack.ts
|
|
2131
2130
|
var getDefaultCanTrack = (canTrack) => checkIsDefined(canTrack) ? canTrack : true;
|
|
2132
2131
|
|
|
2133
|
-
// src/blocks/
|
|
2132
|
+
// src/blocks/accordion/component-info.ts
|
|
2133
|
+
var defaultTitle = {
|
|
2134
|
+
"@type": "@builder.io/sdk:Element",
|
|
2135
|
+
layerName: "Accordion item title",
|
|
2136
|
+
responsiveStyles: {
|
|
2137
|
+
large: {
|
|
2138
|
+
marginTop: "10px",
|
|
2139
|
+
position: "relative",
|
|
2140
|
+
display: "flex",
|
|
2141
|
+
alignItems: "stretch",
|
|
2142
|
+
flexDirection: "column",
|
|
2143
|
+
paddingBottom: "10px"
|
|
2144
|
+
}
|
|
2145
|
+
},
|
|
2146
|
+
children: [{
|
|
2147
|
+
"@type": "@builder.io/sdk:Element",
|
|
2148
|
+
responsiveStyles: {
|
|
2149
|
+
large: {
|
|
2150
|
+
textAlign: "left",
|
|
2151
|
+
display: "flex",
|
|
2152
|
+
flexDirection: "column"
|
|
2153
|
+
}
|
|
2154
|
+
},
|
|
2155
|
+
component: {
|
|
2156
|
+
name: "Text",
|
|
2157
|
+
options: {
|
|
2158
|
+
text: "I am an accordion title. Click me!"
|
|
2159
|
+
}
|
|
2160
|
+
}
|
|
2161
|
+
}]
|
|
2162
|
+
};
|
|
2163
|
+
var defaultDetail = {
|
|
2164
|
+
"@type": "@builder.io/sdk:Element",
|
|
2165
|
+
layerName: "Accordion item detail",
|
|
2166
|
+
responsiveStyles: {
|
|
2167
|
+
large: {
|
|
2168
|
+
position: "relative",
|
|
2169
|
+
display: "flex",
|
|
2170
|
+
alignItems: "stretch",
|
|
2171
|
+
flexDirection: "column",
|
|
2172
|
+
marginTop: "10px",
|
|
2173
|
+
paddingBottom: "10px"
|
|
2174
|
+
}
|
|
2175
|
+
},
|
|
2176
|
+
children: [{
|
|
2177
|
+
"@type": "@builder.io/sdk:Element",
|
|
2178
|
+
responsiveStyles: {
|
|
2179
|
+
large: {
|
|
2180
|
+
paddingTop: "50px",
|
|
2181
|
+
textAlign: "left",
|
|
2182
|
+
display: "flex",
|
|
2183
|
+
flexDirection: "column",
|
|
2184
|
+
paddingBottom: "50px"
|
|
2185
|
+
}
|
|
2186
|
+
},
|
|
2187
|
+
component: {
|
|
2188
|
+
name: "Text",
|
|
2189
|
+
options: {
|
|
2190
|
+
text: "I am an accordion detail, hello!"
|
|
2191
|
+
}
|
|
2192
|
+
}
|
|
2193
|
+
}]
|
|
2194
|
+
};
|
|
2134
2195
|
var componentInfo = {
|
|
2196
|
+
name: "Builder:Accordion",
|
|
2197
|
+
canHaveChildren: true,
|
|
2198
|
+
image: "https://cdn.builder.io/api/v1/image/assets%2FagZ9n5CUKRfbL9t6CaJOyVSK4Es2%2Ffab6c1fd3fe542408cbdec078bca7f35",
|
|
2199
|
+
defaultStyles: {
|
|
2200
|
+
display: "flex",
|
|
2201
|
+
flexDirection: "column",
|
|
2202
|
+
alignItems: "stretch"
|
|
2203
|
+
},
|
|
2204
|
+
inputs: [{
|
|
2205
|
+
name: "items",
|
|
2206
|
+
type: "list",
|
|
2207
|
+
broadcast: true,
|
|
2208
|
+
subFields: [{
|
|
2209
|
+
name: "title",
|
|
2210
|
+
type: "uiBlocks",
|
|
2211
|
+
hideFromUI: true,
|
|
2212
|
+
defaultValue: [defaultTitle]
|
|
2213
|
+
}, {
|
|
2214
|
+
name: "detail",
|
|
2215
|
+
type: "uiBlocks",
|
|
2216
|
+
hideFromUI: true,
|
|
2217
|
+
defaultValue: [defaultDetail]
|
|
2218
|
+
}],
|
|
2219
|
+
defaultValue: [{
|
|
2220
|
+
title: [defaultTitle],
|
|
2221
|
+
detail: [defaultDetail]
|
|
2222
|
+
}, {
|
|
2223
|
+
title: [defaultTitle],
|
|
2224
|
+
detail: [defaultDetail]
|
|
2225
|
+
}],
|
|
2226
|
+
showIf: (options) => !options.get("useChildrenForItems")
|
|
2227
|
+
}, {
|
|
2228
|
+
name: "oneAtATime",
|
|
2229
|
+
helperText: "Only allow opening one at a time (collapse all others when new item openned)",
|
|
2230
|
+
type: "boolean",
|
|
2231
|
+
defaultValue: false
|
|
2232
|
+
}, {
|
|
2233
|
+
name: "grid",
|
|
2234
|
+
helperText: "Display as a grid",
|
|
2235
|
+
type: "boolean",
|
|
2236
|
+
defaultValue: false
|
|
2237
|
+
}, {
|
|
2238
|
+
name: "gridRowWidth",
|
|
2239
|
+
helperText: "Display as a grid",
|
|
2240
|
+
type: "string",
|
|
2241
|
+
showIf: (options) => options.get("grid"),
|
|
2242
|
+
defaultValue: "25%"
|
|
2243
|
+
}, {
|
|
2244
|
+
name: "useChildrenForItems",
|
|
2245
|
+
type: "boolean",
|
|
2246
|
+
helperText: "Use child elements for each slide, instead of the array. Useful for dynamically repeating items",
|
|
2247
|
+
advanced: true,
|
|
2248
|
+
defaultValue: false,
|
|
2249
|
+
onChange: (options) => {
|
|
2250
|
+
if (options.get("useChildrenForItems") === true) {
|
|
2251
|
+
options.set("items", []);
|
|
2252
|
+
}
|
|
2253
|
+
}
|
|
2254
|
+
}]
|
|
2255
|
+
};
|
|
2256
|
+
|
|
2257
|
+
// src/blocks/accordion/helpers.ts
|
|
2258
|
+
var convertOrderNumberToString = (order) => {
|
|
2259
|
+
return order.toString();
|
|
2260
|
+
};
|
|
2261
|
+
|
|
2262
|
+
// src/blocks/accordion/accordion.tsx
|
|
2263
|
+
var _tmpl$6 = /* @__PURE__ */ template(`<div class=builder-accordion>`);
|
|
2264
|
+
var _tmpl$23 = /* @__PURE__ */ template(`<div>`);
|
|
2265
|
+
function Accordion(props) {
|
|
2266
|
+
const [open, setOpen] = createSignal([]);
|
|
2267
|
+
const onlyOneAtATime = createMemo(() => {
|
|
2268
|
+
return Boolean(props.grid || props.oneAtATime);
|
|
2269
|
+
});
|
|
2270
|
+
const accordionStyles = createMemo(() => {
|
|
2271
|
+
const styles = {
|
|
2272
|
+
display: "flex",
|
|
2273
|
+
alignItems: "stretch",
|
|
2274
|
+
flexDirection: "column",
|
|
2275
|
+
...props.grid && {
|
|
2276
|
+
flexDirection: "row",
|
|
2277
|
+
alignItems: "flex-start",
|
|
2278
|
+
flexWrap: "wrap"
|
|
2279
|
+
}
|
|
2280
|
+
};
|
|
2281
|
+
return Object.fromEntries(Object.entries(styles).map(([key, value]) => [camelToKebabCase(key), value]));
|
|
2282
|
+
});
|
|
2283
|
+
const accordionTitleStyles = createMemo(() => {
|
|
2284
|
+
const shared = {
|
|
2285
|
+
display: "flex",
|
|
2286
|
+
flexDirection: "column"
|
|
2287
|
+
};
|
|
2288
|
+
const styles = Object.fromEntries(Object.entries({
|
|
2289
|
+
...shared,
|
|
2290
|
+
alignItems: "stretch",
|
|
2291
|
+
cursor: "pointer"
|
|
2292
|
+
}).map(([key, value]) => [camelToKebabCase(key), value]));
|
|
2293
|
+
return Object.fromEntries(Object.entries(styles).filter(([_, value]) => value !== void 0));
|
|
2294
|
+
});
|
|
2295
|
+
function getAccordionTitleClassName(index) {
|
|
2296
|
+
return `builder-accordion-title builder-accordion-title-${open().includes(index) ? "open" : "closed"}`;
|
|
2297
|
+
}
|
|
2298
|
+
function getAccordionDetailClassName(index) {
|
|
2299
|
+
return `builder-accordion-detail builder-accordion-detail-${open().includes(index) ? "open" : "closed"}`;
|
|
2300
|
+
}
|
|
2301
|
+
const openGridItemOrder = createMemo(() => {
|
|
2302
|
+
let itemOrder = null;
|
|
2303
|
+
const getOpenGridItemPosition = props.grid && open().length;
|
|
2304
|
+
if (getOpenGridItemPosition && document) {
|
|
2305
|
+
const openItemIndex = open()[0];
|
|
2306
|
+
const openItem = document.querySelector(`.builder-accordion-title[data-index="${openItemIndex}"]`);
|
|
2307
|
+
let subjectItem = openItem;
|
|
2308
|
+
itemOrder = openItemIndex;
|
|
2309
|
+
if (subjectItem) {
|
|
2310
|
+
let prevItemRect = subjectItem.getBoundingClientRect();
|
|
2311
|
+
while (subjectItem = subjectItem && subjectItem.nextElementSibling) {
|
|
2312
|
+
if (subjectItem) {
|
|
2313
|
+
if (subjectItem.classList.contains("builder-accordion-detail")) {
|
|
2314
|
+
continue;
|
|
2315
|
+
}
|
|
2316
|
+
const subjectItemRect = subjectItem.getBoundingClientRect();
|
|
2317
|
+
if (subjectItemRect.left > prevItemRect.left) {
|
|
2318
|
+
const index = parseInt(subjectItem.getAttribute("data-index") || "", 10);
|
|
2319
|
+
if (!isNaN(index)) {
|
|
2320
|
+
prevItemRect = subjectItemRect;
|
|
2321
|
+
itemOrder = index;
|
|
2322
|
+
}
|
|
2323
|
+
} else {
|
|
2324
|
+
break;
|
|
2325
|
+
}
|
|
2326
|
+
}
|
|
2327
|
+
}
|
|
2328
|
+
}
|
|
2329
|
+
}
|
|
2330
|
+
if (typeof itemOrder === "number") {
|
|
2331
|
+
itemOrder = itemOrder + 1;
|
|
2332
|
+
}
|
|
2333
|
+
return itemOrder;
|
|
2334
|
+
});
|
|
2335
|
+
const accordionDetailStyles = createMemo(() => {
|
|
2336
|
+
const styles = {
|
|
2337
|
+
...{
|
|
2338
|
+
order: typeof openGridItemOrder() === "number" ? openGridItemOrder() : void 0
|
|
2339
|
+
},
|
|
2340
|
+
...props.grid && {
|
|
2341
|
+
width: "100%"
|
|
2342
|
+
}
|
|
2343
|
+
};
|
|
2344
|
+
return Object.fromEntries(Object.entries(styles).filter(([_, value]) => value !== void 0));
|
|
2345
|
+
});
|
|
2346
|
+
function onClick(index) {
|
|
2347
|
+
if (open().includes(index)) {
|
|
2348
|
+
setOpen(onlyOneAtATime() ? [] : open().filter((item) => item !== index));
|
|
2349
|
+
} else {
|
|
2350
|
+
setOpen(onlyOneAtATime() ? [index] : open().concat(index));
|
|
2351
|
+
}
|
|
2352
|
+
}
|
|
2353
|
+
return (() => {
|
|
2354
|
+
const _el$ = _tmpl$6();
|
|
2355
|
+
insert(_el$, createComponent(For, {
|
|
2356
|
+
get each() {
|
|
2357
|
+
return props.items;
|
|
2358
|
+
},
|
|
2359
|
+
children: (item, _index) => {
|
|
2360
|
+
const index = _index();
|
|
2361
|
+
return [(() => {
|
|
2362
|
+
const _el$2 = _tmpl$23();
|
|
2363
|
+
_el$2.$$click = (event) => onClick(index);
|
|
2364
|
+
setAttribute(_el$2, "data-index", index);
|
|
2365
|
+
insert(_el$2, createComponent(blocks_default, {
|
|
2366
|
+
get blocks() {
|
|
2367
|
+
return item.title;
|
|
2368
|
+
},
|
|
2369
|
+
path: `items.${index}.title`,
|
|
2370
|
+
get parent() {
|
|
2371
|
+
return props.builderBlock.id;
|
|
2372
|
+
},
|
|
2373
|
+
get context() {
|
|
2374
|
+
return props.builderContext;
|
|
2375
|
+
},
|
|
2376
|
+
get registeredComponents() {
|
|
2377
|
+
return props.builderComponents;
|
|
2378
|
+
},
|
|
2379
|
+
get linkComponent() {
|
|
2380
|
+
return props.builderLinkComponent;
|
|
2381
|
+
}
|
|
2382
|
+
}));
|
|
2383
|
+
effect((_p$) => {
|
|
2384
|
+
const _v$ = getAccordionTitleClassName(index), _v$2 = {
|
|
2385
|
+
...accordionTitleStyles(),
|
|
2386
|
+
width: props.grid ? props.gridRowWidth : void 0,
|
|
2387
|
+
...{
|
|
2388
|
+
order: openGridItemOrder() !== null ? convertOrderNumberToString(index) : convertOrderNumberToString(index + 1)
|
|
2389
|
+
}
|
|
2390
|
+
};
|
|
2391
|
+
_v$ !== _p$._v$ && className(_el$2, _p$._v$ = _v$);
|
|
2392
|
+
_p$._v$2 = style(_el$2, _v$2, _p$._v$2);
|
|
2393
|
+
return _p$;
|
|
2394
|
+
}, {
|
|
2395
|
+
_v$: void 0,
|
|
2396
|
+
_v$2: void 0
|
|
2397
|
+
});
|
|
2398
|
+
return _el$2;
|
|
2399
|
+
})(), createComponent(Show, {
|
|
2400
|
+
get when() {
|
|
2401
|
+
return open().includes(index);
|
|
2402
|
+
},
|
|
2403
|
+
get children() {
|
|
2404
|
+
const _el$3 = _tmpl$23();
|
|
2405
|
+
insert(_el$3, createComponent(blocks_default, {
|
|
2406
|
+
get blocks() {
|
|
2407
|
+
return item.detail;
|
|
2408
|
+
},
|
|
2409
|
+
path: `items.${index}.detail`,
|
|
2410
|
+
get parent() {
|
|
2411
|
+
return props.builderBlock.id;
|
|
2412
|
+
},
|
|
2413
|
+
get context() {
|
|
2414
|
+
return props.builderContext;
|
|
2415
|
+
},
|
|
2416
|
+
get registeredComponents() {
|
|
2417
|
+
return props.builderComponents;
|
|
2418
|
+
},
|
|
2419
|
+
get linkComponent() {
|
|
2420
|
+
return props.builderLinkComponent;
|
|
2421
|
+
}
|
|
2422
|
+
}));
|
|
2423
|
+
effect((_p$) => {
|
|
2424
|
+
const _v$3 = getAccordionDetailClassName(index), _v$4 = accordionDetailStyles();
|
|
2425
|
+
_v$3 !== _p$._v$3 && className(_el$3, _p$._v$3 = _v$3);
|
|
2426
|
+
_p$._v$4 = style(_el$3, _v$4, _p$._v$4);
|
|
2427
|
+
return _p$;
|
|
2428
|
+
}, {
|
|
2429
|
+
_v$3: void 0,
|
|
2430
|
+
_v$4: void 0
|
|
2431
|
+
});
|
|
2432
|
+
return _el$3;
|
|
2433
|
+
}
|
|
2434
|
+
})];
|
|
2435
|
+
}
|
|
2436
|
+
}));
|
|
2437
|
+
effect((_$p) => style(_el$, accordionStyles(), _$p));
|
|
2438
|
+
return _el$;
|
|
2439
|
+
})();
|
|
2440
|
+
}
|
|
2441
|
+
var accordion_default = Accordion;
|
|
2442
|
+
delegateEvents(["click"]);
|
|
2443
|
+
|
|
2444
|
+
// src/blocks/button/component-info.ts
|
|
2445
|
+
var componentInfo2 = {
|
|
2135
2446
|
name: "Core:Button",
|
|
2136
2447
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
|
|
2137
2448
|
defaultStyles: {
|
|
@@ -2167,7 +2478,7 @@ var componentInfo = {
|
|
|
2167
2478
|
};
|
|
2168
2479
|
|
|
2169
2480
|
// src/blocks/columns/component-info.ts
|
|
2170
|
-
var
|
|
2481
|
+
var componentInfo3 = {
|
|
2171
2482
|
// TODO: ways to statically preprocess JSON for references, functions, etc
|
|
2172
2483
|
name: "Columns",
|
|
2173
2484
|
isRSC: true,
|
|
@@ -2387,7 +2698,7 @@ var componentInfo2 = {
|
|
|
2387
2698
|
};
|
|
2388
2699
|
|
|
2389
2700
|
// src/blocks/fragment/component-info.ts
|
|
2390
|
-
var
|
|
2701
|
+
var componentInfo4 = {
|
|
2391
2702
|
name: "Fragment",
|
|
2392
2703
|
static: true,
|
|
2393
2704
|
hidden: true,
|
|
@@ -2396,7 +2707,7 @@ var componentInfo3 = {
|
|
|
2396
2707
|
};
|
|
2397
2708
|
|
|
2398
2709
|
// src/blocks/image/component-info.ts
|
|
2399
|
-
var
|
|
2710
|
+
var componentInfo5 = {
|
|
2400
2711
|
name: "Image",
|
|
2401
2712
|
static: true,
|
|
2402
2713
|
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",
|
|
@@ -2519,7 +2830,7 @@ var componentInfo4 = {
|
|
|
2519
2830
|
};
|
|
2520
2831
|
|
|
2521
2832
|
// src/blocks/section/component-info.ts
|
|
2522
|
-
var
|
|
2833
|
+
var componentInfo6 = {
|
|
2523
2834
|
name: "Core:Section",
|
|
2524
2835
|
static: true,
|
|
2525
2836
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
|
|
@@ -2561,7 +2872,7 @@ var componentInfo5 = {
|
|
|
2561
2872
|
};
|
|
2562
2873
|
|
|
2563
2874
|
// src/blocks/slot/component-info.ts
|
|
2564
|
-
var
|
|
2875
|
+
var componentInfo7 = {
|
|
2565
2876
|
name: "Slot",
|
|
2566
2877
|
isRSC: true,
|
|
2567
2878
|
description: "Allow child blocks to be inserted into this content when used as a Symbol",
|
|
@@ -2575,10 +2886,10 @@ var componentInfo6 = {
|
|
|
2575
2886
|
defaultValue: "children"
|
|
2576
2887
|
}]
|
|
2577
2888
|
};
|
|
2578
|
-
var _tmpl$
|
|
2889
|
+
var _tmpl$7 = /* @__PURE__ */ template(`<div>`);
|
|
2579
2890
|
function Slot(props) {
|
|
2580
2891
|
return (() => {
|
|
2581
|
-
const _el$ = _tmpl$
|
|
2892
|
+
const _el$ = _tmpl$7();
|
|
2582
2893
|
_el$.style.setProperty("pointer-events", "auto");
|
|
2583
2894
|
spread(_el$, mergeProps(() => !props.builderContext.context?.symbolId && {
|
|
2584
2895
|
"builder-slot": props.name
|
|
@@ -2603,7 +2914,7 @@ function Slot(props) {
|
|
|
2603
2914
|
var slot_default = Slot;
|
|
2604
2915
|
|
|
2605
2916
|
// src/blocks/symbol/component-info.ts
|
|
2606
|
-
var
|
|
2917
|
+
var componentInfo8 = {
|
|
2607
2918
|
name: "Symbol",
|
|
2608
2919
|
noWrap: true,
|
|
2609
2920
|
static: true,
|
|
@@ -2679,7 +2990,7 @@ var defaultElement = {
|
|
|
2679
2990
|
}
|
|
2680
2991
|
}
|
|
2681
2992
|
};
|
|
2682
|
-
var
|
|
2993
|
+
var componentInfo9 = {
|
|
2683
2994
|
name: "Builder: Tabs",
|
|
2684
2995
|
inputs: [{
|
|
2685
2996
|
name: "tabs",
|
|
@@ -2777,19 +3088,23 @@ var componentInfo8 = {
|
|
|
2777
3088
|
}]
|
|
2778
3089
|
}]
|
|
2779
3090
|
};
|
|
2780
|
-
var _tmpl$
|
|
2781
|
-
var _tmpl$
|
|
3091
|
+
var _tmpl$8 = /* @__PURE__ */ template(`<div>`);
|
|
3092
|
+
var _tmpl$24 = /* @__PURE__ */ template(`<div><div class=builder-tabs-wrap>`);
|
|
2782
3093
|
var _tmpl$33 = /* @__PURE__ */ template(`<span>`);
|
|
2783
3094
|
function Tabs(props) {
|
|
2784
3095
|
const [activeTab, setActiveTab] = createSignal(props.defaultActiveTab ? props.defaultActiveTab - 1 : 0);
|
|
2785
3096
|
function activeTabContent(active) {
|
|
2786
3097
|
return props.tabs && props.tabs[active].content;
|
|
2787
3098
|
}
|
|
2788
|
-
function
|
|
2789
|
-
|
|
3099
|
+
function onClick(index) {
|
|
3100
|
+
if (index === activeTab() && props.collapsible) {
|
|
3101
|
+
setActiveTab(-1);
|
|
3102
|
+
} else {
|
|
3103
|
+
setActiveTab(index);
|
|
3104
|
+
}
|
|
2790
3105
|
}
|
|
2791
3106
|
return (() => {
|
|
2792
|
-
const _el$ = _tmpl$
|
|
3107
|
+
const _el$ = _tmpl$24(), _el$2 = _el$.firstChild;
|
|
2793
3108
|
_el$2.style.setProperty("display", "flex");
|
|
2794
3109
|
_el$2.style.setProperty("flex-direction", "row");
|
|
2795
3110
|
_el$2.style.setProperty("overflow", "auto");
|
|
@@ -2801,13 +3116,7 @@ function Tabs(props) {
|
|
|
2801
3116
|
const index = _index();
|
|
2802
3117
|
return (() => {
|
|
2803
3118
|
const _el$4 = _tmpl$33();
|
|
2804
|
-
_el$4.$$click = (event) =>
|
|
2805
|
-
if (index === activeTab() && props.collapsible) {
|
|
2806
|
-
setActiveTab(-1);
|
|
2807
|
-
} else {
|
|
2808
|
-
setActiveTab(index);
|
|
2809
|
-
}
|
|
2810
|
-
};
|
|
3119
|
+
_el$4.$$click = (event) => onClick(index);
|
|
2811
3120
|
setAttribute(_el$4, "key", index);
|
|
2812
3121
|
insert(_el$4, createComponent(blocks_default, {
|
|
2813
3122
|
get parent() {
|
|
@@ -2828,7 +3137,9 @@ function Tabs(props) {
|
|
|
2828
3137
|
}
|
|
2829
3138
|
}));
|
|
2830
3139
|
effect((_p$) => {
|
|
2831
|
-
const _v$ = `builder-tab-wrap ${activeTab() === index ? "builder-tab-active" : ""}`, _v$2 =
|
|
3140
|
+
const _v$ = `builder-tab-wrap ${activeTab() === index ? "builder-tab-active" : ""}`, _v$2 = {
|
|
3141
|
+
...activeTab() === index ? props.activeTabStyle : {}
|
|
3142
|
+
};
|
|
2832
3143
|
_v$ !== _p$._v$ && className(_el$4, _p$._v$ = _v$);
|
|
2833
3144
|
_p$._v$2 = style(_el$4, _v$2, _p$._v$2);
|
|
2834
3145
|
return _p$;
|
|
@@ -2845,7 +3156,7 @@ function Tabs(props) {
|
|
|
2845
3156
|
return activeTabContent(activeTab());
|
|
2846
3157
|
},
|
|
2847
3158
|
get children() {
|
|
2848
|
-
const _el$3 = _tmpl$
|
|
3159
|
+
const _el$3 = _tmpl$8();
|
|
2849
3160
|
insert(_el$3, createComponent(blocks_default, {
|
|
2850
3161
|
get parent() {
|
|
2851
3162
|
return props.builderBlock.id;
|
|
@@ -2877,7 +3188,7 @@ var tabs_default = Tabs;
|
|
|
2877
3188
|
delegateEvents(["click"]);
|
|
2878
3189
|
|
|
2879
3190
|
// src/blocks/text/component-info.ts
|
|
2880
|
-
var
|
|
3191
|
+
var componentInfo10 = {
|
|
2881
3192
|
name: "Text",
|
|
2882
3193
|
static: true,
|
|
2883
3194
|
isRSC: true,
|
|
@@ -2896,10 +3207,10 @@ var componentInfo9 = {
|
|
|
2896
3207
|
textAlign: "center"
|
|
2897
3208
|
}
|
|
2898
3209
|
};
|
|
2899
|
-
var _tmpl$
|
|
3210
|
+
var _tmpl$9 = /* @__PURE__ */ template(`<div class=builder-text>`);
|
|
2900
3211
|
function Text(props) {
|
|
2901
3212
|
return (() => {
|
|
2902
|
-
const _el$ = _tmpl$
|
|
3213
|
+
const _el$ = _tmpl$9();
|
|
2903
3214
|
_el$.style.setProperty("outline", "none");
|
|
2904
3215
|
effect(() => _el$.innerHTML = props.text?.toString() || "");
|
|
2905
3216
|
return _el$;
|
|
@@ -2908,7 +3219,7 @@ function Text(props) {
|
|
|
2908
3219
|
var text_default = Text;
|
|
2909
3220
|
|
|
2910
3221
|
// src/blocks/custom-code/component-info.ts
|
|
2911
|
-
var
|
|
3222
|
+
var componentInfo11 = {
|
|
2912
3223
|
name: "Custom Code",
|
|
2913
3224
|
static: true,
|
|
2914
3225
|
requiredPermissions: ["editCode"],
|
|
@@ -2931,7 +3242,7 @@ var componentInfo10 = {
|
|
|
2931
3242
|
advanced: true
|
|
2932
3243
|
}]
|
|
2933
3244
|
};
|
|
2934
|
-
var _tmpl$
|
|
3245
|
+
var _tmpl$10 = /* @__PURE__ */ template(`<div>`);
|
|
2935
3246
|
function CustomCode(props) {
|
|
2936
3247
|
const [scriptsInserted, setScriptsInserted] = createSignal([]);
|
|
2937
3248
|
const [scriptsRun, setScriptsRun] = createSignal([]);
|
|
@@ -2966,7 +3277,7 @@ function CustomCode(props) {
|
|
|
2966
3277
|
}
|
|
2967
3278
|
});
|
|
2968
3279
|
return (() => {
|
|
2969
|
-
const _el$ = _tmpl$
|
|
3280
|
+
const _el$ = _tmpl$10();
|
|
2970
3281
|
const _ref$ = elementRef;
|
|
2971
3282
|
typeof _ref$ === "function" ? use(_ref$, _el$) : elementRef = _el$;
|
|
2972
3283
|
effect((_p$) => {
|
|
@@ -2984,7 +3295,7 @@ function CustomCode(props) {
|
|
|
2984
3295
|
var custom_code_default = CustomCode;
|
|
2985
3296
|
|
|
2986
3297
|
// src/blocks/embed/component-info.ts
|
|
2987
|
-
var
|
|
3298
|
+
var componentInfo12 = {
|
|
2988
3299
|
name: "Embed",
|
|
2989
3300
|
static: true,
|
|
2990
3301
|
inputs: [{
|
|
@@ -3026,7 +3337,7 @@ var SCRIPT_MIME_TYPES = ["text/javascript", "application/javascript", "applicati
|
|
|
3026
3337
|
var isJsScript = (script) => SCRIPT_MIME_TYPES.includes(script.type);
|
|
3027
3338
|
|
|
3028
3339
|
// src/blocks/embed/embed.tsx
|
|
3029
|
-
var _tmpl$
|
|
3340
|
+
var _tmpl$11 = /* @__PURE__ */ template(`<div class=builder-embed>`);
|
|
3030
3341
|
function Embed(props) {
|
|
3031
3342
|
const [scriptsInserted, setScriptsInserted] = createSignal([]);
|
|
3032
3343
|
const [scriptsRun, setScriptsRun] = createSignal([]);
|
|
@@ -3064,7 +3375,7 @@ function Embed(props) {
|
|
|
3064
3375
|
}
|
|
3065
3376
|
createEffect(on(() => [onUpdateFn_0_elem(), onUpdateFn_0_ranInitFn__()], onUpdateFn_0));
|
|
3066
3377
|
return (() => {
|
|
3067
|
-
const _el$ = _tmpl$
|
|
3378
|
+
const _el$ = _tmpl$11();
|
|
3068
3379
|
const _ref$ = elem;
|
|
3069
3380
|
typeof _ref$ === "function" ? use(_ref$, _el$) : elem = _el$;
|
|
3070
3381
|
effect(() => _el$.innerHTML = props.content);
|
|
@@ -3074,7 +3385,7 @@ function Embed(props) {
|
|
|
3074
3385
|
var embed_default = Embed;
|
|
3075
3386
|
|
|
3076
3387
|
// src/blocks/form/form/component-info.ts
|
|
3077
|
-
var
|
|
3388
|
+
var componentInfo13 = {
|
|
3078
3389
|
name: "Form:Form",
|
|
3079
3390
|
// editableTags: ['builder-form-error']
|
|
3080
3391
|
defaults: {
|
|
@@ -3321,8 +3632,8 @@ var get = (obj, path, defaultValue) => {
|
|
|
3321
3632
|
};
|
|
3322
3633
|
|
|
3323
3634
|
// src/blocks/form/form/form.tsx
|
|
3324
|
-
var _tmpl$
|
|
3325
|
-
var _tmpl$
|
|
3635
|
+
var _tmpl$12 = /* @__PURE__ */ template(`<pre>`);
|
|
3636
|
+
var _tmpl$25 = /* @__PURE__ */ template(`<form>`);
|
|
3326
3637
|
function FormComponent(props) {
|
|
3327
3638
|
const [formState, setFormState] = createSignal("unsubmitted");
|
|
3328
3639
|
const [responseData, setResponseData] = createSignal(null);
|
|
@@ -3351,11 +3662,11 @@ function FormComponent(props) {
|
|
|
3351
3662
|
return;
|
|
3352
3663
|
}
|
|
3353
3664
|
event.preventDefault();
|
|
3354
|
-
const el = event.currentTarget;
|
|
3665
|
+
const el = event.currentTarget || event.target;
|
|
3355
3666
|
const headers = props.customHeaders || {};
|
|
3356
3667
|
let body;
|
|
3357
3668
|
const formData = new FormData(el);
|
|
3358
|
-
const formPairs = Array.from(
|
|
3669
|
+
const formPairs = Array.from(el.querySelectorAll("input,select,textarea")).filter((el2) => !!el2.name).map((el2) => {
|
|
3359
3670
|
let value;
|
|
3360
3671
|
const key = el2.name;
|
|
3361
3672
|
if (el2 instanceof HTMLInputElement) {
|
|
@@ -3508,7 +3819,7 @@ function FormComponent(props) {
|
|
|
3508
3819
|
}
|
|
3509
3820
|
let formRef;
|
|
3510
3821
|
return (() => {
|
|
3511
|
-
const _el$ = _tmpl$
|
|
3822
|
+
const _el$ = _tmpl$25();
|
|
3512
3823
|
_el$.addEventListener("submit", (event) => onSubmit(event));
|
|
3513
3824
|
const _ref$ = formRef;
|
|
3514
3825
|
typeof _ref$ === "function" ? use(_ref$, _el$) : formRef = _el$;
|
|
@@ -3525,7 +3836,7 @@ function FormComponent(props) {
|
|
|
3525
3836
|
get name() {
|
|
3526
3837
|
return props.name;
|
|
3527
3838
|
}
|
|
3528
|
-
}, {}, () => props.attributes), false, true);
|
|
3839
|
+
}, {}, {}, () => props.attributes), false, true);
|
|
3529
3840
|
insert(_el$, createComponent(Show, {
|
|
3530
3841
|
get when() {
|
|
3531
3842
|
return props.builderBlock && props.builderBlock.children;
|
|
@@ -3591,7 +3902,7 @@ function FormComponent(props) {
|
|
|
3591
3902
|
return memo(() => submissionState() === "error")() && responseData();
|
|
3592
3903
|
},
|
|
3593
3904
|
get children() {
|
|
3594
|
-
const _el$2 = _tmpl$
|
|
3905
|
+
const _el$2 = _tmpl$12();
|
|
3595
3906
|
insert(_el$2, () => JSON.stringify(responseData(), null, 2));
|
|
3596
3907
|
effect(() => className(_el$2, "builder-form-error-text " + css({
|
|
3597
3908
|
padding: "10px",
|
|
@@ -3623,7 +3934,7 @@ function FormComponent(props) {
|
|
|
3623
3934
|
var form_default = FormComponent;
|
|
3624
3935
|
|
|
3625
3936
|
// src/blocks/form/input/component-info.ts
|
|
3626
|
-
var
|
|
3937
|
+
var componentInfo14 = {
|
|
3627
3938
|
name: "Form:Input",
|
|
3628
3939
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",
|
|
3629
3940
|
inputs: [
|
|
@@ -3675,10 +3986,10 @@ var componentInfo13 = {
|
|
|
3675
3986
|
borderColor: "#ccc"
|
|
3676
3987
|
}
|
|
3677
3988
|
};
|
|
3678
|
-
var _tmpl$
|
|
3989
|
+
var _tmpl$13 = /* @__PURE__ */ template(`<input>`);
|
|
3679
3990
|
function FormInputComponent(props) {
|
|
3680
3991
|
return (() => {
|
|
3681
|
-
const _el$ = _tmpl$
|
|
3992
|
+
const _el$ = _tmpl$13();
|
|
3682
3993
|
spread(_el$, mergeProps({}, () => props.attributes, {
|
|
3683
3994
|
get key() {
|
|
3684
3995
|
return isEditing() && props.defaultValue ? props.defaultValue : "default-key";
|
|
@@ -3708,7 +4019,7 @@ function FormInputComponent(props) {
|
|
|
3708
4019
|
var input_default = FormInputComponent;
|
|
3709
4020
|
|
|
3710
4021
|
// src/blocks/form/select/component-info.ts
|
|
3711
|
-
var
|
|
4022
|
+
var componentInfo15 = {
|
|
3712
4023
|
name: "Form:Select",
|
|
3713
4024
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045",
|
|
3714
4025
|
defaultStyles: {
|
|
@@ -3751,11 +4062,11 @@ var componentInfo14 = {
|
|
|
3751
4062
|
static: true,
|
|
3752
4063
|
noWrap: true
|
|
3753
4064
|
};
|
|
3754
|
-
var _tmpl$
|
|
3755
|
-
var _tmpl$
|
|
4065
|
+
var _tmpl$14 = /* @__PURE__ */ template(`<select>`);
|
|
4066
|
+
var _tmpl$26 = /* @__PURE__ */ template(`<option>`);
|
|
3756
4067
|
function SelectComponent(props) {
|
|
3757
4068
|
return (() => {
|
|
3758
|
-
const _el$ = _tmpl$
|
|
4069
|
+
const _el$ = _tmpl$14();
|
|
3759
4070
|
spread(_el$, mergeProps({}, () => props.attributes, {
|
|
3760
4071
|
get value() {
|
|
3761
4072
|
return props.value;
|
|
@@ -3777,7 +4088,7 @@ function SelectComponent(props) {
|
|
|
3777
4088
|
children: (option, _index) => {
|
|
3778
4089
|
const index = _index();
|
|
3779
4090
|
return (() => {
|
|
3780
|
-
const _el$2 = _tmpl$
|
|
4091
|
+
const _el$2 = _tmpl$26();
|
|
3781
4092
|
insert(_el$2, () => option.name || option.value);
|
|
3782
4093
|
effect(() => setAttribute(_el$2, "key", `${option.name}-${index}`));
|
|
3783
4094
|
effect(() => _el$2.value = option.value);
|
|
@@ -3791,7 +4102,7 @@ function SelectComponent(props) {
|
|
|
3791
4102
|
var select_default = SelectComponent;
|
|
3792
4103
|
|
|
3793
4104
|
// src/blocks/form/submit-button/component-info.ts
|
|
3794
|
-
var
|
|
4105
|
+
var componentInfo16 = {
|
|
3795
4106
|
name: "Form:SubmitButton",
|
|
3796
4107
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",
|
|
3797
4108
|
defaultStyles: {
|
|
@@ -3817,10 +4128,10 @@ var componentInfo15 = {
|
|
|
3817
4128
|
// TODO: defaultChildren
|
|
3818
4129
|
// canHaveChildren: true,
|
|
3819
4130
|
};
|
|
3820
|
-
var _tmpl$
|
|
4131
|
+
var _tmpl$15 = /* @__PURE__ */ template(`<button type=submit>`);
|
|
3821
4132
|
function SubmitButton(props) {
|
|
3822
4133
|
return (() => {
|
|
3823
|
-
const _el$ = _tmpl$
|
|
4134
|
+
const _el$ = _tmpl$15();
|
|
3824
4135
|
spread(_el$, mergeProps({}, () => props.attributes), false, true);
|
|
3825
4136
|
insert(_el$, () => props.text);
|
|
3826
4137
|
return _el$;
|
|
@@ -3829,7 +4140,7 @@ function SubmitButton(props) {
|
|
|
3829
4140
|
var submit_button_default = SubmitButton;
|
|
3830
4141
|
|
|
3831
4142
|
// src/blocks/img/component-info.ts
|
|
3832
|
-
var
|
|
4143
|
+
var componentInfo17 = {
|
|
3833
4144
|
// friendlyName?
|
|
3834
4145
|
name: "Raw:Img",
|
|
3835
4146
|
hideFromInsertMenu: true,
|
|
@@ -3844,10 +4155,10 @@ var componentInfo16 = {
|
|
|
3844
4155
|
noWrap: true,
|
|
3845
4156
|
static: true
|
|
3846
4157
|
};
|
|
3847
|
-
var _tmpl$
|
|
4158
|
+
var _tmpl$16 = /* @__PURE__ */ template(`<img>`);
|
|
3848
4159
|
function ImgComponent(props) {
|
|
3849
4160
|
return (() => {
|
|
3850
|
-
const _el$ = _tmpl$
|
|
4161
|
+
const _el$ = _tmpl$16();
|
|
3851
4162
|
spread(_el$, mergeProps({
|
|
3852
4163
|
get style() {
|
|
3853
4164
|
return {
|
|
@@ -3871,7 +4182,7 @@ function ImgComponent(props) {
|
|
|
3871
4182
|
var img_default = ImgComponent;
|
|
3872
4183
|
|
|
3873
4184
|
// src/blocks/video/component-info.ts
|
|
3874
|
-
var
|
|
4185
|
+
var componentInfo18 = {
|
|
3875
4186
|
name: "Video",
|
|
3876
4187
|
canHaveChildren: true,
|
|
3877
4188
|
defaultStyles: {
|
|
@@ -3953,8 +4264,8 @@ var componentInfo17 = {
|
|
|
3953
4264
|
advanced: true
|
|
3954
4265
|
}]
|
|
3955
4266
|
};
|
|
3956
|
-
var _tmpl$
|
|
3957
|
-
var _tmpl$
|
|
4267
|
+
var _tmpl$17 = /* @__PURE__ */ template(`<source type=video/mp4>`);
|
|
4268
|
+
var _tmpl$27 = /* @__PURE__ */ template(`<div>`);
|
|
3958
4269
|
var _tmpl$34 = /* @__PURE__ */ template(`<div><video class=builder-video>`);
|
|
3959
4270
|
function Video(props) {
|
|
3960
4271
|
const videoProps = createMemo(() => {
|
|
@@ -4016,7 +4327,7 @@ function Video(props) {
|
|
|
4016
4327
|
return !props.lazyLoad;
|
|
4017
4328
|
},
|
|
4018
4329
|
get children() {
|
|
4019
|
-
const _el$3 = _tmpl$
|
|
4330
|
+
const _el$3 = _tmpl$17();
|
|
4020
4331
|
effect(() => setAttribute(_el$3, "src", props.video));
|
|
4021
4332
|
return _el$3;
|
|
4022
4333
|
}
|
|
@@ -4026,7 +4337,7 @@ function Video(props) {
|
|
|
4026
4337
|
return props.aspectRatio && !(props.fitContent && props.builderBlock?.children?.length);
|
|
4027
4338
|
},
|
|
4028
4339
|
get children() {
|
|
4029
|
-
const _el$4 = _tmpl$
|
|
4340
|
+
const _el$4 = _tmpl$27();
|
|
4030
4341
|
_el$4.style.setProperty("width", "100%");
|
|
4031
4342
|
_el$4.style.setProperty("pointer-events", "none");
|
|
4032
4343
|
_el$4.style.setProperty("font-size", "0px");
|
|
@@ -4039,7 +4350,7 @@ function Video(props) {
|
|
|
4039
4350
|
return props.builderBlock?.children?.length && props.fitContent;
|
|
4040
4351
|
},
|
|
4041
4352
|
get children() {
|
|
4042
|
-
const _el$5 = _tmpl$
|
|
4353
|
+
const _el$5 = _tmpl$27();
|
|
4043
4354
|
_el$5.style.setProperty("display", "flex");
|
|
4044
4355
|
_el$5.style.setProperty("flex-direction", "column");
|
|
4045
4356
|
_el$5.style.setProperty("align-items", "stretch");
|
|
@@ -4052,7 +4363,7 @@ function Video(props) {
|
|
|
4052
4363
|
return props.builderBlock?.children?.length && !props.fitContent;
|
|
4053
4364
|
},
|
|
4054
4365
|
get children() {
|
|
4055
|
-
const _el$6 = _tmpl$
|
|
4366
|
+
const _el$6 = _tmpl$27();
|
|
4056
4367
|
_el$6.style.setProperty("pointer-events", "none");
|
|
4057
4368
|
_el$6.style.setProperty("display", "flex");
|
|
4058
4369
|
_el$6.style.setProperty("flex-direction", "column");
|
|
@@ -4074,58 +4385,61 @@ var video_default = Video;
|
|
|
4074
4385
|
// src/constants/extra-components.ts
|
|
4075
4386
|
var getExtraComponents = () => [{
|
|
4076
4387
|
component: custom_code_default,
|
|
4077
|
-
...
|
|
4388
|
+
...componentInfo11
|
|
4078
4389
|
}, {
|
|
4079
4390
|
component: embed_default,
|
|
4080
|
-
...
|
|
4391
|
+
...componentInfo12
|
|
4081
4392
|
}, ...TARGET === "rsc" ? [] : [{
|
|
4082
4393
|
component: form_default,
|
|
4083
|
-
...
|
|
4394
|
+
...componentInfo13
|
|
4084
4395
|
}, {
|
|
4085
4396
|
component: input_default,
|
|
4086
|
-
...
|
|
4397
|
+
...componentInfo14
|
|
4087
4398
|
}, {
|
|
4088
4399
|
component: submit_button_default,
|
|
4089
|
-
...
|
|
4400
|
+
...componentInfo16
|
|
4090
4401
|
}, {
|
|
4091
4402
|
component: select_default,
|
|
4092
|
-
...
|
|
4403
|
+
...componentInfo15
|
|
4093
4404
|
}], {
|
|
4094
4405
|
component: img_default,
|
|
4095
|
-
...
|
|
4406
|
+
...componentInfo17
|
|
4096
4407
|
}, {
|
|
4097
4408
|
component: video_default,
|
|
4098
|
-
...
|
|
4409
|
+
...componentInfo18
|
|
4099
4410
|
}];
|
|
4100
4411
|
|
|
4101
4412
|
// src/constants/builder-registered-components.ts
|
|
4102
4413
|
var getDefaultRegisteredComponents = () => [{
|
|
4103
4414
|
component: button_default,
|
|
4104
|
-
...
|
|
4415
|
+
...componentInfo2
|
|
4105
4416
|
}, {
|
|
4106
4417
|
component: columns_default,
|
|
4107
|
-
...
|
|
4418
|
+
...componentInfo3
|
|
4108
4419
|
}, {
|
|
4109
4420
|
component: fragment_default,
|
|
4110
|
-
...
|
|
4421
|
+
...componentInfo4
|
|
4111
4422
|
}, {
|
|
4112
4423
|
component: image_default,
|
|
4113
|
-
...
|
|
4424
|
+
...componentInfo5
|
|
4114
4425
|
}, {
|
|
4115
4426
|
component: section_default,
|
|
4116
|
-
...
|
|
4427
|
+
...componentInfo6
|
|
4117
4428
|
}, {
|
|
4118
4429
|
component: slot_default,
|
|
4119
|
-
...
|
|
4430
|
+
...componentInfo7
|
|
4120
4431
|
}, {
|
|
4121
4432
|
component: symbol_default,
|
|
4122
|
-
...
|
|
4433
|
+
...componentInfo8
|
|
4123
4434
|
}, {
|
|
4124
4435
|
component: text_default,
|
|
4125
|
-
...
|
|
4436
|
+
...componentInfo10
|
|
4126
4437
|
}, ...TARGET === "rsc" ? [] : [{
|
|
4127
4438
|
component: tabs_default,
|
|
4128
|
-
...
|
|
4439
|
+
...componentInfo9
|
|
4440
|
+
}, {
|
|
4441
|
+
component: accordion_default,
|
|
4442
|
+
...componentInfo
|
|
4129
4443
|
}], ...getExtraComponents()];
|
|
4130
4444
|
|
|
4131
4445
|
// src/functions/register-component.ts
|
|
@@ -4195,10 +4509,10 @@ var getUpdateVariantVisibilityScript = ({
|
|
|
4195
4509
|
}) => `window.${UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME}(
|
|
4196
4510
|
"${variationId}", "${contentId}", ${isHydrationTarget}
|
|
4197
4511
|
)`;
|
|
4198
|
-
var _tmpl$
|
|
4512
|
+
var _tmpl$18 = /* @__PURE__ */ template(`<script>`);
|
|
4199
4513
|
function InlinedScript(props) {
|
|
4200
4514
|
return (() => {
|
|
4201
|
-
const _el$ = _tmpl$
|
|
4515
|
+
const _el$ = _tmpl$18();
|
|
4202
4516
|
effect((_p$) => {
|
|
4203
4517
|
const _v$ = props.scriptStr, _v$2 = props.id;
|
|
4204
4518
|
_v$ !== _p$._v$ && (_el$.innerHTML = _p$._v$ = _v$);
|
|
@@ -4709,7 +5023,7 @@ function isFromTrustedHost(trustedHosts, e) {
|
|
|
4709
5023
|
}
|
|
4710
5024
|
|
|
4711
5025
|
// src/constants/sdk-version.ts
|
|
4712
|
-
var SDK_VERSION = "1.0.
|
|
5026
|
+
var SDK_VERSION = "1.0.29";
|
|
4713
5027
|
|
|
4714
5028
|
// src/functions/register.ts
|
|
4715
5029
|
var registry = {};
|
|
@@ -5175,7 +5489,7 @@ function EnableEditor(props) {
|
|
|
5175
5489
|
if (isPreviewing() && !isEditing()) {
|
|
5176
5490
|
const searchParams = new URL(location.href).searchParams;
|
|
5177
5491
|
const searchParamPreviewModel = searchParams.get("builder.preview");
|
|
5178
|
-
const searchParamPreviewId = searchParams.get(`builder.
|
|
5492
|
+
const searchParamPreviewId = searchParams.get(`builder.overrides.${searchParamPreviewModel}`);
|
|
5179
5493
|
const previewApiKey = searchParams.get("apiKey") || searchParams.get("builder.space");
|
|
5180
5494
|
if (searchParamPreviewModel === props.model && previewApiKey === props.apiKey && (!props.content || searchParamPreviewId === props.content.id)) {
|
|
5181
5495
|
fetchOneEntry({
|
|
@@ -5193,7 +5507,7 @@ function EnableEditor(props) {
|
|
|
5193
5507
|
});
|
|
5194
5508
|
onMount(() => {
|
|
5195
5509
|
if (!props.apiKey) {
|
|
5196
|
-
logger.error("No API key provided to `
|
|
5510
|
+
logger.error("No API key provided to `Content` component. This can cause issues. Please provide an API key using the `apiKey` prop.");
|
|
5197
5511
|
}
|
|
5198
5512
|
evaluateJsCode();
|
|
5199
5513
|
runHttpRequests();
|
|
@@ -5695,7 +6009,7 @@ var fetchSymbolContent = async ({
|
|
|
5695
6009
|
};
|
|
5696
6010
|
|
|
5697
6011
|
// src/blocks/symbol/symbol.tsx
|
|
5698
|
-
var _tmpl$
|
|
6012
|
+
var _tmpl$19 = /* @__PURE__ */ template(`<div>`);
|
|
5699
6013
|
function Symbol(props) {
|
|
5700
6014
|
const [contentToUse, setContentToUse] = createSignal(props.symbol?.content);
|
|
5701
6015
|
const blocksWrapper = createMemo(() => {
|
|
@@ -5727,7 +6041,7 @@ function Symbol(props) {
|
|
|
5727
6041
|
}
|
|
5728
6042
|
createEffect(on(() => [onUpdateFn_0_props_symbol()], onUpdateFn_0));
|
|
5729
6043
|
return (() => {
|
|
5730
|
-
const _el$ = _tmpl$
|
|
6044
|
+
const _el$ = _tmpl$19();
|
|
5731
6045
|
spread(_el$, mergeProps({
|
|
5732
6046
|
get ["class"]() {
|
|
5733
6047
|
return className();
|