@stll/folio-vue 0.28.0 → 0.29.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 (61) hide show
  1. package/README.md +5 -0
  2. package/dist/{SplitCellDialog-Dge_CE-B.cjs → SplitCellDialog-Bc2TjxMb.cjs} +1 -1
  3. package/dist/{SplitCellDialog-Vl4gq22E.js → SplitCellDialog-DULmbU_P.js} +6 -6
  4. package/dist/StylePicker-CD28Jh8D.cjs +4 -0
  5. package/dist/{StylePicker-CfC5Ef1i.js → StylePicker-D8VHvoMT.js} +664 -591
  6. package/dist/components/AnonymizationRectsOverlay.vue.d.ts +7 -4
  7. package/dist/components/AutocompleteSuggestionOverlay.vue.d.ts +5 -0
  8. package/dist/components/ContentControlWidgetsOverlay.vue.d.ts +5 -1
  9. package/dist/components/DocumentOutline.vue.d.ts +2 -0
  10. package/dist/components/DocxEditor/DocxEditorDialogs.vue.d.ts +3 -2
  11. package/dist/components/DocxEditor/pagedEditorRef.d.ts +11 -9
  12. package/dist/components/DocxEditor/types.d.ts +81 -18
  13. package/dist/components/DocxEditor.vue.d.ts +1 -1
  14. package/dist/components/FormattingBar.types.d.ts +2 -1
  15. package/dist/components/ReviewControls.vue.d.ts +2 -2
  16. package/dist/components/Toolbar.vue.d.ts +6 -5
  17. package/dist/components/UnifiedSidebar.vue.d.ts +3 -0
  18. package/dist/components/dialogs/FootnotePropertiesDialog.vue.d.ts +2 -2
  19. package/dist/components/dialogs/ImagePositionDialog.vue.d.ts +2 -2
  20. package/dist/components/dialogs/PageSetupDialog.vue.d.ts +4 -3
  21. package/dist/components/dialogs/SetNumberingValueDialog.vue.d.ts +2 -2
  22. package/dist/components/dialogs/TablePropertiesDialog.vue.d.ts +2 -2
  23. package/dist/components/dialogs/WatermarkDialog.vue.d.ts +4 -3
  24. package/dist/components/sidebar/CommentCard.vue.d.ts +2 -2
  25. package/dist/components/ui/ColorPicker.vue.d.ts +2 -1
  26. package/dist/components/ui/HorizontalRuler.vue.d.ts +4 -3
  27. package/dist/components/ui/TableBorderColorPicker.vue.d.ts +2 -1
  28. package/dist/components/ui/TableCellFillPicker.vue.d.ts +2 -1
  29. package/dist/components/ui/TableToolbar.vue.d.ts +2 -1
  30. package/dist/components/ui/VerticalRuler.vue.d.ts +3 -2
  31. package/dist/composables/commentMarks.d.ts +5 -14
  32. package/dist/composables/documentChrome.d.ts +14 -0
  33. package/dist/composables/useCommentLifecycle.d.ts +0 -2
  34. package/dist/composables/useCommentManagement.d.ts +5 -0
  35. package/dist/composables/useDocxEditor.d.ts +59 -15
  36. package/dist/composables/useDocxEditorRefApi.d.ts +20 -15
  37. package/dist/composables/useFontLifecycle.d.ts +2 -3
  38. package/dist/composables/useOutlineDrawerFocus.d.ts +1 -1
  39. package/dist/composables/usePageSetupControls.d.ts +2 -2
  40. package/dist/composables/usePagesPointer.d.ts +3 -2
  41. package/dist/composables/useParagraphStyleOptions.d.ts +2 -1
  42. package/dist/composables/useTableResize.d.ts +6 -1
  43. package/dist/composables.cjs +1 -1
  44. package/dist/composables.js +1 -1
  45. package/dist/dialogs.cjs +1 -1
  46. package/dist/dialogs.js +1 -1
  47. package/dist/folio-vue.css +1 -1
  48. package/dist/index.cjs +1 -1
  49. package/dist/index.d.ts +4 -4
  50. package/dist/index.js +2355 -2262
  51. package/dist/ui.cjs +1 -1
  52. package/dist/ui.js +28 -28
  53. package/dist/useZoom-BGTTHZwV.js +1119 -0
  54. package/dist/useZoom-u9lZMwJR.cjs +1 -0
  55. package/dist/utils/listItems.d.ts +7 -0
  56. package/dist/utils/rawDocument.d.ts +13 -0
  57. package/dist/utils/stylePreview.d.ts +2 -1
  58. package/package.json +9 -9
  59. package/dist/StylePicker-Bgu0Slqa.cjs +0 -4
  60. package/dist/useZoom-CKHgvyHZ.js +0 -1014
  61. package/dist/useZoom-Db3Q3xP7.cjs +0 -1
@@ -1,12 +1,15 @@
1
1
  import { EditorState } from 'prosemirror-state';
2
- import { EditorView } from 'prosemirror-view';
2
+ import { AnonymizationHighlightsView, FolioAnonymizationMatch, FolioAnonymizationTerm } from '@stll/folio-core/controller/anonymizationHighlights';
3
3
  import { FlowBlock, Layout, Measure } from '@stll/folio-core/layout-engine/types';
4
4
  type __VLS_Props = {
5
- getView: () => EditorView | null;
5
+ /** The editor's highlights, read from the shown text of every story. */
6
+ getHighlights: () => AnonymizationHighlightsView;
6
7
  getPagesContainer: () => HTMLElement | null;
7
- /** Reactive editor state — changes on every transaction, including the
8
- * meta-only term push that a doc edit does not cover. */
8
+ /** Reactive editor state: changes on every body transaction. */
9
9
  editorState: EditorState | null;
10
+ /** The host's terms; a new list repaints. */
11
+ terms: readonly FolioAnonymizationTerm[] | undefined;
12
+ onMatchesChange?: ((matches: readonly FolioAnonymizationMatch[]) => void) | undefined;
10
13
  zoom: number;
11
14
  layout: Layout | null;
12
15
  blocks: FlowBlock[];
@@ -1,10 +1,15 @@
1
1
  import { EditorState } from 'prosemirror-state';
2
+ import { FolioAutocompleteState } from '@stll/folio-core/controller/autocompleteSuggestion';
3
+ import { FolioEditor } from '@stll/folio-core/controller/folioEditor';
2
4
  import { LayoutSelectionGate } from '@stll/folio-core/paged-layout/LayoutSelectionGate';
3
5
  type __VLS_Props = {
4
6
  getPagesContainer: () => HTMLElement | null;
5
7
  editorState: EditorState | null;
6
8
  zoom: number;
7
9
  syncCoordinator: LayoutSelectionGate;
10
+ /** The editor's suggestion. */
11
+ suggestion: FolioAutocompleteState;
12
+ editorPositionAt: FolioEditor["editorPositionAt"];
8
13
  };
9
14
  declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
10
15
  declare const _default: typeof __VLS_export;
@@ -3,6 +3,10 @@ type __VLS_Props = {
3
3
  eventRoot: HTMLElement | null;
4
4
  view: EditorView | null;
5
5
  };
6
- declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
6
+ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
7
+ refused: (message: string) => any;
8
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
9
+ onRefused?: (message: string) => any;
10
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
7
11
  declare const _default: typeof __VLS_export;
8
12
  export default _default;
@@ -9,6 +9,8 @@ type __VLS_Props = {
9
9
  docSize: number;
10
10
  activeId: string | null;
11
11
  surface: OutlineSurface;
12
+ /** The track the panel layout gives the surface; its default otherwise. */
13
+ width?: number;
12
14
  expanded?: boolean;
13
15
  };
14
16
  declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
@@ -1,5 +1,6 @@
1
1
  import { EditorView } from 'prosemirror-view';
2
2
  import { SectionProperties } from '@stll/folio-core/types/document';
3
+ import { DeepReadonly } from '@stll/folio-core/types/documentModel';
3
4
  import { TablePropertiesCommand } from '@stll/folio-core/utils/tableOperations';
4
5
  import { Watermark } from '@stll/folio-core/watermark';
5
6
  import { UseFindReplaceReturn } from '../../composables/useFindReplace';
@@ -18,7 +19,7 @@ type __VLS_Props = {
18
19
  view: EditorView | null;
19
20
  bookmarks: BookmarkOption[];
20
21
  selectedImagePmPos: number | null;
21
- sectionProperties: SectionProperties | null;
22
+ sectionProperties: DeepReadonly<SectionProperties> | null;
22
23
  showFindReplace: boolean;
23
24
  showHyperlink: boolean;
24
25
  showInsertSymbol: boolean;
@@ -27,7 +28,7 @@ type __VLS_Props = {
27
28
  showTableProperties: boolean;
28
29
  showWatermark: boolean;
29
30
  showNumberingValue: boolean;
30
- currentWatermark: Watermark | undefined;
31
+ currentWatermark: DeepReadonly<Watermark> | undefined;
31
32
  tableProperties: TablePropertiesCommand;
32
33
  };
33
34
  declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
@@ -4,7 +4,7 @@ import { FolioEditor } from '@stll/folio-core/controller/folioEditor';
4
4
  import { Layout } from '@stll/folio-core/layout-engine';
5
5
  import { BlockRect } from '@stll/folio-core/paged-layout/blockGeometry';
6
6
  import { ScrollToParaIdOptions } from '@stll/folio-core/paged-layout/paragraphFlash';
7
- import { Document } from '@stll/folio-core/types/document';
7
+ import { ReadonlyDocument } from '@stll/folio-core/types/documentModel';
8
8
  /**
9
9
  * Imperative handle exposed by `DocxEditorRef.getEditorRef()`.
10
10
  *
@@ -22,8 +22,16 @@ import { Document } from '@stll/folio-core/types/document';
22
22
  export type PagedEditorRef = {
23
23
  /** The headless editor controller (imperative API + events; Seam 6). */
24
24
  getEditor: () => FolioEditor;
25
- /** Get the current document. */
26
- getDocument: () => Document | null;
25
+ /**
26
+ * The current document, built over the editor's model and sharing its
27
+ * parts: read it, never write it (`DocxEditorRef.getDocument` hands a copy).
28
+ */
29
+ getDocument: () => ReadonlyDocument | null;
30
+ /**
31
+ * The editor's document model, without a copy: in a canonical session the
32
+ * session's own document (read it, never write it); otherwise null.
33
+ */
34
+ readDocumentModel: () => ReadonlyDocument | null;
27
35
  /** Get the ProseMirror EditorState. */
28
36
  getState: () => EditorState | null;
29
37
  /** Get the ProseMirror EditorView. */
@@ -85,12 +93,6 @@ export type PagedEditorRef = {
85
93
  from: number;
86
94
  to: number;
87
95
  } | null) => void;
88
- /**
89
- * Resolve the page number (1-indexed) that contains the given PM position, or
90
- * null if no layout is available yet. Works for unrendered pages too via the
91
- * page shell map.
92
- */
93
- getPageNumberForPmPos: (pmPos: number) => number | null;
94
96
  /** Painted geometry for one AI-snapshot block. */
95
97
  getBlockRect: (blockId: string) => BlockRect | null;
96
98
  /** Painted geometry for many AI-snapshot blocks in one layout read. */
@@ -3,8 +3,12 @@ import { EditorView } from 'prosemirror-view';
3
3
  import { CSSProperties, VNodeChild } from 'vue';
4
4
  import { XmlFragment } from 'yjs';
5
5
  import { FolioAIEditApplyMode, FolioAIEditApplyResult, FolioAIEditOperation, FolioAIEditSnapshot, FolioCommentAnchor, FolioDocumentNavigationTarget, FolioDocumentOperationBatch, FolioDocumentOperationResult, FolioDocumentOperationUndoHandle, FolioDocumentOperationUndoResult, FolioPendingSuggestionLoadResult, FolioPendingSuggestionRecord, FolioReviewChange, FolioUndefinedReferencePolicy } from '@stll/folio-core/ai-edits';
6
+ import { CanonicalHistoryDrop, CanonicalHistoryEffect } from '@stll/folio-core/canonical/canonicalSession';
6
7
  import { ContentControlFilter, SetContentControlContentInput, SetContentControlValueInput } from '@stll/folio-core/content-controls';
7
- import { FolioEditor } from '@stll/folio-core/controller/folioEditor';
8
+ import { FolioAnonymizationMatch, FolioAnonymizationTerm } from '@stll/folio-core/controller/anonymizationHighlights';
9
+ import { FolioAutocompleteApi, FolioAutocompleteState } from '@stll/folio-core/controller/autocompleteSuggestion';
10
+ import { CanonicalRoomCollaboration } from '@stll/folio-core/controller/canonicalRoomEditor';
11
+ import { FolioEditor, FolioSaveOptions, TextPosition } from '@stll/folio-core/controller/folioEditor';
8
12
  import { PageRendererName } from '@stll/folio-core/display-list/editor/pageRenderer';
9
13
  import { DocxCompatibility } from '@stll/folio-core/docx/compatibility';
10
14
  import { FolioSelectiveSaveFlags } from '@stll/folio-core/docx/selectiveSaveFlags';
@@ -16,7 +20,6 @@ import { BlockRect } from '@stll/folio-core/paged-layout/blockGeometry';
16
20
  import { ScrollToParaIdOptions } from '@stll/folio-core/paged-layout/paragraphFlash';
17
21
  import { ListState, SelectionState, TableContextInfo } from '@stll/folio-core/prosemirror';
18
22
  import { FolioSuggestion, SuggestionAppliedAs } from '@stll/folio-core/prosemirror/commands/comments';
19
- import { AnonymizationMatch } from '@stll/folio-core/prosemirror/plugins/anonymizationDecorations';
20
23
  import { TemplateSlashMenuKeyAction, TemplateSlashMenuState } from '@stll/folio-core/prosemirror/plugins/templateSlashMenu';
21
24
  import { Comment } from '@stll/folio-core/types/content';
22
25
  import { Document, ParagraphAlignment, SdtProperties, TabStop, Theme } from '@stll/folio-core/types/document';
@@ -24,6 +27,8 @@ import { DocxInput } from '@stll/folio-core/utils/docxInput';
24
27
  import { FindMatch, FindOptions, FindResult } from '@stll/folio-core/utils/findReplace';
25
28
  import { OutlineDepth } from '@stll/folio-core/utils/outlineDepth';
26
29
  import { DocumentLoadState } from '@stll/folio-core/managers/DocumentLoaderManager';
30
+ import { EditorSession } from '@stll/folio-core/types/canonicalCapabilities';
31
+ import { DeepReadonly } from '@stll/folio-core/types/documentModel';
27
32
  import { FolioUIComponents } from '../../ui/folio-ui';
28
33
  import { FontOption } from '../../utils/fontOptions';
29
34
  import { PagedEditorRef } from './pagedEditorRef';
@@ -70,8 +75,16 @@ export type DocxEditorProps = {
70
75
  password?: string | undefined;
71
76
  /** Pre-parsed document (alternative to documentBuffer) */
72
77
  document?: Document | null;
73
- /** Experimental plain-text canonical session; unsupported edits are refused. */
74
- experimentalSession?: "canonical";
78
+ /**
79
+ * The editing engine. Unset, the editor runs the canonical session, which
80
+ * refuses unsupported edits with a notice, or the legacy session when
81
+ * `collaboration` is a Yjs fragment. `"legacy"` selects the
82
+ * ProseMirror-owned engine.
83
+ * A host plugin's transaction or a direct dispatch that changes the
84
+ * document is refused too, its refusal naming the transaction's meta keys:
85
+ * express such an edit as document operations (`applyDocumentOperations`).
86
+ */
87
+ experimentalSession?: EditorSession;
75
88
  /** Callback when document is saved */
76
89
  onSave?: (buffer: ArrayBuffer) => void;
77
90
  /** Author name used for comments and track changes */
@@ -117,7 +130,7 @@ export type DocxEditorProps = {
117
130
  */
118
131
  fonts?: ReadonlyArray<FontDefinition>;
119
132
  /** Theme for styling */
120
- theme?: Theme | null;
133
+ theme?: DeepReadonly<Theme> | null;
121
134
  /** Whether to show toolbar (default: true) */
122
135
  showToolbar?: boolean;
123
136
  /** Whether to show zoom control (default: true) */
@@ -254,8 +267,9 @@ export type DocxEditorProps = {
254
267
  /**
255
268
  * Controlled comments array. When provided, the editor reads comment thread
256
269
  * metadata from this prop and emits every change through `onCommentsChange`.
257
- * Use with collaboration backends (Yjs, etc.); PM carries range markers,
258
- * thread metadata lives outside the doc.
270
+ * In a canonical room the comments are operations of the room's journal:
271
+ * the editor reports them through `onCommentsChange` and never reads this
272
+ * prop back.
259
273
  */
260
274
  comments?: Comment[];
261
275
  /** Current document search results, including the zero-based current hit. */
@@ -264,21 +278,51 @@ export type DocxEditorProps = {
264
278
  onCommentsChange?: (comments: Comment[]) => void;
265
279
  /** Callback with the parsed document's editing compatibility report. */
266
280
  onCompatibilityChange?: (compatibility: DocxCompatibility) => void;
281
+ /**
282
+ * With the canonical session: called after each edit, undo or redo is
283
+ * published in any story, with what it did to the session's undo history.
284
+ * A host that keeps its own undo stack (and owns `hostShortcuts`'
285
+ * `"history"`) adds one entry per `opened` and undoes through the editor's
286
+ * ref.
287
+ */
288
+ onCanonicalHistory?: (effect: CanonicalHistoryEffect) => void;
289
+ /**
290
+ * With the canonical session: called when a peer's edit in a canonical
291
+ * room left local history steps unusable, with how many of each stack it
292
+ * dropped, counted from the bottom. A host that mirrors the steps in its
293
+ * own undo stack removes as many.
294
+ */
295
+ onCanonicalHistoryDrop?: (drop: CanonicalHistoryDrop) => void;
267
296
  /**
268
297
  * Fires when the live ProseMirror view is captured (or torn down). The host
269
298
  * wires this to drive the AI suggestion overlay (decoration meta, apply,
270
299
  * scroll-to) from outside the editor.
271
300
  */
272
301
  onEditorViewReady?: (view: EditorView | null) => void;
273
- /** Yjs-backed collaboration owner. Experimental and opt-in. */
302
+ /**
303
+ * Edit together with other editors. With the canonical session, the
304
+ * canonical room the session joins; with the legacy session, the Yjs
305
+ * fragment it edits. Experimental and opt-in.
306
+ */
274
307
  collaboration?: DocxEditorCollaboration | undefined;
275
308
  /**
276
- * Fires with the current anonymization match list every time the decoration
277
- * plugin recomputes it (mount, term push, doc edit, async DOCX load). The
278
- * host mirrors per-document counts and "matching workspace terms" to the
279
- * inspector facet without polling the plugin state.
309
+ * Terms to highlight wherever they occur in the shown text of every story
310
+ * (body, table cells, headers, footers, notes), in either session. A term
311
+ * matches literally, case-insensitively and on word boundaries, across
312
+ * formatting runs; text inside a tracked deletion is matched too.
313
+ * Highlights are view state: they never change the document, its undo
314
+ * history or its pending changes, and they follow every edit, a peer's
315
+ * included. Pass a new array to change the terms.
316
+ */
317
+ anonymizationTerms?: readonly FolioAnonymizationTerm[] | undefined;
318
+ /** Called with the inline autocomplete suggestion each time it changes. */
319
+ onAutocompleteChange?: ((state: FolioAutocompleteState) => void) | undefined;
320
+ /**
321
+ * Fires with every occurrence, as text positions, each time the set of
322
+ * occurrences changes (new terms, an edit, a load). An edit elsewhere in
323
+ * the document does not fire it.
280
324
  */
281
- onAnonymizationMatchesChange?: (matches: readonly AnonymizationMatch[]) => void;
325
+ onAnonymizationMatchesChange?: (matches: readonly FolioAnonymizationMatch[]) => void;
282
326
  /**
283
327
  * Fires when the user clicks an anonymization highlight in the rendered
284
328
  * document. Hosts push the selection into a sidebar bridge so the inspector
@@ -344,7 +388,9 @@ export type DocxEditorProps = {
344
388
  onSelectiveSaveTripwire?: (result: TripwireResult) => void;
345
389
  };
346
390
  export type { FolioSelectiveSaveFlags, TripwireResult };
347
- export type DocxEditorCollaboration = {
391
+ export type DocxEditorCollaboration = CanonicalRoomCollaboration | DocxEditorYjsCollaboration;
392
+ /** A Yjs fragment the legacy session edits, and the plugins that bind it. */
393
+ export type DocxEditorYjsCollaboration = {
348
394
  awareness?: {
349
395
  clientID: number;
350
396
  getStates: () => Map<number, unknown>;
@@ -355,6 +401,8 @@ export type DocxEditorCollaboration = {
355
401
  plugins?: Plugin[] | undefined;
356
402
  shouldSeed?: boolean | undefined;
357
403
  yXmlFragment: XmlFragment;
404
+ /** A canonical room is reached through `connect`; a Yjs fragment has none. */
405
+ connect?: never;
358
406
  };
359
407
  export type DocxEditorApplyDocumentOperationsOptions = {
360
408
  undefinedReferences: FolioUndefinedReferencePolicy;
@@ -392,9 +440,7 @@ export type DocxEditorRef = {
392
440
  /** The headless editor controller (Seam 6), or null before the editor mounts. */
393
441
  getEditor: () => FolioEditor | null;
394
442
  /** Save the document to buffer. Pass { selective: false } to force full repack. */
395
- save: (options?: {
396
- selective?: boolean;
397
- }) => Promise<ArrayBuffer | null>;
443
+ save: (options?: FolioSaveOptions) => Promise<ArrayBuffer | null>;
398
444
  /** Set zoom level */
399
445
  setZoom: (zoom: number) => void;
400
446
  /** Get current zoom level */
@@ -575,6 +621,23 @@ export type DocxEditorRef = {
575
621
  getPageText: (page: number) => string | null;
576
622
  /** Resolve a stable block or text range to its real 1-based rendered page. */
577
623
  getTargetPage: (target: FolioDocumentNavigationTarget, snapshot?: FolioAIEditSnapshot) => number | null;
624
+ /**
625
+ * The 1-based rendered page that shows a body text position (story,
626
+ * paragraph id, offset), or null before layout or when no paragraph in the
627
+ * body has that id.
628
+ */
629
+ getPositionPage: (position: TextPosition) => number | null;
630
+ /**
631
+ * The inline autocomplete suggestion: ghost text streamed in at a text
632
+ * position and shown beside the caret, in either session. It is view
633
+ * state: it never changes the document, its undo history or its pending
634
+ * changes, and it stays on its text when a peer edits. Typing its next
635
+ * characters consumes them; any other edit dismisses it. Tab accepts it,
636
+ * Mod-ArrowRight its next word, Escape dismisses it.
637
+ */
638
+ autocomplete: FolioAutocompleteApi;
639
+ /** Every occurrence of the `anonymizationTerms`, as text positions. */
640
+ getAnonymizationMatches: () => readonly FolioAnonymizationMatch[];
578
641
  /** Painted geometry for one block, relative to this editor's scroll root. */
579
642
  getBlockRect: (blockId: string) => BlockRect | null;
580
643
  /** Painted geometry for many blocks in one layout read; missing ids are omitted. */
@@ -694,7 +757,7 @@ export type EditorState = {
694
757
  paragraphIndentRight: number;
695
758
  paragraphFirstLineIndent: number;
696
759
  paragraphHangingIndent: boolean;
697
- paragraphTabs: TabStop[] | null;
760
+ paragraphTabs: readonly DeepReadonly<TabStop>[] | null;
698
761
  /** ProseMirror table context (for showing table toolbar) */
699
762
  pmTableContext: TableContextInfo | null;
700
763
  /** Image context when cursor is on an image node */
@@ -38,8 +38,8 @@ declare const __VLS_base: import('vue').DefineComponent<DocxEditorProps, import(
38
38
  "onFind-result-change"?: (result: FindResult | null) => any;
39
39
  }>, {
40
40
  author: string;
41
- document: Document | null;
42
41
  mode: EditorMode;
42
+ document: Document | null;
43
43
  className: string;
44
44
  showCommentHighlights: boolean;
45
45
  readOnly: boolean;
@@ -1,4 +1,5 @@
1
1
  import { ColorValue, Theme } from '@stll/folio-core/types/document';
2
+ import { DeepReadonly } from '@stll/folio-core/types/documentModel';
2
3
  import { ListState } from '../utils/listState';
3
4
  import { ParagraphAlignment } from './ui/AlignmentButtons.types';
4
5
  import { StyleOption } from './ui/StylePicker.types';
@@ -63,5 +64,5 @@ export type FormattingBarProps = {
63
64
  /** Document styles for the style picker (Vue `StylePicker` option shape). */
64
65
  documentStyles?: StyleOption[];
65
66
  /** Document theme — feeds the color picker's theme-color matrix. */
66
- theme?: Theme | null;
67
+ theme?: DeepReadonly<Theme> | null;
67
68
  };
@@ -6,10 +6,10 @@ type __VLS_Props = {
6
6
  };
7
7
  declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
8
8
  "toggle-track-changes": () => any;
9
- "update:display-mode": (mode: "all-markup" | "simple-markup" | "no-markup" | "original") => any;
9
+ "update:display-mode": (mode: "original" | "all-markup" | "simple-markup" | "no-markup") => any;
10
10
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
11
11
  "onToggle-track-changes"?: () => any;
12
- "onUpdate:display-mode"?: (mode: "all-markup" | "simple-markup" | "no-markup" | "original") => any;
12
+ "onUpdate:display-mode"?: (mode: "original" | "all-markup" | "simple-markup" | "no-markup") => any;
13
13
  }>, {
14
14
  readOnly: boolean;
15
15
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
@@ -2,6 +2,7 @@ import { Command } from 'prosemirror-state';
2
2
  import { EditorView } from 'prosemirror-view';
3
3
  import { DisplayMode } from '@stll/folio-core/managers/EditorModeManager';
4
4
  import { Style, Theme } from '@stll/folio-core/types/document';
5
+ import { DeepReadonly } from '@stll/folio-core/types/documentModel';
5
6
  import { FontOption } from '../utils/fontOptions';
6
7
  import { EditorMode } from './DocxEditor/types';
7
8
  /**
@@ -57,7 +58,7 @@ type __VLS_Props = {
57
58
  (properties button) renders inline inside the pill. */
58
59
  imageContext?: ImageToolbarContext | null;
59
60
  /** Document theme — feeds the color picker's theme-color matrix. */
60
- theme?: Theme | null;
61
+ theme?: DeepReadonly<Theme> | null;
61
62
  /** Optional custom font list matching React's `fontFamilies` prop. */
62
63
  fontFamilies?: ReadonlyArray<string | FontOption>;
63
64
  /**
@@ -69,7 +70,7 @@ type __VLS_Props = {
69
70
  /** Paragraph styles from the loaded document (document.package.styles.styles).
70
71
  When present, the style picker shows the document's real styles + names,
71
72
  matching React's Toolbar `documentStyles` prop. Falls back to presets. */
72
- documentStyles?: Style[];
73
+ documentStyles?: DeepReadonly<Style[]>;
73
74
  };
74
75
  declare const __VLS_template: () => {
75
76
  __VLS_Slots: {
@@ -85,7 +86,7 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {},
85
86
  "insert-symbol": () => any;
86
87
  "insert-table": () => any;
87
88
  "toggle-track-changes": () => any;
88
- "update:display-mode": (mode: "all-markup" | "simple-markup" | "no-markup" | "original") => any;
89
+ "update:display-mode": (mode: "original" | "all-markup" | "simple-markup" | "no-markup") => any;
89
90
  "find-replace": () => any;
90
91
  "insert-image": () => any;
91
92
  "insert-link": () => any;
@@ -106,7 +107,7 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {},
106
107
  "onInsert-symbol"?: () => any;
107
108
  "onInsert-table"?: () => any;
108
109
  "onToggle-track-changes"?: () => any;
109
- "onUpdate:display-mode"?: (mode: "all-markup" | "simple-markup" | "no-markup" | "original") => any;
110
+ "onUpdate:display-mode"?: (mode: "original" | "all-markup" | "simple-markup" | "no-markup") => any;
110
111
  "onFind-replace"?: () => any;
111
112
  "onInsert-image"?: () => any;
112
113
  "onInsert-link"?: () => any;
@@ -122,8 +123,8 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {},
122
123
  "onImage-properties"?: () => any;
123
124
  "onImage-transform"?: (action: ImageTransformAction) => any;
124
125
  }>, {
125
- displayMode: "all-markup" | "simple-markup" | "no-markup" | "original";
126
126
  view: EditorView | null;
127
+ displayMode: "original" | "all-markup" | "simple-markup" | "no-markup";
127
128
  readOnly: boolean;
128
129
  trackChangesOn: boolean;
129
130
  getCommands: () => Record<string, CommandFactory>;
@@ -9,6 +9,9 @@ type __VLS_Props = {
9
9
  showResolved?: boolean;
10
10
  pagesContainer: HTMLElement | null;
11
11
  pageWidthPx: number;
12
+ /** Where the column starts in the scroll content, from the panel layout's
13
+ * numbers; null until the layout knows its width. */
14
+ columnStart?: number | null;
12
15
  zoom?: number;
13
16
  /** Controlled expansion shared by card clicks and search navigation.
14
17
  * Used by DocxEditor to auto-expand cards when the cursor
@@ -5,11 +5,11 @@ type __VLS_Props = {
5
5
  endnotePr?: EndnoteProperties;
6
6
  };
7
7
  declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
8
- apply: (footnotePr: FootnoteProperties, endnotePr: EndnoteProperties) => any;
9
8
  close: () => any;
9
+ apply: (footnotePr: FootnoteProperties, endnotePr: EndnoteProperties) => any;
10
10
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
11
- onApply?: (footnotePr: FootnoteProperties, endnotePr: EndnoteProperties) => any;
12
11
  onClose?: () => any;
12
+ onApply?: (footnotePr: FootnoteProperties, endnotePr: EndnoteProperties) => any;
13
13
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
14
14
  declare const _default: typeof __VLS_export;
15
15
  export default _default;
@@ -19,11 +19,11 @@ type __VLS_Props = {
19
19
  currentData?: ImagePositionData;
20
20
  };
21
21
  declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
22
- apply: (data: ImagePositionData) => any;
23
22
  close: () => any;
23
+ apply: (data: ImagePositionData) => any;
24
24
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
25
- onApply?: (data: ImagePositionData) => any;
26
25
  onClose?: () => any;
26
+ onApply?: (data: ImagePositionData) => any;
27
27
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
28
28
  declare const _default: typeof __VLS_export;
29
29
  export default _default;
@@ -1,14 +1,15 @@
1
1
  import { SectionProperties } from '@stll/folio-core/types/document';
2
+ import { DeepReadonly } from '@stll/folio-core/types/documentModel';
2
3
  type __VLS_Props = {
3
4
  isOpen: boolean;
4
- sectionProperties?: SectionProperties | null;
5
+ sectionProperties?: DeepReadonly<SectionProperties> | null;
5
6
  };
6
7
  declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
7
- apply: (props: Partial<SectionProperties>) => any;
8
8
  close: () => any;
9
+ apply: (props: Partial<SectionProperties>) => any;
9
10
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
10
- onApply?: (props: Partial<SectionProperties>) => any;
11
11
  onClose?: () => any;
12
+ onApply?: (props: Partial<SectionProperties>) => any;
12
13
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
13
14
  declare const _default: typeof __VLS_export;
14
15
  export default _default;
@@ -2,11 +2,11 @@ type __VLS_Props = {
2
2
  isOpen: boolean;
3
3
  };
4
4
  declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
5
- apply: (value: number) => any;
6
5
  close: () => any;
6
+ apply: (value: number) => any;
7
7
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
8
- onApply?: (value: number) => any;
9
8
  onClose?: () => any;
9
+ onApply?: (value: number) => any;
10
10
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
11
11
  declare const _default: typeof __VLS_export;
12
12
  export default _default;
@@ -5,11 +5,11 @@ type __VLS_Props = {
5
5
  currentProps?: TableProperties;
6
6
  };
7
7
  declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
8
- apply: (props: TablePropertiesCommand) => any;
9
8
  close: () => any;
9
+ apply: (props: TablePropertiesCommand) => any;
10
10
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
11
- onApply?: (props: TablePropertiesCommand) => any;
12
11
  onClose?: () => any;
12
+ onApply?: (props: TablePropertiesCommand) => any;
13
13
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
14
14
  declare const _default: typeof __VLS_export;
15
15
  export default _default;
@@ -1,14 +1,15 @@
1
+ import { DeepReadonly } from '@stll/folio-core/types/documentModel';
1
2
  import { Watermark } from '@stll/folio-core/watermark';
2
3
  type __VLS_Props = {
3
4
  isOpen: boolean;
4
- currentWatermark?: Watermark | undefined;
5
+ currentWatermark?: DeepReadonly<Watermark> | undefined;
5
6
  };
6
7
  declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
7
- apply: (watermark: Watermark | undefined) => any;
8
8
  close: () => any;
9
+ apply: (watermark: Watermark | undefined) => any;
9
10
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
10
- onApply?: (watermark: Watermark | undefined) => any;
11
11
  onClose?: () => any;
12
+ onApply?: (watermark: Watermark | undefined) => any;
12
13
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
13
14
  declare const _default: typeof __VLS_export;
14
15
  export default _default;
@@ -5,15 +5,15 @@ type __VLS_Props = {
5
5
  expanded: boolean;
6
6
  };
7
7
  declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
8
+ delete: (commentId: number) => any;
8
9
  reply: (commentId: number, text: string) => any;
9
10
  click: () => any;
10
- delete: (commentId: number) => any;
11
11
  resolve: (commentId: number) => any;
12
12
  unresolve: (commentId: number) => any;
13
13
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
14
+ onDelete?: (commentId: number) => any;
14
15
  onReply?: (commentId: number, text: string) => any;
15
16
  onClick?: () => any;
16
- onDelete?: (commentId: number) => any;
17
17
  onResolve?: (commentId: number) => any;
18
18
  onUnresolve?: (commentId: number) => any;
19
19
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
@@ -1,10 +1,11 @@
1
1
  import { CSSProperties } from 'vue';
2
2
  import { ColorValue, Theme } from '@stll/folio-core/types/document';
3
+ import { DeepReadonly } from '@stll/folio-core/types/documentModel';
3
4
  export type ColorPickerMode = "text" | "highlight" | "border";
4
5
  type __VLS_Props = {
5
6
  mode: ColorPickerMode;
6
7
  value?: ColorValue | string | undefined;
7
- theme?: Theme | null;
8
+ theme?: DeepReadonly<Theme> | null;
8
9
  disabled?: boolean;
9
10
  className?: string;
10
11
  style?: CSSProperties;
@@ -1,6 +1,7 @@
1
1
  import { SectionProperties, TabStop } from '@stll/folio-core/types/document';
2
+ import { DeepReadonly } from '@stll/folio-core/types/documentModel';
2
3
  type __VLS_Props = {
3
- sectionProps?: SectionProperties | null;
4
+ sectionProps?: DeepReadonly<SectionProperties> | null;
4
5
  zoom?: number;
5
6
  editable?: boolean;
6
7
  showFirstLineIndent?: boolean;
@@ -9,7 +10,7 @@ type __VLS_Props = {
9
10
  indentLeft?: number;
10
11
  indentRight?: number;
11
12
  unit?: "inch" | "cm";
12
- tabStops?: TabStop[] | null;
13
+ tabStops?: readonly DeepReadonly<TabStop>[] | null;
13
14
  };
14
15
  declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
15
16
  "left-margin-change": (twips: number) => any;
@@ -30,8 +31,8 @@ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {
30
31
  indentRight: number;
31
32
  hangingIndent: boolean;
32
33
  unit: "cm" | "inch";
33
- editable: boolean;
34
34
  zoom: number;
35
+ editable: boolean;
35
36
  firstLineIndent: number;
36
37
  showFirstLineIndent: boolean;
37
38
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
@@ -1,7 +1,8 @@
1
1
  import { Theme } from '@stll/folio-core/types/document';
2
+ import { DeepReadonly } from '@stll/folio-core/types/documentModel';
2
3
  type __VLS_Props = {
3
4
  disabled?: boolean;
4
- theme?: Theme | null;
5
+ theme?: DeepReadonly<Theme> | null;
5
6
  /** Current border color (RGB hex without #). */
6
7
  value?: string;
7
8
  };
@@ -1,7 +1,8 @@
1
1
  import { Theme } from '@stll/folio-core/types/document';
2
+ import { DeepReadonly } from '@stll/folio-core/types/documentModel';
2
3
  type __VLS_Props = {
3
4
  disabled?: boolean;
4
- theme?: Theme | null;
5
+ theme?: DeepReadonly<Theme> | null;
5
6
  /** Current fill color (RGB hex without #). */
6
7
  value?: string;
7
8
  };
@@ -1,6 +1,7 @@
1
1
  import { Command } from 'prosemirror-state';
2
2
  import { EditorView } from 'prosemirror-view';
3
3
  import { Theme } from '@stll/folio-core/types/document';
4
+ import { DeepReadonly } from '@stll/folio-core/types/documentModel';
4
5
  /**
5
6
  * A toolbar command factory: called with whatever arguments the specific
6
7
  * command needs, it returns a ProseMirror `Command`.
@@ -19,7 +20,7 @@ type __VLS_Props = {
19
20
  getCommands: () => Record<string, CommandFactory>;
20
21
  stateTick: number;
21
22
  /** Document theme — fed through to the border/fill color pickers. */
22
- theme?: Theme | null;
23
+ theme?: DeepReadonly<Theme> | null;
23
24
  };
24
25
  declare function onBorderPreset(preset: TableBorderPreset): void;
25
26
  declare function onBorderColor(hex: string): void;