oasis-editor 0.0.294 → 0.0.296

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.
@@ -536,6 +536,12 @@ export interface EssentialsFieldsCapability {
536
536
  bookmark: string;
537
537
  }) => void;
538
538
  }
539
+ export interface EssentialsDialogCapability {
540
+ openFontDialog: () => void;
541
+ openParagraphDialog: () => void;
542
+ requestAcceptAllRevisions: () => void;
543
+ requestRejectAllRevisions: () => void;
544
+ }
539
545
  export interface EssentialsDesignCapability {
540
546
  applyTheme: (theme: DesignThemeId) => void;
541
547
  setColorScheme: (value: string) => void;
@@ -699,4 +705,5 @@ export interface EssentialsPluginDeps {
699
705
  design: EssentialsDesignCapability;
700
706
  bookmark: EssentialsBookmarkCapability;
701
707
  fields: EssentialsFieldsCapability;
708
+ dialog: EssentialsDialogCapability;
702
709
  }
@@ -1,16 +1,17 @@
1
1
  import { OasisPlugin } from '../../../core/plugin.js';
2
2
  import { ActionCommandBuilder, CommandBuilder, ValueCommandBuilder } from '../essentialsCommandBuilders.js';
3
- import { EssentialsFeatureGate, EssentialsFormattingCapability, EssentialsHistoryCapability, EssentialsLinkCapability, EssentialsSelectionCapability, EssentialsStyleCapability } from '../essentialsCapabilities.js';
3
+ import { EssentialsDialogCapability, EssentialsFeatureGate, EssentialsFormattingCapability, EssentialsHistoryCapability, EssentialsLinkCapability, EssentialsSelectionCapability, EssentialsStyleCapability } from '../essentialsCapabilities.js';
4
4
  interface CoreFormattingGroupDeps {
5
5
  gate: EssentialsFeatureGate;
6
6
  style: EssentialsStyleCapability;
7
7
  selection: EssentialsSelectionCapability;
8
8
  history: EssentialsHistoryCapability;
9
9
  formatting: EssentialsFormattingCapability;
10
+ dialog: EssentialsDialogCapability;
10
11
  link: EssentialsLinkCapability;
11
12
  command: CommandBuilder;
12
13
  valueCommand: ValueCommandBuilder;
13
14
  actionCommand: ActionCommandBuilder;
14
15
  }
15
- export declare function buildCoreFormattingCommands({ gate, style, selection, history, formatting, link, command, valueCommand, actionCommand, }: CoreFormattingGroupDeps): NonNullable<OasisPlugin["commands"]>;
16
+ export declare function buildCoreFormattingCommands({ gate, style, selection, history, formatting, dialog, link, command, valueCommand, actionCommand, }: CoreFormattingGroupDeps): NonNullable<OasisPlugin["commands"]>;
16
17
  export {};
@@ -0,0 +1,14 @@
1
+ import { OasisPlugin } from '../../../core/plugin.js';
2
+ import { ActionCommandBuilder } from '../essentialsCommandBuilders.js';
3
+ import { EssentialsDialogCapability } from '../essentialsCapabilities.js';
4
+ interface LauncherGroupDeps {
5
+ dialog: EssentialsDialogCapability;
6
+ actionCommand: ActionCommandBuilder;
7
+ }
8
+ /**
9
+ * Ribbon group dialog launchers. Each command opens the same dialog as its
10
+ * context-menu/menubar counterpart, so the launcher is a real entry point
11
+ * rather than a decorative button.
12
+ */
13
+ export declare function buildLauncherCommands({ dialog, actionCommand, }: LauncherGroupDeps): NonNullable<OasisPlugin["commands"]>;
14
+ export {};
@@ -24,6 +24,7 @@ export interface EditorDialogsLayerProps {
24
24
  setParagraphDialogDefault: NonNullable<ComponentProps<typeof ParagraphDialog>["onSetDefault"]>;
25
25
  applyTablePropertiesDialogValues: ComponentProps<typeof TablePropertiesDialog>["onApply"];
26
26
  confirmNewDocument: () => void;
27
+ applyBulkRevisions: (action: "accept" | "reject") => void;
27
28
  insertSymbol: (symbol: string, fontFamily: string) => void;
28
29
  applyEquation: (expression: EditorMathExpression, targetRunId?: string) => void;
29
30
  closeContextMenu: () => void;
@@ -72,6 +72,11 @@ export interface EditorCommandRuntimeDeps {
72
72
  isOpen: boolean;
73
73
  initial: import('../components/Dialogs/ParagraphDialog.js').ParagraphDialogInitialValues;
74
74
  }) => void;
75
+ setRevisionBulkDialog: (state: {
76
+ isOpen: boolean;
77
+ action: "accept" | "reject";
78
+ count: number;
79
+ }) => void;
75
80
  getUiState: () => OasisEditorUiState;
76
81
  updateUiState: (patch: OasisEditorUiState) => OasisEditorUiState;
77
82
  zoom: {
@@ -40,6 +40,14 @@ export interface CreateEditorEssentialsPluginOptions {
40
40
  openEquationDialog: () => void;
41
41
  /** Opens the Table Properties dialog for the active table/cell. */
42
42
  openTablePropertiesDialog: (activeTab?: "table" | "cell") => void;
43
+ /** Opens the Font dialog. */
44
+ openFontDialog: () => void;
45
+ /** Opens the Paragraph dialog. */
46
+ openParagraphDialog: () => void;
47
+ /** Opens the Accept All confirmation dialog. */
48
+ requestAcceptAllRevisions: () => void;
49
+ /** Opens the Reject All confirmation dialog. */
50
+ requestRejectAllRevisions: () => void;
43
51
  importInputRef: () => HTMLInputElement | undefined;
44
52
  imageInputRef: () => HTMLInputElement | undefined;
45
53
  selectedImageRun: () => SelectedImageRun | null;
@@ -84,5 +84,12 @@ export interface EditorDialogsState {
84
84
  isOpen: boolean;
85
85
  initial: TablePropertiesDialogInitialValues;
86
86
  }>;
87
+ revisionBulkDialog: Accessor<RevisionBulkDialogState>;
88
+ setRevisionBulkDialog: Setter<RevisionBulkDialogState>;
89
+ }
90
+ export interface RevisionBulkDialogState {
91
+ isOpen: boolean;
92
+ action: "accept" | "reject";
93
+ count: number;
87
94
  }
88
95
  export declare function createEditorDialogs(): EditorDialogsState;
@@ -12,5 +12,7 @@ export interface DialogProps {
12
12
  ariaDescribedBy?: string;
13
13
  size?: "sm" | "md" | "lg" | "font";
14
14
  closeOnOverlayClick?: boolean;
15
+ /** Overrides the default `editor-dialog` test id on the dialog element. */
16
+ testId?: string;
15
17
  }
16
18
  export declare function Dialog(props: DialogProps): JSX.Element;
@@ -0,0 +1,14 @@
1
+ import { JSX } from 'solid-js';
2
+ export interface RevisionBulkDialogProps {
3
+ isOpen: boolean;
4
+ action: "accept" | "reject";
5
+ count: number;
6
+ onClose: () => void;
7
+ onConfirm: () => void;
8
+ }
9
+ /**
10
+ * Confirmation gate for the document-scoped Accept All / Reject All actions.
11
+ * Word asks before applying a bulk decision, and the count makes the scope
12
+ * explicit so it cannot be confused with the selection-scoped Accept/Reject.
13
+ */
14
+ export declare function RevisionBulkDialog(props: RevisionBulkDialogProps): JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oasis-editor",
3
- "version": "0.0.294",
3
+ "version": "0.0.296",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "repository": {