@justai/core 0.19.0 → 0.20.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.js +32 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@justai/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.20.0",
|
|
4
4
|
"description": "The framework-free heart of the persona shell — 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.js
CHANGED
|
@@ -1049,6 +1049,38 @@ export function toolbarMark(iconSvg, options) {
|
|
|
1049
1049
|
if (!/aria-hidden/.test(s)) s = s.replace(/<svg /, '<svg aria-hidden="true" ');
|
|
1050
1050
|
if (o.class) s = s.replace(/<svg /, `<svg class="${o.class}" `);
|
|
1051
1051
|
|
|
1052
|
+
// queries: the persona mark is always coloured · two toolbar icons look active · the accent is
|
|
1053
|
+
// everywhere in the row · which icon should be coloured · currentColor toolbar mark
|
|
1054
|
+
//
|
|
1055
|
+
// THE MARK IS INK UNTIL ITS CUT IS CURRENT — the founder's golden rule, 2026-08-03:
|
|
1056
|
+
//
|
|
1057
|
+
// "active persona cut'un icon'u accent rengini alır. diğer passive cut iconları ise accent
|
|
1058
|
+
// rengini kullanmaz."
|
|
1059
|
+
//
|
|
1060
|
+
// The accent has exactly one job in this row: to answer *where am I*. A mark that keeps its own
|
|
1061
|
+
// colours while another cut is current is a second voice on that channel — measured at the kernel,
|
|
1062
|
+
// with the active bolt reading a chroma of 6 to 12, the passive marks read 8 to 20. Several were
|
|
1063
|
+
// MORE coloured than the icon that was actually current.
|
|
1064
|
+
//
|
|
1065
|
+
// THIS FILE ARGUED THE OPPOSITE, and the argument is kept because it shows a true premise ageing
|
|
1066
|
+
// into a wrong conclusion: *"a mark is an identity, not a UI state — a faded logo reads as disabled
|
|
1067
|
+
// rather than as not-current."* True while the mark arrived as an `<img>`, which cannot take
|
|
1068
|
+
// `currentColor`, so dimming was the only way to say "not here". That premise expired the day this
|
|
1069
|
+
// function started deriving an inline SVG. An inline mark can be ink, and ink is not dimming.
|
|
1070
|
+
//
|
|
1071
|
+
// Only the PAINT is neutralised, and only outside `<defs>`: the gradients stay defined, so a
|
|
1072
|
+
// persona that wants its own colours *while current* can re-point to them from its own CSS. qr
|
|
1073
|
+
// does. That is a decision about what the accent looks like, never about when it appears.
|
|
1074
|
+
{
|
|
1075
|
+
const cut = s.lastIndexOf("</defs>");
|
|
1076
|
+
const head = cut >= 0 ? s.slice(0, cut + 7) : "";
|
|
1077
|
+
const body = (cut >= 0 ? s.slice(cut + 7) : s)
|
|
1078
|
+
// `fill="none"` is not paint, it is the absence of it — a stroked shape says so and must keep
|
|
1079
|
+
// saying so, or every outline becomes a silhouette.
|
|
1080
|
+
.replace(/\b(fill|stroke)="(?!none")[^"]*"/g, '$1="currentColor"');
|
|
1081
|
+
s = head + body;
|
|
1082
|
+
}
|
|
1083
|
+
|
|
1052
1084
|
// queries: the derived mark is too small · fills · the mark shrank when the ground came off ·
|
|
1053
1085
|
// box for 20 ink
|
|
1054
1086
|
//
|