@solidjs/start 2.0.0-alpha.1 → 2.0.0-alpha.3

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 (119) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/dist/config/constants.d.ts +1 -1
  3. package/dist/config/constants.js +1 -1
  4. package/dist/config/dev-server.js +18 -0
  5. package/dist/config/env.d.ts +19 -0
  6. package/dist/config/env.js +81 -0
  7. package/dist/config/fs-routes/fs-watcher.js +14 -20
  8. package/dist/config/fs-routes/index.js +2 -2
  9. package/dist/config/fs-routes/router.js +7 -8
  10. package/dist/config/index.d.ts +16 -1
  11. package/dist/config/index.js +30 -29
  12. package/dist/config/lazy.js +35 -5
  13. package/dist/config/manifest.js +40 -6
  14. package/dist/config/vite-utils.d.ts +6 -1
  15. package/dist/config/vite-utils.js +7 -3
  16. package/dist/directives/bubble-function-declaration.d.ts +3 -0
  17. package/dist/directives/bubble-function-declaration.js +23 -0
  18. package/dist/directives/compile.d.ts +9 -0
  19. package/dist/directives/compile.js +40 -0
  20. package/dist/directives/generate-unique-name.d.ts +3 -0
  21. package/dist/directives/generate-unique-name.js +16 -0
  22. package/dist/directives/get-descriptive-name.d.ts +2 -0
  23. package/dist/directives/get-descriptive-name.js +37 -0
  24. package/dist/directives/get-import-identifier.d.ts +4 -0
  25. package/dist/directives/get-import-identifier.js +19 -0
  26. package/dist/directives/get-root-statement-path.d.ts +2 -0
  27. package/dist/directives/get-root-statement-path.js +12 -0
  28. package/dist/directives/index.d.ts +14 -0
  29. package/dist/directives/index.js +169 -0
  30. package/dist/directives/is-statement-top-level.d.ts +3 -0
  31. package/dist/directives/is-statement-top-level.js +9 -0
  32. package/dist/directives/paths.d.ts +9 -0
  33. package/dist/directives/paths.js +36 -0
  34. package/dist/directives/plugin.d.ts +21 -0
  35. package/dist/directives/plugin.js +302 -0
  36. package/dist/directives/remove-unused-variables.d.ts +3 -0
  37. package/dist/directives/remove-unused-variables.js +53 -0
  38. package/dist/directives/types.d.ts +10 -0
  39. package/dist/directives/xxhash32.d.ts +6 -0
  40. package/dist/directives/xxhash32.js +193 -0
  41. package/dist/{server/server-runtime.d.ts → fns/client.d.ts} +1 -1
  42. package/dist/fns/client.js +106 -0
  43. package/dist/fns/handler.d.ts +5 -0
  44. package/dist/{server/server-functions-handler.js → fns/handler.js} +55 -96
  45. package/dist/fns/registration.d.ts +2 -0
  46. package/dist/fns/registration.js +12 -0
  47. package/dist/fns/serialization.d.ts +6 -0
  48. package/dist/fns/serialization.js +208 -0
  49. package/dist/fns/server.d.ts +7 -0
  50. package/dist/{server/server-fns-runtime.js → fns/server.js} +7 -1
  51. package/dist/fns/shared.d.ts +17 -0
  52. package/dist/fns/shared.js +105 -0
  53. package/dist/http/index.d.ts +1 -1
  54. package/dist/middleware/index.d.ts +20 -0
  55. package/dist/middleware/index.js +21 -1
  56. package/dist/server/StartServer.jsx +2 -0
  57. package/dist/server/assets/PatchVirtualDevStyles.d.ts +4 -0
  58. package/dist/server/assets/PatchVirtualDevStyles.jsx +28 -0
  59. package/dist/server/collect-styles.js +9 -21
  60. package/dist/server/handler.d.ts +61 -3
  61. package/dist/server/handler.js +18 -15
  62. package/dist/server/spa/StartServer.jsx +2 -0
  63. package/dist/server/spa/handler.d.ts +30 -1
  64. package/dist/server/types.d.ts +1 -1
  65. package/dist/shared/dev-overlay/CodeView.jsx +4 -4
  66. package/dist/shared/dev-overlay/DevOverlayDialog.jsx +34 -34
  67. package/dist/shared/dev-overlay/index.jsx +2 -2
  68. package/dist/shared/dev-overlay/styles.css +40 -40
  69. package/package.json +27 -20
  70. package/src/config/constants.ts +1 -1
  71. package/src/config/dev-server.ts +12 -0
  72. package/src/config/env.ts +105 -0
  73. package/src/config/fs-routes/fs-watcher.ts +17 -24
  74. package/src/config/fs-routes/index.ts +2 -2
  75. package/src/config/fs-routes/router.ts +7 -8
  76. package/src/config/index.ts +44 -40
  77. package/src/config/lazy.ts +36 -5
  78. package/src/config/manifest.ts +40 -9
  79. package/src/config/vite-utils.ts +8 -4
  80. package/src/directives/bubble-function-declaration.ts +33 -0
  81. package/src/directives/compile.ts +54 -0
  82. package/src/directives/generate-unique-name.ts +22 -0
  83. package/src/directives/get-descriptive-name.ts +39 -0
  84. package/src/directives/get-import-identifier.ts +34 -0
  85. package/src/directives/get-root-statement-path.ts +14 -0
  86. package/src/directives/index.ts +232 -0
  87. package/src/directives/is-statement-top-level.ts +13 -0
  88. package/src/directives/paths.ts +63 -0
  89. package/src/directives/plugin.ts +389 -0
  90. package/src/directives/remove-unused-variables.ts +55 -0
  91. package/src/directives/types.ts +12 -0
  92. package/src/directives/xxhash32.ts +214 -0
  93. package/src/env.d.ts +1 -1
  94. package/src/fns/client.ts +141 -0
  95. package/src/fns/handler.spec.ts +85 -0
  96. package/src/{server/server-functions-handler.ts → fns/handler.ts} +65 -117
  97. package/src/fns/registration.ts +19 -0
  98. package/src/fns/serialization.ts +250 -0
  99. package/src/{server/server-fns-runtime.ts → fns/server.ts} +17 -2
  100. package/src/fns/shared.ts +116 -0
  101. package/src/middleware/index.ts +21 -1
  102. package/src/server/StartServer.tsx +2 -0
  103. package/src/server/assets/PatchVirtualDevStyles.tsx +31 -0
  104. package/src/server/collect-styles.ts +9 -26
  105. package/src/server/handler.ts +20 -16
  106. package/src/server/spa/StartServer.tsx +2 -0
  107. package/src/server/types.ts +1 -1
  108. package/src/shared/dev-overlay/CodeView.tsx +5 -7
  109. package/src/shared/dev-overlay/DevOverlayDialog.tsx +34 -34
  110. package/src/shared/dev-overlay/get-source-map.ts +1 -1
  111. package/src/shared/dev-overlay/index.tsx +4 -4
  112. package/src/shared/dev-overlay/styles.css +40 -40
  113. package/tsconfig.json +1 -0
  114. package/dist/server/fetchEvent.spec.js +0 -65
  115. package/dist/server/server-fns-runtime.d.ts +0 -1
  116. package/dist/server/server-functions-handler.d.ts +0 -2
  117. package/dist/server/server-runtime.js +0 -194
  118. package/src/server/server-runtime.ts +0 -240
  119. /package/dist/{server/fetchEvent.spec.d.ts → directives/types.js} +0 -0
@@ -5,6 +5,7 @@ import App from "solid-start:app";
5
5
 
6
6
  import { ErrorBoundary, TopErrorBoundary } from "../shared/ErrorBoundary.tsx";
7
7
  import { useAssets } from "./assets/index.ts";
8
+ import PatchVirtualDevStyles from "./assets/PatchVirtualDevStyles.tsx";
8
9
  import { getSsrManifest } from "./manifest/ssr-manifest.ts";
9
10
  import type { DocumentComponentProps, PageEvent } from "./types.ts";
10
11
 
@@ -29,6 +30,7 @@ export function StartServer(props: { document: Component<DocumentComponentProps>
29
30
  assets={<HydrationScript />}
30
31
  scripts={
31
32
  <>
33
+ <PatchVirtualDevStyles nonce={nonce} />
32
34
  <script
33
35
  type="module"
34
36
  nonce={nonce}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Patches the data-vite-dev-id attribute for style tags of virtual modules
3
+ *
4
+ * Per Vite's convention, virtual module ids are prefixed with \0 (null byte):
5
+ * https://vite.dev/guide/api-plugin#virtual-modules-convention
6
+ *
7
+ * However this null byte cannot be server rendered properly.
8
+ * Vite client runtime then fails to find style's with wrong null bytes,
9
+ * and instead inserts duplicate style's.
10
+ *
11
+ * This patch replaces the serializable /@id/__x00__ with the proper null byte,
12
+ * and has to run before Vite's client runtime:
13
+ * https://github.com/vitejs/vite/blob/130e7181a55c524383c63bbfb1749d0ff7185cad/packages/vite/src/client/client.ts#L529
14
+ *
15
+ * TODO: This should be solved in Vite directly!
16
+ */
17
+ const patch = function () {
18
+ document.querySelectorAll<HTMLElement>("style[data-vite-dev-id]").forEach(function (el) {
19
+ el.setAttribute("data-vite-dev-id", el.dataset.viteDevId!.replace("/@id/__x00__", "\0"));
20
+ });
21
+ };
22
+
23
+ const serializedPatch = `(${patch.toString()})();`;
24
+
25
+ const PatchVirtualDevStyles = (props: { nonce?: string }) => {
26
+ if (!import.meta.env.PROD) {
27
+ return <script nonce={props.nonce} innerHTML={serializedPatch} />;
28
+ }
29
+ };
30
+
31
+ export default PatchVirtualDevStyles;
@@ -1,30 +1,12 @@
1
1
  import path from "node:path";
2
- import { resolve } from "pathe";
3
2
  import type { DevEnvironment, EnvironmentModuleNode } from "vite";
4
3
 
5
- async function getViteModuleNode(vite: DevEnvironment, file: string) {
6
- let nodePath = file;
7
- let node = vite.moduleGraph.getModuleById(file);
8
-
9
- if (!node) {
10
- const resolvedId = await vite.pluginContainer.resolveId(file, undefined);
11
- if (!resolvedId) return;
12
-
13
- nodePath = resolvedId.id;
14
- node = vite.moduleGraph.getModuleById(file);
15
- }
16
-
17
- if (!node) {
18
- nodePath = resolve(nodePath);
19
- node = await vite.moduleGraph.getModuleByUrl(file);
20
- }
21
-
22
- if (!node) {
23
- await vite.moduleGraph.ensureEntryFromUrl(nodePath, false);
24
- node = vite.moduleGraph.getModuleById(nodePath);
25
- }
26
-
27
- return node;
4
+ async function getViteModuleNode(vite: DevEnvironment, file: string, importer?: string) {
5
+ try {
6
+ const res = await vite.fetchModule(file, importer);
7
+ if (!("id" in res)) return;
8
+ return vite.moduleGraph.getModuleById(res.id);
9
+ } catch (err) {}
28
10
  }
29
11
 
30
12
  async function findModuleDependencies(
@@ -32,9 +14,10 @@ async function findModuleDependencies(
32
14
  file: string,
33
15
  deps: Set<EnvironmentModuleNode>,
34
16
  crawledFiles = new Set<string>(),
17
+ importer?: string,
35
18
  ) {
36
19
  crawledFiles.add(file);
37
- const module = await getViteModuleNode(vite, file);
20
+ const module = await getViteModuleNode(vite, file, importer);
38
21
  if (!module?.id || deps.has(module)) return;
39
22
 
40
23
  deps.add(module);
@@ -53,7 +36,7 @@ async function findModuleDependencies(
53
36
  if (crawledFiles.has(dep)) {
54
37
  continue;
55
38
  }
56
- await findModuleDependencies(vite, dep, deps, crawledFiles);
39
+ await findModuleDependencies(vite, dep, deps, crawledFiles, module.id);
57
40
  }
58
41
  }
59
42
 
@@ -9,7 +9,7 @@ import { createRoutes } from "../router.tsx";
9
9
  import { decorateHandler, decorateMiddleware } from "./fetchEvent.ts";
10
10
  import { getSsrManifest } from "./manifest/ssr-manifest.ts";
11
11
  import { matchAPIRoute } from "./routes.ts";
12
- import { handleServerFunction } from "./server-functions-handler.ts";
12
+ import { handleServerFunction } from "../fns/handler.ts";
13
13
  import type { APIEvent, FetchEvent, HandlerOptions, PageEvent } from "./types.ts";
14
14
  import { getExpectedRedirectStatus } from "./util.ts";
15
15
 
@@ -43,21 +43,23 @@ export function createBaseHandler(
43
43
  const mod = await match.handler.import();
44
44
  const fn =
45
45
  event.request.method === "HEAD" ? mod["HEAD"] || mod["GET"] : mod[event.request.method];
46
- (event as APIEvent).params = match.params || {};
47
- // @ts-expect-error
48
- sharedConfig.context = { event };
49
- const res = await fn!(event);
50
- if (res !== undefined) {
51
- if (res instanceof Response) return produceResponseWithEventHeaders(res);
52
-
53
- return res;
46
+ if (typeof fn === "function") {
47
+ (event as APIEvent).params = match.params || {};
48
+ // @ts-expect-error
49
+ sharedConfig.context = { event };
50
+ const res = await fn(event);
51
+ if (res !== undefined) {
52
+ if (res instanceof Response) return produceResponseWithEventHeaders(res);
53
+
54
+ return res;
55
+ }
56
+ if (event.request.method !== "GET") {
57
+ throw new Error(
58
+ `API handler for ${event.request.method} "${event.request.url}" did not return a response.`,
59
+ );
60
+ }
61
+ if (!match.isPage) return;
54
62
  }
55
- if (event.request.method !== "GET") {
56
- throw new Error(
57
- `API handler for ${event.request.method} "${event.request.url}" did not return a response.`,
58
- );
59
- }
60
- if (!match.isPage) return;
61
63
  }
62
64
 
63
65
  const context = await createPageEvent(event);
@@ -79,6 +81,8 @@ export function createBaseHandler(
79
81
  return redirect(context.response.headers.get("Location")!, status);
80
82
  }
81
83
 
84
+ event.response.headers.set("content-type", "text/html");
85
+
82
86
  return html;
83
87
  }
84
88
 
@@ -209,7 +213,7 @@ function handleStreamCompleteRedirect(context: PageEvent) {
209
213
  return ({ write }: { write: (html: string) => void }) => {
210
214
  context.complete = true;
211
215
  const to = context.response && context.response.headers.get("Location");
212
- to && write(`<script>window.location="${to}"</script>`);
216
+ to && write(`<script>window.location=${JSON.stringify(to).replace(/</g, "\\u003c")}</script>`);
213
217
  };
214
218
  }
215
219
 
@@ -6,6 +6,7 @@ import { getSsrManifest } from "../manifest/ssr-manifest.ts";
6
6
 
7
7
  import { TopErrorBoundary } from "../../shared/ErrorBoundary.tsx";
8
8
  import { useAssets } from "../assets/index.ts";
9
+ import PatchVirtualDevStyles from "../assets/PatchVirtualDevStyles.tsx";
9
10
  import type { DocumentComponentProps, PageEvent } from "../types.ts";
10
11
 
11
12
  const docType = ssr("<!DOCTYPE html>");
@@ -27,6 +28,7 @@ export function StartServer(props: { document: Component<DocumentComponentProps>
27
28
  <props.document
28
29
  scripts={
29
30
  <>
31
+ <PatchVirtualDevStyles nonce={nonce} />
30
32
  <script
31
33
  type="module"
32
34
  src={getSsrManifest("client").path(import.meta.env.START_CLIENT_ENTRY)}
@@ -69,7 +69,7 @@ export interface APIEvent extends FetchEvent {
69
69
  params: { [key: string]: string };
70
70
  }
71
71
 
72
- export type APIHandler = (event: APIEvent) => Promise<any>;
72
+ export type APIHandler = (event: APIEvent) => any;
73
73
 
74
74
  export interface ServerFunctionMeta {
75
75
  id: string;
@@ -1,15 +1,13 @@
1
1
  // @refresh skip
2
- import { getSingletonHighlighter, type BuiltinLanguage, type Highlighter } from "shiki";
2
+ import { type BuiltinLanguage, getSingletonHighlighter, type Highlighter } from "shiki";
3
3
  import { loadWasm } from "shiki/engine/oniguruma";
4
- import { createEffect, createResource, type JSX } from "solid-js";
5
-
6
- import url from "shiki/onig.wasm?url";
7
-
8
4
  import langJS from "shiki/langs/javascript.mjs";
9
5
  import langJSX from "shiki/langs/jsx.mjs";
10
6
  import langTSX from "shiki/langs/tsx.mjs";
11
7
  import langTS from "shiki/langs/typescript.mjs";
8
+ import url from "shiki/onig.wasm?url";
12
9
  import darkPlus from "shiki/themes/dark-plus.mjs";
10
+ import { createEffect, createResource, type JSX } from "solid-js";
13
11
 
14
12
  let HIGHLIGHTER: Highlighter;
15
13
 
@@ -74,7 +72,7 @@ export function CodeView(props: CodeViewProps): JSX.Element | null {
74
72
  for (let i = 0, len = lines.length; i < len; i++) {
75
73
  const el = lines[i] as HTMLElement;
76
74
  if (props.line - minLine() - 1 === i) {
77
- el.classList.add("dev-overlay-error-line");
75
+ el.dataset.startDevOverlayErrorLine = '';
78
76
  }
79
77
  }
80
78
  }
@@ -83,7 +81,7 @@ export function CodeView(props: CodeViewProps): JSX.Element | null {
83
81
  return (
84
82
  <div
85
83
  ref={ref}
86
- class="dev-overlay-code-view"
84
+ data-start-dev-overlay-code-view
87
85
  style={{
88
86
  "--dev-overlay-code-view-start": minLine() + 1,
89
87
  }}
@@ -2,7 +2,7 @@
2
2
  import ErrorStackParser from "error-stack-parser";
3
3
  import * as htmlToImage from "html-to-image";
4
4
  import type { JSX } from "solid-js";
5
- import { ErrorBoundary, For, Show, Suspense, createMemo, createSignal } from "solid-js";
5
+ import { createMemo, createSignal, ErrorBoundary, For, Show, Suspense } from "solid-js";
6
6
  import { Portal } from "solid-js/web";
7
7
  // @ts-ignore - terracotta module resolution issue with NodeNext
8
8
  import { Dialog, DialogOverlay, DialogPanel, Select, SelectOption } from "terracotta";
@@ -47,9 +47,9 @@ function ErrorInfo(props: ErrorInfoProps): JSX.Element {
47
47
  });
48
48
 
49
49
  return (
50
- <span class="dev-overlay-error-info">
51
- <span class="dev-overlay-error-info-name">{error().name}</span>
52
- <span class="dev-overlay-error-info-message">{error().message}</span>
50
+ <span data-start-dev-overlay-error-info>
51
+ <span data-start-dev-overlay-error-info-name>{error().name}</span>
52
+ <span data-start-dev-overlay-error-info-message>{error().message}</span>
53
53
  </span>
54
54
  );
55
55
  }
@@ -77,7 +77,7 @@ function getFilePath(source: StackFrameSource) {
77
77
 
78
78
  function CodeFallback(): JSX.Element {
79
79
  return (
80
- <div class="dev-overlay-stack-frames-code-fallback">
80
+ <div data-start-dev-overlay-stack-frames-code-fallback>
81
81
  <span>Source not available.</span>
82
82
  </div>
83
83
  );
@@ -89,8 +89,8 @@ function StackFramesContent(props: StackFramesContentProps) {
89
89
  const [selectedFrame, setSelectedFrame] = createSignal(stackframes[0]!);
90
90
 
91
91
  return (
92
- <div class="dev-overlay-stack-frames-content">
93
- <div class="dev-overlay-stack-frames-code">
92
+ <div data-start-dev-overlay-stack-frames-content>
93
+ <div data-start-dev-overlay-stack-frames-code>
94
94
  <ErrorBoundary fallback={null}>
95
95
  {(() => {
96
96
  const data = createStackFrame(selectedFrame(), () => props.isCompiled);
@@ -99,8 +99,8 @@ function StackFramesContent(props: StackFramesContentProps) {
99
99
  <Show when={data()} keyed fallback={<CodeFallback />}>
100
100
  {source => (
101
101
  <>
102
- <span class="dev-overlay-stack-frames-code-source">{source.source}</span>
103
- <div class="dev-overlay-stack-frames-code-container">
102
+ <span data-start-dev-overlay-stack-frames-code-source>{source.source}</span>
103
+ <div data-start-dev-overlay-stack-frames-code-container>
104
104
  <CodeView
105
105
  fileName={source.source}
106
106
  line={source.line}
@@ -116,7 +116,7 @@ function StackFramesContent(props: StackFramesContentProps) {
116
116
  </ErrorBoundary>
117
117
  </div>
118
118
  <Select<ErrorStackParser.StackFrame>
119
- class="dev-overlay-stack-frames"
119
+ data-start-dev-overlay-stack-frames
120
120
  value={selectedFrame()}
121
121
  onChange={setSelectedFrame}
122
122
  >
@@ -124,11 +124,11 @@ function StackFramesContent(props: StackFramesContentProps) {
124
124
  {current => (
125
125
  <ErrorBoundary
126
126
  fallback={
127
- <div class="dev-overlay-stack-frame">
128
- <span class="dev-overlay-stack-frame-function">
127
+ <div data-start-dev-overlay-stack-frame>
128
+ <span data-start-dev-overlay-stack-frame-function>
129
129
  {current.functionName ?? "<anonymous>"}
130
130
  </span>
131
- <span class="dev-overlay-stack-frame-file">
131
+ <span data-start-dev-overlay-stack-frame-file>
132
132
  {getFilePath({
133
133
  source: current.getFileName()!,
134
134
  content: "",
@@ -146,11 +146,11 @@ function StackFramesContent(props: StackFramesContentProps) {
146
146
  <Suspense>
147
147
  <Show when={data()} keyed>
148
148
  {source => (
149
- <SelectOption class="dev-overlay-stack-frame" value={current}>
150
- <span class="dev-overlay-stack-frame-function">
149
+ <SelectOption data-start-dev-overlay-stack-frame value={current}>
150
+ <span data-start-dev-overlay-stack-frame-function>
151
151
  {source.name ?? "<anonymous>"}
152
152
  </span>
153
- <span class="dev-overlay-stack-frame-file">{getFilePath(source)}</span>
153
+ <span data-start-dev-overlay-stack-frame-file>{getFilePath(source)}</span>
154
154
  </SelectOption>
155
155
  )}
156
156
  </Show>
@@ -249,44 +249,44 @@ export default function DevOverlayDialog(props: DevOverlayDialogProps): JSX.Elem
249
249
 
250
250
  return (
251
251
  <Portal>
252
- <Dialog class="dev-overlay" isOpen>
252
+ <Dialog data-start-dev-overlay isOpen>
253
253
  <div>
254
- <DialogOverlay class="dev-overlay-background" />
255
- <DialogPanel ref={setPanel} class="dev-overlay-panel-container">
256
- <div class="dev-overlay-panel">
257
- <div class="dev-overlay-navbar">
258
- <div class="dev-overlay-navbar-left">
259
- <div class="dev-overlay-version">
254
+ <DialogOverlay data-start-dev-overlay-background />
255
+ <DialogPanel ref={setPanel} data-start-dev-overlay-panel-container>
256
+ <div data-start-dev-overlay-panel>
257
+ <div data-start-dev-overlay-navbar>
258
+ <div data-start-dev-overlay-navbar-left>
259
+ <div data-start-dev-overlay-version>
260
260
  <div>
261
261
  <SolidStartIcon title="Solid Start Version" />
262
262
  </div>
263
263
  <span>{info.version as string}</span>
264
264
  </div>
265
265
  <Show when={props.errors.length > 1}>
266
- <div class="dev-overlay-pagination">
267
- <button class="dev-overlay-button" onClick={goPrev} type="button">
266
+ <div data-start-dev-overlay-pagination>
267
+ <button data-start-dev-overlay-button onClick={goPrev} type="button">
268
268
  <ArrowLeftIcon title="Go Previous" />
269
269
  </button>
270
- <div class="dev-overlay-page-counter">
270
+ <div data-start-dev-overlay-page-counter>
271
271
  {`${truncated()} of ${props.errors.length}`}
272
272
  </div>
273
- <button class="dev-overlay-button" onClick={goNext} type="button">
273
+ <button data-start-dev-overlay-button onClick={goNext} type="button">
274
274
  <ArrowRightIcon title="Go Next" />
275
275
  </button>
276
276
  </div>
277
277
  </Show>
278
278
  </div>
279
- <div class="dev-overlay-controls">
280
- <button class="dev-overlay-button" onClick={redirectToGithub} type="button">
279
+ <div data-start-dev-overlay-controls>
280
+ <button data-start-dev-overlay-button onClick={redirectToGithub} type="button">
281
281
  <GithubIcon title="Create an issue thread on Github" />
282
282
  </button>
283
- <button class="dev-overlay-button" onClick={redirectToDiscord} type="button">
283
+ <button data-start-dev-overlay-button onClick={redirectToDiscord} type="button">
284
284
  <DiscordIcon title="Join our Discord Channel" />
285
285
  </button>
286
- <button class="dev-overlay-button" onClick={downloadScreenshot} type="button">
286
+ <button data-start-dev-overlay-button onClick={downloadScreenshot} type="button">
287
287
  <CameraIcon title="Capture Error Overlay" />
288
288
  </button>
289
- <button class="dev-overlay-button" onClick={toggleIsCompiled} type="button">
289
+ <button data-start-dev-overlay-button onClick={toggleIsCompiled} type="button">
290
290
  <Show
291
291
  when={isCompiled()}
292
292
  fallback={<ViewOriginalIcon title="View Original Source" />}
@@ -294,14 +294,14 @@ export default function DevOverlayDialog(props: DevOverlayDialogProps): JSX.Elem
294
294
  <ViewCompiledIcon title="View Compiled Source" />
295
295
  </Show>
296
296
  </button>
297
- <button class="dev-overlay-button" onClick={props.resetError} type="button">
297
+ <button data-start-dev-overlay-button onClick={props.resetError} type="button">
298
298
  <RefreshIcon title="Reset Error" />
299
299
  </button>
300
300
  </div>
301
301
  </div>
302
302
  <Show when={props.errors[truncated() - 1]} keyed>
303
303
  {current => (
304
- <div class="dev-overlay-content">
304
+ <div data-start-dev-overlay-content>
305
305
  <ErrorInfo error={current} />
306
306
  <StackFrames error={current} isCompiled={isCompiled()} />
307
307
  </div>
@@ -1,4 +1,4 @@
1
- import { RawSourceMap, SourceMapConsumer } from "source-map-js";
1
+ import { type RawSourceMap, SourceMapConsumer } from "source-map-js";
2
2
 
3
3
  const INLINE_SOURCEMAP_REGEX = /^data:application\/json[^,]+base64,/;
4
4
  const SOURCEMAP_REGEX =
@@ -1,15 +1,15 @@
1
1
  // @refresh skip
2
2
  import {
3
- ErrorBoundary,
4
- Show,
5
3
  createEffect,
6
4
  createSignal,
5
+ ErrorBoundary,
6
+ type JSX,
7
7
  onCleanup,
8
8
  resetErrorBoundaries,
9
- type JSX,
9
+ Show,
10
10
  } from "solid-js";
11
- import { HttpStatusCode } from "../HttpStatusCode.ts";
12
11
  import clientOnly from "../clientOnly.ts";
12
+ import { HttpStatusCode } from "../HttpStatusCode.ts";
13
13
 
14
14
  export interface DevOverlayProps {
15
15
  children?: JSX.Element;