wcz-test 1.4.0 → 1.7.0

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.
Files changed (159) hide show
  1. package/.prettierignore +4 -0
  2. package/.vs/VSWorkspaceState.json +6 -0
  3. package/.vs/slnx.sqlite +0 -0
  4. package/.vs/wcz-test/CopilotIndices/17.13.441.19478/CodeChunks.db +0 -0
  5. package/.vs/wcz-test/CopilotIndices/17.13.441.19478/SemanticSymbols.db +0 -0
  6. package/.vs/wcz-test/v17/.wsuo +0 -0
  7. package/.vs/wcz-test/v17/DocumentLayout.backup.json +31 -0
  8. package/.vs/wcz-test/v17/DocumentLayout.json +31 -0
  9. package/.vscode/settings.json +11 -0
  10. package/app.config.ts +15 -0
  11. package/dist/index.cjs +36 -0
  12. package/dist/index.cjs.map +1 -0
  13. package/dist/index.d.cts +5 -0
  14. package/dist/index.d.ts +5 -2
  15. package/dist/index.js +9 -1
  16. package/dist/index.js.map +1 -0
  17. package/package.json +36 -46
  18. package/postcss.config.mjs +6 -0
  19. package/public/android-chrome-192x192.png +0 -0
  20. package/public/android-chrome-512x512.png +0 -0
  21. package/public/apple-touch-icon.png +0 -0
  22. package/public/favicon-16x16.png +0 -0
  23. package/public/favicon-32x32.png +0 -0
  24. package/public/favicon.ico +0 -0
  25. package/public/favicon.png +0 -0
  26. package/public/site.webmanifest +19 -0
  27. package/src/api.ts +6 -0
  28. package/src/client.tsx +8 -0
  29. package/src/components/DefaultCatchBoundary.tsx +53 -0
  30. package/src/components/MyComponent.tsx +8 -0
  31. package/src/components/NotFound.tsx +25 -0
  32. package/src/components/PostError.tsx +5 -0
  33. package/src/components/UserError.tsx +5 -0
  34. package/src/global-middleware.ts +6 -0
  35. package/src/index.ts +1 -0
  36. package/src/routeTree.gen.ts +483 -0
  37. package/src/router.tsx +22 -0
  38. package/src/routes/__root.tsx +139 -0
  39. package/src/routes/_pathlessLayout/_nested-layout/route-a.tsx +11 -0
  40. package/src/routes/_pathlessLayout/_nested-layout/route-b.tsx +11 -0
  41. package/src/routes/_pathlessLayout/_nested-layout.tsx +34 -0
  42. package/src/routes/_pathlessLayout.tsx +16 -0
  43. package/src/routes/api/users.$id.ts +24 -0
  44. package/src/routes/api/users.ts +17 -0
  45. package/src/routes/deferred.tsx +62 -0
  46. package/src/routes/index.tsx +13 -0
  47. package/src/routes/posts.$postId.tsx +34 -0
  48. package/src/routes/posts.index.tsx +9 -0
  49. package/src/routes/posts.route.tsx +38 -0
  50. package/src/routes/posts_.$postId.deep.tsx +29 -0
  51. package/{dist/routes/redirect.js → src/routes/redirect.tsx} +8 -7
  52. package/src/routes/users.$userId.tsx +33 -0
  53. package/src/routes/users.index.tsx +9 -0
  54. package/src/routes/users.route.tsx +48 -0
  55. package/src/ssr.tsx +13 -0
  56. package/src/styles/app.css +22 -0
  57. package/src/utils/loggingMiddleware.tsx +41 -0
  58. package/src/utils/posts.tsx +36 -0
  59. package/src/utils/seo.ts +33 -0
  60. package/src/utils/users.tsx +7 -0
  61. package/tailwind.config.mjs +4 -0
  62. package/tsconfig.json +22 -0
  63. package/tsup.config.ts +10 -0
  64. package/dist/api.d.ts +0 -3
  65. package/dist/api.d.ts.map +0 -1
  66. package/dist/api.js +0 -2
  67. package/dist/client.d.ts +0 -2
  68. package/dist/client.d.ts.map +0 -1
  69. package/dist/client.js +0 -7
  70. package/dist/components/DefaultCatchBoundary.d.ts +0 -3
  71. package/dist/components/DefaultCatchBoundary.d.ts.map +0 -1
  72. package/dist/components/DefaultCatchBoundary.js +0 -16
  73. package/dist/components/MyComponent.d.ts +0 -4
  74. package/dist/components/MyComponent.d.ts.map +0 -1
  75. package/dist/components/MyComponent.js +0 -5
  76. package/dist/components/NotFound.d.ts +0 -4
  77. package/dist/components/NotFound.d.ts.map +0 -1
  78. package/dist/components/NotFound.js +0 -5
  79. package/dist/components/PostError.d.ts +0 -3
  80. package/dist/components/PostError.d.ts.map +0 -1
  81. package/dist/components/PostError.js +0 -5
  82. package/dist/components/UserError.d.ts +0 -3
  83. package/dist/components/UserError.d.ts.map +0 -1
  84. package/dist/components/UserError.js +0 -5
  85. package/dist/global-middleware.d.ts +0 -2
  86. package/dist/global-middleware.d.ts.map +0 -1
  87. package/dist/global-middleware.js +0 -5
  88. package/dist/index.d.ts.map +0 -1
  89. package/dist/routeTree.gen.d.ts +0 -249
  90. package/dist/routeTree.gen.d.ts.map +0 -1
  91. package/dist/routeTree.gen.js +0 -204
  92. package/dist/router.d.ts +0 -7
  93. package/dist/router.d.ts.map +0 -1
  94. package/dist/router.js +0 -15
  95. package/dist/routes/__root.d.ts +0 -2
  96. package/dist/routes/__root.d.ts.map +0 -1
  97. package/dist/routes/__root.js +0 -73
  98. package/dist/routes/_pathlessLayout/_nested-layout/route-a.d.ts +0 -2
  99. package/dist/routes/_pathlessLayout/_nested-layout/route-a.d.ts.map +0 -1
  100. package/dist/routes/_pathlessLayout/_nested-layout/route-a.js +0 -8
  101. package/dist/routes/_pathlessLayout/_nested-layout/route-b.d.ts +0 -2
  102. package/dist/routes/_pathlessLayout/_nested-layout/route-b.d.ts.map +0 -1
  103. package/dist/routes/_pathlessLayout/_nested-layout/route-b.js +0 -8
  104. package/dist/routes/_pathlessLayout/_nested-layout.d.ts +0 -2
  105. package/dist/routes/_pathlessLayout/_nested-layout.d.ts.map +0 -1
  106. package/dist/routes/_pathlessLayout/_nested-layout.js +0 -12
  107. package/dist/routes/_pathlessLayout.d.ts +0 -2
  108. package/dist/routes/_pathlessLayout.d.ts.map +0 -1
  109. package/dist/routes/_pathlessLayout.js +0 -8
  110. package/dist/routes/api/users.$id.d.ts +0 -5
  111. package/dist/routes/api/users.$id.d.ts.map +0 -1
  112. package/dist/routes/api/users.$id.js +0 -20
  113. package/dist/routes/api/users.d.ts +0 -5
  114. package/dist/routes/api/users.d.ts.map +0 -1
  115. package/dist/routes/api/users.js +0 -11
  116. package/dist/routes/deferred.d.ts +0 -12
  117. package/dist/routes/deferred.d.ts.map +0 -1
  118. package/dist/routes/deferred.js +0 -30
  119. package/dist/routes/index.d.ts +0 -2
  120. package/dist/routes/index.d.ts.map +0 -1
  121. package/dist/routes/index.js +0 -8
  122. package/dist/routes/posts.$postId.d.ts +0 -14
  123. package/dist/routes/posts.$postId.d.ts.map +0 -1
  124. package/dist/routes/posts.$postId.js +0 -19
  125. package/dist/routes/posts.index.d.ts +0 -6
  126. package/dist/routes/posts.index.d.ts.map +0 -1
  127. package/dist/routes/posts.index.js +0 -8
  128. package/dist/routes/posts.route.d.ts +0 -6
  129. package/dist/routes/posts.route.d.ts.map +0 -1
  130. package/dist/routes/posts.route.js +0 -15
  131. package/dist/routes/posts_.$postId.deep.d.ts +0 -6
  132. package/dist/routes/posts_.$postId.deep.d.ts.map +0 -1
  133. package/dist/routes/posts_.$postId.deep.js +0 -15
  134. package/dist/routes/redirect.d.ts +0 -2
  135. package/dist/routes/redirect.d.ts.map +0 -1
  136. package/dist/routes/users.$userId.d.ts +0 -3
  137. package/dist/routes/users.$userId.d.ts.map +0 -1
  138. package/dist/routes/users.$userId.js +0 -25
  139. package/dist/routes/users.index.d.ts +0 -2
  140. package/dist/routes/users.index.d.ts.map +0 -1
  141. package/dist/routes/users.index.js +0 -9
  142. package/dist/routes/users.route.d.ts +0 -3
  143. package/dist/routes/users.route.d.ts.map +0 -1
  144. package/dist/routes/users.route.js +0 -26
  145. package/dist/ssr.d.ts +0 -3
  146. package/dist/ssr.d.ts.map +0 -1
  147. package/dist/ssr.js +0 -8
  148. package/dist/utils/loggingMiddleware.d.ts +0 -9
  149. package/dist/utils/loggingMiddleware.d.ts.map +0 -1
  150. package/dist/utils/loggingMiddleware.js +0 -34
  151. package/dist/utils/posts.d.ts +0 -8
  152. package/dist/utils/posts.d.ts.map +0 -1
  153. package/dist/utils/posts.js +0 -25
  154. package/dist/utils/seo.d.ts +0 -15
  155. package/dist/utils/seo.d.ts.map +0 -1
  156. package/dist/utils/seo.js +0 -22
  157. package/dist/utils/users.d.ts +0 -7
  158. package/dist/utils/users.d.ts.map +0 -1
  159. package/dist/utils/users.js +0 -1
@@ -0,0 +1,4 @@
1
+ **/build
2
+ **/public
3
+ pnpm-lock.yaml
4
+ routeTree.gen.ts
@@ -0,0 +1,6 @@
1
+ {
2
+ "ExpandedNodes": [
3
+ ""
4
+ ],
5
+ "PreviewInSolutionExplorer": false
6
+ }
Binary file
Binary file
@@ -0,0 +1,31 @@
1
+ {
2
+ "Version": 1,
3
+ "WorkspaceRootPath": "C:\\Users\\stama\\source\\repos\\wcz-test\\",
4
+ "Documents": [],
5
+ "DocumentGroupContainers": [
6
+ {
7
+ "Orientation": 0,
8
+ "VerticalTabListWidth": 256,
9
+ "DocumentGroups": [
10
+ {
11
+ "DockedWidth": 200,
12
+ "SelectedChildIndex": -1,
13
+ "Children": [
14
+ {
15
+ "$type": "Bookmark",
16
+ "Name": "ST:0:0:{0174dea2-fdbe-4ef1-8f99-c0beae78880f}"
17
+ },
18
+ {
19
+ "$type": "Bookmark",
20
+ "Name": "ST:0:0:{aa2115a1-9712-457b-9047-dbb71ca2cdd2}"
21
+ },
22
+ {
23
+ "$type": "Bookmark",
24
+ "Name": "ST:0:0:{1c4feeaa-4718-4aa9-859d-94ce25d182ba}"
25
+ }
26
+ ]
27
+ }
28
+ ]
29
+ }
30
+ ]
31
+ }
@@ -0,0 +1,31 @@
1
+ {
2
+ "Version": 1,
3
+ "WorkspaceRootPath": "C:\\Users\\stama\\source\\repos\\wcz-test\\",
4
+ "Documents": [],
5
+ "DocumentGroupContainers": [
6
+ {
7
+ "Orientation": 0,
8
+ "VerticalTabListWidth": 256,
9
+ "DocumentGroups": [
10
+ {
11
+ "DockedWidth": 200,
12
+ "SelectedChildIndex": -1,
13
+ "Children": [
14
+ {
15
+ "$type": "Bookmark",
16
+ "Name": "ST:0:0:{0174dea2-fdbe-4ef1-8f99-c0beae78880f}"
17
+ },
18
+ {
19
+ "$type": "Bookmark",
20
+ "Name": "ST:0:0:{aa2115a1-9712-457b-9047-dbb71ca2cdd2}"
21
+ },
22
+ {
23
+ "$type": "Bookmark",
24
+ "Name": "ST:0:0:{1c4feeaa-4718-4aa9-859d-94ce25d182ba}"
25
+ }
26
+ ]
27
+ }
28
+ ]
29
+ }
30
+ ]
31
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "files.watcherExclude": {
3
+ "**/routeTree.gen.ts": true
4
+ },
5
+ "search.exclude": {
6
+ "**/routeTree.gen.ts": true
7
+ },
8
+ "files.readonlyInclude": {
9
+ "**/routeTree.gen.ts": true
10
+ }
11
+ }
package/app.config.ts ADDED
@@ -0,0 +1,15 @@
1
+ import { defineConfig } from '@tanstack/react-start/config'
2
+ import tsConfigPaths from 'vite-tsconfig-paths'
3
+
4
+ export default defineConfig({
5
+ tsr: {
6
+ appDirectory: 'src',
7
+ },
8
+ vite: {
9
+ plugins: [
10
+ tsConfigPaths({
11
+ projects: ['./tsconfig.json'],
12
+ }),
13
+ ],
14
+ },
15
+ })
package/dist/index.cjs ADDED
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/index.ts
21
+ var index_exports = {};
22
+ __export(index_exports, {
23
+ MyComponent: () => MyComponent
24
+ });
25
+ module.exports = __toCommonJS(index_exports);
26
+
27
+ // src/components/MyComponent.tsx
28
+ var import_jsx_runtime = require("react/jsx-runtime");
29
+ var MyComponent = () => {
30
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h1", { children: "Hello, World!" }) });
31
+ };
32
+ // Annotate the CommonJS export names for ESM import in node:
33
+ 0 && (module.exports = {
34
+ MyComponent
35
+ });
36
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts","../src/components/MyComponent.tsx"],"sourcesContent":["export { MyComponent } from \"./components/MyComponent\";","\r\nexport const MyComponent = () => {\r\n return (\r\n <div>\r\n <h1>Hello, World!</h1>\r\n </div>\r\n );\r\n}"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACIY;AAHL,IAAM,cAAc,MAAM;AAC7B,SACI,4CAAC,SACG,sDAAC,QAAG,2BAAa,GACrB;AAER;","names":[]}
@@ -0,0 +1,5 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ declare const MyComponent: () => react_jsx_runtime.JSX.Element;
4
+
5
+ export { MyComponent };
package/dist/index.d.ts CHANGED
@@ -1,2 +1,5 @@
1
- export { MyComponent } from './components/MyComponent';
2
- //# sourceMappingURL=index.d.ts.map
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ declare const MyComponent: () => react_jsx_runtime.JSX.Element;
4
+
5
+ export { MyComponent };
package/dist/index.js CHANGED
@@ -1 +1,9 @@
1
- export { MyComponent } from './components/MyComponent';
1
+ // src/components/MyComponent.tsx
2
+ import { jsx } from "react/jsx-runtime";
3
+ var MyComponent = () => {
4
+ return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx("h1", { children: "Hello, World!" }) });
5
+ };
6
+ export {
7
+ MyComponent
8
+ };
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/MyComponent.tsx"],"sourcesContent":["\r\nexport const MyComponent = () => {\r\n return (\r\n <div>\r\n <h1>Hello, World!</h1>\r\n </div>\r\n );\r\n}"],"mappings":";AAIY;AAHL,IAAM,cAAc,MAAM;AAC7B,SACI,oBAAC,SACG,8BAAC,QAAG,2BAAa,GACrB;AAER;","names":[]}
package/package.json CHANGED
@@ -1,47 +1,37 @@
1
- {
2
- "name": "wcz-test",
3
- "version": "1.4.0",
4
- "private": false,
5
- "sideEffects": false,
6
- "type": "module",
7
- "main": "dist/index.js",
8
- "types": "dist/index.d.ts",
9
- "files": [
10
- "dist"
11
- ],
12
- "publishConfig": {
13
- "access": "public"
14
- },
15
- "keywords": [
16
- "react",
17
- "router",
18
- "tailwindcss"
19
- ],
20
- "scripts": {
21
- "dev": "vinxi dev",
22
- "build": "vinxi build",
23
- "start": "vinxi start",
24
- "prepare": "tsc && vinxi build",
25
- "build:lib": "tsc"
26
- },
27
- "dependencies": {
28
- "@tanstack/react-router": "^1.115.2",
29
- "@tanstack/react-router-devtools": "^1.115.2",
30
- "@tanstack/react-start": "^1.115.2",
31
- "react": "^19.0.0",
32
- "react-dom": "^19.0.0",
33
- "redaxios": "^0.5.1",
34
- "tailwind-merge": "^2.6.0",
35
- "vinxi": "0.5.3"
36
- },
37
- "devDependencies": {
38
- "@types/node": "^22.5.4",
39
- "@types/react": "^19.0.8",
40
- "@types/react-dom": "^19.0.3",
41
- "postcss": "^8.5.1",
42
- "autoprefixer": "^10.4.20",
43
- "tailwindcss": "^3.4.17",
44
- "typescript": "^5.7.2",
45
- "vite-tsconfig-paths": "^5.1.4"
46
- }
1
+ {
2
+ "name": "wcz-test",
3
+ "version": "1.7.0",
4
+ "private": false,
5
+ "sideEffects": false,
6
+ "type": "module",
7
+ "main": "dist/index.js",
8
+ "module": "dist/index.js",
9
+ "types": "dist/index.d.ts",
10
+ "scripts": {
11
+ "dev": "vinxi dev",
12
+ "build": "tsup",
13
+ "start": "vinxi start",
14
+ "publish": "tsup && npm publish"
15
+ },
16
+ "dependencies": {
17
+ "@tanstack/react-router": "^1.116.0",
18
+ "@tanstack/react-router-devtools": "^1.116.0",
19
+ "@tanstack/react-start": "^1.116.1",
20
+ "react": "^19.0.0",
21
+ "react-dom": "^19.0.0",
22
+ "redaxios": "^0.5.1",
23
+ "tailwind-merge": "^2.6.0",
24
+ "vinxi": "0.5.3"
25
+ },
26
+ "devDependencies": {
27
+ "@types/node": "^22.5.4",
28
+ "@types/react": "^19.0.8",
29
+ "@types/react-dom": "^19.0.3",
30
+ "autoprefixer": "^10.4.20",
31
+ "postcss": "^8.5.1",
32
+ "tailwindcss": "^3.4.17",
33
+ "tsup": "^8.4.0",
34
+ "typescript": "^5.7.2",
35
+ "vite-tsconfig-paths": "^5.1.4"
36
+ }
47
37
  }
@@ -0,0 +1,6 @@
1
+ export default {
2
+ plugins: {
3
+ tailwindcss: {},
4
+ autoprefixer: {},
5
+ },
6
+ }
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "",
3
+ "short_name": "",
4
+ "icons": [
5
+ {
6
+ "src": "/android-chrome-192x192.png",
7
+ "sizes": "192x192",
8
+ "type": "image/png"
9
+ },
10
+ {
11
+ "src": "/android-chrome-512x512.png",
12
+ "sizes": "512x512",
13
+ "type": "image/png"
14
+ }
15
+ ],
16
+ "theme_color": "#ffffff",
17
+ "background_color": "#ffffff",
18
+ "display": "standalone"
19
+ }
package/src/api.ts ADDED
@@ -0,0 +1,6 @@
1
+ import {
2
+ createStartAPIHandler,
3
+ defaultAPIFileRouteHandler,
4
+ } from '@tanstack/react-start/api'
5
+
6
+ export default createStartAPIHandler(defaultAPIFileRouteHandler)
package/src/client.tsx ADDED
@@ -0,0 +1,8 @@
1
+ /// <reference types="vinxi/types/client" />
2
+ import { hydrateRoot } from 'react-dom/client'
3
+ import { StartClient } from '@tanstack/react-start'
4
+ import { createRouter } from './router'
5
+
6
+ const router = createRouter()
7
+
8
+ hydrateRoot(document, <StartClient router={router} />)
@@ -0,0 +1,53 @@
1
+ import {
2
+ ErrorComponent,
3
+ Link,
4
+ rootRouteId,
5
+ useMatch,
6
+ useRouter,
7
+ } from '@tanstack/react-router'
8
+ import type { ErrorComponentProps } from '@tanstack/react-router'
9
+
10
+ export function DefaultCatchBoundary({ error }: ErrorComponentProps) {
11
+ const router = useRouter()
12
+ const isRoot = useMatch({
13
+ strict: false,
14
+ select: (state) => state.id === rootRouteId,
15
+ })
16
+
17
+ console.error('DefaultCatchBoundary Error:', error)
18
+
19
+ return (
20
+ <div className="min-w-0 flex-1 p-4 flex flex-col items-center justify-center gap-6">
21
+ <ErrorComponent error={error} />
22
+ <div className="flex gap-2 items-center flex-wrap">
23
+ <button
24
+ onClick={() => {
25
+ router.invalidate()
26
+ }}
27
+ className={`px-2 py-1 bg-gray-600 dark:bg-gray-700 rounded text-white uppercase font-extrabold`}
28
+ >
29
+ Try Again
30
+ </button>
31
+ {isRoot ? (
32
+ <Link
33
+ to="/"
34
+ className={`px-2 py-1 bg-gray-600 dark:bg-gray-700 rounded text-white uppercase font-extrabold`}
35
+ >
36
+ Home
37
+ </Link>
38
+ ) : (
39
+ <Link
40
+ to="/"
41
+ className={`px-2 py-1 bg-gray-600 dark:bg-gray-700 rounded text-white uppercase font-extrabold`}
42
+ onClick={(e) => {
43
+ e.preventDefault()
44
+ window.history.back()
45
+ }}
46
+ >
47
+ Go Back
48
+ </Link>
49
+ )}
50
+ </div>
51
+ </div>
52
+ )
53
+ }
@@ -0,0 +1,8 @@
1
+
2
+ export const MyComponent = () => {
3
+ return (
4
+ <div>
5
+ <h1>Hello, World!</h1>
6
+ </div>
7
+ );
8
+ }
@@ -0,0 +1,25 @@
1
+ import { Link } from '@tanstack/react-router'
2
+
3
+ export function NotFound({ children }: { children?: any }) {
4
+ return (
5
+ <div className="space-y-2 p-2">
6
+ <div className="text-gray-600 dark:text-gray-400">
7
+ {children || <p>The page you are looking for does not exist.</p>}
8
+ </div>
9
+ <p className="flex items-center gap-2 flex-wrap">
10
+ <button
11
+ onClick={() => window.history.back()}
12
+ className="bg-emerald-500 text-white px-2 py-1 rounded uppercase font-black text-sm"
13
+ >
14
+ Go back
15
+ </button>
16
+ <Link
17
+ to="/"
18
+ className="bg-cyan-600 text-white px-2 py-1 rounded uppercase font-black text-sm"
19
+ >
20
+ Start Over
21
+ </Link>
22
+ </p>
23
+ </div>
24
+ )
25
+ }
@@ -0,0 +1,5 @@
1
+ import { ErrorComponent, ErrorComponentProps } from '@tanstack/react-router'
2
+
3
+ export function PostErrorComponent({ error }: ErrorComponentProps) {
4
+ return <ErrorComponent error={error} />
5
+ }
@@ -0,0 +1,5 @@
1
+ import { ErrorComponent, ErrorComponentProps } from '@tanstack/react-router'
2
+
3
+ export function UserErrorComponent({ error }: ErrorComponentProps) {
4
+ return <ErrorComponent error={error} />
5
+ }
@@ -0,0 +1,6 @@
1
+ import { registerGlobalMiddleware } from '@tanstack/react-start'
2
+ import { logMiddleware } from './utils/loggingMiddleware'
3
+
4
+ registerGlobalMiddleware({
5
+ middleware: [logMiddleware],
6
+ })
package/src/index.ts ADDED
@@ -0,0 +1 @@
1
+ export { MyComponent } from "./components/MyComponent";