@loomcycle/explorer 0.7.0 → 0.11.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.
Files changed (37) hide show
  1. package/dist/DocumentViewer.d.ts +6 -0
  2. package/dist/PathExplorer.d.ts +2 -1
  3. package/dist/components/ChunkTarget.d.ts +9 -0
  4. package/dist/components/Classification.d.ts +14 -0
  5. package/dist/components/Connections.d.ts +6 -1
  6. package/dist/components/CrossReferences.d.ts +20 -1
  7. package/dist/components/DocTrail.d.ts +6 -0
  8. package/dist/components/DocUnavailable.d.ts +6 -0
  9. package/dist/components/DocumentViewerBody.d.ts +10 -1
  10. package/dist/components/IdCopy.d.ts +7 -0
  11. package/dist/components/Mermaid.d.ts +3 -1
  12. package/dist/components/PathTree.d.ts +9 -6
  13. package/dist/components/ProposalReview.d.ts +23 -0
  14. package/dist/components/Splitter.d.ts +2 -1
  15. package/dist/components/Statement.d.ts +9 -0
  16. package/dist/components/SubjectTypeModal.d.ts +9 -0
  17. package/dist/index.cjs +14 -11
  18. package/dist/index.cjs.map +1 -1
  19. package/dist/index.d.ts +8 -4
  20. package/dist/index.js +4412 -2114
  21. package/dist/index.js.map +1 -1
  22. package/dist/lib/bulkReview.d.ts +23 -0
  23. package/dist/lib/chunkAncestry.d.ts +2 -0
  24. package/dist/lib/classify.d.ts +31 -0
  25. package/dist/lib/clipboard.d.ts +1 -0
  26. package/dist/lib/createClient.d.ts +15 -0
  27. package/dist/lib/dataLayer.d.ts +66 -9
  28. package/dist/lib/docTrail.d.ts +26 -0
  29. package/dist/lib/edgePages.d.ts +7 -0
  30. package/dist/lib/lazyPathTree.d.ts +43 -0
  31. package/dist/lib/navigator.d.ts +4 -0
  32. package/dist/lib/ruling.d.ts +114 -0
  33. package/dist/lib/statement.d.ts +13 -0
  34. package/dist/lib/subjectType.d.ts +4 -0
  35. package/dist/styles.css +558 -7
  36. package/dist/types.d.ts +130 -2
  37. package/package.json +7 -7
package/dist/types.d.ts CHANGED
@@ -28,8 +28,49 @@ export interface ChunkDetail extends ChunkRow {
28
28
  media_type: string;
29
29
  size: number;
30
30
  };
31
+ entity?: {
32
+ natural_key?: string;
33
+ };
34
+ not_announced?: string;
35
+ }
36
+ export type StatementStatus = "asserted" | "proposed" | "rejected";
37
+ export interface EdgeEvidence {
38
+ id: string;
39
+ chunk_id?: string;
40
+ session_id?: string;
41
+ event_seq?: number;
42
+ scope?: string;
43
+ natural_key?: string;
44
+ quote: string;
45
+ char_start?: number;
46
+ char_end?: number;
47
+ stale?: boolean;
48
+ created_at: number;
49
+ }
50
+ export interface StatementFields {
51
+ id?: string;
52
+ status?: StatementStatus;
53
+ method?: string;
54
+ auto?: boolean;
55
+ created_at?: number;
56
+ confidence?: number;
57
+ valid_at?: number;
58
+ invalid_at?: number;
59
+ expired_at?: number;
60
+ verified_at?: number;
61
+ actor?: string;
62
+ run_id?: string;
63
+ discriminator?: string;
64
+ ontology_version?: number;
65
+ inverse_kind?: string;
66
+ attributes?: Record<string, unknown>;
67
+ judged_at?: number;
68
+ judge_reason?: string;
69
+ judged_by?: string;
70
+ evidence?: EdgeEvidence[];
71
+ evidence_count?: number;
31
72
  }
32
- export interface DocEdge {
73
+ export interface DocEdge extends StatementFields {
33
74
  from_id: string;
34
75
  to_id: string;
35
76
  kind: string;
@@ -42,7 +83,7 @@ export interface DocEdge {
42
83
  to_status?: string;
43
84
  to_document_id?: string;
44
85
  }
45
- export interface Backlink {
86
+ export interface Backlink extends StatementFields {
46
87
  from_id: string;
47
88
  kind: string;
48
89
  auto: boolean;
@@ -81,3 +122,90 @@ export interface AssistantContext {
81
122
  subject?: string;
82
123
  onChanged?: () => void;
83
124
  }
125
+ export interface NavigatorSelection {
126
+ documentId?: string;
127
+ chunkId?: string;
128
+ path?: string;
129
+ }
130
+ export interface NavigatorContext {
131
+ scope: PathScope;
132
+ browse?: BrowseScope;
133
+ selection: NavigatorSelection;
134
+ onSelect: (sel: NavigatorSelection & {
135
+ documentId: string;
136
+ }) => void;
137
+ reloadToken: number;
138
+ maximized: boolean;
139
+ onToggleMaximize: () => void;
140
+ subject?: string;
141
+ }
142
+ export type ClassifyWrite = "report" | "propose";
143
+ export type ClassifyResult = "classified" | "proposed" | "kept" | "unclassified";
144
+ export interface ClassifyCandidate {
145
+ class: string;
146
+ quote?: string;
147
+ from?: string;
148
+ groups?: Record<string, unknown>;
149
+ share?: number;
150
+ votes?: number;
151
+ }
152
+ export interface ClassifyStep {
153
+ step: string;
154
+ candidates?: ClassifyCandidate[];
155
+ chosen?: string;
156
+ neighbours?: number;
157
+ reason?: string;
158
+ method?: string;
159
+ }
160
+ export interface ClassifyIssuer {
161
+ instance: string;
162
+ quote: string;
163
+ subject_chunk_id?: string;
164
+ }
165
+ export interface ClassifyConcept {
166
+ concept: string;
167
+ tag: string;
168
+ kind?: string;
169
+ chunk_id?: string;
170
+ share: number;
171
+ }
172
+ export interface ClassifyStatement {
173
+ id: string;
174
+ status: string;
175
+ created: boolean;
176
+ [key: string]: unknown;
177
+ }
178
+ export interface ClassifyAnswer {
179
+ document_id: string;
180
+ write: ClassifyWrite;
181
+ result: ClassifyResult;
182
+ class?: string;
183
+ live: boolean;
184
+ work_key?: string;
185
+ fields?: Record<string, unknown>;
186
+ issued_by?: ClassifyIssuer[];
187
+ concepts?: ClassifyConcept[];
188
+ steps?: ClassifyStep[];
189
+ statements?: ClassifyStatement[];
190
+ warnings?: string[];
191
+ }
192
+ export interface AcceptClassificationAnswer {
193
+ document_id: string;
194
+ type?: string;
195
+ type_pending?: boolean;
196
+ tags?: string[];
197
+ accepted_statements: string[];
198
+ skipped_statements?: string[];
199
+ skipped_type?: string;
200
+ skipped_tags?: string[];
201
+ warnings?: string[];
202
+ }
203
+ export interface ClassificationRecord {
204
+ by?: string;
205
+ at?: number;
206
+ applied_type?: string;
207
+ proposed_type?: string;
208
+ proposed_fields?: Record<string, unknown>;
209
+ proposed_tags?: string[];
210
+ statements?: string[];
211
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loomcycle/explorer",
3
- "version": "0.7.0",
3
+ "version": "0.11.0",
4
4
  "type": "module",
5
5
  "description": "Embeddable React Path VFS + chunked-graph Document browser for the loomcycle agentic runtime (RFC AL / AK) \u2014 a themeable, standalone package: a dirent tree with folder/document CRUD and a chunk-tree Document viewer/editor.",
6
6
  "license": "Apache-2.0",
@@ -50,12 +50,12 @@
50
50
  "test:watch": "vitest"
51
51
  },
52
52
  "dependencies": {
53
- "react-markdown": "^9.1.0",
53
+ "react-markdown": "^10.1.0",
54
54
  "remark-gfm": "^4.0.1"
55
55
  },
56
56
  "peerDependencies": {
57
57
  "@loomcycle/client": "^1.12.1",
58
- "mermaid": "^11.0.0",
58
+ "mermaid": "^12.2.0",
59
59
  "react": "^18.0.0 || ^19.0.0",
60
60
  "react-dom": "^18.0.0 || ^19.0.0"
61
61
  },
@@ -66,15 +66,15 @@
66
66
  },
67
67
  "devDependencies": {
68
68
  "@loomcycle/client": "^1.12.1",
69
- "@types/node": "^22.0.0",
69
+ "@types/node": "^26.6.5",
70
70
  "@types/react": "^19.0.0",
71
71
  "@types/react-dom": "^19.0.0",
72
- "@vitejs/plugin-react": "^5.0.0",
73
- "mermaid": "^11.0.0",
72
+ "@vitejs/plugin-react": "^6.1.2",
73
+ "mermaid": "^12.2.0",
74
74
  "react": "^19.0.0",
75
75
  "react-dom": "^19.0.0",
76
76
  "typescript": "^5.6.0",
77
- "vite": "^7.0.0",
77
+ "vite": "^8.3.5",
78
78
  "vitest": "^3.0.0"
79
79
  }
80
80
  }