@quilted/quilt 0.6.16 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/build/esm/async.mjs +1 -3
- package/build/esm/browser.mjs +2 -2
- package/build/esm/graphql/testing.mjs +1 -1
- package/build/esm/graphql.mjs +1 -2
- package/build/esm/localize.mjs +1 -1
- package/build/esm/navigate/testing.mjs +1 -1
- package/build/esm/navigate.mjs +1 -1
- package/build/esm/performance.mjs +1 -1
- package/build/esm/server/ServerContext.mjs +5 -5
- package/build/esm/server/request-router.mjs +21 -21
- package/build/esm/server.mjs +4 -3
- package/build/esm/signals.mjs +1 -1
- package/build/esm/testing.mjs +6 -0
- package/build/esm/threads.mjs +1 -1
- package/build/esnext/async.esnext +1 -3
- package/build/esnext/browser.esnext +2 -2
- package/build/esnext/graphql/testing.esnext +1 -1
- package/build/esnext/graphql.esnext +1 -2
- package/build/esnext/localize.esnext +1 -1
- package/build/esnext/navigate/testing.esnext +1 -1
- package/build/esnext/navigate.esnext +1 -1
- package/build/esnext/performance.esnext +1 -1
- package/build/esnext/server/ServerContext.esnext +3 -3
- package/build/esnext/server/request-router.esnext +3 -3
- package/build/esnext/server.esnext +4 -3
- package/build/esnext/signals.esnext +1 -1
- package/build/esnext/testing.esnext +5 -0
- package/build/esnext/threads.esnext +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/build/typescript/async.d.ts +1 -3
- package/build/typescript/async.d.ts.map +1 -1
- package/build/typescript/browser.d.ts +1 -1
- package/build/typescript/browser.d.ts.map +1 -1
- package/build/typescript/context.d.ts +2 -0
- package/build/typescript/context.d.ts.map +1 -0
- package/build/typescript/graphql/testing.d.ts +1 -1
- package/build/typescript/graphql/testing.d.ts.map +1 -1
- package/build/typescript/graphql.d.ts +1 -2
- package/build/typescript/graphql.d.ts.map +1 -1
- package/build/typescript/localize.d.ts +1 -2
- package/build/typescript/localize.d.ts.map +1 -1
- package/build/typescript/modules.d.ts +1 -2
- package/build/typescript/modules.d.ts.map +1 -1
- package/build/typescript/navigate/testing.d.ts +1 -1
- package/build/typescript/navigate/testing.d.ts.map +1 -1
- package/build/typescript/navigate.d.ts +1 -2
- package/build/typescript/navigate.d.ts.map +1 -1
- package/build/typescript/performance.d.ts +1 -2
- package/build/typescript/performance.d.ts.map +1 -1
- package/build/typescript/server/ServerContext.d.ts +3 -3
- package/build/typescript/server/ServerContext.d.ts.map +1 -1
- package/build/typescript/server/request-router.d.ts +3 -3
- package/build/typescript/server/request-router.d.ts.map +1 -1
- package/build/typescript/server.d.ts +4 -3
- package/build/typescript/server.d.ts.map +1 -1
- package/build/typescript/signals.d.ts +1 -1
- package/build/typescript/signals.d.ts.map +1 -1
- package/build/typescript/testing.d.ts +9 -0
- package/build/typescript/testing.d.ts.map +1 -0
- package/build/typescript/threads.d.ts +1 -2
- package/build/typescript/threads.d.ts.map +1 -1
- package/package.json +24 -38
- package/source/async.ts +1 -18
- package/source/browser.ts +1 -1
- package/source/context.ts +1 -0
- package/source/graphql/testing.ts +1 -1
- package/source/graphql.ts +1 -2
- package/source/localize.ts +1 -21
- package/source/modules.ts +1 -1
- package/source/navigate/testing.ts +1 -1
- package/source/navigate.ts +1 -24
- package/source/performance.ts +1 -12
- package/source/server/ServerContext.tsx +5 -5
- package/source/server/request-router.tsx +5 -5
- package/source/server.ts +8 -3
- package/source/signals.ts +1 -1
- package/source/{react/testing.ts → testing.ts} +2 -8
- package/source/threads.ts +1 -12
- package/tsconfig.json +11 -11
- package/build/esm/react/testing.mjs +0 -6
- package/build/esm/react.mjs +0 -1
- package/build/esnext/react/testing.esnext +0 -5
- package/build/esnext/react.esnext +0 -1
- package/source/react.ts +0 -1
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export { AsyncComponent, AsyncContext, useAsyncModule, useAsyncModuleAssets, useAsyncModulePreload, useHydrated, } from '@quilted/react-async';
|
|
3
|
-
export { useIdleCallback } from '@quilted/react-idle';
|
|
1
|
+
export * from '@quilted/preact-async';
|
|
4
2
|
//# sourceMappingURL=async.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"async.d.ts","sourceRoot":"","sources":["../../source/async.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"async.d.ts","sourceRoot":"","sources":["../../source/async.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../source/browser.ts"],"names":[],"mappings":"AAEA,OAAO,cAAc,CAAC;AAEtB,cAAc,
|
|
1
|
+
{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../source/browser.ts"],"names":[],"mappings":"AAEA,OAAO,cAAc,CAAC;AAEtB,cAAc,yBAAyB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../source/context.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type CustomMatchers } from './testing/matchers.ts';
|
|
2
2
|
export * from '@quilted/graphql/testing';
|
|
3
|
-
export { GraphQLTesting } from '@quilted/
|
|
3
|
+
export { GraphQLTesting } from '@quilted/preact-graphql/testing';
|
|
4
4
|
declare module 'vitest' {
|
|
5
5
|
interface Assertion<T = any> extends CustomMatchers<T> {
|
|
6
6
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../../../source/graphql/testing.ts"],"names":[],"mappings":"AAEA,OAAO,EAAW,KAAK,cAAc,EAAC,MAAM,uBAAuB,CAAC;AAEpE,cAAc,0BAA0B,CAAC;AACzC,OAAO,EAAC,cAAc,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../../../source/graphql/testing.ts"],"names":[],"mappings":"AAEA,OAAO,EAAW,KAAK,cAAc,EAAC,MAAM,uBAAuB,CAAC;AAEpE,cAAc,0BAA0B,CAAC;AACzC,OAAO,EAAC,cAAc,EAAC,MAAM,iCAAiC,CAAC;AAE/D,OAAO,QAAQ,QAAQ,CAAC;IACtB,UAAU,SAAS,CAAC,CAAC,GAAG,GAAG,CAAE,SAAQ,cAAc,CAAC,CAAC,CAAC;KAAG;IACzD,UAAU,4BAA6B,SAAQ,cAAc;KAAG;CACjE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphql.d.ts","sourceRoot":"","sources":["../../source/graphql.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"graphql.d.ts","sourceRoot":"","sources":["../../source/graphql.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC"}
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export type { LocalizedFormatting, LocalizedFormattingCache, LocalizedNumberFormatOptions, LocalizedDateTimeFormatOptions, RouteLocalization, ResolvedRouteLocalization, DefaultLocaleDefinition, } from '@quilted/react-localize';
|
|
1
|
+
export * from '@quilted/preact-localize';
|
|
3
2
|
//# sourceMappingURL=localize.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localize.d.ts","sourceRoot":"","sources":["../../source/localize.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"localize.d.ts","sourceRoot":"","sources":["../../source/localize.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
declare module 'quilt:module/env' {
|
|
3
2
|
import type { EnvironmentVariables } from '@quilted/quilt/env';
|
|
4
3
|
export type { EnvironmentVariables };
|
|
@@ -6,7 +5,7 @@ declare module 'quilt:module/env' {
|
|
|
6
5
|
export default Env;
|
|
7
6
|
}
|
|
8
7
|
declare module 'quilt:module/app' {
|
|
9
|
-
import type { ComponentType } from '
|
|
8
|
+
import type { ComponentType } from 'preact';
|
|
10
9
|
const App: ComponentType<Record<string, unknown>>;
|
|
11
10
|
export default App;
|
|
12
11
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modules.d.ts","sourceRoot":"","sources":["../../source/modules.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"modules.d.ts","sourceRoot":"","sources":["../../source/modules.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,kBAAkB,CAAC;IAChC,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,oBAAoB,CAAC;IAE7D,YAAY,EAAC,oBAAoB,EAAC,CAAC;IAEnC,MAAM,GAAG,EAAE,oBAAoB,CAAC;IAChC,eAAe,GAAG,CAAC;CACpB;AAED,OAAO,QAAQ,kBAAkB,CAAC;IAChC,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,QAAQ,CAAC;IAE1C,MAAM,GAAG,EAAE,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAClD,eAAe,GAAG,CAAC;CACpB;AAED,OAAO,QAAQ,6BAA6B,CAAC;IAC3C,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,yBAAyB,CAAC;IAE3D,MAAM,MAAM,EAAE,aAAa,CAAC;IAC5B,eAAe,MAAM,CAAC;CACvB;AAED,OAAO,QAAQ,qBAAqB,CAAC;IACnC,OAAO,KAAK,EACV,cAAc,EACd,aAAa,IAAI,iBAAiB,EACnC,MAAM,iBAAiB,CAAC;IAElB,MAAM,aAAa,EAAE;QAC1B,KAAK,QAAQ,GAAG,cAAc,KAAK,iBAAiB,CAAC,QAAQ,CAAC,CAAC;KAChE,CAAC;CACH"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from '@quilted/
|
|
1
|
+
export * from '@quilted/preact-router/testing';
|
|
2
2
|
//# sourceMappingURL=testing.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../../../source/navigate/testing.ts"],"names":[],"mappings":"AAAA,cAAc
|
|
1
|
+
{"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../../../source/navigate/testing.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAC"}
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export type { Router, NavigateTo, Routes, RouteDefinition, } from '@quilted/react-router';
|
|
1
|
+
export * from '@quilted/preact-router';
|
|
3
2
|
//# sourceMappingURL=navigate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigate.d.ts","sourceRoot":"","sources":["../../source/navigate.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"navigate.d.ts","sourceRoot":"","sources":["../../source/navigate.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC"}
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export type { Performance, PerformanceNavigation, PerformanceInflightNavigation, } from '@quilted/react-performance';
|
|
1
|
+
export * from '@quilted/preact-performance';
|
|
3
2
|
//# sourceMappingURL=performance.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"performance.d.ts","sourceRoot":"","sources":["../../source/performance.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"performance.d.ts","sourceRoot":"","sources":["../../source/performance.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import { type BrowserDetails } from '@quilted/
|
|
1
|
+
import type { RenderableProps, VNode } from 'preact';
|
|
2
|
+
import { type BrowserDetails } from '@quilted/preact-browser/server';
|
|
3
3
|
interface Props {
|
|
4
4
|
browser?: BrowserDetails;
|
|
5
5
|
}
|
|
6
|
-
export declare function ServerContext({ browser, children }:
|
|
6
|
+
export declare function ServerContext({ browser, children }: RenderableProps<Props>): VNode<{}>;
|
|
7
7
|
export {};
|
|
8
8
|
//# sourceMappingURL=ServerContext.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ServerContext.d.ts","sourceRoot":"","sources":["../../../source/server/ServerContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,
|
|
1
|
+
{"version":3,"file":"ServerContext.d.ts","sourceRoot":"","sources":["../../../source/server/ServerContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,eAAe,EAAE,KAAK,EAAC,MAAM,QAAQ,CAAC;AAGnD,OAAO,EAEL,KAAK,cAAc,EACpB,MAAM,gCAAgC,CAAC;AAExC,UAAU,KAAK;IACb,OAAO,CAAC,EAAE,cAAc,CAAC;CAC1B;AAED,wBAAgB,aAAa,CAAC,EAAC,OAAO,EAAE,QAAQ,EAAC,EAAE,eAAe,CAAC,KAAK,CAAC,aAqBxE"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type VNode } from 'preact';
|
|
2
2
|
import { type AssetsCacheKey, type BrowserAssets, type BrowserAssetsEntry } from '@quilted/assets';
|
|
3
|
-
import { BrowserResponse } from '@quilted/
|
|
3
|
+
import { BrowserResponse } from '@quilted/preact-browser/server';
|
|
4
4
|
import { HTMLResponse, RedirectResponse } from '@quilted/request-router';
|
|
5
5
|
export interface RenderHTMLFunction {
|
|
6
6
|
(content: ReadableStream<string>, context: {
|
|
@@ -20,6 +20,6 @@ export interface RenderOptions {
|
|
|
20
20
|
readonly renderHTML?: boolean | 'fragment' | 'document' | RenderHTMLFunction;
|
|
21
21
|
waitUntil?(promise: Promise<any>): void;
|
|
22
22
|
}
|
|
23
|
-
export declare function renderToResponse(element:
|
|
23
|
+
export declare function renderToResponse(element: VNode<any>, options: RenderOptions): Promise<HTMLResponse | RedirectResponse>;
|
|
24
24
|
export declare function renderToResponse(options: RenderOptions): Promise<HTMLResponse | RedirectResponse>;
|
|
25
25
|
//# sourceMappingURL=request-router.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request-router.d.ts","sourceRoot":"","sources":["../../../source/server/request-router.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,
|
|
1
|
+
{"version":3,"file":"request-router.d.ts","sourceRoot":"","sources":["../../../source/server/request-router.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,KAAK,EAAC,MAAM,QAAQ,CAAC;AAMlD,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACxB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,eAAe,EAKhB,MAAM,gCAAgC,CAAC;AAExC,OAAO,EAAC,YAAY,EAAE,gBAAgB,EAAC,MAAM,yBAAyB,CAAC;AAIvE,MAAM,WAAW,kBAAkB;IACjC,CACE,OAAO,EAAE,cAAc,CAAC,MAAM,CAAC,EAC/B,OAAO,EAAE;QACP,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAC;QACnC,QAAQ,CAAC,MAAM,CAAC,EAAE,kBAAkB,CAAC;QACrC,QAAQ,CAAC,aAAa,CAAC,EAAE,kBAAkB,CAAC;KAC7C,GACA,cAAc,CAAC,GAAG,CAAC,GAAG,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,CAAC;CACzE;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,GAAG,KAAK,CAAC;IACpC,QAAQ,CAAC,OAAO,CAAC,EAAE,WAAW,CAAC;IAC/B,QAAQ,CAAC,MAAM,CAAC,EAAE,aAAa,CAAC;IAChC,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC;IAC5C,QAAQ,CAAC,cAAc,CAAC,EAAE,QAAQ,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IACtD,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,GAAG,UAAU,GAAG,UAAU,GAAG,kBAAkB,CAAC;IAC7E,SAAS,CAAC,CAAC,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;CACzC;AAED,wBAAsB,gBAAgB,CACpC,OAAO,EAAE,KAAK,CAAC,GAAG,CAAC,EACnB,OAAO,EAAE,aAAa,GACrB,OAAO,CAAC,YAAY,GAAG,gBAAgB,CAAC,CAAC;AAC5C,wBAAsB,gBAAgB,CACpC,OAAO,EAAE,aAAa,GACrB,OAAO,CAAC,YAAY,GAAG,gBAAgB,CAAC,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { renderToString, renderToStringAsync, renderToStaticMarkup, } from 'preact-render-to-string';
|
|
2
|
+
export * from '@quilted/preact-browser/server';
|
|
2
3
|
export { styleAssetAttributes, styleAssetPreloadAttributes, scriptAssetAttributes, scriptAssetPreloadAttributes, BrowserAssetsFromManifests, createBrowserAssetsEntryFromManifest, } from '@quilted/assets';
|
|
3
4
|
export type { Asset, AssetsCacheKey, BrowserAssets, BrowserAssetsEntry, BrowserAssetSelector, BrowserAssetModuleSelector, AssetsBuildManifest, AssetsBuildManifestEntry, } from '@quilted/assets';
|
|
4
|
-
export { parseAcceptLanguageHeader } from '@quilted/
|
|
5
|
-
export { createRequestRouterLocalization } from '@quilted/
|
|
5
|
+
export { parseAcceptLanguageHeader } from '@quilted/preact-localize';
|
|
6
|
+
export { createRequestRouterLocalization } from '@quilted/preact-localize/request-router';
|
|
6
7
|
export { renderToResponse } from './server/request-router.tsx';
|
|
7
8
|
//# sourceMappingURL=server.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../source/server.ts"],"names":[],"mappings":"AAAA,cAAc
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../source/server.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,yBAAyB,CAAC;AACjC,cAAc,gCAAgC,CAAC;AAE/C,OAAO,EACL,oBAAoB,EACpB,2BAA2B,EAC3B,qBAAqB,EACrB,4BAA4B,EAC5B,0BAA0B,EAC1B,oCAAoC,GACrC,MAAM,iBAAiB,CAAC;AACzB,YAAY,EACV,KAAK,EACL,cAAc,EACd,aAAa,EACb,kBAAkB,EAClB,oBAAoB,EACpB,0BAA0B,EAC1B,mBAAmB,EACnB,wBAAwB,GACzB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAC,yBAAyB,EAAC,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAC,+BAA+B,EAAC,MAAM,yCAAyC,CAAC;AAExF,OAAO,EAAC,gBAAgB,EAAC,MAAM,6BAA6B,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from '@quilted/
|
|
1
|
+
export * from '@quilted/preact-signals';
|
|
2
2
|
//# sourceMappingURL=signals.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signals.d.ts","sourceRoot":"","sources":["../../source/signals.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"signals.d.ts","sourceRoot":"","sources":["../../source/signals.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type CustomMatchers } from '@quilted/preact-testing/matchers';
|
|
2
|
+
export * from '@quilted/preact-testing';
|
|
3
|
+
declare module 'vitest' {
|
|
4
|
+
interface Assertion<T = any> extends CustomMatchers<T> {
|
|
5
|
+
}
|
|
6
|
+
interface AsymmetricMatchersContaining extends CustomMatchers {
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=testing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../../source/testing.ts"],"names":[],"mappings":"AACA,OAAO,EAAW,KAAK,cAAc,EAAC,MAAM,kCAAkC,CAAC;AAE/E,cAAc,yBAAyB,CAAC;AAExC,OAAO,QAAQ,QAAQ,CAAC;IACtB,UAAU,SAAS,CAAC,CAAC,GAAG,GAAG,CAAE,SAAQ,cAAc,CAAC,CAAC,CAAC;KAAG;IACzD,UAAU,4BAA6B,SAAQ,cAAc;KAAG;CACjE"}
|
|
@@ -3,6 +3,5 @@ export type { Thread, ThreadOptions, ThreadTarget, ThreadAbortSignal, ThreadEnco
|
|
|
3
3
|
export { isThreadSignal, createThreadSignal, acceptThreadSignal, type ThreadSignal, } from '@quilted/threads/signals';
|
|
4
4
|
export { on, once, addEventHandler, createEventEmitter, EventEmitter, AbortError, NestedAbortController, TimedAbortController, } from '@quilted/events';
|
|
5
5
|
export type { AbortBehavior, EventHandler, EventTarget, EventTargetAddEventListener, EventTargetFunction, EventTargetOn, } from '@quilted/events';
|
|
6
|
-
export
|
|
7
|
-
export type { CustomWorker, CustomWorkerConstructor, CustomWorkerModuleResolver, CustomThreadWorker, CustomThreadWorkerConstructor, } from '@quilted/react-workers';
|
|
6
|
+
export * from '@quilted/preact-workers';
|
|
8
7
|
//# sourceMappingURL=threads.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"threads.d.ts","sourceRoot":"","sources":["../../source/threads.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EACN,OAAO,EACP,kBAAkB,EAClB,YAAY,EACZ,uBAAuB,EACvB,uBAAuB,EACvB,kBAAkB,EAClB,sBAAsB,EACtB,4BAA4B,EAC5B,2BAA2B,EAC3B,yBAAyB,EACzB,gCAAgC,EAChC,aAAa,GACd,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EACV,MAAM,EACN,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,cAAc,GACf,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,kBAAkB,EAClB,KAAK,YAAY,GAClB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,EAAE,EACF,IAAI,EACJ,eAAe,EACf,kBAAkB,EAClB,YAAY,EACZ,UAAU,EACV,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,iBAAiB,CAAC;AACzB,YAAY,EACV,aAAa,EACb,YAAY,EACZ,WAAW,EACX,2BAA2B,EAC3B,mBAAmB,EACnB,aAAa,GACd,MAAM,iBAAiB,CAAC;AACzB,
|
|
1
|
+
{"version":3,"file":"threads.d.ts","sourceRoot":"","sources":["../../source/threads.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EACN,OAAO,EACP,kBAAkB,EAClB,YAAY,EACZ,uBAAuB,EACvB,uBAAuB,EACvB,kBAAkB,EAClB,sBAAsB,EACtB,4BAA4B,EAC5B,2BAA2B,EAC3B,yBAAyB,EACzB,gCAAgC,EAChC,aAAa,GACd,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EACV,MAAM,EACN,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,cAAc,GACf,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,kBAAkB,EAClB,KAAK,YAAY,GAClB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,EAAE,EACF,IAAI,EACJ,eAAe,EACf,kBAAkB,EAClB,YAAY,EACZ,UAAU,EACV,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,iBAAiB,CAAC;AACzB,YAAY,EACV,aAAa,EACb,YAAY,EACZ,WAAW,EACX,2BAA2B,EAC3B,mBAAmB,EACnB,aAAa,GACd,MAAM,iBAAiB,CAAC;AACzB,cAAc,yBAAyB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quilted/quilt",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.7.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/lemonmade/quilt.git",
|
|
@@ -79,17 +79,11 @@
|
|
|
79
79
|
"quilt:esnext": "./build/esnext/signals.esnext",
|
|
80
80
|
"import": "./build/esm/signals.mjs"
|
|
81
81
|
},
|
|
82
|
-
"./
|
|
83
|
-
"types": "./build/typescript/
|
|
84
|
-
"quilt:source": "./source/
|
|
85
|
-
"quilt:esnext": "./build/esnext/
|
|
86
|
-
"import": "./build/esm/
|
|
87
|
-
},
|
|
88
|
-
"./react/testing": {
|
|
89
|
-
"types": "./build/typescript/react/testing.d.ts",
|
|
90
|
-
"quilt:source": "./source/react/testing.ts",
|
|
91
|
-
"quilt:esnext": "./build/esnext/react/testing.esnext",
|
|
92
|
-
"import": "./build/esm/react/testing.mjs"
|
|
82
|
+
"./testing": {
|
|
83
|
+
"types": "./build/typescript/testing.d.ts",
|
|
84
|
+
"quilt:source": "./source/testing.ts",
|
|
85
|
+
"quilt:esnext": "./build/esnext/testing.esnext",
|
|
86
|
+
"import": "./build/esm/testing.mjs"
|
|
93
87
|
},
|
|
94
88
|
"./graphql": {
|
|
95
89
|
"types": "./build/typescript/graphql.d.ts",
|
|
@@ -158,6 +152,9 @@
|
|
|
158
152
|
"browser": [
|
|
159
153
|
"./build/typescript/browser.d.ts"
|
|
160
154
|
],
|
|
155
|
+
"context": [
|
|
156
|
+
"./build/typescript/context.d.ts"
|
|
157
|
+
],
|
|
161
158
|
"globals": [
|
|
162
159
|
"./build/typescript/globals.d.ts"
|
|
163
160
|
],
|
|
@@ -203,8 +200,8 @@
|
|
|
203
200
|
"request-router": [
|
|
204
201
|
"./build/typescript/request-router/index.d.ts"
|
|
205
202
|
],
|
|
206
|
-
"
|
|
207
|
-
"./build/typescript/
|
|
203
|
+
"testing": [
|
|
204
|
+
"./build/typescript/testing.d.ts"
|
|
208
205
|
],
|
|
209
206
|
"modules": [
|
|
210
207
|
"./build/typescript/modules.d.ts"
|
|
@@ -226,20 +223,19 @@
|
|
|
226
223
|
"@quilted/assets": "^0.1.2",
|
|
227
224
|
"@quilted/async": "^0.4.1",
|
|
228
225
|
"@quilted/events": "^2.0.0",
|
|
229
|
-
"@quilted/graphql": "^3.0.
|
|
230
|
-
"@quilted/
|
|
231
|
-
"@quilted/
|
|
232
|
-
"@quilted/
|
|
233
|
-
"@quilted/
|
|
234
|
-
"@quilted/
|
|
235
|
-
"@quilted/
|
|
236
|
-
"@quilted/
|
|
237
|
-
"@quilted/
|
|
238
|
-
"@quilted/
|
|
239
|
-
"@quilted/
|
|
240
|
-
"@quilted/react
|
|
241
|
-
"@quilted/react-
|
|
242
|
-
"@quilted/react-workers": "^0.4.0",
|
|
226
|
+
"@quilted/graphql": "^3.0.3",
|
|
227
|
+
"@quilted/preact-async": "^0.1.0",
|
|
228
|
+
"@quilted/preact-browser": "^0.1.0",
|
|
229
|
+
"@quilted/preact-context": "^0.1.0",
|
|
230
|
+
"@quilted/preact-graphql": "^0.1.0",
|
|
231
|
+
"@quilted/preact-localize": "^0.1.0",
|
|
232
|
+
"@quilted/preact-performance": "^0.1.0",
|
|
233
|
+
"@quilted/preact-router": "^0.1.0",
|
|
234
|
+
"@quilted/preact-signals": "^0.1.0",
|
|
235
|
+
"@quilted/preact-workers": "^0.1.0",
|
|
236
|
+
"@quilted/preact-testing": "^0.1.5",
|
|
237
|
+
"@quilted/react": "^18.2.0",
|
|
238
|
+
"@quilted/react-dom": "^18.2.11",
|
|
243
239
|
"@quilted/request-router": "^0.2.0",
|
|
244
240
|
"@quilted/signals": "^0.2.0",
|
|
245
241
|
"@quilted/threads": "^2.0.0",
|
|
@@ -250,8 +246,6 @@
|
|
|
250
246
|
"graphql": "^16.8.0",
|
|
251
247
|
"preact": "^10.21.0",
|
|
252
248
|
"prettier": "^2.0.0 || ^3.0.0",
|
|
253
|
-
"react": "^18.0.0",
|
|
254
|
-
"react-dom": "^18.0.0",
|
|
255
249
|
"vitest": "^1.0.0"
|
|
256
250
|
},
|
|
257
251
|
"peerDependenciesMeta": {
|
|
@@ -264,12 +258,6 @@
|
|
|
264
258
|
"prettier": {
|
|
265
259
|
"optional": true
|
|
266
260
|
},
|
|
267
|
-
"react": {
|
|
268
|
-
"optional": true
|
|
269
|
-
},
|
|
270
|
-
"react-dom": {
|
|
271
|
-
"optional": true
|
|
272
|
-
},
|
|
273
261
|
"vitest": {
|
|
274
262
|
"optional": true
|
|
275
263
|
}
|
|
@@ -278,8 +266,6 @@
|
|
|
278
266
|
"expect": "^29.0.0",
|
|
279
267
|
"preact": "^10.21.0",
|
|
280
268
|
"prettier": "^3.2.0",
|
|
281
|
-
"react": "npm:@quilted/react@^18.2.0",
|
|
282
|
-
"react-dom": "npm:@quilted/react-dom@^18.2.0",
|
|
283
269
|
"vitest": "^1.4.0"
|
|
284
270
|
},
|
|
285
271
|
"scripts": {
|
package/source/async.ts
CHANGED
|
@@ -1,18 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
AsyncAction,
|
|
3
|
-
AsyncActionPromise,
|
|
4
|
-
AsyncActionDeferred,
|
|
5
|
-
AsyncModule,
|
|
6
|
-
type AsyncModuleLoader,
|
|
7
|
-
type AsyncModuleLoaderFunction,
|
|
8
|
-
type AsyncModuleLoaderObject,
|
|
9
|
-
} from '@quilted/async';
|
|
10
|
-
export {
|
|
11
|
-
AsyncComponent,
|
|
12
|
-
AsyncContext,
|
|
13
|
-
useAsyncModule,
|
|
14
|
-
useAsyncModuleAssets,
|
|
15
|
-
useAsyncModulePreload,
|
|
16
|
-
useHydrated,
|
|
17
|
-
} from '@quilted/react-async';
|
|
18
|
-
export {useIdleCallback} from '@quilted/react-idle';
|
|
1
|
+
export * from '@quilted/preact-async';
|
package/source/browser.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@quilted/preact-context';
|
|
@@ -3,7 +3,7 @@ import {expect} from 'vitest';
|
|
|
3
3
|
import {matchers, type CustomMatchers} from './testing/matchers.ts';
|
|
4
4
|
|
|
5
5
|
export * from '@quilted/graphql/testing';
|
|
6
|
-
export {GraphQLTesting} from '@quilted/
|
|
6
|
+
export {GraphQLTesting} from '@quilted/preact-graphql/testing';
|
|
7
7
|
|
|
8
8
|
declare module 'vitest' {
|
|
9
9
|
interface Assertion<T = any> extends CustomMatchers<T> {}
|
package/source/graphql.ts
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export * from '@quilted/graphql';
|
|
2
|
-
export {GraphQLContext, useGraphQLFetch} from '@quilted/react-graphql';
|
|
1
|
+
export * from '@quilted/preact-graphql';
|
package/source/localize.ts
CHANGED
|
@@ -1,21 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
Localization,
|
|
3
|
-
useLocale,
|
|
4
|
-
useLocaleFromEnvironment,
|
|
5
|
-
useLocalizedFormatting,
|
|
6
|
-
LocalizedLink,
|
|
7
|
-
LocalizedRouting,
|
|
8
|
-
useRouteLocalization,
|
|
9
|
-
createRouteLocalization,
|
|
10
|
-
createRoutePathLocalization,
|
|
11
|
-
createRouteSubdomainLocalization,
|
|
12
|
-
} from '@quilted/react-localize';
|
|
13
|
-
export type {
|
|
14
|
-
LocalizedFormatting,
|
|
15
|
-
LocalizedFormattingCache,
|
|
16
|
-
LocalizedNumberFormatOptions,
|
|
17
|
-
LocalizedDateTimeFormatOptions,
|
|
18
|
-
RouteLocalization,
|
|
19
|
-
ResolvedRouteLocalization,
|
|
20
|
-
DefaultLocaleDefinition,
|
|
21
|
-
} from '@quilted/react-localize';
|
|
1
|
+
export * from '@quilted/preact-localize';
|
package/source/modules.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '@quilted/
|
|
1
|
+
export * from '@quilted/preact-router/testing';
|
package/source/navigate.ts
CHANGED
|
@@ -1,24 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
Link,
|
|
3
|
-
Redirect,
|
|
4
|
-
Routing,
|
|
5
|
-
RoutePreloading,
|
|
6
|
-
NavigationBlock,
|
|
7
|
-
useCurrentUrl,
|
|
8
|
-
useInitialURL,
|
|
9
|
-
useRouter,
|
|
10
|
-
useRoutes,
|
|
11
|
-
useRouteMatch,
|
|
12
|
-
useRouteMatchDetails,
|
|
13
|
-
useNavigate,
|
|
14
|
-
useRedirect,
|
|
15
|
-
useNavigationBlock,
|
|
16
|
-
useScrollRestoration,
|
|
17
|
-
useRouteChangeFocusRef,
|
|
18
|
-
} from '@quilted/react-router';
|
|
19
|
-
export type {
|
|
20
|
-
Router,
|
|
21
|
-
NavigateTo,
|
|
22
|
-
Routes,
|
|
23
|
-
RouteDefinition,
|
|
24
|
-
} from '@quilted/react-router';
|
|
1
|
+
export * from '@quilted/preact-router';
|
package/source/performance.ts
CHANGED
|
@@ -1,12 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
createPerformance,
|
|
3
|
-
PerformanceContext,
|
|
4
|
-
usePerformance,
|
|
5
|
-
usePerformanceNavigation,
|
|
6
|
-
usePerformanceNavigationEvent,
|
|
7
|
-
} from '@quilted/react-performance';
|
|
8
|
-
export type {
|
|
9
|
-
Performance,
|
|
10
|
-
PerformanceNavigation,
|
|
11
|
-
PerformanceInflightNavigation,
|
|
12
|
-
} from '@quilted/react-performance';
|
|
1
|
+
export * from '@quilted/preact-performance';
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type {RenderableProps, VNode} from 'preact';
|
|
2
2
|
|
|
3
|
-
import {InitialURLContext} from '@quilted/
|
|
3
|
+
import {InitialURLContext} from '@quilted/preact-router';
|
|
4
4
|
import {
|
|
5
5
|
BrowserDetailsContext,
|
|
6
6
|
type BrowserDetails,
|
|
7
|
-
} from '@quilted/
|
|
7
|
+
} from '@quilted/preact-browser/server';
|
|
8
8
|
|
|
9
9
|
interface Props {
|
|
10
10
|
browser?: BrowserDetails;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
export function ServerContext({browser, children}:
|
|
13
|
+
export function ServerContext({browser, children}: RenderableProps<Props>) {
|
|
14
14
|
const requestURL = browser?.request.url;
|
|
15
15
|
const initialURL = requestURL && new URL(requestURL);
|
|
16
16
|
|
|
@@ -30,5 +30,5 @@ export function ServerContext({browser, children}: PropsWithChildren<Props>) {
|
|
|
30
30
|
withInitialURL
|
|
31
31
|
);
|
|
32
32
|
|
|
33
|
-
return withBrowser
|
|
33
|
+
return withBrowser as VNode<{}>;
|
|
34
34
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {isValidElement, type
|
|
1
|
+
import {isValidElement, type VNode} from 'preact';
|
|
2
2
|
import {
|
|
3
3
|
renderToStaticMarkup,
|
|
4
4
|
renderToStringAsync,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
ScriptAssetPreload,
|
|
18
18
|
StyleAsset,
|
|
19
19
|
StyleAssetPreload,
|
|
20
|
-
} from '@quilted/
|
|
20
|
+
} from '@quilted/preact-browser/server';
|
|
21
21
|
|
|
22
22
|
import {HTMLResponse, RedirectResponse} from '@quilted/request-router';
|
|
23
23
|
|
|
@@ -47,17 +47,17 @@ export interface RenderOptions {
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
export async function renderToResponse(
|
|
50
|
-
element:
|
|
50
|
+
element: VNode<any>,
|
|
51
51
|
options: RenderOptions,
|
|
52
52
|
): Promise<HTMLResponse | RedirectResponse>;
|
|
53
53
|
export async function renderToResponse(
|
|
54
54
|
options: RenderOptions,
|
|
55
55
|
): Promise<HTMLResponse | RedirectResponse>;
|
|
56
56
|
export async function renderToResponse(
|
|
57
|
-
optionsOrElement:
|
|
57
|
+
optionsOrElement: VNode<any> | RenderOptions,
|
|
58
58
|
definitelyOptions?: RenderOptions,
|
|
59
59
|
) {
|
|
60
|
-
let element:
|
|
60
|
+
let element: VNode<any> | undefined;
|
|
61
61
|
let options: RenderOptions;
|
|
62
62
|
|
|
63
63
|
if (isValidElement(optionsOrElement)) {
|
package/source/server.ts
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
export
|
|
1
|
+
export {
|
|
2
|
+
renderToString,
|
|
3
|
+
renderToStringAsync,
|
|
4
|
+
renderToStaticMarkup,
|
|
5
|
+
} from 'preact-render-to-string';
|
|
6
|
+
export * from '@quilted/preact-browser/server';
|
|
2
7
|
|
|
3
8
|
export {
|
|
4
9
|
styleAssetAttributes,
|
|
@@ -18,7 +23,7 @@ export type {
|
|
|
18
23
|
AssetsBuildManifest,
|
|
19
24
|
AssetsBuildManifestEntry,
|
|
20
25
|
} from '@quilted/assets';
|
|
21
|
-
export {parseAcceptLanguageHeader} from '@quilted/
|
|
22
|
-
export {createRequestRouterLocalization} from '@quilted/
|
|
26
|
+
export {parseAcceptLanguageHeader} from '@quilted/preact-localize';
|
|
27
|
+
export {createRequestRouterLocalization} from '@quilted/preact-localize/request-router';
|
|
23
28
|
|
|
24
29
|
export {renderToResponse} from './server/request-router.tsx';
|
package/source/signals.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '@quilted/
|
|
1
|
+
export * from '@quilted/preact-signals';
|
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
import {expect} from 'vitest';
|
|
2
|
-
import {matchers, type CustomMatchers} from '@quilted/
|
|
2
|
+
import {matchers, type CustomMatchers} from '@quilted/preact-testing/matchers';
|
|
3
3
|
|
|
4
|
-
export
|
|
5
|
-
render,
|
|
6
|
-
createRender,
|
|
7
|
-
rendered,
|
|
8
|
-
destroyAll,
|
|
9
|
-
} from '@quilted/react-testing/preact';
|
|
10
|
-
export type * from '@quilted/react-testing/dom';
|
|
4
|
+
export * from '@quilted/preact-testing';
|
|
11
5
|
|
|
12
6
|
declare module 'vitest' {
|
|
13
7
|
interface Assertion<T = any> extends CustomMatchers<T> {}
|
package/source/threads.ts
CHANGED
|
@@ -48,15 +48,4 @@ export type {
|
|
|
48
48
|
EventTargetFunction,
|
|
49
49
|
EventTargetOn,
|
|
50
50
|
} from '@quilted/events';
|
|
51
|
-
export
|
|
52
|
-
useThreadWorker,
|
|
53
|
-
createWorker,
|
|
54
|
-
createThreadWorker,
|
|
55
|
-
} from '@quilted/react-workers';
|
|
56
|
-
export type {
|
|
57
|
-
CustomWorker,
|
|
58
|
-
CustomWorkerConstructor,
|
|
59
|
-
CustomWorkerModuleResolver,
|
|
60
|
-
CustomThreadWorker,
|
|
61
|
-
CustomThreadWorkerConstructor,
|
|
62
|
-
} from '@quilted/react-workers';
|
|
51
|
+
export * from '@quilted/preact-workers';
|