@ossy/app 3.0.4 → 3.0.6

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.0.4",
3
+ "version": "3.0.6",
4
4
  "description": "",
5
5
  "source": "./src/index.js",
6
6
  "main": "./src/index.js",
@@ -49,23 +49,23 @@
49
49
  "@babel/eslint-parser": "^7.15.8",
50
50
  "@babel/preset-react": "^7.26.3",
51
51
  "@babel/register": "^7.25.9",
52
- "@ossy/authentication": "^3.0.4",
53
- "@ossy/design-system": "^3.0.4",
54
- "@ossy/locale": "^3.0.4",
55
- "@ossy/manifest": "^3.0.4",
56
- "@ossy/package-catalog": "^3.0.4",
57
- "@ossy/pages": "^3.0.4",
58
- "@ossy/platform": "^3.0.4",
59
- "@ossy/resources": "^3.0.4",
60
- "@ossy/router": "^3.0.4",
61
- "@ossy/router-react": "^3.0.4",
62
- "@ossy/schema": "^3.0.4",
63
- "@ossy/sdk": "^3.0.4",
64
- "@ossy/sdk-react": "^3.0.4",
65
- "@ossy/themes": "^3.0.4",
66
- "@ossy/workspaces": "^3.0.4",
52
+ "@ossy/authentication": "^3.0.6",
53
+ "@ossy/design-system": "^3.0.6",
54
+ "@ossy/locale": "^3.0.6",
55
+ "@ossy/manifest": "^3.0.6",
56
+ "@ossy/package-catalog": "^3.0.6",
57
+ "@ossy/pages": "^3.0.6",
58
+ "@ossy/platform": "^3.0.6",
59
+ "@ossy/resources": "^3.0.6",
60
+ "@ossy/router": "^3.0.6",
61
+ "@ossy/router-react": "^3.0.6",
62
+ "@ossy/schema": "^3.0.6",
63
+ "@ossy/sdk": "^3.0.6",
64
+ "@ossy/sdk-react": "^3.0.6",
65
+ "@ossy/themes": "^3.0.6",
66
+ "@ossy/workspaces": "^3.0.6",
67
67
  "@rollup/plugin-alias": "^6.0.0",
68
- "@rollup/plugin-babel": "^7.0.0",
68
+ "@rollup/plugin-babel": "^7.1.0",
69
69
  "@rollup/plugin-commonjs": "^29.0.0",
70
70
  "@rollup/plugin-inject": "^5.0.5",
71
71
  "@rollup/plugin-json": "^6.1.0",
@@ -97,5 +97,5 @@
97
97
  "README.md",
98
98
  "tsconfig.json"
99
99
  ],
100
- "gitHead": "831c9816bee67c5e53d0a4be4f6401975f23d72a"
100
+ "gitHead": "3e1c558069c7738dd751e429c69b10e52d247d8c"
101
101
  }
@@ -76,6 +76,10 @@ export default function DefaultLayout ({
76
76
  flexDirection: 'column',
77
77
  }}
78
78
  >
79
+ {/*
80
+ Document-scroll shell: main grows with page content; this region scrolls.
81
+ Tools that need a fixed viewport use `@ossy/app/layout/workspace` instead.
82
+ */}
79
83
  <main
80
84
  style={{
81
85
  flex: '1 0 auto',
@@ -0,0 +1,101 @@
1
+ import React from 'react'
2
+ import {
3
+ PageSection,
4
+ View,
5
+ Slot,
6
+ } from '@ossy/design-system'
7
+ import { useCompactShellLayout, shellSlotUnset } from '@ossy/app/shell'
8
+
9
+ export const metadata = { id: '@ossy/app/layout/workspace' }
10
+
11
+ export const slots = {
12
+ 'app:head': '@ossy/app/component/head/default',
13
+ 'app:header': '@ossy/app/component/header/default',
14
+ 'app:sidebar': '@ossy/app/component/sidebar/default',
15
+ }
16
+
17
+ /**
18
+ * Tool / workspace chrome: same sidebar + header as default, but the content
19
+ * region does not scroll. Pages fill the remaining height and own nested scroll.
20
+ */
21
+ export default function WorkspaceLayout ({
22
+ shellSlots = {},
23
+ maxWidth = 'xl',
24
+ }) {
25
+ const compact = useCompactShellLayout()
26
+
27
+ return (
28
+ <>
29
+ {!shellSlotUnset(shellSlots['app:head']) && <Slot view="app:head" />}
30
+ <View
31
+ surface="base"
32
+ data-ossy-app-shell
33
+ style={{
34
+ boxSizing: 'border-box',
35
+ height: '100%',
36
+ minWidth: 0,
37
+ padding: compact ? 0 : 'var(--space-m)',
38
+ }}
39
+ >
40
+ <PageSection
41
+ maxWidth={maxWidth}
42
+ style={{ height: '100%', minWidth: 0, width: '100%', boxSizing: 'border-box' }}
43
+ >
44
+ {!shellSlotUnset(shellSlots['app:system-messages']) && (
45
+ <Slot view="app:system-messages" />
46
+ )}
47
+
48
+ <View
49
+ layout="sidebar"
50
+ surface="primary"
51
+ roundness="m"
52
+ inset={compact ? 'none' : 's'}
53
+ gap="xs"
54
+ style={{
55
+ height: '100%',
56
+ minWidth: 0,
57
+ minHeight: 0,
58
+ ...(compact ? { gap: '4px' } : {}),
59
+ }}
60
+ >
61
+ {!shellSlotUnset(shellSlots['app:sidebar']) && (
62
+ <Slot region="sidebar-primary" view="app:sidebar" />
63
+ )}
64
+
65
+ {!shellSlotUnset(shellSlots['app:header']) && (
66
+ <Slot region="header" view="app:header" />
67
+ )}
68
+
69
+ <View
70
+ data-region="content"
71
+ style={{
72
+ flex: '1 1 0%',
73
+ minHeight: 0,
74
+ minWidth: 0,
75
+ overflow: 'hidden',
76
+ display: 'flex',
77
+ flexDirection: 'column',
78
+ }}
79
+ >
80
+ <main
81
+ style={{
82
+ flex: '1 1 0%',
83
+ minHeight: 0,
84
+ minWidth: 0,
85
+ width: '100%',
86
+ boxSizing: 'border-box',
87
+ display: 'flex',
88
+ flexDirection: 'column',
89
+ overflow: 'hidden',
90
+ position: 'relative',
91
+ }}
92
+ >
93
+ <Slot view="app:content" />
94
+ </main>
95
+ </View>
96
+ </View>
97
+ </PageSection>
98
+ </View>
99
+ </>
100
+ )
101
+ }