oasis-editor 0.0.298 → 0.0.300

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,11 @@ export interface EssentialsFormattingCapability {
119
119
  replaceAll: (payload: ReplaceAllPayload) => boolean;
120
120
  toggleTrackChanges: () => boolean;
121
121
  toggleRevisionMarkup: () => boolean;
122
+ toggleOutlinePanel: () => boolean;
122
123
  /** Reactive document view/state flags for Ribbon toggle feedback. */
123
124
  isTrackChangesEnabled: () => boolean;
124
125
  areRevisionMarkupVisible: () => boolean;
126
+ areOutlineVisible: () => boolean;
125
127
  areMarginsVisible: () => boolean;
126
128
  areParagraphMarksVisible: () => boolean;
127
129
  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;
@@ -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: {
@@ -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;
@@ -5,6 +5,10 @@ import { OasisEditorAppDocumentProps, OasisEditorAppUiProps, OasisEditorLoadingO
5
5
  export interface EditorUiOptionsContext {
6
6
  ui: () => OasisEditorAppUiProps;
7
7
  documentOptions: () => OasisEditorAppDocumentProps;
8
+ /** Write a patch into the host UI overrides (same funnel as outline.setVisible). */
9
+ updateUiState: (patch: {
10
+ showOutline: boolean;
11
+ }) => void;
8
12
  }
9
13
  export interface EditorUiOptions {
10
14
  showChrome: () => boolean;
@@ -12,6 +16,8 @@ export interface EditorUiOptions {
12
16
  showMenubar: () => boolean;
13
17
  showToolbar: () => boolean;
14
18
  showOutline: () => boolean;
19
+ /** Flip the outline panel visibility through the host UI overrides. */
20
+ toggleOutline: () => void;
15
21
  toolbarView: () => ToolbarViewMode;
16
22
  toolbarLayout: () => ToolbarLayoutMode;
17
23
  isReadOnly: () => boolean;
@@ -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.298",
3
+ "version": "0.0.300",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "repository": {