@visin/frontend-core 1.16.0 → 1.18.0
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/LICENSE +21 -0
- package/dist/components/Page/ConfirmDialog.d.ts +27 -0
- package/dist/components/Page/ConfirmDialog.d.ts.map +1 -0
- package/dist/components/Page/ConfirmDialog.js +11 -0
- package/dist/components/Page/ConfirmDialog.js.map +1 -0
- package/dist/components/Page/ListSkeleton.d.ts +12 -0
- package/dist/components/Page/ListSkeleton.d.ts.map +1 -0
- package/dist/components/Page/ListSkeleton.js +10 -0
- package/dist/components/Page/ListSkeleton.js.map +1 -0
- package/dist/components/Page/index.d.ts +4 -0
- package/dist/components/Page/index.d.ts.map +1 -1
- package/dist/components/Page/index.js +2 -0
- package/dist/components/Page/index.js.map +1 -1
- package/dist/components/ShareButton.d.ts.map +1 -1
- package/dist/components/ShareButton.js +12 -4
- package/dist/components/ShareButton.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/navigation.d.ts.map +1 -1
- package/dist/navigation.js +9 -3
- package/dist/navigation.js.map +1 -1
- package/package.json +1 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Toomas Tahves
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export interface ConfirmDialogProps {
|
|
3
|
+
open: boolean;
|
|
4
|
+
/** The question, as a sentence: "Delete this comparison?" */
|
|
5
|
+
title: string;
|
|
6
|
+
/** What will happen, and what will not be possible afterwards. */
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
/** The button that does it, named for the act: "Delete", not "OK". */
|
|
9
|
+
confirmLabel: string;
|
|
10
|
+
/** The same button while it runs; defaults to the label with an ellipsis. */
|
|
11
|
+
busyLabel?: string;
|
|
12
|
+
/** An act that cannot be taken back is drawn in the error colour. Defaults to true. */
|
|
13
|
+
destructive?: boolean;
|
|
14
|
+
/** Holds both buttons and the backdrop while the act runs. */
|
|
15
|
+
busy?: boolean;
|
|
16
|
+
/** Why the last attempt was refused, shown where the person is looking. */
|
|
17
|
+
error?: string | null;
|
|
18
|
+
onConfirm: () => void;
|
|
19
|
+
onCancel: () => void;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* One way to ask "are you sure?": a question, what will happen, and a button named for it. It keeps itself open with
|
|
23
|
+
* the reason when the act is refused, and holds still while the act runs, so a second click or a stray backdrop tap
|
|
24
|
+
* cannot interrupt it. Cancel is focused first, so Enter on a destructive prompt backs out.
|
|
25
|
+
*/
|
|
26
|
+
export declare function ConfirmDialog({ open, title, children, confirmLabel, busyLabel, destructive, busy, error, onConfirm, onCancel }: ConfirmDialogProps): import("react").JSX.Element;
|
|
27
|
+
//# sourceMappingURL=ConfirmDialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfirmDialog.d.ts","sourceRoot":"","sources":["../../../src/components/Page/ConfirmDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,OAAO,CAAC;IACd,6DAA6D;IAC7D,KAAK,EAAE,MAAM,CAAC;IACd,kEAAkE;IAClE,QAAQ,EAAE,SAAS,CAAC;IACpB,sEAAsE;IACtE,YAAY,EAAE,MAAM,CAAC;IACrB,6EAA6E;IAC7E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uFAAuF;IACvF,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,8DAA8D;IAC9D,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,2EAA2E;IAC3E,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,EAC5B,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,YAAY,EACZ,SAAS,EACT,WAAkB,EAClB,IAAY,EACZ,KAAK,EACL,SAAS,EACT,QAAQ,EACT,EAAE,kBAAkB,+BA4BpB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Alert, Button, Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle } from '@mui/material';
|
|
3
|
+
/**
|
|
4
|
+
* One way to ask "are you sure?": a question, what will happen, and a button named for it. It keeps itself open with
|
|
5
|
+
* the reason when the act is refused, and holds still while the act runs, so a second click or a stray backdrop tap
|
|
6
|
+
* cannot interrupt it. Cancel is focused first, so Enter on a destructive prompt backs out.
|
|
7
|
+
*/
|
|
8
|
+
export function ConfirmDialog({ open, title, children, confirmLabel, busyLabel, destructive = true, busy = false, error, onConfirm, onCancel }) {
|
|
9
|
+
return (_jsxs(Dialog, { open: open, onClose: busy ? undefined : onCancel, "aria-labelledby": "confirm-dialog-title", children: [_jsx(DialogTitle, { id: "confirm-dialog-title", children: title }), _jsxs(DialogContent, { children: [_jsx(DialogContentText, { component: "div", children: children }), error && (_jsx(Alert, { severity: "error", sx: { mt: 2 }, children: error }))] }), _jsxs(DialogActions, { children: [_jsx(Button, { onClick: onCancel, disabled: busy, autoFocus: destructive, children: "Cancel" }), _jsx(Button, { onClick: onConfirm, disabled: busy, variant: "contained", color: destructive ? 'error' : 'primary', autoFocus: !destructive, children: busy ? (busyLabel ?? `${confirmLabel}…`) : confirmLabel })] })] }));
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=ConfirmDialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfirmDialog.js","sourceRoot":"","sources":["../../../src/components/Page/ConfirmDialog.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,aAAa,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAsBpH;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,EAC5B,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,YAAY,EACZ,SAAS,EACT,WAAW,GAAG,IAAI,EAClB,IAAI,GAAG,KAAK,EACZ,KAAK,EACL,SAAS,EACT,QAAQ,EACW;IACnB,OAAO,CACL,MAAC,MAAM,IAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,qBAAkB,sBAAsB,aAC9F,KAAC,WAAW,IAAC,EAAE,EAAC,sBAAsB,YAAE,KAAK,GAAe,EAC5D,MAAC,aAAa,eACZ,KAAC,iBAAiB,IAAC,SAAS,EAAC,KAAK,YAAE,QAAQ,GAAqB,EAChE,KAAK,IAAI,CACR,KAAC,KAAK,IAAC,QAAQ,EAAC,OAAO,EAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,YAClC,KAAK,GACA,CACT,IACa,EAChB,MAAC,aAAa,eACZ,KAAC,MAAM,IAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,uBAExD,EACT,KAAC,MAAM,IACL,OAAO,EAAE,SAAS,EAClB,QAAQ,EAAE,IAAI,EACd,OAAO,EAAC,WAAW,EACnB,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,EACxC,SAAS,EAAE,CAAC,WAAW,YAEtB,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,IAAI,GAAG,YAAY,GAAG,CAAC,CAAC,CAAC,CAAC,YAAY,GACjD,IACK,IACT,CACV,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface ListSkeletonProps {
|
|
2
|
+
/** How many placeholder rows. Defaults to 5. */
|
|
3
|
+
rows?: number;
|
|
4
|
+
/** Names the region for assistive technology. Defaults to "Loading". */
|
|
5
|
+
label?: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* The shape of a list while it loads: rows where the rows will be. A spinner in the middle of an empty page says only
|
|
9
|
+
* that something is happening; this says what is coming, and the page does not jump when it arrives.
|
|
10
|
+
*/
|
|
11
|
+
export declare function ListSkeleton({ rows, label }: ListSkeletonProps): import("react").JSX.Element;
|
|
12
|
+
//# sourceMappingURL=ListSkeleton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ListSkeleton.d.ts","sourceRoot":"","sources":["../../../src/components/Page/ListSkeleton.tsx"],"names":[],"mappings":"AAEA,MAAM,WAAW,iBAAiB;IAChC,gDAAgD;IAChD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,wEAAwE;IACxE,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,EAAE,IAAQ,EAAE,KAAiB,EAAE,EAAE,iBAAiB,+BAc9E"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Skeleton } from '@mui/material';
|
|
3
|
+
/**
|
|
4
|
+
* The shape of a list while it loads: rows where the rows will be. A spinner in the middle of an empty page says only
|
|
5
|
+
* that something is happening; this says what is coming, and the page does not jump when it arrives.
|
|
6
|
+
*/
|
|
7
|
+
export function ListSkeleton({ rows = 5, label = 'Loading' }) {
|
|
8
|
+
return (_jsx(Box, { role: "status", "aria-label": label, "aria-busy": "true", sx: { display: 'grid', gap: 1.5 }, children: Array.from({ length: rows }, (_, index) => (_jsxs(Box, { sx: { display: 'flex', alignItems: 'center', gap: 2 }, children: [_jsx(Skeleton, { variant: "rounded", width: 40, height: 40, sx: { flexShrink: 0 } }), _jsxs(Box, { sx: { flex: 1, minWidth: 0 }, children: [_jsx(Skeleton, { width: `${70 - (index % 3) * 12}%` }), _jsx(Skeleton, { width: `${40 + (index % 2) * 15}%` })] })] }, index))) }));
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=ListSkeleton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ListSkeleton.js","sourceRoot":"","sources":["../../../src/components/Page/ListSkeleton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAS9C;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,EAAE,IAAI,GAAG,CAAC,EAAE,KAAK,GAAG,SAAS,EAAqB;IAC7E,OAAO,CACL,KAAC,GAAG,IAAC,IAAI,EAAC,QAAQ,gBAAa,KAAK,eAAY,MAAM,EAAC,EAAE,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,YACrF,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,CAC1C,MAAC,GAAG,IAAa,EAAE,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,EAAE,aACpE,KAAC,QAAQ,IAAC,OAAO,EAAC,SAAS,EAAC,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,UAAU,EAAE,CAAC,EAAE,GAAI,EAC5E,MAAC,GAAG,IAAC,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,aAC/B,KAAC,QAAQ,IAAC,KAAK,EAAE,GAAG,EAAE,GAAG,CAAC,KAAK,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,GAAI,EAChD,KAAC,QAAQ,IAAC,KAAK,EAAE,GAAG,EAAE,GAAG,CAAC,KAAK,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,GAAI,IAC5C,KALE,KAAK,CAMT,CACP,CAAC,GACE,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -11,4 +11,8 @@ export type { EmptyStateProps } from './EmptyState';
|
|
|
11
11
|
export { ResponsiveActions } from './ResponsiveActions';
|
|
12
12
|
export type { ResponsiveAction, ResponsiveActionsProps } from './ResponsiveActions';
|
|
13
13
|
export { TAB_BAR_HEIGHT, useCompactLayout } from './layout';
|
|
14
|
+
export { ConfirmDialog } from './ConfirmDialog';
|
|
15
|
+
export type { ConfirmDialogProps } from './ConfirmDialog';
|
|
16
|
+
export { ListSkeleton } from './ListSkeleton';
|
|
17
|
+
export type { ListSkeletonProps } from './ListSkeleton';
|
|
14
18
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Page/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC7C,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,YAAY,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AACpF,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Page/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC7C,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,YAAY,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AACpF,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,YAAY,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -5,4 +5,6 @@ export { SectionHeading } from './SectionHeading';
|
|
|
5
5
|
export { EmptyState } from './EmptyState';
|
|
6
6
|
export { ResponsiveActions } from './ResponsiveActions';
|
|
7
7
|
export { TAB_BAR_HEIGHT, useCompactLayout } from './layout';
|
|
8
|
+
export { ConfirmDialog } from './ConfirmDialog';
|
|
9
|
+
export { ListSkeleton } from './ListSkeleton';
|
|
8
10
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Page/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAE7C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Page/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAE7C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ShareButton.d.ts","sourceRoot":"","sources":["../../src/components/ShareButton.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ShareButton.d.ts","sourceRoot":"","sources":["../../src/components/ShareButton.tsx"],"names":[],"mappings":"AAkDA,oHAAoH;AACpH,wBAAgB,WAAW,CAAC,EAAE,GAAG,EAAE,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,sCAEpD"}
|
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { useState } from 'react';
|
|
3
|
-
import { Alert,
|
|
4
|
-
import { Share } from '@mui/icons-material';
|
|
2
|
+
import { useEffect, useState } from 'react';
|
|
3
|
+
import { Alert, Chip, Dialog, DialogContent, DialogTitle, IconButton, TextField, Tooltip } from '@mui/material';
|
|
4
|
+
import { Check, Share } from '@mui/icons-material';
|
|
5
|
+
/** How long the "Link copied" tag stays, when focus has not already left. */
|
|
6
|
+
const COPIED_TAG_MS = 2500;
|
|
5
7
|
function ShareButtonForUrl({ url }) {
|
|
6
8
|
const [copied, setCopied] = useState(false);
|
|
7
9
|
const [manual, setManual] = useState(false);
|
|
10
|
+
useEffect(() => {
|
|
11
|
+
if (!copied)
|
|
12
|
+
return undefined;
|
|
13
|
+
const timer = setTimeout(() => setCopied(false), COPIED_TAG_MS);
|
|
14
|
+
return () => clearTimeout(timer);
|
|
15
|
+
}, [copied]);
|
|
8
16
|
const copy = async () => {
|
|
9
17
|
try {
|
|
10
18
|
await navigator.clipboard.writeText(url);
|
|
@@ -14,7 +22,7 @@ function ShareButtonForUrl({ url }) {
|
|
|
14
22
|
setManual(true);
|
|
15
23
|
}
|
|
16
24
|
};
|
|
17
|
-
return (_jsxs(_Fragment, { children: [_jsx(
|
|
25
|
+
return (_jsxs(_Fragment, { children: [_jsx(Tooltip, { title: "Copy link", children: _jsx(IconButton, { size: "small", "aria-label": "Share", onClick: () => void copy(), onBlur: () => setCopied(false), children: _jsx(Share, { fontSize: "small" }) }) }), copied && _jsx(Chip, { role: "status", size: "small", color: "success", variant: "outlined", icon: _jsx(Check, {}), label: "Link copied" }), _jsxs(Dialog, { open: manual, onClose: () => setManual(false), fullWidth: true, maxWidth: "sm", children: [_jsx(DialogTitle, { children: "Share this page" }), _jsxs(DialogContent, { children: [_jsx(Alert, { severity: "info", sx: { mb: 2 }, children: "Copy this link to share the page." }), _jsx(TextField, { label: "Share link", value: url, fullWidth: true, slotProps: { input: { readOnly: true } }, onFocus: (event) => event.target.select() })] })] })] }));
|
|
18
26
|
}
|
|
19
27
|
/** Copies the preview URL, with manual selection when clipboard access is unavailable. State belongs to one URL. */
|
|
20
28
|
export function ShareButton({ url }) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ShareButton.js","sourceRoot":"","sources":["../../src/components/ShareButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ShareButton.js","sourceRoot":"","sources":["../../src/components/ShareButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAChH,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAEnD,6EAA6E;AAC7E,MAAM,aAAa,GAAG,IAAI,CAAC;AAE3B,SAAS,iBAAiB,CAAC,EAAE,GAAG,EAAmB;IACjD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC5C,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC5C,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,MAAM;YAAE,OAAO,SAAS,CAAC;QAC9B,MAAM,KAAK,GAAG,UAAU,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,aAAa,CAAC,CAAC;QAChE,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IACnC,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IACb,MAAM,IAAI,GAAG,KAAK,IAAI,EAAE;QACtB,IAAI,CAAC;YACH,MAAM,SAAS,CAAC,SAAS,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;YACzC,SAAS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O,GAAG,CAAC,CAAC,CAAC,KAAC,iBAAiB,IAAW,GAAG,EAAE,GAAG,IAAb,GAAG,CAAc,CAAC,CAAC,CAAC,IAAI,CAAC;AAChE,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -9,8 +9,8 @@ export type { ErrorPageProps } from './components/ErrorPage';
|
|
|
9
9
|
export { AppLayout } from './components/AppLayout';
|
|
10
10
|
export { Markdown, MAX_MARKDOWN_LENGTH } from './components/Markdown';
|
|
11
11
|
export type { AppLayoutProps, AppLayoutNavGroup, AppLayoutNavItem, AppLayoutInternalNavItem, AppLayoutExternalNavItem, AppLayoutRecent, AppLayoutSiteLink, AppLayoutUser } from './components/AppLayout';
|
|
12
|
-
export { PageHeader, Panel, ListRow, RowIcon, SectionHeading, EmptyState, ResponsiveActions, TAB_BAR_HEIGHT, useCompactLayout } from './components/Page';
|
|
13
|
-
export type { PageHeaderProps, PageAction, PanelProps, ListRowProps, SectionHeadingProps, EmptyStateProps, ResponsiveAction, ResponsiveActionsProps } from './components/Page';
|
|
12
|
+
export { PageHeader, Panel, ListRow, RowIcon, SectionHeading, EmptyState, ResponsiveActions, ConfirmDialog, ListSkeleton, TAB_BAR_HEIGHT, useCompactLayout } from './components/Page';
|
|
13
|
+
export type { PageHeaderProps, PageAction, PanelProps, ListRowProps, SectionHeadingProps, EmptyStateProps, ResponsiveAction, ResponsiveActionsProps, ConfirmDialogProps, ListSkeletonProps } from './components/Page';
|
|
14
14
|
export { createVisinTheme, visinTheme, VISIN_COLORS, COLOR_SCHEME_ATTRIBUTE, COLOR_MODE_STORAGE_KEY, COLOR_SCHEME_STORAGE_KEY, brand, schemes, ink, surface, pageBackground, glass, glassInteractive, liftOnHover, raisedShadow, mainAction, chrome, onImage, tint, livePalette, chartSeries } from './theme';
|
|
15
15
|
export type { ColorSchemeName } from './theme';
|
|
16
16
|
export { VisinThemeProvider, ColorModeSetting, COLOR_MODE_OPTIONS, useThemeColorMeta, useActivePalette, useChartColors } from './components/ColorMode';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACtG,YAAY,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AACvD,YAAY,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAElF,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,YAAY,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACtE,YAAY,EACV,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EAChB,wBAAwB,EACxB,wBAAwB,EACxB,eAAe,EACf,iBAAiB,EACjB,aAAa,EACd,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,UAAU,EACV,KAAK,EACL,OAAO,EACP,OAAO,EACP,cAAc,EACd,UAAU,EACV,iBAAiB,EACjB,cAAc,EACd,gBAAgB,EACjB,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EACV,eAAe,EACf,UAAU,EACV,UAAU,EACV,YAAY,EACZ,mBAAmB,EACnB,eAAe,EACf,gBAAgB,EAChB,sBAAsB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAA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AAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,YAAY,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAEjF,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ export { Loader } from './components/Loader';
|
|
|
5
5
|
export { ErrorPage } from './components/ErrorPage';
|
|
6
6
|
export { AppLayout } from './components/AppLayout';
|
|
7
7
|
export { Markdown, MAX_MARKDOWN_LENGTH } from './components/Markdown';
|
|
8
|
-
export { PageHeader, Panel, ListRow, RowIcon, SectionHeading, EmptyState, ResponsiveActions, TAB_BAR_HEIGHT, useCompactLayout } from './components/Page';
|
|
8
|
+
export { PageHeader, Panel, ListRow, RowIcon, SectionHeading, EmptyState, ResponsiveActions, ConfirmDialog, ListSkeleton, TAB_BAR_HEIGHT, useCompactLayout } from './components/Page';
|
|
9
9
|
export { createVisinTheme, visinTheme, VISIN_COLORS, COLOR_SCHEME_ATTRIBUTE, COLOR_MODE_STORAGE_KEY, COLOR_SCHEME_STORAGE_KEY, brand, schemes, ink, surface, pageBackground, glass, glassInteractive, liftOnHover, raisedShadow, mainAction, chrome, onImage, tint, livePalette, chartSeries } from './theme';
|
|
10
10
|
export { VisinThemeProvider, ColorModeSetting, COLOR_MODE_OPTIONS, useThemeColorMeta, useActivePalette, useChartColors } from './components/ColorMode';
|
|
11
11
|
export { OwnerPicker, VisibilitySwitch, OwnerChip, TransferOwnershipDialog, transferTargets, ownerLabel } from './components/Ownership';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,mFAAmF;AAEnF,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,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AW,EACX,YAAY,EACZ,UAAU,EACV,MAAM,EACN,OAAO,EACP,IAAI,EACJ,WAAW,EACX,WAAW,EACZ,MAAM,SAAS,CAAC;AAEjB,OAAO,EACL,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,cAAc,EACf,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,SAAS,EACT,uBAAuB,EACvB,eAAe,EACf,UAAU,EACX,MAAM,wBAAwB,CAAC;AAWhC,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAErD,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAEnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAGjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAGxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAGrE,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC"}
|
package/dist/navigation.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../src/navigation.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../src/navigation.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAElF,yDAAyD;AACzD,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,CAAC;AAEhE,MAAM,WAAW,YAAY;IAC3B,yFAAyF;IACzF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4DAA4D;IAC5D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,8DAA8D;IAC9D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kEAAkE;IAClE,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,iBAAiB,EAAE,CAAC;IAC5B,YAAY,EAAE,gBAAgB,EAAE,CAAC;CAClC;AAiGD,MAAM,WAAW,sBAAsB;IACrC;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,qBAAqB,CACnC,SAAS,EAAE,QAAQ,GAAG,SAAS,QAAQ,EAAE,GAAG,IAAI,EAChD,IAAI,EAAE,YAAY,EAClB,EAAE,eAAsB,EAAE,GAAE,sBAA2B,GACtD,eAAe,CAmCjB"}
|
package/dist/navigation.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Article, Assignment, Explore, Folder, FolderCopy, Groups, Home, Insights, Key, Label, Link as LinkIcon, ModelTraining, Person, PhotoLibrary, Scoreboard, Storage } from '@mui/icons-material';
|
|
2
|
+
import { Article, Assignment, Explore, Folder, FolderCopy, Groups, Home, Insights, Key, Label, Link as LinkIcon, Memory, ModelTraining, Person, PhotoLibrary, Scoreboard, Storage } from '@mui/icons-material';
|
|
3
3
|
/**
|
|
4
4
|
* The whole menu, grouped by what the user is doing. Every app renders the same
|
|
5
5
|
* groups in the same places; crossing apps changes which entry is highlighted,
|
|
@@ -16,8 +16,8 @@ const NAV_GROUPS = [
|
|
|
16
16
|
{ app: 'shell', text: 'For you', icon: _jsx(Home, {}), path: '/', signedInOnly: true },
|
|
17
17
|
{ app: 'shell', text: 'Explore', icon: _jsx(Explore, {}), path: '/explore', signedOutPath: '/' },
|
|
18
18
|
// Public results, the other half of what Explore shows: they sit beside it in the bar rather than taking a
|
|
19
|
-
// place in the rail of their own.
|
|
20
|
-
//
|
|
19
|
+
// place in the rail of their own. Suites and Evaluations are still routes of vision-front, just not offered
|
|
20
|
+
// here for now; Models have a group of their own, below.
|
|
21
21
|
{ app: 'vision', text: 'Leaderboards', icon: _jsx(Scoreboard, {}), path: '/leaderboards' }
|
|
22
22
|
]
|
|
23
23
|
},
|
|
@@ -40,6 +40,12 @@ const NAV_GROUPS = [
|
|
|
40
40
|
icon: _jsx(Storage, {}),
|
|
41
41
|
sections: [{ app: 'vision', text: 'Datasets', icon: _jsx(PhotoLibrary, {}), path: '/datasets' }]
|
|
42
42
|
},
|
|
43
|
+
{
|
|
44
|
+
label: 'Models',
|
|
45
|
+
icon: _jsx(Memory, {}),
|
|
46
|
+
// The checkpoints runs published, to download: open to visitors for the public ones, like Papers and Explore.
|
|
47
|
+
sections: [{ app: 'vision', text: 'Models', icon: _jsx(Memory, {}), path: '/models' }]
|
|
48
|
+
},
|
|
43
49
|
{
|
|
44
50
|
label: 'Papers',
|
|
45
51
|
icon: _jsx(Article, {}),
|
package/dist/navigation.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigation.js","sourceRoot":"","sources":["../src/navigation.tsx"],"names":[],"mappings":";AACA,OAAO,EACL,OAAO,EACP,UAAU,EACV,OAAO,EACP,MAAM,EACN,UAAU,EACV,MAAM,EACN,IAAI,EACJ,QAAQ,EACR,GAAG,EACH,KAAK,EACL,IAAI,IAAI,QAAQ,EAChB,aAAa,EACb,MAAM,EACN,YAAY,EACZ,UAAU,EACV,OAAO,EACR,MAAM,qBAAqB,CAAC;AA6C7B;;;;GAIG;AACH,MAAM,UAAU,GAAe;IAC7B;QACE,KAAK,EAAE,MAAM;QACb,cAAc,EAAE,SAAS;QACzB,IAAI,EAAE,KAAC,IAAI,KAAG;QACd,QAAQ,EAAE;YACR,iFAAiF;YACjF,4CAA4C;YAC5C,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,KAAC,IAAI,KAAG,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,E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