@zephytiju/prism-main-editor 0.1.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/README.md +252 -0
- package/dist/CommentsPane.d.ts +32 -0
- package/dist/CommentsPane.d.ts.map +1 -0
- package/dist/CommentsPane.js +85 -0
- package/dist/MainEditor.d.ts +59 -0
- package/dist/MainEditor.d.ts.map +1 -0
- package/dist/MainEditor.js +102 -0
- package/dist/TitleBar.d.ts +28 -0
- package/dist/TitleBar.d.ts.map +1 -0
- package/dist/TitleBar.js +55 -0
- package/dist/blocks/AssessmentBlockView.d.ts +21 -0
- package/dist/blocks/AssessmentBlockView.d.ts.map +1 -0
- package/dist/blocks/AssessmentBlockView.js +34 -0
- package/dist/blocks/BlockRow.d.ts +33 -0
- package/dist/blocks/BlockRow.d.ts.map +1 -0
- package/dist/blocks/BlockRow.js +56 -0
- package/dist/blocks/BlockStack.d.ts +27 -0
- package/dist/blocks/BlockStack.d.ts.map +1 -0
- package/dist/blocks/BlockStack.js +75 -0
- package/dist/blocks/DragMenu.d.ts +22 -0
- package/dist/blocks/DragMenu.d.ts.map +1 -0
- package/dist/blocks/DragMenu.js +219 -0
- package/dist/blocks/EmbeddedBlockChrome.d.ts +34 -0
- package/dist/blocks/EmbeddedBlockChrome.d.ts.map +1 -0
- package/dist/blocks/EmbeddedBlockChrome.js +81 -0
- package/dist/blocks/EvidenceTableView.d.ts +25 -0
- package/dist/blocks/EvidenceTableView.d.ts.map +1 -0
- package/dist/blocks/EvidenceTableView.js +30 -0
- package/dist/blocks/GeovisionEmbedView.d.ts +28 -0
- package/dist/blocks/GeovisionEmbedView.d.ts.map +1 -0
- package/dist/blocks/GeovisionEmbedView.js +33 -0
- package/dist/blocks/InsertMenu.d.ts +22 -0
- package/dist/blocks/InsertMenu.d.ts.map +1 -0
- package/dist/blocks/InsertMenu.js +59 -0
- package/dist/blocks/InsertRail.d.ts +28 -0
- package/dist/blocks/InsertRail.d.ts.map +1 -0
- package/dist/blocks/InsertRail.js +29 -0
- package/dist/blocks/NarrativeBlockView.d.ts +22 -0
- package/dist/blocks/NarrativeBlockView.d.ts.map +1 -0
- package/dist/blocks/NarrativeBlockView.js +44 -0
- package/dist/blocks/NativeTableView.d.ts +12 -0
- package/dist/blocks/NativeTableView.d.ts.map +1 -0
- package/dist/blocks/NativeTableView.js +36 -0
- package/dist/blocks/SavedViewDropdown.d.ts +17 -0
- package/dist/blocks/SavedViewDropdown.d.ts.map +1 -0
- package/dist/blocks/SavedViewDropdown.js +85 -0
- package/dist/blocks/SelectionToolbar.d.ts +25 -0
- package/dist/blocks/SelectionToolbar.d.ts.map +1 -0
- package/dist/blocks/SelectionToolbar.js +175 -0
- package/dist/blocks/menuStyles.d.ts +32 -0
- package/dist/blocks/menuStyles.d.ts.map +1 -0
- package/dist/blocks/menuStyles.js +32 -0
- package/dist/index.d.ts +26 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +11 -0
- package/dist/locales/en.json +37 -0
- package/dist/locales/index.d.ts +105 -0
- package/dist/locales/index.d.ts.map +1 -0
- package/dist/locales/index.js +27 -0
- package/dist/locales/zh-CN.json +37 -0
- package/dist/tokens.d.ts +42 -0
- package/dist/tokens.d.ts.map +1 -0
- package/dist/tokens.js +43 -0
- package/dist/types.d.ts +207 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +1 -0
- package/locales/en.json +37 -0
- package/locales/zh-CN.json +37 -0
- package/package.json +79 -0
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
import type { CommentThreadComment, DossierDoc, DossierDocBlock } from "@zephytiju/lattice-common-interfaces";
|
|
2
|
+
import type { EvidenceColumn, EvidenceSavedView } from "@zephytiju/prism-evidence-table";
|
|
3
|
+
import type { GeovisionMapEngine, GeovisionViewDescriptor } from "@zephytiju/prism-geovision-embed-block";
|
|
4
|
+
/**
|
|
5
|
+
* Dossier block kinds (D10 block surface taxonomy). Narrative, assessment
|
|
6
|
+
* (analyst-judgment highlight), and native-table blocks are NORMAL document
|
|
7
|
+
* blocks — plain document elements without outlining boxes or kind pills.
|
|
8
|
+
* Geovision-embed and evidence-table blocks are EMBEDDED blocks — they HOST
|
|
9
|
+
* the real published micro-UI packages (@zephytiju/prism-geovision-embed-block
|
|
10
|
+
* and @zephytiju/prism-evidence-table), which bring their own card chrome
|
|
11
|
+
* (kind tag + SRC FILE chip + VIEW variant dropdown + ↗ open arrow) and own
|
|
12
|
+
* their variant state through their component channels.
|
|
13
|
+
*/
|
|
14
|
+
export type MainEditorBlockKind = "narrative" | "assessment" | "geovision-embed" | "evidence-table" | "native-table";
|
|
15
|
+
/** Every block the editor renders — the DossierDocBlock union widened per kind. */
|
|
16
|
+
export type MainEditorBlock = NarrativeBlock | AssessmentBlock | GeovisionEmbedBlock | EvidenceTableBlock | NativeTableBlock;
|
|
17
|
+
/**
|
|
18
|
+
* A span of narrative rich text. Source links are INLINE references to
|
|
19
|
+
* IFileEntry entries embedded inside paragraph text (D10) — never standalone
|
|
20
|
+
* link blocks — so a link span is just another run in the paragraph.
|
|
21
|
+
*/
|
|
22
|
+
export type NarrativeSpan = {
|
|
23
|
+
readonly kind: "text";
|
|
24
|
+
readonly text: string;
|
|
25
|
+
} | {
|
|
26
|
+
readonly kind: "file-link";
|
|
27
|
+
/** Display label of the inline hyperlink. */
|
|
28
|
+
readonly text: string;
|
|
29
|
+
/** IFileEntry id the reference resolves to. */
|
|
30
|
+
readonly fileRef: string;
|
|
31
|
+
};
|
|
32
|
+
/** Normal document block — narrative paragraph(s) with optional heading. */
|
|
33
|
+
export interface NarrativeBlock {
|
|
34
|
+
readonly id: string;
|
|
35
|
+
readonly kind: "narrative";
|
|
36
|
+
/** Optional bold lead line above the paragraph (the prototype's summary line). */
|
|
37
|
+
readonly heading?: string;
|
|
38
|
+
readonly spans: readonly NarrativeSpan[];
|
|
39
|
+
}
|
|
40
|
+
/** Normal document block — analyst-judgment highlight: accent bar + tint only. */
|
|
41
|
+
export interface AssessmentBlock {
|
|
42
|
+
readonly id: string;
|
|
43
|
+
readonly kind: "assessment";
|
|
44
|
+
/** Optional label override above the judgment text (defaults to the locale's kind label). */
|
|
45
|
+
readonly label?: string;
|
|
46
|
+
readonly text: string;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Embedded block — the dossier's GeoVision embed (D10): the block row hosts
|
|
50
|
+
* the REAL published chrome component
|
|
51
|
+
* (`@zephytiju/prism-geovision-embed-block`), which renders the full card
|
|
52
|
+
* chrome and itself hosts the real render dispatcher
|
|
53
|
+
* (`@zephytiju/prism-geovision-embed`) in its body slot. No synthetic preview
|
|
54
|
+
* exists on the editor side; the fields here are the hosting configuration
|
|
55
|
+
* forwarded to the block component.
|
|
56
|
+
*/
|
|
57
|
+
export interface GeovisionEmbedBlock {
|
|
58
|
+
readonly id: string;
|
|
59
|
+
readonly kind: "geovision-embed";
|
|
60
|
+
/** IFileEntry ref of the previewed source file, e.g. "REDWATER-CORRIDOR.WV" (the SRC FILE chip). */
|
|
61
|
+
readonly sourceFileRef: string;
|
|
62
|
+
/**
|
|
63
|
+
* Explicit VIEW ▾ variant list override; when omitted the list comes from
|
|
64
|
+
* the render package's describeViews(sourceFileRef) through the host Lattice
|
|
65
|
+
* transport (one saved view per previewKind, viewId `${fileRef}#${previewKind}`).
|
|
66
|
+
*/
|
|
67
|
+
readonly views?: readonly GeovisionViewDescriptor[];
|
|
68
|
+
/** Controlled previewed variant id; defaults to the channel value, then the first view. */
|
|
69
|
+
readonly selectedViewId?: string;
|
|
70
|
+
/**
|
|
71
|
+
* Render 0.2.0 engine passthrough for the MAP variant — "cesium" (the
|
|
72
|
+
* render package's default) or the lighter static "svg" map. Ignored by the
|
|
73
|
+
* other preview kinds.
|
|
74
|
+
*/
|
|
75
|
+
readonly engine?: GeovisionMapEngine;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Embedded block — the dossier's evidence table (D10): the block row hosts
|
|
79
|
+
* the REAL published table component (@zephytiju/prism-evidence-table), which
|
|
80
|
+
* renders its own card chrome and the IEvidenceSource-shaped rows of the
|
|
81
|
+
* previewed saved view. No synthetic table rendering exists on the editor
|
|
82
|
+
* side; the fields here are the hosting configuration forwarded to the
|
|
83
|
+
* component.
|
|
84
|
+
*/
|
|
85
|
+
export interface EvidenceTableBlock {
|
|
86
|
+
readonly id: string;
|
|
87
|
+
readonly kind: "evidence-table";
|
|
88
|
+
/**
|
|
89
|
+
* IFileEntry ref of the previewed source file (the SRC FILE chip) — the
|
|
90
|
+
* SAME file the Geovision embed references.
|
|
91
|
+
*/
|
|
92
|
+
readonly sourceFileRef: string;
|
|
93
|
+
/** Saved views (variants) of the source file, each carrying its evidence rows. */
|
|
94
|
+
readonly savedViews: readonly EvidenceSavedView[];
|
|
95
|
+
/** Controlled previewed variant id; defaults to the channel value, then the first view. */
|
|
96
|
+
readonly selectedViewId?: string;
|
|
97
|
+
/** Layout passthrough: "table" four columns (default) or "list" row cards. */
|
|
98
|
+
readonly layout?: "table" | "list";
|
|
99
|
+
/** Columns rendered, in order (default: source, observation, confidence, audit). */
|
|
100
|
+
readonly columns?: readonly EvidenceColumn[];
|
|
101
|
+
}
|
|
102
|
+
/** Normal document block — dossier-native table, Feishu-native style (row rules). */
|
|
103
|
+
export interface NativeTableBlock {
|
|
104
|
+
readonly id: string;
|
|
105
|
+
readonly kind: "native-table";
|
|
106
|
+
readonly columns: readonly string[];
|
|
107
|
+
readonly rows: readonly (readonly string[])[];
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* The dossier projection the editor renders — IDossierDoc-shaped (DossierDoc
|
|
111
|
+
* widened with the editor's display fields). `id`, `title`, and `blocks`
|
|
112
|
+
* (every block is a valid DossierDocBlock `{ id, kind }`) are the interface
|
|
113
|
+
* fields; the rest are the bounded display fields the absorbed title bar and
|
|
114
|
+
* workspace header render (draft state + version from IDossierDoc, autosave
|
|
115
|
+
* stamp, breadcrumb, doc code, meta line).
|
|
116
|
+
*/
|
|
117
|
+
export interface MainEditorDossier extends DossierDoc {
|
|
118
|
+
/** Breadcrumb segments rendered by the title bar (composition-authored). */
|
|
119
|
+
readonly breadcrumb: readonly string[];
|
|
120
|
+
/** Short doc code, e.g. DOS-0412. */
|
|
121
|
+
readonly docCode: string;
|
|
122
|
+
/** Autosave stamp, e.g. 04:12:22Z. */
|
|
123
|
+
readonly autosavedAt: string;
|
|
124
|
+
/** Draft lifecycle state, e.g. DRAFT. */
|
|
125
|
+
readonly draftState: string;
|
|
126
|
+
/** Doc version, e.g. V07. */
|
|
127
|
+
readonly version: string;
|
|
128
|
+
/** Workspace meta line, e.g. "SYNTHETIC ANALYSIS • UPDATED 17 JUL 2026". */
|
|
129
|
+
readonly docMeta: string;
|
|
130
|
+
readonly blocks: readonly MainEditorBlock[];
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* A block-anchored discussion thread — ICommentThread-shaped (each entry is a
|
|
134
|
+
* bounded CommentThreadComment) widened with the anchoring + status fields the
|
|
135
|
+
* in-editor pane renders.
|
|
136
|
+
*/
|
|
137
|
+
export interface MainEditorCommentThread {
|
|
138
|
+
readonly id: string;
|
|
139
|
+
/** Dossier block the thread is anchored to. */
|
|
140
|
+
readonly blockId: string;
|
|
141
|
+
/** Thread subject line. */
|
|
142
|
+
readonly title: string;
|
|
143
|
+
/** open threads drive the title-bar count; done threads stay listed. */
|
|
144
|
+
readonly status: "open" | "done";
|
|
145
|
+
readonly comments: readonly CommentThreadComment[];
|
|
146
|
+
/**
|
|
147
|
+
* Quoted text the thread was anchored to (D11): present when the thread was
|
|
148
|
+
* opened from the text-selection toolbar's comment action.
|
|
149
|
+
*/
|
|
150
|
+
readonly quote?: string;
|
|
151
|
+
}
|
|
152
|
+
/** Payload published on "main-editor.focused-block" when a block gains focus. */
|
|
153
|
+
export interface MainEditorFocusedBlock {
|
|
154
|
+
readonly blockId: string;
|
|
155
|
+
}
|
|
156
|
+
/** Payload of the "main-editor.insert-block-requested" dossier action. */
|
|
157
|
+
export interface MainEditorInsertBlockRequest {
|
|
158
|
+
/** Block the new block follows; null inserts at the top of the stack. */
|
|
159
|
+
readonly afterBlockId: string | null;
|
|
160
|
+
readonly kind: MainEditorBlockKind;
|
|
161
|
+
}
|
|
162
|
+
/** Payload of the "main-editor.reorder-block-requested" dossier action. */
|
|
163
|
+
export interface MainEditorReorderBlockRequest {
|
|
164
|
+
readonly blockId: string;
|
|
165
|
+
readonly direction: "up" | "down";
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Payload of the "main-editor.duplicate-block-requested" dossier action (the
|
|
169
|
+
* ⠿ block popover's Duplicate entry) — the host clones the block with a fresh
|
|
170
|
+
* id and inserts the copy directly after the original.
|
|
171
|
+
*/
|
|
172
|
+
export interface MainEditorDuplicateBlockRequest {
|
|
173
|
+
readonly blockId: string;
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Payload of the "main-editor.comment-requested" anchor action (D11): a new
|
|
177
|
+
* thread is anchored to a block — either the whole block (block popover) or a
|
|
178
|
+
* quoted text range within it (selection toolbar). The host creates the
|
|
179
|
+
* thread and publishes it on "main-editor.comment-threads".
|
|
180
|
+
*/
|
|
181
|
+
export interface MainEditorCommentRequest {
|
|
182
|
+
readonly blockId: string;
|
|
183
|
+
/** Selected text the thread quotes; undefined for whole-block anchors. */
|
|
184
|
+
readonly quote?: string;
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Payload of the "main-editor.open-view-requested" open intent (D10 addendum):
|
|
188
|
+
* the ↗ arrow on a hosted embedded block asks the host to open the source view
|
|
189
|
+
* (the embedded body itself is never click-to-open). The hosted components
|
|
190
|
+
* emit their open intents through the onOpenView callback; the editor
|
|
191
|
+
* re-emits them on this channel so hosts keep ONE open-intent contract.
|
|
192
|
+
*/
|
|
193
|
+
export interface MainEditorOpenViewRequest {
|
|
194
|
+
readonly sourceFileRef: string;
|
|
195
|
+
readonly viewId: string;
|
|
196
|
+
}
|
|
197
|
+
/** Payload of the "main-editor.remove-block-requested" dossier action. */
|
|
198
|
+
export interface MainEditorRemoveBlockRequest {
|
|
199
|
+
readonly blockId: string;
|
|
200
|
+
}
|
|
201
|
+
/** Payload of the "main-editor.share-requested" sharing intent. */
|
|
202
|
+
export interface MainEditorShareRequest {
|
|
203
|
+
readonly docId: string;
|
|
204
|
+
}
|
|
205
|
+
/** Narrow DossierDocBlock re-export so hosts can type-check mock docs. */
|
|
206
|
+
export type { CommentThreadComment, DossierDoc, DossierDocBlock };
|
|
207
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EACpB,UAAU,EACV,eAAe,EAChB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACzF,OAAO,KAAK,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AAG1G;;;;;;;;;GASG;AACH,MAAM,MAAM,mBAAmB,GAC3B,WAAW,GACX,YAAY,GACZ,iBAAiB,GACjB,gBAAgB,GAChB,cAAc,CAAC;AAEnB,mFAAmF;AACnF,MAAM,MAAM,eAAe,GACvB,cAAc,GACd,eAAe,GACf,mBAAmB,GACnB,kBAAkB,GAClB,gBAAgB,CAAC;AAErB;;;;GAIG;AACH,MAAM,MAAM,aAAa,GACrB;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAChD;IACE,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAC3B,6CAA6C;IAC7C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,+CAA+C;IAC/C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEN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+
{
|
|
2
|
+
"main-editor": {
|
|
3
|
+
"docPrefix": "DOSSIER",
|
|
4
|
+
"autosavedAt": "AUTOSAVED {time}",
|
|
5
|
+
"commentsButton": "COMMENTS",
|
|
6
|
+
"commentsButtonWithCount": "COMMENTS · {count}",
|
|
7
|
+
"openCommentsCount": "{count} OPEN COMMENTS",
|
|
8
|
+
"share": "SHARE",
|
|
9
|
+
"overflowTitle": "More dossier actions",
|
|
10
|
+
"blocksCount": "{count} BLOCKS",
|
|
11
|
+
"insertMenuTitle": "INSERT BLOCK",
|
|
12
|
+
"dragMenuTitle": "BLOCK ACTIONS",
|
|
13
|
+
"commentOnBlock": "Add comment on this block",
|
|
14
|
+
"moveUp": "MOVE UP",
|
|
15
|
+
"moveDown": "MOVE DOWN",
|
|
16
|
+
"duplicateBlock": "DUPLICATE",
|
|
17
|
+
"removeBlock": "REMOVE BLOCK",
|
|
18
|
+
"boldTitle": "Bold",
|
|
19
|
+
"italicTitle": "Italic",
|
|
20
|
+
"underlineTitle": "Underline",
|
|
21
|
+
"strikethroughTitle": "Strikethrough",
|
|
22
|
+
"commentOnSelection": "Comment on selection",
|
|
23
|
+
"kindNarrative": "NARRATIVE",
|
|
24
|
+
"kindAssessment": "ANALYST JUDGMENT",
|
|
25
|
+
"kindGeovision": "GEOVISION 3D",
|
|
26
|
+
"kindEvidenceTable": "EVIDENCE TABLE",
|
|
27
|
+
"kindNativeTable": "NATIVE TABLE",
|
|
28
|
+
"commentsTitle": "COMMENTS",
|
|
29
|
+
"commentsSubtitle": "BLOCK-ANCHORED · IN-EDITOR PANE",
|
|
30
|
+
"openThreads": "{count} OPEN",
|
|
31
|
+
"threadBlockMeta": "BLOCK {block} • {status}",
|
|
32
|
+
"statusOpen": "OPEN",
|
|
33
|
+
"statusDone": "DONE",
|
|
34
|
+
"emptyTitle": "No dossier open",
|
|
35
|
+
"emptyHint": "The editor renders once dossier data is published on the main-editor channels."
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"main-editor": {
|
|
3
|
+
"docPrefix": "卷宗",
|
|
4
|
+
"autosavedAt": "已自动保存 {time}",
|
|
5
|
+
"commentsButton": "评论",
|
|
6
|
+
"commentsButtonWithCount": "评论 · {count}",
|
|
7
|
+
"openCommentsCount": "{count} 条未决评论",
|
|
8
|
+
"share": "共享",
|
|
9
|
+
"overflowTitle": "更多卷宗操作",
|
|
10
|
+
"blocksCount": "{count} 个区块",
|
|
11
|
+
"insertMenuTitle": "插入区块",
|
|
12
|
+
"dragMenuTitle": "区块操作",
|
|
13
|
+
"commentOnBlock": "对此区块添加评论",
|
|
14
|
+
"moveUp": "上移",
|
|
15
|
+
"moveDown": "下移",
|
|
16
|
+
"duplicateBlock": "复制区块",
|
|
17
|
+
"removeBlock": "移除区块",
|
|
18
|
+
"boldTitle": "加粗",
|
|
19
|
+
"italicTitle": "斜体",
|
|
20
|
+
"underlineTitle": "下划线",
|
|
21
|
+
"strikethroughTitle": "删除线",
|
|
22
|
+
"commentOnSelection": "对选中文字添加评论",
|
|
23
|
+
"kindNarrative": "叙述",
|
|
24
|
+
"kindAssessment": "分析判断",
|
|
25
|
+
"kindGeovision": "GEOVISION 3D",
|
|
26
|
+
"kindEvidenceTable": "证据表",
|
|
27
|
+
"kindNativeTable": "原生表格",
|
|
28
|
+
"commentsTitle": "评论",
|
|
29
|
+
"commentsSubtitle": "区块锚定 · 编辑器内面板",
|
|
30
|
+
"openThreads": "{count} 条未决",
|
|
31
|
+
"threadBlockMeta": "区块 {block} • {status}",
|
|
32
|
+
"statusOpen": "未决",
|
|
33
|
+
"statusDone": "已完成",
|
|
34
|
+
"emptyTitle": "未打开卷宗",
|
|
35
|
+
"emptyHint": "当卷宗数据发布到 main-editor 通道后,编辑器将开始渲染。"
|
|
36
|
+
}
|
|
37
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@zephytiju/prism-main-editor",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Platform Prism main-editor micro-UI (component id \"main-editor\"): the dossier editor axiom component (D9) \u2014 title bar (breadcrumb + autosave stamp, DRAFT/V07 state chip, amber-active COMMENTS toggle, SHARE, overflow) absorbed from the retired Title Bar component, the typed block stack with +/drag insert rows, and the expandable block-anchored comments pane. Block surfaces per D10: narrative, analyst-judgment, and native-table blocks render as plain document elements (no outlining box; highlight = accent bar + tint; source links are inline underlined hyperlinks with \u2197 inside paragraph text), while the embedded file-preview blocks HOST the real published micro-UI packages: the geovision-embed block hosts @zephytiju/prism-geovision-embed-block (full D10 chrome + the real render dispatcher in its body slot, variant state on \"geovision-embed.selected-view\") and the evidence-table block hosts @zephytiju/prism-evidence-table (chrome + rows from IEvidenceSource-shaped data). No synthetic embed previews remain on the editor side. Consumes IDossierDoc-shaped dossier + comment-thread channels; emits dossier actions. Ships en + zh-CN locale bundles.",
|
|
6
|
+
"license": "UNLICENSED",
|
|
7
|
+
"main": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/index.js"
|
|
13
|
+
},
|
|
14
|
+
"./locales/*": "./locales/*"
|
|
15
|
+
},
|
|
16
|
+
"publishConfig": {
|
|
17
|
+
"access": "public"
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"dist",
|
|
21
|
+
"locales"
|
|
22
|
+
],
|
|
23
|
+
"scripts": {
|
|
24
|
+
"dev": "vite --host 127.0.0.1",
|
|
25
|
+
"build": "tsc -p tsconfig.build.json && node scripts/copy-locales.mjs",
|
|
26
|
+
"typecheck": "tsc --noEmit",
|
|
27
|
+
"test": "vitest run",
|
|
28
|
+
"shot-demo": "node scripts/shot-demo.mjs"
|
|
29
|
+
},
|
|
30
|
+
"peerDependencies": {
|
|
31
|
+
"@mantine/core": "^8.1.1",
|
|
32
|
+
"@zephytiju/lattice-common-interfaces": ">=0.1.0",
|
|
33
|
+
"@zephytiju/prism-evidence-table": ">=0.1.0",
|
|
34
|
+
"@zephytiju/prism-geovision-embed-block": ">=0.2.0",
|
|
35
|
+
"@zephytiju/prism-react": ">=0.2.0",
|
|
36
|
+
"react": "^19.1.0",
|
|
37
|
+
"react-dom": "^19.1.0"
|
|
38
|
+
},
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"@mantine/core": "8.1.1",
|
|
41
|
+
"@testing-library/dom": "^10.4.0",
|
|
42
|
+
"@testing-library/react": "^16.1.0",
|
|
43
|
+
"@types/node": "^22.10.2",
|
|
44
|
+
"@types/react": "^19.1.0",
|
|
45
|
+
"@types/react-dom": "^19.1.0",
|
|
46
|
+
"@xyflow/react": "12.11.6",
|
|
47
|
+
"@zephytiju/lattice-common-bundle": "0.2.0",
|
|
48
|
+
"@zephytiju/lattice-common-interfaces": "0.3.0",
|
|
49
|
+
"@zephytiju/prism-evidence-table": "file:../PrismEvidenceTableMicroUI",
|
|
50
|
+
"@zephytiju/prism-geovision-embed": "0.2.0",
|
|
51
|
+
"@zephytiju/prism-geovision-embed-block": "file:../PrismGeovisionEmbedBlockMicroUI",
|
|
52
|
+
"@zephytiju/prism-react": "0.2.0",
|
|
53
|
+
"@zephytiju/prism-relation-fluxboard": "0.1.0",
|
|
54
|
+
"@zephytiju/prism-stats-panel": "0.1.0",
|
|
55
|
+
"@zephytiju/prism-timeline-board": "0.1.0",
|
|
56
|
+
"jsdom": "^25.0.1",
|
|
57
|
+
"puppeteer-core": "^24.10.0",
|
|
58
|
+
"react": "19.1.0",
|
|
59
|
+
"react-dom": "19.1.0",
|
|
60
|
+
"typescript": "^5.7.2",
|
|
61
|
+
"vite": "6.0.5",
|
|
62
|
+
"vitest": "^2.1.8"
|
|
63
|
+
},
|
|
64
|
+
"engines": {
|
|
65
|
+
"node": ">=20"
|
|
66
|
+
},
|
|
67
|
+
"overrides": {
|
|
68
|
+
"@cesium/engine": "26.1.0",
|
|
69
|
+
"@cesium/widgets": "16.1.0"
|
|
70
|
+
},
|
|
71
|
+
"repository": {
|
|
72
|
+
"type": "git",
|
|
73
|
+
"url": "git+https://github.com/zephytiju/PrismMainEditorMicroUI.git"
|
|
74
|
+
},
|
|
75
|
+
"bugs": {
|
|
76
|
+
"url": "https://github.com/zephytiju/PrismMainEditorMicroUI/issues"
|
|
77
|
+
},
|
|
78
|
+
"homepage": "https://github.com/zephytiju/PrismMainEditorMicroUI#readme"
|
|
79
|
+
}
|