oasis-editor 0.0.285 → 0.0.286
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--8jvrCTf.js → OasisEditorApp--pDBHFEl.js} +1 -1
- package/dist/{defaultToolbar-DIPHhZNu.js → defaultToolbar-DbTbnEI1.js} +1 -1
- package/dist/oasis-editor.js +1 -1
- package/dist/oasis-editor.umd.cjs +1 -1
- package/dist/ui/components/Toolbar/controls/ImageSizeControls.d.ts +3 -1
- package/dist/ui/components/Toolbar/primitives/MetricField.d.ts +24 -0
- package/package.json +1 -1
|
@@ -3,7 +3,9 @@ import { ToolbarActionApi } from '../schema/items.js';
|
|
|
3
3
|
/**
|
|
4
4
|
* A labelled centimetre field for the image Size group (height or width). Reads
|
|
5
5
|
* the current size from the `imageHeightCm`/`imageWidthCm` command and writes it
|
|
6
|
-
* back on
|
|
6
|
+
* back on commit; the core keeps the aspect ratio locked. The draft/commit
|
|
7
|
+
* behaviour comes from `MetricField`: committing per keystroke dropped the
|
|
8
|
+
* contextual Picture Format tab after the first digit.
|
|
7
9
|
*/
|
|
8
10
|
export declare function ImageSizeField(props: {
|
|
9
11
|
api: ToolbarActionApi;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { JSX } from 'solid-js';
|
|
2
|
+
export interface MetricFieldProps {
|
|
3
|
+
/** Model value formatted with a dot decimal, or `""` when mixed/absent. */
|
|
4
|
+
value: string;
|
|
5
|
+
label: string;
|
|
6
|
+
title: string;
|
|
7
|
+
unit: "pt" | "cm";
|
|
8
|
+
testId: string;
|
|
9
|
+
/** Extra class on the field wrapper (layout-specific positioning). */
|
|
10
|
+
class?: string;
|
|
11
|
+
min?: string;
|
|
12
|
+
step?: string;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
onChange: (value: number | null) => void;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* One numeric measurement (paragraph metric, image size). Edits stay local
|
|
18
|
+
* until Enter or blur — like Word's Layout fields — because the commands that
|
|
19
|
+
* consume them return focus to the document, which would otherwise tear focus
|
|
20
|
+
* out of the field (and, for object selections, drop the contextual tab) after
|
|
21
|
+
* the first keystroke. Values display and accept the document's decimal
|
|
22
|
+
* separator (`2,5` in pt-BR); the model still stores a dot decimal.
|
|
23
|
+
*/
|
|
24
|
+
export declare function MetricField(props: MetricFieldProps): JSX.Element;
|