@builder.io/sdk-react 1.0.19 → 1.0.20
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/blocks-exports.cjs +2 -2
- package/lib/browser/blocks-exports.mjs +2 -2
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +1 -1
- package/lib/browser/{server-entry-cfff49d1.js → server-entry-a562cf23.js} +1 -1
- package/lib/browser/{server-entry-1a86f409.cjs → server-entry-a77461d4.cjs} +1 -1
- package/lib/browser/server-entry.cjs +1 -1
- package/lib/browser/server-entry.mjs +1 -1
- package/lib/edge/{blocks-5341123d.cjs → blocks-523eb4f1.cjs} +1 -1
- package/lib/edge/{blocks-1ea14427.js → blocks-683aad9f.js} +2 -2
- package/lib/edge/blocks-exports.cjs +1 -1
- package/lib/edge/blocks-exports.mjs +2 -2
- package/lib/edge/{button-c6255c8e.cjs → button-0d418bcf.cjs} +1 -1
- package/lib/edge/{button-f5764a4c.js → button-9f6acf3e.js} +2 -2
- package/lib/edge/{columns-01e0bb50.cjs → columns-1613d62d.cjs} +1 -1
- package/lib/edge/{columns-17090869.js → columns-b0785992.js} +3 -3
- package/lib/edge/{content-variants-bfca78f9.js → content-variants-13f821c6.js} +8 -8
- package/lib/edge/{content-variants-3961c4ee.cjs → content-variants-281298f6.cjs} +1 -1
- package/lib/edge/{form-b97fba27.cjs → form-0483aa64.cjs} +1 -1
- package/lib/edge/{form-39e97f30.js → form-db27fc26.js} +3 -3
- package/lib/edge/{get-class-prop-name-859a7f60.js → get-class-prop-name-6bfc4756.js} +1 -1
- package/lib/edge/{get-class-prop-name-f1301669.cjs → get-class-prop-name-e3ba0522.cjs} +1 -1
- package/lib/edge/{img-b4ff1bef.js → img-43a8ffe0.js} +1 -1
- package/lib/edge/{img-0c1e53c0.cjs → img-f01d904d.cjs} +1 -1
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +1 -1
- package/lib/edge/{input-c6fee09c.js → input-805a9ac6.js} +1 -1
- package/lib/edge/{input-2103da14.cjs → input-e6483bd7.cjs} +1 -1
- package/lib/edge/select-4966723f.js +20 -0
- package/lib/edge/select-e5d1e627.cjs +1 -0
- package/lib/edge/{server-entry-00891f33.cjs → server-entry-83648311.cjs} +1 -1
- package/lib/edge/{server-entry-d46a218d.js → server-entry-c13e82bd.js} +1 -1
- package/lib/edge/server-entry.cjs +1 -1
- package/lib/edge/server-entry.mjs +1 -1
- package/lib/edge/{slot-c9f94715.js → slot-1b0351de.js} +3 -3
- package/lib/edge/{slot-8de7d746.cjs → slot-3ef77ae1.cjs} +1 -1
- package/lib/edge/{symbol-636383eb.cjs → symbol-883d624f.cjs} +1 -1
- package/lib/edge/{symbol-324dadc8.js → symbol-f1632f93.js} +2 -2
- package/lib/node/blocks-exports.cjs +2 -2
- package/lib/node/blocks-exports.mjs +2 -2
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +1 -1
- package/lib/node/{server-entry-8c84ddbd.js → server-entry-8c712c9b.js} +1 -1
- package/lib/node/{server-entry-ff6fc2b4.cjs → server-entry-bedf45f8.cjs} +1 -1
- package/lib/node/server-entry.cjs +1 -1
- package/lib/node/server-entry.mjs +1 -1
- package/package.json +1 -1
- package/types/blocks/button/button.d.ts +1 -1
- package/types/blocks/button/button.types.d.ts +1 -1
- package/types/blocks/button/component-info.d.ts +1 -1
- package/types/blocks/columns/columns.d.ts +1 -1
- package/types/blocks/columns/columns.types.d.ts +2 -2
- package/types/blocks/columns/component-info.d.ts +1 -1
- package/types/blocks/custom-code/component-info.d.ts +1 -1
- package/types/blocks/embed/component-info.d.ts +1 -1
- package/types/blocks/form/form/component-info.d.ts +1 -1
- package/types/blocks/form/form/form.d.ts +2 -2
- package/types/blocks/form/input/component-info.d.ts +1 -1
- package/types/blocks/form/select/component-info.d.ts +1 -1
- package/types/blocks/form/submit-button/component-info.d.ts +1 -1
- package/types/blocks/fragment/component-info.d.ts +1 -1
- package/types/blocks/fragment/fragment.d.ts +1 -1
- package/types/blocks/image/component-info.d.ts +1 -1
- package/types/blocks/image/image.d.ts +1 -1
- package/types/blocks/image/image.types.d.ts +1 -1
- package/types/blocks/img/component-info.d.ts +1 -1
- package/types/blocks/raw-text/component-info.d.ts +1 -1
- package/types/blocks/section/component-info.d.ts +1 -1
- package/types/blocks/section/section.d.ts +1 -1
- package/types/blocks/slot/component-info.d.ts +1 -1
- package/types/blocks/slot/slot.d.ts +1 -1
- package/types/blocks/symbol/component-info.d.ts +1 -1
- package/types/blocks/symbol/symbol.d.ts +1 -1
- package/types/blocks/symbol/symbol.helpers.d.ts +2 -2
- package/types/blocks/symbol/symbol.types.d.ts +2 -2
- package/types/blocks/text/component-info.d.ts +1 -1
- package/types/blocks/text/text.d.ts +1 -1
- package/types/blocks/textarea/component-info.d.ts +1 -1
- package/types/blocks/video/component-info.d.ts +1 -1
- package/types/blocks/video/video.d.ts +1 -1
- package/types/blocks/video/video.types.d.ts +1 -1
- package/types/components/block/animator.d.ts +1 -1
- package/types/components/block/block.d.ts +2 -2
- package/types/components/block/block.helpers.d.ts +4 -4
- package/types/components/block/components/block-styles.d.ts +2 -2
- package/types/components/block/components/block-wrapper.d.ts +2 -2
- package/types/components/block/components/component-ref/component-ref.d.ts +1 -1
- package/types/components/block/components/component-ref/component-ref.helpers.d.ts +3 -3
- package/types/components/block/components/interactive-element.d.ts +3 -3
- package/types/components/block/components/repeated-block.d.ts +1 -1
- package/types/components/block/types.d.ts +2 -2
- package/types/components/blocks/blocks-wrapper.d.ts +1 -1
- package/types/components/blocks/blocks.d.ts +1 -1
- package/types/components/blocks/blocks.types.d.ts +1 -1
- package/types/components/content/components/enable-editor.d.ts +2 -2
- package/types/components/content/components/styles.d.ts +1 -1
- package/types/components/content/content.d.ts +1 -1
- package/types/components/content/content.helpers.d.ts +3 -3
- package/types/components/content/content.types.d.ts +2 -2
- package/types/components/content/contentProps.types.d.ts +2 -2
- package/types/components/content-variants/content-variants.d.ts +1 -1
- package/types/components/content-variants/content-variants.types.d.ts +4 -4
- package/types/components/content-variants/helpers.d.ts +5 -5
- package/types/constants/builder-registered-components.d.ts +1 -1
- package/types/constants/extra-components.d.ts +1 -1
- package/types/constants/sdk-version.d.ts +1 -1
- package/types/context/index.d.ts +1 -1
- package/types/context/types.d.ts +4 -4
- package/types/functions/evaluate/browser-runtime/browser.d.ts +2 -2
- package/types/functions/evaluate/browser-runtime/index.d.ts +1 -1
- package/types/functions/evaluate/choose-eval.d.ts +1 -1
- package/types/functions/evaluate/edge-runtime/edge-runtime.d.ts +1 -1
- package/types/functions/evaluate/edge-runtime/index.d.ts +1 -1
- package/types/functions/evaluate/evaluate.d.ts +1 -1
- package/types/functions/evaluate/helpers.d.ts +3 -3
- package/types/functions/evaluate/index.d.ts +1 -1
- package/types/functions/evaluate/node-runtime/index.d.ts +1 -1
- package/types/functions/evaluate/node-runtime/node-runtime.d.ts +1 -1
- package/types/functions/evaluate/placeholder-runtime.d.ts +1 -1
- package/types/functions/fetch-builder-props.d.ts +3 -3
- package/types/functions/get-block-actions-handler.d.ts +2 -2
- package/types/functions/get-block-actions.d.ts +2 -2
- package/types/functions/get-block-component-options.d.ts +1 -1
- package/types/functions/get-block-properties.d.ts +2 -2
- package/types/functions/get-builder-search-params/index.d.ts +1 -1
- package/types/functions/get-content/generate-content-url.d.ts +1 -1
- package/types/functions/get-content/index.d.ts +2 -2
- package/types/functions/get-processed-block.d.ts +2 -2
- package/types/functions/get-style.d.ts +2 -2
- package/types/functions/is-editing.d.ts +1 -1
- package/types/functions/is-previewing.d.ts +1 -1
- package/types/functions/register-component.d.ts +1 -1
- package/types/functions/register.d.ts +2 -2
- package/types/functions/track/index.d.ts +2 -2
- package/types/functions/transform-block-properties.d.ts +2 -2
- package/types/functions/transform-block.d.ts +1 -1
- package/types/functions/transform-style-property.d.ts +2 -2
- package/types/helpers/ab-tests.d.ts +3 -3
- package/types/helpers/cookie.d.ts +1 -1
- package/types/helpers/localStorage.d.ts +2 -2
- package/types/helpers/preview-lru-cache/get.d.ts +1 -1
- package/types/helpers/preview-lru-cache/set.d.ts +1 -1
- package/types/helpers/sessionId.d.ts +1 -1
- package/types/helpers/subscribe-to-editor.d.ts +3 -3
- package/types/helpers/visitorId.d.ts +1 -1
- package/types/index-helpers/blocks-exports.d.ts +11 -11
- package/types/index.d.ts +3 -3
- package/types/server-index.d.ts +27 -27
- package/types/types/builder-content.d.ts +3 -3
- package/types/types/builder-props.d.ts +2 -2
- package/types/types/components.d.ts +2 -2
- package/types/types/enforced-partials.d.ts +1 -1
- package/lib/edge/select-b8ad0a4c.cjs +0 -1
- package/lib/edge/select-f260d051.js +0 -20
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type { BuilderContextInterface, RegisteredComponents } from '../../context/types
|
|
2
|
-
import type { BuilderBlock } from '../../types/builder-block
|
|
3
|
-
import type { RepeatData } from './types
|
|
1
|
+
import type { BuilderContextInterface, RegisteredComponents } from '../../context/types';
|
|
2
|
+
import type { BuilderBlock } from '../../types/builder-block';
|
|
3
|
+
import type { RepeatData } from './types';
|
|
4
4
|
export declare const getComponent: ({ block, context, registeredComponents }: {
|
|
5
5
|
block: BuilderBlock;
|
|
6
6
|
context: BuilderContextInterface;
|
|
7
7
|
registeredComponents: RegisteredComponents;
|
|
8
|
-
}) => import("../../context/types
|
|
8
|
+
}) => import("../../context/types").RegisteredComponent;
|
|
9
9
|
export declare const getRepeatItemData: ({ block, context }: {
|
|
10
10
|
block: BuilderBlock;
|
|
11
11
|
context: BuilderContextInterface;
|
|
@@ -3,7 +3,7 @@ export type BlockStylesProps = {
|
|
|
3
3
|
block: BuilderBlock;
|
|
4
4
|
context: BuilderContextInterface;
|
|
5
5
|
};
|
|
6
|
-
import type { BuilderContextInterface } from "../../../context/types
|
|
7
|
-
import type { BuilderBlock } from "../../../types/builder-block
|
|
6
|
+
import type { BuilderContextInterface } from "../../../context/types";
|
|
7
|
+
import type { BuilderBlock } from "../../../types/builder-block";
|
|
8
8
|
declare function BlockStyles(props: BlockStylesProps): React.JSX.Element;
|
|
9
9
|
export default BlockStyles;
|
|
@@ -9,7 +9,7 @@ type BlockWrapperProps = {
|
|
|
9
9
|
/**
|
|
10
10
|
* This component renders a block's wrapper HTML element (from the block's `tagName` property).
|
|
11
11
|
*/
|
|
12
|
-
import type { BuilderContextInterface } from "../../../context/types
|
|
13
|
-
import type { BuilderBlock } from "../../../types/builder-block
|
|
12
|
+
import type { BuilderContextInterface } from "../../../context/types";
|
|
13
|
+
import type { BuilderBlock } from "../../../types/builder-block";
|
|
14
14
|
declare function BlockWrapper(props: BlockWrapperProps): React.JSX.Element;
|
|
15
15
|
export default BlockWrapper;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { BuilderContextInterface, RegisteredComponents } from '../../../../context/types
|
|
2
|
-
import type { BuilderBlock } from '../../../../types/builder-block
|
|
3
|
-
import type { BuilderDataProps } from '../../../../types/builder-props
|
|
1
|
+
import type { BuilderContextInterface, RegisteredComponents } from '../../../../context/types';
|
|
2
|
+
import type { BuilderBlock } from '../../../../types/builder-block';
|
|
3
|
+
import type { BuilderDataProps } from '../../../../types/builder-props';
|
|
4
4
|
import type { InteractiveElementProps } from '../interactive-element';
|
|
5
5
|
type ComponentOptions = BuilderDataProps & {
|
|
6
6
|
[index: string]: any;
|
|
@@ -7,8 +7,8 @@ export type InteractiveElementProps = {
|
|
|
7
7
|
includeBlockProps: boolean;
|
|
8
8
|
children?: any;
|
|
9
9
|
};
|
|
10
|
-
import type { BuilderContextInterface } from "../../../context/types
|
|
11
|
-
import type { BuilderBlock } from "../../../types/builder-block
|
|
12
|
-
import type { Dictionary } from "../../../types/typescript
|
|
10
|
+
import type { BuilderContextInterface } from "../../../context/types";
|
|
11
|
+
import type { BuilderBlock } from "../../../types/builder-block";
|
|
12
|
+
import type { Dictionary } from "../../../types/typescript";
|
|
13
13
|
declare function InteractiveElement(props: InteractiveElementProps): React.JSX.Element;
|
|
14
14
|
export default InteractiveElement;
|
|
@@ -2,7 +2,7 @@ import * as React from "react";
|
|
|
2
2
|
type Props = Omit<BlockProps, "context"> & {
|
|
3
3
|
repeatContext: BuilderContextInterface;
|
|
4
4
|
};
|
|
5
|
-
import type { BuilderContextInterface } from "../../../context/types
|
|
5
|
+
import type { BuilderContextInterface } from "../../../context/types";
|
|
6
6
|
import type { BlockProps } from "../block";
|
|
7
7
|
declare function RepeatedBlock(props: Props): React.JSX.Element;
|
|
8
8
|
export default RepeatedBlock;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { BuilderContextInterface } from '../../context/types
|
|
2
|
-
import type { BuilderBlock } from '../../types/builder-block
|
|
1
|
+
import type { BuilderContextInterface } from '../../context/types';
|
|
2
|
+
import type { BuilderBlock } from '../../types/builder-block';
|
|
3
3
|
export interface RepeatData {
|
|
4
4
|
block: BuilderBlock;
|
|
5
5
|
context: BuilderContextInterface;
|
|
@@ -14,6 +14,6 @@ export type BlocksWrapperProps = {
|
|
|
14
14
|
BlocksWrapperProps: any;
|
|
15
15
|
children?: any;
|
|
16
16
|
};
|
|
17
|
-
import type { BuilderBlock } from "../../types/builder-block
|
|
17
|
+
import type { BuilderBlock } from "../../types/builder-block";
|
|
18
18
|
declare function BlocksWrapper(props: BlocksWrapperProps): React.JSX.Element;
|
|
19
19
|
export default BlocksWrapper;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BuilderContextInterface, RegisteredComponents } from '../../context/types
|
|
1
|
+
import type { BuilderContextInterface, RegisteredComponents } from '../../context/types';
|
|
2
2
|
import type { BlocksWrapperProps } from './blocks-wrapper';
|
|
3
3
|
export type BlocksProps = Partial<Omit<BlocksWrapperProps, 'BlocksWrapper' | 'BlocksWrapperProps'>> & {
|
|
4
4
|
context?: BuilderContextInterface;
|
|
@@ -4,7 +4,7 @@ type BuilderEditorProps = Omit<ContentProps, "customComponents" | "apiVersion" |
|
|
|
4
4
|
setBuilderContextSignal?: (signal: any) => any;
|
|
5
5
|
children?: any;
|
|
6
6
|
};
|
|
7
|
-
import type { BuilderContextInterface } from "../../../context/types
|
|
8
|
-
import type { ContentProps } from "../content.types
|
|
7
|
+
import type { BuilderContextInterface } from "../../../context/types";
|
|
8
|
+
import type { ContentProps } from "../content.types";
|
|
9
9
|
declare function EnableEditor(props: BuilderEditorProps): React.JSX.Element;
|
|
10
10
|
export default EnableEditor;
|
|
@@ -5,6 +5,6 @@ interface Props {
|
|
|
5
5
|
contentId?: string;
|
|
6
6
|
isNestedRender?: boolean;
|
|
7
7
|
}
|
|
8
|
-
import type { CustomFont } from "./styles.helpers
|
|
8
|
+
import type { CustomFont } from "./styles.helpers";
|
|
9
9
|
declare function ContentStyles(props: Props): React.JSX.Element;
|
|
10
10
|
export default ContentStyles;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { BuilderContent } from '../../types/builder-content
|
|
2
|
-
import type { Nullable } from '../../types/typescript
|
|
3
|
-
import type { ContentProps } from './content.types
|
|
1
|
+
import type { BuilderContent } from '../../types/builder-content';
|
|
2
|
+
import type { Nullable } from '../../types/typescript';
|
|
3
|
+
import type { ContentProps } from './content.types';
|
|
4
4
|
export declare const getRootStateInitialValue: ({ content, data, locale }: Pick<ContentProps, 'content' | 'data' | 'locale'>) => {
|
|
5
5
|
locale?: string;
|
|
6
6
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { BuilderRenderState } from '../../context/types
|
|
2
|
-
export type { ContentProps } from './contentProps.types
|
|
1
|
+
import type { BuilderRenderState } from '../../context/types';
|
|
2
|
+
export type { ContentProps } from './contentProps.types';
|
|
3
3
|
export interface BuilderComponentStateChange {
|
|
4
4
|
state: BuilderRenderState;
|
|
5
5
|
ref: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { EnforcePartials } from '../../types/enforced-partials
|
|
2
|
-
import type { ContentVariantsPrps } from '../content-variants/content-variants.types
|
|
1
|
+
import type { EnforcePartials } from '../../types/enforced-partials';
|
|
2
|
+
import type { ContentVariantsPrps } from '../content-variants/content-variants.types';
|
|
3
3
|
interface InternalRenderProps {
|
|
4
4
|
showContent: boolean;
|
|
5
5
|
isSsrAbTest: boolean;
|
|
@@ -5,6 +5,6 @@ type VariantsProviderProps = ContentVariantsPrps & {
|
|
|
5
5
|
*/
|
|
6
6
|
isNestedRender?: boolean;
|
|
7
7
|
};
|
|
8
|
-
import type { ContentVariantsPrps } from "./content-variants.types
|
|
8
|
+
import type { ContentVariantsPrps } from "./content-variants.types";
|
|
9
9
|
declare function ContentVariants(props: VariantsProviderProps): React.JSX.Element;
|
|
10
10
|
export default ContentVariants;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { BuilderRenderContext, RegisteredComponent } from '../../context/types
|
|
2
|
-
import type { ApiVersion } from '../../types/api-version
|
|
3
|
-
import type { BuilderContent } from '../../types/builder-content
|
|
4
|
-
import type { Nullable } from '../../types/typescript
|
|
1
|
+
import type { BuilderRenderContext, RegisteredComponent } from '../../context/types';
|
|
2
|
+
import type { ApiVersion } from '../../types/api-version';
|
|
3
|
+
import type { BuilderContent } from '../../types/builder-content';
|
|
4
|
+
import type { Nullable } from '../../types/typescript';
|
|
5
5
|
export interface ContentVariantsPrps {
|
|
6
6
|
/**
|
|
7
7
|
* The Builder content JSON to render (required).
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import type { Nullable } from '../../helpers/nullable
|
|
2
|
-
import type { BuilderContent } from '../../types/builder-content
|
|
1
|
+
import type { Nullable } from '../../helpers/nullable';
|
|
2
|
+
import type { BuilderContent } from '../../types/builder-content';
|
|
3
3
|
export declare const getVariants: (content: Nullable<BuilderContent>) => {
|
|
4
4
|
testVariationId: string;
|
|
5
5
|
id: string;
|
|
6
6
|
data?: {
|
|
7
7
|
[key: string]: any;
|
|
8
8
|
title?: string;
|
|
9
|
-
blocks?: import("
|
|
10
|
-
inputs?: import("../../types/input
|
|
9
|
+
blocks?: import("../..").BuilderBlock[];
|
|
10
|
+
inputs?: import("../../types/input").Input[];
|
|
11
11
|
state?: {
|
|
12
12
|
[key: string]: any;
|
|
13
13
|
};
|
|
@@ -21,7 +21,7 @@ export declare const getVariants: (content: Nullable<BuilderContent>) => {
|
|
|
21
21
|
testRatio?: number;
|
|
22
22
|
meta?: {
|
|
23
23
|
[key: string]: any;
|
|
24
|
-
breakpoints?: import("../../types/builder-content
|
|
24
|
+
breakpoints?: import("../../types/builder-content").Breakpoints;
|
|
25
25
|
};
|
|
26
26
|
}[];
|
|
27
27
|
export declare const checkShouldRenderVariants: ({ canTrack, content }: {
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* Having them in a separate file allows us to override it to be empty in the
|
|
4
4
|
* React Native SDK.
|
|
5
5
|
*/
|
|
6
|
-
import type { RegisteredComponent } from '../context/types
|
|
6
|
+
import type { RegisteredComponent } from '../context/types';
|
|
7
7
|
export declare const getExtraComponents: () => RegisteredComponent[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.0.
|
|
1
|
+
export declare const SDK_VERSION = "1.0.20";
|
package/types/context/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as BuilderContext } from './builder.context
|
|
1
|
+
export { default as BuilderContext } from './builder.context';
|
package/types/context/types.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { BlocksWrapperProps } from '../components/blocks/blocks-wrapper';
|
|
2
|
-
import type { ApiVersion } from '../types/api-version
|
|
3
|
-
import type { BuilderContent } from '../types/builder-content
|
|
4
|
-
import type { ComponentInfo } from '../types/components
|
|
5
|
-
import type { Dictionary, Nullable } from '../types/typescript
|
|
2
|
+
import type { ApiVersion } from '../types/api-version';
|
|
3
|
+
import type { BuilderContent } from '../types/builder-content';
|
|
4
|
+
import type { ComponentInfo } from '../types/components';
|
|
5
|
+
import type { Dictionary, Nullable } from '../types/typescript';
|
|
6
6
|
export type RegisteredComponent = ComponentInfo & {
|
|
7
7
|
component: any;
|
|
8
8
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { BuilderRenderState } from '../../../context/types
|
|
2
|
-
import type { ExecutorArgs } from '../helpers
|
|
1
|
+
import type { BuilderRenderState } from '../../../context/types';
|
|
2
|
+
import type { ExecutorArgs } from '../helpers';
|
|
3
3
|
export declare const runInBrowser: ({ code, builder, context, event, localState, rootSetState, rootState }: ExecutorArgs) => any;
|
|
4
4
|
export declare function flattenState({ rootState, localState, rootSetState }: {
|
|
5
5
|
rootState: Record<string | symbol, any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { runInBrowser as evaluator } from './browser
|
|
1
|
+
export { runInBrowser as evaluator } from './browser';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ExecutorArgs } from './helpers
|
|
1
|
+
import type { ExecutorArgs } from './helpers';
|
|
2
2
|
/**
|
|
3
3
|
* Even though we have separate runtimes for browser/node/edge, sometimes frameworks will
|
|
4
4
|
* end up sending the server runtime code to the browser (most notably in dev mode).
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { ExecutorArgs } from '../helpers
|
|
1
|
+
import type { ExecutorArgs } from '../helpers';
|
|
2
2
|
export declare const runInEdge: ({ builder, context, event, rootState, localState, rootSetState, code }: ExecutorArgs) => any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { runInEdge as evaluator } from './edge-runtime
|
|
1
|
+
export { runInEdge as evaluator } from './edge-runtime';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { EvaluatorArgs } from './helpers
|
|
1
|
+
import type { EvaluatorArgs } from './helpers';
|
|
2
2
|
type EvalValue = unknown;
|
|
3
3
|
export declare function evaluate({ code, context, localState, rootState, rootSetState, event, isExpression, enableCache }: EvaluatorArgs): EvalValue;
|
|
4
4
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { BuilderContextInterface, BuilderRenderState } from '../../context/types
|
|
2
|
-
import { getUserAttributes } from '../track/helpers
|
|
1
|
+
import type { BuilderContextInterface, BuilderRenderState } from '../../context/types';
|
|
2
|
+
import { getUserAttributes } from '../track/helpers';
|
|
3
3
|
export type EvaluatorArgs = Omit<ExecutorArgs, 'builder' | 'event'> & {
|
|
4
4
|
event?: Event;
|
|
5
5
|
isExpression?: boolean;
|
|
@@ -20,6 +20,6 @@ export type Executor = (args: ExecutorArgs) => any;
|
|
|
20
20
|
export type FunctionArguments = ReturnType<typeof getFunctionArguments>;
|
|
21
21
|
export declare const getFunctionArguments: ({ builder, context, event, state }: Pick<ExecutorArgs, "context" | "builder" | "event"> & {
|
|
22
22
|
state: BuilderRenderState;
|
|
23
|
-
}) => [string, Event | BuilderRenderState | import("../../context/types
|
|
23
|
+
}) => [string, Event | BuilderRenderState | import("../../context/types").BuilderRenderContext | BuilderGlobals][];
|
|
24
24
|
export declare const getBuilderGlobals: () => BuilderGlobals;
|
|
25
25
|
export declare const parseCode: (code: string, { isExpression }: Pick<EvaluatorArgs, 'isExpression'>) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { evaluate } from './evaluate
|
|
1
|
+
export { evaluate } from './evaluate';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { runInNode as evaluator } from './node-runtime
|
|
1
|
+
export { runInNode as evaluator } from './node-runtime';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { ExecutorArgs } from '../helpers
|
|
1
|
+
import type { ExecutorArgs } from '../helpers';
|
|
2
2
|
export declare const runInNode: ({ code, builder, context, event, localState, rootSetState, rootState }: ExecutorArgs) => any;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { ExecutorArgs } from './helpers
|
|
1
|
+
import type { ExecutorArgs } from './helpers';
|
|
2
2
|
export declare const evaluator: (_args: ExecutorArgs) => never;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ContentVariantsPrps } from '../components/content-variants/content-variants.types
|
|
2
|
-
import type { Dictionary } from '../types/typescript
|
|
3
|
-
import type { GetContentOptions } from './get-content/types
|
|
1
|
+
import type { ContentVariantsPrps } from '../components/content-variants/content-variants.types';
|
|
2
|
+
import type { Dictionary } from '../types/typescript';
|
|
3
|
+
import type { GetContentOptions } from './get-content/types';
|
|
4
4
|
type GetBuilderPropsOptions = (Omit<GetContentOptions, 'model'> & {
|
|
5
5
|
model?: string;
|
|
6
6
|
}) & ({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { BuilderContextInterface } from '../context/types
|
|
2
|
-
import type { BuilderBlock } from '../types/builder-block
|
|
1
|
+
import type { BuilderContextInterface } from '../context/types';
|
|
2
|
+
import type { BuilderBlock } from '../types/builder-block';
|
|
3
3
|
type Options = {
|
|
4
4
|
block: BuilderBlock;
|
|
5
5
|
} & Pick<BuilderContextInterface, 'localState' | 'context' | 'rootState' | 'rootSetState'>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { BuilderContextInterface } from '../context/types
|
|
2
|
-
import type { BuilderBlock } from '../types/builder-block
|
|
1
|
+
import type { BuilderContextInterface } from '../context/types';
|
|
2
|
+
import type { BuilderBlock } from '../types/builder-block';
|
|
3
3
|
type Actions = {
|
|
4
4
|
[index: string]: (event: Event) => any;
|
|
5
5
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { BuilderBlock } from '../types/builder-block
|
|
1
|
+
import type { BuilderBlock } from '../types/builder-block';
|
|
2
2
|
export declare function getBlockComponentOptions(block: BuilderBlock): any;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { BuilderContextInterface } from '../context/types
|
|
2
|
-
import type { BuilderBlock } from '../types/builder-block
|
|
1
|
+
import type { BuilderContextInterface } from '../context/types';
|
|
2
|
+
import type { BuilderBlock } from '../types/builder-block';
|
|
3
3
|
export declare function getBlockProperties({ block, context }: {
|
|
4
4
|
block: BuilderBlock;
|
|
5
5
|
context: BuilderContextInterface;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { QueryObject } from '../../helpers/search/search
|
|
1
|
+
import type { QueryObject } from '../../helpers/search/search';
|
|
2
2
|
/**
|
|
3
3
|
* Receives a `URLSearchParams` object or a regular query object, and returns the subset of query params that are
|
|
4
4
|
* relevant to the Builder SDK.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { GetContentOptions } from './types
|
|
1
|
+
import type { GetContentOptions } from './types';
|
|
2
2
|
export declare const generateContentUrl: (options: GetContentOptions) => URL;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { BuilderContent } from '../../types/builder-content
|
|
2
|
-
import type { GetContentOptions } from './types
|
|
1
|
+
import type { BuilderContent } from '../../types/builder-content';
|
|
2
|
+
import type { GetContentOptions } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* Returns the first content entry that matches the given options.
|
|
5
5
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { BuilderContextInterface } from '../context/types
|
|
2
|
-
import type { BuilderBlock } from '../types/builder-block
|
|
1
|
+
import type { BuilderContextInterface } from '../context/types';
|
|
2
|
+
import type { BuilderBlock } from '../types/builder-block';
|
|
3
3
|
export declare function getProcessedBlock({ block, context, shouldEvaluateBindings, localState, rootState, rootSetState }: {
|
|
4
4
|
block: BuilderBlock;
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { BuilderContextInterface } from '../context/types
|
|
2
|
-
import type { BuilderBlock } from '../types/builder-block
|
|
1
|
+
import type { BuilderContextInterface } from '../context/types';
|
|
2
|
+
import type { BuilderBlock } from '../types/builder-block';
|
|
3
3
|
export declare const getStyle: ({ block, context }: {
|
|
4
4
|
block: BuilderBlock;
|
|
5
5
|
context: BuilderContextInterface;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { type Search } from '../helpers/search/search
|
|
1
|
+
import { type Search } from '../helpers/search/search';
|
|
2
2
|
export declare function isEditing(search?: Search): boolean;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { Search } from '../helpers/search/search
|
|
1
|
+
import type { Search } from '../helpers/search/search';
|
|
2
2
|
export declare function isPreviewing(search?: Search): boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { BuilderBlock } from '../types/builder-block
|
|
2
|
-
import type { DeepPartial } from '../types/deep-partial
|
|
1
|
+
import type { BuilderBlock } from '../types/builder-block';
|
|
2
|
+
import type { DeepPartial } from '../types/deep-partial';
|
|
3
3
|
export interface InsertMenuItem {
|
|
4
4
|
name: string;
|
|
5
5
|
icon?: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { CanTrack } from '../../types/can-track
|
|
2
|
-
import type { Dictionary } from '../../types/typescript
|
|
1
|
+
import type { CanTrack } from '../../types/can-track';
|
|
2
|
+
import type { Dictionary } from '../../types/typescript';
|
|
3
3
|
interface Event {
|
|
4
4
|
/**
|
|
5
5
|
* The type of your event.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { BuilderContextInterface } from '../context/types
|
|
2
|
-
import type { BuilderBlock } from '../types/builder-block
|
|
1
|
+
import type { BuilderContextInterface } from '../context/types';
|
|
2
|
+
import type { BuilderBlock } from '../types/builder-block';
|
|
3
3
|
export declare function transformBlockProperties<T>({ properties }: {
|
|
4
4
|
properties: T;
|
|
5
5
|
context: BuilderContextInterface;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { BuilderBlock } from '../types/builder-block
|
|
1
|
+
import type { BuilderBlock } from '../types/builder-block';
|
|
2
2
|
export declare function transformBlock(block: BuilderBlock): BuilderBlock;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { BuilderContextInterface } from '../context/types
|
|
2
|
-
import type { BuilderBlock } from '../types/builder-block
|
|
1
|
+
import type { BuilderContextInterface } from '../context/types';
|
|
2
|
+
import type { BuilderBlock } from '../types/builder-block';
|
|
3
3
|
export declare function transformStyleProperty({ style }: {
|
|
4
4
|
style: Partial<CSSStyleDeclaration>;
|
|
5
5
|
context: BuilderContextInterface;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { BuilderContent } from '../types/builder-content
|
|
2
|
-
import type { CanTrack } from '../types/can-track
|
|
3
|
-
import type { Nullable } from '../types/typescript
|
|
1
|
+
import type { BuilderContent } from '../types/builder-content';
|
|
2
|
+
import type { CanTrack } from '../types/can-track';
|
|
3
|
+
import type { Nullable } from '../types/typescript';
|
|
4
4
|
export declare const handleABTestingSync: ({ item, canTrack }: {
|
|
5
5
|
item: Nullable<BuilderContent>;
|
|
6
6
|
} & CanTrack) => Nullable<BuilderContent>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { CanTrack } from '../types/can-track
|
|
2
|
-
import type { Nullable } from './nullable
|
|
1
|
+
import type { CanTrack } from '../types/can-track';
|
|
2
|
+
import type { Nullable } from './nullable';
|
|
3
3
|
export declare const getLocalStorageItem: ({ key, canTrack }: {
|
|
4
4
|
key: string;
|
|
5
5
|
} & CanTrack) => Nullable<string>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { BuilderContent } from '../../types/builder-content
|
|
1
|
+
import type { BuilderContent } from '../../types/builder-content';
|
|
2
2
|
export declare function getPreviewContent(_searchParams: URLSearchParams): BuilderContent | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CanTrack } from '../types/can-track
|
|
1
|
+
import type { CanTrack } from '../types/can-track';
|
|
2
2
|
export declare const getSessionId: ({ canTrack }: CanTrack) => Promise<string | undefined>;
|
|
3
3
|
export declare const createSessionId: () => string;
|
|
4
4
|
export declare const setSessionId: ({ id, canTrack }: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ContentProps } from '../components/content/content.types
|
|
2
|
-
import type { BuilderAnimation } from '../types/builder-block
|
|
3
|
-
import type { BuilderContent } from '../types/builder-content
|
|
1
|
+
import type { ContentProps } from '../components/content/content.types';
|
|
2
|
+
import type { BuilderAnimation } from '../types/builder-block';
|
|
3
|
+
import type { BuilderContent } from '../types/builder-content';
|
|
4
4
|
type ContentListener = Required<Pick<ContentProps, 'model' | 'trustedHosts'>> & {
|
|
5
5
|
callbacks: {
|
|
6
6
|
contentUpdate: (updatedContent: BuilderContent) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CanTrack } from '../types/can-track
|
|
1
|
+
import type { CanTrack } from '../types/can-track';
|
|
2
2
|
export declare const getVisitorId: ({ canTrack }: CanTrack) => string | undefined;
|
|
3
3
|
export declare const createVisitorId: () => string;
|
|
4
4
|
export declare const setVisitorId: ({ id, canTrack }: {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
export { default as Button } from '../blocks/button/index
|
|
2
|
-
export { default as Columns } from '../blocks/columns/index
|
|
3
|
-
export { default as Fragment } from '../blocks/fragment/index
|
|
4
|
-
export { default as Image } from '../blocks/image/index
|
|
5
|
-
export { default as Section } from '../blocks/section/index
|
|
6
|
-
export { default as Symbol } from '../blocks/symbol/index
|
|
7
|
-
export { default as Text } from '../blocks/text/index
|
|
8
|
-
export { default as Video } from '../blocks/video/index
|
|
9
|
-
export { default as Blocks } from '../components/blocks/index
|
|
10
|
-
export { default as Content } from '../components/content-variants/index
|
|
1
|
+
export { default as Button } from '../blocks/button/index';
|
|
2
|
+
export { default as Columns } from '../blocks/columns/index';
|
|
3
|
+
export { default as Fragment } from '../blocks/fragment/index';
|
|
4
|
+
export { default as Image } from '../blocks/image/index';
|
|
5
|
+
export { default as Section } from '../blocks/section/index';
|
|
6
|
+
export { default as Symbol } from '../blocks/symbol/index';
|
|
7
|
+
export { default as Text } from '../blocks/text/index';
|
|
8
|
+
export { default as Video } from '../blocks/video/index';
|
|
9
|
+
export { default as Blocks } from '../components/blocks/index';
|
|
10
|
+
export { default as Content } from '../components/content-variants/index';
|
|
11
11
|
/**
|
|
12
12
|
* Builder Context
|
|
13
13
|
*/
|
|
14
|
-
export { BuilderContext } from '../context/index
|
|
14
|
+
export { BuilderContext } from '../context/index';
|
package/types/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export * from './index-helpers/top-of-file
|
|
1
|
+
export * from './index-helpers/top-of-file';
|
|
2
2
|
/**
|
|
3
3
|
* In the React SDK, this file is marked with `use client`.
|
|
4
4
|
*/
|
|
5
|
-
export * from './index-helpers/blocks-exports
|
|
5
|
+
export * from './index-helpers/blocks-exports';
|
|
6
6
|
/**
|
|
7
7
|
* In the React SDK, this file is not marked with `use client`, to allow
|
|
8
8
|
* NextJS App Directory to use the SDK helper functions without issues.
|
|
9
9
|
*/
|
|
10
|
-
export * from './server-index
|
|
10
|
+
export * from './server-index';
|