@solidjs/start 2.0.0-beta.9 → 2.0.0-rc.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 +149 -1
- package/dist/config/app-root-alias.d.ts +7 -0
- package/dist/config/app-root-alias.js +58 -0
- package/dist/config/constants.d.ts +2 -0
- package/dist/config/constants.js +2 -0
- package/dist/config/env.js +13 -10
- package/dist/config/fs-routes/index.js +3 -3
- package/dist/config/fs-routes/tree-shake.d.ts +27 -0
- package/dist/config/fs-routes/tree-shake.js +226 -33
- package/dist/config/index.d.ts +154 -5
- package/dist/config/index.js +23 -10
- package/dist/config/lazy.js +7 -2
- package/dist/config/manifest.d.ts +3 -0
- package/dist/config/manifest.js +26 -4
- package/dist/directives/remove-unused-variables.js +15 -3
- package/dist/directives/xxhash32.js +5 -13
- package/dist/fns/client.js +14 -5
- package/dist/fns/error-handler.d.ts +34 -0
- package/dist/fns/error-handler.js +10 -0
- package/dist/fns/handler.d.ts +1 -1
- package/dist/fns/handler.js +58 -12
- package/dist/fns/plugins.d.ts +34 -0
- package/dist/fns/plugins.js +33 -0
- package/dist/fns/serialization.d.ts +15 -0
- package/dist/fns/serialization.js +36 -6
- package/dist/middleware/index.js +4 -1
- package/dist/server/StartServer.jsx +1 -1
- package/dist/server/assets/render.jsx +1 -1
- package/dist/server/collect-styles.d.ts +3 -1
- package/dist/server/collect-styles.js +8 -5
- package/dist/server/fetchEvent.d.ts +10 -0
- package/dist/server/fetchEvent.js +10 -0
- package/dist/server/handler.d.ts +3 -4
- package/dist/server/handler.js +22 -56
- package/dist/server/index.d.ts +3 -1
- package/dist/server/index.jsx +1 -0
- package/dist/server/manifest/dev-client-manifest.js +1 -1
- package/dist/server/manifest/dev-ssr-manifest.js +1 -1
- package/dist/server/spa/StartServer.jsx +1 -1
- package/dist/server/spa/handler.d.ts +2 -3
- package/dist/server/spa/handler.js +2 -2
- package/dist/server/strip-path-base.d.ts +1 -0
- package/dist/server/strip-path-base.js +10 -0
- package/dist/server/types.d.ts +12 -1
- package/dist/server/web-stream.d.ts +9 -0
- package/dist/server/web-stream.js +29 -0
- package/dist/shared/ErrorBoundary.jsx +3 -3
- package/dist/shared/clientOnly.js +3 -1
- package/dist/shared/{dev-overlay → dev-toolbar/error-viewer}/CodeView.jsx +3 -3
- package/dist/shared/dev-toolbar/error-viewer/create-stack-frame.js +90 -0
- package/dist/shared/{dev-overlay/DevOverlayDialog.d.ts → dev-toolbar/error-viewer/index.d.ts} +3 -2
- package/dist/shared/{dev-overlay/DevOverlayDialog.jsx → dev-toolbar/error-viewer/index.jsx} +66 -77
- package/dist/shared/dev-toolbar/error-viewer/styles.css +224 -0
- package/dist/shared/dev-toolbar/functions/BlobViewer.css +4 -0
- package/dist/shared/dev-toolbar/functions/BlobViewer.d.ts +6 -0
- package/dist/shared/dev-toolbar/functions/BlobViewer.jsx +37 -0
- package/dist/shared/dev-toolbar/functions/FormDataViewer.d.ts +5 -0
- package/dist/shared/dev-toolbar/functions/FormDataViewer.jsx +23 -0
- package/dist/shared/dev-toolbar/functions/HeadersViewer.css +8 -0
- package/dist/shared/dev-toolbar/functions/HeadersViewer.d.ts +6 -0
- package/dist/shared/dev-toolbar/functions/HeadersViewer.jsx +15 -0
- package/dist/shared/dev-toolbar/functions/HexViewer.css +34 -0
- package/dist/shared/dev-toolbar/functions/HexViewer.d.ts +11 -0
- package/dist/shared/dev-toolbar/functions/HexViewer.jsx +70 -0
- package/dist/shared/dev-toolbar/functions/SerovalValue.css +5 -0
- package/dist/shared/dev-toolbar/functions/SerovalValue.d.ts +7 -0
- package/dist/shared/dev-toolbar/functions/SerovalValue.jsx +10 -0
- package/dist/shared/dev-toolbar/functions/SerovalViewer.css +70 -0
- package/dist/shared/dev-toolbar/functions/SerovalViewer.d.ts +6 -0
- package/dist/shared/dev-toolbar/functions/SerovalViewer.jsx +796 -0
- package/dist/shared/dev-toolbar/functions/URLSearchParamsViewer.d.ts +5 -0
- package/dist/shared/dev-toolbar/functions/URLSearchParamsViewer.jsx +22 -0
- package/dist/shared/dev-toolbar/functions/index.d.ts +13 -0
- package/dist/shared/dev-toolbar/functions/index.jsx +216 -0
- package/dist/shared/dev-toolbar/functions/styles.css +109 -0
- package/dist/shared/dev-toolbar/functions/tracker.d.ts +19 -0
- package/dist/shared/dev-toolbar/functions/tracker.js +29 -0
- package/dist/shared/{dev-overlay → dev-toolbar}/icons.d.ts +9 -0
- package/dist/shared/{dev-overlay → dev-toolbar}/icons.jsx +19 -1
- package/dist/shared/dev-toolbar/index.css +88 -0
- package/dist/shared/dev-toolbar/index.d.ts +6 -0
- package/dist/shared/dev-toolbar/index.jsx +179 -0
- package/dist/shared/ui/Badge.css +33 -0
- package/dist/shared/ui/Badge.d.ts +7 -0
- package/dist/shared/ui/Badge.jsx +7 -0
- package/dist/shared/ui/Button.css +32 -0
- package/dist/shared/ui/Button.d.ts +4 -0
- package/dist/shared/ui/Button.jsx +4 -0
- package/dist/shared/ui/Cascade.css +29 -0
- package/dist/shared/ui/Cascade.d.ts +4 -0
- package/dist/shared/ui/Cascade.jsx +4 -0
- package/dist/shared/ui/Dialog.css +25 -0
- package/dist/shared/ui/Dialog.d.ts +5 -0
- package/dist/shared/ui/Dialog.jsx +5 -0
- package/dist/shared/ui/IconButton.css +39 -0
- package/dist/shared/ui/IconButton.d.ts +4 -0
- package/dist/shared/ui/IconButton.jsx +4 -0
- package/dist/shared/ui/Placeholder.css +12 -0
- package/dist/shared/ui/Placeholder.d.ts +6 -0
- package/dist/shared/ui/Placeholder.jsx +4 -0
- package/dist/shared/ui/Section.css +18 -0
- package/dist/shared/ui/Section.d.ts +9 -0
- package/dist/shared/ui/Section.jsx +10 -0
- package/dist/shared/ui/Select.css +37 -0
- package/dist/shared/ui/Select.d.ts +4 -0
- package/dist/shared/ui/Select.jsx +4 -0
- package/dist/shared/ui/Table.css +22 -0
- package/dist/shared/ui/Table.d.ts +11 -0
- package/dist/shared/ui/Table.jsx +13 -0
- package/dist/shared/ui/Tabs.css +51 -0
- package/dist/shared/ui/Tabs.d.ts +6 -0
- package/dist/shared/ui/Tabs.jsx +6 -0
- package/dist/shared/ui/Text.css +73 -0
- package/dist/shared/ui/Text.d.ts +12 -0
- package/dist/shared/ui/Text.jsx +17 -0
- package/package.json +36 -29
- package/dist/shared/dev-overlay/createStackFrame.js +0 -56
- package/dist/shared/dev-overlay/index.d.ts +0 -5
- package/dist/shared/dev-overlay/index.jsx +0 -39
- package/dist/shared/dev-overlay/styles.css +0 -292
- /package/dist/shared/{dev-overlay → dev-toolbar/error-viewer}/CodeView.d.ts +0 -0
- /package/dist/shared/{dev-overlay/createStackFrame.d.ts → dev-toolbar/error-viewer/create-stack-frame.d.ts} +0 -0
- /package/dist/shared/{dev-overlay → dev-toolbar/error-viewer}/download.d.ts +0 -0
- /package/dist/shared/{dev-overlay → dev-toolbar/error-viewer}/download.js +0 -0
- /package/dist/shared/{dev-overlay → dev-toolbar/error-viewer}/get-source-map.d.ts +0 -0
- /package/dist/shared/{dev-overlay → dev-toolbar/error-viewer}/get-source-map.js +0 -0
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import { createEffect, createSignal, ErrorBoundary, onCleanup, resetErrorBoundaries, Show, } from "solid-js";
|
|
2
|
+
import { createStore } from "solid-js/store";
|
|
3
|
+
import { Portal } from "solid-js/web";
|
|
4
|
+
import { Toolbar } from "terracotta";
|
|
5
|
+
import info from "../../../package.json" with { type: "json" };
|
|
6
|
+
import clientOnly from "../clientOnly.js";
|
|
7
|
+
import { HttpStatusCode } from "../HttpStatusCode.js";
|
|
8
|
+
import IconButton from "../ui/IconButton.jsx";
|
|
9
|
+
import { Text } from "../ui/Text.jsx";
|
|
10
|
+
import { ServerFunctionViewer } from "./functions/index.jsx";
|
|
11
|
+
import { captureServerFunctionCall } from "./functions/tracker.js";
|
|
12
|
+
import { ErrorIcon, FunctionIcon, SolidStartIcon } from "./icons.jsx";
|
|
13
|
+
import "./index.css";
|
|
14
|
+
const ErrorViewer = import.meta.env.PROD
|
|
15
|
+
? () => <></>
|
|
16
|
+
: clientOnly(() => import("./error-viewer/index.jsx"), { lazy: true });
|
|
17
|
+
export function DevToolbar(props) {
|
|
18
|
+
const [ref, setRef] = createSignal();
|
|
19
|
+
createEffect(() => {
|
|
20
|
+
const current = ref();
|
|
21
|
+
if (current) {
|
|
22
|
+
let isDown = false;
|
|
23
|
+
// Offsets of the mouse relatively to the element's position
|
|
24
|
+
let offsetX = 0;
|
|
25
|
+
let offsetY = 0;
|
|
26
|
+
let currentX = 0;
|
|
27
|
+
let currentY = 0;
|
|
28
|
+
let centerX = 0;
|
|
29
|
+
let centerY = 0;
|
|
30
|
+
const resetPosition = () => {
|
|
31
|
+
current.style.top = "auto";
|
|
32
|
+
current.style.left = "auto";
|
|
33
|
+
current.style.bottom = "auto";
|
|
34
|
+
current.style.right = "auto";
|
|
35
|
+
};
|
|
36
|
+
let isDirty = false;
|
|
37
|
+
const ac = new AbortController();
|
|
38
|
+
current.addEventListener("mousedown", e => {
|
|
39
|
+
isDown = true;
|
|
40
|
+
const rect = current.getBoundingClientRect();
|
|
41
|
+
currentX = rect.left;
|
|
42
|
+
currentY = rect.top;
|
|
43
|
+
offsetX = e.clientX - currentX;
|
|
44
|
+
offsetY = e.clientY - currentY;
|
|
45
|
+
centerX = rect.width / 2;
|
|
46
|
+
centerY = rect.height / 2;
|
|
47
|
+
isDirty = true;
|
|
48
|
+
}, {
|
|
49
|
+
signal: ac.signal,
|
|
50
|
+
});
|
|
51
|
+
window.addEventListener("mouseup", () => {
|
|
52
|
+
if (isDown && !isDirty) {
|
|
53
|
+
const preferredAnchorX = currentX + centerX < window.innerWidth / 2 ? "left" : "right";
|
|
54
|
+
const preferredAnchorY = currentY + centerY < window.innerHeight / 2 ? "top" : "bottom";
|
|
55
|
+
resetPosition();
|
|
56
|
+
current.style[preferredAnchorX] = "0px";
|
|
57
|
+
current.style[preferredAnchorY] = "0px";
|
|
58
|
+
current.style.flexDirection =
|
|
59
|
+
preferredAnchorY === "bottom" ? "column-reverse" : "column";
|
|
60
|
+
current.style.alignItems = preferredAnchorX === "left" ? "flex-start" : "flex-end";
|
|
61
|
+
}
|
|
62
|
+
isDown = false;
|
|
63
|
+
}, {
|
|
64
|
+
signal: ac.signal,
|
|
65
|
+
});
|
|
66
|
+
window.addEventListener("mousemove", e => {
|
|
67
|
+
if (isDown) {
|
|
68
|
+
if (isDirty) {
|
|
69
|
+
resetPosition();
|
|
70
|
+
isDirty = false;
|
|
71
|
+
}
|
|
72
|
+
currentX = e.clientX - offsetX;
|
|
73
|
+
currentY = e.clientY - offsetY;
|
|
74
|
+
current.style.left = `${currentX}px`;
|
|
75
|
+
current.style.top = `${currentY}px`;
|
|
76
|
+
}
|
|
77
|
+
}, {
|
|
78
|
+
signal: ac.signal,
|
|
79
|
+
passive: true,
|
|
80
|
+
});
|
|
81
|
+
onCleanup(() => {
|
|
82
|
+
ac.abort();
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
const [content, setContent] = createSignal(undefined);
|
|
87
|
+
function toggleContent(value) {
|
|
88
|
+
if (content() === value) {
|
|
89
|
+
setContent(undefined);
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
setContent(value);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
const [errors, setErrors] = createSignal([]);
|
|
96
|
+
function resetError() {
|
|
97
|
+
setErrors([]);
|
|
98
|
+
resetErrorBoundaries();
|
|
99
|
+
}
|
|
100
|
+
function pushError(error) {
|
|
101
|
+
console.error(error);
|
|
102
|
+
setErrors(current => [error, ...current]);
|
|
103
|
+
setContent("err");
|
|
104
|
+
}
|
|
105
|
+
createEffect(() => {
|
|
106
|
+
const onErrorEvent = (error) => {
|
|
107
|
+
// Browsers dispatch benign ResizeObserver loop notifications as window
|
|
108
|
+
// "error" events carrying no error object. They aren't app errors.
|
|
109
|
+
if (!error.error && error.message?.startsWith("ResizeObserver loop")) {
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
pushError(error.error ?? error);
|
|
113
|
+
};
|
|
114
|
+
window.addEventListener("error", onErrorEvent);
|
|
115
|
+
onCleanup(() => {
|
|
116
|
+
window.removeEventListener("error", onErrorEvent);
|
|
117
|
+
});
|
|
118
|
+
});
|
|
119
|
+
const [store, setStore] = createStore({
|
|
120
|
+
instances: {},
|
|
121
|
+
});
|
|
122
|
+
createEffect(() => {
|
|
123
|
+
onCleanup(captureServerFunctionCall(call => {
|
|
124
|
+
if (call.type === "request") {
|
|
125
|
+
setStore("instances", call.instance, value => {
|
|
126
|
+
return {
|
|
127
|
+
...value,
|
|
128
|
+
request: call,
|
|
129
|
+
};
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
else {
|
|
133
|
+
setStore("instances", call.instance, value => {
|
|
134
|
+
return {
|
|
135
|
+
...value,
|
|
136
|
+
response: call,
|
|
137
|
+
};
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
}));
|
|
141
|
+
});
|
|
142
|
+
return (<>
|
|
143
|
+
<Portal>
|
|
144
|
+
<div data-start-dev-toolbar ref={setRef}>
|
|
145
|
+
<Toolbar>
|
|
146
|
+
<div>
|
|
147
|
+
<IconButton onClick={() => toggleContent("err")} disabled={errors().length === 0}>
|
|
148
|
+
<ErrorIcon title="View Errors"/>
|
|
149
|
+
</IconButton>
|
|
150
|
+
<IconButton onClick={() => toggleContent("fn")}>
|
|
151
|
+
<FunctionIcon title="View Server Functions"/>
|
|
152
|
+
</IconButton>
|
|
153
|
+
</div>
|
|
154
|
+
<div>
|
|
155
|
+
<SolidStartIcon title="Solid Start Version"/>
|
|
156
|
+
<div data-start-dev-toolbar-version>
|
|
157
|
+
<Text options={{ size: "xs", weight: "semibold", font: "mono", wrap: "nowrap" }}>
|
|
158
|
+
{info.version}
|
|
159
|
+
</Text>
|
|
160
|
+
</div>
|
|
161
|
+
</div>
|
|
162
|
+
</Toolbar>
|
|
163
|
+
<ErrorViewer show={content() === "err"} errors={errors()} resetError={resetError}/>
|
|
164
|
+
<ServerFunctionViewer show={content() === "fn"} instances={store.instances} onDeleteInstance={value => {
|
|
165
|
+
setStore("instances", value, undefined);
|
|
166
|
+
}}/>
|
|
167
|
+
</div>
|
|
168
|
+
</Portal>
|
|
169
|
+
<ErrorBoundary fallback={error => {
|
|
170
|
+
pushError(error);
|
|
171
|
+
return <HttpStatusCode code={500}/>;
|
|
172
|
+
}}>
|
|
173
|
+
{props.children}
|
|
174
|
+
</ErrorBoundary>
|
|
175
|
+
<Show when={errors().length > 0}>
|
|
176
|
+
<HttpStatusCode code={500}/>
|
|
177
|
+
</Show>
|
|
178
|
+
</>);
|
|
179
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
[data-start-badge] {
|
|
2
|
+
display: inline-flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
justify-content: center;
|
|
5
|
+
gap: 0.25rem;
|
|
6
|
+
|
|
7
|
+
border-radius: 0.375rem;
|
|
8
|
+
padding: 0.125rem 0.25rem;
|
|
9
|
+
|
|
10
|
+
background-color: var(--background);
|
|
11
|
+
border: 1px var(--foreground) solid;
|
|
12
|
+
color: var(--foreground);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
[data-start-badge="success"] {
|
|
16
|
+
--background: oklch(98.2% 0.018 155.826);
|
|
17
|
+
--foreground: oklch(52.7% 0.154 150.069);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
[data-start-badge="failure"] {
|
|
21
|
+
--background: oklch(97.1% 0.013 17.38);
|
|
22
|
+
--foreground: oklch(50.5% 0.213 27.518);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
[data-start-badge="warning"] {
|
|
26
|
+
--background: oklch(98.7% 0.026 102.212);
|
|
27
|
+
--foreground: oklch(47.6% 0.114 61.907);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
[data-start-badge="info"] {
|
|
31
|
+
--background: oklch(97% 0.014 254.604);
|
|
32
|
+
--foreground: oklch(48.8% 0.243 264.376);
|
|
33
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
[data-start-button] {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
justify-content: center;
|
|
5
|
+
|
|
6
|
+
cursor: pointer;
|
|
7
|
+
|
|
8
|
+
border-radius: 0.5rem;
|
|
9
|
+
|
|
10
|
+
color: oklch(97% 0.014 254.604);
|
|
11
|
+
|
|
12
|
+
background-color: rgb(17 24 39);
|
|
13
|
+
padding: 0.25rem 0.5rem;
|
|
14
|
+
font-size: 0.875rem;
|
|
15
|
+
line-height: 1.25rem;
|
|
16
|
+
border: none;
|
|
17
|
+
outline: none;
|
|
18
|
+
|
|
19
|
+
transition-property: color, background-color, border-color, box-shadow;
|
|
20
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
21
|
+
transition-duration: 150ms;
|
|
22
|
+
|
|
23
|
+
white-space: nowrap;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
[data-start-button][tc-active],
|
|
27
|
+
[data-start-button][tc-selected],
|
|
28
|
+
[data-start-button]:hover,
|
|
29
|
+
[data-start-button]:focus {
|
|
30
|
+
color: rgb(219 234 254);
|
|
31
|
+
background-color: rgb(30 58 138);
|
|
32
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
[data-start-cascade] {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
margin: 0;
|
|
5
|
+
margin-block: 0;
|
|
6
|
+
list-style-type: none;
|
|
7
|
+
padding-inline: 0;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
[data-start-cascade-option] {
|
|
11
|
+
border-radius: 0.25rem;
|
|
12
|
+
font-size: 0.875rem;
|
|
13
|
+
line-height: 1.25rem;
|
|
14
|
+
outline: none;
|
|
15
|
+
cursor: pointer;
|
|
16
|
+
|
|
17
|
+
transition-property: color, background-color, border-color, box-shadow;
|
|
18
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
19
|
+
transition-duration: 150ms;
|
|
20
|
+
|
|
21
|
+
white-space: nowrap;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
[data-start-cascade-option][tc-active],
|
|
25
|
+
[data-start-cascade-option][tc-selected],
|
|
26
|
+
[data-start-cascade-option]:focus {
|
|
27
|
+
background-color: rgb(219 234 254);
|
|
28
|
+
color: rgb(30 58 138);
|
|
29
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Select as BaseSelect, SelectOption as BaseSelectOption } from "terracotta";
|
|
2
|
+
import "./Cascade.css";
|
|
3
|
+
export const Cascade = props => <BaseSelect data-start-cascade {...props}/>;
|
|
4
|
+
export const CascadeOption = props => (<BaseSelectOption data-start-cascade-option {...props}/>);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
[data-start-dialog] {
|
|
2
|
+
position: fixed;
|
|
3
|
+
inset: 0px;
|
|
4
|
+
z-index: 50;
|
|
5
|
+
overflow-y: auto;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
[data-start-dialog] > div {
|
|
9
|
+
position: relative;
|
|
10
|
+
display: flex;
|
|
11
|
+
align-items: center;
|
|
12
|
+
justify-content: center;
|
|
13
|
+
min-height: 100vh;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
[data-start-dialog-overlay] {
|
|
17
|
+
position: absolute;
|
|
18
|
+
inset: 0px;
|
|
19
|
+
background-color: rgb(17 24 39 / 0.5);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
[data-start-dialog-panel] {
|
|
23
|
+
margin: 2rem;
|
|
24
|
+
z-index: 10;
|
|
25
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Dialog as BaseDialog, DialogOverlay as BaseDialogOverlay, DialogPanel as BaseDialogPanel } from "terracotta";
|
|
2
|
+
import "./Dialog.css";
|
|
3
|
+
export declare const Dialog: typeof BaseDialog;
|
|
4
|
+
export declare const DialogOverlay: typeof BaseDialogOverlay;
|
|
5
|
+
export declare const DialogPanel: typeof BaseDialogPanel;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Dialog as BaseDialog, DialogOverlay as BaseDialogOverlay, DialogPanel as BaseDialogPanel, } from "terracotta";
|
|
2
|
+
import "./Dialog.css";
|
|
3
|
+
export const Dialog = props => <BaseDialog data-start-dialog {...props}/>;
|
|
4
|
+
export const DialogOverlay = props => (<BaseDialogOverlay data-start-dialog-overlay {...props}/>);
|
|
5
|
+
export const DialogPanel = props => (<BaseDialogPanel data-start-dialog-panel {...props}/>);
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
[data-start-icon-button] {
|
|
2
|
+
display: flex;
|
|
3
|
+
padding: 0.25rem;
|
|
4
|
+
border-radius: 9999px;
|
|
5
|
+
border-width: 0px;
|
|
6
|
+
align-items: center;
|
|
7
|
+
justify-content: center;
|
|
8
|
+
cursor: pointer;
|
|
9
|
+
color: rgb(249 250 251);
|
|
10
|
+
background: none;
|
|
11
|
+
transition-property: color, background-color, border-color, box-shadow;
|
|
12
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
13
|
+
transition-duration: 150ms;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
[data-start-icon-button]:hover {
|
|
17
|
+
color: rgb(229 231 235);
|
|
18
|
+
background-color: rgb(55 65 81);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
[data-start-icon-button]:focus {
|
|
22
|
+
outline: 2px solid transparent;
|
|
23
|
+
outline-color: rgb(249 250 251);
|
|
24
|
+
outline-offset: 2px;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
[data-start-icon-button]:focus-visible {
|
|
28
|
+
box-shadow: 0 0 0 calc(3px) rgb(17 24 39 / 0.75);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
[data-start-icon-button]:active {
|
|
32
|
+
color: rgb(243 244 246);
|
|
33
|
+
background-color: rgb(31 41 55);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
[data-start-icon-button] > svg {
|
|
37
|
+
height: 1.25rem;
|
|
38
|
+
width: 1.25rem;
|
|
39
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
[data-start-section] {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
[data-start-section-title] {
|
|
7
|
+
text-transform: uppercase;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
[data-start-section-content] {
|
|
11
|
+
margin-left: 0.5rem;
|
|
12
|
+
padding-left: 0.5rem;
|
|
13
|
+
border-left: 1px oklch(87% 0.065 274.039) solid;
|
|
14
|
+
|
|
15
|
+
width: calc(100% - 2rem);
|
|
16
|
+
|
|
17
|
+
overflow: auto;
|
|
18
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { JSX } from "solid-js";
|
|
2
|
+
import { type TextProps } from "./Text.tsx";
|
|
3
|
+
import "./Section.css";
|
|
4
|
+
export interface SectionProps {
|
|
5
|
+
title: string;
|
|
6
|
+
options?: TextProps<"span">["options"];
|
|
7
|
+
children: JSX.Element;
|
|
8
|
+
}
|
|
9
|
+
export declare function Section(props: SectionProps): JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Text } from "./Text.jsx";
|
|
2
|
+
import "./Section.css";
|
|
3
|
+
export function Section(props) {
|
|
4
|
+
return (<div data-start-section>
|
|
5
|
+
<Text data-start-section-title options={{ weight: "bold", font: "sans", ...props.options }}>
|
|
6
|
+
{props.title}
|
|
7
|
+
</Text>
|
|
8
|
+
<div data-start-section-content>{props.children}</div>
|
|
9
|
+
</div>);
|
|
10
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
[data-start-select] {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
margin: 0;
|
|
5
|
+
margin-block: 0;
|
|
6
|
+
list-style-type: none;
|
|
7
|
+
padding-inline: 0;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
[data-start-select] > * + * {
|
|
11
|
+
border-top: 1px oklch(87% 0.065 274.039) solid;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
[data-start-select-option] {
|
|
15
|
+
color: rgb(249 250 251);
|
|
16
|
+
padding-top: 0.5rem;
|
|
17
|
+
padding-bottom: 0.5rem;
|
|
18
|
+
padding-left: 1rem;
|
|
19
|
+
padding-right: 1rem;
|
|
20
|
+
font-size: 0.875rem;
|
|
21
|
+
line-height: 1.25rem;
|
|
22
|
+
outline: none;
|
|
23
|
+
cursor: pointer;
|
|
24
|
+
|
|
25
|
+
transition-property: color, background-color, border-color, box-shadow;
|
|
26
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
27
|
+
transition-duration: 150ms;
|
|
28
|
+
|
|
29
|
+
white-space: nowrap;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
[data-start-select-option][tc-active],
|
|
33
|
+
[data-start-select-option][tc-selected],
|
|
34
|
+
[data-start-select-option]:focus {
|
|
35
|
+
color: rgb(229 231 235);
|
|
36
|
+
background-color: rgb(55 65 81);
|
|
37
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Select as BaseSelect, SelectOption as BaseSelectOption } from "terracotta";
|
|
2
|
+
import "./Select.css";
|
|
3
|
+
export const Select = props => <BaseSelect data-start-select {...props}/>;
|
|
4
|
+
export const SelectOption = props => (<BaseSelectOption data-start-select-option {...props}/>);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
[data-start-table] {
|
|
2
|
+
border: 1px oklch(70.7% 0.165 254.624) solid;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
[data-start-table-header] {
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: row;
|
|
8
|
+
background-color: oklch(93.2% 0.032 255.585);
|
|
9
|
+
font-weight: 600;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
[data-start-table-row] {
|
|
13
|
+
display: flex;
|
|
14
|
+
flex-direction: row;
|
|
15
|
+
border-top: 1px oklch(70.7% 0.165 254.624) solid;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
[data-start-table-cell] {
|
|
19
|
+
flex: 1;
|
|
20
|
+
padding: 0.5rem 1rem;
|
|
21
|
+
overflow: auto;
|
|
22
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ComponentProps, JSX } from "solid-js";
|
|
2
|
+
import "./Table.css";
|
|
3
|
+
type TableProps = ComponentProps<"div">;
|
|
4
|
+
export declare function Table(props: TableProps): JSX.Element;
|
|
5
|
+
type TableHeaderProps = ComponentProps<"div">;
|
|
6
|
+
export declare function TableHeader(props: TableHeaderProps): JSX.Element;
|
|
7
|
+
type TableRowProps = ComponentProps<"div">;
|
|
8
|
+
export declare function TableRow(props: TableRowProps): JSX.Element;
|
|
9
|
+
type TableCellProps = ComponentProps<"div">;
|
|
10
|
+
export declare function TableCell(props: TableCellProps): JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import "./Table.css";
|
|
2
|
+
export function Table(props) {
|
|
3
|
+
return <div data-start-table {...props}/>;
|
|
4
|
+
}
|
|
5
|
+
export function TableHeader(props) {
|
|
6
|
+
return <div data-start-table-header {...props}/>;
|
|
7
|
+
}
|
|
8
|
+
export function TableRow(props) {
|
|
9
|
+
return <div data-start-table-row {...props}/>;
|
|
10
|
+
}
|
|
11
|
+
export function TableCell(props) {
|
|
12
|
+
return <div data-start-table-cell {...props}/>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
[data-start-tab] {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
justify-content: center;
|
|
5
|
+
|
|
6
|
+
border-radius: 0.5rem;
|
|
7
|
+
cursor: pointer;
|
|
8
|
+
|
|
9
|
+
padding-top: 0.5rem;
|
|
10
|
+
padding-bottom: 0.5rem;
|
|
11
|
+
padding-left: 1rem;
|
|
12
|
+
padding-right: 1rem;
|
|
13
|
+
font-size: 0.875rem;
|
|
14
|
+
line-height: 1.25rem;
|
|
15
|
+
border: none;
|
|
16
|
+
outline: none;
|
|
17
|
+
|
|
18
|
+
transition-property: color, background-color, border-color, box-shadow;
|
|
19
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
20
|
+
transition-duration: 150ms;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
[data-start-tab][tc-active],
|
|
24
|
+
[data-start-tab][tc-selected],
|
|
25
|
+
[data-start-tab]:hover,
|
|
26
|
+
[data-start-tab]:focus {
|
|
27
|
+
color: rgb(229 231 235);
|
|
28
|
+
background-color: rgb(55 65 81);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
[data-start-tab-group] {
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
[data-start-tab-list] {
|
|
35
|
+
display: flex;
|
|
36
|
+
gap: 0.5rem;
|
|
37
|
+
margin: 0.5rem;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
[data-start-tab-panel] {
|
|
41
|
+
height: 100%;
|
|
42
|
+
|
|
43
|
+
overflow: auto;
|
|
44
|
+
|
|
45
|
+
display: flex;
|
|
46
|
+
flex-direction: column;
|
|
47
|
+
gap: 0.5rem;
|
|
48
|
+
padding: 0.5rem;
|
|
49
|
+
|
|
50
|
+
border-top: oklch(87% 0.065 274.039) 1px solid;
|
|
51
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Tab as BaseTab, TabGroup as BaseTabGroup, TabList as BaseTabList, TabPanel as BaseTabPanel } from "terracotta";
|
|
2
|
+
import "./Tabs.css";
|
|
3
|
+
export declare const Tab: typeof BaseTab;
|
|
4
|
+
export declare const TabGroup: typeof BaseTabGroup;
|
|
5
|
+
export declare const TabPanel: typeof BaseTabPanel;
|
|
6
|
+
export declare const TabList: typeof BaseTabList;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Tab as BaseTab, TabGroup as BaseTabGroup, TabList as BaseTabList, TabPanel as BaseTabPanel, } from "terracotta";
|
|
2
|
+
import "./Tabs.css";
|
|
3
|
+
export const Tab = props => <BaseTab data-start-tab {...props}/>;
|
|
4
|
+
export const TabGroup = props => (<BaseTabGroup data-start-tab-group {...props}/>);
|
|
5
|
+
export const TabPanel = props => (<BaseTabPanel data-start-tab-panel {...props}/>);
|
|
6
|
+
export const TabList = props => <BaseTabList data-start-tab-list {...props}/>;
|