@hufe921/canvas-editor 0.9.134 → 0.9.135
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/CHANGELOG.md +21 -0
- package/dist/assets/{catalog-Cno2frQt.js.map → catalog-B-cbxN0s.js.map} +1 -1
- package/dist/assets/{group-Bz5rW3In.js.map → group-BZtj1M7o.js.map} +1 -1
- package/dist/assets/{value-CEZhhW6y.js.map → value-By4_Dx3W.js.map} +1 -1
- package/dist/assets/{wordCount-C2BnvS6l.js.map → wordCount-Osi0e4qK.js.map} +1 -1
- package/dist/canvas-editor.js +554 -491
- package/dist/canvas-editor.js.map +1 -1
- package/dist/canvas-editor.umd.cjs +34 -34
- package/dist/canvas-editor.umd.cjs.map +1 -1
- package/dist/src/editor/core/accessibility/Accessibility.d.ts +14 -0
- package/dist/src/editor/core/draw/Draw.d.ts +3 -0
- package/dist/src/editor/core/draw/interactive/Search.d.ts +2 -1
- package/dist/src/editor/dataset/constant/Accessibility.d.ts +2 -0
- package/dist/src/editor/interface/Accessibility.d.ts +3 -0
- package/dist/src/editor/interface/Editor.d.ts +2 -0
- package/dist/src/editor/interface/EventBus.d.ts +2 -1
- package/dist/src/editor/interface/Listener.d.ts +2 -0
- package/dist/src/editor/interface/i18n/Accessibility.d.ts +4 -0
- package/dist/src/editor/interface/i18n/I18n.d.ts +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Draw } from '../draw/Draw';
|
|
2
|
+
export declare class Accessibility {
|
|
3
|
+
private draw;
|
|
4
|
+
private i18n;
|
|
5
|
+
private disabled;
|
|
6
|
+
private assertiveDom;
|
|
7
|
+
private rangeChangeHandler;
|
|
8
|
+
constructor(draw: Draw);
|
|
9
|
+
private handleRangeChange;
|
|
10
|
+
selection(): void;
|
|
11
|
+
input(data: string): void;
|
|
12
|
+
assertive(message: string): void;
|
|
13
|
+
destroy(): void;
|
|
14
|
+
}
|
|
@@ -42,6 +42,7 @@ import { Area } from './interactive/Area';
|
|
|
42
42
|
import { Badge } from './frame/Badge';
|
|
43
43
|
import { Graffiti } from './graffiti/Graffiti';
|
|
44
44
|
import { Magnifier } from './interactive/Magnifier';
|
|
45
|
+
import { Accessibility } from '../accessibility/Accessibility';
|
|
45
46
|
export declare class Draw {
|
|
46
47
|
private container;
|
|
47
48
|
private pageContainer;
|
|
@@ -107,6 +108,7 @@ export declare class Draw {
|
|
|
107
108
|
private selectionObserver;
|
|
108
109
|
private imageObserver;
|
|
109
110
|
private graffiti;
|
|
111
|
+
private accessibility;
|
|
110
112
|
private LETTER_REG;
|
|
111
113
|
private WORD_LIKE_REG;
|
|
112
114
|
private rowList;
|
|
@@ -212,6 +214,7 @@ export declare class Draw {
|
|
|
212
214
|
getImageObserver(): ImageObserver;
|
|
213
215
|
getI18n(): I18n;
|
|
214
216
|
getGraffiti(): Graffiti;
|
|
217
|
+
getAccessibility(): Accessibility;
|
|
215
218
|
getRowCount(): number;
|
|
216
219
|
getDataURL(payload?: IGetImageOption): Promise<string[]>;
|
|
217
220
|
getPainterStyle(): IElementStyle | null;
|
|
@@ -17,10 +17,11 @@ export declare class Search {
|
|
|
17
17
|
constructor(draw: Draw);
|
|
18
18
|
getSearchKeyword(): string | null;
|
|
19
19
|
setSearchKeyword(payload: string | null, options?: ISearchOption): void;
|
|
20
|
+
private getSearchMatchGroupStartIndex;
|
|
20
21
|
searchNavigatePre(): number | null;
|
|
21
22
|
searchNavigateNext(): number | null;
|
|
22
23
|
searchNavigateScrollIntoView(position: IElementPosition): void;
|
|
23
|
-
getSearchNavigateIndexList():
|
|
24
|
+
getSearchNavigateIndexList(): number[];
|
|
24
25
|
getSearchMatchList(): ISearchResult[];
|
|
25
26
|
getSearchNavigateInfo(): null | INavigateInfo;
|
|
26
27
|
getMatchList(payload: string, originalElementList: IElement[]): ISearchResult[];
|
|
@@ -28,6 +28,7 @@ import { IRange } from './Range';
|
|
|
28
28
|
import { IGraffitiData, IGraffitiOption } from './Graffiti';
|
|
29
29
|
import { IWhiteSpaceOption } from './WhiteSpace';
|
|
30
30
|
import { IMagnifierOption } from './Magnifier';
|
|
31
|
+
import { IAccessibilityOption } from './Accessibility';
|
|
31
32
|
export interface IEditorData {
|
|
32
33
|
header?: IElement[];
|
|
33
34
|
main: IElement[];
|
|
@@ -106,6 +107,7 @@ export interface IEditorOption {
|
|
|
106
107
|
imgCaption?: IImgCaptionOption;
|
|
107
108
|
list?: IListOption;
|
|
108
109
|
magnifier?: IMagnifierOption;
|
|
110
|
+
accessibility?: IAccessibilityOption;
|
|
109
111
|
}
|
|
110
112
|
export interface IEditorResult {
|
|
111
113
|
version: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IContentChange, IControlChange, IControlContentChange, IImageDblclick, IImageMousedown, IImageSizeChange, IInputEventChange, IIntersectionPageNoChange, ILabelMousedown, IMouseEventChange, IPageModeChange, IPageScaleChange, IPageSizeChange, IPositionContextChange, IRangeStyleChange, ISaved, IVisiblePageNoListChange, IZoneChange } from './Listener';
|
|
1
|
+
import { IContentChange, IControlChange, IControlContentChange, IImageDblclick, IImageMousedown, IImageSizeChange, IInputEventChange, IIntersectionPageNoChange, ILabelMousedown, IMouseEventChange, IPageModeChange, IPageScaleChange, IPageSizeChange, IPositionContextChange, IRangeChange, IRangeStyleChange, ISaved, IVisiblePageNoListChange, IZoneChange } from './Listener';
|
|
2
2
|
export interface EventBusMap {
|
|
3
3
|
rangeStyleChange: IRangeStyleChange;
|
|
4
4
|
visiblePageNoListChange: IVisiblePageNoListChange;
|
|
@@ -23,4 +23,5 @@ export interface EventBusMap {
|
|
|
23
23
|
imageMousedown: IImageMousedown;
|
|
24
24
|
imageDblclick: IImageDblclick;
|
|
25
25
|
labelMousedown: ILabelMousedown;
|
|
26
|
+
rangeChange: IRangeChange;
|
|
26
27
|
}
|
|
@@ -7,6 +7,7 @@ import { IControlChangeResult, IControlContentChangeResult } from './Control';
|
|
|
7
7
|
import { IEditorResult } from './Editor';
|
|
8
8
|
import { IElement } from './Element';
|
|
9
9
|
import { IPositionContext } from './Position';
|
|
10
|
+
import { IRange } from './Range';
|
|
10
11
|
import { ITextDecoration } from './Text';
|
|
11
12
|
export interface IRangeStyle {
|
|
12
13
|
type: ElementType | null;
|
|
@@ -64,3 +65,4 @@ export type ILabelMousedown = (payload: {
|
|
|
64
65
|
evt: MouseEvent;
|
|
65
66
|
element: IElement;
|
|
66
67
|
}) => void;
|
|
68
|
+
export type IRangeChange = (payload: IRange) => void;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { IDatePickerLang } from '../../core/draw/particle/date/DatePicker';
|
|
2
2
|
import { IContextmenuLang } from '../contextmenu/ContextMenu';
|
|
3
|
+
import { IAccessibilityLang } from './Accessibility';
|
|
3
4
|
export interface ILang {
|
|
4
5
|
contextmenu: IContextmenuLang;
|
|
5
6
|
datePicker: IDatePickerLang;
|
|
7
|
+
accessibility: IAccessibilityLang;
|
|
6
8
|
}
|
package/package.json
CHANGED