@quilted/quilt 0.5.152 → 0.5.154
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 +21 -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 +6 -9
- package/build/cjs/graphql.cjs +8 -0
- 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 +2 -1
- package/build/esm/graphql.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 +2 -1
- package/build/esnext/graphql.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 +4 -2
- package/build/typescript/graphql/testing.d.ts.map +1 -1
- package/build/typescript/graphql.d.ts +1 -1
- package/build/typescript/graphql.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 +159 -55
- package/source/assets.ts +20 -2
- package/source/async.ts +17 -0
- package/source/events.ts +20 -0
- package/source/graphql/testing.ts +6 -4
- package/source/graphql.ts +2 -0
- 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/operations.ts +0 -117
- package/source/matchers/graphql/utilities.ts +0 -68
- 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/{react-dom/index.ts → react-dom.ts} +0 -0
- /package/source/{react/index.ts → react.ts} +0 -0
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
export {
|
|
2
|
-
|
|
2
|
+
Head,
|
|
3
3
|
Serialize,
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
renderHtmlToString,
|
|
4
|
+
HTMLManager,
|
|
5
|
+
HTMLContext,
|
|
7
6
|
SERVER_ACTION_ID as HTML_SERVER_ACTION_ID,
|
|
8
7
|
} from '@quilted/react-html/server';
|
|
9
8
|
export {
|
|
10
|
-
|
|
11
|
-
useServerAction,
|
|
9
|
+
extract,
|
|
12
10
|
ServerRenderManager,
|
|
13
11
|
ServerRenderManagerContext,
|
|
14
|
-
extract,
|
|
15
12
|
} from '@quilted/react-server-render/server';
|
|
16
13
|
|
|
17
14
|
export {
|
|
@@ -19,7 +16,7 @@ export {
|
|
|
19
16
|
styleAssetPreloadAttributes,
|
|
20
17
|
scriptAssetAttributes,
|
|
21
18
|
scriptAssetPreloadAttributes,
|
|
22
|
-
|
|
19
|
+
BrowserAssetsFromManifests,
|
|
23
20
|
createBrowserAssetsEntryFromManifest,
|
|
24
21
|
} from '@quilted/assets';
|
|
25
22
|
export type {
|
|
@@ -39,48 +36,25 @@ export {
|
|
|
39
36
|
AssetsManager,
|
|
40
37
|
SERVER_ACTION_ID as ASSETS_SERVER_ACTION_ID,
|
|
41
38
|
} from '@quilted/react-assets/server';
|
|
39
|
+
export type {HttpState} from '@quilted/react-http/server';
|
|
40
|
+
export {parseAcceptLanguageHeader} from '@quilted/react-localize';
|
|
41
|
+
export {createRequestRouterLocalization} from '@quilted/react-localize/request-router';
|
|
42
|
+
export {
|
|
43
|
+
ServerAction,
|
|
44
|
+
useServerAction,
|
|
45
|
+
useServerContext,
|
|
46
|
+
} from '@quilted/react-server-render';
|
|
42
47
|
export type {
|
|
43
48
|
ServerActionKind,
|
|
44
49
|
ServerActionOptions,
|
|
45
50
|
ServerActionPerform,
|
|
46
51
|
ServerRenderPass,
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
export {createRequestRouterLocalization} from '@quilted/react-localize/request-router';
|
|
50
|
-
export type {
|
|
51
|
-
RequestRouterLocalization,
|
|
52
|
-
RouteLocalization,
|
|
53
|
-
ResolvedRouteLocalization,
|
|
54
|
-
} from '@quilted/react-localize/request-router';
|
|
55
|
-
export {
|
|
56
|
-
Request,
|
|
57
|
-
Response,
|
|
58
|
-
EnhancedRequest,
|
|
59
|
-
EnhancedResponse,
|
|
60
|
-
createRequestRouter,
|
|
61
|
-
createHeaders,
|
|
62
|
-
} from '@quilted/request-router';
|
|
63
|
-
export type {
|
|
64
|
-
Headers,
|
|
65
|
-
BodyInit,
|
|
66
|
-
ResponseInit,
|
|
67
|
-
RequestInit,
|
|
68
|
-
Cookies,
|
|
69
|
-
CookieOptions,
|
|
70
|
-
RequestRouter,
|
|
71
|
-
RequestContext,
|
|
72
|
-
RequestHandler,
|
|
73
|
-
ResponseOrEnhancedResponse,
|
|
74
|
-
CookieDefinition,
|
|
75
|
-
RequestRegistration,
|
|
76
|
-
RequestRegistrationOptions,
|
|
77
|
-
} from '@quilted/request-router';
|
|
78
|
-
export {parseAcceptLanguageHeader} from '@quilted/react-localize';
|
|
52
|
+
ServerRenderRequestContext,
|
|
53
|
+
} from '@quilted/react-server-render';
|
|
79
54
|
|
|
80
|
-
export {ServerContext} from './ServerContext.tsx';
|
|
55
|
+
export {ServerContext} from './server/ServerContext.tsx';
|
|
56
|
+
export {renderToResponse} from './server/request-router.tsx';
|
|
81
57
|
export {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
} from './request-router.tsx';
|
|
86
|
-
export {createAssetPreloader, type AssetPreloadOptions} from './preload.ts';
|
|
58
|
+
createAssetPreloader,
|
|
59
|
+
type AssetPreloadOptions,
|
|
60
|
+
} from './server/preload.ts';
|
|
@@ -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 StaticContext({
|
|
|
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/static/index.tsx
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {type ComponentType} from 'react';
|
|
2
|
+
import {renderToStaticMarkup} from 'react-dom/server';
|
|
2
3
|
|
|
4
|
+
import {type BrowserAssets} from '@quilted/assets';
|
|
3
5
|
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
} from '@quilted/
|
|
10
|
-
import {renderHtmlToString, Html} from '@quilted/react-html/server';
|
|
6
|
+
Head,
|
|
7
|
+
Script,
|
|
8
|
+
ScriptPreload,
|
|
9
|
+
Style,
|
|
10
|
+
StylePreload,
|
|
11
|
+
} from '@quilted/react-html/server';
|
|
11
12
|
import type {RouteDefinition} from '@quilted/react-router';
|
|
12
13
|
import {
|
|
13
14
|
StaticRenderer,
|
|
@@ -243,54 +244,37 @@ export async function renderStatic(
|
|
|
243
244
|
}),
|
|
244
245
|
]);
|
|
245
246
|
|
|
246
|
-
const
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
return <link key={style.source} {...(attributes as any)} />;
|
|
277
|
-
})}
|
|
278
|
-
|
|
279
|
-
{[...preloadAssets.scripts].map((script) => {
|
|
280
|
-
const attributes = scriptAssetPreloadAttributes(script, {
|
|
281
|
-
baseUrl: url,
|
|
282
|
-
});
|
|
283
|
-
|
|
284
|
-
return <link key={script.source} {...(attributes as any)} />;
|
|
285
|
-
})}
|
|
286
|
-
</>
|
|
287
|
-
}
|
|
288
|
-
>
|
|
289
|
-
{markup}
|
|
290
|
-
</Html>,
|
|
291
|
-
);
|
|
247
|
+
const {htmlAttributes, bodyAttributes, ...headProps} = htmlManager.state;
|
|
248
|
+
const minifiedHTML =
|
|
249
|
+
'<!DOCTYPE html>' +
|
|
250
|
+
renderToStaticMarkup(
|
|
251
|
+
// eslint-disable-next-line jsx-a11y/html-has-lang
|
|
252
|
+
<html {...htmlAttributes}>
|
|
253
|
+
<head>
|
|
254
|
+
<Head {...headProps} />
|
|
255
|
+
{mainAssets?.scripts.map((script) => (
|
|
256
|
+
<Script key={script.source} asset={script} baseUrl={url} />
|
|
257
|
+
))}
|
|
258
|
+
{mainAssets?.styles.map((style) => (
|
|
259
|
+
<Style key={style.source} asset={style} baseUrl={url} />
|
|
260
|
+
))}
|
|
261
|
+
{preloadAssets?.styles.map((style) => (
|
|
262
|
+
<StylePreload key={style.source} asset={style} baseUrl={url} />
|
|
263
|
+
))}
|
|
264
|
+
{preloadAssets?.scripts.map((script) => (
|
|
265
|
+
<ScriptPreload key={script.source} asset={script} baseUrl={url} />
|
|
266
|
+
))}
|
|
267
|
+
</head>
|
|
268
|
+
<body {...bodyAttributes}>
|
|
269
|
+
<div
|
|
270
|
+
id="app"
|
|
271
|
+
dangerouslySetInnerHTML={{__html: markup ?? ''}}
|
|
272
|
+
></div>
|
|
273
|
+
</body>
|
|
274
|
+
</html>,
|
|
275
|
+
);
|
|
292
276
|
|
|
293
|
-
const html = prettify ? await
|
|
277
|
+
const html = prettify ? await prettifyHTML(minifiedHTML) : minifiedHTML;
|
|
294
278
|
|
|
295
279
|
return {
|
|
296
280
|
html,
|
|
@@ -300,7 +284,7 @@ export async function renderStatic(
|
|
|
300
284
|
}
|
|
301
285
|
}
|
|
302
286
|
|
|
303
|
-
async function
|
|
287
|
+
async function prettifyHTML(html: string) {
|
|
304
288
|
try {
|
|
305
289
|
const {default: prettier} = await import('prettier');
|
|
306
290
|
return prettier.format(html, {parser: 'html'});
|
package/source/static/render.tsx
CHANGED
|
@@ -2,7 +2,7 @@ import type {ReactElement} from 'react';
|
|
|
2
2
|
|
|
3
3
|
import {extract} from '@quilted/react-server-render/server';
|
|
4
4
|
import type {Options as ExtractOptions} from '@quilted/react-server-render/server';
|
|
5
|
-
import {
|
|
5
|
+
import {HTMLManager} from '@quilted/react-html/server';
|
|
6
6
|
import {HttpManager} from '@quilted/react-http/server';
|
|
7
7
|
import {AssetsManager} from '@quilted/react-assets/server';
|
|
8
8
|
import type {AssetsCacheKey} from '@quilted/assets';
|
|
@@ -21,7 +21,7 @@ export async function renderApp<CacheKey = AssetsCacheKey>(
|
|
|
21
21
|
app: ReactElement<any>,
|
|
22
22
|
{decorate, url, headers, cacheKey, ...rest}: Options<CacheKey> = {},
|
|
23
23
|
) {
|
|
24
|
-
const html = new
|
|
24
|
+
const html = new HTMLManager();
|
|
25
25
|
const http = new HttpManager({headers});
|
|
26
26
|
const assets = new AssetsManager<CacheKey>({cacheKey});
|
|
27
27
|
|
package/source/testing.ts
CHANGED
|
@@ -1,30 +1 @@
|
|
|
1
1
|
export * from '@quilted/testing';
|
|
2
|
-
export {
|
|
3
|
-
render,
|
|
4
|
-
createRender,
|
|
5
|
-
rendered,
|
|
6
|
-
destroyAll,
|
|
7
|
-
} from '@quilted/react-testing';
|
|
8
|
-
export type {
|
|
9
|
-
CustomRender,
|
|
10
|
-
CustomRenderResult,
|
|
11
|
-
CustomRenderOptions,
|
|
12
|
-
CustomRenderExtendOptions,
|
|
13
|
-
HookRunner,
|
|
14
|
-
Environment,
|
|
15
|
-
EnvironmentOptions,
|
|
16
|
-
ContextOption,
|
|
17
|
-
RenderOption,
|
|
18
|
-
ActionsOption,
|
|
19
|
-
Node,
|
|
20
|
-
NodeApi,
|
|
21
|
-
Root,
|
|
22
|
-
RootApi,
|
|
23
|
-
DebugOptions,
|
|
24
|
-
EmptyObject,
|
|
25
|
-
PlainObject,
|
|
26
|
-
Predicate,
|
|
27
|
-
} from '@quilted/react-testing';
|
|
28
|
-
export {TestRouting, createTestRouter} from '@quilted/react-router/testing';
|
|
29
|
-
|
|
30
|
-
export {QuiltAppTesting} from './TestApp.tsx';
|
package/build/cjs/App.cjs
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var reactHttp = require('@quilted/react-http');
|
|
4
|
-
var reactHtml = require('@quilted/react-html');
|
|
5
|
-
var reactRouter = require('@quilted/react-router');
|
|
6
|
-
var reactPerformance = require('@quilted/react-performance');
|
|
7
|
-
var reactLocalize = require('@quilted/react-localize');
|
|
8
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
9
|
-
|
|
10
|
-
// TODO: have craft options to remove the bundle impact of parts of this that are
|
|
11
|
-
// unused.
|
|
12
|
-
function QuiltApp({
|
|
13
|
-
http = true,
|
|
14
|
-
html = true,
|
|
15
|
-
routes,
|
|
16
|
-
routing = true,
|
|
17
|
-
localization = true,
|
|
18
|
-
children,
|
|
19
|
-
performance = true
|
|
20
|
-
}) {
|
|
21
|
-
const htmlContent = typeof html === 'boolean' ? html ? /*#__PURE__*/jsxRuntime.jsx(HtmlUpdater, {}) : null : /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
22
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(HtmlUpdater, {}), html]
|
|
23
|
-
});
|
|
24
|
-
const httpContent = typeof http === 'boolean' ? null : http;
|
|
25
|
-
const content = /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
26
|
-
children: [httpContent, htmlContent, children]
|
|
27
|
-
});
|
|
28
|
-
const withMaybeRouting = typeof routing === 'boolean' ? routing ? /*#__PURE__*/jsxRuntime.jsx(reactRouter.Routing, {
|
|
29
|
-
routes: routes,
|
|
30
|
-
children: content
|
|
31
|
-
}) : content : 'navigate' in routing ? /*#__PURE__*/jsxRuntime.jsx(reactRouter.Routing, {
|
|
32
|
-
routes: routes,
|
|
33
|
-
router: routing,
|
|
34
|
-
children: content
|
|
35
|
-
}) : /*#__PURE__*/jsxRuntime.jsx(reactRouter.Routing, {
|
|
36
|
-
routes: routes,
|
|
37
|
-
...routing,
|
|
38
|
-
children: content
|
|
39
|
-
});
|
|
40
|
-
const withMaybePerformance = typeof performance === 'boolean' ? performance ? /*#__PURE__*/jsxRuntime.jsx(reactPerformance.PerformanceContext, {
|
|
41
|
-
children: withMaybeRouting
|
|
42
|
-
}) : withMaybeRouting : /*#__PURE__*/jsxRuntime.jsx(reactPerformance.PerformanceContext, {
|
|
43
|
-
performance: performance,
|
|
44
|
-
children: withMaybeRouting
|
|
45
|
-
});
|
|
46
|
-
const withMaybeHttp = typeof http === 'boolean' ? http ? /*#__PURE__*/jsxRuntime.jsx(reactHttp.HttpContext, {
|
|
47
|
-
children: /*#__PURE__*/jsxRuntime.jsx(reactHttp.CookieContext, {
|
|
48
|
-
children: withMaybePerformance
|
|
49
|
-
})
|
|
50
|
-
}) : withMaybePerformance : /*#__PURE__*/jsxRuntime.jsx(reactHttp.HttpContext, {
|
|
51
|
-
children: /*#__PURE__*/jsxRuntime.jsx(reactHttp.CookieContext, {
|
|
52
|
-
children: withMaybePerformance
|
|
53
|
-
})
|
|
54
|
-
});
|
|
55
|
-
const withMaybeLocalization = typeof localization === 'boolean' ? localization ? /*#__PURE__*/jsxRuntime.jsx(reactLocalize.Localization, {
|
|
56
|
-
locale: "en",
|
|
57
|
-
children: withMaybeHttp
|
|
58
|
-
}) : withMaybeHttp : typeof localization === 'string' ? /*#__PURE__*/jsxRuntime.jsx(reactLocalize.Localization, {
|
|
59
|
-
locale: localization,
|
|
60
|
-
children: withMaybeHttp
|
|
61
|
-
}) : /*#__PURE__*/jsxRuntime.jsx(reactLocalize.Localization, {
|
|
62
|
-
...localization,
|
|
63
|
-
children: withMaybeHttp
|
|
64
|
-
});
|
|
65
|
-
return withMaybeLocalization;
|
|
66
|
-
}
|
|
67
|
-
function HtmlUpdater() {
|
|
68
|
-
reactHtml.useHtmlUpdater();
|
|
69
|
-
return null;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
exports.QuiltApp = QuiltApp;
|
package/build/cjs/TestApp.cjs
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var App = require('./App.cjs');
|
|
4
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
5
|
-
|
|
6
|
-
// TODO: have craft options to remove the bundle impact of parts of this that are
|
|
7
|
-
// unused.
|
|
8
|
-
function QuiltAppTesting({
|
|
9
|
-
routing = true,
|
|
10
|
-
localization = true,
|
|
11
|
-
children
|
|
12
|
-
}) {
|
|
13
|
-
return /*#__PURE__*/jsxRuntime.jsx(App.QuiltApp, {
|
|
14
|
-
routing: routing,
|
|
15
|
-
localization: localization,
|
|
16
|
-
children: children
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
exports.QuiltAppTesting = QuiltAppTesting;
|
package/build/cjs/matchers.cjs
DELETED
package/build/esm/App.mjs
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { HttpContext, CookieContext } from '@quilted/react-http';
|
|
2
|
-
import { useHtmlUpdater } from '@quilted/react-html';
|
|
3
|
-
import { Routing } from '@quilted/react-router';
|
|
4
|
-
import { PerformanceContext } from '@quilted/react-performance';
|
|
5
|
-
import { Localization } from '@quilted/react-localize';
|
|
6
|
-
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
7
|
-
|
|
8
|
-
// TODO: have craft options to remove the bundle impact of parts of this that are
|
|
9
|
-
// unused.
|
|
10
|
-
function QuiltApp({
|
|
11
|
-
http = true,
|
|
12
|
-
html = true,
|
|
13
|
-
routes,
|
|
14
|
-
routing = true,
|
|
15
|
-
localization = true,
|
|
16
|
-
children,
|
|
17
|
-
performance = true
|
|
18
|
-
}) {
|
|
19
|
-
const htmlContent = typeof html === 'boolean' ? html ? /*#__PURE__*/jsx(HtmlUpdater, {}) : null : /*#__PURE__*/jsxs(Fragment, {
|
|
20
|
-
children: [/*#__PURE__*/jsx(HtmlUpdater, {}), html]
|
|
21
|
-
});
|
|
22
|
-
const httpContent = typeof http === 'boolean' ? null : http;
|
|
23
|
-
const content = /*#__PURE__*/jsxs(Fragment, {
|
|
24
|
-
children: [httpContent, htmlContent, children]
|
|
25
|
-
});
|
|
26
|
-
const withMaybeRouting = typeof routing === 'boolean' ? routing ? /*#__PURE__*/jsx(Routing, {
|
|
27
|
-
routes: routes,
|
|
28
|
-
children: content
|
|
29
|
-
}) : content : 'navigate' in routing ? /*#__PURE__*/jsx(Routing, {
|
|
30
|
-
routes: routes,
|
|
31
|
-
router: routing,
|
|
32
|
-
children: content
|
|
33
|
-
}) : /*#__PURE__*/jsx(Routing, {
|
|
34
|
-
routes: routes,
|
|
35
|
-
...routing,
|
|
36
|
-
children: content
|
|
37
|
-
});
|
|
38
|
-
const withMaybePerformance = typeof performance === 'boolean' ? performance ? /*#__PURE__*/jsx(PerformanceContext, {
|
|
39
|
-
children: withMaybeRouting
|
|
40
|
-
}) : withMaybeRouting : /*#__PURE__*/jsx(PerformanceContext, {
|
|
41
|
-
performance: performance,
|
|
42
|
-
children: withMaybeRouting
|
|
43
|
-
});
|
|
44
|
-
const withMaybeHttp = typeof http === 'boolean' ? http ? /*#__PURE__*/jsx(HttpContext, {
|
|
45
|
-
children: /*#__PURE__*/jsx(CookieContext, {
|
|
46
|
-
children: withMaybePerformance
|
|
47
|
-
})
|
|
48
|
-
}) : withMaybePerformance : /*#__PURE__*/jsx(HttpContext, {
|
|
49
|
-
children: /*#__PURE__*/jsx(CookieContext, {
|
|
50
|
-
children: withMaybePerformance
|
|
51
|
-
})
|
|
52
|
-
});
|
|
53
|
-
const withMaybeLocalization = typeof localization === 'boolean' ? localization ? /*#__PURE__*/jsx(Localization, {
|
|
54
|
-
locale: "en",
|
|
55
|
-
children: withMaybeHttp
|
|
56
|
-
}) : withMaybeHttp : typeof localization === 'string' ? /*#__PURE__*/jsx(Localization, {
|
|
57
|
-
locale: localization,
|
|
58
|
-
children: withMaybeHttp
|
|
59
|
-
}) : /*#__PURE__*/jsx(Localization, {
|
|
60
|
-
...localization,
|
|
61
|
-
children: withMaybeHttp
|
|
62
|
-
});
|
|
63
|
-
return withMaybeLocalization;
|
|
64
|
-
}
|
|
65
|
-
function HtmlUpdater() {
|
|
66
|
-
useHtmlUpdater();
|
|
67
|
-
return null;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
export { QuiltApp };
|
package/build/esm/TestApp.mjs
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { QuiltApp } from './App.mjs';
|
|
2
|
-
import { jsx } from 'react/jsx-runtime';
|
|
3
|
-
|
|
4
|
-
// TODO: have craft options to remove the bundle impact of parts of this that are
|
|
5
|
-
// unused.
|
|
6
|
-
function QuiltAppTesting({
|
|
7
|
-
routing = true,
|
|
8
|
-
localization = true,
|
|
9
|
-
children
|
|
10
|
-
}) {
|
|
11
|
-
return /*#__PURE__*/jsx(QuiltApp, {
|
|
12
|
-
routing: routing,
|
|
13
|
-
localization: localization,
|
|
14
|
-
children: children
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export { QuiltAppTesting };
|
package/build/esm/matchers.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import '@quilted/react-testing/matchers';
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export { SERVER_ACTION_ID as HTML_SERVER_ACTION_ID, Html, HtmlContext, HtmlManager, Serialize, renderHtmlToString } from '@quilted/react-html/server';
|
|
2
|
-
export { ServerAction, ServerRenderManager, ServerRenderManagerContext, extract, useServerAction } from '@quilted/react-server-render/server';
|
|
3
|
-
export { createBrowserAssetsEntryFromManifest, createBrowserAssetsFromManifests, scriptAssetAttributes, scriptAssetPreloadAttributes, styleAssetAttributes, styleAssetPreloadAttributes } from '@quilted/assets';
|
|
4
|
-
export { SERVER_ACTION_ID as ASSETS_SERVER_ACTION_ID, AssetsContext, AssetsManager, useAssetsCacheKey, useModuleAssets } from '@quilted/react-assets/server';
|
|
5
|
-
export { createRequestRouterLocalization } from '@quilted/react-localize/request-router';
|
|
6
|
-
export { EnhancedRequest, EnhancedResponse, Request, Response, createHeaders, createRequestRouter } from '@quilted/request-router';
|
|
7
|
-
export { parseAcceptLanguageHeader } from '@quilted/react-localize';
|
|
8
|
-
export { ServerContext } from './ServerContext.mjs';
|
|
9
|
-
export { createServerRender, renderAppToResponse, renderAppToStreamedResponse } from './request-router.mjs';
|
|
10
|
-
export { createAssetPreloader } from './preload.mjs';
|
package/build/esnext/App.esnext
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { HttpContext, CookieContext } from '@quilted/react-http';
|
|
2
|
-
import { useHtmlUpdater } from '@quilted/react-html';
|
|
3
|
-
import { Routing } from '@quilted/react-router';
|
|
4
|
-
import { PerformanceContext } from '@quilted/react-performance';
|
|
5
|
-
import { Localization } from '@quilted/react-localize';
|
|
6
|
-
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
7
|
-
|
|
8
|
-
// TODO: have craft options to remove the bundle impact of parts of this that are
|
|
9
|
-
// unused.
|
|
10
|
-
function QuiltApp({
|
|
11
|
-
http = true,
|
|
12
|
-
html = true,
|
|
13
|
-
routes,
|
|
14
|
-
routing = true,
|
|
15
|
-
localization = true,
|
|
16
|
-
children,
|
|
17
|
-
performance = true
|
|
18
|
-
}) {
|
|
19
|
-
const htmlContent = typeof html === 'boolean' ? html ? /*#__PURE__*/jsx(HtmlUpdater, {}) : null : /*#__PURE__*/jsxs(Fragment, {
|
|
20
|
-
children: [/*#__PURE__*/jsx(HtmlUpdater, {}), html]
|
|
21
|
-
});
|
|
22
|
-
const httpContent = typeof http === 'boolean' ? null : http;
|
|
23
|
-
const content = /*#__PURE__*/jsxs(Fragment, {
|
|
24
|
-
children: [httpContent, htmlContent, children]
|
|
25
|
-
});
|
|
26
|
-
const withMaybeRouting = typeof routing === 'boolean' ? routing ? /*#__PURE__*/jsx(Routing, {
|
|
27
|
-
routes: routes,
|
|
28
|
-
children: content
|
|
29
|
-
}) : content : 'navigate' in routing ? /*#__PURE__*/jsx(Routing, {
|
|
30
|
-
routes: routes,
|
|
31
|
-
router: routing,
|
|
32
|
-
children: content
|
|
33
|
-
}) : /*#__PURE__*/jsx(Routing, {
|
|
34
|
-
routes: routes,
|
|
35
|
-
...routing,
|
|
36
|
-
children: content
|
|
37
|
-
});
|
|
38
|
-
const withMaybePerformance = typeof performance === 'boolean' ? performance ? /*#__PURE__*/jsx(PerformanceContext, {
|
|
39
|
-
children: withMaybeRouting
|
|
40
|
-
}) : withMaybeRouting : /*#__PURE__*/jsx(PerformanceContext, {
|
|
41
|
-
performance: performance,
|
|
42
|
-
children: withMaybeRouting
|
|
43
|
-
});
|
|
44
|
-
const withMaybeHttp = typeof http === 'boolean' ? http ? /*#__PURE__*/jsx(HttpContext, {
|
|
45
|
-
children: /*#__PURE__*/jsx(CookieContext, {
|
|
46
|
-
children: withMaybePerformance
|
|
47
|
-
})
|
|
48
|
-
}) : withMaybePerformance : /*#__PURE__*/jsx(HttpContext, {
|
|
49
|
-
children: /*#__PURE__*/jsx(CookieContext, {
|
|
50
|
-
children: withMaybePerformance
|
|
51
|
-
})
|
|
52
|
-
});
|
|
53
|
-
const withMaybeLocalization = typeof localization === 'boolean' ? localization ? /*#__PURE__*/jsx(Localization, {
|
|
54
|
-
locale: "en",
|
|
55
|
-
children: withMaybeHttp
|
|
56
|
-
}) : withMaybeHttp : typeof localization === 'string' ? /*#__PURE__*/jsx(Localization, {
|
|
57
|
-
locale: localization,
|
|
58
|
-
children: withMaybeHttp
|
|
59
|
-
}) : /*#__PURE__*/jsx(Localization, {
|
|
60
|
-
...localization,
|
|
61
|
-
children: withMaybeHttp
|
|
62
|
-
});
|
|
63
|
-
return withMaybeLocalization;
|
|
64
|
-
}
|
|
65
|
-
function HtmlUpdater() {
|
|
66
|
-
useHtmlUpdater();
|
|
67
|
-
return null;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
export { QuiltApp };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { QuiltApp } from './App.esnext';
|
|
2
|
-
import { jsx } from 'react/jsx-runtime';
|
|
3
|
-
|
|
4
|
-
// TODO: have craft options to remove the bundle impact of parts of this that are
|
|
5
|
-
// unused.
|
|
6
|
-
function QuiltAppTesting({
|
|
7
|
-
routing = true,
|
|
8
|
-
localization = true,
|
|
9
|
-
children
|
|
10
|
-
}) {
|
|
11
|
-
return /*#__PURE__*/jsx(QuiltApp, {
|
|
12
|
-
routing: routing,
|
|
13
|
-
localization: localization,
|
|
14
|
-
children: children
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export { QuiltAppTesting };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import '@quilted/react-testing/matchers';
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export { SERVER_ACTION_ID as HTML_SERVER_ACTION_ID, Html, HtmlContext, HtmlManager, Serialize, renderHtmlToString } from '@quilted/react-html/server';
|
|
2
|
-
export { ServerAction, ServerRenderManager, ServerRenderManagerContext, extract, useServerAction } from '@quilted/react-server-render/server';
|
|
3
|
-
export { createBrowserAssetsEntryFromManifest, createBrowserAssetsFromManifests, scriptAssetAttributes, scriptAssetPreloadAttributes, styleAssetAttributes, styleAssetPreloadAttributes } from '@quilted/assets';
|
|
4
|
-
export { SERVER_ACTION_ID as ASSETS_SERVER_ACTION_ID, AssetsContext, AssetsManager, useAssetsCacheKey, useModuleAssets } from '@quilted/react-assets/server';
|
|
5
|
-
export { createRequestRouterLocalization } from '@quilted/react-localize/request-router';
|
|
6
|
-
export { EnhancedRequest, EnhancedResponse, Request, Response, createHeaders, createRequestRouter } from '@quilted/request-router';
|
|
7
|
-
export { parseAcceptLanguageHeader } from '@quilted/react-localize';
|
|
8
|
-
export { ServerContext } from './ServerContext.esnext';
|
|
9
|
-
export { createServerRender, renderAppToResponse, renderAppToStreamedResponse } from './request-router.esnext';
|
|
10
|
-
export { createAssetPreloader } from './preload.esnext';
|