oasis-editor 0.0.328 → 0.0.330
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-icbc1_V-.js +1 -0
- package/dist/defaultToolbar-D_gE0n_k.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/app/essentials/builtinStyleLabel.d.ts +4 -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 +12 -0
- package/dist/ui/toolbarStyleState.d.ts +2 -0
- package/package.json +1 -1
- package/dist/OasisEditorApp-DypG7JZe.js +0 -1
- package/dist/defaultToolbar-BnVz03A0.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;
|
|
@@ -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;
|
|
@@ -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,12 @@
|
|
|
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
|
+
/** A mounted strip always keeps a real preview, even while temporarily hidden.
|
|
7
|
+
* The ribbon owns collapse; a narrow strip must not degrade into a name-only
|
|
8
|
+
* placeholder when the document has available styles.
|
|
9
|
+
*/
|
|
10
|
+
export declare function styleGallerySlots(width: number): number;
|
|
11
|
+
/** Follow the active style without changing the canonical quick-style order. */
|
|
12
|
+
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;
|