@builder.io/sdk-react-nextjs 0.13.2 → 0.13.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/lib/{node/USE_CLIENT_BUNDLE-2b075311.js → browser/USE_CLIENT_BUNDLE-04cd188b.js} +4 -4
  2. package/lib/browser/{USE_CLIENT_BUNDLE-65d8df10.cjs → USE_CLIENT_BUNDLE-dcad73d0.cjs} +1 -1
  3. package/lib/{edge/USE_SERVER_BUNDLE-1a4a2318.js → browser/USE_SERVER_BUNDLE-498895bc.js} +1 -1
  4. package/lib/{edge/USE_SERVER_BUNDLE-7fb84390.cjs → browser/USE_SERVER_BUNDLE-f6de6931.cjs} +1 -1
  5. package/lib/browser/{bundle-af821e69.cjs → bundle-09521c43.cjs} +3 -3
  6. package/lib/browser/{bundle-0a12b387.js → bundle-16af19fc.js} +4 -4
  7. package/lib/browser/index.cjs +1 -1
  8. package/lib/browser/index.mjs +3 -3
  9. package/lib/{node/USE_CLIENT_BUNDLE-902511d8.cjs → edge/USE_CLIENT_BUNDLE-403b6348.cjs} +1 -1
  10. package/lib/{browser/USE_CLIENT_BUNDLE-660c05f1.js → edge/USE_CLIENT_BUNDLE-5b75ae27.js} +4 -4
  11. package/lib/{node/USE_SERVER_BUNDLE-2a94723d.js → edge/USE_SERVER_BUNDLE-1f2bfec0.js} +1 -1
  12. package/lib/{node/USE_SERVER_BUNDLE-c44d2651.cjs → edge/USE_SERVER_BUNDLE-c05264ac.cjs} +1 -1
  13. package/lib/edge/{bundle-ab7ced06.cjs → bundle-10fb1352.cjs} +13 -13
  14. package/lib/edge/{bundle-d76f7298.js → bundle-32e28c53.js} +4 -4
  15. package/lib/edge/index.cjs +1 -1
  16. package/lib/edge/index.mjs +3 -3
  17. package/lib/{edge/USE_CLIENT_BUNDLE-4ecfa86c.cjs → node/USE_CLIENT_BUNDLE-85cf7e92.cjs} +1 -1
  18. package/lib/{edge/USE_CLIENT_BUNDLE-a2d2d15f.js → node/USE_CLIENT_BUNDLE-d1e6dcd3.js} +4 -4
  19. package/lib/{browser/USE_SERVER_BUNDLE-2e3b6eff.cjs → node/USE_SERVER_BUNDLE-1aafe1f0.cjs} +1 -1
  20. package/lib/{browser/USE_SERVER_BUNDLE-7204eec6.js → node/USE_SERVER_BUNDLE-601fafbe.js} +1 -1
  21. package/lib/node/{bundle-2f991b0d.cjs → bundle-3f825965.cjs} +3 -3
  22. package/lib/node/{bundle-903b1df4.js → bundle-42fea3bc.js} +4 -4
  23. package/lib/node/index.cjs +1 -1
  24. package/lib/node/index.mjs +3 -3
  25. package/package.json +1 -1
  26. package/types/cjs/blocks/columns/columns.d.ts +1 -2
  27. package/types/cjs/blocks/columns/columns.types.d.ts +2 -2
  28. package/types/cjs/blocks/form/form/form.d.ts +3 -3
  29. package/types/cjs/blocks/slot/slot.d.ts +3 -3
  30. package/types/cjs/blocks/symbol/symbol.d.ts +1 -2
  31. package/types/cjs/blocks/symbol/symbol.types.d.ts +2 -2
  32. package/types/cjs/components/block/components/block-wrapper.d.ts +2 -2
  33. package/types/cjs/components/block/components/component-ref/component-ref.helpers.d.ts +3 -3
  34. package/types/cjs/components/block/components/interactive-element.d.ts +3 -2
  35. package/types/cjs/components/blocks/blocks-wrapper.d.ts +2 -2
  36. package/types/cjs/components/content/content.types.d.ts +1 -8
  37. package/types/cjs/components/content/contentProps.types.d.ts +12 -0
  38. package/types/cjs/components/dynamic-renderer/dynamic-renderer.d.ts +4 -3
  39. package/types/cjs/constants/sdk-version.d.ts +1 -1
  40. package/types/cjs/types/builder-props.d.ts +1 -1
  41. package/types/cjs/types/input.d.ts +1 -0
  42. package/types/cjs/types/typescript.d.ts +0 -3
  43. package/types/esm/blocks/columns/columns.d.ts +1 -2
  44. package/types/esm/blocks/columns/columns.types.d.ts +2 -2
  45. package/types/esm/blocks/form/form/form.d.ts +3 -3
  46. package/types/esm/blocks/slot/slot.d.ts +3 -3
  47. package/types/esm/blocks/symbol/symbol.d.ts +1 -2
  48. package/types/esm/blocks/symbol/symbol.types.d.ts +2 -2
  49. package/types/esm/components/block/components/block-wrapper.d.ts +2 -2
  50. package/types/esm/components/block/components/component-ref/component-ref.helpers.d.ts +3 -3
  51. package/types/esm/components/block/components/interactive-element.d.ts +3 -2
  52. package/types/esm/components/blocks/blocks-wrapper.d.ts +2 -2
  53. package/types/esm/components/content/content.types.d.ts +1 -8
  54. package/types/esm/components/content/contentProps.types.d.ts +12 -0
  55. package/types/esm/components/dynamic-renderer/dynamic-renderer.d.ts +4 -3
  56. package/types/esm/constants/sdk-version.d.ts +1 -1
  57. package/types/esm/types/builder-props.d.ts +1 -1
  58. package/types/esm/types/input.d.ts +1 -0
  59. package/types/esm/types/typescript.d.ts +0 -3
@@ -2,7 +2,7 @@ import * as React from "react";
2
2
  /**
3
3
  * This import is used by the Svelte SDK. Do not remove.
4
4
  */
5
- export type FormProps = PropsWithBuilderData<BuilderComponentsProp & BuilderLinkComponentProp & {
5
+ export type FormProps = BuilderDataProps & BuilderComponentsProp & BuilderLinkComponentProp & {
6
6
  attributes?: any;
7
7
  name?: string;
8
8
  action?: string;
@@ -22,12 +22,12 @@ export type FormProps = PropsWithBuilderData<BuilderComponentsProp & BuilderLink
22
22
  sendingMessage?: BuilderBlock[];
23
23
  resetFormOnSubmit?: boolean;
24
24
  errorMessagePath?: string;
25
- }>;
25
+ };
26
26
  /**
27
27
  * This import is used by the Svelte SDK. Do not remove.
28
28
  */
29
29
  export type FormState = "unsubmitted" | "sending" | "success" | "error";
30
30
  import type { BuilderBlock } from "../../../types/builder-block.js";
31
- import type { BuilderComponentsProp, BuilderLinkComponentProp, PropsWithBuilderData } from "../../../types/builder-props.js";
31
+ import type { BuilderComponentsProp, BuilderDataProps, BuilderLinkComponentProp } from "../../../types/builder-props.js";
32
32
  declare function FormComponent(props: FormProps): React.JSX.Element;
33
33
  export default FormComponent;
@@ -1,8 +1,8 @@
1
1
  import * as React from "react";
2
- export type DropzoneProps = PropsWithBuilderData<{
2
+ export type DropzoneProps = BuilderDataProps & {
3
3
  name: string;
4
4
  attributes: any;
5
- }>;
6
- import type { PropsWithBuilderData } from "../../types/builder-props.js";
5
+ };
6
+ import type { BuilderDataProps } from "../../types/builder-props.js";
7
7
  declare function Slot(props: DropzoneProps): React.JSX.Element;
8
8
  export default Slot;
@@ -1,5 +1,4 @@
1
1
  import * as React from "react";
2
- import type { PropsWithBuilderData } from "../../types/builder-props.js";
3
2
  import type { SymbolProps } from "./symbol.types.js";
4
- declare function Symbol(props: PropsWithBuilderData<SymbolProps>): Promise<React.JSX.Element>;
3
+ declare function Symbol(props: SymbolProps): Promise<React.JSX.Element>;
5
4
  export default Symbol;
@@ -1,5 +1,5 @@
1
1
  import type { BuilderContent } from '../../types/builder-content.js';
2
- import type { BuilderComponentsProp, BuilderLinkComponentProp } from '../../types/builder-props.js';
2
+ import type { BuilderComponentsProp, BuilderDataProps, 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, BuilderLinkComponentProp {
11
+ export interface SymbolProps extends BuilderComponentsProp, BuilderDataProps, BuilderLinkComponentProp {
12
12
  symbol?: SymbolInfo;
13
13
  dataOnly?: boolean;
14
14
  dynamic?: boolean;
@@ -4,12 +4,12 @@ type BlockWrapperProps = {
4
4
  block: BuilderBlock;
5
5
  context: BuilderContextInterface;
6
6
  linkComponent: any;
7
+ children?: any;
7
8
  };
8
9
  /**
9
10
  * This component renders a block's wrapper HTML element (from the block's `tagName` property).
10
11
  */
11
12
  import type { BuilderContextInterface } from "../../../context/types.js";
12
13
  import type { BuilderBlock } from "../../../types/builder-block.js";
13
- import type { PropsWithChildren } from "../../../types/typescript.js";
14
- declare function BlockWrapper(props: PropsWithChildren<BlockWrapperProps>): React.JSX.Element;
14
+ declare function BlockWrapper(props: BlockWrapperProps): React.JSX.Element;
15
15
  export default BlockWrapper;
@@ -1,13 +1,13 @@
1
1
  import type { BuilderContextInterface, RegisteredComponents } from '../../../../context/types.js';
2
2
  import type { BuilderBlock } from '../../../../types/builder-block.js';
3
- import type { PropsWithBuilderData } from '../../../../types/builder-props.js';
3
+ import type { BuilderDataProps } from '../../../../types/builder-props.js';
4
4
  import type { InteractiveElementProps } from '../interactive-element.js';
5
- type ComponentOptions = PropsWithBuilderData<{
5
+ type ComponentOptions = BuilderDataProps & {
6
6
  [index: string]: any;
7
7
  attributes?: {
8
8
  [index: string]: any;
9
9
  };
10
- }>;
10
+ };
11
11
  export interface ComponentProps {
12
12
  componentRef: any;
13
13
  componentOptions: ComponentOptions;
@@ -5,9 +5,10 @@ export type InteractiveElementProps = {
5
5
  context: BuilderContextInterface;
6
6
  wrapperProps: Dictionary<any>;
7
7
  includeBlockProps: boolean;
8
+ children?: any;
8
9
  };
9
10
  import type { BuilderContextInterface } from "../../../context/types.js";
10
11
  import type { BuilderBlock } from "../../../types/builder-block.js";
11
- import type { Dictionary, PropsWithChildren } from "../../../types/typescript.js";
12
- declare function InteractiveElement(props: PropsWithChildren<InteractiveElementProps>): React.JSX.Element;
12
+ import type { Dictionary } from "../../../types/typescript.js";
13
+ declare function InteractiveElement(props: InteractiveElementProps): React.JSX.Element;
13
14
  export default InteractiveElement;
@@ -12,8 +12,8 @@ export type BlocksWrapperProps = {
12
12
  * Additonal props to pass to `blocksWrapper`. Defaults to `{}`.
13
13
  */
14
14
  BlocksWrapperProps: any;
15
+ children?: any;
15
16
  };
16
17
  import type { BuilderBlock } from "../../types/builder-block.js";
17
- import type { PropsWithChildren } from "../../types/typescript.js";
18
- declare function BlocksWrapper(props: PropsWithChildren<BlocksWrapperProps>): React.JSX.Element;
18
+ declare function BlocksWrapper(props: BlocksWrapperProps): React.JSX.Element;
19
19
  export default BlocksWrapper;
@@ -1,11 +1,5 @@
1
1
  import type { BuilderRenderState } from '../../context/types.js';
2
- import type { EnforcePartials } from '../../types/enforced-partials.js';
3
- import type { ContentVariantsPrps } from '../content-variants/content-variants.types.js';
4
- interface InternalRenderProps {
5
- showContent: boolean;
6
- isSsrAbTest: boolean;
7
- }
8
- export type ContentProps = InternalRenderProps & EnforcePartials<ContentVariantsPrps>;
2
+ export type { ContentProps } from './contentProps.types.js';
9
3
  export interface BuilderComponentStateChange {
10
4
  state: BuilderRenderState;
11
5
  ref: {
@@ -17,4 +11,3 @@ export interface BuilderComponentStateChange {
17
11
  };
18
12
  };
19
13
  }
20
- export {};
@@ -0,0 +1,12 @@
1
+ import type { EnforcePartials } from '../../types/enforced-partials.js';
2
+ import type { ContentVariantsPrps } from '../content-variants/content-variants.types.js';
3
+ interface InternalRenderProps {
4
+ showContent: boolean;
5
+ isSsrAbTest: boolean;
6
+ }
7
+ /**
8
+ * This is in a separate file so that we can override it (most notably in Vue,
9
+ * where prop types cannot be wrapped by generics like `EnforcePartials`).
10
+ */
11
+ export type ContentProps = InternalRenderProps & EnforcePartials<ContentVariantsPrps>;
12
+ export {};
@@ -1,8 +1,9 @@
1
1
  import * as React from "react";
2
- import type { PropsWithChildren } from "../../types/typescript.js";
3
- declare function DynamicRenderer(props: PropsWithChildren<{
2
+ export interface DynamicRendererProps {
3
+ children?: any;
4
4
  TagName: any;
5
5
  attributes: any;
6
6
  actionAttributes: any;
7
- }>): React.JSX.Element;
7
+ }
8
+ declare function DynamicRenderer(props: DynamicRendererProps): React.JSX.Element;
8
9
  export default DynamicRenderer;
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.13.2";
1
+ export declare const SDK_VERSION = "0.13.3";
@@ -1,6 +1,6 @@
1
1
  import type { BuilderContextInterface, RegisteredComponents } from '../context/types.js';
2
2
  import type { BuilderBlock } from './builder-block.js';
3
- export type PropsWithBuilderData<T> = T & {
3
+ export type BuilderDataProps = {
4
4
  builderBlock: BuilderBlock;
5
5
  builderContext: BuilderContextInterface;
6
6
  };
@@ -118,4 +118,5 @@ export interface Input {
118
118
  type?: string;
119
119
  };
120
120
  onChange?: ((options: Map<string, any>) => void | Promise<void>) | string;
121
+ meta?: Record<string, any>;
121
122
  }
@@ -6,6 +6,3 @@ export type Overwrite<T, U> = keyof U extends keyof T ? Pick<T, Exclude<keyof T,
6
6
  export type Prettify<T> = {
7
7
  [K in keyof T]: T[K];
8
8
  } & {};
9
- export type PropsWithChildren<P> = P & {
10
- children?: any;
11
- };