@solidjs/start 2.0.0-beta.1 → 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.
- package/CHANGELOG.md +64 -0
- package/dist/client/StartClient.d.ts +7 -0
- package/{src/client/StartClient.tsx → dist/client/StartClient.jsx} +7 -15
- package/dist/client/index.jsx +2 -0
- package/dist/client/mount.d.ts +1 -0
- package/dist/client/mount.js +1 -0
- package/dist/client/spa/index.d.ts +4 -0
- package/dist/client/spa/index.jsx +5 -0
- package/dist/config/boundary-modules.d.ts +14 -0
- package/dist/config/boundary-modules.js +41 -0
- package/dist/config/constants.d.ts +16 -0
- package/dist/config/constants.js +16 -0
- package/dist/config/dev-server.d.ts +4 -0
- package/dist/config/dev-server.js +146 -0
- package/dist/config/env.d.ts +19 -0
- package/dist/config/env.js +85 -0
- package/dist/config/fs-router.d.ts +37 -0
- package/dist/config/fs-router.js +148 -0
- package/dist/config/fs-routes/fs-watcher.d.ts +3 -0
- package/dist/config/fs-routes/fs-watcher.js +53 -0
- package/dist/config/fs-routes/index.d.ts +7 -0
- package/dist/config/fs-routes/index.js +107 -0
- package/dist/config/fs-routes/router.d.ts +43 -0
- package/dist/config/fs-routes/router.js +146 -0
- package/dist/config/fs-routes/tree-shake.d.ts +2 -0
- package/dist/config/fs-routes/tree-shake.js +305 -0
- package/dist/config/index.d.ts +25 -0
- package/dist/config/index.js +252 -0
- package/dist/config/lazy.d.ts +3 -0
- package/dist/config/lazy.js +114 -0
- package/dist/config/manifest.d.ts +3 -0
- package/dist/config/manifest.js +109 -0
- package/dist/config/utils.d.ts +4 -0
- package/dist/config/utils.js +6 -0
- package/dist/config/vite-utils.d.ts +21 -0
- package/dist/config/vite-utils.js +85 -0
- package/dist/directives/bubble-function-declaration.d.ts +3 -0
- package/dist/directives/bubble-function-declaration.js +23 -0
- package/dist/directives/compile.d.ts +9 -0
- package/dist/directives/compile.js +40 -0
- package/dist/directives/generate-unique-name.d.ts +3 -0
- package/dist/directives/generate-unique-name.js +16 -0
- package/dist/directives/get-descriptive-name.d.ts +2 -0
- package/dist/directives/get-descriptive-name.js +37 -0
- package/dist/directives/get-import-identifier.d.ts +4 -0
- package/dist/directives/get-import-identifier.js +19 -0
- package/dist/directives/get-root-statement-path.d.ts +2 -0
- package/dist/directives/get-root-statement-path.js +12 -0
- package/dist/directives/index.d.ts +14 -0
- package/dist/directives/index.js +202 -0
- package/dist/directives/is-statement-top-level.d.ts +3 -0
- package/dist/directives/is-statement-top-level.js +9 -0
- package/dist/directives/paths.d.ts +9 -0
- package/dist/directives/paths.js +36 -0
- package/dist/directives/plugin.d.ts +21 -0
- package/dist/directives/plugin.js +302 -0
- package/dist/directives/remove-unused-variables.d.ts +3 -0
- package/dist/directives/remove-unused-variables.js +66 -0
- package/{src/directives/types.ts → dist/directives/types.d.ts} +5 -7
- package/dist/directives/types.js +1 -0
- package/dist/directives/xxhash32.d.ts +6 -0
- package/dist/directives/xxhash32.js +193 -0
- package/dist/fns/client.d.ts +3 -0
- package/dist/fns/client.js +106 -0
- package/dist/fns/handler.d.ts +5 -0
- package/dist/fns/handler.js +305 -0
- package/dist/fns/registration.d.ts +3 -0
- package/dist/fns/registration.js +15 -0
- package/dist/fns/serialization.d.ts +6 -0
- package/dist/fns/serialization.js +208 -0
- package/dist/fns/server.d.ts +7 -0
- package/dist/fns/server.js +38 -0
- package/dist/fns/shared.d.ts +17 -0
- package/dist/fns/shared.js +105 -0
- package/dist/http/http.d.ts +81 -0
- package/dist/http/http.js +129 -0
- package/dist/http/index.d.ts +2 -0
- package/dist/http/index.js +6 -0
- package/{src/index.tsx → dist/index.d.ts} +0 -2
- package/dist/index.jsx +6 -0
- package/dist/middleware/index.d.ts +39 -0
- package/dist/middleware/index.js +60 -0
- package/dist/router.d.ts +6 -0
- package/dist/router.jsx +29 -0
- package/dist/server/StartServer.d.ts +9 -0
- package/dist/server/StartServer.jsx +34 -0
- package/dist/server/assets/PatchVirtualDevStyles.d.ts +4 -0
- package/{src/server/assets/PatchVirtualDevStyles.tsx → dist/server/assets/PatchVirtualDevStyles.jsx} +7 -10
- package/dist/server/assets/index.d.ts +2 -0
- package/dist/server/assets/index.js +52 -0
- package/dist/server/assets/render.d.ts +19 -0
- package/dist/server/assets/render.jsx +14 -0
- package/dist/server/collect-styles.d.ts +3 -0
- package/dist/server/collect-styles.js +57 -0
- package/dist/server/fetchEvent.d.ts +7 -0
- package/dist/server/fetchEvent.js +26 -0
- package/dist/server/handler.d.ts +6 -0
- package/dist/server/handler.js +218 -0
- package/dist/server/index.d.ts +9 -0
- package/{src/server/index.tsx → dist/server/index.jsx} +4 -19
- package/dist/server/manifest/client-manifest.d.ts +9 -0
- package/dist/server/manifest/client-manifest.js +6 -0
- package/dist/server/manifest/dev-client-manifest.d.ts +4 -0
- package/dist/server/manifest/dev-client-manifest.js +24 -0
- package/dist/server/manifest/dev-ssr-manifest.d.ts +5 -0
- package/dist/server/manifest/dev-ssr-manifest.js +23 -0
- package/dist/server/manifest/prod-client-manifest.d.ts +5 -0
- package/dist/server/manifest/prod-client-manifest.js +26 -0
- package/dist/server/manifest/prod-ssr-manifest.d.ts +6 -0
- package/dist/server/manifest/prod-ssr-manifest.js +85 -0
- package/dist/server/manifest/ssr-manifest.d.ts +4 -0
- package/dist/server/manifest/ssr-manifest.js +6 -0
- package/dist/server/routes.d.ts +23 -0
- package/dist/server/routes.js +74 -0
- package/dist/server/spa/StartServer.d.ts +9 -0
- package/dist/server/spa/StartServer.jsx +25 -0
- package/dist/server/spa/handler.d.ts +8 -0
- package/dist/server/spa/handler.js +20 -0
- package/{src/server/spa/index.tsx → dist/server/spa/index.d.ts} +0 -1
- package/dist/server/spa/index.jsx +5 -0
- package/dist/server/types.d.ts +75 -0
- package/dist/server/types.js +1 -0
- package/dist/server/util.d.ts +2 -0
- package/dist/server/util.js +8 -0
- package/dist/server/web-stream.d.ts +9 -0
- package/dist/server/web-stream.js +26 -0
- package/dist/shared/ErrorBoundary.d.ts +3 -0
- package/dist/shared/ErrorBoundary.jsx +36 -0
- package/dist/shared/GET.d.ts +5 -0
- package/dist/shared/GET.js +8 -0
- package/dist/shared/HttpHeader.d.ts +10 -0
- package/dist/shared/HttpHeader.jsx +38 -0
- package/dist/shared/HttpStatusCode.d.ts +9 -0
- package/dist/shared/HttpStatusCode.js +18 -0
- package/dist/shared/clientOnly.d.ts +12 -0
- package/dist/shared/clientOnly.js +27 -0
- package/dist/shared/dev-overlay/CodeView.d.ts +7 -0
- package/dist/shared/dev-overlay/CodeView.jsx +62 -0
- package/dist/shared/dev-overlay/DevOverlayDialog.d.ts +9 -0
- package/dist/shared/dev-overlay/DevOverlayDialog.jsx +226 -0
- package/dist/shared/dev-overlay/createStackFrame.d.ts +9 -0
- package/dist/shared/dev-overlay/createStackFrame.js +56 -0
- package/dist/shared/dev-overlay/download.d.ts +1 -0
- package/dist/shared/dev-overlay/download.js +6 -0
- package/dist/shared/dev-overlay/get-source-map.d.ts +2 -0
- package/dist/shared/dev-overlay/get-source-map.js +25 -0
- package/dist/shared/dev-overlay/icons.d.ts +28 -0
- package/dist/shared/dev-overlay/icons.jsx +150 -0
- package/dist/shared/dev-overlay/index.d.ts +5 -0
- package/dist/shared/dev-overlay/index.jsx +39 -0
- package/dist/shared/lazy.d.ts +3 -0
- package/dist/shared/lazy.js +42 -0
- package/dist/shared/serverFunction.d.ts +6 -0
- package/dist/shared/serverFunction.js +8 -0
- package/dist/utils/debounce.d.ts +4 -0
- package/dist/utils/debounce.js +10 -0
- package/env.d.ts +12 -0
- package/package.json +10 -5
- package/scripts/build.js +0 -15
- package/scripts/validate-imports.js +0 -316
- package/src/client/mount.ts +0 -1
- package/src/client/spa/index.tsx +0 -9
- package/src/config/constants.ts +0 -19
- package/src/config/dev-server.ts +0 -161
- package/src/config/env.ts +0 -105
- package/src/config/fs-router.ts +0 -162
- package/src/config/fs-routes/fs-watcher.ts +0 -66
- package/src/config/fs-routes/index.ts +0 -136
- package/src/config/fs-routes/router.ts +0 -184
- package/src/config/fs-routes/tree-shake.ts +0 -324
- package/src/config/index.ts +0 -239
- package/src/config/lazy.ts +0 -132
- package/src/config/manifest.ts +0 -120
- package/src/config/utils.ts +0 -5
- package/src/config/vite-utils.ts +0 -113
- package/src/directives/bubble-function-declaration.ts +0 -33
- package/src/directives/compile.ts +0 -54
- package/src/directives/generate-unique-name.ts +0 -22
- package/src/directives/get-descriptive-name.ts +0 -39
- package/src/directives/get-import-identifier.ts +0 -34
- package/src/directives/get-root-statement-path.ts +0 -14
- package/src/directives/index.ts +0 -233
- package/src/directives/is-statement-top-level.ts +0 -13
- package/src/directives/paths.ts +0 -63
- package/src/directives/plugin.ts +0 -389
- package/src/directives/remove-unused-variables.ts +0 -70
- package/src/directives/xxhash32.ts +0 -214
- package/src/env.d.ts +0 -17
- package/src/fns/client.ts +0 -141
- package/src/fns/handler.spec.ts +0 -85
- package/src/fns/handler.ts +0 -287
- package/src/fns/registration.ts +0 -19
- package/src/fns/serialization.ts +0 -250
- package/src/fns/server.ts +0 -46
- package/src/fns/shared.ts +0 -116
- package/src/http/index.ts +0 -216
- package/src/internal.d.ts +0 -14
- package/src/middleware/index.ts +0 -92
- package/src/router.tsx +0 -37
- package/src/server/StartServer.tsx +0 -58
- package/src/server/assets/index.ts +0 -70
- package/src/server/assets/render.tsx +0 -46
- package/src/server/collect-styles.ts +0 -70
- package/src/server/fetchEvent.spec.ts +0 -85
- package/src/server/fetchEvent.ts +0 -36
- package/src/server/handler.ts +0 -261
- package/src/server/manifest/client-manifest.ts +0 -8
- package/src/server/manifest/dev-client-manifest.ts +0 -21
- package/src/server/manifest/dev-ssr-manifest.ts +0 -23
- package/src/server/manifest/prod-client-manifest.ts +0 -21
- package/src/server/manifest/prod-ssr-manifest.ts +0 -109
- package/src/server/manifest/ssr-manifest.ts +0 -10
- package/src/server/routes.ts +0 -126
- package/src/server/spa/StartServer.tsx +0 -42
- package/src/server/spa/handler.ts +0 -29
- package/src/server/types.ts +0 -82
- package/src/server/util.ts +0 -12
- package/src/shared/ErrorBoundary.tsx +0 -52
- package/src/shared/GET.ts +0 -8
- package/src/shared/HttpHeader.tsx +0 -42
- package/src/shared/HttpStatusCode.ts +0 -27
- package/src/shared/clientOnly.ts +0 -44
- package/src/shared/dev-overlay/CodeView.tsx +0 -90
- package/src/shared/dev-overlay/DevOverlayDialog.tsx +0 -316
- package/src/shared/dev-overlay/createStackFrame.ts +0 -74
- package/src/shared/dev-overlay/download.ts +0 -6
- package/src/shared/dev-overlay/env.d.ts +0 -4
- package/src/shared/dev-overlay/get-source-map.ts +0 -33
- package/src/shared/dev-overlay/icons.tsx +0 -456
- package/src/shared/dev-overlay/index.tsx +0 -63
- package/src/shared/lazy.ts +0 -52
- package/src/shared/serverFunction.ts +0 -10
- package/src/utils/debounce.ts +0 -10
- package/src/virtual.d.ts +0 -27
- package/tsconfig.json +0 -24
- package/vitest.config.ts +0 -9
- /package/{src/client/index.tsx → dist/client/index.d.ts} +0 -0
- /package/{src → dist}/shared/dev-overlay/styles.css +0 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { createMemo, createSignal, onMount, sharedConfig, splitProps, untrack } from "solid-js";
|
|
2
|
+
import { isServer } from "solid-js/web";
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* Read more: https://docs.solidjs.com/solid-start/reference/client/client-only
|
|
6
|
+
*/
|
|
7
|
+
// not using Suspense
|
|
8
|
+
export default function clientOnly(fn, options = {}) {
|
|
9
|
+
if (isServer)
|
|
10
|
+
return (props) => props.fallback;
|
|
11
|
+
const [comp, setComp] = createSignal();
|
|
12
|
+
!options.lazy && load(fn, setComp);
|
|
13
|
+
return (props) => {
|
|
14
|
+
let Comp;
|
|
15
|
+
let m;
|
|
16
|
+
const [, rest] = splitProps(props, ["fallback"]);
|
|
17
|
+
options.lazy && load(fn, setComp);
|
|
18
|
+
if ((Comp = comp()) && !sharedConfig.context)
|
|
19
|
+
return Comp(rest);
|
|
20
|
+
const [mounted, setMounted] = createSignal(!sharedConfig.context);
|
|
21
|
+
onMount(() => setMounted(true));
|
|
22
|
+
return createMemo(() => ((Comp = comp()), (m = mounted()), untrack(() => (Comp && m ? Comp(rest) : props.fallback))));
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
function load(fn, setComp) {
|
|
26
|
+
fn().then(m => setComp(() => m.default));
|
|
27
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
// @refresh skip
|
|
2
|
+
import { getSingletonHighlighter } from "shiki";
|
|
3
|
+
import { loadWasm } from "shiki/engine/oniguruma";
|
|
4
|
+
import langJS from "shiki/langs/javascript.mjs";
|
|
5
|
+
import langJSX from "shiki/langs/jsx.mjs";
|
|
6
|
+
import langTSX from "shiki/langs/tsx.mjs";
|
|
7
|
+
import langTS from "shiki/langs/typescript.mjs";
|
|
8
|
+
import url from "shiki/onig.wasm?url";
|
|
9
|
+
import darkPlus from "shiki/themes/dark-plus.mjs";
|
|
10
|
+
import { createEffect, createResource } from "solid-js";
|
|
11
|
+
let HIGHLIGHTER;
|
|
12
|
+
async function loadHighlighter() {
|
|
13
|
+
if (!HIGHLIGHTER) {
|
|
14
|
+
await loadWasm(await fetch(url));
|
|
15
|
+
HIGHLIGHTER = await getSingletonHighlighter({
|
|
16
|
+
themes: [darkPlus],
|
|
17
|
+
langs: [langJS, langJSX, langTS, langTSX],
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return HIGHLIGHTER;
|
|
21
|
+
}
|
|
22
|
+
const RANGE = 8;
|
|
23
|
+
export function CodeView(props) {
|
|
24
|
+
const lines = () => props.content.split("\n").map((item, index) => ({
|
|
25
|
+
index: index + 1,
|
|
26
|
+
line: item,
|
|
27
|
+
}));
|
|
28
|
+
const minLine = () => Math.max(props.line - (1 + RANGE), 0);
|
|
29
|
+
const maxLine = () => Math.min(props.line + RANGE, lines().length - 1);
|
|
30
|
+
let ref;
|
|
31
|
+
const [data] = createResource(() => lines()
|
|
32
|
+
.slice(minLine(), maxLine())
|
|
33
|
+
.map(item => item.line)
|
|
34
|
+
.join("\n"), async (value) => {
|
|
35
|
+
const highlighter = await loadHighlighter();
|
|
36
|
+
const fileExtension = props.fileName.split(/[#?]/)[0].split(".").pop()?.trim();
|
|
37
|
+
let lang = fileExtension;
|
|
38
|
+
if (fileExtension === "mjs" || fileExtension === "cjs") {
|
|
39
|
+
lang = "js";
|
|
40
|
+
}
|
|
41
|
+
return highlighter.codeToHtml(value, {
|
|
42
|
+
theme: "dark-plus",
|
|
43
|
+
lang,
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
createEffect(() => {
|
|
47
|
+
const result = data();
|
|
48
|
+
if (ref && result) {
|
|
49
|
+
ref.innerHTML = result;
|
|
50
|
+
const lines = ref.querySelectorAll('span[class="line"]');
|
|
51
|
+
for (let i = 0, len = lines.length; i < len; i++) {
|
|
52
|
+
const el = lines[i];
|
|
53
|
+
if (props.line - minLine() - 1 === i) {
|
|
54
|
+
el.dataset.startDevOverlayErrorLine = '';
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
return (<div ref={ref} data-start-dev-overlay-code-view style={{
|
|
60
|
+
"--dev-overlay-code-view-start": minLine() + 1,
|
|
61
|
+
}}/>);
|
|
62
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { JSX } from "solid-js";
|
|
2
|
+
import "./styles.css";
|
|
3
|
+
export declare function classNames(...classes: (string | boolean | undefined)[]): string;
|
|
4
|
+
interface DevOverlayDialogProps {
|
|
5
|
+
errors: any[];
|
|
6
|
+
resetError: () => void;
|
|
7
|
+
}
|
|
8
|
+
export default function DevOverlayDialog(props: DevOverlayDialogProps): JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
// @refresh skip
|
|
2
|
+
import ErrorStackParser from "error-stack-parser";
|
|
3
|
+
import * as htmlToImage from "html-to-image";
|
|
4
|
+
import { createMemo, createSignal, ErrorBoundary, For, Show, Suspense } from "solid-js";
|
|
5
|
+
import { Portal } from "solid-js/web";
|
|
6
|
+
// @ts-ignore - terracotta module resolution issue with NodeNext
|
|
7
|
+
import { Dialog, DialogOverlay, DialogPanel, Select, SelectOption } from "terracotta";
|
|
8
|
+
import info from "../../../package.json" with { type: "json" };
|
|
9
|
+
import { CodeView } from "./CodeView.jsx";
|
|
10
|
+
import { createStackFrame } from "./createStackFrame.js";
|
|
11
|
+
import download from "./download.js";
|
|
12
|
+
import { ArrowLeftIcon, ArrowRightIcon, CameraIcon, DiscordIcon, GithubIcon, RefreshIcon, SolidStartIcon, ViewCompiledIcon, ViewOriginalIcon, } from "./icons.jsx";
|
|
13
|
+
import "./styles.css";
|
|
14
|
+
export function classNames(...classes) {
|
|
15
|
+
return classes.filter(Boolean).join(" ");
|
|
16
|
+
}
|
|
17
|
+
function ErrorInfo(props) {
|
|
18
|
+
const error = createMemo(() => {
|
|
19
|
+
const e = props.error;
|
|
20
|
+
if (e instanceof Error) {
|
|
21
|
+
return { name: e.name, message: e.message };
|
|
22
|
+
}
|
|
23
|
+
if (e instanceof ErrorEvent) {
|
|
24
|
+
return { message: e.message };
|
|
25
|
+
}
|
|
26
|
+
return { message: e.toString() };
|
|
27
|
+
});
|
|
28
|
+
return (<span data-start-dev-overlay-error-info>
|
|
29
|
+
<span data-start-dev-overlay-error-info-name>{error().name}</span>
|
|
30
|
+
<span data-start-dev-overlay-error-info-message>{error().message}</span>
|
|
31
|
+
</span>);
|
|
32
|
+
}
|
|
33
|
+
function getFileName(source) {
|
|
34
|
+
try {
|
|
35
|
+
const path = source.startsWith("/") ? new URL(source, "file://") : new URL(source);
|
|
36
|
+
const paths = path.pathname.split("/");
|
|
37
|
+
return paths[paths.length - 1];
|
|
38
|
+
}
|
|
39
|
+
catch (error) {
|
|
40
|
+
return getFileName(`/${source}`);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
function getFilePath(source) {
|
|
44
|
+
const line = source.line ? `:${source.line}` : "";
|
|
45
|
+
const column = source.column ? `:${source.column}` : "";
|
|
46
|
+
return `${getFileName(source.source)}${line}${column}`;
|
|
47
|
+
}
|
|
48
|
+
function CodeFallback() {
|
|
49
|
+
return (<div data-start-dev-overlay-stack-frames-code-fallback>
|
|
50
|
+
<span>Source not available.</span>
|
|
51
|
+
</div>);
|
|
52
|
+
}
|
|
53
|
+
function StackFramesContent(props) {
|
|
54
|
+
const stackframes = ErrorStackParser.parse(props.error);
|
|
55
|
+
const [selectedFrame, setSelectedFrame] = createSignal(stackframes[0]);
|
|
56
|
+
return (<div data-start-dev-overlay-stack-frames-content>
|
|
57
|
+
<div data-start-dev-overlay-stack-frames-code>
|
|
58
|
+
<ErrorBoundary fallback={null}>
|
|
59
|
+
{(() => {
|
|
60
|
+
const data = createStackFrame(selectedFrame(), () => props.isCompiled);
|
|
61
|
+
return (<Suspense fallback={<CodeFallback />}>
|
|
62
|
+
<Show when={data()} keyed fallback={<CodeFallback />}>
|
|
63
|
+
{source => (<>
|
|
64
|
+
<span data-start-dev-overlay-stack-frames-code-source>{source.source}</span>
|
|
65
|
+
<div data-start-dev-overlay-stack-frames-code-container>
|
|
66
|
+
<CodeView fileName={source.source} line={source.line} content={source.content}/>
|
|
67
|
+
</div>
|
|
68
|
+
</>)}
|
|
69
|
+
</Show>
|
|
70
|
+
</Suspense>);
|
|
71
|
+
})()}
|
|
72
|
+
</ErrorBoundary>
|
|
73
|
+
</div>
|
|
74
|
+
<Select data-start-dev-overlay-stack-frames value={selectedFrame()} onChange={setSelectedFrame}>
|
|
75
|
+
<For each={stackframes}>
|
|
76
|
+
{current => (<ErrorBoundary fallback={<div data-start-dev-overlay-stack-frame>
|
|
77
|
+
<span data-start-dev-overlay-stack-frame-function>
|
|
78
|
+
{current.functionName ?? "<anonymous>"}
|
|
79
|
+
</span>
|
|
80
|
+
<span data-start-dev-overlay-stack-frame-file>
|
|
81
|
+
{getFilePath({
|
|
82
|
+
source: current.getFileName(),
|
|
83
|
+
content: "",
|
|
84
|
+
line: current.getLineNumber(),
|
|
85
|
+
column: current.getColumnNumber(),
|
|
86
|
+
name: current.getFunctionName(),
|
|
87
|
+
})}
|
|
88
|
+
</span>
|
|
89
|
+
</div>}>
|
|
90
|
+
{(() => {
|
|
91
|
+
const data = createStackFrame(current, () => props.isCompiled);
|
|
92
|
+
return (<Suspense>
|
|
93
|
+
<Show when={data()} keyed>
|
|
94
|
+
{source => (<SelectOption data-start-dev-overlay-stack-frame value={current}>
|
|
95
|
+
<span data-start-dev-overlay-stack-frame-function>
|
|
96
|
+
{source.name ?? "<anonymous>"}
|
|
97
|
+
</span>
|
|
98
|
+
<span data-start-dev-overlay-stack-frame-file>{getFilePath(source)}</span>
|
|
99
|
+
</SelectOption>)}
|
|
100
|
+
</Show>
|
|
101
|
+
</Suspense>);
|
|
102
|
+
})()}
|
|
103
|
+
</ErrorBoundary>)}
|
|
104
|
+
</For>
|
|
105
|
+
</Select>
|
|
106
|
+
</div>);
|
|
107
|
+
}
|
|
108
|
+
function StackFrames(props) {
|
|
109
|
+
return (<Show when={props.error instanceof Error && props.error} keyed>
|
|
110
|
+
{current => <StackFramesContent error={current} isCompiled={props.isCompiled}/>}
|
|
111
|
+
</Show>);
|
|
112
|
+
}
|
|
113
|
+
const ISSUE_THREAD = "https://github.com/solidjs/solid-start/issues/new";
|
|
114
|
+
const DISCORD_INVITE = "https://discord.com/invite/solidjs";
|
|
115
|
+
export default function DevOverlayDialog(props) {
|
|
116
|
+
const [currentPage, setCurrentPage] = createSignal(1);
|
|
117
|
+
const [isCompiled, setIsCompiled] = createSignal(false);
|
|
118
|
+
const length = createMemo(() => props.errors.length);
|
|
119
|
+
const truncated = createMemo(() => {
|
|
120
|
+
return Math.min(currentPage(), length());
|
|
121
|
+
});
|
|
122
|
+
function goPrev() {
|
|
123
|
+
setCurrentPage(c => {
|
|
124
|
+
if (c > 1) {
|
|
125
|
+
return c - 1;
|
|
126
|
+
}
|
|
127
|
+
return length();
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
function goNext() {
|
|
131
|
+
setCurrentPage(c => {
|
|
132
|
+
if (c < length()) {
|
|
133
|
+
return c + 1;
|
|
134
|
+
}
|
|
135
|
+
return 1;
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
function toggleIsCompiled() {
|
|
139
|
+
setIsCompiled(c => !c);
|
|
140
|
+
}
|
|
141
|
+
const [panel, setPanel] = createSignal();
|
|
142
|
+
function downloadScreenshot() {
|
|
143
|
+
const current = panel();
|
|
144
|
+
if (current) {
|
|
145
|
+
htmlToImage
|
|
146
|
+
.toPng(current, {
|
|
147
|
+
style: {
|
|
148
|
+
transform: "scale(0.75)",
|
|
149
|
+
},
|
|
150
|
+
})
|
|
151
|
+
.then(url => {
|
|
152
|
+
download(url, "start-screenshot.png");
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
function redirectToGithub() {
|
|
157
|
+
const url = new URL(ISSUE_THREAD);
|
|
158
|
+
url.searchParams.append("labels", "bug");
|
|
159
|
+
url.searchParams.append("labels", "needs+triage");
|
|
160
|
+
url.searchParams.append("template", "bug.yml");
|
|
161
|
+
url.searchParams.append("title", `[Bug?]:` + props.errors[truncated() - 1].toString());
|
|
162
|
+
window.open(url, "_blank").focus();
|
|
163
|
+
}
|
|
164
|
+
function redirectToDiscord() {
|
|
165
|
+
window.open(DISCORD_INVITE, "_blank").focus();
|
|
166
|
+
}
|
|
167
|
+
return (<Portal>
|
|
168
|
+
<Dialog data-start-dev-overlay isOpen>
|
|
169
|
+
<div>
|
|
170
|
+
<DialogOverlay data-start-dev-overlay-background/>
|
|
171
|
+
<DialogPanel ref={setPanel} data-start-dev-overlay-panel-container>
|
|
172
|
+
<div data-start-dev-overlay-panel>
|
|
173
|
+
<div data-start-dev-overlay-navbar>
|
|
174
|
+
<div data-start-dev-overlay-navbar-left>
|
|
175
|
+
<div data-start-dev-overlay-version>
|
|
176
|
+
<div>
|
|
177
|
+
<SolidStartIcon title="Solid Start Version"/>
|
|
178
|
+
</div>
|
|
179
|
+
<span>{info.version}</span>
|
|
180
|
+
</div>
|
|
181
|
+
<Show when={props.errors.length > 1}>
|
|
182
|
+
<div data-start-dev-overlay-pagination>
|
|
183
|
+
<button data-start-dev-overlay-button onClick={goPrev} type="button">
|
|
184
|
+
<ArrowLeftIcon title="Go Previous"/>
|
|
185
|
+
</button>
|
|
186
|
+
<div data-start-dev-overlay-page-counter>
|
|
187
|
+
{`${truncated()} of ${props.errors.length}`}
|
|
188
|
+
</div>
|
|
189
|
+
<button data-start-dev-overlay-button onClick={goNext} type="button">
|
|
190
|
+
<ArrowRightIcon title="Go Next"/>
|
|
191
|
+
</button>
|
|
192
|
+
</div>
|
|
193
|
+
</Show>
|
|
194
|
+
</div>
|
|
195
|
+
<div data-start-dev-overlay-controls>
|
|
196
|
+
<button data-start-dev-overlay-button onClick={redirectToGithub} type="button">
|
|
197
|
+
<GithubIcon title="Create an issue thread on Github"/>
|
|
198
|
+
</button>
|
|
199
|
+
<button data-start-dev-overlay-button onClick={redirectToDiscord} type="button">
|
|
200
|
+
<DiscordIcon title="Join our Discord Channel"/>
|
|
201
|
+
</button>
|
|
202
|
+
<button data-start-dev-overlay-button onClick={downloadScreenshot} type="button">
|
|
203
|
+
<CameraIcon title="Capture Error Overlay"/>
|
|
204
|
+
</button>
|
|
205
|
+
<button data-start-dev-overlay-button onClick={toggleIsCompiled} type="button">
|
|
206
|
+
<Show when={isCompiled()} fallback={<ViewOriginalIcon title="View Original Source"/>}>
|
|
207
|
+
<ViewCompiledIcon title="View Compiled Source"/>
|
|
208
|
+
</Show>
|
|
209
|
+
</button>
|
|
210
|
+
<button data-start-dev-overlay-button onClick={props.resetError} type="button">
|
|
211
|
+
<RefreshIcon title="Reset Error"/>
|
|
212
|
+
</button>
|
|
213
|
+
</div>
|
|
214
|
+
</div>
|
|
215
|
+
<Show when={props.errors[truncated() - 1]} keyed>
|
|
216
|
+
{current => (<div data-start-dev-overlay-content>
|
|
217
|
+
<ErrorInfo error={current}/>
|
|
218
|
+
<StackFrames error={current} isCompiled={isCompiled()}/>
|
|
219
|
+
</div>)}
|
|
220
|
+
</Show>
|
|
221
|
+
</div>
|
|
222
|
+
</DialogPanel>
|
|
223
|
+
</div>
|
|
224
|
+
</Dialog>
|
|
225
|
+
</Portal>);
|
|
226
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type Accessor } from "solid-js";
|
|
2
|
+
export interface StackFrameSource {
|
|
3
|
+
content: string;
|
|
4
|
+
source: string;
|
|
5
|
+
name?: string;
|
|
6
|
+
line: number;
|
|
7
|
+
column: number;
|
|
8
|
+
}
|
|
9
|
+
export declare function createStackFrame(stackframe: StackFrame, isCompiled: () => boolean): Accessor<StackFrameSource>;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { createMemo, createResource } from "solid-js";
|
|
2
|
+
import getSourceMap from "./get-source-map.js";
|
|
3
|
+
function getActualFileSource(path) {
|
|
4
|
+
if (path.startsWith("file://")) {
|
|
5
|
+
return "/_build/@fs" + path.substring("file://".length);
|
|
6
|
+
}
|
|
7
|
+
return path;
|
|
8
|
+
}
|
|
9
|
+
export function createStackFrame(stackframe, isCompiled) {
|
|
10
|
+
const [data] = createResource(() => ({
|
|
11
|
+
fileName: stackframe.fileName,
|
|
12
|
+
line: stackframe.lineNumber,
|
|
13
|
+
column: stackframe.columnNumber,
|
|
14
|
+
functionName: stackframe.functionName,
|
|
15
|
+
}), async (source) => {
|
|
16
|
+
if (!source.fileName) {
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
const response = await fetch(getActualFileSource(source.fileName));
|
|
20
|
+
if (!response.ok) {
|
|
21
|
+
return null;
|
|
22
|
+
}
|
|
23
|
+
const content = await response.text();
|
|
24
|
+
const sourceMap = await getSourceMap(source.fileName, content);
|
|
25
|
+
return {
|
|
26
|
+
source,
|
|
27
|
+
content,
|
|
28
|
+
sourceMap,
|
|
29
|
+
};
|
|
30
|
+
});
|
|
31
|
+
const info = createMemo(() => {
|
|
32
|
+
const current = data();
|
|
33
|
+
if (!current) {
|
|
34
|
+
return undefined;
|
|
35
|
+
}
|
|
36
|
+
const { source, content, sourceMap } = current;
|
|
37
|
+
if (!isCompiled() && source.line && source.column && sourceMap) {
|
|
38
|
+
const result = sourceMap.originalPositionFor({
|
|
39
|
+
line: source.line,
|
|
40
|
+
column: source.column,
|
|
41
|
+
});
|
|
42
|
+
return {
|
|
43
|
+
...result,
|
|
44
|
+
content: sourceMap.sourceContentFor(result.source),
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
source: source.fileName,
|
|
49
|
+
line: source.line,
|
|
50
|
+
column: source.column,
|
|
51
|
+
name: source.functionName,
|
|
52
|
+
content,
|
|
53
|
+
};
|
|
54
|
+
});
|
|
55
|
+
return info;
|
|
56
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function download(dataurl: string, filename: string): void;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { SourceMapConsumer } from "source-map-js";
|
|
2
|
+
const INLINE_SOURCEMAP_REGEX = /^data:application\/json[^,]+base64,/;
|
|
3
|
+
const SOURCEMAP_REGEX = /(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^*]+?)[ \t]*(?:\*\/)[ \t]*$)/;
|
|
4
|
+
export default async function getSourceMap(url, content) {
|
|
5
|
+
const lines = content.split("\n");
|
|
6
|
+
let sourceMapUrl;
|
|
7
|
+
for (let i = lines.length - 1; i >= 0 && !sourceMapUrl; i--) {
|
|
8
|
+
const result = lines[i].match(SOURCEMAP_REGEX);
|
|
9
|
+
if (result) {
|
|
10
|
+
sourceMapUrl = result[1];
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
if (!sourceMapUrl) {
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
if (!(INLINE_SOURCEMAP_REGEX.test(sourceMapUrl) || sourceMapUrl.startsWith("/"))) {
|
|
17
|
+
// Resolve path if it's a relative access
|
|
18
|
+
const parsedURL = url.split("/");
|
|
19
|
+
parsedURL[parsedURL.length - 1] = sourceMapUrl;
|
|
20
|
+
sourceMapUrl = parsedURL.join("/");
|
|
21
|
+
}
|
|
22
|
+
const response = await fetch(sourceMapUrl);
|
|
23
|
+
const rawSourceMap = await response.json();
|
|
24
|
+
return new SourceMapConsumer(rawSourceMap);
|
|
25
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { JSX } from "solid-js";
|
|
2
|
+
export declare function ArrowRightIcon(props: JSX.IntrinsicElements["svg"] & {
|
|
3
|
+
title: string;
|
|
4
|
+
}): JSX.Element;
|
|
5
|
+
export declare function ArrowLeftIcon(props: JSX.IntrinsicElements["svg"] & {
|
|
6
|
+
title: string;
|
|
7
|
+
}): JSX.Element;
|
|
8
|
+
export declare function RefreshIcon(props: JSX.IntrinsicElements["svg"] & {
|
|
9
|
+
title: string;
|
|
10
|
+
}): JSX.Element;
|
|
11
|
+
export declare function ViewCompiledIcon(props: JSX.IntrinsicElements["svg"] & {
|
|
12
|
+
title: string;
|
|
13
|
+
}): JSX.Element;
|
|
14
|
+
export declare function ViewOriginalIcon(props: JSX.IntrinsicElements["svg"] & {
|
|
15
|
+
title: string;
|
|
16
|
+
}): JSX.Element;
|
|
17
|
+
export declare function CameraIcon(props: JSX.IntrinsicElements["svg"] & {
|
|
18
|
+
title: string;
|
|
19
|
+
}): JSX.Element;
|
|
20
|
+
export declare function DiscordIcon(props: JSX.IntrinsicElements["svg"] & {
|
|
21
|
+
title: string;
|
|
22
|
+
}): JSX.Element;
|
|
23
|
+
export declare function GithubIcon(props: JSX.IntrinsicElements["svg"] & {
|
|
24
|
+
title: string;
|
|
25
|
+
}): JSX.Element;
|
|
26
|
+
export declare function SolidStartIcon(props: JSX.IntrinsicElements["svg"] & {
|
|
27
|
+
title: string;
|
|
28
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
export function ArrowRightIcon(props) {
|
|
2
|
+
return (<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" {...props}>
|
|
3
|
+
<title>{props.title}</title>
|
|
4
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M14 5l7 7m0 0l-7 7m7-7H3"/>
|
|
5
|
+
</svg>);
|
|
6
|
+
}
|
|
7
|
+
export function ArrowLeftIcon(props) {
|
|
8
|
+
return (<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" {...props}>
|
|
9
|
+
<title>{props.title}</title>
|
|
10
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 19l-7-7m0 0l7-7m-7 7h18"/>
|
|
11
|
+
</svg>);
|
|
12
|
+
}
|
|
13
|
+
export function RefreshIcon(props) {
|
|
14
|
+
return (<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" {...props}>
|
|
15
|
+
<title>{props.title}</title>
|
|
16
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" 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"/>
|
|
17
|
+
</svg>);
|
|
18
|
+
}
|
|
19
|
+
export function ViewCompiledIcon(props) {
|
|
20
|
+
return (<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" {...props}>
|
|
21
|
+
<title>{props.title}</title>
|
|
22
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"/>
|
|
23
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" 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"/>
|
|
24
|
+
</svg>);
|
|
25
|
+
}
|
|
26
|
+
export function ViewOriginalIcon(props) {
|
|
27
|
+
return (<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" {...props}>
|
|
28
|
+
<title>{props.title}</title>
|
|
29
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" 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"/>
|
|
30
|
+
</svg>);
|
|
31
|
+
}
|
|
32
|
+
export function CameraIcon(props) {
|
|
33
|
+
return (<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24" stroke="none" {...props}>
|
|
34
|
+
<title>{props.title}</title>
|
|
35
|
+
<path d="M12 9a3.75 3.75 0 1 0 0 7.5A3.75 3.75 0 0 0 12 9Z"/>
|
|
36
|
+
<path fill-rule="evenodd" 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" clip-rule="evenodd"/>
|
|
37
|
+
</svg>);
|
|
38
|
+
}
|
|
39
|
+
export function DiscordIcon(props) {
|
|
40
|
+
return (<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24" stroke="none" {...props}>
|
|
41
|
+
<title>{props.title}</title>
|
|
42
|
+
<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>
|
|
43
|
+
</svg>);
|
|
44
|
+
}
|
|
45
|
+
export function GithubIcon(props) {
|
|
46
|
+
return (<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24" stroke="none" {...props}>
|
|
47
|
+
<title>{props.title}</title>
|
|
48
|
+
<path fill-rule="evenodd" clip-rule="evenodd" 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"></path>
|
|
49
|
+
</svg>);
|
|
50
|
+
}
|
|
51
|
+
export function SolidStartIcon(props) {
|
|
52
|
+
return (<svg viewBox="0 0 701 701" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}>
|
|
53
|
+
<title>{props.title}</title>
|
|
54
|
+
<g filter="url(#filter0_d_1_2)">
|
|
55
|
+
<rect width="693" height="693" transform="translate(4)" fill="white"/>
|
|
56
|
+
<mask id="mask0_1_2" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="323" y="556" width="174" height="72">
|
|
57
|
+
<path 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" fill="white"/>
|
|
58
|
+
</mask>
|
|
59
|
+
<g mask="url(#mask0_1_2)">
|
|
60
|
+
<path d="M510.734 559.645L490 661.769L309.658 625.183L330.349 523.018L510.734 559.645Z" fill="url(#paint0_linear_1_2)"/>
|
|
61
|
+
</g>
|
|
62
|
+
<mask id="mask1_1_2" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="73" y="364" width="424" height="220">
|
|
63
|
+
<path 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" fill="white"/>
|
|
64
|
+
</mask>
|
|
65
|
+
<g mask="url(#mask1_1_2)">
|
|
66
|
+
<path d="M192.016 773.57L-24.954 425.942L378.115 174.389L595.085 522.017L192.016 773.57Z" fill="url(#paint1_linear_1_2)"/>
|
|
67
|
+
</g>
|
|
68
|
+
<mask id="mask2_1_2" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="515" y="255" width="179" height="71">
|
|
69
|
+
<path 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" fill="white"/>
|
|
70
|
+
</mask>
|
|
71
|
+
<g mask="url(#mask2_1_2)">
|
|
72
|
+
<path d="M557.832 401.58L485.62 272.174L651.32 179.729L723.532 309.135L557.832 401.58Z" fill="url(#paint2_linear_1_2)"/>
|
|
73
|
+
</g>
|
|
74
|
+
<mask id="mask3_1_2" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="254" y="59" width="440" height="223">
|
|
75
|
+
<path 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" fill="white"/>
|
|
76
|
+
</mask>
|
|
77
|
+
<g mask="url(#mask3_1_2)">
|
|
78
|
+
<path d="M623.161 -102.236L775.386 246.226L324.592 443.172L172.325 94.7097L623.161 -102.236Z" fill="url(#paint3_linear_1_2)"/>
|
|
79
|
+
</g>
|
|
80
|
+
<mask id="mask4_1_2" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="6" y="371" width="396" height="257">
|
|
81
|
+
<path 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" fill="white"/>
|
|
82
|
+
</mask>
|
|
83
|
+
<g mask="url(#mask4_1_2)">
|
|
84
|
+
<path d="M529.756 464.03L265.855 829.387L-122.321 549.008L141.538 183.65L529.756 464.03Z" fill="url(#paint4_linear_1_2)"/>
|
|
85
|
+
</g>
|
|
86
|
+
<mask id="mask5_1_2" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="187" y="64" width="411" height="263">
|
|
87
|
+
<path 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" fill="white"/>
|
|
88
|
+
</mask>
|
|
89
|
+
<g mask="url(#mask5_1_2)">
|
|
90
|
+
<path d="M685.945 96.6704L550.031 471.164L99.6544 307.675L235.527 -66.8184L685.945 96.6704Z" fill="url(#paint5_linear_1_2)"/>
|
|
91
|
+
</g>
|
|
92
|
+
<mask id="mask6_1_2" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="134" y="164" width="419" height="344">
|
|
93
|
+
<path 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" fill="white"/>
|
|
94
|
+
</mask>
|
|
95
|
+
<g mask="url(#mask6_1_2)">
|
|
96
|
+
<path d="M291.886 715.5L-31.1699 289.528L408.235 -43.7072L731.291 382.265L291.886 715.5Z" fill="url(#paint6_linear_1_2)"/>
|
|
97
|
+
</g>
|
|
98
|
+
<mask id="mask7_1_2" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="118" y="170" width="340" height="338">
|
|
99
|
+
<path 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" fill="white"/>
|
|
100
|
+
</mask>
|
|
101
|
+
<g mask="url(#mask7_1_2)">
|
|
102
|
+
<path d="M606.057 239.009L395.553 654.635L-30.4607 438.833L180.043 23.2069L606.057 239.009Z" fill="url(#paint7_linear_1_2)"/>
|
|
103
|
+
</g>
|
|
104
|
+
</g>
|
|
105
|
+
<defs>
|
|
106
|
+
<filter id="filter0_d_1_2" x="0" y="0" width="701" height="701" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
107
|
+
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|
108
|
+
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
|
109
|
+
<feOffset dy="4"/>
|
|
110
|
+
<feGaussianBlur stdDeviation="2"/>
|
|
111
|
+
<feComposite in2="hardAlpha" operator="out"/>
|
|
112
|
+
<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"/>
|
|
113
|
+
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1_2"/>
|
|
114
|
+
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1_2" result="shape"/>
|
|
115
|
+
</filter>
|
|
116
|
+
<linearGradient id="paint0_linear_1_2" x1="522.269" y1="40.5341" x2="374.272" y2="769.949" gradientUnits="userSpaceOnUse">
|
|
117
|
+
<stop stop-color="#1593F5"/>
|
|
118
|
+
<stop offset="1" stop-color="#0084CE"/>
|
|
119
|
+
</linearGradient>
|
|
120
|
+
<linearGradient id="paint1_linear_1_2" x1="507.729" y1="830.625" x2="-112.45" y2="-163.072" gradientUnits="userSpaceOnUse">
|
|
121
|
+
<stop stop-color="#1593F5"/>
|
|
122
|
+
<stop offset="1" stop-color="#0084CE"/>
|
|
123
|
+
</linearGradient>
|
|
124
|
+
<linearGradient id="paint2_linear_1_2" x1="915.255" y1="847.35" x2="541.738" y2="177.838" gradientUnits="userSpaceOnUse">
|
|
125
|
+
<stop stop-color="white"/>
|
|
126
|
+
<stop offset="1" stop-color="#15ABFF"/>
|
|
127
|
+
</linearGradient>
|
|
128
|
+
<linearGradient id="paint3_linear_1_2" x1="254.189" y1="-332.587" x2="571.326" y2="393.304" gradientUnits="userSpaceOnUse">
|
|
129
|
+
<stop stop-color="white"/>
|
|
130
|
+
<stop offset="1" stop-color="#79CFFF"/>
|
|
131
|
+
</linearGradient>
|
|
132
|
+
<linearGradient id="paint4_linear_1_2" x1="610.213" y1="-56.2573" x2="106.317" y2="641.444" gradientUnits="userSpaceOnUse">
|
|
133
|
+
<stop stop-color="#0057E5"/>
|
|
134
|
+
<stop offset="1" stop-color="#0084CE"/>
|
|
135
|
+
</linearGradient>
|
|
136
|
+
<linearGradient id="paint5_linear_1_2" x1="496.212" y1="-82.6564" x2="337.643" y2="354.288" gradientUnits="userSpaceOnUse">
|
|
137
|
+
<stop stop-color="white"/>
|
|
138
|
+
<stop offset="1" stop-color="#15ABFF"/>
|
|
139
|
+
</linearGradient>
|
|
140
|
+
<linearGradient id="paint6_linear_1_2" x1="693.692" y1="789.133" x2="-102.675" y2="-260.944" gradientUnits="userSpaceOnUse">
|
|
141
|
+
<stop stop-color="white"/>
|
|
142
|
+
<stop offset="1" stop-color="#79CFFF"/>
|
|
143
|
+
</linearGradient>
|
|
144
|
+
<linearGradient id="paint7_linear_1_2" x1="555.118" y1="-188.777" x2="146.363" y2="618.161" gradientUnits="userSpaceOnUse">
|
|
145
|
+
<stop stop-color="white"/>
|
|
146
|
+
<stop offset="1" stop-color="#79CFFF"/>
|
|
147
|
+
</linearGradient>
|
|
148
|
+
</defs>
|
|
149
|
+
</svg>);
|
|
150
|
+
}
|