@shellui/core 0.6.2 → 0.7.0-alpha.10
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/package.json +2 -2
- package/schemas/shellui.config.schema.json +147 -70
- package/src/app.tsx +2 -0
- package/src/components/ContentView.tsx +21 -30
- package/src/components/iframeUrlSafety.spec.ts +67 -0
- package/src/components/iframeUrlSafety.ts +50 -0
- package/src/components/ui/sidebar.tsx +11 -5
- package/src/features/admin/AdminView.tsx +9 -6
- package/src/features/auth/AuthProvider.tsx +49 -5
- package/src/features/auth/appBackend/AppBackendSessionHost.tsx +58 -0
- package/src/features/auth/appBackend/appBackendSessions.spec.ts +329 -0
- package/src/features/auth/appBackend/appBackendSessions.ts +443 -0
- package/src/features/auth/appBackend/childFrames.spec.ts +328 -0
- package/src/features/auth/appBackend/childFrames.ts +180 -0
- package/src/features/auth/appBackend/configSchema.spec.ts +41 -0
- package/src/features/auth/appBackend/frameAuth.ts +204 -0
- package/src/features/auth/appBackend/identity.spec.ts +201 -0
- package/src/features/auth/appBackend/identity.ts +173 -0
- package/src/features/auth/appBackend/silentSignIn.spec.ts +225 -0
- package/src/features/auth/appBackend/silentSignIn.ts +254 -0
- package/src/features/auth/appBackend/tokenExchange.spec.ts +98 -0
- package/src/features/auth/appBackend/tokenExchange.ts +76 -0
- package/src/features/auth/backends/shellui.spec.ts +51 -19
- package/src/features/auth/backends/shellui.ts +20 -5
- package/src/features/auth/backends/types.ts +7 -2
- package/src/features/auth/components/LoginView.tsx +40 -18
- package/src/features/auth/components/OAuthCallbackView.tsx +33 -4
- package/src/features/auth/utils/authRequestError.ts +3 -0
- package/src/features/auth/utils/buildOAuthSessionRedirectTo.spec.ts +42 -1
- package/src/features/auth/utils/buildOAuthSessionRedirectTo.ts +23 -0
- package/src/features/auth/utils/canRestoreStoredSession.spec.ts +29 -0
- package/src/features/auth/utils/canRestoreStoredSession.ts +12 -0
- package/src/features/auth/utils/index.ts +16 -1
- package/src/features/auth/utils/loginCancelTarget.spec.ts +73 -0
- package/src/features/auth/utils/loginCancelTarget.ts +45 -0
- package/src/features/auth/utils/loginPanelFrame.spec.ts +24 -0
- package/src/features/auth/utils/loginPanelFrame.ts +14 -0
- package/src/features/auth/utils/resolveSdkLoginRedirectPath.spec.ts +41 -0
- package/src/features/auth/utils/resolveSdkLoginRedirectPath.ts +31 -0
- package/src/features/auth/utils/webPkce.spec.ts +119 -0
- package/src/features/auth/utils/webPkce.ts +169 -0
- package/src/features/chromeActions/computeActionInsets.ts +7 -4
- package/src/features/config/types.ts +70 -3
- package/src/features/layouts/appbar/AppBarLayout.tsx +63 -30
- package/src/features/layouts/chrome/CollapsedDesktopTitlebar.tsx +12 -23
- package/src/features/layouts/chrome/ContentDragOverlay.tsx +5 -6
- package/src/features/layouts/chrome/DesktopChrome.tsx +37 -0
- package/src/features/layouts/chrome/DesktopHistoryButtons.tsx +15 -4
- package/src/features/layouts/chrome/MacStrip.tsx +33 -0
- package/src/features/layouts/chrome/constants.ts +33 -8
- package/src/features/layouts/chrome/index.ts +8 -0
- package/src/features/layouts/chrome/stripDragMap.ts +35 -0
- package/src/features/layouts/chrome/stripNoDrag.spec.tsx +103 -0
- package/src/features/layouts/chrome/useScrollHideChrome.ts +3 -8
- package/src/features/layouts/filterNavigationForAuthState.spec.ts +5 -3
- package/src/features/layouts/floating/FloatingBottomDock.tsx +199 -20
- package/src/features/layouts/floating/FloatingLayout.tsx +13 -8
- package/src/features/layouts/floating/FloatingSidebar.tsx +144 -70
- package/src/features/layouts/floating/computeFloatingInsets.ts +22 -4
- package/src/features/layouts/floating/useFloatingChrome.ts +3 -1
- package/src/features/layouts/floating/useSoftKeyboard.spec.ts +39 -0
- package/src/features/layouts/floating/useSoftKeyboard.ts +82 -0
- package/src/features/layouts/fullscreen/FullscreenLayout.tsx +38 -10
- package/src/features/layouts/sidebar/NavigationContent.tsx +14 -6
- package/src/features/layouts/sidebar/SidebarIcons.tsx +3 -9
- package/src/features/layouts/sidebar/SidebarInner.tsx +50 -39
- package/src/features/layouts/sidebar/SidebarLayout.tsx +8 -11
- package/src/features/layouts/utils.ts +4 -3
- package/src/features/layouts/windows/DesktopDots.tsx +76 -0
- package/src/features/layouts/windows/WindowsLayout.tsx +184 -125
- package/src/features/layouts/windows/deskDots.spec.ts +52 -0
- package/src/features/layouts/windows/deskDots.ts +314 -0
- package/src/features/settings/SettingsProvider.tsx +198 -29
- package/src/features/settings/utils/buildSettingsForPropagation.spec.ts +379 -4
- package/src/features/settings/utils/buildSettingsForPropagation.ts +65 -39
- package/src/features/theme/applyTheme.ts +8 -0
- package/src/features/theme/navContrast.spec.ts +49 -0
- package/src/features/theme/navContrast.ts +108 -0
- package/src/features/transfers/transferQueue.spec.ts +6 -2
- package/src/i18n/translations/en/common.json +27 -0
- package/src/i18n/translations/fr/common.json +27 -0
- package/src/index.css +935 -46
- package/src/index.ts +2 -0
- package/src/routes/hooks/useNavigationItems.ts +14 -3
- package/src/routes/hooks/withShellSearch.spec.ts +13 -0
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { useTranslation } from 'react-i18next';
|
|
1
2
|
import type { NavigationItem, NavigationGroup, ThemeAsset } from '../../config/types';
|
|
2
3
|
import {
|
|
3
4
|
SidebarHeader,
|
|
@@ -9,13 +10,15 @@ import {
|
|
|
9
10
|
import { NavigationContent } from './NavigationContent';
|
|
10
11
|
import { LoginButton } from '../../auth/components/LoginButton';
|
|
11
12
|
import { cn } from '../../../lib/utils';
|
|
13
|
+
import { MacLightsSafeArea, MacStripSpacer } from '../chrome/MacStrip';
|
|
12
14
|
import { DesktopHistoryButtons } from '../chrome/DesktopHistoryButtons';
|
|
13
15
|
import { useIsTauriClient, useMacOverlayChrome, useMacTrafficLights } from '../chrome/runtime';
|
|
14
16
|
import {
|
|
15
17
|
DESKTOP_TITLEBAR_HEIGHT_PX,
|
|
16
18
|
DESKTOP_TITLEBAR_PAD_TOP_PX,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
+
MAC_LIGHTS_SAFE_PX,
|
|
20
|
+
SHELL_HEADER_HEIGHT_PX,
|
|
21
|
+
SHELL_HEADER_PAD_TOP_PX,
|
|
19
22
|
} from '../chrome/constants';
|
|
20
23
|
import { AppBrandIcon } from '../branding/AppBrandIcon';
|
|
21
24
|
|
|
@@ -36,6 +39,7 @@ export function SidebarInner({
|
|
|
36
39
|
/** Sidebar-inset: the column is padded, so the title row must break out to meet the lights. */
|
|
37
40
|
inset?: boolean;
|
|
38
41
|
}) {
|
|
42
|
+
const { t } = useTranslation();
|
|
39
43
|
const isTauriEnv = useIsTauriClient();
|
|
40
44
|
const overlay = useMacOverlayChrome();
|
|
41
45
|
const trafficLights = useMacTrafficLights();
|
|
@@ -46,9 +50,7 @@ export function SidebarInner({
|
|
|
46
50
|
const showOverlayHeader = overlay && !collapsed;
|
|
47
51
|
// Narrow Tauri window: sheet header must clear native traffic lights.
|
|
48
52
|
const mobileSheetHeader = isMobile && trafficLights;
|
|
49
|
-
const mobileTrafficInset = mobileSheetHeader
|
|
50
|
-
? MAC_TRAFFIC_LIGHTS_WIDTH_PX + MAC_TRAFFIC_LIGHTS_GAP_PX
|
|
51
|
-
: undefined;
|
|
53
|
+
const mobileTrafficInset = mobileSheetHeader ? MAC_LIGHTS_SAFE_PX : undefined;
|
|
52
54
|
// Keep trigger on the right whenever an icon is configured (even while collapsed),
|
|
53
55
|
// so it rides the sidebar width animation instead of jumping left.
|
|
54
56
|
const hasAppIcon = Boolean(appIcon);
|
|
@@ -59,7 +61,9 @@ export function SidebarInner({
|
|
|
59
61
|
title={title}
|
|
60
62
|
data-shellui-no-drag=""
|
|
61
63
|
className={cn(
|
|
62
|
-
'
|
|
64
|
+
'w-5 min-w-0 shrink-0 overflow-hidden transition-[width,opacity,margin] duration-200 ease-linear',
|
|
65
|
+
// macOS strip: the icon starts right at the 80px safe area edge.
|
|
66
|
+
showOverlayHeader ? 'ml-0' : 'ml-1',
|
|
63
67
|
// Sync with sidebar collapse; icon fades/shrinks while trigger stays put.
|
|
64
68
|
'group-data-[collapsible=icon]:pointer-events-none group-data-[collapsible=icon]:ml-0 group-data-[collapsible=icon]:w-0 group-data-[collapsible=icon]:opacity-0',
|
|
65
69
|
)}
|
|
@@ -88,13 +92,17 @@ export function SidebarInner({
|
|
|
88
92
|
inset && showOverlayHeader && '-mt-3 -ml-3 w-[calc(100%+1.5rem)]',
|
|
89
93
|
)}
|
|
90
94
|
style={{
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
paddingTop: DESKTOP_TITLEBAR_PAD_TOP_PX,
|
|
95
|
+
// macOS: the header is the 32px strip. Web, phones and caption bar hosts: 42px.
|
|
96
|
+
height: showOverlayHeader ? DESKTOP_TITLEBAR_HEIGHT_PX : SHELL_HEADER_HEIGHT_PX,
|
|
97
|
+
paddingTop: showOverlayHeader ? DESKTOP_TITLEBAR_PAD_TOP_PX : SHELL_HEADER_PAD_TOP_PX,
|
|
94
98
|
...(mobileSheetHeader ? { paddingLeft: mobileTrafficInset } : {}),
|
|
95
99
|
}}
|
|
96
100
|
{...(showOverlayHeader
|
|
97
|
-
? {
|
|
101
|
+
? {
|
|
102
|
+
'data-shellui-drag-region': '',
|
|
103
|
+
'data-tauri-drag-region': '',
|
|
104
|
+
'data-shellui-mac-strip': '',
|
|
105
|
+
}
|
|
98
106
|
: {})}
|
|
99
107
|
>
|
|
100
108
|
{showOverlayHeader ? (
|
|
@@ -103,37 +111,27 @@ export function SidebarInner({
|
|
|
103
111
|
data-shellui-drag-region=""
|
|
104
112
|
data-tauri-drag-region=""
|
|
105
113
|
>
|
|
106
|
-
{
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
style={{ width: MAC_TRAFFIC_LIGHTS_WIDTH_PX }}
|
|
110
|
-
aria-hidden
|
|
111
|
-
/>
|
|
112
|
-
) : null}
|
|
113
|
-
<div
|
|
114
|
-
className="flex h-full min-w-0 flex-1 items-center gap-1"
|
|
115
|
-
style={{
|
|
116
|
-
paddingLeft: trafficLights ? MAC_TRAFFIC_LIGHTS_GAP_PX : 8,
|
|
117
|
-
}}
|
|
118
|
-
>
|
|
114
|
+
{/* 80px drag-only safe area next to the lights (12px in native fullscreen). */}
|
|
115
|
+
<MacLightsSafeArea />
|
|
116
|
+
<div className="flex h-full min-w-0 flex-1 items-center gap-1">
|
|
119
117
|
{hasAppIcon ? brandIcon : null}
|
|
120
118
|
{!hasAppIcon ? (
|
|
121
119
|
<SidebarTrigger
|
|
122
120
|
data-shellui-no-drag=""
|
|
123
|
-
className="size-
|
|
121
|
+
className="size-6 shrink-0 touch-manipulation"
|
|
122
|
+
/>
|
|
123
|
+
) : null}
|
|
124
|
+
<MacStripSpacer className="min-w-[8px]" />
|
|
125
|
+
{isTauriEnv ? (
|
|
126
|
+
<DesktopHistoryButtons
|
|
127
|
+
strip
|
|
128
|
+
className="self-center"
|
|
124
129
|
/>
|
|
125
130
|
) : null}
|
|
126
|
-
<div
|
|
127
|
-
aria-hidden
|
|
128
|
-
data-shellui-drag-region=""
|
|
129
|
-
data-tauri-drag-region=""
|
|
130
|
-
className="min-h-full min-w-[8px] flex-1 self-stretch"
|
|
131
|
-
/>
|
|
132
|
-
{isTauriEnv ? <DesktopHistoryButtons className="self-center" /> : null}
|
|
133
131
|
{hasAppIcon ? (
|
|
134
132
|
<SidebarTrigger
|
|
135
133
|
data-shellui-no-drag=""
|
|
136
|
-
className="size-
|
|
134
|
+
className="size-6 shrink-0 touch-manipulation"
|
|
137
135
|
/>
|
|
138
136
|
) : null}
|
|
139
137
|
{hasAppIcon ? trailingInset : null}
|
|
@@ -153,15 +151,28 @@ export function SidebarInner({
|
|
|
153
151
|
</div>
|
|
154
152
|
)}
|
|
155
153
|
</SidebarHeader>
|
|
156
|
-
<SidebarContent className="gap-1">
|
|
157
|
-
<
|
|
154
|
+
<SidebarContent className="shellui-nav gap-1">
|
|
155
|
+
<nav
|
|
156
|
+
aria-label={t('shellChrome.mainNav')}
|
|
157
|
+
className="flex min-w-0 flex-col gap-1"
|
|
158
|
+
>
|
|
159
|
+
<NavigationContent navigation={startNav} />
|
|
160
|
+
</nav>
|
|
158
161
|
</SidebarContent>
|
|
159
|
-
<SidebarFooter
|
|
162
|
+
<SidebarFooter
|
|
163
|
+
data-shellui-nav-footer=""
|
|
164
|
+
className="shellui-nav gap-0 border-t border-sidebar-border px-0 pt-0 pb-[max(0.5rem,var(--shellui-safe-area-bottom))]"
|
|
165
|
+
>
|
|
160
166
|
{(endItems.length > 0 || showAuthButton) && (
|
|
161
|
-
<
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
167
|
+
<nav
|
|
168
|
+
aria-label={t('shellChrome.accountNav')}
|
|
169
|
+
className="flex min-w-0 flex-col"
|
|
170
|
+
>
|
|
171
|
+
<NavigationContent
|
|
172
|
+
navigation={endItems}
|
|
173
|
+
trailing={showAuthButton ? <LoginButton variant="sidebar" /> : undefined}
|
|
174
|
+
/>
|
|
175
|
+
</nav>
|
|
165
176
|
)}
|
|
166
177
|
</SidebarFooter>
|
|
167
178
|
</>
|
|
@@ -37,10 +37,9 @@ import { useScrollHideChrome } from '../chrome/useScrollHideChrome';
|
|
|
37
37
|
import { InsetMobileRadiusOverlay } from '../chrome/InsetMobileRadiusOverlay';
|
|
38
38
|
import { useIsTauriClient, useMacOverlayChrome, useMacTrafficLights } from '../chrome/runtime';
|
|
39
39
|
import {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
DESKTOP_TITLEBAR_PAD_TOP_PX,
|
|
40
|
+
MAC_LIGHTS_SAFE_PX,
|
|
41
|
+
SHELL_HEADER_HEIGHT_PX,
|
|
42
|
+
SHELL_HEADER_PAD_TOP_PX,
|
|
44
43
|
} from '../chrome/constants';
|
|
45
44
|
import { WindowTitleBarActions } from '../../chromeActions';
|
|
46
45
|
import { cn } from '../../../lib/utils';
|
|
@@ -100,9 +99,7 @@ const SidebarLayoutContent = ({
|
|
|
100
99
|
const isMobile = useIsMobile();
|
|
101
100
|
const isTauriEnv = useIsTauriClient();
|
|
102
101
|
const trafficLights = useMacTrafficLights();
|
|
103
|
-
const mobileTrafficInset = trafficLights
|
|
104
|
-
? MAC_TRAFFIC_LIGHTS_WIDTH_PX + MAC_TRAFFIC_LIGHTS_GAP_PX
|
|
105
|
-
: undefined;
|
|
102
|
+
const mobileTrafficInset = trafficLights ? MAC_LIGHTS_SAFE_PX : undefined;
|
|
106
103
|
// Nested shell-in-iframe must not repeat the root safe-area top band.
|
|
107
104
|
const showSafeAreaTopbar = isShellUiRootWindow();
|
|
108
105
|
const scrollHideLayout = variant === 'inset' ? 'sidebar-inset' : 'sidebar';
|
|
@@ -243,11 +240,11 @@ const SidebarLayoutContent = ({
|
|
|
243
240
|
)}
|
|
244
241
|
style={{
|
|
245
242
|
paddingTop: showSafeAreaTopbar
|
|
246
|
-
? `calc(var(--shellui-safe-area-top) + ${
|
|
247
|
-
:
|
|
243
|
+
? `calc(var(--shellui-safe-area-top) + ${SHELL_HEADER_PAD_TOP_PX}px)`
|
|
244
|
+
: SHELL_HEADER_PAD_TOP_PX,
|
|
248
245
|
height: showSafeAreaTopbar
|
|
249
|
-
? `calc(${
|
|
250
|
-
:
|
|
246
|
+
? `calc(${SHELL_HEADER_HEIGHT_PX}px + var(--shellui-safe-area-top))`
|
|
247
|
+
: SHELL_HEADER_HEIGHT_PX,
|
|
251
248
|
...(mobileTrafficInset !== undefined ? { paddingLeft: mobileTrafficInset } : {}),
|
|
252
249
|
}}
|
|
253
250
|
{...(trafficLights
|
|
@@ -227,7 +227,8 @@ export function hasLoginNavigationItem(navigation: (NavigationItem | NavigationG
|
|
|
227
227
|
* Hide login navigation entries only when authenticated, so custom login entries
|
|
228
228
|
* can still be used while signed out (e.g. open login in modal/drawer).
|
|
229
229
|
* While the initial session restore runs (`isAuthLoading`), login entries are hidden too:
|
|
230
|
-
* the account skeleton takes their place until the auth state is known.
|
|
230
|
+
* the account skeleton takes their place until the auth state is known. Logged-in only entries
|
|
231
|
+
* stay visible during the restore so the navigation does not pop in after a reload.
|
|
231
232
|
*/
|
|
232
233
|
export function filterNavigationForAuthState(
|
|
233
234
|
navigation: (NavigationItem | NavigationGroup)[],
|
|
@@ -242,7 +243,7 @@ export function filterNavigationForAuthState(
|
|
|
242
243
|
if ('title' in item && 'items' in item) {
|
|
243
244
|
const group = item as NavigationGroup;
|
|
244
245
|
const visibleItems = group.items.filter((navItem) => {
|
|
245
|
-
if (navItem.hideWhenLoggedOut && !isAuthenticated) return false;
|
|
246
|
+
if (navItem.hideWhenLoggedOut && !isAuthenticated && !isAuthLoading) return false;
|
|
246
247
|
if (navItem.requiresDevMode && !isDevModeEnabled) return false;
|
|
247
248
|
if (hideLoginEntries && isLoginNavigationUrl(navItem.url)) return false;
|
|
248
249
|
return true;
|
|
@@ -251,7 +252,7 @@ export function filterNavigationForAuthState(
|
|
|
251
252
|
return { ...group, items: visibleItems };
|
|
252
253
|
}
|
|
253
254
|
const navItem = item as NavigationItem;
|
|
254
|
-
if (navItem.hideWhenLoggedOut && !isAuthenticated) return null;
|
|
255
|
+
if (navItem.hideWhenLoggedOut && !isAuthenticated && !isAuthLoading) return null;
|
|
255
256
|
if (navItem.requiresDevMode && !isDevModeEnabled) return null;
|
|
256
257
|
if (hideLoginEntries && isLoginNavigationUrl(navItem.url)) return null;
|
|
257
258
|
return item;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { useEffect, useRef } from 'react';
|
|
2
|
+
import { mountDeskDots, type DeskDotsHandle } from './deskDots';
|
|
3
|
+
|
|
4
|
+
/** Window attributes the field watches to pause itself. */
|
|
5
|
+
const WATCHED_ATTRS = ['data-maximized', 'data-focused', 'data-interacting'];
|
|
6
|
+
|
|
7
|
+
/** True when a focused window fills the desktop or any window is dragged or resized. */
|
|
8
|
+
export function isDesktopCovered(root: ParentNode): boolean {
|
|
9
|
+
return Boolean(
|
|
10
|
+
root.querySelector(
|
|
11
|
+
'[data-shellui-window][data-focused="true"][data-maximized="true"], [data-shellui-window][data-interacting="true"]',
|
|
12
|
+
),
|
|
13
|
+
);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Calm dot field behind the windows. Canvas while motion is allowed; a static CSS
|
|
18
|
+
* grid (`[data-shellui-desk-dots]::before`) under `prefers-reduced-motion`.
|
|
19
|
+
* Pauses when the tab is hidden, while the desktop is covered, and during drags.
|
|
20
|
+
*/
|
|
21
|
+
export function DesktopDots({ watchRoot }: { watchRoot: React.RefObject<HTMLElement | null> }) {
|
|
22
|
+
const hostRef = useRef<HTMLDivElement>(null);
|
|
23
|
+
|
|
24
|
+
useEffect(() => {
|
|
25
|
+
const host = hostRef.current;
|
|
26
|
+
if (!host || typeof window === 'undefined') return;
|
|
27
|
+
const reduce = window.matchMedia?.('(prefers-reduced-motion: reduce)');
|
|
28
|
+
let dots: DeskDotsHandle | null = null;
|
|
29
|
+
let observer: MutationObserver | null = null;
|
|
30
|
+
|
|
31
|
+
const syncPause = () => {
|
|
32
|
+
const root = watchRoot.current;
|
|
33
|
+
dots?.pause(root ? isDesktopCovered(root) : false);
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
const start = () => {
|
|
37
|
+
if (dots || reduce?.matches) return;
|
|
38
|
+
dots = mountDeskDots(host);
|
|
39
|
+
const root = watchRoot.current;
|
|
40
|
+
if (root) {
|
|
41
|
+
observer = new MutationObserver(syncPause);
|
|
42
|
+
observer.observe(root, {
|
|
43
|
+
subtree: true,
|
|
44
|
+
childList: true,
|
|
45
|
+
attributes: true,
|
|
46
|
+
attributeFilter: WATCHED_ATTRS,
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
syncPause();
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
const stop = () => {
|
|
53
|
+
observer?.disconnect();
|
|
54
|
+
observer = null;
|
|
55
|
+
dots?.destroy();
|
|
56
|
+
dots = null;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
const onReduceChange = () => (reduce?.matches ? stop() : start());
|
|
60
|
+
reduce?.addEventListener?.('change', onReduceChange);
|
|
61
|
+
start();
|
|
62
|
+
return () => {
|
|
63
|
+
reduce?.removeEventListener?.('change', onReduceChange);
|
|
64
|
+
stop();
|
|
65
|
+
};
|
|
66
|
+
}, [watchRoot]);
|
|
67
|
+
|
|
68
|
+
return (
|
|
69
|
+
<div
|
|
70
|
+
ref={hostRef}
|
|
71
|
+
aria-hidden
|
|
72
|
+
data-shellui-desk-dots=""
|
|
73
|
+
className="pointer-events-none absolute inset-0"
|
|
74
|
+
/>
|
|
75
|
+
);
|
|
76
|
+
}
|