structural-codes-viewer 0.1.0-alpha.2 → 0.1.0-alpha.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.
- package/README.md +34 -101
- package/package-dist/styles.css +7 -172
- package/package.json +4 -46
- package/package-dist/chatntc/canonicalization.d.ts +0 -15
- package/package-dist/chatntc/canonicalization.js +0 -107
- package/package-dist/chatntc/canonicalization.js.map +0 -1
- package/package-dist/chatntc/directives.d.ts +0 -2
- package/package-dist/chatntc/directives.js +0 -38
- package/package-dist/chatntc/directives.js.map +0 -1
- package/package-dist/chatntc/evidence.d.ts +0 -17
- package/package-dist/chatntc/evidence.js +0 -116
- package/package-dist/chatntc/evidence.js.map +0 -1
- package/package-dist/chatntc/index.d.ts +0 -10
- package/package-dist/chatntc/index.js +0 -9
- package/package-dist/chatntc/index.js.map +0 -1
- package/package-dist/chatntc/issueCategories.d.ts +0 -2
- package/package-dist/chatntc/issueCategories.js +0 -11
- package/package-dist/chatntc/issueCategories.js.map +0 -1
- package/package-dist/chatntc/policy.d.ts +0 -35
- package/package-dist/chatntc/policy.js +0 -36
- package/package-dist/chatntc/policy.js.map +0 -1
- package/package-dist/chatntc/provider.d.ts +0 -42
- package/package-dist/chatntc/provider.js +0 -2
- package/package-dist/chatntc/provider.js.map +0 -1
- package/package-dist/chatntc/responseContract.d.ts +0 -52
- package/package-dist/chatntc/responseContract.js +0 -73
- package/package-dist/chatntc/responseContract.js.map +0 -1
- package/package-dist/chatntc/retrieval.d.ts +0 -5
- package/package-dist/chatntc/retrieval.js +0 -220
- package/package-dist/chatntc/retrieval.js.map +0 -1
- package/package-dist/chatntc/types.d.ts +0 -240
- package/package-dist/chatntc/types.js +0 -2
- package/package-dist/chatntc/types.js.map +0 -1
- package/package-dist/chatntc/validation.d.ts +0 -8
- package/package-dist/chatntc/validation.js +0 -299
- package/package-dist/chatntc/validation.js.map +0 -1
- package/package-dist/chatntc/viewerArtifacts.d.ts +0 -14
- package/package-dist/chatntc/viewerArtifacts.js +0 -168
- package/package-dist/chatntc/viewerArtifacts.js.map +0 -1
- package/package-dist/chatntc-history/index.d.ts +0 -2
- package/package-dist/chatntc-history/index.js +0 -3
- package/package-dist/chatntc-history/index.js.map +0 -1
- package/package-dist/chatntc-history/indexedDb.d.ts +0 -27
- package/package-dist/chatntc-history/indexedDb.js +0 -258
- package/package-dist/chatntc-history/indexedDb.js.map +0 -1
- package/package-dist/chatntc-history/schema.d.ts +0 -5
- package/package-dist/chatntc-history/schema.js +0 -102
- package/package-dist/chatntc-history/schema.js.map +0 -1
- package/package-dist/chatntc-history/types.d.ts +0 -78
- package/package-dist/chatntc-history/types.js +0 -23
- package/package-dist/chatntc-history/types.js.map +0 -1
- package/package-dist/chatntc-ui/ChatNTCHistoryPanel.d.ts +0 -9
- package/package-dist/chatntc-ui/ChatNTCHistoryPanel.js +0 -239
- package/package-dist/chatntc-ui/ChatNTCHistoryPanel.js.map +0 -1
- package/package-dist/chatntc-ui/ChatNTCIcons.d.ts +0 -10
- package/package-dist/chatntc-ui/ChatNTCIcons.js +0 -20
- package/package-dist/chatntc-ui/ChatNTCIcons.js.map +0 -1
- package/package-dist/chatntc-ui/ChatNTCLoadingSkeleton.d.ts +0 -1
- package/package-dist/chatntc-ui/ChatNTCLoadingSkeleton.js +0 -5
- package/package-dist/chatntc-ui/ChatNTCLoadingSkeleton.js.map +0 -1
- package/package-dist/chatntc-ui/ChatNTCMarkdown.d.ts +0 -14
- package/package-dist/chatntc-ui/ChatNTCMarkdown.js +0 -112
- package/package-dist/chatntc-ui/ChatNTCMarkdown.js.map +0 -1
- package/package-dist/chatntc-ui/ChatNTCPanel.d.ts +0 -29
- package/package-dist/chatntc-ui/ChatNTCPanel.js +0 -241
- package/package-dist/chatntc-ui/ChatNTCPanel.js.map +0 -1
- package/package-dist/chatntc-ui/historyMessages.d.ts +0 -5
- package/package-dist/chatntc-ui/historyMessages.js +0 -53
- package/package-dist/chatntc-ui/historyMessages.js.map +0 -1
- package/package-dist/chatntc-ui/index.d.ts +0 -3
- package/package-dist/chatntc-ui/index.js +0 -4
- package/package-dist/chatntc-ui/index.js.map +0 -1
- package/package-dist/chatntc-ui/transport.d.ts +0 -51
- package/package-dist/chatntc-ui/transport.js +0 -9
- package/package-dist/chatntc-ui/transport.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,48 +1,49 @@
|
|
|
1
1
|
# structural-codes-viewer
|
|
2
2
|
|
|
3
3
|
`structural-codes-viewer` è il package React per consultare il corpus
|
|
4
|
-
`structural-codes`. La stessa directory contiene l'applicazione standalone
|
|
5
|
-
la route ChatNTC self-hosted, che restano fuori dal tarball del package.
|
|
4
|
+
`structural-codes`. La stessa directory contiene l'applicazione standalone.
|
|
6
5
|
|
|
7
6
|
## Boundary
|
|
8
7
|
|
|
9
8
|
- `structural-codes`: corpus, schema, provenance e helper non React;
|
|
10
|
-
- `structural-codes-viewer`:
|
|
11
|
-
|
|
12
|
-
- `viewer/app
|
|
13
|
-
provider non pubblicati nel package.
|
|
9
|
+
- `structural-codes-viewer`: viewer React, ricerca, navigazione, annotazioni,
|
|
10
|
+
client lazy e generatore di artefatti;
|
|
11
|
+
- `viewer/app/`: composizione standalone non pubblicata nel package.
|
|
14
12
|
|
|
15
13
|
React e ReactDOM sono peer dependency. Il package non dipende a runtime da
|
|
16
|
-
Next/Vinext
|
|
14
|
+
Next/Vinext o `pdfjs-dist`.
|
|
17
15
|
|
|
18
16
|
## Viewer React
|
|
19
17
|
|
|
20
18
|
```tsx
|
|
21
|
-
import { NormativeViewer } from "structural-codes-viewer";
|
|
19
|
+
import { NormativeViewer, type AuxiliaryPanelContext } from "structural-codes-viewer";
|
|
22
20
|
import "structural-codes-viewer/styles.css";
|
|
23
21
|
|
|
22
|
+
function Panel({ context }: { context: AuxiliaryPanelContext }) {
|
|
23
|
+
return <aside><button onClick={context.close}>Chiudi</button></aside>;
|
|
24
|
+
}
|
|
25
|
+
|
|
24
26
|
export function Normativa() {
|
|
25
|
-
return <NormativeViewer
|
|
27
|
+
return <NormativeViewer
|
|
28
|
+
defaultMode="combined"
|
|
29
|
+
dataBaseUrl="/data/codes"
|
|
30
|
+
auxiliaryPanel={(context) => <Panel context={context} />}
|
|
31
|
+
auxiliaryPanelModes={["ntc", "circ", "combined"]}
|
|
32
|
+
/>;
|
|
26
33
|
}
|
|
27
34
|
```
|
|
28
35
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
-
|
|
35
|
-
- `auxiliaryPanelDefaultVisible`, `auxiliaryPanelKeepMounted` e modalità
|
|
36
|
-
consentite del pannello.
|
|
37
|
-
|
|
38
|
-
La vista combinata mantiene le NTC come struttura principale e inserisce la
|
|
39
|
-
Circolare solo tramite relazioni esplicite. Ricerca, chunk, relazioni, figure e
|
|
40
|
-
prefetch sono lazy; il package shared non importa PDF o route standalone.
|
|
36
|
+
`NormativeViewer` espone `dataBaseUrl`, `assetsBaseUrl`, `auxiliaryPanel`,
|
|
37
|
+
`AuxiliaryPanelContext`, controlli di visibilità del pannello e `annotationStore`.
|
|
38
|
+
Il pannello generico consente ai consumer di montare i propri componenti.
|
|
39
|
+
Navigazione, ricerca, annotazioni, note e segnalibri sono indipendenti dalla
|
|
40
|
+
composizione standalone. Sono pubblici anche `./annotations`, `./corpus-data`,
|
|
41
|
+
`./generate-artifacts` e `./styles.css`.
|
|
41
42
|
|
|
42
43
|
## Artefatti
|
|
43
44
|
|
|
44
45
|
```bash
|
|
45
|
-
npm
|
|
46
|
+
npm run sync:corpus
|
|
46
47
|
```
|
|
47
48
|
|
|
48
49
|
Il comando genera sotto `viewer/public/data/codes/` manifest, indici documento,
|
|
@@ -59,88 +60,20 @@ npx structural-codes-viewer --source structural-codes \
|
|
|
59
60
|
Il package viewer non include il corpus completo: il generatore legge il
|
|
60
61
|
package `structural-codes` installato nel consumer.
|
|
61
62
|
|
|
62
|
-
##
|
|
63
|
-
|
|
64
|
-
```ts
|
|
65
|
-
import {
|
|
66
|
-
CHATNTC_DEFAULT_RETRIEVAL,
|
|
67
|
-
retrieveChatNTCEvidence,
|
|
68
|
-
validateChatNTCResponse,
|
|
69
|
-
} from "structural-codes-viewer/chatntc";
|
|
70
|
-
import { createViewerArtifactRepository } from
|
|
71
|
-
"structural-codes-viewer/chatntc/viewer-artifacts";
|
|
72
|
-
import { ChatNTCPanel, type ChatTransport } from
|
|
73
|
-
"structural-codes-viewer/chatntc-ui";
|
|
74
|
-
import { IndexedDbChatHistoryStore, type ChatHistoryStore } from
|
|
75
|
-
"structural-codes-viewer/chatntc-history";
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
Questi export sono shared/browser-safe. Route HTTP, provider secrets,
|
|
79
|
-
`LocalChatTransport`, `LocalAIConfiguration` e impostazioni standalone non
|
|
80
|
-
sono API del package.
|
|
81
|
-
|
|
82
|
-
## Standalone senza ChatNTC
|
|
63
|
+
## Standalone
|
|
83
64
|
|
|
84
65
|
```bash
|
|
85
66
|
npm ci
|
|
86
|
-
npm run sync:corpus
|
|
87
|
-
npm run dev
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
Il viewer funziona senza provider e senza ChatNTC. Il PDF ufficiale è un
|
|
91
|
-
ausilio locale/debug e non entra nel build pubblico o nel package.
|
|
92
|
-
|
|
93
|
-
## ChatNTC self-hosted
|
|
94
|
-
|
|
95
|
-
Dal root della repository:
|
|
96
|
-
|
|
97
|
-
```bash
|
|
98
67
|
npm run dev
|
|
99
68
|
```
|
|
100
69
|
|
|
101
|
-
Il
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
```dotenv
|
|
105
|
-
CHATNTC_ENABLED=true
|
|
106
|
-
CHATNTC_PROVIDER=deepseek
|
|
107
|
-
CHATNTC_DEEPSEEK_API_KEY=
|
|
108
|
-
CHATNTC_SEMANTIC_MODE=off
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
La chiave può restare vuota se l'utente usa la UI BYOK. Le chiavi environment
|
|
112
|
-
rimangono server-side; quelle UI rimangono in memoria e viaggiano in un header
|
|
113
|
-
stessa origine, mai nel body o nella history.
|
|
114
|
-
|
|
115
|
-
Pipeline standard:
|
|
116
|
-
|
|
117
|
-
```text
|
|
118
|
-
query → lexical retrieval → structural expansion → Evidence Package
|
|
119
|
-
→ LLM → Citation Validator → risposta verificata
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
Dettagli: [overview](../docs/chatntc-core.md),
|
|
123
|
-
[self-hosting](../docs/chatntc-server.md),
|
|
124
|
-
[BYOK](../docs/chatntc-byok.md) e
|
|
125
|
-
[history](../docs/chatntc-history.md).
|
|
126
|
-
|
|
127
|
-
## Semantic retrieval sperimentale
|
|
128
|
-
|
|
129
|
-
`CHATNTC_SEMANTIC_MODE=off|shadow|on`; il default è `off`.
|
|
130
|
-
|
|
131
|
-
- `off`: percorso lessicale standard, nessun indice o embedding;
|
|
132
|
-
- `shadow`: calcolo semantic osservazionale, output lessicale invariato;
|
|
133
|
-
- `on`: ranking fuso RRF con fallback lessicale.
|
|
134
|
-
|
|
135
|
-
Gli adapter BGE-M3 HTTP e Ollama, i generatori indice e i benchmark sono
|
|
136
|
-
strumenti opt-in. BGE-M3 non è una dipendenza obbligatoria del viewer o di
|
|
137
|
-
ChatNTC. Vedere la
|
|
138
|
-
[documentazione semantic](../docs/chatntc-semantic-index.md).
|
|
70
|
+
Il PDF ufficiale è un ausilio locale di debug e non entra nel build pubblico o
|
|
71
|
+
nel package.
|
|
139
72
|
|
|
140
73
|
## Sviluppo e verifica
|
|
141
74
|
|
|
142
75
|
```bash
|
|
143
|
-
npm
|
|
76
|
+
npm run typecheck
|
|
144
77
|
npm run lint
|
|
145
78
|
npm test
|
|
146
79
|
npm run check
|
|
@@ -148,11 +81,11 @@ npm run pack:verify
|
|
|
148
81
|
npm run test:consumer
|
|
149
82
|
```
|
|
150
83
|
|
|
151
|
-
`check` costruisce app e libreria ed esegue test viewer
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
84
|
+
`check` costruisce app e libreria ed esegue i test del viewer e del boundary.
|
|
85
|
+
`pack:verify` mostra il contenuto del tarball. `test:consumer` crea tarball
|
|
86
|
+
reali dei due package, li installa in una nuova app Next e verifica l'API
|
|
87
|
+
pubblica del viewer, inclusa l'integrazione tramite `auxiliaryPanel`.
|
|
155
88
|
|
|
156
|
-
Il tarball
|
|
157
|
-
manifest.
|
|
158
|
-
|
|
89
|
+
Il tarball contiene soltanto `package-dist/`, README, licenza, notice e
|
|
90
|
+
manifest. Restano fuori `app/`, test, PDF, corpus completo, `.env` e output
|
|
91
|
+
standalone.
|
package/package-dist/styles.css
CHANGED
|
@@ -33,9 +33,6 @@ body:has(> .scv-root) { overflow: hidden; }
|
|
|
33
33
|
--scv-paper: #f6f7fb;
|
|
34
34
|
--scv-panel: #ffffff;
|
|
35
35
|
--scv-line: #d9deea;
|
|
36
|
-
--scv-chat-surface: #f1f3f6;
|
|
37
|
-
--scv-chat-input: #ffffff;
|
|
38
|
-
--scv-chat-row-hover: #eef0f4;
|
|
39
36
|
--scv-danger: #c92f3b;
|
|
40
37
|
--scv-circular: #f0f3fb;
|
|
41
38
|
--scv-amber: #9a671e;
|
|
@@ -345,7 +342,7 @@ body:has(> .scv-root) { overflow: hidden; }
|
|
|
345
342
|
.scv-root .formula-asset { padding: 4px 8px 3px; }
|
|
346
343
|
.scv-root .formula-row { display: flex; align-items: center; gap: 14px; }
|
|
347
344
|
.scv-root .formula-scroll, .scv-root .table-scroll { max-width: 100%; overflow-x: auto; }
|
|
348
|
-
.scv-root .formula-scroll, .scv-root .table-scroll
|
|
345
|
+
.scv-root .formula-scroll, .scv-root .table-scroll { overscroll-behavior-inline: contain; scrollbar-width: thin; }
|
|
349
346
|
.scv-root .formula-scroll { flex: 1 1 auto; min-width: 0; padding: 2px 0 4px; font-size: calc(var(--scv-base-font-size) * 0.9846); }
|
|
350
347
|
.scv-root .formula-scroll .katex-display { margin: .5em 0; }
|
|
351
348
|
.scv-root .formula-number { flex: 0 0 auto; margin-left: auto; color: var(--scv-primary-dark); font-family: "Tinos", serif; font-size: var(--scv-font-size-12); font-variant-numeric: lining-nums; white-space: nowrap; }
|
|
@@ -578,9 +575,6 @@ body:has(> .scv-root) { overflow: hidden; }
|
|
|
578
575
|
--scv-paper: #10141e;
|
|
579
576
|
--scv-panel: #1b2130;
|
|
580
577
|
--scv-line: #354057;
|
|
581
|
-
--scv-chat-surface: #151a25;
|
|
582
|
-
--scv-chat-input: #242c3c;
|
|
583
|
-
--scv-chat-row-hover: #2a3242;
|
|
584
578
|
--scv-danger: #ff707a;
|
|
585
579
|
--scv-circular: #20283b;
|
|
586
580
|
--scv-amber: #f0c976;
|
|
@@ -651,10 +645,6 @@ body:has(> .scv-root) { overflow: hidden; }
|
|
|
651
645
|
|
|
652
646
|
@keyframes scv-spin { to { transform: rotate(360deg); } }
|
|
653
647
|
@keyframes scv-shimmer { to { background-position: -200% 0; } }
|
|
654
|
-
@keyframes scv-chat-answer-enter {
|
|
655
|
-
from { opacity: 0; transform: translateY(6px); clip-path: inset(0 0 10% 0); }
|
|
656
|
-
to { opacity: 1; transform: translateY(0); clip-path: inset(0); }
|
|
657
|
-
}
|
|
658
648
|
|
|
659
649
|
.scv-tool-content[hidden] { display: none; }
|
|
660
650
|
.scv-tools-toggle { position: absolute; z-index: 7; right: 64px; bottom: 18px; min-height: 42px; max-width: calc(100% - 80px); padding: 9px 13px; color: var(--scv-primary-dark); background: var(--scv-panel); border: 1px solid var(--scv-line); border-radius: 8px; box-shadow: 0 3px 12px rgb(0 0 0 / 12%); cursor: pointer; }
|
|
@@ -662,7 +652,7 @@ body:has(> .scv-root) { overflow: hidden; }
|
|
|
662
652
|
.scv-tools-dock { display: grid; grid-template-rows: auto minmax(0, 1fr); height: 100%; color: var(--scv-ink); background: var(--scv-panel); }
|
|
663
653
|
.scv-tools-header { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 7px; border-bottom: 1px solid var(--scv-line); }
|
|
664
654
|
.scv-tools-header [role="tablist"] { display: flex; gap: 4px; }
|
|
665
|
-
.scv-tools-header button
|
|
655
|
+
.scv-tools-header button { min-height: 38px; padding: 7px 10px; color: var(--scv-primary-dark); background: var(--scv-panel); border: 1px solid var(--scv-line); border-radius: 6px; font-size: 13px; cursor: pointer; }
|
|
666
656
|
.scv-tools-header button { height: 42px; min-height: 42px; }
|
|
667
657
|
.scv-tools-header [aria-selected="true"] { color: var(--scv-panel); background: var(--scv-primary); border-color: var(--scv-primary); }
|
|
668
658
|
.scv-tools-header [aria-selected="true"]:hover { background: var(--scv-primary-dark); border-color: var(--scv-primary-dark); }
|
|
@@ -670,143 +660,7 @@ body:has(> .scv-root) { overflow: hidden; }
|
|
|
670
660
|
.scv-tools-header button.scv-tools-close:hover { color: var(--scv-panel); background: var(--scv-primary); border-color: var(--scv-primary); }
|
|
671
661
|
.scv-tools-close-icon { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-width: 1.8; }
|
|
672
662
|
.scv-tools-header { position: relative; flex-wrap: wrap; }
|
|
673
|
-
.scv-ai-settings { font-size: 12px; }
|
|
674
|
-
.scv-ai-settings summary { padding: 7px; cursor: pointer; color: var(--scv-primary-dark); }
|
|
675
|
-
.scv-ai-form { position: absolute; z-index: 12; left: 6px; right: 6px; top: 100%; display: grid; gap: 7px; padding: 14px; max-height: 65vh; overflow: auto; color: var(--scv-ink); background: var(--scv-panel); border: 1px solid var(--scv-line); border-radius: 8px; box-shadow: 0 8px 24px rgb(0 0 0 / 18%); }
|
|
676
|
-
.scv-ai-form input, .scv-ai-form select { min-width: 0; width: 100%; padding: 8px; color: var(--scv-ink); text-align: left; background: var(--scv-paper); border: 1px solid var(--scv-line); border-radius: 5px; font: inherit; }
|
|
677
|
-
.scv-ai-form p, .scv-ai-form small { margin: 0; color: var(--scv-ink-soft); line-height: 1.5; }
|
|
678
|
-
.scv-ai-selection-badge { width: fit-content; max-width: 100%; padding: 5px 9px; overflow-wrap: anywhere; color: var(--scv-ink-soft); line-height: 1.35; background: color-mix(in srgb, var(--scv-paper) 82%, var(--scv-panel)); border: 1px solid var(--scv-line); border-radius: 999px; }
|
|
679
|
-
.scv-ai-field { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 10px; align-items: center; min-width: 0; }
|
|
680
|
-
.scv-ai-field label { min-width: 0; color: var(--scv-ink-soft); font-weight: 600; white-space: nowrap; }
|
|
681
|
-
.scv-ai-actions { display: flex; flex-wrap: wrap; gap: 6px; }
|
|
682
|
-
.scv-ai-actions button { display: inline-flex; min-height: 38px; align-items: center; gap: 7px; padding: 7px 10px; color: var(--scv-primary-dark); background: var(--scv-panel); border: 1px solid var(--scv-line); border-radius: 6px; font: inherit; font-size: 13px; cursor: pointer; transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease; }
|
|
683
|
-
.scv-ai-actions button:hover:not(:disabled) { background: var(--scv-primary-soft); border-color: var(--scv-primary); }
|
|
684
|
-
.scv-ai-action-icon { flex: none; width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
|
|
685
|
-
.scv-ai-form [role="alert"] { color: var(--scv-amber); }
|
|
686
|
-
.scv-ai-settings-embedded .scv-ai-form { position: static; max-height: none; padding: 0; overflow: visible; border: 0; border-radius: 0; box-shadow: none; }
|
|
687
663
|
.scv-tool-content { min-width: 0; min-height: 0; overflow: hidden; }
|
|
688
|
-
.scv-chat { display: grid; min-width: 0; grid-template-rows: minmax(100px, 1fr) auto; height: 100%; background: var(--scv-chat-surface); font-size: 14px; line-height: 1.58; }
|
|
689
|
-
.scv-chat.scv-chat-has-actions { grid-template-rows: auto minmax(100px, 1fr) auto; }
|
|
690
|
-
.scv-chat-actions { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--scv-line); }
|
|
691
|
-
.scv-chat-actions button, .scv-chat-history-actions button { display: inline-flex; min-height: 42px; align-items: center; gap: 6px; padding: 0 8px; white-space: nowrap; border-color: transparent; background: transparent; }
|
|
692
|
-
.scv-chat-actions button:hover, .scv-chat-history-actions button:hover { background: var(--scv-primary-soft); }
|
|
693
|
-
.scv-chat-control-icon { flex: none; width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
|
|
694
|
-
.scv-chat-messages { min-width: 0; min-height: 0; padding: 18px 16px 22px; overflow: auto; overflow-wrap: anywhere; overflow-anchor: none; scrollbar-color: var(--scv-line) transparent; scrollbar-width: thin; }
|
|
695
|
-
.scv-chat-empty { margin: 0; padding: 28px 4px; color: var(--scv-ink-soft); font-size: 13px; text-align: center; }
|
|
696
|
-
.scv-chat-turn { min-width: 0; max-width: 100%; scroll-margin-top: 8px; }
|
|
697
|
-
.scv-chat-turn + .scv-chat-turn { margin-top: 28px; }
|
|
698
|
-
.scv-chat-question { width: fit-content; max-width: min(88%, 64ch); margin-left: auto; padding: 9px 12px; overflow-anchor: auto; border: 1px solid color-mix(in srgb, var(--scv-primary) 45%, var(--scv-line)); border-radius: 14px 14px 4px; background: var(--scv-primary-soft); }
|
|
699
|
-
.scv-chat-question small { display: block; margin-bottom: 3px; color: var(--scv-primary-dark); font-size: 10px; }
|
|
700
|
-
.scv-chat-question p { margin: 0; white-space: pre-wrap; }
|
|
701
|
-
.scv-chat-answer { min-width: 0; max-width: 100%; padding: 18px 1px 2px; }
|
|
702
|
-
.scv-chat-answer-enter { animation: scv-chat-answer-enter 380ms cubic-bezier(.2, .72, .24, 1) both; }
|
|
703
|
-
.scv-chat-classification { display: inline-block; padding: 3px 8px; font-size: 11px; border: 1px solid var(--scv-line); border-radius: 20px; color: var(--scv-ink-soft); }
|
|
704
|
-
.scv-chat-classification[data-classification="interpretation"], .scv-chat-classification[data-classification="no-direct-reference"] { color: var(--scv-amber); background: var(--scv-amber-soft); border-color: transparent; }
|
|
705
|
-
.scv-chat-markdown { width: 100%; max-width: 100%; margin-top: 13px; color: var(--scv-ink); font-size: 14px; line-height: 1.68; overflow-wrap: anywhere; }
|
|
706
|
-
.scv-chat-markdown-loader { min-height: 1.68em; }
|
|
707
|
-
.scv-chat-markdown > :first-child { margin-top: 0; }
|
|
708
|
-
.scv-chat-markdown > :last-child { margin-bottom: 0; }
|
|
709
|
-
.scv-chat-markdown p { margin: .72em 0; }
|
|
710
|
-
.scv-chat-markdown p, .scv-chat-markdown li { text-align: justify; text-justify: inter-word; }
|
|
711
|
-
.scv-chat-markdown p > strong:first-child { display: block; margin-bottom: .2em; text-align: start; text-justify: auto; }
|
|
712
|
-
.scv-chat-markdown h2, .scv-chat-markdown h3, .scv-chat-markdown h4 { display: block; width: 100%; margin: 1.35em 0 .45em; clear: both; color: var(--scv-ink); font-family: inherit; font-weight: 650; line-height: 1.28; letter-spacing: -.015em; text-align: start; text-justify: auto; }
|
|
713
|
-
.scv-chat-markdown h2 { font-size: 1.25em; }
|
|
714
|
-
.scv-chat-markdown h3 { font-size: 1.12em; }
|
|
715
|
-
.scv-chat-markdown h4 { font-size: 1.02em; }
|
|
716
|
-
.scv-chat-markdown strong { font-weight: 680; }
|
|
717
|
-
.scv-chat-markdown ul, .scv-chat-markdown ol { margin: .65em 0 .85em; padding-left: 1.45em; }
|
|
718
|
-
.scv-chat-markdown li { margin: .24em 0; padding-left: .1em; }
|
|
719
|
-
.scv-chat-markdown li::marker { color: var(--scv-primary); }
|
|
720
|
-
.scv-chat-markdown blockquote { margin: .9em 0; padding: .05em 0 .05em .9em; color: var(--scv-ink-soft); border-left: 3px solid var(--scv-line); }
|
|
721
|
-
.scv-chat-markdown blockquote p, .scv-chat-markdown blockquote li { text-align: start; text-justify: auto; }
|
|
722
|
-
.scv-chat-markdown blockquote > :first-child { margin-top: .2em; }
|
|
723
|
-
.scv-chat-markdown blockquote > :last-child { margin-bottom: .2em; }
|
|
724
|
-
.scv-chat-markdown hr { height: 1px; margin: 1.25em 0; background: var(--scv-line); border: 0; }
|
|
725
|
-
.scv-chat-markdown a { color: var(--scv-primary-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
|
|
726
|
-
.scv-chat-markdown a:hover { text-decoration-thickness: 2px; }
|
|
727
|
-
.scv-chat-markdown code { padding: .12em .34em; color: var(--scv-ink); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .9em; background: color-mix(in srgb, var(--scv-primary-soft) 58%, var(--scv-panel)); border: 1px solid var(--scv-line); border-radius: 4px; }
|
|
728
|
-
.scv-chat-markdown pre { max-width: 100%; margin: .9em 0; padding: 11px 12px; overflow-x: auto; color: var(--scv-ink); text-align: start; text-justify: auto; background: var(--scv-paper); border: 1px solid var(--scv-line); border-radius: 7px; overscroll-behavior-inline: contain; }
|
|
729
|
-
.scv-chat-markdown pre code { padding: 0; font-size: 12px; line-height: 1.55; white-space: pre; background: transparent; border: 0; }
|
|
730
|
-
.scv-chat-markdown table { display: block; width: max-content; min-width: 100%; max-width: 100%; overflow-x: auto; border-collapse: collapse; text-align: start; scrollbar-width: thin; }
|
|
731
|
-
.scv-chat-markdown th, .scv-chat-markdown td { padding: 6px 8px; border: 1px solid var(--scv-line); }
|
|
732
|
-
.scv-chat-markdown th { color: var(--scv-panel); background: var(--scv-primary-dark); }
|
|
733
|
-
.scv-chat-markdown .katex { font-size: 1.04em; text-align: initial; text-justify: auto; }
|
|
734
|
-
.scv-chat-markdown .katex-display { display: block; width: 100%; max-width: 100%; margin: 1.05em 0; padding: .5em 0 .68em; overflow-x: auto; overflow-y: hidden; font-size: 1.18em; text-align: center; scrollbar-width: thin; overscroll-behavior-inline: contain; }
|
|
735
|
-
.scv-chat-markdown .katex-display > .katex { display: inline-block; width: max-content; min-width: max-content; text-align: initial; }
|
|
736
|
-
.scv-chat-citations { margin-top: 18px; padding-top: 11px; font-size: 12px; border-top: 1px solid color-mix(in srgb, var(--scv-line) 72%, transparent); }
|
|
737
|
-
.scv-chat-citations strong { color: var(--scv-ink-soft); font-size: 11px; font-weight: 600; letter-spacing: .025em; }
|
|
738
|
-
.scv-chat-citations ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; padding: 0; list-style: none; }
|
|
739
|
-
.scv-chat-citations li { min-width: 0; max-width: 100%; }
|
|
740
|
-
.scv-chat-citations a { display: block; max-width: 100%; padding: 4px 8px; overflow-wrap: anywhere; color: var(--scv-primary-dark); line-height: 1.35; text-decoration: none; background: var(--scv-primary-soft); border: 1px solid transparent; border-radius: 999px; transition: color .16s ease, background-color .16s ease, border-color .16s ease; }
|
|
741
|
-
.scv-chat-citations a:hover { background: var(--scv-panel); border-color: var(--scv-primary); }
|
|
742
|
-
.scv-chat-loading { min-height: 154px; padding: 17px 1px 9px; color: var(--scv-ink-soft); }
|
|
743
|
-
.scv-chat-loading-label { display: block; margin-bottom: 13px; font-size: 11px; }
|
|
744
|
-
.scv-chat-loading-lines { display: grid; gap: 9px; width: min(100%, 62ch); }
|
|
745
|
-
.scv-chat-loading-lines i { display: block; height: 10px; background: linear-gradient(100deg, color-mix(in srgb, var(--scv-line) 72%, transparent) 25%, color-mix(in srgb, var(--scv-primary-soft) 88%, var(--scv-panel)) 45%, color-mix(in srgb, var(--scv-line) 72%, transparent) 65%); background-size: 220% 100%; border-radius: 999px; animation: scv-shimmer 1.8s ease-in-out infinite; }
|
|
746
|
-
.scv-chat-loading-lines i:nth-child(2) { width: 94%; }
|
|
747
|
-
.scv-chat-loading-lines i:nth-child(3) { width: 87%; }
|
|
748
|
-
.scv-chat-loading-lines i:nth-child(4) { width: 58%; }
|
|
749
|
-
.scv-chat-meta { color: var(--scv-ink-soft); font-size: 12px; }
|
|
750
|
-
.scv-chat-error { padding: 10px; color: var(--scv-amber); background: var(--scv-amber-soft); border-radius: 6px; }
|
|
751
|
-
.scv-chat-warnings { margin-top: 12px; font-size: 12px; color: var(--scv-ink-soft); }
|
|
752
|
-
.scv-chat-warnings summary { cursor: pointer; color: var(--scv-amber); }
|
|
753
|
-
.scv-chat-warnings ul { padding-left: 18px; }
|
|
754
|
-
.scv-chat-composer { flex: none; padding: 10px 16px max(10px, env(safe-area-inset-bottom)); border-top: 1px solid var(--scv-line); background: var(--scv-chat-surface); }
|
|
755
|
-
.scv-chat-composer-bar { position: relative; display: flex; min-width: 0; align-items: flex-end; border: 1px solid var(--scv-line); border-radius: 16px; background: var(--scv-chat-input); transition: border-color 150ms ease, box-shadow 150ms ease; }
|
|
756
|
-
.scv-chat-composer-bar:focus-within { border-color: var(--scv-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--scv-primary) 16%, transparent); }
|
|
757
|
-
.scv-chat textarea { display: block; width: 100%; min-height: 44px; max-height: min(33dvh, 240px); resize: none; padding: 10px 52px 10px 13px; overflow: hidden; border: 0; outline: 0; border-radius: inherit; color: var(--scv-ink); background: transparent; font: inherit; line-height: 22px; transition: height 150ms ease; scrollbar-color: var(--scv-line) transparent; scrollbar-width: thin; }
|
|
758
|
-
.scv-chat textarea::placeholder { color: var(--scv-ink-soft); opacity: .9; }
|
|
759
|
-
.scv-chat button.scv-chat-action-button { position: absolute; right: 4px; bottom: 3px; display: grid; width: 38px; min-width: 38px; min-height: 38px; padding: 0; place-items: center; color: var(--scv-panel); background: var(--scv-primary-dark); border: 0; border-radius: 12px; }
|
|
760
|
-
.scv-chat button.scv-chat-action-button:hover:not(:disabled) { filter: brightness(1.08); }
|
|
761
|
-
.scv-chat-action-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
|
|
762
|
-
.scv-chat-stop-icon { width: 10px; height: 10px; background: currentColor; border-radius: 2px; }
|
|
763
|
-
.scv-chat-disclaimer { margin: 7px auto 0; color: var(--scv-ink-soft); font-size: 10px; line-height: 1.35; text-align: center; }
|
|
764
|
-
.scv-chat button:disabled, .scv-tools-toggle:disabled { opacity: .5; cursor: default; }
|
|
765
|
-
.scv-chat-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
|
|
766
|
-
.scv-chat-history-shell { display: flex; flex-direction: column; height: 100%; min-height: 0; color: var(--scv-ink); background: var(--scv-panel); font-size: 12px; }
|
|
767
|
-
.scv-chat-history-actions { display: flex; min-width: 0; align-items: center; gap: 4px; padding: 7px 10px; overflow-x: auto; border-bottom: 1px solid var(--scv-line); scrollbar-width: thin; }
|
|
768
|
-
.scv-chat-history-actions button { flex: none; font-size: 11px; }
|
|
769
|
-
.scv-chat-history-actions button[aria-expanded="true"] { color: var(--scv-panel); background: var(--scv-primary); border-color: var(--scv-primary); }
|
|
770
|
-
.scv-chat-history-actions button[aria-expanded="true"]:hover { background: var(--scv-primary-dark); border-color: var(--scv-primary-dark); }
|
|
771
|
-
.scv-chat-history-actions > span { min-width: 0; margin-left: auto; overflow: hidden; color: var(--scv-ink-soft); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
|
|
772
|
-
.scv-chat-history-title { display: flex; min-height: 45px; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 14px; background: var(--scv-chat-surface); border-bottom: 1px solid var(--scv-line); }
|
|
773
|
-
.scv-chat-history-title strong { min-width: 0; overflow: hidden; font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
|
|
774
|
-
.scv-chat-history-shell button { padding: 5px 8px; color: var(--scv-primary-dark); background: var(--scv-panel); border: 1px solid var(--scv-line); border-radius: 5px; font: inherit; cursor: pointer; }
|
|
775
|
-
.scv-chat-history-shell button:disabled { opacity: .5; cursor: default; }
|
|
776
|
-
.scv-chat-history-content { flex: 1; min-height: 0; background: var(--scv-chat-surface); }
|
|
777
|
-
.scv-chat-history-accordion { display: grid; flex: none; grid-template-rows: 0fr; visibility: hidden; opacity: 0; border-bottom: 0 solid var(--scv-line); transition: grid-template-rows 160ms ease, opacity 130ms ease, visibility 0s linear 160ms, border-width 160ms ease; }
|
|
778
|
-
.scv-chat-history-accordion[data-expanded="true"] { grid-template-rows: 1fr; visibility: visible; opacity: 1; border-bottom-width: 1px; transition-delay: 0s; }
|
|
779
|
-
.scv-chat-history-list { min-height: 0; max-height: min(30dvh, 230px); overflow: auto; padding: 0 12px; scrollbar-color: var(--scv-line) transparent; scrollbar-width: thin; transition: padding 160ms ease; }
|
|
780
|
-
.scv-chat-history-accordion[data-expanded="true"] .scv-chat-history-list { padding-block: 8px; }
|
|
781
|
-
.scv-chat-settings-accordion { display: grid; flex: none; grid-template-rows: 0fr; visibility: hidden; opacity: 0; border-bottom: 0 solid var(--scv-line); transition: grid-template-rows 160ms ease, opacity 130ms ease, visibility 0s linear 160ms, border-width 160ms ease; }
|
|
782
|
-
.scv-chat-settings-accordion[data-expanded="true"] { grid-template-rows: 1fr; visibility: visible; opacity: 1; border-bottom-width: 1px; transition-delay: 0s; }
|
|
783
|
-
.scv-chat-settings-content { min-height: 0; max-height: min(55dvh, 480px); padding: 0 12px; overflow: auto; scrollbar-color: var(--scv-line) transparent; scrollbar-width: thin; transition: padding 160ms ease; }
|
|
784
|
-
.scv-chat-settings-accordion[data-expanded="true"] .scv-chat-settings-content { padding-block: 10px; }
|
|
785
|
-
.scv-chat-history-list ul { margin: 0; padding: 0; list-style: none; }
|
|
786
|
-
.scv-chat-history-list li { display: flex; gap: 5px; margin-bottom: 5px; border-radius: 6px; transition: background-color 140ms ease; }
|
|
787
|
-
.scv-chat-history-list li:hover { background: var(--scv-chat-row-hover); }
|
|
788
|
-
.scv-chat-history-list li > button { background: transparent; border-color: transparent; }
|
|
789
|
-
.scv-chat-history-list li > button:first-child { display: flex; flex: 1; min-width: 0; justify-content: space-between; align-items: center; gap: 8px; text-align: left; }
|
|
790
|
-
.scv-chat-history-list li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
791
|
-
.scv-chat-history-list time { flex-shrink: 0; font-size: 10px; color: var(--scv-ink-soft); }
|
|
792
|
-
.scv-chat-history-list [aria-current="true"] { background: var(--scv-primary-soft); border-color: var(--scv-primary); }
|
|
793
|
-
.scv-chat-history-list li:hover > button:first-child { background: transparent; border-color: transparent; }
|
|
794
|
-
.scv-chat-history-shell button.scv-chat-history-delete { display: grid; flex: none; width: 32px; min-width: 32px; min-height: 32px; padding: 0; place-items: center; color: var(--scv-ink-soft); background: transparent; border-color: transparent; }
|
|
795
|
-
.scv-chat-history-delete:hover:not(:disabled) { color: var(--scv-danger); background: transparent; border-color: transparent; }
|
|
796
|
-
.scv-chat-delete-icon { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.75; }
|
|
797
|
-
.scv-chat-history-title form { width: 100%; }
|
|
798
|
-
.scv-chat-history-title input { width: 100%; min-width: 0; padding: 5px 7px; color: var(--scv-ink); background: var(--scv-chat-input); border: 1px solid var(--scv-primary); border-radius: 5px; font: inherit; font-size: 14px; font-weight: 600; }
|
|
799
|
-
.scv-chat-history-shell button.scv-chat-rename-button { display: grid; flex: none; width: 32px; min-height: 32px; padding: 0; place-items: center; color: var(--scv-ink-soft); background: transparent; border-color: transparent; }
|
|
800
|
-
.scv-chat-rename-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
|
|
801
|
-
.scv-chat-rename-button:hover:not(:disabled) { color: var(--scv-primary-dark); background: var(--scv-primary-soft); }
|
|
802
|
-
.scv-chat-history-error { padding: 8px 12px; max-height: 180px; overflow: auto; color: var(--scv-amber); background: var(--scv-amber-soft); }
|
|
803
|
-
.scv-chat-history-error p, .scv-chat-history-confirm p { margin: 0 0 6px; }
|
|
804
|
-
.scv-chat-history-confirm { margin-top: 8px; padding: 8px; background: var(--scv-amber-soft); border-radius: 5px; }
|
|
805
|
-
.scv-chat-corpus-warning { padding: 7px 9px; color: var(--scv-amber); background: var(--scv-amber-soft); border-radius: 5px; font-size: 12px; }
|
|
806
|
-
.scv-chat-reference-warning { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; padding: 7px 9px; color: var(--scv-ink-soft); background: var(--scv-paper); border: 1px solid var(--scv-line); border-radius: 5px; font-size: 12px; }
|
|
807
|
-
.scv-chat-reference-warning button { flex: none; border: 0; padding: 0 2px; color: inherit; background: transparent; font: inherit; font-size: 16px; line-height: 1; cursor: pointer; }
|
|
808
|
-
.scv-chat-provenance { overflow-wrap: anywhere; }
|
|
809
|
-
.scv-chat-provenance dd { margin: 0 0 6px; }
|
|
810
664
|
|
|
811
665
|
/* Mobile first: the text keeps its width while the side panes slide over it. */
|
|
812
666
|
.scv-search-toolbar { --scv-toolbar-button-size: 44px; grid-template-columns: auto minmax(0, 1fr) 44px 44px; }
|
|
@@ -824,8 +678,8 @@ body:has(> .scv-root) { overflow: hidden; }
|
|
|
824
678
|
.scv-text-pane { height: 100%; min-height: 0; }
|
|
825
679
|
.scv-root .scv-mobile-index-toggle, .scv-tools-toggle { position: absolute; z-index: 9; top: max(8px, env(safe-area-inset-top)); display: grid; width: 44px; min-width: 44px; height: 44px; min-height: 44px; place-items: center; padding: 0; color: var(--scv-primary-dark); font-weight: 800; background: var(--scv-panel); border: 1px solid var(--scv-line); border-radius: 6px; box-shadow: 0 3px 12px rgb(0 0 0 / 12%); cursor: pointer; }
|
|
826
680
|
.scv-root .scv-mobile-index-toggle { left: 8px; }
|
|
827
|
-
.scv-mobile-context { position: absolute; z-index: 8; top: max(8px, env(safe-area-inset-top)); right: 60px; left: 60px; display: grid; height: 44px; grid-template-columns: 5.5ch minmax(0, 1fr); align-items: center; gap: .3em; min-width: 0; padding: 0 9px; color: var(--scv-ink); font-size: 13px; background: color-mix(in srgb, var(--scv-panel) 78%, transparent); border: 1px solid var(--scv-line); border-radius: 6px; backdrop-filter: blur(8px); pointer-events: none; }
|
|
828
|
-
.scv-mobile-context strong { overflow: hidden; text-overflow: ellipsis; text-align: left; white-space: nowrap; font-variant-numeric: tabular-nums; }
|
|
681
|
+
.scv-mobile-context { position: absolute; z-index: 8; top: max(8px, env(safe-area-inset-top)); right: 60px; left: 60px; display: grid; height: 44px; grid-template-columns: 5.5ch minmax(0, 1fr); align-items: center; gap: .3em; min-width: 0; padding: 0 9px; color: var(--scv-ink); font-size: 13px; background: color-mix(in srgb, var(--scv-panel) 78%, transparent); border: 1px solid var(--scv-line); border-radius: 6px; backdrop-filter: blur(8px); pointer-events: none; }
|
|
682
|
+
.scv-mobile-context strong { overflow: hidden; text-overflow: ellipsis; text-align: left; white-space: nowrap; font-variant-numeric: tabular-nums; }
|
|
829
683
|
.scv-mobile-context span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
830
684
|
.scv-mobile-index-toggle svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
|
|
831
685
|
.scv-tools-toggle { right: 8px; bottom: auto; max-width: none; font-size: 14px; }
|
|
@@ -842,27 +696,11 @@ body:has(> .scv-root) { overflow: hidden; }
|
|
|
842
696
|
.scv-scroll-overlay span { display: none; }
|
|
843
697
|
.scv-root .scv-copy-asset { width: 36px; height: 36px; opacity: 1; transform: none; }
|
|
844
698
|
.scv-root .figure-asset.scv-copyable-asset { padding-top: 46px; }
|
|
845
|
-
.scv-tools-header button
|
|
699
|
+
.scv-tools-header button { min-height: 44px; }
|
|
846
700
|
.scv-tools-header button.scv-tools-close { width: 44px; min-width: 44px; height: 44px; min-height: 44px; }
|
|
847
701
|
.scv-tools-header { flex-wrap: nowrap; overflow-x: auto; padding: 6px 8px; }
|
|
848
|
-
.scv-tools-header [role="tablist"] { flex: none; }
|
|
849
|
-
.scv-
|
|
850
|
-
.scv-chat-history-actions button { flex: 1 1 0; min-width: 0; padding-inline: 6px; }
|
|
851
|
-
.scv-chat button.scv-chat-action-button, .scv-chat-history-shell button.scv-chat-rename-button { width: 44px; min-width: 44px; min-height: 44px; }
|
|
852
|
-
.scv-chat button.scv-chat-action-button { right: 3px; bottom: 3px; }
|
|
853
|
-
.scv-chat textarea { min-height: 50px; padding-right: 54px; }
|
|
854
|
-
.scv-chat-composer { padding-bottom: max(10px, env(safe-area-inset-bottom)); }
|
|
855
|
-
.scv-chat-history-title { padding-block: 4px; }
|
|
856
|
-
.scv-block p, .scv-root .scv-note-content > p, .scv-root .scv-note-list-item, .scv-root .table-notes > p, .scv-label-list-content > .leading-label-description, .scv-label-list-content > .leading-math-description { text-align: left; }
|
|
857
|
-
.scv-chat-messages { padding: 14px 12px 18px; }
|
|
858
|
-
.scv-chat-question { padding: 9px 10px; }
|
|
859
|
-
.scv-chat-answer { padding-top: 14px; }
|
|
860
|
-
.scv-chat-markdown { width: 100%; font-size: 13.5px; line-height: 1.65; }
|
|
861
|
-
.scv-chat-markdown h2 { font-size: 1.18em; }
|
|
862
|
-
.scv-chat-markdown h3 { font-size: 1.09em; }
|
|
863
|
-
.scv-chat-markdown .katex-display { margin: .9em 0; }
|
|
864
|
-
.scv-chat-composer { padding: 10px 12px 12px; }
|
|
865
|
-
.scv-chat-loading { min-height: 146px; }
|
|
702
|
+
.scv-tools-header [role="tablist"] { flex: none; }
|
|
703
|
+
.scv-block p, .scv-root .scv-note-content > p, .scv-root .scv-note-list-item, .scv-root .table-notes > p, .scv-label-list-content > .leading-label-description, .scv-label-list-content > .leading-math-description { text-align: left; }
|
|
866
704
|
|
|
867
705
|
@media (max-width: 767.98px) {
|
|
868
706
|
.scv-annotation-menu { top: auto !important; right: 8px; bottom: max(8px, env(safe-area-inset-bottom)); left: 8px !important; min-width: 0; padding: 8px; border-radius: 12px; }
|
|
@@ -921,7 +759,4 @@ body:has(> .scv-root) { overflow: hidden; }
|
|
|
921
759
|
|
|
922
760
|
@media (prefers-reduced-motion: reduce) {
|
|
923
761
|
.scv-root *, .scv-root *::before, .scv-root *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
|
|
924
|
-
.scv-chat-answer-enter { animation: none; }
|
|
925
|
-
.scv-chat-loading-lines i { animation: none; background-position: 0 0; }
|
|
926
|
-
.scv-chat textarea, .scv-chat-history-accordion, .scv-chat-history-list, .scv-chat-settings-accordion, .scv-chat-settings-content { transition: none; }
|
|
927
762
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "structural-codes-viewer",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.3",
|
|
4
4
|
"description": "Reference React UI and deterministic artifact client for the structural-codes corpus.",
|
|
5
5
|
"license": "LGPL-2.1-or-later",
|
|
6
6
|
"homepage": "https://github.com/claudiopagani/structural-codes#readme",
|
|
@@ -28,27 +28,7 @@
|
|
|
28
28
|
"import": "./package-dist/corpusData.js",
|
|
29
29
|
"default": "./package-dist/corpusData.js"
|
|
30
30
|
},
|
|
31
|
-
"./chatntc": {
|
|
32
|
-
"types": "./package-dist/chatntc/index.d.ts",
|
|
33
|
-
"import": "./package-dist/chatntc/index.js",
|
|
34
|
-
"default": "./package-dist/chatntc/index.js"
|
|
35
|
-
},
|
|
36
|
-
"./chatntc/viewer-artifacts": {
|
|
37
|
-
"types": "./package-dist/chatntc/viewerArtifacts.d.ts",
|
|
38
|
-
"import": "./package-dist/chatntc/viewerArtifacts.js",
|
|
39
|
-
"default": "./package-dist/chatntc/viewerArtifacts.js"
|
|
40
|
-
},
|
|
41
31
|
"./package.json": "./package.json",
|
|
42
|
-
"./chatntc-ui": {
|
|
43
|
-
"types": "./package-dist/chatntc-ui/index.d.ts",
|
|
44
|
-
"import": "./package-dist/chatntc-ui/index.js",
|
|
45
|
-
"default": "./package-dist/chatntc-ui/index.js"
|
|
46
|
-
},
|
|
47
|
-
"./chatntc-history": {
|
|
48
|
-
"types": "./package-dist/chatntc-history/index.d.ts",
|
|
49
|
-
"import": "./package-dist/chatntc-history/index.js",
|
|
50
|
-
"default": "./package-dist/chatntc-history/index.js"
|
|
51
|
-
},
|
|
52
32
|
"./annotations": {
|
|
53
33
|
"types": "./package-dist/annotations/index.d.ts",
|
|
54
34
|
"import": "./package-dist/annotations/index.js",
|
|
@@ -66,29 +46,13 @@
|
|
|
66
46
|
"test:consumer": "node scripts/test-consumer.mjs",
|
|
67
47
|
"typecheck": "tsc --noEmit -p tsconfig.json",
|
|
68
48
|
"dev": "npm run sync:corpus && vinext dev",
|
|
69
|
-
"dev:chatntc": "npm run sync:corpus && node scripts/dev-chatntc.mjs",
|
|
70
49
|
"build": "npm run sync:corpus && vinext build",
|
|
71
50
|
"start": "vinext start",
|
|
72
51
|
"performance:baseline": "npm run build && node scripts/performance-baseline.mjs",
|
|
73
52
|
"performance:search": "npm run sync:corpus && node scripts/search-performance.mjs",
|
|
74
|
-
"test
|
|
75
|
-
"build:chatntc-test": "tsc -p tsconfig.chatntc-test.json",
|
|
76
|
-
"test:chatntc-server": "npm run sync:corpus && npm run build:chatntc-test && node --conditions=react-server --test tests/chatntc-server.test.mjs tests/chatntc-semantic-retrieval.test.mjs tests/chatntc-semantic-runtime.test.mjs tests/chatntc-rank-fusion.test.mjs",
|
|
77
|
-
"build:chatntc-retrieval-benchmark": "tsc -p tsconfig.retrieval-benchmark.json",
|
|
78
|
-
"chatntc:retrieval:benchmark": "npm run sync:corpus && npm run build:chatntc-retrieval-benchmark && node --conditions=react-server .local/chatntc-retrieval-benchmark-tool/scripts/benchmark-chatntc-retrieval.js",
|
|
79
|
-
"test:chatntc-retrieval-benchmark": "npm run build:chatntc-test && node --conditions=react-server --test tests/chatntc-retrieval-benchmark.test.mjs",
|
|
80
|
-
"build:chatntc-semantic-tool": "tsc -p tsconfig.semantic-tool.json",
|
|
81
|
-
"chatntc:semantic:tokenizer:setup": "npm run build:chatntc-semantic-tool && node .local/chatntc-semantic-tool/scripts/setup-bge-m3-tokenizer.js",
|
|
82
|
-
"chatntc:semantic:audit-lengths": "npm run sync:corpus && npm run build:chatntc-semantic-tool && node .local/chatntc-semantic-tool/scripts/audit-chatntc-semantic-lengths.js",
|
|
83
|
-
"chatntc:semantic:audit-chunks": "npm run sync:corpus && npm run build:chatntc-semantic-tool && node .local/chatntc-semantic-tool/scripts/audit-chatntc-semantic-chunks.js",
|
|
84
|
-
"chatntc:semantic:index": "npm run sync:corpus && npm run build:chatntc-semantic-tool && node .local/chatntc-semantic-tool/scripts/generate-chatntc-semantic-index.js",
|
|
85
|
-
"chatntc:semantic:validate": "npm run sync:corpus && npm run build:chatntc-semantic-tool && node .local/chatntc-semantic-tool/scripts/generate-chatntc-semantic-index.js --validate-only",
|
|
86
|
-
"test:chatntc-semantic": "npm run sync:corpus && npm run build:chatntc-semantic-tool && node --test tests/chatntc-semantic.test.mjs tests/chatntc-bge-m3-http-embedding.test.mjs",
|
|
87
|
-
"test": "npm run build:library && npm run build && node --test tests/rendered-html.test.mjs tests/comparison-viewer.test.mjs tests/performance-phase-one.test.mjs tests/global-scrubber.test.mjs tests/search-phase-two.test.mjs tests/cross-reference-phase-three.test.mjs tests/lazy-navigation-consolidation.test.mjs tests/package-boundary.test.mjs tests/ntc-latex-corpus.test.mjs tests/chatntc-core.test.mjs tests/chatntc-artifacts.test.mjs tests/chatntc-route.test.mjs tests/chatntc-history.test.mjs tests/annotations.test.mjs && npm run test:chatntc-semantic && npm run build:chatntc-test && node --conditions=react-server --test tests/chatntc-server.test.mjs tests/chatntc-semantic-retrieval.test.mjs tests/chatntc-semantic-runtime.test.mjs tests/chatntc-rank-fusion.test.mjs tests/chatntc-retrieval-benchmark.test.mjs && npm run test:chatntc-ui",
|
|
53
|
+
"test": "npm run build:library && npm run build && node --test tests/*.test.mjs",
|
|
88
54
|
"lint": "eslint . --ignore-pattern dist --ignore-pattern package-dist --ignore-pattern .next --max-warnings 0",
|
|
89
|
-
"check": "npm run lint && npm test",
|
|
90
|
-
"test:chatntc-ui": "npm run sync:corpus && node scripts/build-chatntc-ui-test.mjs && node --test tests/chatntc-ui.test.mjs",
|
|
91
|
-
"test:chatntc-history": "npm run build:library && node --test tests/chatntc-history.test.mjs",
|
|
55
|
+
"check": "npm run typecheck && npm run lint && npm test",
|
|
92
56
|
"test:annotations": "npm run build:library && node --test tests/annotations.test.mjs"
|
|
93
57
|
},
|
|
94
58
|
"peerDependencies": {
|
|
@@ -97,14 +61,9 @@
|
|
|
97
61
|
},
|
|
98
62
|
"dependencies": {
|
|
99
63
|
"@fontsource/tinos": "^5.3.0",
|
|
100
|
-
"katex": "^0.16.22"
|
|
101
|
-
"react-markdown": "^10.1.0",
|
|
102
|
-
"rehype-katex": "^7.0.1",
|
|
103
|
-
"remark-gfm": "^4.0.1",
|
|
104
|
-
"remark-math": "^6.0.0"
|
|
64
|
+
"katex": "^0.16.22"
|
|
105
65
|
},
|
|
106
66
|
"devDependencies": {
|
|
107
|
-
"@huggingface/tokenizers": "^0.2.0",
|
|
108
67
|
"structural-codes": "file:..",
|
|
109
68
|
"next": "16.3.6",
|
|
110
69
|
"pdfjs-dist": "6.2.108",
|
|
@@ -120,7 +79,6 @@
|
|
|
120
79
|
"fake-indexeddb": "6.2.5",
|
|
121
80
|
"jsdom": "26.1.0",
|
|
122
81
|
"react-server-dom-webpack": "19.2.8",
|
|
123
|
-
"server-only": "0.0.1",
|
|
124
82
|
"typescript": "5.9.3",
|
|
125
83
|
"vinext": "1.0.0-beta.8",
|
|
126
84
|
"vite": "8.1.5"
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { ChatNTCCanonicalizationResult, ChatNTCEvidencePackage, ChatNTCProviderOutput, ChatNTCRepository, ChatNTCVerifiedReference } from "./types.js";
|
|
2
|
-
interface TextualReference {
|
|
3
|
-
text: string;
|
|
4
|
-
path: string;
|
|
5
|
-
}
|
|
6
|
-
/** Internal observation used by the server pipeline; it is not part of the public response. */
|
|
7
|
-
export interface ChatNTCResolvedTextualReference extends TextualReference {
|
|
8
|
-
target: ChatNTCVerifiedReference;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Converts a small provider response into the rich public response. Explicit references in
|
|
12
|
-
* prose and in references[] are resolved against the repository; provider metadata is never trusted.
|
|
13
|
-
*/
|
|
14
|
-
export declare function canonicalizeChatNTCResponse(output: ChatNTCProviderOutput, evidence: ChatNTCEvidencePackage, repository: ChatNTCRepository, observeResolvedReference?: (reference: ChatNTCResolvedTextualReference) => void): Promise<ChatNTCCanonicalizationResult>;
|
|
15
|
-
export {};
|