@builder.io/sdk-react-nextjs 0.20.1 → 0.22.0

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.
Files changed (115) hide show
  1. package/lib/browser/blocks/symbol/symbol.cjs +1 -1
  2. package/lib/browser/blocks/symbol/symbol.mjs +27 -25
  3. package/lib/browser/blocks/text/component-info.cjs +1 -1
  4. package/lib/browser/blocks/text/component-info.mjs +0 -1
  5. package/lib/browser/blocks/text/text.cjs +1 -1
  6. package/lib/browser/blocks/text/text.mjs +3 -2
  7. package/lib/browser/components/block/block.cjs +1 -1
  8. package/lib/browser/components/block/block.mjs +27 -20
  9. package/lib/browser/components/block/components/component-ref/component-ref.cjs +1 -1
  10. package/lib/browser/components/block/components/component-ref/component-ref.mjs +11 -11
  11. package/lib/browser/components/block/components/interactive-element.cjs +1 -1
  12. package/lib/browser/components/block/components/interactive-element.mjs +27 -15
  13. package/lib/browser/components/block/components/live-edit-block-styles.cjs +1 -0
  14. package/lib/browser/components/block/components/live-edit-block-styles.mjs +94 -0
  15. package/lib/browser/components/block/components/style-wrapper.cjs +1 -0
  16. package/lib/browser/components/block/components/style-wrapper.mjs +24 -0
  17. package/lib/browser/components/blocks/blocks-wrapper.cjs +1 -1
  18. package/lib/browser/components/blocks/blocks-wrapper.mjs +2 -2
  19. package/lib/browser/components/content/components/enable-editor.cjs +1 -1
  20. package/lib/browser/components/content/components/enable-editor.mjs +195 -166
  21. package/lib/browser/components/live-edit.cjs +1 -0
  22. package/lib/browser/components/live-edit.mjs +19 -0
  23. package/lib/browser/constants/builder-registered-components.cjs +1 -1
  24. package/lib/browser/constants/builder-registered-components.mjs +3 -2
  25. package/lib/browser/constants/extra-components.cjs +1 -1
  26. package/lib/browser/constants/extra-components.mjs +3 -2
  27. package/lib/browser/constants/sdk-version.cjs +1 -1
  28. package/lib/browser/constants/sdk-version.mjs +1 -1
  29. package/lib/browser/helpers/find-block.cjs +1 -0
  30. package/lib/browser/helpers/find-block.mjs +30 -0
  31. package/lib/browser/helpers/subscribe-to-editor.cjs +1 -1
  32. package/lib/browser/helpers/subscribe-to-editor.mjs +15 -15
  33. package/lib/edge/blocks/symbol/symbol.cjs +1 -1
  34. package/lib/edge/blocks/symbol/symbol.mjs +27 -25
  35. package/lib/edge/blocks/text/component-info.cjs +1 -1
  36. package/lib/edge/blocks/text/component-info.mjs +0 -1
  37. package/lib/edge/blocks/text/text.cjs +1 -1
  38. package/lib/edge/blocks/text/text.mjs +3 -2
  39. package/lib/edge/components/block/block.cjs +1 -1
  40. package/lib/edge/components/block/block.mjs +27 -20
  41. package/lib/edge/components/block/components/component-ref/component-ref.cjs +1 -1
  42. package/lib/edge/components/block/components/component-ref/component-ref.mjs +11 -11
  43. package/lib/edge/components/block/components/interactive-element.cjs +1 -1
  44. package/lib/edge/components/block/components/interactive-element.mjs +27 -15
  45. package/lib/edge/components/block/components/live-edit-block-styles.cjs +1 -0
  46. package/lib/edge/components/block/components/live-edit-block-styles.mjs +94 -0
  47. package/lib/edge/components/block/components/style-wrapper.cjs +1 -0
  48. package/lib/edge/components/block/components/style-wrapper.mjs +24 -0
  49. package/lib/edge/components/blocks/blocks-wrapper.cjs +1 -1
  50. package/lib/edge/components/blocks/blocks-wrapper.mjs +2 -2
  51. package/lib/edge/components/content/components/enable-editor.cjs +1 -1
  52. package/lib/edge/components/content/components/enable-editor.mjs +195 -166
  53. package/lib/edge/components/live-edit.cjs +1 -0
  54. package/lib/edge/components/live-edit.mjs +19 -0
  55. package/lib/edge/constants/builder-registered-components.cjs +1 -1
  56. package/lib/edge/constants/builder-registered-components.mjs +3 -2
  57. package/lib/edge/constants/extra-components.cjs +1 -1
  58. package/lib/edge/constants/extra-components.mjs +3 -2
  59. package/lib/edge/constants/sdk-version.cjs +1 -1
  60. package/lib/edge/constants/sdk-version.mjs +1 -1
  61. package/lib/edge/helpers/find-block.cjs +1 -0
  62. package/lib/edge/helpers/find-block.mjs +30 -0
  63. package/lib/edge/helpers/subscribe-to-editor.cjs +1 -1
  64. package/lib/edge/helpers/subscribe-to-editor.mjs +15 -15
  65. package/lib/node/blocks/symbol/symbol.cjs +1 -1
  66. package/lib/node/blocks/symbol/symbol.mjs +27 -25
  67. package/lib/node/blocks/text/component-info.cjs +1 -1
  68. package/lib/node/blocks/text/component-info.mjs +0 -1
  69. package/lib/node/blocks/text/text.cjs +1 -1
  70. package/lib/node/blocks/text/text.mjs +3 -2
  71. package/lib/node/components/block/block.cjs +1 -1
  72. package/lib/node/components/block/block.mjs +27 -20
  73. package/lib/node/components/block/components/component-ref/component-ref.cjs +1 -1
  74. package/lib/node/components/block/components/component-ref/component-ref.mjs +11 -11
  75. package/lib/node/components/block/components/interactive-element.cjs +1 -1
  76. package/lib/node/components/block/components/interactive-element.mjs +27 -15
  77. package/lib/node/components/block/components/live-edit-block-styles.cjs +1 -0
  78. package/lib/node/components/block/components/live-edit-block-styles.mjs +94 -0
  79. package/lib/node/components/block/components/style-wrapper.cjs +1 -0
  80. package/lib/node/components/block/components/style-wrapper.mjs +24 -0
  81. package/lib/node/components/blocks/blocks-wrapper.cjs +1 -1
  82. package/lib/node/components/blocks/blocks-wrapper.mjs +2 -2
  83. package/lib/node/components/content/components/enable-editor.cjs +1 -1
  84. package/lib/node/components/content/components/enable-editor.mjs +195 -166
  85. package/lib/node/components/live-edit.cjs +1 -0
  86. package/lib/node/components/live-edit.mjs +19 -0
  87. package/lib/node/constants/builder-registered-components.cjs +1 -1
  88. package/lib/node/constants/builder-registered-components.mjs +3 -2
  89. package/lib/node/constants/extra-components.cjs +1 -1
  90. package/lib/node/constants/extra-components.mjs +3 -2
  91. package/lib/node/constants/sdk-version.cjs +1 -1
  92. package/lib/node/constants/sdk-version.mjs +1 -1
  93. package/lib/node/helpers/find-block.cjs +1 -0
  94. package/lib/node/helpers/find-block.mjs +30 -0
  95. package/lib/node/helpers/subscribe-to-editor.cjs +1 -1
  96. package/lib/node/helpers/subscribe-to-editor.mjs +15 -15
  97. package/package.json +1 -1
  98. package/types/cjs/blocks/symbol/symbol.types.d.ts +1 -2
  99. package/types/cjs/components/awaiter.d.ts +1 -11
  100. package/types/cjs/components/awaiter.types.d.ts +7 -0
  101. package/types/cjs/components/block/components/live-edit-block-styles.d.ts +8 -0
  102. package/types/cjs/components/block/components/style-wrapper.d.ts +9 -0
  103. package/types/cjs/components/live-edit.d.ts +9 -0
  104. package/types/cjs/constants/sdk-version.d.ts +1 -1
  105. package/types/cjs/helpers/find-block.d.ts +18 -0
  106. package/types/cjs/helpers/subscribe-to-editor.d.ts +3 -2
  107. package/types/esm/blocks/symbol/symbol.types.d.ts +1 -2
  108. package/types/esm/components/awaiter.d.ts +1 -11
  109. package/types/esm/components/awaiter.types.d.ts +7 -0
  110. package/types/esm/components/block/components/live-edit-block-styles.d.ts +8 -0
  111. package/types/esm/components/block/components/style-wrapper.d.ts +9 -0
  112. package/types/esm/components/live-edit.d.ts +9 -0
  113. package/types/esm/constants/sdk-version.d.ts +1 -1
  114. package/types/esm/helpers/find-block.d.ts +18 -0
  115. package/types/esm/helpers/subscribe-to-editor.d.ts +3 -2
@@ -1,13 +1,13 @@
1
- import { isBrowser as d } from "../functions/is-browser.mjs";
2
- import { isFromTrustedHost as c } from "../functions/is-from-trusted-host.mjs";
3
- import { setupBrowserForEditing as m } from "../scripts/init-editing.mjs";
4
- import { logger as u } from "./logger.mjs";
1
+ import { isBrowser as c } from "../functions/is-browser.mjs";
2
+ import { isFromTrustedHost as m } from "../functions/is-from-trusted-host.mjs";
3
+ import { setupBrowserForEditing as u } from "../scripts/init-editing.mjs";
4
+ import { logger as p } from "./logger.mjs";
5
5
  const b = ({
6
6
  model: o,
7
- trustedHosts: i,
7
+ trustedHosts: s,
8
8
  callbacks: r
9
9
  }) => (n) => {
10
- if (!c(i, n))
10
+ if (!m(s, n))
11
11
  return;
12
12
  const {
13
13
  data: t
@@ -23,28 +23,28 @@ const b = ({
23
23
  break;
24
24
  }
25
25
  case "builder.resetState": {
26
- const e = t.data, s = e.model, a = e == null ? void 0 : e.state;
27
- s === o && a && r.stateUpdate(a);
26
+ const e = t.data, a = e.model, i = e == null ? void 0 : e.state, d = e.editType;
27
+ a === o && i && r.stateUpdate(i, d);
28
28
  break;
29
29
  }
30
30
  case "builder.contentUpdate": {
31
- const e = t.data, s = e.key || e.alias || e.entry || e.modelName, a = e.data;
32
- s === o && r.contentUpdate(a);
31
+ const e = t.data, a = e.key || e.alias || e.entry || e.modelName, i = e.data, d = e.editType;
32
+ a === o && r.contentUpdate(i, d);
33
33
  break;
34
34
  }
35
35
  }
36
36
  }, k = ({
37
37
  model: o,
38
- apiKey: i,
38
+ apiKey: s,
39
39
  callback: r,
40
40
  trustedHosts: n
41
41
  }) => {
42
- if (!d)
43
- return u.warn("`subscribeToEditor` only works in the browser. It currently seems to be running on the server."), () => {
42
+ if (!c)
43
+ return p.warn("`subscribeToEditor` only works in the browser. It currently seems to be running on the server."), () => {
44
44
  };
45
- m({
45
+ u({
46
46
  modelName: o,
47
- apiKey: i
47
+ apiKey: s
48
48
  });
49
49
  const t = b({
50
50
  callbacks: {
@@ -1 +1 @@
1
- "use strict";const d=require("react/jsx-runtime"),x=require("../../components/content-variants/content-variants.cjs"),k=require("../../functions/get-class-prop-name.cjs"),f=require("./symbol.helpers.cjs");async function v(e){var n,i,l,o,a,c,r;const m=function(){return"div"},y=function(){return"div"},C=function(){var s,u;return[e.attributes[k.getClassPropName()],"builder-symbol",(s=e.symbol)!=null&&s.inline?"builder-inline-symbol":void 0,(u=e.symbol)!=null&&u.dynamic||e.dynamic?"builder-dynamic-symbol":void 0].filter(Boolean).join(" ")},t=((n=e.symbol)==null?void 0:n.content)||await f.fetchSymbolContent({symbol:e.symbol,builderContextValue:e.builderContext});return(i=e.symbol)==null||i.entry,d.jsx("div",{...e.attributes,className:C(),children:d.jsx(x,{nonce:e.builderContext.nonce,isNestedRender:!0,apiVersion:e.builderContext.apiVersion,apiKey:e.builderContext.apiKey,context:{...e.builderContext.context,symbolId:(l=e.builderBlock)==null?void 0:l.id},customComponents:Object.values(e.builderComponents),data:{...(o=e.symbol)==null?void 0:o.data,...e.builderContext.localState,...(a=t==null?void 0:t.data)==null?void 0:a.state},canTrack:e.builderContext.canTrack,model:(r=(c=e.symbol)==null?void 0:c.model)!=null?r:"",content:t,linkComponent:e.builderLinkComponent,blocksWrapper:m(),contentWrapper:y()})})}module.exports=v;
1
+ "use strict";const m=require("react/jsx-runtime"),k=require("../../components/content-variants/content-variants.cjs"),f=require("../../functions/get-class-prop-name.cjs"),v=require("./symbol.helpers.cjs");async function N(e){var o,i,l,a,c,r,s;const d=function(){return"div"},y=function(){return"div"},C=function(){return Object.values(e.builderComponents)},x=function(){var u,b;return[e.attributes[f.getClassPropName()],"builder-symbol",(u=e.symbol)!=null&&u.inline?"builder-inline-symbol":void 0,(b=e.symbol)!=null&&b.dynamic||e.dynamic?"builder-dynamic-symbol":void 0].filter(Boolean).join(" ")},t=((o=e.symbol)==null?void 0:o.content)||await v.fetchSymbolContent({symbol:e.symbol,builderContextValue:e.builderContext});return(i=e.symbol)==null||i.entry,m.jsx("div",{...e.attributes,className:x(),children:m.jsx(k,{nonce:e.builderContext.nonce,isNestedRender:!0,apiVersion:e.builderContext.apiVersion,apiKey:e.builderContext.apiKey,context:{...e.builderContext.context,symbolId:(l=e.builderBlock)==null?void 0:l.id},customComponents:C(),data:{...(a=e.symbol)==null?void 0:a.data,...e.builderContext.localState,...(c=t==null?void 0:t.data)==null?void 0:c.state},canTrack:e.builderContext.canTrack,model:(s=(r=e.symbol)==null?void 0:r.model)!=null?s:"",content:t,linkComponent:e.builderLinkComponent,blocksWrapper:d(),contentWrapper:y()})})}module.exports=N;
@@ -1,51 +1,53 @@
1
1
  import { jsx as u } from "react/jsx-runtime";
2
2
  import x from "../../components/content-variants/content-variants.mjs";
3
- import { getClassPropName as f } from "../../functions/get-class-prop-name.mjs";
4
- import { fetchSymbolContent as k } from "./symbol.helpers.mjs";
5
- async function j(e) {
6
- var n, o, i, l, a, r, c;
3
+ import { getClassPropName as k } from "../../functions/get-class-prop-name.mjs";
4
+ import { fetchSymbolContent as v } from "./symbol.helpers.mjs";
5
+ async function S(t) {
6
+ var o, i, l, a, c, m, r;
7
7
  const s = function() {
8
8
  return "div";
9
9
  }, y = function() {
10
10
  return "div";
11
11
  }, C = function() {
12
+ return Object.values(t.builderComponents);
13
+ }, f = function() {
12
14
  var b, d;
13
15
  return [
14
- e.attributes[f()],
16
+ t.attributes[k()],
15
17
  "builder-symbol",
16
- (b = e.symbol) != null && b.inline ? "builder-inline-symbol" : void 0,
17
- (d = e.symbol) != null && d.dynamic || e.dynamic ? "builder-dynamic-symbol" : void 0
18
+ (b = t.symbol) != null && b.inline ? "builder-inline-symbol" : void 0,
19
+ (d = t.symbol) != null && d.dynamic || t.dynamic ? "builder-dynamic-symbol" : void 0
18
20
  ].filter(Boolean).join(" ");
19
- }, t = ((n = e.symbol) == null ? void 0 : n.content) || await k({
20
- symbol: e.symbol,
21
- builderContextValue: e.builderContext
21
+ }, e = ((o = t.symbol) == null ? void 0 : o.content) || await v({
22
+ symbol: t.symbol,
23
+ builderContextValue: t.builderContext
22
24
  });
23
- return (o = e.symbol) == null || o.entry, /* @__PURE__ */ u("div", { ...e.attributes, className: C(), children: /* @__PURE__ */ u(
25
+ return (i = t.symbol) == null || i.entry, /* @__PURE__ */ u("div", { ...t.attributes, className: f(), children: /* @__PURE__ */ u(
24
26
  x,
25
27
  {
26
- nonce: e.builderContext.nonce,
28
+ nonce: t.builderContext.nonce,
27
29
  isNestedRender: !0,
28
- apiVersion: e.builderContext.apiVersion,
29
- apiKey: e.builderContext.apiKey,
30
+ apiVersion: t.builderContext.apiVersion,
31
+ apiKey: t.builderContext.apiKey,
30
32
  context: {
31
- ...e.builderContext.context,
32
- symbolId: (i = e.builderBlock) == null ? void 0 : i.id
33
+ ...t.builderContext.context,
34
+ symbolId: (l = t.builderBlock) == null ? void 0 : l.id
33
35
  },
34
- customComponents: Object.values(e.builderComponents),
36
+ customComponents: C(),
35
37
  data: {
36
- ...(l = e.symbol) == null ? void 0 : l.data,
37
- ...e.builderContext.localState,
38
- ...(a = t == null ? void 0 : t.data) == null ? void 0 : a.state
38
+ ...(a = t.symbol) == null ? void 0 : a.data,
39
+ ...t.builderContext.localState,
40
+ ...(c = e == null ? void 0 : e.data) == null ? void 0 : c.state
39
41
  },
40
- canTrack: e.builderContext.canTrack,
41
- model: (c = (r = e.symbol) == null ? void 0 : r.model) != null ? c : "",
42
- content: t,
43
- linkComponent: e.builderLinkComponent,
42
+ canTrack: t.builderContext.canTrack,
43
+ model: (r = (m = t.symbol) == null ? void 0 : m.model) != null ? r : "",
44
+ content: e,
45
+ linkComponent: t.builderLinkComponent,
44
46
  blocksWrapper: s(),
45
47
  contentWrapper: y()
46
48
  }
47
49
  ) });
48
50
  }
49
51
  export {
50
- j as default
52
+ S as default
51
53
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={shouldReceiveBuilderProps:{},name:"Text",static:!0,isRSC:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-text_fields-24px%20(1).svg?alt=media&token=12177b73-0ee3-42ca-98c6-0dd003de1929",inputs:[{name:"text",type:"html",required:!0,autoFocus:!0,bubble:!0,defaultValue:"Enter some text..."}],defaultStyles:{lineHeight:"normal",height:"auto",textAlign:"center"}};exports.componentInfo=e;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={shouldReceiveBuilderProps:{},name:"Text",static:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-text_fields-24px%20(1).svg?alt=media&token=12177b73-0ee3-42ca-98c6-0dd003de1929",inputs:[{name:"text",type:"html",required:!0,autoFocus:!0,bubble:!0,defaultValue:"Enter some text..."}],defaultStyles:{lineHeight:"normal",height:"auto",textAlign:"center"}};exports.componentInfo=e;
@@ -2,7 +2,6 @@ const e = {
2
2
  shouldReceiveBuilderProps: {},
3
3
  name: "Text",
4
4
  static: !0,
5
- isRSC: !0,
6
5
  image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-text_fields-24px%20(1).svg?alt=media&token=12177b73-0ee3-42ca-98c6-0dd003de1929",
7
6
  inputs: [{
8
7
  name: "text",
@@ -1 +1 @@
1
- "use strict";const n=require("react/jsx-runtime");function r(e){var t;return n.jsx("div",{className:"builder-text",dangerouslySetInnerHTML:{__html:((t=e.text)==null?void 0:t.toString())||""},style:{outline:"none"}})}module.exports=r;
1
+ "use client";"use strict";const n=require("react/jsx-runtime");function s(t){var e;return n.jsx("div",{className:"builder-text",dangerouslySetInnerHTML:{__html:((e=t.text)==null?void 0:e.toString())||""},style:{outline:"none"}})}module.exports=s;
@@ -1,5 +1,6 @@
1
+ "use client";
1
2
  import { jsx as n } from "react/jsx-runtime";
2
- function o(e) {
3
+ function l(e) {
3
4
  var t;
4
5
  return /* @__PURE__ */ n(
5
6
  "div",
@@ -13,5 +14,5 @@ function o(e) {
13
14
  );
14
15
  }
15
16
  export {
16
- o as default
17
+ l as default
17
18
  };
@@ -1 +1 @@
1
- "use strict";const t=require("react/jsx-runtime"),v=require("../../constants/target.cjs"),S=require("../../functions/get-block-component-options.cjs"),j=require("../../functions/get-processed-block.cjs"),P=require("../../functions/is-previewing.cjs");require("../../helpers/user-attributes.cjs");require("../../functions/get-fetch.cjs");const d=require("./block.helpers.cjs"),q=require("./components/block-styles.cjs"),O=require("./components/block-wrapper.cjs"),h=require("./components/component-ref/component-ref.cjs"),p=require("./components/repeated-block.cjs");function b(e){var a,C,x,g;const m=function(){return d.getRepeatItemData({block:e.block,context:e.context})},u={value:null,update:!1},c=function(){var i;if(u.value&&!u.update&&!P.isPreviewing())return u.value;const r=(i=e.block.repeat)!=null&&i.collection?e.block:j.getProcessedBlock({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context});return u.value=r,u.update=!1,r},l=function(){return d.getComponent({block:c(),registeredComponents:e.registeredComponents,model:e.context.model})},f=function(){var i;return e.block.tagName==="a"||((i=c().properties)==null?void 0:i.href)||c().href?e.linkComponent||"a":e.block.tagName||"div"},B=function(){var s,k;if((s=e.block.repeat)!=null&&s.collection)return!!((k=m())!=null&&k.length);const r="hide"in c()?c().hide:!1;return("show"in c()?c().show:!0)&&!r},R=function(){var i,s;return!((i=l())!=null&&i.component)&&!m()?(s=c().children)!=null?s:[]:[]},n=function(){var r,i,s,k;return{blockChildren:(r=c().children)!=null?r:[],componentRef:(i=l())==null?void 0:i.component,componentOptions:{...S.getBlockComponentOptions(c(),e.context),...d.provideBuilderBlock(l(),c()),...d.provideBuilderContext(l(),e.context),...d.provideLinkComponent(l(),e.linkComponent),...d.provideRegisteredComponents(l(),e.registeredComponents,e.context.model)},context:e.context,linkComponent:e.linkComponent,registeredComponents:e.registeredComponents,builderBlock:c(),includeBlockProps:((s=l())==null?void 0:s.noWrap)===!0,isInteractive:!((k=l())!=null&&k.isRSC&&v.TARGET==="rsc")}};return t.jsx(t.Fragment,{children:B()?t.jsxs(t.Fragment,{children:[t.jsx(q,{block:c(),context:e.context}),(a=l())!=null&&a.noWrap?m()?t.jsx(t.Fragment,{children:(g=m())==null?void 0:g.map((o,r)=>t.jsx(p,{repeatContext:o.context,block:o.block,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},d.generateKey(r)))}):t.jsx(h,{componentRef:n().componentRef,componentOptions:n().componentOptions,blockChildren:n().blockChildren,context:n().context,registeredComponents:n().registeredComponents,linkComponent:n().linkComponent,builderBlock:n().builderBlock,includeBlockProps:n().includeBlockProps,isInteractive:n().isInteractive}):t.jsx(t.Fragment,{children:m()?t.jsx(t.Fragment,{children:(x=m())==null?void 0:x.map((o,r)=>t.jsx(p,{repeatContext:o.context,block:o.block,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},d.generateKey(r)))}):t.jsxs(O,{Wrapper:f(),block:c(),context:e.context,children:[t.jsx(h,{componentRef:n().componentRef,componentOptions:n().componentOptions,blockChildren:n().blockChildren,context:n().context,registeredComponents:n().registeredComponents,linkComponent:n().linkComponent,builderBlock:n().builderBlock,includeBlockProps:n().includeBlockProps,isInteractive:n().isInteractive}),(C=R())==null?void 0:C.map(o=>t.jsx(b,{block:o,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent,context:e.context},o.id))]})})]}):null})}module.exports=b;
1
+ "use strict";const t=require("react/jsx-runtime"),v=require("../../constants/target.cjs"),j=require("../../functions/get-block-component-options.cjs"),P=require("../../functions/get-processed-block.cjs"),S=require("../../functions/is-previewing.cjs");require("../../helpers/user-attributes.cjs");require("../../functions/get-fetch.cjs");const d=require("./block.helpers.cjs"),q=require("./components/block-wrapper.cjs"),h=require("./components/component-ref/component-ref.cjs"),p=require("./components/repeated-block.cjs"),O=require("./components/style-wrapper.cjs");function b(e){var a,C,x,g;const m=function(){return d.getRepeatItemData({block:e.block,context:e.context})},u={value:null,update:!1},c=function(){var i;if(u.value&&!u.update&&!S.isPreviewing())return u.value;const r=(i=e.block.repeat)!=null&&i.collection?e.block:P.getProcessedBlock({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context});return u.value=r,u.update=!1,r},l=function(){return d.getComponent({block:c(),registeredComponents:e.registeredComponents,model:e.context.model})},f=function(){var i;return e.block.tagName==="a"||((i=c().properties)==null?void 0:i.href)||c().href?e.linkComponent||"a":e.block.tagName||"div"},B=function(){var s,k;if((s=e.block.repeat)!=null&&s.collection)return!!((k=m())!=null&&k.length);const r="hide"in c()?c().hide:!1;return("show"in c()?c().show:!0)&&!r},R=function(){var i,s;return!((i=l())!=null&&i.component)&&!m()?(s=c().children)!=null?s:[]:[]},n=function(){var r,i,s,k;return{blockChildren:(r=c().children)!=null?r:[],componentRef:(i=l())==null?void 0:i.component,componentOptions:{...j.getBlockComponentOptions(c(),e.context),...d.provideBuilderBlock(l(),c()),...d.provideBuilderContext(l(),e.context),...d.provideLinkComponent(l(),e.linkComponent),...d.provideRegisteredComponents(l(),e.registeredComponents,e.context.model)},context:e.context,linkComponent:e.linkComponent,registeredComponents:e.registeredComponents,builderBlock:c(),includeBlockProps:((s=l())==null?void 0:s.noWrap)===!0,isInteractive:!((k=l())!=null&&k.isRSC&&v.TARGET==="rsc")}};return t.jsx(t.Fragment,{children:B()?t.jsxs(t.Fragment,{children:[t.jsx(O,{block:c(),context:e.context,id:e.block.id}),(a=l())!=null&&a.noWrap?m()?t.jsx(t.Fragment,{children:(g=m())==null?void 0:g.map((o,r)=>t.jsx(p,{repeatContext:o.context,block:o.block,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},d.generateKey(r)))}):t.jsx(h,{componentRef:n().componentRef,componentOptions:n().componentOptions,blockChildren:n().blockChildren,context:n().context,registeredComponents:n().registeredComponents,linkComponent:n().linkComponent,builderBlock:n().builderBlock,includeBlockProps:n().includeBlockProps,isInteractive:n().isInteractive}):t.jsx(t.Fragment,{children:m()?t.jsx(t.Fragment,{children:(x=m())==null?void 0:x.map((o,r)=>t.jsx(p,{repeatContext:o.context,block:o.block,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},d.generateKey(r)))}):t.jsxs(q,{Wrapper:f(),block:c(),context:e.context,children:[t.jsx(h,{componentRef:n().componentRef,componentOptions:n().componentOptions,blockChildren:n().blockChildren,context:n().context,registeredComponents:n().registeredComponents,linkComponent:n().linkComponent,builderBlock:n().builderBlock,includeBlockProps:n().includeBlockProps,isInteractive:n().isInteractive}),(C=R())==null?void 0:C.map(o=>t.jsx(b,{block:o,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent,context:e.context},o.id))]})})]}):null})}module.exports=b;
@@ -1,4 +1,4 @@
1
- import { jsx as l, Fragment as u, jsxs as h } from "react/jsx-runtime";
1
+ import { jsx as r, Fragment as u, jsxs as h } from "react/jsx-runtime";
2
2
  import { TARGET as S } from "../../constants/target.mjs";
3
3
  import { getBlockComponentOptions as P } from "../../functions/get-block-component-options.mjs";
4
4
  import { getProcessedBlock as I } from "../../functions/get-processed-block.mjs";
@@ -6,10 +6,10 @@ import { isPreviewing as O } from "../../functions/is-previewing.mjs";
6
6
  import "../../helpers/user-attributes.mjs";
7
7
  import "../../functions/get-fetch.mjs";
8
8
  import { generateKey as x, getRepeatItemData as w, getComponent as W, provideBuilderBlock as T, provideBuilderContext as L, provideLinkComponent as U, provideRegisteredComponents as j } from "./block.helpers.mjs";
9
- import y from "./components/block-styles.mjs";
10
- import N from "./components/block-wrapper.mjs";
9
+ import y from "./components/block-wrapper.mjs";
11
10
  import b from "./components/component-ref/component-ref.mjs";
12
11
  import g from "./components/repeated-block.mjs";
12
+ import N from "./components/style-wrapper.mjs";
13
13
  function A(e) {
14
14
  var a, C, p, f;
15
15
  const d = function() {
@@ -32,7 +32,7 @@ function A(e) {
32
32
  context: e.context.context
33
33
  });
34
34
  return s.value = c, s.update = !1, c;
35
- }, r = function() {
35
+ }, l = function() {
36
36
  return W({
37
37
  block: n(),
38
38
  registeredComponents: e.registeredComponents,
@@ -49,19 +49,19 @@ function A(e) {
49
49
  return ("show" in n() ? n().show : !0) && !c;
50
50
  }, v = function() {
51
51
  var i, m;
52
- return !((i = r()) != null && i.component) && !d() ? (m = n().children) != null ? m : [] : [];
52
+ return !((i = l()) != null && i.component) && !d() ? (m = n().children) != null ? m : [] : [];
53
53
  }, o = function() {
54
54
  var c, i, m, k;
55
55
  return {
56
56
  blockChildren: (c = n().children) != null ? c : [],
57
- componentRef: (i = r()) == null ? void 0 : i.component,
57
+ componentRef: (i = l()) == null ? void 0 : i.component,
58
58
  componentOptions: {
59
59
  ...P(n(), e.context),
60
- ...T(r(), n()),
61
- ...L(r(), e.context),
62
- ...U(r(), e.linkComponent),
60
+ ...T(l(), n()),
61
+ ...L(l(), e.context),
62
+ ...U(l(), e.linkComponent),
63
63
  ...j(
64
- r(),
64
+ l(),
65
65
  e.registeredComponents,
66
66
  e.context.model
67
67
  )
@@ -70,13 +70,20 @@ function A(e) {
70
70
  linkComponent: e.linkComponent,
71
71
  registeredComponents: e.registeredComponents,
72
72
  builderBlock: n(),
73
- includeBlockProps: ((m = r()) == null ? void 0 : m.noWrap) === !0,
74
- isInteractive: !((k = r()) != null && k.isRSC && S === "rsc")
73
+ includeBlockProps: ((m = l()) == null ? void 0 : m.noWrap) === !0,
74
+ isInteractive: !((k = l()) != null && k.isRSC && S === "rsc")
75
75
  };
76
76
  };
77
- return /* @__PURE__ */ l(u, { children: R() ? /* @__PURE__ */ h(u, { children: [
78
- /* @__PURE__ */ l(y, { block: n(), context: e.context }),
79
- (a = r()) != null && a.noWrap ? d() ? /* @__PURE__ */ l(u, { children: (f = d()) == null ? void 0 : f.map((t, c) => /* @__PURE__ */ l(
77
+ return /* @__PURE__ */ r(u, { children: R() ? /* @__PURE__ */ h(u, { children: [
78
+ /* @__PURE__ */ r(
79
+ N,
80
+ {
81
+ block: n(),
82
+ context: e.context,
83
+ id: e.block.id
84
+ }
85
+ ),
86
+ (a = l()) != null && a.noWrap ? d() ? /* @__PURE__ */ r(u, { children: (f = d()) == null ? void 0 : f.map((t, c) => /* @__PURE__ */ r(
80
87
  g,
81
88
  {
82
89
  repeatContext: t.context,
@@ -85,7 +92,7 @@ function A(e) {
85
92
  linkComponent: e.linkComponent
86
93
  },
87
94
  x(c)
88
- )) }) : /* @__PURE__ */ l(
95
+ )) }) : /* @__PURE__ */ r(
89
96
  b,
90
97
  {
91
98
  componentRef: o().componentRef,
@@ -98,7 +105,7 @@ function A(e) {
98
105
  includeBlockProps: o().includeBlockProps,
99
106
  isInteractive: o().isInteractive
100
107
  }
101
- ) : /* @__PURE__ */ l(u, { children: d() ? /* @__PURE__ */ l(u, { children: (p = d()) == null ? void 0 : p.map((t, c) => /* @__PURE__ */ l(
108
+ ) : /* @__PURE__ */ r(u, { children: d() ? /* @__PURE__ */ r(u, { children: (p = d()) == null ? void 0 : p.map((t, c) => /* @__PURE__ */ r(
102
109
  g,
103
110
  {
104
111
  repeatContext: t.context,
@@ -108,13 +115,13 @@ function A(e) {
108
115
  },
109
116
  x(c)
110
117
  )) }) : /* @__PURE__ */ h(
111
- N,
118
+ y,
112
119
  {
113
120
  Wrapper: B(),
114
121
  block: n(),
115
122
  context: e.context,
116
123
  children: [
117
- /* @__PURE__ */ l(
124
+ /* @__PURE__ */ r(
118
125
  b,
119
126
  {
120
127
  componentRef: o().componentRef,
@@ -128,7 +135,7 @@ function A(e) {
128
135
  isInteractive: o().isInteractive
129
136
  }
130
137
  ),
131
- (C = v()) == null ? void 0 : C.map((t) => /* @__PURE__ */ l(
138
+ (C = v()) == null ? void 0 : C.map((t) => /* @__PURE__ */ r(
132
139
  A,
133
140
  {
134
141
  block: t,
@@ -1 +1 @@
1
- "use strict";const n=require("react/jsx-runtime"),i=require("../../block.cjs"),l=require("../interactive-element.cjs"),r=require("./component-ref.helpers.cjs");function m(e){var t;const c=e.isInteractive?l:e.componentRef;return n.jsx(n.Fragment,{children:e.componentRef?n.jsx(n.Fragment,{children:n.jsx(c,{...r.getWrapperProps({componentOptions:e.componentOptions,builderBlock:e.builderBlock,context:e.context,componentRef:e.componentRef,linkComponent:e.linkComponent,includeBlockProps:e.includeBlockProps,isInteractive:e.isInteractive,contextValue:e.context}),children:(t=e.blockChildren)==null?void 0:t.map(o=>n.jsx(i,{block:o,context:e.context,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},o.id))})}):null})}module.exports=m;
1
+ "use strict";const n=require("react/jsx-runtime"),i=require("../../block.cjs"),l=require("../interactive-element.cjs"),r=require("./component-ref.helpers.cjs");function m(e){var t;const c=e.isInteractive?l:e.componentRef;return n.jsx(n.Fragment,{children:e.componentRef?n.jsx(n.Fragment,{children:n.jsx(c,{...r.getWrapperProps({componentOptions:e.componentOptions,builderBlock:e.builderBlock,context:e.context,componentRef:e.componentRef,linkComponent:e.linkComponent,includeBlockProps:e.includeBlockProps,isInteractive:e.isInteractive,contextValue:e.context}),children:e.componentRef?n.jsx(n.Fragment,{children:(t=e.blockChildren)==null?void 0:t.map(o=>n.jsx(i,{block:o,context:e.context,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},o.id))}):null})}):null})}module.exports=m;
@@ -1,11 +1,11 @@
1
- import { jsx as n, Fragment as c } from "react/jsx-runtime";
2
- import m from "../../block.mjs";
3
- import l from "../interactive-element.mjs";
1
+ import { jsx as n, Fragment as t } from "react/jsx-runtime";
2
+ import l from "../../block.mjs";
3
+ import m from "../interactive-element.mjs";
4
4
  import { getWrapperProps as r } from "./component-ref.helpers.mjs";
5
5
  function u(e) {
6
- var t;
7
- const i = e.isInteractive ? l : e.componentRef;
8
- return /* @__PURE__ */ n(c, { children: e.componentRef ? /* @__PURE__ */ n(c, { children: /* @__PURE__ */ n(
6
+ var o;
7
+ const i = e.isInteractive ? m : e.componentRef;
8
+ return /* @__PURE__ */ n(t, { children: e.componentRef ? /* @__PURE__ */ n(t, { children: /* @__PURE__ */ n(
9
9
  i,
10
10
  {
11
11
  ...r({
@@ -18,16 +18,16 @@ function u(e) {
18
18
  isInteractive: e.isInteractive,
19
19
  contextValue: e.context
20
20
  }),
21
- children: (t = e.blockChildren) == null ? void 0 : t.map((o) => /* @__PURE__ */ n(
22
- m,
21
+ children: e.componentRef ? /* @__PURE__ */ n(t, { children: (o = e.blockChildren) == null ? void 0 : o.map((c) => /* @__PURE__ */ n(
22
+ l,
23
23
  {
24
- block: o,
24
+ block: c,
25
25
  context: e.context,
26
26
  registeredComponents: e.registeredComponents,
27
27
  linkComponent: e.linkComponent
28
28
  },
29
- o.id
30
- ))
29
+ c.id
30
+ )) }) : null
31
31
  }
32
32
  ) }) : null });
33
33
  }
@@ -1 +1 @@
1
- "use client";"use strict";const e=require("react/jsx-runtime"),o=require("react"),l=require("../../../functions/get-block-actions.cjs"),i=require("../../../functions/get-block-properties.cjs"),u=require("../../awaiter.cjs");function x(t){var r,n;o.useState(()=>0);function c(){return t.includeBlockProps?{...i.getBlockProperties({block:t.block,context:t.context}),...l.getBlockActions({block:t.block,rootState:t.context.rootState,rootSetState:t.context.rootSetState,localState:t.context.localState,context:t.context.context})}:{}}function a(){return t.wrapperProps}return o.useEffect(()=>{},[t.wrapperProps,(n=(r=t.block)==null?void 0:r.component)==null?void 0:n.options]),e.jsx(e.Fragment,{children:t.Wrapper.load?e.jsx(e.Fragment,{children:e.jsx(u,{load:t.Wrapper.load,fallback:t.Wrapper.fallback,props:t.wrapperProps,attributes:c(),children:t.children})}):e.jsx(t.Wrapper,{...a(),attributes:c(),children:t.children})})}module.exports=x;
1
+ "use client";"use strict";const e=require("react/jsx-runtime"),i=require("react"),o=require("../../../functions/get-block-actions.cjs"),l=require("../../../functions/get-block-properties.cjs"),u=require("../../../functions/is-editing.cjs");require("../../../helpers/user-attributes.cjs");require("../../../functions/get-fetch.cjs");const d=require("../../awaiter.cjs"),s=require("../../live-edit.cjs");function x(t){var c,n;i.useState(()=>0);function r(){return t.includeBlockProps?{...l.getBlockProperties({block:t.block,context:t.context}),...o.getBlockActions({block:t.block,rootState:t.context.rootState,rootSetState:t.context.rootSetState,localState:t.context.localState,context:t.context.context})}:{}}function a(){return t.wrapperProps}return i.useEffect(()=>{},[t.wrapperProps,(n=(c=t.block)==null?void 0:c.component)==null?void 0:n.options]),e.jsx(e.Fragment,{children:t.Wrapper.load?e.jsx(e.Fragment,{children:e.jsx(d,{load:t.Wrapper.load,fallback:t.Wrapper.fallback,props:t.wrapperProps,attributes:r(),children:t.children})}):u.isEditing()?e.jsx(s,{Wrapper:t.Wrapper,id:t.block.id||"",attributes:r(),children:t.children}):e.jsx(t.Wrapper,{...a(),attributes:r(),children:t.children})})}module.exports=x;
@@ -1,19 +1,23 @@
1
1
  "use client";
2
- import { jsx as e, Fragment as a } from "react/jsx-runtime";
3
- import { useState as l, useEffect as i } from "react";
4
- import { getBlockActions as u } from "../../../functions/get-block-actions.mjs";
5
- import { getBlockProperties as f } from "../../../functions/get-block-properties.mjs";
6
- import m from "../../awaiter.mjs";
7
- function h(t) {
2
+ import { jsx as e, Fragment as i } from "react/jsx-runtime";
3
+ import { useState as n, useEffect as l } from "react";
4
+ import { getBlockActions as m } from "../../../functions/get-block-actions.mjs";
5
+ import { getBlockProperties as d } from "../../../functions/get-block-properties.mjs";
6
+ import { isEditing as f } from "../../../functions/is-editing.mjs";
7
+ import "../../../helpers/user-attributes.mjs";
8
+ import "../../../functions/get-fetch.mjs";
9
+ import u from "../../awaiter.mjs";
10
+ import b from "../../live-edit.mjs";
11
+ function B(t) {
8
12
  var o, c;
9
- l(() => 0);
13
+ n(() => 0);
10
14
  function r() {
11
15
  return t.includeBlockProps ? {
12
- ...f({
16
+ ...d({
13
17
  block: t.block,
14
18
  context: t.context
15
19
  }),
16
- ...u({
20
+ ...m({
17
21
  block: t.block,
18
22
  rootState: t.context.rootState,
19
23
  rootSetState: t.context.rootSetState,
@@ -22,12 +26,12 @@ function h(t) {
22
26
  })
23
27
  } : {};
24
28
  }
25
- function n() {
29
+ function a() {
26
30
  return t.wrapperProps;
27
31
  }
28
- return i(() => {
29
- }, [t.wrapperProps, (c = (o = t.block) == null ? void 0 : o.component) == null ? void 0 : c.options]), /* @__PURE__ */ e(a, { children: t.Wrapper.load ? /* @__PURE__ */ e(a, { children: /* @__PURE__ */ e(
30
- m,
32
+ return l(() => {
33
+ }, [t.wrapperProps, (c = (o = t.block) == null ? void 0 : o.component) == null ? void 0 : c.options]), /* @__PURE__ */ e(i, { children: t.Wrapper.load ? /* @__PURE__ */ e(i, { children: /* @__PURE__ */ e(
34
+ u,
31
35
  {
32
36
  load: t.Wrapper.load,
33
37
  fallback: t.Wrapper.fallback,
@@ -35,8 +39,16 @@ function h(t) {
35
39
  attributes: r(),
36
40
  children: t.children
37
41
  }
38
- ) }) : /* @__PURE__ */ e(t.Wrapper, { ...n(), attributes: r(), children: t.children }) });
42
+ ) }) : f() ? /* @__PURE__ */ e(
43
+ b,
44
+ {
45
+ Wrapper: t.Wrapper,
46
+ id: t.block.id || "",
47
+ attributes: r(),
48
+ children: t.children
49
+ }
50
+ ) : /* @__PURE__ */ e(t.Wrapper, { ...a(), attributes: r(), children: t.children }) });
39
51
  }
40
52
  export {
41
- h as default
53
+ B as default
42
54
  };
@@ -0,0 +1 @@
1
+ "use client";"use strict";const r=require("react/jsx-runtime"),u=require("../../../constants/device-sizes.cjs"),w=require("../../../functions/camel-to-kebab-case.cjs"),D=require("../../../functions/get-processed-block.cjs"),l=require("../../../helpers/css.cjs"),I=require("../../../helpers/find-block.cjs"),z=require("../../../helpers/nullable.cjs"),M=require("../../inlined-styles.cjs");function U(i){function F(){return I.findBlockById(i.contextProvider.content,i.id)}function e(){var n;const t=F();return t?(n=t.repeat)!=null&&n.collection?t:D.getProcessedBlock({block:t,localState:i.contextProvider.localState,rootState:i.contextProvider.rootState,rootSetState:i.contextProvider.rootSetState,context:i.contextProvider.context}):null}function Q(){var t,s,n,c;return z.checkIsDefined((t=e==null?void 0:e())==null?void 0:t.hide)?!((s=e==null?void 0:e())!=null&&s.hide):z.checkIsDefined((n=e==null?void 0:e())==null?void 0:n.show)?(c=e==null?void 0:e())==null?void 0:c.show:!0}function d(){var f,v,g,b,P,k,q;const t=(f=e==null?void 0:e())==null?void 0:f.responsiveStyles,s=i.contextProvider.content,n=u.getSizesForBreakpoints(((v=s==null?void 0:s.meta)==null?void 0:v.breakpoints)||{}),c=!!((b=(g=s==null?void 0:s.meta)==null?void 0:g.breakpoints)!=null&&b.xsmall),S=t==null?void 0:t.large,y=t==null?void 0:t.medium,x=t==null?void 0:t.small,h=t==null?void 0:t.xsmall,a=(P=e==null?void 0:e())==null?void 0:P.id;if(!a)return"";const j=S?l.createCssClass({className:a,styles:S}):"",$=y?l.createCssClass({className:a,styles:y,mediaQuery:u.getMaxWidthQueryForSize("medium",n)}):"",T=x?l.createCssClass({className:a,styles:x,mediaQuery:u.getMaxWidthQueryForSize("small",n)}):"",W=h&&c?l.createCssClass({className:a,styles:h,mediaQuery:u.getMaxWidthQueryForSize("xsmall",n)}):"",o=e().animations&&e().animations.find(m=>m.trigger==="hover");let C="";if(o){const m=((q=(k=o.steps)==null?void 0:k[1])==null?void 0:q.styles)||{};C=l.createCssClass({className:`${a}:hover`,styles:{...m,transition:`all ${o.duration}s ${w.camelToKebabCase(o.easing)}`,transitionDelay:o.delay?`${o.delay}s`:"0s"}})||""}return[j,$,T,W,C].join(" ")}return r.jsx(r.Fragment,{children:d()&&Q()?r.jsx(r.Fragment,{children:r.jsx(M,{id:"builderio-block",styles:d(),nonce:i.contextProvider.nonce})}):null})}module.exports=U;
@@ -0,0 +1,94 @@
1
+ "use client";
2
+ import { jsx as c, Fragment as $ } from "react/jsx-runtime";
3
+ import { getSizesForBreakpoints as D, getMaxWidthQueryForSize as u } from "../../../constants/device-sizes.mjs";
4
+ import { camelToKebabCase as N } from "../../../functions/camel-to-kebab-case.mjs";
5
+ import { getProcessedBlock as W } from "../../../functions/get-processed-block.mjs";
6
+ import { createCssClass as l } from "../../../helpers/css.mjs";
7
+ import { findBlockById as A } from "../../../helpers/find-block.mjs";
8
+ import { checkIsDefined as w } from "../../../helpers/nullable.mjs";
9
+ import E from "../../inlined-styles.mjs";
10
+ function O(i) {
11
+ function z() {
12
+ return A(i.contextProvider.content, i.id);
13
+ }
14
+ function t() {
15
+ var o;
16
+ const e = z();
17
+ return e ? (o = e.repeat) != null && o.collection ? e : W({
18
+ block: e,
19
+ localState: i.contextProvider.localState,
20
+ rootState: i.contextProvider.rootState,
21
+ rootSetState: i.contextProvider.rootSetState,
22
+ context: i.contextProvider.context
23
+ }) : null;
24
+ }
25
+ function F() {
26
+ var e, n, o, s;
27
+ return w((e = t == null ? void 0 : t()) == null ? void 0 : e.hide) ? !((n = t == null ? void 0 : t()) != null && n.hide) : w((o = t == null ? void 0 : t()) == null ? void 0 : o.show) ? (s = t == null ? void 0 : t()) == null ? void 0 : s.show : !0;
28
+ }
29
+ function d() {
30
+ var v, b, g, C, P, k, Q;
31
+ const e = (v = t == null ? void 0 : t()) == null ? void 0 : v.responsiveStyles, n = i.contextProvider.content, o = D(
32
+ ((b = n == null ? void 0 : n.meta) == null ? void 0 : b.breakpoints) || {}
33
+ ), s = !!((C = (g = n == null ? void 0 : n.meta) == null ? void 0 : g.breakpoints) != null && C.xsmall), S = e == null ? void 0 : e.large, f = e == null ? void 0 : e.medium, y = e == null ? void 0 : e.small, x = e == null ? void 0 : e.xsmall, r = (P = t == null ? void 0 : t()) == null ? void 0 : P.id;
34
+ if (!r)
35
+ return "";
36
+ const I = S ? l({
37
+ className: r,
38
+ styles: S
39
+ }) : "", T = f ? l({
40
+ className: r,
41
+ styles: f,
42
+ mediaQuery: u(
43
+ "medium",
44
+ o
45
+ )
46
+ }) : "", U = y ? l({
47
+ className: r,
48
+ styles: y,
49
+ mediaQuery: u(
50
+ "small",
51
+ o
52
+ )
53
+ }) : "", j = x && s ? l({
54
+ className: r,
55
+ styles: x,
56
+ mediaQuery: u(
57
+ "xsmall",
58
+ o
59
+ )
60
+ }) : "", a = t().animations && t().animations.find((m) => m.trigger === "hover");
61
+ let h = "";
62
+ if (a) {
63
+ const m = ((Q = (k = a.steps) == null ? void 0 : k[1]) == null ? void 0 : Q.styles) || {};
64
+ h = l({
65
+ className: `${r}:hover`,
66
+ styles: {
67
+ ...m,
68
+ transition: `all ${a.duration}s ${N(
69
+ a.easing
70
+ )}`,
71
+ transitionDelay: a.delay ? `${a.delay}s` : "0s"
72
+ }
73
+ }) || "";
74
+ }
75
+ return [
76
+ I,
77
+ T,
78
+ U,
79
+ j,
80
+ h
81
+ ].join(" ");
82
+ }
83
+ return /* @__PURE__ */ c($, { children: d() && F() ? /* @__PURE__ */ c($, { children: /* @__PURE__ */ c(
84
+ E,
85
+ {
86
+ id: "builderio-block",
87
+ styles: d(),
88
+ nonce: i.contextProvider.nonce
89
+ }
90
+ ) }) : null });
91
+ }
92
+ export {
93
+ O as default
94
+ };
@@ -0,0 +1 @@
1
+ "use client";"use strict";const e=require("react/jsx-runtime"),i=require("react"),u=require("../../../context/builder.context.cjs"),d=require("../../../functions/is-editing.cjs");require("../../../helpers/user-attributes.cjs");require("../../../functions/get-fetch.cjs");const n=require("./block-styles.cjs"),x=require("./live-edit-block-styles.cjs");function a(t){const[s,r]=i.useState(()=>!1),[c,o]=i.useState(()=>!1),l=i.useContext(u);return i.useEffect(()=>{r(d.isEditing()),o(!0)},[]),e.jsx(e.Fragment,{children:c?e.jsx(e.Fragment,{children:s?e.jsx(x,{id:t.block.id,contextProvider:l}):e.jsx(e.Fragment,{children:e.jsx(n,{block:t.block,context:t.context})})}):e.jsx(e.Fragment,{children:e.jsx(n,{block:t.block,context:t.context})})})}module.exports=a;
@@ -0,0 +1,24 @@
1
+ "use client";
2
+ import { jsx as t, Fragment as i } from "react/jsx-runtime";
3
+ import { useState as o, useContext as m, useEffect as f } from "react";
4
+ import a from "../../../context/builder.context.mjs";
5
+ import { isEditing as u } from "../../../functions/is-editing.mjs";
6
+ import "../../../helpers/user-attributes.mjs";
7
+ import "../../../functions/get-fetch.mjs";
8
+ import r from "./block-styles.mjs";
9
+ import x from "./live-edit-block-styles.mjs";
10
+ function p(e) {
11
+ const [n, c] = o(() => !1), [l, d] = o(() => !1), s = m(a);
12
+ return f(() => {
13
+ c(u()), d(!0);
14
+ }, []), /* @__PURE__ */ t(i, { children: l ? /* @__PURE__ */ t(i, { children: n ? /* @__PURE__ */ t(
15
+ x,
16
+ {
17
+ id: e.block.id,
18
+ contextProvider: s
19
+ }
20
+ ) : /* @__PURE__ */ t(i, { children: /* @__PURE__ */ t(r, { block: e.block, context: e.context }) }) }) : /* @__PURE__ */ t(i, { children: /* @__PURE__ */ t(r, { block: e.block, context: e.context }) }) });
21
+ }
22
+ export {
23
+ p as default
24
+ };
@@ -1,4 +1,4 @@
1
- "use client";"use strict";const a=require("react/jsx-runtime"),i=require("react"),r=require("../../functions/is-editing.cjs");function d(e){const c=i.useRef(null);i.useState(()=>!1);function o(){var t;return["builder-blocks",(t=e.blocks)!=null&&t.length?"":"no-blocks",e.classNameProp].filter(Boolean).join(" ")}function s(){if(!e.path)return;const t="this.",n="component.options.";return e.path.startsWith(t)?e.path.replace(t,""):e.path.startsWith(n)?e.path:`${n}${e.path||""}`}function l(){var t,n;r.isEditing()&&!((t=e.blocks)!=null&&t.length)&&((n=window.parent)==null||n.postMessage({type:"builder.clickEmptyBlocks",data:{parentElementId:e.parent,dataPath:s()}},"*"))}function u(){var t,n;r.isEditing()&&!((t=e.blocks)!=null&&t.length)&&((n=window.parent)==null||n.postMessage({type:"builder.hoverEmptyBlocks",data:{parentElementId:e.parent,dataPath:s()}},"*"))}return i.useEffect(()=>{},[]),i.useEffect(()=>{},[e.blocks]),a.jsxs(a.Fragment,{children:[a.jsx(e.BlocksWrapper,{ref:c,className:o()+" props-blocks-wrapper-7d1e7a14","builder-path":s(),"builder-parent-id":e.parent,style:e.styleProp,onClick:t=>l(),onMouseEnter:t=>u(),onKeyPress:t=>l(),...e.BlocksWrapperProps,children:e.children}),a.jsx("style",{children:`.props-blocks-wrapper-7d1e7a14 {
1
+ "use client";"use strict";const a=require("react/jsx-runtime"),i=require("react"),r=require("../../functions/is-editing.cjs");function d(e){const c=i.useRef(null);i.useState(()=>!1);function o(){var t;return["builder-blocks",(t=e.blocks)!=null&&t.length?"":"no-blocks",e.classNameProp].filter(Boolean).join(" ")}function s(){if(!e.path)return;const t="this.",n="component.options.";return e.path.startsWith(t)?e.path.replace(t,""):e.path.startsWith(n)?e.path:`${n}${e.path||""}`}function l(){var t,n;r.isEditing()&&!((t=e.blocks)!=null&&t.length)&&((n=window.parent)==null||n.postMessage({type:"builder.clickEmptyBlocks",data:{parentElementId:e.parent,dataPath:s()}},"*"))}function u(){var t,n;r.isEditing()&&!((t=e.blocks)!=null&&t.length)&&((n=window.parent)==null||n.postMessage({type:"builder.hoverEmptyBlocks",data:{parentElementId:e.parent,dataPath:s()}},"*"))}return i.useEffect(()=>{},[]),i.useEffect(()=>{},[e.blocks]),a.jsxs(a.Fragment,{children:[a.jsx(e.BlocksWrapper,{ref:c,className:o()+" props-blocks-wrapper-49da6528","builder-path":s(),"builder-parent-id":e.parent,style:e.styleProp,onClick:t=>l(),onMouseEnter:t=>u(),onKeyPress:t=>l(),...e.BlocksWrapperProps,children:e.children}),a.jsx("style",{children:`.props-blocks-wrapper-49da6528 {
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  align-items: stretch;
@@ -52,7 +52,7 @@ function y(e) {
52
52
  e.BlocksWrapper,
53
53
  {
54
54
  ref: c,
55
- className: o() + " props-blocks-wrapper-7d1e7a14",
55
+ className: o() + " props-blocks-wrapper-49da6528",
56
56
  "builder-path": a(),
57
57
  "builder-parent-id": e.parent,
58
58
  style: e.styleProp,
@@ -63,7 +63,7 @@ function y(e) {
63
63
  children: e.children
64
64
  }
65
65
  ),
66
- /* @__PURE__ */ r("style", { children: `.props-blocks-wrapper-7d1e7a14 {
66
+ /* @__PURE__ */ r("style", { children: `.props-blocks-wrapper-49da6528 {
67
67
  display: flex;
68
68
  flex-direction: column;
69
69
  align-items: stretch;