@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,6 +1,6 @@
1
- import type { ContentProps } from '../components/content/content.types.js';
2
- import type { BuilderAnimation } from '../types/builder-block.js';
3
- import type { BuilderContent } from '../types/builder-content.js';
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.js';
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.js';
2
- export { default as Columns } from '../blocks/columns/index.js';
3
- export { default as Fragment } from '../blocks/fragment/index.js';
4
- export { default as Image } from '../blocks/image/index.js';
5
- export { default as Section } from '../blocks/section/index.js';
6
- export { default as Symbol } from '../blocks/symbol/index.js';
7
- export { default as Text } from '../blocks/text/index.js';
8
- export { default as Video } from '../blocks/video/index.js';
9
- export { default as Blocks } from '../components/blocks/index.js';
10
- export { default as Content } from '../components/content-variants/index.js';
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.js';
14
+ export { BuilderContext } from '../context/index';
package/types/index.d.ts CHANGED
@@ -1,10 +1,10 @@
1
- export * from './index-helpers/top-of-file.js';
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.js';
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.js';
10
+ export * from './server-index';
@@ -1,39 +1,39 @@
1
- export * from './index-helpers/top-of-file.js';
1
+ export * from './index-helpers/top-of-file';
2
2
  /**
3
3
  * Component Prop types
4
4
  */
5
- export type { ButtonProps } from './blocks/button/button.types.js';
6
- export type { ColumnProps } from './blocks/columns/columns.types.js';
7
- export type { FragmentProps } from './blocks/fragment/fragment.types.js';
8
- export type { ImageProps } from './blocks/image/image.types.js';
9
- export type { SectionProps } from './blocks/section/section.types.js';
10
- export type { SymbolProps } from './blocks/symbol/symbol.types.js';
11
- export type { TextProps } from './blocks/text/text.types.js';
12
- export type { VideoProps } from './blocks/video/video.types.js';
13
- export type { BlocksProps } from './components/blocks/blocks.types.js';
14
- export type { ContentVariantsPrps as ContentProps } from './components/content-variants/content-variants.types.js';
5
+ export type { ButtonProps } from './blocks/button/button.types';
6
+ export type { ColumnProps } from './blocks/columns/columns.types';
7
+ export type { FragmentProps } from './blocks/fragment/fragment.types';
8
+ export type { ImageProps } from './blocks/image/image.types';
9
+ export type { SectionProps } from './blocks/section/section.types';
10
+ export type { SymbolProps } from './blocks/symbol/symbol.types';
11
+ export type { TextProps } from './blocks/text/text.types';
12
+ export type { VideoProps } from './blocks/video/video.types';
13
+ export type { BlocksProps } from './components/blocks/blocks.types';
14
+ export type { ContentVariantsPrps as ContentProps } from './components/content-variants/content-variants.types';
15
15
  /**
16
16
  * General Builder types
17
17
  */
18
- export type { RegisteredComponent } from './context/types.js';
19
- export type { BuilderBlock } from './types/builder-block.js';
20
- export type { BuilderContent } from './types/builder-content.js';
21
- export type { ComponentInfo } from './types/components.js';
18
+ export type { RegisteredComponent } from './context/types';
19
+ export type { BuilderBlock } from './types/builder-block';
20
+ export type { BuilderContent } from './types/builder-content';
21
+ export type { ComponentInfo } from './types/components';
22
22
  /**
23
23
  * Helper functions
24
24
  */
25
- export { isEditing } from './functions/is-editing.js';
26
- export { isPreviewing } from './functions/is-previewing.js';
27
- export { createRegisterComponentMessage } from './functions/register-component.js';
28
- export { register } from './functions/register.js';
29
- export type { InsertMenuConfig, InsertMenuItem } from './functions/register.js';
30
- export { setEditorSettings } from './functions/set-editor-settings.js';
31
- export type { Settings } from './functions/set-editor-settings.js';
32
- export { getBuilderSearchParams } from './functions/get-builder-search-params/index.js';
33
- export { track } from './functions/track/index.js';
34
- export { subscribeToEditor } from './helpers/subscribe-to-editor.js';
25
+ export { isEditing } from './functions/is-editing';
26
+ export { isPreviewing } from './functions/is-previewing';
27
+ export { createRegisterComponentMessage } from './functions/register-component';
28
+ export { register } from './functions/register';
29
+ export type { InsertMenuConfig, InsertMenuItem } from './functions/register';
30
+ export { setEditorSettings } from './functions/set-editor-settings';
31
+ export type { Settings } from './functions/set-editor-settings';
32
+ export { getBuilderSearchParams } from './functions/get-builder-search-params/index';
33
+ export { track } from './functions/track/index';
34
+ export { subscribeToEditor } from './helpers/subscribe-to-editor';
35
35
  /**
36
36
  * Content fetching
37
37
  */
38
- export { fetchBuilderProps } from './functions/fetch-builder-props.js';
39
- export { _processContentResult, fetchEntries, fetchOneEntry } from './functions/get-content/index.js';
38
+ export { fetchBuilderProps } from './functions/fetch-builder-props';
39
+ export { _processContentResult, fetchEntries, fetchOneEntry } from './functions/get-content/index';
@@ -1,6 +1,6 @@
1
- import type { BuilderBlock } from './builder-block.js';
2
- import type { Input } from './input.js';
3
- import type { Nullable } from './typescript.js';
1
+ import type { BuilderBlock } from './builder-block';
2
+ import type { Input } from './input';
3
+ import type { Nullable } from './typescript';
4
4
  export interface Breakpoints {
5
5
  small: number;
6
6
  medium: number;
@@ -1,5 +1,5 @@
1
- import type { BuilderContextInterface, RegisteredComponents } from '../context/types.js';
2
- import type { BuilderBlock } from './builder-block.js';
1
+ import type { BuilderContextInterface, RegisteredComponents } from '../context/types';
2
+ import type { BuilderBlock } from './builder-block';
3
3
  export type BuilderDataProps = {
4
4
  builderBlock: BuilderBlock;
5
5
  builderContext: BuilderContextInterface;
@@ -1,5 +1,5 @@
1
- import type { BuilderElement } from './element.js';
2
- import type { Input } from './input.js';
1
+ import type { BuilderElement } from './element';
2
+ import type { Input } from './input';
3
3
  export interface ComponentInfo {
4
4
  /**
5
5
  * Name your component something unique, e.g. 'MyButton'. You can override built-in components
@@ -1,4 +1,4 @@
1
- import type { Prettify } from './typescript.js';
1
+ import type { Prettify } from './typescript';
2
2
  /**
3
3
  * Lol Typescript
4
4
  * https://stackoverflow.com/questions/49927523/disallow-call-with-any/49928360#49928360
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),l=require("react"),n=require("./server-entry-00891f33.cjs");function i(e){var u;return l.createElement("select",{...e.attributes,value:e.value,key:n.isEditing()&&e.defaultValue?e.defaultValue:"default-key",defaultValue:e.defaultValue,name:e.name},(u=e.options)==null?void 0:u.map(t=>a.jsx("option",{value:t.value,children:t.name||t.value})))}exports.default=i;
@@ -1,20 +0,0 @@
1
- import { jsx as l } from "react/jsx-runtime";
2
- import { createElement as u } from "react";
3
- import { isEditing as m } from "./server-entry-d46a218d.js";
4
- function d(e) {
5
- var t;
6
- return /* @__PURE__ */ u(
7
- "select",
8
- {
9
- ...e.attributes,
10
- value: e.value,
11
- key: m() && e.defaultValue ? e.defaultValue : "default-key",
12
- defaultValue: e.defaultValue,
13
- name: e.name
14
- },
15
- (t = e.options) == null ? void 0 : t.map((a) => /* @__PURE__ */ l("option", { value: a.value, children: a.name || a.value }))
16
- );
17
- }
18
- export {
19
- d as default
20
- };