@loomcycle/explorer 0.12.0 → 0.14.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/dist/components/DocumentChunkTree.d.ts +2 -1
- package/dist/components/TransferModal.d.ts +14 -0
- package/dist/index.cjs +6 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +1134 -850
- package/dist/index.js.map +1 -1
- package/dist/lib/colorScheme.d.ts +9 -1
- package/dist/lib/dataLayer.d.ts +2 -0
- package/dist/lib/transfer.d.ts +61 -0
- package/package.json +1 -1
|
@@ -22,5 +22,13 @@ export declare const DEFAULT_SCHEME: ColorScheme;
|
|
|
22
22
|
export declare function effectiveScheme(scheme: ColorScheme | undefined): ColorScheme;
|
|
23
23
|
export declare function docColor(type: string | undefined, status: string | undefined, scheme: ColorScheme): string | undefined;
|
|
24
24
|
export declare function chunkColor(status: string | undefined, scheme: ColorScheme): string | undefined;
|
|
25
|
-
export declare function
|
|
25
|
+
export declare function chunkInheritsDocColor(scheme: ColorScheme): boolean;
|
|
26
|
+
export declare function hexToTint(hex: string, alpha?: number): string | undefined;
|
|
26
27
|
export declare function tintStyle(color: string | undefined): CSSProperties | undefined;
|
|
28
|
+
export declare function washStyle(color: string | undefined): CSSProperties | undefined;
|
|
29
|
+
export declare function chunkRowStyle(opts: {
|
|
30
|
+
status: string | undefined;
|
|
31
|
+
isRoot: boolean;
|
|
32
|
+
documentColor: string | undefined;
|
|
33
|
+
scheme: ColorScheme | null;
|
|
34
|
+
}): CSSProperties | undefined;
|
package/dist/lib/dataLayer.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import type { AcceptClassificationAnswer, Backlink, BrowseScope, CanvasDoc, Chun
|
|
|
4
4
|
import type { DocSummary, DocumentMeta } from "./colorScheme";
|
|
5
5
|
import type { AssetFetch, JsonPost } from "./createClient";
|
|
6
6
|
import type { RulingCounts, RulingRequest } from "./ruling";
|
|
7
|
+
import { type TransferRequest, type TransferResult } from "./transfer";
|
|
7
8
|
export interface ChunkPatch {
|
|
8
9
|
body?: string;
|
|
9
10
|
fields?: unknown;
|
|
@@ -57,6 +58,7 @@ export interface ExplorerDataLayer {
|
|
|
57
58
|
path?: string;
|
|
58
59
|
}>;
|
|
59
60
|
documentDelete(id: string, scope: DocScope, browse?: BrowseScope): Promise<unknown>;
|
|
61
|
+
documentsTransfer?(req: TransferRequest, browse?: BrowseScope): Promise<TransferResult>;
|
|
60
62
|
documentGet(id: string, scope: DocScope, browse?: BrowseScope): Promise<DocumentMeta>;
|
|
61
63
|
documentsSummary(opts: {
|
|
62
64
|
documentIds?: string[];
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { DocScope } from "../types";
|
|
2
|
+
export type TransferOp = "copy" | "move";
|
|
3
|
+
export interface TransferRequest {
|
|
4
|
+
op: TransferOp;
|
|
5
|
+
scope: DocScope;
|
|
6
|
+
toScope: DocScope;
|
|
7
|
+
documentId?: string;
|
|
8
|
+
underPath?: string;
|
|
9
|
+
from: string;
|
|
10
|
+
to: string;
|
|
11
|
+
dropDangling?: boolean;
|
|
12
|
+
dryRun: boolean;
|
|
13
|
+
expectCount?: number;
|
|
14
|
+
}
|
|
15
|
+
export interface TransferRefusal {
|
|
16
|
+
document_id: string;
|
|
17
|
+
code: string;
|
|
18
|
+
detail?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface TransferDangling {
|
|
21
|
+
statement_id: string;
|
|
22
|
+
kind: string;
|
|
23
|
+
from: string;
|
|
24
|
+
to: string;
|
|
25
|
+
outside: "from" | "to" | "evidence" | string;
|
|
26
|
+
}
|
|
27
|
+
export interface TransferResult {
|
|
28
|
+
dry_run: boolean;
|
|
29
|
+
documents: {
|
|
30
|
+
id: string;
|
|
31
|
+
new_id?: string;
|
|
32
|
+
paths: string[];
|
|
33
|
+
resumed?: boolean;
|
|
34
|
+
}[];
|
|
35
|
+
counts: Record<string, number>;
|
|
36
|
+
refused: TransferRefusal[];
|
|
37
|
+
refused_count?: number;
|
|
38
|
+
dangling: TransferDangling[];
|
|
39
|
+
dangling_count: number;
|
|
40
|
+
blocked_by?: string;
|
|
41
|
+
dropped?: number;
|
|
42
|
+
moved?: string[];
|
|
43
|
+
to_finish?: string[];
|
|
44
|
+
unfinished?: {
|
|
45
|
+
document_id: string;
|
|
46
|
+
code: string;
|
|
47
|
+
detail?: string;
|
|
48
|
+
}[];
|
|
49
|
+
name_failures?: {
|
|
50
|
+
document_id: string;
|
|
51
|
+
path: string;
|
|
52
|
+
error: string;
|
|
53
|
+
}[];
|
|
54
|
+
body_failures?: number;
|
|
55
|
+
statements_failed?: number;
|
|
56
|
+
statement_error?: string;
|
|
57
|
+
}
|
|
58
|
+
export declare function transferInput(r: TransferRequest): Record<string, unknown>;
|
|
59
|
+
export declare function transferProblem(r: TransferRequest): string | null;
|
|
60
|
+
export declare function transferSummary(op: TransferOp, res: TransferResult): string[];
|
|
61
|
+
export declare function transferBlocked(op: TransferOp, res: TransferResult, dropDangling: boolean): boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loomcycle/explorer",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Embeddable React Path VFS + chunked-graph Document browser for the loomcycle agentic runtime (RFC AL / AK) — a themeable, standalone package: a dirent tree with folder/document CRUD and a chunk-tree Document viewer/editor.",
|
|
6
6
|
"license": "Apache-2.0",
|