@beyondwork/docx-react-component 1.0.1 → 1.0.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 +44 -104
- package/package.json +50 -30
- package/src/README.md +85 -0
- package/src/api/README.md +22 -0
- package/src/api/public-types.ts +525 -0
- package/src/compare/diff-engine.ts +530 -0
- package/src/compare/export-redlines.ts +162 -0
- package/src/compare/snapshot.ts +37 -0
- package/src/component-inventory.md +99 -0
- package/src/core/README.md +10 -0
- package/src/core/commands/README.md +3 -0
- package/src/core/commands/formatting-commands.ts +161 -0
- package/src/core/commands/image-commands.ts +144 -0
- package/src/core/commands/index.ts +1013 -0
- package/src/core/commands/list-commands.ts +370 -0
- package/src/core/commands/review-commands.ts +108 -0
- package/src/core/commands/text-commands.ts +119 -0
- package/src/core/schema/README.md +3 -0
- package/src/core/schema/text-schema.ts +512 -0
- package/src/core/selection/README.md +3 -0
- package/src/core/selection/mapping.ts +238 -0
- package/src/core/selection/review-anchors.ts +94 -0
- package/src/core/state/README.md +3 -0
- package/src/core/state/editor-state.ts +580 -0
- package/src/core/state/text-transaction.ts +276 -0
- package/src/formats/xlsx/io/parse-shared-strings.ts +41 -0
- package/src/formats/xlsx/io/parse-sheet.ts +289 -0
- package/src/formats/xlsx/io/parse-styles.ts +57 -0
- package/src/formats/xlsx/io/parse-workbook.ts +75 -0
- package/src/formats/xlsx/io/xlsx-session.ts +306 -0
- package/src/formats/xlsx/model/cell.ts +189 -0
- package/src/formats/xlsx/model/sheet.ts +244 -0
- package/src/formats/xlsx/model/styles.ts +118 -0
- package/src/formats/xlsx/model/workbook.ts +449 -0
- package/src/index.ts +45 -0
- package/src/io/README.md +10 -0
- package/src/io/docx-session.ts +1763 -0
- package/src/io/export/README.md +3 -0
- package/src/io/export/export-session.ts +165 -0
- package/src/io/export/minimal-docx.ts +115 -0
- package/src/io/export/reattach-preserved-parts.ts +54 -0
- package/src/io/export/serialize-comments.ts +876 -0
- package/src/io/export/serialize-footnotes.ts +217 -0
- package/src/io/export/serialize-headers-footers.ts +200 -0
- package/src/io/export/serialize-main-document.ts +982 -0
- package/src/io/export/serialize-numbering.ts +97 -0
- package/src/io/export/serialize-revisions.ts +389 -0
- package/src/io/export/serialize-runtime-revisions.ts +265 -0
- package/src/io/export/serialize-tables.ts +147 -0
- package/src/io/export/split-review-boundaries.ts +194 -0
- package/src/io/normalize/README.md +3 -0
- package/src/io/normalize/normalize-text.ts +437 -0
- package/src/io/ooxml/README.md +3 -0
- package/src/io/ooxml/parse-comments.ts +779 -0
- package/src/io/ooxml/parse-complex-content.ts +287 -0
- package/src/io/ooxml/parse-fields.ts +438 -0
- package/src/io/ooxml/parse-footnotes.ts +403 -0
- package/src/io/ooxml/parse-headers-footers.ts +483 -0
- package/src/io/ooxml/parse-inline-media.ts +431 -0
- package/src/io/ooxml/parse-main-document.ts +1846 -0
- package/src/io/ooxml/parse-numbering.ts +425 -0
- package/src/io/ooxml/parse-revisions.ts +658 -0
- package/src/io/ooxml/parse-shapes.ts +271 -0
- package/src/io/ooxml/parse-tables.ts +568 -0
- package/src/io/ooxml/parse-theme.ts +314 -0
- package/src/io/ooxml/part-manifest.ts +136 -0
- package/src/io/ooxml/revision-boundaries.ts +351 -0
- package/src/io/opc/README.md +3 -0
- package/src/io/opc/corrupt-package.ts +166 -0
- package/src/io/opc/docx-package.ts +74 -0
- package/src/io/opc/package-reader.ts +325 -0
- package/src/io/opc/package-writer.ts +273 -0
- package/src/legal/bookmarks.ts +196 -0
- package/src/legal/cross-references.ts +356 -0
- package/src/legal/defined-terms.ts +203 -0
- package/src/model/README.md +3 -0
- package/src/model/canonical-document.ts +1911 -0
- package/src/model/cds-1.0.0.ts +196 -0
- package/src/model/snapshot.ts +393 -0
- package/src/preservation/README.md +3 -0
- package/src/preservation/markup-compatibility.ts +48 -0
- package/src/preservation/opaque-fragment-store.ts +89 -0
- package/src/preservation/opaque-region.ts +233 -0
- package/src/preservation/package-preservation.ts +120 -0
- package/src/preservation/preserved-part-manifest.ts +56 -0
- package/src/preservation/relationship-retention.ts +57 -0
- package/src/preservation/store.ts +185 -0
- package/src/review/README.md +16 -0
- package/src/review/store/README.md +3 -0
- package/src/review/store/comment-anchors.ts +70 -0
- package/src/review/store/comment-remapping.ts +154 -0
- package/src/review/store/comment-store.ts +331 -0
- package/src/review/store/comment-thread.ts +109 -0
- package/src/review/store/revision-actions.ts +394 -0
- package/src/review/store/revision-store.ts +303 -0
- package/src/review/store/revision-types.ts +168 -0
- package/src/review/store/runtime-comment-store.ts +43 -0
- package/src/runtime/README.md +3 -0
- package/src/runtime/ai-action-policy.ts +764 -0
- package/src/runtime/document-runtime.ts +967 -0
- package/src/runtime/read-only-diagnostics-runtime.ts +232 -0
- package/src/runtime/review-runtime.ts +44 -0
- package/src/runtime/revision-runtime.ts +107 -0
- package/src/runtime/session-capabilities.ts +138 -0
- package/src/runtime/surface-projection.ts +570 -0
- package/src/runtime/table-commands.ts +87 -0
- package/src/runtime/table-schema.ts +140 -0
- package/src/runtime/virtualized-rendering.ts +258 -0
- package/src/ui/README.md +30 -0
- package/src/ui/WordReviewEditor.tsx +1506 -0
- package/src/ui/comments/README.md +3 -0
- package/src/ui/compatibility/README.md +3 -0
- package/src/ui/editor-surface/README.md +3 -0
- package/src/ui/headless/comment-decoration-model.ts +124 -0
- package/src/ui/headless/revision-decoration-model.ts +128 -0
- package/src/ui/headless/selection-helpers.ts +34 -0
- package/src/ui/headless/use-editor-keyboard.ts +98 -0
- package/src/ui/review/README.md +3 -0
- package/src/ui/shared/revision-filters.ts +31 -0
- package/src/ui/status/README.md +3 -0
- package/src/ui/theme/README.md +3 -0
- package/src/ui/toolbar/README.md +3 -0
- package/src/ui-tailwind/chrome/tw-alert-banner.tsx +48 -0
- package/src/ui-tailwind/chrome/tw-selection-toolbar.tsx +44 -0
- package/src/ui-tailwind/chrome/tw-unsaved-modal.tsx +58 -0
- package/src/ui-tailwind/chrome/use-before-unload.ts +20 -0
- package/src/ui-tailwind/editor-surface/pm-command-bridge.ts +139 -0
- package/src/ui-tailwind/editor-surface/pm-decorations.ts +98 -0
- package/src/ui-tailwind/editor-surface/pm-position-map.ts +123 -0
- package/src/ui-tailwind/editor-surface/pm-schema.ts +452 -0
- package/src/ui-tailwind/editor-surface/pm-state-from-snapshot.ts +327 -0
- package/src/ui-tailwind/editor-surface/search-plugin.ts +157 -0
- package/src/ui-tailwind/editor-surface/tw-caret.tsx +12 -0
- package/src/ui-tailwind/editor-surface/tw-editor-surface.tsx +150 -0
- package/src/ui-tailwind/editor-surface/tw-inline-token.tsx +118 -0
- package/src/ui-tailwind/editor-surface/tw-opaque-block.tsx +52 -0
- package/src/ui-tailwind/editor-surface/tw-paragraph-block.tsx +151 -0
- package/src/ui-tailwind/editor-surface/tw-prosemirror-surface.tsx +215 -0
- package/src/ui-tailwind/editor-surface/tw-segment-view.tsx +111 -0
- package/src/ui-tailwind/editor-surface/tw-table-node-view.tsx +122 -0
- package/src/ui-tailwind/index.ts +61 -0
- package/src/ui-tailwind/review/tw-comment-sidebar.tsx +276 -0
- package/src/ui-tailwind/review/tw-health-panel.tsx +120 -0
- package/src/ui-tailwind/review/tw-review-rail.tsx +120 -0
- package/src/ui-tailwind/review/tw-revision-sidebar.tsx +164 -0
- package/src/ui-tailwind/status/tw-status-bar.tsx +58 -0
- package/src/ui-tailwind/theme/editor-theme.css +190 -0
- package/src/ui-tailwind/toolbar/tw-toolbar-icon-button.tsx +48 -0
- package/src/ui-tailwind/toolbar/tw-toolbar.tsx +231 -0
- package/src/ui-tailwind/tw-review-workspace.tsx +140 -0
- package/src/validation/README.md +3 -0
- package/src/validation/compatibility-engine.ts +317 -0
- package/src/validation/compatibility-report.ts +160 -0
- package/src/validation/diagnostics.ts +203 -0
- package/src/validation/import-diagnostics.ts +128 -0
- package/src/validation/low-priority-word-surfaces.ts +373 -0
- package/dist/chunk-32W6IVQE.js +0 -7725
- package/dist/chunk-32W6IVQE.js.map +0 -1
- package/dist/index.cjs +0 -23722
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -7
- package/dist/index.d.ts +0 -7
- package/dist/index.js +0 -16011
- package/dist/index.js.map +0 -1
- package/dist/public-types-DqCURAz8.d.cts +0 -1152
- package/dist/public-types-DqCURAz8.d.ts +0 -1152
- package/dist/tailwind.cjs +0 -8295
- package/dist/tailwind.cjs.map +0 -1
- package/dist/tailwind.d.cts +0 -323
- package/dist/tailwind.d.ts +0 -323
- package/dist/tailwind.js +0 -553
- package/dist/tailwind.js.map +0 -1
package/dist/tailwind.d.cts
DELETED
|
@@ -1,323 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import React, { ReactNode, FocusEventHandler, KeyboardEvent } from 'react';
|
|
3
|
-
import { R as RuntimeRenderSnapshot, d as CommentSidebarSnapshot, I as TrackedChangesSnapshot, i as CompatibilityPanelSnapshot, q as EditorWarning, f as CommentSidebarThreadSnapshot, T as TrackedChangeEntrySnapshot, p as EditorUser, y as SelectionSnapshot, z as SurfaceBlockSnapshot, B as SurfaceInlineSegment } from './public-types-DqCURAz8.cjs';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Session capabilities derived from the runtime snapshot.
|
|
7
|
-
*
|
|
8
|
-
* All fields are computed from `RuntimeRenderSnapshot` — no local component
|
|
9
|
-
* state. The UI reads these to decide what controls to enable/disable, what
|
|
10
|
-
* chrome to show, and what mode the editor is in.
|
|
11
|
-
*/
|
|
12
|
-
interface SessionCapabilities {
|
|
13
|
-
/** Current lifecycle phase of the editor session. */
|
|
14
|
-
phase: "loading" | "ready" | "diagnostics" | "error";
|
|
15
|
-
/** Effective editor mode after accounting for runtime state. */
|
|
16
|
-
mode: "editing" | "review" | "read-only-diagnostics";
|
|
17
|
-
canUndo: boolean;
|
|
18
|
-
canRedo: boolean;
|
|
19
|
-
canEdit: boolean;
|
|
20
|
-
canAddComment: boolean;
|
|
21
|
-
canExport: boolean;
|
|
22
|
-
canAcceptChange: boolean;
|
|
23
|
-
canRejectChange: boolean;
|
|
24
|
-
canAcceptAll: boolean;
|
|
25
|
-
canRejectAll: boolean;
|
|
26
|
-
/** Whether the review rail should be visible by default. */
|
|
27
|
-
reviewRailVisible: boolean;
|
|
28
|
-
/** Whether tracked changes exist in the document (display toggle is meaningful). */
|
|
29
|
-
trackChangesSupported: boolean;
|
|
30
|
-
exportBlocked: boolean;
|
|
31
|
-
preserveOnlyCount: number;
|
|
32
|
-
unsupportedFatalCount: number;
|
|
33
|
-
/** Total count of health issues (preserve-only + unsupported-fatal + warnings). */
|
|
34
|
-
healthIssueCount: number;
|
|
35
|
-
isDirty: boolean;
|
|
36
|
-
isReady: boolean;
|
|
37
|
-
hasFatalError: boolean;
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Derive UI capabilities from the runtime snapshot and requested review mode.
|
|
41
|
-
*
|
|
42
|
-
* This is a pure function with no side effects. Call it on every render to
|
|
43
|
-
* get the current capability state.
|
|
44
|
-
*/
|
|
45
|
-
declare function deriveCapabilities(snapshot: RuntimeRenderSnapshot, reviewMode: "editing" | "review"): SessionCapabilities;
|
|
46
|
-
|
|
47
|
-
interface CommentDecorationModel {
|
|
48
|
-
threads: CommentDecorationThread[];
|
|
49
|
-
activeCommentId?: string;
|
|
50
|
-
}
|
|
51
|
-
interface CommentDecorationThread {
|
|
52
|
-
commentId: string;
|
|
53
|
-
from: number;
|
|
54
|
-
to: number;
|
|
55
|
-
status: CommentSidebarSnapshot["threads"][number]["status"];
|
|
56
|
-
isActive: boolean;
|
|
57
|
-
}
|
|
58
|
-
interface CommentRangeState {
|
|
59
|
-
hasComments: boolean;
|
|
60
|
-
hasOpen: boolean;
|
|
61
|
-
hasResolved: boolean;
|
|
62
|
-
hasActive: boolean;
|
|
63
|
-
count: number;
|
|
64
|
-
overlapping: CommentDecorationThread[];
|
|
65
|
-
}
|
|
66
|
-
declare function createCommentDecorationModel(snapshot?: CommentSidebarSnapshot): CommentDecorationModel | undefined;
|
|
67
|
-
declare function getCommentRangeState(model: CommentDecorationModel | undefined, from: number, to: number): CommentRangeState;
|
|
68
|
-
type MarkupDisplay = "clean" | "simple" | "all";
|
|
69
|
-
declare function getCommentHighlightClass(model: CommentDecorationModel | undefined, from: number, to: number, markupDisplay?: MarkupDisplay): string;
|
|
70
|
-
|
|
71
|
-
type ReviewRailTab = "comments" | "changes";
|
|
72
|
-
interface TwReviewRailProps {
|
|
73
|
-
activeTab: ReviewRailTab;
|
|
74
|
-
currentUserId?: string;
|
|
75
|
-
comments: CommentSidebarSnapshot;
|
|
76
|
-
trackedChanges: TrackedChangesSnapshot;
|
|
77
|
-
compatibility: CompatibilityPanelSnapshot;
|
|
78
|
-
warnings: EditorWarning[];
|
|
79
|
-
markupDisplay: MarkupDisplay;
|
|
80
|
-
activeCommentId?: string;
|
|
81
|
-
activeRevisionId?: string;
|
|
82
|
-
onActiveTabChange: (tab: ReviewRailTab) => void;
|
|
83
|
-
onOpenComment?: (thread: CommentSidebarThreadSnapshot) => void;
|
|
84
|
-
onResolveComment?: (commentId: string) => void;
|
|
85
|
-
onReopenComment?: (commentId: string) => void;
|
|
86
|
-
onAddReply?: (commentId: string, body: string) => void;
|
|
87
|
-
onEditBody?: (commentId: string, body: string) => void;
|
|
88
|
-
onOpenRevision?: (revision: TrackedChangeEntrySnapshot) => void;
|
|
89
|
-
onAcceptRevision?: (revisionId: string) => void;
|
|
90
|
-
onRejectRevision?: (revisionId: string) => void;
|
|
91
|
-
onAcceptAllChanges?: () => void;
|
|
92
|
-
onRejectAllChanges?: () => void;
|
|
93
|
-
}
|
|
94
|
-
declare function TwReviewRail(props: TwReviewRailProps): react_jsx_runtime.JSX.Element;
|
|
95
|
-
|
|
96
|
-
type ViewMode = "canvas" | "document";
|
|
97
|
-
interface TwToolbarProps {
|
|
98
|
-
sourceLabel?: string;
|
|
99
|
-
capabilities?: SessionCapabilities;
|
|
100
|
-
compatibility?: CompatibilityPanelSnapshot;
|
|
101
|
-
warnings?: EditorWarning[];
|
|
102
|
-
viewMode: ViewMode;
|
|
103
|
-
/** Display toggle for tracked change decorations (not a runtime mutation toggle). */
|
|
104
|
-
showTrackedChanges: boolean;
|
|
105
|
-
onUndo: () => void;
|
|
106
|
-
onRedo: () => void;
|
|
107
|
-
onAddComment: () => void;
|
|
108
|
-
onExport: () => void;
|
|
109
|
-
onViewModeChange: (value: ViewMode) => void;
|
|
110
|
-
onShowTrackedChangesChange: (show: boolean) => void;
|
|
111
|
-
}
|
|
112
|
-
declare function TwToolbar(props: TwToolbarProps): react_jsx_runtime.JSX.Element;
|
|
113
|
-
|
|
114
|
-
interface TwReviewWorkspaceProps {
|
|
115
|
-
snapshot: RuntimeRenderSnapshot;
|
|
116
|
-
currentUserId?: string;
|
|
117
|
-
capabilities?: SessionCapabilities;
|
|
118
|
-
reviewMode?: "editing" | "review";
|
|
119
|
-
document: ReactNode;
|
|
120
|
-
viewMode: ViewMode;
|
|
121
|
-
activeRailTab: ReviewRailTab;
|
|
122
|
-
activeCommentId?: string;
|
|
123
|
-
activeRevisionId?: string;
|
|
124
|
-
showTrackedChanges: boolean;
|
|
125
|
-
selectionPreview?: string | null;
|
|
126
|
-
onViewModeChange: (value: ViewMode) => void;
|
|
127
|
-
onActiveRailTabChange: (value: ReviewRailTab) => void;
|
|
128
|
-
onShowTrackedChangesChange: (show: boolean) => void;
|
|
129
|
-
onUndo: () => void;
|
|
130
|
-
onRedo: () => void;
|
|
131
|
-
onAddComment: () => void;
|
|
132
|
-
onExport: () => void;
|
|
133
|
-
onOpenComment: (thread: CommentSidebarThreadSnapshot) => void;
|
|
134
|
-
onResolveComment: (commentId: string) => void;
|
|
135
|
-
onReopenComment?: (commentId: string) => void;
|
|
136
|
-
onAddReply?: (commentId: string, body: string) => void;
|
|
137
|
-
onEditBody?: (commentId: string, body: string) => void;
|
|
138
|
-
onOpenRevision: (revision: TrackedChangeEntrySnapshot) => void;
|
|
139
|
-
onAcceptRevision: (revisionId: string) => void;
|
|
140
|
-
onRejectRevision: (revisionId: string) => void;
|
|
141
|
-
onAcceptAllChanges: () => void;
|
|
142
|
-
onRejectAllChanges: () => void;
|
|
143
|
-
}
|
|
144
|
-
declare function TwReviewWorkspace(props: TwReviewWorkspaceProps): react_jsx_runtime.JSX.Element;
|
|
145
|
-
|
|
146
|
-
interface TwEditorSurfaceProps {
|
|
147
|
-
currentUser: EditorUser;
|
|
148
|
-
snapshot: RuntimeRenderSnapshot;
|
|
149
|
-
reviewMode: "editing" | "review";
|
|
150
|
-
markupDisplay: MarkupDisplay;
|
|
151
|
-
activeRevisionId?: string;
|
|
152
|
-
/** When false, revision decorations are suppressed in the document surface. */
|
|
153
|
-
showTrackedChanges?: boolean;
|
|
154
|
-
onFocus: FocusEventHandler<HTMLDivElement>;
|
|
155
|
-
onBlur: FocusEventHandler<HTMLDivElement>;
|
|
156
|
-
onSelectionChange?: (selection: SelectionSnapshot) => void;
|
|
157
|
-
onInsertText?: (text: string) => void;
|
|
158
|
-
onDeleteBackward?: () => void;
|
|
159
|
-
onDeleteForward?: () => void;
|
|
160
|
-
onInsertTab?: () => void;
|
|
161
|
-
onInsertHardBreak?: () => void;
|
|
162
|
-
onSplitParagraph?: () => void;
|
|
163
|
-
onCommentActivated?: (commentId: string) => void;
|
|
164
|
-
onRevisionActivated?: (revisionId: string) => void;
|
|
165
|
-
}
|
|
166
|
-
declare function TwEditorSurface(props: TwEditorSurfaceProps): react_jsx_runtime.JSX.Element;
|
|
167
|
-
|
|
168
|
-
interface RevisionDecorationModel {
|
|
169
|
-
revisions: RevisionDecorationEntry[];
|
|
170
|
-
}
|
|
171
|
-
interface RevisionDecorationEntry {
|
|
172
|
-
revisionId: string;
|
|
173
|
-
from: number;
|
|
174
|
-
to: number;
|
|
175
|
-
kind: TrackedChangeEntrySnapshot["kind"];
|
|
176
|
-
status: TrackedChangeEntrySnapshot["status"];
|
|
177
|
-
actionability: TrackedChangeEntrySnapshot["actionability"];
|
|
178
|
-
isActive: boolean;
|
|
179
|
-
}
|
|
180
|
-
interface RevisionRangeState {
|
|
181
|
-
hasChanges: boolean;
|
|
182
|
-
hasInsertions: boolean;
|
|
183
|
-
hasDeletions: boolean;
|
|
184
|
-
hasActive: boolean;
|
|
185
|
-
count: number;
|
|
186
|
-
overlapping: RevisionDecorationEntry[];
|
|
187
|
-
}
|
|
188
|
-
declare function createRevisionDecorationModel(snapshot?: TrackedChangesSnapshot, activeRevisionId?: string): RevisionDecorationModel | undefined;
|
|
189
|
-
declare function getRevisionRangeState(model: RevisionDecorationModel | undefined, from: number, to: number): RevisionRangeState;
|
|
190
|
-
declare function getRevisionHighlightClass(model: RevisionDecorationModel | undefined, from: number, to: number, markupDisplay?: MarkupDisplay): string;
|
|
191
|
-
declare function shouldHideInCleanMode(model: RevisionDecorationModel | undefined, from: number, to: number): boolean;
|
|
192
|
-
|
|
193
|
-
interface TwParagraphBlockProps {
|
|
194
|
-
block: Extract<SurfaceBlockSnapshot, {
|
|
195
|
-
kind: "paragraph";
|
|
196
|
-
}>;
|
|
197
|
-
selection: SelectionSnapshot;
|
|
198
|
-
markupDisplay: MarkupDisplay;
|
|
199
|
-
commentDecorations?: CommentDecorationModel;
|
|
200
|
-
revisionDecorations?: RevisionDecorationModel;
|
|
201
|
-
onSelectionChange?: (selection: SelectionSnapshot) => void;
|
|
202
|
-
onCommentActivated?: (commentId: string) => void;
|
|
203
|
-
onRevisionActivated?: (revisionId: string) => void;
|
|
204
|
-
}
|
|
205
|
-
declare function TwParagraphBlock(props: TwParagraphBlockProps): react_jsx_runtime.JSX.Element;
|
|
206
|
-
|
|
207
|
-
interface TwOpaqueBlockProps {
|
|
208
|
-
block: Extract<SurfaceBlockSnapshot, {
|
|
209
|
-
kind: "opaque_block";
|
|
210
|
-
}>;
|
|
211
|
-
selection: SelectionSnapshot;
|
|
212
|
-
onSelectionChange?: (selection: SelectionSnapshot) => void;
|
|
213
|
-
}
|
|
214
|
-
declare function TwOpaqueBlock(props: TwOpaqueBlockProps): react_jsx_runtime.JSX.Element;
|
|
215
|
-
|
|
216
|
-
interface TwSegmentViewProps {
|
|
217
|
-
segment: SurfaceInlineSegment;
|
|
218
|
-
selection: SelectionSnapshot;
|
|
219
|
-
markupDisplay: MarkupDisplay;
|
|
220
|
-
commentDecorations?: CommentDecorationModel;
|
|
221
|
-
revisionDecorations?: RevisionDecorationModel;
|
|
222
|
-
onSelectionChange?: (selection: SelectionSnapshot) => void;
|
|
223
|
-
onCommentActivated?: (commentId: string) => void;
|
|
224
|
-
onRevisionActivated?: (revisionId: string) => void;
|
|
225
|
-
}
|
|
226
|
-
declare function TwSegmentView(props: TwSegmentViewProps): react_jsx_runtime.JSX.Element | null;
|
|
227
|
-
|
|
228
|
-
interface TwInlineTokenProps {
|
|
229
|
-
segment: SurfaceInlineSegment;
|
|
230
|
-
selection: SelectionSnapshot;
|
|
231
|
-
markupDisplay: MarkupDisplay;
|
|
232
|
-
commentDecorations?: CommentDecorationModel;
|
|
233
|
-
onSelectionChange?: (selection: SelectionSnapshot) => void;
|
|
234
|
-
}
|
|
235
|
-
declare function TwInlineToken(props: TwInlineTokenProps): react_jsx_runtime.JSX.Element | null;
|
|
236
|
-
|
|
237
|
-
declare function renderTwCaret(selection: SelectionSnapshot, position: number): react_jsx_runtime.JSX.Element | null;
|
|
238
|
-
|
|
239
|
-
interface TwCommentSidebarProps {
|
|
240
|
-
comments: CommentSidebarSnapshot;
|
|
241
|
-
activeCommentId?: string;
|
|
242
|
-
currentUserId?: string;
|
|
243
|
-
onOpenComment?: (thread: CommentSidebarThreadSnapshot) => void;
|
|
244
|
-
onResolveComment?: (commentId: string) => void;
|
|
245
|
-
onReopenComment?: (commentId: string) => void;
|
|
246
|
-
onAddReply?: (commentId: string, body: string) => void;
|
|
247
|
-
onEditBody?: (commentId: string, body: string) => void;
|
|
248
|
-
}
|
|
249
|
-
declare function TwCommentSidebar(props: TwCommentSidebarProps): react_jsx_runtime.JSX.Element;
|
|
250
|
-
|
|
251
|
-
interface TwRevisionSidebarProps {
|
|
252
|
-
trackedChanges: TrackedChangesSnapshot;
|
|
253
|
-
markupDisplay: MarkupDisplay;
|
|
254
|
-
activeRevisionId?: string;
|
|
255
|
-
onOpenRevision?: (revision: TrackedChangeEntrySnapshot) => void;
|
|
256
|
-
onAcceptRevision?: (revisionId: string) => void;
|
|
257
|
-
onRejectRevision?: (revisionId: string) => void;
|
|
258
|
-
onAcceptAllChanges?: () => void;
|
|
259
|
-
onRejectAllChanges?: () => void;
|
|
260
|
-
}
|
|
261
|
-
declare function TwRevisionSidebar(props: TwRevisionSidebarProps): react_jsx_runtime.JSX.Element;
|
|
262
|
-
|
|
263
|
-
interface TwHealthPanelProps {
|
|
264
|
-
compatibility: CompatibilityPanelSnapshot;
|
|
265
|
-
warnings: EditorWarning[];
|
|
266
|
-
}
|
|
267
|
-
declare function TwHealthPanel(props: TwHealthPanelProps): react_jsx_runtime.JSX.Element;
|
|
268
|
-
|
|
269
|
-
interface TwToolbarIconButtonProps {
|
|
270
|
-
icon: React.ComponentType<{
|
|
271
|
-
className?: string;
|
|
272
|
-
}>;
|
|
273
|
-
label: string;
|
|
274
|
-
disabled?: boolean;
|
|
275
|
-
active?: boolean;
|
|
276
|
-
emphasis?: boolean;
|
|
277
|
-
onClick?: () => void;
|
|
278
|
-
}
|
|
279
|
-
declare function TwToolbarIconButton(props: TwToolbarIconButtonProps): react_jsx_runtime.JSX.Element;
|
|
280
|
-
|
|
281
|
-
interface TwStatusBarProps {
|
|
282
|
-
isDirty: boolean;
|
|
283
|
-
isExportBlocked: boolean;
|
|
284
|
-
preserveOnlyCount: number;
|
|
285
|
-
commentCount: number;
|
|
286
|
-
changeCount: number;
|
|
287
|
-
sessionId: string;
|
|
288
|
-
}
|
|
289
|
-
declare function TwStatusBar(props: TwStatusBarProps): react_jsx_runtime.JSX.Element;
|
|
290
|
-
|
|
291
|
-
interface TwAlertBannerProps {
|
|
292
|
-
snapshot: RuntimeRenderSnapshot;
|
|
293
|
-
preserveOnlyCount: number;
|
|
294
|
-
}
|
|
295
|
-
declare function TwAlertBanner(props: TwAlertBannerProps): react_jsx_runtime.JSX.Element | null;
|
|
296
|
-
|
|
297
|
-
interface TwSelectionToolbarProps {
|
|
298
|
-
selectionPreview: string;
|
|
299
|
-
readOnly: boolean;
|
|
300
|
-
onAddComment?: () => void;
|
|
301
|
-
}
|
|
302
|
-
declare function TwSelectionToolbar(props: TwSelectionToolbarProps): react_jsx_runtime.JSX.Element;
|
|
303
|
-
|
|
304
|
-
interface EditorKeyboardCallbacks {
|
|
305
|
-
onSelectionChange?: (selection: SelectionSnapshot) => void;
|
|
306
|
-
onInsertText?: (text: string) => void;
|
|
307
|
-
onDeleteBackward?: () => void;
|
|
308
|
-
onDeleteForward?: () => void;
|
|
309
|
-
onInsertTab?: () => void;
|
|
310
|
-
onInsertHardBreak?: () => void;
|
|
311
|
-
onSplitParagraph?: () => void;
|
|
312
|
-
}
|
|
313
|
-
interface EditorKeyboardContext {
|
|
314
|
-
selection: SelectionSnapshot;
|
|
315
|
-
storySize: number;
|
|
316
|
-
canEdit: boolean;
|
|
317
|
-
}
|
|
318
|
-
declare function createEditorKeyboardHandler(context: EditorKeyboardContext, callbacks: EditorKeyboardCallbacks): (event: KeyboardEvent<HTMLDivElement>) => void;
|
|
319
|
-
|
|
320
|
-
declare function createSelectionSnapshot(anchor: number, head?: number): SelectionSnapshot;
|
|
321
|
-
declare function selectionTouchesRange(selection: SelectionSnapshot, from: number, to: number): boolean;
|
|
322
|
-
|
|
323
|
-
export { type CommentDecorationModel, type EditorKeyboardCallbacks, type EditorKeyboardContext, type MarkupDisplay, type ReviewRailTab, type RevisionDecorationModel, type SessionCapabilities, TwAlertBanner, TwCommentSidebar, TwEditorSurface, type TwEditorSurfaceProps, TwHealthPanel, TwInlineToken, TwOpaqueBlock, TwParagraphBlock, TwReviewRail, type TwReviewRailProps, TwReviewWorkspace, type TwReviewWorkspaceProps, TwRevisionSidebar, TwSegmentView, TwSelectionToolbar, TwStatusBar, TwToolbar, TwToolbarIconButton, type TwToolbarProps, type ViewMode, createCommentDecorationModel, createEditorKeyboardHandler, createRevisionDecorationModel, createSelectionSnapshot, deriveCapabilities, getCommentHighlightClass, getCommentRangeState, getRevisionHighlightClass, getRevisionRangeState, renderTwCaret, selectionTouchesRange, shouldHideInCleanMode };
|
package/dist/tailwind.d.ts
DELETED
|
@@ -1,323 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import React, { ReactNode, FocusEventHandler, KeyboardEvent } from 'react';
|
|
3
|
-
import { R as RuntimeRenderSnapshot, d as CommentSidebarSnapshot, I as TrackedChangesSnapshot, i as CompatibilityPanelSnapshot, q as EditorWarning, f as CommentSidebarThreadSnapshot, T as TrackedChangeEntrySnapshot, p as EditorUser, y as SelectionSnapshot, z as SurfaceBlockSnapshot, B as SurfaceInlineSegment } from './public-types-DqCURAz8.js';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Session capabilities derived from the runtime snapshot.
|
|
7
|
-
*
|
|
8
|
-
* All fields are computed from `RuntimeRenderSnapshot` — no local component
|
|
9
|
-
* state. The UI reads these to decide what controls to enable/disable, what
|
|
10
|
-
* chrome to show, and what mode the editor is in.
|
|
11
|
-
*/
|
|
12
|
-
interface SessionCapabilities {
|
|
13
|
-
/** Current lifecycle phase of the editor session. */
|
|
14
|
-
phase: "loading" | "ready" | "diagnostics" | "error";
|
|
15
|
-
/** Effective editor mode after accounting for runtime state. */
|
|
16
|
-
mode: "editing" | "review" | "read-only-diagnostics";
|
|
17
|
-
canUndo: boolean;
|
|
18
|
-
canRedo: boolean;
|
|
19
|
-
canEdit: boolean;
|
|
20
|
-
canAddComment: boolean;
|
|
21
|
-
canExport: boolean;
|
|
22
|
-
canAcceptChange: boolean;
|
|
23
|
-
canRejectChange: boolean;
|
|
24
|
-
canAcceptAll: boolean;
|
|
25
|
-
canRejectAll: boolean;
|
|
26
|
-
/** Whether the review rail should be visible by default. */
|
|
27
|
-
reviewRailVisible: boolean;
|
|
28
|
-
/** Whether tracked changes exist in the document (display toggle is meaningful). */
|
|
29
|
-
trackChangesSupported: boolean;
|
|
30
|
-
exportBlocked: boolean;
|
|
31
|
-
preserveOnlyCount: number;
|
|
32
|
-
unsupportedFatalCount: number;
|
|
33
|
-
/** Total count of health issues (preserve-only + unsupported-fatal + warnings). */
|
|
34
|
-
healthIssueCount: number;
|
|
35
|
-
isDirty: boolean;
|
|
36
|
-
isReady: boolean;
|
|
37
|
-
hasFatalError: boolean;
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Derive UI capabilities from the runtime snapshot and requested review mode.
|
|
41
|
-
*
|
|
42
|
-
* This is a pure function with no side effects. Call it on every render to
|
|
43
|
-
* get the current capability state.
|
|
44
|
-
*/
|
|
45
|
-
declare function deriveCapabilities(snapshot: RuntimeRenderSnapshot, reviewMode: "editing" | "review"): SessionCapabilities;
|
|
46
|
-
|
|
47
|
-
interface CommentDecorationModel {
|
|
48
|
-
threads: CommentDecorationThread[];
|
|
49
|
-
activeCommentId?: string;
|
|
50
|
-
}
|
|
51
|
-
interface CommentDecorationThread {
|
|
52
|
-
commentId: string;
|
|
53
|
-
from: number;
|
|
54
|
-
to: number;
|
|
55
|
-
status: CommentSidebarSnapshot["threads"][number]["status"];
|
|
56
|
-
isActive: boolean;
|
|
57
|
-
}
|
|
58
|
-
interface CommentRangeState {
|
|
59
|
-
hasComments: boolean;
|
|
60
|
-
hasOpen: boolean;
|
|
61
|
-
hasResolved: boolean;
|
|
62
|
-
hasActive: boolean;
|
|
63
|
-
count: number;
|
|
64
|
-
overlapping: CommentDecorationThread[];
|
|
65
|
-
}
|
|
66
|
-
declare function createCommentDecorationModel(snapshot?: CommentSidebarSnapshot): CommentDecorationModel | undefined;
|
|
67
|
-
declare function getCommentRangeState(model: CommentDecorationModel | undefined, from: number, to: number): CommentRangeState;
|
|
68
|
-
type MarkupDisplay = "clean" | "simple" | "all";
|
|
69
|
-
declare function getCommentHighlightClass(model: CommentDecorationModel | undefined, from: number, to: number, markupDisplay?: MarkupDisplay): string;
|
|
70
|
-
|
|
71
|
-
type ReviewRailTab = "comments" | "changes";
|
|
72
|
-
interface TwReviewRailProps {
|
|
73
|
-
activeTab: ReviewRailTab;
|
|
74
|
-
currentUserId?: string;
|
|
75
|
-
comments: CommentSidebarSnapshot;
|
|
76
|
-
trackedChanges: TrackedChangesSnapshot;
|
|
77
|
-
compatibility: CompatibilityPanelSnapshot;
|
|
78
|
-
warnings: EditorWarning[];
|
|
79
|
-
markupDisplay: MarkupDisplay;
|
|
80
|
-
activeCommentId?: string;
|
|
81
|
-
activeRevisionId?: string;
|
|
82
|
-
onActiveTabChange: (tab: ReviewRailTab) => void;
|
|
83
|
-
onOpenComment?: (thread: CommentSidebarThreadSnapshot) => void;
|
|
84
|
-
onResolveComment?: (commentId: string) => void;
|
|
85
|
-
onReopenComment?: (commentId: string) => void;
|
|
86
|
-
onAddReply?: (commentId: string, body: string) => void;
|
|
87
|
-
onEditBody?: (commentId: string, body: string) => void;
|
|
88
|
-
onOpenRevision?: (revision: TrackedChangeEntrySnapshot) => void;
|
|
89
|
-
onAcceptRevision?: (revisionId: string) => void;
|
|
90
|
-
onRejectRevision?: (revisionId: string) => void;
|
|
91
|
-
onAcceptAllChanges?: () => void;
|
|
92
|
-
onRejectAllChanges?: () => void;
|
|
93
|
-
}
|
|
94
|
-
declare function TwReviewRail(props: TwReviewRailProps): react_jsx_runtime.JSX.Element;
|
|
95
|
-
|
|
96
|
-
type ViewMode = "canvas" | "document";
|
|
97
|
-
interface TwToolbarProps {
|
|
98
|
-
sourceLabel?: string;
|
|
99
|
-
capabilities?: SessionCapabilities;
|
|
100
|
-
compatibility?: CompatibilityPanelSnapshot;
|
|
101
|
-
warnings?: EditorWarning[];
|
|
102
|
-
viewMode: ViewMode;
|
|
103
|
-
/** Display toggle for tracked change decorations (not a runtime mutation toggle). */
|
|
104
|
-
showTrackedChanges: boolean;
|
|
105
|
-
onUndo: () => void;
|
|
106
|
-
onRedo: () => void;
|
|
107
|
-
onAddComment: () => void;
|
|
108
|
-
onExport: () => void;
|
|
109
|
-
onViewModeChange: (value: ViewMode) => void;
|
|
110
|
-
onShowTrackedChangesChange: (show: boolean) => void;
|
|
111
|
-
}
|
|
112
|
-
declare function TwToolbar(props: TwToolbarProps): react_jsx_runtime.JSX.Element;
|
|
113
|
-
|
|
114
|
-
interface TwReviewWorkspaceProps {
|
|
115
|
-
snapshot: RuntimeRenderSnapshot;
|
|
116
|
-
currentUserId?: string;
|
|
117
|
-
capabilities?: SessionCapabilities;
|
|
118
|
-
reviewMode?: "editing" | "review";
|
|
119
|
-
document: ReactNode;
|
|
120
|
-
viewMode: ViewMode;
|
|
121
|
-
activeRailTab: ReviewRailTab;
|
|
122
|
-
activeCommentId?: string;
|
|
123
|
-
activeRevisionId?: string;
|
|
124
|
-
showTrackedChanges: boolean;
|
|
125
|
-
selectionPreview?: string | null;
|
|
126
|
-
onViewModeChange: (value: ViewMode) => void;
|
|
127
|
-
onActiveRailTabChange: (value: ReviewRailTab) => void;
|
|
128
|
-
onShowTrackedChangesChange: (show: boolean) => void;
|
|
129
|
-
onUndo: () => void;
|
|
130
|
-
onRedo: () => void;
|
|
131
|
-
onAddComment: () => void;
|
|
132
|
-
onExport: () => void;
|
|
133
|
-
onOpenComment: (thread: CommentSidebarThreadSnapshot) => void;
|
|
134
|
-
onResolveComment: (commentId: string) => void;
|
|
135
|
-
onReopenComment?: (commentId: string) => void;
|
|
136
|
-
onAddReply?: (commentId: string, body: string) => void;
|
|
137
|
-
onEditBody?: (commentId: string, body: string) => void;
|
|
138
|
-
onOpenRevision: (revision: TrackedChangeEntrySnapshot) => void;
|
|
139
|
-
onAcceptRevision: (revisionId: string) => void;
|
|
140
|
-
onRejectRevision: (revisionId: string) => void;
|
|
141
|
-
onAcceptAllChanges: () => void;
|
|
142
|
-
onRejectAllChanges: () => void;
|
|
143
|
-
}
|
|
144
|
-
declare function TwReviewWorkspace(props: TwReviewWorkspaceProps): react_jsx_runtime.JSX.Element;
|
|
145
|
-
|
|
146
|
-
interface TwEditorSurfaceProps {
|
|
147
|
-
currentUser: EditorUser;
|
|
148
|
-
snapshot: RuntimeRenderSnapshot;
|
|
149
|
-
reviewMode: "editing" | "review";
|
|
150
|
-
markupDisplay: MarkupDisplay;
|
|
151
|
-
activeRevisionId?: string;
|
|
152
|
-
/** When false, revision decorations are suppressed in the document surface. */
|
|
153
|
-
showTrackedChanges?: boolean;
|
|
154
|
-
onFocus: FocusEventHandler<HTMLDivElement>;
|
|
155
|
-
onBlur: FocusEventHandler<HTMLDivElement>;
|
|
156
|
-
onSelectionChange?: (selection: SelectionSnapshot) => void;
|
|
157
|
-
onInsertText?: (text: string) => void;
|
|
158
|
-
onDeleteBackward?: () => void;
|
|
159
|
-
onDeleteForward?: () => void;
|
|
160
|
-
onInsertTab?: () => void;
|
|
161
|
-
onInsertHardBreak?: () => void;
|
|
162
|
-
onSplitParagraph?: () => void;
|
|
163
|
-
onCommentActivated?: (commentId: string) => void;
|
|
164
|
-
onRevisionActivated?: (revisionId: string) => void;
|
|
165
|
-
}
|
|
166
|
-
declare function TwEditorSurface(props: TwEditorSurfaceProps): react_jsx_runtime.JSX.Element;
|
|
167
|
-
|
|
168
|
-
interface RevisionDecorationModel {
|
|
169
|
-
revisions: RevisionDecorationEntry[];
|
|
170
|
-
}
|
|
171
|
-
interface RevisionDecorationEntry {
|
|
172
|
-
revisionId: string;
|
|
173
|
-
from: number;
|
|
174
|
-
to: number;
|
|
175
|
-
kind: TrackedChangeEntrySnapshot["kind"];
|
|
176
|
-
status: TrackedChangeEntrySnapshot["status"];
|
|
177
|
-
actionability: TrackedChangeEntrySnapshot["actionability"];
|
|
178
|
-
isActive: boolean;
|
|
179
|
-
}
|
|
180
|
-
interface RevisionRangeState {
|
|
181
|
-
hasChanges: boolean;
|
|
182
|
-
hasInsertions: boolean;
|
|
183
|
-
hasDeletions: boolean;
|
|
184
|
-
hasActive: boolean;
|
|
185
|
-
count: number;
|
|
186
|
-
overlapping: RevisionDecorationEntry[];
|
|
187
|
-
}
|
|
188
|
-
declare function createRevisionDecorationModel(snapshot?: TrackedChangesSnapshot, activeRevisionId?: string): RevisionDecorationModel | undefined;
|
|
189
|
-
declare function getRevisionRangeState(model: RevisionDecorationModel | undefined, from: number, to: number): RevisionRangeState;
|
|
190
|
-
declare function getRevisionHighlightClass(model: RevisionDecorationModel | undefined, from: number, to: number, markupDisplay?: MarkupDisplay): string;
|
|
191
|
-
declare function shouldHideInCleanMode(model: RevisionDecorationModel | undefined, from: number, to: number): boolean;
|
|
192
|
-
|
|
193
|
-
interface TwParagraphBlockProps {
|
|
194
|
-
block: Extract<SurfaceBlockSnapshot, {
|
|
195
|
-
kind: "paragraph";
|
|
196
|
-
}>;
|
|
197
|
-
selection: SelectionSnapshot;
|
|
198
|
-
markupDisplay: MarkupDisplay;
|
|
199
|
-
commentDecorations?: CommentDecorationModel;
|
|
200
|
-
revisionDecorations?: RevisionDecorationModel;
|
|
201
|
-
onSelectionChange?: (selection: SelectionSnapshot) => void;
|
|
202
|
-
onCommentActivated?: (commentId: string) => void;
|
|
203
|
-
onRevisionActivated?: (revisionId: string) => void;
|
|
204
|
-
}
|
|
205
|
-
declare function TwParagraphBlock(props: TwParagraphBlockProps): react_jsx_runtime.JSX.Element;
|
|
206
|
-
|
|
207
|
-
interface TwOpaqueBlockProps {
|
|
208
|
-
block: Extract<SurfaceBlockSnapshot, {
|
|
209
|
-
kind: "opaque_block";
|
|
210
|
-
}>;
|
|
211
|
-
selection: SelectionSnapshot;
|
|
212
|
-
onSelectionChange?: (selection: SelectionSnapshot) => void;
|
|
213
|
-
}
|
|
214
|
-
declare function TwOpaqueBlock(props: TwOpaqueBlockProps): react_jsx_runtime.JSX.Element;
|
|
215
|
-
|
|
216
|
-
interface TwSegmentViewProps {
|
|
217
|
-
segment: SurfaceInlineSegment;
|
|
218
|
-
selection: SelectionSnapshot;
|
|
219
|
-
markupDisplay: MarkupDisplay;
|
|
220
|
-
commentDecorations?: CommentDecorationModel;
|
|
221
|
-
revisionDecorations?: RevisionDecorationModel;
|
|
222
|
-
onSelectionChange?: (selection: SelectionSnapshot) => void;
|
|
223
|
-
onCommentActivated?: (commentId: string) => void;
|
|
224
|
-
onRevisionActivated?: (revisionId: string) => void;
|
|
225
|
-
}
|
|
226
|
-
declare function TwSegmentView(props: TwSegmentViewProps): react_jsx_runtime.JSX.Element | null;
|
|
227
|
-
|
|
228
|
-
interface TwInlineTokenProps {
|
|
229
|
-
segment: SurfaceInlineSegment;
|
|
230
|
-
selection: SelectionSnapshot;
|
|
231
|
-
markupDisplay: MarkupDisplay;
|
|
232
|
-
commentDecorations?: CommentDecorationModel;
|
|
233
|
-
onSelectionChange?: (selection: SelectionSnapshot) => void;
|
|
234
|
-
}
|
|
235
|
-
declare function TwInlineToken(props: TwInlineTokenProps): react_jsx_runtime.JSX.Element | null;
|
|
236
|
-
|
|
237
|
-
declare function renderTwCaret(selection: SelectionSnapshot, position: number): react_jsx_runtime.JSX.Element | null;
|
|
238
|
-
|
|
239
|
-
interface TwCommentSidebarProps {
|
|
240
|
-
comments: CommentSidebarSnapshot;
|
|
241
|
-
activeCommentId?: string;
|
|
242
|
-
currentUserId?: string;
|
|
243
|
-
onOpenComment?: (thread: CommentSidebarThreadSnapshot) => void;
|
|
244
|
-
onResolveComment?: (commentId: string) => void;
|
|
245
|
-
onReopenComment?: (commentId: string) => void;
|
|
246
|
-
onAddReply?: (commentId: string, body: string) => void;
|
|
247
|
-
onEditBody?: (commentId: string, body: string) => void;
|
|
248
|
-
}
|
|
249
|
-
declare function TwCommentSidebar(props: TwCommentSidebarProps): react_jsx_runtime.JSX.Element;
|
|
250
|
-
|
|
251
|
-
interface TwRevisionSidebarProps {
|
|
252
|
-
trackedChanges: TrackedChangesSnapshot;
|
|
253
|
-
markupDisplay: MarkupDisplay;
|
|
254
|
-
activeRevisionId?: string;
|
|
255
|
-
onOpenRevision?: (revision: TrackedChangeEntrySnapshot) => void;
|
|
256
|
-
onAcceptRevision?: (revisionId: string) => void;
|
|
257
|
-
onRejectRevision?: (revisionId: string) => void;
|
|
258
|
-
onAcceptAllChanges?: () => void;
|
|
259
|
-
onRejectAllChanges?: () => void;
|
|
260
|
-
}
|
|
261
|
-
declare function TwRevisionSidebar(props: TwRevisionSidebarProps): react_jsx_runtime.JSX.Element;
|
|
262
|
-
|
|
263
|
-
interface TwHealthPanelProps {
|
|
264
|
-
compatibility: CompatibilityPanelSnapshot;
|
|
265
|
-
warnings: EditorWarning[];
|
|
266
|
-
}
|
|
267
|
-
declare function TwHealthPanel(props: TwHealthPanelProps): react_jsx_runtime.JSX.Element;
|
|
268
|
-
|
|
269
|
-
interface TwToolbarIconButtonProps {
|
|
270
|
-
icon: React.ComponentType<{
|
|
271
|
-
className?: string;
|
|
272
|
-
}>;
|
|
273
|
-
label: string;
|
|
274
|
-
disabled?: boolean;
|
|
275
|
-
active?: boolean;
|
|
276
|
-
emphasis?: boolean;
|
|
277
|
-
onClick?: () => void;
|
|
278
|
-
}
|
|
279
|
-
declare function TwToolbarIconButton(props: TwToolbarIconButtonProps): react_jsx_runtime.JSX.Element;
|
|
280
|
-
|
|
281
|
-
interface TwStatusBarProps {
|
|
282
|
-
isDirty: boolean;
|
|
283
|
-
isExportBlocked: boolean;
|
|
284
|
-
preserveOnlyCount: number;
|
|
285
|
-
commentCount: number;
|
|
286
|
-
changeCount: number;
|
|
287
|
-
sessionId: string;
|
|
288
|
-
}
|
|
289
|
-
declare function TwStatusBar(props: TwStatusBarProps): react_jsx_runtime.JSX.Element;
|
|
290
|
-
|
|
291
|
-
interface TwAlertBannerProps {
|
|
292
|
-
snapshot: RuntimeRenderSnapshot;
|
|
293
|
-
preserveOnlyCount: number;
|
|
294
|
-
}
|
|
295
|
-
declare function TwAlertBanner(props: TwAlertBannerProps): react_jsx_runtime.JSX.Element | null;
|
|
296
|
-
|
|
297
|
-
interface TwSelectionToolbarProps {
|
|
298
|
-
selectionPreview: string;
|
|
299
|
-
readOnly: boolean;
|
|
300
|
-
onAddComment?: () => void;
|
|
301
|
-
}
|
|
302
|
-
declare function TwSelectionToolbar(props: TwSelectionToolbarProps): react_jsx_runtime.JSX.Element;
|
|
303
|
-
|
|
304
|
-
interface EditorKeyboardCallbacks {
|
|
305
|
-
onSelectionChange?: (selection: SelectionSnapshot) => void;
|
|
306
|
-
onInsertText?: (text: string) => void;
|
|
307
|
-
onDeleteBackward?: () => void;
|
|
308
|
-
onDeleteForward?: () => void;
|
|
309
|
-
onInsertTab?: () => void;
|
|
310
|
-
onInsertHardBreak?: () => void;
|
|
311
|
-
onSplitParagraph?: () => void;
|
|
312
|
-
}
|
|
313
|
-
interface EditorKeyboardContext {
|
|
314
|
-
selection: SelectionSnapshot;
|
|
315
|
-
storySize: number;
|
|
316
|
-
canEdit: boolean;
|
|
317
|
-
}
|
|
318
|
-
declare function createEditorKeyboardHandler(context: EditorKeyboardContext, callbacks: EditorKeyboardCallbacks): (event: KeyboardEvent<HTMLDivElement>) => void;
|
|
319
|
-
|
|
320
|
-
declare function createSelectionSnapshot(anchor: number, head?: number): SelectionSnapshot;
|
|
321
|
-
declare function selectionTouchesRange(selection: SelectionSnapshot, from: number, to: number): boolean;
|
|
322
|
-
|
|
323
|
-
export { type CommentDecorationModel, type EditorKeyboardCallbacks, type EditorKeyboardContext, type MarkupDisplay, type ReviewRailTab, type RevisionDecorationModel, type SessionCapabilities, TwAlertBanner, TwCommentSidebar, TwEditorSurface, type TwEditorSurfaceProps, TwHealthPanel, TwInlineToken, TwOpaqueBlock, TwParagraphBlock, TwReviewRail, type TwReviewRailProps, TwReviewWorkspace, type TwReviewWorkspaceProps, TwRevisionSidebar, TwSegmentView, TwSelectionToolbar, TwStatusBar, TwToolbar, TwToolbarIconButton, type TwToolbarProps, type ViewMode, createCommentDecorationModel, createEditorKeyboardHandler, createRevisionDecorationModel, createSelectionSnapshot, deriveCapabilities, getCommentHighlightClass, getCommentRangeState, getRevisionHighlightClass, getRevisionRangeState, renderTwCaret, selectionTouchesRange, shouldHideInCleanMode };
|