oasis-editor 0.0.334 → 0.0.336

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.
@@ -3,5 +3,6 @@ import { JSX } from 'solid-js';
3
3
  export interface RibbonRowProps {
4
4
  items: ToolbarItem[];
5
5
  api: ToolbarActionApi;
6
+ fullSpan?: boolean;
6
7
  }
7
8
  export declare function RibbonRow(props: RibbonRowProps): JSX.Element;
@@ -1,4 +1,4 @@
1
- import { RibbonGroupResizePolicy, RibbonGroupLayout, RibbonGroupResizeState, RibbonRow, RibbonTabId, ToolbarActionApi, ToolbarItem } from '../schema/items.js';
1
+ import { RibbonGroupResizePolicy, RibbonGroupLayout, RibbonGroupGrid, RibbonGroupResizeState, RibbonRow, RibbonTabId, ToolbarActionApi, ToolbarItem } from '../schema/items.js';
2
2
  import { CommandRef } from '../../../../core/commands/CommandRef.js';
3
3
  import { TranslateFn } from '../../../../i18n/index.js';
4
4
  export interface RibbonTabDefinition {
@@ -12,6 +12,7 @@ export interface RibbonGroupModel {
12
12
  label: string;
13
13
  largeItems: ToolbarItem[];
14
14
  layout: RibbonGroupLayout;
15
+ grid?: RibbonGroupGrid;
15
16
  rows: Record<RibbonRow, ToolbarItem[]>;
16
17
  order: number;
17
18
  resizePolicy: MergedRibbonGroupResizePolicy;
@@ -3,8 +3,8 @@ import { CommandBus } from '../../../../core/commands/CommandBus.js';
3
3
  import { CommandRef } from '../../../../core/commands/CommandRef.js';
4
4
  import { TranslationKey } from '../../../../i18n/index.js';
5
5
  import { ColorPalette } from './palette.js';
6
- import { RibbonGroupResizePolicy, RibbonTabId, RibbonRow, RibbonGroupLayout, RibbonSize } from '../../../../core/pluginUiTypes.js';
7
- export { RIBBON_TABS, CONTEXTUAL_TABS, type RibbonTabId, type RibbonRow, type RibbonGroupLayout, type RibbonSize, type RibbonGroupResizePolicy, type RibbonGroupResizeState, } from '../../../../core/pluginUiTypes.js';
6
+ import { RibbonGroupResizePolicy, RibbonTabId, RibbonRow, RibbonGroupLayout, RibbonGroupGrid, RibbonSize } from '../../../../core/pluginUiTypes.js';
7
+ export { RIBBON_TABS, CONTEXTUAL_TABS, type RibbonTabId, type RibbonRow, type RibbonGroupLayout, type RibbonGroupGrid, type RibbonSize, type RibbonGroupResizePolicy, type RibbonGroupResizeState, } from '../../../../core/pluginUiTypes.js';
8
8
  /** Reactive snapshot of a command's state, as consumed by toolbar items. */
9
9
  export interface ToolbarCommandState {
10
10
  isEnabled: boolean;
@@ -92,6 +92,7 @@ interface ToolbarItemBase extends ItemReactiveOverrides {
92
92
  /** Group-level responsive behavior. First item wins per property. */
93
93
  ribbonGroupResize?: RibbonGroupResizePolicy;
94
94
  ribbonGroupLayout?: RibbonGroupLayout;
95
+ ribbonGroupGrid?: RibbonGroupGrid;
95
96
  testId?: string;
96
97
  tooltipKey?: TranslationKey;
97
98
  tooltip?: string;
@@ -217,6 +218,7 @@ export interface SeparatorItem {
217
218
  row?: RibbonRow;
218
219
  ribbonGroupResize?: RibbonGroupResizePolicy;
219
220
  ribbonGroupLayout?: RibbonGroupLayout;
221
+ ribbonGroupGrid?: RibbonGroupGrid;
220
222
  /**
221
223
  * @param api - The toolbar action API.
222
224
  * @returns Whether the separator should be visible.
@@ -1,6 +1,7 @@
1
1
  import { ToolbarDocumentStyle } from './schema/items.js';
2
2
  /** Shared geometry for the ribbon allocator and the rendered gallery. */
3
3
  export declare const STYLE_GALLERY_CARD_WIDTH = 106;
4
+ export declare const TABLE_STYLE_GALLERY_CARD_WIDTH = 72;
4
5
  export declare const STYLE_GALLERY_EXPAND_WIDTH = 24;
5
6
  export declare const STYLE_GALLERY_BORDER_WIDTH = 2;
6
7
  /** A mounted strip always keeps a real preview, even while temporarily hidden.
@@ -8,5 +9,7 @@ export declare const STYLE_GALLERY_BORDER_WIDTH = 2;
8
9
  * placeholder when the document has available styles.
9
10
  */
10
11
  export declare function styleGallerySlots(width: number): number;
12
+ /** Whole-card capacity shared by paragraph and table preview strips. */
13
+ export declare function gallerySlots(width: number, cardWidth: number): number;
11
14
  /** Follow the active style without changing the canonical quick-style order. */
12
15
  export declare function visibleGalleryStyles(quick: readonly ToolbarDocumentStyle[], all: readonly ToolbarDocumentStyle[], activeId: string, slots: number): ToolbarDocumentStyle[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oasis-editor",
3
- "version": "0.0.334",
3
+ "version": "0.0.336",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "repository": {
@@ -77,6 +77,7 @@
77
77
  "test:ribbon:browser": "node scripts/verify-ribbon-reference.mjs",
78
78
  "test:ribbon:resize": "node scripts/verify-ribbon-resize.mjs",
79
79
  "test:ribbon:ci": "node scripts/verify-ribbon-ci.mjs",
80
+ "test:ribbon:geometry": "node scripts/verify-ribbon-geometry.mjs",
80
81
  "test:ribbon:contexts": "node scripts/verify-ribbon-contexts.mjs",
81
82
  "test:ribbon:icons": "node scripts/verify-ribbon-icons.mjs",
82
83
  "test:ribbon:editing": "node scripts/verify-ribbon-editing.mjs",