@loomcycle/explorer 0.9.0 → 0.12.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/PathExplorer.d.ts +4 -1
- package/dist/components/Classification.d.ts +14 -0
- package/dist/components/Connections.d.ts +5 -1
- package/dist/components/CrossReferences.d.ts +7 -2
- package/dist/components/DocumentViewerBody.d.ts +6 -1
- package/dist/components/ProposalReview.d.ts +23 -0
- package/dist/components/Splitter.d.ts +2 -1
- package/dist/components/Statement.d.ts +9 -0
- package/dist/components/SubjectTypeModal.d.ts +9 -0
- package/dist/index.cjs +14 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +8 -4
- package/dist/index.js +4415 -2647
- package/dist/index.js.map +1 -1
- package/dist/lib/bulkReview.d.ts +23 -0
- package/dist/lib/chunkAncestry.d.ts +2 -0
- package/dist/lib/classify.d.ts +31 -0
- package/dist/lib/createClient.d.ts +15 -0
- package/dist/lib/dataLayer.d.ts +53 -5
- package/dist/lib/edgePages.d.ts +7 -0
- package/dist/lib/navigator.d.ts +4 -0
- package/dist/lib/ruling.d.ts +114 -0
- package/dist/lib/statement.d.ts +13 -0
- package/dist/lib/subjectType.d.ts +4 -0
- package/dist/styles.css +366 -7
- package/dist/types.d.ts +130 -2
- package/package.json +8 -8
package/dist/PathExplorer.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
|
-
import type { AssistantContext, BrowseScope, PathScope, Principal } from "./types";
|
|
2
|
+
import type { AssistantContext, BrowseScope, NavigatorContext, PathScope, Principal } from "./types";
|
|
3
|
+
import { type NavigatorMode } from "./lib/navigator";
|
|
3
4
|
import { type ExplorerDataSource } from "./components/ExplorerRoot";
|
|
4
5
|
export interface PathExplorerProps extends ExplorerDataSource {
|
|
5
6
|
theme?: "light" | "dark";
|
|
@@ -9,6 +10,8 @@ export interface PathExplorerProps extends ExplorerDataSource {
|
|
|
9
10
|
browse?: BrowseScope;
|
|
10
11
|
principal?: Principal;
|
|
11
12
|
renderAssistant?: (ctx: AssistantContext) => ReactNode;
|
|
13
|
+
renderNavigator?: (ctx: NavigatorContext) => ReactNode;
|
|
14
|
+
navigator?: NavigatorMode;
|
|
12
15
|
onError?: (e: unknown) => void;
|
|
13
16
|
}
|
|
14
17
|
export default function PathExplorer(props: PathExplorerProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { BrowseScope, ClassifyAnswer, DocScope } from "../types";
|
|
2
|
+
export interface ClassificationProps {
|
|
3
|
+
documentId: string;
|
|
4
|
+
scope: DocScope;
|
|
5
|
+
browse?: BrowseScope;
|
|
6
|
+
rootFields: unknown;
|
|
7
|
+
requestKey: number;
|
|
8
|
+
onClose: () => void;
|
|
9
|
+
onChanged: () => void;
|
|
10
|
+
}
|
|
11
|
+
export default function Classification({ documentId, scope, browse, rootFields, requestKey, onClose, onChanged, }: ClassificationProps): import("react").JSX.Element | null;
|
|
12
|
+
export declare function ClassifyAnswerView({ answer }: {
|
|
13
|
+
answer: ClassifyAnswer;
|
|
14
|
+
}): import("react").JSX.Element;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { BrowseScope, DocScope } from "../types";
|
|
2
|
+
import type { ReviewPanel } from "../lib/bulkReview";
|
|
3
|
+
export type ConnectionsReview = ReviewPanel;
|
|
2
4
|
export interface ConnectionsProps {
|
|
3
5
|
documentId: string;
|
|
4
6
|
selectedId?: string;
|
|
@@ -6,5 +8,7 @@ export interface ConnectionsProps {
|
|
|
6
8
|
browse?: BrowseScope;
|
|
7
9
|
onSelectChunk: (id: string) => void;
|
|
8
10
|
onOpenDocument?: (documentId: string, chunkId: string, title?: string) => void;
|
|
11
|
+
refreshKey?: number;
|
|
12
|
+
review?: ConnectionsReview;
|
|
9
13
|
}
|
|
10
|
-
export default function Connections({ documentId, selectedId, scope, browse, onSelectChunk, onOpenDocument, }: ConnectionsProps): import("react").JSX.Element;
|
|
14
|
+
export default function Connections({ documentId, selectedId, scope, browse, onSelectChunk, onOpenDocument, refreshKey, review, }: ConnectionsProps): import("react").JSX.Element;
|
|
@@ -1,19 +1,24 @@
|
|
|
1
1
|
import type { DocEdge } from "../types";
|
|
2
|
+
import { type StatementRuling } from "./Statement";
|
|
2
3
|
export interface CrossReferencesProps {
|
|
3
4
|
edges: DocEdge[];
|
|
4
5
|
documentId: string;
|
|
5
6
|
selectedId?: string;
|
|
6
7
|
onSelectChunk: (id: string) => void;
|
|
7
8
|
onOpenDocument?: (documentId: string, chunkId: string, title?: string) => void;
|
|
9
|
+
onRuleStatement?: StatementRuling;
|
|
10
|
+
incomplete?: boolean;
|
|
8
11
|
}
|
|
9
|
-
export default function CrossReferences({ edges, documentId, selectedId, onSelectChunk, onOpenDocument, }: CrossReferencesProps): import("react").JSX.Element | null;
|
|
10
|
-
export declare function RefRow({ edge, selectedId, documentId, onSelectChunk, onOpenDocument, }: {
|
|
12
|
+
export default function CrossReferences({ edges, documentId, selectedId, onSelectChunk, onOpenDocument, onRuleStatement, incomplete, }: CrossReferencesProps): import("react").JSX.Element | null;
|
|
13
|
+
export declare function RefRow({ edge, selectedId, documentId, onSelectChunk, onOpenDocument, onRuleStatement, }: {
|
|
11
14
|
edge: DocEdge;
|
|
12
15
|
selectedId: string;
|
|
13
16
|
documentId: string;
|
|
14
17
|
onSelectChunk: (id: string) => void;
|
|
15
18
|
onOpenDocument?: (documentId: string, chunkId: string, title?: string) => void;
|
|
19
|
+
onRuleStatement?: StatementRuling;
|
|
16
20
|
}): import("react").JSX.Element;
|
|
21
|
+
export declare function buildGraph(edges: DocEdge[]): string;
|
|
17
22
|
export declare function graphEndpoint(edges: DocEdge[], node: string): {
|
|
18
23
|
id: string;
|
|
19
24
|
documentId?: string;
|
|
@@ -11,5 +11,10 @@ export interface DocumentViewerBodyProps {
|
|
|
11
11
|
initialChunkId?: string;
|
|
12
12
|
onOpenDocument?: (target: DocLocation, from: DocLocation) => void;
|
|
13
13
|
onTitle?: (documentId: string, title: string) => void;
|
|
14
|
+
onChunkSelect?: (chunkId: string | undefined) => void;
|
|
15
|
+
focusChunk?: {
|
|
16
|
+
chunkId?: string;
|
|
17
|
+
seq: number;
|
|
18
|
+
};
|
|
14
19
|
}
|
|
15
|
-
export default function DocumentViewerBody({ documentId, scope, titleHint, browse: browseProp, principal, renderAssistant, initialChunkId, onOpenDocument, onTitle, }: DocumentViewerBodyProps): import("react").JSX.Element;
|
|
20
|
+
export default function DocumentViewerBody({ documentId, scope, titleHint, browse: browseProp, principal, renderAssistant, initialChunkId, onOpenDocument, onTitle, onChunkSelect, focusChunk, }: DocumentViewerBodyProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { BrowseScope, DocEdge } from "../types";
|
|
2
|
+
import type { DocRulingAnswer } from "../lib/dataLayer";
|
|
3
|
+
import { type RulingAction, type RulingScope } from "../lib/ruling";
|
|
4
|
+
export interface ProposalReviewProps {
|
|
5
|
+
documentId: string;
|
|
6
|
+
proposals: DocEdge[];
|
|
7
|
+
incomplete?: boolean;
|
|
8
|
+
scope: RulingScope;
|
|
9
|
+
browse?: BrowseScope;
|
|
10
|
+
onChanged: () => void;
|
|
11
|
+
onSelectChunk: (id: string) => void;
|
|
12
|
+
onOpenDocument?: (documentId: string, chunkId: string, title?: string) => void;
|
|
13
|
+
}
|
|
14
|
+
export default function ProposalReview({ documentId, proposals, incomplete, scope, browse, onChanged, onSelectChunk, onOpenDocument, }: ProposalReviewProps): import("react").JSX.Element;
|
|
15
|
+
export declare function BulkConfirm({ step, onAnswer, }: {
|
|
16
|
+
step: {
|
|
17
|
+
action: RulingAction;
|
|
18
|
+
all: boolean;
|
|
19
|
+
dry: DocRulingAnswer;
|
|
20
|
+
changed: boolean;
|
|
21
|
+
};
|
|
22
|
+
onAnswer: (ok: boolean) => void;
|
|
23
|
+
}): import("react").JSX.Element;
|
|
@@ -6,5 +6,6 @@ export interface SplitterProps {
|
|
|
6
6
|
minRightWidth?: number;
|
|
7
7
|
storageKey?: string;
|
|
8
8
|
className?: string;
|
|
9
|
+
hideRight?: boolean;
|
|
9
10
|
}
|
|
10
|
-
export default function Splitter({ children, defaultLeftWidth, minLeftWidth, minRightWidth, storageKey, className, }: SplitterProps): import("react").JSX.Element;
|
|
11
|
+
export default function Splitter({ children, defaultLeftWidth, minLeftWidth, minRightWidth, storageKey, className, hideRight, }: SplitterProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { StatementFields } from "../types";
|
|
2
|
+
export type StatementRuling = (id: string, accept: boolean, reason?: string) => Promise<void>;
|
|
3
|
+
export declare function StatementMeta({ statement }: {
|
|
4
|
+
statement: StatementFields;
|
|
5
|
+
}): import("react").JSX.Element;
|
|
6
|
+
export declare function StatementReview({ id, onRule }: {
|
|
7
|
+
id: string;
|
|
8
|
+
onRule: StatementRuling;
|
|
9
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { BrowseScope, ChunkDetail, DocScope } from "../types";
|
|
2
|
+
export interface SubjectTypeModalProps {
|
|
3
|
+
chunk: ChunkDetail;
|
|
4
|
+
scope: DocScope;
|
|
5
|
+
browse?: BrowseScope;
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
onSaved: (updated: ChunkDetail) => void;
|
|
8
|
+
}
|
|
9
|
+
export default function SubjectTypeModal({ chunk, scope, browse, onClose, onSaved }: SubjectTypeModalProps): import("react").JSX.Element;
|