@genesislcap/ai-assistant 15.10.1 → 15.10.3
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.styles.d.ts","sourceRoot":"","sources":["../../../src/main/main.styles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"main.styles.d.ts","sourceRoot":"","sources":["../../../src/main/main.styles.ts"],"names":[],"mappings":"AAi2BA,eAAO,MAAM,MAAM,iDAGlB,CAAC"}
|
|
@@ -280,7 +280,13 @@ const baseStyles = css `
|
|
|
280
280
|
var(--accent-fill-rest) 0%,
|
|
281
281
|
color-mix(in srgb, var(--accent-fill-rest) 70%, black) 100%
|
|
282
282
|
);
|
|
283
|
-
|
|
283
|
+
|
|
284
|
+
/* The on-accent foreground token that pairs with the --accent-fill-rest background
|
|
285
|
+
above. It must be the design system's real token name: color is inherited, so an
|
|
286
|
+
undefined custom property with no fallback is invalid at computed-value time and
|
|
287
|
+
silently leaves the text at the inherited neutral foreground — which reads as
|
|
288
|
+
white-ish (fine) on a dark app and near-black (unreadable) on a light one. */
|
|
289
|
+
color: var(--foreground-on-accent-rest);
|
|
284
290
|
|
|
285
291
|
/* Squared "tail" at top-right — the corner nearest the user avatar. */
|
|
286
292
|
border-radius: 18px 4px 18px 18px;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
var _a, _b, _c;
|
|
1
|
+
var _a, _b, _c, _d, _e;
|
|
2
2
|
import { assert, createLogicSuite } from '@genesislcap/foundation-testing';
|
|
3
|
+
import { foregroundOnAccentRest } from '@genesislcap/foundation-ui';
|
|
3
4
|
import { styles } from './main.styles';
|
|
4
5
|
// CSS is not otherwise unit-tested in this package, so this covers the two
|
|
5
6
|
// properties of the BLOCKED BANNER that are cheap to assert from the generated
|
|
@@ -20,6 +21,9 @@ import { styles } from './main.styles';
|
|
|
20
21
|
// — quietly turning a banner test into a global style policy nobody agreed to, so
|
|
21
22
|
// any future rule anywhere in an 800-line sheet that legitimately wanted a
|
|
22
23
|
// fallback on either token would have failed a test named after the banner.
|
|
24
|
+
//
|
|
25
|
+
// A second suite at the bottom covers the user bubble's fill/foreground token
|
|
26
|
+
// pairing, which failed the same way a reviewer's eye does (GENC-1491).
|
|
23
27
|
const suite = createLogicSuite('main.styles blocked-banner rules');
|
|
24
28
|
/**
|
|
25
29
|
* The generated stylesheet text. `css` composes nested `ElementStyles` (this file
|
|
@@ -97,3 +101,26 @@ suite('partial exhaustion has its own modifier, layered on the visible state', (
|
|
|
97
101
|
assert.ok(cssText.includes('.blocked-banner.is-partial'), 'the partial modifier exists');
|
|
98
102
|
});
|
|
99
103
|
suite.run();
|
|
104
|
+
// ─── User message bubble ──────────────────────────────────────────────────────
|
|
105
|
+
const bubble = createLogicSuite('main.styles user-message colour pairing');
|
|
106
|
+
/** Declarations of the `.message.user` rule — the accent-filled bubble. */
|
|
107
|
+
const userMessageRule = (_e = (_d = cssText.match(/\.message\.user\s*\{([^}]*)\}/)) === null || _d === void 0 ? void 0 : _d[1]) !== null && _e !== void 0 ? _e : '';
|
|
108
|
+
bubble('the user bubble pairs its accent fill with the on-accent foreground', () => {
|
|
109
|
+
// The bubble fills with --accent-fill-rest, so its text MUST come from the
|
|
110
|
+
// design system's paired on-accent token. This shipped as
|
|
111
|
+
// `--accent-foreground-on-accent-rest` — a name nothing defines — and the
|
|
112
|
+
// failure was invisible in review and in dark mode: `color` is inherited, so an
|
|
113
|
+
// undefined custom property with no fallback is invalid at computed-value time
|
|
114
|
+
// and quietly leaves the text at the inherited neutral foreground. That reads
|
|
115
|
+
// white-ish on a dark app (looks intentional) and near-black on a light one,
|
|
116
|
+
// where it landed at ~1.3:1 against the fill (GENC-1491).
|
|
117
|
+
//
|
|
118
|
+
// Asserted against the token object's OWN cssCustomProperty rather than a
|
|
119
|
+
// repeated string literal: a typo here cannot agree with itself, and a rename
|
|
120
|
+
// in the design system fails this test instead of silently reintroducing the
|
|
121
|
+
// inherit.
|
|
122
|
+
assert.ok(userMessageRule.length > 0, 'the .message.user rule is in the sheet');
|
|
123
|
+
assert.ok(userMessageRule.includes('var(--accent-fill-rest)'), 'the bubble is filled from the accent token (the premise of the pairing)');
|
|
124
|
+
assert.ok(userMessageRule.includes(`color: var(${foregroundOnAccentRest.cssCustomProperty})`), `the text colour is ${foregroundOnAccentRest.cssCustomProperty}, which the design system defines`);
|
|
125
|
+
});
|
|
126
|
+
bubble.run();
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genesislcap/ai-assistant",
|
|
3
3
|
"description": "Genesis AI Assistant micro-frontend",
|
|
4
|
-
"version": "15.10.
|
|
4
|
+
"version": "15.10.3",
|
|
5
5
|
"license": "SEE LICENSE IN license.txt",
|
|
6
6
|
"main": "dist/esm/index.js",
|
|
7
7
|
"types": "dist/ai-assistant.d.ts",
|
|
@@ -73,26 +73,26 @@
|
|
|
73
73
|
}
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|
|
76
|
-
"@genesislcap/foundation-testing": "15.10.
|
|
77
|
-
"@genesislcap/genx": "15.10.
|
|
78
|
-
"@genesislcap/rollup-builder": "15.10.
|
|
79
|
-
"@genesislcap/ts-builder": "15.10.
|
|
80
|
-
"@genesislcap/uvu-playwright-builder": "15.10.
|
|
81
|
-
"@genesislcap/vite-builder": "15.10.
|
|
82
|
-
"@genesislcap/webpack-builder": "15.10.
|
|
76
|
+
"@genesislcap/foundation-testing": "15.10.3",
|
|
77
|
+
"@genesislcap/genx": "15.10.3",
|
|
78
|
+
"@genesislcap/rollup-builder": "15.10.3",
|
|
79
|
+
"@genesislcap/ts-builder": "15.10.3",
|
|
80
|
+
"@genesislcap/uvu-playwright-builder": "15.10.3",
|
|
81
|
+
"@genesislcap/vite-builder": "15.10.3",
|
|
82
|
+
"@genesislcap/webpack-builder": "15.10.3",
|
|
83
83
|
"@types/dompurify": "^3.0.5",
|
|
84
84
|
"@types/marked": "^5.0.2",
|
|
85
85
|
"esbuild": "0.25.12"
|
|
86
86
|
},
|
|
87
87
|
"dependencies": {
|
|
88
|
-
"@genesislcap/foundation-ai": "15.10.
|
|
89
|
-
"@genesislcap/foundation-logger": "15.10.
|
|
90
|
-
"@genesislcap/foundation-notifications": "15.10.
|
|
91
|
-
"@genesislcap/foundation-redux": "15.10.
|
|
92
|
-
"@genesislcap/foundation-ui": "15.10.
|
|
93
|
-
"@genesislcap/foundation-utils": "15.10.
|
|
94
|
-
"@genesislcap/rapid-design-system": "15.10.
|
|
95
|
-
"@genesislcap/web-core": "15.10.
|
|
88
|
+
"@genesislcap/foundation-ai": "15.10.3",
|
|
89
|
+
"@genesislcap/foundation-logger": "15.10.3",
|
|
90
|
+
"@genesislcap/foundation-notifications": "15.10.3",
|
|
91
|
+
"@genesislcap/foundation-redux": "15.10.3",
|
|
92
|
+
"@genesislcap/foundation-ui": "15.10.3",
|
|
93
|
+
"@genesislcap/foundation-utils": "15.10.3",
|
|
94
|
+
"@genesislcap/rapid-design-system": "15.10.3",
|
|
95
|
+
"@genesislcap/web-core": "15.10.3",
|
|
96
96
|
"dompurify": "^3.3.1",
|
|
97
97
|
"marked": "^17.0.3"
|
|
98
98
|
},
|
|
@@ -105,5 +105,5 @@
|
|
|
105
105
|
"access": "public"
|
|
106
106
|
},
|
|
107
107
|
"customElements": "dist/custom-elements.json",
|
|
108
|
-
"gitHead": "
|
|
108
|
+
"gitHead": "6e5c9bb135b3da6792c4c3a8e632b09b0bc3fbca"
|
|
109
109
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { assert, createLogicSuite } from '@genesislcap/foundation-testing';
|
|
2
|
+
import { foregroundOnAccentRest } from '@genesislcap/foundation-ui';
|
|
2
3
|
import { styles } from './main.styles';
|
|
3
4
|
|
|
4
5
|
// CSS is not otherwise unit-tested in this package, so this covers the two
|
|
@@ -20,6 +21,9 @@ import { styles } from './main.styles';
|
|
|
20
21
|
// — quietly turning a banner test into a global style policy nobody agreed to, so
|
|
21
22
|
// any future rule anywhere in an 800-line sheet that legitimately wanted a
|
|
22
23
|
// fallback on either token would have failed a test named after the banner.
|
|
24
|
+
//
|
|
25
|
+
// A second suite at the bottom covers the user bubble's fill/foreground token
|
|
26
|
+
// pairing, which failed the same way a reviewer's eye does (GENC-1491).
|
|
23
27
|
|
|
24
28
|
const suite = createLogicSuite('main.styles blocked-banner rules');
|
|
25
29
|
|
|
@@ -128,3 +132,37 @@ suite('partial exhaustion has its own modifier, layered on the visible state', (
|
|
|
128
132
|
});
|
|
129
133
|
|
|
130
134
|
suite.run();
|
|
135
|
+
|
|
136
|
+
// ─── User message bubble ──────────────────────────────────────────────────────
|
|
137
|
+
|
|
138
|
+
const bubble = createLogicSuite('main.styles user-message colour pairing');
|
|
139
|
+
|
|
140
|
+
/** Declarations of the `.message.user` rule — the accent-filled bubble. */
|
|
141
|
+
const userMessageRule = cssText.match(/\.message\.user\s*\{([^}]*)\}/)?.[1] ?? '';
|
|
142
|
+
|
|
143
|
+
bubble('the user bubble pairs its accent fill with the on-accent foreground', () => {
|
|
144
|
+
// The bubble fills with --accent-fill-rest, so its text MUST come from the
|
|
145
|
+
// design system's paired on-accent token. This shipped as
|
|
146
|
+
// `--accent-foreground-on-accent-rest` — a name nothing defines — and the
|
|
147
|
+
// failure was invisible in review and in dark mode: `color` is inherited, so an
|
|
148
|
+
// undefined custom property with no fallback is invalid at computed-value time
|
|
149
|
+
// and quietly leaves the text at the inherited neutral foreground. That reads
|
|
150
|
+
// white-ish on a dark app (looks intentional) and near-black on a light one,
|
|
151
|
+
// where it landed at ~1.3:1 against the fill (GENC-1491).
|
|
152
|
+
//
|
|
153
|
+
// Asserted against the token object's OWN cssCustomProperty rather than a
|
|
154
|
+
// repeated string literal: a typo here cannot agree with itself, and a rename
|
|
155
|
+
// in the design system fails this test instead of silently reintroducing the
|
|
156
|
+
// inherit.
|
|
157
|
+
assert.ok(userMessageRule.length > 0, 'the .message.user rule is in the sheet');
|
|
158
|
+
assert.ok(
|
|
159
|
+
userMessageRule.includes('var(--accent-fill-rest)'),
|
|
160
|
+
'the bubble is filled from the accent token (the premise of the pairing)',
|
|
161
|
+
);
|
|
162
|
+
assert.ok(
|
|
163
|
+
userMessageRule.includes(`color: var(${foregroundOnAccentRest.cssCustomProperty})`),
|
|
164
|
+
`the text colour is ${foregroundOnAccentRest.cssCustomProperty}, which the design system defines`,
|
|
165
|
+
);
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
bubble.run();
|
package/src/main/main.styles.ts
CHANGED
|
@@ -286,7 +286,13 @@ const baseStyles = css`
|
|
|
286
286
|
var(--accent-fill-rest) 0%,
|
|
287
287
|
color-mix(in srgb, var(--accent-fill-rest) 70%, black) 100%
|
|
288
288
|
);
|
|
289
|
-
|
|
289
|
+
|
|
290
|
+
/* The on-accent foreground token that pairs with the --accent-fill-rest background
|
|
291
|
+
above. It must be the design system's real token name: color is inherited, so an
|
|
292
|
+
undefined custom property with no fallback is invalid at computed-value time and
|
|
293
|
+
silently leaves the text at the inherited neutral foreground — which reads as
|
|
294
|
+
white-ish (fine) on a dark app and near-black (unreadable) on a light one. */
|
|
295
|
+
color: var(--foreground-on-accent-rest);
|
|
290
296
|
|
|
291
297
|
/* Squared "tail" at top-right — the corner nearest the user avatar. */
|
|
292
298
|
border-radius: 18px 4px 18px 18px;
|