@shipfox/client-shell 21.0.0 → 22.0.1
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/dist/components/auth-shell.d.ts.map +1 -1
- package/dist/components/auth-shell.js +41 -37
- package/dist/components/auth-shell.js.map +1 -1
- package/dist/components/focused-frame.d.ts +6 -0
- package/dist/components/focused-frame.d.ts.map +1 -0
- package/dist/components/focused-frame.js +11 -0
- package/dist/components/focused-frame.js.map +1 -0
- package/dist/components/main-layout.d.ts.map +1 -1
- package/dist/components/main-layout.js +18 -3
- package/dist/components/main-layout.js.map +1 -1
- package/dist/components/settings-nav.d.ts.map +1 -1
- package/dist/components/settings-nav.js +32 -24
- package/dist/components/settings-nav.js.map +1 -1
- package/dist/runtime/anchors.d.ts.map +1 -1
- package/dist/runtime/anchors.js +6 -9
- package/dist/runtime/anchors.js.map +1 -1
- package/dist/runtime/index.d.ts +1 -0
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/index.js +1 -0
- package/dist/runtime/index.js.map +1 -1
- package/dist/runtime/workspace-setup.d.ts.map +1 -1
- package/dist/runtime/workspace-setup.js +5 -4
- package/dist/runtime/workspace-setup.js.map +1 -1
- package/dist/tsconfig.test.tsbuildinfo +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-shell.d.ts","sourceRoot":"","sources":["../../src/components/auth-shell.tsx"],"names":[],"mappings":"AACA,OAAO,EAAS,KAAK,WAAW,EAAO,MAAM,8BAA8B,CAAC;AAC5E,OAAO,KAAK,EAAC,iBAAiB,EAAE,SAAS,EAAE,GAAG,EAAC,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"auth-shell.d.ts","sourceRoot":"","sources":["../../src/components/auth-shell.tsx"],"names":[],"mappings":"AACA,OAAO,EAAS,KAAK,WAAW,EAAO,MAAM,8BAA8B,CAAC;AAC5E,OAAO,KAAK,EAAC,iBAAiB,EAAE,SAAS,EAAE,GAAG,EAAC,MAAM,OAAO,CAAC;AAG7D,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,UAAU,GAAG,IAAI,CAAC,GAAG,SAAS,CAAC;IAChE,UAAU,CAAC,EAAE,GAAG,CAAC,kBAAkB,CAAC,GAAG,SAAS,CAAC;CAClD;AAED,wBAAgB,SAAS,CAAC,EACxB,KAAK,EACL,WAAW,EACX,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,UAAU,GACX,EAAE,cAAc,+BA4ChB;AAED,wBAAgB,WAAW,CAAC,EAAC,QAAQ,EAAC,EAAE,iBAAiB,+BAExD"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Icon } from '@shipfox/react-ui/icon';
|
|
3
3
|
import { Header, Text } from '@shipfox/react-ui/typography';
|
|
4
|
+
import { FocusedFrame } from './focused-frame.js';
|
|
4
5
|
export function AuthShell({ title, description, children, className, headingProps, headingRef }) {
|
|
5
6
|
return /*#__PURE__*/ _jsxs("main", {
|
|
6
7
|
className: "relative flex min-h-screen items-center justify-center overflow-hidden bg-background-subtle-base px-frame py-frame max-[520px]:items-start max-[520px]:px-row max-[520px]:pt-[56px]",
|
|
@@ -16,44 +17,47 @@ export function AuthShell({ title, description, children, className, headingProp
|
|
|
16
17
|
className: "h-full w-full bg-[radial-gradient(circle,rgba(230,62,0,0.48)_1.6px,transparent_1.8px)] bg-[length:44px_44px]"
|
|
17
18
|
})
|
|
18
19
|
}),
|
|
19
|
-
/*#__PURE__*/
|
|
20
|
-
className:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
/*#__PURE__*/ _jsxs("div", {
|
|
34
|
-
className: "flex min-w-[128px] flex-col items-center gap-tight text-center",
|
|
35
|
-
children: [
|
|
36
|
-
/*#__PURE__*/ _jsx(Header, {
|
|
37
|
-
id: "auth-title",
|
|
38
|
-
variant: "h1",
|
|
39
|
-
tabIndex: -1,
|
|
40
|
-
...headingProps,
|
|
41
|
-
...headingRef ? {
|
|
42
|
-
ref: headingRef
|
|
43
|
-
} : {},
|
|
44
|
-
children: title
|
|
45
|
-
}),
|
|
46
|
-
/*#__PURE__*/ _jsx(Text, {
|
|
47
|
-
size: "sm",
|
|
48
|
-
className: "text-foreground-neutral-subtle",
|
|
49
|
-
children: description
|
|
20
|
+
/*#__PURE__*/ _jsx(FocusedFrame, {
|
|
21
|
+
className: "relative",
|
|
22
|
+
children: /*#__PURE__*/ _jsxs("section", {
|
|
23
|
+
className: className ?? 'relative flex w-full flex-col items-stretch gap-region',
|
|
24
|
+
"aria-labelledby": "auth-title",
|
|
25
|
+
children: [
|
|
26
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
27
|
+
className: "flex flex-col items-center gap-group",
|
|
28
|
+
children: [
|
|
29
|
+
/*#__PURE__*/ _jsx("div", {
|
|
30
|
+
className: "flex size-64 items-center justify-center rounded-12 border border-border-neutral-base bg-background-neutral-base p-tight shadow-button-neutral",
|
|
31
|
+
children: /*#__PURE__*/ _jsx(Icon, {
|
|
32
|
+
name: "shipfox",
|
|
33
|
+
className: "size-42 text-background-highlight-interactive"
|
|
50
34
|
})
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
35
|
+
}),
|
|
36
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
37
|
+
className: "flex min-w-[128px] flex-col items-center gap-tight text-center",
|
|
38
|
+
children: [
|
|
39
|
+
/*#__PURE__*/ _jsx(Header, {
|
|
40
|
+
id: "auth-title",
|
|
41
|
+
variant: "h1",
|
|
42
|
+
tabIndex: -1,
|
|
43
|
+
...headingProps,
|
|
44
|
+
...headingRef ? {
|
|
45
|
+
ref: headingRef
|
|
46
|
+
} : {},
|
|
47
|
+
children: title
|
|
48
|
+
}),
|
|
49
|
+
/*#__PURE__*/ _jsx(Text, {
|
|
50
|
+
size: "sm",
|
|
51
|
+
className: "text-foreground-neutral-subtle",
|
|
52
|
+
children: description
|
|
53
|
+
})
|
|
54
|
+
]
|
|
55
|
+
})
|
|
56
|
+
]
|
|
57
|
+
}),
|
|
58
|
+
children
|
|
59
|
+
]
|
|
60
|
+
})
|
|
57
61
|
})
|
|
58
62
|
]
|
|
59
63
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/auth-shell.tsx"],"sourcesContent":["import {Icon} from '@shipfox/react-ui/icon';\nimport {Header, type HeaderProps, Text} from '@shipfox/react-ui/typography';\nimport type {PropsWithChildren, ReactNode, Ref} from 'react';\n\nexport interface AuthShellProps {\n title: string;\n description: string;\n children: ReactNode;\n className?: string;\n headingProps?: Omit<HeaderProps, 'children' | 'id'> | undefined;\n headingRef?: Ref<HTMLHeadingElement> | undefined;\n}\n\nexport function AuthShell({\n title,\n description,\n children,\n className,\n headingProps,\n headingRef,\n}: AuthShellProps) {\n return (\n <main className=\"relative flex min-h-screen items-center justify-center overflow-hidden bg-background-subtle-base px-frame py-frame max-[520px]:items-start max-[520px]:px-row max-[520px]:pt-[56px]\">\n <div\n className=\"pointer-events-none absolute left-1/2 top-0 h-[380px] w-full max-w-[880px] -translate-x-1/2 -translate-y-[120px] opacity-55 max-[520px]:-translate-y-[170px] max-[520px]:opacity-35\"\n aria-hidden=\"true\"\n style={{\n maskImage:\n 'radial-gradient(ellipse 85% 100% at 50% 0%, #000 0%, #000 24%, transparent 78%)',\n WebkitMaskImage:\n 'radial-gradient(ellipse 85% 100% at 50% 0%, #000 0%, #000 24%, transparent 78%)',\n }}\n >\n <div className=\"h-full w-full bg-[radial-gradient(circle,rgba(230,62,0,0.48)_1.6px,transparent_1.8px)] bg-[length:44px_44px]\" />\n </div>\n <
|
|
1
|
+
{"version":3,"sources":["../../src/components/auth-shell.tsx"],"sourcesContent":["import {Icon} from '@shipfox/react-ui/icon';\nimport {Header, type HeaderProps, Text} from '@shipfox/react-ui/typography';\nimport type {PropsWithChildren, ReactNode, Ref} from 'react';\nimport {FocusedFrame} from './focused-frame.js';\n\nexport interface AuthShellProps {\n title: string;\n description: string;\n children: ReactNode;\n className?: string;\n headingProps?: Omit<HeaderProps, 'children' | 'id'> | undefined;\n headingRef?: Ref<HTMLHeadingElement> | undefined;\n}\n\nexport function AuthShell({\n title,\n description,\n children,\n className,\n headingProps,\n headingRef,\n}: AuthShellProps) {\n return (\n <main className=\"relative flex min-h-screen items-center justify-center overflow-hidden bg-background-subtle-base px-frame py-frame max-[520px]:items-start max-[520px]:px-row max-[520px]:pt-[56px]\">\n <div\n className=\"pointer-events-none absolute left-1/2 top-0 h-[380px] w-full max-w-[880px] -translate-x-1/2 -translate-y-[120px] opacity-55 max-[520px]:-translate-y-[170px] max-[520px]:opacity-35\"\n aria-hidden=\"true\"\n style={{\n maskImage:\n 'radial-gradient(ellipse 85% 100% at 50% 0%, #000 0%, #000 24%, transparent 78%)',\n WebkitMaskImage:\n 'radial-gradient(ellipse 85% 100% at 50% 0%, #000 0%, #000 24%, transparent 78%)',\n }}\n >\n <div className=\"h-full w-full bg-[radial-gradient(circle,rgba(230,62,0,0.48)_1.6px,transparent_1.8px)] bg-[length:44px_44px]\" />\n </div>\n <FocusedFrame className=\"relative\">\n <section\n className={className ?? 'relative flex w-full flex-col items-stretch gap-region'}\n aria-labelledby=\"auth-title\"\n >\n <div className=\"flex flex-col items-center gap-group\">\n <div className=\"flex size-64 items-center justify-center rounded-12 border border-border-neutral-base bg-background-neutral-base p-tight shadow-button-neutral\">\n <Icon name=\"shipfox\" className=\"size-42 text-background-highlight-interactive\" />\n </div>\n <div className=\"flex min-w-[128px] flex-col items-center gap-tight text-center\">\n <Header\n id=\"auth-title\"\n variant=\"h1\"\n tabIndex={-1}\n {...headingProps}\n {...(headingRef ? ({ref: headingRef} as HeaderProps) : {})}\n >\n {title}\n </Header>\n <Text size=\"sm\" className=\"text-foreground-neutral-subtle\">\n {description}\n </Text>\n </div>\n </div>\n {children}\n </section>\n </FocusedFrame>\n </main>\n );\n}\n\nexport function AuthActions({children}: PropsWithChildren) {\n return <div className=\"flex flex-col gap-section\">{children}</div>;\n}\n"],"names":["Icon","Header","Text","FocusedFrame","AuthShell","title","description","children","className","headingProps","headingRef","main","div","aria-hidden","style","maskImage","WebkitMaskImage","section","aria-labelledby","name","id","variant","tabIndex","ref","size","AuthActions"],"mappings":";AAAA,SAAQA,IAAI,QAAO,yBAAyB;AAC5C,SAAQC,MAAM,EAAoBC,IAAI,QAAO,+BAA+B;AAE5E,SAAQC,YAAY,QAAO,qBAAqB;AAWhD,OAAO,SAASC,UAAU,EACxBC,KAAK,EACLC,WAAW,EACXC,QAAQ,EACRC,SAAS,EACTC,YAAY,EACZC,UAAU,EACK;IACf,qBACE,MAACC;QAAKH,WAAU;;0BACd,KAACI;gBACCJ,WAAU;gBACVK,eAAY;gBACZC,OAAO;oBACLC,WACE;oBACFC,iBACE;gBACJ;0BAEA,cAAA,KAACJ;oBAAIJ,WAAU;;;0BAEjB,KAACL;gBAAaK,WAAU;0BACtB,cAAA,MAACS;oBACCT,WAAWA,aAAa;oBACxBU,mBAAgB;;sCAEhB,MAACN;4BAAIJ,WAAU;;8CACb,KAACI;oCAAIJ,WAAU;8CACb,cAAA,KAACR;wCAAKmB,MAAK;wCAAUX,WAAU;;;8CAEjC,MAACI;oCAAIJ,WAAU;;sDACb,KAACP;4CACCmB,IAAG;4CACHC,SAAQ;4CACRC,UAAU,CAAC;4CACV,GAAGb,YAAY;4CACf,GAAIC,aAAc;gDAACa,KAAKb;4CAAU,IAAoB,CAAC,CAAC;sDAExDL;;sDAEH,KAACH;4CAAKsB,MAAK;4CAAKhB,WAAU;sDACvBF;;;;;;wBAINC;;;;;;AAKX;AAEA,OAAO,SAASkB,YAAY,EAAClB,QAAQ,EAAoB;IACvD,qBAAO,KAACK;QAAIJ,WAAU;kBAA6BD;;AACrD"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { PropsWithChildren } from 'react';
|
|
2
|
+
export declare const FOCUSED_FRAME_CONTENT_CLASS_NAME = "mx-auto w-full max-w-[640px]";
|
|
3
|
+
export declare function FocusedFrame({ children, className, }: PropsWithChildren<{
|
|
4
|
+
className?: string | undefined;
|
|
5
|
+
}>): import("react").JSX.Element;
|
|
6
|
+
//# sourceMappingURL=focused-frame.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"focused-frame.d.ts","sourceRoot":"","sources":["../../src/components/focused-frame.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,OAAO,CAAC;AAE7C,eAAO,MAAM,gCAAgC,iCAAiC,CAAC;AAE/E,wBAAgB,YAAY,CAAC,EAC3B,QAAQ,EACR,SAAS,GACV,EAAE,iBAAiB,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAAC,CAAC,+BAErD"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from '@shipfox/react-ui/utils';
|
|
3
|
+
export const FOCUSED_FRAME_CONTENT_CLASS_NAME = 'mx-auto w-full max-w-[640px]';
|
|
4
|
+
export function FocusedFrame({ children, className }) {
|
|
5
|
+
return /*#__PURE__*/ _jsx("div", {
|
|
6
|
+
className: cn(FOCUSED_FRAME_CONTENT_CLASS_NAME, className),
|
|
7
|
+
children: children
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
//# sourceMappingURL=focused-frame.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/focused-frame.tsx"],"sourcesContent":["import {cn} from '@shipfox/react-ui/utils';\nimport type {PropsWithChildren} from 'react';\n\nexport const FOCUSED_FRAME_CONTENT_CLASS_NAME = 'mx-auto w-full max-w-[640px]';\n\nexport function FocusedFrame({\n children,\n className,\n}: PropsWithChildren<{className?: string | undefined}>) {\n return <div className={cn(FOCUSED_FRAME_CONTENT_CLASS_NAME, className)}>{children}</div>;\n}\n"],"names":["cn","FOCUSED_FRAME_CONTENT_CLASS_NAME","FocusedFrame","children","className","div"],"mappings":";AAAA,SAAQA,EAAE,QAAO,0BAA0B;AAG3C,OAAO,MAAMC,mCAAmC,+BAA+B;AAE/E,OAAO,SAASC,aAAa,EAC3BC,QAAQ,EACRC,SAAS,EAC2C;IACpD,qBAAO,KAACC;QAAID,WAAWJ,GAAGC,kCAAkCG;kBAAaD;;AAC3E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main-layout.d.ts","sourceRoot":"","sources":["../../src/components/main-layout.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"main-layout.d.ts","sourceRoot":"","sources":["../../src/components/main-layout.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,cAAc,CAAC;AAG9C,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,yBAAyB,CAAC;AAOxD,OAAO,QAAQ,wBAAwB,CAAC;IACtC,UAAU,qBAAqB;QAC7B,KAAK,CAAC,EAAE,UAAU,CAAC;KACpB;CACF;AAQD,wBAAgB,UAAU,CAAC,EACzB,UAAU,EACV,qBAA6B,GAC9B,EAAE;IACD,UAAU,EAAE,SAAS,WAAW,EAAE,CAAC;IACnC,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACjC,+BAoCA"}
|
|
@@ -1,20 +1,35 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { FullPageLoader } from '@shipfox/react-ui/loader';
|
|
3
|
-
import { Outlet, useMatches } from '@tanstack/react-router';
|
|
3
|
+
import { Navigate, Outlet, useLocation, useMatches } from '@tanstack/react-router';
|
|
4
4
|
import { useMaybeActiveWorkspace } from '#runtime/active-workspace.js';
|
|
5
|
+
import { useAuthState } from '#runtime/auth.js';
|
|
5
6
|
import { parseWorkspaceProjectParams, useRouteParams } from '#runtime/route-inputs.js';
|
|
7
|
+
import { WorkspaceUnavailablePage } from '#runtime/workspace-setup.js';
|
|
8
|
+
import { FOCUSED_FRAME_CONTENT_CLASS_NAME } from './focused-frame.js';
|
|
6
9
|
import { NavBar } from './nav-bar.js';
|
|
7
10
|
import { NavTabs } from './nav-tabs.js';
|
|
8
11
|
const frameClassNames = {
|
|
9
12
|
content: 'mx-auto w-full max-w-[1120px] px-frame py-frame',
|
|
10
13
|
data: 'flex min-h-0 w-full flex-1 flex-col px-frame py-frame',
|
|
11
|
-
focused:
|
|
14
|
+
focused: `${FOCUSED_FRAME_CONTENT_CLASS_NAME} px-frame py-frame`
|
|
12
15
|
};
|
|
13
16
|
export function MainLayout({ navigation, hideProjectNavigation = false }) {
|
|
17
|
+
const auth = useAuthState();
|
|
14
18
|
const workspace = useMaybeActiveWorkspace();
|
|
19
|
+
const location = useLocation();
|
|
15
20
|
const { projectSlug } = useRouteParams(parseWorkspaceProjectParams);
|
|
16
21
|
const matches = useMatches();
|
|
17
|
-
if (
|
|
22
|
+
if (auth.isLoading) return /*#__PURE__*/ _jsx(FullPageLoader, {});
|
|
23
|
+
if (!auth.isAuthenticated) {
|
|
24
|
+
return /*#__PURE__*/ _jsx(Navigate, {
|
|
25
|
+
to: '/auth/login',
|
|
26
|
+
search: {
|
|
27
|
+
redirect: location.href
|
|
28
|
+
},
|
|
29
|
+
replace: true
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
if (!workspace) return /*#__PURE__*/ _jsx(WorkspaceUnavailablePage, {});
|
|
18
33
|
const frame = matches.reduce((current, match)=>match.staticData.frame ?? current, 'content');
|
|
19
34
|
const appContentHeight = hideProjectNavigation ? '[--app-content-h:calc(100dvh_-_56px)]' : '[--app-content-h:calc(100dvh_-_96px)]';
|
|
20
35
|
const isFullBleedFrame = frame === 'data';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/main-layout.tsx"],"sourcesContent":["import {FullPageLoader} from '@shipfox/react-ui/loader';\nimport {Outlet, useMatches} from '@tanstack/react-router';\nimport type {NavTabEntry} from '#contract.js';\nimport {useMaybeActiveWorkspace} from '#runtime/active-workspace.js';\nimport type {RouteFrame} from '#runtime/route-frame.js';\nimport {parseWorkspaceProjectParams, useRouteParams} from '#runtime/route-inputs.js';\nimport {NavBar} from './nav-bar.js';\nimport {NavTabs} from './nav-tabs.js';\n\ndeclare module '@tanstack/react-router' {\n interface StaticDataRouteOption {\n frame?: RouteFrame;\n }\n}\n\nconst frameClassNames: Record<RouteFrame, string> = {\n content: 'mx-auto w-full max-w-[1120px] px-frame py-frame',\n data: 'flex min-h-0 w-full flex-1 flex-col px-frame py-frame',\n focused:
|
|
1
|
+
{"version":3,"sources":["../../src/components/main-layout.tsx"],"sourcesContent":["import {FullPageLoader} from '@shipfox/react-ui/loader';\nimport {Navigate, Outlet, useLocation, useMatches} from '@tanstack/react-router';\nimport type {NavTabEntry} from '#contract.js';\nimport {useMaybeActiveWorkspace} from '#runtime/active-workspace.js';\nimport {useAuthState} from '#runtime/auth.js';\nimport type {RouteFrame} from '#runtime/route-frame.js';\nimport {parseWorkspaceProjectParams, useRouteParams} from '#runtime/route-inputs.js';\nimport {WorkspaceUnavailablePage} from '#runtime/workspace-setup.js';\nimport {FOCUSED_FRAME_CONTENT_CLASS_NAME} from './focused-frame.js';\nimport {NavBar} from './nav-bar.js';\nimport {NavTabs} from './nav-tabs.js';\n\ndeclare module '@tanstack/react-router' {\n interface StaticDataRouteOption {\n frame?: RouteFrame;\n }\n}\n\nconst frameClassNames: Record<RouteFrame, string> = {\n content: 'mx-auto w-full max-w-[1120px] px-frame py-frame',\n data: 'flex min-h-0 w-full flex-1 flex-col px-frame py-frame',\n focused: `${FOCUSED_FRAME_CONTENT_CLASS_NAME} px-frame py-frame`,\n};\n\nexport function MainLayout({\n navigation,\n hideProjectNavigation = false,\n}: {\n navigation: readonly NavTabEntry[];\n hideProjectNavigation?: boolean;\n}) {\n const auth = useAuthState();\n const workspace = useMaybeActiveWorkspace();\n const location = useLocation();\n const {projectSlug} = useRouteParams(parseWorkspaceProjectParams);\n const matches = useMatches();\n if (auth.isLoading) return <FullPageLoader />;\n if (!auth.isAuthenticated) {\n return (\n <Navigate to={'/auth/login' as never} search={{redirect: location.href} as never} replace />\n );\n }\n if (!workspace) return <WorkspaceUnavailablePage />;\n const frame = matches.reduce<RouteFrame>(\n (current, match) => match.staticData.frame ?? current,\n 'content',\n );\n const appContentHeight = hideProjectNavigation\n ? '[--app-content-h:calc(100dvh_-_56px)]'\n : '[--app-content-h:calc(100dvh_-_96px)]';\n const isFullBleedFrame = frame === 'data';\n return (\n <div className=\"h-screen w-full flex flex-col bg-background-subtle-base\">\n <NavBar hideProjectNavigation={hideProjectNavigation} />\n {hideProjectNavigation ? undefined : (\n <NavTabs entries={navigation} scope={projectSlug ? 'project' : 'workspace'} />\n )}\n <main\n className={`${isFullBleedFrame ? 'flex min-h-0 flex-1 flex-col overflow-hidden' : 'flex-1 overflow-auto'} ${appContentHeight}`}\n >\n <div className={frameClassNames[frame]}>\n <Outlet />\n </div>\n </main>\n </div>\n );\n}\n"],"names":["FullPageLoader","Navigate","Outlet","useLocation","useMatches","useMaybeActiveWorkspace","useAuthState","parseWorkspaceProjectParams","useRouteParams","WorkspaceUnavailablePage","FOCUSED_FRAME_CONTENT_CLASS_NAME","NavBar","NavTabs","frameClassNames","content","data","focused","MainLayout","navigation","hideProjectNavigation","auth","workspace","location","projectSlug","matches","isLoading","isAuthenticated","to","search","redirect","href","replace","frame","reduce","current","match","staticData","appContentHeight","isFullBleedFrame","div","className","undefined","entries","scope","main"],"mappings":";AAAA,SAAQA,cAAc,QAAO,2BAA2B;AACxD,SAAQC,QAAQ,EAAEC,MAAM,EAAEC,WAAW,EAAEC,UAAU,QAAO,yBAAyB;AAEjF,SAAQC,uBAAuB,QAAO,+BAA+B;AACrE,SAAQC,YAAY,QAAO,mBAAmB;AAE9C,SAAQC,2BAA2B,EAAEC,cAAc,QAAO,2BAA2B;AACrF,SAAQC,wBAAwB,QAAO,8BAA8B;AACrE,SAAQC,gCAAgC,QAAO,qBAAqB;AACpE,SAAQC,MAAM,QAAO,eAAe;AACpC,SAAQC,OAAO,QAAO,gBAAgB;AAQtC,MAAMC,kBAA8C;IAClDC,SAAS;IACTC,MAAM;IACNC,SAAS,GAAGN,iCAAiC,kBAAkB,CAAC;AAClE;AAEA,OAAO,SAASO,WAAW,EACzBC,UAAU,EACVC,wBAAwB,KAAK,EAI9B;IACC,MAAMC,OAAOd;IACb,MAAMe,YAAYhB;IAClB,MAAMiB,WAAWnB;IACjB,MAAM,EAACoB,WAAW,EAAC,GAAGf,eAAeD;IACrC,MAAMiB,UAAUpB;IAChB,IAAIgB,KAAKK,SAAS,EAAE,qBAAO,KAACzB;IAC5B,IAAI,CAACoB,KAAKM,eAAe,EAAE;QACzB,qBACE,KAACzB;YAAS0B,IAAI;YAAwBC,QAAQ;gBAACC,UAAUP,SAASQ,IAAI;YAAA;YAAYC,OAAO;;IAE7F;IACA,IAAI,CAACV,WAAW,qBAAO,KAACZ;IACxB,MAAMuB,QAAQR,QAAQS,MAAM,CAC1B,CAACC,SAASC,QAAUA,MAAMC,UAAU,CAACJ,KAAK,IAAIE,SAC9C;IAEF,MAAMG,mBAAmBlB,wBACrB,0CACA;IACJ,MAAMmB,mBAAmBN,UAAU;IACnC,qBACE,MAACO;QAAIC,WAAU;;0BACb,KAAC7B;gBAAOQ,uBAAuBA;;YAC9BA,wBAAwBsB,0BACvB,KAAC7B;gBAAQ8B,SAASxB;gBAAYyB,OAAOpB,cAAc,YAAY;;0BAEjE,KAACqB;gBACCJ,WAAW,GAAGF,mBAAmB,iDAAiD,uBAAuB,CAAC,EAAED,kBAAkB;0BAE9H,cAAA,KAACE;oBAAIC,WAAW3B,eAAe,CAACmB,MAAM;8BACpC,cAAA,KAAC9B;;;;;AAKX"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings-nav.d.ts","sourceRoot":"","sources":["../../src/components/settings-nav.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,cAAc,CAAC;AAOvD,wBAAgB,WAAW,CAAC,EAC1B,OAAO,EACP,KAAK,GACN,EAAE;IACD,OAAO,EAAE,SAAS,oBAAoB,EAAE,CAAC;IACzC,KAAK,EAAE,WAAW,GAAG,SAAS,CAAC;CAChC,
|
|
1
|
+
{"version":3,"file":"settings-nav.d.ts","sourceRoot":"","sources":["../../src/components/settings-nav.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,cAAc,CAAC;AAOvD,wBAAgB,WAAW,CAAC,EAC1B,OAAO,EACP,KAAK,GACN,EAAE;IACD,OAAO,EAAE,SAAS,oBAAoB,EAAE,CAAC;IACzC,KAAK,EAAE,WAAW,GAAG,SAAS,CAAC;CAChC,sCAoDA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Button } from '@shipfox/react-ui/button';
|
|
3
2
|
import { Icon } from '@shipfox/react-ui/icon';
|
|
3
|
+
import { cn } from '@shipfox/react-ui/utils';
|
|
4
4
|
import { Link, useMatchRoute } from '@tanstack/react-router';
|
|
5
5
|
import { parseWorkspaceParams, parseWorkspaceProjectParams, useRouteParams } from '#runtime/route-inputs.js';
|
|
6
6
|
export function SettingsNav({ entries, scope }) {
|
|
@@ -17,30 +17,38 @@ export function SettingsNav({ entries, scope }) {
|
|
|
17
17
|
};
|
|
18
18
|
return /*#__PURE__*/ _jsx("nav", {
|
|
19
19
|
"aria-label": `${scope === 'workspace' ? 'Workspace' : 'Project'} settings`,
|
|
20
|
-
className: "flex flex-col
|
|
21
|
-
children:
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
to
|
|
25
|
-
|
|
26
|
-
}));
|
|
27
|
-
return /*#__PURE__*/ _jsx(Button, {
|
|
28
|
-
asChild: true,
|
|
29
|
-
variant: active ? 'secondary' : 'transparent',
|
|
30
|
-
className: "w-full justify-start",
|
|
31
|
-
children: /*#__PURE__*/ _jsxs(Link, {
|
|
20
|
+
className: "flex min-w-0 flex-col",
|
|
21
|
+
children: /*#__PURE__*/ _jsx("ul", {
|
|
22
|
+
className: "divide-y divide-border-neutral-base",
|
|
23
|
+
children: scopedEntries.map((entry)=>{
|
|
24
|
+
const to = `${settingsPath}/${entry.pathSegment}`;
|
|
25
|
+
const active = Boolean(matchRoute({
|
|
32
26
|
to: to,
|
|
33
|
-
params: paramsForLink
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
27
|
+
params: paramsForLink
|
|
28
|
+
}));
|
|
29
|
+
return /*#__PURE__*/ _jsx("li", {
|
|
30
|
+
className: "py-tight first:pt-0 last:pb-0",
|
|
31
|
+
children: /*#__PURE__*/ _jsxs(Link, {
|
|
32
|
+
to: to,
|
|
33
|
+
params: paramsForLink,
|
|
34
|
+
"aria-current": active ? 'page' : undefined,
|
|
35
|
+
className: cn('relative flex min-h-32 w-full items-center justify-start gap-inline rounded-4 px-tight text-left text-sm font-medium text-foreground-neutral-base outline-none transition-colors hover:bg-background-neutral-hover focus-visible:shadow-border-interactive-with-active', active && 'bg-background-neutral-hover'),
|
|
36
|
+
children: [
|
|
37
|
+
active ? /*#__PURE__*/ _jsx("span", {
|
|
38
|
+
"aria-hidden": "true",
|
|
39
|
+
"data-settings-active-bar": true,
|
|
40
|
+
className: "absolute inset-y-0 left-0 w-2 rounded-l-4 bg-border-highlights-interactive"
|
|
41
|
+
}) : null,
|
|
42
|
+
/*#__PURE__*/ _jsx(Icon, {
|
|
43
|
+
name: entry.icon,
|
|
44
|
+
className: "size-16",
|
|
45
|
+
"aria-hidden": "true"
|
|
46
|
+
}),
|
|
47
|
+
entry.label
|
|
48
|
+
]
|
|
49
|
+
})
|
|
50
|
+
}, entry.id);
|
|
51
|
+
})
|
|
44
52
|
})
|
|
45
53
|
});
|
|
46
54
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/settings-nav.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"sources":["../../src/components/settings-nav.tsx"],"sourcesContent":["import {Icon} from '@shipfox/react-ui/icon';\nimport {cn} from '@shipfox/react-ui/utils';\nimport {Link, useMatchRoute} from '@tanstack/react-router';\nimport type {SettingsSectionEntry} from '#contract.js';\nimport {\n parseWorkspaceParams,\n parseWorkspaceProjectParams,\n useRouteParams,\n} from '#runtime/route-inputs.js';\n\nexport function SettingsNav({\n entries,\n scope,\n}: {\n entries: readonly SettingsSectionEntry[];\n scope: 'workspace' | 'project';\n}) {\n const params = useRouteParams((input): {workspaceSlug?: string; projectSlug?: string} =>\n scope === 'workspace' ? parseWorkspaceParams(input) : parseWorkspaceProjectParams(input),\n );\n const matchRoute = useMatchRoute();\n if (!params.workspaceSlug || (scope === 'project' && !params.projectSlug)) return null;\n const scopedEntries = entries.filter((entry) => (entry.scope ?? 'workspace') === scope);\n const settingsPath =\n scope === 'workspace'\n ? '/w/$workspaceSlug/settings'\n : '/w/$workspaceSlug/p/$projectSlug/settings';\n const paramsForLink =\n scope === 'workspace'\n ? {workspaceSlug: params.workspaceSlug}\n : {workspaceSlug: params.workspaceSlug, projectSlug: params.projectSlug};\n\n return (\n <nav\n aria-label={`${scope === 'workspace' ? 'Workspace' : 'Project'} settings`}\n className=\"flex min-w-0 flex-col\"\n >\n <ul className=\"divide-y divide-border-neutral-base\">\n {scopedEntries.map((entry) => {\n const to = `${settingsPath}/${entry.pathSegment}`;\n const active = Boolean(matchRoute({to: to as never, params: paramsForLink as never}));\n return (\n <li key={entry.id} className=\"py-tight first:pt-0 last:pb-0\">\n <Link\n to={to as never}\n params={paramsForLink as never}\n aria-current={active ? 'page' : undefined}\n className={cn(\n 'relative flex min-h-32 w-full items-center justify-start gap-inline rounded-4 px-tight text-left text-sm font-medium text-foreground-neutral-base outline-none transition-colors hover:bg-background-neutral-hover focus-visible:shadow-border-interactive-with-active',\n active && 'bg-background-neutral-hover',\n )}\n >\n {active ? (\n <span\n aria-hidden=\"true\"\n data-settings-active-bar\n className=\"absolute inset-y-0 left-0 w-2 rounded-l-4 bg-border-highlights-interactive\"\n />\n ) : null}\n <Icon name={entry.icon} className=\"size-16\" aria-hidden=\"true\" />\n {entry.label}\n </Link>\n </li>\n );\n })}\n </ul>\n </nav>\n );\n}\n"],"names":["Icon","cn","Link","useMatchRoute","parseWorkspaceParams","parseWorkspaceProjectParams","useRouteParams","SettingsNav","entries","scope","params","input","matchRoute","workspaceSlug","projectSlug","scopedEntries","filter","entry","settingsPath","paramsForLink","nav","aria-label","className","ul","map","to","pathSegment","active","Boolean","li","aria-current","undefined","span","aria-hidden","data-settings-active-bar","name","icon","label","id"],"mappings":";AAAA,SAAQA,IAAI,QAAO,yBAAyB;AAC5C,SAAQC,EAAE,QAAO,0BAA0B;AAC3C,SAAQC,IAAI,EAAEC,aAAa,QAAO,yBAAyB;AAE3D,SACEC,oBAAoB,EACpBC,2BAA2B,EAC3BC,cAAc,QACT,2BAA2B;AAElC,OAAO,SAASC,YAAY,EAC1BC,OAAO,EACPC,KAAK,EAIN;IACC,MAAMC,SAASJ,eAAe,CAACK,QAC7BF,UAAU,cAAcL,qBAAqBO,SAASN,4BAA4BM;IAEpF,MAAMC,aAAaT;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,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,sBAAsB,CAAC;AAO9D,OAAO,EAAC,kBAAkB,EAAC,MAAM,mBAAmB,CAAC;AAErD,wBAAgB,mBAAmB,CAAC,EAClC,UAAU,EACV,gBAAgB,GACjB,EAAE;IACD,UAAU,EAAE,SAAS,WAAW,EAAE,CAAC;IACnC,gBAAgB,EAAE,SAAS,oBAAoB,EAAE,CAAC;CACnD;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"anchors.d.ts","sourceRoot":"","sources":["../../src/runtime/anchors.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAC,WAAW,EAAE,oBAAoB,EAAC,MAAM,cAAc,CAAC;AAKpE,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,sBAAsB,CAAC;AAO9D,OAAO,EAAC,kBAAkB,EAAC,MAAM,mBAAmB,CAAC;AAErD,wBAAgB,mBAAmB,CAAC,EAClC,UAAU,EACV,gBAAgB,GACjB,EAAE;IACD,UAAU,EAAE,SAAS,WAAW,EAAE,CAAC;IACnC,gBAAgB,EAAE,SAAS,oBAAoB,EAAE,CAAC;CACnD;;;;;;;;;;;;;EAgHA"}
|
package/dist/runtime/anchors.js
CHANGED
|
@@ -5,7 +5,7 @@ import { createRootRouteWithContext, createRoute, Outlet, redirect } from '@tans
|
|
|
5
5
|
import { MainLayout } from '#components/main-layout.js';
|
|
6
6
|
import { NotFoundPage } from '#components/not-found-page.js';
|
|
7
7
|
import { SettingsNav } from '#components/settings-nav.js';
|
|
8
|
-
import {
|
|
8
|
+
import { useMaybeActiveWorkspace } from './active-workspace.js';
|
|
9
9
|
import { anchorPaths } from './anchor-paths.js';
|
|
10
10
|
import { rememberLastWorkspaceId } from './last-workspace.js';
|
|
11
11
|
import { parseWorkspaceParams, parseWorkspaceProjectParams, useRouteParams } from './route-inputs.js';
|
|
@@ -116,11 +116,8 @@ export function buildAnchorSkeleton({ navigation, settingsSections }) {
|
|
|
116
116
|
getParentRoute: ()=>workspaceLayout,
|
|
117
117
|
path: '/settings',
|
|
118
118
|
component: ()=>{
|
|
119
|
-
const workspace = useActiveWorkspace();
|
|
120
119
|
return /*#__PURE__*/ _jsx(SettingsAnchorLayout, {
|
|
121
120
|
scope: "workspace",
|
|
122
|
-
title: "Workspace settings",
|
|
123
|
-
description: `Configure ${workspace.name}.`,
|
|
124
121
|
settingsSections: settingsSections
|
|
125
122
|
});
|
|
126
123
|
}
|
|
@@ -144,22 +141,22 @@ function SettingsAnchorLayout({ scope, title, description, settingsSections }) {
|
|
|
144
141
|
const params = useRouteParams((input)=>scope === 'workspace' ? parseWorkspaceParams(input) : parseWorkspaceProjectParams(input));
|
|
145
142
|
if (!params.workspaceSlug || scope === 'project' && !params.projectSlug) return null;
|
|
146
143
|
return /*#__PURE__*/ _jsxs("div", {
|
|
147
|
-
className:
|
|
144
|
+
className: title ? 'flex w-full flex-col gap-section' : 'w-full',
|
|
148
145
|
children: [
|
|
149
|
-
/*#__PURE__*/ _jsxs("header", {
|
|
146
|
+
title ? /*#__PURE__*/ _jsxs("header", {
|
|
150
147
|
className: "flex flex-col gap-inline",
|
|
151
148
|
children: [
|
|
152
149
|
/*#__PURE__*/ _jsx(Header, {
|
|
153
150
|
variant: "h2",
|
|
154
151
|
children: title
|
|
155
152
|
}),
|
|
156
|
-
/*#__PURE__*/ _jsx(Text, {
|
|
153
|
+
description ? /*#__PURE__*/ _jsx(Text, {
|
|
157
154
|
size: "sm",
|
|
158
155
|
className: "text-foreground-neutral-muted",
|
|
159
156
|
children: description
|
|
160
|
-
})
|
|
157
|
+
}) : null
|
|
161
158
|
]
|
|
162
|
-
}),
|
|
159
|
+
}) : null,
|
|
163
160
|
/*#__PURE__*/ _jsxs("div", {
|
|
164
161
|
className: "grid grid-cols-[180px_minmax(0,1fr)] gap-region max-[760px]:grid-cols-1",
|
|
165
162
|
children: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/runtime/anchors.tsx"],"sourcesContent":["import {ShipfoxLoader} from '@shipfox/react-ui/loader';\nimport {Header, Text} from '@shipfox/react-ui/typography';\nimport {createRootRouteWithContext, createRoute, Outlet, redirect} from '@tanstack/react-router';\nimport {MainLayout} from '#components/main-layout.js';\nimport {NotFoundPage} from '#components/not-found-page.js';\nimport {SettingsNav} from '#components/settings-nav.js';\nimport type {NavTabEntry, SettingsSectionEntry} from '#contract.js';\nimport {useActiveWorkspace, useMaybeActiveWorkspace} from './active-workspace.js';\nimport {anchorPaths} from './anchor-paths.js';\nimport {rememberLastWorkspaceId} from './last-workspace.js';\nimport {parseWorkspaceParams, parseWorkspaceProjectParams, useRouteParams} from './route-inputs.js';\nimport type {RouterContext} from './router-context.js';\nimport type {WorkspaceSetupState} from './workspace-setup.js';\nimport {\n WorkspaceLayoutErrorRoute,\n WorkspaceSetupPending,\n WorkspaceUnavailablePage,\n} from './workspace-setup.js';\n\nexport {routePathForAnchor} from './anchor-paths.js';\n\nexport function buildAnchorSkeleton({\n navigation,\n settingsSections,\n}: {\n navigation: readonly NavTabEntry[];\n settingsSections: readonly SettingsSectionEntry[];\n}) {\n const rootRoute = createRootRouteWithContext<RouterContext>()({\n component: Outlet,\n notFoundComponent: NotFoundPage,\n });\n const workspaceLayout = createRoute({\n getParentRoute: () => rootRoute,\n path: anchorPaths.workspaceLayout,\n staticData: {frame: 'content'},\n beforeLoad: async ({context, params, location}) => {\n const auth = context.auth;\n if (!auth || auth.isLoading || !context.queryClient) return;\n if (!auth.isAuthenticated)\n throw redirect({to: '/auth/login' as never, search: {redirect: location.href} as never});\n const workspace = auth.workspaces.find(\n (candidate) => candidate.slug === params.workspaceSlug,\n );\n if (!workspace) throw redirect({to: '/'});\n try {\n if (auth.user?.id) rememberLastWorkspaceId(auth.user.id, workspace.id);\n } catch {\n // Local storage is best effort.\n }\n if (!context.workspaceSetup)\n throw new Error('Client composition includes workspace routes but no workspaceSetup gate.');\n return await context.workspaceSetup({\n queryClient: context.queryClient,\n workspaceId: workspace.id,\n workspaceSlug: params.workspaceSlug,\n pathname: location.pathname,\n });\n },\n pendingComponent: () => (\n <div className=\"flex h-screen items-center justify-center\">\n <ShipfoxLoader size={64} animation=\"circular\" color=\"orange\" background=\"dark\" />\n </div>\n ),\n errorComponent: WorkspaceLayoutErrorRoute,\n component: () => {\n const setupState = workspaceLayout.useRouteContext() as {\n hideProjectNavigation?: boolean;\n unavailable?: boolean;\n };\n const workspace = useMaybeActiveWorkspace();\n return setupState.hideProjectNavigation === undefined ? (\n <WorkspaceSetupPending />\n ) : setupState.unavailable ? (\n <WorkspaceUnavailablePage workspaceName={workspace?.name} />\n ) : (\n <MainLayout\n navigation={navigation}\n hideProjectNavigation={setupState.hideProjectNavigation}\n />\n );\n },\n });\n const projectLayout = createRoute({\n getParentRoute: () => workspaceLayout,\n path: '/p/$projectSlug',\n staticData: {frame: 'content'},\n beforeLoad: async ({context, params}) => {\n const auth = context.auth;\n if (!auth || auth.isLoading || !context.queryClient) return;\n if ((context as RouterContext & Partial<WorkspaceSetupState>).unavailable) return;\n const workspace = auth.workspaces.find(\n (candidate) => candidate.slug === params.workspaceSlug,\n );\n if (!workspace) throw redirect({to: '/'});\n if (!context.projectSlugResolver) {\n throw new Error('Client composition includes project routes but no project slug resolver.');\n }\n const projectId = await context.projectSlugResolver({\n queryClient: context.queryClient,\n workspaceId: workspace.id,\n projectSlug: params.projectSlug,\n });\n if (!projectId) {\n throw redirect({\n to: '/w/$workspaceSlug',\n params: {workspaceSlug: params.workspaceSlug},\n });\n }\n },\n component: Outlet,\n });\n const projectSettings = createRoute({\n getParentRoute: () => projectLayout,\n path: '/settings',\n component: () => (\n <SettingsAnchorLayout\n scope=\"project\"\n title=\"Project settings\"\n description=\"Configure this project.\"\n settingsSections={settingsSections}\n />\n ),\n });\n const workspaceSettings = createRoute({\n getParentRoute: () => workspaceLayout,\n path: '/settings',\n component: () => {\n const workspace = useActiveWorkspace();\n return (\n <SettingsAnchorLayout\n scope=\"workspace\"\n title=\"Workspace settings\"\n description={`Configure ${workspace.name}.`}\n settingsSections={settingsSections}\n />\n );\n },\n });\n return {\n anchors: {root: rootRoute, workspaceLayout, projectLayout, workspaceSettings, projectSettings},\n rootRoute,\n workspaceLayout,\n projectLayout,\n workspaceSettings,\n projectSettings,\n };\n}\n\nfunction SettingsAnchorLayout({\n scope,\n title,\n description,\n settingsSections,\n}: {\n scope: 'workspace' | 'project';\n title: string;\n description: string;\n settingsSections: readonly SettingsSectionEntry[];\n}) {\n const params = useRouteParams((input): {workspaceSlug?: string; projectSlug?: string} =>\n scope === 'workspace' ? parseWorkspaceParams(input) : parseWorkspaceProjectParams(input),\n );\n if (!params.workspaceSlug || (scope === 'project' && !params.projectSlug)) return null;\n\n return (\n <div className=\"flex w-full flex-col gap-section\">\n <header className=\"flex flex-col gap-inline\">\n <Header variant=\"h2\">{title}</Header>\n <Text size=\"sm\" className=\"text-foreground-neutral-muted\">\n {description}\n </Text>\n </header>\n\n <div className=\"grid grid-cols-[180px_minmax(0,1fr)] gap-region max-[760px]:grid-cols-1\">\n <SettingsNav entries={settingsSections} scope={scope} />\n <Outlet />\n </div>\n </div>\n );\n}\n"],"names":["ShipfoxLoader","Header","Text","createRootRouteWithContext","createRoute","Outlet","redirect","MainLayout","NotFoundPage","SettingsNav","useActiveWorkspace","useMaybeActiveWorkspace","anchorPaths","rememberLastWorkspaceId","parseWorkspaceParams","parseWorkspaceProjectParams","useRouteParams","WorkspaceLayoutErrorRoute","WorkspaceSetupPending","WorkspaceUnavailablePage","routePathForAnchor","buildAnchorSkeleton","navigation","settingsSections","rootRoute","component","notFoundComponent","workspaceLayout","getParentRoute","path","staticData","frame","beforeLoad","context","params","location","auth","isLoading","queryClient","isAuthenticated","to","search","href","workspace","workspaces","find","candidate","slug","workspaceSlug","user","id","workspaceSetup","Error","workspaceId","pathname","pendingComponent","div","className","size","animation","color","background","errorComponent","setupState","useRouteContext","hideProjectNavigation","undefined","unavailable","workspaceName","name","projectLayout","projectSlugResolver","projectId","projectSlug","projectSettings","SettingsAnchorLayout","scope","title","description","workspaceSettings","anchors","root","input","header","variant","entries"],"mappings":";AAAA,SAAQA,aAAa,QAAO,2BAA2B;AACvD,SAAQC,MAAM,EAAEC,IAAI,QAAO,+BAA+B;AAC1D,SAAQC,0BAA0B,EAAEC,WAAW,EAAEC,MAAM,EAAEC,QAAQ,QAAO,yBAAyB;AACjG,SAAQC,UAAU,QAAO,6BAA6B;AACtD,SAAQC,YAAY,QAAO,gCAAgC;AAC3D,SAAQC,WAAW,QAAO,8BAA8B;AAExD,SAAQC,kBAAkB,EAAEC,uBAAuB,QAAO,wBAAwB;AAClF,SAAQC,WAAW,QAAO,oBAAoB;AAC9C,SAAQC,uBAAuB,QAAO,sBAAsB;AAC5D,SAAQC,oBAAoB,EAAEC,2BAA2B,EAAEC,cAAc,QAAO,oBAAoB;AAGpG,SACEC,yBAAyB,EACzBC,qBAAqB,EACrBC,wBAAwB,QACnB,uBAAuB;AAE9B,SAAQC,kBAAkB,QAAO,oBAAoB;AAErD,OAAO,SAASC,oBAAoB,EAClCC,UAAU,EACVC,gBAAgB,EAIjB;IACC,MAAMC,YAAYrB,6BAA4C;QAC5DsB,WAAWpB;QACXqB,mBAAmBlB;IACrB;IACA,MAAMmB,kBAAkBvB,YAAY;QAClCwB,gBAAgB,IAAMJ;QACtBK,MAAMjB,YAAYe,eAAe;QACjCG,YAAY;YAACC,OAAO;QAAS;QAC7BC,YAAY,OAAO,EAACC,OAAO,EAAEC,MAAM,EAAEC,QAAQ,EAAC;YAC5C,MAAMC,OAAOH,QAAQG,IAAI;YACzB,IAAI,CAACA,QAAQA,KAAKC,SAAS,IAAI,CAACJ,QAAQK,WAAW,EAAE;YACrD,IAAI,CAACF,KAAKG,eAAe,EACvB,MAAMjC,SAAS;gBAACkC,IAAI;gBAAwBC,QAAQ;oBAACnC,UAAU6B,SAASO,IAAI;gB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AA4BmE;IAEpF,IAAI,CAAChD,OAAOc,aAAa,IAAK4B,UAAU,aAAa,CAAC1C,OAAOuC,WAAW,EAAG,OAAO;IAElF,qBACE,MAACjB;QAAIC,WAAU;;0BACb,MAAC0B;gBAAO1B,WAAU;;kCAChB,KAACxD;wBAAOmF,SAAQ;kCAAMP;;kCACtB,KAAC3E;wBAAKwD,MAAK;wBAAKD,WAAU;kCACvBqB;;;;0BAIL,MAACtB;gBAAIC,WAAU;;kCACb,KAAChD;wBAAY4E,SAAS9D;wBAAkBqD,OAAOA;;kCAC/C,KAACvE;;;;;AAIT"}
|
|
1
|
+
{"version":3,"sources":["../../src/runtime/anchors.tsx"],"sourcesContent":["import {ShipfoxLoader} from '@shipfox/react-ui/loader';\nimport {Header, Text} from '@shipfox/react-ui/typography';\nimport {createRootRouteWithContext, createRoute, Outlet, redirect} from '@tanstack/react-router';\nimport {MainLayout} from '#components/main-layout.js';\nimport {NotFoundPage} from '#components/not-found-page.js';\nimport {SettingsNav} from '#components/settings-nav.js';\nimport type {NavTabEntry, SettingsSectionEntry} from '#contract.js';\nimport {useMaybeActiveWorkspace} from './active-workspace.js';\nimport {anchorPaths} from './anchor-paths.js';\nimport {rememberLastWorkspaceId} from './last-workspace.js';\nimport {parseWorkspaceParams, parseWorkspaceProjectParams, useRouteParams} from './route-inputs.js';\nimport type {RouterContext} from './router-context.js';\nimport type {WorkspaceSetupState} from './workspace-setup.js';\nimport {\n WorkspaceLayoutErrorRoute,\n WorkspaceSetupPending,\n WorkspaceUnavailablePage,\n} from './workspace-setup.js';\n\nexport {routePathForAnchor} from './anchor-paths.js';\n\nexport function buildAnchorSkeleton({\n navigation,\n settingsSections,\n}: {\n navigation: readonly NavTabEntry[];\n settingsSections: readonly SettingsSectionEntry[];\n}) {\n const rootRoute = createRootRouteWithContext<RouterContext>()({\n component: Outlet,\n notFoundComponent: NotFoundPage,\n });\n const workspaceLayout = createRoute({\n getParentRoute: () => rootRoute,\n path: anchorPaths.workspaceLayout,\n staticData: {frame: 'content'},\n beforeLoad: async ({context, params, location}) => {\n const auth = context.auth;\n if (!auth || auth.isLoading || !context.queryClient) return;\n if (!auth.isAuthenticated)\n throw redirect({to: '/auth/login' as never, search: {redirect: location.href} as never});\n const workspace = auth.workspaces.find(\n (candidate) => candidate.slug === params.workspaceSlug,\n );\n if (!workspace) throw redirect({to: '/'});\n try {\n if (auth.user?.id) rememberLastWorkspaceId(auth.user.id, workspace.id);\n } catch {\n // Local storage is best effort.\n }\n if (!context.workspaceSetup)\n throw new Error('Client composition includes workspace routes but no workspaceSetup gate.');\n return await context.workspaceSetup({\n queryClient: context.queryClient,\n workspaceId: workspace.id,\n workspaceSlug: params.workspaceSlug,\n pathname: location.pathname,\n });\n },\n pendingComponent: () => (\n <div className=\"flex h-screen items-center justify-center\">\n <ShipfoxLoader size={64} animation=\"circular\" color=\"orange\" background=\"dark\" />\n </div>\n ),\n errorComponent: WorkspaceLayoutErrorRoute,\n component: () => {\n const setupState = workspaceLayout.useRouteContext() as {\n hideProjectNavigation?: boolean;\n unavailable?: boolean;\n };\n const workspace = useMaybeActiveWorkspace();\n return setupState.hideProjectNavigation === undefined ? (\n <WorkspaceSetupPending />\n ) : setupState.unavailable ? (\n <WorkspaceUnavailablePage workspaceName={workspace?.name} />\n ) : (\n <MainLayout\n navigation={navigation}\n hideProjectNavigation={setupState.hideProjectNavigation}\n />\n );\n },\n });\n const projectLayout = createRoute({\n getParentRoute: () => workspaceLayout,\n path: '/p/$projectSlug',\n staticData: {frame: 'content'},\n beforeLoad: async ({context, params}) => {\n const auth = context.auth;\n if (!auth || auth.isLoading || !context.queryClient) return;\n if ((context as RouterContext & Partial<WorkspaceSetupState>).unavailable) return;\n const workspace = auth.workspaces.find(\n (candidate) => candidate.slug === params.workspaceSlug,\n );\n if (!workspace) throw redirect({to: '/'});\n if (!context.projectSlugResolver) {\n throw new Error('Client composition includes project routes but no project slug resolver.');\n }\n const projectId = await context.projectSlugResolver({\n queryClient: context.queryClient,\n workspaceId: workspace.id,\n projectSlug: params.projectSlug,\n });\n if (!projectId) {\n throw redirect({\n to: '/w/$workspaceSlug',\n params: {workspaceSlug: params.workspaceSlug},\n });\n }\n },\n component: Outlet,\n });\n const projectSettings = createRoute({\n getParentRoute: () => projectLayout,\n path: '/settings',\n component: () => (\n <SettingsAnchorLayout\n scope=\"project\"\n title=\"Project settings\"\n description=\"Configure this project.\"\n settingsSections={settingsSections}\n />\n ),\n });\n const workspaceSettings = createRoute({\n getParentRoute: () => workspaceLayout,\n path: '/settings',\n component: () => {\n return <SettingsAnchorLayout scope=\"workspace\" settingsSections={settingsSections} />;\n },\n });\n return {\n anchors: {root: rootRoute, workspaceLayout, projectLayout, workspaceSettings, projectSettings},\n rootRoute,\n workspaceLayout,\n projectLayout,\n workspaceSettings,\n projectSettings,\n };\n}\n\nfunction SettingsAnchorLayout({\n scope,\n title,\n description,\n settingsSections,\n}: {\n scope: 'workspace' | 'project';\n title?: string;\n description?: string;\n settingsSections: readonly SettingsSectionEntry[];\n}) {\n const params = useRouteParams((input): {workspaceSlug?: string; projectSlug?: string} =>\n scope === 'workspace' ? parseWorkspaceParams(input) : parseWorkspaceProjectParams(input),\n );\n if (!params.workspaceSlug || (scope === 'project' && !params.projectSlug)) return null;\n\n return (\n <div className={title ? 'flex w-full flex-col gap-section' : 'w-full'}>\n {title ? (\n <header className=\"flex flex-col gap-inline\">\n <Header variant=\"h2\">{title}</Header>\n {description ? (\n <Text size=\"sm\" className=\"text-foreground-neutral-muted\">\n {description}\n </Text>\n ) : null}\n </header>\n ) : null}\n\n <div className=\"grid grid-cols-[180px_minmax(0,1fr)] gap-region max-[760px]:grid-cols-1\">\n <SettingsNav entries={settingsSections} scope={scope} />\n <Outlet />\n </div>\n </div>\n );\n}\n"],"names":["ShipfoxLoader","Header","Text","createRootRouteWithContext","createRoute","Outlet","redirect","MainLayout","NotFoundPage","SettingsNav","useMaybeActiveWorkspace","anchorPaths","rememberLastWorkspaceId","parseWorkspaceParams","parseWorkspaceProjectParams","useRouteParams","WorkspaceLayoutErrorRoute","WorkspaceSetupPending","WorkspaceUnavailablePage","routePathForAnchor","buildAnchorSkeleton","navigation","settingsSections","rootRoute","component","notFoundComponent","workspaceLayout","getParentRoute","path","staticData","frame","beforeLoad","context","params","location","auth","isLoading","queryClient","isAuthenticated","to","search","href","workspace","workspaces","find","candidate","slug","workspaceSlug","user","id","workspaceSetup","Error","workspaceId","pathname","pendingComponent","div","className","size","animation","color","background","errorComponent","setupState","useRouteContext","hideProjectNavigation","undefined","unavailable","workspaceName","name","projectLayout","projectSlugResolver","projectId","projectSlug","projectSettings","SettingsAnchorLayout","scope","title","description","workspaceSettings","anchors","root","input","header","variant","entries"],"mappings":";AAAA,SAAQA,aAAa,QAAO,2BAA2B;AACvD,SAAQC,MAAM,EAAEC,IAAI,QAAO,+BAA+B;AAC1D,SAAQC,0BAA0B,EAAEC,WAAW,EAAEC,MAAM,EAAEC,QAAQ,QAAO,yBAAyB;AACjG,SAAQC,UAAU,QAAO,6BAA6B;AACtD,SAAQC,YAAY,QAAO,gCAAgC;AAC3D,SAAQC,WAAW,QAAO,8BAA8B;AAExD,SAAQC,uBAAuB,QAAO,wBAAwB;AAC9D,SAAQC,WAAW,QAAO,oBAAoB;AAC9C,SAAQC,uBAAuB,QAAO,sBAAsB;AAC5D,SAAQC,oBAAoB,EAAEC,2BAA2B,EAAEC,cAAc,QAAO,oBAAoB;AAGpG,SACEC,yBAAyB,EACzBC,qBAAqB,EACrBC,wBAAwB,QACnB,uBAAuB;AAE9B,SAAQC,kBAAkB,QAAO,oBAAoB;AAErD,OAAO,SAASC,oBAAoB,EAClCC,UAAU,EACVC,gBAAgB,EAIjB;IACC,MAAMC,YAAYpB,6BAA4C;QAC5DqB,WAAWnB;QACXoB,mBAAmBjB;IACrB;IACA,MAAMkB,kBAAkBtB,YAAY;QAClCuB,gBAAgB,IAAMJ;QACtBK,MAAMjB,YAAYe,eAAe;QACjCG,YAAY;YAACC,OAAO;QAAS;QA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2C;QACAS;QACAL;IACF;AACF;AAEA,SAASC,qBAAqB,EAC5BC,KAAK,EACLC,KAAK,EACLC,WAAW,EACXvD,gBAAgB,EAMjB;IACC,MAAMW,SAASlB,eAAe,CAACkE,QAC7BN,UAAU,cAAc9D,qBAAqBoE,SAASnE,4BAA4BmE;IAEpF,IAAI,CAAChD,OAAOc,aAAa,IAAK4B,UAAU,aAAa,CAAC1C,OAAOuC,WAAW,EAAG,OAAO;IAElF,qBACE,MAACjB;QAAIC,WAAWoB,QAAQ,qCAAqC;;YAC1DA,sBACC,MAACM;gBAAO1B,WAAU;;kCAChB,KAACvD;wBAAOkF,SAAQ;kCAAMP;;oBACrBC,4BACC,KAAC3E;wBAAKuD,MAAK;wBAAKD,WAAU;kCACvBqB;yBAED;;iBAEJ;0BAEJ,MAACtB;gBAAIC,WAAU;;kCACb,KAAC/C;wBAAY2E,SAAS9D;wBAAkBqD,OAAOA;;kCAC/C,KAACtE;;;;;AAIT"}
|
package/dist/runtime/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { AuthActions, AuthShell, type AuthShellProps } from '#components/auth-shell.js';
|
|
2
|
+
export { FOCUSED_FRAME_CONTENT_CLASS_NAME, FocusedFrame, } from '#components/focused-frame.js';
|
|
2
3
|
export { WorkspaceCrumb, type WorkspaceCrumbProps } from '#components/workspace-crumb.js';
|
|
3
4
|
export { WorkspaceSwitcher } from '#components/workspace-switcher.js';
|
|
4
5
|
export type { AuthenticatedSession, UserIdentity, WorkspaceMembership, WorkspaceSummary, } from '#core/session.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/runtime/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAE,SAAS,EAAE,KAAK,cAAc,EAAC,MAAM,2BAA2B,CAAC;AACtF,OAAO,EAAC,cAAc,EAAE,KAAK,mBAAmB,EAAC,MAAM,gCAAgC,CAAC;AACxF,OAAO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,OAAO,EAAC,sBAAsB,EAAE,cAAc,EAAC,MAAM,8BAA8B,CAAC;AACpF,cAAc,uCAAuC,CAAC;AACtD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oCAAoC,CAAC;AACnD,cAAc,kCAAkC,CAAC;AACjD,cAAc,mCAAmC,CAAC;AAClD,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC"}
|
package/dist/runtime/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { AuthActions, AuthShell } from '#components/auth-shell.js';
|
|
2
|
+
export { FOCUSED_FRAME_CONTENT_CLASS_NAME, FocusedFrame } from '#components/focused-frame.js';
|
|
2
3
|
export { WorkspaceCrumb } from '#components/workspace-crumb.js';
|
|
3
4
|
export { WorkspaceSwitcher } from '#components/workspace-switcher.js';
|
|
4
5
|
export { toAuthenticatedSession, toUserIdentity } from '#hooks/api/session-mapper.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/runtime/index.ts"],"sourcesContent":["export {AuthActions, AuthShell, type AuthShellProps} from '#components/auth-shell.js';\nexport {WorkspaceCrumb, type WorkspaceCrumbProps} from '#components/workspace-crumb.js';\nexport {WorkspaceSwitcher} from '#components/workspace-switcher.js';\nexport type {\n AuthenticatedSession,\n UserIdentity,\n WorkspaceMembership,\n WorkspaceSummary,\n} from '#core/session.js';\nexport {toAuthenticatedSession, toUserIdentity} from '#hooks/api/session-mapper.js';\nexport * from '../compose/compose-client-features.js';\nexport * from '../compose/compose-routes.js';\nexport * from '../compose/errors.js';\nexport * from '../compose/merge-config.js';\nexport * from '../compose/normalize-route-path.js';\nexport * from '../compose/validate-providers.js';\nexport * from '../compose/validate-registries.js';\nexport * from './active-workspace.js';\nexport * from './anchor-paths.js';\nexport * from './anchors.js';\nexport * from './auth.js';\nexport * from './chrome-context.js';\nexport * from './compose-client-app.js';\nexport * from './define-route.js';\nexport * from './last-workspace.js';\nexport * from './layout-navigation.js';\nexport * from './nav-order.js';\nexport * from './route-frame.js';\nexport * from './route-inputs.js';\nexport * from './router-context.js';\nexport * from './search-serialization.js';\nexport * from './workspace-setup.js';\n"],"names":["AuthActions","AuthShell","WorkspaceCrumb","WorkspaceSwitcher","toAuthenticatedSession","toUserIdentity"],"mappings":"AAAA,SAAQA,WAAW,EAAEC,SAAS,QAA4B,4BAA4B;AACtF,SAAQC,cAAc,QAAiC,iCAAiC;AACxF,SAAQC,iBAAiB,QAAO,oCAAoC;AAOpE,SAAQC,sBAAsB,EAAEC,cAAc,QAAO,+BAA+B;AACpF,cAAc,wCAAwC;AACtD,cAAc,+BAA+B;AAC7C,cAAc,uBAAuB;AACrC,cAAc,6BAA6B;AAC3C,cAAc,qCAAqC;AACnD,cAAc,mCAAmC;AACjD,cAAc,oCAAoC;AAClD,cAAc,wBAAwB;AACtC,cAAc,oBAAoB;AAClC,cAAc,eAAe;AAC7B,cAAc,YAAY;AAC1B,cAAc,sBAAsB;AACpC,cAAc,0BAA0B;AACxC,cAAc,oBAAoB;AAClC,cAAc,sBAAsB;AACpC,cAAc,yBAAyB;AACvC,cAAc,iBAAiB;AAC/B,cAAc,mBAAmB;AACjC,cAAc,oBAAoB;AAClC,cAAc,sBAAsB;AACpC,cAAc,4BAA4B;AAC1C,cAAc,uBAAuB"}
|
|
1
|
+
{"version":3,"sources":["../../src/runtime/index.ts"],"sourcesContent":["export {AuthActions, AuthShell, type AuthShellProps} from '#components/auth-shell.js';\nexport {\n FOCUSED_FRAME_CONTENT_CLASS_NAME,\n FocusedFrame,\n} from '#components/focused-frame.js';\nexport {WorkspaceCrumb, type WorkspaceCrumbProps} from '#components/workspace-crumb.js';\nexport {WorkspaceSwitcher} from '#components/workspace-switcher.js';\nexport type {\n AuthenticatedSession,\n UserIdentity,\n WorkspaceMembership,\n WorkspaceSummary,\n} from '#core/session.js';\nexport {toAuthenticatedSession, toUserIdentity} from '#hooks/api/session-mapper.js';\nexport * from '../compose/compose-client-features.js';\nexport * from '../compose/compose-routes.js';\nexport * from '../compose/errors.js';\nexport * from '../compose/merge-config.js';\nexport * from '../compose/normalize-route-path.js';\nexport * from '../compose/validate-providers.js';\nexport * from '../compose/validate-registries.js';\nexport * from './active-workspace.js';\nexport * from './anchor-paths.js';\nexport * from './anchors.js';\nexport * from './auth.js';\nexport * from './chrome-context.js';\nexport * from './compose-client-app.js';\nexport * from './define-route.js';\nexport * from './last-workspace.js';\nexport * from './layout-navigation.js';\nexport * from './nav-order.js';\nexport * from './route-frame.js';\nexport * from './route-inputs.js';\nexport * from './router-context.js';\nexport * from './search-serialization.js';\nexport * from './workspace-setup.js';\n"],"names":["AuthActions","AuthShell","FOCUSED_FRAME_CONTENT_CLASS_NAME","FocusedFrame","WorkspaceCrumb","WorkspaceSwitcher","toAuthenticatedSession","toUserIdentity"],"mappings":"AAAA,SAAQA,WAAW,EAAEC,SAAS,QAA4B,4BAA4B;AACtF,SACEC,gCAAgC,EAChCC,YAAY,QACP,+BAA+B;AACtC,SAAQC,cAAc,QAAiC,iCAAiC;AACxF,SAAQC,iBAAiB,QAAO,oCAAoC;AAOpE,SAAQC,sBAAsB,EAAEC,cAAc,QAAO,+BAA+B;AACpF,cAAc,wCAAwC;AACtD,cAAc,+BAA+B;AAC7C,cAAc,uBAAuB;AACrC,cAAc,6BAA6B;AAC3C,cAAc,qCAAqC;AACnD,cAAc,mCAAmC;AACjD,cAAc,oCAAoC;AAClD,cAAc,wBAAwB;AACtC,cAAc,oBAAoB;AAClC,cAAc,eAAe;AAC7B,cAAc,YAAY;AAC1B,cAAc,sBAAsB;AACpC,cAAc,0BAA0B;AACxC,cAAc,oBAAoB;AAClC,cAAc,sBAAsB;AACpC,cAAc,yBAAyB;AACvC,cAAc,iBAAiB;AAC/B,cAAc,mBAAmB;AACjC,cAAc,oBAAoB;AAClC,cAAc,sBAAsB;AACpC,cAAc,4BAA4B;AAC1C,cAAc,uBAAuB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace-setup.d.ts","sourceRoot":"","sources":["../../src/runtime/workspace-setup.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAC,KAAK,mBAAmB,EAAY,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"workspace-setup.d.ts","sourceRoot":"","sources":["../../src/runtime/workspace-setup.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAC,KAAK,mBAAmB,EAAY,MAAM,wBAAwB,CAAC;AAG3E,MAAM,WAAW,mBAAmB;IAClC,qBAAqB,EAAE,OAAO,CAAC;IAC/B,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AACD,MAAM,WAAW,0BAA0B;IACzC,WAAW,EAAE,WAAW,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;CAClB;AACD,MAAM,MAAM,kBAAkB,GAAG,CAC/B,OAAO,EAAE,0BAA0B,KAChC,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAElC,qBAAa,uBAAwB,SAAQ,KAAK;aACX,KAAK,EAAE,OAAO;IAAnD,YAAqC,KAAK,EAAE,OAAO,EAGlD;CACF;AACD,wBAAgB,qBAAqB,gCAEpC;AAED,wBAAgB,wBAAwB,CAAC,EAAC,aAAa,EAAC,EAAE;IAAC,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAAC,+BAc7F;AACD,wBAAgB,yBAAyB,CAAC,EAAC,KAAK,EAAE,KAAK,EAAC,EAAE,mBAAmB,+BA+B5E"}
|
|
@@ -5,6 +5,7 @@ import { Callout } from '@shipfox/react-ui/callout';
|
|
|
5
5
|
import { FullPageLoader } from '@shipfox/react-ui/loader';
|
|
6
6
|
import { Header, Text } from '@shipfox/react-ui/typography';
|
|
7
7
|
import { useRouter } from '@tanstack/react-router';
|
|
8
|
+
import { FocusedFrame } from '#components/focused-frame.js';
|
|
8
9
|
export class WorkspaceSetupLoadError extends Error {
|
|
9
10
|
constructor(cause){
|
|
10
11
|
super(cause instanceof Error ? cause.message : 'Workspace setup load failed'), this.cause = cause;
|
|
@@ -17,8 +18,8 @@ export function WorkspaceSetupPending() {
|
|
|
17
18
|
export function WorkspaceUnavailablePage({ workspaceName }) {
|
|
18
19
|
return /*#__PURE__*/ _jsx("main", {
|
|
19
20
|
className: "min-h-screen bg-background-subtle-base px-frame py-frame max-[520px]:px-row",
|
|
20
|
-
children: /*#__PURE__*/ _jsxs(
|
|
21
|
-
className: "
|
|
21
|
+
children: /*#__PURE__*/ _jsxs(FocusedFrame, {
|
|
22
|
+
className: "flex flex-col gap-cluster",
|
|
22
23
|
children: [
|
|
23
24
|
/*#__PURE__*/ _jsx(Header, {
|
|
24
25
|
variant: "h1",
|
|
@@ -47,8 +48,8 @@ export function WorkspaceLayoutErrorRoute({ error, reset }) {
|
|
|
47
48
|
const message = error instanceof ApiError ? error.message : setupError && error.cause instanceof ApiError ? error.cause.message : 'Try again in a moment.';
|
|
48
49
|
return /*#__PURE__*/ _jsx("main", {
|
|
49
50
|
className: "min-h-screen bg-background-subtle-base px-frame py-frame max-[520px]:px-row",
|
|
50
|
-
children: /*#__PURE__*/ _jsxs(
|
|
51
|
-
className: "
|
|
51
|
+
children: /*#__PURE__*/ _jsxs(FocusedFrame, {
|
|
52
|
+
className: "flex flex-col gap-section",
|
|
52
53
|
children: [
|
|
53
54
|
/*#__PURE__*/ _jsx(Header, {
|
|
54
55
|
variant: "h1",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/runtime/workspace-setup.tsx"],"sourcesContent":["import {ApiError} from '@shipfox/client-api';\nimport {Button} from '@shipfox/react-ui/button';\nimport {Callout} from '@shipfox/react-ui/callout';\nimport {FullPageLoader} from '@shipfox/react-ui/loader';\nimport {Header, Text} from '@shipfox/react-ui/typography';\nimport type {QueryClient} from '@tanstack/react-query';\nimport {type ErrorComponentProps, useRouter} from '@tanstack/react-router';\n\nexport interface WorkspaceSetupState {\n hideProjectNavigation: boolean;\n unavailable?: boolean;\n}\nexport interface WorkspaceSetupRouteOptions {\n queryClient: QueryClient;\n workspaceId: string;\n workspaceSlug: string;\n pathname: string;\n}\nexport type WorkspaceSetupGate = (\n options: WorkspaceSetupRouteOptions,\n) => Promise<WorkspaceSetupState>;\n\nexport class WorkspaceSetupLoadError extends Error {\n constructor(public override readonly cause: unknown) {\n super(cause instanceof Error ? cause.message : 'Workspace setup load failed');\n this.name = 'WorkspaceSetupLoadError';\n }\n}\nexport function WorkspaceSetupPending() {\n return <FullPageLoader />;\n}\n\nexport function WorkspaceUnavailablePage({workspaceName}: {workspaceName?: string | undefined}) {\n return (\n <main className=\"min-h-screen bg-background-subtle-base px-frame py-frame max-[520px]:px-row\">\n <
|
|
1
|
+
{"version":3,"sources":["../../src/runtime/workspace-setup.tsx"],"sourcesContent":["import {ApiError} from '@shipfox/client-api';\nimport {Button} from '@shipfox/react-ui/button';\nimport {Callout} from '@shipfox/react-ui/callout';\nimport {FullPageLoader} from '@shipfox/react-ui/loader';\nimport {Header, Text} from '@shipfox/react-ui/typography';\nimport type {QueryClient} from '@tanstack/react-query';\nimport {type ErrorComponentProps, useRouter} from '@tanstack/react-router';\nimport {FocusedFrame} from '#components/focused-frame.js';\n\nexport interface WorkspaceSetupState {\n hideProjectNavigation: boolean;\n unavailable?: boolean;\n}\nexport interface WorkspaceSetupRouteOptions {\n queryClient: QueryClient;\n workspaceId: string;\n workspaceSlug: string;\n pathname: string;\n}\nexport type WorkspaceSetupGate = (\n options: WorkspaceSetupRouteOptions,\n) => Promise<WorkspaceSetupState>;\n\nexport class WorkspaceSetupLoadError extends Error {\n constructor(public override readonly cause: unknown) {\n super(cause instanceof Error ? cause.message : 'Workspace setup load failed');\n this.name = 'WorkspaceSetupLoadError';\n }\n}\nexport function WorkspaceSetupPending() {\n return <FullPageLoader />;\n}\n\nexport function WorkspaceUnavailablePage({workspaceName}: {workspaceName?: string | undefined}) {\n return (\n <main className=\"min-h-screen bg-background-subtle-base px-frame py-frame max-[520px]:px-row\">\n <FocusedFrame className=\"flex flex-col gap-cluster\">\n <Header variant=\"h1\">Workspace unavailable</Header>\n <Text size=\"md\" className=\"text-foreground-neutral-muted\">\n {workspaceName\n ? `${workspaceName} is currently unavailable.`\n : 'This workspace is currently unavailable.'}{' '}\n Please contact your configured support contact if you need help.\n </Text>\n </FocusedFrame>\n </main>\n );\n}\nexport function WorkspaceLayoutErrorRoute({error, reset}: ErrorComponentProps) {\n const router = useRouter();\n const retry = () => {\n reset();\n void router.invalidate();\n };\n const setupError = error instanceof WorkspaceSetupLoadError;\n const message =\n error instanceof ApiError\n ? error.message\n : setupError && error.cause instanceof ApiError\n ? error.cause.message\n : 'Try again in a moment.';\n return (\n <main className=\"min-h-screen bg-background-subtle-base px-frame py-frame max-[520px]:px-row\">\n <FocusedFrame className=\"flex flex-col gap-section\">\n <Header variant=\"h1\">{setupError ? 'Workspace setup' : 'Workspace'}</Header>\n <Callout role=\"alert\" type=\"error\">\n <div className=\"flex flex-col gap-inline\">\n <Text size=\"sm\" bold>\n {setupError ? 'Could not load workspace setup' : 'Could not load workspace'}\n </Text>\n <Text size=\"sm\">{message}</Text>\n <Button size=\"sm\" variant=\"secondary\" onClick={retry} className=\"w-fit\">\n Retry\n </Button>\n </div>\n </Callout>\n </FocusedFrame>\n </main>\n );\n}\n"],"names":["ApiError","Button","Callout","FullPageLoader","Header","Text","useRouter","FocusedFrame","WorkspaceSetupLoadError","Error","cause","message","name","WorkspaceSetupPending","WorkspaceUnavailablePage","workspaceName","main","className","variant","size","WorkspaceLayoutErrorRoute","error","reset","router","retry","invalidate","setupError","role","type","div","bold","onClick"],"mappings":";AAAA,SAAQA,QAAQ,QAAO,sBAAsB;AAC7C,SAAQC,MAAM,QAAO,2BAA2B;AAChD,SAAQC,OAAO,QAAO,4BAA4B;AAClD,SAAQC,cAAc,QAAO,2BAA2B;AACxD,SAAQC,MAAM,EAAEC,IAAI,QAAO,+BAA+B;AAE1D,SAAkCC,SAAS,QAAO,yBAAyB;AAC3E,SAAQC,YAAY,QAAO,+BAA+B;AAgB1D,OAAO,MAAMC,gCAAgCC;IAC3C,YAAY,AAAyBC,KAAc,CAAE;QACnD,KAAK,CAACA,iBAAiBD,QAAQC,MAAMC,OAAO,GAAG,qCADZD,QAAAA;QAEnC,IAAI,CAACE,IAAI,GAAG;IACd;AACF;AACA,OAAO,SAASC;IACd,qBAAO,KAACV;AACV;AAEA,OAAO,SAASW,yBAAyB,EAACC,aAAa,EAAuC;IAC5F,qBACE,KAACC;QAAKC,WAAU;kBACd,cAAA,MAACV;YAAaU,WAAU;;8BACtB,KAACb;oBAAOc,SAAQ;8BAAK;;8BACrB,MAACb;oBAAKc,MAAK;oBAAKF,WAAU;;wBACvBF,gBACG,GAAGA,cAAc,0BAA0B,CAAC,GAC5C;wBAA4C;wBAAI;;;;;;AAM9D;AACA,OAAO,SAASK,0BAA0B,EAACC,KAAK,EAAEC,KAAK,EAAsB;IAC3E,MAAMC,SAASjB;IACf,MAAMkB,QAAQ;QACZF;QACA,KAAKC,OAAOE,UAAU;IACxB;IACA,MAAMC,aAAaL,iBAAiBb;IACpC,MAAMG,UACJU,iBAAiBrB,WACb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