@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.
@@ -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;CACtB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,EACxC,SAAS,EACT,QAAQ,EACR,SAAS,EACT,WAAW,EACX,IAAI,EACJ,KAAsB,EACtB,WAAoB,GACrB,EAAE,sBAAsB,2CAmExB"}
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.5 py-2.5 text-[12px] font-neusa font-black lowercase tracking-[0.06em] whitespace-nowrap transition border ${active?.id === tab.id
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;AAiKF,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,2CA4HrB"}
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"}
@@ -1,8 +1,8 @@
1
1
  'use client';
2
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
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, useRouter, useSearchParams } from 'next/navigation';
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
- return (_jsxs(AuthButton, { type: "button", onClick: handleLogout, children: [_jsx("span", { className: "auth-default", children: formatDisplayName(auth.name || auth.user) }), _jsx("span", { className: "auth-hover", children: "logout" })] }));
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;AAmCD,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,2CAgC1B"}
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 placeholderSections = [
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
- void cameraMetrics;
37
- void distanceToFloor;
38
- void distanceToCeiling;
39
- void distanceToNorth;
40
- void distanceToSouth;
41
- void distanceToEast;
42
- void distanceToWest;
43
- void compassAngle;
44
- void pitchAngle;
45
- return (_jsxs("div", { className: "space-y-6", children: [_jsxs("div", { className: "space-y-1", children: [_jsx("div", { className: "text-2xl font-black text-[#EFE9DE] lowercase font-neusa", children: "courtyard metrics" }), _jsx("div", { className: "text-[10px] uppercase tracking-[0.2em] text-[#EFE9DE]/50", children: "coming soon" })] }), _jsx("div", { className: "space-y-6 text-xs font-nunito", children: placeholderSections.map((section) => (_jsxs("div", { className: "space-y-2", children: [_jsx("div", { className: "text-[11px] uppercase tracking-[0.2em] text-[#EFE9DE]/50", children: section.title }), section.metrics.map((metric) => (_jsxs("div", { className: "flex justify-between gap-4", children: [_jsxs("span", { className: "text-[#EFE9DE]/70 lowercase", children: [metric.label, ":"] }), _jsx("span", { className: "text-[#EFE9DE]/80 font-mono", children: metric.value })] }, metric.label)))] }, section.title))) })] }));
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(239, 233, 222, 0.6));
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(--viewer-ui-color-text-strong, #efe9de);
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: 0;
86
+ top: 58px;
87
87
  z-index: 70;
88
88
  transform: translateX(-50%);
89
89
  display: flex;
@@ -1 +1 @@
1
- {"version":3,"file":"PanelSkin.d.ts","sourceRoot":"","sources":["../src/PanelSkin.tsx"],"names":[],"mappings":"AAIA,eAAO,MAAM,SAAS,2FA4kBrB,CAAC"}
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: 20px;
29
+ font-size: 11px;
30
30
  letter-spacing: 0.08em;
31
- text-transform: lowercase;
32
- font-family: var(--viewer-ui-font-display);
33
- padding: 6px 12px;
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: 20px;
75
- letter-spacing: 0.04em;
76
- text-transform: lowercase;
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-display);
79
- font-weight: 700;
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: 20px;
197
+ font-size: 12px;
197
198
  letter-spacing: 0.08em;
198
- text-transform: lowercase;
199
- font-family: var(--viewer-ui-font-display);
200
- padding: 10px 16px;
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
  }
@@ -1 +1 @@
1
- {"version":3,"file":"PanelTabs.d.ts","sourceRoot":"","sources":["../src/PanelTabs.tsx"],"names":[],"mappings":"AAiCA,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"}
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: 12px;
6
+ gap: 8px;
7
7
  flex-wrap: nowrap;
8
8
  overflow-x: auto;
9
- padding-bottom: 12px;
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 18px;
16
- font-size: 14px;
17
- font-weight: ${(props) => (props.$active ? 500 : 400)};
18
- text-transform: capitalize;
19
- border: none;
20
- background: ${(props) => (props.$active ? 'var(--brand-primary)' : 'rgba(49, 143, 78, 0.12)')};
21
- color: ${(props) => (props.$active ? '#ffffff' : 'rgba(49, 143, 78, 0.85)')};
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.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
31
+ transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
24
32
 
25
33
  &:hover {
26
- background: ${(props) => (props.$active ? 'var(--brand-primary)' : 'rgba(49, 143, 78, 0.2)')};
27
- color: ${(props) => (props.$active ? '#ffffff' : 'rgba(49, 143, 78, 1)')};
28
- transform: translateY(-1px);
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 }) {