@happyvertical/smrt-svelte 0.40.68 → 0.40.69
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/dist/Provider.svelte +8 -5
- package/dist/Provider.svelte.d.ts.map +1 -1
- package/dist/__tests__/success-never-text.test.js +100 -0
- package/dist/components/forms/PhoneInput.svelte +4 -1
- package/dist/components/workspace/admin-shell/SystemStatusChips.svelte +24 -6
- package/dist/state/app-state.svelte.d.ts +1 -1
- package/dist/state/app-state.svelte.d.ts.map +1 -1
- package/dist/state/app-state.svelte.js +10 -1
- package/package.json +6 -6
package/dist/Provider.svelte
CHANGED
|
@@ -6,7 +6,6 @@ import {
|
|
|
6
6
|
} from '@happyvertical/smrt-ui/i18n';
|
|
7
7
|
import type { Snippet } from 'svelte';
|
|
8
8
|
import { onDestroy, untrack } from 'svelte';
|
|
9
|
-
import AILoadingOverlay from './browser-ai/svelte/components/AILoadingOverlay.svelte';
|
|
10
9
|
import { logger } from './internal/logger.js';
|
|
11
10
|
import type {
|
|
12
11
|
AIConfig,
|
|
@@ -205,10 +204,14 @@ onDestroy(() => {
|
|
|
205
204
|
</script>
|
|
206
205
|
|
|
207
206
|
{#if ai && showLoadingOverlay}
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
207
|
+
<!-- Lazy: the overlay and its browser-ai component tree stay out of the
|
|
208
|
+
initial bundle for pages that never configure AI. -->
|
|
209
|
+
{#await import('./browser-ai/svelte/components/AILoadingOverlay.svelte') then m}
|
|
210
|
+
<m.default
|
|
211
|
+
message={ai.loadingMessage}
|
|
212
|
+
dismissible={true}
|
|
213
|
+
/>
|
|
214
|
+
{/await}
|
|
212
215
|
{/if}
|
|
213
216
|
|
|
214
217
|
{@render children()}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Provider.svelte.d.ts","sourceRoot":"","sources":["../src/Provider.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,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2
|
+
* "Green is never text" — the Svelte-stack half of the rule (#2323).
|
|
3
|
+
*
|
|
4
|
+
* `--smrt-color-success` is the one palette role that is not reliably
|
|
5
|
+
* text-safe: a green that reads as "running" at a glance sits in a narrow
|
|
6
|
+
* luminance band, so under the happyvertical light scheme it measures
|
|
7
|
+
* 4.22–4.44:1 on `surfaceDim` / `surfaceContainerHighest` / `surfaceVariant` /
|
|
8
|
+
* `background` — under the WCAG AA 4.5:1 floor for normal text. It stays legal
|
|
9
|
+
* as a MARKER: status lamps, dots, borders, and container fills (which pair
|
|
10
|
+
* with `on-success-container` ink and are AA by construction).
|
|
11
|
+
*
|
|
12
|
+
* `smrt-ui` pins this for its own components in
|
|
13
|
+
* `src/themes/__tests__/happyvertical-theme.test.ts`; that scan cannot see this
|
|
14
|
+
* package, which is how `SystemStatusChips` and `PhoneInput` drifted. This is
|
|
15
|
+
* the same check with the same matcher, scoped here.
|
|
16
|
+
*/
|
|
17
|
+
import { readdirSync, readFileSync } from 'node:fs';
|
|
18
|
+
import { join } from 'node:path';
|
|
19
|
+
import { describe, expect, it } from 'vitest';
|
|
20
|
+
const packageRoot = process.cwd().endsWith('packages/smrt-svelte')
|
|
21
|
+
? process.cwd()
|
|
22
|
+
: join(process.cwd(), 'packages/smrt-svelte');
|
|
23
|
+
const SKIP_DIRS = new Set(['node_modules', 'dist', '.svelte-kit', 'build']);
|
|
24
|
+
function svelteFilesUnder(dir) {
|
|
25
|
+
const out = [];
|
|
26
|
+
let entries;
|
|
27
|
+
try {
|
|
28
|
+
entries = readdirSync(dir, { withFileTypes: true });
|
|
29
|
+
}
|
|
30
|
+
catch {
|
|
31
|
+
return out;
|
|
32
|
+
}
|
|
33
|
+
for (const entry of entries) {
|
|
34
|
+
const full = join(dir, entry.name);
|
|
35
|
+
if (entry.isDirectory()) {
|
|
36
|
+
if (!SKIP_DIRS.has(entry.name))
|
|
37
|
+
out.push(...svelteFilesUnder(full));
|
|
38
|
+
}
|
|
39
|
+
else if (entry.name.endsWith('.svelte')) {
|
|
40
|
+
out.push(full);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
return out;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Does this source paint TEXT with the success token?
|
|
47
|
+
*
|
|
48
|
+
* Matches on the declaration VALUE rather than requiring `var(` to sit next to
|
|
49
|
+
* `color:`, so wrappers count — `color-mix(…)`, `light-dark(…)`, and
|
|
50
|
+
* `var(--x, var(--smrt-color-success))` all paint letterforms just as directly.
|
|
51
|
+
* Resolves one level of custom-property indirection, because
|
|
52
|
+
* `--chip-color: var(--smrt-color-success)` followed by `color: var(--chip-color)`
|
|
53
|
+
* is the shape that hides this from a naive grep. `(?![\w-])` keeps
|
|
54
|
+
* `--smrt-color-success-container` (a fill, with its own ink) from matching.
|
|
55
|
+
*/
|
|
56
|
+
function paintsTextWithSuccess(source) {
|
|
57
|
+
const declaration = /(?<![-\w])color\s*:\s*([^;{}]*)/g;
|
|
58
|
+
const successToken = /--smrt-color-success(?![\w-])/;
|
|
59
|
+
const customProperty = /(--[\w-]+)\s*:\s*([^;{}]*)/g;
|
|
60
|
+
const greenProperties = new Set();
|
|
61
|
+
for (const [, name, value] of source.matchAll(customProperty)) {
|
|
62
|
+
if (successToken.test(value))
|
|
63
|
+
greenProperties.add(name);
|
|
64
|
+
}
|
|
65
|
+
for (const [, value] of source.matchAll(declaration)) {
|
|
66
|
+
if (successToken.test(value))
|
|
67
|
+
return true;
|
|
68
|
+
for (const property of greenProperties) {
|
|
69
|
+
if (value.includes(`var(${property}`))
|
|
70
|
+
return true;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return false;
|
|
74
|
+
}
|
|
75
|
+
describe('success is a marker colour, never text (#2323)', () => {
|
|
76
|
+
const files = svelteFilesUnder(join(packageRoot, 'src'));
|
|
77
|
+
it('finds components to scan', () => {
|
|
78
|
+
expect(files.length).toBeGreaterThan(0);
|
|
79
|
+
});
|
|
80
|
+
it('no component paints text with --smrt-color-success', () => {
|
|
81
|
+
const offenders = files
|
|
82
|
+
.filter((file) => paintsTextWithSuccess(readFileSync(file, 'utf8')))
|
|
83
|
+
.map((file) => file.slice(packageRoot.length + 1));
|
|
84
|
+
expect(offenders).toEqual([]);
|
|
85
|
+
});
|
|
86
|
+
it('detects the wrapped and indirect forms the naive check missed', () => {
|
|
87
|
+
expect(paintsTextWithSuccess('.x { color: var(--smrt-color-success); }')).toBe(true);
|
|
88
|
+
expect(paintsTextWithSuccess('.x { color: color-mix(in srgb, var(--smrt-color-success) 80%, transparent); }')).toBe(true);
|
|
89
|
+
expect(paintsTextWithSuccess('.x { color: light-dark(var(--smrt-color-success), #fff); }')).toBe(true);
|
|
90
|
+
expect(paintsTextWithSuccess('.x { color: var(--y, var(--smrt-color-success)); }')).toBe(true);
|
|
91
|
+
expect(paintsTextWithSuccess('.a { --tone: var(--smrt-color-success); } .b { color: var(--tone); }')).toBe(true);
|
|
92
|
+
});
|
|
93
|
+
it('leaves marker, fill, and border uses alone', () => {
|
|
94
|
+
expect(paintsTextWithSuccess('.x { background: var(--smrt-color-success); }')).toBe(false);
|
|
95
|
+
expect(paintsTextWithSuccess('.x { border-color: var(--smrt-color-success); }')).toBe(false);
|
|
96
|
+
expect(paintsTextWithSuccess('.x { background-color: var(--smrt-color-success); }')).toBe(false);
|
|
97
|
+
expect(paintsTextWithSuccess('.x { color: var(--smrt-color-success-container); }')).toBe(false);
|
|
98
|
+
expect(paintsTextWithSuccess('.x { color: var(--smrt-color-on-success); }')).toBe(false);
|
|
99
|
+
});
|
|
100
|
+
});
|
|
@@ -473,12 +473,15 @@ function handleInput(e: Event) {
|
|
|
473
473
|
opacity: 0.7;
|
|
474
474
|
}
|
|
475
475
|
|
|
476
|
+
/* The green lives in `.listening-dot` below; the label reads as ordinary
|
|
477
|
+
secondary text. Painting the words with `success` measured 4.2–4.4:1 on
|
|
478
|
+
several light-scheme surfaces, under the AA floor (#2323). */
|
|
476
479
|
.listening-indicator {
|
|
477
480
|
display: flex;
|
|
478
481
|
align-items: center;
|
|
479
482
|
gap: var(--smrt-spacing-2, 8px);
|
|
480
483
|
font-size: var(--smrt-typography-body-small-size, 0.75rem);
|
|
481
|
-
color: var(--smrt-color-
|
|
484
|
+
color: var(--smrt-color-on-surface-variant);
|
|
482
485
|
margin-top: var(--smrt-spacing-1, 4px);
|
|
483
486
|
}
|
|
484
487
|
|
|
@@ -57,15 +57,33 @@ const { t } = useI18n();
|
|
|
57
57
|
text-decoration: none;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
|
|
61
|
-
|
|
60
|
+
/* Every tone is a lamp beside on-surface text; none of them paints the
|
|
61
|
+
letterforms. Status hues are chosen to be recognisable at a glance, which
|
|
62
|
+
puts them in luminance bands that are not text-safe on light surfaces —
|
|
63
|
+
measured worst-case as TEXT across all five presets: warning falls to
|
|
64
|
+
1.41:1 (material and studio light), error to 2.65:1 (glass light), success
|
|
65
|
+
to 1.66:1 (glass light). A lamp carries the same meaning with no contrast
|
|
66
|
+
obligation, and keeps the component correct under any palette rather than
|
|
67
|
+
depending on each preset tuning three hues for text (#2323). */
|
|
68
|
+
.smrt-system-status-chips [data-tone='success']::before,
|
|
69
|
+
.smrt-system-status-chips [data-tone='warning']::before,
|
|
70
|
+
.smrt-system-status-chips [data-tone='error']::before {
|
|
71
|
+
content: '';
|
|
72
|
+
flex: none;
|
|
73
|
+
inline-size: 0.5rem;
|
|
74
|
+
block-size: 0.5rem;
|
|
75
|
+
border-radius: var(--smrt-radius-full, 9999px);
|
|
62
76
|
}
|
|
63
77
|
|
|
64
|
-
.smrt-system-status-chips [data-tone='
|
|
65
|
-
|
|
78
|
+
.smrt-system-status-chips [data-tone='success']::before {
|
|
79
|
+
background: var(--smrt-color-success);
|
|
66
80
|
}
|
|
67
81
|
|
|
68
|
-
.smrt-system-status-chips [data-tone='
|
|
69
|
-
|
|
82
|
+
.smrt-system-status-chips [data-tone='warning']::before {
|
|
83
|
+
background: var(--smrt-color-warning);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.smrt-system-status-chips [data-tone='error']::before {
|
|
87
|
+
background: var(--smrt-color-error);
|
|
70
88
|
}
|
|
71
89
|
</style>
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Uses runes ($state, $derived) for reactivity.
|
|
5
5
|
* This is the Svelte-specific binding layer on top of app-state.ts
|
|
6
6
|
*/
|
|
7
|
-
import {
|
|
7
|
+
import type { GetLLMOptions, GetSTTOptions, GetTTSOptions, LLMAdapter, STTAdapter, TTSAdapter, TTSOptions } from '../browser-ai/index.js';
|
|
8
8
|
import { type AIConfig, type AILoadingState, type AppMode, type CreateAppStateOptions, type ModeSource, type SmrtAppState, type SocketConfig, type User, type UserSession } from './app-state.js';
|
|
9
9
|
/**
|
|
10
10
|
* Reactive app state manager for Svelte 5
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-state.svelte.d.ts","sourceRoot":"","sources":["../../src/state/app-state.svelte.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"app-state.svelte.d.ts","sourceRoot":"","sources":["../../src/state/app-state.svelte.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,KAAK,EACV,aAAa,EACb,aAAa,EACb,aAAa,EACb,UAAU,EAEV,UAAU,EACV,UAAU,EACV,UAAU,EACX,MAAM,wBAAwB,CAAC;AAShC,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,cAAc,EACnB,KAAK,OAAO,EACZ,KAAK,qBAAqB,EAE1B,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,IAAI,EACT,KAAK,WAAW,EACjB,MAAM,gBAAgB,CAAC;AA6CxB;;GAEG;AACH,qBAAa,mBAAmB;IAE9B,OAAO,CAAC,MAAM,CAA8C;IAG5D,OAAO,CAAC,OAAO,CAAwB;IAGvC,OAAO,CAAC,SAAS,CAAyB;IAC1C,OAAO,CAAC,iBAAiB,CAAS;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AAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE;QAAE,YAAY,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;KAAE,GACrE,OAAO,CAAC,MAAM,CAAC;IAgBlB;;OAEG;IACG,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IA4BhC;;;;OAIG;IACH,OAAO,CAAC,2BAA2B;IAWnC;;OAEG;IACG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAmD9B;;OAEG;IACH,IAAI,SAAS,IAAI,OAAO,CAKvB;IAED;;OAEG;IACH,IAAI,WAAW,IAAI,OAAO,CAMzB;CACF;AAED;;GAEG;AACH,wBAAgB,cAAc,CAC5B,OAAO,CAAC,EAAE,qBAAqB,GAC9B,mBAAmB,CAErB"}
|
|
@@ -4,7 +4,13 @@
|
|
|
4
4
|
* Uses runes ($state, $derived) for reactivity.
|
|
5
5
|
* This is the Svelte-specific binding layer on top of app-state.ts
|
|
6
6
|
*/
|
|
7
|
-
import { canEnableSmrtMode, detectCapabilities,
|
|
7
|
+
import { canEnableSmrtMode, detectCapabilities, } from '../browser-ai/capabilities/detector.js';
|
|
8
|
+
// NOTE: The adapter factories (getSTT/getTTS/getLLM) are intentionally NOT
|
|
9
|
+
// imported statically. The browser-ai index re-exports every adapter module,
|
|
10
|
+
// so a static factory import pulls the whole adapter layer (whisper STT,
|
|
11
|
+
// TTS, LLM wrappers) into the initial chunk of every page that mounts a
|
|
12
|
+
// Provider — including pages that never use AI. They are dynamically
|
|
13
|
+
// imported at the call sites below, which only run when AI is configured.
|
|
8
14
|
import { createInitialState, } from './app-state.js';
|
|
9
15
|
import { getCachedLLM, getCachedSTT, getCachedTTS, setCachedLLM, setCachedSTT, setCachedTTS, updateLLMCacheState, updateSTTCacheState, updateTTSCacheState, } from './warm-clients.js';
|
|
10
16
|
/**
|
|
@@ -538,6 +544,7 @@ export class SmrtAppStateManager {
|
|
|
538
544
|
}
|
|
539
545
|
};
|
|
540
546
|
try {
|
|
547
|
+
const { getSTT } = await import('../browser-ai/index.js');
|
|
541
548
|
const adapter = await getSTT(options);
|
|
542
549
|
await adapter.ensureInitialized(onProgress);
|
|
543
550
|
// Cache the adapter for future use
|
|
@@ -661,6 +668,7 @@ export class SmrtAppStateManager {
|
|
|
661
668
|
updateTTSCacheState(requestedType, { downloadProgress: progress });
|
|
662
669
|
};
|
|
663
670
|
try {
|
|
671
|
+
const { getTTS } = await import('../browser-ai/index.js');
|
|
664
672
|
const adapter = await getTTS(options);
|
|
665
673
|
await adapter.ensureInitialized(onProgress);
|
|
666
674
|
// Cache the adapter for future use
|
|
@@ -796,6 +804,7 @@ export class SmrtAppStateManager {
|
|
|
796
804
|
}
|
|
797
805
|
};
|
|
798
806
|
try {
|
|
807
|
+
const { getLLM } = await import('../browser-ai/index.js');
|
|
799
808
|
const adapter = await getLLM(options);
|
|
800
809
|
await adapter.ensureInitialized(modelId, onProgress);
|
|
801
810
|
// Cache the adapter for future use
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@happyvertical/smrt-svelte",
|
|
3
|
-
"version": "0.40.
|
|
3
|
+
"version": "0.40.69",
|
|
4
4
|
"description": "Svelte 5 components for SMRT user management - auth, users, tenants, roles, permissions, groups",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"smrtRawPrimitives": "strict",
|
|
@@ -107,14 +107,14 @@
|
|
|
107
107
|
"access": "public"
|
|
108
108
|
},
|
|
109
109
|
"dependencies": {
|
|
110
|
-
"@happyvertical/logger": "^0.
|
|
110
|
+
"@happyvertical/logger": "^0.88.0",
|
|
111
111
|
"@tanstack/db": "^0.6.14",
|
|
112
112
|
"@tanstack/svelte-db": "^0.1.91",
|
|
113
113
|
"esm-env": "^1.2.2",
|
|
114
|
-
"@happyvertical/smrt-languages": "0.40.
|
|
115
|
-
"@happyvertical/smrt-types": "0.40.
|
|
116
|
-
"@happyvertical/smrt-
|
|
117
|
-
"@happyvertical/smrt-
|
|
114
|
+
"@happyvertical/smrt-languages": "0.40.69",
|
|
115
|
+
"@happyvertical/smrt-types": "0.40.69",
|
|
116
|
+
"@happyvertical/smrt-ui": "0.40.69",
|
|
117
|
+
"@happyvertical/smrt-web": "0.40.69"
|
|
118
118
|
},
|
|
119
119
|
"peerDependencies": {
|
|
120
120
|
"@huggingface/transformers": ">=3.8.1",
|