@leafer-ui/interface 1.9.2 → 1.9.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leafer-ui/interface",
3
- "version": "1.9.2",
3
+ "version": "1.9.3",
4
4
  "description": "@leafer-ui/interface",
5
5
  "author": "Chao (Leafer) Wan",
6
6
  "license": "MIT",
@@ -22,6 +22,6 @@
22
22
  "leaferjs"
23
23
  ],
24
24
  "dependencies": {
25
- "@leafer/interface": "1.9.2"
25
+ "@leafer/interface": "1.9.3"
26
26
  }
27
27
  }
package/src/IScroller.ts CHANGED
@@ -7,11 +7,13 @@ export interface IScrollConfig {
7
7
  theme?: IScrollTheme // 主题
8
8
  style?: IBoxInputData // 滚动条样式
9
9
  size?: number // 滚动条的size
10
+ cornerRadius?: number // 默认取size的一半
10
11
  endsMargin?: number // 滚动条两端的间距
11
12
  sideMargin?: number // 滚动条两侧的间距
12
13
  minSize?: number // 最小显示size
13
14
  scaleFixed?: IScaleFixed
14
15
  scrollType?: 'drag' | 'move' | 'both' // 滚动类型
16
+ stopDefault?: boolean, // 阻止自身之外的默认滚动
15
17
  hideOnActionEnd?: boolean | 'hover' | 'scroll' // 操作结束时自动隐藏
16
18
  }
17
19
 
@@ -153,6 +153,9 @@ export interface IEditorConfig extends IObject {
153
153
  rotateKey?: IShortcutKeysCheck | IShortcutKeys
154
154
 
155
155
  beforeSelect?: IEditorBeforeSelect
156
+ beforeEditOuter?: IEditorBeforeEditOuter
157
+ beforeEditInner?: IEditorBeforeEditInner
158
+
156
159
  beforeMove?: IEditorBeforeMove
157
160
  beforeScale?: IEditorBeforeScale
158
161
  beforeRotate?: IEditorBeforeRotate
@@ -168,6 +171,13 @@ export interface IEditorSelectData {
168
171
  target: IUI | IUI[]
169
172
  }
170
173
 
174
+ export interface IEditorEditOuterData {
175
+ target: IUI
176
+ name: string
177
+ }
178
+
179
+ export type IEditorEditInnerData = IEditorEditOuterData
180
+
171
181
  export interface IEditorMoveData extends IPointData, IObject {
172
182
  target: IUI
173
183
  }
@@ -192,6 +202,14 @@ export interface IEditorBeforeSelect {
192
202
  (data: IEditorSelectData): IUI | IUI[] | boolean | void
193
203
  }
194
204
 
205
+ export interface IEditorBeforeEditOuter {
206
+ (data: IEditorEditOuterData): string | boolean | void
207
+ }
208
+
209
+ export interface IEditorBeforeEditInner {
210
+ (data: IEditorEditInnerData): string | boolean | void
211
+ }
212
+
195
213
  export interface IEditorBeforeMove {
196
214
  (data: IEditorMoveData): IPointData | boolean | void
197
215
  }
package/src/index.ts CHANGED
@@ -51,4 +51,4 @@ export { IEffectModule } from './module/IEffect'
51
51
  export { IFilterModule, IFilterProcessor, IFilterFunction } from './module/IFilter'
52
52
  export { ICachedShape } from './ICachedShape'
53
53
 
54
- export { IEditorBase, IEditorConfig, ITransformTool, IEditBoxBase, IEditPoint, IEditPointInputData, IEditPointType, IEditorDragStartData, IEditToolFunction, IEditorConfigFunction, IEditorBeforeSelect, IEditorBeforeMove, IEditorBeforeScale, IEditorBeforeRotate, IEditorBeforeSkew, IEditorSelectData, IEditorMoveData, IEditorScaleData, IEditorRotationData, IEditorSkewData } from './editor/IEditor'
54
+ export { IEditorBase, IEditorConfig, ITransformTool, IEditBoxBase, IEditPoint, IEditPointInputData, IEditPointType, IEditorDragStartData, IEditToolFunction, IEditorConfigFunction, IEditorBeforeSelect, IEditorBeforeEditOuter, IEditorBeforeEditInner, IEditorBeforeMove, IEditorBeforeScale, IEditorBeforeRotate, IEditorBeforeSkew, IEditorSelectData, IEditorEditOuterData, IEditorEditInnerData, IEditorMoveData, IEditorScaleData, IEditorRotationData, IEditorSkewData } from './editor/IEditor'
package/src/type/IType.ts CHANGED
@@ -199,6 +199,6 @@ export interface IEffect extends IFilter {
199
199
 
200
200
  }
201
201
 
202
- export type IOverflow = 'show' | 'hide' | 'scroll' | 'scroll-x' | 'scroll-y'
202
+ export type IOverflow = 'show' | 'hide' | 'scroll' | 'x-scroll' | 'y-scroll'
203
203
 
204
204
  export type ITextOverflow = 'show' | 'hide' | 'ellipsis' | (string & {})
package/types/index.d.ts CHANGED
@@ -149,7 +149,7 @@ interface IGrayscaleEffect {
149
149
  }
150
150
  interface IEffect extends IFilter {
151
151
  }
152
- type IOverflow = 'show' | 'hide' | 'scroll' | 'scroll-x' | 'scroll-y';
152
+ type IOverflow = 'show' | 'hide' | 'scroll' | 'x-scroll' | 'y-scroll';
153
153
  type ITextOverflow = 'show' | 'hide' | 'ellipsis' | (string & {});
154
154
 
155
155
  type ILeafPaintColor = IColorString | CanvasGradient | CanvasPattern;
@@ -519,6 +519,8 @@ interface IEditorConfig extends IObject$1 {
519
519
  multipleSelectKey?: IShortcutKeysCheck | IShortcutKeys;
520
520
  rotateKey?: IShortcutKeysCheck | IShortcutKeys;
521
521
  beforeSelect?: IEditorBeforeSelect;
522
+ beforeEditOuter?: IEditorBeforeEditOuter;
523
+ beforeEditInner?: IEditorBeforeEditInner;
522
524
  beforeMove?: IEditorBeforeMove;
523
525
  beforeScale?: IEditorBeforeScale;
524
526
  beforeRotate?: IEditorBeforeRotate;
@@ -530,6 +532,11 @@ interface IEditorConfig extends IObject$1 {
530
532
  interface IEditorSelectData {
531
533
  target: IUI$1 | IUI$1[];
532
534
  }
535
+ interface IEditorEditOuterData {
536
+ target: IUI$1;
537
+ name: string;
538
+ }
539
+ type IEditorEditInnerData = IEditorEditOuterData;
533
540
  interface IEditorMoveData extends IPointData$1, IObject$1 {
534
541
  target: IUI$1;
535
542
  }
@@ -549,6 +556,12 @@ interface IEditorSkewData extends ISkewData, IObject$1 {
549
556
  interface IEditorBeforeSelect {
550
557
  (data: IEditorSelectData): IUI$1 | IUI$1[] | boolean | void;
551
558
  }
559
+ interface IEditorBeforeEditOuter {
560
+ (data: IEditorEditOuterData): string | boolean | void;
561
+ }
562
+ interface IEditorBeforeEditInner {
563
+ (data: IEditorEditInnerData): string | boolean | void;
564
+ }
552
565
  interface IEditorBeforeMove {
553
566
  (data: IEditorMoveData): IPointData$1 | boolean | void;
554
567
  }
@@ -627,11 +640,13 @@ interface IScrollConfig {
627
640
  theme?: IScrollTheme;
628
641
  style?: IBoxInputData;
629
642
  size?: number;
643
+ cornerRadius?: number;
630
644
  endsMargin?: number;
631
645
  sideMargin?: number;
632
646
  minSize?: number;
633
647
  scaleFixed?: IScaleFixed;
634
648
  scrollType?: 'drag' | 'move' | 'both';
649
+ stopDefault?: boolean;
635
650
  hideOnActionEnd?: boolean | 'hover' | 'scroll';
636
651
  }
637
652
  type IScrollTheme = 'light' | 'dark' | (string & {});
@@ -1235,4 +1250,4 @@ interface IFilterFunction {
1235
1250
  (filter: IFilter, ui: IUI, bounds: IMatrixWithBoundsScaleData, currentCanvas: ILeaferCanvas, originCanvas: ILeaferCanvas, shape: ICachedShape): void;
1236
1251
  }
1237
1252
 
1238
- export type { IAnimate, IAnimateKeyframe, IAnimateList, IAnimateType, IAnimation, IApp, IAppConfig, IAppData, IAppForEachFunction, IAppInputData, IArrow, IArrowData, IArrowInputData, IArrowType, IBackgroundBoxStyle, IBlurEffect, IBox, IBoxData, IBoxInputData, ICachedShape, ICanvas, ICanvasData, ICanvasInputData, IColor, IColorConvertModule, IColorStop, IColorString, IComputedKeyframe, ICornerRadiusString, IDashPatternString, IEditBoxBase, IEditPoint, IEditPointInputData, IEditPointType, IEditToolFunction, IEditorBase, IEditorBeforeMove, IEditorBeforeRotate, IEditorBeforeScale, IEditorBeforeSelect, IEditorBeforeSkew, IEditorConfig, IEditorConfigFunction, IEditorDragStartData, IEditorMoveData, IEditorRotationData, IEditorScaleData, IEditorSelectData, IEditorSkewData, IEffect, IEffectAttrData, IEffectComputedData, IEffectInputData, IEffectModule, IEllipse, IEllipseData, IEllipseInputData, IExportModule, IFill, IFilterFunction, IFilterModule, IFilterProcessor, IFindUIMethod, IFlow, IFlowData, IFlowInputData, IFontWeight, IFontWeightNumer, IFontWeightString, IFrame, IFrameData, IFrameInputData, IFrameRenderModule, IGIF, IGIFData, IGIFInputData, IGradientPaint, IGradientType, IGrayscaleEffect, IGroup, IGroupData, IGroupInputData, IGroupRenderModule, IImage, IImageData, IImageFilters, IImageInputData, IImagePaint, IImagePaintMode, IImageRenderModule, IKeyframe, IKeyframeId, IKeyframesAnimation, ILeafFill, ILeafPaint, ILeafPaintColor, ILeafPaintPatternData, ILeafShadowEffect, ILeafStrokePaint, ILeafer, ILeaferData, ILeaferInputData, ILine, ILineData, ILineInputData, IOverflow, IPaint, IPaintAttr, IPaintBase, IPaintGradientModule, IPaintImageModule, IPaintModule, IPaintString, IPaintType, IPath, IPathArrowModule, IPathData, IPathDataArrow, IPathDataArrowMap, IPathDataArrowOffset, IPathInputData, IPen, IPenData, IPenInputData, IPercent, IPolygon, IPolygonData, IPolygonInputData, IRGB, IRGBA, IRect, IRectData, IRectInputData, IRectRenderModule, IRepeat, IRobot, IRobotActionName, IRobotActions, IRobotAnimation, IRobotComputedKeyframe, IRobotData, IRobotInputData, IRobotKeyframe, IScrollConfig, IScrollTheme, IScroller, IShadowEffect, IShadowString, ISolidPaint, IStar, IStarData, IStarInputData, IStateModule, IStateName, IStateStyle, IStates, IStroke, IStrokeAlign, IStrokeAttrData, IStrokeCap, IStrokeComputedData, IStrokeComputedStyle, IStrokeGradientPaint, IStrokeImagePaint, IStrokeInputData, IStrokeJoin, IStrokePaint, IStrokeSolidPaint, IStrokeStyle, IStrokeWidthString, IStyleAnimation, IText, ITextAlign, ITextCase, ITextCharData, ITextConvertModule, ITextData, ITextDecoration, ITextDecorationData, ITextDecorationType, ITextDrawData, ITextInputData, ITextOverflow, ITextRenderModule, ITextRowData, ITextStyleAttrData, ITextStyleComputedData, ITextStyleInputData, ITextWordData, ITextWrap, ITransformTool, ITransitionFunction, ITransitionMap, ITransitionModule, IUI, IUIBaseInputData, IUIBoundsModule, IUIData, IUIHitModule, IUIInputData, IUIJSONData, IUIRenderModule, IUITag, IVectorPath, IVerticalAlign, IVideo, IVideoData, IVideoInputData, IWritingMode };
1253
+ export type { IAnimate, IAnimateKeyframe, IAnimateList, IAnimateType, IAnimation, IApp, IAppConfig, IAppData, IAppForEachFunction, IAppInputData, IArrow, IArrowData, IArrowInputData, IArrowType, IBackgroundBoxStyle, IBlurEffect, IBox, IBoxData, IBoxInputData, ICachedShape, ICanvas, ICanvasData, ICanvasInputData, IColor, IColorConvertModule, IColorStop, IColorString, IComputedKeyframe, ICornerRadiusString, IDashPatternString, IEditBoxBase, IEditPoint, IEditPointInputData, IEditPointType, IEditToolFunction, IEditorBase, IEditorBeforeEditInner, IEditorBeforeEditOuter, IEditorBeforeMove, IEditorBeforeRotate, IEditorBeforeScale, IEditorBeforeSelect, IEditorBeforeSkew, IEditorConfig, IEditorConfigFunction, IEditorDragStartData, IEditorEditInnerData, IEditorEditOuterData, IEditorMoveData, IEditorRotationData, IEditorScaleData, IEditorSelectData, IEditorSkewData, IEffect, IEffectAttrData, IEffectComputedData, IEffectInputData, IEffectModule, IEllipse, IEllipseData, IEllipseInputData, IExportModule, IFill, IFilterFunction, IFilterModule, IFilterProcessor, IFindUIMethod, IFlow, IFlowData, IFlowInputData, IFontWeight, IFontWeightNumer, IFontWeightString, IFrame, IFrameData, IFrameInputData, IFrameRenderModule, IGIF, IGIFData, IGIFInputData, IGradientPaint, IGradientType, IGrayscaleEffect, IGroup, IGroupData, IGroupInputData, IGroupRenderModule, IImage, IImageData, IImageFilters, IImageInputData, IImagePaint, IImagePaintMode, IImageRenderModule, IKeyframe, IKeyframeId, IKeyframesAnimation, ILeafFill, ILeafPaint, ILeafPaintColor, ILeafPaintPatternData, ILeafShadowEffect, ILeafStrokePaint, ILeafer, ILeaferData, ILeaferInputData, ILine, ILineData, ILineInputData, IOverflow, IPaint, IPaintAttr, IPaintBase, IPaintGradientModule, IPaintImageModule, IPaintModule, IPaintString, IPaintType, IPath, IPathArrowModule, IPathData, IPathDataArrow, IPathDataArrowMap, IPathDataArrowOffset, IPathInputData, IPen, IPenData, IPenInputData, IPercent, IPolygon, IPolygonData, IPolygonInputData, IRGB, IRGBA, IRect, IRectData, IRectInputData, IRectRenderModule, IRepeat, IRobot, IRobotActionName, IRobotActions, IRobotAnimation, IRobotComputedKeyframe, IRobotData, IRobotInputData, IRobotKeyframe, IScrollConfig, IScrollTheme, IScroller, IShadowEffect, IShadowString, ISolidPaint, IStar, IStarData, IStarInputData, IStateModule, IStateName, IStateStyle, IStates, IStroke, IStrokeAlign, IStrokeAttrData, IStrokeCap, IStrokeComputedData, IStrokeComputedStyle, IStrokeGradientPaint, IStrokeImagePaint, IStrokeInputData, IStrokeJoin, IStrokePaint, IStrokeSolidPaint, IStrokeStyle, IStrokeWidthString, IStyleAnimation, IText, ITextAlign, ITextCase, ITextCharData, ITextConvertModule, ITextData, ITextDecoration, ITextDecorationData, ITextDecorationType, ITextDrawData, ITextInputData, ITextOverflow, ITextRenderModule, ITextRowData, ITextStyleAttrData, ITextStyleComputedData, ITextStyleInputData, ITextWordData, ITextWrap, ITransformTool, ITransitionFunction, ITransitionMap, ITransitionModule, IUI, IUIBaseInputData, IUIBoundsModule, IUIData, IUIHitModule, IUIInputData, IUIJSONData, IUIRenderModule, IUITag, IVectorPath, IVerticalAlign, IVideo, IVideoData, IVideoInputData, IWritingMode };