@treasuryspatial/viewer-ui-kit 0.1.38 → 0.1.40
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/ComposerRightRail.d.ts +2 -1
- package/dist/ComposerRightRail.d.ts.map +1 -1
- package/dist/ComposerRightRail.js +3 -3
- package/dist/ManifestTopBar.d.ts.map +1 -1
- package/dist/ManifestTopBar.js +8 -18
- package/dist/MetricsPanelContent.d.ts.map +1 -1
- package/dist/MetricsPanelContent.js +37 -42
- package/dist/ModeBar.js +3 -3
- package/dist/PanelSkin.d.ts.map +1 -1
- package/dist/PanelSkin.js +15 -13
- package/dist/PanelTabs.d.ts.map +1 -1
- package/dist/PanelTabs.js +24 -14
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -12,7 +12,8 @@ type ComposerRightRailProps = {
|
|
|
12
12
|
tabs: ComposerRightRailTab[];
|
|
13
13
|
title?: string;
|
|
14
14
|
statusLabel?: string;
|
|
15
|
+
showEdgeToggle?: boolean;
|
|
15
16
|
};
|
|
16
|
-
export default function ComposerRightRail({ isVisible, onToggle, activeTab, onTabChange, tabs, title, statusLabel, }: ComposerRightRailProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export default function ComposerRightRail({ isVisible, onToggle, activeTab, onTabChange, tabs, title, statusLabel, showEdgeToggle, }: ComposerRightRailProps): import("react/jsx-runtime").JSX.Element;
|
|
17
18
|
export {};
|
|
18
19
|
//# sourceMappingURL=ComposerRightRail.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComposerRightRail.d.ts","sourceRoot":"","sources":["../src/ComposerRightRail.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAOvC,MAAM,MAAM,oBAAoB,GAAG;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,SAAS,CAAC;CACpB,CAAC;AAEF,KAAK,sBAAsB,GAAG;IAC5B,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,IAAI,EAAE,oBAAoB,EAAE,CAAC;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"ComposerRightRail.d.ts","sourceRoot":"","sources":["../src/ComposerRightRail.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAOvC,MAAM,MAAM,oBAAoB,GAAG;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,SAAS,CAAC;CACpB,CAAC;AAEF,KAAK,sBAAsB,GAAG;IAC5B,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,IAAI,EAAE,oBAAoB,EAAE,CAAC;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,EACxC,SAAS,EACT,QAAQ,EACR,SAAS,EACT,WAAW,EACX,IAAI,EACJ,KAAsB,EACtB,WAAoB,EACpB,cAAsB,GACvB,EAAE,sBAAsB,2CAqExB"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
import { RightPanel, RightPanelCollapseToggle, RightPanelShowToggle, } from './layout.js';
|
|
4
|
-
export default function ComposerRightRail({ isVisible, onToggle, activeTab, onTabChange, tabs, title = 'image system', statusLabel = 'live', }) {
|
|
4
|
+
export default function ComposerRightRail({ isVisible, onToggle, activeTab, onTabChange, tabs, title = 'image system', statusLabel = 'live', showEdgeToggle = false, }) {
|
|
5
5
|
const active = tabs.find((tab) => tab.id === activeTab) ?? tabs[0] ?? null;
|
|
6
6
|
const hasStatus = Boolean(statusLabel && statusLabel.trim().length > 0);
|
|
7
|
-
return (_jsxs(_Fragment, { children: [isVisible ? (_jsxs(RightPanel, { "$open": isVisible, children: [_jsx(RightPanelCollapseToggle, { type: "button", onClick: onToggle, "aria-label": "Hide right panel", title: "Hide right panel", children: _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", children: _jsx("path", { fillRule: "evenodd", d: "M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z", clipRule: "evenodd" }) }) }), _jsxs("div", { className: "border-b viewer-ui-kit-border px-5 py-4", children: [_jsxs("div", { className: "flex items-center gap-2 text-[11px] uppercase tracking-[0.14em] viewer-ui-kit-text-subtle", children: [_jsx("span", { children: title }), hasStatus ? _jsx("span", { "aria-hidden": "true", children: "/" }) : null, hasStatus ? _jsx("span", { children: statusLabel }) : null] }), _jsx("div", { className: "mt-3 flex flex-wrap gap-2", children: tabs.map((tab) => (_jsx("button", { type: "button", onClick: () => onTabChange(tab.id), className: `rounded-full px-3
|
|
7
|
+
return (_jsxs(_Fragment, { children: [isVisible ? (_jsxs(RightPanel, { "$open": isVisible, children: [showEdgeToggle ? (_jsx(RightPanelCollapseToggle, { type: "button", onClick: onToggle, "aria-label": "Hide right panel", title: "Hide right panel", children: _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", children: _jsx("path", { fillRule: "evenodd", d: "M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z", clipRule: "evenodd" }) }) })) : null, _jsxs("div", { className: "border-b viewer-ui-kit-border px-5 py-4", children: [_jsxs("div", { className: "flex items-center gap-2 text-[11px] uppercase tracking-[0.14em] viewer-ui-kit-text-subtle", children: [_jsx("span", { children: title }), hasStatus ? _jsx("span", { "aria-hidden": "true", children: "/" }) : null, hasStatus ? _jsx("span", { children: statusLabel }) : null] }), _jsx("div", { className: "mt-3 flex flex-wrap gap-2", children: tabs.map((tab) => (_jsx("button", { type: "button", onClick: () => onTabChange(tab.id), className: `rounded-full px-3 py-2 text-[11px] font-semibold uppercase tracking-[0.08em] whitespace-nowrap transition border ${active?.id === tab.id
|
|
8
8
|
? 'bg-[var(--viewer-ui-color-toggle)] text-[var(--viewer-ui-color-toggle-text)] border-[var(--viewer-ui-color-toggle)]'
|
|
9
|
-
: 'bg-[var(--viewer-ui-color-tab-bg)] text-[var(--viewer-ui-color-text-muted)] border-[var(--viewer-ui-color-panel-border-subtle)] hover:bg-[var(--viewer-ui-color-button-secondary)] hover:text-[var(--viewer-ui-color-text-strong)]'}`, children: tab.label }, tab.id))) })] }), _jsx("div", { className: "viewer-ui-shell-right-body flex-1 overflow-y-auto px-5 py-5", children: active?.content ?? null })] })) : null, !isVisible ? (_jsx(RightPanelShowToggle, { type: "button", onClick: onToggle, "aria-label": "Show right panel", title: "Show right panel", children: _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", children: _jsx("path", { fillRule: "evenodd", d: "M12.707 14.707a1 1 0 010-1.414L9.414 10l3.293-3.293a1 1 0 00-1.414-1.414l-4 4a1 1 0 000 1.414l4 4a1 1 0 001.414 0z", clipRule: "evenodd" }) }) })) : null] }));
|
|
9
|
+
: 'bg-[var(--viewer-ui-color-tab-bg)] text-[var(--viewer-ui-color-text-muted)] border-[var(--viewer-ui-color-panel-border-subtle)] hover:bg-[var(--viewer-ui-color-button-secondary)] hover:text-[var(--viewer-ui-color-text-strong)]'}`, children: tab.label }, tab.id))) })] }), _jsx("div", { className: "viewer-ui-shell-right-body flex-1 overflow-y-auto px-5 py-5", children: active?.content ?? null })] })) : null, !isVisible && showEdgeToggle ? (_jsx(RightPanelShowToggle, { type: "button", onClick: onToggle, "aria-label": "Show right panel", title: "Show right panel", children: _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", children: _jsx("path", { fillRule: "evenodd", d: "M12.707 14.707a1 1 0 010-1.414L9.414 10l3.293-3.293a1 1 0 00-1.414-1.414l-4 4a1 1 0 000 1.414l4 4a1 1 0 001.414 0z", clipRule: "evenodd" }) }) })) : null] }));
|
|
10
10
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ManifestTopBar.d.ts","sourceRoot":"","sources":["../src/ManifestTopBar.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAY/D,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,EAAE,UAAU,CAAC;IACrB,OAAO,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;IAC/B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;
|
|
1
|
+
{"version":3,"file":"ManifestTopBar.d.ts","sourceRoot":"","sources":["../src/ManifestTopBar.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAY/D,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,EAAE,UAAU,CAAC;IACrB,OAAO,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;IAC/B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAuJF,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EACrC,QAAQ,EACR,OAAkB,EAClB,aAAqB,EACrB,UAAkB,EAClB,eAAuB,EACvB,YAAoB,EACpB,iBAAiB,EACjB,cAAmC,EACnC,UAAqB,GACtB,EAAE,mBAAmB,2CAmIrB"}
|
package/dist/ManifestTopBar.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsx as _jsx,
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useEffect, useMemo, useRef, useState } from 'react';
|
|
4
4
|
import Link from 'next/link';
|
|
5
|
-
import { usePathname,
|
|
5
|
+
import { usePathname, useSearchParams } from 'next/navigation';
|
|
6
6
|
import { buildLoginHref, useClientHydrated, useComposerAuthState, useSessionLogout, useSurfaceComposerData, } from '@treasuryspatial/viewer-react';
|
|
7
7
|
import styled from 'styled-components';
|
|
8
8
|
import TopBar from './TopBar.js';
|
|
@@ -67,22 +67,12 @@ const AuthButton = styled.button `
|
|
|
67
67
|
cursor: pointer;
|
|
68
68
|
padding: 0;
|
|
69
69
|
white-space: nowrap;
|
|
70
|
+
min-width: 12ch;
|
|
71
|
+
text-align: left;
|
|
70
72
|
|
|
71
73
|
&:hover {
|
|
72
74
|
color: var(--brand-primary);
|
|
73
75
|
}
|
|
74
|
-
|
|
75
|
-
.auth-hover {
|
|
76
|
-
display: none;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
&:hover .auth-default {
|
|
80
|
-
display: none;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
&:hover .auth-hover {
|
|
84
|
-
display: inline;
|
|
85
|
-
}
|
|
86
76
|
`;
|
|
87
77
|
const AuthLink = styled(Link) `
|
|
88
78
|
color: var(--brand-text-primary);
|
|
@@ -154,13 +144,13 @@ const isRouteActive = (pathname, href) => {
|
|
|
154
144
|
};
|
|
155
145
|
export default function ManifestTopBar({ manifest, variant = 'canvas', showPoweredBy = false, showLogout = false, showPanelToggle = false, showSubtitle = false, logoutCookieNames, logoutEndpoint = '/api/auth/logout', logoutHref = '/login', }) {
|
|
156
146
|
const pathname = usePathname();
|
|
157
|
-
const router = useRouter();
|
|
158
147
|
const searchParams = useSearchParams();
|
|
159
148
|
const hydrated = useClientHydrated();
|
|
160
149
|
const composerData = useSurfaceComposerData();
|
|
161
150
|
const { auth } = useComposerAuthState();
|
|
162
151
|
const [searchOpen, setSearchOpen] = useState(false);
|
|
163
152
|
const [searchQuery, setSearchQuery] = useState('');
|
|
153
|
+
const [authHovered, setAuthHovered] = useState(false);
|
|
164
154
|
const searchRef = useRef(null);
|
|
165
155
|
const inputRef = useRef(null);
|
|
166
156
|
const navigation = composerData.navigation;
|
|
@@ -182,7 +172,6 @@ export default function ManifestTopBar({ manifest, variant = 'canvas', showPower
|
|
|
182
172
|
const handleLogout = useSessionLogout({
|
|
183
173
|
logoutRoute: logoutEndpoint,
|
|
184
174
|
redirectPath: logoutHref,
|
|
185
|
-
onRedirect: (path) => router.push(path),
|
|
186
175
|
});
|
|
187
176
|
useEffect(() => {
|
|
188
177
|
if (!searchOpen)
|
|
@@ -204,12 +193,13 @@ export default function ManifestTopBar({ manifest, variant = 'canvas', showPower
|
|
|
204
193
|
if (!showLogout)
|
|
205
194
|
return null;
|
|
206
195
|
if (hydrated && auth.isAuthenticated) {
|
|
207
|
-
|
|
196
|
+
const authLabel = authHovered ? 'logout' : formatDisplayName(auth.name || auth.user);
|
|
197
|
+
return (_jsx(AuthButton, { type: "button", onClick: handleLogout, onMouseEnter: () => setAuthHovered(true), onMouseLeave: () => setAuthHovered(false), onFocus: () => setAuthHovered(true), onBlur: () => setAuthHovered(false), "aria-label": authHovered ? 'logout' : authLabel, children: authLabel }));
|
|
208
198
|
}
|
|
209
199
|
if (pathname === logoutHref)
|
|
210
200
|
return null;
|
|
211
201
|
return _jsx(AuthLink, { href: loginHref, children: "Login" });
|
|
212
|
-
}, [auth.isAuthenticated, auth.name, auth.user, handleLogout, hydrated, loginHref, logoutHref, pathname, showLogout]);
|
|
202
|
+
}, [auth.isAuthenticated, auth.name, auth.user, authHovered, handleLogout, hydrated, loginHref, logoutHref, pathname, showLogout]);
|
|
213
203
|
const actions = (_jsxs(Actions, { "$variant": variant, children: [_jsx(NavLink, { href: introHref, "$active": isRouteActive(pathname, introHref), children: "Introduction" }), _jsx(NavLink, { href: composeHref, "$active": isRouteActive(pathname, composeHref), children: "Compose" }), authControl, searchEnabled ? (_jsx(SearchWrap, { ref: searchRef, children: _jsx(SearchControl, { "$expanded": searchOpen, onClick: !searchOpen ? () => setSearchOpen(true) : undefined, children: searchOpen ? (_jsxs(_Fragment, { children: [_jsx(SearchInput, { ref: inputRef, type: "text", placeholder: "Search...", value: searchQuery, onChange: (event) => setSearchQuery(event.target.value), onClick: (event) => event.stopPropagation(), onKeyDown: (event) => {
|
|
214
204
|
if (event.key === 'Escape') {
|
|
215
205
|
setSearchOpen(false);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MetricsPanelContent.d.ts","sourceRoot":"","sources":["../src/MetricsPanelContent.tsx"],"names":[],"mappings":"AAEA,UAAU,wBAAwB;IAChC,aAAa,EAAE;QAAE,QAAQ,EAAE;YAAE,CAAC,EAAE,MAAM,CAAC;YAAC,CAAC,EAAE,MAAM,CAAC;YAAC,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC;QAAC,gBAAgB,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAClG,eAAe,EAAE,MAAM,CAAC;IACxB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;CACpB;
|
|
1
|
+
{"version":3,"file":"MetricsPanelContent.d.ts","sourceRoot":"","sources":["../src/MetricsPanelContent.tsx"],"names":[],"mappings":"AAEA,UAAU,wBAAwB;IAChC,aAAa,EAAE;QAAE,QAAQ,EAAE;YAAE,CAAC,EAAE,MAAM,CAAC;YAAC,CAAC,EAAE,MAAM,CAAC;YAAC,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC;QAAC,gBAAgB,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAClG,eAAe,EAAE,MAAM,CAAC;IACxB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;CACpB;AAKD,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,EAC1C,aAAa,EACb,eAAe,EACf,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,cAAc,EACd,cAAc,EACd,YAAY,EACZ,UAAU,GACX,EAAE,wBAAwB,2CA4D1B"}
|
|
@@ -1,46 +1,41 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
title: 'social',
|
|
6
|
-
metrics: [
|
|
7
|
-
{ label: 'social activation index', value: '—' },
|
|
8
|
-
{ label: 'eyes-on-courtyard score', value: '—' },
|
|
9
|
-
{ label: 'dwell time potential', value: '—' },
|
|
10
|
-
{ label: 'access equity', value: '—' },
|
|
11
|
-
{ label: 'circulation clarity', value: '—' },
|
|
12
|
-
],
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
title: 'value',
|
|
16
|
-
metrics: [
|
|
17
|
-
{ label: 'net usable area', value: '— m²' },
|
|
18
|
-
{ label: 'efficiency ratio', value: '—' },
|
|
19
|
-
{ label: 'leasing potential', value: '—' },
|
|
20
|
-
{ label: 'operating cost proxy', value: '—' },
|
|
21
|
-
{ label: 'construction complexity', value: '—' },
|
|
22
|
-
],
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
title: 'architectural',
|
|
26
|
-
metrics: [
|
|
27
|
-
{ label: 'courtyard daylight factor', value: '—' },
|
|
28
|
-
{ label: 'perimeter efficiency', value: '—' },
|
|
29
|
-
{ label: 'facade porosity', value: '—' },
|
|
30
|
-
{ label: 'green coverage', value: '— %' },
|
|
31
|
-
{ label: 'acoustic buffer score', value: '—' },
|
|
32
|
-
],
|
|
33
|
-
},
|
|
34
|
-
];
|
|
3
|
+
const formatMeters = (value) => `${value.toFixed(2)} m`;
|
|
4
|
+
const formatDegrees = (value) => `${value.toFixed(1)}°`;
|
|
35
5
|
export default function MetricsPanelContent({ cameraMetrics, distanceToFloor, distanceToCeiling, distanceToNorth, distanceToSouth, distanceToEast, distanceToWest, compassAngle, pitchAngle, }) {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
6
|
+
const sections = [
|
|
7
|
+
{
|
|
8
|
+
title: 'camera',
|
|
9
|
+
metrics: [
|
|
10
|
+
{
|
|
11
|
+
label: 'height above floor',
|
|
12
|
+
value: cameraMetrics ? formatMeters(cameraMetrics.heightAboveFloor) : formatMeters(distanceToFloor),
|
|
13
|
+
},
|
|
14
|
+
{ label: 'compass angle', value: formatDegrees(compassAngle) },
|
|
15
|
+
{ label: 'pitch angle', value: formatDegrees(pitchAngle) },
|
|
16
|
+
],
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
title: 'clearances',
|
|
20
|
+
metrics: [
|
|
21
|
+
{ label: 'floor', value: formatMeters(distanceToFloor) },
|
|
22
|
+
{ label: 'ceiling', value: formatMeters(distanceToCeiling) },
|
|
23
|
+
{ label: 'north', value: formatMeters(distanceToNorth) },
|
|
24
|
+
{ label: 'south', value: formatMeters(distanceToSouth) },
|
|
25
|
+
{ label: 'east', value: formatMeters(distanceToEast) },
|
|
26
|
+
{ label: 'west', value: formatMeters(distanceToWest) },
|
|
27
|
+
],
|
|
28
|
+
},
|
|
29
|
+
cameraMetrics
|
|
30
|
+
? {
|
|
31
|
+
title: 'position',
|
|
32
|
+
metrics: [
|
|
33
|
+
{ label: 'x', value: formatMeters(cameraMetrics.position.x) },
|
|
34
|
+
{ label: 'y', value: formatMeters(cameraMetrics.position.y) },
|
|
35
|
+
{ label: 'z', value: formatMeters(cameraMetrics.position.z) },
|
|
36
|
+
],
|
|
37
|
+
}
|
|
38
|
+
: null,
|
|
39
|
+
].filter(Boolean);
|
|
40
|
+
return (_jsxs("div", { className: "space-y-5", children: [_jsxs("div", { className: "space-y-1", children: [_jsx("div", { className: "text-[16px] font-semibold tracking-[0.01em] viewer-ui-kit-text", children: "viewer metrics" }), _jsx("div", { className: "text-[10px] uppercase tracking-[0.18em] viewer-ui-kit-text-subtle", children: "live scene telemetry" })] }), _jsx("div", { className: "space-y-5 text-[12px]", children: sections.map((section) => (_jsxs("div", { className: "space-y-2", children: [_jsx("div", { className: "text-[10px] uppercase tracking-[0.18em] viewer-ui-kit-text-subtle", children: section.title }), section.metrics.map((metric) => (_jsxs("div", { className: "flex justify-between gap-4 border-b viewer-ui-kit-border-subtle pb-2 last:border-b-0 last:pb-0", children: [_jsx("span", { className: "viewer-ui-kit-text-muted", children: metric.label }), _jsx("span", { className: "font-mono viewer-ui-kit-text", children: metric.value })] }, metric.label)))] }, section.title))) })] }));
|
|
46
41
|
}
|
package/dist/ModeBar.js
CHANGED
|
@@ -64,13 +64,13 @@ const ToggleTextButton = styled.button `
|
|
|
64
64
|
font-size: 11px;
|
|
65
65
|
text-transform: uppercase;
|
|
66
66
|
letter-spacing: 0.06em;
|
|
67
|
-
color: var(--viewer-ui-color-text-muted, rgba(
|
|
67
|
+
color: var(--viewer-ui-color-text-muted, rgba(47, 74, 60, 0.75));
|
|
68
68
|
transition: color 0.16s ease;
|
|
69
69
|
cursor: pointer;
|
|
70
70
|
padding: 0;
|
|
71
71
|
|
|
72
72
|
&:hover {
|
|
73
|
-
color: var(--
|
|
73
|
+
color: var(--brand-primary, #318f4e);
|
|
74
74
|
}
|
|
75
75
|
`;
|
|
76
76
|
const LockedLabel = styled.span `
|
|
@@ -83,7 +83,7 @@ const LockedLabel = styled.span `
|
|
|
83
83
|
const CollapsedRoot = styled.div `
|
|
84
84
|
position: fixed;
|
|
85
85
|
left: 50%;
|
|
86
|
-
top:
|
|
86
|
+
top: 58px;
|
|
87
87
|
z-index: 70;
|
|
88
88
|
transform: translateX(-50%);
|
|
89
89
|
display: flex;
|
package/dist/PanelSkin.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PanelSkin.d.ts","sourceRoot":"","sources":["../src/PanelSkin.tsx"],"names":[],"mappings":"AAIA,eAAO,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"PanelSkin.d.ts","sourceRoot":"","sources":["../src/PanelSkin.tsx"],"names":[],"mappings":"AAIA,eAAO,MAAM,SAAS,2FA8kBrB,CAAC"}
|
package/dist/PanelSkin.js
CHANGED
|
@@ -26,11 +26,12 @@ export const PanelSkin = createGlobalStyle `
|
|
|
26
26
|
border: 1px solid var(--viewer-ui-color-panel-border);
|
|
27
27
|
background: transparent;
|
|
28
28
|
color: var(--viewer-ui-color-text-muted);
|
|
29
|
-
font-size:
|
|
29
|
+
font-size: 11px;
|
|
30
30
|
letter-spacing: 0.08em;
|
|
31
|
-
text-transform:
|
|
32
|
-
font-family: var(--viewer-ui-font-
|
|
33
|
-
|
|
31
|
+
text-transform: uppercase;
|
|
32
|
+
font-family: var(--viewer-ui-font-body);
|
|
33
|
+
font-weight: 600;
|
|
34
|
+
padding: 8px 14px;
|
|
34
35
|
cursor: pointer;
|
|
35
36
|
}
|
|
36
37
|
|
|
@@ -71,12 +72,12 @@ export const PanelSkin = createGlobalStyle `
|
|
|
71
72
|
}
|
|
72
73
|
|
|
73
74
|
.viewer-ui-panel-renderer .panel-section-header h3 {
|
|
74
|
-
font-size:
|
|
75
|
-
letter-spacing: 0.
|
|
76
|
-
text-transform:
|
|
75
|
+
font-size: 16px;
|
|
76
|
+
letter-spacing: 0.02em;
|
|
77
|
+
text-transform: none;
|
|
77
78
|
color: var(--viewer-ui-color-text-strong);
|
|
78
|
-
font-family: var(--viewer-ui-font-
|
|
79
|
-
font-weight:
|
|
79
|
+
font-family: var(--viewer-ui-font-body);
|
|
80
|
+
font-weight: 600;
|
|
80
81
|
}
|
|
81
82
|
|
|
82
83
|
.viewer-ui-panel-renderer--flat .panel-section-header h3 {
|
|
@@ -193,11 +194,12 @@ export const PanelSkin = createGlobalStyle `
|
|
|
193
194
|
border: 1px solid var(--viewer-ui-color-button-primary);
|
|
194
195
|
background: var(--viewer-ui-color-button-primary);
|
|
195
196
|
color: var(--viewer-ui-color-text-strong);
|
|
196
|
-
font-size:
|
|
197
|
+
font-size: 12px;
|
|
197
198
|
letter-spacing: 0.08em;
|
|
198
|
-
text-transform:
|
|
199
|
-
font-family: var(--viewer-ui-font-
|
|
200
|
-
|
|
199
|
+
text-transform: uppercase;
|
|
200
|
+
font-family: var(--viewer-ui-font-body);
|
|
201
|
+
font-weight: 600;
|
|
202
|
+
padding: 10px 14px;
|
|
201
203
|
cursor: pointer;
|
|
202
204
|
transition: all 0.15s ease;
|
|
203
205
|
}
|
package/dist/PanelTabs.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PanelTabs.d.ts","sourceRoot":"","sources":["../src/PanelTabs.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PanelTabs.d.ts","sourceRoot":"","sources":["../src/PanelTabs.tsx"],"names":[],"mappings":"AA+CA,MAAM,MAAM,QAAQ,GAAG;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,UAAU,cAAc;IACtB,IAAI,EAAE,QAAQ,EAAE,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AAED,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,cAAc,2CAU9E"}
|
package/dist/PanelTabs.js
CHANGED
|
@@ -3,29 +3,39 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
3
3
|
import styled from 'styled-components';
|
|
4
4
|
const TabRow = styled.div `
|
|
5
5
|
display: flex;
|
|
6
|
-
gap:
|
|
6
|
+
gap: 8px;
|
|
7
7
|
flex-wrap: nowrap;
|
|
8
8
|
overflow-x: auto;
|
|
9
|
-
padding-bottom:
|
|
10
|
-
border-bottom: 1px solid var(--brand-panel-border);
|
|
9
|
+
padding-bottom: 10px;
|
|
10
|
+
border-bottom: 1px solid var(--viewer-ui-color-panel-border, var(--brand-panel-border));
|
|
11
11
|
margin-bottom: 6px;
|
|
12
12
|
`;
|
|
13
13
|
const TabButton = styled.button `
|
|
14
14
|
border-radius: 999px;
|
|
15
|
-
padding: 8px
|
|
16
|
-
font-size:
|
|
17
|
-
font-weight: ${(props) => (props.$active ?
|
|
18
|
-
text-transform:
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
15
|
+
padding: 8px 14px;
|
|
16
|
+
font-size: 11px;
|
|
17
|
+
font-weight: ${(props) => (props.$active ? 600 : 500)};
|
|
18
|
+
text-transform: uppercase;
|
|
19
|
+
letter-spacing: 0.08em;
|
|
20
|
+
border: 1px solid
|
|
21
|
+
${(props) => props.$active
|
|
22
|
+
? 'var(--viewer-ui-color-button-secondary, var(--brand-primary))'
|
|
23
|
+
: 'var(--viewer-ui-color-panel-border-subtle, var(--brand-panel-border))'};
|
|
24
|
+
background: ${(props) => props.$active
|
|
25
|
+
? 'var(--viewer-ui-color-button-secondary, var(--brand-primary))'
|
|
26
|
+
: 'var(--viewer-ui-color-tab-bg, transparent)'};
|
|
27
|
+
color: ${(props) => props.$active
|
|
28
|
+
? 'var(--viewer-ui-color-text-strong, #ffffff)'
|
|
29
|
+
: 'var(--viewer-ui-color-text-muted, var(--brand-text-secondary))'};
|
|
22
30
|
cursor: pointer;
|
|
23
|
-
transition: background 0.
|
|
31
|
+
transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
|
|
24
32
|
|
|
25
33
|
&:hover {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
34
|
+
border-color: var(--viewer-ui-color-button-secondary, var(--brand-primary));
|
|
35
|
+
background: ${(props) => props.$active
|
|
36
|
+
? 'var(--viewer-ui-color-button-secondary, var(--brand-primary))'
|
|
37
|
+
: 'var(--viewer-ui-color-tab-bg-hover, rgba(47, 74, 60, 0.08))'};
|
|
38
|
+
color: var(--viewer-ui-color-text-strong, var(--brand-text-primary));
|
|
29
39
|
}
|
|
30
40
|
`;
|
|
31
41
|
export default function PanelTabs({ tabs, activeTab, onChange }) {
|