@solidjs/start 2.0.0-rc.3 → 2.0.0-rc.5
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 +48 -0
- 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 +1 -0
- package/dist/config/constants.js +1 -0
- package/dist/config/env.js +2 -2
- 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 +46 -1
- package/dist/config/index.d.ts +23 -0
- package/dist/config/index.js +14 -6
- package/dist/config/manifest.js +11 -2
- package/dist/directives/remove-unused-variables.js +2 -2
- package/dist/directives/xxhash32.js +5 -13
- package/dist/fns/handler.js +37 -12
- package/dist/fns/plugins.d.ts +34 -0
- package/dist/fns/plugins.js +33 -0
- package/dist/fns/serialization.js +35 -5
- package/dist/server/assets/render.jsx +1 -1
- package/dist/server/handler.js +9 -1
- package/dist/server/spa/StartServer.jsx +1 -1
- package/dist/shared/clientOnly.js +3 -1
- package/dist/shared/dev-toolbar/error-viewer/CodeView.jsx +1 -1
- package/dist/shared/dev-toolbar/functions/BlobViewer.css +1 -1
- package/dist/shared/dev-toolbar/functions/BlobViewer.d.ts +2 -2
- package/dist/shared/dev-toolbar/functions/BlobViewer.jsx +7 -11
- package/dist/shared/dev-toolbar/functions/FormDataViewer.d.ts +1 -1
- package/dist/shared/dev-toolbar/functions/FormDataViewer.jsx +7 -11
- package/dist/shared/dev-toolbar/functions/HeadersViewer.d.ts +1 -1
- package/dist/shared/dev-toolbar/functions/HeadersViewer.jsx +2 -2
- package/dist/shared/dev-toolbar/functions/HexViewer.d.ts +1 -1
- package/dist/shared/dev-toolbar/functions/HexViewer.jsx +7 -15
- package/dist/shared/dev-toolbar/functions/SerovalValue.css +0 -2
- package/dist/shared/dev-toolbar/functions/SerovalValue.d.ts +1 -1
- package/dist/shared/dev-toolbar/functions/SerovalValue.jsx +3 -3
- package/dist/shared/dev-toolbar/functions/SerovalViewer.css +0 -1
- package/dist/shared/dev-toolbar/functions/URLSearchParamsViewer.d.ts +1 -1
- package/dist/shared/dev-toolbar/functions/URLSearchParamsViewer.jsx +5 -7
- package/dist/shared/dev-toolbar/functions/styles.css +0 -1
- package/dist/shared/dev-toolbar/index.jsx +5 -0
- package/dist/shared/ui/Badge.css +0 -1
- package/dist/shared/ui/Badge.d.ts +3 -3
- package/dist/shared/ui/Badge.jsx +3 -3
- package/dist/shared/ui/Button.jsx +1 -1
- package/dist/shared/ui/Cascade.jsx +3 -3
- package/dist/shared/ui/Dialog.css +1 -2
- package/dist/shared/ui/Dialog.jsx +3 -3
- package/dist/shared/ui/IconButton.jsx +1 -1
- package/dist/shared/ui/Placeholder.css +1 -1
- package/dist/shared/ui/Placeholder.d.ts +2 -2
- package/dist/shared/ui/Placeholder.jsx +2 -4
- package/dist/shared/ui/Section.css +0 -1
- package/dist/shared/ui/Section.d.ts +2 -2
- package/dist/shared/ui/Section.jsx +3 -5
- package/dist/shared/ui/Select.jsx +3 -3
- package/dist/shared/ui/Table.d.ts +6 -6
- package/dist/shared/ui/Table.jsx +5 -5
- package/dist/shared/ui/Tabs.jsx +4 -4
- package/dist/shared/ui/Text.css +7 -3
- package/dist/shared/ui/Text.d.ts +8 -8
- package/dist/shared/ui/Text.jsx +9 -9
- package/package.json +28 -27
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { crossSerializeStream, deserialize, Feature, fromCrossJSON, getCrossReferenceHeader, toCrossJSONStream, } from "seroval";
|
|
2
2
|
import { AbortSignalPlugin, CustomEventPlugin, DOMExceptionPlugin, EventPlugin, FormDataPlugin, HeadersPlugin, ReadableStreamPlugin, RequestPlugin, ResponsePlugin, URLPlugin, URLSearchParamsPlugin, } from "seroval-plugins/web";
|
|
3
|
-
|
|
3
|
+
import userPlugins from "solid-start:seroval-plugins";
|
|
4
4
|
const DEFAULT_PLUGINS = [
|
|
5
5
|
AbortSignalPlugin,
|
|
6
6
|
CustomEventPlugin,
|
|
@@ -14,8 +14,37 @@ const DEFAULT_PLUGINS = [
|
|
|
14
14
|
URLSearchParamsPlugin,
|
|
15
15
|
URLPlugin,
|
|
16
16
|
];
|
|
17
|
+
/**
|
|
18
|
+
* Plugins from `serialization.plugins` are appended rather than prepended:
|
|
19
|
+
* seroval picks the first plugin whose `test()` passes, so the built-ins win
|
|
20
|
+
* and a loose user `test()` can't take over `Request`/`FormData`/`URL`.
|
|
21
|
+
*
|
|
22
|
+
* The same list has to be used on both ends of a server function, which is why
|
|
23
|
+
* this comes from a virtual module bundled into the client and the server
|
|
24
|
+
* rather than a runtime option.
|
|
25
|
+
*/
|
|
26
|
+
const PLUGINS = [...DEFAULT_PLUGINS, ...userPlugins];
|
|
17
27
|
const MAX_SERIALIZATION_DEPTH_LIMIT = 64;
|
|
18
28
|
const DISABLED_FEATURES = Feature.RegExp;
|
|
29
|
+
/**
|
|
30
|
+
* An error thrown by a server function is serialized and rethrown on the
|
|
31
|
+
* client, and seroval includes `Error.prototype.stack` by default. In
|
|
32
|
+
* production that leaks server file paths, internal function names and the
|
|
33
|
+
* shape of the deployment to anyone who can trigger a throw, so strip it.
|
|
34
|
+
* Development keeps the stack: that's where it's actually useful, and the
|
|
35
|
+
* paths it exposes are the developer's own.
|
|
36
|
+
*
|
|
37
|
+
* Only applied when writing; parsing leaves `DISABLED_FEATURES` alone so an
|
|
38
|
+
* incoming payload that does carry a stack still deserializes.
|
|
39
|
+
*/
|
|
40
|
+
const SERIALIZE_DISABLED_FEATURES = import.meta.env.PROD
|
|
41
|
+
? DISABLED_FEATURES | Feature.ErrorPrototypeStack
|
|
42
|
+
: DISABLED_FEATURES;
|
|
43
|
+
/**
|
|
44
|
+
* `crossSerializeStream` historically ran with every feature enabled, so only
|
|
45
|
+
* add the stack removal here rather than the full serialize set.
|
|
46
|
+
*/
|
|
47
|
+
const JS_SERIALIZE_DISABLED_FEATURES = import.meta.env.PROD ? Feature.ErrorPrototypeStack : 0;
|
|
19
48
|
/**
|
|
20
49
|
* Alexis:
|
|
21
50
|
*
|
|
@@ -47,7 +76,8 @@ export function serializeToJSStream(id, value) {
|
|
|
47
76
|
start(controller) {
|
|
48
77
|
crossSerializeStream(value, {
|
|
49
78
|
scopeId: id,
|
|
50
|
-
|
|
79
|
+
disabledFeatures: JS_SERIALIZE_DISABLED_FEATURES,
|
|
80
|
+
plugins: PLUGINS,
|
|
51
81
|
onSerialize(data, initial) {
|
|
52
82
|
controller.enqueue(createChunk(initial ? `(${getCrossReferenceHeader(id)},${data})` : data));
|
|
53
83
|
},
|
|
@@ -65,9 +95,9 @@ export function serializeToJSONStream(value) {
|
|
|
65
95
|
return new ReadableStream({
|
|
66
96
|
start(controller) {
|
|
67
97
|
toCrossJSONStream(value, {
|
|
68
|
-
disabledFeatures:
|
|
98
|
+
disabledFeatures: SERIALIZE_DISABLED_FEATURES,
|
|
69
99
|
depthLimit: MAX_SERIALIZATION_DEPTH_LIMIT,
|
|
70
|
-
plugins:
|
|
100
|
+
plugins: PLUGINS,
|
|
71
101
|
onParse(node) {
|
|
72
102
|
controller.enqueue(createChunk(JSON.stringify(node)));
|
|
73
103
|
},
|
|
@@ -180,7 +210,7 @@ export async function deserializeJSONStream(response) {
|
|
|
180
210
|
refs,
|
|
181
211
|
disabledFeatures: DISABLED_FEATURES,
|
|
182
212
|
depthLimit: MAX_SERIALIZATION_DEPTH_LIMIT,
|
|
183
|
-
plugins:
|
|
213
|
+
plugins: PLUGINS,
|
|
184
214
|
});
|
|
185
215
|
return value;
|
|
186
216
|
}
|
|
@@ -9,6 +9,6 @@ const assetMap = {
|
|
|
9
9
|
noscript: (props) => (<noscript {...props.attrs}>{props.children}</noscript>),
|
|
10
10
|
};
|
|
11
11
|
export function renderAsset(asset, nonce) {
|
|
12
|
-
let { tag, attrs: { key, ...attrs } = { key: undefined }, children
|
|
12
|
+
let { tag, attrs: { key, ...attrs } = { key: undefined }, children } = asset;
|
|
13
13
|
return assetMap[tag]({ attrs: { ...attrs, nonce }, key, children });
|
|
14
14
|
}
|
package/dist/server/handler.js
CHANGED
|
@@ -171,9 +171,17 @@ function handleStreamCompleteRedirect(context) {
|
|
|
171
171
|
return ({ write }) => {
|
|
172
172
|
context.complete = true;
|
|
173
173
|
const to = context.response && context.response.headers.get("Location");
|
|
174
|
-
|
|
174
|
+
if (!to)
|
|
175
|
+
return;
|
|
176
|
+
// The shell has already flushed, so the redirect has to happen client side.
|
|
177
|
+
// Carry the nonce so a strict `script-src` CSP doesn't block it.
|
|
178
|
+
const nonce = context.nonce ? ` nonce="${escapeAttribute(context.nonce)}"` : "";
|
|
179
|
+
write(`<script${nonce}>window.location=${JSON.stringify(to).replace(/</g, "\\u003c")}</script>`);
|
|
175
180
|
};
|
|
176
181
|
}
|
|
182
|
+
function escapeAttribute(value) {
|
|
183
|
+
return value.replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<");
|
|
184
|
+
}
|
|
177
185
|
function stripBaseUrl(path) {
|
|
178
186
|
const base = import.meta.env.SERVER_BASE_URL || import.meta.env.BASE_URL || "/";
|
|
179
187
|
return stripPathBase(path, base);
|
|
@@ -18,7 +18,7 @@ export function StartServer(props) {
|
|
|
18
18
|
<TopErrorBoundary>
|
|
19
19
|
<props.document scripts={<>
|
|
20
20
|
<PatchVirtualDevStyles nonce={nonce}/>
|
|
21
|
-
<script type="module" src={getSsrManifest("client").path(import.meta.env.START_CLIENT_ENTRY_URL)}/>
|
|
21
|
+
<script type="module" nonce={nonce} src={getSsrManifest("client").path(import.meta.env.START_CLIENT_ENTRY_URL)}/>
|
|
22
22
|
</>}/>
|
|
23
23
|
</TopErrorBoundary>
|
|
24
24
|
</NoHydration>);
|
|
@@ -19,7 +19,9 @@ export default function clientOnly(fn, options = {}) {
|
|
|
19
19
|
return Comp(rest);
|
|
20
20
|
const [mounted, setMounted] = createSignal(!sharedConfig.context);
|
|
21
21
|
onMount(() => setMounted(true));
|
|
22
|
-
return createMemo(() => ((Comp = comp()),
|
|
22
|
+
return createMemo(() => ((Comp = comp()),
|
|
23
|
+
(m = mounted()),
|
|
24
|
+
untrack(() => (Comp && m ? Comp(rest) : props.fallback))));
|
|
23
25
|
};
|
|
24
26
|
}
|
|
25
27
|
function load(fn, setComp) {
|
|
@@ -51,7 +51,7 @@ export function CodeView(props) {
|
|
|
51
51
|
for (let i = 0, len = lines.length; i < len; i++) {
|
|
52
52
|
const el = lines[i];
|
|
53
53
|
if (props.line - minLine() - 1 === i) {
|
|
54
|
-
el.dataset.startErrorViewerErrorLine =
|
|
54
|
+
el.dataset.startErrorViewerErrorLine = "";
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { createMemo, createResource, onCleanup, Show, Suspense } from
|
|
1
|
+
import { createMemo, createResource, onCleanup, Show, Suspense } from "solid-js";
|
|
2
2
|
import { Badge } from "../../ui/Badge.jsx";
|
|
3
3
|
import Button from "../../ui/Button.jsx";
|
|
4
|
-
import
|
|
4
|
+
import "./BlobViewer.css";
|
|
5
5
|
function DocumentIcon(props) {
|
|
6
6
|
return (<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" {...props}>
|
|
7
7
|
<title>{props.title}</title>
|
|
@@ -23,19 +23,15 @@ function BlobViewerInner(props) {
|
|
|
23
23
|
document.body.removeChild(link);
|
|
24
24
|
}
|
|
25
25
|
return (<Button data-start-blob-viewer onClick={() => openFileInNewTab()}>
|
|
26
|
-
{props.source instanceof File
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
</Badge>)
|
|
31
|
-
: <Badge type="info">{props.source.type}</Badge>}
|
|
26
|
+
{props.source instanceof File ? (<Badge type="info">
|
|
27
|
+
<DocumentIcon title={props.source.name}/>
|
|
28
|
+
{props.source.name}
|
|
29
|
+
</Badge>) : (<Badge type="info">{props.source.type}</Badge>)}
|
|
32
30
|
</Button>);
|
|
33
31
|
}
|
|
34
32
|
export function BlobViewer(props) {
|
|
35
33
|
const [data] = createResource(() => props.source);
|
|
36
34
|
return (<Suspense>
|
|
37
|
-
<Show when={data()}>
|
|
38
|
-
{(current) => <BlobViewerInner source={current()}/>}
|
|
39
|
-
</Show>
|
|
35
|
+
<Show when={data()}>{current => <BlobViewerInner source={current()}/>}</Show>
|
|
40
36
|
</Suspense>);
|
|
41
37
|
}
|
|
@@ -1,17 +1,15 @@
|
|
|
1
|
-
import { createResource, For, Show, Suspense } from
|
|
2
|
-
import { Section } from
|
|
3
|
-
import { BlobViewer } from
|
|
4
|
-
import { PropertySeparator, SerovalValue } from
|
|
1
|
+
import { createResource, For, Show, Suspense } from "solid-js";
|
|
2
|
+
import { Section } from "../../ui/Section.jsx";
|
|
3
|
+
import { BlobViewer } from "./BlobViewer.jsx";
|
|
4
|
+
import { PropertySeparator, SerovalValue } from "./SerovalValue.jsx";
|
|
5
5
|
function FormDataViewerInner(props) {
|
|
6
|
-
return (<Section title="FormData" options={{ size:
|
|
6
|
+
return (<Section title="FormData" options={{ size: "sm" }}>
|
|
7
7
|
<div data-start-form-data-viewer data-start-properties>
|
|
8
8
|
<For each={Array.from(props.source.entries())}>
|
|
9
9
|
{([key, value]) => (<div data-start-property>
|
|
10
10
|
<SerovalValue value={`"${key}"`}/>
|
|
11
11
|
<PropertySeparator />
|
|
12
|
-
{typeof value ===
|
|
13
|
-
? <SerovalValue value={`"${JSON.stringify(value)}"`}/>
|
|
14
|
-
: <BlobViewer source={value}/>}
|
|
12
|
+
{typeof value === "string" ? (<SerovalValue value={`"${JSON.stringify(value)}"`}/>) : (<BlobViewer source={value}/>)}
|
|
15
13
|
</div>)}
|
|
16
14
|
</For>
|
|
17
15
|
</div>
|
|
@@ -20,8 +18,6 @@ function FormDataViewerInner(props) {
|
|
|
20
18
|
export function FormDataViewer(props) {
|
|
21
19
|
const [data] = createResource(() => props.source);
|
|
22
20
|
return (<Suspense>
|
|
23
|
-
<Show when={data()}>
|
|
24
|
-
{(current) => <FormDataViewerInner source={current()}/>}
|
|
25
|
-
</Show>
|
|
21
|
+
<Show when={data()}>{current => <FormDataViewerInner source={current()}/>}</Show>
|
|
26
22
|
</Suspense>);
|
|
27
23
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { For } from "solid-js";
|
|
2
2
|
import { PropertySeparator, SerovalValue } from "./SerovalValue.jsx";
|
|
3
|
-
import
|
|
3
|
+
import "./HeadersViewer.css";
|
|
4
4
|
import { Text } from "../../ui/Text.jsx";
|
|
5
5
|
export function HeadersViewer(props) {
|
|
6
6
|
return (<div data-start-headers-viewer data-start-properties>
|
|
7
7
|
<For each={Array.from(props.headers.entries())}>
|
|
8
8
|
{([key, value]) => (<div data-start-property>
|
|
9
|
-
<Text options={{ size:
|
|
9
|
+
<Text options={{ size: "xs", weight: "semibold", wrap: "nowrap" }}>{key}</Text>
|
|
10
10
|
<PropertySeparator />
|
|
11
11
|
<SerovalValue value={value}/>
|
|
12
12
|
</div>)}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createMemo, createResource, For, Show, Suspense } from "solid-js";
|
|
2
2
|
import { Text } from "../../ui/Text.jsx";
|
|
3
|
-
import
|
|
3
|
+
import "./HexViewer.css";
|
|
4
4
|
function toHex(num, digits = 2) {
|
|
5
|
-
return num.toString(16).padStart(digits,
|
|
5
|
+
return num.toString(16).padStart(digits, "0").toUpperCase();
|
|
6
6
|
}
|
|
7
7
|
function HexChunk(props) {
|
|
8
8
|
const content = createMemo(() => {
|
|
@@ -12,7 +12,7 @@ function HexChunk(props) {
|
|
|
12
12
|
const byte4 = props.bytes[3] || 0;
|
|
13
13
|
return `${toHex(byte1)} ${toHex(byte2)} ${toHex(byte3)} ${toHex(byte4)}`;
|
|
14
14
|
});
|
|
15
|
-
return (<Text data-start-hex-chunk options={{ size:
|
|
15
|
+
return (<Text data-start-hex-chunk options={{ size: "xs", weight: "bold", wrap: "nowrap" }}>
|
|
16
16
|
{content()}
|
|
17
17
|
</Text>);
|
|
18
18
|
}
|
|
@@ -42,9 +42,7 @@ function HexText(props) {
|
|
|
42
42
|
return result;
|
|
43
43
|
});
|
|
44
44
|
return (<div data-start-hex-text>
|
|
45
|
-
<Text options={{ size:
|
|
46
|
-
{text()}
|
|
47
|
-
</Text>
|
|
45
|
+
<Text options={{ size: "xs", weight: "bold", wrap: "nowrap" }}>{text()}</Text>
|
|
48
46
|
</div>);
|
|
49
47
|
}
|
|
50
48
|
export function HexViewerInner(props) {
|
|
@@ -57,22 +55,16 @@ export function HexViewerInner(props) {
|
|
|
57
55
|
});
|
|
58
56
|
return (<div data-start-hex-viewer>
|
|
59
57
|
<div data-start-hex-viewer-bytes>
|
|
60
|
-
<For each={rows()}>
|
|
61
|
-
{(current) => <HexRow bytes={current}/>}
|
|
62
|
-
</For>
|
|
58
|
+
<For each={rows()}>{current => <HexRow bytes={current}/>}</For>
|
|
63
59
|
</div>
|
|
64
60
|
<div data-start-hex-viewer-text>
|
|
65
|
-
<For each={rows()}>
|
|
66
|
-
{(current) => <HexText bytes={current}/>}
|
|
67
|
-
</For>
|
|
61
|
+
<For each={rows()}>{current => <HexText bytes={current}/>}</For>
|
|
68
62
|
</div>
|
|
69
63
|
</div>);
|
|
70
64
|
}
|
|
71
65
|
export function HexViewer(props) {
|
|
72
66
|
const [data] = createResource(() => props.bytes);
|
|
73
67
|
return (<Suspense>
|
|
74
|
-
<Show when={data()}>
|
|
75
|
-
{(current) => <HexViewerInner bytes={current()}/>}
|
|
76
|
-
</Show>
|
|
68
|
+
<Show when={data()}>{current => <HexViewerInner bytes={current()}/>}</Show>
|
|
77
69
|
</Suspense>);
|
|
78
70
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Text } from "../../ui/Text.jsx";
|
|
2
|
-
import
|
|
2
|
+
import "./SerovalValue.css";
|
|
3
3
|
export function SerovalValue(props) {
|
|
4
|
-
return (<Text data-start-seroval-value options={{ size:
|
|
4
|
+
return (<Text data-start-seroval-value options={{ size: "xs", weight: "semibold", wrap: "nowrap" }}>
|
|
5
5
|
{`${props.value}`}
|
|
6
6
|
</Text>);
|
|
7
7
|
}
|
|
8
8
|
export function PropertySeparator() {
|
|
9
|
-
return <Text options={{ size:
|
|
9
|
+
return <Text options={{ size: "xs", weight: "semibold", wrap: "nowrap" }}>:</Text>;
|
|
10
10
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { createResource, For, Show, Suspense } from
|
|
2
|
-
import { Section } from
|
|
3
|
-
import { PropertySeparator, SerovalValue } from
|
|
1
|
+
import { createResource, For, Show, Suspense } from "solid-js";
|
|
2
|
+
import { Section } from "../../ui/Section.jsx";
|
|
3
|
+
import { PropertySeparator, SerovalValue } from "./SerovalValue.jsx";
|
|
4
4
|
function URLSearchParamsViewerInner(props) {
|
|
5
|
-
return (<Section title="URLSearchParams" options={{ size:
|
|
5
|
+
return (<Section title="URLSearchParams" options={{ size: "sm" }}>
|
|
6
6
|
<div data-start-properties>
|
|
7
7
|
<For each={Array.from(props.source.entries())}>
|
|
8
8
|
{([key, value]) => (<div data-start-property>
|
|
@@ -17,8 +17,6 @@ function URLSearchParamsViewerInner(props) {
|
|
|
17
17
|
export function URLSearchParamsViewer(props) {
|
|
18
18
|
const [data] = createResource(() => props.source);
|
|
19
19
|
return (<Suspense>
|
|
20
|
-
<Show when={data()}>
|
|
21
|
-
{(current) => <URLSearchParamsViewerInner source={current()}/>}
|
|
22
|
-
</Show>
|
|
20
|
+
<Show when={data()}>{current => <URLSearchParamsViewerInner source={current()}/>}</Show>
|
|
23
21
|
</Suspense>);
|
|
24
22
|
}
|
|
@@ -104,6 +104,11 @@ export function DevToolbar(props) {
|
|
|
104
104
|
}
|
|
105
105
|
createEffect(() => {
|
|
106
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
|
+
}
|
|
107
112
|
pushError(error.error ?? error);
|
|
108
113
|
};
|
|
109
114
|
window.addEventListener("error", onErrorEvent);
|
package/dist/shared/ui/Badge.css
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { JSX } from
|
|
2
|
-
import
|
|
1
|
+
import type { JSX } from "solid-js";
|
|
2
|
+
import "./Badge.css";
|
|
3
3
|
export interface BadgeProps {
|
|
4
|
-
type:
|
|
4
|
+
type: "info" | "success" | "failure" | "warning";
|
|
5
5
|
children: JSX.Element;
|
|
6
6
|
}
|
|
7
7
|
export declare function Badge(props: BadgeProps): JSX.Element;
|
package/dist/shared/ui/Badge.jsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Text } from
|
|
1
|
+
import "./Badge.css";
|
|
2
|
+
import { Text } from "./Text.jsx";
|
|
3
3
|
export function Badge(props) {
|
|
4
|
-
return (<Text options={{ size:
|
|
4
|
+
return (<Text options={{ size: "xs", wrap: "nowrap", weight: "semibold" }} data-start-badge={props.type}>
|
|
5
5
|
{props.children}
|
|
6
6
|
</Text>);
|
|
7
7
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Button as BaseButton } from "terracotta";
|
|
2
2
|
import "./Button.css";
|
|
3
|
-
const Button =
|
|
3
|
+
const Button = props => (<BaseButton type="button" data-start-button {...props}/>);
|
|
4
4
|
export default Button;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Select as BaseSelect, SelectOption as BaseSelectOption
|
|
1
|
+
import { Select as BaseSelect, SelectOption as BaseSelectOption } from "terracotta";
|
|
2
2
|
import "./Cascade.css";
|
|
3
|
-
export const Cascade =
|
|
4
|
-
export const CascadeOption =
|
|
3
|
+
export const Cascade = props => <BaseSelect data-start-cascade {...props}/>;
|
|
4
|
+
export const CascadeOption = props => (<BaseSelectOption data-start-cascade-option {...props}/>);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Dialog as BaseDialog, DialogOverlay as BaseDialogOverlay, DialogPanel as BaseDialogPanel, } from "terracotta";
|
|
2
2
|
import "./Dialog.css";
|
|
3
|
-
export const Dialog =
|
|
4
|
-
export const DialogOverlay =
|
|
5
|
-
export const DialogPanel =
|
|
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}/>);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Button as BaseButton } from "terracotta";
|
|
2
2
|
import "./IconButton.css";
|
|
3
|
-
const IconButton =
|
|
3
|
+
const IconButton = props => (<BaseButton type="button" data-start-icon-button {...props}/>);
|
|
4
4
|
export default IconButton;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { JSX } from "solid-js";
|
|
2
2
|
import { type TextProps } from "./Text.tsx";
|
|
3
|
-
import
|
|
3
|
+
import "./Section.css";
|
|
4
4
|
export interface SectionProps {
|
|
5
5
|
title: string;
|
|
6
|
-
options?: TextProps<
|
|
6
|
+
options?: TextProps<"span">["options"];
|
|
7
7
|
children: JSX.Element;
|
|
8
8
|
}
|
|
9
9
|
export declare function Section(props: SectionProps): JSX.Element;
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { Text } from "./Text.jsx";
|
|
2
|
-
import
|
|
2
|
+
import "./Section.css";
|
|
3
3
|
export function Section(props) {
|
|
4
4
|
return (<div data-start-section>
|
|
5
|
-
<Text data-start-section-title options={{ weight:
|
|
5
|
+
<Text data-start-section-title options={{ weight: "bold", font: "sans", ...props.options }}>
|
|
6
6
|
{props.title}
|
|
7
7
|
</Text>
|
|
8
|
-
<div data-start-section-content>
|
|
9
|
-
{props.children}
|
|
10
|
-
</div>
|
|
8
|
+
<div data-start-section-content>{props.children}</div>
|
|
11
9
|
</div>);
|
|
12
10
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Select as BaseSelect, SelectOption as BaseSelectOption
|
|
1
|
+
import { Select as BaseSelect, SelectOption as BaseSelectOption } from "terracotta";
|
|
2
2
|
import "./Select.css";
|
|
3
|
-
export const Select =
|
|
4
|
-
export const SelectOption =
|
|
3
|
+
export const Select = props => <BaseSelect data-start-select {...props}/>;
|
|
4
|
+
export const SelectOption = props => (<BaseSelectOption data-start-select-option {...props}/>);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type { ComponentProps, JSX } from
|
|
2
|
-
import
|
|
3
|
-
type TableProps = ComponentProps<
|
|
1
|
+
import type { ComponentProps, JSX } from "solid-js";
|
|
2
|
+
import "./Table.css";
|
|
3
|
+
type TableProps = ComponentProps<"div">;
|
|
4
4
|
export declare function Table(props: TableProps): JSX.Element;
|
|
5
|
-
type TableHeaderProps = ComponentProps<
|
|
5
|
+
type TableHeaderProps = ComponentProps<"div">;
|
|
6
6
|
export declare function TableHeader(props: TableHeaderProps): JSX.Element;
|
|
7
|
-
type TableRowProps = ComponentProps<
|
|
7
|
+
type TableRowProps = ComponentProps<"div">;
|
|
8
8
|
export declare function TableRow(props: TableRowProps): JSX.Element;
|
|
9
|
-
type TableCellProps = ComponentProps<
|
|
9
|
+
type TableCellProps = ComponentProps<"div">;
|
|
10
10
|
export declare function TableCell(props: TableCellProps): JSX.Element;
|
|
11
11
|
export {};
|
package/dist/shared/ui/Table.jsx
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "./Table.css";
|
|
2
2
|
export function Table(props) {
|
|
3
|
-
return
|
|
3
|
+
return <div data-start-table {...props}/>;
|
|
4
4
|
}
|
|
5
5
|
export function TableHeader(props) {
|
|
6
|
-
return
|
|
6
|
+
return <div data-start-table-header {...props}/>;
|
|
7
7
|
}
|
|
8
8
|
export function TableRow(props) {
|
|
9
|
-
return
|
|
9
|
+
return <div data-start-table-row {...props}/>;
|
|
10
10
|
}
|
|
11
11
|
export function TableCell(props) {
|
|
12
|
-
return
|
|
12
|
+
return <div data-start-table-cell {...props}/>;
|
|
13
13
|
}
|
package/dist/shared/ui/Tabs.jsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Tab as BaseTab, TabGroup as BaseTabGroup, TabList as BaseTabList, TabPanel as BaseTabPanel, } from "terracotta";
|
|
2
2
|
import "./Tabs.css";
|
|
3
|
-
export const Tab =
|
|
4
|
-
export const TabGroup =
|
|
5
|
-
export const TabPanel =
|
|
6
|
-
export const TabList =
|
|
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}/>;
|