eddev 2.0.0-beta.6 → 2.0.0-beta.61
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 +7 -0
- package/dist/app/entry/MetaTags.js +17 -0
- package/dist/app/entry/boot-admin.d.ts +1 -0
- package/dist/app/entry/boot-admin.js +14 -0
- package/dist/app/entry/spa-root.d.ts +1 -0
- package/dist/app/entry/spa-root.js +8 -0
- package/dist/app/entry/ssr-root-client.d.ts +6 -0
- package/dist/app/entry/ssr-root-client.js +26 -0
- package/dist/app/entry/ssr-root.d.ts +10 -0
- package/dist/app/entry/ssr-root.js +23 -0
- package/dist/app/lib/admin/index.d.ts +2 -2
- package/dist/app/lib/admin/index.js +2 -2
- package/dist/app/lib/admin/installFieldTypes.js +1 -1
- package/dist/app/lib/admin/runWidgets.js +1 -1
- package/dist/app/lib/blocks/ContentBlocks.d.ts +1 -1
- package/dist/app/lib/blocks/ContentBlocks.js +5 -5
- package/dist/app/lib/blocks/EditableText.d.ts +1 -1
- package/dist/app/lib/blocks/EditableText.js +3 -3
- package/dist/app/lib/blocks/InnerBlocks.d.ts +13 -3
- package/dist/app/lib/blocks/InnerBlocks.js +13 -5
- package/dist/app/lib/blocks/block-utils.d.ts +2 -2
- package/dist/app/lib/blocks/block-utils.js +2 -2
- package/dist/app/lib/blocks/editor/EditorSupport.js +4 -5
- package/dist/app/lib/blocks/editor/editor-config.d.ts +16 -3
- package/dist/app/lib/blocks/editor/editor-config.js +2 -4
- package/dist/app/lib/blocks/editor/installGutenbergHooks.js +17 -13
- package/dist/app/lib/blocks/editor/root-blocks.d.ts +6 -0
- package/dist/app/lib/blocks/editor/root-blocks.js +30 -0
- package/dist/app/lib/blocks/editor/usePostEditor.d.ts +1 -1
- package/dist/app/lib/blocks/index.d.ts +9 -9
- package/dist/app/lib/blocks/index.js +9 -9
- package/dist/app/lib/blocks/inline-editing.d.ts +1 -1
- package/dist/app/lib/blocks/inline-editing.js +7 -5
- package/dist/app/lib/devtools/components/BreakpointIndicator.js +6 -4
- package/dist/app/lib/devtools/components/DevUI.js +4 -3
- package/dist/app/lib/devtools/components/GridIndicator.d.ts +1 -0
- package/dist/app/lib/devtools/components/GridIndicator.js +24 -0
- package/dist/app/lib/devtools/dev-tools-store.d.ts +9 -0
- package/dist/app/lib/devtools/dev-tools-store.js +8 -0
- package/dist/app/lib/devtools/hooks/usePersistState.d.ts +1 -1
- package/dist/app/lib/devtools/hooks/usePersistState.js +11 -2
- package/dist/app/lib/devtools/hooks/useTailwind.d.ts +1094 -1095
- package/dist/app/lib/devtools/hooks/useTailwind.js +6 -3
- package/dist/app/lib/devtools/index.d.ts +1 -0
- package/dist/app/lib/devtools/index.js +1 -1
- package/dist/app/lib/devtools/loader.js +8 -7
- package/dist/app/lib/devtools/useQueryDebug.d.ts +7 -1
- package/dist/app/lib/devtools/useQueryDebug.js +5 -8
- package/dist/app/lib/dynamic/index.d.ts +1 -1
- package/dist/app/lib/dynamic/index.js +1 -1
- package/dist/app/lib/hooks/index.d.ts +4 -5
- package/dist/app/lib/hooks/index.js +4 -5
- package/dist/app/lib/hooks/queryUtils.d.ts +37 -3
- package/dist/app/lib/hooks/queryUtils.js +63 -26
- package/dist/app/lib/hooks/useAppData.js +1 -1
- package/dist/app/lib/hooks/useRPC.d.ts +0 -4
- package/dist/app/lib/hooks/useRPC.js +1 -8
- package/dist/app/lib/internal/finalize-rpc.d.ts +17 -0
- package/dist/app/lib/internal/finalize-rpc.js +3 -0
- package/dist/app/lib/internal/index.d.ts +5 -4
- package/dist/app/lib/internal/index.js +5 -4
- package/dist/app/lib/internal/internal-store.d.ts +0 -2
- package/dist/app/lib/internal/internal-store.js +1 -3
- package/dist/app/lib/internal/read-admin-manifest.d.ts +1 -1
- package/dist/app/lib/legacy-stitches/createStitches.d.ts +21 -21
- package/dist/app/lib/legacy-stitches/createStitches.js +1 -1
- package/dist/app/lib/legacy-stitches/index.d.ts +1 -1
- package/dist/app/lib/legacy-stitches/index.js +1 -1
- package/dist/app/lib/routing/components/BackButton.d.ts +49 -0
- package/dist/app/lib/routing/components/BackButton.js +47 -0
- package/dist/app/lib/routing/components/BrowserRouter.d.ts +4 -1
- package/dist/app/lib/routing/components/BrowserRouter.js +79 -11
- package/dist/app/lib/routing/components/ClientOnly.js +1 -1
- package/dist/app/lib/routing/components/Link.d.ts +1 -0
- package/dist/app/lib/routing/components/Link.js +9 -10
- package/dist/app/lib/routing/components/RouteRenderer.d.ts +1 -1
- package/dist/app/lib/routing/components/RouteRenderer.js +7 -6
- package/dist/app/lib/routing/components/SSRRouter.d.ts +2 -2
- package/dist/app/lib/routing/components/SSRRouter.js +5 -6
- package/dist/app/lib/routing/components/ScrollRestoration.js +1 -1
- package/dist/app/lib/routing/context.d.ts +8 -5
- package/dist/app/lib/routing/context.js +13 -96
- package/dist/app/lib/routing/hooks/useRestorableState.d.ts +2 -1
- package/dist/app/lib/routing/hooks/useRestorableState.js +2 -1
- package/dist/app/lib/routing/hooks/useRoute.d.ts +16 -1
- package/dist/app/lib/routing/hooks/useRoute.js +22 -1
- 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/hooks/useRouteTransition.d.ts +1 -1
- package/dist/app/lib/routing/hooks/useRouteTransition.js +1 -1
- package/dist/app/lib/routing/hooks/useRouter.d.ts +1 -1
- package/dist/app/lib/routing/hooks/useRouter.js +1 -1
- package/dist/app/lib/routing/hooks/useRouterEvents.d.ts +1 -1
- package/dist/app/lib/routing/hooks/useRouterEvents.js +1 -1
- package/dist/app/lib/routing/hooks/useRouterState.d.ts +1 -1
- package/dist/app/lib/routing/hooks/useRouterState.js +1 -1
- package/dist/app/lib/routing/hooks/useSearchParams.js +2 -2
- package/dist/app/lib/routing/index.d.ts +14 -13
- package/dist/app/lib/routing/index.js +14 -13
- package/dist/app/lib/routing/loader.d.ts +2 -2
- package/dist/app/lib/routing/loader.js +7 -5
- package/dist/app/lib/routing/types.d.ts +35 -9
- package/dist/app/lib/routing/utils.d.ts +3 -1
- package/dist/app/lib/routing/utils.js +12 -1
- package/dist/app/lib/{hooks → runtime}/apiConfig.d.ts +6 -2
- package/dist/app/lib/runtime/apiConfig.js +6 -0
- package/dist/app/lib/runtime/errorHandling.d.ts +39 -0
- package/dist/app/lib/runtime/errorHandling.js +6 -0
- package/dist/app/lib/runtime/index.d.ts +2 -0
- package/dist/app/lib/runtime/index.js +2 -0
- package/dist/app/lib/views/index.d.ts +1 -1
- package/dist/app/lib/views/index.js +1 -1
- package/dist/app/server/defineRouter.d.ts +2 -0
- package/dist/app/server/defineRouter.js +4 -0
- package/dist/app/server/index.d.ts +5 -0
- package/dist/app/server/index.js +5 -0
- package/dist/app/server/proxy-wp-admin.d.ts +2 -0
- package/dist/app/server/proxy-wp-admin.js +112 -0
- package/dist/app/server/render-ssr-page.d.ts +11 -0
- package/dist/app/server/render-ssr-page.js +100 -0
- package/dist/app/server/rpc.d.ts +56 -0
- package/dist/app/server/rpc.js +18 -0
- package/dist/app/server/server-context.d.ts +53 -0
- package/dist/app/server/server-context.js +149 -0
- package/dist/app/server/utils/headers.d.ts +1 -0
- package/dist/app/server/utils/headers.js +17 -0
- package/dist/app/server/utils/replace-host.d.ts +6 -4
- package/dist/app/server/utils/replace-host.js +58 -11
- package/dist/app/utils/APIProvider.d.ts +2 -0
- package/dist/app/utils/APIProvider.js +5 -0
- package/dist/app/utils/BlockErrorBoundary.d.ts +19 -0
- package/dist/app/utils/BlockErrorBoundary.js +38 -0
- package/dist/app/utils/ErrorMessage.d.ts +5 -0
- package/dist/app/utils/ErrorMessage.js +14 -0
- package/dist/app/utils/RouteErrorBoundary.d.ts +18 -0
- package/dist/app/utils/RouteErrorBoundary.js +38 -0
- package/dist/app/utils/query-client.d.ts +2 -0
- package/dist/app/utils/query-client.js +5 -1
- package/dist/app/utils/trpc-client.d.ts +2 -0
- package/dist/app/utils/trpc-client.js +34 -0
- package/dist/node/cli/cli-worker.d.ts +1 -1
- package/dist/node/cli/cli-worker.js +12 -3
- package/dist/node/cli/cli.js +91 -13
- package/dist/node/cli/display/CLIApp.d.ts +1 -1
- package/dist/node/cli/display/CLIApp.js +4 -7
- package/dist/node/cli/display/components/LogEntries.d.ts +1 -1
- package/dist/node/cli/display/hooks/useStatefulLog.d.ts +1 -1
- package/dist/node/cli/display/tools/CreateBlock.d.ts +1 -1
- package/dist/node/cli/display/tools/cli-tools.d.ts +1 -11
- package/dist/node/cli/display/tools/cli-tools.js +9 -9
- package/dist/node/cli/display/util/colors.d.ts +2 -2
- package/dist/node/cli/version.d.ts +1 -1
- package/dist/node/cli/version.js +1 -1
- package/dist/node/compiler/build-vinxi.d.ts +8 -0
- package/dist/node/compiler/build-vinxi.js +38 -0
- package/dist/node/compiler/bundler.admin.d.ts +2 -2
- package/dist/node/compiler/bundler.admin.js +3 -4
- package/dist/node/compiler/bundler.frontend.d.ts +1 -1
- package/dist/node/compiler/bundler.frontend.js +3 -4
- package/dist/node/compiler/{serverless.dev.d.ts → dev-server.d.ts} +7 -5
- package/dist/node/compiler/dev-server.js +106 -0
- package/dist/node/compiler/get-vite-config.d.ts +19 -0
- package/dist/node/compiler/get-vite-config.js +200 -0
- package/dist/node/compiler/vinxi-app.d.ts +20 -0
- package/dist/node/compiler/vinxi-app.js +186 -0
- package/dist/node/compiler/vinxi-codegen.d.ts +12 -0
- package/dist/node/compiler/vinxi-codegen.js +515 -0
- package/dist/node/graphql/graphql-codegen.d.ts +12 -2
- package/dist/node/graphql/graphql-codegen.js +213 -36
- package/dist/node/graphql/graphql-schema-loader.js +15 -18
- package/dist/node/graphql/plugins/gql-plugin-queries.js +1 -1
- package/dist/node/graphql/query-files-loader.d.ts +3 -0
- package/dist/node/graphql/query-files-loader.js +5 -0
- package/dist/node/project/config.d.ts +31 -37
- package/dist/node/project/config.js +13 -11
- package/dist/node/project/env.d.ts +1 -1
- package/dist/node/project/env.js +1 -1
- package/dist/node/project/manifest/block-manifest.js +3 -2
- package/dist/node/project/manifest/manifest.d.ts +2 -1
- package/dist/node/project/manifest/manifest.js +15 -11
- package/dist/node/project/manifest/routes-manifest.d.ts +20 -0
- package/dist/node/project/manifest/routes-manifest.js +74 -0
- package/dist/node/project/manifest/view-manifest.js +2 -2
- package/dist/node/project/project.d.ts +5 -2
- package/dist/node/project/project.js +21 -20
- package/dist/node/project/wp-info.js +3 -2
- package/dist/node/types/block-type.d.ts +5 -0
- package/dist/node/types/block-type.js +1 -0
- package/dist/node/types/view-type.js +3 -4
- package/dist/node/utils/fs-codegen.d.ts +42 -0
- package/dist/node/utils/fs-codegen.js +98 -0
- package/dist/node/utils/fs.js +2 -0
- package/dist/node/utils/{selfSignedCert.js → self-signed-cert.js} +1 -1
- package/dist/node/utils/{statefulLog.js → stateful-log.js} +1 -1
- package/dist/node/utils/watch-file-tree.d.ts +25 -0
- package/dist/node/utils/{watchFileTree.js → watch-file-tree.js} +12 -5
- package/package.json +39 -32
- package/types.app.d.ts +4 -2
- package/types.app.internal.d.ts +2 -2
- package/types.node.d.ts +3 -3
- package/dist/app/entry/Root.d.ts +0 -1
- package/dist/app/entry/Root.js +0 -9
- package/dist/app/entry/main.admin.d.ts +0 -3
- package/dist/app/entry/main.admin.js +0 -10
- package/dist/app/entry/main.frontend.spa.d.ts +0 -3
- package/dist/app/entry/main.frontend.spa.js +0 -13
- package/dist/app/entry/main.frontend.ssr.d.ts +0 -21
- package/dist/app/entry/main.frontend.ssr.js +0 -79
- package/dist/app/entry/main.serverless.dev.d.ts +0 -4
- package/dist/app/entry/main.serverless.dev.js +0 -21
- package/dist/app/lib/blocks/ErrorBoundaryFrontend.d.ts +0 -15
- package/dist/app/lib/blocks/ErrorBoundaryFrontend.js +0 -35
- package/dist/app/lib/hooks/apiConfig.js +0 -4
- package/dist/app/lib/hooks/usePageLoad.d.ts +0 -6
- package/dist/app/lib/hooks/usePageLoad.js +0 -5
- package/dist/app/server/create-api-builtin-hono.d.ts +0 -8
- package/dist/app/server/create-api-builtin-hono.js +0 -80
- package/dist/app/server/create-ssr-hono.d.ts +0 -18
- package/dist/app/server/create-ssr-hono.js +0 -104
- package/dist/app/server/utils/index.html.d.ts +0 -2
- package/dist/app/server/utils/index.html.js +0 -14
- package/dist/node/compiler/index.html.d.ts +0 -2
- package/dist/node/compiler/index.html.js +0 -15
- package/dist/node/compiler/serverless.dev.js +0 -222
- package/dist/node/compiler/vite/get-vite-config.d.ts +0 -13
- package/dist/node/compiler/vite/get-vite-config.js +0 -315
- package/dist/node/compiler/vite/plugin-admin.d.ts +0 -4
- package/dist/node/compiler/vite/plugin-admin.js +0 -67
- package/dist/node/compiler/vite/plugin-blocks.d.ts +0 -4
- package/dist/node/compiler/vite/plugin-blocks.js +0 -73
- package/dist/node/compiler/vite/plugin-entry.d.ts +0 -6
- package/dist/node/compiler/vite/plugin-entry.js +0 -16
- package/dist/node/compiler/vite/plugin-resolved-tailwind.d.ts +0 -4
- package/dist/node/compiler/vite/plugin-resolved-tailwind.js +0 -29
- package/dist/node/compiler/vite/plugin-theme.d.ts +0 -4
- package/dist/node/compiler/vite/plugin-theme.js +0 -40
- package/dist/node/compiler/vite/plugin-views.d.ts +0 -4
- package/dist/node/compiler/vite/plugin-views.js +0 -51
- package/dist/node/utils/console.d.ts +0 -21
- package/dist/node/utils/console.js +0 -28
- package/dist/node/utils/unsafe-fetch.d.ts +0 -2
- package/dist/node/utils/unsafe-fetch.js +0 -19
- package/dist/node/utils/watchFileTree.d.ts +0 -11
- package/tsup.config.ts +0 -40
- package/types.manifests.d.ts +0 -22
- /package/dist/node/utils/{formatZodError.d.ts → format-zod-error.d.ts} +0 -0
- /package/dist/node/utils/{formatZodError.js → format-zod-error.js} +0 -0
- /package/dist/node/utils/{getRepoInfo.d.ts → get-repo-info.d.ts} +0 -0
- /package/dist/node/utils/{getRepoInfo.js → get-repo-info.js} +0 -0
- /package/dist/node/utils/{highlightCode.d.ts → highlight-code.d.ts} +0 -0
- /package/dist/node/utils/{highlightCode.js → highlight-code.js} +0 -0
- /package/dist/node/utils/{isDeploying.d.ts → is-deploying.d.ts} +0 -0
- /package/dist/node/utils/{isDeploying.js → is-deploying.js} +0 -0
- /package/dist/node/utils/{selfSignedCert.d.ts → self-signed-cert.d.ts} +0 -0
- /package/dist/node/utils/{statefulLog.d.ts → stateful-log.d.ts} +0 -0
- /package/dist/node/utils/{export-extractor.d.ts → ts-export-extractor.d.ts} +0 -0
- /package/dist/node/utils/{export-extractor.js → ts-export-extractor.js} +0 -0
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import "@manifest/tailwind";
|
|
2
1
|
import { useSnapshot } from "valtio";
|
|
3
|
-
import {
|
|
2
|
+
import { devToolsStore } from "../dev-tools-store.js";
|
|
3
|
+
import { useEffect } from "react";
|
|
4
4
|
export function useTailwindConfig() {
|
|
5
|
-
|
|
5
|
+
useEffect(() => {
|
|
6
|
+
devToolsStore.loadTailwindConfig();
|
|
7
|
+
}, []);
|
|
8
|
+
return useSnapshot(devToolsStore).tailwindConfig;
|
|
6
9
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./dev-tools-store.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export * from "./dev-tools-store.js";
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useEffect } from "react";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
const DevUI = dynamic(() => import("./components/DevUI"));
|
|
2
|
+
import { lazy, useEffect } from "react";
|
|
3
|
+
import { usePersistState } from "./hooks/usePersistState.js";
|
|
4
|
+
import { useIsSSR } from "../routing/hooks/useIsSSR.js";
|
|
5
|
+
const DevUI = lazy(() => import("./components/DevUI.js"));
|
|
7
6
|
export function DevUILoader() {
|
|
8
7
|
const ssr = useIsSSR();
|
|
9
|
-
const [render, setRender] = usePersistState("enable_devui",
|
|
8
|
+
const [render, setRender] = usePersistState("enable_devui", false);
|
|
10
9
|
useEffect(() => {
|
|
11
|
-
if (document.location.search.includes("activate-dev-ui")
|
|
10
|
+
if (document.location.search.includes("activate-dev-ui") ||
|
|
11
|
+
window["ENABLE_DEV_UI"] ||
|
|
12
|
+
(env.client && env.dev)) {
|
|
12
13
|
setRender(true);
|
|
13
14
|
}
|
|
14
15
|
}, []);
|
|
@@ -6,4 +6,10 @@ export type QueryDebugItem = {
|
|
|
6
6
|
children: QueryDebugItem[];
|
|
7
7
|
};
|
|
8
8
|
export declare function setQueryDebug(value: QueryDebugItem | undefined): void;
|
|
9
|
-
export declare function useQueryDebugData():
|
|
9
|
+
export declare function useQueryDebugData(): {
|
|
10
|
+
readonly file: string;
|
|
11
|
+
readonly errors: readonly string[];
|
|
12
|
+
readonly duration: number;
|
|
13
|
+
readonly label: string;
|
|
14
|
+
readonly children: readonly any[];
|
|
15
|
+
} | undefined;
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
const
|
|
1
|
+
import { proxy, useSnapshot } from "valtio";
|
|
2
|
+
const store = proxy({
|
|
3
3
|
value: undefined,
|
|
4
|
-
|
|
5
|
-
set({ value });
|
|
6
|
-
},
|
|
7
|
-
}));
|
|
4
|
+
});
|
|
8
5
|
export function setQueryDebug(value) {
|
|
9
|
-
|
|
6
|
+
store.value = value;
|
|
10
7
|
}
|
|
11
8
|
export function useQueryDebugData() {
|
|
12
|
-
return
|
|
9
|
+
return useSnapshot(store).value;
|
|
13
10
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { dynamic, DynamicComponent } from "./dynamic";
|
|
1
|
+
export { dynamic, DynamicComponent } from "./dynamic.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { dynamic } from "./dynamic";
|
|
1
|
+
export { dynamic } from "./dynamic.js";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
export * from "./
|
|
2
|
-
export * from "./
|
|
3
|
-
export * from "./
|
|
4
|
-
export * from "
|
|
5
|
-
export * from "./apiConfig";
|
|
1
|
+
export * from "./useAppData.js";
|
|
2
|
+
export * from "./useRPC.js";
|
|
3
|
+
export * from "./queryUtils.js";
|
|
4
|
+
export * from "../runtime/apiConfig.js";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
export * from "./
|
|
2
|
-
export * from "./
|
|
3
|
-
export * from "./
|
|
4
|
-
export * from "
|
|
5
|
-
export * from "./apiConfig";
|
|
1
|
+
export * from "./useAppData.js";
|
|
2
|
+
export * from "./useRPC.js";
|
|
3
|
+
export * from "./queryUtils.js";
|
|
4
|
+
export * from "../runtime/apiConfig.js";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { FetchQueryOptions, UndefinedInitialDataOptions, UseMutationOptions, UseMutationResult, UseQueryResult
|
|
1
|
+
import { FetchQueryOptions, UndefinedInitialDataInfiniteOptions, UndefinedInitialDataOptions, UseInfiniteQueryResult, UseMutationOptions, UseMutationResult, UseQueryResult } from "@tanstack/react-query";
|
|
2
|
+
import { TRPCClientError } from "@trpc/client";
|
|
2
3
|
type OptionalMaybes<T> = T extends any[] ? T : T extends {
|
|
3
4
|
[key: string]: any;
|
|
4
5
|
} ? {
|
|
@@ -7,10 +8,17 @@ type OptionalMaybes<T> = T extends any[] ? T : T extends {
|
|
|
7
8
|
type MaybeVars = {
|
|
8
9
|
[key: string]: any;
|
|
9
10
|
} | undefined;
|
|
10
|
-
|
|
11
|
+
declare class QueryError extends Error {
|
|
12
|
+
name: string;
|
|
11
13
|
messages: string[];
|
|
12
14
|
statusCode: number;
|
|
13
|
-
|
|
15
|
+
constructor(args: {
|
|
16
|
+
messages: string[];
|
|
17
|
+
statusCode: number;
|
|
18
|
+
type: "query" | "mutation";
|
|
19
|
+
queryName: string;
|
|
20
|
+
});
|
|
21
|
+
}
|
|
14
22
|
/** Regular queries */
|
|
15
23
|
type CreateUseQueryOptions = {
|
|
16
24
|
name: string;
|
|
@@ -46,4 +54,30 @@ export type UseMutationFunction<TData, TArgs> = ((options?: Omit<UseMutationOpti
|
|
|
46
54
|
}) => Promise<TData>;
|
|
47
55
|
};
|
|
48
56
|
export declare function createUseMutation<TData extends any, TArgs extends MaybeVars>(init: CreateUseQueryOptions): UseMutationFunction<TData, TArgs>;
|
|
57
|
+
type RPCQueryName = RPCRouter["queries"]["key"];
|
|
58
|
+
type RPCQueryResult<T> = Extract<RPCRouter["queries"], {
|
|
59
|
+
key: T;
|
|
60
|
+
}>["output"];
|
|
61
|
+
type RPCQueryInput<T> = Extract<RPCRouter["queries"], {
|
|
62
|
+
key: T;
|
|
63
|
+
}>["input"];
|
|
64
|
+
type RPCQueryError<T> = TRPCClientError<Extract<RPCRouter["queries"], {
|
|
65
|
+
key: T;
|
|
66
|
+
}>["procedure"]>;
|
|
67
|
+
export declare function useRPCQuery<TName extends RPCQueryName>(key: TName, args: OptionalMaybes<RPCQueryInput<TName>>, options?: Omit<UndefinedInitialDataOptions<RPCQueryResult<TName>, RPCQueryError<TName>, RPCQueryResult<TName>>, "queryKey" | "queryFn"> & {
|
|
68
|
+
headers?: Record<string, string>;
|
|
69
|
+
}): UseQueryResult<RPCQueryResult<TName>, RPCQueryError<TName>>;
|
|
70
|
+
type RPCMutationName = RPCRouter["mutations"]["key"];
|
|
71
|
+
type RPCMutationResult<T> = Extract<RPCRouter["mutations"], {
|
|
72
|
+
key: T;
|
|
73
|
+
}>["output"];
|
|
74
|
+
type RPCMutationInput<T> = Extract<RPCRouter["mutations"], {
|
|
75
|
+
key: T;
|
|
76
|
+
}>["input"];
|
|
77
|
+
type RPCMutationError<T> = TRPCClientError<Extract<RPCRouter["mutations"], {
|
|
78
|
+
key: T;
|
|
79
|
+
}>["procedure"]>;
|
|
80
|
+
export declare function useRPCMutation<TName extends RPCMutationName>(key: TName, options?: Omit<UseMutationOptions<RPCMutationResult<TName>, RPCMutationError<TName>, RPCMutationInput<TName>>, "mutationFn"> & {
|
|
81
|
+
headers?: Record<string, string>;
|
|
82
|
+
}): UseMutationResult<RPCMutationResult<TName>, RPCMutationError<TName>, RPCMutationInput<TName>>;
|
|
49
83
|
export {};
|
|
@@ -1,13 +1,19 @@
|
|
|
1
|
-
import { useMutation, useQuery,
|
|
2
|
-
import { joinURL } from "ufo";
|
|
3
|
-
import { getQueryClient } from "../../utils/query-client";
|
|
4
|
-
import { useAPIConfig } from "./apiConfig";
|
|
1
|
+
import { useInfiniteQuery, useMutation, useQuery, } from "@tanstack/react-query";
|
|
5
2
|
import { useEffect, useState } from "react";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
import { joinURL } from "ufo";
|
|
4
|
+
import { getQueryClient } from "../../utils/query-client.js";
|
|
5
|
+
import { getRPCClient } from "../../utils/trpc-client.js";
|
|
6
|
+
import { apiConfig } from "../runtime/apiConfig.js";
|
|
7
|
+
class QueryError extends Error {
|
|
8
|
+
name = "QueryError";
|
|
9
|
+
messages;
|
|
10
|
+
statusCode;
|
|
11
|
+
constructor(args) {
|
|
12
|
+
const msg = args.messages.join(", ");
|
|
13
|
+
super(msg);
|
|
14
|
+
this.statusCode = args.statusCode;
|
|
15
|
+
this.messages = args.messages;
|
|
16
|
+
}
|
|
11
17
|
}
|
|
12
18
|
const fetchGETQuery = async (name, params, opts) => {
|
|
13
19
|
let url;
|
|
@@ -15,7 +21,7 @@ const fetchGETQuery = async (name, params, opts) => {
|
|
|
15
21
|
headers: opts?.headers,
|
|
16
22
|
};
|
|
17
23
|
if (env.serverless && env.client) {
|
|
18
|
-
url = `/
|
|
24
|
+
url = `/_data/query/${name}`;
|
|
19
25
|
}
|
|
20
26
|
else if (env.serverless) {
|
|
21
27
|
url = joinURL(env.origin ?? "", `/wp-json/ed/v1/query/${name}`);
|
|
@@ -26,33 +32,39 @@ const fetchGETQuery = async (name, params, opts) => {
|
|
|
26
32
|
if (params)
|
|
27
33
|
url += "?params=" + encodeURIComponent(params);
|
|
28
34
|
// Apply API configuration
|
|
29
|
-
const apiConfig = useAPIConfig.getState();
|
|
30
35
|
if (apiConfig.customQueryFetchOptions) {
|
|
31
36
|
options = await apiConfig.customQueryFetchOptions?.("query", name, params, url, options);
|
|
32
37
|
}
|
|
33
38
|
const response = await fetch(url, options);
|
|
39
|
+
if (apiConfig.onResponse)
|
|
40
|
+
apiConfig.onResponse(response, "query", name, params, url, options);
|
|
34
41
|
const payload = await response.json();
|
|
35
42
|
if (payload.errors?.length > 0) {
|
|
36
|
-
throw
|
|
43
|
+
throw new QueryError({
|
|
44
|
+
messages: payload.errors.map((e) => e.message),
|
|
45
|
+
statusCode: response.status,
|
|
46
|
+
queryName: name,
|
|
47
|
+
type: "query",
|
|
48
|
+
});
|
|
37
49
|
}
|
|
38
50
|
return payload.data;
|
|
39
51
|
};
|
|
40
52
|
export function createUseQuery(init) {
|
|
41
53
|
const hook = (args, options) => {
|
|
42
|
-
const customKey =
|
|
54
|
+
const customKey = apiConfig.customQueryKey;
|
|
43
55
|
return useQuery({
|
|
44
|
-
queryKey: [init.name, args, options?.headers,
|
|
45
|
-
queryFn: (args) => fetchGETQuery(init.name, args.queryKey[
|
|
56
|
+
queryKey: ["query", init.name, args, options?.headers, customKey],
|
|
57
|
+
queryFn: (args) => fetchGETQuery(init.name, args.queryKey[2] ? JSON.stringify(args.queryKey[2]) : "", {
|
|
46
58
|
headers: options?.headers,
|
|
47
59
|
}),
|
|
48
60
|
...options,
|
|
49
61
|
});
|
|
50
62
|
};
|
|
51
63
|
hook.fetch = async (args, options) => {
|
|
52
|
-
const customKey =
|
|
64
|
+
const customKey = apiConfig.customQueryKey;
|
|
53
65
|
return getQueryClient().fetchQuery({
|
|
54
|
-
queryKey: [init.name, args, options?.headers,
|
|
55
|
-
queryFn: (args) => fetchGETQuery(init.name, args.queryKey[
|
|
66
|
+
queryKey: ["query", init.name, args, options?.headers, customKey],
|
|
67
|
+
queryFn: (args) => fetchGETQuery(init.name, args.queryKey[2] ? JSON.stringify(args.queryKey[2]) : "", {
|
|
56
68
|
headers: options?.headers,
|
|
57
69
|
}),
|
|
58
70
|
...options,
|
|
@@ -65,7 +77,7 @@ function selectByPath(data, path) {
|
|
|
65
77
|
}
|
|
66
78
|
export function createUseInfiniteQuery(init) {
|
|
67
79
|
const hook = (args, options) => {
|
|
68
|
-
const customKey =
|
|
80
|
+
const customKey = apiConfig.customQueryKey;
|
|
69
81
|
const [initial, setInitial] = useState(() => {
|
|
70
82
|
if (options?.initialData) {
|
|
71
83
|
const data = options?.initialData;
|
|
@@ -88,11 +100,11 @@ export function createUseInfiniteQuery(init) {
|
|
|
88
100
|
});
|
|
89
101
|
}, []);
|
|
90
102
|
return useInfiniteQuery({
|
|
91
|
-
queryKey: [init.name, args, init.defaultLimit, options?.headers,
|
|
103
|
+
queryKey: ["query", init.name, args, init.defaultLimit, options?.headers, customKey],
|
|
92
104
|
queryFn: async (args) => {
|
|
93
105
|
const finalArgs = {
|
|
94
|
-
limit: args.queryKey[
|
|
95
|
-
...(args.queryKey[
|
|
106
|
+
limit: args.queryKey[3],
|
|
107
|
+
...(args.queryKey[2] ?? {}),
|
|
96
108
|
cursor: args.pageParam,
|
|
97
109
|
};
|
|
98
110
|
const data = await fetchGETQuery(init.name, JSON.stringify(finalArgs), {
|
|
@@ -139,7 +151,7 @@ const fetchMutation = async (name, params, opts) => {
|
|
|
139
151
|
};
|
|
140
152
|
if (env.serverless && env.client) {
|
|
141
153
|
// Relative request (in browser)
|
|
142
|
-
url = `/
|
|
154
|
+
url = `/_data/mutation/${name}`;
|
|
143
155
|
}
|
|
144
156
|
else if (env.serverless) {
|
|
145
157
|
// Request to the origin server (server to server)
|
|
@@ -150,21 +162,27 @@ const fetchMutation = async (name, params, opts) => {
|
|
|
150
162
|
url = `/wp-json/ed/v1/mutation/${name}`;
|
|
151
163
|
}
|
|
152
164
|
// Apply API configuration
|
|
153
|
-
const apiConfig = useAPIConfig.getState();
|
|
154
165
|
if (apiConfig.customQueryFetchOptions) {
|
|
155
166
|
options = await apiConfig.customQueryFetchOptions?.("mutation", name, params, url, options);
|
|
156
167
|
}
|
|
157
168
|
const response = await fetch(url, options);
|
|
169
|
+
if (apiConfig.onResponse)
|
|
170
|
+
apiConfig.onResponse(response, "mutation", name, params, url, options);
|
|
158
171
|
const payload = await response.json();
|
|
159
172
|
if (payload.errors?.length > 0) {
|
|
160
|
-
throw
|
|
173
|
+
throw new QueryError({
|
|
174
|
+
messages: payload.errors.map((e) => e.message),
|
|
175
|
+
statusCode: response.status,
|
|
176
|
+
queryName: name,
|
|
177
|
+
type: "mutation",
|
|
178
|
+
});
|
|
161
179
|
}
|
|
162
180
|
return payload.data;
|
|
163
181
|
};
|
|
164
182
|
export function createUseMutation(init) {
|
|
165
183
|
const hook = (options) => {
|
|
166
184
|
return useMutation({
|
|
167
|
-
mutationKey: [init.name],
|
|
185
|
+
mutationKey: ["mutation", init.name],
|
|
168
186
|
mutationFn: (args) => fetchMutation(init.name, args, {
|
|
169
187
|
headers: options?.headers,
|
|
170
188
|
}),
|
|
@@ -178,3 +196,22 @@ export function createUseMutation(init) {
|
|
|
178
196
|
};
|
|
179
197
|
return hook;
|
|
180
198
|
}
|
|
199
|
+
// @ts-ignore
|
|
200
|
+
export function useRPCQuery(key, args, options) {
|
|
201
|
+
return useQuery({
|
|
202
|
+
queryKey: ["rpcQuery", key, args],
|
|
203
|
+
queryFn: async (args) => {
|
|
204
|
+
return getRPCClient().query(key, args.queryKey[2]);
|
|
205
|
+
},
|
|
206
|
+
...options,
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
export function useRPCMutation(key, options) {
|
|
210
|
+
return useMutation({
|
|
211
|
+
mutationKey: ["rpcMutation", key],
|
|
212
|
+
mutationFn: async (args) => {
|
|
213
|
+
return getRPCClient().mutation(key, args);
|
|
214
|
+
},
|
|
215
|
+
...options,
|
|
216
|
+
});
|
|
217
|
+
}
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
export declare const useRPCQuery: RPCUseQuery;
|
|
2
|
-
export declare const useRPCMutation: RPCUseMutation;
|
|
3
|
-
export declare const useRPCInfiniteQuery: RPCUseInfiniteQuery;
|
|
4
|
-
export declare const rpcClient: null;
|
|
5
1
|
export type UseRPCMutationResult = any;
|
|
6
2
|
export type UseRPCQueryResult = any;
|
|
7
3
|
export type UseRPCInfiniteQueryResult = any;
|
|
@@ -1,9 +1,2 @@
|
|
|
1
|
-
const trpc = {}
|
|
2
|
-
// @ts-ignore
|
|
3
|
-
export const useRPCQuery = trpc.useQuery;
|
|
4
|
-
// @ts-ignore
|
|
5
|
-
export const useRPCMutation = trpc.useMutation;
|
|
6
|
-
// @ts-ignore
|
|
7
|
-
export const useRPCInfiniteQuery = trpc.useInfiniteQuery;
|
|
8
|
-
export const rpcClient = null;
|
|
1
|
+
// const trpc = {}
|
|
9
2
|
export const RPCClientError = null;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { AnyTRPCMutationProcedure, AnyTRPCProcedure, AnyTRPCQueryProcedure, AnyTRPCSubscriptionProcedure, inferProcedureInput, inferProcedureOutput } from "@trpc/server";
|
|
2
|
+
type RouterTable = Record<string, Record<string, AnyTRPCProcedure> | AnyTRPCProcedure>;
|
|
3
|
+
type RouterEntry<T extends RouterTable, U extends AnyTRPCProcedure, P extends string = ""> = {
|
|
4
|
+
[K in keyof T]: K extends string ? T[K] extends U ? {
|
|
5
|
+
key: `${P}${K}`;
|
|
6
|
+
input: inferProcedureInput<T[K]>;
|
|
7
|
+
output: inferProcedureOutput<T[K]>;
|
|
8
|
+
procedure: T[K] extends AnyTRPCProcedure ? T[K] : never;
|
|
9
|
+
} : T[K] extends Record<string, U> ? RouterEntry<T[K], U, `${K}.`> : never : never;
|
|
10
|
+
}[keyof T];
|
|
11
|
+
type RouterTypes<T extends RouterTable> = {
|
|
12
|
+
queries: RouterEntry<T, AnyTRPCQueryProcedure>;
|
|
13
|
+
mutations: RouterEntry<T, AnyTRPCMutationProcedure>;
|
|
14
|
+
subscriptions: RouterEntry<T, AnyTRPCSubscriptionProcedure>;
|
|
15
|
+
};
|
|
16
|
+
export declare function finalizeRPCRouter<T extends RouterTable>(router: T): RouterTypes<T>;
|
|
17
|
+
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export * from "./read-block-manifest";
|
|
2
|
-
export * from "./read-view-manifest";
|
|
3
|
-
export * from "./read-admin-manifest";
|
|
4
|
-
export * from "./internal-store";
|
|
1
|
+
export * from "./read-block-manifest.js";
|
|
2
|
+
export * from "./read-view-manifest.js";
|
|
3
|
+
export * from "./read-admin-manifest.js";
|
|
4
|
+
export * from "./internal-store.js";
|
|
5
|
+
export * from "./finalize-rpc.js";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export * from "./read-block-manifest";
|
|
2
|
-
export * from "./read-view-manifest";
|
|
3
|
-
export * from "./read-admin-manifest";
|
|
4
|
-
export * from "./internal-store";
|
|
1
|
+
export * from "./read-block-manifest.js";
|
|
2
|
+
export * from "./read-view-manifest.js";
|
|
3
|
+
export * from "./read-admin-manifest.js";
|
|
4
|
+
export * from "./internal-store.js";
|
|
5
|
+
export * from "./finalize-rpc.js";
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { FunctionComponent } from "react";
|
|
2
|
-
import { Config as TailwindConfig } from "tailwindcss";
|
|
3
2
|
type BlockManifest = Record<string, FunctionComponent<any>>;
|
|
4
3
|
type Store = {
|
|
5
4
|
blocks: BlockManifest;
|
|
6
|
-
tailwindConfig: TailwindConfig | null;
|
|
7
5
|
};
|
|
8
6
|
export declare const internalStore: Store & {
|
|
9
7
|
set<K extends keyof Store>(key: K, value: Store[K]): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { FunctionComponent } from "react";
|
|
2
|
-
import { FieldTypeDefinition } from "../admin";
|
|
2
|
+
import { FieldTypeDefinition } from "../admin/index.js";
|
|
3
3
|
/**
|
|
4
4
|
* This file exists simply to prevent circular dependencies.
|
|
5
5
|
* The manifest itself sets the value of this object directly.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ConfigType } from "../../../../stitches-archive/config";
|
|
2
|
-
import { DefaultThemeMap } from "../../../../stitches-archive";
|
|
1
|
+
import type { ConfigType } from "../../../../stitches-archive/config.js";
|
|
2
|
+
import { DefaultThemeMap } from "../../../../stitches-archive/index.js";
|
|
3
3
|
import { Properties as CSS } from "csstype";
|
|
4
4
|
type UtilValue<Theme extends ConfigType.Theme<any>, Scale extends string, CSSValue> = Scale extends keyof Theme ? `$${Exclude<keyof Theme[Scale], symbol>}` | CSSValue : CSSValue;
|
|
5
5
|
type AtMedias<T extends any> = T extends string ? `@${T}` : never;
|
|
@@ -202,8 +202,8 @@ export declare function createStitches<Prefix extends string = "", Media extends
|
|
|
202
202
|
}>(...styles: ({
|
|
203
203
|
'@import'?: unknown;
|
|
204
204
|
'@font-face'?: unknown;
|
|
205
|
-
} & { [K in keyof Styles]: K extends "@import" ? string | string[] : K extends "@font-face" ? import("../../../../stitches-archive/css").AtRule.FontFace | import("../../../../stitches-archive/css").AtRule.FontFace[] : K extends `@keyframes ${string}` ? {
|
|
206
|
-
[x: string]: import("../../../../stitches-archive/css-util").CSS<{
|
|
205
|
+
} & { [K in keyof Styles]: K extends "@import" ? string | string[] : K extends "@font-face" ? import("../../../../stitches-archive/css.js").AtRule.FontFace | import("../../../../stitches-archive/css.js").AtRule.FontFace[] : K extends `@keyframes ${string}` ? {
|
|
206
|
+
[x: string]: import("../../../../stitches-archive/css-util.js").CSS<{
|
|
207
207
|
initial: "";
|
|
208
208
|
} & Media, Theme & { [Scale_1 in keyof Responsive]: { [T_1 in keyof Responsive[Scale_1]]: string; }; }, ThemeMap, {
|
|
209
209
|
typography: (key: keyof Typography) => { [key in keyof TypographyConfig<Theme, Media & {
|
|
@@ -261,7 +261,7 @@ export declare function createStitches<Prefix extends string = "", Media extends
|
|
|
261
261
|
"--grid-columns": number;
|
|
262
262
|
};
|
|
263
263
|
}>;
|
|
264
|
-
} : K extends `@property ${string}` ? import("../../../../stitches-archive/css").AtRule.Property : import("../../../../stitches-archive/css-util").CSS<{
|
|
264
|
+
} : K extends `@property ${string}` ? import("../../../../stitches-archive/css.js").AtRule.Property : import("../../../../stitches-archive/css-util.js").CSS<{
|
|
265
265
|
initial: "";
|
|
266
266
|
} & Media, Theme & { [Scale_1 in keyof Responsive]: { [T_1 in keyof Responsive[Scale_1]]: string; }; }, ThemeMap, {
|
|
267
267
|
typography: (key: keyof Typography) => { [key in keyof TypographyConfig<Theme, Media & {
|
|
@@ -322,7 +322,7 @@ export declare function createStitches<Prefix extends string = "", Media extends
|
|
|
322
322
|
(): string;
|
|
323
323
|
};
|
|
324
324
|
keyframes: (style: {
|
|
325
|
-
[offset: string]: import("../../../../stitches-archive/css-util").CSS<{
|
|
325
|
+
[offset: string]: import("../../../../stitches-archive/css-util.js").CSS<{
|
|
326
326
|
initial: "";
|
|
327
327
|
} & Media, Theme & { [Scale_1 in keyof Responsive]: { [T_1 in keyof Responsive[Scale_1]]: string; }; }, ThemeMap, {
|
|
328
328
|
typography: (key: keyof Typography) => { [key in keyof TypographyConfig<Theme, Media & {
|
|
@@ -397,20 +397,20 @@ export declare function createStitches<Prefix extends string = "", Media extends
|
|
|
397
397
|
})>(nameOrScalesArg0: Argument0, nameOrScalesArg1?: Argument1 | undefined) => string & {
|
|
398
398
|
className: string;
|
|
399
399
|
selector: string;
|
|
400
|
-
} & (Argument0 extends string ? import("../../../../stitches-archive/stitches").ThemeTokens<Argument1, ""> : import("../../../../stitches-archive/stitches").ThemeTokens<Argument0, "">);
|
|
400
|
+
} & (Argument0 extends string ? import("../../../../stitches-archive/stitches.js").ThemeTokens<Argument1, ""> : import("../../../../stitches-archive/stitches.js").ThemeTokens<Argument0, "">);
|
|
401
401
|
theme: string & {
|
|
402
402
|
className: string;
|
|
403
403
|
selector: string;
|
|
404
|
-
} & (Theme & { [Scale_1 in keyof Responsive]: { [T_1 in keyof Responsive[Scale_1]]: string; }; } extends infer T_2 extends {} ? { [Scale_2 in keyof T_2]: { [Token in keyof (Theme & { [Scale_1 in keyof Responsive]: { [T_1 in keyof Responsive[Scale_1]]: string; }; })[Scale_2]]: import("../../../../stitches-archive/theme").Token<Extract<Token, string | number>, string, Extract<Scale_2, string | void>, "">; }; } : never);
|
|
404
|
+
} & (Theme & { [Scale_1 in keyof Responsive]: { [T_1 in keyof Responsive[Scale_1]]: string; }; } extends infer T_2 extends {} ? { [Scale_2 in keyof T_2]: { [Token in keyof (Theme & { [Scale_1 in keyof Responsive]: { [T_1 in keyof Responsive[Scale_1]]: string; }; })[Scale_2]]: import("../../../../stitches-archive/theme.js").Token<Extract<Token, string | number>, string, Extract<Scale_2, string | void>, "">; }; } : never);
|
|
405
405
|
reset: {
|
|
406
406
|
(): void;
|
|
407
407
|
};
|
|
408
408
|
getCssText: {
|
|
409
409
|
(): string;
|
|
410
410
|
};
|
|
411
|
-
css: <Composers extends (string | React.ExoticComponent<any> | React.JSXElementConstructor<any> | import("../../../../stitches-archive/util").Function | {
|
|
411
|
+
css: <Composers extends (string | React.ExoticComponent<any> | React.JSXElementConstructor<any> | import("../../../../stitches-archive/util.js").Function | {
|
|
412
412
|
[name: string]: unknown;
|
|
413
|
-
})[], CSS = import("../../../../stitches-archive/css-util").CSS<{
|
|
413
|
+
})[], CSS = import("../../../../stitches-archive/css-util.js").CSS<{
|
|
414
414
|
initial: "";
|
|
415
415
|
} & Media, Theme & { [Scale_1 in keyof Responsive]: { [T_1 in keyof Responsive[Scale_1]]: string; }; }, ThemeMap, {
|
|
416
416
|
typography: (key: keyof Typography) => { [key in keyof TypographyConfig<Theme, Media & {
|
|
@@ -467,23 +467,23 @@ export declare function createStitches<Prefix extends string = "", Media extends
|
|
|
467
467
|
gridColumn: string;
|
|
468
468
|
"--grid-columns": number;
|
|
469
469
|
};
|
|
470
|
-
}>>(...composers: { [K in keyof Composers]: string extends Composers[K] ? Composers[K] : Composers[K] extends string | import("react").JSXElementConstructor<any> | import("react").ExoticComponent<any> | import("../../../../stitches-archive/util").Function ? Composers[K] : import("../../../../stitches-archive/stitches").RemoveIndex<CSS> & {
|
|
470
|
+
}>>(...composers: { [K in keyof Composers]: string extends Composers[K] ? Composers[K] : Composers[K] extends string | import("react").JSXElementConstructor<any> | import("react").ExoticComponent<any> | import("../../../../stitches-archive/util.js").Function ? Composers[K] : import("../../../../stitches-archive/stitches.js").RemoveIndex<CSS> & {
|
|
471
471
|
variants?: {
|
|
472
472
|
[x: string]: {
|
|
473
473
|
[x: string]: CSS;
|
|
474
474
|
[x: number]: CSS;
|
|
475
475
|
};
|
|
476
476
|
} | undefined;
|
|
477
|
-
compoundVariants?: (("variants" extends keyof Composers[K] ? { [Name in keyof Composers[K][keyof Composers[K] & "variants"]]?: import("../../../../stitches-archive/util").String | import("../../../../stitches-archive/util").Widen<keyof Composers[K][keyof Composers[K] & "variants"][Name]> | undefined; } : import("../../../../stitches-archive/util").WideObject) & {
|
|
477
|
+
compoundVariants?: (("variants" extends keyof Composers[K] ? { [Name in keyof Composers[K][keyof Composers[K] & "variants"]]?: import("../../../../stitches-archive/util.js").String | import("../../../../stitches-archive/util.js").Widen<keyof Composers[K][keyof Composers[K] & "variants"][Name]> | undefined; } : import("../../../../stitches-archive/util.js").WideObject) & {
|
|
478
478
|
css: CSS;
|
|
479
479
|
})[] | undefined;
|
|
480
|
-
defaultVariants?: ("variants" extends keyof Composers[K] ? { [Name_1 in keyof Composers[K][keyof Composers[K] & "variants"]]?: import("../../../../stitches-archive/util").String | import("../../../../stitches-archive/util").Widen<keyof Composers[K][keyof Composers[K] & "variants"][Name_1]> | undefined; } : import("../../../../stitches-archive/util").WideObject) | undefined;
|
|
481
|
-
} & CSS & { [K2 in keyof Composers[K]]: K2 extends "variants" | "compoundVariants" | "defaultVariants" ? unknown : K2 extends keyof CSS ? CSS[K2] : unknown; }; }) => import("../../../../stitches-archive/styled-component").CssComponent<import("../../../../stitches-archive/styled-component").StyledComponentType<Composers>, import("../../../../stitches-archive/styled-component").StyledComponentProps<Composers>, {
|
|
480
|
+
defaultVariants?: ("variants" extends keyof Composers[K] ? { [Name_1 in keyof Composers[K][keyof Composers[K] & "variants"]]?: import("../../../../stitches-archive/util.js").String | import("../../../../stitches-archive/util.js").Widen<keyof Composers[K][keyof Composers[K] & "variants"][Name_1]> | undefined; } : import("../../../../stitches-archive/util.js").WideObject) | undefined;
|
|
481
|
+
} & CSS & { [K2 in keyof Composers[K]]: K2 extends "variants" | "compoundVariants" | "defaultVariants" ? unknown : K2 extends keyof CSS ? CSS[K2] : unknown; }; }) => import("../../../../stitches-archive/styled-component.js").CssComponent<import("../../../../stitches-archive/styled-component.js").StyledComponentType<Composers>, import("../../../../stitches-archive/styled-component.js").StyledComponentProps<Composers>, {
|
|
482
482
|
initial: "";
|
|
483
483
|
} & Media, CSS>;
|
|
484
|
-
styled: <Type extends keyof JSX.IntrinsicElements | React.ComponentType<any> | import("../../../../stitches-archive/util").Function, Composers extends (string | React.ComponentType<any> | import("../../../../stitches-archive/util").Function | {
|
|
484
|
+
styled: <Type extends keyof JSX.IntrinsicElements | React.ComponentType<any> | import("../../../../stitches-archive/util.js").Function, Composers extends (string | React.ComponentType<any> | import("../../../../stitches-archive/util.js").Function | {
|
|
485
485
|
[name: string]: unknown;
|
|
486
|
-
})[], CSS = import("../../../../stitches-archive/css-util").CSS<{
|
|
486
|
+
})[], CSS = import("../../../../stitches-archive/css-util.js").CSS<{
|
|
487
487
|
initial: "";
|
|
488
488
|
} & Media, Theme & { [Scale_1 in keyof Responsive]: { [T_1 in keyof Responsive[Scale_1]]: string; }; }, ThemeMap, {
|
|
489
489
|
typography: (key: keyof Typography) => { [key in keyof TypographyConfig<Theme, Media & {
|
|
@@ -540,20 +540,20 @@ export declare function createStitches<Prefix extends string = "", Media extends
|
|
|
540
540
|
gridColumn: string;
|
|
541
541
|
"--grid-columns": number;
|
|
542
542
|
};
|
|
543
|
-
}>>(type: Type, ...composers: { [K in keyof Composers]: string extends Composers[K] ? Composers[K] : Composers[K] extends string | import("react").ComponentType<any> | import("../../../../stitches-archive/util").Function ? Composers[K] : import("../../../../stitches-archive/stitches").RemoveIndex<CSS> & {
|
|
543
|
+
}>>(type: Type, ...composers: { [K in keyof Composers]: string extends Composers[K] ? Composers[K] : Composers[K] extends string | import("react").ComponentType<any> | import("../../../../stitches-archive/util.js").Function ? Composers[K] : import("../../../../stitches-archive/stitches.js").RemoveIndex<CSS> & {
|
|
544
544
|
variants?: {
|
|
545
545
|
[x: string]: {
|
|
546
546
|
[x: string]: CSS;
|
|
547
547
|
[x: number]: CSS;
|
|
548
548
|
};
|
|
549
549
|
} | undefined;
|
|
550
|
-
compoundVariants?: (("variants" extends keyof Composers[K] ? { [Name in keyof Composers[K][keyof Composers[K] & "variants"]]?: import("../../../../stitches-archive/util").String | import("../../../../stitches-archive/util").Widen<keyof Composers[K][keyof Composers[K] & "variants"][Name]> | undefined; } : import("../../../../stitches-archive/util").WideObject) & {
|
|
550
|
+
compoundVariants?: (("variants" extends keyof Composers[K] ? { [Name in keyof Composers[K][keyof Composers[K] & "variants"]]?: import("../../../../stitches-archive/util.js").String | import("../../../../stitches-archive/util.js").Widen<keyof Composers[K][keyof Composers[K] & "variants"][Name]> | undefined; } : import("../../../../stitches-archive/util.js").WideObject) & {
|
|
551
551
|
css: CSS;
|
|
552
552
|
})[] | undefined;
|
|
553
|
-
defaultVariants?: ("variants" extends keyof Composers[K] ? { [Name_1 in keyof Composers[K][keyof Composers[K] & "variants"]]?: import("../../../../stitches-archive/util").String | import("../../../../stitches-archive/util").Widen<keyof Composers[K][keyof Composers[K] & "variants"][Name_1]> | undefined; } : import("../../../../stitches-archive/util").WideObject) | undefined;
|
|
554
|
-
} & CSS & { [K2 in keyof Composers[K]]: K2 extends "variants" | "compoundVariants" | "defaultVariants" ? unknown : K2 extends keyof CSS ? CSS[K2] : unknown; }; }) => import("../../../../stitches-archive/styled-component").StyledComponent<Type, import("../../../../stitches-archive/styled-component").StyledComponentProps<Composers>, {
|
|
553
|
+
defaultVariants?: ("variants" extends keyof Composers[K] ? { [Name_1 in keyof Composers[K][keyof Composers[K] & "variants"]]?: import("../../../../stitches-archive/util.js").String | import("../../../../stitches-archive/util.js").Widen<keyof Composers[K][keyof Composers[K] & "variants"][Name_1]> | undefined; } : import("../../../../stitches-archive/util.js").WideObject) | undefined;
|
|
554
|
+
} & CSS & { [K2 in keyof Composers[K]]: K2 extends "variants" | "compoundVariants" | "defaultVariants" ? unknown : K2 extends keyof CSS ? CSS[K2] : unknown; }; }) => import("../../../../stitches-archive/styled-component.js").StyledComponent<Type, import("../../../../stitches-archive/styled-component.js").StyledComponentProps<Composers>, {
|
|
555
555
|
initial: "";
|
|
556
|
-
} & Media, import("../../../../stitches-archive/css-util").CSS<{
|
|
556
|
+
} & Media, import("../../../../stitches-archive/css-util.js").CSS<{
|
|
557
557
|
initial: "";
|
|
558
558
|
} & Media, Theme & { [Scale_1 in keyof Responsive]: { [T_1 in keyof Responsive[Scale_1]]: string; }; }, ThemeMap, {
|
|
559
559
|
typography: (key: keyof Typography) => { [key in keyof TypographyConfig<Theme, Media & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./createStitches";
|
|
1
|
+
export * from "./createStitches.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./createStitches";
|
|
1
|
+
export * from "./createStitches.js";
|