@usememos/editor 26.10.8 → 26.10.9
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 +1 -1
- package/dist/base.css +3 -2
- package/dist/index.js +9 -111
- package/dist/index.js.map +2 -2
- package/dist/style.css +1 -1
- package/dist/types/labels.d.ts +0 -3
- package/dist/types/ui/image.d.ts +3 -20
- package/package.json +1 -1
package/dist/style.css
CHANGED
package/dist/types/labels.d.ts
CHANGED
|
@@ -51,9 +51,6 @@ export declare const DEFAULT_LABELS: {
|
|
|
51
51
|
tableSection: string;
|
|
52
52
|
/** Shown in place of an image that did not load and has no alt text. */
|
|
53
53
|
imageUnavailable: string;
|
|
54
|
-
/** The button over a selected image that edits its alt text, and the field's name. */
|
|
55
|
-
altText: string;
|
|
56
|
-
altTextPlaceholder: string;
|
|
57
54
|
/** Accessible name of the handles that resize an image. */
|
|
58
55
|
resizeImage: string;
|
|
59
56
|
};
|
package/dist/types/ui/image.d.ts
CHANGED
|
@@ -4,38 +4,24 @@ export declare class ImageControls {
|
|
|
4
4
|
/** A frame over the image, holding the two handles. It takes no pointer events itself. */
|
|
5
5
|
private readonly frame;
|
|
6
6
|
private readonly handles;
|
|
7
|
-
private readonly toolbar;
|
|
8
|
-
private readonly altPopover;
|
|
9
|
-
private readonly altInput;
|
|
10
7
|
/** The image under the pointer, which shows handles while it is hovered. */
|
|
11
8
|
private hovered;
|
|
12
|
-
/** The selected image, which shows handles
|
|
9
|
+
/** The selected image, which shows handles. */
|
|
13
10
|
private selected;
|
|
14
11
|
/** The image the frame is shown for. */
|
|
15
12
|
private framed;
|
|
16
13
|
private drag;
|
|
17
|
-
private altDone;
|
|
18
14
|
private hideTimer;
|
|
19
15
|
private readonly cleanup;
|
|
20
16
|
constructor(editor: Editor);
|
|
21
|
-
/** True while the alt text field is open. */
|
|
22
|
-
get isEditingAlt(): boolean;
|
|
23
|
-
/** True while an image is being resized. */
|
|
24
|
-
get isResizing(): boolean;
|
|
25
17
|
/** True when `node` is part of these controls. */
|
|
26
18
|
contains(node: Node): boolean;
|
|
27
|
-
/**
|
|
28
|
-
|
|
29
|
-
* toolbar shows only when `toolbar` is true (the editor is focused and not
|
|
30
|
-
* busy with something else).
|
|
31
|
-
*/
|
|
32
|
-
update(selected: ImageTarget | null, toolbar: boolean): void;
|
|
19
|
+
/** Shows the handles for the selected image, or for none. */
|
|
20
|
+
update(selected: ImageTarget | null): void;
|
|
33
21
|
/** Moves the controls to where their image is now, after scrolling. */
|
|
34
22
|
reposition(): void;
|
|
35
23
|
hide(): void;
|
|
36
24
|
destroy(): void;
|
|
37
|
-
/** The toolbar goes inside the image's top corner, as in Notion, or above an image too small to hold it. */
|
|
38
|
-
private showToolbar;
|
|
39
25
|
private onOver;
|
|
40
26
|
private scheduleUnhover;
|
|
41
27
|
private cancelUnhover;
|
|
@@ -44,7 +30,4 @@ export declare class ImageControls {
|
|
|
44
30
|
private startDrag;
|
|
45
31
|
private moveDrag;
|
|
46
32
|
private endDrag;
|
|
47
|
-
private openAlt;
|
|
48
|
-
private closeAlt;
|
|
49
|
-
private finishAlt;
|
|
50
33
|
}
|