@kolkrabbi/kol-framework 0.52.0 → 0.53.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kolkrabbi/kol-framework",
3
- "version": "0.52.0",
3
+ "version": "0.53.0",
4
4
  "description": "Site shell and page layout",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -22,7 +22,7 @@
22
22
  "react-router-dom": "^6.0.0 || ^7.0.0"
23
23
  },
24
24
  "devDependencies": {
25
- "@kolkrabbi/kol-component": "^0.283.0",
25
+ "@kolkrabbi/kol-component": "^0.284.0",
26
26
  "@kolkrabbi/kol-icons": "^0.41.0"
27
27
  },
28
28
  "files": [
package/src/loaderApp.js CHANGED
@@ -2,13 +2,18 @@
2
2
  * hideLoaderApp — the app loader's other half (`loaderApp()` in `@kolkrabbi/kol-framework/vite` writes it into
3
3
  * index.html). Call it once React has committed: two frames later the loader fades (240 ms, none under reduced
4
4
  * motion — the CSS drops the transition) and leaves the DOM. Safe to call when there is no loader.
5
+ *
6
+ * `minMs` (default 600, LoaderAppMinimumTime — kol-monitor, user ruling 2026-10-22) holds the loader at least
7
+ * that long from navigation start, which is when the static loader first paints: a fast load flashed the mark
8
+ * for a blink, a slow one waits nothing extra. Reduced motion drops the fade, never the minimum. `minMs: 0` is
9
+ * the old behaviour.
5
10
  */
6
- export function hideLoaderApp() {
11
+ export function hideLoaderApp({ minMs = 600 } = {}) {
7
12
  if (typeof document === 'undefined') return
8
13
  const el = document.getElementById('kol-loader-app')
9
14
  if (!el) return
10
- requestAnimationFrame(() => requestAnimationFrame(() => {
15
+ setTimeout(() => requestAnimationFrame(() => requestAnimationFrame(() => {
11
16
  el.classList.add('is-done')
12
17
  setTimeout(() => { el.remove(); document.getElementById('kol-loader-app-css')?.remove() }, 300)
13
- }))
18
+ })), Math.max(0, minMs - performance.now()))
14
19
  }
package/src/vite.js CHANGED
@@ -34,7 +34,7 @@ export function devFavicon({ label = 'K', ground = '#7C5CFF', ink = '#FFFFFF' }
34
34
  * owned in DS and consumed by the fxr monitor and mirror? with custom graphic input as prop?"*). The app's mark
35
35
  * centred on the theme's ground, pulsing while the bundle downloads. It has to be static HTML in `index.html` —
36
36
  * a React component would only appear after the wait it covers — so this plugin writes it there: fxr's loader,
37
- * once, with the graphic as an option. Call `hideLoaderApp()` (kol-framework) after the first commit.
37
+ * once, with the graphic as an option. Call `hideLoaderApp()` (kol-framework) after the first commit — it holds the loader 600 ms from navigation start (`minMs`).
38
38
  *
39
39
  * Ground and ink follow the stored `data-theme`, else the system (run `THEME_BOOT_SCRIPT` before it, as every
40
40
  * KOL app does). Reduced motion: no pulse, no fade.