@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.
- package/lib/browser/blocks-exports.cjs +2 -2
- package/lib/browser/blocks-exports.mjs +2 -2
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +1 -1
- package/lib/browser/init.cjs +1 -0
- package/lib/browser/init.mjs +13 -0
- package/lib/browser/{server-entry-cfff49d1.js → server-entry-166d8ec9.js} +1 -1
- package/lib/browser/{server-entry-1a86f409.cjs → server-entry-c6e9a10a.cjs} +1 -1
- package/lib/browser/server-entry.cjs +1 -1
- package/lib/browser/server-entry.mjs +1 -1
- package/lib/edge/{blocks-1ea14427.js → blocks-793a81d9.js} +36 -37
- package/lib/edge/{blocks-5341123d.cjs → blocks-c26b2ffc.cjs} +5 -5
- package/lib/edge/blocks-exports.cjs +1 -1
- package/lib/edge/blocks-exports.mjs +2 -2
- package/lib/edge/{button-f5764a4c.js → button-659db379.js} +2 -2
- package/lib/edge/{button-c6255c8e.cjs → button-f62c1e15.cjs} +1 -1
- package/lib/edge/{columns-17090869.js → columns-07ef2925.js} +3 -3
- package/lib/edge/{columns-01e0bb50.cjs → columns-5fe66f05.cjs} +1 -1
- package/lib/edge/{content-variants-3961c4ee.cjs → content-variants-9aedb66d.cjs} +1 -1
- package/lib/edge/{content-variants-bfca78f9.js → content-variants-fcba4b5b.js} +8 -8
- package/lib/edge/{form-b97fba27.cjs → form-5c293cd8.cjs} +1 -1
- package/lib/edge/{form-39e97f30.js → form-82e6d435.js} +3 -3
- package/lib/edge/{get-class-prop-name-859a7f60.js → get-class-prop-name-6242df6a.js} +1 -1
- package/lib/edge/{get-class-prop-name-f1301669.cjs → get-class-prop-name-c54d7ada.cjs} +1 -1
- package/lib/edge/{img-b4ff1bef.js → img-11c91db6.js} +1 -1
- package/lib/edge/{img-0c1e53c0.cjs → img-73cc7d69.cjs} +1 -1
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +1 -1
- package/lib/edge/init.cjs +1 -0
- package/lib/edge/init.mjs +13 -0
- package/lib/edge/{input-c6fee09c.js → input-6b8ac645.js} +1 -1
- package/lib/edge/{input-2103da14.cjs → input-9c7d1291.cjs} +1 -1
- package/lib/edge/select-42de6b22.cjs +1 -0
- package/lib/edge/select-f324140d.js +20 -0
- package/lib/edge/{server-entry-d46a218d.js → server-entry-396b1a7b.js} +1 -1
- package/lib/edge/{server-entry-00891f33.cjs → server-entry-bc7f82dd.cjs} +1 -1
- package/lib/edge/server-entry.cjs +1 -1
- package/lib/edge/server-entry.mjs +1 -1
- package/lib/edge/{slot-c9f94715.js → slot-4e55a3d1.js} +3 -3
- package/lib/edge/{slot-8de7d746.cjs → slot-746347ff.cjs} +1 -1
- package/lib/edge/{symbol-636383eb.cjs → symbol-4b8cffaa.cjs} +1 -1
- package/lib/edge/{symbol-324dadc8.js → symbol-e3905b86.js} +2 -2
- package/lib/node/blocks-exports.cjs +30 -70
- package/lib/node/blocks-exports.mjs +891 -1017
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +23 -22
- package/lib/node/init.cjs +1 -0
- package/lib/node/init.mjs +9 -0
- package/lib/node/node-runtime-2a838da2.cjs +48 -0
- package/lib/node/node-runtime-eb3ca94b.js +155 -0
- package/lib/node/{server-entry-8c84ddbd.js → server-entry-54c1491b.js} +2 -1
- package/lib/node/{server-entry-ff6fc2b4.cjs → server-entry-cb0df432.cjs} +2 -2
- package/lib/node/server-entry.cjs +1 -1
- package/lib/node/server-entry.mjs +1 -1
- package/package.json +6 -1
- package/types/blocks/button/button.d.ts +1 -1
- package/types/blocks/button/button.types.d.ts +1 -1
- package/types/blocks/button/component-info.d.ts +1 -1
- package/types/blocks/columns/columns.d.ts +1 -1
- package/types/blocks/columns/columns.types.d.ts +2 -2
- package/types/blocks/columns/component-info.d.ts +1 -1
- package/types/blocks/custom-code/component-info.d.ts +1 -1
- package/types/blocks/embed/component-info.d.ts +1 -1
- package/types/blocks/form/form/component-info.d.ts +1 -1
- package/types/blocks/form/form/form.d.ts +2 -2
- package/types/blocks/form/input/component-info.d.ts +1 -1
- package/types/blocks/form/select/component-info.d.ts +1 -1
- package/types/blocks/form/submit-button/component-info.d.ts +1 -1
- package/types/blocks/fragment/component-info.d.ts +1 -1
- package/types/blocks/fragment/fragment.d.ts +1 -1
- package/types/blocks/image/component-info.d.ts +1 -1
- package/types/blocks/image/image.d.ts +1 -1
- package/types/blocks/image/image.types.d.ts +1 -1
- package/types/blocks/img/component-info.d.ts +1 -1
- package/types/blocks/raw-text/component-info.d.ts +1 -1
- package/types/blocks/section/component-info.d.ts +1 -1
- package/types/blocks/section/section.d.ts +1 -1
- package/types/blocks/slot/component-info.d.ts +1 -1
- package/types/blocks/slot/slot.d.ts +1 -1
- package/types/blocks/symbol/component-info.d.ts +1 -1
- package/types/blocks/symbol/symbol.d.ts +1 -1
- package/types/blocks/symbol/symbol.helpers.d.ts +2 -2
- package/types/blocks/symbol/symbol.types.d.ts +2 -2
- package/types/blocks/text/component-info.d.ts +1 -1
- package/types/blocks/text/text.d.ts +1 -1
- package/types/blocks/textarea/component-info.d.ts +1 -1
- package/types/blocks/video/component-info.d.ts +1 -1
- package/types/blocks/video/video.d.ts +1 -1
- package/types/blocks/video/video.types.d.ts +1 -1
- package/types/components/block/animator.d.ts +1 -1
- package/types/components/block/block.d.ts +2 -2
- package/types/components/block/block.helpers.d.ts +4 -4
- package/types/components/block/components/block-styles.d.ts +2 -2
- package/types/components/block/components/block-wrapper.d.ts +2 -2
- package/types/components/block/components/component-ref/component-ref.d.ts +1 -1
- package/types/components/block/components/component-ref/component-ref.helpers.d.ts +3 -3
- package/types/components/block/components/interactive-element.d.ts +3 -3
- package/types/components/block/components/repeated-block.d.ts +1 -1
- package/types/components/block/types.d.ts +2 -2
- package/types/components/blocks/blocks-wrapper.d.ts +1 -1
- package/types/components/blocks/blocks.d.ts +1 -1
- package/types/components/blocks/blocks.types.d.ts +1 -1
- package/types/components/content/components/enable-editor.d.ts +2 -2
- package/types/components/content/components/styles.d.ts +1 -1
- package/types/components/content/content.d.ts +1 -1
- package/types/components/content/content.helpers.d.ts +3 -3
- package/types/components/content/content.types.d.ts +2 -2
- package/types/components/content/contentProps.types.d.ts +2 -2
- package/types/components/content-variants/content-variants.d.ts +1 -1
- package/types/components/content-variants/content-variants.types.d.ts +4 -4
- package/types/components/content-variants/helpers.d.ts +5 -5
- package/types/constants/builder-registered-components.d.ts +1 -1
- package/types/constants/extra-components.d.ts +1 -1
- package/types/constants/sdk-version.d.ts +1 -1
- package/types/context/index.d.ts +1 -1
- package/types/context/types.d.ts +4 -4
- package/types/functions/evaluate/browser-runtime/browser.d.ts +2 -2
- package/types/functions/evaluate/browser-runtime/index.d.ts +1 -1
- package/types/functions/evaluate/choose-eval.d.ts +1 -1
- package/types/functions/evaluate/edge-runtime/edge-runtime.d.ts +1 -1
- package/types/functions/evaluate/edge-runtime/index.d.ts +1 -1
- package/types/functions/evaluate/evaluate.d.ts +1 -1
- package/types/functions/evaluate/helpers.d.ts +3 -3
- package/types/functions/evaluate/index.d.ts +1 -1
- package/types/functions/evaluate/node-runtime/index.d.ts +1 -1
- package/types/functions/evaluate/node-runtime/init.d.ts +10 -0
- package/types/functions/evaluate/node-runtime/node-runtime.d.ts +7 -1
- package/types/functions/evaluate/placeholder-runtime.d.ts +1 -1
- package/types/functions/fetch-builder-props.d.ts +3 -3
- package/types/functions/get-block-actions-handler.d.ts +2 -2
- package/types/functions/get-block-actions.d.ts +2 -2
- package/types/functions/get-block-component-options.d.ts +1 -1
- package/types/functions/get-block-properties.d.ts +2 -2
- package/types/functions/get-builder-search-params/index.d.ts +1 -1
- package/types/functions/get-content/generate-content-url.d.ts +1 -1
- package/types/functions/get-content/index.d.ts +2 -2
- package/types/functions/get-content/types.d.ts +3 -3
- package/types/functions/get-processed-block.d.ts +2 -2
- package/types/functions/get-style.d.ts +2 -2
- package/types/functions/is-editing.d.ts +1 -1
- package/types/functions/is-previewing.d.ts +1 -1
- package/types/functions/register-component.d.ts +1 -1
- package/types/functions/register.d.ts +2 -2
- package/types/functions/track/index.d.ts +2 -2
- package/types/functions/transform-block-properties.d.ts +2 -2
- package/types/functions/transform-block.d.ts +1 -1
- package/types/functions/transform-style-property.d.ts +2 -2
- package/types/helpers/ab-tests.d.ts +3 -3
- package/types/helpers/cookie.d.ts +1 -1
- package/types/helpers/localStorage.d.ts +2 -2
- package/types/helpers/logger.d.ts +1 -0
- package/types/helpers/preview-lru-cache/get.d.ts +1 -1
- package/types/helpers/preview-lru-cache/set.d.ts +1 -1
- package/types/helpers/sessionId.d.ts +1 -1
- package/types/helpers/subscribe-to-editor.d.ts +3 -3
- package/types/helpers/visitorId.d.ts +1 -1
- package/types/index-helpers/blocks-exports.d.ts +11 -11
- package/types/index.d.ts +3 -3
- package/types/server-index.d.ts +27 -27
- package/types/types/builder-content.d.ts +3 -3
- package/types/types/builder-props.d.ts +2 -2
- package/types/types/components.d.ts +2 -2
- package/types/types/enforced-partials.d.ts +1 -1
- package/lib/edge/select-b8ad0a4c.cjs +0 -1
- package/lib/edge/select-f260d051.js +0 -20
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ContentProps } from '../components/content/content.types
|
|
2
|
-
import type { BuilderAnimation } from '../types/builder-block
|
|
3
|
-
import type { BuilderContent } from '../types/builder-content
|
|
1
|
+
import type { ContentProps } from '../components/content/content.types';
|
|
2
|
+
import type { BuilderAnimation } from '../types/builder-block';
|
|
3
|
+
import type { BuilderContent } from '../types/builder-content';
|
|
4
4
|
type ContentListener = Required<Pick<ContentProps, 'model' | 'trustedHosts'>> & {
|
|
5
5
|
callbacks: {
|
|
6
6
|
contentUpdate: (updatedContent: BuilderContent) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CanTrack } from '../types/can-track
|
|
1
|
+
import type { CanTrack } from '../types/can-track';
|
|
2
2
|
export declare const getVisitorId: ({ canTrack }: CanTrack) => string | undefined;
|
|
3
3
|
export declare const createVisitorId: () => string;
|
|
4
4
|
export declare const setVisitorId: ({ id, canTrack }: {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
export { default as Button } from '../blocks/button/index
|
|
2
|
-
export { default as Columns } from '../blocks/columns/index
|
|
3
|
-
export { default as Fragment } from '../blocks/fragment/index
|
|
4
|
-
export { default as Image } from '../blocks/image/index
|
|
5
|
-
export { default as Section } from '../blocks/section/index
|
|
6
|
-
export { default as Symbol } from '../blocks/symbol/index
|
|
7
|
-
export { default as Text } from '../blocks/text/index
|
|
8
|
-
export { default as Video } from '../blocks/video/index
|
|
9
|
-
export { default as Blocks } from '../components/blocks/index
|
|
10
|
-
export { default as Content } from '../components/content-variants/index
|
|
1
|
+
export { default as Button } from '../blocks/button/index';
|
|
2
|
+
export { default as Columns } from '../blocks/columns/index';
|
|
3
|
+
export { default as Fragment } from '../blocks/fragment/index';
|
|
4
|
+
export { default as Image } from '../blocks/image/index';
|
|
5
|
+
export { default as Section } from '../blocks/section/index';
|
|
6
|
+
export { default as Symbol } from '../blocks/symbol/index';
|
|
7
|
+
export { default as Text } from '../blocks/text/index';
|
|
8
|
+
export { default as Video } from '../blocks/video/index';
|
|
9
|
+
export { default as Blocks } from '../components/blocks/index';
|
|
10
|
+
export { default as Content } from '../components/content-variants/index';
|
|
11
11
|
/**
|
|
12
12
|
* Builder Context
|
|
13
13
|
*/
|
|
14
|
-
export { BuilderContext } from '../context/index
|
|
14
|
+
export { BuilderContext } from '../context/index';
|
package/types/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export * from './index-helpers/top-of-file
|
|
1
|
+
export * from './index-helpers/top-of-file';
|
|
2
2
|
/**
|
|
3
3
|
* In the React SDK, this file is marked with `use client`.
|
|
4
4
|
*/
|
|
5
|
-
export * from './index-helpers/blocks-exports
|
|
5
|
+
export * from './index-helpers/blocks-exports';
|
|
6
6
|
/**
|
|
7
7
|
* In the React SDK, this file is not marked with `use client`, to allow
|
|
8
8
|
* NextJS App Directory to use the SDK helper functions without issues.
|
|
9
9
|
*/
|
|
10
|
-
export * from './server-index
|
|
10
|
+
export * from './server-index';
|
package/types/server-index.d.ts
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
export * from './index-helpers/top-of-file
|
|
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
|
|
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
|
|
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
|
|
19
|
-
export type { BuilderBlock } from './types/builder-block
|
|
20
|
-
export type { BuilderContent } from './types/builder-content
|
|
21
|
-
export type { ComponentInfo } from './types/components
|
|
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
|
|
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
|
|
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
|
|
39
|
-
export { _processContentResult, fetchEntries, fetchOneEntry } from './functions/get-content/index
|
|
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
|
|
2
|
-
import type { Input } from './input
|
|
3
|
-
import type { Nullable } from './typescript
|
|
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
|
|
2
|
-
import type { BuilderBlock } from './builder-block
|
|
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
|
|
2
|
-
import type { Input } from './input
|
|
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 +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
|
-
};
|