oasis-editor 0.0.299 → 0.0.301

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.
@@ -119,9 +119,13 @@ export interface EssentialsFormattingCapability {
119
119
  replaceAll: (payload: ReplaceAllPayload) => boolean;
120
120
  toggleTrackChanges: () => boolean;
121
121
  toggleRevisionMarkup: () => boolean;
122
+ toggleOutlinePanel: () => boolean;
123
+ reviewDisplayMode: () => string;
124
+ setReviewDisplayMode: (mode: string) => boolean;
122
125
  /** Reactive document view/state flags for Ribbon toggle feedback. */
123
126
  isTrackChangesEnabled: () => boolean;
124
127
  areRevisionMarkupVisible: () => boolean;
128
+ areOutlineVisible: () => boolean;
125
129
  areMarginsVisible: () => boolean;
126
130
  areParagraphMarksVisible: () => boolean;
127
131
  acceptRevisions: () => boolean;
@@ -52,4 +52,8 @@ export interface EditorWorkspaceProps {
52
52
  * balloon chrome) and the bare canvas editor. Pure binding: it forwards the
53
53
  * already-assembled view-prop bundles and runtime facade to the right surface.
54
54
  */
55
+ /**
56
+ * The bare editor surface renders the same outline panel as the composed
57
+ * shells, so Show Outline works for the default experience too.
58
+ */
55
59
  export declare function EditorWorkspace(props: EditorWorkspaceProps): JSX.Element;
@@ -68,6 +68,7 @@ declare function createAppCommandsControllerImpl(deps: AppCommandsControllerDeps
68
68
  applyUpdateSectionSettingsCommand: (sectionIndex: number, settings: Partial<import('../../core/model.js').EditorSection>) => void;
69
69
  applyToggleTrackChangesCommand: () => void;
70
70
  applyToggleRevisionMarkupCommand: () => void;
71
+ applySetReviewDisplayModeCommand: (mode: import('../../core/model.js').EditorState["reviewDisplayMode"]) => void;
71
72
  applyToggleShowMarginsCommand: () => void;
72
73
  applyToggleShowParagraphMarksCommand: () => void;
73
74
  applyAcceptRevisionsCommand: () => void;
@@ -123,6 +124,7 @@ declare function createAppCommandsControllerImpl(deps: AppCommandsControllerDeps
123
124
  applyUpdateSectionSettingsCommand: (sectionIndex: number, settings: Partial<import('../../core/model.js').EditorSection>) => void;
124
125
  applyToggleTrackChangesCommand: () => void;
125
126
  applyToggleRevisionMarkupCommand: () => void;
127
+ applySetReviewDisplayModeCommand: (mode: import('../../core/model.js').EditorState["reviewDisplayMode"]) => void;
126
128
  applyToggleShowMarginsCommand: () => void;
127
129
  applyToggleShowParagraphMarksCommand: () => void;
128
130
  applyAcceptRevisionsCommand: () => void;
@@ -77,6 +77,8 @@ export interface EditorCommandRuntimeDeps {
77
77
  action: "accept" | "reject";
78
78
  count: number;
79
79
  }) => void;
80
+ toggleOutline: () => void;
81
+ isOutlineVisible: () => boolean;
80
82
  getUiState: () => OasisEditorUiState;
81
83
  updateUiState: (patch: OasisEditorUiState) => OasisEditorUiState;
82
84
  zoom: {
@@ -115,6 +117,7 @@ declare function createEditorCommandRuntimeImpl(deps: EditorCommandRuntimeDeps):
115
117
  applyUpdateSectionSettingsCommand: (sectionIndex: number, settings: Partial<import('../../core/model.js').EditorSection>) => void;
116
118
  applyToggleTrackChangesCommand: () => void;
117
119
  applyToggleRevisionMarkupCommand: () => void;
120
+ applySetReviewDisplayModeCommand: (mode: import('../../core/model.js').EditorState["reviewDisplayMode"]) => void;
118
121
  applyToggleShowMarginsCommand: () => void;
119
122
  applyToggleShowParagraphMarksCommand: () => void;
120
123
  applyAcceptRevisionsCommand: () => void;
@@ -48,6 +48,10 @@ export interface CreateEditorEssentialsPluginOptions {
48
48
  requestAcceptAllRevisions: () => void;
49
49
  /** Opens the Reject All confirmation dialog. */
50
50
  requestRejectAllRevisions: () => void;
51
+ /** Toggles the outline panel without touching document state. */
52
+ toggleOutlinePanel: () => void;
53
+ /** Reactive read of the outline panel's current visibility. */
54
+ isOutlineVisible: () => boolean;
51
55
  importInputRef: () => HTMLInputElement | undefined;
52
56
  imageInputRef: () => HTMLInputElement | undefined;
53
57
  selectedImageRun: () => SelectedImageRun | null;
@@ -2,9 +2,16 @@ import { DocumentShell } from '../shells/DocumentShell.js';
2
2
  import { InlineShell } from '../shells/InlineShell.js';
3
3
  import { BalloonShell } from '../shells/BalloonShell.js';
4
4
  import { OasisEditorAppDocumentProps, OasisEditorAppUiProps, OasisEditorLoadingOptions, ToolbarViewMode, ToolbarLayoutMode } from '../OasisEditorAppProps.js';
5
+ import { EditorState } from '../../core/model.js';
5
6
  export interface EditorUiOptionsContext {
6
7
  ui: () => OasisEditorAppUiProps;
7
8
  documentOptions: () => OasisEditorAppDocumentProps;
9
+ /** Write a patch into the host UI overrides (same funnel as outline.setVisible). */
10
+ updateUiState: (patch: {
11
+ showOutline: boolean;
12
+ }) => void;
13
+ /** Live state, needed for the Display-for-Review read-only gate. */
14
+ state: () => EditorState;
8
15
  }
9
16
  export interface EditorUiOptions {
10
17
  showChrome: () => boolean;
@@ -12,6 +19,8 @@ export interface EditorUiOptions {
12
19
  showMenubar: () => boolean;
13
20
  showToolbar: () => boolean;
14
21
  showOutline: () => boolean;
22
+ /** Flip the outline panel visibility through the host UI overrides. */
23
+ toggleOutline: () => void;
15
24
  toolbarView: () => ToolbarViewMode;
16
25
  toolbarLayout: () => ToolbarLayoutMode;
17
26
  isReadOnly: () => boolean;
@@ -0,0 +1,10 @@
1
+ import { ToolbarActionApi } from './schema/items.js';
2
+ import { JSX } from 'solid-js';
3
+ export interface ReviewDisplayModeButtonProps {
4
+ api: ToolbarActionApi;
5
+ }
6
+ /**
7
+ * Display for Review gallery (Word-style): a single trigger showing the
8
+ * current view, with All Markup / Final / Original items marked as radios.
9
+ */
10
+ export declare function ReviewDisplayModeButton(props: ReviewDisplayModeButtonProps): JSX.Element;
@@ -17,7 +17,7 @@ export interface ShellProps {
17
17
  showTitleBar: boolean;
18
18
  showMenubar: boolean;
19
19
  showToolbar: boolean;
20
- showOutline: boolean;
20
+ showOutline: () => boolean;
21
21
  toolbarView: ToolbarViewMode;
22
22
  toolbarLayout: ToolbarLayoutMode;
23
23
  isReadOnly: boolean;
@@ -0,0 +1,14 @@
1
+ import { EditorLayoutDocument, EditorState } from '../../core/model.js';
2
+ import { CanvasLayoutSnapshotProvider } from '../canvas/canvasLayoutSnapshotProvider.js';
3
+ /**
4
+ * Scroll the outcome of an outline click into view using the canvas snapshot.
5
+ * Shared between the composed shell and the bare editor surface.
6
+ */
7
+ export declare function createOutlineNavigator(deps: {
8
+ state: () => EditorState;
9
+ documentLayout: () => EditorLayoutDocument;
10
+ surfaceRef: () => HTMLDivElement | undefined;
11
+ viewportRef: () => HTMLDivElement | undefined;
12
+ zoomFactor?: () => number | undefined;
13
+ snapshotProvider: CanvasLayoutSnapshotProvider;
14
+ }): (anchorId: string) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oasis-editor",
3
- "version": "0.0.299",
3
+ "version": "0.0.301",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "repository": {