@quilted/quilt 0.0.0-Simpler-Quilt-app-context-component-20220421223224
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 +189 -0
- package/build/cjs/AppContext.cjs +22 -0
- package/build/cjs/email.cjs +32 -0
- package/build/cjs/env.cjs +7 -0
- package/build/cjs/global.cjs +5 -0
- package/build/cjs/html.cjs +112 -0
- package/build/cjs/http-handlers/index.cjs +14 -0
- package/build/cjs/http-handlers/node.cjs +14 -0
- package/build/cjs/http.cjs +108 -0
- package/build/cjs/index.cjs +187 -0
- package/build/cjs/matchers.cjs +5 -0
- package/build/cjs/polyfills/base.cjs +4 -0
- package/build/cjs/polyfills/crypto.cjs +4 -0
- package/build/cjs/polyfills/fetch.cjs +4 -0
- package/build/cjs/polyfills/noop.cjs +4 -0
- package/build/cjs/react/index.cjs +22 -0
- package/build/cjs/react/jsx-runtime.cjs +14 -0
- package/build/cjs/react/server.cjs +14 -0
- package/build/cjs/react/test-utils.cjs +14 -0
- package/build/cjs/server/ServerContext.cjs +22 -0
- package/build/cjs/server/http-handler.cjs +87 -0
- package/build/cjs/server/index.cjs +89 -0
- package/build/cjs/server/render.cjs +46 -0
- package/build/cjs/static/StaticContext.cjs +22 -0
- package/build/cjs/static/index.cjs +306 -0
- package/build/cjs/static/render.cjs +46 -0
- package/build/cjs/testing.cjs +42 -0
- package/build/cjs/utilities/react.cjs +14 -0
- package/build/cjs/workers/index.cjs +14 -0
- package/build/cjs/workers/worker.cjs +14 -0
- package/build/esm/AppContext.mjs +18 -0
- package/build/esm/email.mjs +1 -0
- package/build/esm/env.mjs +3 -0
- package/build/esm/global.mjs +3 -0
- package/build/esm/html.mjs +1 -0
- package/build/esm/http-handlers/index.mjs +1 -0
- package/build/esm/http-handlers/node.mjs +1 -0
- package/build/esm/http.mjs +1 -0
- package/build/esm/index.mjs +11 -0
- package/build/esm/matchers.mjs +2 -0
- package/build/esm/polyfills/base.mjs +1 -0
- package/build/esm/polyfills/crypto.mjs +1 -0
- package/build/esm/polyfills/fetch.mjs +1 -0
- package/build/esm/polyfills/noop.mjs +1 -0
- package/build/esm/react/index.mjs +2 -0
- package/build/esm/react/jsx-runtime.mjs +1 -0
- package/build/esm/react/server.mjs +1 -0
- package/build/esm/react/test-utils.mjs +1 -0
- package/build/esm/server/ServerContext.mjs +18 -0
- package/build/esm/server/http-handler.mjs +81 -0
- package/build/esm/server/index.mjs +9 -0
- package/build/esm/server/render.mjs +42 -0
- package/build/esm/static/StaticContext.mjs +18 -0
- package/build/esm/static/index.mjs +284 -0
- package/build/esm/static/render.mjs +42 -0
- package/build/esm/testing.mjs +3 -0
- package/build/esm/utilities/react.mjs +10 -0
- package/build/esm/workers/index.mjs +1 -0
- package/build/esm/workers/worker.mjs +1 -0
- package/build/esnext/AppContext.esnext +18 -0
- package/build/esnext/email.esnext +1 -0
- package/build/esnext/env.esnext +3 -0
- package/build/esnext/global.esnext +3 -0
- package/build/esnext/html.esnext +1 -0
- package/build/esnext/http-handlers/index.esnext +1 -0
- package/build/esnext/http-handlers/node.esnext +1 -0
- package/build/esnext/http.esnext +1 -0
- package/build/esnext/index.esnext +11 -0
- package/build/esnext/matchers.esnext +2 -0
- package/build/esnext/polyfills/base.esnext +1 -0
- package/build/esnext/polyfills/crypto.esnext +1 -0
- package/build/esnext/polyfills/fetch.esnext +1 -0
- package/build/esnext/polyfills/noop.esnext +1 -0
- package/build/esnext/react/index.esnext +2 -0
- package/build/esnext/react/jsx-runtime.esnext +1 -0
- package/build/esnext/react/server.esnext +1 -0
- package/build/esnext/react/test-utils.esnext +1 -0
- package/build/esnext/server/ServerContext.esnext +18 -0
- package/build/esnext/server/http-handler.esnext +81 -0
- package/build/esnext/server/index.esnext +9 -0
- package/build/esnext/server/render.esnext +40 -0
- package/build/esnext/static/StaticContext.esnext +18 -0
- package/build/esnext/static/index.esnext +280 -0
- package/build/esnext/static/render.esnext +40 -0
- package/build/esnext/testing.esnext +3 -0
- package/build/esnext/utilities/react.esnext +10 -0
- package/build/esnext/workers/index.esnext +1 -0
- package/build/esnext/workers/worker.esnext +1 -0
- package/build/tsconfig.tsbuildinfo +1 -0
- package/build/typescript/App.d.ts +15 -0
- package/build/typescript/App.d.ts.map +1 -0
- package/build/typescript/AppContext.d.ts +8 -0
- package/build/typescript/AppContext.d.ts.map +1 -0
- package/build/typescript/email.d.ts +3 -0
- package/build/typescript/email.d.ts.map +1 -0
- package/build/typescript/env.d.ts +5 -0
- package/build/typescript/env.d.ts.map +1 -0
- package/build/typescript/global.d.ts +2 -0
- package/build/typescript/global.d.ts.map +1 -0
- package/build/typescript/html.d.ts +3 -0
- package/build/typescript/html.d.ts.map +1 -0
- package/build/typescript/http-handlers/index.d.ts +2 -0
- package/build/typescript/http-handlers/index.d.ts.map +1 -0
- package/build/typescript/http-handlers/node.d.ts +2 -0
- package/build/typescript/http-handlers/node.d.ts.map +1 -0
- package/build/typescript/http.d.ts +2 -0
- package/build/typescript/http.d.ts.map +1 -0
- package/build/typescript/index.d.ts +21 -0
- package/build/typescript/index.d.ts.map +1 -0
- package/build/typescript/magic/app.d.ts +4 -0
- package/build/typescript/magic/app.d.ts.map +1 -0
- package/build/typescript/magic/asset-loader.d.ts +6 -0
- package/build/typescript/magic/asset-loader.d.ts.map +1 -0
- package/build/typescript/magic/http-handler.d.ts +4 -0
- package/build/typescript/magic/http-handler.d.ts.map +1 -0
- package/build/typescript/matchers.d.ts +3 -0
- package/build/typescript/matchers.d.ts.map +1 -0
- package/build/typescript/polyfills/base.d.ts +2 -0
- package/build/typescript/polyfills/base.d.ts.map +1 -0
- package/build/typescript/polyfills/crypto.d.ts +2 -0
- package/build/typescript/polyfills/crypto.d.ts.map +1 -0
- package/build/typescript/polyfills/fetch.d.ts +2 -0
- package/build/typescript/polyfills/fetch.d.ts.map +1 -0
- package/build/typescript/polyfills/noop.d.ts +2 -0
- package/build/typescript/polyfills/noop.d.ts.map +1 -0
- package/build/typescript/react/index.d.ts +3 -0
- package/build/typescript/react/index.d.ts.map +1 -0
- package/build/typescript/react/jsx-runtime.d.ts +2 -0
- package/build/typescript/react/jsx-runtime.d.ts.map +1 -0
- package/build/typescript/react/server.d.ts +2 -0
- package/build/typescript/react/server.d.ts.map +1 -0
- package/build/typescript/react/test-utils.d.ts +2 -0
- package/build/typescript/react/test-utils.d.ts.map +1 -0
- package/build/typescript/server/ServerContext.d.ts +13 -0
- package/build/typescript/server/ServerContext.d.ts.map +1 -0
- package/build/typescript/server/http-handler.d.ts +15 -0
- package/build/typescript/server/http-handler.d.ts.map +1 -0
- package/build/typescript/server/index.d.ts +13 -0
- package/build/typescript/server/index.d.ts.map +1 -0
- package/build/typescript/server/render.d.ts +17 -0
- package/build/typescript/server/render.d.ts.map +1 -0
- package/build/typescript/static/StaticContext.d.ts +13 -0
- package/build/typescript/static/StaticContext.d.ts.map +1 -0
- package/build/typescript/static/index.d.ts +22 -0
- package/build/typescript/static/index.d.ts.map +1 -0
- package/build/typescript/static/render.d.ts +17 -0
- package/build/typescript/static/render.d.ts.map +1 -0
- package/build/typescript/testing.d.ts +4 -0
- package/build/typescript/testing.d.ts.map +1 -0
- package/build/typescript/utilities/react.d.ts +3 -0
- package/build/typescript/utilities/react.d.ts.map +1 -0
- package/build/typescript/workers/index.d.ts +2 -0
- package/build/typescript/workers/index.d.ts.map +1 -0
- package/build/typescript/workers/worker.d.ts +2 -0
- package/build/typescript/workers/worker.d.ts.map +1 -0
- package/package.json +282 -0
- package/quilt.project.ts +48 -0
- package/source/AppContext.tsx +21 -0
- package/source/email.ts +9 -0
- package/source/env.ts +5 -0
- package/source/global.ts +3 -0
- package/source/html.ts +29 -0
- package/source/http-handlers/index.ts +1 -0
- package/source/http-handlers/node.ts +1 -0
- package/source/http.ts +27 -0
- package/source/index.ts +103 -0
- package/source/magic/app.ts +5 -0
- package/source/magic/asset-loader.ts +5 -0
- package/source/magic/http-handler.ts +5 -0
- package/source/matchers.ts +2 -0
- package/source/polyfills/README.md +3 -0
- package/source/polyfills/base.ts +1 -0
- package/source/polyfills/crypto.ts +1 -0
- package/source/polyfills/fetch.ts +1 -0
- package/source/polyfills/noop.ts +1 -0
- package/source/react/index.ts +4 -0
- package/source/react/jsx-runtime.ts +2 -0
- package/source/react/server.ts +2 -0
- package/source/react/test-utils.ts +2 -0
- package/source/server/ServerContext.tsx +42 -0
- package/source/server/http-handler.tsx +101 -0
- package/source/server/index.ts +45 -0
- package/source/server/render.tsx +43 -0
- package/source/static/StaticContext.tsx +42 -0
- package/source/static/index.tsx +307 -0
- package/source/static/render.tsx +43 -0
- package/source/testing.ts +7 -0
- package/source/utilities/react.tsx +13 -0
- package/source/workers/index.ts +1 -0
- package/source/workers/worker.ts +1 -0
- package/tsconfig.json +30 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http-handler.d.ts","sourceRoot":"","sources":["../../../source/server/http-handler.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,aAAa,EAAE,YAAY,EAAC,MAAM,OAAO,CAAC;AAEvD,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,uBAAuB,CAAC;AAEvD,OAAO,KAAK,EAAC,OAAO,IAAI,cAAc,EAAC,MAAM,qCAAqC,CAAC;AAGnF,OAAO,KAAK,EACV,OAAO,EACP,WAAW,EACX,cAAc,EACf,MAAM,wBAAwB,CAAC;AAIhC,MAAM,WAAW,OAAO,CAAC,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAE,SAAQ,cAAc;IAC5E,MAAM,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAC9B,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,WAAW,CAAC,CAAC,OAAO,EAAE;QAAC,OAAO,EAAE,OAAO,CAAA;KAAC,GAAG,KAAK,CAAC;CAClD;AAED,wBAAgB,gCAAgC,CAAC,KAAK,EACpD,GAAG,EAAE,aAAa,CAAC,KAAK,CAAC,EACzB,EAAC,OAA6B,EAAE,GAAG,OAAO,EAAC,EAAE,OAAO,CAAC,KAAK,CAAC,eAI5D;AAED,wBAAgB,mCAAmC,CAAC,KAAK,EACvD,GAAG,EAAE,aAAa,CAAC,KAAK,CAAC,EACzB,EAAC,WAAW,EAAE,GAAG,OAAO,EAAC,GAAE,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,SAAS,CAAM,GAC9D,cAAc,CAQhB;AAED,wBAAsB,gBAAgB,CAAC,KAAK,EAC1C,OAAO,EAAE,YAAY,CAAC,KAAK,CAAC,EAC5B,OAAO,EAAE,OAAO,EAChB,EAAC,MAAM,EAAE,GAAG,OAAO,EAAC,GAAE,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,SAAS,GAAG,aAAa,CAAM,kEAuD3E"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export { render, Html, Serialize, HtmlManager, HtmlContext, SERVER_ACTION_ID as HTML_SERVER_ACTION_ID, } from '@quilted/react-html/server';
|
|
2
|
+
export { ServerAction, useServerAction, ServerRenderManager, ServerRenderContext, extract, } from '@quilted/react-server-render/server';
|
|
3
|
+
export { createAssetLoader } from '@quilted/async/server';
|
|
4
|
+
export type { Asset, AssetLoader, AssetSelector, AssetManifest, AssetManifestEntry, } from '@quilted/async/server';
|
|
5
|
+
export { AsyncAssetContext, AsyncAssetManager, SERVER_ACTION_ID as ASYNC_ASSETS_SERVER_ACTION_ID, } from '@quilted/react-async/server';
|
|
6
|
+
export type { ServerActionKind, ServerActionOptions, ServerActionPerform, ServerRenderPass, } from '@quilted/react-server-render/server';
|
|
7
|
+
export { renderEmail } from '@quilted/react-email/server';
|
|
8
|
+
export type { HttpState } from '@quilted/react-http/server';
|
|
9
|
+
export { createHttpHandler } from '@quilted/http-handlers';
|
|
10
|
+
export { renderApp } from './render';
|
|
11
|
+
export { ServerContext } from './ServerContext';
|
|
12
|
+
export { createServerRenderingRequestHandler, createServerRenderingHttpHandler, renderToResponse, } from './http-handler';
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../source/server/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EACN,IAAI,EACJ,SAAS,EACT,WAAW,EACX,WAAW,EACX,gBAAgB,IAAI,qBAAqB,GAC1C,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,YAAY,EACZ,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,OAAO,GACR,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAC,iBAAiB,EAAC,MAAM,uBAAuB,CAAC;AACxD,YAAY,EACV,KAAK,EACL,WAAW,EACX,aAAa,EACb,aAAa,EACb,kBAAkB,GACnB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,IAAI,6BAA6B,GAClD,MAAM,6BAA6B,CAAC;AACrC,YAAY,EACV,gBAAgB,EAChB,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,GACjB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAC,WAAW,EAAC,MAAM,6BAA6B,CAAC;AACxD,YAAY,EAAC,SAAS,EAAC,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAC,iBAAiB,EAAC,MAAM,wBAAwB,CAAC;AAEzD,OAAO,EAAC,SAAS,EAAC,MAAM,UAAU,CAAC;AACnC,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EACL,mCAAmC,EACnC,gCAAgC,EAChC,gBAAgB,GACjB,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import type { Options as ExtractOptions } from '@quilted/react-server-render/server';
|
|
3
|
+
import { HtmlManager } from '@quilted/react-html/server';
|
|
4
|
+
import { HttpManager } from '@quilted/react-http/server';
|
|
5
|
+
import { AsyncAssetManager } from '@quilted/react-async/server';
|
|
6
|
+
interface Options extends ExtractOptions {
|
|
7
|
+
url?: string | URL;
|
|
8
|
+
headers?: NonNullable<ConstructorParameters<typeof HttpManager>[0]>['headers'];
|
|
9
|
+
}
|
|
10
|
+
export declare function renderApp(app: ReactElement<any>, { decorate, url, headers, ...rest }?: Options): Promise<{
|
|
11
|
+
markup: string;
|
|
12
|
+
http: HttpManager;
|
|
13
|
+
html: HtmlManager;
|
|
14
|
+
asyncAssets: AsyncAssetManager;
|
|
15
|
+
}>;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=render.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../../source/server/render.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,OAAO,CAAC;AAGxC,OAAO,KAAK,EAAC,OAAO,IAAI,cAAc,EAAC,MAAM,qCAAqC,CAAC;AACnF,OAAO,EAAC,WAAW,EAAC,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAC,WAAW,EAAC,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAC,iBAAiB,EAAC,MAAM,6BAA6B,CAAC;AAI9D,UAAU,OAAQ,SAAQ,cAAc;IACtC,GAAG,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC;IACnB,OAAO,CAAC,EAAE,WAAW,CACnB,qBAAqB,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,CAAC,CAC7C,CAAC,SAAS,CAAC,CAAC;CACd;AAED,wBAAsB,SAAS,CAC7B,GAAG,EAAE,YAAY,CAAC,GAAG,CAAC,EACtB,EAAC,QAAQ,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,IAAI,EAAC,GAAE,OAAY;;;;;GAuBhD"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { PropsWithChildren } from 'react';
|
|
2
|
+
import type { HtmlManager } from '@quilted/react-html/server';
|
|
3
|
+
import type { AsyncAssetManager } from '@quilted/react-async/server';
|
|
4
|
+
import type { HttpManager } from '@quilted/react-http/server';
|
|
5
|
+
interface Props {
|
|
6
|
+
url?: string | URL;
|
|
7
|
+
html?: HtmlManager;
|
|
8
|
+
http?: HttpManager;
|
|
9
|
+
asyncAssets?: AsyncAssetManager;
|
|
10
|
+
}
|
|
11
|
+
export declare function StaticContext({ url, html, http, asyncAssets, children, }: PropsWithChildren<Props>): import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=StaticContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StaticContext.d.ts","sourceRoot":"","sources":["../../../source/static/StaticContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,OAAO,CAAC;AAI7C,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,4BAA4B,CAAC;AAE5D,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,6BAA6B,CAAC;AAEnE,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,4BAA4B,CAAC;AAI5D,UAAU,KAAK;IACb,GAAG,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC;IACnB,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,WAAW,CAAC,EAAE,iBAAiB,CAAC;CACjC;AAED,wBAAgB,aAAa,CAAC,EAC5B,GAAG,EACH,IAAI,EACJ,IAAI,EACJ,WAAW,EACX,QAAQ,GACT,EAAE,iBAAiB,CAAC,KAAK,CAAC,0FAgB1B"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ComponentType } from 'react';
|
|
2
|
+
import type { AssetLoader } from '@quilted/async/server';
|
|
3
|
+
import type { HttpState } from '@quilted/react-http/server';
|
|
4
|
+
export interface RenderDetails {
|
|
5
|
+
readonly route: string;
|
|
6
|
+
readonly hasChildren: boolean;
|
|
7
|
+
readonly fallback: boolean;
|
|
8
|
+
readonly content: string;
|
|
9
|
+
readonly http: HttpState;
|
|
10
|
+
}
|
|
11
|
+
export interface Options {
|
|
12
|
+
routes: string[];
|
|
13
|
+
assets: AssetLoader<{
|
|
14
|
+
modules: boolean;
|
|
15
|
+
}>;
|
|
16
|
+
crawl?: boolean;
|
|
17
|
+
baseUrl?: string;
|
|
18
|
+
prettify?: boolean;
|
|
19
|
+
onRender(details: RenderDetails): void | Promise<void>;
|
|
20
|
+
}
|
|
21
|
+
export declare function renderStatic(App: ComponentType<any>, { assets, routes: startingRoutes, onRender, crawl, baseUrl, prettify, }: Options): Promise<void>;
|
|
22
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../source/static/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,OAAO,CAAC;AAEzC,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,uBAAuB,CAAC;AAOvD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,4BAA4B,CAAC;AAI1D,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;CAC1B;AAOD,MAAM,WAAW,OAAO;IACtB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,MAAM,EAAE,WAAW,CAAC;QAAC,OAAO,EAAE,OAAO,CAAA;KAAC,CAAC,CAAC;IACxC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACxD;AAID,wBAAsB,YAAY,CAChC,GAAG,EAAE,aAAa,CAAC,GAAG,CAAC,EACvB,EACE,MAAM,EACN,MAAM,EAAE,cAAc,EACtB,QAAQ,EACR,KAAY,EACZ,OAAkB,EAClB,QAAe,GAChB,EAAE,OAAO,iBAsOX"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import type { Options as ExtractOptions } from '@quilted/react-server-render/server';
|
|
3
|
+
import { HtmlManager } from '@quilted/react-html/server';
|
|
4
|
+
import { HttpManager } from '@quilted/react-http/server';
|
|
5
|
+
import { AsyncAssetManager } from '@quilted/react-async/server';
|
|
6
|
+
interface Options extends ExtractOptions {
|
|
7
|
+
url?: string | URL;
|
|
8
|
+
headers?: NonNullable<ConstructorParameters<typeof HttpManager>[0]>['headers'];
|
|
9
|
+
}
|
|
10
|
+
export declare function renderApp(app: ReactElement<any>, { decorate, url, headers, ...rest }?: Options): Promise<{
|
|
11
|
+
markup: string;
|
|
12
|
+
http: HttpManager;
|
|
13
|
+
html: HtmlManager;
|
|
14
|
+
asyncAssets: AsyncAssetManager;
|
|
15
|
+
}>;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=render.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../../source/static/render.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,OAAO,CAAC;AAGxC,OAAO,KAAK,EAAC,OAAO,IAAI,cAAc,EAAC,MAAM,qCAAqC,CAAC;AACnF,OAAO,EAAC,WAAW,EAAC,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAC,WAAW,EAAC,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAC,iBAAiB,EAAC,MAAM,6BAA6B,CAAC;AAI9D,UAAU,OAAQ,SAAQ,cAAc;IACtC,GAAG,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC;IACnB,OAAO,CAAC,EAAE,WAAW,CACnB,qBAAqB,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,CAAC,CAC7C,CAAC,SAAS,CAAC,CAAC;CACd;AAED,wBAAsB,SAAS,CAC7B,GAAG,EAAE,YAAY,CAAC,GAAG,CAAC,EACtB,EAAC,QAAQ,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,IAAI,EAAC,GAAE,OAAY;;;;;GAuBhD"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { mount, unmountAll, createMount } from '@quilted/react-testing';
|
|
2
|
+
export { TestRouter, createTestRouter } from '@quilted/react-router/testing';
|
|
3
|
+
export { TestGraphQL, createFiller, createTestGraphQL, } from '@quilted/react-graphql/testing';
|
|
4
|
+
//# sourceMappingURL=testing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../../source/testing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAE,UAAU,EAAE,WAAW,EAAC,MAAM,wBAAwB,CAAC;AACtE,OAAO,EAAC,UAAU,EAAE,gBAAgB,EAAC,MAAM,+BAA+B,CAAC;AAC3E,OAAO,EACL,WAAW,EACX,YAAY,EACZ,iBAAiB,GAClB,MAAM,gCAAgC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../../../source/utilities/react.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,OAAO,IAAI,YAAY,EAAE,SAAS,EAAE,YAAY,EAAC,MAAM,OAAO,CAAC;AAE5E,wBAAgB,gBAAgB,CAAC,CAAC,EAChC,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC,EACxB,KAAK,EAAE,CAAC,GAAG,IAAI,GAAG,SAAS,EAC3B,QAAQ,EAAE,SAAS,GAClB,YAAY,CAMd"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../source/workers/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"worker.d.ts","sourceRoot":"","sources":["../../../source/workers/worker.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@quilted/quilt",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "0.0.0-Simpler-Quilt-app-context-component-20220421223224",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/lemonmade/quilt.git",
|
|
8
|
+
"directory": "packages/quilt"
|
|
9
|
+
},
|
|
10
|
+
"publishConfig": {
|
|
11
|
+
"access": "public",
|
|
12
|
+
"@quilted:registry": "https://registry.npmjs.org"
|
|
13
|
+
},
|
|
14
|
+
"license": "MIT",
|
|
15
|
+
"exports": {
|
|
16
|
+
".": {
|
|
17
|
+
"quilt:from-source": "./source/index.ts",
|
|
18
|
+
"quilt:esnext": "./build/esnext/index.esnext",
|
|
19
|
+
"import": "./build/esm/index.mjs",
|
|
20
|
+
"require": "./build/cjs/index.cjs"
|
|
21
|
+
},
|
|
22
|
+
"./server": {
|
|
23
|
+
"quilt:from-source": "./source/server/index.ts",
|
|
24
|
+
"quilt:esnext": "./build/esnext/server/index.esnext",
|
|
25
|
+
"import": "./build/esm/server/index.mjs",
|
|
26
|
+
"require": "./build/cjs/server/index.cjs"
|
|
27
|
+
},
|
|
28
|
+
"./static": {
|
|
29
|
+
"quilt:from-source": "./source/static/index.tsx",
|
|
30
|
+
"quilt:esnext": "./build/esnext/static/index.esnext",
|
|
31
|
+
"import": "./build/esm/static/index.mjs",
|
|
32
|
+
"require": "./build/cjs/static/index.cjs"
|
|
33
|
+
},
|
|
34
|
+
"./html": {
|
|
35
|
+
"quilt:from-source": "./source/html.ts",
|
|
36
|
+
"quilt:esnext": "./build/esnext/html.esnext",
|
|
37
|
+
"import": "./build/esm/html.mjs",
|
|
38
|
+
"require": "./build/cjs/html.cjs"
|
|
39
|
+
},
|
|
40
|
+
"./email": {
|
|
41
|
+
"quilt:from-source": "./source/email.ts",
|
|
42
|
+
"quilt:esnext": "./build/esnext/email.esnext",
|
|
43
|
+
"import": "./build/esm/email.mjs",
|
|
44
|
+
"require": "./build/cjs/email.cjs"
|
|
45
|
+
},
|
|
46
|
+
"./global": {
|
|
47
|
+
"quilt:from-source": "./source/global.ts",
|
|
48
|
+
"quilt:esnext": "./build/esnext/global.esnext",
|
|
49
|
+
"import": "./build/esm/global.mjs",
|
|
50
|
+
"require": "./build/cjs/global.cjs"
|
|
51
|
+
},
|
|
52
|
+
"./http": {
|
|
53
|
+
"quilt:from-source": "./source/http.ts",
|
|
54
|
+
"quilt:esnext": "./build/esnext/http.esnext",
|
|
55
|
+
"import": "./build/esm/http.mjs",
|
|
56
|
+
"require": "./build/cjs/http.cjs"
|
|
57
|
+
},
|
|
58
|
+
"./testing": {
|
|
59
|
+
"quilt:from-source": "./source/testing.ts",
|
|
60
|
+
"quilt:esnext": "./build/esnext/testing.esnext",
|
|
61
|
+
"import": "./build/esm/testing.mjs",
|
|
62
|
+
"require": "./build/cjs/testing.cjs"
|
|
63
|
+
},
|
|
64
|
+
"./env": {
|
|
65
|
+
"quilt:from-source": "./source/env.ts",
|
|
66
|
+
"quilt:esnext": "./build/esnext/env.esnext",
|
|
67
|
+
"import": "./build/esm/env.mjs",
|
|
68
|
+
"require": "./build/cjs/env.cjs"
|
|
69
|
+
},
|
|
70
|
+
"./matchers": {
|
|
71
|
+
"quilt:from-source": "./source/matchers.ts",
|
|
72
|
+
"quilt:esnext": "./build/esnext/matchers.esnext",
|
|
73
|
+
"import": "./build/esm/matchers.mjs",
|
|
74
|
+
"require": "./build/cjs/matchers.cjs"
|
|
75
|
+
},
|
|
76
|
+
"./react/jsx-runtime": {
|
|
77
|
+
"quilt:from-source": "./source/react/jsx-runtime.ts",
|
|
78
|
+
"quilt:esnext": "./build/esnext/react/jsx-runtime.esnext",
|
|
79
|
+
"import": "./build/esm/react/jsx-runtime.mjs",
|
|
80
|
+
"require": "./build/cjs/react/jsx-runtime.cjs"
|
|
81
|
+
},
|
|
82
|
+
"./react/server": {
|
|
83
|
+
"quilt:from-source": "./source/react/server.ts",
|
|
84
|
+
"quilt:esnext": "./build/esnext/react/server.esnext",
|
|
85
|
+
"import": "./build/esm/react/server.mjs",
|
|
86
|
+
"require": "./build/cjs/react/server.cjs"
|
|
87
|
+
},
|
|
88
|
+
"./react/test-utils": {
|
|
89
|
+
"quilt:from-source": "./source/react/test-utils.ts",
|
|
90
|
+
"quilt:esnext": "./build/esnext/react/test-utils.esnext",
|
|
91
|
+
"import": "./build/esm/react/test-utils.mjs",
|
|
92
|
+
"require": "./build/cjs/react/test-utils.cjs"
|
|
93
|
+
},
|
|
94
|
+
"./react": {
|
|
95
|
+
"quilt:from-source": "./source/react/index.ts",
|
|
96
|
+
"quilt:esnext": "./build/esnext/react/index.esnext",
|
|
97
|
+
"import": "./build/esm/react/index.mjs",
|
|
98
|
+
"require": "./build/cjs/react/index.cjs"
|
|
99
|
+
},
|
|
100
|
+
"./http-handlers/node": {
|
|
101
|
+
"quilt:from-source": "./source/http-handlers/node.ts",
|
|
102
|
+
"quilt:esnext": "./build/esnext/http-handlers/node.esnext",
|
|
103
|
+
"import": "./build/esm/http-handlers/node.mjs",
|
|
104
|
+
"require": "./build/cjs/http-handlers/node.cjs"
|
|
105
|
+
},
|
|
106
|
+
"./http-handlers": {
|
|
107
|
+
"quilt:from-source": "./source/http-handlers/index.ts",
|
|
108
|
+
"quilt:esnext": "./build/esnext/http-handlers/index.esnext",
|
|
109
|
+
"import": "./build/esm/http-handlers/index.mjs",
|
|
110
|
+
"require": "./build/cjs/http-handlers/index.cjs"
|
|
111
|
+
},
|
|
112
|
+
"./workers/worker": {
|
|
113
|
+
"quilt:from-source": "./source/workers/worker.ts",
|
|
114
|
+
"quilt:esnext": "./build/esnext/workers/worker.esnext",
|
|
115
|
+
"import": "./build/esm/workers/worker.mjs",
|
|
116
|
+
"require": "./build/cjs/workers/worker.cjs"
|
|
117
|
+
},
|
|
118
|
+
"./workers": {
|
|
119
|
+
"quilt:from-source": "./source/workers/index.ts",
|
|
120
|
+
"quilt:esnext": "./build/esnext/workers/index.esnext",
|
|
121
|
+
"import": "./build/esm/workers/index.mjs",
|
|
122
|
+
"require": "./build/cjs/workers/index.cjs"
|
|
123
|
+
},
|
|
124
|
+
"./polyfills/base": {
|
|
125
|
+
"quilt:from-source": "./source/polyfills/base.ts",
|
|
126
|
+
"quilt:esnext": "./build/esnext/polyfills/base.esnext",
|
|
127
|
+
"import": "./build/esm/polyfills/base.mjs",
|
|
128
|
+
"require": "./build/cjs/polyfills/base.cjs"
|
|
129
|
+
},
|
|
130
|
+
"./polyfills/crypto": {
|
|
131
|
+
"quilt:from-source": "./source/polyfills/crypto.ts",
|
|
132
|
+
"quilt:esnext": "./build/esnext/polyfills/crypto.esnext",
|
|
133
|
+
"import": "./build/esm/polyfills/crypto.mjs",
|
|
134
|
+
"require": "./build/cjs/polyfills/crypto.cjs"
|
|
135
|
+
},
|
|
136
|
+
"./polyfills/fetch": {
|
|
137
|
+
"quilt:from-source": "./source/polyfills/fetch.ts",
|
|
138
|
+
"quilt:esnext": "./build/esnext/polyfills/fetch.esnext",
|
|
139
|
+
"import": "./build/esm/polyfills/fetch.mjs",
|
|
140
|
+
"require": "./build/cjs/polyfills/fetch.cjs"
|
|
141
|
+
},
|
|
142
|
+
"./polyfills/noop": {
|
|
143
|
+
"quilt:from-source": "./source/polyfills/noop.ts",
|
|
144
|
+
"quilt:esnext": "./build/esnext/polyfills/noop.esnext",
|
|
145
|
+
"import": "./build/esm/polyfills/noop.mjs",
|
|
146
|
+
"require": "./build/cjs/polyfills/noop.cjs"
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
"types": "./build/typescript/index.d.ts",
|
|
150
|
+
"typesVersions": {
|
|
151
|
+
"*": {
|
|
152
|
+
"server": [
|
|
153
|
+
"./build/typescript/server/index.d.ts"
|
|
154
|
+
],
|
|
155
|
+
"static": [
|
|
156
|
+
"./build/typescript/static/index.d.ts"
|
|
157
|
+
],
|
|
158
|
+
"html": [
|
|
159
|
+
"./build/typescript/html.d.ts"
|
|
160
|
+
],
|
|
161
|
+
"email": [
|
|
162
|
+
"./build/typescript/email.d.ts"
|
|
163
|
+
],
|
|
164
|
+
"global": [
|
|
165
|
+
"./build/typescript/global.d.ts"
|
|
166
|
+
],
|
|
167
|
+
"env": [
|
|
168
|
+
"./build/typescript/env.d.ts"
|
|
169
|
+
],
|
|
170
|
+
"http": [
|
|
171
|
+
"./build/typescript/http.d.ts"
|
|
172
|
+
],
|
|
173
|
+
"testing": [
|
|
174
|
+
"./build/typescript/testing.d.ts"
|
|
175
|
+
],
|
|
176
|
+
"matchers": [
|
|
177
|
+
"./build/typescript/matchers.d.ts"
|
|
178
|
+
],
|
|
179
|
+
"react/jsx-runtime": [
|
|
180
|
+
"./build/typescript/react/jsx-runtime.d.ts"
|
|
181
|
+
],
|
|
182
|
+
"react/server": [
|
|
183
|
+
"./build/typescript/react/server.d.ts"
|
|
184
|
+
],
|
|
185
|
+
"react/test-utils": [
|
|
186
|
+
"./build/typescript/react/test-utils.d.ts"
|
|
187
|
+
],
|
|
188
|
+
"react": [
|
|
189
|
+
"./build/typescript/react/index.d.ts"
|
|
190
|
+
],
|
|
191
|
+
"workers": [
|
|
192
|
+
"./build/typescript/workers/index.d.ts"
|
|
193
|
+
],
|
|
194
|
+
"workers/worker": [
|
|
195
|
+
"./build/typescript/workers/worker.d.ts"
|
|
196
|
+
],
|
|
197
|
+
"http-handlers/node": [
|
|
198
|
+
"./build/typescript/http-handlers/node.d.ts"
|
|
199
|
+
],
|
|
200
|
+
"http-handlers": [
|
|
201
|
+
"./build/typescript/http-handlers/index.d.ts"
|
|
202
|
+
],
|
|
203
|
+
"polyfills/base": [
|
|
204
|
+
"./build/typescript/polyfills/base.d.ts"
|
|
205
|
+
],
|
|
206
|
+
"polyfills/fetch": [
|
|
207
|
+
"./build/typescript/polyfills/fetch.d.ts"
|
|
208
|
+
],
|
|
209
|
+
"polyfills/crypto": [
|
|
210
|
+
"./build/typescript/polyfills/crypto.d.ts"
|
|
211
|
+
],
|
|
212
|
+
"polyfills/noop": [
|
|
213
|
+
"./build/typescript/polyfills/noop.d.ts"
|
|
214
|
+
],
|
|
215
|
+
"magic/app": [
|
|
216
|
+
"./build/typescript/magic/app.d.ts"
|
|
217
|
+
],
|
|
218
|
+
"magic/asset-loader": [
|
|
219
|
+
"./build/typescript/magic/asset-loader.d.ts"
|
|
220
|
+
],
|
|
221
|
+
"magic/http-handler": [
|
|
222
|
+
"./build/typescript/magic/http-handler.d.ts"
|
|
223
|
+
]
|
|
224
|
+
}
|
|
225
|
+
},
|
|
226
|
+
"sideEffects": [
|
|
227
|
+
"./build/esnext/global.esnext",
|
|
228
|
+
"./build/esm/global.mjs",
|
|
229
|
+
"./build/esnext/polyfills/*.esnext",
|
|
230
|
+
"./build/esm/polyfills/*.mjs"
|
|
231
|
+
],
|
|
232
|
+
"dependencies": {
|
|
233
|
+
"@babel/runtime": ">=7.0.0 <8.0.0",
|
|
234
|
+
"@quilted/async": "^0.3.12",
|
|
235
|
+
"@quilted/graphql": "^0.4.14",
|
|
236
|
+
"@quilted/http-handlers": "^0.2.20",
|
|
237
|
+
"@quilted/polyfills": "^0.2.12",
|
|
238
|
+
"@quilted/react": "^0.1.0",
|
|
239
|
+
"@quilted/react-async": "^0.3.22",
|
|
240
|
+
"@quilted/react-email": "^0.2.18",
|
|
241
|
+
"@quilted/react-graphql": "^0.0.0-Simpler-Quilt-app-context-component-20220421223224",
|
|
242
|
+
"@quilted/react-html": "^0.3.18",
|
|
243
|
+
"@quilted/react-http": "^0.0.0-Simpler-Quilt-app-context-component-20220421223224",
|
|
244
|
+
"@quilted/react-idle": "^0.3.6",
|
|
245
|
+
"@quilted/react-localize": "^0.1.0",
|
|
246
|
+
"@quilted/react-performance": "^0.1.0",
|
|
247
|
+
"@quilted/react-router": "^0.0.0-Simpler-Quilt-app-context-component-20220421223224",
|
|
248
|
+
"@quilted/react-server-render": "^0.3.7",
|
|
249
|
+
"@quilted/react-testing": "^0.5.1",
|
|
250
|
+
"@quilted/react-workers": "^0.2.12",
|
|
251
|
+
"@quilted/useful-react-types": "^0.1.0"
|
|
252
|
+
},
|
|
253
|
+
"devDependencies": {
|
|
254
|
+
"@types/prettier": "^2.0.0"
|
|
255
|
+
},
|
|
256
|
+
"peerDependencies": {
|
|
257
|
+
"@babel/runtime": ">=7.0.0 <8.0.0",
|
|
258
|
+
"prettier": "^2.0.0",
|
|
259
|
+
"react": ">=17.0.0 <18.0.0",
|
|
260
|
+
"react-dom": ">=17.0.0 <18.0.0"
|
|
261
|
+
},
|
|
262
|
+
"peerDependenciesMeta": {
|
|
263
|
+
"@babel/runtime": {
|
|
264
|
+
"optional": true
|
|
265
|
+
},
|
|
266
|
+
"prettier": {
|
|
267
|
+
"optional": true
|
|
268
|
+
},
|
|
269
|
+
"react": {
|
|
270
|
+
"optional": true
|
|
271
|
+
},
|
|
272
|
+
"react-dom": {
|
|
273
|
+
"optional": true
|
|
274
|
+
}
|
|
275
|
+
},
|
|
276
|
+
"eslintConfig": {
|
|
277
|
+
"extends": [
|
|
278
|
+
"@quilted/eslint-config/react",
|
|
279
|
+
"@quilted/eslint-config/package"
|
|
280
|
+
]
|
|
281
|
+
}
|
|
282
|
+
}
|
package/quilt.project.ts
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import {createPackage, quiltPackage, Runtime} from '@quilted/craft';
|
|
2
|
+
|
|
3
|
+
export default createPackage((pkg) => {
|
|
4
|
+
pkg.entry({source: './source/index'});
|
|
5
|
+
pkg.entry({source: './source/http', name: 'http'});
|
|
6
|
+
pkg.entry({source: './source/html', name: 'html'});
|
|
7
|
+
pkg.entry({source: './source/email', name: 'email'});
|
|
8
|
+
pkg.entry({source: './source/global', name: 'global'});
|
|
9
|
+
pkg.entry({source: './source/env', name: 'env'});
|
|
10
|
+
pkg.entry({source: './source/react', name: 'react'});
|
|
11
|
+
pkg.entry({
|
|
12
|
+
source: './source/react/server',
|
|
13
|
+
name: 'react/server',
|
|
14
|
+
runtime: Runtime.Node,
|
|
15
|
+
});
|
|
16
|
+
pkg.entry({source: './source/react/jsx-runtime', name: 'react/jsx-runtime'});
|
|
17
|
+
pkg.entry({source: './source/react/test-utils', name: 'react/test-utils'});
|
|
18
|
+
pkg.entry({source: './source/workers', name: 'workers'});
|
|
19
|
+
pkg.entry({
|
|
20
|
+
source: './source/workers/worker',
|
|
21
|
+
name: 'workers/worker',
|
|
22
|
+
runtime: Runtime.Browser,
|
|
23
|
+
});
|
|
24
|
+
pkg.entry({source: './source/http-handlers', name: 'http-handlers'});
|
|
25
|
+
pkg.entry({
|
|
26
|
+
source: './source/http-handlers/node',
|
|
27
|
+
name: 'http-handlers/node',
|
|
28
|
+
runtime: Runtime.Node,
|
|
29
|
+
});
|
|
30
|
+
pkg.entry({source: './source/polyfills/base', name: 'polyfills/base'});
|
|
31
|
+
pkg.entry({source: './source/polyfills/fetch', name: 'polyfills/fetch'});
|
|
32
|
+
pkg.entry({source: './source/polyfills/crypto', name: 'polyfills/crypto'});
|
|
33
|
+
pkg.entry({source: './source/polyfills/noop', name: 'polyfills/noop'});
|
|
34
|
+
pkg.entry({source: './source/server', name: 'server', runtime: Runtime.Node});
|
|
35
|
+
pkg.entry({source: './source/static', name: 'static', runtime: Runtime.Node});
|
|
36
|
+
pkg.entry({
|
|
37
|
+
source: './source/testing',
|
|
38
|
+
name: 'testing',
|
|
39
|
+
runtime: Runtime.Node,
|
|
40
|
+
});
|
|
41
|
+
pkg.entry({
|
|
42
|
+
source: './source/matchers',
|
|
43
|
+
name: 'matchers',
|
|
44
|
+
runtime: Runtime.Node,
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
pkg.use(quiltPackage({react: true}));
|
|
48
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type {PropsWithChildren} from 'react';
|
|
2
|
+
|
|
3
|
+
import {HttpContext, CookieContext} from '@quilted/react-http';
|
|
4
|
+
import {useHtmlUpdater} from '@quilted/react-html';
|
|
5
|
+
import type {Performance} from '@quilted/react-performance';
|
|
6
|
+
|
|
7
|
+
interface Props {
|
|
8
|
+
performance?: Performance;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
// TODO: have craft options to remove the bundle impact of parts of this that are
|
|
12
|
+
// unused.
|
|
13
|
+
export function AppContext({children}: PropsWithChildren<Props>) {
|
|
14
|
+
useHtmlUpdater();
|
|
15
|
+
|
|
16
|
+
return (
|
|
17
|
+
<HttpContext>
|
|
18
|
+
<CookieContext>{children}</CookieContext>
|
|
19
|
+
</HttpContext>
|
|
20
|
+
);
|
|
21
|
+
}
|
package/source/email.ts
ADDED
package/source/env.ts
ADDED
package/source/global.ts
ADDED
package/source/html.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export {
|
|
2
|
+
Alternate,
|
|
3
|
+
BodyAttributes,
|
|
4
|
+
HtmlAttributes,
|
|
5
|
+
Hydrator,
|
|
6
|
+
Link,
|
|
7
|
+
Meta,
|
|
8
|
+
SearchRobots,
|
|
9
|
+
Serialize,
|
|
10
|
+
ThemeColor,
|
|
11
|
+
Title,
|
|
12
|
+
Viewport,
|
|
13
|
+
Favicon,
|
|
14
|
+
useAlternateUrl,
|
|
15
|
+
useSerialized,
|
|
16
|
+
useBodyAttributes,
|
|
17
|
+
useHtmlAttributes,
|
|
18
|
+
useFavicon,
|
|
19
|
+
useLink,
|
|
20
|
+
useLocale,
|
|
21
|
+
useMeta,
|
|
22
|
+
useSearchRobots,
|
|
23
|
+
useThemeColor,
|
|
24
|
+
useTitle,
|
|
25
|
+
useViewport,
|
|
26
|
+
useHtmlUpdater,
|
|
27
|
+
getSerialized,
|
|
28
|
+
} from '@quilted/react-html';
|
|
29
|
+
export type {Serializable} from '@quilted/react-html';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@quilted/http-handlers';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@quilted/http-handlers/node';
|
package/source/http.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export {
|
|
2
|
+
CacheControl,
|
|
3
|
+
ContentSecurityPolicy,
|
|
4
|
+
HttpMethod,
|
|
5
|
+
ResponseType,
|
|
6
|
+
StatusCode,
|
|
7
|
+
useCacheControl,
|
|
8
|
+
useContentSecurityPolicy,
|
|
9
|
+
usePermissionsPolicy,
|
|
10
|
+
useRequestHeader,
|
|
11
|
+
useResponseCookie,
|
|
12
|
+
useDeleteResponseCookie,
|
|
13
|
+
useResponseHeader,
|
|
14
|
+
useResponseRedirect,
|
|
15
|
+
useResponseStatus,
|
|
16
|
+
useStrictTransportSecurity,
|
|
17
|
+
HttpContext,
|
|
18
|
+
NotFound,
|
|
19
|
+
PermissionsPolicy,
|
|
20
|
+
ResponseCookie,
|
|
21
|
+
ResponseHeader,
|
|
22
|
+
ResponseStatus,
|
|
23
|
+
StrictTransportSecurity,
|
|
24
|
+
ContentSecurityPolicyDirective,
|
|
25
|
+
ContentSecurityPolicySandboxAllow,
|
|
26
|
+
ContentSecurityPolicySpecialSource,
|
|
27
|
+
} from '@quilted/react-http';
|