@ossy/app 3.23.0 → 3.24.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ossy/app",
3
- "version": "3.23.0",
3
+ "version": "3.24.1",
4
4
  "description": "",
5
5
  "source": "./src/index.js",
6
6
  "main": "./src/index.js",
@@ -50,21 +50,21 @@
50
50
  "@babel/preset-react": "^7.26.3",
51
51
  "@babel/register": "^7.25.9",
52
52
  "@ossy/authentication": "^3.11.1",
53
- "@ossy/design-system": "^3.23.0",
53
+ "@ossy/design-system": "^3.24.0",
54
54
  "@ossy/locale": "^3.4.0",
55
- "@ossy/manifest": "^3.20.1",
55
+ "@ossy/manifest": "^3.24.0",
56
56
  "@ossy/package-catalog": "^3.20.1",
57
57
  "@ossy/pages": "^3.0.9",
58
- "@ossy/platform": "^3.23.0",
59
- "@ossy/resources": "^3.23.0",
58
+ "@ossy/platform": "^3.24.1",
59
+ "@ossy/resources": "^3.24.1",
60
60
  "@ossy/router": "^3.0.9",
61
61
  "@ossy/router-react": "^3.18.0",
62
- "@ossy/schema": "^3.20.1",
63
- "@ossy/sdk": "^3.20.1",
62
+ "@ossy/schema": "^3.24.0",
63
+ "@ossy/sdk": "^3.24.0",
64
64
  "@ossy/sdk-react": "^3.12.0",
65
65
  "@ossy/themes": "^3.22.0",
66
- "@ossy/users": "^3.20.1",
67
- "@ossy/workspaces": "^3.22.0",
66
+ "@ossy/users": "^3.24.1",
67
+ "@ossy/workspaces": "^3.24.1",
68
68
  "@rollup/plugin-alias": "^6.0.0",
69
69
  "@rollup/plugin-babel": "^7.1.0",
70
70
  "@rollup/plugin-commonjs": "^29.0.0",
@@ -98,5 +98,5 @@
98
98
  "README.md",
99
99
  "tsconfig.json"
100
100
  ],
101
- "gitHead": "fba601366c69184bbd82d990429d1a43152645c9"
101
+ "gitHead": "d0e7eda0397239d5e8a8cd5115d9c91959b4103f"
102
102
  }
@@ -48,7 +48,8 @@ export function shouldShowSidebarCollapseControl ({
48
48
  }
49
49
 
50
50
  /**
51
- * Square panel in the drawer; rounded rail when in-grid.
51
+ * Square panel in the drawer. In the page grid every corner is an inner
52
+ * corner, so the rail uses one radius.
52
53
  *
53
54
  * @param {unknown} presentation
54
55
  * @returns {0 | string}
@@ -56,5 +57,5 @@ export function shouldShowSidebarCollapseControl ({
56
57
  export function resolveSidebarBorderRadius (presentation) {
57
58
  return isDrawerPresentation(presentation)
58
59
  ? 0
59
- : 'var(--space-l) var(--space-s) var(--space-s) var(--space-l)'
60
+ : 'var(--space-s)'
60
61
  }
@@ -57,7 +57,7 @@ export default function DefaultLayout ({
57
57
  )}
58
58
 
59
59
  <View
60
- layout="sidebar"
60
+ layout="page"
61
61
  surface="primary"
62
62
  roundness="m"
63
63
  inset={compact ? 'none' : 's'}
@@ -1,5 +1,6 @@
1
1
  import React from 'react'
2
- import { AppHeader, View } from '@ossy/design-system'
2
+ import { AppHeader, Slot, View } from '@ossy/design-system'
3
+ import { useRouter } from '@ossy/router-react'
3
4
  import { useCompactShellLayout } from '../shell/useCompactShellLayout.js'
4
5
  import { HeaderAuthActions } from '../shell/HeaderAuthActions.jsx'
5
6
  import { LanguageSelect } from '../shell/LanguageSelect.jsx'
@@ -7,9 +8,28 @@ import { ThemeSelect } from '../shell/ThemeSelect.jsx'
7
8
 
8
9
  export const metadata = { id: '@ossy/app/component/header/default' }
9
10
 
10
- /** TL/TR/BR/BL — smallest corners except TR, which matches sidebar outer top-left (`--space-l`). */
11
+ /** Top bar spans the shell. Both top corners are the outer edge. */
11
12
  const HEADER_BORDER_RADIUS =
12
- 'var(--space-xs) var(--space-l) var(--space-xs) var(--space-xs)'
13
+ 'var(--space-l) var(--space-l) var(--space-xs) var(--space-xs)'
14
+
15
+ function HeaderLogo () {
16
+ const router = useRouter()
17
+ const href = router.getHref?.('@home') || '/'
18
+ return (
19
+ <a
20
+ href={href}
21
+ style={{
22
+ display: 'flex',
23
+ alignItems: 'center',
24
+ flexShrink: 0,
25
+ color: 'inherit',
26
+ textDecoration: 'none',
27
+ }}
28
+ >
29
+ <Slot view="@ossy/app/component/logo/logotype" />
30
+ </a>
31
+ )
32
+ }
13
33
 
14
34
  export default function DefaultHeader ({
15
35
  compact: compactProp,
@@ -31,6 +51,7 @@ export default function DefaultHeader ({
31
51
  ...style,
32
52
  }}
33
53
  {...rest}
54
+ near={<HeaderLogo />}
34
55
  far={(
35
56
  <View
36
57
  layout="row-wrap"
@@ -1,5 +1,5 @@
1
1
  import React, { useState, useMemo, useRef, useEffect, useCallback } from 'react'
2
- import { Button, View, Slot, useLocale } from '@ossy/design-system'
2
+ import { Button, View, useLocale } from '@ossy/design-system'
3
3
  import { useRouter } from '@ossy/router-react'
4
4
  import { useApp, buildSidebarNav, patchUserAppSettings, useCompactShellLayout, useShellWorkspace } from '@ossy/app/shell'
5
5
  import {
@@ -11,12 +11,10 @@ import {
11
11
 
12
12
  export const metadata = { id: '@ossy/app/component/sidebar/default' }
13
13
 
14
- const SIDEBAR_LOGO_BLOCK_MIN_PX = 44
15
14
  const RAIL_EDGE_HIT_LEFT_PX = 14
16
15
  const RAIL_EDGE_HIT_RIGHT_PX = 18
17
16
  const RAIL_COLLAPSE_DELAY_MS = 220
18
17
  const RAIL_HOVER_OPEN_DELAY_MS = 1200
19
- const LOGO_FADE_MS = 180
20
18
  const RAIL_INNER_WIDTH_PX = 56
21
19
  const RAIL_EXPANDED_INNER_PX = 220
22
20
 
@@ -182,40 +180,6 @@ export default function DefaultSidebar ({
182
180
  clearHoverOpenTimer()
183
181
  }, [clearCollapseTimer, clearHoverOpenTimer])
184
182
 
185
- const logoFadeStyle = {
186
- transition: `opacity ${LOGO_FADE_MS}ms ease`,
187
- }
188
-
189
- const renderLogo = () => {
190
- if (desktopHoverRail) {
191
- return (
192
- <div style={{ position: 'relative', height: 28, width: '100%', display: 'flex', justifyContent: 'center' }}>
193
- <div style={{ ...logoFadeStyle, opacity: hoverRailExpanded ? 0 : 1 }}>
194
- <Slot view="@ossy/app/component/logo/logomark" />
195
- </div>
196
- <div
197
- style={{
198
- position: 'absolute',
199
- inset: 0,
200
- display: 'flex',
201
- justifyContent: 'center',
202
- alignItems: 'center',
203
- ...logoFadeStyle,
204
- opacity: hoverRailExpanded ? 1 : 0,
205
- pointerEvents: 'none',
206
- }}
207
- >
208
- <Slot view="@ossy/app/component/logo/logotype" />
209
- </div>
210
- </div>
211
- )
212
- }
213
-
214
- return (
215
- <Slot view={showLabels ? '@ossy/app/component/logo/logotype' : '@ossy/app/component/logo/logomark'} />
216
- )
217
- }
218
-
219
183
  const renderButton = (item) => (
220
184
  <Button
221
185
  key={item.key ?? item.href}
@@ -255,19 +219,6 @@ export default function DefaultSidebar ({
255
219
  boxSizing: 'border-box',
256
220
  }}
257
221
  >
258
- <View
259
- layout="row"
260
- style={{
261
- justifyContent: 'center',
262
- alignItems: 'center',
263
- marginBottom: 'var(--space-m)',
264
- minHeight: SIDEBAR_LOGO_BLOCK_MIN_PX,
265
- flexShrink: 0,
266
- }}
267
- >
268
- {renderLogo()}
269
- </View>
270
-
271
222
  <View gap="s" style={{ flexGrow: 1, overflowY: 'auto', minHeight: 0 }} data-scroll>
272
223
  <View style={{ flexShrink: 0, height: 'var(--space-l)', minHeight: 'var(--space-l)' }} />
273
224
  {menuNear.map(renderButton)}
@@ -60,7 +60,7 @@ export default function WorkspaceLayout ({
60
60
  )}
61
61
 
62
62
  <View
63
- layout="sidebar"
63
+ layout="page"
64
64
  surface="primary"
65
65
  roundness="m"
66
66
  inset={compact ? 'none' : 's'}