@webstudio-is/react-sdk 0.55.0 → 0.57.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/image.js +6 -6
- package/lib/app/custom-components/shared/remix-link.js +3 -3
- package/lib/app/params.js +4 -2
- package/lib/cjs/app/custom-components/image.js +6 -6
- package/lib/cjs/app/custom-components/shared/remix-link.js +3 -3
- package/lib/cjs/app/params.js +4 -2
- package/lib/cjs/components/link.js +14 -8
- package/lib/cjs/css/css.js +8 -5
- package/lib/cjs/css/global-rules.js +3 -3
- package/lib/cjs/css/style-rules.js +10 -3
- package/lib/cjs/props.js +18 -9
- package/lib/cjs/pubsub/raf-queue.js +3 -6
- package/lib/cjs/tree/root.js +1 -1
- package/lib/components/link.js +14 -8
- package/lib/css/css.js +8 -5
- package/lib/css/global-rules.js +4 -7
- package/lib/css/style-rules.js +10 -3
- package/lib/props.js +18 -9
- package/lib/pubsub/raf-queue.js +3 -6
- package/lib/tree/root.js +1 -1
- package/package.json +21 -21
- package/src/app/custom-components/image.tsx +6 -7
- package/src/app/custom-components/shared/remix-link.tsx +3 -3
- package/src/app/params.ts +6 -4
- package/src/components/link.tsx +17 -7
- package/src/css/css.ts +9 -7
- package/src/css/global-rules.ts +6 -10
- package/src/css/style-rules.test.ts +22 -0
- package/src/css/style-rules.ts +15 -4
- package/src/props.test.ts +50 -20
- package/src/props.ts +27 -12
- package/src/pubsub/raf-queue.ts +3 -9
- package/src/tree/create-elements-tree.tsx +3 -7
- package/src/tree/root.ts +1 -1
- package/src/tree/webstudio-component.tsx +2 -2
- package/lib/types/app/custom-components/image.d.ts +0 -6
- package/lib/types/app/custom-components/index.d.ts +0 -26
- package/lib/types/app/custom-components/link-block.d.ts +0 -6
- package/lib/types/app/custom-components/link.d.ts +0 -6
- package/lib/types/app/custom-components/rich-text-link.d.ts +0 -6
- package/lib/types/app/custom-components/shared/remix-link.d.ts +0 -10
- package/lib/types/app/handle-request.server.d.ts +0 -2
- package/lib/types/app/index.d.ts +0 -3
- package/lib/types/app/params.d.ts +0 -6
- package/lib/types/app/root.d.ts +0 -8
- package/lib/types/components/__generated__/blockquote.props.d.ts +0 -2
- package/lib/types/components/__generated__/body.props.d.ts +0 -2
- package/lib/types/components/__generated__/bold.props.d.ts +0 -2
- package/lib/types/components/__generated__/box.props.d.ts +0 -2
- package/lib/types/components/__generated__/button.props.d.ts +0 -2
- package/lib/types/components/__generated__/code.props.d.ts +0 -2
- package/lib/types/components/__generated__/form.props.d.ts +0 -2
- package/lib/types/components/__generated__/fragment.props.d.ts +0 -2
- package/lib/types/components/__generated__/heading.props.d.ts +0 -2
- package/lib/types/components/__generated__/image.props.d.ts +0 -2
- package/lib/types/components/__generated__/input.props.d.ts +0 -2
- package/lib/types/components/__generated__/italic.props.d.ts +0 -2
- package/lib/types/components/__generated__/link-block.props.d.ts +0 -2
- package/lib/types/components/__generated__/link.props.d.ts +0 -2
- package/lib/types/components/__generated__/list-item.props.d.ts +0 -2
- package/lib/types/components/__generated__/list.props.d.ts +0 -2
- package/lib/types/components/__generated__/paragraph.props.d.ts +0 -2
- package/lib/types/components/__generated__/rich-text-link.props.d.ts +0 -2
- package/lib/types/components/__generated__/separator.props.d.ts +0 -2
- package/lib/types/components/__generated__/slot.props.d.ts +0 -2
- package/lib/types/components/__generated__/span.props.d.ts +0 -2
- package/lib/types/components/__generated__/subscript.props.d.ts +0 -2
- package/lib/types/components/__generated__/superscript.props.d.ts +0 -2
- package/lib/types/components/__generated__/text-block.props.d.ts +0 -2
- package/lib/types/components/blockquote.d.ts +0 -3
- package/lib/types/components/blockquote.stories.d.ts +0 -5
- package/lib/types/components/blockquote.ws.d.ts +0 -3
- package/lib/types/components/body.d.ts +0 -3
- package/lib/types/components/body.stories.d.ts +0 -6
- package/lib/types/components/body.ws.d.ts +0 -3
- package/lib/types/components/bold.d.ts +0 -3
- package/lib/types/components/bold.stories.d.ts +0 -5
- package/lib/types/components/bold.ws.d.ts +0 -3
- package/lib/types/components/box.d.ts +0 -7
- package/lib/types/components/box.stories.d.ts +0 -9
- package/lib/types/components/box.ws.d.ts +0 -3
- package/lib/types/components/button.d.ts +0 -7
- package/lib/types/components/button.stories.d.ts +0 -9
- package/lib/types/components/button.ws.d.ts +0 -3
- package/lib/types/components/code.d.ts +0 -9
- package/lib/types/components/code.stories.d.ts +0 -11
- package/lib/types/components/code.ws.d.ts +0 -3
- package/lib/types/components/component-meta.d.ts +0 -610
- package/lib/types/components/components-utils.d.ts +0 -34
- package/lib/types/components/components.d.ts +0 -31
- package/lib/types/components/form.d.ts +0 -3
- package/lib/types/components/form.stories.d.ts +0 -5
- package/lib/types/components/form.ws.d.ts +0 -3
- package/lib/types/components/fragment.d.ts +0 -6
- package/lib/types/components/fragment.ws.d.ts +0 -3
- package/lib/types/components/heading.d.ts +0 -7
- package/lib/types/components/heading.stories.d.ts +0 -9
- package/lib/types/components/heading.ws.d.ts +0 -3
- package/lib/types/components/image.d.ts +0 -3
- package/lib/types/components/image.stories.d.ts +0 -5
- package/lib/types/components/image.ws.d.ts +0 -3
- package/lib/types/components/index.d.ts +0 -17
- package/lib/types/components/input.d.ts +0 -3
- package/lib/types/components/input.stories.d.ts +0 -5
- package/lib/types/components/input.ws.d.ts +0 -3
- package/lib/types/components/italic.d.ts +0 -3
- package/lib/types/components/italic.stories.d.ts +0 -5
- package/lib/types/components/italic.ws.d.ts +0 -3
- package/lib/types/components/link-block.d.ts +0 -3
- package/lib/types/components/link-block.stories.d.ts +0 -13
- package/lib/types/components/link-block.ws.d.ts +0 -3
- package/lib/types/components/link.d.ts +0 -9
- package/lib/types/components/link.stories.d.ts +0 -13
- package/lib/types/components/link.ws.d.ts +0 -3
- package/lib/types/components/list-item.d.ts +0 -3
- package/lib/types/components/list-item.stories.d.ts +0 -5
- package/lib/types/components/list-item.ws.d.ts +0 -3
- package/lib/types/components/list.d.ts +0 -9
- package/lib/types/components/list.stories.d.ts +0 -9
- package/lib/types/components/list.ws.d.ts +0 -3
- package/lib/types/components/paragraph.d.ts +0 -3
- package/lib/types/components/paragraph.stories.d.ts +0 -5
- package/lib/types/components/paragraph.ws.d.ts +0 -3
- package/lib/types/components/rich-text-link.d.ts +0 -2
- package/lib/types/components/rich-text-link.stories.d.ts +0 -13
- package/lib/types/components/rich-text-link.ws.d.ts +0 -3
- package/lib/types/components/separator.d.ts +0 -3
- package/lib/types/components/separator.stories.d.ts +0 -5
- package/lib/types/components/separator.ws.d.ts +0 -3
- package/lib/types/components/slot.d.ts +0 -6
- package/lib/types/components/slot.stories.d.ts +0 -9
- package/lib/types/components/slot.ws.d.ts +0 -3
- package/lib/types/components/span.d.ts +0 -3
- package/lib/types/components/span.stories.d.ts +0 -5
- package/lib/types/components/span.ws.d.ts +0 -3
- package/lib/types/components/subscript.d.ts +0 -3
- package/lib/types/components/subscript.stories.d.ts +0 -5
- package/lib/types/components/subscript.ws.d.ts +0 -3
- package/lib/types/components/superscript.d.ts +0 -3
- package/lib/types/components/superscript.stories.d.ts +0 -5
- package/lib/types/components/superscript.ws.d.ts +0 -3
- package/lib/types/components/text-block.d.ts +0 -3
- package/lib/types/components/text-block.stories.d.ts +0 -5
- package/lib/types/components/text-block.ws.d.ts +0 -3
- package/lib/types/context.d.ts +0 -9
- package/lib/types/css/css.d.ts +0 -54
- package/lib/types/css/get-browser-style.d.ts +0 -2
- package/lib/types/css/global-rules.d.ts +0 -44
- package/lib/types/css/index.d.ts +0 -4
- package/lib/types/css/normalize-type-check.d.ts +0 -1
- package/lib/types/css/normalize.d.ts +0 -2429
- package/lib/types/css/presets.d.ts +0 -38
- package/lib/types/css/style-rules.d.ts +0 -201
- package/lib/types/css/style-rules.test.d.ts +0 -1
- package/lib/types/index.d.ts +0 -9
- package/lib/types/props.d.ts +0 -97
- package/lib/types/props.test.d.ts +0 -1
- package/lib/types/pubsub/create.d.ts +0 -28
- package/lib/types/pubsub/index.d.ts +0 -1
- package/lib/types/pubsub/raf-queue.d.ts +0 -1
- package/lib/types/tree/create-elements-tree.d.ts +0 -29
- package/lib/types/tree/index.d.ts +0 -3
- package/lib/types/tree/root.d.ts +0 -25
- package/lib/types/tree/session-storage-polyfill.d.ts +0 -2
- package/lib/types/tree/webstudio-component.d.ts +0 -15
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import type { ComponentStory, ComponentMeta } from "@storybook/react";
|
|
3
|
-
declare const _default: ComponentMeta<import("react").ForwardRefExoticComponent<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & import("react").RefAttributes<HTMLDivElement>>>;
|
|
4
|
-
export default _default;
|
|
5
|
-
export declare const TextBlock: ComponentStory<import("react").ForwardRefExoticComponent<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & import("react").RefAttributes<HTMLDivElement>>>;
|
package/lib/types/context.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
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
|
-
}>;
|
package/lib/types/css/css.d.ts
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
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
|
-
publicPath?: string;
|
|
12
|
-
};
|
|
13
|
-
export declare const createImageValueTransformer: (assets: Map<string, {
|
|
14
|
-
name: string;
|
|
15
|
-
path: string;
|
|
16
|
-
type: "font";
|
|
17
|
-
format: "ttf" | "woff" | "woff2" | "otf";
|
|
18
|
-
id: string;
|
|
19
|
-
projectId: string;
|
|
20
|
-
size: number;
|
|
21
|
-
description: string | null;
|
|
22
|
-
location: "FS" | "REMOTE";
|
|
23
|
-
createdAt: string;
|
|
24
|
-
meta: {
|
|
25
|
-
style: "normal" | "italic" | "oblique";
|
|
26
|
-
weight: number;
|
|
27
|
-
family: string;
|
|
28
|
-
} | {
|
|
29
|
-
variationAxes: Partial<Record<"wght" | "wdth" | "slnt" | "opsz" | "ital" | "GRAD" | "XTRA" | "XOPQ" | "YOPQ" | "YTLC" | "YTUC" | "YTAS" | "YTDE" | "YTFI", {
|
|
30
|
-
name: string;
|
|
31
|
-
min: number;
|
|
32
|
-
default: number;
|
|
33
|
-
max: number;
|
|
34
|
-
}>>;
|
|
35
|
-
family: string;
|
|
36
|
-
};
|
|
37
|
-
} | {
|
|
38
|
-
name: string;
|
|
39
|
-
path: string;
|
|
40
|
-
type: "image";
|
|
41
|
-
format: string;
|
|
42
|
-
id: string;
|
|
43
|
-
projectId: string;
|
|
44
|
-
size: number;
|
|
45
|
-
description: string | null;
|
|
46
|
-
location: "FS" | "REMOTE";
|
|
47
|
-
createdAt: string;
|
|
48
|
-
meta: {
|
|
49
|
-
width: number;
|
|
50
|
-
height: number;
|
|
51
|
-
};
|
|
52
|
-
} | undefined>, options: CssOptions) => TransformValue;
|
|
53
|
-
export declare const generateCssText: (data: Data, options: CssOptions) => string;
|
|
54
|
-
export {};
|
|
@@ -1,44 +0,0 @@
|
|
|
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 }: {
|
|
4
|
-
assets: Map<string, {
|
|
5
|
-
name: string;
|
|
6
|
-
path: string;
|
|
7
|
-
type: "font";
|
|
8
|
-
format: "ttf" | "woff" | "woff2" | "otf";
|
|
9
|
-
id: string;
|
|
10
|
-
projectId: string;
|
|
11
|
-
size: number;
|
|
12
|
-
description: string | null;
|
|
13
|
-
location: "FS" | "REMOTE";
|
|
14
|
-
createdAt: string;
|
|
15
|
-
meta: {
|
|
16
|
-
style: "normal" | "italic" | "oblique";
|
|
17
|
-
weight: number;
|
|
18
|
-
family: string;
|
|
19
|
-
} | {
|
|
20
|
-
variationAxes: Partial<Record<"wght" | "wdth" | "slnt" | "opsz" | "ital" | "GRAD" | "XTRA" | "XOPQ" | "YOPQ" | "YTLC" | "YTUC" | "YTAS" | "YTDE" | "YTFI", {
|
|
21
|
-
name: string;
|
|
22
|
-
min: number;
|
|
23
|
-
default: number;
|
|
24
|
-
max: number;
|
|
25
|
-
}>>;
|
|
26
|
-
family: string;
|
|
27
|
-
};
|
|
28
|
-
} | {
|
|
29
|
-
name: string;
|
|
30
|
-
path: string;
|
|
31
|
-
type: "image";
|
|
32
|
-
format: string;
|
|
33
|
-
id: string;
|
|
34
|
-
projectId: string;
|
|
35
|
-
size: number;
|
|
36
|
-
description: string | null;
|
|
37
|
-
location: "FS" | "REMOTE";
|
|
38
|
-
createdAt: string;
|
|
39
|
-
meta: {
|
|
40
|
-
width: number;
|
|
41
|
-
height: number;
|
|
42
|
-
};
|
|
43
|
-
} | undefined>;
|
|
44
|
-
}) => void;
|
package/lib/types/css/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|