@builder.io/sdk-react-nextjs 0.12.3 → 0.12.5
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/{USE_CLIENT_BUNDLE-64b6ec10.cjs → USE_CLIENT_BUNDLE-70be4cc5.cjs} +3 -3
- package/lib/{node/USE_CLIENT_BUNDLE-98a4fbf4.js → browser/USE_CLIENT_BUNDLE-7492ecd8.js} +188 -187
- package/lib/{edge/USE_SERVER_BUNDLE-e79e6b55.cjs → browser/USE_SERVER_BUNDLE-875d4629.cjs} +1 -1
- package/lib/{edge/USE_SERVER_BUNDLE-4e9af8f5.js → browser/USE_SERVER_BUNDLE-fe386ed3.js} +1 -1
- package/lib/browser/bundle-bd9886c9.cjs +168 -0
- package/lib/browser/{bundle-f3e8cd29.js → bundle-f9f52242.js} +594 -526
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +14 -14
- package/lib/{node/USE_CLIENT_BUNDLE-990b655a.cjs → edge/USE_CLIENT_BUNDLE-1148158d.cjs} +3 -3
- package/lib/{browser/USE_CLIENT_BUNDLE-e89d3175.js → edge/USE_CLIENT_BUNDLE-cb840c0f.js} +188 -187
- package/lib/{node/USE_SERVER_BUNDLE-b231d861.js → edge/USE_SERVER_BUNDLE-36de460d.js} +1 -1
- package/lib/{node/USE_SERVER_BUNDLE-c86a1fb8.cjs → edge/USE_SERVER_BUNDLE-50c2f18b.cjs} +1 -1
- package/lib/edge/{bundle-d4f509a3.cjs → bundle-71cfdd3e.cjs} +33 -37
- package/lib/edge/{bundle-cb191300.js → bundle-765860e3.js} +1051 -983
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +14 -14
- package/lib/{edge/USE_CLIENT_BUNDLE-2aed408a.cjs → node/USE_CLIENT_BUNDLE-2f43c320.cjs} +3 -3
- package/lib/{edge/USE_CLIENT_BUNDLE-a3258a60.js → node/USE_CLIENT_BUNDLE-4ba4594d.js} +188 -187
- package/lib/{browser/USE_SERVER_BUNDLE-d6bec4ec.js → node/USE_SERVER_BUNDLE-2534ef71.js} +1 -1
- package/lib/{browser/USE_SERVER_BUNDLE-f34c0814.cjs → node/USE_SERVER_BUNDLE-473d50ad.cjs} +1 -1
- package/lib/node/{bundle-b2d68b60.cjs → bundle-1c54df65.cjs} +7 -11
- package/lib/node/{bundle-11daeaca.js → bundle-305bb463.js} +361 -293
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +14 -14
- package/package.json +1 -1
- package/types/cjs/blocks/button/button.types.d.ts +2 -1
- package/types/cjs/blocks/columns/columns.types.d.ts +3 -3
- package/types/cjs/blocks/symbol/symbol.types.d.ts +2 -2
- package/types/cjs/components/block/block.d.ts +1 -0
- package/types/cjs/components/block/components/block-wrapper.d.ts +1 -0
- package/types/cjs/components/block/components/component-ref/component-ref.helpers.d.ts +8 -1
- package/types/cjs/components/block/components/repeated-block.d.ts +3 -5
- package/types/cjs/components/blocks/blocks.types.d.ts +1 -0
- package/types/cjs/components/content-variants/content-variants.types.d.ts +6 -2
- package/types/cjs/constants/sdk-version.d.ts +1 -1
- package/types/cjs/functions/evaluate/should-force-browser-runtime-in-node.d.ts +1 -0
- package/types/cjs/functions/get-block-properties.d.ts +5 -1
- package/types/cjs/functions/get-class-prop-name.d.ts +1 -0
- package/types/cjs/functions/get-style.d.ts +12 -0
- package/types/cjs/functions/is-node-runtime.d.ts +4 -0
- package/types/cjs/functions/transform-block-properties.d.ts +7 -5
- package/types/cjs/functions/transform-style-property.d.ts +7 -0
- package/types/cjs/types/builder-block.d.ts +1 -0
- package/types/cjs/types/builder-props.d.ts +3 -0
- package/types/esm/blocks/button/button.types.d.ts +2 -1
- package/types/esm/blocks/columns/columns.types.d.ts +3 -3
- package/types/esm/blocks/symbol/symbol.types.d.ts +2 -2
- package/types/esm/components/block/block.d.ts +1 -0
- package/types/esm/components/block/components/block-wrapper.d.ts +1 -0
- package/types/esm/components/block/components/component-ref/component-ref.helpers.d.ts +8 -1
- package/types/esm/components/block/components/repeated-block.d.ts +3 -5
- package/types/esm/components/blocks/blocks.types.d.ts +1 -0
- package/types/esm/components/content-variants/content-variants.types.d.ts +6 -2
- package/types/esm/constants/sdk-version.d.ts +1 -1
- package/types/esm/functions/evaluate/should-force-browser-runtime-in-node.d.ts +1 -0
- package/types/esm/functions/get-block-properties.d.ts +5 -1
- package/types/esm/functions/get-class-prop-name.d.ts +1 -0
- package/types/esm/functions/get-style.d.ts +12 -0
- package/types/esm/functions/is-node-runtime.d.ts +4 -0
- package/types/esm/functions/transform-block-properties.d.ts +7 -5
- package/types/esm/functions/transform-style-property.d.ts +7 -0
- package/types/esm/types/builder-block.d.ts +1 -0
- package/types/esm/types/builder-props.d.ts +3 -0
- package/lib/browser/bundle-50ff23eb.cjs +0 -172
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-1c54df65.cjs"),t=require("./USE_CLIENT_BUNDLE-2f43c320.cjs");require("lru-cache");require("react/jsx-runtime");require("react");require("next/navigation");require("./USE_SERVER_BUNDLE-473d50ad.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,
|
|
2
|
-
import { b as v, F as w, c as A, S as T, V } from "./USE_CLIENT_BUNDLE-
|
|
1
|
+
import { B as i, w as m, C as c, R as g, v as p, S as l, T as C, z as d, p as B, H as S, A as f, q as u, D as E, F as R, E as h, c as x, j as k, x as y, y as F, G as P } from "./bundle-305bb463.js";
|
|
2
|
+
import { b as v, F as w, c as A, S as T, V } from "./USE_CLIENT_BUNDLE-4ba4594d.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-2534ef71.js";
|
|
8
8
|
export {
|
|
9
9
|
i as Blocks,
|
|
10
10
|
v as Button,
|
|
@@ -19,16 +19,16 @@ export {
|
|
|
19
19
|
C as Text,
|
|
20
20
|
V as Video,
|
|
21
21
|
d as _processContentResult,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
22
|
+
B as createRegisterComponentMessage,
|
|
23
|
+
S as fetchBuilderProps,
|
|
24
|
+
f as fetchEntries,
|
|
25
|
+
u as fetchOneEntry,
|
|
26
|
+
E as getAllContent,
|
|
27
|
+
R as getBuilderSearchParams,
|
|
28
|
+
h as getContent,
|
|
29
29
|
x as isEditing,
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
k as isPreviewing,
|
|
31
|
+
y as register,
|
|
32
|
+
F as setEditorSettings,
|
|
33
|
+
P as track
|
|
34
34
|
};
|
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.12.
|
|
4
|
+
"version": "0.12.5",
|
|
5
5
|
"homepage": "https://github.com/BuilderIO/builder/tree/main/packages/sdks/output/nextjs",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { BuilderBlock } from '../../types/builder-block.js';
|
|
2
|
-
import type { BuilderComponentsProp } from '../../types/builder-props.js';
|
|
2
|
+
import type { BuilderComponentsProp, BuilderLinkComponentProp } from '../../types/builder-props.js';
|
|
3
3
|
type Column = {
|
|
4
4
|
blocks: BuilderBlock[];
|
|
5
5
|
width?: number;
|
|
6
|
+
link?: string;
|
|
6
7
|
};
|
|
7
8
|
type StackColumnsAt = 'tablet' | 'mobile' | 'never';
|
|
8
|
-
export interface ColumnProps extends BuilderComponentsProp {
|
|
9
|
+
export interface ColumnProps extends BuilderComponentsProp, BuilderLinkComponentProp {
|
|
9
10
|
columns?: Column[];
|
|
10
|
-
builderBlock: BuilderBlock;
|
|
11
11
|
space?: number;
|
|
12
12
|
stackColumnsAt?: StackColumnsAt;
|
|
13
13
|
reverseColumnsWhenStacked?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { BuilderContent } from '../../types/builder-content.js';
|
|
2
|
-
import type { BuilderComponentsProp } from '../../types/builder-props.js';
|
|
2
|
+
import type { BuilderComponentsProp, BuilderLinkComponentProp } from '../../types/builder-props.js';
|
|
3
3
|
interface SymbolInfo {
|
|
4
4
|
model?: string;
|
|
5
5
|
entry?: string;
|
|
@@ -8,7 +8,7 @@ interface SymbolInfo {
|
|
|
8
8
|
inline?: boolean;
|
|
9
9
|
dynamic?: boolean;
|
|
10
10
|
}
|
|
11
|
-
export interface SymbolProps extends BuilderComponentsProp {
|
|
11
|
+
export interface SymbolProps extends BuilderComponentsProp, BuilderLinkComponentProp {
|
|
12
12
|
symbol?: SymbolInfo;
|
|
13
13
|
dataOnly?: boolean;
|
|
14
14
|
dynamic?: boolean;
|
|
@@ -3,6 +3,7 @@ export type BlockProps = {
|
|
|
3
3
|
block: BuilderBlock;
|
|
4
4
|
context: BuilderContextInterface;
|
|
5
5
|
registeredComponents: RegisteredComponents;
|
|
6
|
+
linkComponent: any;
|
|
6
7
|
};
|
|
7
8
|
import type { BuilderContextInterface, RegisteredComponents } from "../../context/types.js";
|
|
8
9
|
import type { BuilderBlock } from "../../types/builder-block.js";
|
|
@@ -14,6 +14,7 @@ export interface ComponentProps {
|
|
|
14
14
|
blockChildren: BuilderBlock[];
|
|
15
15
|
context: BuilderContextInterface;
|
|
16
16
|
registeredComponents: RegisteredComponents;
|
|
17
|
+
linkComponent: any;
|
|
17
18
|
builderBlock: BuilderBlock;
|
|
18
19
|
includeBlockProps: boolean;
|
|
19
20
|
isInteractive: boolean | undefined;
|
|
@@ -21,7 +22,13 @@ export interface ComponentProps {
|
|
|
21
22
|
export declare const getWrapperProps: ({ componentOptions, builderBlock, context, componentRef, includeBlockProps, isInteractive, contextValue }: Omit<ComponentProps, "registeredComponents" | "blockChildren"> & {
|
|
22
23
|
contextValue: BuilderContextInterface;
|
|
23
24
|
}) => InteractiveElementProps | {
|
|
24
|
-
attributes?:
|
|
25
|
+
attributes?: {
|
|
26
|
+
'builder-id': string;
|
|
27
|
+
style: string | Partial<CSSStyleDeclaration>;
|
|
28
|
+
href: any;
|
|
29
|
+
} | {
|
|
30
|
+
[index: string]: any;
|
|
31
|
+
};
|
|
25
32
|
builderBlock: BuilderBlock;
|
|
26
33
|
builderContext: BuilderContextInterface;
|
|
27
34
|
};
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
type Props = {
|
|
3
|
-
block: BuilderBlock;
|
|
2
|
+
type Props = Omit<BlockProps, "context"> & {
|
|
4
3
|
repeatContext: BuilderContextInterface;
|
|
5
|
-
registeredComponents: RegisteredComponents;
|
|
6
4
|
};
|
|
7
|
-
import type { BuilderContextInterface
|
|
8
|
-
import type {
|
|
5
|
+
import type { BuilderContextInterface } from "../../../context/types.js";
|
|
6
|
+
import type { BlockProps } from "../block.js";
|
|
9
7
|
declare function RepeatedBlock(props: Props): React.JSX.Element;
|
|
10
8
|
export default RepeatedBlock;
|
|
@@ -3,4 +3,5 @@ import type { BlocksWrapperProps } from './blocks-wrapper.js';
|
|
|
3
3
|
export type BlocksProps = Partial<Omit<BlocksWrapperProps, 'BlocksWrapper' | 'BlocksWrapperProps'>> & {
|
|
4
4
|
context?: BuilderContextInterface;
|
|
5
5
|
registeredComponents?: RegisteredComponents;
|
|
6
|
+
linkComponent?: any;
|
|
6
7
|
};
|
|
@@ -30,6 +30,10 @@ export interface ContentVariantsPrps {
|
|
|
30
30
|
* An array of custom components to register (optional).
|
|
31
31
|
*/
|
|
32
32
|
customComponents?: RegisteredComponent[];
|
|
33
|
+
/**
|
|
34
|
+
* The component to use for rendering links. Defaults to anchor element `<a>`.
|
|
35
|
+
*/
|
|
36
|
+
linkComponent?: any;
|
|
33
37
|
/**
|
|
34
38
|
* A boolean to enable or disable tracking (optional). Defaults to `true`.
|
|
35
39
|
*/
|
|
@@ -47,7 +51,7 @@ export interface ContentVariantsPrps {
|
|
|
47
51
|
*/
|
|
48
52
|
enrich?: boolean;
|
|
49
53
|
/**
|
|
50
|
-
* The element that wraps your content. Defaults to
|
|
54
|
+
* The element that wraps your content. Defaults to `<div>` ('ScrollView' in React Native).
|
|
51
55
|
*/
|
|
52
56
|
contentWrapper?: any;
|
|
53
57
|
/**
|
|
@@ -55,7 +59,7 @@ export interface ContentVariantsPrps {
|
|
|
55
59
|
*/
|
|
56
60
|
contentWrapperProps?: any;
|
|
57
61
|
/**
|
|
58
|
-
* The element that wraps your blocks. Defaults to
|
|
62
|
+
* The element that wraps your blocks. Defaults to `<div>` ('ScrollView' in React Native).
|
|
59
63
|
*/
|
|
60
64
|
blocksWrapper?: any;
|
|
61
65
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.12.
|
|
1
|
+
export declare const SDK_VERSION = "0.12.5";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const shouldForceBrowserRuntimeInNode: () => boolean;
|
|
@@ -3,4 +3,8 @@ import type { BuilderBlock } from '../types/builder-block.js';
|
|
|
3
3
|
export declare function getBlockProperties({ block, context }: {
|
|
4
4
|
block: BuilderBlock;
|
|
5
5
|
context: BuilderContextInterface;
|
|
6
|
-
}):
|
|
6
|
+
}): {
|
|
7
|
+
'builder-id': string;
|
|
8
|
+
style: string | Partial<CSSStyleDeclaration>;
|
|
9
|
+
href: any;
|
|
10
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getClassPropName: () => "className" | "class";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { BuilderContextInterface } from '../context/types.js';
|
|
2
|
+
import type { BuilderBlock } from '../types/builder-block.js';
|
|
3
|
+
export declare const getStyle: ({ block, context }: {
|
|
4
|
+
block: BuilderBlock;
|
|
5
|
+
context: BuilderContextInterface;
|
|
6
|
+
}) => string | Partial<CSSStyleDeclaration>;
|
|
7
|
+
/**
|
|
8
|
+
* Svelte does not support style attribute as an object so we need to flatten it.
|
|
9
|
+
*
|
|
10
|
+
* Additionally, Svelte, Vue and other frameworks use kebab-case styles, so we need to convert them.
|
|
11
|
+
*/
|
|
12
|
+
export declare function mapStyleObjToStrIfNeeded(style: Partial<CSSStyleDeclaration>): string | Partial<CSSStyleDeclaration>;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import type { BuilderContextInterface } from '../context/types.js';
|
|
2
|
+
import type { BuilderBlock } from '../types/builder-block.js';
|
|
3
|
+
export declare function transformBlockProperties<T>({ properties }: {
|
|
4
|
+
properties: T;
|
|
5
|
+
context: BuilderContextInterface;
|
|
6
|
+
block: BuilderBlock;
|
|
7
|
+
}): T;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { BuilderContextInterface } from '../context/types.js';
|
|
2
|
+
import type { BuilderBlock } from '../types/builder-block.js';
|
|
3
|
+
export declare function transformStyleProperty({ style }: {
|
|
4
|
+
style: Partial<CSSStyleDeclaration>;
|
|
5
|
+
context: BuilderContextInterface;
|
|
6
|
+
block: BuilderBlock;
|
|
7
|
+
}): Partial<CSSStyleDeclaration>;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { BuilderBlock } from '../../types/builder-block.js';
|
|
2
|
-
import type { BuilderComponentsProp } from '../../types/builder-props.js';
|
|
2
|
+
import type { BuilderComponentsProp, BuilderLinkComponentProp } from '../../types/builder-props.js';
|
|
3
3
|
type Column = {
|
|
4
4
|
blocks: BuilderBlock[];
|
|
5
5
|
width?: number;
|
|
6
|
+
link?: string;
|
|
6
7
|
};
|
|
7
8
|
type StackColumnsAt = 'tablet' | 'mobile' | 'never';
|
|
8
|
-
export interface ColumnProps extends BuilderComponentsProp {
|
|
9
|
+
export interface ColumnProps extends BuilderComponentsProp, BuilderLinkComponentProp {
|
|
9
10
|
columns?: Column[];
|
|
10
|
-
builderBlock: BuilderBlock;
|
|
11
11
|
space?: number;
|
|
12
12
|
stackColumnsAt?: StackColumnsAt;
|
|
13
13
|
reverseColumnsWhenStacked?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { BuilderContent } from '../../types/builder-content.js';
|
|
2
|
-
import type { BuilderComponentsProp } from '../../types/builder-props.js';
|
|
2
|
+
import type { BuilderComponentsProp, BuilderLinkComponentProp } from '../../types/builder-props.js';
|
|
3
3
|
interface SymbolInfo {
|
|
4
4
|
model?: string;
|
|
5
5
|
entry?: string;
|
|
@@ -8,7 +8,7 @@ interface SymbolInfo {
|
|
|
8
8
|
inline?: boolean;
|
|
9
9
|
dynamic?: boolean;
|
|
10
10
|
}
|
|
11
|
-
export interface SymbolProps extends BuilderComponentsProp {
|
|
11
|
+
export interface SymbolProps extends BuilderComponentsProp, BuilderLinkComponentProp {
|
|
12
12
|
symbol?: SymbolInfo;
|
|
13
13
|
dataOnly?: boolean;
|
|
14
14
|
dynamic?: boolean;
|
|
@@ -3,6 +3,7 @@ export type BlockProps = {
|
|
|
3
3
|
block: BuilderBlock;
|
|
4
4
|
context: BuilderContextInterface;
|
|
5
5
|
registeredComponents: RegisteredComponents;
|
|
6
|
+
linkComponent: any;
|
|
6
7
|
};
|
|
7
8
|
import type { BuilderContextInterface, RegisteredComponents } from "../../context/types.js";
|
|
8
9
|
import type { BuilderBlock } from "../../types/builder-block.js";
|
|
@@ -14,6 +14,7 @@ export interface ComponentProps {
|
|
|
14
14
|
blockChildren: BuilderBlock[];
|
|
15
15
|
context: BuilderContextInterface;
|
|
16
16
|
registeredComponents: RegisteredComponents;
|
|
17
|
+
linkComponent: any;
|
|
17
18
|
builderBlock: BuilderBlock;
|
|
18
19
|
includeBlockProps: boolean;
|
|
19
20
|
isInteractive: boolean | undefined;
|
|
@@ -21,7 +22,13 @@ export interface ComponentProps {
|
|
|
21
22
|
export declare const getWrapperProps: ({ componentOptions, builderBlock, context, componentRef, includeBlockProps, isInteractive, contextValue }: Omit<ComponentProps, "registeredComponents" | "blockChildren"> & {
|
|
22
23
|
contextValue: BuilderContextInterface;
|
|
23
24
|
}) => InteractiveElementProps | {
|
|
24
|
-
attributes?:
|
|
25
|
+
attributes?: {
|
|
26
|
+
'builder-id': string;
|
|
27
|
+
style: string | Partial<CSSStyleDeclaration>;
|
|
28
|
+
href: any;
|
|
29
|
+
} | {
|
|
30
|
+
[index: string]: any;
|
|
31
|
+
};
|
|
25
32
|
builderBlock: BuilderBlock;
|
|
26
33
|
builderContext: BuilderContextInterface;
|
|
27
34
|
};
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
type Props = {
|
|
3
|
-
block: BuilderBlock;
|
|
2
|
+
type Props = Omit<BlockProps, "context"> & {
|
|
4
3
|
repeatContext: BuilderContextInterface;
|
|
5
|
-
registeredComponents: RegisteredComponents;
|
|
6
4
|
};
|
|
7
|
-
import type { BuilderContextInterface
|
|
8
|
-
import type {
|
|
5
|
+
import type { BuilderContextInterface } from "../../../context/types.js";
|
|
6
|
+
import type { BlockProps } from "../block.js";
|
|
9
7
|
declare function RepeatedBlock(props: Props): React.JSX.Element;
|
|
10
8
|
export default RepeatedBlock;
|
|
@@ -3,4 +3,5 @@ import type { BlocksWrapperProps } from './blocks-wrapper.js';
|
|
|
3
3
|
export type BlocksProps = Partial<Omit<BlocksWrapperProps, 'BlocksWrapper' | 'BlocksWrapperProps'>> & {
|
|
4
4
|
context?: BuilderContextInterface;
|
|
5
5
|
registeredComponents?: RegisteredComponents;
|
|
6
|
+
linkComponent?: any;
|
|
6
7
|
};
|
|
@@ -30,6 +30,10 @@ export interface ContentVariantsPrps {
|
|
|
30
30
|
* An array of custom components to register (optional).
|
|
31
31
|
*/
|
|
32
32
|
customComponents?: RegisteredComponent[];
|
|
33
|
+
/**
|
|
34
|
+
* The component to use for rendering links. Defaults to anchor element `<a>`.
|
|
35
|
+
*/
|
|
36
|
+
linkComponent?: any;
|
|
33
37
|
/**
|
|
34
38
|
* A boolean to enable or disable tracking (optional). Defaults to `true`.
|
|
35
39
|
*/
|
|
@@ -47,7 +51,7 @@ export interface ContentVariantsPrps {
|
|
|
47
51
|
*/
|
|
48
52
|
enrich?: boolean;
|
|
49
53
|
/**
|
|
50
|
-
* The element that wraps your content. Defaults to
|
|
54
|
+
* The element that wraps your content. Defaults to `<div>` ('ScrollView' in React Native).
|
|
51
55
|
*/
|
|
52
56
|
contentWrapper?: any;
|
|
53
57
|
/**
|
|
@@ -55,7 +59,7 @@ export interface ContentVariantsPrps {
|
|
|
55
59
|
*/
|
|
56
60
|
contentWrapperProps?: any;
|
|
57
61
|
/**
|
|
58
|
-
* The element that wraps your blocks. Defaults to
|
|
62
|
+
* The element that wraps your blocks. Defaults to `<div>` ('ScrollView' in React Native).
|
|
59
63
|
*/
|
|
60
64
|
blocksWrapper?: any;
|
|
61
65
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.12.
|
|
1
|
+
export declare const SDK_VERSION = "0.12.5";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const shouldForceBrowserRuntimeInNode: () => boolean;
|
|
@@ -3,4 +3,8 @@ import type { BuilderBlock } from '../types/builder-block.js';
|
|
|
3
3
|
export declare function getBlockProperties({ block, context }: {
|
|
4
4
|
block: BuilderBlock;
|
|
5
5
|
context: BuilderContextInterface;
|
|
6
|
-
}):
|
|
6
|
+
}): {
|
|
7
|
+
'builder-id': string;
|
|
8
|
+
style: string | Partial<CSSStyleDeclaration>;
|
|
9
|
+
href: any;
|
|
10
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getClassPropName: () => "className" | "class";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { BuilderContextInterface } from '../context/types.js';
|
|
2
|
+
import type { BuilderBlock } from '../types/builder-block.js';
|
|
3
|
+
export declare const getStyle: ({ block, context }: {
|
|
4
|
+
block: BuilderBlock;
|
|
5
|
+
context: BuilderContextInterface;
|
|
6
|
+
}) => string | Partial<CSSStyleDeclaration>;
|
|
7
|
+
/**
|
|
8
|
+
* Svelte does not support style attribute as an object so we need to flatten it.
|
|
9
|
+
*
|
|
10
|
+
* Additionally, Svelte, Vue and other frameworks use kebab-case styles, so we need to convert them.
|
|
11
|
+
*/
|
|
12
|
+
export declare function mapStyleObjToStrIfNeeded(style: Partial<CSSStyleDeclaration>): string | Partial<CSSStyleDeclaration>;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import type { BuilderContextInterface } from '../context/types.js';
|
|
2
|
+
import type { BuilderBlock } from '../types/builder-block.js';
|
|
3
|
+
export declare function transformBlockProperties<T>({ properties }: {
|
|
4
|
+
properties: T;
|
|
5
|
+
context: BuilderContextInterface;
|
|
6
|
+
block: BuilderBlock;
|
|
7
|
+
}): T;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { BuilderContextInterface } from '../context/types.js';
|
|
2
|
+
import type { BuilderBlock } from '../types/builder-block.js';
|
|
3
|
+
export declare function transformStyleProperty({ style }: {
|
|
4
|
+
style: Partial<CSSStyleDeclaration>;
|
|
5
|
+
context: BuilderContextInterface;
|
|
6
|
+
block: BuilderBlock;
|
|
7
|
+
}): Partial<CSSStyleDeclaration>;
|