@builder.io/sdk-react 1.0.19 → 1.0.21

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 (165) hide show
  1. package/lib/browser/blocks-exports.cjs +2 -2
  2. package/lib/browser/blocks-exports.mjs +2 -2
  3. package/lib/browser/index.cjs +1 -1
  4. package/lib/browser/index.mjs +1 -1
  5. package/lib/browser/init.cjs +1 -0
  6. package/lib/browser/init.mjs +13 -0
  7. package/lib/browser/{server-entry-cfff49d1.js → server-entry-166d8ec9.js} +1 -1
  8. package/lib/browser/{server-entry-1a86f409.cjs → server-entry-c6e9a10a.cjs} +1 -1
  9. package/lib/browser/server-entry.cjs +1 -1
  10. package/lib/browser/server-entry.mjs +1 -1
  11. package/lib/edge/{blocks-1ea14427.js → blocks-793a81d9.js} +36 -37
  12. package/lib/edge/{blocks-5341123d.cjs → blocks-c26b2ffc.cjs} +5 -5
  13. package/lib/edge/blocks-exports.cjs +1 -1
  14. package/lib/edge/blocks-exports.mjs +2 -2
  15. package/lib/edge/{button-f5764a4c.js → button-659db379.js} +2 -2
  16. package/lib/edge/{button-c6255c8e.cjs → button-f62c1e15.cjs} +1 -1
  17. package/lib/edge/{columns-17090869.js → columns-07ef2925.js} +3 -3
  18. package/lib/edge/{columns-01e0bb50.cjs → columns-5fe66f05.cjs} +1 -1
  19. package/lib/edge/{content-variants-3961c4ee.cjs → content-variants-9aedb66d.cjs} +1 -1
  20. package/lib/edge/{content-variants-bfca78f9.js → content-variants-fcba4b5b.js} +8 -8
  21. package/lib/edge/{form-b97fba27.cjs → form-5c293cd8.cjs} +1 -1
  22. package/lib/edge/{form-39e97f30.js → form-82e6d435.js} +3 -3
  23. package/lib/edge/{get-class-prop-name-859a7f60.js → get-class-prop-name-6242df6a.js} +1 -1
  24. package/lib/edge/{get-class-prop-name-f1301669.cjs → get-class-prop-name-c54d7ada.cjs} +1 -1
  25. package/lib/edge/{img-b4ff1bef.js → img-11c91db6.js} +1 -1
  26. package/lib/edge/{img-0c1e53c0.cjs → img-73cc7d69.cjs} +1 -1
  27. package/lib/edge/index.cjs +1 -1
  28. package/lib/edge/index.mjs +1 -1
  29. package/lib/edge/init.cjs +1 -0
  30. package/lib/edge/init.mjs +13 -0
  31. package/lib/edge/{input-c6fee09c.js → input-6b8ac645.js} +1 -1
  32. package/lib/edge/{input-2103da14.cjs → input-9c7d1291.cjs} +1 -1
  33. package/lib/edge/select-42de6b22.cjs +1 -0
  34. package/lib/edge/select-f324140d.js +20 -0
  35. package/lib/edge/{server-entry-d46a218d.js → server-entry-396b1a7b.js} +1 -1
  36. package/lib/edge/{server-entry-00891f33.cjs → server-entry-bc7f82dd.cjs} +1 -1
  37. package/lib/edge/server-entry.cjs +1 -1
  38. package/lib/edge/server-entry.mjs +1 -1
  39. package/lib/edge/{slot-c9f94715.js → slot-4e55a3d1.js} +3 -3
  40. package/lib/edge/{slot-8de7d746.cjs → slot-746347ff.cjs} +1 -1
  41. package/lib/edge/{symbol-636383eb.cjs → symbol-4b8cffaa.cjs} +1 -1
  42. package/lib/edge/{symbol-324dadc8.js → symbol-e3905b86.js} +2 -2
  43. package/lib/node/blocks-exports.cjs +30 -70
  44. package/lib/node/blocks-exports.mjs +891 -1017
  45. package/lib/node/index.cjs +1 -1
  46. package/lib/node/index.mjs +23 -22
  47. package/lib/node/init.cjs +1 -0
  48. package/lib/node/init.mjs +9 -0
  49. package/lib/node/node-runtime-2a838da2.cjs +48 -0
  50. package/lib/node/node-runtime-eb3ca94b.js +155 -0
  51. package/lib/node/{server-entry-8c84ddbd.js → server-entry-54c1491b.js} +2 -1
  52. package/lib/node/{server-entry-ff6fc2b4.cjs → server-entry-cb0df432.cjs} +2 -2
  53. package/lib/node/server-entry.cjs +1 -1
  54. package/lib/node/server-entry.mjs +1 -1
  55. package/package.json +6 -1
  56. package/types/blocks/button/button.d.ts +1 -1
  57. package/types/blocks/button/button.types.d.ts +1 -1
  58. package/types/blocks/button/component-info.d.ts +1 -1
  59. package/types/blocks/columns/columns.d.ts +1 -1
  60. package/types/blocks/columns/columns.types.d.ts +2 -2
  61. package/types/blocks/columns/component-info.d.ts +1 -1
  62. package/types/blocks/custom-code/component-info.d.ts +1 -1
  63. package/types/blocks/embed/component-info.d.ts +1 -1
  64. package/types/blocks/form/form/component-info.d.ts +1 -1
  65. package/types/blocks/form/form/form.d.ts +2 -2
  66. package/types/blocks/form/input/component-info.d.ts +1 -1
  67. package/types/blocks/form/select/component-info.d.ts +1 -1
  68. package/types/blocks/form/submit-button/component-info.d.ts +1 -1
  69. package/types/blocks/fragment/component-info.d.ts +1 -1
  70. package/types/blocks/fragment/fragment.d.ts +1 -1
  71. package/types/blocks/image/component-info.d.ts +1 -1
  72. package/types/blocks/image/image.d.ts +1 -1
  73. package/types/blocks/image/image.types.d.ts +1 -1
  74. package/types/blocks/img/component-info.d.ts +1 -1
  75. package/types/blocks/raw-text/component-info.d.ts +1 -1
  76. package/types/blocks/section/component-info.d.ts +1 -1
  77. package/types/blocks/section/section.d.ts +1 -1
  78. package/types/blocks/slot/component-info.d.ts +1 -1
  79. package/types/blocks/slot/slot.d.ts +1 -1
  80. package/types/blocks/symbol/component-info.d.ts +1 -1
  81. package/types/blocks/symbol/symbol.d.ts +1 -1
  82. package/types/blocks/symbol/symbol.helpers.d.ts +2 -2
  83. package/types/blocks/symbol/symbol.types.d.ts +2 -2
  84. package/types/blocks/text/component-info.d.ts +1 -1
  85. package/types/blocks/text/text.d.ts +1 -1
  86. package/types/blocks/textarea/component-info.d.ts +1 -1
  87. package/types/blocks/video/component-info.d.ts +1 -1
  88. package/types/blocks/video/video.d.ts +1 -1
  89. package/types/blocks/video/video.types.d.ts +1 -1
  90. package/types/components/block/animator.d.ts +1 -1
  91. package/types/components/block/block.d.ts +2 -2
  92. package/types/components/block/block.helpers.d.ts +4 -4
  93. package/types/components/block/components/block-styles.d.ts +2 -2
  94. package/types/components/block/components/block-wrapper.d.ts +2 -2
  95. package/types/components/block/components/component-ref/component-ref.d.ts +1 -1
  96. package/types/components/block/components/component-ref/component-ref.helpers.d.ts +3 -3
  97. package/types/components/block/components/interactive-element.d.ts +3 -3
  98. package/types/components/block/components/repeated-block.d.ts +1 -1
  99. package/types/components/block/types.d.ts +2 -2
  100. package/types/components/blocks/blocks-wrapper.d.ts +1 -1
  101. package/types/components/blocks/blocks.d.ts +1 -1
  102. package/types/components/blocks/blocks.types.d.ts +1 -1
  103. package/types/components/content/components/enable-editor.d.ts +2 -2
  104. package/types/components/content/components/styles.d.ts +1 -1
  105. package/types/components/content/content.d.ts +1 -1
  106. package/types/components/content/content.helpers.d.ts +3 -3
  107. package/types/components/content/content.types.d.ts +2 -2
  108. package/types/components/content/contentProps.types.d.ts +2 -2
  109. package/types/components/content-variants/content-variants.d.ts +1 -1
  110. package/types/components/content-variants/content-variants.types.d.ts +4 -4
  111. package/types/components/content-variants/helpers.d.ts +5 -5
  112. package/types/constants/builder-registered-components.d.ts +1 -1
  113. package/types/constants/extra-components.d.ts +1 -1
  114. package/types/constants/sdk-version.d.ts +1 -1
  115. package/types/context/index.d.ts +1 -1
  116. package/types/context/types.d.ts +4 -4
  117. package/types/functions/evaluate/browser-runtime/browser.d.ts +2 -2
  118. package/types/functions/evaluate/browser-runtime/index.d.ts +1 -1
  119. package/types/functions/evaluate/choose-eval.d.ts +1 -1
  120. package/types/functions/evaluate/edge-runtime/edge-runtime.d.ts +1 -1
  121. package/types/functions/evaluate/edge-runtime/index.d.ts +1 -1
  122. package/types/functions/evaluate/evaluate.d.ts +1 -1
  123. package/types/functions/evaluate/helpers.d.ts +3 -3
  124. package/types/functions/evaluate/index.d.ts +1 -1
  125. package/types/functions/evaluate/node-runtime/index.d.ts +1 -1
  126. package/types/functions/evaluate/node-runtime/init.d.ts +10 -0
  127. package/types/functions/evaluate/node-runtime/node-runtime.d.ts +7 -1
  128. package/types/functions/evaluate/placeholder-runtime.d.ts +1 -1
  129. package/types/functions/fetch-builder-props.d.ts +3 -3
  130. package/types/functions/get-block-actions-handler.d.ts +2 -2
  131. package/types/functions/get-block-actions.d.ts +2 -2
  132. package/types/functions/get-block-component-options.d.ts +1 -1
  133. package/types/functions/get-block-properties.d.ts +2 -2
  134. package/types/functions/get-builder-search-params/index.d.ts +1 -1
  135. package/types/functions/get-content/generate-content-url.d.ts +1 -1
  136. package/types/functions/get-content/index.d.ts +2 -2
  137. package/types/functions/get-content/types.d.ts +3 -3
  138. package/types/functions/get-processed-block.d.ts +2 -2
  139. package/types/functions/get-style.d.ts +2 -2
  140. package/types/functions/is-editing.d.ts +1 -1
  141. package/types/functions/is-previewing.d.ts +1 -1
  142. package/types/functions/register-component.d.ts +1 -1
  143. package/types/functions/register.d.ts +2 -2
  144. package/types/functions/track/index.d.ts +2 -2
  145. package/types/functions/transform-block-properties.d.ts +2 -2
  146. package/types/functions/transform-block.d.ts +1 -1
  147. package/types/functions/transform-style-property.d.ts +2 -2
  148. package/types/helpers/ab-tests.d.ts +3 -3
  149. package/types/helpers/cookie.d.ts +1 -1
  150. package/types/helpers/localStorage.d.ts +2 -2
  151. package/types/helpers/logger.d.ts +1 -0
  152. package/types/helpers/preview-lru-cache/get.d.ts +1 -1
  153. package/types/helpers/preview-lru-cache/set.d.ts +1 -1
  154. package/types/helpers/sessionId.d.ts +1 -1
  155. package/types/helpers/subscribe-to-editor.d.ts +3 -3
  156. package/types/helpers/visitorId.d.ts +1 -1
  157. package/types/index-helpers/blocks-exports.d.ts +11 -11
  158. package/types/index.d.ts +3 -3
  159. package/types/server-index.d.ts +27 -27
  160. package/types/types/builder-content.d.ts +3 -3
  161. package/types/types/builder-props.d.ts +2 -2
  162. package/types/types/components.d.ts +2 -2
  163. package/types/types/enforced-partials.d.ts +1 -1
  164. package/lib/edge/select-b8ad0a4c.cjs +0 -1
  165. package/lib/edge/select-f260d051.js +0 -20
@@ -1,4 +1,4 @@
1
- import type { BuilderBlock } from '../../types/builder-block.js';
1
+ import type { BuilderBlock } from '../../types/builder-block';
2
2
  export interface VideoProps {
3
3
  attributes?: any;
4
4
  video?: string;
@@ -1,4 +1,4 @@
1
- import type { BuilderAnimation } from '../../types/builder-block.js';
1
+ import type { BuilderAnimation } from '../../types/builder-block';
2
2
  export declare function bindAnimations(animations: BuilderAnimation[]): void;
3
3
  export declare function triggerAnimation(animation: BuilderAnimation): void;
4
4
  export declare function bindHoverAnimation(animation: BuilderAnimation): void;
@@ -5,7 +5,7 @@ export type BlockProps = {
5
5
  registeredComponents: RegisteredComponents;
6
6
  linkComponent: any;
7
7
  };
8
- import type { BuilderContextInterface, RegisteredComponents } from "../../context/types.js";
9
- import type { BuilderBlock } from "../../types/builder-block.js";
8
+ import type { BuilderContextInterface, RegisteredComponents } from "../../context/types";
9
+ import type { BuilderBlock } from "../../types/builder-block";
10
10
  declare function Block(props: BlockProps): React.JSX.Element;
11
11
  export default Block;
@@ -1,11 +1,11 @@
1
- import type { BuilderContextInterface, RegisteredComponents } from '../../context/types.js';
2
- import type { BuilderBlock } from '../../types/builder-block.js';
3
- import type { RepeatData } from './types.js';
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.js").RegisteredComponent;
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.js";
7
- import type { BuilderBlock } from "../../../types/builder-block.js";
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.js";
13
- import type { BuilderBlock } from "../../../types/builder-block.js";
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,4 +1,4 @@
1
1
  import * as React from "react";
2
- import type { ComponentProps } from "./component-ref.helpers.js";
2
+ import type { ComponentProps } from "./component-ref.helpers";
3
3
  declare function ComponentRef(props: ComponentProps): React.JSX.Element;
4
4
  export default ComponentRef;
@@ -1,6 +1,6 @@
1
- import type { BuilderContextInterface, RegisteredComponents } from '../../../../context/types.js';
2
- import type { BuilderBlock } from '../../../../types/builder-block.js';
3
- import type { BuilderDataProps } from '../../../../types/builder-props.js';
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.js";
11
- import type { BuilderBlock } from "../../../types/builder-block.js";
12
- import type { Dictionary } from "../../../types/typescript.js";
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.js";
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.js';
2
- import type { BuilderBlock } from '../../types/builder-block.js';
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.js";
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
1
  import * as React from "react";
2
- import type { BlocksProps } from "./blocks.types.js";
2
+ import type { BlocksProps } from "./blocks.types";
3
3
  declare function Blocks(props: BlocksProps): React.JSX.Element;
4
4
  export default Blocks;
@@ -1,4 +1,4 @@
1
- import type { BuilderContextInterface, RegisteredComponents } from '../../context/types.js';
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.js";
8
- import type { ContentProps } from "../content.types.js";
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.js";
8
+ import type { CustomFont } from "./styles.helpers";
9
9
  declare function ContentStyles(props: Props): React.JSX.Element;
10
10
  export default ContentStyles;
@@ -1,4 +1,4 @@
1
1
  import * as React from "react";
2
- import type { ContentProps } from "./content.types.js";
2
+ import type { ContentProps } from "./content.types";
3
3
  declare function ContentComponent(props: ContentProps): React.JSX.Element;
4
4
  export default ContentComponent;
@@ -1,6 +1,6 @@
1
- import type { BuilderContent } from '../../types/builder-content.js';
2
- import type { Nullable } from '../../types/typescript.js';
3
- import type { ContentProps } from './content.types.js';
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.js';
2
- export type { ContentProps } from './contentProps.types.js';
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.js';
2
- import type { ContentVariantsPrps } from '../content-variants/content-variants.types.js';
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.js";
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.js';
2
- import type { ApiVersion } from '../../types/api-version.js';
3
- import type { BuilderContent } from '../../types/builder-content.js';
4
- import type { Nullable } from '../../types/typescript.js';
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.js';
2
- import type { BuilderContent } from '../../types/builder-content.js';
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("../../server-index.js").BuilderBlock[];
10
- inputs?: import("../../types/input.js").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.js").Breakpoints;
24
+ breakpoints?: import("../../types/builder-content").Breakpoints;
25
25
  };
26
26
  }[];
27
27
  export declare const checkShouldRenderVariants: ({ canTrack, content }: {
@@ -1,4 +1,4 @@
1
- import type { RegisteredComponent } from '../context/types.js';
1
+ import type { RegisteredComponent } from '../context/types';
2
2
  /**
3
3
  * Returns a list of all registered components.
4
4
  * NOTE: This needs to be a function to work around ESM circular dependencies.
@@ -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.js';
6
+ import type { RegisteredComponent } from '../context/types';
7
7
  export declare const getExtraComponents: () => RegisteredComponent[];
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.0.19";
1
+ export declare const SDK_VERSION = "1.0.21";
@@ -1 +1 @@
1
- export { default as BuilderContext } from './builder.context.js';
1
+ export { default as BuilderContext } from './builder.context';
@@ -1,8 +1,8 @@
1
1
  import type { BlocksWrapperProps } from '../components/blocks/blocks-wrapper';
2
- import type { ApiVersion } from '../types/api-version.js';
3
- import type { BuilderContent } from '../types/builder-content.js';
4
- import type { ComponentInfo } from '../types/components.js';
5
- import type { Dictionary, Nullable } from '../types/typescript.js';
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.js';
2
- import type { ExecutorArgs } from '../helpers.js';
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.js';
1
+ export { runInBrowser as evaluator } from './browser';
@@ -1,4 +1,4 @@
1
- import type { ExecutorArgs } from './helpers.js';
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.js';
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.js';
1
+ export { runInEdge as evaluator } from './edge-runtime';
@@ -1,4 +1,4 @@
1
- import type { EvaluatorArgs } from './helpers.js';
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.js';
2
- import { getUserAttributes } from '../track/helpers.js';
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.js").BuilderRenderContext | BuilderGlobals][];
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.js';
1
+ export { evaluate } from './evaluate';
@@ -1 +1 @@
1
- export { runInNode as evaluator } from './node-runtime.js';
1
+ export { runInNode as evaluator } from './node-runtime';
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This function initializes the SDK on a Node server. It handles importing the
3
+ * `isolated-vm` package which is needed for dynamic bindings.
4
+ *
5
+ * NOTE: this function cannot be called on the client. You must call this function
6
+ * from a server-only location, such as:
7
+ * - The NextJS Pages router's `_document.tsx`
8
+ * - Your Remix route's `loader`
9
+ */
10
+ export declare const initializeNodeRuntime: () => void;
@@ -1,2 +1,8 @@
1
- import type { ExecutorArgs } from '../helpers.js';
1
+ import type { ExecutorArgs } from '../helpers';
2
+ /**
3
+ * Set the `isolated-vm` instance to be used by the node runtime.
4
+ * This is useful for environments that are not able to rely on our
5
+ * `safeDynamicRequire` trick to import the `isolated-vm` package.
6
+ */
7
+ export declare const setIvm: (ivm: typeof import('isolated-vm')) => void;
2
8
  export declare const runInNode: ({ code, builder, context, event, localState, rootSetState, rootState }: ExecutorArgs) => any;
@@ -1,2 +1,2 @@
1
- import type { ExecutorArgs } from './helpers.js';
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.js';
2
- import type { Dictionary } from '../types/typescript.js';
3
- import type { GetContentOptions } from './get-content/types.js';
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.js';
2
- import type { BuilderBlock } from '../types/builder-block.js';
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.js';
2
- import type { BuilderBlock } from '../types/builder-block.js';
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.js';
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.js';
2
- import type { BuilderBlock } from '../types/builder-block.js';
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.js';
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.js';
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.js';
2
- import type { GetContentOptions } from './types.js';
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
  */
@@ -131,9 +131,9 @@ export interface GetContentOptions {
131
131
  /**
132
132
  * Optional override of the `fetch` function. (Defaults to global `fetch`)
133
133
  */
134
- fetch?: typeof global.fetch;
134
+ fetch?: (input: string, init?: object) => Promise<any>;
135
135
  /**
136
- * Optional fetch options to be passed to the `fetch` function.
136
+ * Optional fetch options to be passed as the second argument to the `fetch` function.
137
137
  */
138
- fetchOptions?: RequestInit;
138
+ fetchOptions?: object;
139
139
  }
@@ -1,5 +1,5 @@
1
- import type { BuilderContextInterface } from '../context/types.js';
2
- import type { BuilderBlock } from '../types/builder-block.js';
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.js';
2
- import type { BuilderBlock } from '../types/builder-block.js';
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.js';
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.js';
1
+ import type { Search } from '../helpers/search/search';
2
2
  export declare function isPreviewing(search?: Search): boolean;
@@ -1,4 +1,4 @@
1
- import type { ComponentInfo } from '../types/components.js';
1
+ import type { ComponentInfo } from '../types/components';
2
2
  export declare const createRegisterComponentMessage: (info: ComponentInfo) => {
3
3
  type: string;
4
4
  data: ComponentInfo;
@@ -1,5 +1,5 @@
1
- import type { BuilderBlock } from '../types/builder-block.js';
2
- import type { DeepPartial } from '../types/deep-partial.js';
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.js';
2
- import type { Dictionary } from '../../types/typescript.js';
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.js';
2
- import type { BuilderBlock } from '../types/builder-block.js';
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.js';
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.js';
2
- import type { BuilderBlock } from '../types/builder-block.js';
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.js';
2
- import type { CanTrack } from '../types/can-track.js';
3
- import type { Nullable } from '../types/typescript.js';
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,4 +1,4 @@
1
- import type { CanTrack } from '../types/can-track.js';
1
+ import type { CanTrack } from '../types/can-track';
2
2
  type GetCookieArgs = {
3
3
  name: string;
4
4
  } & CanTrack;
@@ -1,5 +1,5 @@
1
- import type { CanTrack } from '../types/can-track.js';
2
- import type { Nullable } from './nullable.js';
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,3 +1,4 @@
1
+ export declare const MSG_PREFIX = "[Builder.io]: ";
1
2
  export declare const logger: {
2
3
  log: (...message: any[]) => void;
3
4
  error: (...message: any[]) => void;
@@ -1,2 +1,2 @@
1
- import type { BuilderContent } from '../../types/builder-content.js';
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 { BuilderContent } from '../../types/builder-content.js';
1
+ import type { BuilderContent } from '../../types/builder-content';
2
2
  export declare function postPreviewContent({ key, value }: {
3
3
  key: string;
4
4
  value: BuilderContent;
@@ -1,4 +1,4 @@
1
- import type { CanTrack } from '../types/can-track.js';
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 }: {