@shellui/core 0.6.1 → 0.6.2
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/README.md +1 -1
- package/package.json +2 -2
- package/src/features/admin/AdminView.tsx +18 -4
- package/src/features/auth/AuthProvider.tsx +18 -1
- package/src/features/auth/utils/desktopSignIn.spec.ts +41 -0
- package/src/features/auth/utils/desktopSignIn.ts +38 -0
- package/src/features/chromeActions/ChromeActionsHost.tsx +7 -1
- package/src/features/chromeActions/computeActionInsets.ts +6 -0
- package/src/features/layouts/appbar/AppBarLayout.tsx +39 -9
- package/src/features/layouts/chrome/ContentDragOverlay.tsx +14 -7
- package/src/features/layouts/chrome/DesktopChrome.tsx +3 -1
- package/src/features/layouts/floating/FloatingLayout.tsx +4 -1
- package/src/features/layouts/floating/FloatingSidebar.tsx +84 -28
- package/src/features/layouts/floating/computeFloatingInsets.spec.ts +19 -0
- package/src/features/layouts/floating/computeFloatingInsets.ts +40 -8
- package/src/features/layouts/floating/layoutChromeStore.ts +13 -0
- package/src/features/layouts/floating/useFloatingChrome.ts +11 -5
- package/src/features/layouts/fullscreen/FullscreenLayout.tsx +3 -0
- package/src/features/layouts/sidebar/SidebarInner.tsx +5 -0
- package/src/features/layouts/sidebar/SidebarLayout.tsx +1 -0
- package/src/features/layouts/windows/WindowsLayout.tsx +106 -46
- package/src/features/security/trustedFrames.spec.ts +17 -1
- package/src/features/security/trustedFrames.ts +31 -9
- package/src/features/settings/SettingsProvider.tsx +3 -0
- package/src/features/settings/utils/buildSettingsForPropagation.ts +9 -2
- package/src/index.css +16 -1
- package/src/lib/z-index.ts +5 -0
|
@@ -213,6 +213,7 @@ export function SettingsProvider({ children }: { children: ReactNode }) {
|
|
|
213
213
|
includeAuthAccessToken,
|
|
214
214
|
accessToken,
|
|
215
215
|
includeLayoutChrome: isMainLayoutFrame(iframe),
|
|
216
|
+
frameUuid: uuid,
|
|
216
217
|
});
|
|
217
218
|
shellui.sendMessage({
|
|
218
219
|
type: 'SHELLUI_SETTINGS',
|
|
@@ -235,6 +236,7 @@ export function SettingsProvider({ children }: { children: ReactNode }) {
|
|
|
235
236
|
includeAuthAccessToken,
|
|
236
237
|
accessToken: accessTokenRef.current,
|
|
237
238
|
includeLayoutChrome: isMainLayoutFrame(iframe),
|
|
239
|
+
frameUuid: iframeUuid,
|
|
238
240
|
});
|
|
239
241
|
shellui.sendMessage({
|
|
240
242
|
type: 'SHELLUI_SETTINGS',
|
|
@@ -502,6 +504,7 @@ export function SettingsProvider({ children }: { children: ReactNode }) {
|
|
|
502
504
|
includeAuthAccessToken,
|
|
503
505
|
accessToken: accessTokenRef.current,
|
|
504
506
|
includeLayoutChrome: isMainLayoutFrame(frame),
|
|
507
|
+
frameUuid: firstHopIframeUuid,
|
|
505
508
|
},
|
|
506
509
|
);
|
|
507
510
|
|
|
@@ -4,7 +4,10 @@ import { flattenNavigationItems } from './flattenNavigationItems';
|
|
|
4
4
|
import { getAvailableThemesForSettings } from './getAvailableThemesForSettings';
|
|
5
5
|
import { getResolvedAppearanceForSettings } from './getResolvedAppearanceForSettings';
|
|
6
6
|
import { resolveLabel } from './resolveLabel';
|
|
7
|
-
import {
|
|
7
|
+
import {
|
|
8
|
+
getLayoutChromeForFrame,
|
|
9
|
+
getPublishedLayoutChrome,
|
|
10
|
+
} from '../../layouts/floating/layoutChromeStore';
|
|
8
11
|
|
|
9
12
|
/** Production email-service origin. No trailing slash. */
|
|
10
13
|
const DEFAULT_EMAIL_SERVICE_URL = 'https://email.shellui.com';
|
|
@@ -31,6 +34,8 @@ export const buildSettingsForPropagation = (
|
|
|
31
34
|
accessToken?: string | null;
|
|
32
35
|
/** When false, omit layoutChrome (modal / drawer frames). Default true. */
|
|
33
36
|
includeLayoutChrome?: boolean;
|
|
37
|
+
/** Merge this frame's action-bar insets into layoutChrome. */
|
|
38
|
+
frameUuid?: string;
|
|
34
39
|
},
|
|
35
40
|
): Settings => {
|
|
36
41
|
const appearance = getResolvedAppearanceForSettings(settings, config);
|
|
@@ -40,7 +45,9 @@ export const buildSettingsForPropagation = (
|
|
|
40
45
|
};
|
|
41
46
|
|
|
42
47
|
if (options?.includeLayoutChrome !== false) {
|
|
43
|
-
const layoutChrome =
|
|
48
|
+
const layoutChrome = options?.frameUuid
|
|
49
|
+
? getLayoutChromeForFrame(options.frameUuid)
|
|
50
|
+
: getPublishedLayoutChrome();
|
|
44
51
|
if (layoutChrome) {
|
|
45
52
|
result = { ...result, layoutChrome };
|
|
46
53
|
} else if ('layoutChrome' in result) {
|
package/src/index.css
CHANGED
|
@@ -169,6 +169,11 @@
|
|
|
169
169
|
border-radius: var(--shellui-floating-sidebar-radius);
|
|
170
170
|
}
|
|
171
171
|
|
|
172
|
+
/* Tauri floating sidebar is flush to the window, so the frame itself is square. */
|
|
173
|
+
.shellui-floating-sidebar-panel .shellui-floating-glass[data-shellui-tauri-flush] {
|
|
174
|
+
border-radius: 0;
|
|
175
|
+
}
|
|
176
|
+
|
|
172
177
|
.dark .shellui-floating-glass {
|
|
173
178
|
background:
|
|
174
179
|
linear-gradient(
|
|
@@ -1369,12 +1374,22 @@ html[data-shellui-collapsed-titlebar][data-shellui-safe-area-topbar]
|
|
|
1369
1374
|
}
|
|
1370
1375
|
|
|
1371
1376
|
html[data-shellui-collapsed-titlebar]
|
|
1372
|
-
[data-shellui-sidebar-layout]
|
|
1377
|
+
[data-shellui-sidebar-layout]:not([data-shellui-layout-variant='inset'])
|
|
1373
1378
|
> [data-slot='sidebar-wrapper']
|
|
1374
1379
|
> [data-slot='sidebar-inset'] {
|
|
1375
1380
|
padding-top: var(--shellui-titlebar-height, 42px);
|
|
1376
1381
|
}
|
|
1377
1382
|
|
|
1383
|
+
/* Inset card keeps its own radius: sit the frame under the titlebar instead of
|
|
1384
|
+
padding inside the rounded border (that left the top corners covered). */
|
|
1385
|
+
html[data-shellui-collapsed-titlebar]
|
|
1386
|
+
[data-shellui-layout-variant='inset']
|
|
1387
|
+
> [data-slot='sidebar-wrapper']
|
|
1388
|
+
> [data-slot='sidebar-inset'] {
|
|
1389
|
+
margin-top: var(--shellui-titlebar-height, 42px);
|
|
1390
|
+
padding-top: 0;
|
|
1391
|
+
}
|
|
1392
|
+
|
|
1378
1393
|
/* Root safe-area topbar: collapsed chrome sits below the status band. */
|
|
1379
1394
|
html[data-shellui-safe-area-topbar] [data-shellui-collapsed-titlebar] {
|
|
1380
1395
|
top: var(--shellui-safe-area-top);
|
package/src/lib/z-index.ts
CHANGED
|
@@ -35,6 +35,11 @@ export const Z_INDEX = {
|
|
|
35
35
|
WINDOWS_TASKBAR: 9000,
|
|
36
36
|
/** Base z-index for windows; each window gets base + order */
|
|
37
37
|
WINDOWS_WINDOW_BASE: 9001,
|
|
38
|
+
/**
|
|
39
|
+
* Tauri overlay titlebar in the windows layout. Above any window so a
|
|
40
|
+
* maximized title bar cannot slide under the drag strip, below modals.
|
|
41
|
+
*/
|
|
42
|
+
WINDOWS_TITLEBAR: 9500,
|
|
38
43
|
} as const;
|
|
39
44
|
|
|
40
45
|
export type ZIndexLayer = keyof typeof Z_INDEX;
|