oasis-editor 0.0.8 → 0.0.10

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.
@@ -1,4 +1,5 @@
1
1
  import { OasisPlugin } from '../../../../core/plugin.js';
2
+ import { TextCaseMode } from '../../../../core/commands/text.js';
2
3
  import { ToolbarStyleState } from '../../../../ui/toolbarStyleState.js';
3
4
 
4
5
  export interface EssentialsFeatureGate {
@@ -7,6 +8,9 @@ export interface EssentialsFeatureGate {
7
8
  export interface EssentialsStyleCapability {
8
9
  state: () => ToolbarStyleState;
9
10
  }
11
+ export interface EssentialsSelectionCapability {
12
+ isCollapsed: () => boolean;
13
+ }
10
14
  export interface EssentialsHistoryCapability {
11
15
  canUndo: () => boolean;
12
16
  canRedo: () => boolean;
@@ -42,6 +46,10 @@ export interface EssentialsFormattingCapability {
42
46
  splitBlock: () => boolean;
43
47
  setFontFamily: (value: string | null) => boolean;
44
48
  setFontSize: (value: number | null) => boolean;
49
+ increaseFontSize: () => boolean;
50
+ decreaseFontSize: () => boolean;
51
+ changeTextCase: (mode: TextCaseMode) => boolean;
52
+ clearFormatting: () => boolean;
45
53
  setColor: (value: string | null) => boolean;
46
54
  setHighlight: (value: string | null) => boolean;
47
55
  setTextShading: (value: string | null) => boolean;
@@ -129,6 +137,7 @@ export interface EssentialsTableCapability {
129
137
  export interface EssentialsPluginDeps {
130
138
  gate: EssentialsFeatureGate;
131
139
  style: EssentialsStyleCapability;
140
+ selection: EssentialsSelectionCapability;
132
141
  history: EssentialsHistoryCapability;
133
142
  formatting: EssentialsFormattingCapability;
134
143
  document: EssentialsDocumentCapability;
@@ -1,15 +1,17 @@
1
1
  import { OasisPlugin } from '../../../../core/plugin.js';
2
2
  import { ActionCommandBuilder, CommandBuilder, ValueCommandBuilder } from '../../essentialsCommandBuilders.js';
3
- import { EssentialsBrowserCapability, EssentialsDocumentCapability, EssentialsFeatureGate, EssentialsFormattingCapability, EssentialsHistoryCapability, EssentialsImageCapability, EssentialsLinkCapability, EssentialsParagraphCapability, EssentialsSectionCapability, EssentialsStyleCapability, EssentialsTableCapability } from '../../createEssentialsPlugin.js';
3
+ import { EssentialsBrowserCapability, EssentialsDocumentCapability, EssentialsFeatureGate, EssentialsFormattingCapability, EssentialsHistoryCapability, EssentialsImageCapability, EssentialsLinkCapability, EssentialsParagraphCapability, EssentialsSectionCapability, EssentialsSelectionCapability, EssentialsStyleCapability, EssentialsTableCapability } from '../../createEssentialsPlugin.js';
4
4
 
5
5
  interface CoreFormattingGroupDeps {
6
6
  gate: EssentialsFeatureGate;
7
7
  style: EssentialsStyleCapability;
8
+ selection: EssentialsSelectionCapability;
8
9
  history: EssentialsHistoryCapability;
9
10
  formatting: EssentialsFormattingCapability;
10
11
  link: EssentialsLinkCapability;
11
12
  command: CommandBuilder;
12
13
  valueCommand: ValueCommandBuilder;
14
+ actionCommand: ActionCommandBuilder;
13
15
  }
14
16
  interface DocumentAndBrowserGroupDeps {
15
17
  gate: EssentialsFeatureGate;
@@ -32,7 +34,7 @@ interface TableGroupDeps {
32
34
  table: EssentialsTableCapability;
33
35
  actionCommand: ActionCommandBuilder;
34
36
  }
35
- export declare function buildCoreFormattingCommands({ gate, style, history, formatting, link, command, valueCommand, }: CoreFormattingGroupDeps): NonNullable<OasisPlugin["commands"]>;
37
+ export declare function buildCoreFormattingCommands({ gate, style, selection, history, formatting, link, command, valueCommand, actionCommand, }: CoreFormattingGroupDeps): NonNullable<OasisPlugin["commands"]>;
36
38
  export declare function buildDocumentAndBrowserCommands({ gate, style, document, link, image, browser, actionCommand, }: DocumentAndBrowserGroupDeps): NonNullable<OasisPlugin["commands"]>;
37
39
  export declare function buildParagraphAndSectionCommands({ style, paragraph, section, valueCommand, actionCommand, }: ParagraphAndSectionGroupDeps): NonNullable<OasisPlugin["commands"]>;
38
40
  export declare function buildTableCommands({ gate, table, actionCommand, }: TableGroupDeps): NonNullable<OasisPlugin["commands"]>;
@@ -5,6 +5,10 @@
5
5
  */
6
6
  /** Standard point sizes offered in the toolbar and font dialog dropdowns. */
7
7
  export declare const STANDARD_FONT_SIZES_PT: number[];
8
+ /** Next larger standard point size (Word's "Grow Font"). */
9
+ export declare function nextFontSizePt(currentPt: number): number;
10
+ /** Next smaller standard point size (Word's "Shrink Font"). */
11
+ export declare function previousFontSizePt(currentPt: number): number;
8
12
  /** Convert a model pixel size to a point value, rounded to 2 decimals. */
9
13
  export declare function fontSizePxToPt(px: number): number;
10
14
  /** Convert a user-facing point size to a model pixel size, rounded to 4 decimals. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oasis-editor",
3
- "version": "0.0.8",
3
+ "version": "0.0.10",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",