@ossy/app 3.7.1 → 3.8.0

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/cli/build.task.js CHANGED
@@ -29,6 +29,7 @@ import getPlatformFiles, {
29
29
  import { manifestPlugin } from './manifest-plugin.js'
30
30
  import { mergeAndEmitTranslations } from './merge-translations.task.js'
31
31
  import { emitSitemap } from './emit-sitemap.js'
32
+ import { VENDOR_BABEL_EXCLUDE } from './exclude-vendor-from-babel.js'
32
33
 
33
34
  export { PAGE_FILE_PATTERN, API_FILE_PATTERN, TASK_FILE_PATTERN, SCHEMA_FILE_PATTERN, COMPONENT_FILE_PATTERN, AGGREGATE_FILE_PATTERN, INTEGRATION_FILE_PATTERN, STARTUP_FILE_PATTERN, EMAIL_FILE_PATTERN, ACTION_FILE_PATTERN, E2E_FILE_PATTERN, FLOW_FILE_PATTERN, LAYOUT_FILE_PATTERN, TRANSLATIONS_FILE_PATTERN }
34
35
 
@@ -451,6 +452,7 @@ export async function build (cliArgs = []) {
451
452
  babel({
452
453
  babelHelpers: 'bundled',
453
454
  extensions: ['.js', '.jsx', '.ts', '.tsx'],
455
+ exclude: VENDOR_BABEL_EXCLUDE,
454
456
  presets: [['@babel/preset-react', { runtime: 'automatic' }]],
455
457
  }),
456
458
  manifestPlugin({
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Skip Babel for third-party `node_modules`. `@ossy/*` workspace packages still
3
+ * need the React preset (JSX). Vendor files such as `date-holidays/src/data.js`
4
+ * and `react-dom` are already valid JS — running them through Babel OOMs Jest
5
+ * and GitHub Actions (`exit 130`) because those files exceed Babel's 500KB
6
+ * generator limit.
7
+ *
8
+ * Nested vendor copies (`@ossy/calendar/node_modules/date-holidays`) are still
9
+ * excluded: the engine matches the last viable `node_modules/` segment.
10
+ */
11
+ export const VENDOR_BABEL_EXCLUDE = /node_modules[/\\](?!@ossy[/\\])/
12
+
13
+ /**
14
+ * @param {string} id Rollup module id
15
+ * @returns {boolean} true = do not transform
16
+ */
17
+ export function excludeVendorFromBabel (id) {
18
+ return typeof id === 'string' && VENDOR_BABEL_EXCLUDE.test(id)
19
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ossy/app",
3
- "version": "3.7.1",
3
+ "version": "3.8.0",
4
4
  "description": "",
5
5
  "source": "./src/index.js",
6
6
  "main": "./src/index.js",
@@ -50,20 +50,20 @@
50
50
  "@babel/preset-react": "^7.26.3",
51
51
  "@babel/register": "^7.25.9",
52
52
  "@ossy/authentication": "^3.5.1",
53
- "@ossy/design-system": "^3.6.1",
53
+ "@ossy/design-system": "^3.8.0",
54
54
  "@ossy/locale": "^3.4.0",
55
- "@ossy/manifest": "^3.6.1",
56
- "@ossy/package-catalog": "^3.6.0",
55
+ "@ossy/manifest": "^3.8.0",
56
+ "@ossy/package-catalog": "^3.8.0",
57
57
  "@ossy/pages": "^3.0.9",
58
- "@ossy/platform": "^3.7.1",
59
- "@ossy/resources": "^3.7.1",
58
+ "@ossy/platform": "^3.8.0",
59
+ "@ossy/resources": "^3.8.0",
60
60
  "@ossy/router": "^3.0.9",
61
61
  "@ossy/router-react": "^3.0.9",
62
- "@ossy/schema": "^3.6.1",
62
+ "@ossy/schema": "^3.8.0",
63
63
  "@ossy/sdk": "^3.5.0",
64
- "@ossy/sdk-react": "^3.0.9",
65
- "@ossy/themes": "^3.6.0",
66
- "@ossy/workspaces": "^3.7.1",
64
+ "@ossy/sdk-react": "^3.8.0",
65
+ "@ossy/themes": "^3.8.0",
66
+ "@ossy/workspaces": "^3.8.0",
67
67
  "@rollup/plugin-alias": "^6.0.0",
68
68
  "@rollup/plugin-babel": "^7.1.0",
69
69
  "@rollup/plugin-commonjs": "^29.0.0",
@@ -97,5 +97,5 @@
97
97
  "README.md",
98
98
  "tsconfig.json"
99
99
  ],
100
- "gitHead": "1ee220424da6b065034a7f52f52aa4a6ce7c88d5"
100
+ "gitHead": "14548dfc2019e7258e8c75db527acbf66fe829bd"
101
101
  }
@@ -15,6 +15,7 @@ const SIDEBAR_LOGO_BLOCK_MIN_PX = 44
15
15
  const RAIL_EDGE_HIT_LEFT_PX = 14
16
16
  const RAIL_EDGE_HIT_RIGHT_PX = 18
17
17
  const RAIL_COLLAPSE_DELAY_MS = 220
18
+ const RAIL_HOVER_OPEN_DELAY_MS = 1200
18
19
  const LOGO_FADE_MS = 180
19
20
  const RAIL_INNER_WIDTH_PX = 56
20
21
  const RAIL_EXPANDED_INNER_PX = 220
@@ -58,6 +59,7 @@ export default function DefaultSidebar ({
58
59
  }) {
59
60
  const [hoverRailExpanded, setHoverRailExpanded] = useState(false)
60
61
  const collapseTimerRef = useRef(null)
62
+ const hoverOpenTimerRef = useRef(null)
61
63
  const app = useApp()
62
64
  const pageId = app?.pageId
63
65
  const compactViewport = useCompactShellLayout()
@@ -146,20 +148,39 @@ export default function DefaultSidebar ({
146
148
  collapseTimerRef.current = null
147
149
  }, [])
148
150
 
151
+ const clearHoverOpenTimer = useCallback(() => {
152
+ if (hoverOpenTimerRef.current == null) return
153
+ clearTimeout(hoverOpenTimerRef.current)
154
+ hoverOpenTimerRef.current = null
155
+ }, [])
156
+
149
157
  const openHoverRail = useCallback(() => {
150
158
  clearCollapseTimer()
151
- setHoverRailExpanded(true)
152
- }, [clearCollapseTimer])
159
+ if (!desktopHoverRail) {
160
+ setHoverRailExpanded(true)
161
+ return
162
+ }
163
+ if (hoverRailExpanded) return
164
+ if (hoverOpenTimerRef.current != null) return
165
+ hoverOpenTimerRef.current = setTimeout(() => {
166
+ hoverOpenTimerRef.current = null
167
+ setHoverRailExpanded(true)
168
+ }, RAIL_HOVER_OPEN_DELAY_MS)
169
+ }, [clearCollapseTimer, desktopHoverRail, hoverRailExpanded])
153
170
 
154
171
  const closeHoverRailWithDelay = useCallback(() => {
172
+ clearHoverOpenTimer()
155
173
  clearCollapseTimer()
156
174
  collapseTimerRef.current = setTimeout(() => {
157
175
  setHoverRailExpanded(false)
158
176
  collapseTimerRef.current = null
159
177
  }, RAIL_COLLAPSE_DELAY_MS)
160
- }, [clearCollapseTimer])
178
+ }, [clearCollapseTimer, clearHoverOpenTimer])
161
179
 
162
- useEffect(() => () => clearCollapseTimer(), [clearCollapseTimer])
180
+ useEffect(() => () => {
181
+ clearCollapseTimer()
182
+ clearHoverOpenTimer()
183
+ }, [clearCollapseTimer, clearHoverOpenTimer])
163
184
 
164
185
  const logoFadeStyle = {
165
186
  transition: `opacity ${LOGO_FADE_MS}ms ease`,