@quilted/quilt 0.5.49 → 0.5.53

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/build/cjs/App.cjs CHANGED
@@ -3,15 +3,17 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var reactRouter = require('@quilted/react-router');
6
- var reactGraphql = require('@quilted/react-graphql');
7
6
  var reactHttp = require('@quilted/react-http');
7
+ var reactGraphql = require('@quilted/react-graphql');
8
8
  var reactHtml = require('@quilted/react-html');
9
+ var reactPerformance = require('@quilted/react-performance');
9
10
  var react = require('./utilities/react.cjs');
10
11
  var jsxRuntime = require('react/jsx-runtime');
11
12
 
12
13
  function App({
13
14
  children,
14
15
  graphql,
16
+ performance,
15
17
  routerState,
16
18
  routerPrefix,
17
19
  urlIsExternal
@@ -24,7 +26,10 @@ function App({
24
26
  state: routerState,
25
27
  prefix: routerPrefix,
26
28
  isExternal: urlIsExternal,
27
- children: children
29
+ children: /*#__PURE__*/jsxRuntime.jsx(reactPerformance.PerformanceContext, {
30
+ performance: performance,
31
+ children: children
32
+ })
28
33
  }))
29
34
  });
30
35
  }
@@ -7,6 +7,7 @@ var reactAsync = require('@quilted/react-async');
7
7
  var reactGraphql = require('@quilted/react-graphql');
8
8
  var reactIdle = require('@quilted/react-idle');
9
9
  var reactServerRender = require('@quilted/react-server-render');
10
+ var reactPerformance = require('@quilted/react-performance');
10
11
  var reactRouter = require('@quilted/react-router');
11
12
  var reactWorkers = require('@quilted/react-workers');
12
13
  var reactHttp = require('@quilted/react-http');
@@ -98,6 +99,24 @@ Object.defineProperty(exports, 'useServerAction', {
98
99
  return reactServerRender.useServerAction;
99
100
  }
100
101
  });
102
+ Object.defineProperty(exports, 'PerformanceContext', {
103
+ enumerable: true,
104
+ get: function () {
105
+ return reactPerformance.PerformanceContext;
106
+ }
107
+ });
108
+ Object.defineProperty(exports, 'usePerformance', {
109
+ enumerable: true,
110
+ get: function () {
111
+ return reactPerformance.usePerformance;
112
+ }
113
+ });
114
+ Object.defineProperty(exports, 'usePerformanceNavigation', {
115
+ enumerable: true,
116
+ get: function () {
117
+ return reactPerformance.usePerformanceNavigation;
118
+ }
119
+ });
101
120
  Object.defineProperty(exports, 'Link', {
102
121
  enumerable: true,
103
122
  get: function () {
@@ -22,25 +22,15 @@ function createServerRenderingRequestHandler(App, {
22
22
  });
23
23
  const {
24
24
  headers,
25
- cookies,
26
25
  statusCode = 200,
27
26
  redirectUrl
28
27
  } = http.state;
29
28
 
30
29
  if (redirectUrl) {
31
- const response = httpHandlers.redirect(redirectUrl, {
30
+ return httpHandlers.redirect(redirectUrl, {
32
31
  status: statusCode,
33
32
  headers
34
33
  });
35
-
36
- for (const [name, {
37
- value,
38
- ...options
39
- }] of cookies.records()) {
40
- response.cookies.set(name, value, options);
41
- }
42
-
43
- return response;
44
34
  }
45
35
 
46
36
  const usedAssets = asyncAssets.used({
@@ -60,25 +50,16 @@ function createServerRenderingRequestHandler(App, {
60
50
  }), {
61
51
  options: assetOptions
62
52
  })]);
63
- const response = httpHandlers.html(server.render( /*#__PURE__*/jsxRuntime.jsx(server.Html, {
53
+ return httpHandlers.html(server.render( /*#__PURE__*/jsxRuntime.jsx(server.Html, {
64
54
  manager: htmlManager,
65
55
  styles: styles,
66
56
  scripts: scripts,
67
57
  preloadAssets: preload,
68
58
  children: markup
69
59
  })), {
70
- headers: Object.fromEntries([...headers]),
60
+ headers,
71
61
  status: statusCode
72
62
  });
73
-
74
- for (const [name, {
75
- value,
76
- ...options
77
- }] of cookies.records()) {
78
- response.cookies.set(name, value, options);
79
- }
80
-
81
- return response;
82
63
  };
83
64
  }
84
65
  function createServerRenderingHttpHandler(App, {
package/build/esm/App.mjs CHANGED
@@ -1,13 +1,15 @@
1
1
  import { useInitialUrl, Router } from '@quilted/react-router';
2
- import { GraphQLContext } from '@quilted/react-graphql';
3
2
  import { HttpContext } from '@quilted/react-http';
3
+ import { GraphQLContext } from '@quilted/react-graphql';
4
4
  import { useHtmlUpdater } from '@quilted/react-html';
5
+ import { PerformanceContext } from '@quilted/react-performance';
5
6
  import { maybeWrapContext } from './utilities/react.mjs';
6
7
  import { jsx } from 'react/jsx-runtime';
7
8
 
8
9
  function App({
9
10
  children,
10
11
  graphql,
12
+ performance,
11
13
  routerState,
12
14
  routerPrefix,
13
15
  urlIsExternal
@@ -20,7 +22,10 @@ function App({
20
22
  state: routerState,
21
23
  prefix: routerPrefix,
22
24
  isExternal: urlIsExternal,
23
- children: children
25
+ children: /*#__PURE__*/jsx(PerformanceContext, {
26
+ performance: performance,
27
+ children: children
28
+ })
24
29
  }))
25
30
  });
26
31
  }
@@ -3,6 +3,7 @@ export { createAsyncComponent, useAsync, useAsyncAsset, usePreload } from '@quil
3
3
  export { GraphQLContext, createGraphQL, createHttpFetch, useGraphQL, useMutation, useQuery } from '@quilted/react-graphql';
4
4
  export { useIdleCallback } from '@quilted/react-idle';
5
5
  export { ServerAction, useServerAction } from '@quilted/react-server-render';
6
+ export { PerformanceContext, usePerformance, usePerformanceNavigation } from '@quilted/react-performance';
6
7
  export { Link, NavigationBlock, Preloader, Redirect, Router, useCurrentUrl, useInitialUrl, useMatch, useNavigate, useNavigationBlock, useRedirect, useRouteChangeFocusRef, useRouter, useRoutes, useScrollRestoration } from '@quilted/react-router';
7
8
  export { createCallableWorker, createWorker, useWorker } from '@quilted/react-workers';
8
9
  export { useCookie, useCookies } from '@quilted/react-http';
@@ -18,25 +18,15 @@ function createServerRenderingRequestHandler(App, {
18
18
  });
19
19
  const {
20
20
  headers,
21
- cookies,
22
21
  statusCode = 200,
23
22
  redirectUrl
24
23
  } = http.state;
25
24
 
26
25
  if (redirectUrl) {
27
- const response = redirect(redirectUrl, {
26
+ return redirect(redirectUrl, {
28
27
  status: statusCode,
29
28
  headers
30
29
  });
31
-
32
- for (const [name, {
33
- value,
34
- ...options
35
- }] of cookies.records()) {
36
- response.cookies.set(name, value, options);
37
- }
38
-
39
- return response;
40
30
  }
41
31
 
42
32
  const usedAssets = asyncAssets.used({
@@ -56,25 +46,16 @@ function createServerRenderingRequestHandler(App, {
56
46
  }), {
57
47
  options: assetOptions
58
48
  })]);
59
- const response = html(render( /*#__PURE__*/jsx(Html, {
49
+ return html(render( /*#__PURE__*/jsx(Html, {
60
50
  manager: htmlManager,
61
51
  styles: styles,
62
52
  scripts: scripts,
63
53
  preloadAssets: preload,
64
54
  children: markup
65
55
  })), {
66
- headers: Object.fromEntries([...headers]),
56
+ headers,
67
57
  status: statusCode
68
58
  });
69
-
70
- for (const [name, {
71
- value,
72
- ...options
73
- }] of cookies.records()) {
74
- response.cookies.set(name, value, options);
75
- }
76
-
77
- return response;
78
59
  };
79
60
  }
80
61
  function createServerRenderingHttpHandler(App, {
@@ -1,13 +1,15 @@
1
1
  import { useInitialUrl, Router } from '@quilted/react-router';
2
- import { GraphQLContext } from '@quilted/react-graphql';
3
2
  import { HttpContext } from '@quilted/react-http';
3
+ import { GraphQLContext } from '@quilted/react-graphql';
4
4
  import { useHtmlUpdater } from '@quilted/react-html';
5
+ import { PerformanceContext } from '@quilted/react-performance';
5
6
  import { maybeWrapContext } from './utilities/react.esnext';
6
7
  import { jsx } from 'react/jsx-runtime';
7
8
 
8
9
  function App({
9
10
  children,
10
11
  graphql,
12
+ performance,
11
13
  routerState,
12
14
  routerPrefix,
13
15
  urlIsExternal
@@ -20,7 +22,10 @@ function App({
20
22
  state: routerState,
21
23
  prefix: routerPrefix,
22
24
  isExternal: urlIsExternal,
23
- children: children
25
+ children: /*#__PURE__*/jsx(PerformanceContext, {
26
+ performance: performance,
27
+ children: children
28
+ })
24
29
  }))
25
30
  });
26
31
  }
@@ -3,6 +3,7 @@ export { createAsyncComponent, useAsync, useAsyncAsset, usePreload } from '@quil
3
3
  export { GraphQLContext, createGraphQL, createHttpFetch, useGraphQL, useMutation, useQuery } from '@quilted/react-graphql';
4
4
  export { useIdleCallback } from '@quilted/react-idle';
5
5
  export { ServerAction, useServerAction } from '@quilted/react-server-render';
6
+ export { PerformanceContext, usePerformance, usePerformanceNavigation } from '@quilted/react-performance';
6
7
  export { Link, NavigationBlock, Preloader, Redirect, Router, useCurrentUrl, useInitialUrl, useMatch, useNavigate, useNavigationBlock, useRedirect, useRouteChangeFocusRef, useRouter, useRoutes, useScrollRestoration } from '@quilted/react-router';
7
8
  export { createCallableWorker, createWorker, useWorker } from '@quilted/react-workers';
8
9
  export { useCookie, useCookies } from '@quilted/react-http';
@@ -18,25 +18,15 @@ function createServerRenderingRequestHandler(App, {
18
18
  });
19
19
  const {
20
20
  headers,
21
- cookies,
22
21
  statusCode = 200,
23
22
  redirectUrl
24
23
  } = http.state;
25
24
 
26
25
  if (redirectUrl) {
27
- const response = redirect(redirectUrl, {
26
+ return redirect(redirectUrl, {
28
27
  status: statusCode,
29
28
  headers
30
29
  });
31
-
32
- for (const [name, {
33
- value,
34
- ...options
35
- }] of cookies.records()) {
36
- response.cookies.set(name, value, options);
37
- }
38
-
39
- return response;
40
30
  }
41
31
 
42
32
  const usedAssets = asyncAssets.used({
@@ -56,25 +46,16 @@ function createServerRenderingRequestHandler(App, {
56
46
  }), {
57
47
  options: assetOptions
58
48
  })]);
59
- const response = html(render( /*#__PURE__*/jsx(Html, {
49
+ return html(render( /*#__PURE__*/jsx(Html, {
60
50
  manager: htmlManager,
61
51
  styles: styles,
62
52
  scripts: scripts,
63
53
  preloadAssets: preload,
64
54
  children: markup
65
55
  })), {
66
- headers: Object.fromEntries([...headers]),
56
+ headers,
67
57
  status: statusCode
68
58
  });
69
-
70
- for (const [name, {
71
- value,
72
- ...options
73
- }] of cookies.records()) {
74
- response.cookies.set(name, value, options);
75
- }
76
-
77
- return response;
78
59
  };
79
60
  }
80
61
  function createServerRenderingHttpHandler(App, {
@@ -306,9 +306,14 @@
306
306
  "signature": "1b38963302e00e5699e1f60ef8831893061669f200d533af9a204418bf10fb85",
307
307
  "affectsGlobalScope": false
308
308
  },
309
+ "../../http/build/typescript/cookies.d.ts": {
310
+ "version": "5e11c0e864769e1fdf150a2045b2ff02bd0970879b99768ef64bbc3075216833",
311
+ "signature": "5e11c0e864769e1fdf150a2045b2ff02bd0970879b99768ef64bbc3075216833",
312
+ "affectsGlobalScope": false
313
+ },
309
314
  "../../http/build/typescript/headers.d.ts": {
310
- "version": "7db8e405e5c567db3bd80a03303d2723f876123d532462d63ce453029321ff20",
311
- "signature": "7db8e405e5c567db3bd80a03303d2723f876123d532462d63ce453029321ff20",
315
+ "version": "e767fbad42c49239078520097c0c412b70f6d0ca6f6802ba1f18d04745ef2773",
316
+ "signature": "e767fbad42c49239078520097c0c412b70f6d0ca6f6802ba1f18d04745ef2773",
312
317
  "affectsGlobalScope": false
313
318
  },
314
319
  "../../http/build/typescript/method.d.ts": {
@@ -326,11 +331,6 @@
326
331
  "signature": "4af1d9c3ef1d7c9299e58b87f441e284a2b30a433a334329b4e849e94f0d8405",
327
332
  "affectsGlobalScope": false
328
333
  },
329
- "../../http/build/typescript/cookies.d.ts": {
330
- "version": "66cc945734779a8fa587ec43160dc08fd4c7a0f695bd397ded1aa083dc010975",
331
- "signature": "66cc945734779a8fa587ec43160dc08fd4c7a0f695bd397ded1aa083dc010975",
332
- "affectsGlobalScope": false
333
- },
334
334
  "../../http/build/typescript/content-security-policy.d.ts": {
335
335
  "version": "b1bee01e36203cb9d5c35f345bfaed736defc3b1393271350b77ae131b555aef",
336
336
  "signature": "b1bee01e36203cb9d5c35f345bfaed736defc3b1393271350b77ae131b555aef",
@@ -342,8 +342,8 @@
342
342
  "affectsGlobalScope": false
343
343
  },
344
344
  "../../http/build/typescript/index.d.ts": {
345
- "version": "12219932c2331f354967d48512f9b3d8efeee1b28ea659e769602068a2e7a2ab",
346
- "signature": "12219932c2331f354967d48512f9b3d8efeee1b28ea659e769602068a2e7a2ab",
345
+ "version": "0a35b92ce5709f9d43c2d9123d6bc8db19d93340884bcee796b707fa714fa3f9",
346
+ "signature": "0a35b92ce5709f9d43c2d9123d6bc8db19d93340884bcee796b707fa714fa3f9",
347
347
  "affectsGlobalScope": false
348
348
  },
349
349
  "../../react-http/build/typescript/hooks/cookie.d.ts": {
@@ -412,8 +412,8 @@
412
412
  "affectsGlobalScope": false
413
413
  },
414
414
  "../../react-http/build/typescript/manager.d.ts": {
415
- "version": "6ae945a097d98bb2c7012d632f47ac2abfe8b5eee9f37c113b441c5f8ba17ef1",
416
- "signature": "6ae945a097d98bb2c7012d632f47ac2abfe8b5eee9f37c113b441c5f8ba17ef1",
415
+ "version": "1b361bc6486d91c96489da279f37845f250d3d168711f57e60b464f525c6609b",
416
+ "signature": "1b361bc6486d91c96489da279f37845f250d3d168711f57e60b464f525c6609b",
417
417
  "affectsGlobalScope": false
418
418
  },
419
419
  "../../react-http/build/typescript/hooks/http-action.d.ts": {
@@ -482,8 +482,8 @@
482
482
  "affectsGlobalScope": false
483
483
  },
484
484
  "../../react-http/build/typescript/index.d.ts": {
485
- "version": "11c71116b2d80fae52a63790ba473d24b75edf70b2f842a1b693c8023e7b4ccf",
486
- "signature": "11c71116b2d80fae52a63790ba473d24b75edf70b2f842a1b693c8023e7b4ccf",
485
+ "version": "35df73a42520e091513482630249e5067e888fcd75e7e7199e498d155fb0505c",
486
+ "signature": "35df73a42520e091513482630249e5067e888fcd75e7e7199e498d155fb0505c",
487
487
  "affectsGlobalScope": false
488
488
  },
489
489
  "../../react-router/build/typescript/components/Redirect/Redirect.d.ts": {
@@ -1386,14 +1386,39 @@
1386
1386
  "signature": "b399b06684a2a236942417d5a9141813176f4a0480a624ffdfb2d3613b060c8f",
1387
1387
  "affectsGlobalScope": false
1388
1388
  },
1389
+ "../../performance/build/typescript/performance.d.ts": {
1390
+ "version": "54fad834333c7a6b4ce870fa499299ac74494599325eed6a4db2be9b0925920c",
1391
+ "signature": "54fad834333c7a6b4ce870fa499299ac74494599325eed6a4db2be9b0925920c",
1392
+ "affectsGlobalScope": false
1393
+ },
1394
+ "../../performance/build/typescript/index.d.ts": {
1395
+ "version": "c8f61fd0854b226ec18f9efa87ec7f0c8843882cf193ad57e8e820a447c5ffb7",
1396
+ "signature": "c8f61fd0854b226ec18f9efa87ec7f0c8843882cf193ad57e8e820a447c5ffb7",
1397
+ "affectsGlobalScope": false
1398
+ },
1399
+ "../../react-performance/build/typescript/hooks.d.ts": {
1400
+ "version": "bc3f221e9d96b0df37273f45c147eca36d9d19922bd5f333a4a1f82959042d92",
1401
+ "signature": "bc3f221e9d96b0df37273f45c147eca36d9d19922bd5f333a4a1f82959042d92",
1402
+ "affectsGlobalScope": false
1403
+ },
1404
+ "../../react-performance/build/typescript/PerformanceContext.d.ts": {
1405
+ "version": "e63f0a1b32d47ef70e82163c80937fe40d8f66e0aa1adfb51c5ed5dc386de91d",
1406
+ "signature": "e63f0a1b32d47ef70e82163c80937fe40d8f66e0aa1adfb51c5ed5dc386de91d",
1407
+ "affectsGlobalScope": false
1408
+ },
1409
+ "../../react-performance/build/typescript/index.d.ts": {
1410
+ "version": "f0f59a7eef9e81869df039d1ab51b11077458460fd2e6aabd8da455f9f7e2765",
1411
+ "signature": "f0f59a7eef9e81869df039d1ab51b11077458460fd2e6aabd8da455f9f7e2765",
1412
+ "affectsGlobalScope": false
1413
+ },
1389
1414
  "../src/utilities/react.tsx": {
1390
1415
  "version": "97116b2ef6ebc0bf2867fc20c50decaffa31fee8868c29c5138364492c10fc78",
1391
1416
  "signature": "5130d403a2284ab721f368a2f06df2104eaf7fa31f27b35175fece4f442a4956",
1392
1417
  "affectsGlobalScope": false
1393
1418
  },
1394
1419
  "../src/App.tsx": {
1395
- "version": "7d1d738b294b3903b268cf593bc17fe266d2b6119a44fb0bcf7b89573e94c62d",
1396
- "signature": "09e66b7835fec8a31ae9ee7e9bbcf2644478fc2f0c450c2909c68729193822fd",
1420
+ "version": "08136a3616839f861dcea8352e616deb4e17cf9e35af6a1526653500de278063",
1421
+ "signature": "d39ab316200681024d289eec9f464face98107848b1109a1ac196d0f31846d33",
1397
1422
  "affectsGlobalScope": false
1398
1423
  },
1399
1424
  "../../react-email/build/typescript/types.d.ts": {
@@ -1587,8 +1612,8 @@
1587
1612
  "affectsGlobalScope": false
1588
1613
  },
1589
1614
  "../src/index.ts": {
1590
- "version": "573af2100382c60480709890f9027fd27da557567e08b19a6ac5bd170aaaf15f",
1591
- "signature": "afa906ef1a552b1692052c774f94e29a8118f177e52e69091643283d39969768",
1615
+ "version": "4e6071b1cc3da38b9043f6ca05e21d0611963a331904fa588e474091ccacf6fe",
1616
+ "signature": "512d70e3e11e66c67acdee3c40bb8e7d0387fe6e97bf5c998e8e3419bed120e1",
1592
1617
  "affectsGlobalScope": false
1593
1618
  },
1594
1619
  "../../react-testing/build/typescript/types.d.ts": {
@@ -1727,8 +1752,8 @@
1727
1752
  "affectsGlobalScope": false
1728
1753
  },
1729
1754
  "../../react-http/build/typescript/context.d.ts": {
1730
- "version": "9613f7d818989c06e84c3f6ea51b2025fb52d4fda0c8b07617d58f450dec3c2c",
1731
- "signature": "9613f7d818989c06e84c3f6ea51b2025fb52d4fda0c8b07617d58f450dec3c2c",
1755
+ "version": "2567e633ca1836fab746c827ab3671b1e36171675b194e389a578a4126d00d6e",
1756
+ "signature": "2567e633ca1836fab746c827ab3671b1e36171675b194e389a578a4126d00d6e",
1732
1757
  "affectsGlobalScope": false
1733
1758
  },
1734
1759
  "../../react-http/build/typescript/server.d.ts": {
@@ -1752,8 +1777,8 @@
1752
1777
  "affectsGlobalScope": false
1753
1778
  },
1754
1779
  "../../http-handlers/build/typescript/types.d.ts": {
1755
- "version": "009128dab53c80c931fde285e8012e510acc556de941744c409883c58790c909",
1756
- "signature": "009128dab53c80c931fde285e8012e510acc556de941744c409883c58790c909",
1780
+ "version": "f320b96e7eca82e3e9a6f3c91700d2a74266a1ddceca6754beac60899576c0cf",
1781
+ "signature": "f320b96e7eca82e3e9a6f3c91700d2a74266a1ddceca6754beac60899576c0cf",
1757
1782
  "affectsGlobalScope": false
1758
1783
  },
1759
1784
  "../../http-handlers/build/typescript/http-handler.d.ts": {
@@ -1762,8 +1787,8 @@
1762
1787
  "affectsGlobalScope": false
1763
1788
  },
1764
1789
  "../../http-handlers/build/typescript/response.d.ts": {
1765
- "version": "9b6217fb43d61db24b688c97a5b4bef406da7c6d88e4246203a151abd64b0658",
1766
- "signature": "9b6217fb43d61db24b688c97a5b4bef406da7c6d88e4246203a151abd64b0658",
1790
+ "version": "b70f0e0411b6bb7ca3d6e3d9ba165ea2adfc86004878eb021885dcbfa6378bea",
1791
+ "signature": "b70f0e0411b6bb7ca3d6e3d9ba165ea2adfc86004878eb021885dcbfa6378bea",
1767
1792
  "affectsGlobalScope": false
1768
1793
  },
1769
1794
  "../../http-handlers/build/typescript/fetch.d.ts": {
@@ -1772,8 +1797,8 @@
1772
1797
  "affectsGlobalScope": false
1773
1798
  },
1774
1799
  "../../http-handlers/build/typescript/index.d.ts": {
1775
- "version": "dfa006359e928cd6aaf2fd2a12d2895e33749352e1b2d07eb56e2abd73b896cd",
1776
- "signature": "dfa006359e928cd6aaf2fd2a12d2895e33749352e1b2d07eb56e2abd73b896cd",
1800
+ "version": "62624042a27958d450f8e296440718781b0e70ac6c437e4cf02496059be1f076",
1801
+ "signature": "62624042a27958d450f8e296440718781b0e70ac6c437e4cf02496059be1f076",
1777
1802
  "affectsGlobalScope": false
1778
1803
  },
1779
1804
  "../../react-server-render/build/typescript/manager.d.ts": {
@@ -1797,7 +1822,7 @@
1797
1822
  "affectsGlobalScope": false
1798
1823
  },
1799
1824
  "../src/server/http-handler.tsx": {
1800
- "version": "7d103f4401694f2745538cba790f33fdff07497e946a555b8e1a627762a3a1c9",
1825
+ "version": "b7139111dafaa7fcc7853b41981c821c97d6a81f4129ef298be8fc36cf57ea8c",
1801
1826
  "signature": "dc5c88d8037a2a5a5f369f71f96ccd9d8fcdcddb3a10df8b942991d478b59d41",
1802
1827
  "affectsGlobalScope": false
1803
1828
  },
@@ -2372,13 +2397,13 @@
2372
2397
  "affectsGlobalScope": false
2373
2398
  },
2374
2399
  "../../../node_modules/@types/estree/index.d.ts": {
2375
- "version": "9f3554130bc117f19a9d4186bd83a97145c71818c1b1c51424967e0f607324d5",
2376
- "signature": "9f3554130bc117f19a9d4186bd83a97145c71818c1b1c51424967e0f607324d5",
2400
+ "version": "89ccbe04e737ce613f5f04990271cfa84901446350b8551b0555ddf19319723b",
2401
+ "signature": "89ccbe04e737ce613f5f04990271cfa84901446350b8551b0555ddf19319723b",
2377
2402
  "affectsGlobalScope": false
2378
2403
  },
2379
2404
  "../../../node_modules/@types/fs-extra/index.d.ts": {
2380
- "version": "8d01c38ccb9af3a4035a68818799e5ef32ccc8cf70bdb83e181e1921d7ad32f6",
2381
- "signature": "8d01c38ccb9af3a4035a68818799e5ef32ccc8cf70bdb83e181e1921d7ad32f6",
2405
+ "version": "ed19da84b7dbf00952ad0b98ce5c194f1903bcf7c94d8103e8e0d63b271543ae",
2406
+ "signature": "ed19da84b7dbf00952ad0b98ce5c194f1903bcf7c94d8103e8e0d63b271543ae",
2382
2407
  "affectsGlobalScope": false
2383
2408
  },
2384
2409
  "../../../node_modules/@types/minimatch/index.d.ts": {
@@ -2721,6 +2746,16 @@
2721
2746
  "signature": "03d2e70c34640b553ed580286eb234835695ea1e473d837a4ced672648d453cd",
2722
2747
  "affectsGlobalScope": false
2723
2748
  },
2749
+ "../../../node_modules/@types/send/node_modules/@types/mime/index.d.ts": {
2750
+ "version": "84e3bbd6f80983d468260fdbfeeb431cc81f7ea98d284d836e4d168e36875e86",
2751
+ "signature": "84e3bbd6f80983d468260fdbfeeb431cc81f7ea98d284d836e4d168e36875e86",
2752
+ "affectsGlobalScope": false
2753
+ },
2754
+ "../../../node_modules/@types/send/index.d.ts": {
2755
+ "version": "aad5ffa61406b8e19524738fcf0e6fda8b3485bba98626268fdf252d1b2b630a",
2756
+ "signature": "aad5ffa61406b8e19524738fcf0e6fda8b3485bba98626268fdf252d1b2b630a",
2757
+ "affectsGlobalScope": false
2758
+ },
2724
2759
  "../../../node_modules/@types/stack-utils/index.d.ts": {
2725
2760
  "version": "c6c4fea9acc55d5e38ff2b70d57ab0b5cdbd08f8bc5d7a226e322cea128c5b57",
2726
2761
  "signature": "c6c4fea9acc55d5e38ff2b70d57ab0b5cdbd08f8bc5d7a226e322cea128c5b57",
@@ -2740,6 +2775,11 @@
2740
2775
  "version": "1db6491f25ced62f23f06d1f3700a790df0971726acb33669bbf4a8de2f769a9",
2741
2776
  "signature": "1db6491f25ced62f23f06d1f3700a790df0971726acb33669bbf4a8de2f769a9",
2742
2777
  "affectsGlobalScope": false
2778
+ },
2779
+ "../../../node_modules/@types/yauzl/index.d.ts": {
2780
+ "version": "b2d70a269840a9528db473ac7565442434333a05c1f66801a7a672e82beb903e",
2781
+ "signature": "b2d70a269840a9528db473ac7565442434333a05c1f66801a7a672e82beb903e",
2782
+ "affectsGlobalScope": false
2743
2783
  }
2744
2784
  },
2745
2785
  "options": {
@@ -3479,6 +3519,12 @@
3479
3519
  "../../../node_modules/@types/semver/classes/range.d.ts",
3480
3520
  "../../../node_modules/@types/semver/index.d.ts"
3481
3521
  ],
3522
+ "../../../node_modules/@types/send/index.d.ts": [
3523
+ "../../../node_modules/@types/node/fs.d.ts",
3524
+ "../../../node_modules/@types/node/index.d.ts",
3525
+ "../../../node_modules/@types/node/stream.d.ts",
3526
+ "../../../node_modules/@types/send/node_modules/@types/mime/index.d.ts"
3527
+ ],
3482
3528
  "../../../node_modules/@types/websocket/index.d.ts": [
3483
3529
  "../../../node_modules/@types/node/events.d.ts",
3484
3530
  "../../../node_modules/@types/node/http.d.ts",
@@ -3490,6 +3536,11 @@
3490
3536
  "../../../node_modules/@types/yargs/index.d.ts": [
3491
3537
  "../../../node_modules/@types/yargs-parser/index.d.ts"
3492
3538
  ],
3539
+ "../../../node_modules/@types/yauzl/index.d.ts": [
3540
+ "../../../node_modules/@types/node/events.d.ts",
3541
+ "../../../node_modules/@types/node/index.d.ts",
3542
+ "../../../node_modules/@types/node/stream.d.ts"
3543
+ ],
3493
3544
  "../../../node_modules/form-data/index.d.ts": [
3494
3545
  "../../../node_modules/@types/node/http.d.ts",
3495
3546
  "../../../node_modules/@types/node/index.d.ts",
@@ -4057,11 +4108,15 @@
4057
4108
  "../../http/build/typescript/response-type.d.ts",
4058
4109
  "../../http/build/typescript/status-code.d.ts"
4059
4110
  ],
4111
+ "../../performance/build/typescript/index.d.ts": [
4112
+ "../../performance/build/typescript/performance.d.ts"
4113
+ ],
4060
4114
  "../src/App.tsx": [
4061
4115
  "../../../node_modules/@types/react/index.d.ts",
4062
4116
  "../../react-graphql/build/typescript/index.d.ts",
4063
4117
  "../../react-html/build/typescript/index.d.ts",
4064
4118
  "../../react-http/build/typescript/index.d.ts",
4119
+ "../../react-performance/build/typescript/index.d.ts",
4065
4120
  "../../react-router/build/typescript/index.d.ts",
4066
4121
  "../src/utilities/react.tsx"
4067
4122
  ],
@@ -4083,6 +4138,7 @@
4083
4138
  "../../react-graphql/build/typescript/index.d.ts",
4084
4139
  "../../react-http/build/typescript/index.d.ts",
4085
4140
  "../../react-idle/build/typescript/index.d.ts",
4141
+ "../../react-performance/build/typescript/index.d.ts",
4086
4142
  "../../react-router/build/typescript/index.d.ts",
4087
4143
  "../../react-server-render/build/typescript/index.d.ts",
4088
4144
  "../../react-workers/build/typescript/index.d.ts",
@@ -4490,6 +4546,18 @@
4490
4546
  "../../react-idle/build/typescript/index.d.ts": [
4491
4547
  "../../react-idle/build/typescript/hooks.d.ts"
4492
4548
  ],
4549
+ "../../react-performance/build/typescript/PerformanceContext.d.ts": [
4550
+ "../../../node_modules/@types/react/index.d.ts",
4551
+ "../../performance/build/typescript/index.d.ts"
4552
+ ],
4553
+ "../../react-performance/build/typescript/hooks.d.ts": [
4554
+ "../../performance/build/typescript/index.d.ts"
4555
+ ],
4556
+ "../../react-performance/build/typescript/index.d.ts": [
4557
+ "../../performance/build/typescript/index.d.ts",
4558
+ "../../react-performance/build/typescript/PerformanceContext.d.ts",
4559
+ "../../react-performance/build/typescript/hooks.d.ts"
4560
+ ],
4493
4561
  "../../react-router/build/typescript/components/FocusContext/FocusContext.d.ts": [
4494
4562
  "../../../node_modules/@types/react/index.d.ts"
4495
4563
  ],
@@ -5415,6 +5483,12 @@
5415
5483
  "../../../node_modules/@types/semver/classes/range.d.ts",
5416
5484
  "../../../node_modules/@types/semver/index.d.ts"
5417
5485
  ],
5486
+ "../../../node_modules/@types/send/index.d.ts": [
5487
+ "../../../node_modules/@types/node/fs.d.ts",
5488
+ "../../../node_modules/@types/node/index.d.ts",
5489
+ "../../../node_modules/@types/node/stream.d.ts",
5490
+ "../../../node_modules/@types/send/node_modules/@types/mime/index.d.ts"
5491
+ ],
5418
5492
  "../../../node_modules/@types/websocket/index.d.ts": [
5419
5493
  "../../../node_modules/@types/node/events.d.ts",
5420
5494
  "../../../node_modules/@types/node/http.d.ts",
@@ -5426,6 +5500,11 @@
5426
5500
  "../../../node_modules/@types/yargs/index.d.ts": [
5427
5501
  "../../../node_modules/@types/yargs-parser/index.d.ts"
5428
5502
  ],
5503
+ "../../../node_modules/@types/yauzl/index.d.ts": [
5504
+ "../../../node_modules/@types/node/events.d.ts",
5505
+ "../../../node_modules/@types/node/index.d.ts",
5506
+ "../../../node_modules/@types/node/stream.d.ts"
5507
+ ],
5429
5508
  "../../../node_modules/form-data/index.d.ts": [
5430
5509
  "../../../node_modules/@types/node/http.d.ts",
5431
5510
  "../../../node_modules/@types/node/index.d.ts",
@@ -5993,9 +6072,13 @@
5993
6072
  "../../http/build/typescript/response-type.d.ts",
5994
6073
  "../../http/build/typescript/status-code.d.ts"
5995
6074
  ],
6075
+ "../../performance/build/typescript/index.d.ts": [
6076
+ "../../performance/build/typescript/performance.d.ts"
6077
+ ],
5996
6078
  "../src/App.tsx": [
5997
6079
  "../../../node_modules/@types/react/index.d.ts",
5998
6080
  "../../react-graphql/build/typescript/index.d.ts",
6081
+ "../../react-performance/build/typescript/index.d.ts",
5999
6082
  "../../react-router/build/typescript/index.d.ts"
6000
6083
  ],
6001
6084
  "../src/email.ts": [
@@ -6013,6 +6096,7 @@
6013
6096
  "../../react-graphql/build/typescript/index.d.ts",
6014
6097
  "../../react-http/build/typescript/index.d.ts",
6015
6098
  "../../react-idle/build/typescript/index.d.ts",
6099
+ "../../react-performance/build/typescript/index.d.ts",
6016
6100
  "../../react-router/build/typescript/index.d.ts",
6017
6101
  "../../react-server-render/build/typescript/index.d.ts",
6018
6102
  "../../react-workers/build/typescript/index.d.ts",
@@ -6407,6 +6491,18 @@
6407
6491
  "../../react-idle/build/typescript/index.d.ts": [
6408
6492
  "../../react-idle/build/typescript/hooks.d.ts"
6409
6493
  ],
6494
+ "../../react-performance/build/typescript/PerformanceContext.d.ts": [
6495
+ "../../../node_modules/@types/react/index.d.ts",
6496
+ "../../performance/build/typescript/index.d.ts"
6497
+ ],
6498
+ "../../react-performance/build/typescript/hooks.d.ts": [
6499
+ "../../performance/build/typescript/index.d.ts"
6500
+ ],
6501
+ "../../react-performance/build/typescript/index.d.ts": [
6502
+ "../../performance/build/typescript/index.d.ts",
6503
+ "../../react-performance/build/typescript/PerformanceContext.d.ts",
6504
+ "../../react-performance/build/typescript/hooks.d.ts"
6505
+ ],
6410
6506
  "../../react-router/build/typescript/components/FocusContext/FocusContext.d.ts": [
6411
6507
  "../../../node_modules/@types/react/index.d.ts"
6412
6508
  ],
@@ -6815,10 +6911,13 @@
6815
6911
  "../../../node_modules/@types/semver/ranges/subset.d.ts",
6816
6912
  "../../../node_modules/@types/semver/ranges/to-comparators.d.ts",
6817
6913
  "../../../node_modules/@types/semver/ranges/valid.d.ts",
6914
+ "../../../node_modules/@types/send/index.d.ts",
6915
+ "../../../node_modules/@types/send/node_modules/@types/mime/index.d.ts",
6818
6916
  "../../../node_modules/@types/stack-utils/index.d.ts",
6819
6917
  "../../../node_modules/@types/websocket/index.d.ts",
6820
6918
  "../../../node_modules/@types/yargs-parser/index.d.ts",
6821
6919
  "../../../node_modules/@types/yargs/index.d.ts",
6920
+ "../../../node_modules/@types/yauzl/index.d.ts",
6822
6921
  "../../../node_modules/csstype/index.d.ts",
6823
6922
  "../../../node_modules/form-data/index.d.ts",
6824
6923
  "../../../node_modules/graphql/error/GraphQLError.d.ts",
@@ -6996,6 +7095,8 @@
6996
7095
  "../../http/build/typescript/permissions-policy.d.ts",
6997
7096
  "../../http/build/typescript/response-type.d.ts",
6998
7097
  "../../http/build/typescript/status-code.d.ts",
7098
+ "../../performance/build/typescript/index.d.ts",
7099
+ "../../performance/build/typescript/performance.d.ts",
6999
7100
  "../src/App.tsx",
7000
7101
  "../src/email.ts",
7001
7102
  "../src/global.ts",
@@ -7113,6 +7214,9 @@
7113
7214
  "../../react-http/build/typescript/server.d.ts",
7114
7215
  "../../react-idle/build/typescript/hooks.d.ts",
7115
7216
  "../../react-idle/build/typescript/index.d.ts",
7217
+ "../../react-performance/build/typescript/PerformanceContext.d.ts",
7218
+ "../../react-performance/build/typescript/hooks.d.ts",
7219
+ "../../react-performance/build/typescript/index.d.ts",
7116
7220
  "../../react-router/build/typescript/components/FocusContext/FocusContext.d.ts",
7117
7221
  "../../react-router/build/typescript/components/FocusContext/index.d.ts",
7118
7222
  "../../react-router/build/typescript/components/Link/Link.d.ts",
@@ -1,13 +1,15 @@
1
1
  import type { PropsWithChildren, ComponentProps } from 'react';
2
2
  import { Router } from '@quilted/react-router';
3
3
  import type { GraphQL } from '@quilted/react-graphql';
4
+ import type { Performance } from '@quilted/react-performance';
4
5
  declare type RouterProps = ComponentProps<typeof Router>;
5
6
  interface Props {
6
7
  graphql?: GraphQL;
8
+ performance?: Performance;
7
9
  routerState?: RouterProps['state'];
8
10
  routerPrefix?: RouterProps['prefix'];
9
11
  urlIsExternal?: RouterProps['isExternal'];
10
12
  }
11
- export declare function App({ children, graphql, routerState, routerPrefix, urlIsExternal, }: PropsWithChildren<Props>): JSX.Element;
13
+ export declare function App({ children, graphql, performance, routerState, routerPrefix, urlIsExternal, }: PropsWithChildren<Props>): JSX.Element;
12
14
  export {};
13
15
  //# sourceMappingURL=App.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../../src/App.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,iBAAiB,EAAE,cAAc,EAAC,MAAM,OAAO,CAAC;AAE7D,OAAO,EAAC,MAAM,EAAgB,MAAM,uBAAuB,CAAC;AAG5D,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,wBAAwB,CAAC;AAKpD,aAAK,WAAW,GAAG,cAAc,CAAC,OAAO,MAAM,CAAC,CAAC;AAEjD,UAAU,KAAK;IACb,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IACnC,YAAY,CAAC,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC;IACrC,aAAa,CAAC,EAAE,WAAW,CAAC,YAAY,CAAC,CAAC;CAC3C;AAED,wBAAgB,GAAG,CAAC,EAClB,QAAQ,EACR,OAAO,EACP,WAAW,EACX,YAAY,EACZ,aAAa,GACd,EAAE,iBAAiB,CAAC,KAAK,CAAC,eAqB1B"}
1
+ {"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../../src/App.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,iBAAiB,EAAE,cAAc,EAAC,MAAM,OAAO,CAAC;AAE7D,OAAO,EAAC,MAAM,EAAgB,MAAM,uBAAuB,CAAC;AAG5D,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,wBAAwB,CAAC;AAGpD,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,4BAA4B,CAAC;AAI5D,aAAK,WAAW,GAAG,cAAc,CAAC,OAAO,MAAM,CAAC,CAAC;AAEjD,UAAU,KAAK;IACb,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,WAAW,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IACnC,YAAY,CAAC,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC;IACrC,aAAa,CAAC,EAAE,WAAW,CAAC,YAAY,CAAC,CAAC;CAC3C;AAED,wBAAgB,GAAG,CAAC,EAClB,QAAQ,EACR,OAAO,EACP,WAAW,EACX,WAAW,EACX,YAAY,EACZ,aAAa,GACd,EAAE,iBAAiB,CAAC,KAAK,CAAC,eAuB1B"}
@@ -5,6 +5,8 @@ export { GraphQLContext, createGraphQL, createHttpFetch, useQuery, useGraphQL, u
5
5
  export type { GraphQLData, GraphQLVariables, GraphQLRequest, GraphQLRequestContext, GraphQLOperation, GraphQLOperationType, GraphQLDeepPartialData, HttpFetchContext, HttpFetchOptions, PickGraphQLType, VariableOptions, QueryOptions, MutationOptions, IfAllVariablesOptional, } from '@quilted/react-graphql';
6
6
  export { useIdleCallback } from '@quilted/react-idle';
7
7
  export { ServerAction, useServerAction } from '@quilted/react-server-render';
8
+ export { PerformanceContext, usePerformance, usePerformanceNavigation, } from '@quilted/react-performance';
9
+ export type { Performance, PerformanceNavigation, PerformanceInflightNavigation, } from '@quilted/react-performance';
8
10
  export { Link, Redirect, Router, Preloader, NavigationBlock, useCurrentUrl, useInitialUrl, useRouter, useRoutes, useMatch, useNavigate, useRedirect, useNavigationBlock, useScrollRestoration, useRouteChangeFocusRef, } from '@quilted/react-router';
9
11
  export type { NavigateTo, RouteDefinition } from '@quilted/react-router';
10
12
  export { useWorker, createWorker, createCallableWorker, } from '@quilted/react-workers';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,iBAAiB,EAAC,MAAM,gBAAgB,CAAC;AACjD,YAAY,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAChD,OAAO,EACL,QAAQ,EACR,aAAa,EACb,UAAU,EACV,oBAAoB,GACrB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,cAAc,EACd,aAAa,EACb,eAAe,EACf,QAAQ,EACR,UAAU,EACV,WAAW,GACZ,MAAM,wBAAwB,CAAC;AAChC,YAAY,EACV,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,qBAAqB,EACrB,gBAAgB,EAChB,oBAAoB,EACpB,sBAAsB,EACtB,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,YAAY,EACZ,eAAe,EACf,sBAAsB,GACvB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAC,eAAe,EAAC,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAC,YAAY,EAAE,eAAe,EAAC,MAAM,8BAA8B,CAAC;AAC3E,OAAO,EACL,IAAI,EACJ,QAAQ,EACR,MAAM,EACN,SAAS,EACT,eAAe,EACf,aAAa,EACb,aAAa,EACb,SAAS,EACT,SAAS,EACT,QAAQ,EACR,WAAW,EACX,WAAW,EACX,kBAAkB,EAClB,oBAAoB,EACpB,sBAAsB,GACvB,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EAAC,UAAU,EAAE,eAAe,EAAC,MAAM,uBAAuB,CAAC;AACvE,OAAO,EACL,SAAS,EACT,YAAY,EACZ,oBAAoB,GACrB,MAAM,wBAAwB,CAAC;AAChC,YAAY,EACV,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAC,SAAS,EAAE,UAAU,EAAC,MAAM,qBAAqB,CAAC;AAE1D,OAAO,EAAC,GAAG,EAAC,MAAM,OAAO,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,iBAAiB,EAAC,MAAM,gBAAgB,CAAC;AACjD,YAAY,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAChD,OAAO,EACL,QAAQ,EACR,aAAa,EACb,UAAU,EACV,oBAAoB,GACrB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,cAAc,EACd,aAAa,EACb,eAAe,EACf,QAAQ,EACR,UAAU,EACV,WAAW,GACZ,MAAM,wBAAwB,CAAC;AAChC,YAAY,EACV,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,qBAAqB,EACrB,gBAAgB,EAChB,oBAAoB,EACpB,sBAAsB,EACtB,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,YAAY,EACZ,eAAe,EACf,sBAAsB,GACvB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAC,eAAe,EAAC,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAC,YAAY,EAAE,eAAe,EAAC,MAAM,8BAA8B,CAAC;AAC3E,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,wBAAwB,GACzB,MAAM,4BAA4B,CAAC;AACpC,YAAY,EACV,WAAW,EACX,qBAAqB,EACrB,6BAA6B,GAC9B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,IAAI,EACJ,QAAQ,EACR,MAAM,EACN,SAAS,EACT,eAAe,EACf,aAAa,EACb,aAAa,EACb,SAAS,EACT,SAAS,EACT,QAAQ,EACR,WAAW,EACX,WAAW,EACX,kBAAkB,EAClB,oBAAoB,EACpB,sBAAsB,GACvB,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EAAC,UAAU,EAAE,eAAe,EAAC,MAAM,uBAAuB,CAAC;AACvE,OAAO,EACL,SAAS,EACT,YAAY,EACZ,oBAAoB,GACrB,MAAM,wBAAwB,CAAC;AAChC,YAAY,EACV,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAC,SAAS,EAAE,UAAU,EAAC,MAAM,qBAAqB,CAAC;AAE1D,OAAO,EAAC,GAAG,EAAC,MAAM,OAAO,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"http-handler.d.ts","sourceRoot":"","sources":["../../../src/server/http-handler.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,OAAO,CAAC;AAEzC,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,uBAAuB,CAAC;AAIvD,OAAO,KAAK,EACV,WAAW,EACX,cAAc,EACd,kBAAkB,EACnB,MAAM,wBAAwB,CAAC;AAIhC,MAAM,WAAW,OAAQ,SAAQ,IAAI,CAAC,kBAAkB,EAAE,QAAQ,CAAC;IACjE,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAC7B,OAAO,CAAC,EAAE,WAAW,CAAC;CACvB;AAED,wBAAgB,mCAAmC,CACjD,GAAG,EAAE,aAAa,CAAC,GAAG,CAAC,EACvB,EAAC,MAAM,EAAC,EAAE,IAAI,CAAC,OAAO,EAAE,QAAQ,CAAC,GAChC,cAAc,CA6DhB;AAED,wBAAgB,gCAAgC,CAC9C,GAAG,EAAE,aAAa,CAAC,GAAG,CAAC,EACvB,EAAC,MAAM,EAAE,MAAM,EAAE,OAAqC,EAAC,EAAE,OAAO,eAIjE"}
1
+ {"version":3,"file":"http-handler.d.ts","sourceRoot":"","sources":["../../../src/server/http-handler.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,OAAO,CAAC;AAEzC,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,uBAAuB,CAAC;AAIvD,OAAO,KAAK,EACV,WAAW,EACX,cAAc,EACd,kBAAkB,EACnB,MAAM,wBAAwB,CAAC;AAIhC,MAAM,WAAW,OAAQ,SAAQ,IAAI,CAAC,kBAAkB,EAAE,QAAQ,CAAC;IACjE,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAC7B,OAAO,CAAC,EAAE,WAAW,CAAC;CACvB;AAED,wBAAgB,mCAAmC,CACjD,GAAG,EAAE,aAAa,CAAC,GAAG,CAAC,EACvB,EAAC,MAAM,EAAC,EAAE,IAAI,CAAC,OAAO,EAAE,QAAQ,CAAC,GAChC,cAAc,CAiDhB;AAED,wBAAgB,gCAAgC,CAC9C,GAAG,EAAE,aAAa,CAAC,GAAG,CAAC,EACvB,EAAC,MAAM,EAAE,MAAM,EAAE,OAAqC,EAAC,EAAE,OAAO,eAIjE"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@quilted/quilt",
3
3
  "type": "module",
4
- "version": "0.5.49",
4
+ "version": "0.5.53",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/lemonmade/quilt.git",
@@ -105,20 +105,21 @@
105
105
  ],
106
106
  "dependencies": {
107
107
  "@quilted/async": "^0.3.12",
108
- "@quilted/graphql": "^0.4.10",
109
- "@quilted/http-handlers": "^0.2.15",
110
- "@quilted/polyfills": "^0.2.11",
111
- "@quilted/preact-mini-compat": "^0.2.6",
112
- "@quilted/react-async": "^0.3.21",
113
- "@quilted/react-email": "^0.2.17",
114
- "@quilted/react-graphql": "^0.4.26",
115
- "@quilted/react-html": "^0.3.17",
116
- "@quilted/react-http": "^0.3.5",
117
- "@quilted/react-idle": "^0.3.5",
118
- "@quilted/react-router": "^0.3.25",
119
- "@quilted/react-server-render": "^0.3.6",
120
- "@quilted/react-testing": "^0.5.0",
121
- "@quilted/react-workers": "^0.2.11",
108
+ "@quilted/graphql": "^0.4.11",
109
+ "@quilted/http-handlers": "^0.2.19",
110
+ "@quilted/polyfills": "^0.2.12",
111
+ "@quilted/preact-mini-compat": "^0.2.7",
112
+ "@quilted/react-async": "^0.3.22",
113
+ "@quilted/react-email": "^0.2.18",
114
+ "@quilted/react-graphql": "^0.4.27",
115
+ "@quilted/react-html": "^0.3.18",
116
+ "@quilted/react-http": "^0.3.8",
117
+ "@quilted/react-idle": "^0.3.6",
118
+ "@quilted/react-performance": "^0.1.0",
119
+ "@quilted/react-router": "^0.3.28",
120
+ "@quilted/react-server-render": "^0.3.7",
121
+ "@quilted/react-testing": "^0.5.1",
122
+ "@quilted/react-workers": "^0.2.12",
122
123
  "@types/react": "^17.0.0",
123
124
  "@types/react-dom": "^17.0.0",
124
125
  "preact": "^10.0.0",
@@ -153,5 +154,5 @@
153
154
  "@quilted/eslint-config/package"
154
155
  ]
155
156
  },
156
- "gitHead": "8d819c4ce148596e388a58f59169a85305c413c1"
157
+ "gitHead": "dc5c429f7cd004df85feac59337c4768653b06c2"
157
158
  }
package/src/App.tsx CHANGED
@@ -1,10 +1,12 @@
1
1
  import type {PropsWithChildren, ComponentProps} from 'react';
2
2
 
3
3
  import {Router, useInitialUrl} from '@quilted/react-router';
4
- import {GraphQLContext} from '@quilted/react-graphql';
5
4
  import {HttpContext} from '@quilted/react-http';
5
+ import {GraphQLContext} from '@quilted/react-graphql';
6
6
  import type {GraphQL} from '@quilted/react-graphql';
7
7
  import {useHtmlUpdater} from '@quilted/react-html';
8
+ import {PerformanceContext} from '@quilted/react-performance';
9
+ import type {Performance} from '@quilted/react-performance';
8
10
 
9
11
  import {maybeWrapContext} from './utilities/react';
10
12
 
@@ -12,6 +14,7 @@ type RouterProps = ComponentProps<typeof Router>;
12
14
 
13
15
  interface Props {
14
16
  graphql?: GraphQL;
17
+ performance?: Performance;
15
18
  routerState?: RouterProps['state'];
16
19
  routerPrefix?: RouterProps['prefix'];
17
20
  urlIsExternal?: RouterProps['isExternal'];
@@ -20,6 +23,7 @@ interface Props {
20
23
  export function App({
21
24
  children,
22
25
  graphql,
26
+ performance,
23
27
  routerState,
24
28
  routerPrefix,
25
29
  urlIsExternal,
@@ -39,7 +43,9 @@ export function App({
39
43
  prefix={routerPrefix}
40
44
  isExternal={urlIsExternal}
41
45
  >
42
- {children}
46
+ <PerformanceContext performance={performance}>
47
+ {children}
48
+ </PerformanceContext>
43
49
  </Router>,
44
50
  )}
45
51
  </HttpContext>
package/src/index.ts CHANGED
@@ -32,6 +32,16 @@ export type {
32
32
  } from '@quilted/react-graphql';
33
33
  export {useIdleCallback} from '@quilted/react-idle';
34
34
  export {ServerAction, useServerAction} from '@quilted/react-server-render';
35
+ export {
36
+ PerformanceContext,
37
+ usePerformance,
38
+ usePerformanceNavigation,
39
+ } from '@quilted/react-performance';
40
+ export type {
41
+ Performance,
42
+ PerformanceNavigation,
43
+ PerformanceInflightNavigation,
44
+ } from '@quilted/react-performance';
35
45
  export {
36
46
  Link,
37
47
  Redirect,
@@ -32,19 +32,13 @@ export function createServerRenderingRequestHandler(
32
32
  headers: request.headers,
33
33
  });
34
34
 
35
- const {headers, cookies, statusCode = 200, redirectUrl} = http.state;
35
+ const {headers, statusCode = 200, redirectUrl} = http.state;
36
36
 
37
37
  if (redirectUrl) {
38
- const response = redirect(redirectUrl, {
38
+ return redirect(redirectUrl, {
39
39
  status: statusCode as 301,
40
40
  headers,
41
41
  });
42
-
43
- for (const [name, {value, ...options}] of cookies.records()) {
44
- response.cookies.set(name, value, options);
45
- }
46
-
47
- return response;
48
42
  }
49
43
 
50
44
  const usedAssets = asyncAssets.used({timing: 'load'});
@@ -58,7 +52,7 @@ export function createServerRenderingRequestHandler(
58
52
  }),
59
53
  ]);
60
54
 
61
- const response = html(
55
+ return html(
62
56
  render(
63
57
  <Html
64
58
  manager={htmlManager}
@@ -70,16 +64,10 @@ export function createServerRenderingRequestHandler(
70
64
  </Html>,
71
65
  ),
72
66
  {
73
- headers: Object.fromEntries([...headers]),
67
+ headers,
74
68
  status: statusCode,
75
69
  },
76
70
  );
77
-
78
- for (const [name, {value, ...options}] of cookies.records()) {
79
- response.cookies.set(name, value, options);
80
- }
81
-
82
- return response;
83
71
  };
84
72
  }
85
73
 
package/tsconfig.json CHANGED
@@ -17,6 +17,7 @@
17
17
  {"path": "../react-html"},
18
18
  {"path": "../react-http"},
19
19
  {"path": "../react-idle"},
20
+ {"path": "../react-performance"},
20
21
  {"path": "../react-router"},
21
22
  {"path": "../react-server-render"},
22
23
  {"path": "../react-testing"},