@builder.io/sdk-solid 1.0.26 → 1.0.28

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.
@@ -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 ${camelCaseToKebabCase(animation.easing)}`;
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 ${camelCaseToKebabCase(animation.easing)}`;
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 ${camelCaseToKebabCase(hoverAnimation.easing)}`,
919
+ transition: `all ${hoverAnimation.duration}s ${camelToKebabCase(hoverAnimation.easing)}`,
921
920
  transitionDelay: hoverAnimation.delay ? `${hoverAnimation.delay}s` : "0s"
922
921
  }
923
922
  }) || "";
@@ -2777,8 +2776,12 @@ function Tabs(props) {
2777
2776
  function activeTabContent(active) {
2778
2777
  return props.tabs && props.tabs[active].content;
2779
2778
  }
2780
- function getActiveTabStyle(index) {
2781
- return activeTab() === index ? props.activeTabStyle : {};
2779
+ function onClick(index) {
2780
+ if (index === activeTab() && props.collapsible) {
2781
+ setActiveTab(-1);
2782
+ } else {
2783
+ setActiveTab(index);
2784
+ }
2782
2785
  }
2783
2786
  return (() => {
2784
2787
  const _el$ = _tmpl$23(), _el$2 = _el$.firstChild;
@@ -2793,13 +2796,7 @@ function Tabs(props) {
2793
2796
  const index = _index();
2794
2797
  return (() => {
2795
2798
  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
- };
2799
+ _el$4.$$click = (event) => onClick(index);
2803
2800
  setAttribute(_el$4, "key", index);
2804
2801
  insert(_el$4, createComponent(blocks_default, {
2805
2802
  get parent() {
@@ -2820,7 +2817,9 @@ function Tabs(props) {
2820
2817
  }
2821
2818
  }));
2822
2819
  effect((_p$) => {
2823
- const _v$ = `builder-tab-wrap ${activeTab() === index ? "builder-tab-active" : ""}`, _v$2 = getActiveTabStyle(index);
2820
+ const _v$ = `builder-tab-wrap ${activeTab() === index ? "builder-tab-active" : ""}`, _v$2 = {
2821
+ ...activeTab() === index ? props.activeTabStyle : {}
2822
+ };
2824
2823
  _v$ !== _p$._v$ && className(_el$4, _p$._v$ = _v$);
2825
2824
  _p$._v$2 = style(_el$4, _v$2, _p$._v$2);
2826
2825
  return _p$;
@@ -2899,8 +2898,320 @@ function Text(props) {
2899
2898
  }
2900
2899
  var text_default = Text;
2901
2900
 
2902
- // src/blocks/custom-code/component-info.ts
2901
+ // src/blocks/accordion/helpers.ts
2902
+ var convertOrderNumberToString = (order) => {
2903
+ return order.toString();
2904
+ };
2905
+
2906
+ // src/blocks/accordion/accordion.tsx
2907
+ var _tmpl$9 = /* @__PURE__ */ template(`<div class=builder-accordion>`);
2908
+ var _tmpl$24 = /* @__PURE__ */ template(`<div>`);
2909
+ function Accordion(props) {
2910
+ const [open, setOpen] = createSignal([]);
2911
+ const onlyOneAtATime = createMemo(() => {
2912
+ return Boolean(props.grid || props.oneAtATime);
2913
+ });
2914
+ const accordionStyles = createMemo(() => {
2915
+ const styles = {
2916
+ display: "flex",
2917
+ alignItems: "stretch",
2918
+ flexDirection: "column",
2919
+ ...props.grid && {
2920
+ flexDirection: "row",
2921
+ alignItems: "flex-start",
2922
+ flexWrap: "wrap"
2923
+ }
2924
+ };
2925
+ return Object.fromEntries(Object.entries(styles).map(([key, value]) => [camelToKebabCase(key), value]));
2926
+ });
2927
+ const accordionTitleStyles = createMemo(() => {
2928
+ const shared = {
2929
+ display: "flex",
2930
+ flexDirection: "column"
2931
+ };
2932
+ const styles = Object.fromEntries(Object.entries({
2933
+ ...shared,
2934
+ alignItems: "stretch",
2935
+ cursor: "pointer"
2936
+ }).map(([key, value]) => [camelToKebabCase(key), value]));
2937
+ return Object.fromEntries(Object.entries(styles).filter(([_, value]) => value !== void 0));
2938
+ });
2939
+ function getAccordionTitleClassName(index) {
2940
+ return `builder-accordion-title builder-accordion-title-${open().includes(index) ? "open" : "closed"}`;
2941
+ }
2942
+ function getAccordionDetailClassName(index) {
2943
+ return `builder-accordion-detail builder-accordion-detail-${open().includes(index) ? "open" : "closed"}`;
2944
+ }
2945
+ const openGridItemOrder = createMemo(() => {
2946
+ let itemOrder = null;
2947
+ const getOpenGridItemPosition = props.grid && open().length;
2948
+ if (getOpenGridItemPosition && document) {
2949
+ const openItemIndex = open()[0];
2950
+ const openItem = document.querySelector(`.builder-accordion-title[data-index="${openItemIndex}"]`);
2951
+ let subjectItem = openItem;
2952
+ itemOrder = openItemIndex;
2953
+ if (subjectItem) {
2954
+ let prevItemRect = subjectItem.getBoundingClientRect();
2955
+ while (subjectItem = subjectItem && subjectItem.nextElementSibling) {
2956
+ if (subjectItem) {
2957
+ if (subjectItem.classList.contains("builder-accordion-detail")) {
2958
+ continue;
2959
+ }
2960
+ const subjectItemRect = subjectItem.getBoundingClientRect();
2961
+ if (subjectItemRect.left > prevItemRect.left) {
2962
+ const index = parseInt(subjectItem.getAttribute("data-index") || "", 10);
2963
+ if (!isNaN(index)) {
2964
+ prevItemRect = subjectItemRect;
2965
+ itemOrder = index;
2966
+ }
2967
+ } else {
2968
+ break;
2969
+ }
2970
+ }
2971
+ }
2972
+ }
2973
+ }
2974
+ if (typeof itemOrder === "number") {
2975
+ itemOrder = itemOrder + 1;
2976
+ }
2977
+ return itemOrder;
2978
+ });
2979
+ const accordionDetailStyles = createMemo(() => {
2980
+ const styles = {
2981
+ ...{
2982
+ order: typeof openGridItemOrder() === "number" ? openGridItemOrder() : void 0
2983
+ },
2984
+ ...props.grid && {
2985
+ width: "100%"
2986
+ }
2987
+ };
2988
+ return Object.fromEntries(Object.entries(styles).filter(([_, value]) => value !== void 0));
2989
+ });
2990
+ function onClick(index) {
2991
+ if (open().includes(index)) {
2992
+ setOpen(onlyOneAtATime() ? [] : open().filter((item) => item !== index));
2993
+ } else {
2994
+ setOpen(onlyOneAtATime() ? [index] : open().concat(index));
2995
+ }
2996
+ }
2997
+ return (() => {
2998
+ const _el$ = _tmpl$9();
2999
+ insert(_el$, createComponent(For, {
3000
+ get each() {
3001
+ return props.items;
3002
+ },
3003
+ children: (item, _index) => {
3004
+ const index = _index();
3005
+ return [(() => {
3006
+ const _el$2 = _tmpl$24();
3007
+ _el$2.$$click = (event) => onClick(index);
3008
+ setAttribute(_el$2, "data-index", index);
3009
+ insert(_el$2, createComponent(blocks_default, {
3010
+ get blocks() {
3011
+ return item.title;
3012
+ },
3013
+ path: `items.${index}.title`,
3014
+ get parent() {
3015
+ return props.builderBlock.id;
3016
+ },
3017
+ get context() {
3018
+ return props.builderContext;
3019
+ },
3020
+ get registeredComponents() {
3021
+ return props.builderComponents;
3022
+ },
3023
+ get linkComponent() {
3024
+ return props.builderLinkComponent;
3025
+ }
3026
+ }));
3027
+ effect((_p$) => {
3028
+ const _v$ = getAccordionTitleClassName(index), _v$2 = {
3029
+ ...accordionTitleStyles(),
3030
+ width: props.grid ? props.gridRowWidth : void 0,
3031
+ ...{
3032
+ order: openGridItemOrder() !== null ? convertOrderNumberToString(index) : convertOrderNumberToString(index + 1)
3033
+ }
3034
+ };
3035
+ _v$ !== _p$._v$ && className(_el$2, _p$._v$ = _v$);
3036
+ _p$._v$2 = style(_el$2, _v$2, _p$._v$2);
3037
+ return _p$;
3038
+ }, {
3039
+ _v$: void 0,
3040
+ _v$2: void 0
3041
+ });
3042
+ return _el$2;
3043
+ })(), createComponent(Show, {
3044
+ get when() {
3045
+ return open().includes(index);
3046
+ },
3047
+ get children() {
3048
+ const _el$3 = _tmpl$24();
3049
+ insert(_el$3, createComponent(blocks_default, {
3050
+ get blocks() {
3051
+ return item.detail;
3052
+ },
3053
+ path: `items.${index}.detail`,
3054
+ get parent() {
3055
+ return props.builderBlock.id;
3056
+ },
3057
+ get context() {
3058
+ return props.builderContext;
3059
+ },
3060
+ get registeredComponents() {
3061
+ return props.builderComponents;
3062
+ },
3063
+ get linkComponent() {
3064
+ return props.builderLinkComponent;
3065
+ }
3066
+ }));
3067
+ effect((_p$) => {
3068
+ const _v$3 = getAccordionDetailClassName(index), _v$4 = accordionDetailStyles();
3069
+ _v$3 !== _p$._v$3 && className(_el$3, _p$._v$3 = _v$3);
3070
+ _p$._v$4 = style(_el$3, _v$4, _p$._v$4);
3071
+ return _p$;
3072
+ }, {
3073
+ _v$3: void 0,
3074
+ _v$4: void 0
3075
+ });
3076
+ return _el$3;
3077
+ }
3078
+ })];
3079
+ }
3080
+ }));
3081
+ effect((_$p) => style(_el$, accordionStyles(), _$p));
3082
+ return _el$;
3083
+ })();
3084
+ }
3085
+ var accordion_default = Accordion;
3086
+ delegateEvents(["click"]);
3087
+
3088
+ // src/blocks/accordion/component-info.ts
3089
+ var defaultTitle = {
3090
+ "@type": "@builder.io/sdk:Element",
3091
+ layerName: "Accordion item title",
3092
+ responsiveStyles: {
3093
+ large: {
3094
+ marginTop: "10px",
3095
+ position: "relative",
3096
+ display: "flex",
3097
+ alignItems: "stretch",
3098
+ flexDirection: "column",
3099
+ paddingBottom: "10px"
3100
+ }
3101
+ },
3102
+ children: [{
3103
+ "@type": "@builder.io/sdk:Element",
3104
+ responsiveStyles: {
3105
+ large: {
3106
+ textAlign: "left",
3107
+ display: "flex",
3108
+ flexDirection: "column"
3109
+ }
3110
+ },
3111
+ component: {
3112
+ name: "Text",
3113
+ options: {
3114
+ text: "I am an accordion title. Click me!"
3115
+ }
3116
+ }
3117
+ }]
3118
+ };
3119
+ var defaultDetail = {
3120
+ "@type": "@builder.io/sdk:Element",
3121
+ layerName: "Accordion item detail",
3122
+ responsiveStyles: {
3123
+ large: {
3124
+ position: "relative",
3125
+ display: "flex",
3126
+ alignItems: "stretch",
3127
+ flexDirection: "column",
3128
+ marginTop: "10px",
3129
+ paddingBottom: "10px"
3130
+ }
3131
+ },
3132
+ children: [{
3133
+ "@type": "@builder.io/sdk:Element",
3134
+ responsiveStyles: {
3135
+ large: {
3136
+ paddingTop: "50px",
3137
+ textAlign: "left",
3138
+ display: "flex",
3139
+ flexDirection: "column",
3140
+ paddingBottom: "50px"
3141
+ }
3142
+ },
3143
+ component: {
3144
+ name: "Text",
3145
+ options: {
3146
+ text: "I am an accordion detail, hello!"
3147
+ }
3148
+ }
3149
+ }]
3150
+ };
2903
3151
  var componentInfo10 = {
3152
+ name: "Builder:Accordion",
3153
+ canHaveChildren: true,
3154
+ image: "https://cdn.builder.io/api/v1/image/assets%2FagZ9n5CUKRfbL9t6CaJOyVSK4Es2%2Ffab6c1fd3fe542408cbdec078bca7f35",
3155
+ defaultStyles: {
3156
+ display: "flex",
3157
+ flexDirection: "column",
3158
+ alignItems: "stretch"
3159
+ },
3160
+ inputs: [{
3161
+ name: "items",
3162
+ type: "list",
3163
+ broadcast: true,
3164
+ subFields: [{
3165
+ name: "title",
3166
+ type: "uiBlocks",
3167
+ hideFromUI: true,
3168
+ defaultValue: [defaultTitle]
3169
+ }, {
3170
+ name: "detail",
3171
+ type: "uiBlocks",
3172
+ hideFromUI: true,
3173
+ defaultValue: [defaultDetail]
3174
+ }],
3175
+ defaultValue: [{
3176
+ title: [defaultTitle],
3177
+ detail: [defaultDetail]
3178
+ }, {
3179
+ title: [defaultTitle],
3180
+ detail: [defaultDetail]
3181
+ }],
3182
+ showIf: (options) => !options.get("useChildrenForItems")
3183
+ }, {
3184
+ name: "oneAtATime",
3185
+ helperText: "Only allow opening one at a time (collapse all others when new item openned)",
3186
+ type: "boolean",
3187
+ defaultValue: false
3188
+ }, {
3189
+ name: "grid",
3190
+ helperText: "Display as a grid",
3191
+ type: "boolean",
3192
+ defaultValue: false
3193
+ }, {
3194
+ name: "gridRowWidth",
3195
+ helperText: "Display as a grid",
3196
+ type: "string",
3197
+ showIf: (options) => options.get("grid"),
3198
+ defaultValue: "25%"
3199
+ }, {
3200
+ name: "useChildrenForItems",
3201
+ type: "boolean",
3202
+ helperText: "Use child elements for each slide, instead of the array. Useful for dynamically repeating items",
3203
+ advanced: true,
3204
+ defaultValue: false,
3205
+ onChange: (options) => {
3206
+ if (options.get("useChildrenForItems") === true) {
3207
+ options.set("items", []);
3208
+ }
3209
+ }
3210
+ }]
3211
+ };
3212
+
3213
+ // src/blocks/custom-code/component-info.ts
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$9 = /* @__PURE__ */ template(`<div>`);
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$9();
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 componentInfo11 = {
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$10 = /* @__PURE__ */ template(`<div class=builder-embed>`);
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$10();
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 componentInfo12 = {
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$11 = /* @__PURE__ */ template(`<pre>`);
3315
- var _tmpl$24 = /* @__PURE__ */ template(`<form>`);
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);
@@ -3498,7 +3809,7 @@ function FormComponent(props) {
3498
3809
  }
3499
3810
  let formRef;
3500
3811
  return (() => {
3501
- const _el$ = _tmpl$24();
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$;
@@ -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$11();
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 componentInfo13 = {
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$12 = /* @__PURE__ */ template(`<input>`);
3979
+ var _tmpl$13 = /* @__PURE__ */ template(`<input>`);
3669
3980
  function FormInputComponent(props) {
3670
3981
  return (() => {
3671
- const _el$ = _tmpl$12();
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 componentInfo14 = {
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$13 = /* @__PURE__ */ template(`<select>`);
3745
- var _tmpl$25 = /* @__PURE__ */ template(`<option>`);
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$13();
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$25();
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 componentInfo15 = {
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$14 = /* @__PURE__ */ template(`<button type=submit>`);
4121
+ var _tmpl$15 = /* @__PURE__ */ template(`<button type=submit>`);
3811
4122
  function SubmitButton(props) {
3812
4123
  return (() => {
3813
- const _el$ = _tmpl$14();
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 componentInfo16 = {
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$15 = /* @__PURE__ */ template(`<img>`);
4148
+ var _tmpl$16 = /* @__PURE__ */ template(`<img>`);
3838
4149
  function ImgComponent(props) {
3839
4150
  return (() => {
3840
- const _el$ = _tmpl$15();
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 componentInfo17 = {
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$16 = /* @__PURE__ */ template(`<source type=video/mp4>`);
3947
- var _tmpl$26 = /* @__PURE__ */ template(`<div>`);
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$16();
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$26();
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$26();
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$26();
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,28 +4375,28 @@ var video_default = Video;
4064
4375
  // src/constants/extra-components.ts
4065
4376
  var getExtraComponents = () => [{
4066
4377
  component: custom_code_default,
4067
- ...componentInfo10
4378
+ ...componentInfo11
4068
4379
  }, {
4069
4380
  component: embed_default,
4070
- ...componentInfo11
4381
+ ...componentInfo12
4071
4382
  }, ...TARGET === "rsc" ? [] : [{
4072
4383
  component: form_default,
4073
- ...componentInfo12
4384
+ ...componentInfo13
4074
4385
  }, {
4075
4386
  component: input_default,
4076
- ...componentInfo13
4387
+ ...componentInfo14
4077
4388
  }, {
4078
4389
  component: submit_button_default,
4079
- ...componentInfo15
4390
+ ...componentInfo16
4080
4391
  }, {
4081
4392
  component: select_default,
4082
- ...componentInfo14
4393
+ ...componentInfo15
4083
4394
  }], {
4084
4395
  component: img_default,
4085
- ...componentInfo16
4396
+ ...componentInfo17
4086
4397
  }, {
4087
4398
  component: video_default,
4088
- ...componentInfo17
4399
+ ...componentInfo18
4089
4400
  }];
4090
4401
 
4091
4402
  // src/constants/builder-registered-components.ts
@@ -4116,6 +4427,9 @@ var getDefaultRegisteredComponents = () => [{
4116
4427
  }, ...TARGET === "rsc" ? [] : [{
4117
4428
  component: tabs_default,
4118
4429
  ...componentInfo8
4430
+ }, {
4431
+ component: accordion_default,
4432
+ ...componentInfo10
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$17 = /* @__PURE__ */ template(`<script>`);
4502
+ var _tmpl$18 = /* @__PURE__ */ template(`<script>`);
4189
4503
  function InlinedScript(props) {
4190
4504
  return (() => {
4191
- const _el$ = _tmpl$17();
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$);
@@ -4250,6 +4564,18 @@ function flatten(object, path = null, separator = ".") {
4250
4564
  };
4251
4565
  }, {});
4252
4566
  }
4567
+ function flattenMongoQuery(obj, _current, _res = {}) {
4568
+ for (const key in obj) {
4569
+ const value = obj[key];
4570
+ const newKey = _current ? _current + "." + key : key;
4571
+ if (value && typeof value === "object" && !Array.isArray(value) && !Object.keys(value).find((item) => item.startsWith("$"))) {
4572
+ flattenMongoQuery(value, newKey, _res);
4573
+ } else {
4574
+ _res[newKey] = value;
4575
+ }
4576
+ }
4577
+ return _res;
4578
+ }
4253
4579
 
4254
4580
  // src/types/api-version.ts
4255
4581
  var DEFAULT_API_VERSION = "v3";
@@ -4351,7 +4677,7 @@ var generateContentUrl = (options) => {
4351
4677
  url.searchParams.set("userAttributes", JSON.stringify(userAttributes));
4352
4678
  }
4353
4679
  if (query) {
4354
- const flattened2 = flatten({
4680
+ const flattened2 = flattenMongoQuery({
4355
4681
  query
4356
4682
  });
4357
4683
  for (const key in flattened2) {
@@ -4682,7 +5008,7 @@ function isFromTrustedHost(trustedHosts, e) {
4682
5008
  }
4683
5009
 
4684
5010
  // src/constants/sdk-version.ts
4685
- var SDK_VERSION = "1.0.26";
5011
+ var SDK_VERSION = "1.0.28";
4686
5012
 
4687
5013
  // src/functions/register.ts
4688
5014
  var registry = {};
@@ -5164,7 +5490,7 @@ function EnableEditor(props) {
5164
5490
  });
5165
5491
  onMount(() => {
5166
5492
  if (!props.apiKey) {
5167
- logger.error("No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop.");
5493
+ logger.error("No API key provided to `Content` component. This can cause issues. Please provide an API key using the `apiKey` prop.");
5168
5494
  }
5169
5495
  evaluateJsCode();
5170
5496
  runHttpRequests();
@@ -5666,7 +5992,7 @@ var fetchSymbolContent = async ({
5666
5992
  };
5667
5993
 
5668
5994
  // src/blocks/symbol/symbol.tsx
5669
- var _tmpl$18 = /* @__PURE__ */ template(`<div>`);
5995
+ var _tmpl$19 = /* @__PURE__ */ template(`<div>`);
5670
5996
  function Symbol(props) {
5671
5997
  const [contentToUse, setContentToUse] = createSignal(props.symbol?.content);
5672
5998
  const blocksWrapper = createMemo(() => {
@@ -5698,7 +6024,7 @@ function Symbol(props) {
5698
6024
  }
5699
6025
  createEffect(on(() => [onUpdateFn_0_props_symbol()], onUpdateFn_0));
5700
6026
  return (() => {
5701
- const _el$ = _tmpl$18();
6027
+ const _el$ = _tmpl$19();
5702
6028
  spread(_el$, mergeProps({
5703
6029
  get ["class"]() {
5704
6030
  return className();