oasis-editor 0.0.128 → 0.0.129
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.
- package/dist/{OasisEditorApp-3vvH6KOz.js → OasisEditorApp-CDBzb0Eg.js} +261 -1
- package/dist/core/commands/publicCommandTypes.d.ts +10 -0
- package/dist/core/commands/table/tableColumnCommands.d.ts +6 -0
- package/dist/core/commands/table/tableRowCommands.d.ts +6 -0
- package/dist/core/pluginUiTypes.d.ts +8 -1
- package/dist/core/transactionMergeKeys.d.ts +3 -0
- package/dist/i18n/locales/en.d.ts +19 -0
- package/dist/i18n/locales/pt-BR.d.ts +19 -0
- package/dist/{index-Ceyv5JS5.js → index-XyL0Hpf4.js} +582 -394
- package/dist/oasis-editor.css +1 -1
- package/dist/oasis-editor.js +1 -1
- package/dist/oasis-editor.umd.cjs +4 -4
- package/dist/plugins/internal/essentialsCapabilities.d.ts +20 -0
- package/dist/ui/components/Toolbar/presets/builtinToolbarIds.d.ts +0 -1
- package/dist/ui/components/Toolbar/ribbon/RibbonTabs.d.ts +2 -1
- package/dist/ui/components/Toolbar/ribbon/ribbonModel.d.ts +10 -2
- package/dist/ui/components/Toolbar/schema/items.d.ts +1 -1
- package/package.json +1 -1
- package/dist/ui/components/Toolbar/groups/TableGroup.d.ts +0 -7
|
@@ -121,9 +121,29 @@ export interface EssentialsSectionCapability {
|
|
|
121
121
|
getMargins: () => EditorPageMargins | undefined;
|
|
122
122
|
setPageMargins: (margins: Partial<EditorPageMargins>) => void;
|
|
123
123
|
}
|
|
124
|
+
/** Which `w:tblLook` conditional-formatting option a toggle command controls. */
|
|
125
|
+
export type TableLookFlag = "firstRow" | "lastRow" | "firstCol" | "lastCol" | "bandedRows" | "bandedCols";
|
|
126
|
+
/** Resolved on/off state of every tblLook option for the selected table. */
|
|
127
|
+
export type TableLookState = Record<TableLookFlag, boolean>;
|
|
124
128
|
export interface EssentialsTableCapability {
|
|
125
129
|
insideTable: () => boolean;
|
|
126
130
|
selectionLabel: () => string | null;
|
|
131
|
+
/** Resolved tblLook option state for the selected table (null if none). */
|
|
132
|
+
getTblLook: () => TableLookState | null;
|
|
133
|
+
/** Flip one tblLook option on the selected table. */
|
|
134
|
+
toggleTblLook: (flag: TableLookFlag) => void;
|
|
135
|
+
/** Named table-style id currently applied to the selected table. */
|
|
136
|
+
getStyleId: () => string | null;
|
|
137
|
+
/** Apply a named table style to the selected table (empty clears it). */
|
|
138
|
+
setStyleId: (styleId: string) => void;
|
|
139
|
+
/** Sizing mode of the selected table (`fixed`/`autofit`, null if none). */
|
|
140
|
+
getLayout: () => "fixed" | "autofit" | null;
|
|
141
|
+
/** Toggle the selected table between fixed and autofit sizing. */
|
|
142
|
+
toggleAutoFit: () => void;
|
|
143
|
+
/** Equalize the widths of every column in the selected table. */
|
|
144
|
+
distributeColumns: () => void;
|
|
145
|
+
/** Equalize the heights of every row in the selected table. */
|
|
146
|
+
distributeRows: () => void;
|
|
127
147
|
canMerge: () => boolean;
|
|
128
148
|
canSplit: () => boolean;
|
|
129
149
|
canEditColumn: () => boolean;
|
|
@@ -36,7 +36,6 @@ export declare const OASIS_TOOLBAR_ITEMS: {
|
|
|
36
36
|
readonly specialIndent: "editor-toolbar-special-indent";
|
|
37
37
|
readonly lineSpacing: "editor-toolbar-line-spacing-control";
|
|
38
38
|
readonly metrics: "editor-toolbar-metrics";
|
|
39
|
-
readonly table: "editor-toolbar-table";
|
|
40
39
|
readonly margins: "editor-toolbar-margins";
|
|
41
40
|
readonly section: "editor-toolbar-section";
|
|
42
41
|
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Accessor, Setter, JSX } from 'solid-js';
|
|
2
|
-
import { RibbonTabId } from '../schema/items.js';
|
|
2
|
+
import { RibbonTabId, ToolbarActionApi } from '../schema/items.js';
|
|
3
3
|
|
|
4
4
|
export interface RibbonTabsProps {
|
|
5
5
|
activeTab: Accessor<RibbonTabId>;
|
|
6
6
|
setActiveTab: Setter<RibbonTabId>;
|
|
7
|
+
api: ToolbarActionApi;
|
|
7
8
|
}
|
|
8
9
|
export declare function RibbonTabs(props: RibbonTabsProps): JSX.Element;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { RibbonGroupResizePolicy, RibbonGroupResizeState, RibbonRow, RibbonTabId, ToolbarItem } from '../schema/items.js';
|
|
1
|
+
import { RibbonGroupResizePolicy, RibbonGroupResizeState, RibbonRow, RibbonTabId, ToolbarActionApi, ToolbarItem } from '../schema/items.js';
|
|
2
2
|
import { TranslateFn } from '../../../../i18n/index.js';
|
|
3
3
|
|
|
4
4
|
export interface RibbonTabDefinition {
|
|
5
5
|
id: RibbonTabId;
|
|
6
6
|
label: string;
|
|
7
|
+
/** True for tabs that only appear while their gating command is active. */
|
|
8
|
+
contextual: boolean;
|
|
7
9
|
}
|
|
8
10
|
export interface RibbonGroupModel {
|
|
9
11
|
id: string;
|
|
@@ -22,7 +24,13 @@ export interface RibbonGroupWidth {
|
|
|
22
24
|
compact: number;
|
|
23
25
|
collapsed: number;
|
|
24
26
|
}
|
|
25
|
-
|
|
27
|
+
/**
|
|
28
|
+
* A contextual tab (e.g. table tools) is included only when its gating command
|
|
29
|
+
* reports `isActive`. Non-contextual tabs are always present. When no `api` is
|
|
30
|
+
* supplied, contextual tabs are omitted (used for static/enumeration contexts).
|
|
31
|
+
*/
|
|
32
|
+
export declare function isRibbonTabVisible(id: RibbonTabId, api?: Pick<ToolbarActionApi, "commands">): boolean;
|
|
33
|
+
export declare function buildRibbonTabDefinitions(t: TranslateFn, api?: Pick<ToolbarActionApi, "commands">): RibbonTabDefinition[];
|
|
26
34
|
export declare const DEFAULT_RIBBON_TAB: RibbonTabId;
|
|
27
35
|
export declare const DEFAULT_RIBBON_GROUP = "general";
|
|
28
36
|
export declare const DEFAULT_RIBBON_ROW: RibbonRow;
|
|
@@ -5,7 +5,7 @@ import { TranslationKey } from '../../../../i18n/index.js';
|
|
|
5
5
|
import { ColorPalette } from './palette.js';
|
|
6
6
|
import { RibbonGroupResizePolicy, RibbonTabId, RibbonRow, RibbonSize } from '../../../../core/pluginUiTypes.js';
|
|
7
7
|
|
|
8
|
-
export { RIBBON_TABS, type RibbonTabId, type RibbonRow, type RibbonSize, type RibbonGroupResizePolicy, type RibbonGroupResizeState, } from '../../../../core/pluginUiTypes.js';
|
|
8
|
+
export { RIBBON_TABS, CONTEXTUAL_TABS, type RibbonTabId, type RibbonRow, type RibbonSize, type RibbonGroupResizePolicy, type RibbonGroupResizeState, } from '../../../../core/pluginUiTypes.js';
|
|
9
9
|
/** Reactive snapshot of a command's state, as consumed by toolbar items. */
|
|
10
10
|
export interface ToolbarCommandState {
|
|
11
11
|
isEnabled: boolean;
|
package/package.json
CHANGED