@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.
Files changed (64) hide show
  1. package/lib/browser/{USE_CLIENT_BUNDLE-64b6ec10.cjs → USE_CLIENT_BUNDLE-70be4cc5.cjs} +3 -3
  2. package/lib/{node/USE_CLIENT_BUNDLE-98a4fbf4.js → browser/USE_CLIENT_BUNDLE-7492ecd8.js} +188 -187
  3. package/lib/{edge/USE_SERVER_BUNDLE-e79e6b55.cjs → browser/USE_SERVER_BUNDLE-875d4629.cjs} +1 -1
  4. package/lib/{edge/USE_SERVER_BUNDLE-4e9af8f5.js → browser/USE_SERVER_BUNDLE-fe386ed3.js} +1 -1
  5. package/lib/browser/bundle-bd9886c9.cjs +168 -0
  6. package/lib/browser/{bundle-f3e8cd29.js → bundle-f9f52242.js} +594 -526
  7. package/lib/browser/index.cjs +1 -1
  8. package/lib/browser/index.mjs +14 -14
  9. package/lib/{node/USE_CLIENT_BUNDLE-990b655a.cjs → edge/USE_CLIENT_BUNDLE-1148158d.cjs} +3 -3
  10. package/lib/{browser/USE_CLIENT_BUNDLE-e89d3175.js → edge/USE_CLIENT_BUNDLE-cb840c0f.js} +188 -187
  11. package/lib/{node/USE_SERVER_BUNDLE-b231d861.js → edge/USE_SERVER_BUNDLE-36de460d.js} +1 -1
  12. package/lib/{node/USE_SERVER_BUNDLE-c86a1fb8.cjs → edge/USE_SERVER_BUNDLE-50c2f18b.cjs} +1 -1
  13. package/lib/edge/{bundle-d4f509a3.cjs → bundle-71cfdd3e.cjs} +33 -37
  14. package/lib/edge/{bundle-cb191300.js → bundle-765860e3.js} +1051 -983
  15. package/lib/edge/index.cjs +1 -1
  16. package/lib/edge/index.mjs +14 -14
  17. package/lib/{edge/USE_CLIENT_BUNDLE-2aed408a.cjs → node/USE_CLIENT_BUNDLE-2f43c320.cjs} +3 -3
  18. package/lib/{edge/USE_CLIENT_BUNDLE-a3258a60.js → node/USE_CLIENT_BUNDLE-4ba4594d.js} +188 -187
  19. package/lib/{browser/USE_SERVER_BUNDLE-d6bec4ec.js → node/USE_SERVER_BUNDLE-2534ef71.js} +1 -1
  20. package/lib/{browser/USE_SERVER_BUNDLE-f34c0814.cjs → node/USE_SERVER_BUNDLE-473d50ad.cjs} +1 -1
  21. package/lib/node/{bundle-b2d68b60.cjs → bundle-1c54df65.cjs} +7 -11
  22. package/lib/node/{bundle-11daeaca.js → bundle-305bb463.js} +361 -293
  23. package/lib/node/index.cjs +1 -1
  24. package/lib/node/index.mjs +14 -14
  25. package/package.json +1 -1
  26. package/types/cjs/blocks/button/button.types.d.ts +2 -1
  27. package/types/cjs/blocks/columns/columns.types.d.ts +3 -3
  28. package/types/cjs/blocks/symbol/symbol.types.d.ts +2 -2
  29. package/types/cjs/components/block/block.d.ts +1 -0
  30. package/types/cjs/components/block/components/block-wrapper.d.ts +1 -0
  31. package/types/cjs/components/block/components/component-ref/component-ref.helpers.d.ts +8 -1
  32. package/types/cjs/components/block/components/repeated-block.d.ts +3 -5
  33. package/types/cjs/components/blocks/blocks.types.d.ts +1 -0
  34. package/types/cjs/components/content-variants/content-variants.types.d.ts +6 -2
  35. package/types/cjs/constants/sdk-version.d.ts +1 -1
  36. package/types/cjs/functions/evaluate/should-force-browser-runtime-in-node.d.ts +1 -0
  37. package/types/cjs/functions/get-block-properties.d.ts +5 -1
  38. package/types/cjs/functions/get-class-prop-name.d.ts +1 -0
  39. package/types/cjs/functions/get-style.d.ts +12 -0
  40. package/types/cjs/functions/is-node-runtime.d.ts +4 -0
  41. package/types/cjs/functions/transform-block-properties.d.ts +7 -5
  42. package/types/cjs/functions/transform-style-property.d.ts +7 -0
  43. package/types/cjs/types/builder-block.d.ts +1 -0
  44. package/types/cjs/types/builder-props.d.ts +3 -0
  45. package/types/esm/blocks/button/button.types.d.ts +2 -1
  46. package/types/esm/blocks/columns/columns.types.d.ts +3 -3
  47. package/types/esm/blocks/symbol/symbol.types.d.ts +2 -2
  48. package/types/esm/components/block/block.d.ts +1 -0
  49. package/types/esm/components/block/components/block-wrapper.d.ts +1 -0
  50. package/types/esm/components/block/components/component-ref/component-ref.helpers.d.ts +8 -1
  51. package/types/esm/components/block/components/repeated-block.d.ts +3 -5
  52. package/types/esm/components/blocks/blocks.types.d.ts +1 -0
  53. package/types/esm/components/content-variants/content-variants.types.d.ts +6 -2
  54. package/types/esm/constants/sdk-version.d.ts +1 -1
  55. package/types/esm/functions/evaluate/should-force-browser-runtime-in-node.d.ts +1 -0
  56. package/types/esm/functions/get-block-properties.d.ts +5 -1
  57. package/types/esm/functions/get-class-prop-name.d.ts +1 -0
  58. package/types/esm/functions/get-style.d.ts +12 -0
  59. package/types/esm/functions/is-node-runtime.d.ts +4 -0
  60. package/types/esm/functions/transform-block-properties.d.ts +7 -5
  61. package/types/esm/functions/transform-style-property.d.ts +7 -0
  62. package/types/esm/types/builder-block.d.ts +1 -0
  63. package/types/esm/types/builder-props.d.ts +3 -0
  64. package/lib/browser/bundle-50ff23eb.cjs +0 -172
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./bundle-b2d68b60.cjs"),t=require("./USE_CLIENT_BUNDLE-990b655a.cjs");require("lru-cache");require("react/jsx-runtime");require("react");require("next/navigation");require("./USE_SERVER_BUNDLE-c86a1fb8.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;
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;
@@ -1,10 +1,10 @@
1
- import { B as i, v as m, C as c, R as g, u as p, S as l, T as C, y as d, o as u, G as B, z as S, p as f, A as h, E, D as R, b as x, h as b, w as k, x as y, F } from "./bundle-11daeaca.js";
2
- import { b as v, F as w, c as A, S as T, V } from "./USE_CLIENT_BUNDLE-98a4fbf4.js";
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-b231d861.js";
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
- u as createRegisterComponentMessage,
23
- B as fetchBuilderProps,
24
- S as fetchEntries,
25
- f as fetchOneEntry,
26
- h as getAllContent,
27
- E as getBuilderSearchParams,
28
- R as getContent,
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
- b as isPreviewing,
31
- k as register,
32
- y as setEditorSettings,
33
- F as track
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.3",
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,4 +1,5 @@
1
- export interface ButtonProps {
1
+ import type { BuilderLinkComponentProp } from '../../types/builder-props.js';
2
+ export interface ButtonProps extends BuilderLinkComponentProp {
2
3
  attributes?: any;
3
4
  text?: string;
4
5
  link?: string;
@@ -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";
@@ -3,6 +3,7 @@ type BlockWrapperProps = {
3
3
  Wrapper: string;
4
4
  block: BuilderBlock;
5
5
  context: BuilderContextInterface;
6
+ linkComponent: any;
6
7
  };
7
8
  /**
8
9
  * This component renders a block's wrapper HTML element (from the block's `tagName` property).
@@ -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?: any;
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, RegisteredComponents } from "../../../context/types.js";
8
- import type { BuilderBlock } from "../../../types/builder-block.js";
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 `div` ('ScrollView' in React Native).
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 `div` ('ScrollView' in React Native).
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.3";
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
- }): any;
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>;
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Identifies node runtime
3
+ */
4
+ export declare function isNodeRuntime(): boolean;
@@ -1,5 +1,7 @@
1
- export declare function transformBlockProperties({ properties, }: {
2
- properties: any;
3
- block: any;
4
- context: any;
5
- }): any;
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>;
@@ -54,6 +54,7 @@ export interface BuilderBlock {
54
54
  } | null;
55
55
  animations?: any[];
56
56
  style?: Partial<CSSStyleDeclaration>;
57
+ href?: string;
57
58
  /**
58
59
  * generated by the "Hide If" binding
59
60
  */
@@ -7,3 +7,6 @@ export type PropsWithBuilderData<T> = T & {
7
7
  export type BuilderComponentsProp = {
8
8
  builderComponents: RegisteredComponents;
9
9
  };
10
+ export type BuilderLinkComponentProp = {
11
+ builderLinkComponent?: any;
12
+ };
@@ -1,4 +1,5 @@
1
- export interface ButtonProps {
1
+ import type { BuilderLinkComponentProp } from '../../types/builder-props.js';
2
+ export interface ButtonProps extends BuilderLinkComponentProp {
2
3
  attributes?: any;
3
4
  text?: string;
4
5
  link?: string;
@@ -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";
@@ -3,6 +3,7 @@ type BlockWrapperProps = {
3
3
  Wrapper: string;
4
4
  block: BuilderBlock;
5
5
  context: BuilderContextInterface;
6
+ linkComponent: any;
6
7
  };
7
8
  /**
8
9
  * This component renders a block's wrapper HTML element (from the block's `tagName` property).
@@ -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?: any;
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, RegisteredComponents } from "../../../context/types.js";
8
- import type { BuilderBlock } from "../../../types/builder-block.js";
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 `div` ('ScrollView' in React Native).
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 `div` ('ScrollView' in React Native).
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.3";
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
- }): any;
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>;
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Identifies node runtime
3
+ */
4
+ export declare function isNodeRuntime(): boolean;
@@ -1,5 +1,7 @@
1
- export declare function transformBlockProperties({ properties, }: {
2
- properties: any;
3
- block: any;
4
- context: any;
5
- }): any;
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>;
@@ -54,6 +54,7 @@ export interface BuilderBlock {
54
54
  } | null;
55
55
  animations?: any[];
56
56
  style?: Partial<CSSStyleDeclaration>;
57
+ href?: string;
57
58
  /**
58
59
  * generated by the "Hide If" binding
59
60
  */
@@ -7,3 +7,6 @@ export type PropsWithBuilderData<T> = T & {
7
7
  export type BuilderComponentsProp = {
8
8
  builderComponents: RegisteredComponents;
9
9
  };
10
+ export type BuilderLinkComponentProp = {
11
+ builderLinkComponent?: any;
12
+ };