eddev 2.0.0-beta.22 → 2.0.0-beta.24
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/dist/app/entry/MetaTags.d.ts +6 -0
- package/dist/app/entry/MetaTags.js +17 -0
- package/dist/app/entry/ssr-root-client.d.ts +3 -1
- package/dist/app/entry/ssr-root-client.js +10 -3
- package/dist/app/entry/ssr-root.d.ts +4 -3
- package/dist/app/entry/ssr-root.js +18 -15
- package/dist/app/lib/blocks/ErrorBoundaryFrontend.d.ts +1 -1
- package/dist/app/lib/blocks/editor/ErrorBoundaryEditor.d.ts +1 -1
- package/dist/app/lib/devtools/hooks/useTailwind.d.ts +32 -32
- package/dist/app/lib/legacy-stitches/createStitches.d.ts +509 -1
- package/dist/app/lib/routing/components/BrowserRouter.d.ts +4 -1
- package/dist/app/lib/routing/components/BrowserRouter.js +10 -2
- package/dist/app/lib/routing/components/ClientOnly.d.ts +1 -1
- package/dist/app/lib/routing/components/RouteRenderer.js +2 -2
- package/dist/app/lib/routing/components/SSRRouter.js +1 -2
- package/dist/app/lib/routing/context.js +1 -95
- package/dist/app/lib/routing/hooks/useRouteMeta.d.ts +5 -0
- package/dist/app/lib/routing/hooks/useRouteMeta.js +9 -0
- package/dist/app/lib/routing/types.d.ts +12 -5
- package/dist/app/lib/routing/utils.d.ts +2 -1
- package/dist/app/lib/routing/utils.js +5 -0
- package/dist/app/server/proxy-wp-admin.js +1 -1
- package/dist/app/server/render-ssr-page.js +11 -3
- package/dist/app/server/server-context.d.ts +8 -2
- package/dist/app/server/server-context.js +20 -3
- package/dist/node/cli/cli.js +2 -1
- package/dist/node/cli/version.d.ts +1 -1
- package/dist/node/cli/version.js +1 -1
- package/dist/node/compiler/vinxi-app.d.ts +9 -0
- package/dist/node/compiler/vinxi-app.js +19 -1
- package/dist/node/compiler/vinxi-codegen.js +76 -35
- package/dist/node/project/favicons.d.ts +0 -1
- package/dist/node/project/favicons.js +1 -1
- package/dist/node/types/block-type.d.ts +2 -2
- package/package.json +4 -3
- package/tsconfig.app.json +2 -2
- package/tsconfig.node.json +2 -2
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Fragment } from "react/jsx-runtime";
|
|
3
|
+
export function MetaTags(props) {
|
|
4
|
+
return (_jsx(Fragment, { children: props.tags?.map((tag, i) => {
|
|
5
|
+
const Component = tag.tagName;
|
|
6
|
+
const props = { ...tag.attributes };
|
|
7
|
+
if (tag.inner) {
|
|
8
|
+
if (tag.tagName === "title") {
|
|
9
|
+
props.children = tag.inner;
|
|
10
|
+
}
|
|
11
|
+
else {
|
|
12
|
+
props.dangerouslySetInnerHTML = { __html: tag.inner };
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
return _jsx(Component, { ...props }, i);
|
|
16
|
+
}) }));
|
|
17
|
+
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
|
-
|
|
2
|
+
import { RouteMetaTag } from "../lib/routing/types.js";
|
|
3
|
+
export declare function SSRClientRoot(props: {
|
|
3
4
|
assets: ReactNode;
|
|
5
|
+
metaTags: RouteMetaTag[];
|
|
4
6
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { QueryClientProvider } from "@tanstack/react-query";
|
|
3
|
-
import { Suspense } from "react";
|
|
3
|
+
import { Suspense, useRef } from "react";
|
|
4
4
|
import { getQueryClient } from "../utils/query-client.js";
|
|
5
5
|
import { BrowserRouter } from "../lib/routing/components/BrowserRouter.js";
|
|
6
6
|
import { DevUILoader } from "../lib/devtools/loader.js";
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
import { MetaTags } from "./MetaTags.js";
|
|
8
|
+
import { useRouteMeta } from "../lib/routing/hooks/useRouteMeta.js";
|
|
9
|
+
export function SSRClientRoot(props) {
|
|
10
|
+
const router = useRef(null);
|
|
11
|
+
return (_jsxs("html", { lang: "en", children: [_jsxs("head", { children: [_jsx("link", { rel: "icon", href: "/favicon.ico" }), _jsx(DynamicMetaTags, { tags: props.metaTags, router: router }), props.assets] }), _jsx("body", { children: _jsxs(QueryClientProvider, { client: getQueryClient(), children: [_jsx(Suspense, { children: _jsx(BrowserRouter, { routerRef: router }) }), _jsx(DevUILoader, {})] }) })] }));
|
|
12
|
+
}
|
|
13
|
+
function DynamicMetaTags(props) {
|
|
14
|
+
const data = useRouteMeta();
|
|
15
|
+
return _jsx(MetaTags, { tags: data.tags ?? [] });
|
|
9
16
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import type { RouteData } from "../lib/routing/types.js";
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import type { RouteData, RouteMetaTag } from "../lib/routing/types.js";
|
|
3
3
|
import type { RouteLoader } from "../lib/routing/loader.js";
|
|
4
|
-
export declare function SSRRoot(
|
|
4
|
+
export declare function SSRRoot(props: {
|
|
5
5
|
pathname: string;
|
|
6
6
|
initialData: RouteData;
|
|
7
7
|
assets: ReactNode;
|
|
8
8
|
loader: RouteLoader;
|
|
9
|
+
metaTags: RouteMetaTag[];
|
|
9
10
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,21 +1,24 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Suspense } from "react";
|
|
2
3
|
import { QueryClientProvider } from "@tanstack/react-query";
|
|
3
4
|
import { getQueryClient } from "../utils/query-client.js";
|
|
4
5
|
import { SSRRouter } from "../lib/routing/components/SSRRouter.js";
|
|
5
6
|
import { normalizeRoute } from "../lib/routing/utils.js";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
loader.
|
|
9
|
-
loader.
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
7
|
+
import { MetaTags } from "./MetaTags.js";
|
|
8
|
+
export function SSRRoot(props) {
|
|
9
|
+
const loader = props.loader;
|
|
10
|
+
loader.setAppData(props.initialData.appData.data);
|
|
11
|
+
loader.populateRouteData(props.pathname, props.initialData);
|
|
12
|
+
return (_jsxs("html", { lang: "en", children: [_jsxs("head", { children: [_jsx("link", { rel: "icon", href: "/favicon.ico" }), _jsx(MetaTags, { tags: props.metaTags }), props.assets] }), _jsx("body", { children: _jsx(QueryClientProvider, { client: getQueryClient(), children: _jsx(Suspense, { children: _jsx(SSRRouter, { loader: loader, route: normalizeRoute({
|
|
13
|
+
id: "initial",
|
|
14
|
+
component: loader.getRouteComponent(props.initialData.view),
|
|
15
|
+
key: "",
|
|
16
|
+
props: props.initialData.viewData.data,
|
|
17
|
+
view: props.initialData.view,
|
|
18
|
+
search: "",
|
|
19
|
+
pathname: props.pathname,
|
|
20
|
+
query: {},
|
|
21
|
+
hash: "",
|
|
22
|
+
meta: {},
|
|
23
|
+
}) }) }) }) })] }));
|
|
21
24
|
}
|
|
@@ -10,6 +10,6 @@ export declare class ErrorBoundaryFrontend extends Component<Props, State> {
|
|
|
10
10
|
state: State;
|
|
11
11
|
static getDerivedStateFromError(err: Error): State;
|
|
12
12
|
componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
|
|
13
|
-
render(): string | number | boolean | import("react/jsx-runtime").JSX.Element |
|
|
13
|
+
render(): string | number | boolean | Iterable<ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined;
|
|
14
14
|
}
|
|
15
15
|
export {};
|
|
@@ -10,6 +10,6 @@ export declare class ErrorBoundaryEditor extends Component<Props, State> {
|
|
|
10
10
|
state: State;
|
|
11
11
|
static getDerivedStateFromError(err: Error): State;
|
|
12
12
|
componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
|
|
13
|
-
render(): string | number | boolean | import("react/jsx-runtime").JSX.Element |
|
|
13
|
+
render(): string | number | boolean | Iterable<React.ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined;
|
|
14
14
|
}
|
|
15
15
|
export {};
|
|
@@ -882,20 +882,15 @@ export declare function useTailwindConfig(): {
|
|
|
882
882
|
} | undefined;
|
|
883
883
|
readonly corePlugins?: readonly (import("tailwindcss/types/generated/corePluginList.js").CorePluginList | undefined)[] | {
|
|
884
884
|
readonly filter?: boolean | undefined;
|
|
885
|
-
readonly backgroundColor?: boolean | undefined;
|
|
886
|
-
readonly fontSize?: boolean | undefined;
|
|
887
|
-
readonly inset?: boolean | undefined;
|
|
888
|
-
readonly borderRadius?: boolean | undefined;
|
|
889
|
-
readonly padding?: boolean | undefined;
|
|
890
|
-
readonly fontFamily?: boolean | undefined;
|
|
891
885
|
readonly fill?: boolean | undefined;
|
|
892
|
-
readonly display?: boolean | undefined;
|
|
893
|
-
readonly flex?: boolean | undefined;
|
|
894
886
|
readonly translate?: boolean | undefined;
|
|
895
887
|
readonly content?: boolean | undefined;
|
|
896
888
|
readonly height?: boolean | undefined;
|
|
897
889
|
readonly width?: boolean | undefined;
|
|
898
890
|
readonly cursor?: boolean | undefined;
|
|
891
|
+
readonly display?: boolean | undefined;
|
|
892
|
+
readonly fontFamily?: boolean | undefined;
|
|
893
|
+
readonly fontSize?: boolean | undefined;
|
|
899
894
|
readonly fontStyle?: boolean | undefined;
|
|
900
895
|
readonly fontWeight?: boolean | undefined;
|
|
901
896
|
readonly letterSpacing?: boolean | undefined;
|
|
@@ -911,6 +906,11 @@ export declare function useTailwindConfig(): {
|
|
|
911
906
|
readonly transform?: boolean | undefined;
|
|
912
907
|
readonly visibility?: boolean | undefined;
|
|
913
908
|
readonly size?: boolean | undefined;
|
|
909
|
+
readonly backgroundColor?: boolean | undefined;
|
|
910
|
+
readonly inset?: boolean | undefined;
|
|
911
|
+
readonly borderRadius?: boolean | undefined;
|
|
912
|
+
readonly padding?: boolean | undefined;
|
|
913
|
+
readonly flex?: boolean | undefined;
|
|
914
914
|
readonly blur?: boolean | undefined;
|
|
915
915
|
readonly resize?: boolean | undefined;
|
|
916
916
|
readonly preflight?: boolean | undefined;
|
|
@@ -1927,20 +1927,15 @@ export declare function useTailwindConfig(): {
|
|
|
1927
1927
|
} | undefined;
|
|
1928
1928
|
readonly corePlugins?: readonly (import("tailwindcss/types/generated/corePluginList.js").CorePluginList | undefined)[] | {
|
|
1929
1929
|
readonly filter?: boolean | undefined;
|
|
1930
|
-
readonly backgroundColor?: boolean | undefined;
|
|
1931
|
-
readonly fontSize?: boolean | undefined;
|
|
1932
|
-
readonly inset?: boolean | undefined;
|
|
1933
|
-
readonly borderRadius?: boolean | undefined;
|
|
1934
|
-
readonly padding?: boolean | undefined;
|
|
1935
|
-
readonly fontFamily?: boolean | undefined;
|
|
1936
1930
|
readonly fill?: boolean | undefined;
|
|
1937
|
-
readonly display?: boolean | undefined;
|
|
1938
|
-
readonly flex?: boolean | undefined;
|
|
1939
1931
|
readonly translate?: boolean | undefined;
|
|
1940
1932
|
readonly content?: boolean | undefined;
|
|
1941
1933
|
readonly height?: boolean | undefined;
|
|
1942
1934
|
readonly width?: boolean | undefined;
|
|
1943
1935
|
readonly cursor?: boolean | undefined;
|
|
1936
|
+
readonly display?: boolean | undefined;
|
|
1937
|
+
readonly fontFamily?: boolean | undefined;
|
|
1938
|
+
readonly fontSize?: boolean | undefined;
|
|
1944
1939
|
readonly fontStyle?: boolean | undefined;
|
|
1945
1940
|
readonly fontWeight?: boolean | undefined;
|
|
1946
1941
|
readonly letterSpacing?: boolean | undefined;
|
|
@@ -1956,6 +1951,11 @@ export declare function useTailwindConfig(): {
|
|
|
1956
1951
|
readonly transform?: boolean | undefined;
|
|
1957
1952
|
readonly visibility?: boolean | undefined;
|
|
1958
1953
|
readonly size?: boolean | undefined;
|
|
1954
|
+
readonly backgroundColor?: boolean | undefined;
|
|
1955
|
+
readonly inset?: boolean | undefined;
|
|
1956
|
+
readonly borderRadius?: boolean | undefined;
|
|
1957
|
+
readonly padding?: boolean | undefined;
|
|
1958
|
+
readonly flex?: boolean | undefined;
|
|
1959
1959
|
readonly blur?: boolean | undefined;
|
|
1960
1960
|
readonly resize?: boolean | undefined;
|
|
1961
1961
|
readonly preflight?: boolean | undefined;
|
|
@@ -2947,20 +2947,15 @@ export declare function useTailwindConfig(): {
|
|
|
2947
2947
|
} | undefined;
|
|
2948
2948
|
readonly corePlugins?: readonly (import("tailwindcss/types/generated/corePluginList.js").CorePluginList | undefined)[] | {
|
|
2949
2949
|
readonly filter?: boolean | undefined;
|
|
2950
|
-
readonly backgroundColor?: boolean | undefined;
|
|
2951
|
-
readonly fontSize?: boolean | undefined;
|
|
2952
|
-
readonly inset?: boolean | undefined;
|
|
2953
|
-
readonly borderRadius?: boolean | undefined;
|
|
2954
|
-
readonly padding?: boolean | undefined;
|
|
2955
|
-
readonly fontFamily?: boolean | undefined;
|
|
2956
2950
|
readonly fill?: boolean | undefined;
|
|
2957
|
-
readonly display?: boolean | undefined;
|
|
2958
|
-
readonly flex?: boolean | undefined;
|
|
2959
2951
|
readonly translate?: boolean | undefined;
|
|
2960
2952
|
readonly content?: boolean | undefined;
|
|
2961
2953
|
readonly height?: boolean | undefined;
|
|
2962
2954
|
readonly width?: boolean | undefined;
|
|
2963
2955
|
readonly cursor?: boolean | undefined;
|
|
2956
|
+
readonly display?: boolean | undefined;
|
|
2957
|
+
readonly fontFamily?: boolean | undefined;
|
|
2958
|
+
readonly fontSize?: boolean | undefined;
|
|
2964
2959
|
readonly fontStyle?: boolean | undefined;
|
|
2965
2960
|
readonly fontWeight?: boolean | undefined;
|
|
2966
2961
|
readonly letterSpacing?: boolean | undefined;
|
|
@@ -2976,6 +2971,11 @@ export declare function useTailwindConfig(): {
|
|
|
2976
2971
|
readonly transform?: boolean | undefined;
|
|
2977
2972
|
readonly visibility?: boolean | undefined;
|
|
2978
2973
|
readonly size?: boolean | undefined;
|
|
2974
|
+
readonly backgroundColor?: boolean | undefined;
|
|
2975
|
+
readonly inset?: boolean | undefined;
|
|
2976
|
+
readonly borderRadius?: boolean | undefined;
|
|
2977
|
+
readonly padding?: boolean | undefined;
|
|
2978
|
+
readonly flex?: boolean | undefined;
|
|
2979
2979
|
readonly blur?: boolean | undefined;
|
|
2980
2980
|
readonly resize?: boolean | undefined;
|
|
2981
2981
|
readonly preflight?: boolean | undefined;
|
|
@@ -3992,20 +3992,15 @@ export declare function useTailwindConfig(): {
|
|
|
3992
3992
|
} | undefined;
|
|
3993
3993
|
readonly corePlugins?: readonly (import("tailwindcss/types/generated/corePluginList.js").CorePluginList | undefined)[] | {
|
|
3994
3994
|
readonly filter?: boolean | undefined;
|
|
3995
|
-
readonly backgroundColor?: boolean | undefined;
|
|
3996
|
-
readonly fontSize?: boolean | undefined;
|
|
3997
|
-
readonly inset?: boolean | undefined;
|
|
3998
|
-
readonly borderRadius?: boolean | undefined;
|
|
3999
|
-
readonly padding?: boolean | undefined;
|
|
4000
|
-
readonly fontFamily?: boolean | undefined;
|
|
4001
3995
|
readonly fill?: boolean | undefined;
|
|
4002
|
-
readonly display?: boolean | undefined;
|
|
4003
|
-
readonly flex?: boolean | undefined;
|
|
4004
3996
|
readonly translate?: boolean | undefined;
|
|
4005
3997
|
readonly content?: boolean | undefined;
|
|
4006
3998
|
readonly height?: boolean | undefined;
|
|
4007
3999
|
readonly width?: boolean | undefined;
|
|
4008
4000
|
readonly cursor?: boolean | undefined;
|
|
4001
|
+
readonly display?: boolean | undefined;
|
|
4002
|
+
readonly fontFamily?: boolean | undefined;
|
|
4003
|
+
readonly fontSize?: boolean | undefined;
|
|
4009
4004
|
readonly fontStyle?: boolean | undefined;
|
|
4010
4005
|
readonly fontWeight?: boolean | undefined;
|
|
4011
4006
|
readonly letterSpacing?: boolean | undefined;
|
|
@@ -4021,6 +4016,11 @@ export declare function useTailwindConfig(): {
|
|
|
4021
4016
|
readonly transform?: boolean | undefined;
|
|
4022
4017
|
readonly visibility?: boolean | undefined;
|
|
4023
4018
|
readonly size?: boolean | undefined;
|
|
4019
|
+
readonly backgroundColor?: boolean | undefined;
|
|
4020
|
+
readonly inset?: boolean | undefined;
|
|
4021
|
+
readonly borderRadius?: boolean | undefined;
|
|
4022
|
+
readonly padding?: boolean | undefined;
|
|
4023
|
+
readonly flex?: boolean | undefined;
|
|
4024
4024
|
readonly blur?: boolean | undefined;
|
|
4025
4025
|
readonly resize?: boolean | undefined;
|
|
4026
4026
|
readonly preflight?: boolean | undefined;
|