@quilted/quilt 0.5.63 → 0.5.66

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 CHANGED
@@ -1,5 +1,27 @@
1
1
  # @quilted/quilt
2
2
 
3
+ ## 0.5.66
4
+
5
+ ### Patch Changes
6
+
7
+ - [`fb10e01`](https://github.com/lemonmade/quilt/commit/fb10e0181c26b6faedaea6f7fc5d88d7ccccc3d1) Thanks [@lemonmade](https://github.com/lemonmade)! - Add web crypto polyfill
8
+
9
+ * [`33c1a59`](https://github.com/lemonmade/quilt/commit/33c1a59c89fd9aeae81cb6072b4100d706268985) Thanks [@lemonmade](https://github.com/lemonmade)! - Add ability to nest http handlers
10
+
11
+ ## 0.5.65
12
+
13
+ ### Patch Changes
14
+
15
+ - [`c58ca94`](https://github.com/lemonmade/quilt/commit/c58ca9468f24c1cc193d67f56692e07e71e918ab) Thanks [@lemonmade](https://github.com/lemonmade)! - Add `Serialize` component
16
+
17
+ * [`f75a035`](https://github.com/lemonmade/quilt/commit/f75a035e5a6ec857497f28da9f0f0ba2d5d6112a) Thanks [@lemonmade](https://github.com/lemonmade)! - Add props customization to Quilt server handler
18
+
19
+ ## 0.5.64
20
+
21
+ ### Patch Changes
22
+
23
+ - [#190](https://github.com/lemonmade/quilt/pull/190) [`9bf454a`](https://github.com/lemonmade/quilt/commit/9bf454aaefc7ac6b85060fc5493b6b3ee4e2b526) Thanks [@lemonmade](https://github.com/lemonmade)! - Add easy environment variables
24
+
3
25
  ## 0.5.63
4
26
 
5
27
  ### Patch Changes
@@ -0,0 +1,2 @@
1
+ 'use strict';
2
+
@@ -38,6 +38,10 @@ Object.defineProperty(exports, 'SearchRobots', {
38
38
  enumerable: true,
39
39
  get: function () { return reactHtml.SearchRobots; }
40
40
  });
41
+ Object.defineProperty(exports, 'Serialize', {
42
+ enumerable: true,
43
+ get: function () { return reactHtml.Serialize; }
44
+ });
41
45
  Object.defineProperty(exports, 'ThemeColor', {
42
46
  enumerable: true,
43
47
  get: function () { return reactHtml.ThemeColor; }
@@ -8,7 +8,8 @@ var render = require('./render.cjs');
8
8
  var jsxRuntime = require('react/jsx-runtime');
9
9
 
10
10
  function createServerRenderingRequestHandler(App, {
11
- assets
11
+ assets,
12
+ renderProps = () => ({})
12
13
  }) {
13
14
  return async request => {
14
15
  const accepts = request.headers.get('Accept');
@@ -18,7 +19,10 @@ function createServerRenderingRequestHandler(App, {
18
19
  http,
19
20
  markup,
20
21
  asyncAssets
21
- } = await render.renderApp( /*#__PURE__*/jsxRuntime.jsx(App, {}), {
22
+ } = await render.renderApp( /*#__PURE__*/jsxRuntime.jsx(App, { ...renderProps?.({
23
+ request
24
+ })
25
+ }), {
22
26
  url: request.url,
23
27
  headers: request.headers
24
28
  });
@@ -66,13 +70,12 @@ function createServerRenderingRequestHandler(App, {
66
70
  }
67
71
  function createServerRenderingHttpHandler(App, {
68
72
  assets,
69
- before,
70
- handler = httpHandlers.createHttpHandler({
71
- before
72
- })
73
+ renderProps,
74
+ handler = httpHandlers.createHttpHandler()
73
75
  }) {
74
76
  handler.get(createServerRenderingRequestHandler(App, {
75
- assets
77
+ assets,
78
+ renderProps
76
79
  }));
77
80
  return handler;
78
81
  }
@@ -148,8 +148,7 @@ async function renderStatic(App, {
148
148
  fallback: false
149
149
  });
150
150
  }
151
- } // console.log({routeId, match, addFallbacks, children, routes, ownRoute});
152
-
151
+ }
153
152
 
154
153
  if (hasChildren) {
155
154
  for (const {
@@ -0,0 +1 @@
1
+
@@ -1 +1 @@
1
- export { Alternate, BodyAttributes, Favicon, HtmlAttributes, Hydrator, Link, Meta, SearchRobots, ThemeColor, Title, Viewport, getSerialized, useAlternateUrl, useBodyAttributes, useFavicon, useHtmlAttributes, useHtmlUpdater, useLink, useLocale, useMeta, useSearchRobots, useSerialized, useThemeColor, useTitle, useViewport } from '@quilted/react-html';
1
+ export { Alternate, BodyAttributes, Favicon, HtmlAttributes, Hydrator, Link, Meta, SearchRobots, Serialize, ThemeColor, Title, Viewport, getSerialized, useAlternateUrl, useBodyAttributes, useFavicon, useHtmlAttributes, useHtmlUpdater, useLink, useLocale, useMeta, useSearchRobots, useSerialized, useThemeColor, useTitle, useViewport } from '@quilted/react-html';
@@ -4,7 +4,8 @@ import { renderApp } from './render.mjs';
4
4
  import { jsx } from 'react/jsx-runtime';
5
5
 
6
6
  function createServerRenderingRequestHandler(App, {
7
- assets
7
+ assets,
8
+ renderProps = () => ({})
8
9
  }) {
9
10
  return async request => {
10
11
  const accepts = request.headers.get('Accept');
@@ -14,7 +15,10 @@ function createServerRenderingRequestHandler(App, {
14
15
  http,
15
16
  markup,
16
17
  asyncAssets
17
- } = await renderApp( /*#__PURE__*/jsx(App, {}), {
18
+ } = await renderApp( /*#__PURE__*/jsx(App, { ...renderProps?.({
19
+ request
20
+ })
21
+ }), {
18
22
  url: request.url,
19
23
  headers: request.headers
20
24
  });
@@ -62,13 +66,12 @@ function createServerRenderingRequestHandler(App, {
62
66
  }
63
67
  function createServerRenderingHttpHandler(App, {
64
68
  assets,
65
- before,
66
- handler = createHttpHandler({
67
- before
68
- })
69
+ renderProps,
70
+ handler = createHttpHandler()
69
71
  }) {
70
72
  handler.get(createServerRenderingRequestHandler(App, {
71
- assets
73
+ assets,
74
+ renderProps
72
75
  }));
73
76
  return handler;
74
77
  }
@@ -126,8 +126,7 @@ async function renderStatic(App, {
126
126
  fallback: false
127
127
  });
128
128
  }
129
- } // console.log({routeId, match, addFallbacks, children, routes, ownRoute});
130
-
129
+ }
131
130
 
132
131
  if (hasChildren) {
133
132
  for (const {
@@ -0,0 +1 @@
1
+
@@ -1 +1 @@
1
- export { Alternate, BodyAttributes, Favicon, HtmlAttributes, Hydrator, Link, Meta, SearchRobots, ThemeColor, Title, Viewport, getSerialized, useAlternateUrl, useBodyAttributes, useFavicon, useHtmlAttributes, useHtmlUpdater, useLink, useLocale, useMeta, useSearchRobots, useSerialized, useThemeColor, useTitle, useViewport } from '@quilted/react-html';
1
+ export { Alternate, BodyAttributes, Favicon, HtmlAttributes, Hydrator, Link, Meta, SearchRobots, Serialize, ThemeColor, Title, Viewport, getSerialized, useAlternateUrl, useBodyAttributes, useFavicon, useHtmlAttributes, useHtmlUpdater, useLink, useLocale, useMeta, useSearchRobots, useSerialized, useThemeColor, useTitle, useViewport } from '@quilted/react-html';
@@ -4,7 +4,8 @@ import { renderApp } from './render.esnext';
4
4
  import { jsx } from 'react/jsx-runtime';
5
5
 
6
6
  function createServerRenderingRequestHandler(App, {
7
- assets
7
+ assets,
8
+ renderProps = () => ({})
8
9
  }) {
9
10
  return async request => {
10
11
  const accepts = request.headers.get('Accept');
@@ -14,7 +15,10 @@ function createServerRenderingRequestHandler(App, {
14
15
  http,
15
16
  markup,
16
17
  asyncAssets
17
- } = await renderApp( /*#__PURE__*/jsx(App, {}), {
18
+ } = await renderApp( /*#__PURE__*/jsx(App, { ...renderProps?.({
19
+ request
20
+ })
21
+ }), {
18
22
  url: request.url,
19
23
  headers: request.headers
20
24
  });
@@ -62,13 +66,12 @@ function createServerRenderingRequestHandler(App, {
62
66
  }
63
67
  function createServerRenderingHttpHandler(App, {
64
68
  assets,
65
- before,
66
- handler = createHttpHandler({
67
- before
68
- })
69
+ renderProps,
70
+ handler = createHttpHandler()
69
71
  }) {
70
72
  handler.get(createServerRenderingRequestHandler(App, {
71
- assets
73
+ assets,
74
+ renderProps
72
75
  }));
73
76
  return handler;
74
77
  }
@@ -126,8 +126,7 @@ async function renderStatic(App, {
126
126
  fallback: false
127
127
  });
128
128
  }
129
- } // console.log({routeId, match, addFallbacks, children, routes, ownRoute});
130
-
129
+ }
131
130
 
132
131
  if (hasChildren) {
133
132
  for (const {