@quilted/quilt 0.5.152 → 0.5.153
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 +10 -0
- package/build/cjs/assets.cjs +39 -0
- package/build/cjs/async.cjs +32 -0
- package/build/cjs/events.cjs +46 -0
- package/build/cjs/graphql/testing.cjs +2 -6
- package/build/cjs/html/HTML.cjs +21 -0
- package/build/cjs/html.cjs +23 -12
- package/build/cjs/http.cjs +16 -0
- package/build/cjs/index.cjs +0 -319
- package/build/cjs/localize.cjs +46 -0
- package/build/cjs/navigate/testing.cjs +12 -0
- package/build/cjs/navigate.cjs +70 -0
- package/build/cjs/performance.cjs +26 -0
- package/build/cjs/polyfills/fetch-get-set-cookie.cjs +4 -0
- package/build/cjs/react/testing.cjs +30 -0
- package/build/cjs/react/tools.cjs +19 -0
- package/build/cjs/react.cjs +15 -0
- package/build/cjs/server/ServerContext.cjs +1 -1
- package/build/cjs/server/preload.cjs +1 -1
- package/build/cjs/server/request-router.cjs +215 -231
- package/build/cjs/{server/index.cjs → server.cjs} +26 -52
- package/build/cjs/signals.cjs +51 -0
- package/build/cjs/static/StaticContext.cjs +1 -1
- package/build/cjs/static/index.cjs +43 -51
- package/build/cjs/static/render.cjs +1 -1
- package/build/cjs/testing.cjs +6 -34
- package/build/esm/assets.mjs +2 -0
- package/build/esm/async.mjs +3 -0
- package/build/esm/events.mjs +1 -0
- package/build/esm/graphql/testing.mjs +1 -1
- package/build/esm/html/HTML.mjs +19 -0
- package/build/esm/html.mjs +3 -1
- package/build/esm/http.mjs +1 -1
- package/build/esm/index.mjs +1 -15
- package/build/esm/localize.mjs +1 -0
- package/build/esm/navigate/testing.mjs +1 -0
- package/build/esm/navigate.mjs +1 -0
- package/build/esm/performance.mjs +1 -0
- package/build/esm/polyfills/fetch-get-set-cookie.mjs +1 -0
- package/build/esm/react/testing.mjs +3 -0
- package/build/esm/react/tools.mjs +2 -0
- package/build/esm/react.mjs +2 -0
- package/build/esm/server/ServerContext.mjs +2 -2
- package/build/esm/server/preload.mjs +2 -2
- package/build/esm/server/request-router.mjs +218 -232
- package/build/esm/server.mjs +10 -0
- package/build/esm/signals.mjs +2 -0
- package/build/esm/static/StaticContext.mjs +2 -2
- package/build/esm/static/index.mjs +40 -48
- package/build/esm/static/render.mjs +2 -2
- package/build/esm/testing.mjs +0 -3
- package/build/esnext/assets.esnext +2 -0
- package/build/esnext/async.esnext +3 -0
- package/build/esnext/events.esnext +1 -0
- package/build/esnext/graphql/testing.esnext +1 -1
- package/build/esnext/html/HTML.esnext +19 -0
- package/build/esnext/html.esnext +3 -1
- package/build/esnext/http.esnext +1 -1
- package/build/esnext/index.esnext +1 -15
- package/build/esnext/localize.esnext +1 -0
- package/build/esnext/navigate/testing.esnext +1 -0
- package/build/esnext/navigate.esnext +1 -0
- package/build/esnext/performance.esnext +1 -0
- package/build/esnext/polyfills/fetch-get-set-cookie.esnext +1 -0
- package/build/esnext/react/testing.esnext +3 -0
- package/build/esnext/react/tools.esnext +2 -0
- package/build/esnext/react.esnext +2 -0
- package/build/esnext/server/ServerContext.esnext +2 -2
- package/build/esnext/server/preload.esnext +2 -2
- package/build/esnext/server/request-router.esnext +218 -232
- package/build/esnext/server.esnext +10 -0
- package/build/esnext/signals.esnext +2 -0
- package/build/esnext/static/StaticContext.esnext +2 -2
- package/build/esnext/static/index.esnext +40 -48
- package/build/esnext/static/render.esnext +2 -2
- package/build/esnext/testing.esnext +0 -3
- package/build/tsconfig.tsbuildinfo +1 -1
- package/build/typescript/assets.d.ts +3 -1
- package/build/typescript/assets.d.ts.map +1 -1
- package/build/typescript/async.d.ts +6 -0
- package/build/typescript/async.d.ts.map +1 -0
- package/build/typescript/events.d.ts +3 -0
- package/build/typescript/events.d.ts.map +1 -0
- package/build/typescript/globals.d.ts +8 -0
- package/build/typescript/globals.d.ts.map +1 -0
- package/build/typescript/graphql/testing/matchers/operations.d.ts +7 -0
- package/build/typescript/graphql/testing/matchers/operations.d.ts.map +1 -0
- package/build/typescript/graphql/testing/matchers/utilities.d.ts +8 -0
- package/build/typescript/graphql/testing/matchers/utilities.d.ts.map +1 -0
- package/build/typescript/graphql/testing/matchers.d.ts +11 -0
- package/build/typescript/graphql/testing/matchers.d.ts.map +1 -0
- package/build/typescript/graphql/testing.d.ts +2 -1
- package/build/typescript/graphql/testing.d.ts.map +1 -1
- package/build/typescript/html/HTML.d.ts +5 -0
- package/build/typescript/html/HTML.d.ts.map +1 -0
- package/build/typescript/html.d.ts +3 -1
- package/build/typescript/html.d.ts.map +1 -1
- package/build/typescript/http.d.ts +1 -1
- package/build/typescript/http.d.ts.map +1 -1
- package/build/typescript/index.d.ts +1 -24
- package/build/typescript/index.d.ts.map +1 -1
- package/build/typescript/localize.d.ts +3 -0
- package/build/typescript/localize.d.ts.map +1 -0
- package/build/typescript/magic/assets.d.ts +4 -2
- package/build/typescript/magic/assets.d.ts.map +1 -1
- package/build/typescript/navigate/testing.d.ts +2 -0
- package/build/typescript/navigate/testing.d.ts.map +1 -0
- package/build/typescript/navigate.d.ts +3 -0
- package/build/typescript/navigate.d.ts.map +1 -0
- package/build/typescript/performance.d.ts +3 -0
- package/build/typescript/performance.d.ts.map +1 -0
- package/build/typescript/polyfills/fetch-get-set-cookie.d.ts +2 -0
- package/build/typescript/polyfills/fetch-get-set-cookie.d.ts.map +1 -0
- package/build/typescript/react/testing.d.ts +5 -0
- package/build/typescript/react/testing.d.ts.map +1 -0
- package/build/typescript/react/tools.d.ts +3 -0
- package/build/typescript/react/tools.d.ts.map +1 -0
- package/build/typescript/react-dom.d.ts +3 -0
- package/build/typescript/react-dom.d.ts.map +1 -0
- package/build/typescript/react.d.ts +3 -0
- package/build/typescript/react.d.ts.map +1 -0
- package/build/typescript/routing.d.ts +3 -0
- package/build/typescript/routing.d.ts.map +1 -0
- package/build/typescript/server/ServerContext.d.ts +2 -2
- package/build/typescript/server/request-router.d.ts +13 -37
- package/build/typescript/server/request-router.d.ts.map +1 -1
- package/build/typescript/server.d.ts +14 -0
- package/build/typescript/server.d.ts.map +1 -0
- package/build/typescript/signals.d.ts +3 -0
- package/build/typescript/signals.d.ts.map +1 -0
- package/build/typescript/static/StaticContext.d.ts +2 -2
- package/build/typescript/static/index.d.ts.map +1 -1
- package/build/typescript/static/render.d.ts +2 -2
- package/build/typescript/testing.d.ts +0 -4
- package/build/typescript/testing.d.ts.map +1 -1
- package/package.json +158 -54
- package/source/assets.ts +20 -2
- package/source/async.ts +17 -0
- package/source/events.ts +20 -0
- package/source/graphql/testing/matchers.ts +37 -0
- package/source/graphql/testing.ts +3 -2
- package/source/html/HTML.tsx +22 -0
- package/source/html.ts +11 -3
- package/source/http.ts +4 -0
- package/source/index.ts +1 -149
- package/source/localize.ts +21 -0
- package/source/magic/assets.ts +7 -4
- package/source/navigate/testing.ts +1 -0
- package/source/navigate.ts +24 -0
- package/source/performance.ts +12 -0
- package/source/polyfills/fetch-get-set-cookie.ts +1 -0
- package/source/react/testing.ts +30 -0
- package/source/react/tools.ts +2 -0
- package/source/routing.ts +24 -0
- package/source/server/ServerContext.tsx +3 -3
- package/source/server/preload.ts +2 -2
- package/source/server/request-router.tsx +281 -403
- package/source/{server/index.ts → server.ts} +20 -46
- package/source/signals.ts +12 -0
- package/source/static/StaticContext.tsx +3 -3
- package/source/static/index.tsx +40 -56
- package/source/static/render.tsx +2 -2
- package/source/testing.ts +0 -29
- package/build/cjs/App.cjs +0 -72
- package/build/cjs/TestApp.cjs +0 -20
- package/build/cjs/matchers.cjs +0 -4
- package/build/esm/App.mjs +0 -70
- package/build/esm/TestApp.mjs +0 -18
- package/build/esm/matchers.mjs +0 -1
- package/build/esm/server/index.mjs +0 -10
- package/build/esnext/App.esnext +0 -70
- package/build/esnext/TestApp.esnext +0 -18
- package/build/esnext/matchers.esnext +0 -1
- package/build/esnext/server/index.esnext +0 -10
- package/source/App.tsx +0 -162
- package/source/TestApp.tsx +0 -33
- package/source/matchers/graphql.ts +0 -24
- package/source/matchers.ts +0 -3
- /package/build/cjs/{global.cjs → globals.cjs} +0 -0
- /package/build/esm/{global.mjs → globals.mjs} +0 -0
- /package/build/esnext/{global.esnext → globals.esnext} +0 -0
- /package/source/{global.ts → globals.ts} +0 -0
- /package/source/{matchers/graphql → graphql/testing/matchers}/operations.ts +0 -0
- /package/source/{matchers/graphql → graphql/testing/matchers}/utilities.ts +0 -0
- /package/source/{react-dom/index.ts → react-dom.ts} +0 -0
- /package/source/{react/index.ts → react.ts} +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
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';
|
package/source/magic/assets.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type {
|
|
2
|
+
AssetsCacheKey,
|
|
3
|
+
BrowserAssets as BrowserAssetsType,
|
|
4
|
+
} from '@quilted/assets';
|
|
2
5
|
|
|
3
|
-
export declare
|
|
4
|
-
CacheKey = AssetsCacheKey
|
|
5
|
-
|
|
6
|
+
export declare const BrowserAssets: {
|
|
7
|
+
new <CacheKey = AssetsCacheKey>(): BrowserAssetsType<CacheKey>;
|
|
8
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@quilted/react-router/testing';
|
|
@@ -0,0 +1,24 @@
|
|
|
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';
|
|
@@ -0,0 +1,12 @@
|
|
|
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';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@quilted/polyfills/fetch-get-set-cookie';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import '@quilted/react-testing/matchers';
|
|
2
|
+
|
|
3
|
+
export * from '@quilted/testing';
|
|
4
|
+
|
|
5
|
+
export {
|
|
6
|
+
render,
|
|
7
|
+
createRender,
|
|
8
|
+
rendered,
|
|
9
|
+
destroyAll,
|
|
10
|
+
} from '@quilted/react-testing';
|
|
11
|
+
export type {
|
|
12
|
+
CustomRender,
|
|
13
|
+
CustomRenderResult,
|
|
14
|
+
CustomRenderOptions,
|
|
15
|
+
CustomRenderExtendOptions,
|
|
16
|
+
HookRunner,
|
|
17
|
+
Environment,
|
|
18
|
+
EnvironmentOptions,
|
|
19
|
+
ContextOption,
|
|
20
|
+
RenderOption,
|
|
21
|
+
ActionsOption,
|
|
22
|
+
Node,
|
|
23
|
+
NodeApi,
|
|
24
|
+
Root,
|
|
25
|
+
RootApi,
|
|
26
|
+
DebugOptions,
|
|
27
|
+
EmptyObject,
|
|
28
|
+
PlainObject,
|
|
29
|
+
Predicate,
|
|
30
|
+
} from '@quilted/react-testing';
|
|
@@ -0,0 +1,24 @@
|
|
|
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';
|
|
@@ -2,14 +2,14 @@ import type {PropsWithChildren} from 'react';
|
|
|
2
2
|
|
|
3
3
|
import {AssetsContext, type AssetsManager} from '@quilted/react-assets/server';
|
|
4
4
|
import {InitialUrlContext} from '@quilted/react-router';
|
|
5
|
-
import {
|
|
5
|
+
import {HTMLContext, type HTMLManager} from '@quilted/react-html/server';
|
|
6
6
|
import {HttpServerContext, type HttpManager} from '@quilted/react-http/server';
|
|
7
7
|
|
|
8
8
|
import {maybeWrapContext} from '../utilities/react.tsx';
|
|
9
9
|
|
|
10
10
|
interface Props {
|
|
11
11
|
url?: string | URL;
|
|
12
|
-
html?:
|
|
12
|
+
html?: HTMLManager;
|
|
13
13
|
http?: HttpManager;
|
|
14
14
|
assets?: AssetsManager;
|
|
15
15
|
}
|
|
@@ -30,7 +30,7 @@ export function ServerContext({
|
|
|
30
30
|
HttpServerContext,
|
|
31
31
|
http,
|
|
32
32
|
maybeWrapContext(
|
|
33
|
-
|
|
33
|
+
HTMLContext,
|
|
34
34
|
html,
|
|
35
35
|
maybeWrapContext(InitialUrlContext, normalizedUrl, children),
|
|
36
36
|
),
|
package/source/server/preload.ts
CHANGED
|
@@ -4,7 +4,7 @@ import type {
|
|
|
4
4
|
BrowserAssetsEntry,
|
|
5
5
|
} from '@quilted/assets';
|
|
6
6
|
import {
|
|
7
|
-
|
|
7
|
+
JSONResponse,
|
|
8
8
|
type EnhancedRequest,
|
|
9
9
|
type RequestHandler,
|
|
10
10
|
type RequestContext,
|
|
@@ -31,7 +31,7 @@ export function createAssetPreloader<
|
|
|
31
31
|
context: requestContext,
|
|
32
32
|
});
|
|
33
33
|
|
|
34
|
-
return
|
|
34
|
+
return new JSONResponse(manifest);
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
37
|
|