@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
|
@@ -6,7 +6,11 @@ const wrapLinkComponent = (BaseLink) => {
|
|
|
6
6
|
const Component = forwardRef((props, ref) => {
|
|
7
7
|
const href = usePropUrl(getInstanceIdFromComponentProps(props), "href");
|
|
8
8
|
if (href?.type === "page") {
|
|
9
|
-
|
|
9
|
+
let to = href.page.path;
|
|
10
|
+
if (href.hash !== void 0) {
|
|
11
|
+
to += `#${href.hash}`;
|
|
12
|
+
}
|
|
13
|
+
return /* @__PURE__ */ jsx(RemixLink, { ...props, to, ref });
|
|
10
14
|
}
|
|
11
15
|
return /* @__PURE__ */ jsx(BaseLink, { ...props, ref });
|
|
12
16
|
});
|
|
@@ -29,7 +29,11 @@ const wrapLinkComponent = (BaseLink) => {
|
|
|
29
29
|
const Component = (0, import_react2.forwardRef)((props, ref) => {
|
|
30
30
|
const href = (0, import_props.usePropUrl)((0, import_props.getInstanceIdFromComponentProps)(props), "href");
|
|
31
31
|
if (href?.type === "page") {
|
|
32
|
-
|
|
32
|
+
let to = href.page.path;
|
|
33
|
+
if (href.hash !== void 0) {
|
|
34
|
+
to += `#${href.hash}`;
|
|
35
|
+
}
|
|
36
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.Link, { ...props, to, ref });
|
|
33
37
|
}
|
|
34
38
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BaseLink, { ...props, ref });
|
|
35
39
|
});
|
|
@@ -30,10 +30,13 @@ const defaultTag = "a";
|
|
|
30
30
|
const Link = (0, import_react.forwardRef)((props, ref) => {
|
|
31
31
|
const href = (0, import_props.usePropUrl)((0, import_props.getInstanceIdFromComponentProps)(props), "href");
|
|
32
32
|
const { assetBaseUrl } = (0, import_params.getParams)();
|
|
33
|
-
let url;
|
|
33
|
+
let url = "#";
|
|
34
34
|
switch (href?.type) {
|
|
35
35
|
case "page":
|
|
36
36
|
url = href.page.path;
|
|
37
|
+
if (href.hash !== void 0) {
|
|
38
|
+
url += `#${href.hash}`;
|
|
39
|
+
}
|
|
37
40
|
break;
|
|
38
41
|
case "asset":
|
|
39
42
|
url = `${assetBaseUrl}${href.asset.name}`;
|
package/lib/cjs/props.js
CHANGED
|
@@ -50,7 +50,7 @@ const useInstanceProps = (instanceId) => {
|
|
|
50
50
|
const instancePropsObject = {};
|
|
51
51
|
if (instanceProps) {
|
|
52
52
|
for (const prop of instanceProps) {
|
|
53
|
-
if (prop.type !== "asset") {
|
|
53
|
+
if (prop.type !== "asset" && prop.type !== "page") {
|
|
54
54
|
instancePropsObject[prop.name] = prop.value;
|
|
55
55
|
}
|
|
56
56
|
}
|
|
@@ -93,8 +93,22 @@ const resolveUrlProp = (instanceId, name, {
|
|
|
93
93
|
continue;
|
|
94
94
|
}
|
|
95
95
|
if (prop.type === "page") {
|
|
96
|
-
|
|
97
|
-
|
|
96
|
+
if (typeof prop.value === "string") {
|
|
97
|
+
const page2 = pages.get(prop.value);
|
|
98
|
+
return page2 && { type: "page", page: page2 };
|
|
99
|
+
}
|
|
100
|
+
const { instanceId: instanceId2, pageId } = prop.value;
|
|
101
|
+
const page = pages.get(pageId);
|
|
102
|
+
if (page === void 0) {
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
const idProp = props.get(instanceId2)?.find((prop2) => prop2.name === "id");
|
|
106
|
+
return {
|
|
107
|
+
type: "page",
|
|
108
|
+
page,
|
|
109
|
+
instanceId: instanceId2,
|
|
110
|
+
hash: idProp === void 0 || idProp.type !== "string" ? void 0 : idProp.value
|
|
111
|
+
};
|
|
98
112
|
}
|
|
99
113
|
if (prop.type === "string") {
|
|
100
114
|
for (const page of pages.values()) {
|
|
@@ -113,14 +127,14 @@ const resolveUrlProp = (instanceId, name, {
|
|
|
113
127
|
};
|
|
114
128
|
const usePropUrl = (instanceId, name) => {
|
|
115
129
|
const { propsByInstanceIdStore, pagesStore, assetsStore } = (0, import_react.useContext)(import_context.ReactSdkContext);
|
|
116
|
-
const
|
|
130
|
+
const store = (0, import_react.useMemo)(
|
|
117
131
|
() => (0, import_nanostores.computed)(
|
|
118
132
|
[propsByInstanceIdStore, pagesStore, assetsStore],
|
|
119
133
|
(props, pages, assets) => resolveUrlProp(instanceId, name, { props, pages, assets })
|
|
120
134
|
),
|
|
121
135
|
[propsByInstanceIdStore, pagesStore, assetsStore, instanceId, name]
|
|
122
136
|
);
|
|
123
|
-
return (0, import_react2.useStore)(
|
|
137
|
+
return (0, import_react2.useStore)(store);
|
|
124
138
|
};
|
|
125
139
|
const getInstanceIdFromComponentProps = (props) => {
|
|
126
140
|
return props[import_webstudio_component.idAttribute];
|
package/lib/components/link.js
CHANGED
|
@@ -6,10 +6,13 @@ const defaultTag = "a";
|
|
|
6
6
|
const Link = forwardRef((props, ref) => {
|
|
7
7
|
const href = usePropUrl(getInstanceIdFromComponentProps(props), "href");
|
|
8
8
|
const { assetBaseUrl } = getParams();
|
|
9
|
-
let url;
|
|
9
|
+
let url = "#";
|
|
10
10
|
switch (href?.type) {
|
|
11
11
|
case "page":
|
|
12
12
|
url = href.page.path;
|
|
13
|
+
if (href.hash !== void 0) {
|
|
14
|
+
url += `#${href.hash}`;
|
|
15
|
+
}
|
|
13
16
|
break;
|
|
14
17
|
case "asset":
|
|
15
18
|
url = `${assetBaseUrl}${href.asset.name}`;
|
package/lib/props.js
CHANGED
|
@@ -22,7 +22,7 @@ const useInstanceProps = (instanceId) => {
|
|
|
22
22
|
const instancePropsObject = {};
|
|
23
23
|
if (instanceProps) {
|
|
24
24
|
for (const prop of instanceProps) {
|
|
25
|
-
if (prop.type !== "asset") {
|
|
25
|
+
if (prop.type !== "asset" && prop.type !== "page") {
|
|
26
26
|
instancePropsObject[prop.name] = prop.value;
|
|
27
27
|
}
|
|
28
28
|
}
|
|
@@ -65,8 +65,22 @@ const resolveUrlProp = (instanceId, name, {
|
|
|
65
65
|
continue;
|
|
66
66
|
}
|
|
67
67
|
if (prop.type === "page") {
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
if (typeof prop.value === "string") {
|
|
69
|
+
const page2 = pages.get(prop.value);
|
|
70
|
+
return page2 && { type: "page", page: page2 };
|
|
71
|
+
}
|
|
72
|
+
const { instanceId: instanceId2, pageId } = prop.value;
|
|
73
|
+
const page = pages.get(pageId);
|
|
74
|
+
if (page === void 0) {
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
const idProp = props.get(instanceId2)?.find((prop2) => prop2.name === "id");
|
|
78
|
+
return {
|
|
79
|
+
type: "page",
|
|
80
|
+
page,
|
|
81
|
+
instanceId: instanceId2,
|
|
82
|
+
hash: idProp === void 0 || idProp.type !== "string" ? void 0 : idProp.value
|
|
83
|
+
};
|
|
70
84
|
}
|
|
71
85
|
if (prop.type === "string") {
|
|
72
86
|
for (const page of pages.values()) {
|
|
@@ -85,14 +99,14 @@ const resolveUrlProp = (instanceId, name, {
|
|
|
85
99
|
};
|
|
86
100
|
const usePropUrl = (instanceId, name) => {
|
|
87
101
|
const { propsByInstanceIdStore, pagesStore, assetsStore } = useContext(ReactSdkContext);
|
|
88
|
-
const
|
|
102
|
+
const store = useMemo(
|
|
89
103
|
() => computed(
|
|
90
104
|
[propsByInstanceIdStore, pagesStore, assetsStore],
|
|
91
105
|
(props, pages, assets) => resolveUrlProp(instanceId, name, { props, pages, assets })
|
|
92
106
|
),
|
|
93
107
|
[propsByInstanceIdStore, pagesStore, assetsStore, instanceId, name]
|
|
94
108
|
);
|
|
95
|
-
return useStore(
|
|
109
|
+
return useStore(store);
|
|
96
110
|
};
|
|
97
111
|
const getInstanceIdFromComponentProps = (props) => {
|
|
98
112
|
return props[idAttribute];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const Image: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").ClassAttributes<HTMLImageElement> & import("react").ImgHTMLAttributes<HTMLImageElement> & {
|
|
3
|
+
quality?: number | undefined;
|
|
4
|
+
optimize?: boolean | undefined;
|
|
5
|
+
loader: import("@webstudio-is/image").ImageLoader;
|
|
6
|
+
}, "ref"> & import("react").RefAttributes<HTMLImageElement>, "ref"> & import("react").RefAttributes<HTMLImageElement>>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { WsComponentPropsMeta } from "../../components/component-meta";
|
|
3
|
+
export declare const customComponents: {
|
|
4
|
+
Image: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").ClassAttributes<HTMLImageElement> & import("react").ImgHTMLAttributes<HTMLImageElement> & {
|
|
5
|
+
quality?: number | undefined;
|
|
6
|
+
optimize?: boolean | undefined;
|
|
7
|
+
loader: import("@webstudio-is/image").ImageLoader;
|
|
8
|
+
}, "ref"> & import("react").RefAttributes<HTMLImageElement>, "ref"> & import("react").RefAttributes<HTMLImageElement>>;
|
|
9
|
+
Link: 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>>;
|
|
14
|
+
RichTextLink: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "href" | "target"> & {
|
|
15
|
+
href?: string | undefined;
|
|
16
|
+
target?: "_self" | "_blank" | "_parent" | "_top" | undefined;
|
|
17
|
+
prefetch?: "none" | "intent" | "render" | undefined;
|
|
18
|
+
}, "ref"> & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
19
|
+
LinkBlock: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "href" | "target"> & {
|
|
20
|
+
href?: string | undefined;
|
|
21
|
+
target?: "_self" | "_blank" | "_parent" | "_top" | undefined;
|
|
22
|
+
prefetch?: "none" | "intent" | "render" | undefined;
|
|
23
|
+
}, "ref"> & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
24
|
+
};
|
|
25
|
+
export declare const customComponentPropsMetas: Record<string, WsComponentPropsMeta>;
|
|
26
|
+
export declare const customComponentMetas: {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const LinkBlock: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "href" | "target"> & {
|
|
3
|
+
href?: string | undefined;
|
|
4
|
+
target?: "_self" | "_blank" | "_parent" | "_top" | undefined;
|
|
5
|
+
prefetch?: "none" | "intent" | "render" | undefined;
|
|
6
|
+
}, "ref"> & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const Link: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "href" | "target"> & {
|
|
3
|
+
href?: string | undefined;
|
|
4
|
+
target?: "_self" | "_blank" | "_parent" | "_top" | undefined;
|
|
5
|
+
prefetch?: "none" | "intent" | "render" | undefined;
|
|
6
|
+
}, "ref"> & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const RichTextLink: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "href" | "target"> & {
|
|
3
|
+
href?: string | undefined;
|
|
4
|
+
target?: "_self" | "_blank" | "_parent" | "_top" | undefined;
|
|
5
|
+
prefetch?: "none" | "intent" | "render" | undefined;
|
|
6
|
+
}, "ref"> & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const wrapLinkComponent: (BaseLink: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "href" | "target"> & {
|
|
3
|
+
href?: string | undefined;
|
|
4
|
+
target?: "_self" | "_blank" | "_parent" | "_top" | undefined;
|
|
5
|
+
prefetch?: "none" | "intent" | "render" | undefined;
|
|
6
|
+
}, "ref"> & import("react").RefAttributes<HTMLAnchorElement>>) => import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "href" | "target"> & {
|
|
7
|
+
href?: string | undefined;
|
|
8
|
+
target?: "_self" | "_blank" | "_parent" | "_top" | undefined;
|
|
9
|
+
prefetch?: "none" | "intent" | "render" | undefined;
|
|
10
|
+
}, "ref"> & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Outlet as DefaultOutlet } from "@remix-run/react";
|
|
3
|
+
/**
|
|
4
|
+
* We are using Outlet prop from index layout when user renders site from a subdomain.
|
|
5
|
+
*/
|
|
6
|
+
export declare const Root: ({ Outlet, }: {
|
|
7
|
+
Outlet: typeof DefaultOutlet;
|
|
8
|
+
}) => JSX.Element;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const defaultTag = "blockquote";
|
|
3
|
+
export declare const Blockquote: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").BlockquoteHTMLAttributes<HTMLQuoteElement>, HTMLQuoteElement>, "ref"> & import("react").RefAttributes<HTMLQuoteElement>>;
|
|
@@ -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").BlockquoteHTMLAttributes<HTMLQuoteElement>, HTMLQuoteElement>, "ref"> & import("react").RefAttributes<HTMLQuoteElement>>>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const Blockquote: ComponentStory<import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").BlockquoteHTMLAttributes<HTMLQuoteElement>, HTMLQuoteElement>, "ref"> & import("react").RefAttributes<HTMLQuoteElement>>>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const defaultTag = "body";
|
|
3
|
+
export declare const Body: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLBodyElement>, HTMLBodyElement>, "ref"> & import("react").RefAttributes<HTMLBodyElement>>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { ComponentStory, ComponentMeta } from "@storybook/react";
|
|
3
|
+
import { Body as BodyPrimitive } from "./body";
|
|
4
|
+
declare const _default: ComponentMeta<import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLBodyElement>, HTMLBodyElement>, "ref"> & import("react").RefAttributes<HTMLBodyElement>>>;
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const Body: ComponentStory<typeof BodyPrimitive>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const defaultTag = "b";
|
|
3
|
+
export declare const Bold: 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,7 @@
|
|
|
1
|
+
import { type ComponentProps } from "react";
|
|
2
|
+
declare const defaultTag = "div";
|
|
3
|
+
type Props = ComponentProps<typeof defaultTag> & {
|
|
4
|
+
tag?: "div" | "header" | "footer" | "nav" | "main" | "section" | "article" | "aside" | "address" | "figure";
|
|
5
|
+
};
|
|
6
|
+
export declare const Box: import("react").ForwardRefExoticComponent<Omit<Props, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
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<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
|
|
4
|
+
tag?: "div" | "address" | "article" | "aside" | "figure" | "footer" | "header" | "main" | "nav" | "section" | undefined;
|
|
5
|
+
}, "ref"> & import("react").RefAttributes<HTMLDivElement>>>;
|
|
6
|
+
export default _default;
|
|
7
|
+
export declare const Box: ComponentStory<import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
|
|
8
|
+
tag?: "div" | "address" | "article" | "aside" | "figure" | "footer" | "header" | "main" | "nav" | "section" | undefined;
|
|
9
|
+
}, "ref"> & import("react").RefAttributes<HTMLDivElement>>>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type ComponentProps } from "react";
|
|
2
|
+
export declare const defaultTag = "button";
|
|
3
|
+
type ButtonProps = ComponentProps<typeof defaultTag> & {
|
|
4
|
+
innerText?: string;
|
|
5
|
+
};
|
|
6
|
+
export declare const Button: import("react").ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { ComponentMeta, ComponentStory } from "@storybook/react";
|
|
3
|
+
declare const _default: ComponentMeta<import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
4
|
+
innerText?: string | undefined;
|
|
5
|
+
}, "ref"> & import("react").RefAttributes<HTMLButtonElement>>>;
|
|
6
|
+
export default _default;
|
|
7
|
+
export declare const Button: ComponentStory<import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
8
|
+
innerText?: string | undefined;
|
|
9
|
+
}, "ref"> & import("react").RefAttributes<HTMLButtonElement>>>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type ComponentProps } from "react";
|
|
2
|
+
export declare const defaultTag = "code";
|
|
3
|
+
export declare const displayVarNamespace: `code-display-${number}`;
|
|
4
|
+
type Props = Omit<ComponentProps<typeof defaultTag>, "inline"> & {
|
|
5
|
+
inline?: boolean;
|
|
6
|
+
meta?: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const Code: import("react").ForwardRefExoticComponent<Omit<Props, "ref"> & import("react").RefAttributes<HTMLElement>>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
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").HTMLAttributes<HTMLElement>, HTMLElement>, "inline"> & {
|
|
4
|
+
inline?: boolean | undefined;
|
|
5
|
+
meta?: string | undefined;
|
|
6
|
+
}, "ref"> & import("react").RefAttributes<HTMLElement>>>;
|
|
7
|
+
export default _default;
|
|
8
|
+
export declare const Code: ComponentStory<import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "inline"> & {
|
|
9
|
+
inline?: boolean | undefined;
|
|
10
|
+
meta?: string | undefined;
|
|
11
|
+
}, "ref"> & import("react").RefAttributes<HTMLElement>>>;
|