@kolkrabbi/kol-framework 0.50.0 → 0.51.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 +2 -2
- package/src/vite.js +6 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kolkrabbi/kol-framework",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.51.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.
|
|
25
|
+
"@kolkrabbi/kol-component": "^0.267.0",
|
|
26
26
|
"@kolkrabbi/kol-icons": "^0.39.0"
|
|
27
27
|
},
|
|
28
28
|
"files": [
|
package/src/vite.js
CHANGED
|
@@ -8,16 +8,17 @@
|
|
|
8
8
|
* Each app picks its letters and ground once — the table lives in 16-app-anatomy.md § Dev favicon.
|
|
9
9
|
*
|
|
10
10
|
* @param {Object} [opts]
|
|
11
|
-
* @param {string} [opts.label='
|
|
11
|
+
* @param {string} [opts.label='K'] ONE letter (user 2026-10-18: *"dev favicon should only use letter like M for monitor"*) —
|
|
12
|
+
* a longer label is cut to its first letter
|
|
12
13
|
* @param {string} [opts.ground='#7C5CFF'] the tile's colour — unique per app
|
|
13
14
|
* @param {string} [opts.ink='#FFFFFF']
|
|
14
15
|
*/
|
|
15
|
-
export function devFavicon({ label = '
|
|
16
|
-
const text = String(label).slice(0,
|
|
17
|
-
const size =
|
|
16
|
+
export function devFavicon({ label = 'K', ground = '#7C5CFF', ink = '#FFFFFF' } = {}) {
|
|
17
|
+
const text = String(label).slice(0, 1).toUpperCase()
|
|
18
|
+
const size = 28
|
|
18
19
|
const svg = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><rect width="32" height="32" rx="6" fill="${ground}"/>`
|
|
19
20
|
+ `<text x="16" y="${(16 + size * 0.36).toFixed(1)}" text-anchor="middle" font-family="Arial Black, Arial, sans-serif" font-weight="900" font-size="${size}"`
|
|
20
|
-
+
|
|
21
|
+
+ ` fill="${ink}">${text}</text></svg>`
|
|
21
22
|
const link = `<link rel="icon" type="image/svg+xml" href="data:image/svg+xml,${encodeURIComponent(svg)}">`
|
|
22
23
|
return {
|
|
23
24
|
name: 'kol-dev-favicon',
|