oasis-editor 0.0.291 → 0.0.293

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.
@@ -30,6 +30,14 @@ export interface AppCommandsControllerDeps {
30
30
  isOpen: boolean;
31
31
  initialCaption: string;
32
32
  }) => void;
33
+ setFontDialog: (state: {
34
+ isOpen: boolean;
35
+ initial: import('../components/Dialogs/FontDialog.js').FontDialogInitialValues;
36
+ }) => void;
37
+ setParagraphDialog: (state: {
38
+ isOpen: boolean;
39
+ initial: import('../components/Dialogs/ParagraphDialog.js').ParagraphDialogInitialValues;
40
+ }) => void;
33
41
  }
34
42
  /**
35
43
  * Builds the command controller (and its keyboard-flavoured variant that adds
@@ -67,6 +75,10 @@ declare function createAppCommandsControllerImpl(deps: AppCommandsControllerDeps
67
75
  applyRejectAllRevisionsCommand: () => void;
68
76
  applyLinkCommand: (href: string | null) => void;
69
77
  promptForLink: () => void;
78
+ openFontDialog: () => void;
79
+ openParagraphDialog: () => void;
80
+ openStylesDialog: () => void;
81
+ openPageSetupDialog: () => void;
70
82
  removeLinkCommand: () => void;
71
83
  applyImageAltCommand: (alt: string) => void;
72
84
  promptForImageAlt: () => void;
@@ -117,6 +129,10 @@ declare function createAppCommandsControllerImpl(deps: AppCommandsControllerDeps
117
129
  applyRejectAllRevisionsCommand: () => void;
118
130
  applyLinkCommand: (href: string | null) => void;
119
131
  promptForLink: () => void;
132
+ openFontDialog: () => void;
133
+ openParagraphDialog: () => void;
134
+ openStylesDialog: () => void;
135
+ openPageSetupDialog: () => void;
120
136
  removeLinkCommand: () => void;
121
137
  applyImageAltCommand: (alt: string) => void;
122
138
  promptForImageAlt: () => void;
@@ -64,6 +64,14 @@ export interface EditorCommandRuntimeDeps {
64
64
  initial?: import('../../core/model.js').EditorMathExpression;
65
65
  targetRunId?: string;
66
66
  }) => void;
67
+ setFontDialog: (state: {
68
+ isOpen: boolean;
69
+ initial: import('../components/Dialogs/FontDialog.js').FontDialogInitialValues;
70
+ }) => void;
71
+ setParagraphDialog: (state: {
72
+ isOpen: boolean;
73
+ initial: import('../components/Dialogs/ParagraphDialog.js').ParagraphDialogInitialValues;
74
+ }) => void;
67
75
  getUiState: () => OasisEditorUiState;
68
76
  updateUiState: (patch: OasisEditorUiState) => OasisEditorUiState;
69
77
  zoom: {
@@ -109,6 +117,10 @@ declare function createEditorCommandRuntimeImpl(deps: EditorCommandRuntimeDeps):
109
117
  applyRejectAllRevisionsCommand: () => void;
110
118
  applyLinkCommand: (href: string | null) => void;
111
119
  promptForLink: () => void;
120
+ openFontDialog: () => void;
121
+ openParagraphDialog: () => void;
122
+ openStylesDialog: () => void;
123
+ openPageSetupDialog: () => void;
112
124
  removeLinkCommand: () => void;
113
125
  applyImageAltCommand: (alt: string) => void;
114
126
  promptForImageAlt: () => void;
@@ -0,0 +1,13 @@
1
+ import { ToolbarStyleState } from '../toolbarStyleState.js';
2
+ import { FontDialogInitialValues } from '../components/Dialogs/FontDialog.js';
3
+ import { ParagraphDialogInitialValues } from '../components/Dialogs/ParagraphDialog.js';
4
+ /**
5
+ * Builds the initial values for the Font dialog from the current toolbar style state.
6
+ * Matches the logic in `useFontDialogBridge.createInitialValues`.
7
+ */
8
+ export declare function createFontDialogInitialValues(styleState: ToolbarStyleState): FontDialogInitialValues;
9
+ /**
10
+ * Builds the initial values for the Paragraph dialog from the current toolbar style state.
11
+ * Matches the logic in `useParagraphDialogBridge.createInitialValues`.
12
+ */
13
+ export declare function createParagraphDialogInitialValues(styleState: ToolbarStyleState): ParagraphDialogInitialValues;
@@ -1,4 +1,5 @@
1
1
  import { RibbonGroupResizePolicy, RibbonGroupLayout, RibbonGroupResizeState, RibbonRow, RibbonTabId, ToolbarActionApi, ToolbarItem } from '../schema/items.js';
2
+ import { CommandRef } from '../../../../core/commands/CommandRef.js';
2
3
  import { TranslateFn } from '../../../../i18n/index.js';
3
4
  export interface RibbonTabDefinition {
4
5
  id: RibbonTabId;
@@ -13,7 +14,7 @@ export interface RibbonGroupModel {
13
14
  layout: RibbonGroupLayout;
14
15
  rows: Record<RibbonRow, ToolbarItem[]>;
15
16
  order: number;
16
- resizePolicy: Required<RibbonGroupResizePolicy>;
17
+ resizePolicy: MergedRibbonGroupResizePolicy;
17
18
  }
18
19
  export interface ResolvedRibbonGroupModel extends RibbonGroupModel {
19
20
  resizeState: RibbonGroupResizeState;
@@ -52,6 +53,11 @@ export declare function normalizeRibbonTab(tab: ToolbarItem["tab"]): RibbonTabId
52
53
  export declare function normalizeRibbonGroup(group: ToolbarItem["group"]): string;
53
54
  export declare function normalizeRibbonRow(row: ToolbarItem["row"]): RibbonRow;
54
55
  export declare function isLargeRibbonItem(item: ToolbarItem): boolean;
56
+ /** Merged resize policy with all properties resolved except launcher fields which stay optional. */
57
+ type MergedRibbonGroupResizePolicy = Omit<Required<RibbonGroupResizePolicy>, "launcher" | "launcherTooltip"> & {
58
+ launcher?: CommandRef;
59
+ launcherTooltip?: string;
60
+ };
55
61
  export declare function ribbonGroupLabel(group: string, t: TranslateFn): string;
56
62
  /** Filter reactive visibility before grouping, without hiding disabled actions. */
57
63
  export declare function visibleRibbonItems(items: ToolbarItem[], api: ToolbarActionApi): ToolbarItem[];
@@ -72,3 +78,4 @@ export declare function buildRibbonGroups(items: ToolbarItem[], tab: RibbonTabId
72
78
  * determines each step. Measured widths include the group's own chrome.
73
79
  */
74
80
  export declare function resolveResponsiveRibbonGroups(groups: RibbonGroupModel[], availableWidth: number | null, measurements?: Partial<Record<string, Partial<RibbonGroupWidth>>>): ResolvedRibbonGroupModel[];
81
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oasis-editor",
3
- "version": "0.0.291",
3
+ "version": "0.0.293",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "repository": {