@builder.io/sdk-react-nextjs 0.10.0 → 0.11.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/{node/USE_CLIENT_BUNDLE-fcb61de5.cjs → browser/USE_CLIENT_BUNDLE-5f863786.cjs} +4 -4
- package/lib/browser/{USE_CLIENT_BUNDLE-8a469a88.js → USE_CLIENT_BUNDLE-9460c0fe.js} +6 -6
- package/lib/{edge/USE_SERVER_BUNDLE-da7c49b1.js → browser/USE_SERVER_BUNDLE-a256863c.js} +1 -1
- package/lib/{edge/USE_SERVER_BUNDLE-b5ccb43b.cjs → browser/USE_SERVER_BUNDLE-f508b13e.cjs} +1 -1
- package/lib/browser/{bundle-f23172a5.js → bundle-387d13d7.js} +25 -23
- package/lib/browser/{bundle-6593f46a.cjs → bundle-3e6c6669.cjs} +8 -8
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +3 -3
- package/lib/{browser/USE_CLIENT_BUNDLE-bd42f34e.cjs → edge/USE_CLIENT_BUNDLE-4ad3927b.cjs} +4 -4
- package/lib/{node/USE_CLIENT_BUNDLE-39759ac3.js → edge/USE_CLIENT_BUNDLE-7d2509b4.js} +6 -6
- package/lib/{node/USE_SERVER_BUNDLE-9a538e9b.cjs → edge/USE_SERVER_BUNDLE-42c61f06.cjs} +1 -1
- package/lib/{node/USE_SERVER_BUNDLE-9cade0d5.js → edge/USE_SERVER_BUNDLE-5a6633cc.js} +1 -1
- package/lib/edge/{bundle-bd18331d.js → bundle-33765141.js} +104 -102
- package/lib/edge/{bundle-7c571d18.cjs → bundle-59cf1181.cjs} +3 -3
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +3 -3
- package/lib/{edge/USE_CLIENT_BUNDLE-2ee2538b.cjs → node/USE_CLIENT_BUNDLE-09aea24d.cjs} +4 -4
- package/lib/{edge/USE_CLIENT_BUNDLE-474e3242.js → node/USE_CLIENT_BUNDLE-e7bc5bc3.js} +6 -6
- package/lib/{browser/USE_SERVER_BUNDLE-b0fcc116.js → node/USE_SERVER_BUNDLE-09b66e65.js} +1 -1
- package/lib/{browser/USE_SERVER_BUNDLE-608eb1c6.cjs → node/USE_SERVER_BUNDLE-84387e43.cjs} +1 -1
- package/lib/node/{bundle-ad89090d.cjs → bundle-c361a3b2.cjs} +3 -3
- package/lib/node/{bundle-49222e30.js → bundle-d073dfea.js} +25 -23
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +3 -3
- package/package.json +1 -1
- package/types/cjs/components/block/components/interactive-element.d.ts +3 -2
- package/types/cjs/constants/sdk-version.d.ts +1 -1
- package/types/cjs/types/targets.d.ts +1 -1
- package/types/esm/components/block/components/interactive-element.d.ts +3 -2
- package/types/esm/constants/sdk-version.d.ts +1 -1
- package/types/esm/types/targets.d.ts +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LRUCache } from "lru-cache";
|
|
2
2
|
import { jsx, Fragment, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { createElement } from "react";
|
|
4
|
-
import { I as InteractiveElement, B as BlockWrapper, a as BlocksWrapper, b as Button, C as CustomCode, E as Embed, F as FragmentComponent, c as Image, d as ImgComponent, S as SectionComponent, V as Video, e as EnableEditor } from "./USE_CLIENT_BUNDLE-
|
|
4
|
+
import { I as InteractiveElement, B as BlockWrapper, a as BlocksWrapper, b as Button, C as CustomCode, E as Embed, F as FragmentComponent, c as Image, d as ImgComponent, S as SectionComponent, V as Video, e as EnableEditor } from "./USE_CLIENT_BUNDLE-e7bc5bc3.js";
|
|
5
5
|
import "next/navigation";
|
|
6
6
|
function getBlockComponentOptions(e) {
|
|
7
7
|
var t;
|
|
@@ -479,8 +479,7 @@ function getBlockActions(e) {
|
|
|
479
479
|
let i = getEventHandlerName(o);
|
|
480
480
|
if (e.stripPrefix)
|
|
481
481
|
switch (TARGET) {
|
|
482
|
-
case "
|
|
483
|
-
case "vue3":
|
|
482
|
+
case "vue":
|
|
484
483
|
i = i.replace("v-on:", "");
|
|
485
484
|
break;
|
|
486
485
|
case "svelte":
|
|
@@ -520,8 +519,7 @@ function getBlockProperties({
|
|
|
520
519
|
function getStyleAttribute(e) {
|
|
521
520
|
switch (TARGET) {
|
|
522
521
|
case "svelte":
|
|
523
|
-
case "
|
|
524
|
-
case "vue3":
|
|
522
|
+
case "vue":
|
|
525
523
|
case "solid":
|
|
526
524
|
return convertStyleMapToCSSArray(e).join(" ");
|
|
527
525
|
case "qwik":
|
|
@@ -539,23 +537,27 @@ const getWrapperProps = ({
|
|
|
539
537
|
includeBlockProps: r,
|
|
540
538
|
isInteractive: i,
|
|
541
539
|
contextValue: a
|
|
542
|
-
}) =>
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
540
|
+
}) => {
|
|
541
|
+
const s = {
|
|
542
|
+
...e,
|
|
543
|
+
/**
|
|
544
|
+
* If `noWrap` is set to `true`, then the block's props/attributes are provided to the
|
|
545
|
+
* component itself directly. Otherwise, they are provided to the wrapper element.
|
|
546
|
+
*/
|
|
547
|
+
...r ? {
|
|
548
|
+
attributes: getBlockProperties({
|
|
549
|
+
block: t,
|
|
550
|
+
context: a
|
|
551
|
+
})
|
|
552
|
+
} : {}
|
|
553
|
+
};
|
|
554
|
+
return i ? {
|
|
555
|
+
Wrapper: o,
|
|
556
|
+
block: t,
|
|
557
|
+
context: n,
|
|
558
|
+
wrapperProps: e,
|
|
559
|
+
includeBlockProps: r
|
|
560
|
+
} : s;
|
|
559
561
|
};
|
|
560
562
|
function ComponentRef(e) {
|
|
561
563
|
var n, o;
|
|
@@ -2148,7 +2150,7 @@ const findParentElement = (e, t, n = !0) => {
|
|
|
2148
2150
|
builderElementIndex: n && o ? [].slice.call(document.getElementsByClassName(o)).indexOf(n) : void 0
|
|
2149
2151
|
}
|
|
2150
2152
|
};
|
|
2151
|
-
}, SDK_VERSION = "0.
|
|
2153
|
+
}, SDK_VERSION = "0.11.1", registry = {};
|
|
2152
2154
|
function register(e, t) {
|
|
2153
2155
|
let n = registry[e];
|
|
2154
2156
|
if (n || (n = registry[e] = []), n.push(t), isBrowser()) {
|
package/lib/node/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./bundle-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./bundle-c361a3b2.cjs"),t=require("./USE_CLIENT_BUNDLE-09aea24d.cjs");require("lru-cache");require("react/jsx-runtime");require("react");require("next/navigation");require("./USE_SERVER_BUNDLE-84387e43.cjs");exports.Blocks=e.Blocks;exports.Columns=e.Columns;exports.Content=e.ContentVariants;exports.RenderBlocks=e.RenderBlocks;exports.RenderContent=e.RenderContent;exports.Symbol=e.Symbol;exports.Text=e.Text;exports._processContentResult=e._processContentResult;exports.createRegisterComponentMessage=e.createRegisterComponentMessage;exports.fetchBuilderProps=e.fetchBuilderProps;exports.fetchEntries=e.fetchEntries;exports.fetchOneEntry=e.fetchOneEntry;exports.getAllContent=e.getAllContent;exports.getBuilderSearchParams=e.getBuilderSearchParams;exports.getContent=e.getContent;exports.isEditing=e.isEditing;exports.isPreviewing=e.isPreviewing;exports.register=e.register;exports.setEditorSettings=e.setEditorSettings;exports.track=e.track;exports.Button=t.Button;exports.Fragment=t.FragmentComponent;exports.Image=t.Image;exports.Section=t.SectionComponent;exports.Video=t.Video;
|
package/lib/node/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { B as i, t as m, C as c, R as g, q as p, S as l, T as C, w as d, m as f, E as u, x as B, n as S, y as E, A as R, z as h, i as x, f as k, u as y, v as P, D as b } from "./bundle-
|
|
2
|
-
import { b as w, F as A, c as F, S as T, V } from "./USE_CLIENT_BUNDLE-
|
|
1
|
+
import { B as i, t as m, C as c, R as g, q as p, S as l, T as C, w as d, m as f, E as u, x as B, n as S, y as E, A as R, z as h, i as x, f as k, u as y, v as P, D as b } from "./bundle-d073dfea.js";
|
|
2
|
+
import { b as w, F as A, c as F, S as T, V } from "./USE_CLIENT_BUNDLE-e7bc5bc3.js";
|
|
3
3
|
import "lru-cache";
|
|
4
4
|
import "react/jsx-runtime";
|
|
5
5
|
import "react";
|
|
6
6
|
import "next/navigation";
|
|
7
|
-
import "./USE_SERVER_BUNDLE-
|
|
7
|
+
import "./USE_SERVER_BUNDLE-09b66e65.js";
|
|
8
8
|
export {
|
|
9
9
|
i as Blocks,
|
|
10
10
|
w as Button,
|
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.
|
|
4
|
+
"version": "0.11.1",
|
|
5
5
|
"homepage": "https://github.com/BuilderIO/builder/tree/main/packages/sdks/output/nextjs",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -3,10 +3,11 @@ export type InteractiveElementProps = {
|
|
|
3
3
|
Wrapper: any;
|
|
4
4
|
block: BuilderBlock;
|
|
5
5
|
context: BuilderContextInterface;
|
|
6
|
-
wrapperProps:
|
|
6
|
+
wrapperProps: Dictionary<any>;
|
|
7
|
+
includeBlockProps: boolean;
|
|
7
8
|
};
|
|
8
9
|
import type { BuilderContextInterface } from "../../../context/types.js";
|
|
9
10
|
import type { BuilderBlock } from "../../../types/builder-block.js";
|
|
10
|
-
import type { PropsWithChildren } from "../../../types/typescript.js";
|
|
11
|
+
import type { Dictionary, PropsWithChildren } from "../../../types/typescript.js";
|
|
11
12
|
declare function InteractiveElement(props: PropsWithChildren<InteractiveElementProps>): React.JSX.Element;
|
|
12
13
|
export default InteractiveElement;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.
|
|
1
|
+
export declare const SDK_VERSION = "0.11.1";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type Target = '
|
|
1
|
+
export type Target = 'vue' | 'reactNative' | 'svelte' | 'qwik' | 'react' | 'solid' | 'rsc';
|
|
@@ -3,10 +3,11 @@ export type InteractiveElementProps = {
|
|
|
3
3
|
Wrapper: any;
|
|
4
4
|
block: BuilderBlock;
|
|
5
5
|
context: BuilderContextInterface;
|
|
6
|
-
wrapperProps:
|
|
6
|
+
wrapperProps: Dictionary<any>;
|
|
7
|
+
includeBlockProps: boolean;
|
|
7
8
|
};
|
|
8
9
|
import type { BuilderContextInterface } from "../../../context/types.js";
|
|
9
10
|
import type { BuilderBlock } from "../../../types/builder-block.js";
|
|
10
|
-
import type { PropsWithChildren } from "../../../types/typescript.js";
|
|
11
|
+
import type { Dictionary, PropsWithChildren } from "../../../types/typescript.js";
|
|
11
12
|
declare function InteractiveElement(props: PropsWithChildren<InteractiveElementProps>): React.JSX.Element;
|
|
12
13
|
export default InteractiveElement;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.
|
|
1
|
+
export declare const SDK_VERSION = "0.11.1";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type Target = '
|
|
1
|
+
export type Target = 'vue' | 'reactNative' | 'svelte' | 'qwik' | 'react' | 'solid' | 'rsc';
|