@builder.io/sdk-react 0.12.0 → 0.12.2

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@builder.io/sdk-react",
3
3
  "description": "Builder.io SDK for React",
4
- "version": "0.12.0",
4
+ "version": "0.12.2",
5
5
  "homepage": "https://github.com/BuilderIO/builder/tree/main/packages/sdks/output/react",
6
6
  "type": "module",
7
7
  "repository": {
@@ -0,0 +1,2 @@
1
+ import type { ComponentInfo } from '../../types/components.js';
2
+ export declare const componentInfo: ComponentInfo;
@@ -0,0 +1,11 @@
1
+ import * as React from "react";
2
+ export interface DropzoneProps {
3
+ name: string;
4
+ builderBlock: BuilderBlock;
5
+ builderContext: BuilderContextInterface;
6
+ attributes: any;
7
+ }
8
+ import type { BuilderContextInterface } from "../../context/types.js";
9
+ import type { BuilderBlock } from "../../types/builder-block.js";
10
+ declare function Slot(props: DropzoneProps): React.JSX.Element;
11
+ export default Slot;
@@ -1,7 +1,6 @@
1
1
  import type { BuilderContextInterface, RegisteredComponents } from '../../context/types.js';
2
2
  import type { BuilderBlock } from '../../types/builder-block.js';
3
3
  import type { RepeatData } from './types.js';
4
- export declare const isEmptyHtmlElement: (tagName: unknown) => boolean;
5
4
  export declare const getComponent: ({ block, context, registeredComponents }: {
6
5
  block: BuilderBlock;
7
6
  context: BuilderContextInterface;
@@ -1,17 +1,13 @@
1
1
  import * as React from "react";
2
- /**
3
- * This import is used by the Svelte SDK. Do not remove.
4
- */
5
2
  type BlockWrapperProps = {
6
3
  Wrapper: string;
7
4
  block: BuilderBlock;
8
5
  context: BuilderContextInterface;
9
- hasChildren: boolean;
10
6
  };
11
7
  /**
12
8
  * This component renders a block's wrapper HTML element (from the block's `tagName` property).
13
- * It reuses the exact same logic as the `InteractiveElement` component, but we need to have 2 separate components for
14
- * Svelte's sake, as it needs to know at compile-time whether to use: * - `<svelte:element>` (for HTML element) or * - `<svelte:component>` (for custom components) */ import type { BuilderContextInterface } from "../../../context/types.js";
9
+ */
10
+ import type { BuilderContextInterface } from "../../../context/types.js";
15
11
  import type { BuilderBlock } from "../../../types/builder-block.js";
16
12
  import type { PropsWithChildren } from "../../../types/typescript.js";
17
13
  declare function BlockWrapper(props: PropsWithChildren<BlockWrapperProps>): React.JSX.Element;
@@ -62,4 +62,8 @@ export interface ContentVariantsPrps {
62
62
  * Additonal props to pass to `blocksWrapper`. Defaults to `{}`.
63
63
  */
64
64
  blocksWrapperProps?: any;
65
+ /**
66
+ * List of hosts to allow editing content from.
67
+ */
68
+ trustedHosts?: string[];
65
69
  }
@@ -0,0 +1,8 @@
1
+ import * as React from "react";
2
+ import type { PropsWithChildren } from "../../types/typescript.js";
3
+ declare function DynamicRenderer(props: PropsWithChildren<{
4
+ TagName: any;
5
+ attributes: any;
6
+ actionAttributes: any;
7
+ }>): React.JSX.Element;
8
+ export default DynamicRenderer;
@@ -0,0 +1 @@
1
+ export declare const isEmptyElement: (tagName: any) => boolean;
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.12.0";
1
+ export declare const SDK_VERSION = "0.12.2";
@@ -0,0 +1,3 @@
1
+ export declare function isFromTrustedHost(trustedHosts: string[] | undefined, e: {
2
+ origin: string;
3
+ }): boolean;
@@ -3,4 +3,5 @@ export declare const setupBrowserForEditing: (options?: {
3
3
  enrich?: boolean;
4
4
  includeRefs?: boolean;
5
5
  locale?: string;
6
+ trustedHosts?: string[];
6
7
  }) => void;