@solidjs/start 2.0.0-beta.0 → 2.0.0-beta.10

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 (117) hide show
  1. package/CHANGELOG.md +71 -0
  2. package/dist/config/boundary-modules.d.ts +14 -0
  3. package/dist/config/boundary-modules.js +41 -0
  4. package/dist/config/dev-server.d.ts +3 -1
  5. package/dist/config/dev-server.js +25 -5
  6. package/dist/config/env.js +16 -12
  7. package/dist/config/fs-router.d.ts +1 -1
  8. package/dist/config/fs-router.js +28 -21
  9. package/dist/config/fs-routes/router.d.ts +2 -1
  10. package/dist/config/fs-routes/router.js +8 -10
  11. package/dist/config/index.js +42 -7
  12. package/dist/directives/index.js +39 -7
  13. package/dist/fns/handler.js +40 -4
  14. package/dist/fns/registration.d.ts +2 -1
  15. package/dist/fns/registration.js +4 -1
  16. package/dist/http/http.d.ts +81 -0
  17. package/dist/http/http.js +129 -0
  18. package/dist/http/index.d.ts +2 -81
  19. package/dist/http/index.js +6 -129
  20. package/dist/middleware/index.d.ts +1 -0
  21. package/dist/middleware/index.js +1 -0
  22. package/dist/server/StartServer.jsx +1 -1
  23. package/dist/server/handler.d.ts +3 -61
  24. package/dist/server/handler.js +4 -8
  25. package/dist/server/spa/StartServer.jsx +1 -1
  26. package/dist/server/spa/handler.d.ts +2 -30
  27. package/dist/server/web-stream.d.ts +9 -0
  28. package/dist/server/web-stream.js +26 -0
  29. package/dist/shared/HttpHeader.jsx +1 -1
  30. package/env.d.ts +12 -0
  31. package/package.json +14 -8
  32. package/scripts/build.js +0 -15
  33. package/scripts/validate-imports.js +0 -316
  34. package/src/client/StartClient.tsx +0 -34
  35. package/src/client/index.tsx +0 -2
  36. package/src/client/mount.ts +0 -1
  37. package/src/client/spa/index.tsx +0 -9
  38. package/src/config/constants.ts +0 -19
  39. package/src/config/dev-server.ts +0 -157
  40. package/src/config/env.ts +0 -105
  41. package/src/config/fs-router.ts +0 -162
  42. package/src/config/fs-routes/fs-watcher.ts +0 -66
  43. package/src/config/fs-routes/index.ts +0 -136
  44. package/src/config/fs-routes/router.ts +0 -184
  45. package/src/config/fs-routes/tree-shake.ts +0 -324
  46. package/src/config/index.ts +0 -239
  47. package/src/config/lazy.ts +0 -132
  48. package/src/config/manifest.ts +0 -120
  49. package/src/config/utils.ts +0 -5
  50. package/src/config/vite-utils.ts +0 -113
  51. package/src/directives/bubble-function-declaration.ts +0 -33
  52. package/src/directives/compile.ts +0 -54
  53. package/src/directives/generate-unique-name.ts +0 -22
  54. package/src/directives/get-descriptive-name.ts +0 -39
  55. package/src/directives/get-import-identifier.ts +0 -34
  56. package/src/directives/get-root-statement-path.ts +0 -14
  57. package/src/directives/index.ts +0 -233
  58. package/src/directives/is-statement-top-level.ts +0 -13
  59. package/src/directives/paths.ts +0 -63
  60. package/src/directives/plugin.ts +0 -389
  61. package/src/directives/remove-unused-variables.ts +0 -70
  62. package/src/directives/types.ts +0 -12
  63. package/src/directives/xxhash32.ts +0 -214
  64. package/src/env.d.ts +0 -17
  65. package/src/fns/client.ts +0 -141
  66. package/src/fns/handler.spec.ts +0 -85
  67. package/src/fns/handler.ts +0 -287
  68. package/src/fns/registration.ts +0 -19
  69. package/src/fns/serialization.ts +0 -250
  70. package/src/fns/server.ts +0 -46
  71. package/src/fns/shared.ts +0 -116
  72. package/src/http/index.ts +0 -216
  73. package/src/index.tsx +0 -7
  74. package/src/internal.d.ts +0 -14
  75. package/src/middleware/index.ts +0 -92
  76. package/src/router.tsx +0 -37
  77. package/src/server/StartServer.tsx +0 -58
  78. package/src/server/assets/PatchVirtualDevStyles.tsx +0 -31
  79. package/src/server/assets/index.ts +0 -70
  80. package/src/server/assets/render.tsx +0 -46
  81. package/src/server/collect-styles.ts +0 -70
  82. package/src/server/fetchEvent.spec.ts +0 -85
  83. package/src/server/fetchEvent.ts +0 -36
  84. package/src/server/handler.ts +0 -261
  85. package/src/server/index.tsx +0 -29
  86. package/src/server/manifest/client-manifest.ts +0 -8
  87. package/src/server/manifest/dev-client-manifest.ts +0 -21
  88. package/src/server/manifest/dev-ssr-manifest.ts +0 -23
  89. package/src/server/manifest/prod-client-manifest.ts +0 -21
  90. package/src/server/manifest/prod-ssr-manifest.ts +0 -109
  91. package/src/server/manifest/ssr-manifest.ts +0 -10
  92. package/src/server/routes.ts +0 -126
  93. package/src/server/spa/StartServer.tsx +0 -42
  94. package/src/server/spa/handler.ts +0 -29
  95. package/src/server/spa/index.tsx +0 -5
  96. package/src/server/types.ts +0 -82
  97. package/src/server/util.ts +0 -12
  98. package/src/shared/ErrorBoundary.tsx +0 -52
  99. package/src/shared/GET.ts +0 -8
  100. package/src/shared/HttpHeader.tsx +0 -42
  101. package/src/shared/HttpStatusCode.ts +0 -27
  102. package/src/shared/clientOnly.ts +0 -44
  103. package/src/shared/dev-overlay/CodeView.tsx +0 -90
  104. package/src/shared/dev-overlay/DevOverlayDialog.tsx +0 -316
  105. package/src/shared/dev-overlay/createStackFrame.ts +0 -74
  106. package/src/shared/dev-overlay/download.ts +0 -6
  107. package/src/shared/dev-overlay/env.d.ts +0 -4
  108. package/src/shared/dev-overlay/get-source-map.ts +0 -33
  109. package/src/shared/dev-overlay/icons.tsx +0 -456
  110. package/src/shared/dev-overlay/index.tsx +0 -63
  111. package/src/shared/dev-overlay/styles.css +0 -292
  112. package/src/shared/lazy.ts +0 -52
  113. package/src/shared/serverFunction.ts +0 -10
  114. package/src/utils/debounce.ts +0 -10
  115. package/src/virtual.d.ts +0 -27
  116. package/tsconfig.json +0 -24
  117. package/vitest.config.ts +0 -9
@@ -1,74 +0,0 @@
1
- import { type Accessor, createMemo, createResource } from "solid-js";
2
- import getSourceMap from "./get-source-map.ts";
3
-
4
- export interface StackFrameSource {
5
- content: string;
6
- source: string;
7
- name?: string;
8
- line: number;
9
- column: number;
10
- }
11
-
12
- function getActualFileSource(path: string): string {
13
- if (path.startsWith("file://")) {
14
- return "/_build/@fs" + path.substring("file://".length);
15
- }
16
- return path;
17
- }
18
-
19
- export function createStackFrame(stackframe: StackFrame, isCompiled: () => boolean) {
20
- const [data] = createResource(
21
- () => ({
22
- fileName: stackframe.fileName,
23
- line: stackframe.lineNumber,
24
- column: stackframe.columnNumber,
25
- functionName: stackframe.functionName,
26
- }),
27
- async source => {
28
- if (!source.fileName) {
29
- return null;
30
- }
31
- const response = await fetch(getActualFileSource(source.fileName));
32
- if (!response.ok) {
33
- return null;
34
- }
35
- const content = await response.text();
36
- const sourceMap = await getSourceMap(source.fileName, content);
37
- return {
38
- source,
39
- content,
40
- sourceMap,
41
- };
42
- },
43
- );
44
-
45
- const info = createMemo(() => {
46
- const current = data();
47
- if (!current) {
48
- return undefined;
49
- }
50
- const { source, content, sourceMap } = current;
51
-
52
- if (!isCompiled() && source.line && source.column && sourceMap) {
53
- const result = sourceMap.originalPositionFor({
54
- line: source.line,
55
- column: source.column,
56
- });
57
-
58
- return {
59
- ...result,
60
- content: sourceMap.sourceContentFor(result.source),
61
- } as StackFrameSource;
62
- }
63
-
64
- return {
65
- source: source.fileName,
66
- line: source.line,
67
- column: source.column,
68
- name: source.functionName,
69
- content,
70
- } as StackFrameSource;
71
- });
72
-
73
- return info as Accessor<StackFrameSource>;
74
- }
@@ -1,6 +0,0 @@
1
- export default function download(dataurl: string, filename: string) {
2
- const link = document.createElement("a");
3
- link.href = dataurl;
4
- link.download = filename;
5
- link.click();
6
- }
@@ -1,4 +0,0 @@
1
- declare module "*.json" {
2
- const data: Record<string, unknown>;
3
- export default data;
4
- }
@@ -1,33 +0,0 @@
1
- import { type RawSourceMap, SourceMapConsumer } from "source-map-js";
2
-
3
- const INLINE_SOURCEMAP_REGEX = /^data:application\/json[^,]+base64,/;
4
- const SOURCEMAP_REGEX =
5
- /(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^*]+?)[ \t]*(?:\*\/)[ \t]*$)/;
6
-
7
- export default async function getSourceMap(
8
- url: string,
9
- content: string,
10
- ): Promise<SourceMapConsumer | null> {
11
- const lines = content.split("\n");
12
- let sourceMapUrl: string | undefined;
13
- for (let i = lines.length - 1; i >= 0 && !sourceMapUrl; i--) {
14
- const result = lines[i]!.match(SOURCEMAP_REGEX);
15
- if (result) {
16
- sourceMapUrl = result[1];
17
- }
18
- }
19
-
20
- if (!sourceMapUrl) {
21
- return null;
22
- }
23
-
24
- if (!(INLINE_SOURCEMAP_REGEX.test(sourceMapUrl) || sourceMapUrl.startsWith("/"))) {
25
- // Resolve path if it's a relative access
26
- const parsedURL = url.split("/");
27
- parsedURL[parsedURL.length - 1] = sourceMapUrl;
28
- sourceMapUrl = parsedURL.join("/");
29
- }
30
- const response = await fetch(sourceMapUrl);
31
- const rawSourceMap: RawSourceMap = await response.json();
32
- return new SourceMapConsumer(rawSourceMap);
33
- }
@@ -1,456 +0,0 @@
1
- // @refresh skip
2
- import type { JSX } from "solid-js";
3
-
4
- export function ArrowRightIcon(
5
- props: JSX.IntrinsicElements["svg"] & { title: string },
6
- ): JSX.Element {
7
- return (
8
- <svg
9
- xmlns="http://www.w3.org/2000/svg"
10
- fill="none"
11
- viewBox="0 0 24 24"
12
- stroke="currentColor"
13
- {...props}
14
- >
15
- <title>{props.title}</title>
16
- <path
17
- stroke-linecap="round"
18
- stroke-linejoin="round"
19
- stroke-width="2"
20
- d="M14 5l7 7m0 0l-7 7m7-7H3"
21
- />
22
- </svg>
23
- );
24
- }
25
-
26
- export function ArrowLeftIcon(
27
- props: JSX.IntrinsicElements["svg"] & { title: string },
28
- ): JSX.Element {
29
- return (
30
- <svg
31
- xmlns="http://www.w3.org/2000/svg"
32
- fill="none"
33
- viewBox="0 0 24 24"
34
- stroke="currentColor"
35
- {...props}
36
- >
37
- <title>{props.title}</title>
38
- <path
39
- stroke-linecap="round"
40
- stroke-linejoin="round"
41
- stroke-width="2"
42
- d="M10 19l-7-7m0 0l7-7m-7 7h18"
43
- />
44
- </svg>
45
- );
46
- }
47
-
48
- export function RefreshIcon(props: JSX.IntrinsicElements["svg"] & { title: string }): JSX.Element {
49
- return (
50
- <svg
51
- xmlns="http://www.w3.org/2000/svg"
52
- fill="none"
53
- viewBox="0 0 24 24"
54
- stroke="currentColor"
55
- {...props}
56
- >
57
- <title>{props.title}</title>
58
- <path
59
- stroke-linecap="round"
60
- stroke-linejoin="round"
61
- stroke-width="2"
62
- d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"
63
- />
64
- </svg>
65
- );
66
- }
67
-
68
- export function ViewCompiledIcon(
69
- props: JSX.IntrinsicElements["svg"] & { title: string },
70
- ): JSX.Element {
71
- return (
72
- <svg
73
- xmlns="http://www.w3.org/2000/svg"
74
- fill="none"
75
- viewBox="0 0 24 24"
76
- stroke="currentColor"
77
- {...props}
78
- >
79
- <title>{props.title}</title>
80
- <path
81
- stroke-linecap="round"
82
- stroke-linejoin="round"
83
- stroke-width="2"
84
- d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"
85
- />
86
- <path
87
- stroke-linecap="round"
88
- stroke-linejoin="round"
89
- stroke-width="2"
90
- d="M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"
91
- />
92
- </svg>
93
- );
94
- }
95
-
96
- export function ViewOriginalIcon(
97
- props: JSX.IntrinsicElements["svg"] & { title: string },
98
- ): JSX.Element {
99
- return (
100
- <svg
101
- xmlns="http://www.w3.org/2000/svg"
102
- fill="none"
103
- viewBox="0 0 24 24"
104
- stroke="currentColor"
105
- {...props}
106
- >
107
- <title>{props.title}</title>
108
- <path
109
- stroke-linecap="round"
110
- stroke-linejoin="round"
111
- stroke-width="2"
112
- d="M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21"
113
- />
114
- </svg>
115
- );
116
- }
117
-
118
- export function CameraIcon(props: JSX.IntrinsicElements["svg"] & { title: string }): JSX.Element {
119
- return (
120
- <svg
121
- xmlns="http://www.w3.org/2000/svg"
122
- fill="currentColor"
123
- viewBox="0 0 24 24"
124
- stroke="none"
125
- {...props}
126
- >
127
- <title>{props.title}</title>
128
- <path d="M12 9a3.75 3.75 0 1 0 0 7.5A3.75 3.75 0 0 0 12 9Z" />
129
- <path
130
- fill-rule="evenodd"
131
- d="M9.344 3.071a49.52 49.52 0 0 1 5.312 0c.967.052 1.83.585 2.332 1.39l.821 1.317c.24.383.645.643 1.11.71.386.054.77.113 1.152.177 1.432.239 2.429 1.493 2.429 2.909V18a3 3 0 0 1-3 3h-15a3 3 0 0 1-3-3V9.574c0-1.416.997-2.67 2.429-2.909.382-.064.766-.123 1.151-.178a1.56 1.56 0 0 0 1.11-.71l.822-1.315a2.942 2.942 0 0 1 2.332-1.39ZM6.75 12.75a5.25 5.25 0 1 1 10.5 0 5.25 5.25 0 0 1-10.5 0Zm12-1.5a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z"
132
- clip-rule="evenodd"
133
- />
134
- </svg>
135
- );
136
- }
137
-
138
- export function DiscordIcon(props: JSX.IntrinsicElements["svg"] & { title: string }): JSX.Element {
139
- return (
140
- <svg
141
- xmlns="http://www.w3.org/2000/svg"
142
- fill="currentColor"
143
- viewBox="0 0 24 24"
144
- stroke="none"
145
- {...props}
146
- >
147
- <title>{props.title}</title>
148
- <path d="M14.82 4.26a10.14 10.14 0 0 0-.53 1.1 14.66 14.66 0 0 0-4.58 0 10.14 10.14 0 0 0-.53-1.1 16 16 0 0 0-4.13 1.3 17.33 17.33 0 0 0-3 11.59 16.6 16.6 0 0 0 5.07 2.59A12.89 12.89 0 0 0 8.23 18a9.65 9.65 0 0 1-1.71-.83 3.39 3.39 0 0 0 .42-.33 11.66 11.66 0 0 0 10.12 0q.21.18.42.33a10.84 10.84 0 0 1-1.71.84 12.41 12.41 0 0 0 1.08 1.78 16.44 16.44 0 0 0 5.06-2.59 17.22 17.22 0 0 0-3-11.59 16.09 16.09 0 0 0-4.09-1.35zM8.68 14.81a1.94 1.94 0 0 1-1.8-2 1.93 1.93 0 0 1 1.8-2 1.93 1.93 0 0 1 1.8 2 1.93 1.93 0 0 1-1.8 2zm6.64 0a1.94 1.94 0 0 1-1.8-2 1.93 1.93 0 0 1 1.8-2 1.92 1.92 0 0 1 1.8 2 1.92 1.92 0 0 1-1.8 2z"></path>
149
- </svg>
150
- );
151
- }
152
-
153
- export function GithubIcon(props: JSX.IntrinsicElements["svg"] & { title: string }): JSX.Element {
154
- return (
155
- <svg
156
- xmlns="http://www.w3.org/2000/svg"
157
- fill="currentColor"
158
- viewBox="0 0 24 24"
159
- stroke="none"
160
- {...props}
161
- >
162
- <title>{props.title}</title>
163
- <path
164
- fill-rule="evenodd"
165
- clip-rule="evenodd"
166
- d="M12.026 2c-5.509 0-9.974 4.465-9.974 9.974 0 4.406 2.857 8.145 6.821 9.465.499.09.679-.217.679-.481 0-.237-.008-.865-.011-1.696-2.775.602-3.361-1.338-3.361-1.338-.452-1.152-1.107-1.459-1.107-1.459-.905-.619.069-.605.069-.605 1.002.07 1.527 1.028 1.527 1.028.89 1.524 2.336 1.084 2.902.829.091-.645.351-1.085.635-1.334-2.214-.251-4.542-1.107-4.542-4.93 0-1.087.389-1.979 1.024-2.675-.101-.253-.446-1.268.099-2.64 0 0 .837-.269 2.742 1.021a9.582 9.582 0 0 1 2.496-.336 9.554 9.554 0 0 1 2.496.336c1.906-1.291 2.742-1.021 2.742-1.021.545 1.372.203 2.387.099 2.64.64.696 1.024 1.587 1.024 2.675 0 3.833-2.33 4.675-4.552 4.922.355.308.675.916.675 1.846 0 1.334-.012 2.41-.012 2.737 0 .267.178.577.687.479C19.146 20.115 22 16.379 22 11.974 22 6.465 17.535 2 12.026 2z"
167
- ></path>
168
- </svg>
169
- );
170
- }
171
-
172
- export function SolidStartIcon(
173
- props: JSX.IntrinsicElements["svg"] & { title: string },
174
- ): JSX.Element {
175
- return (
176
- <svg viewBox="0 0 701 701" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}>
177
- <title>{props.title}</title>
178
- <g filter="url(#filter0_d_1_2)">
179
- <rect width="693" height="693" transform="translate(4)" fill="white" />
180
- <mask
181
- id="mask0_1_2"
182
- style="mask-type:luminance"
183
- maskUnits="userSpaceOnUse"
184
- x="323"
185
- y="556"
186
- width="174"
187
- height="72"
188
- >
189
- <path
190
- d="M323.508 627.978L435.81 619.384C435.81 619.384 474.315 613.168 496.842 576.082L417.413 556.809L323.508 627.978Z"
191
- fill="white"
192
- />
193
- </mask>
194
- <g mask="url(#mask0_1_2)">
195
- <path
196
- d="M510.734 559.645L490 661.769L309.658 625.183L330.349 523.018L510.734 559.645Z"
197
- fill="url(#paint0_linear_1_2)"
198
- />
199
- </g>
200
- <mask
201
- id="mask1_1_2"
202
- style="mask-type:luminance"
203
- maskUnits="userSpaceOnUse"
204
- x="73"
205
- y="364"
206
- width="424"
207
- height="220"
208
- >
209
- <path
210
- d="M168.488 364.785C135.031 366.371 73.2477 372.295 73.2477 372.295L342.489 567.989L403.813 583.341L496.884 576.124L225.974 380.096C225.974 380.096 204.072 364.66 172.91 364.66C171.491 364.66 169.989 364.702 168.488 364.785Z"
211
- fill="white"
212
- />
213
- </mask>
214
- <g mask="url(#mask1_1_2)">
215
- <path
216
- d="M192.016 773.57L-24.954 425.942L378.115 174.389L595.085 522.017L192.016 773.57Z"
217
- fill="url(#paint1_linear_1_2)"
218
- />
219
- </g>
220
- <mask
221
- id="mask2_1_2"
222
- style="mask-type:luminance"
223
- maskUnits="userSpaceOnUse"
224
- x="515"
225
- y="255"
226
- width="179"
227
- height="71"
228
- >
229
- <path
230
- d="M515.573 325.822L631.254 318.688C631.254 318.688 670.885 312.931 693.621 275.928L611.438 255.487L515.573 325.822Z"
231
- fill="white"
232
- />
233
- </mask>
234
- <g mask="url(#mask2_1_2)">
235
- <path
236
- d="M557.832 401.58L485.62 272.174L651.32 179.729L723.532 309.135L557.832 401.58Z"
237
- fill="url(#paint2_linear_1_2)"
238
- />
239
- </g>
240
- <mask
241
- id="mask3_1_2"
242
- style="mask-type:luminance"
243
- maskUnits="userSpaceOnUse"
244
- x="254"
245
- y="59"
246
- width="440"
247
- height="223"
248
- >
249
- <path
250
- d="M352.251 59.0417C317.751 60.1681 254.132 65.2993 254.132 65.2993L534.345 265.666L597.755 281.936L693.621 275.928L411.697 75.2279C411.697 75.2279 388.294 59 355.505 59C354.42 59 353.335 59 352.251 59.0417Z"
251
- fill="white"
252
- />
253
- </mask>
254
- <g mask="url(#mask3_1_2)">
255
- <path
256
- d="M623.161 -102.236L775.386 246.226L324.592 443.172L172.325 94.7097L623.161 -102.236Z"
257
- fill="url(#paint3_linear_1_2)"
258
- />
259
- </g>
260
- <mask
261
- id="mask4_1_2"
262
- style="mask-type:luminance"
263
- maskUnits="userSpaceOnUse"
264
- x="6"
265
- y="371"
266
- width="396"
267
- height="257"
268
- >
269
- <path
270
- d="M6.62575 415.555C6.41717 415.889 6.20858 416.264 6 416.64L79.6305 469.912L153.261 523.185L275.909 611.917C317.125 641.744 373.318 628.895 401.393 583.215L326.762 529.234L252.13 475.252L130.483 387.229C115.632 376.508 98.8203 371.377 82.1335 371.377C53.0567 371.335 24.272 386.895 6.62575 415.555Z"
271
- fill="white"
272
- />
273
- </mask>
274
- <g mask="url(#mask4_1_2)">
275
- <path
276
- d="M529.756 464.03L265.855 829.387L-122.321 549.008L141.538 183.65L529.756 464.03Z"
277
- fill="url(#paint4_linear_1_2)"
278
- />
279
- </g>
280
- <mask
281
- id="mask5_1_2"
282
- style="mask-type:luminance"
283
- maskUnits="userSpaceOnUse"
284
- x="187"
285
- y="64"
286
- width="411"
287
- height="263"
288
- >
289
- <path
290
- d="M188.47 108.101C188.261 108.476 188.053 108.81 187.844 109.186L264.478 163.751L341.112 218.317L468.725 309.177C511.61 339.714 569.388 327.532 597.755 281.977L520.078 226.661L442.401 171.386L315.832 81.2352C300.063 70.0133 282.25 64.6318 264.645 64.6318C235.026 64.6318 206.074 79.9002 188.47 108.101Z"
291
- fill="white"
292
- />
293
- </mask>
294
- <g mask="url(#mask5_1_2)">
295
- <path
296
- d="M685.945 96.6704L550.031 471.164L99.6544 307.675L235.527 -66.8184L685.945 96.6704Z"
297
- fill="url(#paint5_linear_1_2)"
298
- />
299
- </g>
300
- <mask
301
- id="mask6_1_2"
302
- style="mask-type:luminance"
303
- maskUnits="userSpaceOnUse"
304
- x="134"
305
- y="164"
306
- width="419"
307
- height="344"
308
- >
309
- <path
310
- d="M134.363 170.051L233.149 278.64C237.571 284.856 242.744 290.571 248.626 295.66L441.567 507.791L537.432 501.784C565.8 456.229 554.036 394.53 511.151 363.993L383.539 273.133L306.863 218.567L230.229 164.002L134.363 170.051Z"
311
- fill="white"
312
- />
313
- </mask>
314
- <g mask="url(#mask6_1_2)">
315
- <path
316
- d="M291.886 715.5L-31.1699 289.528L408.235 -43.7072L731.291 382.265L291.886 715.5Z"
317
- fill="url(#paint6_linear_1_2)"
318
- />
319
- </g>
320
- <mask
321
- id="mask7_1_2"
322
- style="mask-type:luminance"
323
- maskUnits="userSpaceOnUse"
324
- x="118"
325
- y="170"
326
- width="340"
327
- height="338"
328
- >
329
- <path
330
- d="M133.696 171.094C105.703 216.065 117.301 276.971 159.644 307.091L286.255 397.241L363.932 452.516L441.609 507.791C469.976 462.236 458.212 400.537 415.327 370L287.631 279.141L210.997 224.575L134.363 170.051C134.154 170.384 133.904 170.718 133.696 171.094Z"
331
- fill="white"
332
- />
333
- </mask>
334
- <g mask="url(#mask7_1_2)">
335
- <path
336
- d="M606.057 239.009L395.553 654.635L-30.4607 438.833L180.043 23.2069L606.057 239.009Z"
337
- fill="url(#paint7_linear_1_2)"
338
- />
339
- </g>
340
- </g>
341
- <defs>
342
- <filter
343
- id="filter0_d_1_2"
344
- x="0"
345
- y="0"
346
- width="701"
347
- height="701"
348
- filterUnits="userSpaceOnUse"
349
- color-interpolation-filters="sRGB"
350
- >
351
- <feFlood flood-opacity="0" result="BackgroundImageFix" />
352
- <feColorMatrix
353
- in="SourceAlpha"
354
- type="matrix"
355
- values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"
356
- result="hardAlpha"
357
- />
358
- <feOffset dy="4" />
359
- <feGaussianBlur stdDeviation="2" />
360
- <feComposite in2="hardAlpha" operator="out" />
361
- <feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0" />
362
- <feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1_2" />
363
- <feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1_2" result="shape" />
364
- </filter>
365
- <linearGradient
366
- id="paint0_linear_1_2"
367
- x1="522.269"
368
- y1="40.5341"
369
- x2="374.272"
370
- y2="769.949"
371
- gradientUnits="userSpaceOnUse"
372
- >
373
- <stop stop-color="#1593F5" />
374
- <stop offset="1" stop-color="#0084CE" />
375
- </linearGradient>
376
- <linearGradient
377
- id="paint1_linear_1_2"
378
- x1="507.729"
379
- y1="830.625"
380
- x2="-112.45"
381
- y2="-163.072"
382
- gradientUnits="userSpaceOnUse"
383
- >
384
- <stop stop-color="#1593F5" />
385
- <stop offset="1" stop-color="#0084CE" />
386
- </linearGradient>
387
- <linearGradient
388
- id="paint2_linear_1_2"
389
- x1="915.255"
390
- y1="847.35"
391
- x2="541.738"
392
- y2="177.838"
393
- gradientUnits="userSpaceOnUse"
394
- >
395
- <stop stop-color="white" />
396
- <stop offset="1" stop-color="#15ABFF" />
397
- </linearGradient>
398
- <linearGradient
399
- id="paint3_linear_1_2"
400
- x1="254.189"
401
- y1="-332.587"
402
- x2="571.326"
403
- y2="393.304"
404
- gradientUnits="userSpaceOnUse"
405
- >
406
- <stop stop-color="white" />
407
- <stop offset="1" stop-color="#79CFFF" />
408
- </linearGradient>
409
- <linearGradient
410
- id="paint4_linear_1_2"
411
- x1="610.213"
412
- y1="-56.2573"
413
- x2="106.317"
414
- y2="641.444"
415
- gradientUnits="userSpaceOnUse"
416
- >
417
- <stop stop-color="#0057E5" />
418
- <stop offset="1" stop-color="#0084CE" />
419
- </linearGradient>
420
- <linearGradient
421
- id="paint5_linear_1_2"
422
- x1="496.212"
423
- y1="-82.6564"
424
- x2="337.643"
425
- y2="354.288"
426
- gradientUnits="userSpaceOnUse"
427
- >
428
- <stop stop-color="white" />
429
- <stop offset="1" stop-color="#15ABFF" />
430
- </linearGradient>
431
- <linearGradient
432
- id="paint6_linear_1_2"
433
- x1="693.692"
434
- y1="789.133"
435
- x2="-102.675"
436
- y2="-260.944"
437
- gradientUnits="userSpaceOnUse"
438
- >
439
- <stop stop-color="white" />
440
- <stop offset="1" stop-color="#79CFFF" />
441
- </linearGradient>
442
- <linearGradient
443
- id="paint7_linear_1_2"
444
- x1="555.118"
445
- y1="-188.777"
446
- x2="146.363"
447
- y2="618.161"
448
- gradientUnits="userSpaceOnUse"
449
- >
450
- <stop stop-color="white" />
451
- <stop offset="1" stop-color="#79CFFF" />
452
- </linearGradient>
453
- </defs>
454
- </svg>
455
- );
456
- }
@@ -1,63 +0,0 @@
1
- // @refresh skip
2
- import {
3
- createEffect,
4
- createSignal,
5
- ErrorBoundary,
6
- type JSX,
7
- onCleanup,
8
- resetErrorBoundaries,
9
- Show,
10
- } from "solid-js";
11
- import clientOnly from "../clientOnly.ts";
12
- import { HttpStatusCode } from "../HttpStatusCode.ts";
13
-
14
- export interface DevOverlayProps {
15
- children?: JSX.Element;
16
- }
17
-
18
- const DevOverlayDialog = import.meta.env.PROD
19
- ? () => <></>
20
- : clientOnly(() => import("./DevOverlayDialog"), { lazy: true });
21
-
22
- export function DevOverlay(props: DevOverlayProps): JSX.Element {
23
- const [errors, setErrors] = createSignal<unknown[]>([]);
24
-
25
- function resetError() {
26
- setErrors([]);
27
- resetErrorBoundaries();
28
- }
29
-
30
- function pushError(error: unknown) {
31
- console.error(error);
32
- setErrors(current => [error, ...current]);
33
- }
34
-
35
- createEffect(() => {
36
- const onErrorEvent = (error: ErrorEvent) => {
37
- pushError(error.error ?? error);
38
- };
39
-
40
- window.addEventListener("error", onErrorEvent);
41
-
42
- onCleanup(() => {
43
- window.removeEventListener("error", onErrorEvent);
44
- });
45
- });
46
-
47
- return (
48
- <>
49
- <ErrorBoundary
50
- fallback={error => {
51
- pushError(error);
52
- return <HttpStatusCode code={500} />;
53
- }}
54
- >
55
- {props.children}
56
- </ErrorBoundary>
57
- <Show when={errors().length}>
58
- <HttpStatusCode code={500} />
59
- <DevOverlayDialog errors={errors()} resetError={resetError} />
60
- </Show>
61
- </>
62
- );
63
- }