oasis-editor 0.0.20 → 0.0.21

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,6 +1,7 @@
1
+ import { JSX } from 'solid-js';
1
2
  import { ToolbarActionApi } from '../schema/items.js';
2
3
 
3
4
  /** Section page-setup panel (orientation, section breaks) — command-driven. */
4
5
  export declare function SectionGroup(props: {
5
6
  api: ToolbarActionApi;
6
- }): import("solid-js").JSX.Element;
7
+ }): JSX.Element;
@@ -37,6 +37,7 @@ export declare const OASIS_TOOLBAR_ITEMS: {
37
37
  readonly lineSpacing: "editor-toolbar-line-spacing-control";
38
38
  readonly metrics: "editor-toolbar-metrics";
39
39
  readonly table: "editor-toolbar-table";
40
+ readonly margins: "editor-toolbar-margins";
40
41
  readonly section: "editor-toolbar-section";
41
42
  };
42
43
  export type OasisToolbarItemId = (typeof OASIS_TOOLBAR_ITEMS)[keyof typeof OASIS_TOOLBAR_ITEMS];
@@ -6,6 +6,7 @@ export interface ToolbarButtonProps extends JSX.ButtonHTMLAttributes<HTMLButtonE
6
6
  active?: boolean;
7
7
  tooltip?: string;
8
8
  wide?: boolean;
9
+ ribbonSize?: "normal" | "large";
9
10
  }
10
11
  /** Generic toolbar button primitive (icon and/or label, active/disabled). */
11
12
  export declare function Button(props: ToolbarButtonProps): JSX.Element;
@@ -8,6 +8,7 @@ export interface MenuProps {
8
8
  active?: boolean;
9
9
  disabled?: boolean;
10
10
  hideChevron?: boolean;
11
+ ribbonSize?: "normal" | "large";
11
12
  /** Extra class for the popover panel. */
12
13
  panelClass?: string;
13
14
  keepMounted?: boolean;
@@ -1,3 +1,4 @@
1
+ import { JSX } from 'solid-js';
1
2
  import { ToolbarActionApi } from '../schema/items.js';
2
3
  import { RibbonGroupModel } from './ribbonModel.js';
3
4
 
@@ -5,4 +6,4 @@ export interface RibbonGroupProps {
5
6
  group: RibbonGroupModel;
6
7
  api: ToolbarActionApi;
7
8
  }
8
- export declare function RibbonGroup(props: RibbonGroupProps): import("solid-js").JSX.Element;
9
+ export declare function RibbonGroup(props: RibbonGroupProps): JSX.Element;
@@ -7,6 +7,7 @@ export interface RibbonTabDefinition {
7
7
  export interface RibbonGroupModel {
8
8
  id: string;
9
9
  label: string;
10
+ largeItems: ToolbarItem[];
10
11
  rows: Record<RibbonRow, ToolbarItem[]>;
11
12
  order: number;
12
13
  }
@@ -17,5 +18,6 @@ export declare const DEFAULT_RIBBON_ROW: RibbonRow;
17
18
  export declare function normalizeRibbonTab(tab: ToolbarItem["tab"]): RibbonTabId;
18
19
  export declare function normalizeRibbonGroup(group: ToolbarItem["group"]): string;
19
20
  export declare function normalizeRibbonRow(row: ToolbarItem["row"]): RibbonRow;
21
+ export declare function isLargeRibbonItem(item: ToolbarItem): boolean;
20
22
  export declare function ribbonGroupLabel(group: string): string;
21
23
  export declare function buildRibbonGroups(items: ToolbarItem[], tab: RibbonTabId): RibbonGroupModel[];
@@ -7,6 +7,7 @@ import { ColorPalette } from './palette.js';
7
7
  export declare const RIBBON_TABS: readonly ["file", "home", "insert", "draw", "layout", "references", "collaboration", "protection", "view", "plugins", "ai"];
8
8
  export type RibbonTabId = (typeof RIBBON_TABS)[number];
9
9
  export type RibbonRow = 1 | 2;
10
+ export type RibbonSize = "normal" | "large";
10
11
  /** Reactive snapshot of a command's state, as consumed by toolbar items. */
11
12
  export interface ToolbarCommandState {
12
13
  isEnabled: boolean;
@@ -50,6 +51,8 @@ interface ToolbarItemBase extends ItemReactiveOverrides {
50
51
  group?: string;
51
52
  /** Two-row ribbon placement. Missing values default to row 1. */
52
53
  row?: RibbonRow;
54
+ /** Ribbon-only visual scale. Large items span both toolbar rows. */
55
+ ribbonSize?: RibbonSize;
53
56
  testId?: string;
54
57
  tooltipKey?: TranslationKey;
55
58
  tooltip?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oasis-editor",
3
- "version": "0.0.20",
3
+ "version": "0.0.21",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",