eddev 2.0.0-beta.12 → 2.0.0-beta.121

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.
Files changed (224) hide show
  1. package/css/editor-styles.css +4 -0
  2. package/dist/app/entry/HydrationOverlay.d.ts +1 -0
  3. package/dist/app/entry/HydrationOverlay.js +2 -0
  4. package/dist/app/entry/MetaTags.d.ts +7 -0
  5. package/dist/app/entry/MetaTags.js +17 -0
  6. package/dist/app/entry/boot-admin.js +9 -3
  7. package/dist/app/entry/hydration-script.d.ts +1 -0
  8. package/dist/app/entry/hydration-script.js +18 -0
  9. package/dist/app/entry/spa-root.js +3 -5
  10. package/dist/app/entry/ssr-root-client.d.ts +3 -1
  11. package/dist/app/entry/ssr-root-client.js +18 -6
  12. package/dist/app/entry/ssr-root.d.ts +3 -4
  13. package/dist/app/entry/ssr-root.js +19 -19
  14. package/dist/app/lib/admin/index.d.ts +2 -2
  15. package/dist/app/lib/admin/index.js +2 -2
  16. package/dist/app/lib/admin/installFieldTypes.js +3 -1
  17. package/dist/app/lib/admin/runWidgets.js +1 -1
  18. package/dist/app/lib/blocks/ContentBlocks.d.ts +1 -1
  19. package/dist/app/lib/blocks/ContentBlocks.js +5 -5
  20. package/dist/app/lib/blocks/EditableText.d.ts +15 -2
  21. package/dist/app/lib/blocks/EditableText.js +10 -4
  22. package/dist/app/lib/blocks/InnerBlocks.d.ts +21 -7
  23. package/dist/app/lib/blocks/InnerBlocks.js +75 -28
  24. package/dist/app/lib/blocks/block-utils.d.ts +2 -2
  25. package/dist/app/lib/blocks/block-utils.js +2 -2
  26. package/dist/app/lib/blocks/defineBlock.d.ts +3 -0
  27. package/dist/app/lib/blocks/defineBlock.js +7 -0
  28. package/dist/app/lib/blocks/editor/EditorHighlights.d.ts +7 -0
  29. package/dist/app/lib/blocks/editor/EditorHighlights.js +164 -0
  30. package/dist/app/lib/blocks/editor/EditorSupport.js +17 -12
  31. package/dist/app/lib/blocks/editor/ErrorBoundaryEditor.d.ts +1 -1
  32. package/dist/app/lib/blocks/editor/block-templates.d.ts +6 -0
  33. package/dist/app/lib/blocks/editor/block-templates.js +64 -0
  34. package/dist/app/lib/blocks/editor/create-block.d.ts +9 -0
  35. package/dist/app/lib/blocks/editor/create-block.js +13 -0
  36. package/dist/app/lib/blocks/editor/editor-config.d.ts +70 -7
  37. package/dist/app/lib/blocks/editor/editor-config.js +29 -62
  38. package/dist/app/lib/blocks/editor/installGutenbergHooks.d.ts +3 -0
  39. package/dist/app/lib/blocks/editor/installGutenbergHooks.js +105 -16
  40. package/dist/app/lib/blocks/editor/root-blocks.d.ts +6 -0
  41. package/dist/app/lib/blocks/editor/root-blocks.js +30 -0
  42. package/dist/app/lib/blocks/editor/usePostEditor.d.ts +1 -1
  43. package/dist/app/lib/blocks/index.d.ts +10 -9
  44. package/dist/app/lib/blocks/index.js +10 -9
  45. package/dist/app/lib/blocks/inline-editing.d.ts +9 -1
  46. package/dist/app/lib/blocks/inline-editing.js +7 -5
  47. package/dist/app/lib/devtools/components/BreakpointIndicator.js +1 -1
  48. package/dist/app/lib/devtools/components/DevUI.js +4 -3
  49. package/dist/app/lib/devtools/components/GridIndicator.d.ts +1 -0
  50. package/dist/app/lib/devtools/components/GridIndicator.js +29 -0
  51. package/dist/app/lib/devtools/hooks/usePersistState.d.ts +1 -1
  52. package/dist/app/lib/devtools/hooks/usePersistState.js +11 -2
  53. package/dist/app/lib/devtools/hooks/useTailwind.d.ts +2305 -1261
  54. package/dist/app/lib/devtools/hooks/useTailwind.js +1 -1
  55. package/dist/app/lib/devtools/index.d.ts +1 -1
  56. package/dist/app/lib/devtools/index.js +1 -1
  57. package/dist/app/lib/devtools/loader.js +8 -7
  58. package/dist/app/lib/devtools/useQueryDebug.d.ts +7 -1
  59. package/dist/app/lib/devtools/useQueryDebug.js +5 -8
  60. package/dist/app/lib/dynamic/dynamic.d.ts +1 -1
  61. package/dist/app/lib/dynamic/dynamic.js +5 -1
  62. package/dist/app/lib/dynamic/index.d.ts +1 -1
  63. package/dist/app/lib/dynamic/index.js +1 -1
  64. package/dist/app/lib/hooks/index.d.ts +4 -5
  65. package/dist/app/lib/hooks/index.js +4 -5
  66. package/dist/app/lib/hooks/queryUtils.d.ts +37 -3
  67. package/dist/app/lib/hooks/queryUtils.js +66 -26
  68. package/dist/app/lib/hooks/useAppData.js +12 -1
  69. package/dist/app/lib/hooks/useRPC.d.ts +0 -4
  70. package/dist/app/lib/hooks/useRPC.js +1 -8
  71. package/dist/app/lib/internal/finalize-rpc.d.ts +17 -0
  72. package/dist/app/lib/internal/finalize-rpc.js +3 -0
  73. package/dist/app/lib/internal/index.d.ts +5 -4
  74. package/dist/app/lib/internal/index.js +5 -4
  75. package/dist/app/lib/internal/read-admin-manifest.d.ts +1 -1
  76. package/dist/app/lib/legacy-stitches/createStitches.d.ts +21 -21
  77. package/dist/app/lib/legacy-stitches/createStitches.js +1 -1
  78. package/dist/app/lib/legacy-stitches/index.d.ts +1 -1
  79. package/dist/app/lib/legacy-stitches/index.js +1 -1
  80. package/dist/app/lib/routing/components/BackButton.d.ts +49 -0
  81. package/dist/app/lib/routing/components/BackButton.js +47 -0
  82. package/dist/app/lib/routing/components/BrowserRouter.d.ts +5 -1
  83. package/dist/app/lib/routing/components/BrowserRouter.js +98 -19
  84. package/dist/app/lib/routing/components/ClientOnly.d.ts +1 -1
  85. package/dist/app/lib/routing/components/ClientOnly.js +2 -2
  86. package/dist/app/lib/routing/components/Link.d.ts +1 -0
  87. package/dist/app/lib/routing/components/Link.js +11 -12
  88. package/dist/app/lib/routing/components/RouteRenderer.d.ts +1 -1
  89. package/dist/app/lib/routing/components/RouteRenderer.js +7 -6
  90. package/dist/app/lib/routing/components/SSRRouter.d.ts +2 -2
  91. package/dist/app/lib/routing/components/SSRRouter.js +5 -6
  92. package/dist/app/lib/routing/components/ScrollRestoration.js +5 -2
  93. package/dist/app/lib/routing/context.d.ts +8 -5
  94. package/dist/app/lib/routing/context.js +13 -96
  95. package/dist/app/lib/routing/hooks/useRestorableState.d.ts +2 -1
  96. package/dist/app/lib/routing/hooks/useRestorableState.js +2 -1
  97. package/dist/app/lib/routing/hooks/useRoute.d.ts +16 -1
  98. package/dist/app/lib/routing/hooks/useRoute.js +22 -1
  99. package/dist/app/lib/routing/hooks/useRouteMeta.d.ts +5 -0
  100. package/dist/app/lib/routing/hooks/useRouteMeta.js +9 -0
  101. package/dist/app/lib/routing/hooks/useRouteTransition.d.ts +1 -1
  102. package/dist/app/lib/routing/hooks/useRouteTransition.js +1 -1
  103. package/dist/app/lib/routing/hooks/useRouter.d.ts +1 -1
  104. package/dist/app/lib/routing/hooks/useRouter.js +1 -1
  105. package/dist/app/lib/routing/hooks/useRouterEvents.d.ts +1 -1
  106. package/dist/app/lib/routing/hooks/useRouterEvents.js +1 -1
  107. package/dist/app/lib/routing/hooks/useRouterState.d.ts +1 -1
  108. package/dist/app/lib/routing/hooks/useRouterState.js +1 -1
  109. package/dist/app/lib/routing/hooks/useSearchParams.js +2 -2
  110. package/dist/app/lib/routing/index.d.ts +14 -13
  111. package/dist/app/lib/routing/index.js +14 -13
  112. package/dist/app/lib/routing/loader.d.ts +2 -2
  113. package/dist/app/lib/routing/loader.js +20 -11
  114. package/dist/app/lib/routing/types.d.ts +37 -10
  115. package/dist/app/lib/routing/utils.d.ts +5 -2
  116. package/dist/app/lib/routing/utils.js +37 -4
  117. package/dist/app/lib/{hooks → runtime}/apiConfig.d.ts +6 -2
  118. package/dist/app/lib/runtime/apiConfig.js +6 -0
  119. package/dist/app/lib/runtime/errorHandling.d.ts +39 -0
  120. package/dist/app/lib/runtime/errorHandling.js +6 -0
  121. package/dist/app/lib/runtime/index.d.ts +2 -0
  122. package/dist/app/lib/runtime/index.js +2 -0
  123. package/dist/app/lib/views/index.d.ts +1 -1
  124. package/dist/app/lib/views/index.js +1 -1
  125. package/dist/app/server/defineRouter.d.ts +2 -0
  126. package/dist/app/server/defineRouter.js +4 -0
  127. package/dist/app/server/index.d.ts +5 -3
  128. package/dist/app/server/index.js +5 -3
  129. package/dist/app/server/proxy-wp-admin.d.ts +1 -2
  130. package/dist/app/server/proxy-wp-admin.js +41 -14
  131. package/dist/app/server/render-ssr-page.d.ts +27 -2
  132. package/dist/app/server/render-ssr-page.js +192 -12
  133. package/dist/app/server/rpc.d.ts +56 -0
  134. package/dist/app/server/rpc.js +18 -0
  135. package/dist/app/server/server-context.d.ts +44 -4
  136. package/dist/app/server/server-context.js +305 -28
  137. package/dist/app/server/utils/replace-host.d.ts +1 -1
  138. package/dist/app/server/utils/replace-host.js +10 -2
  139. package/dist/app/server/utils/swr-cache.d.ts +4 -0
  140. package/dist/app/server/utils/swr-cache.js +31 -0
  141. package/dist/app/utils/APIProvider.d.ts +2 -0
  142. package/dist/app/utils/APIProvider.js +5 -0
  143. package/dist/app/utils/BlockErrorBoundary.d.ts +19 -0
  144. package/dist/app/utils/BlockErrorBoundary.js +38 -0
  145. package/dist/app/utils/ErrorMessage.d.ts +5 -0
  146. package/dist/app/utils/ErrorMessage.js +14 -0
  147. package/dist/app/utils/RouteErrorBoundary.d.ts +18 -0
  148. package/dist/app/utils/RouteErrorBoundary.js +38 -0
  149. package/dist/app/utils/asset-capture.d.ts +2 -0
  150. package/dist/app/utils/asset-capture.js +5 -0
  151. package/dist/app/utils/hydration-debugger.d.ts +13 -0
  152. package/dist/app/utils/hydration-debugger.js +11 -0
  153. package/dist/app/utils/query-client.d.ts +2 -0
  154. package/dist/app/utils/query-client.js +5 -1
  155. package/dist/app/utils/query-monitor.d.ts +26 -0
  156. package/dist/app/utils/query-monitor.js +7 -0
  157. package/dist/app/utils/trpc-client.d.ts +2 -0
  158. package/dist/app/utils/trpc-client.js +39 -0
  159. package/dist/node/cli/cli-worker.js +10 -5
  160. package/dist/node/cli/cli.js +81 -11
  161. package/dist/node/cli/display/CLIApp.js +3 -6
  162. package/dist/node/cli/display/boot-cli-app.js +1 -1
  163. package/dist/node/cli/display/tools/CreateBlock.d.ts +1 -1
  164. package/dist/node/cli/display/tools/cli-tools.d.ts +1 -11
  165. package/dist/node/cli/display/tools/cli-tools.js +9 -9
  166. package/dist/node/cli/version.d.ts +1 -1
  167. package/dist/node/cli/version.js +1 -1
  168. package/dist/node/compiler/build-vinxi.js +2 -1
  169. package/dist/node/compiler/bundler.admin.d.ts +1 -1
  170. package/dist/node/compiler/bundler.admin.js +1 -1
  171. package/dist/node/compiler/bundler.frontend.js +1 -1
  172. package/dist/node/compiler/dev-server.js +10 -0
  173. package/dist/node/compiler/get-vite-config.d.ts +7 -1
  174. package/dist/node/compiler/get-vite-config.js +96 -16
  175. package/dist/node/compiler/vinxi-app.d.ts +12 -0
  176. package/dist/node/compiler/vinxi-app.js +139 -32
  177. package/dist/node/compiler/vinxi-codegen.js +345 -112
  178. package/dist/node/graphql/graphql-codegen.d.ts +11 -1
  179. package/dist/node/graphql/graphql-codegen.js +210 -33
  180. package/dist/node/graphql/graphql-schema-loader.d.ts +2 -1
  181. package/dist/node/graphql/graphql-schema-loader.js +5 -16
  182. package/dist/node/graphql/plugins/gql-plugin-queries.js +1 -1
  183. package/dist/node/graphql/query-files-loader.d.ts +3 -0
  184. package/dist/node/graphql/query-files-loader.js +5 -0
  185. package/dist/node/project/config.d.ts +159 -73
  186. package/dist/node/project/config.js +69 -20
  187. package/dist/node/project/env.d.ts +4 -0
  188. package/dist/node/project/env.js +1 -0
  189. package/dist/node/project/manifest/block-manifest.js +2 -1
  190. package/dist/node/project/manifest/manifest.d.ts +1 -0
  191. package/dist/node/project/manifest/manifest.js +14 -10
  192. package/dist/node/project/manifest/routes-manifest.d.ts +20 -0
  193. package/dist/node/project/manifest/routes-manifest.js +74 -0
  194. package/dist/node/project/manifest/view-manifest.js +1 -1
  195. package/dist/node/project/project.d.ts +11 -1
  196. package/dist/node/project/project.js +61 -7
  197. package/dist/node/project/wp-info.d.ts +1 -0
  198. package/dist/node/project/wp-info.js +13 -1
  199. package/dist/node/storybook/index.d.ts +2 -0
  200. package/dist/node/storybook/index.js +13 -0
  201. package/dist/node/types/block-type.d.ts +25 -20
  202. package/dist/node/types/block-type.js +1 -0
  203. package/dist/node/types/view-type.d.ts +7 -7
  204. package/dist/node/utils/fetch-wp.d.ts +1 -0
  205. package/dist/node/utils/fetch-wp.js +27 -0
  206. package/dist/node/utils/fs-codegen.d.ts +2 -0
  207. package/dist/node/utils/fs-codegen.js +2 -1
  208. package/dist/node/utils/is-deploying.js +1 -1
  209. package/dist/node/utils/report-builder.d.ts +6 -6
  210. package/dist/node/utils/self-signed-cert.d.ts +2 -0
  211. package/dist/node/utils/self-signed-cert.js +10 -2
  212. package/dist/node/utils/stateful-log.js +2 -0
  213. package/dist/node/utils/watch-file-tree.d.ts +17 -3
  214. package/dist/node/utils/watch-file-tree.js +12 -5
  215. package/package.json +21 -12
  216. package/types.app.d.ts +4 -2
  217. package/types.app.internal.d.ts +2 -2
  218. package/types.meta.d.ts +105 -0
  219. package/types.node.d.ts +3 -3
  220. package/dist/app/lib/blocks/ErrorBoundaryFrontend.d.ts +0 -15
  221. package/dist/app/lib/blocks/ErrorBoundaryFrontend.js +0 -35
  222. package/dist/app/lib/hooks/apiConfig.js +0 -4
  223. package/dist/app/lib/hooks/usePageLoad.d.ts +0 -6
  224. package/dist/app/lib/hooks/usePageLoad.js +0 -5
@@ -1,5 +1,5 @@
1
1
  import { useSnapshot } from "valtio";
2
- import { devToolsStore } from "../dev-tools-store";
2
+ import { devToolsStore } from "../dev-tools-store.js";
3
3
  import { useEffect } from "react";
4
4
  export function useTailwindConfig() {
5
5
  useEffect(() => {
@@ -1 +1 @@
1
- export * from "./dev-tools-store";
1
+ export * from "./dev-tools-store.js";
@@ -1 +1 @@
1
- export * from "./dev-tools-store";
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 { dynamic } from "../dynamic";
4
- import { usePersistState } from "./hooks/usePersistState";
5
- import { useIsSSR } from "../routing";
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", typeof window !== "undefined" && (env.dev || window["ENABLE_DEV_UI"]));
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(): QueryDebugItem | undefined;
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 /*elided*/ any[];
15
+ } | undefined;
@@ -1,13 +1,10 @@
1
- import { create } from "zustand";
2
- const useQueryDebug = create((set) => ({
1
+ import { proxy, useSnapshot } from "valtio";
2
+ const store = proxy({
3
3
  value: undefined,
4
- set: (value) => {
5
- set({ value });
6
- },
7
- }));
4
+ });
8
5
  export function setQueryDebug(value) {
9
- useQueryDebug.setState({ value });
6
+ store.value = value;
10
7
  }
11
8
  export function useQueryDebugData() {
12
- return useQueryDebug((store) => store.value);
9
+ return useSnapshot(store).value;
13
10
  }
@@ -4,5 +4,5 @@ export type DynamicComponent<T extends ComponentType<any>> = T & {
4
4
  };
5
5
  export declare function dynamic<T extends ComponentType<any>>(factory: () => Promise<{
6
6
  default: T;
7
- }>): DynamicComponent<T>;
7
+ }>, name?: string): DynamicComponent<T>;
8
8
  export default dynamic;
@@ -1,9 +1,13 @@
1
1
  import { createElement, forwardRef, lazy, memo, useRef } from "react";
2
- export function dynamic(factory) {
2
+ import { useAssetCapture } from "../../utils/asset-capture";
3
+ export function dynamic(factory, name) {
3
4
  const ReactLazyComponent = lazy(factory);
4
5
  let PreloadedComponent;
5
6
  let factoryPromise;
6
7
  const Component = memo(forwardRef(function LazyWithPreload(props, ref) {
8
+ if (env.serverless && !env.client && name) {
9
+ useAssetCapture()?.add(name);
10
+ }
7
11
  // Once one of these is chosen, we must ensure that it continues to be
8
12
  // used for all subsequent renders, otherwise it can cause the
9
13
  // underlying component to be unmounted and remounted.
@@ -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 "./usePageLoad";
2
- export * from "./useAppData";
3
- export * from "./useRPC";
4
- export * from "./queryUtils";
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 "./usePageLoad";
2
- export * from "./useAppData";
3
- export * from "./useRPC";
4
- export * from "./queryUtils";
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, UseInfiniteQueryResult, UndefinedInitialDataInfiniteOptions } from "@tanstack/react-query";
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
- export type QueryError = Error & {
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,22 @@
1
- import { useMutation, useQuery, useInfiniteQuery, } from "@tanstack/react-query";
2
- import { joinURL } from "ufo";
3
- import { getQueryClient } from "../../utils/query-client";
4
- import { useAPIConfig } from "./apiConfig";
1
+ import { useInfiniteQuery, useMutation, useQuery, useQueryClient, } from "@tanstack/react-query";
5
2
  import { useEffect, useState } from "react";
6
- function createQueryError(messages, statusCode) {
7
- const error = new Error(messages.join(", "));
8
- error.statusCode = statusCode;
9
- error.messages = messages;
10
- return error;
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
+ }
17
+ }
18
+ function useFallbackClient() {
19
+ return useQueryClient(getQueryClient());
11
20
  }
12
21
  const fetchGETQuery = async (name, params, opts) => {
13
22
  let url;
@@ -26,33 +35,39 @@ const fetchGETQuery = async (name, params, opts) => {
26
35
  if (params)
27
36
  url += "?params=" + encodeURIComponent(params);
28
37
  // Apply API configuration
29
- const apiConfig = useAPIConfig.getState();
30
38
  if (apiConfig.customQueryFetchOptions) {
31
39
  options = await apiConfig.customQueryFetchOptions?.("query", name, params, url, options);
32
40
  }
33
41
  const response = await fetch(url, options);
42
+ if (apiConfig.onResponse)
43
+ apiConfig.onResponse(response, "query", name, params, url, options);
34
44
  const payload = await response.json();
35
45
  if (payload.errors?.length > 0) {
36
- throw createQueryError(payload.errors.map((e) => e.message), response.status);
46
+ throw new QueryError({
47
+ messages: payload.errors.map((e) => e.message),
48
+ statusCode: response.status,
49
+ queryName: name,
50
+ type: "query",
51
+ });
37
52
  }
38
53
  return payload.data;
39
54
  };
40
55
  export function createUseQuery(init) {
41
56
  const hook = (args, options) => {
42
- const customKey = useAPIConfig((state) => state.customQueryKey);
57
+ const customKey = apiConfig.customQueryKey;
43
58
  return useQuery({
44
- queryKey: [init.name, args, options?.headers, options?.headers, customKey],
45
- queryFn: (args) => fetchGETQuery(init.name, args.queryKey[1] ? JSON.stringify(args.queryKey[1]) : "", {
59
+ queryKey: ["query", init.name, args, options?.headers, customKey],
60
+ queryFn: (args) => fetchGETQuery(init.name, args.queryKey[2] ? JSON.stringify(args.queryKey[2]) : "", {
46
61
  headers: options?.headers,
47
62
  }),
48
63
  ...options,
49
- });
64
+ }, useFallbackClient());
50
65
  };
51
66
  hook.fetch = async (args, options) => {
52
- const customKey = useAPIConfig.getState().customQueryKey;
67
+ const customKey = apiConfig.customQueryKey;
53
68
  return getQueryClient().fetchQuery({
54
- queryKey: [init.name, args, options?.headers, options?.headers, customKey],
55
- queryFn: (args) => fetchGETQuery(init.name, args.queryKey[1] ? JSON.stringify(args.queryKey[1]) : "", {
69
+ queryKey: ["query", init.name, args, options?.headers, customKey],
70
+ queryFn: (args) => fetchGETQuery(init.name, args.queryKey[2] ? JSON.stringify(args.queryKey[2]) : "", {
56
71
  headers: options?.headers,
57
72
  }),
58
73
  ...options,
@@ -65,7 +80,7 @@ function selectByPath(data, path) {
65
80
  }
66
81
  export function createUseInfiniteQuery(init) {
67
82
  const hook = (args, options) => {
68
- const customKey = useAPIConfig((state) => state.customQueryKey);
83
+ const customKey = apiConfig.customQueryKey;
69
84
  const [initial, setInitial] = useState(() => {
70
85
  if (options?.initialData) {
71
86
  const data = options?.initialData;
@@ -88,11 +103,11 @@ export function createUseInfiniteQuery(init) {
88
103
  });
89
104
  }, []);
90
105
  return useInfiniteQuery({
91
- queryKey: [init.name, args, init.defaultLimit, options?.headers, options?.headers, customKey],
106
+ queryKey: ["query", init.name, args, init.defaultLimit, options?.headers, customKey],
92
107
  queryFn: async (args) => {
93
108
  const finalArgs = {
94
- limit: args.queryKey[2],
95
- ...(args.queryKey[1] ?? {}),
109
+ limit: args.queryKey[3],
110
+ ...(args.queryKey[2] ?? {}),
96
111
  cursor: args.pageParam,
97
112
  };
98
113
  const data = await fetchGETQuery(init.name, JSON.stringify(finalArgs), {
@@ -150,26 +165,32 @@ const fetchMutation = async (name, params, opts) => {
150
165
  url = `/wp-json/ed/v1/mutation/${name}`;
151
166
  }
152
167
  // Apply API configuration
153
- const apiConfig = useAPIConfig.getState();
154
168
  if (apiConfig.customQueryFetchOptions) {
155
169
  options = await apiConfig.customQueryFetchOptions?.("mutation", name, params, url, options);
156
170
  }
157
171
  const response = await fetch(url, options);
172
+ if (apiConfig.onResponse)
173
+ apiConfig.onResponse(response, "mutation", name, params, url, options);
158
174
  const payload = await response.json();
159
175
  if (payload.errors?.length > 0) {
160
- throw createQueryError(payload.errors.map((e) => e.message), response.status);
176
+ throw new QueryError({
177
+ messages: payload.errors.map((e) => e.message),
178
+ statusCode: response.status,
179
+ queryName: name,
180
+ type: "mutation",
181
+ });
161
182
  }
162
183
  return payload.data;
163
184
  };
164
185
  export function createUseMutation(init) {
165
186
  const hook = (options) => {
166
187
  return useMutation({
167
- mutationKey: [init.name],
188
+ mutationKey: ["mutation", init.name],
168
189
  mutationFn: (args) => fetchMutation(init.name, args, {
169
190
  headers: options?.headers,
170
191
  }),
171
192
  ...options,
172
- });
193
+ }, useFallbackClient());
173
194
  };
174
195
  hook.mutate = async (args, options) => {
175
196
  return fetchMutation(init.name, args, {
@@ -178,3 +199,22 @@ export function createUseMutation(init) {
178
199
  };
179
200
  return hook;
180
201
  }
202
+ // @ts-ignore
203
+ export function useRPCQuery(key, args, options) {
204
+ return useQuery({
205
+ queryKey: ["rpcQuery", key, args],
206
+ queryFn: async (args) => {
207
+ return getRPCClient().query(key, args.queryKey[2]);
208
+ },
209
+ ...options,
210
+ }, useFallbackClient());
211
+ }
212
+ export function useRPCMutation(key, options) {
213
+ return useMutation({
214
+ mutationKey: ["rpcMutation", key],
215
+ mutationFn: async (args) => {
216
+ return getRPCClient().mutation(key, args);
217
+ },
218
+ ...options,
219
+ }, useFallbackClient());
220
+ }
@@ -1,5 +1,16 @@
1
- import { useRouter } from "../routing";
1
+ import { useRouter } from "../routing/index.js";
2
2
  function useAppData(selector) {
3
+ if (env.admin) {
4
+ const appData = window.__ED_APP_DATA.data;
5
+ if (appData) {
6
+ if (selector) {
7
+ return selector(appData);
8
+ }
9
+ else {
10
+ return appData;
11
+ }
12
+ }
13
+ }
3
14
  const loader = useRouter((r) => r.loader);
4
15
  if (selector) {
5
16
  return selector(loader.appData);
@@ -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, AnyTRPCProcedure> ? 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 {};
@@ -0,0 +1,3 @@
1
+ export function finalizeRPCRouter(router) {
2
+ return router;
3
+ }
@@ -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,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,4 +1,4 @@
1
- import { createStitches as createBaseStitches } from "../../../../stitches-archive";
1
+ import { createStitches as createBaseStitches, } from "../../../../stitches-archive/index.js";
2
2
  const typeKeyMap = {
3
3
  fontSize: "fontSizes",
4
4
  fontFamily: "fonts",
@@ -1 +1 @@
1
- export * from "./createStitches";
1
+ export * from "./createStitches.js";
@@ -1 +1 @@
1
- export * from "./createStitches";
1
+ export * from "./createStitches.js";