oasis-editor 0.0.350 → 0.0.352
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 +12 -3
- package/dist/{OasisEditorApp-EYpvLWKD.js → OasisEditorApp-CzDrLM9b.js} +1 -1
- package/dist/app/client/OasisEditorClient.d.ts +1 -1
- package/dist/defaultToolbar-C3dWxyY7.js +1 -0
- package/dist/i18n/locales/en.d.ts +2 -0
- package/dist/i18n/locales/pt-BR.d.ts +2 -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/ui/EditorStatusBar.d.ts +2 -0
- package/dist/ui/OasisEditorAppProps.d.ts +5 -1
- package/dist/ui/OasisEditorEditorProps.d.ts +1 -0
- package/dist/ui/app/buildEditorViewProps.d.ts +1 -0
- package/dist/ui/app/editorZoom.d.ts +4 -0
- package/dist/ui/components/Toolbar/ribbon/TwoLineRibbonPanel.d.ts +5 -0
- package/package.json +1 -1
- package/dist/defaultToolbar-BfAiuPv2.js +0 -1
|
@@ -7,6 +7,8 @@ export interface EditorStatusBarProps {
|
|
|
7
7
|
zoomPercent: () => number;
|
|
8
8
|
adjustZoom: (delta: number) => void;
|
|
9
9
|
setZoomPercent: (value: number) => void;
|
|
10
|
+
fitWidth?: () => boolean;
|
|
11
|
+
onFitWidth?: () => void;
|
|
10
12
|
persistenceStatus?: () => string;
|
|
11
13
|
}
|
|
12
14
|
export declare function EditorStatusBar(props: EditorStatusBarProps): JSX.Element;
|
|
@@ -31,7 +31,7 @@ export interface OasisEditorAppUiProps {
|
|
|
31
31
|
* groups that do not fit open as popups. Meant for embedded editors (form
|
|
32
32
|
* fields) where the ~90px classic ribbon costs too much height.
|
|
33
33
|
*/
|
|
34
|
-
ribbonStyle?: "classic" | "simplified";
|
|
34
|
+
ribbonStyle?: "classic" | "simplified" | "two-line";
|
|
35
35
|
};
|
|
36
36
|
showTitleBar?: boolean;
|
|
37
37
|
showMenubar?: boolean;
|
|
@@ -47,6 +47,10 @@ export interface OasisEditorAppUiProps {
|
|
|
47
47
|
locale?: "pt-BR" | "en";
|
|
48
48
|
/** Espaço externo em pixels ao redor das páginas; não altera as margens do documento. Padrão preservado quando omitido. */
|
|
49
49
|
pageGutter?: number;
|
|
50
|
+
/** Automatically fit the page to the viewport until the user adjusts zoom. */
|
|
51
|
+
zoom?: {
|
|
52
|
+
initialMode?: "fit-width";
|
|
53
|
+
};
|
|
50
54
|
viewportHeight?: number | string;
|
|
51
55
|
class?: string;
|
|
52
56
|
style?: JSX.CSSProperties;
|
|
@@ -11,6 +11,7 @@ export interface OasisEditorEditorLayoutProps {
|
|
|
11
11
|
measuredBlockHeights?: Accessor<Record<string, number>>;
|
|
12
12
|
measuredParagraphLayouts?: Accessor<Record<string, EditorLayoutParagraph>>;
|
|
13
13
|
pageGutter?: number;
|
|
14
|
+
initialZoomMode?: "fit-width";
|
|
14
15
|
viewportHeight?: number | string;
|
|
15
16
|
class?: string;
|
|
16
17
|
style?: JSX.CSSProperties;
|
|
@@ -15,6 +15,7 @@ export interface EditorViewLayoutInput {
|
|
|
15
15
|
documentLayout: Accessor<EditorLayoutDocument>;
|
|
16
16
|
remoteWebFonts?: boolean;
|
|
17
17
|
pageGutter?: number;
|
|
18
|
+
initialZoomMode?: "fit-width";
|
|
18
19
|
viewportHeight: number | string | undefined;
|
|
19
20
|
className: string | undefined;
|
|
20
21
|
style: JSX.CSSProperties | undefined;
|
|
@@ -4,6 +4,10 @@ export declare const ZOOM_MAX = 200;
|
|
|
4
4
|
export declare const ZOOM_STEP = 10;
|
|
5
5
|
export declare const ZOOM_DEFAULT = 100;
|
|
6
6
|
export declare function clampZoom(value: number): number;
|
|
7
|
+
/** Largest integral zoom that fits the page and outer gutter without horizontal overflow.
|
|
8
|
+
* Returns null until both measurements are valid. The existing minimum is preserved.
|
|
9
|
+
*/
|
|
10
|
+
export declare function calculateFitWidthZoom(viewportWidth: number, pageWidth: number, pageGutter: number): number | null;
|
|
7
11
|
export interface EditorZoomController {
|
|
8
12
|
/** Current zoom level as a percentage (clamped to [ZOOM_MIN, ZOOM_MAX]). */
|
|
9
13
|
zoomPercent: Accessor<number>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { JSX } from 'solid-js';
|
|
2
|
+
import { RibbonPanelProps } from './RibbonPanel.js';
|
|
3
|
+
/** Choose complete groups in order; everything else remains available in the menu. */
|
|
4
|
+
export declare function allocateTwoLineGroups(widths: number[], available: number, menuWidth: number): boolean[];
|
|
5
|
+
export declare function TwoLineRibbonPanel(props: RibbonPanelProps): JSX.Element;
|