oasis-editor 0.0.327 → 0.0.329
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/README.md +11 -0
- package/dist/OasisEditorApp-CBbANoKL.js +1 -0
- package/dist/app/client/OasisEditorClient.d.ts +1 -0
- package/dist/defaultToolbar-DQT_deI6.js +1 -0
- package/dist/i18n/locales/en.d.ts +12 -0
- package/dist/i18n/locales/pt-BR.d.ts +12 -0
- package/dist/oasis-editor.css +1 -1
- package/dist/oasis-editor.js +1 -1
- package/dist/oasis-editor.umd.cjs +1 -1
- package/dist/plugins/internal/essentialsCapabilities.d.ts +1 -0
- package/dist/ui/OasisEditorAppProps.d.ts +7 -0
- package/dist/ui/app/essentials/builtinStyleLabel.d.ts +4 -0
- package/dist/ui/components/Toolbar/primitives/Menu.d.ts +5 -0
- package/dist/ui/components/Toolbar/primitives/Popover.d.ts +3 -0
- package/dist/ui/components/Toolbar/primitives/usePopoverPosition.d.ts +3 -1
- package/dist/ui/components/Toolbar/schema/items.d.ts +2 -0
- package/dist/ui/components/Toolbar/styleGalleryLayout.d.ts +9 -0
- package/dist/ui/toolbarStyleState.d.ts +2 -0
- package/package.json +1 -1
- package/dist/OasisEditorApp-BKI4ByVG.js +0 -1
- package/dist/defaultToolbar-BN5Wbr1A.js +0 -1
|
@@ -190,6 +190,7 @@ export interface EssentialsFormattingCapability {
|
|
|
190
190
|
export interface EssentialsDocumentStyleDescriptor {
|
|
191
191
|
id: string;
|
|
192
192
|
name: string;
|
|
193
|
+
labelKey?: import('../../i18n/index.js').TranslationKey;
|
|
193
194
|
type: "paragraph" | "character" | "table";
|
|
194
195
|
qFormat?: boolean;
|
|
195
196
|
uiPriority?: number;
|
|
@@ -25,6 +25,13 @@ export interface OasisEditorAppUiProps {
|
|
|
25
25
|
toolbar?: {
|
|
26
26
|
view?: ToolbarViewMode;
|
|
27
27
|
layout?: ToolbarLayoutMode;
|
|
28
|
+
/**
|
|
29
|
+
* Ribbon density. `simplified` is Office's one-line ribbon: the tabs stay,
|
|
30
|
+
* each panel is a single row of small commands with no group captions, and
|
|
31
|
+
* groups that do not fit open as popups. Meant for embedded editors (form
|
|
32
|
+
* fields) where the ~90px classic ribbon costs too much height.
|
|
33
|
+
*/
|
|
34
|
+
ribbonStyle?: "classic" | "simplified";
|
|
28
35
|
};
|
|
29
36
|
showTitleBar?: boolean;
|
|
30
37
|
showMenubar?: boolean;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { EditorNamedStyle } from '../../../core/model.js';
|
|
2
|
+
import { TranslationKey } from '../../../i18n/index.js';
|
|
3
|
+
/** Only identify canonical native definitions, not arbitrary imported names or IDs. */
|
|
4
|
+
export declare function builtinStyleLabel(style: EditorNamedStyle): TranslationKey | undefined;
|
|
@@ -8,6 +8,11 @@ export interface MenuProps {
|
|
|
8
8
|
disabled?: boolean;
|
|
9
9
|
hideChevron?: boolean;
|
|
10
10
|
ribbonSize?: "normal" | "large";
|
|
11
|
+
/**
|
|
12
|
+
* Name of the Ribbon group a collapsed-group trigger stands for. Exposed as
|
|
13
|
+
* `data-group-label` so the simplified ribbon can caption the trigger.
|
|
14
|
+
*/
|
|
15
|
+
groupLabel?: string;
|
|
11
16
|
/** Extra class for the popover panel. */
|
|
12
17
|
panelClass?: string;
|
|
13
18
|
/** Reposition tall panels so they remain within the viewport vertically. */
|
|
@@ -19,10 +19,13 @@ export interface PopoverProps {
|
|
|
19
19
|
children: JSX.Element;
|
|
20
20
|
placement?: PopoverPlacement;
|
|
21
21
|
panelClass?: string;
|
|
22
|
+
/** Optional panel-specific sizing; positioning remains owned by Popover. */
|
|
23
|
+
panelStyle?: JSX.CSSProperties;
|
|
22
24
|
panelRole?: JSX.HTMLAttributes<HTMLDivElement>["role"];
|
|
23
25
|
panelTestId?: string;
|
|
24
26
|
/** Reposition tall panels so they remain within the viewport vertically. */
|
|
25
27
|
fitViewport?: boolean;
|
|
28
|
+
observeSize?: boolean;
|
|
26
29
|
onPanelMouseLeave?: () => void;
|
|
27
30
|
closeOnEscape?: boolean;
|
|
28
31
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Accessor } from 'solid-js';
|
|
2
|
-
export type PopoverPlacement = "bottom-start" | "bottom-end";
|
|
2
|
+
export type PopoverPlacement = "bottom-start" | "bottom-end" | "bottom-auto";
|
|
3
3
|
export interface PopoverPositionOptions {
|
|
4
4
|
/** The element the panel is anchored to. */
|
|
5
5
|
anchor: Accessor<HTMLElement | undefined>;
|
|
@@ -10,6 +10,8 @@ export interface PopoverPositionOptions {
|
|
|
10
10
|
placement?: PopoverPlacement;
|
|
11
11
|
/** Clamp the panel's vertical position to the visible viewport. */
|
|
12
12
|
fitViewport?: boolean;
|
|
13
|
+
/** Watch anchor and panel size while open (opt-in for dynamic galleries). */
|
|
14
|
+
observeSize?: boolean;
|
|
13
15
|
/** Vertical gap between anchor and panel, in px. */
|
|
14
16
|
gap?: number;
|
|
15
17
|
/** Minimum distance from the viewport edges, in px. */
|
|
@@ -18,6 +18,8 @@ export interface ToolbarCommandState {
|
|
|
18
18
|
export interface ToolbarDocumentStyle {
|
|
19
19
|
id: string;
|
|
20
20
|
name: string;
|
|
21
|
+
/** Optional presentation label for positively identified native styles. */
|
|
22
|
+
labelKey?: TranslationKey;
|
|
21
23
|
type: "paragraph" | "character" | "table";
|
|
22
24
|
qFormat?: boolean;
|
|
23
25
|
uiPriority?: number;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ToolbarDocumentStyle } from './schema/items.js';
|
|
2
|
+
/** Shared geometry for the ribbon allocator and the rendered gallery. */
|
|
3
|
+
export declare const STYLE_GALLERY_CARD_WIDTH = 106;
|
|
4
|
+
export declare const STYLE_GALLERY_EXPAND_WIDTH = 24;
|
|
5
|
+
export declare const STYLE_GALLERY_BORDER_WIDTH = 2;
|
|
6
|
+
export declare const STYLE_GALLERY_MIN_CARD_WIDTH = 80;
|
|
7
|
+
export declare function styleGallerySlots(width: number): number;
|
|
8
|
+
/** Follow the active style without changing the canonical quick-style order. */
|
|
9
|
+
export declare function visibleGalleryStyles(quick: readonly ToolbarDocumentStyle[], all: readonly ToolbarDocumentStyle[], activeId: string, slots: number): ToolbarDocumentStyle[];
|
|
@@ -43,6 +43,8 @@ export interface ToolbarStyleState {
|
|
|
43
43
|
link: string;
|
|
44
44
|
snapToGrid: boolean | undefined;
|
|
45
45
|
styleId: string;
|
|
46
|
+
/** Distinguish a mixed paragraph selection from the implicit Normal style. */
|
|
47
|
+
mixedParagraphStyles?: boolean;
|
|
46
48
|
characterStyleId: string;
|
|
47
49
|
align: string;
|
|
48
50
|
lineHeight: string;
|