@builder.io/sdk-react-nextjs 0.20.0 → 0.20.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/browser/constants/sdk-version.cjs +1 -1
- package/lib/browser/constants/sdk-version.mjs +1 -1
- package/lib/browser/functions/register.cjs +1 -1
- package/lib/browser/functions/register.mjs +24 -13
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +26 -25
- package/lib/browser/server-entry.cjs +1 -1
- package/lib/browser/server-entry.mjs +18 -17
- package/lib/edge/constants/sdk-version.cjs +1 -1
- package/lib/edge/constants/sdk-version.mjs +1 -1
- package/lib/edge/functions/register.cjs +1 -1
- package/lib/edge/functions/register.mjs +24 -13
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +26 -25
- package/lib/edge/server-entry.cjs +1 -1
- package/lib/edge/server-entry.mjs +18 -17
- package/lib/node/constants/sdk-version.cjs +1 -1
- package/lib/node/constants/sdk-version.mjs +1 -1
- package/lib/node/functions/register.cjs +1 -1
- package/lib/node/functions/register.mjs +24 -13
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +26 -25
- package/lib/node/server-entry.cjs +1 -1
- package/lib/node/server-entry.mjs +18 -17
- package/package.json +1 -1
- package/types/cjs/constants/sdk-version.d.ts +1 -1
- package/types/cjs/functions/register.d.ts +18 -0
- package/types/cjs/server-index.d.ts +1 -1
- package/types/esm/constants/sdk-version.d.ts +1 -1
- package/types/esm/functions/register.d.ts +18 -0
- package/types/esm/server-index.d.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="0.20.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="0.20.1";exports.SDK_VERSION=e;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./is-browser.cjs"),g=require("./register-component.cjs"),i={};function a(e,t){e==="plugin"&&(t=g.serializeIncludingFunctions(t));let r=i[e];if(r||(r=i[e]=[]),r.push(t),o.isBrowser()){const s={type:"builder.register",data:{type:e,info:t}};try{parent.postMessage(s,"*"),parent!==window&&window.postMessage(s,"*")}catch(n){console.debug("Could not postmessage",n)}}}function c(e){var t;if(o.isBrowser()){const r=JSON.parse(JSON.stringify(e));e.action&&(r.action=e.action.toString()),(t=window.parent)==null||t.postMessage({type:"builder.registerAction",data:r},"*")}}exports.register=a;exports.registerAction=c;
|
|
@@ -1,24 +1,35 @@
|
|
|
1
|
-
import { isBrowser as
|
|
1
|
+
import { isBrowser as o } from "./is-browser.mjs";
|
|
2
2
|
import { serializeIncludingFunctions as a } from "./register-component.mjs";
|
|
3
|
-
const
|
|
4
|
-
function
|
|
5
|
-
|
|
6
|
-
let
|
|
7
|
-
if (
|
|
8
|
-
const
|
|
3
|
+
const r = {};
|
|
4
|
+
function p(t, e) {
|
|
5
|
+
t === "plugin" && (e = a(e));
|
|
6
|
+
let i = r[t];
|
|
7
|
+
if (i || (i = r[t] = []), i.push(e), o()) {
|
|
8
|
+
const s = {
|
|
9
9
|
type: "builder.register",
|
|
10
10
|
data: {
|
|
11
|
-
type:
|
|
12
|
-
info:
|
|
11
|
+
type: t,
|
|
12
|
+
info: e
|
|
13
13
|
}
|
|
14
14
|
};
|
|
15
15
|
try {
|
|
16
|
-
parent.postMessage(
|
|
17
|
-
} catch (
|
|
18
|
-
console.debug("Could not postmessage",
|
|
16
|
+
parent.postMessage(s, "*"), parent !== window && window.postMessage(s, "*");
|
|
17
|
+
} catch (n) {
|
|
18
|
+
console.debug("Could not postmessage", n);
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
+
function d(t) {
|
|
23
|
+
var e;
|
|
24
|
+
if (o()) {
|
|
25
|
+
const i = JSON.parse(JSON.stringify(t));
|
|
26
|
+
t.action && (i.action = t.action.toString()), (e = window.parent) == null || e.postMessage({
|
|
27
|
+
type: "builder.registerAction",
|
|
28
|
+
data: i
|
|
29
|
+
}, "*");
|
|
30
|
+
}
|
|
31
|
+
}
|
|
22
32
|
export {
|
|
23
|
-
|
|
33
|
+
p as register,
|
|
34
|
+
d as registerAction
|
|
24
35
|
};
|
package/lib/browser/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./blocks/button/button.cjs"),i=require("./blocks/columns/columns.cjs"),s=require("./blocks/fragment/fragment.cjs"),n=require("./blocks/image/image.cjs"),o=require("./blocks/section/section.cjs"),c=require("./blocks/symbol/symbol.cjs"),u=require("./blocks/text/text.cjs"),g=require("./blocks/video/video.cjs"),d=require("./components/blocks/blocks.cjs"),q=require("./components/content-variants/content-variants.cjs"),a=require("./context/builder.context.cjs"),l=require("./helpers/user-attributes.cjs"),b=require("./functions/is-editing.cjs"),m=require("./functions/is-previewing.cjs"),E=require("./functions/register-component.cjs"),t=require("./functions/register.cjs"),C=require("./functions/set-editor-settings.cjs"),f=require("./functions/get-builder-search-params/index.cjs"),h=require("./functions/track/index.cjs"),p=require("./helpers/subscribe-to-editor.cjs"),P=require("./functions/fetch-builder-props.cjs"),e=require("./functions/get-content/index.cjs");exports.Button=r;exports.Columns=i;exports.Fragment=s;exports.Image=n;exports.Section=o;exports.Symbol=c;exports.Text=u;exports.Video=g;exports.Blocks=d;exports.Content=q;exports.BuilderContext=a;exports.setClientUserAttributes=l.setClientUserAttributes;exports.isEditing=b.isEditing;exports.isPreviewing=m.isPreviewing;exports.createRegisterComponentMessage=E.createRegisterComponentMessage;exports.register=t.register;exports.registerAction=t.registerAction;exports.setEditorSettings=C.setEditorSettings;exports.getBuilderSearchParams=f.getBuilderSearchParams;exports.track=h.track;exports.subscribeToEditor=p.subscribeToEditor;exports.fetchBuilderProps=P.fetchBuilderProps;exports._processContentResult=e._processContentResult;exports.fetchEntries=e.fetchEntries;exports.fetchOneEntry=e.fetchOneEntry;
|
package/lib/browser/index.mjs
CHANGED
|
@@ -3,23 +3,23 @@ import { default as f } from "./blocks/columns/columns.mjs";
|
|
|
3
3
|
import { default as a } from "./blocks/fragment/fragment.mjs";
|
|
4
4
|
import { default as p } from "./blocks/image/image.mjs";
|
|
5
5
|
import { default as i } from "./blocks/section/section.mjs";
|
|
6
|
-
import { default as
|
|
7
|
-
import { default as
|
|
6
|
+
import { default as n } from "./blocks/symbol/symbol.mjs";
|
|
7
|
+
import { default as d } from "./blocks/text/text.mjs";
|
|
8
8
|
import { default as g } from "./blocks/video/video.mjs";
|
|
9
9
|
import { default as B } from "./components/blocks/blocks.mjs";
|
|
10
10
|
import { default as b } from "./components/content-variants/content-variants.mjs";
|
|
11
11
|
import { default as S } from "./context/builder.context.mjs";
|
|
12
12
|
import { setClientUserAttributes as k } from "./helpers/user-attributes.mjs";
|
|
13
|
-
import { isEditing as
|
|
14
|
-
import { isPreviewing as
|
|
15
|
-
import { createRegisterComponentMessage as
|
|
16
|
-
import { register as I } from "./functions/register.mjs";
|
|
17
|
-
import { setEditorSettings as
|
|
18
|
-
import { getBuilderSearchParams as
|
|
19
|
-
import { track as
|
|
20
|
-
import { subscribeToEditor as
|
|
21
|
-
import { fetchBuilderProps as
|
|
22
|
-
import { _processContentResult as
|
|
13
|
+
import { isEditing as A } from "./functions/is-editing.mjs";
|
|
14
|
+
import { isPreviewing as T } from "./functions/is-previewing.mjs";
|
|
15
|
+
import { createRegisterComponentMessage as w } from "./functions/register-component.mjs";
|
|
16
|
+
import { register as I, registerAction as M } from "./functions/register.mjs";
|
|
17
|
+
import { setEditorSettings as U } from "./functions/set-editor-settings.mjs";
|
|
18
|
+
import { getBuilderSearchParams as _ } from "./functions/get-builder-search-params/index.mjs";
|
|
19
|
+
import { track as q } from "./functions/track/index.mjs";
|
|
20
|
+
import { subscribeToEditor as D } from "./helpers/subscribe-to-editor.mjs";
|
|
21
|
+
import { fetchBuilderProps as H } from "./functions/fetch-builder-props.mjs";
|
|
22
|
+
import { _processContentResult as K, fetchEntries as L, fetchOneEntry as N } from "./functions/get-content/index.mjs";
|
|
23
23
|
export {
|
|
24
24
|
B as Blocks,
|
|
25
25
|
S as BuilderContext,
|
|
@@ -29,20 +29,21 @@ export {
|
|
|
29
29
|
a as Fragment,
|
|
30
30
|
p as Image,
|
|
31
31
|
i as Section,
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
n as Symbol,
|
|
33
|
+
d as Text,
|
|
34
34
|
g as Video,
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
35
|
+
K as _processContentResult,
|
|
36
|
+
w as createRegisterComponentMessage,
|
|
37
|
+
H as fetchBuilderProps,
|
|
38
|
+
L as fetchEntries,
|
|
39
|
+
N as fetchOneEntry,
|
|
40
|
+
_ as getBuilderSearchParams,
|
|
41
|
+
A as isEditing,
|
|
42
|
+
T as isPreviewing,
|
|
43
43
|
I as register,
|
|
44
|
+
M as registerAction,
|
|
44
45
|
k as setClientUserAttributes,
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
U as setEditorSettings,
|
|
47
|
+
D as subscribeToEditor,
|
|
48
|
+
q as track
|
|
48
49
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./functions/is-editing.cjs"),i=require("./functions/is-previewing.cjs"),s=require("./functions/register-component.cjs"),r=require("./functions/register.cjs"),n=require("./functions/set-editor-settings.cjs"),o=require("./functions/get-builder-search-params/index.cjs"),c=require("./functions/track/index.cjs"),g=require("./helpers/subscribe-to-editor.cjs"),u=require("./functions/fetch-builder-props.cjs"),e=require("./functions/get-content/index.cjs");exports.isEditing=t.isEditing;exports.isPreviewing=i.isPreviewing;exports.createRegisterComponentMessage=s.createRegisterComponentMessage;exports.register=r.register;exports.registerAction=r.registerAction;exports.setEditorSettings=n.setEditorSettings;exports.getBuilderSearchParams=o.getBuilderSearchParams;exports.track=c.track;exports.subscribeToEditor=g.subscribeToEditor;exports.fetchBuilderProps=u.fetchBuilderProps;exports._processContentResult=e._processContentResult;exports.fetchEntries=e.fetchEntries;exports.fetchOneEntry=e.fetchOneEntry;
|
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
import { isEditing as t } from "./functions/is-editing.mjs";
|
|
2
|
-
import { isPreviewing as
|
|
2
|
+
import { isPreviewing as i } from "./functions/is-previewing.mjs";
|
|
3
3
|
import { createRegisterComponentMessage as f } from "./functions/register-component.mjs";
|
|
4
|
-
import { register as m } from "./functions/register.mjs";
|
|
5
|
-
import { setEditorSettings as
|
|
6
|
-
import { getBuilderSearchParams as
|
|
7
|
-
import { track as
|
|
8
|
-
import { subscribeToEditor as
|
|
9
|
-
import { fetchBuilderProps as
|
|
10
|
-
import { _processContentResult as
|
|
4
|
+
import { register as m, registerAction as n } from "./functions/register.mjs";
|
|
5
|
+
import { setEditorSettings as c } from "./functions/set-editor-settings.mjs";
|
|
6
|
+
import { getBuilderSearchParams as a } from "./functions/get-builder-search-params/index.mjs";
|
|
7
|
+
import { track as E } from "./functions/track/index.mjs";
|
|
8
|
+
import { subscribeToEditor as u } from "./helpers/subscribe-to-editor.mjs";
|
|
9
|
+
import { fetchBuilderProps as P } from "./functions/fetch-builder-props.mjs";
|
|
10
|
+
import { _processContentResult as B, fetchEntries as C, fetchOneEntry as R } from "./functions/get-content/index.mjs";
|
|
11
11
|
export {
|
|
12
|
-
|
|
12
|
+
B as _processContentResult,
|
|
13
13
|
f as createRegisterComponentMessage,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
P as fetchBuilderProps,
|
|
15
|
+
C as fetchEntries,
|
|
16
|
+
R as fetchOneEntry,
|
|
17
|
+
a as getBuilderSearchParams,
|
|
18
18
|
t as isEditing,
|
|
19
|
-
|
|
19
|
+
i as isPreviewing,
|
|
20
20
|
m as register,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
n as registerAction,
|
|
22
|
+
c as setEditorSettings,
|
|
23
|
+
u as subscribeToEditor,
|
|
24
|
+
E as track
|
|
24
25
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="0.20.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="0.20.1";exports.SDK_VERSION=e;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./is-browser.cjs"),g=require("./register-component.cjs"),i={};function a(e,t){e==="plugin"&&(t=g.serializeIncludingFunctions(t));let r=i[e];if(r||(r=i[e]=[]),r.push(t),o.isBrowser()){const s={type:"builder.register",data:{type:e,info:t}};try{parent.postMessage(s,"*"),parent!==window&&window.postMessage(s,"*")}catch(n){console.debug("Could not postmessage",n)}}}function c(e){var t;if(o.isBrowser()){const r=JSON.parse(JSON.stringify(e));e.action&&(r.action=e.action.toString()),(t=window.parent)==null||t.postMessage({type:"builder.registerAction",data:r},"*")}}exports.register=a;exports.registerAction=c;
|
|
@@ -1,24 +1,35 @@
|
|
|
1
|
-
import { isBrowser as
|
|
1
|
+
import { isBrowser as o } from "./is-browser.mjs";
|
|
2
2
|
import { serializeIncludingFunctions as a } from "./register-component.mjs";
|
|
3
|
-
const
|
|
4
|
-
function
|
|
5
|
-
|
|
6
|
-
let
|
|
7
|
-
if (
|
|
8
|
-
const
|
|
3
|
+
const r = {};
|
|
4
|
+
function p(t, e) {
|
|
5
|
+
t === "plugin" && (e = a(e));
|
|
6
|
+
let i = r[t];
|
|
7
|
+
if (i || (i = r[t] = []), i.push(e), o()) {
|
|
8
|
+
const s = {
|
|
9
9
|
type: "builder.register",
|
|
10
10
|
data: {
|
|
11
|
-
type:
|
|
12
|
-
info:
|
|
11
|
+
type: t,
|
|
12
|
+
info: e
|
|
13
13
|
}
|
|
14
14
|
};
|
|
15
15
|
try {
|
|
16
|
-
parent.postMessage(
|
|
17
|
-
} catch (
|
|
18
|
-
console.debug("Could not postmessage",
|
|
16
|
+
parent.postMessage(s, "*"), parent !== window && window.postMessage(s, "*");
|
|
17
|
+
} catch (n) {
|
|
18
|
+
console.debug("Could not postmessage", n);
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
+
function d(t) {
|
|
23
|
+
var e;
|
|
24
|
+
if (o()) {
|
|
25
|
+
const i = JSON.parse(JSON.stringify(t));
|
|
26
|
+
t.action && (i.action = t.action.toString()), (e = window.parent) == null || e.postMessage({
|
|
27
|
+
type: "builder.registerAction",
|
|
28
|
+
data: i
|
|
29
|
+
}, "*");
|
|
30
|
+
}
|
|
31
|
+
}
|
|
22
32
|
export {
|
|
23
|
-
|
|
33
|
+
p as register,
|
|
34
|
+
d as registerAction
|
|
24
35
|
};
|
package/lib/edge/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./blocks/button/button.cjs"),i=require("./blocks/columns/columns.cjs"),s=require("./blocks/fragment/fragment.cjs"),n=require("./blocks/image/image.cjs"),o=require("./blocks/section/section.cjs"),c=require("./blocks/symbol/symbol.cjs"),u=require("./blocks/text/text.cjs"),g=require("./blocks/video/video.cjs"),d=require("./components/blocks/blocks.cjs"),q=require("./components/content-variants/content-variants.cjs"),a=require("./context/builder.context.cjs"),l=require("./helpers/user-attributes.cjs"),b=require("./functions/is-editing.cjs"),m=require("./functions/is-previewing.cjs"),E=require("./functions/register-component.cjs"),t=require("./functions/register.cjs"),C=require("./functions/set-editor-settings.cjs"),f=require("./functions/get-builder-search-params/index.cjs"),h=require("./functions/track/index.cjs"),p=require("./helpers/subscribe-to-editor.cjs"),P=require("./functions/fetch-builder-props.cjs"),e=require("./functions/get-content/index.cjs");exports.Button=r;exports.Columns=i;exports.Fragment=s;exports.Image=n;exports.Section=o;exports.Symbol=c;exports.Text=u;exports.Video=g;exports.Blocks=d;exports.Content=q;exports.BuilderContext=a;exports.setClientUserAttributes=l.setClientUserAttributes;exports.isEditing=b.isEditing;exports.isPreviewing=m.isPreviewing;exports.createRegisterComponentMessage=E.createRegisterComponentMessage;exports.register=t.register;exports.registerAction=t.registerAction;exports.setEditorSettings=C.setEditorSettings;exports.getBuilderSearchParams=f.getBuilderSearchParams;exports.track=h.track;exports.subscribeToEditor=p.subscribeToEditor;exports.fetchBuilderProps=P.fetchBuilderProps;exports._processContentResult=e._processContentResult;exports.fetchEntries=e.fetchEntries;exports.fetchOneEntry=e.fetchOneEntry;
|
package/lib/edge/index.mjs
CHANGED
|
@@ -3,23 +3,23 @@ import { default as f } from "./blocks/columns/columns.mjs";
|
|
|
3
3
|
import { default as a } from "./blocks/fragment/fragment.mjs";
|
|
4
4
|
import { default as p } from "./blocks/image/image.mjs";
|
|
5
5
|
import { default as i } from "./blocks/section/section.mjs";
|
|
6
|
-
import { default as
|
|
7
|
-
import { default as
|
|
6
|
+
import { default as n } from "./blocks/symbol/symbol.mjs";
|
|
7
|
+
import { default as d } from "./blocks/text/text.mjs";
|
|
8
8
|
import { default as g } from "./blocks/video/video.mjs";
|
|
9
9
|
import { default as B } from "./components/blocks/blocks.mjs";
|
|
10
10
|
import { default as b } from "./components/content-variants/content-variants.mjs";
|
|
11
11
|
import { default as S } from "./context/builder.context.mjs";
|
|
12
12
|
import { setClientUserAttributes as k } from "./helpers/user-attributes.mjs";
|
|
13
|
-
import { isEditing as
|
|
14
|
-
import { isPreviewing as
|
|
15
|
-
import { createRegisterComponentMessage as
|
|
16
|
-
import { register as I } from "./functions/register.mjs";
|
|
17
|
-
import { setEditorSettings as
|
|
18
|
-
import { getBuilderSearchParams as
|
|
19
|
-
import { track as
|
|
20
|
-
import { subscribeToEditor as
|
|
21
|
-
import { fetchBuilderProps as
|
|
22
|
-
import { _processContentResult as
|
|
13
|
+
import { isEditing as A } from "./functions/is-editing.mjs";
|
|
14
|
+
import { isPreviewing as T } from "./functions/is-previewing.mjs";
|
|
15
|
+
import { createRegisterComponentMessage as w } from "./functions/register-component.mjs";
|
|
16
|
+
import { register as I, registerAction as M } from "./functions/register.mjs";
|
|
17
|
+
import { setEditorSettings as U } from "./functions/set-editor-settings.mjs";
|
|
18
|
+
import { getBuilderSearchParams as _ } from "./functions/get-builder-search-params/index.mjs";
|
|
19
|
+
import { track as q } from "./functions/track/index.mjs";
|
|
20
|
+
import { subscribeToEditor as D } from "./helpers/subscribe-to-editor.mjs";
|
|
21
|
+
import { fetchBuilderProps as H } from "./functions/fetch-builder-props.mjs";
|
|
22
|
+
import { _processContentResult as K, fetchEntries as L, fetchOneEntry as N } from "./functions/get-content/index.mjs";
|
|
23
23
|
export {
|
|
24
24
|
B as Blocks,
|
|
25
25
|
S as BuilderContext,
|
|
@@ -29,20 +29,21 @@ export {
|
|
|
29
29
|
a as Fragment,
|
|
30
30
|
p as Image,
|
|
31
31
|
i as Section,
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
n as Symbol,
|
|
33
|
+
d as Text,
|
|
34
34
|
g as Video,
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
35
|
+
K as _processContentResult,
|
|
36
|
+
w as createRegisterComponentMessage,
|
|
37
|
+
H as fetchBuilderProps,
|
|
38
|
+
L as fetchEntries,
|
|
39
|
+
N as fetchOneEntry,
|
|
40
|
+
_ as getBuilderSearchParams,
|
|
41
|
+
A as isEditing,
|
|
42
|
+
T as isPreviewing,
|
|
43
43
|
I as register,
|
|
44
|
+
M as registerAction,
|
|
44
45
|
k as setClientUserAttributes,
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
U as setEditorSettings,
|
|
47
|
+
D as subscribeToEditor,
|
|
48
|
+
q as track
|
|
48
49
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./functions/is-editing.cjs"),i=require("./functions/is-previewing.cjs"),s=require("./functions/register-component.cjs"),r=require("./functions/register.cjs"),n=require("./functions/set-editor-settings.cjs"),o=require("./functions/get-builder-search-params/index.cjs"),c=require("./functions/track/index.cjs"),g=require("./helpers/subscribe-to-editor.cjs"),u=require("./functions/fetch-builder-props.cjs"),e=require("./functions/get-content/index.cjs");exports.isEditing=t.isEditing;exports.isPreviewing=i.isPreviewing;exports.createRegisterComponentMessage=s.createRegisterComponentMessage;exports.register=r.register;exports.registerAction=r.registerAction;exports.setEditorSettings=n.setEditorSettings;exports.getBuilderSearchParams=o.getBuilderSearchParams;exports.track=c.track;exports.subscribeToEditor=g.subscribeToEditor;exports.fetchBuilderProps=u.fetchBuilderProps;exports._processContentResult=e._processContentResult;exports.fetchEntries=e.fetchEntries;exports.fetchOneEntry=e.fetchOneEntry;
|
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
import { isEditing as t } from "./functions/is-editing.mjs";
|
|
2
|
-
import { isPreviewing as
|
|
2
|
+
import { isPreviewing as i } from "./functions/is-previewing.mjs";
|
|
3
3
|
import { createRegisterComponentMessage as f } from "./functions/register-component.mjs";
|
|
4
|
-
import { register as m } from "./functions/register.mjs";
|
|
5
|
-
import { setEditorSettings as
|
|
6
|
-
import { getBuilderSearchParams as
|
|
7
|
-
import { track as
|
|
8
|
-
import { subscribeToEditor as
|
|
9
|
-
import { fetchBuilderProps as
|
|
10
|
-
import { _processContentResult as
|
|
4
|
+
import { register as m, registerAction as n } from "./functions/register.mjs";
|
|
5
|
+
import { setEditorSettings as c } from "./functions/set-editor-settings.mjs";
|
|
6
|
+
import { getBuilderSearchParams as a } from "./functions/get-builder-search-params/index.mjs";
|
|
7
|
+
import { track as E } from "./functions/track/index.mjs";
|
|
8
|
+
import { subscribeToEditor as u } from "./helpers/subscribe-to-editor.mjs";
|
|
9
|
+
import { fetchBuilderProps as P } from "./functions/fetch-builder-props.mjs";
|
|
10
|
+
import { _processContentResult as B, fetchEntries as C, fetchOneEntry as R } from "./functions/get-content/index.mjs";
|
|
11
11
|
export {
|
|
12
|
-
|
|
12
|
+
B as _processContentResult,
|
|
13
13
|
f as createRegisterComponentMessage,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
P as fetchBuilderProps,
|
|
15
|
+
C as fetchEntries,
|
|
16
|
+
R as fetchOneEntry,
|
|
17
|
+
a as getBuilderSearchParams,
|
|
18
18
|
t as isEditing,
|
|
19
|
-
|
|
19
|
+
i as isPreviewing,
|
|
20
20
|
m as register,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
n as registerAction,
|
|
22
|
+
c as setEditorSettings,
|
|
23
|
+
u as subscribeToEditor,
|
|
24
|
+
E as track
|
|
24
25
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="0.20.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="0.20.1";exports.SDK_VERSION=e;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./is-browser.cjs"),g=require("./register-component.cjs"),i={};function a(e,t){e==="plugin"&&(t=g.serializeIncludingFunctions(t));let r=i[e];if(r||(r=i[e]=[]),r.push(t),o.isBrowser()){const s={type:"builder.register",data:{type:e,info:t}};try{parent.postMessage(s,"*"),parent!==window&&window.postMessage(s,"*")}catch(n){console.debug("Could not postmessage",n)}}}function c(e){var t;if(o.isBrowser()){const r=JSON.parse(JSON.stringify(e));e.action&&(r.action=e.action.toString()),(t=window.parent)==null||t.postMessage({type:"builder.registerAction",data:r},"*")}}exports.register=a;exports.registerAction=c;
|
|
@@ -1,24 +1,35 @@
|
|
|
1
|
-
import { isBrowser as
|
|
1
|
+
import { isBrowser as o } from "./is-browser.mjs";
|
|
2
2
|
import { serializeIncludingFunctions as a } from "./register-component.mjs";
|
|
3
|
-
const
|
|
4
|
-
function
|
|
5
|
-
|
|
6
|
-
let
|
|
7
|
-
if (
|
|
8
|
-
const
|
|
3
|
+
const r = {};
|
|
4
|
+
function p(t, e) {
|
|
5
|
+
t === "plugin" && (e = a(e));
|
|
6
|
+
let i = r[t];
|
|
7
|
+
if (i || (i = r[t] = []), i.push(e), o()) {
|
|
8
|
+
const s = {
|
|
9
9
|
type: "builder.register",
|
|
10
10
|
data: {
|
|
11
|
-
type:
|
|
12
|
-
info:
|
|
11
|
+
type: t,
|
|
12
|
+
info: e
|
|
13
13
|
}
|
|
14
14
|
};
|
|
15
15
|
try {
|
|
16
|
-
parent.postMessage(
|
|
17
|
-
} catch (
|
|
18
|
-
console.debug("Could not postmessage",
|
|
16
|
+
parent.postMessage(s, "*"), parent !== window && window.postMessage(s, "*");
|
|
17
|
+
} catch (n) {
|
|
18
|
+
console.debug("Could not postmessage", n);
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
+
function d(t) {
|
|
23
|
+
var e;
|
|
24
|
+
if (o()) {
|
|
25
|
+
const i = JSON.parse(JSON.stringify(t));
|
|
26
|
+
t.action && (i.action = t.action.toString()), (e = window.parent) == null || e.postMessage({
|
|
27
|
+
type: "builder.registerAction",
|
|
28
|
+
data: i
|
|
29
|
+
}, "*");
|
|
30
|
+
}
|
|
31
|
+
}
|
|
22
32
|
export {
|
|
23
|
-
|
|
33
|
+
p as register,
|
|
34
|
+
d as registerAction
|
|
24
35
|
};
|
package/lib/node/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./blocks/button/button.cjs"),i=require("./blocks/columns/columns.cjs"),s=require("./blocks/fragment/fragment.cjs"),n=require("./blocks/image/image.cjs"),o=require("./blocks/section/section.cjs"),c=require("./blocks/symbol/symbol.cjs"),u=require("./blocks/text/text.cjs"),g=require("./blocks/video/video.cjs"),d=require("./components/blocks/blocks.cjs"),q=require("./components/content-variants/content-variants.cjs"),a=require("./context/builder.context.cjs"),l=require("./helpers/user-attributes.cjs"),b=require("./functions/is-editing.cjs"),m=require("./functions/is-previewing.cjs"),E=require("./functions/register-component.cjs"),t=require("./functions/register.cjs"),C=require("./functions/set-editor-settings.cjs"),f=require("./functions/get-builder-search-params/index.cjs"),h=require("./functions/track/index.cjs"),p=require("./helpers/subscribe-to-editor.cjs"),P=require("./functions/fetch-builder-props.cjs"),e=require("./functions/get-content/index.cjs");exports.Button=r;exports.Columns=i;exports.Fragment=s;exports.Image=n;exports.Section=o;exports.Symbol=c;exports.Text=u;exports.Video=g;exports.Blocks=d;exports.Content=q;exports.BuilderContext=a;exports.setClientUserAttributes=l.setClientUserAttributes;exports.isEditing=b.isEditing;exports.isPreviewing=m.isPreviewing;exports.createRegisterComponentMessage=E.createRegisterComponentMessage;exports.register=t.register;exports.registerAction=t.registerAction;exports.setEditorSettings=C.setEditorSettings;exports.getBuilderSearchParams=f.getBuilderSearchParams;exports.track=h.track;exports.subscribeToEditor=p.subscribeToEditor;exports.fetchBuilderProps=P.fetchBuilderProps;exports._processContentResult=e._processContentResult;exports.fetchEntries=e.fetchEntries;exports.fetchOneEntry=e.fetchOneEntry;
|
package/lib/node/index.mjs
CHANGED
|
@@ -3,23 +3,23 @@ import { default as f } from "./blocks/columns/columns.mjs";
|
|
|
3
3
|
import { default as a } from "./blocks/fragment/fragment.mjs";
|
|
4
4
|
import { default as p } from "./blocks/image/image.mjs";
|
|
5
5
|
import { default as i } from "./blocks/section/section.mjs";
|
|
6
|
-
import { default as
|
|
7
|
-
import { default as
|
|
6
|
+
import { default as n } from "./blocks/symbol/symbol.mjs";
|
|
7
|
+
import { default as d } from "./blocks/text/text.mjs";
|
|
8
8
|
import { default as g } from "./blocks/video/video.mjs";
|
|
9
9
|
import { default as B } from "./components/blocks/blocks.mjs";
|
|
10
10
|
import { default as b } from "./components/content-variants/content-variants.mjs";
|
|
11
11
|
import { default as S } from "./context/builder.context.mjs";
|
|
12
12
|
import { setClientUserAttributes as k } from "./helpers/user-attributes.mjs";
|
|
13
|
-
import { isEditing as
|
|
14
|
-
import { isPreviewing as
|
|
15
|
-
import { createRegisterComponentMessage as
|
|
16
|
-
import { register as I } from "./functions/register.mjs";
|
|
17
|
-
import { setEditorSettings as
|
|
18
|
-
import { getBuilderSearchParams as
|
|
19
|
-
import { track as
|
|
20
|
-
import { subscribeToEditor as
|
|
21
|
-
import { fetchBuilderProps as
|
|
22
|
-
import { _processContentResult as
|
|
13
|
+
import { isEditing as A } from "./functions/is-editing.mjs";
|
|
14
|
+
import { isPreviewing as T } from "./functions/is-previewing.mjs";
|
|
15
|
+
import { createRegisterComponentMessage as w } from "./functions/register-component.mjs";
|
|
16
|
+
import { register as I, registerAction as M } from "./functions/register.mjs";
|
|
17
|
+
import { setEditorSettings as U } from "./functions/set-editor-settings.mjs";
|
|
18
|
+
import { getBuilderSearchParams as _ } from "./functions/get-builder-search-params/index.mjs";
|
|
19
|
+
import { track as q } from "./functions/track/index.mjs";
|
|
20
|
+
import { subscribeToEditor as D } from "./helpers/subscribe-to-editor.mjs";
|
|
21
|
+
import { fetchBuilderProps as H } from "./functions/fetch-builder-props.mjs";
|
|
22
|
+
import { _processContentResult as K, fetchEntries as L, fetchOneEntry as N } from "./functions/get-content/index.mjs";
|
|
23
23
|
export {
|
|
24
24
|
B as Blocks,
|
|
25
25
|
S as BuilderContext,
|
|
@@ -29,20 +29,21 @@ export {
|
|
|
29
29
|
a as Fragment,
|
|
30
30
|
p as Image,
|
|
31
31
|
i as Section,
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
n as Symbol,
|
|
33
|
+
d as Text,
|
|
34
34
|
g as Video,
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
35
|
+
K as _processContentResult,
|
|
36
|
+
w as createRegisterComponentMessage,
|
|
37
|
+
H as fetchBuilderProps,
|
|
38
|
+
L as fetchEntries,
|
|
39
|
+
N as fetchOneEntry,
|
|
40
|
+
_ as getBuilderSearchParams,
|
|
41
|
+
A as isEditing,
|
|
42
|
+
T as isPreviewing,
|
|
43
43
|
I as register,
|
|
44
|
+
M as registerAction,
|
|
44
45
|
k as setClientUserAttributes,
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
U as setEditorSettings,
|
|
47
|
+
D as subscribeToEditor,
|
|
48
|
+
q as track
|
|
48
49
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./functions/is-editing.cjs"),i=require("./functions/is-previewing.cjs"),s=require("./functions/register-component.cjs"),r=require("./functions/register.cjs"),n=require("./functions/set-editor-settings.cjs"),o=require("./functions/get-builder-search-params/index.cjs"),c=require("./functions/track/index.cjs"),g=require("./helpers/subscribe-to-editor.cjs"),u=require("./functions/fetch-builder-props.cjs"),e=require("./functions/get-content/index.cjs");exports.isEditing=t.isEditing;exports.isPreviewing=i.isPreviewing;exports.createRegisterComponentMessage=s.createRegisterComponentMessage;exports.register=r.register;exports.registerAction=r.registerAction;exports.setEditorSettings=n.setEditorSettings;exports.getBuilderSearchParams=o.getBuilderSearchParams;exports.track=c.track;exports.subscribeToEditor=g.subscribeToEditor;exports.fetchBuilderProps=u.fetchBuilderProps;exports._processContentResult=e._processContentResult;exports.fetchEntries=e.fetchEntries;exports.fetchOneEntry=e.fetchOneEntry;
|
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
import { isEditing as t } from "./functions/is-editing.mjs";
|
|
2
|
-
import { isPreviewing as
|
|
2
|
+
import { isPreviewing as i } from "./functions/is-previewing.mjs";
|
|
3
3
|
import { createRegisterComponentMessage as f } from "./functions/register-component.mjs";
|
|
4
|
-
import { register as m } from "./functions/register.mjs";
|
|
5
|
-
import { setEditorSettings as
|
|
6
|
-
import { getBuilderSearchParams as
|
|
7
|
-
import { track as
|
|
8
|
-
import { subscribeToEditor as
|
|
9
|
-
import { fetchBuilderProps as
|
|
10
|
-
import { _processContentResult as
|
|
4
|
+
import { register as m, registerAction as n } from "./functions/register.mjs";
|
|
5
|
+
import { setEditorSettings as c } from "./functions/set-editor-settings.mjs";
|
|
6
|
+
import { getBuilderSearchParams as a } from "./functions/get-builder-search-params/index.mjs";
|
|
7
|
+
import { track as E } from "./functions/track/index.mjs";
|
|
8
|
+
import { subscribeToEditor as u } from "./helpers/subscribe-to-editor.mjs";
|
|
9
|
+
import { fetchBuilderProps as P } from "./functions/fetch-builder-props.mjs";
|
|
10
|
+
import { _processContentResult as B, fetchEntries as C, fetchOneEntry as R } from "./functions/get-content/index.mjs";
|
|
11
11
|
export {
|
|
12
|
-
|
|
12
|
+
B as _processContentResult,
|
|
13
13
|
f as createRegisterComponentMessage,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
P as fetchBuilderProps,
|
|
15
|
+
C as fetchEntries,
|
|
16
|
+
R as fetchOneEntry,
|
|
17
|
+
a as getBuilderSearchParams,
|
|
18
18
|
t as isEditing,
|
|
19
|
-
|
|
19
|
+
i as isPreviewing,
|
|
20
20
|
m as register,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
n as registerAction,
|
|
22
|
+
c as setEditorSettings,
|
|
23
|
+
u as subscribeToEditor,
|
|
24
|
+
E as track
|
|
24
25
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@builder.io/sdk-react-nextjs",
|
|
3
3
|
"description": "Builder.io RSC SDK for NextJS App Directory",
|
|
4
|
-
"version": "0.20.
|
|
4
|
+
"version": "0.20.1",
|
|
5
5
|
"homepage": "https://github.com/BuilderIO/builder/tree/main/packages/sdks/output/nextjs",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.20.
|
|
1
|
+
export declare const SDK_VERSION = "0.20.1";
|
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
import type { BuilderBlock } from '../types/builder-block.js';
|
|
2
2
|
import type { DeepPartial } from '../types/deep-partial.js';
|
|
3
|
+
import type { Input } from '../types/input.js';
|
|
4
|
+
export interface Action {
|
|
5
|
+
name: string;
|
|
6
|
+
inputs?: readonly Input[];
|
|
7
|
+
returnType?: Input;
|
|
8
|
+
action: (options: Record<string, any>) => string;
|
|
9
|
+
/**
|
|
10
|
+
* Is an action for expression (e.g. calculating a binding like a formula
|
|
11
|
+
* to fill a value based on locale) or a function (e.g. something to trigger
|
|
12
|
+
* on an event like add to cart) or either (e.g. a custom code block)
|
|
13
|
+
*/
|
|
14
|
+
kind: 'expression' | 'function' | 'any';
|
|
15
|
+
/**
|
|
16
|
+
* Globally unique ID for an action, e.g. "@builder.io:setState"
|
|
17
|
+
*/
|
|
18
|
+
id: string;
|
|
19
|
+
}
|
|
3
20
|
export interface InsertMenuItem {
|
|
4
21
|
name: string;
|
|
5
22
|
icon?: string;
|
|
@@ -14,3 +31,4 @@ export interface InsertMenuConfig {
|
|
|
14
31
|
}
|
|
15
32
|
export declare function register(type: 'insertMenu', info: InsertMenuConfig): void;
|
|
16
33
|
export declare function register(type: string, info: any): void;
|
|
34
|
+
export declare function registerAction(action: Action): void;
|
|
@@ -25,7 +25,7 @@ export type { ComponentInfo } from './types/components.js';
|
|
|
25
25
|
export { isEditing } from './functions/is-editing.js';
|
|
26
26
|
export { isPreviewing } from './functions/is-previewing.js';
|
|
27
27
|
export { createRegisterComponentMessage } from './functions/register-component.js';
|
|
28
|
-
export { register } from './functions/register.js';
|
|
28
|
+
export { register, registerAction } from './functions/register.js';
|
|
29
29
|
export type { InsertMenuConfig, InsertMenuItem } from './functions/register.js';
|
|
30
30
|
export { setEditorSettings } from './functions/set-editor-settings.js';
|
|
31
31
|
export type { Settings } from './functions/set-editor-settings.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.20.
|
|
1
|
+
export declare const SDK_VERSION = "0.20.1";
|
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
import type { BuilderBlock } from '../types/builder-block.js';
|
|
2
2
|
import type { DeepPartial } from '../types/deep-partial.js';
|
|
3
|
+
import type { Input } from '../types/input.js';
|
|
4
|
+
export interface Action {
|
|
5
|
+
name: string;
|
|
6
|
+
inputs?: readonly Input[];
|
|
7
|
+
returnType?: Input;
|
|
8
|
+
action: (options: Record<string, any>) => string;
|
|
9
|
+
/**
|
|
10
|
+
* Is an action for expression (e.g. calculating a binding like a formula
|
|
11
|
+
* to fill a value based on locale) or a function (e.g. something to trigger
|
|
12
|
+
* on an event like add to cart) or either (e.g. a custom code block)
|
|
13
|
+
*/
|
|
14
|
+
kind: 'expression' | 'function' | 'any';
|
|
15
|
+
/**
|
|
16
|
+
* Globally unique ID for an action, e.g. "@builder.io:setState"
|
|
17
|
+
*/
|
|
18
|
+
id: string;
|
|
19
|
+
}
|
|
3
20
|
export interface InsertMenuItem {
|
|
4
21
|
name: string;
|
|
5
22
|
icon?: string;
|
|
@@ -14,3 +31,4 @@ export interface InsertMenuConfig {
|
|
|
14
31
|
}
|
|
15
32
|
export declare function register(type: 'insertMenu', info: InsertMenuConfig): void;
|
|
16
33
|
export declare function register(type: string, info: any): void;
|
|
34
|
+
export declare function registerAction(action: Action): void;
|
|
@@ -25,7 +25,7 @@ export type { ComponentInfo } from './types/components.js';
|
|
|
25
25
|
export { isEditing } from './functions/is-editing.js';
|
|
26
26
|
export { isPreviewing } from './functions/is-previewing.js';
|
|
27
27
|
export { createRegisterComponentMessage } from './functions/register-component.js';
|
|
28
|
-
export { register } from './functions/register.js';
|
|
28
|
+
export { register, registerAction } from './functions/register.js';
|
|
29
29
|
export type { InsertMenuConfig, InsertMenuItem } from './functions/register.js';
|
|
30
30
|
export { setEditorSettings } from './functions/set-editor-settings.js';
|
|
31
31
|
export type { Settings } from './functions/set-editor-settings.js';
|