@builder.io/sdk-qwik 0.2.0 → 0.2.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/index.qwik.cjs +483 -357
- package/lib/index.qwik.mjs +484 -358
- package/package.json +2 -2
- package/types/blocks/columns/columns.d.ts +0 -2
- package/types/blocks/image/image.d.ts +0 -9
- package/types/blocks/video/video.d.ts +0 -8
- package/types/components/render-block/block-styles.d.ts +1 -6
- package/types/components/render-block/render-block.d.ts +1 -43
- package/types/components/render-block/render-block.helpers.d.ts +1 -0
- package/types/components/render-blocks.d.ts +0 -1
- package/types/components/render-inlined-styles.d.ts +1 -5
package/lib/index.qwik.mjs
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import { componentQrl, inlinedQrl, useStylesScopedQrl, _jsxC,
|
|
1
|
+
import { componentQrl, inlinedQrl, useStylesScopedQrl, _jsxC, _jsxS, _fnSignal, createContextId, useComputedQrl, useLexicalScope, _jsxQ, _jsxBranch, _IMMUTABLE, _wrapProp, useContextProvider, useStore, useContext, Slot, Fragment as Fragment$1, useVisibleTaskQrl, useTaskQrl, useSignal } from "@builder.io/qwik";
|
|
2
2
|
import { Fragment } from "@builder.io/qwik/jsx-runtime";
|
|
3
3
|
const Button = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
|
|
4
4
|
useStylesScopedQrl(/* @__PURE__ */ inlinedQrl(STYLES$3, "Button_component_useStylesScoped_a1JZ0Q0Q2Oc"));
|
|
5
5
|
return /* @__PURE__ */ _jsxC(Fragment, {
|
|
6
|
-
children: props.link ? /* @__PURE__ */
|
|
7
|
-
...props.attributes
|
|
6
|
+
children: props.link ? /* @__PURE__ */ _jsxS("a", {
|
|
7
|
+
...props.attributes,
|
|
8
|
+
children: _fnSignal((p0) => p0.text, [
|
|
9
|
+
props
|
|
10
|
+
], "p0.text")
|
|
8
11
|
}, {
|
|
9
12
|
role: "button",
|
|
10
13
|
href: _fnSignal((p0) => p0.link, [
|
|
@@ -13,16 +16,15 @@ const Button = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =
|
|
|
13
16
|
target: _fnSignal((p0) => p0.openLinkInNewTab ? "_blank" : void 0, [
|
|
14
17
|
props
|
|
15
18
|
], 'p0.openLinkInNewTab?"_blank":undefined')
|
|
16
|
-
},
|
|
17
|
-
props
|
|
18
|
-
], "p0.text"), 2, "jc_0") : /* @__PURE__ */ _jsxQ("button", {
|
|
19
|
+
}, 0, "jc_0") : /* @__PURE__ */ _jsxS("button", {
|
|
19
20
|
class: (() => {
|
|
20
21
|
props.attributes.class;
|
|
21
22
|
})(),
|
|
22
|
-
...props.attributes
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
...props.attributes,
|
|
24
|
+
children: _fnSignal((p0) => p0.text, [
|
|
25
|
+
props
|
|
26
|
+
], "p0.text")
|
|
27
|
+
}, null, 0, null)
|
|
26
28
|
}, 1, "jc_1");
|
|
27
29
|
}, "Button_component_gJoMUICXoUQ"));
|
|
28
30
|
const STYLES$3 = `
|
|
@@ -159,8 +161,8 @@ const convertStyleMapToCSSArray = (style) => {
|
|
|
159
161
|
return cssProps.filter(checkIsDefined);
|
|
160
162
|
};
|
|
161
163
|
const convertStyleMapToCSS = (style) => convertStyleMapToCSSArray(style).join("\n");
|
|
162
|
-
const createCssClass = ({ mediaQuery, className
|
|
163
|
-
const cssClass = `.${
|
|
164
|
+
const createCssClass = ({ mediaQuery, className, styles }) => {
|
|
165
|
+
const cssClass = `.${className} {
|
|
164
166
|
${convertStyleMapToCSS(styles)}
|
|
165
167
|
}`;
|
|
166
168
|
if (mediaQuery)
|
|
@@ -170,69 +172,95 @@ const createCssClass = ({ mediaQuery, className: className3, styles }) => {
|
|
|
170
172
|
else
|
|
171
173
|
return cssClass;
|
|
172
174
|
};
|
|
173
|
-
const
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
175
|
+
const RenderInlinedStyles = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
|
|
176
|
+
const tag = useComputedQrl(/* @__PURE__ */ inlinedQrl(() => {
|
|
177
|
+
return "style";
|
|
178
|
+
}, "RenderInlinedStyles_component_tag_useComputed_S1nSc0C6qB4"));
|
|
179
|
+
useComputedQrl(/* @__PURE__ */ inlinedQrl(() => {
|
|
180
|
+
const [props2, tag2] = useLexicalScope();
|
|
181
|
+
return `<${tag2.value}>${props2.styles}</${tag2.value}>`;
|
|
182
|
+
}, "RenderInlinedStyles_component_injectedStyleScript_useComputed_CVKinNBYTxE", [
|
|
183
|
+
props,
|
|
184
|
+
tag
|
|
185
|
+
]));
|
|
179
186
|
return /* @__PURE__ */ _jsxC(Fragment, {
|
|
180
|
-
children: /* @__PURE__ */ _jsxQ("style", {
|
|
181
|
-
dangerouslySetInnerHTML:
|
|
182
|
-
|
|
187
|
+
children: /* @__PURE__ */ _jsxQ("style", null, {
|
|
188
|
+
dangerouslySetInnerHTML: _fnSignal((p0) => p0.styles, [
|
|
189
|
+
props
|
|
190
|
+
], "p0.styles")
|
|
191
|
+
}, null, 3, "zz_0")
|
|
183
192
|
}, 1, "zz_2");
|
|
184
|
-
};
|
|
185
|
-
const
|
|
186
|
-
return getProcessedBlock({
|
|
187
|
-
block: props.block,
|
|
188
|
-
state: props.context.state,
|
|
189
|
-
context: props.context.context,
|
|
190
|
-
shouldEvaluateBindings: true
|
|
191
|
-
});
|
|
192
|
-
};
|
|
193
|
-
const canShowBlock$1 = function canShowBlock2(props, state) {
|
|
194
|
-
if (checkIsDefined(useBlock$1(props).hide))
|
|
195
|
-
return !useBlock$1(props).hide;
|
|
196
|
-
if (checkIsDefined(useBlock$1(props).show))
|
|
197
|
-
return useBlock$1(props).show;
|
|
198
|
-
return true;
|
|
199
|
-
};
|
|
200
|
-
const css = function css2(props, state) {
|
|
201
|
-
const styles = useBlock$1(props).responsiveStyles;
|
|
202
|
-
const content = props.context.content;
|
|
203
|
-
const sizesWithUpdatedBreakpoints = getSizesForBreakpoints(content?.meta?.breakpoints || {});
|
|
204
|
-
const largeStyles = styles?.large;
|
|
205
|
-
const mediumStyles = styles?.medium;
|
|
206
|
-
const smallStyles = styles?.small;
|
|
207
|
-
const className3 = useBlock$1(props).id;
|
|
208
|
-
const largeStylesClass = largeStyles ? createCssClass({
|
|
209
|
-
className: className3,
|
|
210
|
-
styles: largeStyles
|
|
211
|
-
}) : "";
|
|
212
|
-
const mediumStylesClass = mediumStyles ? createCssClass({
|
|
213
|
-
className: className3,
|
|
214
|
-
styles: mediumStyles,
|
|
215
|
-
mediaQuery: getMaxWidthQueryForSize("medium", sizesWithUpdatedBreakpoints)
|
|
216
|
-
}) : "";
|
|
217
|
-
const smallStylesClass = smallStyles ? createCssClass({
|
|
218
|
-
className: className3,
|
|
219
|
-
styles: smallStyles,
|
|
220
|
-
mediaQuery: getMaxWidthQueryForSize("small", sizesWithUpdatedBreakpoints)
|
|
221
|
-
}) : "";
|
|
222
|
-
return [
|
|
223
|
-
largeStylesClass,
|
|
224
|
-
mediumStylesClass,
|
|
225
|
-
smallStylesClass
|
|
226
|
-
].join(" ");
|
|
227
|
-
};
|
|
228
|
-
const BlockStyles = (props) => {
|
|
193
|
+
}, "RenderInlinedStyles_component_ejNQtXd1ahM"));
|
|
194
|
+
const BlockStyles = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
|
|
229
195
|
_jsxBranch();
|
|
196
|
+
const useBlock = useComputedQrl(/* @__PURE__ */ inlinedQrl(() => {
|
|
197
|
+
const [props2] = useLexicalScope();
|
|
198
|
+
return getProcessedBlock({
|
|
199
|
+
block: props2.block,
|
|
200
|
+
state: props2.context.state,
|
|
201
|
+
context: props2.context.context,
|
|
202
|
+
shouldEvaluateBindings: true
|
|
203
|
+
});
|
|
204
|
+
}, "BlockStyles_component_useBlock_useComputed_9Y0pQBSnHds", [
|
|
205
|
+
props
|
|
206
|
+
]));
|
|
207
|
+
const canShowBlock = useComputedQrl(/* @__PURE__ */ inlinedQrl(() => {
|
|
208
|
+
const [useBlock2] = useLexicalScope();
|
|
209
|
+
if (checkIsDefined(useBlock2.value.hide))
|
|
210
|
+
return !useBlock2.value.hide;
|
|
211
|
+
if (checkIsDefined(useBlock2.value.show))
|
|
212
|
+
return useBlock2.value.show;
|
|
213
|
+
return true;
|
|
214
|
+
}, "BlockStyles_component_canShowBlock_useComputed_QhiYxJDtCJY", [
|
|
215
|
+
useBlock
|
|
216
|
+
]));
|
|
217
|
+
const css = useComputedQrl(/* @__PURE__ */ inlinedQrl(() => {
|
|
218
|
+
const [props2, useBlock2] = useLexicalScope();
|
|
219
|
+
const styles = useBlock2.value.responsiveStyles;
|
|
220
|
+
const content = props2.context.content;
|
|
221
|
+
const sizesWithUpdatedBreakpoints = getSizesForBreakpoints(content?.meta?.breakpoints || {});
|
|
222
|
+
const largeStyles = styles?.large;
|
|
223
|
+
const mediumStyles = styles?.medium;
|
|
224
|
+
const smallStyles = styles?.small;
|
|
225
|
+
const className = useBlock2.value.id;
|
|
226
|
+
if (!className)
|
|
227
|
+
return "";
|
|
228
|
+
const largeStylesClass = largeStyles ? createCssClass({
|
|
229
|
+
className,
|
|
230
|
+
styles: largeStyles
|
|
231
|
+
}) : "";
|
|
232
|
+
const mediumStylesClass = mediumStyles ? createCssClass({
|
|
233
|
+
className,
|
|
234
|
+
styles: mediumStyles,
|
|
235
|
+
mediaQuery: getMaxWidthQueryForSize("medium", sizesWithUpdatedBreakpoints)
|
|
236
|
+
}) : "";
|
|
237
|
+
const smallStylesClass = smallStyles ? createCssClass({
|
|
238
|
+
className,
|
|
239
|
+
styles: smallStyles,
|
|
240
|
+
mediaQuery: getMaxWidthQueryForSize("small", sizesWithUpdatedBreakpoints)
|
|
241
|
+
}) : "";
|
|
242
|
+
return [
|
|
243
|
+
largeStylesClass,
|
|
244
|
+
mediumStylesClass,
|
|
245
|
+
smallStylesClass
|
|
246
|
+
].join(" ");
|
|
247
|
+
}, "BlockStyles_component_css_useComputed_wAetZF3ncbo", [
|
|
248
|
+
props,
|
|
249
|
+
useBlock
|
|
250
|
+
]));
|
|
230
251
|
return /* @__PURE__ */ _jsxC(Fragment, {
|
|
231
|
-
children: css
|
|
232
|
-
styles
|
|
252
|
+
children: css.value && canShowBlock.value ? /* @__PURE__ */ _jsxC(RenderInlinedStyles, {
|
|
253
|
+
get styles() {
|
|
254
|
+
return css.value;
|
|
255
|
+
},
|
|
256
|
+
[_IMMUTABLE]: {
|
|
257
|
+
styles: _fnSignal((p0) => p0.value, [
|
|
258
|
+
css
|
|
259
|
+
], "p0.value")
|
|
260
|
+
}
|
|
233
261
|
}, 3, "LQ_0") : null
|
|
234
262
|
}, 1, "LQ_1");
|
|
235
|
-
};
|
|
263
|
+
}, "BlockStyles_component_r0t5qGxiwHA"));
|
|
236
264
|
function capitalizeFirstLetter(string) {
|
|
237
265
|
return string.charAt(0).toUpperCase() + string.slice(1);
|
|
238
266
|
}
|
|
@@ -301,9 +329,6 @@ function getStyleAttribute(style) {
|
|
|
301
329
|
return style;
|
|
302
330
|
}
|
|
303
331
|
}
|
|
304
|
-
function getBlockTag(block) {
|
|
305
|
-
return block.tagName || "div";
|
|
306
|
-
}
|
|
307
332
|
const EMPTY_HTML_ELEMENTS = [
|
|
308
333
|
"area",
|
|
309
334
|
"base",
|
|
@@ -370,6 +395,20 @@ const getRepeatItemData = ({ block, context }) => {
|
|
|
370
395
|
}));
|
|
371
396
|
return repeatArray;
|
|
372
397
|
};
|
|
398
|
+
const getProxyState = (context) => {
|
|
399
|
+
if (typeof Proxy === "undefined") {
|
|
400
|
+
console.error("no Proxy available in this environment, cannot proxy state.");
|
|
401
|
+
return context.state;
|
|
402
|
+
}
|
|
403
|
+
const useState = new Proxy(context.state, {
|
|
404
|
+
set: (obj, prop, value) => {
|
|
405
|
+
obj[prop] = value;
|
|
406
|
+
context.setState?.(obj);
|
|
407
|
+
return true;
|
|
408
|
+
}
|
|
409
|
+
});
|
|
410
|
+
return useState;
|
|
411
|
+
};
|
|
373
412
|
const RenderComponent = (props) => {
|
|
374
413
|
return /* @__PURE__ */ _jsxC(Fragment, {
|
|
375
414
|
children: props.componentRef ? /* @__PURE__ */ _jsxC(props.componentRef, {
|
|
@@ -427,111 +466,135 @@ const RenderRepeatedBlock = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlined
|
|
|
427
466
|
}
|
|
428
467
|
}, 3, "K5_0");
|
|
429
468
|
}, "RenderRepeatedBlock_component_nRyVBtbGKc8"));
|
|
430
|
-
const
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
};
|
|
436
|
-
const tag = function tag22(props, state) {
|
|
437
|
-
return getBlockTag(useBlock(props));
|
|
438
|
-
};
|
|
439
|
-
const useBlock = function useBlock22(props, state) {
|
|
440
|
-
return repeatItemData(props) ? props.block : getProcessedBlock({
|
|
441
|
-
block: props.block,
|
|
442
|
-
state: props.context.state,
|
|
443
|
-
context: props.context.context,
|
|
444
|
-
shouldEvaluateBindings: true
|
|
445
|
-
});
|
|
446
|
-
};
|
|
447
|
-
const canShowBlock = function canShowBlock22(props, state) {
|
|
448
|
-
if (checkIsDefined(useBlock(props).hide))
|
|
449
|
-
return !useBlock(props).hide;
|
|
450
|
-
if (checkIsDefined(useBlock(props).show))
|
|
451
|
-
return useBlock(props).show;
|
|
452
|
-
return true;
|
|
453
|
-
};
|
|
454
|
-
const proxyState = function proxyState2(props, state) {
|
|
455
|
-
if (typeof Proxy === "undefined") {
|
|
456
|
-
console.error("no Proxy available in this environment, cannot proxy state.");
|
|
457
|
-
return props.context.state;
|
|
458
|
-
}
|
|
459
|
-
const useState = new Proxy(props.context.state, {
|
|
460
|
-
set: (obj, prop, value) => {
|
|
461
|
-
obj[prop] = value;
|
|
462
|
-
props.context.setState?.(obj);
|
|
463
|
-
return true;
|
|
464
|
-
}
|
|
465
|
-
});
|
|
466
|
-
return useState;
|
|
467
|
-
};
|
|
468
|
-
const actions = function actions2(props, state) {
|
|
469
|
-
return getBlockActions({
|
|
470
|
-
block: useBlock(props),
|
|
471
|
-
state: proxyState(props),
|
|
472
|
-
context: props.context.context
|
|
469
|
+
const RenderBlock = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
|
|
470
|
+
_jsxBranch();
|
|
471
|
+
const state = useStore({
|
|
472
|
+
proxyState: getProxyState(props.context),
|
|
473
|
+
tag: props.block.tagName || "div"
|
|
473
474
|
});
|
|
474
|
-
|
|
475
|
-
const
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
}
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
475
|
+
const component = useComputedQrl(/* @__PURE__ */ inlinedQrl(() => {
|
|
476
|
+
const [props2] = useLexicalScope();
|
|
477
|
+
return getComponent({
|
|
478
|
+
block: props2.block,
|
|
479
|
+
context: props2.context
|
|
480
|
+
});
|
|
481
|
+
}, "RenderBlock_component_component_useComputed_qb7DMTJ9XGY", [
|
|
482
|
+
props
|
|
483
|
+
]));
|
|
484
|
+
const repeatItemData = useComputedQrl(/* @__PURE__ */ inlinedQrl(() => {
|
|
485
|
+
const [props2] = useLexicalScope();
|
|
486
|
+
return getRepeatItemData({
|
|
487
|
+
block: props2.block,
|
|
488
|
+
context: props2.context
|
|
489
|
+
});
|
|
490
|
+
}, "RenderBlock_component_repeatItemData_useComputed_Q2wkGRsY3KE", [
|
|
491
|
+
props
|
|
492
|
+
]));
|
|
493
|
+
const useBlock = useComputedQrl(/* @__PURE__ */ inlinedQrl(() => {
|
|
494
|
+
const [props2, repeatItemData2] = useLexicalScope();
|
|
495
|
+
return repeatItemData2.value ? props2.block : getProcessedBlock({
|
|
496
|
+
block: props2.block,
|
|
497
|
+
state: props2.context.state,
|
|
498
|
+
context: props2.context.context,
|
|
499
|
+
shouldEvaluateBindings: true
|
|
500
|
+
});
|
|
501
|
+
}, "RenderBlock_component_useBlock_useComputed_4ZTSqMpaluI", [
|
|
502
|
+
props,
|
|
503
|
+
repeatItemData
|
|
504
|
+
]));
|
|
505
|
+
const canShowBlock = useComputedQrl(/* @__PURE__ */ inlinedQrl(() => {
|
|
506
|
+
const [useBlock2] = useLexicalScope();
|
|
507
|
+
if (checkIsDefined(useBlock2.value.hide))
|
|
508
|
+
return !useBlock2.value.hide;
|
|
509
|
+
if (checkIsDefined(useBlock2.value.show))
|
|
510
|
+
return useBlock2.value.show;
|
|
511
|
+
return true;
|
|
512
|
+
}, "RenderBlock_component_canShowBlock_useComputed_82dAQcDBUzY", [
|
|
513
|
+
useBlock
|
|
514
|
+
]));
|
|
515
|
+
const actions = useComputedQrl(/* @__PURE__ */ inlinedQrl(() => {
|
|
516
|
+
const [props2, state2, useBlock2] = useLexicalScope();
|
|
517
|
+
return getBlockActions({
|
|
518
|
+
block: useBlock2.value,
|
|
519
|
+
state: props2.context.state,
|
|
520
|
+
context: props2.context.context
|
|
521
|
+
});
|
|
522
|
+
}, "RenderBlock_component_actions_useComputed_AOTwdXfwCqY", [
|
|
523
|
+
props,
|
|
524
|
+
state,
|
|
525
|
+
useBlock
|
|
526
|
+
]));
|
|
527
|
+
const attributes = useComputedQrl(/* @__PURE__ */ inlinedQrl(() => {
|
|
528
|
+
const [props2, useBlock2] = useLexicalScope();
|
|
529
|
+
const blockProperties = getBlockProperties(useBlock2.value);
|
|
530
|
+
return {
|
|
531
|
+
...blockProperties,
|
|
532
|
+
...{}
|
|
533
|
+
};
|
|
534
|
+
}, "RenderBlock_component_attributes_useComputed_2cvnb0dCzeU", [
|
|
535
|
+
props,
|
|
536
|
+
useBlock
|
|
537
|
+
]));
|
|
538
|
+
const childrenWithoutParentComponent = useComputedQrl(/* @__PURE__ */ inlinedQrl(() => {
|
|
539
|
+
const [component2, repeatItemData2, useBlock2] = useLexicalScope();
|
|
540
|
+
const shouldRenderChildrenOutsideRef = !component2.value?.component && !repeatItemData2.value;
|
|
541
|
+
return shouldRenderChildrenOutsideRef ? useBlock2.value.children ?? [] : [];
|
|
542
|
+
}, "RenderBlock_component_childrenWithoutParentComponent_useComputed_l4hT2V9liQc", [
|
|
543
|
+
component,
|
|
544
|
+
repeatItemData,
|
|
545
|
+
useBlock
|
|
546
|
+
]));
|
|
547
|
+
const childrenContext = useComputedQrl(/* @__PURE__ */ inlinedQrl(() => {
|
|
548
|
+
const [attributes2, props2, useBlock2] = useLexicalScope();
|
|
549
|
+
const getInheritedTextStyles = () => {
|
|
550
|
+
return {};
|
|
551
|
+
};
|
|
552
|
+
return {
|
|
553
|
+
apiKey: props2.context.apiKey,
|
|
554
|
+
apiVersion: props2.context.apiVersion,
|
|
555
|
+
state: props2.context.state,
|
|
556
|
+
content: props2.context.content,
|
|
557
|
+
context: props2.context.context,
|
|
558
|
+
setState: props2.context.setState,
|
|
559
|
+
registeredComponents: props2.context.registeredComponents,
|
|
560
|
+
inheritedStyles: getInheritedTextStyles()
|
|
561
|
+
};
|
|
562
|
+
}, "RenderBlock_component_childrenContext_useComputed_gskFnyBnHDI", [
|
|
563
|
+
attributes,
|
|
564
|
+
props,
|
|
565
|
+
useBlock
|
|
566
|
+
]));
|
|
567
|
+
const renderComponentProps = useComputedQrl(/* @__PURE__ */ inlinedQrl(() => {
|
|
568
|
+
const [actions2, attributes2, childrenContext2, component2, useBlock2] = useLexicalScope();
|
|
569
|
+
return {
|
|
570
|
+
blockChildren: useBlock2.value.children ?? [],
|
|
571
|
+
componentRef: component2.value?.component,
|
|
572
|
+
componentOptions: {
|
|
573
|
+
...getBlockComponentOptions(useBlock2.value),
|
|
574
|
+
...!component2.value?.noWrap ? {} : {
|
|
575
|
+
attributes: {
|
|
576
|
+
...attributes2.value,
|
|
577
|
+
...actions2.value
|
|
578
|
+
}
|
|
492
579
|
}
|
|
493
|
-
}
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
}
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
return getRepeatItemData({
|
|
504
|
-
block: props.block,
|
|
505
|
-
context: props.context
|
|
506
|
-
});
|
|
507
|
-
};
|
|
508
|
-
const childrenContext = function childrenContext2(props, state) {
|
|
509
|
-
const getInheritedTextStyles = () => {
|
|
510
|
-
return {};
|
|
511
|
-
};
|
|
512
|
-
return {
|
|
513
|
-
apiKey: props.context.apiKey,
|
|
514
|
-
apiVersion: props.context.apiVersion,
|
|
515
|
-
state: props.context.state,
|
|
516
|
-
content: props.context.content,
|
|
517
|
-
context: props.context.context,
|
|
518
|
-
setState: props.context.setState,
|
|
519
|
-
registeredComponents: props.context.registeredComponents,
|
|
520
|
-
inheritedStyles: getInheritedTextStyles()
|
|
521
|
-
};
|
|
522
|
-
};
|
|
523
|
-
const RenderBlock = (props) => {
|
|
524
|
-
_jsxBranch();
|
|
525
|
-
const state = {};
|
|
526
|
-
state.tag = tag(props);
|
|
580
|
+
},
|
|
581
|
+
context: childrenContext2.value
|
|
582
|
+
};
|
|
583
|
+
}, "RenderBlock_component_renderComponentProps_useComputed_tWa1cp0r7XY", [
|
|
584
|
+
actions,
|
|
585
|
+
attributes,
|
|
586
|
+
childrenContext,
|
|
587
|
+
component,
|
|
588
|
+
useBlock
|
|
589
|
+
]));
|
|
527
590
|
return /* @__PURE__ */ _jsxC(Fragment, {
|
|
528
|
-
children: canShowBlock
|
|
591
|
+
children: canShowBlock.value ? !component.value?.noWrap ? /* @__PURE__ */ _jsxC(Fragment, {
|
|
529
592
|
children: [
|
|
530
|
-
isEmptyHtmlElement(tag
|
|
531
|
-
...attributes
|
|
532
|
-
...actions
|
|
533
|
-
},
|
|
534
|
-
!isEmptyHtmlElement(tag
|
|
593
|
+
isEmptyHtmlElement(state.tag) ? /* @__PURE__ */ _jsxC(state.tag, {
|
|
594
|
+
...attributes.value,
|
|
595
|
+
...actions.value
|
|
596
|
+
}, 0, "9d_0") : null,
|
|
597
|
+
!isEmptyHtmlElement(state.tag) && repeatItemData.value ? (repeatItemData.value || []).map(function(data, index) {
|
|
535
598
|
return /* @__PURE__ */ _jsxC(RenderRepeatedBlock, {
|
|
536
599
|
get repeatContext() {
|
|
537
600
|
return data.context;
|
|
@@ -545,36 +608,47 @@ const RenderBlock = (props) => {
|
|
|
545
608
|
}
|
|
546
609
|
}, 3, index);
|
|
547
610
|
}) : null,
|
|
548
|
-
!isEmptyHtmlElement(tag
|
|
549
|
-
...attributes
|
|
550
|
-
...actions
|
|
611
|
+
!isEmptyHtmlElement(state.tag) && !repeatItemData.value ? /* @__PURE__ */ _jsxC(state.tag, {
|
|
612
|
+
...attributes.value,
|
|
613
|
+
...actions.value,
|
|
551
614
|
children: [
|
|
552
615
|
/* @__PURE__ */ _jsxC(RenderComponent, {
|
|
553
|
-
...renderComponentProps
|
|
554
|
-
},
|
|
555
|
-
(childrenWithoutParentComponent
|
|
616
|
+
...renderComponentProps.value
|
|
617
|
+
}, 0, "9d_1"),
|
|
618
|
+
(childrenWithoutParentComponent.value || []).map(function(child) {
|
|
556
619
|
return /* @__PURE__ */ _jsxC(RenderBlock, {
|
|
557
620
|
block: child,
|
|
558
|
-
context
|
|
621
|
+
get context() {
|
|
622
|
+
return childrenContext.value;
|
|
623
|
+
},
|
|
624
|
+
[_IMMUTABLE]: {
|
|
625
|
+
context: _fnSignal((p0) => p0.value, [
|
|
626
|
+
childrenContext
|
|
627
|
+
], "p0.value")
|
|
628
|
+
}
|
|
559
629
|
}, 3, "render-block-" + child.id);
|
|
560
630
|
}),
|
|
561
|
-
(childrenWithoutParentComponent
|
|
631
|
+
(childrenWithoutParentComponent.value || []).map(function(child) {
|
|
562
632
|
return /* @__PURE__ */ _jsxC(BlockStyles, {
|
|
563
633
|
block: child,
|
|
564
|
-
context
|
|
634
|
+
get context() {
|
|
635
|
+
return childrenContext.value;
|
|
636
|
+
},
|
|
637
|
+
[_IMMUTABLE]: {
|
|
638
|
+
context: _fnSignal((p0) => p0.value, [
|
|
639
|
+
childrenContext
|
|
640
|
+
], "p0.value")
|
|
641
|
+
}
|
|
565
642
|
}, 3, "block-style-" + child.id);
|
|
566
643
|
})
|
|
567
644
|
]
|
|
568
645
|
}, 0, "9d_2") : null
|
|
569
646
|
]
|
|
570
647
|
}, 1, "9d_3") : /* @__PURE__ */ _jsxC(RenderComponent, {
|
|
571
|
-
...renderComponentProps
|
|
572
|
-
},
|
|
648
|
+
...renderComponentProps.value
|
|
649
|
+
}, 0, "9d_4") : null
|
|
573
650
|
}, 1, "9d_5");
|
|
574
|
-
};
|
|
575
|
-
const className = function className2(props, state, builderContext2) {
|
|
576
|
-
return "builder-blocks" + (!props.blocks?.length ? " no-blocks" : "");
|
|
577
|
-
};
|
|
651
|
+
}, "RenderBlock_component_m0hg0zT573Q"));
|
|
578
652
|
const onClick$1 = function onClick2(props, state, builderContext2) {
|
|
579
653
|
if (isEditing() && !props.blocks?.length)
|
|
580
654
|
window.parent?.postMessage({
|
|
@@ -599,8 +673,13 @@ const RenderBlocks = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pr
|
|
|
599
673
|
useStylesScopedQrl(/* @__PURE__ */ inlinedQrl(STYLES$2, "RenderBlocks_component_useStylesScoped_0XKYzaR059E"));
|
|
600
674
|
const builderContext$1 = useContext(builderContext);
|
|
601
675
|
const state = {};
|
|
676
|
+
const className = useComputedQrl(/* @__PURE__ */ inlinedQrl(() => {
|
|
677
|
+
const [props2] = useLexicalScope();
|
|
678
|
+
return "builder-blocks" + (!props2.blocks?.length ? " no-blocks" : "");
|
|
679
|
+
}, "RenderBlocks_component_className_useComputed_7iQuBozD6Tc", [
|
|
680
|
+
props
|
|
681
|
+
]));
|
|
602
682
|
return /* @__PURE__ */ _jsxQ("div", {
|
|
603
|
-
class: className(props) + " div-RenderBlocks",
|
|
604
683
|
onClick$: /* @__PURE__ */ inlinedQrl((event) => {
|
|
605
684
|
const [builderContext2, props2, state2] = useLexicalScope();
|
|
606
685
|
return onClick$1(props2);
|
|
@@ -618,6 +697,9 @@ const RenderBlocks = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pr
|
|
|
618
697
|
state
|
|
619
698
|
])
|
|
620
699
|
}, {
|
|
700
|
+
class: _fnSignal((p0) => p0.value + " div-RenderBlocks", [
|
|
701
|
+
className
|
|
702
|
+
], 'p0.value+" div-RenderBlocks"'),
|
|
621
703
|
"builder-path": _fnSignal((p0) => p0.path, [
|
|
622
704
|
props
|
|
623
705
|
], "p0.path"),
|
|
@@ -668,15 +750,6 @@ const getTabletStyle = function getTabletStyle2(props, state, builderContext2, {
|
|
|
668
750
|
const getMobileStyle = function getMobileStyle2(props, state, builderContext2, { stackedStyle, desktopStyle }) {
|
|
669
751
|
return state.stackAt === "never" ? desktopStyle : stackedStyle;
|
|
670
752
|
};
|
|
671
|
-
const columnsCssVars = function columnsCssVars2(props, state, builderContext2) {
|
|
672
|
-
return {
|
|
673
|
-
"--flex-dir": state.flexDir,
|
|
674
|
-
"--flex-dir-tablet": getTabletStyle(props, state, builderContext2, {
|
|
675
|
-
stackedStyle: state.flexDir,
|
|
676
|
-
desktopStyle: "row"
|
|
677
|
-
})
|
|
678
|
-
};
|
|
679
|
-
};
|
|
680
753
|
const columnCssVars = function columnCssVars2(props, state, builderContext2, index) {
|
|
681
754
|
index === 0 ? 0 : state.gutterSize;
|
|
682
755
|
const width = getColumnCssWidth(props, state, builderContext2, index);
|
|
@@ -706,52 +779,79 @@ const getWidthForBreakpointSize = function getWidthForBreakpointSize2(props, sta
|
|
|
706
779
|
const breakpointSizes = getSizesForBreakpoints(builderContext2.content?.meta?.breakpoints || {});
|
|
707
780
|
return breakpointSizes[size].max;
|
|
708
781
|
};
|
|
709
|
-
const
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
782
|
+
const Columns = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
|
|
783
|
+
_jsxBranch();
|
|
784
|
+
useStylesScopedQrl(/* @__PURE__ */ inlinedQrl(STYLES$1, "Columns_component_useStylesScoped_s7JLZz7MCCQ"));
|
|
785
|
+
const builderContext$1 = useContext(builderContext);
|
|
786
|
+
const state = useStore({
|
|
787
|
+
cols: props.columns || [],
|
|
788
|
+
flexDir: props.stackColumnsAt === "never" ? "row" : props.reverseColumnsWhenStacked ? "column-reverse" : "column",
|
|
789
|
+
gutterSize: typeof props.space === "number" ? props.space || 0 : 20,
|
|
790
|
+
stackAt: props.stackColumnsAt || "tablet"
|
|
791
|
+
});
|
|
792
|
+
const columnsCssVars = useComputedQrl(/* @__PURE__ */ inlinedQrl(() => {
|
|
793
|
+
const [builderContext2, props2, state2] = useLexicalScope();
|
|
794
|
+
return {
|
|
795
|
+
"--flex-dir": state2.flexDir,
|
|
796
|
+
"--flex-dir-tablet": getTabletStyle(props2, state2, builderContext2, {
|
|
797
|
+
stackedStyle: state2.flexDir,
|
|
798
|
+
desktopStyle: "row"
|
|
799
|
+
})
|
|
800
|
+
};
|
|
801
|
+
}, "Columns_component_columnsCssVars_useComputed_adFEq2RWT9s", [
|
|
802
|
+
builderContext$1,
|
|
803
|
+
props,
|
|
804
|
+
state
|
|
805
|
+
]));
|
|
806
|
+
const columnsStyles = useComputedQrl(/* @__PURE__ */ inlinedQrl(() => {
|
|
807
|
+
const [builderContext2, props2, state2] = useLexicalScope();
|
|
808
|
+
return `
|
|
809
|
+
@media (max-width: ${getWidthForBreakpointSize(props2, state2, builderContext2, "medium")}px) {
|
|
810
|
+
.${props2.builderBlock.id}-breakpoints {
|
|
713
811
|
flex-direction: var(--flex-dir-tablet);
|
|
714
812
|
align-items: stretch;
|
|
715
813
|
}
|
|
716
814
|
|
|
717
|
-
.${
|
|
815
|
+
.${props2.builderBlock.id}-breakpoints > .builder-column {
|
|
718
816
|
width: var(--column-width-tablet) !important;
|
|
719
817
|
margin-left: var(--column-margin-left-tablet) !important;
|
|
720
818
|
}
|
|
721
819
|
}
|
|
722
820
|
|
|
723
|
-
@media (max-width: ${getWidthForBreakpointSize(
|
|
724
|
-
.${
|
|
821
|
+
@media (max-width: ${getWidthForBreakpointSize(props2, state2, builderContext2, "small")}px) {
|
|
822
|
+
.${props2.builderBlock.id}-breakpoints {
|
|
725
823
|
flex-direction: var(--flex-dir);
|
|
726
824
|
align-items: stretch;
|
|
727
825
|
}
|
|
728
826
|
|
|
729
|
-
.${
|
|
827
|
+
.${props2.builderBlock.id}-breakpoints > .builder-column {
|
|
730
828
|
width: var(--column-width-mobile) !important;
|
|
731
829
|
margin-left: var(--column-margin-left-mobile) !important;
|
|
732
830
|
}
|
|
733
831
|
},
|
|
734
832
|
`;
|
|
735
|
-
}
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
cols: props.columns || [],
|
|
742
|
-
flexDir: props.stackColumnsAt === "never" ? "row" : props.reverseColumnsWhenStacked ? "column-reverse" : "column",
|
|
743
|
-
gutterSize: typeof props.space === "number" ? props.space || 0 : 20,
|
|
744
|
-
stackAt: props.stackColumnsAt || "tablet"
|
|
745
|
-
});
|
|
746
|
-
return /* @__PURE__ */ _jsxQ("div", {
|
|
747
|
-
style: columnsCssVars(props, state, builderContext$1)
|
|
748
|
-
}, {
|
|
833
|
+
}, "Columns_component_columnsStyles_useComputed_nBtMPbzd1Wc", [
|
|
834
|
+
builderContext$1,
|
|
835
|
+
props,
|
|
836
|
+
state
|
|
837
|
+
]));
|
|
838
|
+
return /* @__PURE__ */ _jsxQ("div", null, {
|
|
749
839
|
class: _fnSignal((p0) => `builder-columns ${p0.builderBlock.id}-breakpoints div-Columns`, [
|
|
750
840
|
props
|
|
751
|
-
], '`builder-columns ${p0.builderBlock.id}-breakpoints`+" div-Columns"')
|
|
841
|
+
], '`builder-columns ${p0.builderBlock.id}-breakpoints`+" div-Columns"'),
|
|
842
|
+
style: _fnSignal((p0) => p0.value, [
|
|
843
|
+
columnsCssVars
|
|
844
|
+
], "p0.value")
|
|
752
845
|
}, [
|
|
753
846
|
/* @__PURE__ */ _jsxC(RenderInlinedStyles, {
|
|
754
|
-
styles
|
|
847
|
+
get styles() {
|
|
848
|
+
return columnsStyles.value;
|
|
849
|
+
},
|
|
850
|
+
[_IMMUTABLE]: {
|
|
851
|
+
styles: _fnSignal((p0) => p0.value, [
|
|
852
|
+
columnsStyles
|
|
853
|
+
], "p0.value")
|
|
854
|
+
}
|
|
755
855
|
}, 3, "c0_0"),
|
|
756
856
|
(props.columns || []).map(function(column, index) {
|
|
757
857
|
return /* @__PURE__ */ _jsxQ("div", {
|
|
@@ -847,55 +947,59 @@ function getSrcSet(url) {
|
|
|
847
947
|
]).join(", ");
|
|
848
948
|
return url;
|
|
849
949
|
}
|
|
850
|
-
const srcSetToUse = function srcSetToUse2(props, state) {
|
|
851
|
-
const imageToUse = props.image || props.src;
|
|
852
|
-
if (!imageToUse || !(imageToUse.match(/builder\.io/) || imageToUse.match(/cdn\.shopify\.com/)))
|
|
853
|
-
return props.srcset;
|
|
854
|
-
if (props.srcset && props.image?.includes("builder.io/api/v1/image")) {
|
|
855
|
-
if (!props.srcset.includes(props.image.split("?")[0])) {
|
|
856
|
-
console.debug("Removed given srcset");
|
|
857
|
-
return getSrcSet(imageToUse);
|
|
858
|
-
}
|
|
859
|
-
} else if (props.image && !props.srcset)
|
|
860
|
-
return getSrcSet(imageToUse);
|
|
861
|
-
return getSrcSet(imageToUse);
|
|
862
|
-
};
|
|
863
|
-
const webpSrcSet = function webpSrcSet2(props, state) {
|
|
864
|
-
if (srcSetToUse(props)?.match(/builder\.io/) && !props.noWebp)
|
|
865
|
-
return srcSetToUse(props).replace(/\?/g, "?format=webp&");
|
|
866
|
-
else
|
|
867
|
-
return "";
|
|
868
|
-
};
|
|
869
|
-
const aspectRatioCss = function aspectRatioCss2(props, state) {
|
|
870
|
-
const aspectRatioStyles = {
|
|
871
|
-
position: "absolute",
|
|
872
|
-
height: "100%",
|
|
873
|
-
width: "100%",
|
|
874
|
-
left: "0px",
|
|
875
|
-
top: "0px"
|
|
876
|
-
};
|
|
877
|
-
const out = props.aspectRatio ? aspectRatioStyles : void 0;
|
|
878
|
-
return out;
|
|
879
|
-
};
|
|
880
950
|
const Image = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
|
|
881
951
|
_jsxBranch();
|
|
882
952
|
useStylesScopedQrl(/* @__PURE__ */ inlinedQrl(STYLES, "Image_component_useStylesScoped_fBMYiVf9fuU"));
|
|
953
|
+
const srcSetToUse = useComputedQrl(/* @__PURE__ */ inlinedQrl(() => {
|
|
954
|
+
const [props2] = useLexicalScope();
|
|
955
|
+
const imageToUse = props2.image || props2.src;
|
|
956
|
+
if (!imageToUse || !(imageToUse.match(/builder\.io/) || imageToUse.match(/cdn\.shopify\.com/)))
|
|
957
|
+
return props2.srcset;
|
|
958
|
+
if (props2.srcset && props2.image?.includes("builder.io/api/v1/image")) {
|
|
959
|
+
if (!props2.srcset.includes(props2.image.split("?")[0])) {
|
|
960
|
+
console.debug("Removed given srcset");
|
|
961
|
+
return getSrcSet(imageToUse);
|
|
962
|
+
}
|
|
963
|
+
} else if (props2.image && !props2.srcset)
|
|
964
|
+
return getSrcSet(imageToUse);
|
|
965
|
+
return getSrcSet(imageToUse);
|
|
966
|
+
}, "Image_component_srcSetToUse_useComputed_TZMibf9Gpvw", [
|
|
967
|
+
props
|
|
968
|
+
]));
|
|
969
|
+
const webpSrcSet = useComputedQrl(/* @__PURE__ */ inlinedQrl(() => {
|
|
970
|
+
const [props2, srcSetToUse2] = useLexicalScope();
|
|
971
|
+
if (srcSetToUse2.value?.match(/builder\.io/) && !props2.noWebp)
|
|
972
|
+
return srcSetToUse2.value.replace(/\?/g, "?format=webp&");
|
|
973
|
+
else
|
|
974
|
+
return "";
|
|
975
|
+
}, "Image_component_webpSrcSet_useComputed_01YCu72BBtA", [
|
|
976
|
+
props,
|
|
977
|
+
srcSetToUse
|
|
978
|
+
]));
|
|
979
|
+
const aspectRatioCss = useComputedQrl(/* @__PURE__ */ inlinedQrl(() => {
|
|
980
|
+
const [props2] = useLexicalScope();
|
|
981
|
+
const aspectRatioStyles = {
|
|
982
|
+
position: "absolute",
|
|
983
|
+
height: "100%",
|
|
984
|
+
width: "100%",
|
|
985
|
+
left: "0px",
|
|
986
|
+
top: "0px"
|
|
987
|
+
};
|
|
988
|
+
const out = props2.aspectRatio ? aspectRatioStyles : void 0;
|
|
989
|
+
return out;
|
|
990
|
+
}, "Image_component_aspectRatioCss_useComputed_yJ1jG0g5fbw", [
|
|
991
|
+
props
|
|
992
|
+
]));
|
|
883
993
|
return /* @__PURE__ */ _jsxC(Fragment$1, {
|
|
884
994
|
children: [
|
|
885
995
|
/* @__PURE__ */ _jsxQ("picture", null, null, [
|
|
886
|
-
webpSrcSet
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
996
|
+
webpSrcSet.value ? /* @__PURE__ */ _jsxQ("source", null, {
|
|
997
|
+
type: "image/webp",
|
|
998
|
+
srcSet: _fnSignal((p0) => p0.value, [
|
|
999
|
+
webpSrcSet
|
|
1000
|
+
], "p0.value")
|
|
890
1001
|
}, null, 3, "0A_0") : null,
|
|
891
|
-
/* @__PURE__ */ _jsxQ("img", {
|
|
892
|
-
style: {
|
|
893
|
-
objectPosition: props.backgroundPosition || "center",
|
|
894
|
-
objectFit: props.backgroundSize || "cover",
|
|
895
|
-
...aspectRatioCss(props)
|
|
896
|
-
},
|
|
897
|
-
srcSet: srcSetToUse(props)
|
|
898
|
-
}, {
|
|
1002
|
+
/* @__PURE__ */ _jsxQ("img", null, {
|
|
899
1003
|
loading: "lazy",
|
|
900
1004
|
alt: _fnSignal((p0) => p0.altText, [
|
|
901
1005
|
props
|
|
@@ -903,12 +1007,23 @@ const Image = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
|
|
|
903
1007
|
role: _fnSignal((p0) => p0.altText ? "presentation" : void 0, [
|
|
904
1008
|
props
|
|
905
1009
|
], 'p0.altText?"presentation":undefined'),
|
|
1010
|
+
style: _fnSignal((p0, p1) => ({
|
|
1011
|
+
objectPosition: p1.backgroundPosition || "center",
|
|
1012
|
+
objectFit: p1.backgroundSize || "cover",
|
|
1013
|
+
...p0.value
|
|
1014
|
+
}), [
|
|
1015
|
+
aspectRatioCss,
|
|
1016
|
+
props
|
|
1017
|
+
], '{objectPosition:p1.backgroundPosition||"center",objectFit:p1.backgroundSize||"cover",...p0.value}'),
|
|
906
1018
|
class: _fnSignal((p0) => "builder-image" + (p0.className ? " " + p0.className : "") + " img-Image", [
|
|
907
1019
|
props
|
|
908
1020
|
], '"builder-image"+(p0.className?" "+p0.className:"")+" img-Image"'),
|
|
909
1021
|
src: _fnSignal((p0) => p0.image, [
|
|
910
1022
|
props
|
|
911
1023
|
], "p0.image"),
|
|
1024
|
+
srcSet: _fnSignal((p0) => p0.value, [
|
|
1025
|
+
srcSetToUse
|
|
1026
|
+
], "p0.value"),
|
|
912
1027
|
sizes: _fnSignal((p0) => p0.sizes, [
|
|
913
1028
|
props
|
|
914
1029
|
], "p0.sizes")
|
|
@@ -1432,7 +1547,7 @@ const componentInfo$6 = {
|
|
|
1432
1547
|
]
|
|
1433
1548
|
};
|
|
1434
1549
|
const SectionComponent = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
|
|
1435
|
-
return /* @__PURE__ */
|
|
1550
|
+
return /* @__PURE__ */ _jsxS("section", {
|
|
1436
1551
|
...props.attributes,
|
|
1437
1552
|
style: {
|
|
1438
1553
|
width: "100%",
|
|
@@ -1445,8 +1560,9 @@ const SectionComponent = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl
|
|
|
1445
1560
|
alignItems: "stretch",
|
|
1446
1561
|
marginLeft: "auto",
|
|
1447
1562
|
marginRight: "auto"
|
|
1448
|
-
}
|
|
1449
|
-
|
|
1563
|
+
},
|
|
1564
|
+
children: /* @__PURE__ */ _jsxC(Slot, null, 3, "2Y_0")
|
|
1565
|
+
}, null, 0, "2Y_1");
|
|
1450
1566
|
}, "SectionComponent_component_ZWF9iD5WeLg"));
|
|
1451
1567
|
const componentInfo$5 = {
|
|
1452
1568
|
name: "Symbol",
|
|
@@ -1810,68 +1926,69 @@ const Symbol$1 = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props)
|
|
|
1810
1926
|
props,
|
|
1811
1927
|
state
|
|
1812
1928
|
]));
|
|
1813
|
-
return /* @__PURE__ */
|
|
1814
|
-
...props.attributes
|
|
1929
|
+
return /* @__PURE__ */ _jsxS("div", {
|
|
1930
|
+
...props.attributes,
|
|
1931
|
+
children: /* @__PURE__ */ _jsxC(RenderContent, {
|
|
1932
|
+
get apiVersion() {
|
|
1933
|
+
return builderContext$1.apiVersion;
|
|
1934
|
+
},
|
|
1935
|
+
get apiKey() {
|
|
1936
|
+
return builderContext$1.apiKey;
|
|
1937
|
+
},
|
|
1938
|
+
get context() {
|
|
1939
|
+
return builderContext$1.context;
|
|
1940
|
+
},
|
|
1941
|
+
get customComponents() {
|
|
1942
|
+
return Object.values(builderContext$1.registeredComponents);
|
|
1943
|
+
},
|
|
1944
|
+
get data() {
|
|
1945
|
+
return {
|
|
1946
|
+
...props.symbol?.data,
|
|
1947
|
+
...builderContext$1.state,
|
|
1948
|
+
...state.contentToUse?.data?.state
|
|
1949
|
+
};
|
|
1950
|
+
},
|
|
1951
|
+
get model() {
|
|
1952
|
+
return props.symbol?.model;
|
|
1953
|
+
},
|
|
1954
|
+
get content() {
|
|
1955
|
+
return state.contentToUse;
|
|
1956
|
+
},
|
|
1957
|
+
[_IMMUTABLE]: {
|
|
1958
|
+
apiVersion: _fnSignal((p0) => p0.apiVersion, [
|
|
1959
|
+
builderContext$1
|
|
1960
|
+
], "p0.apiVersion"),
|
|
1961
|
+
apiKey: _fnSignal((p0) => p0.apiKey, [
|
|
1962
|
+
builderContext$1
|
|
1963
|
+
], "p0.apiKey"),
|
|
1964
|
+
context: _fnSignal((p0) => p0.context, [
|
|
1965
|
+
builderContext$1
|
|
1966
|
+
], "p0.context"),
|
|
1967
|
+
customComponents: _fnSignal((p0) => Object.values(p0.registeredComponents), [
|
|
1968
|
+
builderContext$1
|
|
1969
|
+
], "Object.values(p0.registeredComponents)"),
|
|
1970
|
+
data: _fnSignal((p0, p1, p2) => ({
|
|
1971
|
+
...p1.symbol?.data,
|
|
1972
|
+
...p0.state,
|
|
1973
|
+
...p2.contentToUse?.data?.state
|
|
1974
|
+
}), [
|
|
1975
|
+
builderContext$1,
|
|
1976
|
+
props,
|
|
1977
|
+
state
|
|
1978
|
+
], "{...p1.symbol?.data,...p0.state,...p2.contentToUse?.data?.state}"),
|
|
1979
|
+
model: _fnSignal((p0) => p0.symbol?.model, [
|
|
1980
|
+
props
|
|
1981
|
+
], "p0.symbol?.model"),
|
|
1982
|
+
content: _fnSignal((p0) => p0.contentToUse, [
|
|
1983
|
+
state
|
|
1984
|
+
], "p0.contentToUse")
|
|
1985
|
+
}
|
|
1986
|
+
}, 3, "Wt_0")
|
|
1815
1987
|
}, {
|
|
1816
1988
|
class: _fnSignal((p0) => p0.className, [
|
|
1817
1989
|
state
|
|
1818
1990
|
], "p0.className")
|
|
1819
|
-
},
|
|
1820
|
-
get apiVersion() {
|
|
1821
|
-
return builderContext$1.apiVersion;
|
|
1822
|
-
},
|
|
1823
|
-
get apiKey() {
|
|
1824
|
-
return builderContext$1.apiKey;
|
|
1825
|
-
},
|
|
1826
|
-
get context() {
|
|
1827
|
-
return builderContext$1.context;
|
|
1828
|
-
},
|
|
1829
|
-
get customComponents() {
|
|
1830
|
-
return Object.values(builderContext$1.registeredComponents);
|
|
1831
|
-
},
|
|
1832
|
-
get data() {
|
|
1833
|
-
return {
|
|
1834
|
-
...props.symbol?.data,
|
|
1835
|
-
...builderContext$1.state,
|
|
1836
|
-
...state.contentToUse?.data?.state
|
|
1837
|
-
};
|
|
1838
|
-
},
|
|
1839
|
-
get model() {
|
|
1840
|
-
return props.symbol?.model;
|
|
1841
|
-
},
|
|
1842
|
-
get content() {
|
|
1843
|
-
return state.contentToUse;
|
|
1844
|
-
},
|
|
1845
|
-
[_IMMUTABLE]: {
|
|
1846
|
-
apiVersion: _fnSignal((p0) => p0.apiVersion, [
|
|
1847
|
-
builderContext$1
|
|
1848
|
-
], "p0.apiVersion"),
|
|
1849
|
-
apiKey: _fnSignal((p0) => p0.apiKey, [
|
|
1850
|
-
builderContext$1
|
|
1851
|
-
], "p0.apiKey"),
|
|
1852
|
-
context: _fnSignal((p0) => p0.context, [
|
|
1853
|
-
builderContext$1
|
|
1854
|
-
], "p0.context"),
|
|
1855
|
-
customComponents: _fnSignal((p0) => Object.values(p0.registeredComponents), [
|
|
1856
|
-
builderContext$1
|
|
1857
|
-
], "Object.values(p0.registeredComponents)"),
|
|
1858
|
-
data: _fnSignal((p0, p1, p2) => ({
|
|
1859
|
-
...p1.symbol?.data,
|
|
1860
|
-
...p0.state,
|
|
1861
|
-
...p2.contentToUse?.data?.state
|
|
1862
|
-
}), [
|
|
1863
|
-
builderContext$1,
|
|
1864
|
-
props,
|
|
1865
|
-
state
|
|
1866
|
-
], "{...p1.symbol?.data,...p0.state,...p2.contentToUse?.data?.state}"),
|
|
1867
|
-
model: _fnSignal((p0) => p0.symbol?.model, [
|
|
1868
|
-
props
|
|
1869
|
-
], "p0.symbol?.model"),
|
|
1870
|
-
content: _fnSignal((p0) => p0.contentToUse, [
|
|
1871
|
-
state
|
|
1872
|
-
], "p0.contentToUse")
|
|
1873
|
-
}
|
|
1874
|
-
}, 3, "Wt_0"), 0, "Wt_1");
|
|
1991
|
+
}, 0, "Wt_1");
|
|
1875
1992
|
}, "Symbol_component_WVvggdkUPdk"));
|
|
1876
1993
|
const componentInfo$4 = {
|
|
1877
1994
|
name: "Text",
|
|
@@ -2017,34 +2134,41 @@ const componentInfo$3 = {
|
|
|
2017
2134
|
}
|
|
2018
2135
|
]
|
|
2019
2136
|
};
|
|
2020
|
-
const videoProps = function videoProps2(props, state) {
|
|
2021
|
-
return {
|
|
2022
|
-
...props.autoPlay === true ? {
|
|
2023
|
-
autoPlay: true
|
|
2024
|
-
} : {},
|
|
2025
|
-
...props.muted === true ? {
|
|
2026
|
-
muted: true
|
|
2027
|
-
} : {},
|
|
2028
|
-
...props.controls === true ? {
|
|
2029
|
-
controls: true
|
|
2030
|
-
} : {},
|
|
2031
|
-
...props.loop === true ? {
|
|
2032
|
-
loop: true
|
|
2033
|
-
} : {},
|
|
2034
|
-
...props.playsInline === true ? {
|
|
2035
|
-
playsInline: true
|
|
2036
|
-
} : {}
|
|
2037
|
-
};
|
|
2038
|
-
};
|
|
2039
|
-
const spreadProps = function spreadProps2(props, state) {
|
|
2040
|
-
return {
|
|
2041
|
-
...props.attributes,
|
|
2042
|
-
...videoProps(props)
|
|
2043
|
-
};
|
|
2044
|
-
};
|
|
2045
2137
|
const Video = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
|
|
2046
|
-
|
|
2047
|
-
|
|
2138
|
+
const videoProps = useComputedQrl(/* @__PURE__ */ inlinedQrl(() => {
|
|
2139
|
+
const [props2] = useLexicalScope();
|
|
2140
|
+
return {
|
|
2141
|
+
...props2.autoPlay === true ? {
|
|
2142
|
+
autoPlay: true
|
|
2143
|
+
} : {},
|
|
2144
|
+
...props2.muted === true ? {
|
|
2145
|
+
muted: true
|
|
2146
|
+
} : {},
|
|
2147
|
+
...props2.controls === true ? {
|
|
2148
|
+
controls: true
|
|
2149
|
+
} : {},
|
|
2150
|
+
...props2.loop === true ? {
|
|
2151
|
+
loop: true
|
|
2152
|
+
} : {},
|
|
2153
|
+
...props2.playsInline === true ? {
|
|
2154
|
+
playsInline: true
|
|
2155
|
+
} : {}
|
|
2156
|
+
};
|
|
2157
|
+
}, "Video_component_videoProps_useComputed_60AadUGY06E", [
|
|
2158
|
+
props
|
|
2159
|
+
]));
|
|
2160
|
+
const spreadProps = useComputedQrl(/* @__PURE__ */ inlinedQrl(() => {
|
|
2161
|
+
const [props2, videoProps2] = useLexicalScope();
|
|
2162
|
+
return {
|
|
2163
|
+
...props2.attributes,
|
|
2164
|
+
...videoProps2.value
|
|
2165
|
+
};
|
|
2166
|
+
}, "Video_component_spreadProps_useComputed_ZdLsx18NYH4", [
|
|
2167
|
+
props,
|
|
2168
|
+
videoProps
|
|
2169
|
+
]));
|
|
2170
|
+
return /* @__PURE__ */ _jsxS("video", {
|
|
2171
|
+
...spreadProps.value
|
|
2048
2172
|
}, {
|
|
2049
2173
|
style: _fnSignal((p0) => ({
|
|
2050
2174
|
width: "100%",
|
|
@@ -2062,7 +2186,7 @@ const Video = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
|
|
|
2062
2186
|
poster: _fnSignal((p0) => p0.posterImage, [
|
|
2063
2187
|
props
|
|
2064
2188
|
], "p0.posterImage")
|
|
2065
|
-
},
|
|
2189
|
+
}, 0, "j7_0");
|
|
2066
2190
|
}, "Video_component_qdcTZflYyoQ"));
|
|
2067
2191
|
const componentInfo$2 = {
|
|
2068
2192
|
name: "Embed",
|
|
@@ -2157,7 +2281,7 @@ const Embed = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
|
|
|
2157
2281
|
}, null, 3, "9r_0");
|
|
2158
2282
|
}, "Embed_component_Uji08ORjXbE"));
|
|
2159
2283
|
const ImgComponent = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
|
|
2160
|
-
return /* @__PURE__ */
|
|
2284
|
+
return /* @__PURE__ */ _jsxS("img", {
|
|
2161
2285
|
...props.attributes
|
|
2162
2286
|
}, {
|
|
2163
2287
|
style: _fnSignal((p0) => ({
|
|
@@ -2172,7 +2296,7 @@ const ImgComponent = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pr
|
|
|
2172
2296
|
src: _fnSignal((p0) => p0.imgSrc || p0.image, [
|
|
2173
2297
|
props
|
|
2174
2298
|
], "p0.imgSrc||p0.image")
|
|
2175
|
-
},
|
|
2299
|
+
}, 0, isEditing() && props.imgSrc || "default-key");
|
|
2176
2300
|
}, "ImgComponent_component_FXvIDBSffO8"));
|
|
2177
2301
|
const componentInfo$1 = {
|
|
2178
2302
|
name: "Raw:Img",
|
|
@@ -2333,13 +2457,13 @@ function isPreviewing() {
|
|
|
2333
2457
|
return Boolean(location.search.indexOf("builder.preview=") !== -1);
|
|
2334
2458
|
}
|
|
2335
2459
|
const components = [];
|
|
2336
|
-
function registerComponent(
|
|
2460
|
+
function registerComponent(component, info) {
|
|
2337
2461
|
components.push({
|
|
2338
|
-
component
|
|
2462
|
+
component,
|
|
2339
2463
|
...info
|
|
2340
2464
|
});
|
|
2341
2465
|
console.warn("registerComponent is deprecated. Use the `customComponents` prop in RenderContent instead to provide your custom components to the builder SDK.");
|
|
2342
|
-
return
|
|
2466
|
+
return component;
|
|
2343
2467
|
}
|
|
2344
2468
|
const createRegisterComponentMessage = ({ component: _, ...info }) => ({
|
|
2345
2469
|
type: "builder.registerComponent",
|
|
@@ -2962,6 +3086,8 @@ const RenderContent = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((p
|
|
|
2962
3086
|
content: props.content,
|
|
2963
3087
|
data: props.data
|
|
2964
3088
|
})
|
|
3089
|
+
}, {
|
|
3090
|
+
deep: true
|
|
2965
3091
|
});
|
|
2966
3092
|
useContextProvider(builderContext, useStore({
|
|
2967
3093
|
content: state.useContent,
|