@webstudio-is/react-sdk 0.57.0 → 0.58.0
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/app/custom-components/shared/remix-link.js +5 -1
- package/lib/cjs/app/custom-components/shared/remix-link.js +5 -1
- package/lib/cjs/components/link.js +4 -1
- package/lib/cjs/props.js +19 -5
- package/lib/components/link.js +4 -1
- package/lib/props.js +19 -5
- package/lib/types/app/custom-components/image.d.ts +6 -0
- package/lib/types/app/custom-components/index.d.ts +26 -0
- package/lib/types/app/custom-components/link-block.d.ts +6 -0
- package/lib/types/app/custom-components/link.d.ts +6 -0
- package/lib/types/app/custom-components/rich-text-link.d.ts +6 -0
- package/lib/types/app/custom-components/shared/remix-link.d.ts +10 -0
- package/lib/types/app/handle-request.server.d.ts +2 -0
- package/lib/types/app/index.d.ts +3 -0
- package/lib/types/app/params.d.ts +6 -0
- package/lib/types/app/root.d.ts +8 -0
- package/lib/types/components/__generated__/blockquote.props.d.ts +2 -0
- package/lib/types/components/__generated__/body.props.d.ts +2 -0
- package/lib/types/components/__generated__/bold.props.d.ts +2 -0
- package/lib/types/components/__generated__/box.props.d.ts +2 -0
- package/lib/types/components/__generated__/button.props.d.ts +2 -0
- package/lib/types/components/__generated__/code.props.d.ts +2 -0
- package/lib/types/components/__generated__/form.props.d.ts +2 -0
- package/lib/types/components/__generated__/fragment.props.d.ts +2 -0
- package/lib/types/components/__generated__/heading.props.d.ts +2 -0
- package/lib/types/components/__generated__/image.props.d.ts +2 -0
- package/lib/types/components/__generated__/input.props.d.ts +2 -0
- package/lib/types/components/__generated__/italic.props.d.ts +2 -0
- package/lib/types/components/__generated__/link-block.props.d.ts +2 -0
- package/lib/types/components/__generated__/link.props.d.ts +2 -0
- package/lib/types/components/__generated__/list-item.props.d.ts +2 -0
- package/lib/types/components/__generated__/list.props.d.ts +2 -0
- package/lib/types/components/__generated__/paragraph.props.d.ts +2 -0
- package/lib/types/components/__generated__/rich-text-link.props.d.ts +2 -0
- package/lib/types/components/__generated__/separator.props.d.ts +2 -0
- package/lib/types/components/__generated__/slot.props.d.ts +2 -0
- package/lib/types/components/__generated__/span.props.d.ts +2 -0
- package/lib/types/components/__generated__/subscript.props.d.ts +2 -0
- package/lib/types/components/__generated__/superscript.props.d.ts +2 -0
- package/lib/types/components/__generated__/text-block.props.d.ts +2 -0
- package/lib/types/components/blockquote.d.ts +3 -0
- package/lib/types/components/blockquote.stories.d.ts +5 -0
- package/lib/types/components/blockquote.ws.d.ts +3 -0
- package/lib/types/components/body.d.ts +3 -0
- package/lib/types/components/body.stories.d.ts +6 -0
- package/lib/types/components/body.ws.d.ts +3 -0
- package/lib/types/components/bold.d.ts +3 -0
- package/lib/types/components/bold.stories.d.ts +5 -0
- package/lib/types/components/bold.ws.d.ts +3 -0
- package/lib/types/components/box.d.ts +7 -0
- package/lib/types/components/box.stories.d.ts +9 -0
- package/lib/types/components/box.ws.d.ts +3 -0
- package/lib/types/components/button.d.ts +7 -0
- package/lib/types/components/button.stories.d.ts +9 -0
- package/lib/types/components/button.ws.d.ts +3 -0
- package/lib/types/components/code.d.ts +9 -0
- package/lib/types/components/code.stories.d.ts +11 -0
- package/lib/types/components/code.ws.d.ts +3 -0
- package/lib/types/components/component-meta.d.ts +610 -0
- package/lib/types/components/components-utils.d.ts +34 -0
- package/lib/types/components/components.d.ts +31 -0
- package/lib/types/components/form.d.ts +3 -0
- package/lib/types/components/form.stories.d.ts +5 -0
- package/lib/types/components/form.ws.d.ts +3 -0
- package/lib/types/components/fragment.d.ts +6 -0
- package/lib/types/components/fragment.ws.d.ts +3 -0
- package/lib/types/components/heading.d.ts +7 -0
- package/lib/types/components/heading.stories.d.ts +9 -0
- package/lib/types/components/heading.ws.d.ts +3 -0
- package/lib/types/components/image.d.ts +3 -0
- package/lib/types/components/image.stories.d.ts +5 -0
- package/lib/types/components/image.ws.d.ts +3 -0
- package/lib/types/components/index.d.ts +17 -0
- package/lib/types/components/input.d.ts +3 -0
- package/lib/types/components/input.stories.d.ts +5 -0
- package/lib/types/components/input.ws.d.ts +3 -0
- package/lib/types/components/italic.d.ts +3 -0
- package/lib/types/components/italic.stories.d.ts +5 -0
- package/lib/types/components/italic.ws.d.ts +3 -0
- package/lib/types/components/link-block.d.ts +3 -0
- package/lib/types/components/link-block.stories.d.ts +13 -0
- package/lib/types/components/link-block.ws.d.ts +3 -0
- package/lib/types/components/link.d.ts +9 -0
- package/lib/types/components/link.stories.d.ts +13 -0
- package/lib/types/components/link.ws.d.ts +3 -0
- package/lib/types/components/list-item.d.ts +3 -0
- package/lib/types/components/list-item.stories.d.ts +5 -0
- package/lib/types/components/list-item.ws.d.ts +3 -0
- package/lib/types/components/list.d.ts +9 -0
- package/lib/types/components/list.stories.d.ts +9 -0
- package/lib/types/components/list.ws.d.ts +3 -0
- package/lib/types/components/paragraph.d.ts +3 -0
- package/lib/types/components/paragraph.stories.d.ts +5 -0
- package/lib/types/components/paragraph.ws.d.ts +3 -0
- package/lib/types/components/rich-text-link.d.ts +2 -0
- package/lib/types/components/rich-text-link.stories.d.ts +13 -0
- package/lib/types/components/rich-text-link.ws.d.ts +3 -0
- package/lib/types/components/separator.d.ts +3 -0
- package/lib/types/components/separator.stories.d.ts +5 -0
- package/lib/types/components/separator.ws.d.ts +3 -0
- package/lib/types/components/slot.d.ts +6 -0
- package/lib/types/components/slot.stories.d.ts +9 -0
- package/lib/types/components/slot.ws.d.ts +3 -0
- package/lib/types/components/span.d.ts +3 -0
- package/lib/types/components/span.stories.d.ts +5 -0
- package/lib/types/components/span.ws.d.ts +3 -0
- package/lib/types/components/subscript.d.ts +3 -0
- package/lib/types/components/subscript.stories.d.ts +5 -0
- package/lib/types/components/subscript.ws.d.ts +3 -0
- package/lib/types/components/superscript.d.ts +3 -0
- package/lib/types/components/superscript.stories.d.ts +5 -0
- package/lib/types/components/superscript.ws.d.ts +3 -0
- package/lib/types/components/text-block.d.ts +3 -0
- package/lib/types/components/text-block.stories.d.ts +5 -0
- package/lib/types/components/text-block.ws.d.ts +3 -0
- package/lib/types/context.d.ts +9 -0
- package/lib/types/css/css.d.ts +52 -0
- package/lib/types/css/get-browser-style.d.ts +2 -0
- package/lib/types/css/global-rules.d.ts +43 -0
- package/lib/types/css/index.d.ts +4 -0
- package/lib/types/css/normalize-type-check.d.ts +1 -0
- package/lib/types/css/normalize.d.ts +2429 -0
- package/lib/types/css/presets.d.ts +38 -0
- package/lib/types/css/style-rules.d.ts +202 -0
- package/lib/types/css/style-rules.test.d.ts +1 -0
- package/lib/types/index.d.ts +9 -0
- package/lib/types/props.d.ts +158 -0
- package/lib/types/props.test.d.ts +1 -0
- package/lib/types/pubsub/create.d.ts +28 -0
- package/lib/types/pubsub/index.d.ts +1 -0
- package/lib/types/pubsub/raf-queue.d.ts +1 -0
- package/lib/types/tree/create-elements-tree.d.ts +29 -0
- package/lib/types/tree/index.d.ts +3 -0
- package/lib/types/tree/root.d.ts +25 -0
- package/lib/types/tree/session-storage-polyfill.d.ts +2 -0
- package/lib/types/tree/webstudio-component.d.ts +15 -0
- package/package.json +14 -14
- package/src/app/custom-components/shared/remix-link.tsx +5 -1
- package/src/components/link.tsx +5 -1
- package/src/props.test.ts +36 -1
- package/src/props.ts +33 -6
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type ComponentProps } from "react";
|
|
2
|
+
declare const defaultTag = "h1";
|
|
3
|
+
type Props = ComponentProps<typeof defaultTag> & {
|
|
4
|
+
tag?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
|
|
5
|
+
};
|
|
6
|
+
export declare const Heading: import("react").ForwardRefExoticComponent<Omit<Props, "ref"> & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { ComponentStory, ComponentMeta } from "@storybook/react";
|
|
3
|
+
declare const _default: ComponentMeta<import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLHeadingElement> & import("react").HTMLAttributes<HTMLHeadingElement> & {
|
|
4
|
+
tag?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | undefined;
|
|
5
|
+
}, "ref"> & import("react").RefAttributes<HTMLHeadingElement>>>;
|
|
6
|
+
export default _default;
|
|
7
|
+
export declare const Heading: ComponentStory<import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLHeadingElement> & import("react").HTMLAttributes<HTMLHeadingElement> & {
|
|
8
|
+
tag?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | undefined;
|
|
9
|
+
}, "ref"> & import("react").RefAttributes<HTMLHeadingElement>>>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const defaultTag = "img";
|
|
3
|
+
export declare const Image: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, "ref"> & import("react").RefAttributes<HTMLImageElement>>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { ComponentMeta, ComponentStory } from "@storybook/react";
|
|
3
|
+
declare const _default: ComponentMeta<import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, "ref"> & import("react").RefAttributes<HTMLImageElement>>>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const Image: ComponentStory<import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, "ref"> & import("react").RefAttributes<HTMLImageElement>>>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { WsComponentMeta, WsComponentPropsMeta } from "./component-meta";
|
|
2
|
+
import type { ComponentName } from "./components-utils";
|
|
3
|
+
export declare const getComponentMeta: (name: string) => WsComponentMeta | undefined;
|
|
4
|
+
export declare const registerComponentMetas: (overrides: Record<string, Partial<WsComponentMeta>>) => void;
|
|
5
|
+
export declare const getComponentPropsMeta: (name: string) => WsComponentPropsMeta | undefined;
|
|
6
|
+
export declare const registerComponentPropsMetas: (metas: Record<string, WsComponentPropsMeta>) => void;
|
|
7
|
+
type RegisteredComponents = Partial<{
|
|
8
|
+
[name in ComponentName]: {};
|
|
9
|
+
}>;
|
|
10
|
+
export declare let registeredComponents: RegisteredComponents | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* @todo: Allow register any component.
|
|
13
|
+
* Now we can register only existings Components, as all our type system would
|
|
14
|
+
* break otherwise, see getComponent etc. So its overwriteComponent now
|
|
15
|
+
**/
|
|
16
|
+
export declare const registerComponents: (components: RegisteredComponents) => void;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const defaultTag = "input";
|
|
3
|
+
export declare const Input: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { ComponentStory, ComponentMeta } from "@storybook/react";
|
|
3
|
+
declare const _default: ComponentMeta<import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & import("react").RefAttributes<HTMLInputElement>>>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const Input: ComponentStory<import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & import("react").RefAttributes<HTMLInputElement>>>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const defaultTag = "i";
|
|
3
|
+
export declare const Italic: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & import("react").RefAttributes<HTMLElement>>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { ComponentStory, ComponentMeta } from "@storybook/react";
|
|
3
|
+
declare const _default: ComponentMeta<import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & import("react").RefAttributes<HTMLElement>>>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const Italic: ComponentStory<import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & import("react").RefAttributes<HTMLElement>>>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { ComponentStory, ComponentMeta } from "@storybook/react";
|
|
3
|
+
declare const _default: ComponentMeta<import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "href" | "target"> & {
|
|
4
|
+
href?: string | undefined;
|
|
5
|
+
target?: "_self" | "_blank" | "_parent" | "_top" | undefined;
|
|
6
|
+
prefetch?: "none" | "intent" | "render" | undefined;
|
|
7
|
+
}, "ref"> & import("react").RefAttributes<HTMLAnchorElement>>>;
|
|
8
|
+
export default _default;
|
|
9
|
+
export declare const Link: ComponentStory<import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "href" | "target"> & {
|
|
10
|
+
href?: string | undefined;
|
|
11
|
+
target?: "_self" | "_blank" | "_parent" | "_top" | undefined;
|
|
12
|
+
prefetch?: "none" | "intent" | "render" | undefined;
|
|
13
|
+
}, "ref"> & import("react").RefAttributes<HTMLAnchorElement>>>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type ComponentProps } from "react";
|
|
2
|
+
export declare const defaultTag = "a";
|
|
3
|
+
type Props = Omit<ComponentProps<"a">, "href" | "target"> & {
|
|
4
|
+
href?: string;
|
|
5
|
+
target?: "_self" | "_blank" | "_parent" | "_top";
|
|
6
|
+
prefetch?: "none" | "intent" | "render";
|
|
7
|
+
};
|
|
8
|
+
export declare const Link: import("react").ForwardRefExoticComponent<Omit<Props, "ref"> & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { ComponentStory, ComponentMeta } from "@storybook/react";
|
|
3
|
+
declare const _default: ComponentMeta<import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "href" | "target"> & {
|
|
4
|
+
href?: string | undefined;
|
|
5
|
+
target?: "_self" | "_blank" | "_parent" | "_top" | undefined;
|
|
6
|
+
prefetch?: "none" | "intent" | "render" | undefined;
|
|
7
|
+
}, "ref"> & import("react").RefAttributes<HTMLAnchorElement>>>;
|
|
8
|
+
export default _default;
|
|
9
|
+
export declare const Link: ComponentStory<import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "href" | "target"> & {
|
|
10
|
+
href?: string | undefined;
|
|
11
|
+
target?: "_self" | "_blank" | "_parent" | "_top" | undefined;
|
|
12
|
+
prefetch?: "none" | "intent" | "render" | undefined;
|
|
13
|
+
}, "ref"> & import("react").RefAttributes<HTMLAnchorElement>>>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const defaultTag = "li";
|
|
3
|
+
export declare const ListItem: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & import("react").RefAttributes<HTMLLIElement>>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { ComponentStory, ComponentMeta } from "@storybook/react";
|
|
3
|
+
declare const _default: ComponentMeta<import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & import("react").RefAttributes<HTMLLIElement>>>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const ListItem: ComponentStory<import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & import("react").RefAttributes<HTMLLIElement>>>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type ComponentProps } from "react";
|
|
2
|
+
declare const unorderedTag = "ul";
|
|
3
|
+
declare const orderedTag = "ol";
|
|
4
|
+
export type ListTag = typeof unorderedTag | typeof orderedTag;
|
|
5
|
+
type Props = ComponentProps<typeof unorderedTag> & ComponentProps<typeof orderedTag> & {
|
|
6
|
+
ordered?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare const List: import("react").ForwardRefExoticComponent<Omit<Props, "ref"> & import("react").RefAttributes<HTMLUListElement>>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { ComponentStory, ComponentMeta } from "@storybook/react";
|
|
3
|
+
declare const _default: ComponentMeta<import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLUListElement> & import("react").HTMLAttributes<HTMLUListElement> & import("react").ClassAttributes<HTMLOListElement> & import("react").OlHTMLAttributes<HTMLOListElement> & {
|
|
4
|
+
ordered?: boolean | undefined;
|
|
5
|
+
}, "ref"> & import("react").RefAttributes<HTMLUListElement>>>;
|
|
6
|
+
export default _default;
|
|
7
|
+
export declare const List: ComponentStory<import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLUListElement> & import("react").HTMLAttributes<HTMLUListElement> & import("react").ClassAttributes<HTMLOListElement> & import("react").OlHTMLAttributes<HTMLOListElement> & {
|
|
8
|
+
ordered?: boolean | undefined;
|
|
9
|
+
}, "ref"> & import("react").RefAttributes<HTMLUListElement>>>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const defaultTag = "p";
|
|
3
|
+
export declare const Paragraph: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref"> & import("react").RefAttributes<HTMLParagraphElement>>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { ComponentStory, ComponentMeta } from "@storybook/react";
|
|
3
|
+
declare const _default: ComponentMeta<import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref"> & import("react").RefAttributes<HTMLParagraphElement>>>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const Paragraph: ComponentStory<import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref"> & import("react").RefAttributes<HTMLParagraphElement>>>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { ComponentStory, ComponentMeta } from "@storybook/react";
|
|
3
|
+
declare const _default: ComponentMeta<import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "href" | "target"> & {
|
|
4
|
+
href?: string | undefined;
|
|
5
|
+
target?: "_self" | "_blank" | "_parent" | "_top" | undefined;
|
|
6
|
+
prefetch?: "none" | "intent" | "render" | undefined;
|
|
7
|
+
}, "ref"> & import("react").RefAttributes<HTMLAnchorElement>>>;
|
|
8
|
+
export default _default;
|
|
9
|
+
export declare const RichTextLink: ComponentStory<import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "href" | "target"> & {
|
|
10
|
+
href?: string | undefined;
|
|
11
|
+
target?: "_self" | "_blank" | "_parent" | "_top" | undefined;
|
|
12
|
+
prefetch?: "none" | "intent" | "render" | undefined;
|
|
13
|
+
}, "ref"> & import("react").RefAttributes<HTMLAnchorElement>>>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const defaultTag = "hr";
|
|
3
|
+
export declare const Separator: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHRElement>, HTMLHRElement>, "ref"> & import("react").RefAttributes<HTMLHRElement>>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { ComponentStory, ComponentMeta } from "@storybook/react";
|
|
3
|
+
declare const _default: ComponentMeta<import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHRElement>, HTMLHRElement>, "ref"> & import("react").RefAttributes<HTMLHRElement>>>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const Separator: ComponentStory<import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHRElement>, HTMLHRElement>, "ref"> & import("react").RefAttributes<HTMLHRElement>>>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { ComponentStory, ComponentMeta } from "@storybook/react";
|
|
3
|
+
declare const _default: ComponentMeta<import("react").ForwardRefExoticComponent<{
|
|
4
|
+
children?: import("react").ReactNode;
|
|
5
|
+
} & import("react").RefAttributes<HTMLDivElement>>>;
|
|
6
|
+
export default _default;
|
|
7
|
+
export declare const Slot: ComponentStory<import("react").ForwardRefExoticComponent<{
|
|
8
|
+
children?: import("react").ReactNode;
|
|
9
|
+
} & import("react").RefAttributes<HTMLDivElement>>>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const defaultTag = "span";
|
|
3
|
+
export declare const Span: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { ComponentStory, ComponentMeta } from "@storybook/react";
|
|
3
|
+
declare const _default: ComponentMeta<import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const Span: ComponentStory<import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const defaultTag = "sub";
|
|
3
|
+
export declare const Subscript: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & import("react").RefAttributes<HTMLElement>>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { ComponentStory, ComponentMeta } from "@storybook/react";
|
|
3
|
+
declare const _default: ComponentMeta<import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & import("react").RefAttributes<HTMLElement>>>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const Bold: ComponentStory<import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & import("react").RefAttributes<HTMLElement>>>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const defaultTag = "sup";
|
|
3
|
+
export declare const Superscript: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & import("react").RefAttributes<HTMLElement>>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { ComponentStory, ComponentMeta } from "@storybook/react";
|
|
3
|
+
declare const _default: ComponentMeta<import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & import("react").RefAttributes<HTMLElement>>>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const Superscript: ComponentStory<import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & import("react").RefAttributes<HTMLElement>>>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const defaultTag = "div";
|
|
3
|
+
export declare const TextBlock: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { ComponentStory, ComponentMeta } from "@storybook/react";
|
|
3
|
+
declare const _default: ComponentMeta<import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const TextBlock: ComponentStory<import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { type ReadableAtom } from "nanostores";
|
|
3
|
+
import type { Assets } from "@webstudio-is/asset-uploader";
|
|
4
|
+
import type { Pages, PropsByInstanceId } from "./props";
|
|
5
|
+
export declare const ReactSdkContext: import("react").Context<{
|
|
6
|
+
propsByInstanceIdStore: ReadableAtom<PropsByInstanceId>;
|
|
7
|
+
assetsStore: ReadableAtom<Assets>;
|
|
8
|
+
pagesStore: ReadableAtom<Pages>;
|
|
9
|
+
}>;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { type TransformValue } from "@webstudio-is/css-engine";
|
|
2
|
+
import type { Asset } from "@webstudio-is/asset-uploader";
|
|
3
|
+
import type { Build } from "@webstudio-is/project-build";
|
|
4
|
+
type Data = {
|
|
5
|
+
assets: Asset[];
|
|
6
|
+
breakpoints?: Build["breakpoints"];
|
|
7
|
+
styles?: Build["styles"];
|
|
8
|
+
styleSourceSelections?: Build["styleSourceSelections"];
|
|
9
|
+
};
|
|
10
|
+
type CssOptions = {
|
|
11
|
+
assetBaseUrl: string;
|
|
12
|
+
};
|
|
13
|
+
export declare const createImageValueTransformer: (assets: Map<string, {
|
|
14
|
+
name: string;
|
|
15
|
+
type: "font";
|
|
16
|
+
format: "ttf" | "woff" | "woff2" | "otf";
|
|
17
|
+
id: string;
|
|
18
|
+
projectId: string;
|
|
19
|
+
size: number;
|
|
20
|
+
description: string | null;
|
|
21
|
+
location: "FS" | "REMOTE";
|
|
22
|
+
createdAt: string;
|
|
23
|
+
meta: {
|
|
24
|
+
style: "normal" | "italic" | "oblique";
|
|
25
|
+
weight: number;
|
|
26
|
+
family: string;
|
|
27
|
+
} | {
|
|
28
|
+
variationAxes: Partial<Record<"wght" | "wdth" | "slnt" | "opsz" | "ital" | "GRAD" | "XTRA" | "XOPQ" | "YOPQ" | "YTLC" | "YTUC" | "YTAS" | "YTDE" | "YTFI", {
|
|
29
|
+
name: string;
|
|
30
|
+
min: number;
|
|
31
|
+
default: number;
|
|
32
|
+
max: number;
|
|
33
|
+
}>>;
|
|
34
|
+
family: string;
|
|
35
|
+
};
|
|
36
|
+
} | {
|
|
37
|
+
name: string;
|
|
38
|
+
type: "image";
|
|
39
|
+
format: string;
|
|
40
|
+
id: string;
|
|
41
|
+
projectId: string;
|
|
42
|
+
size: number;
|
|
43
|
+
description: string | null;
|
|
44
|
+
location: "FS" | "REMOTE";
|
|
45
|
+
createdAt: string;
|
|
46
|
+
meta: {
|
|
47
|
+
width: number;
|
|
48
|
+
height: number;
|
|
49
|
+
};
|
|
50
|
+
} | undefined>, options: CssOptions) => TransformValue;
|
|
51
|
+
export declare const generateCssText: (data: Data, options: CssOptions) => string;
|
|
52
|
+
export {};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { CssEngine } from "@webstudio-is/css-engine";
|
|
2
|
+
import type { Assets } from "@webstudio-is/asset-uploader";
|
|
3
|
+
export declare const addGlobalRules: (engine: CssEngine, { assets, assetBaseUrl }: {
|
|
4
|
+
assets: Map<string, {
|
|
5
|
+
name: string;
|
|
6
|
+
type: "font";
|
|
7
|
+
format: "ttf" | "woff" | "woff2" | "otf";
|
|
8
|
+
id: string;
|
|
9
|
+
projectId: string;
|
|
10
|
+
size: number;
|
|
11
|
+
description: string | null;
|
|
12
|
+
location: "FS" | "REMOTE";
|
|
13
|
+
createdAt: string;
|
|
14
|
+
meta: {
|
|
15
|
+
style: "normal" | "italic" | "oblique";
|
|
16
|
+
weight: number;
|
|
17
|
+
family: string;
|
|
18
|
+
} | {
|
|
19
|
+
variationAxes: Partial<Record<"wght" | "wdth" | "slnt" | "opsz" | "ital" | "GRAD" | "XTRA" | "XOPQ" | "YOPQ" | "YTLC" | "YTUC" | "YTAS" | "YTDE" | "YTFI", {
|
|
20
|
+
name: string;
|
|
21
|
+
min: number;
|
|
22
|
+
default: number;
|
|
23
|
+
max: number;
|
|
24
|
+
}>>;
|
|
25
|
+
family: string;
|
|
26
|
+
};
|
|
27
|
+
} | {
|
|
28
|
+
name: string;
|
|
29
|
+
type: "image";
|
|
30
|
+
format: string;
|
|
31
|
+
id: string;
|
|
32
|
+
projectId: string;
|
|
33
|
+
size: number;
|
|
34
|
+
description: string | null;
|
|
35
|
+
location: "FS" | "REMOTE";
|
|
36
|
+
createdAt: string;
|
|
37
|
+
meta: {
|
|
38
|
+
width: number;
|
|
39
|
+
height: number;
|
|
40
|
+
};
|
|
41
|
+
} | undefined>;
|
|
42
|
+
assetBaseUrl: string;
|
|
43
|
+
}) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|