@justai/core 0.25.0 → 0.26.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 +1 -1
- package/src/index.d.ts +7 -0
- package/src/index.js +13 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@justai/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.26.0",
|
|
4
4
|
"description": "The framework-free heart of the persona shell \u2014 the load-bearing behaviour (auth capture, reveal, ready) as plain strings, so Astro and Next inject the SAME logic instead of each re-writing it.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"repository": {
|
package/src/index.d.ts
CHANGED
|
@@ -136,5 +136,12 @@ export declare function toolbarMark(
|
|
|
136
136
|
* redrawn.
|
|
137
137
|
*/
|
|
138
138
|
fills?: number;
|
|
139
|
+
/**
|
|
140
|
+
* How many pixels of INK the surface wants, default 20 — the toolbar row's rule. The preroll
|
|
141
|
+
* asks for 300: the derivation is the same (take the tile's ground off, namespace the ids so two
|
|
142
|
+
* copies on one page do not fight over a gradient), only the measure differs, and a second copy
|
|
143
|
+
* of that logic under a second name is the O(N) debt this package exists to refuse.
|
|
144
|
+
*/
|
|
145
|
+
ink?: number;
|
|
139
146
|
},
|
|
140
147
|
): string;
|
package/src/index.js
CHANGED
|
@@ -1362,8 +1362,20 @@ export function toolbarMark(iconSvg, options) {
|
|
|
1362
1362
|
// Written as an inline style because the cut's `.tb-nav svg { width: 20px }` would beat a width
|
|
1363
1363
|
// ATTRIBUTE. Left out, the mark takes the row's default and reads small — which is what shipped for
|
|
1364
1364
|
// one deploy and is exactly how the fleet's ratios came to be measured.
|
|
1365
|
+
// queries: the mark in the preroll is tiny · ink option · use the derived mark somewhere else ·
|
|
1366
|
+
// toolbarMark size
|
|
1367
|
+
//
|
|
1368
|
+
// `ink` IS THE MEASURE, AND THE ROW IS ONLY ITS FIRST CUSTOMER. The derivation here — take the
|
|
1369
|
+
// ground off, namespace the ids so two copies on one page do not fight over a gradient — is what
|
|
1370
|
+
// ANY surface needs that wants the mark without its tile. The preroll wants exactly that at 300px
|
|
1371
|
+
// rather than 20, and the alternative was a second copy of the stripping logic under a second
|
|
1372
|
+
// name, which is the O(N) debt this package exists to refuse.
|
|
1373
|
+
//
|
|
1374
|
+
// So the number is a parameter and the default is the row's. The function keeps its name because
|
|
1375
|
+
// the row is still what it is for nine times in ten; that the name is now narrower than the job is
|
|
1376
|
+
// worth one line of honesty rather than a rename across sixteen repos.
|
|
1365
1377
|
if (o.fills > 0) {
|
|
1366
|
-
const px = (20 / o.fills).toFixed(2);
|
|
1378
|
+
const px = ((o.ink || 20) / o.fills).toFixed(2);
|
|
1367
1379
|
s = s.replace(/<svg /, `<svg style="width:${px}px;height:${px}px" `);
|
|
1368
1380
|
}
|
|
1369
1381
|
return s.trim();
|