@stemy/ngx-utils 19.8.2 → 19.8.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.
@@ -322,7 +322,8 @@ export interface ShapeDistance {
322
322
  }
323
323
  export interface IShape extends IPoint {
324
324
  readonly center: IPoint;
325
- draw(ctx: CanvasRenderingContext2D, ratio?: number): void;
325
+ readonly subShapes?: ReadonlyArray<IShape>;
326
+ getPath(x: number, y: number, ratio?: number): Path2D;
326
327
  support(dir: IPoint): IPoint;
327
328
  move(pos: IPoint): IShape;
328
329
  intersection(shape: IShape): ShapeIntersection;
@@ -67,7 +67,7 @@ import { WysiwygComponent } from "./components/wysiwyg/wysiwyg.component";
67
67
  export declare const pipes: (typeof FilterPipe | typeof FormatNumberPipe | typeof GlobalTemplatePipe | typeof IncludesPipe | typeof ReducePipe | typeof RoundPipe | typeof SafeHtmlPipe | typeof SyncAsyncPipe | typeof TranslatePipe)[];
68
68
  export declare const directives: (typeof AsyncMethodBase | typeof AsyncMethodDirective | typeof AsyncMethodTargetDirective | typeof BackgroundDirective | typeof ComponentLoaderDirective | typeof DynamicTableTemplateDirective | typeof GlobalTemplateDirective | typeof IconDirective | typeof NgxTemplateOutletDirective | typeof PaginationDirective | typeof PaginationItemDirective | typeof ResourceIfDirective | typeof StickyDirective | typeof StickyClassDirective | typeof DropdownDirective | typeof DropdownContentDirective | typeof DropdownToggleDirective | typeof TabsItemDirective | typeof UnorderedListItemDirective | typeof UnorderedListTemplateDirective)[];
69
69
  export declare const components: (typeof ChipsComponent | typeof CloseBtnComponent | typeof DropListComponent | typeof DynamicTableComponent | typeof PaginationMenuComponent | typeof UnorderedListComponent | typeof UploadComponent | typeof WysiwygComponent)[];
70
- export declare const providers: (typeof UniversalService | typeof StateService | typeof AuthGuard | typeof EventsService | typeof AclService | typeof BaseHttpClient | typeof StorageService | typeof CacheService | typeof BaseHttpService | typeof StaticAuthService | typeof ConfigService | typeof BaseDialogService | typeof ErrorHandlerService | typeof FormatterService | typeof GlobalTemplateService | typeof IconService | typeof StaticLanguageService | typeof OpenApiService | typeof BaseToasterService | typeof ComponentLoaderService | typeof TranslatedUrlSerializer | typeof PromiseService | typeof SocketService | typeof FilterPipe | typeof FormatNumberPipe | typeof GlobalTemplatePipe | typeof IncludesPipe | typeof ReducePipe | typeof RoundPipe | typeof SafeHtmlPipe | typeof SyncAsyncPipe | typeof TranslatePipe | typeof DeviceDetectorService | {
70
+ export declare const providers: (typeof FilterPipe | typeof FormatNumberPipe | typeof GlobalTemplatePipe | typeof IncludesPipe | typeof ReducePipe | typeof RoundPipe | typeof SafeHtmlPipe | typeof SyncAsyncPipe | typeof TranslatePipe | typeof BaseHttpClient | typeof BaseHttpService | typeof AuthGuard | typeof AclService | typeof StaticAuthService | typeof ConfigService | typeof BaseDialogService | typeof ErrorHandlerService | typeof EventsService | typeof FormatterService | typeof GlobalTemplateService | typeof IconService | typeof StaticLanguageService | typeof OpenApiService | typeof PromiseService | typeof SocketService | typeof StateService | typeof StorageService | typeof BaseToasterService | typeof CacheService | typeof ComponentLoaderService | typeof TranslatedUrlSerializer | typeof UniversalService | typeof DeviceDetectorService | {
71
71
  provide: import("@angular/core").InjectionToken<import("@angular/platform-browser").EventManagerPlugin[]>;
72
72
  useClass: typeof DragDropEventPlugin;
73
73
  multi: boolean;
@@ -1,3 +1,3 @@
1
1
  export { gjkDistance, gjkIntersection } from "./gjk";
2
2
  export { dotProduct, tripleProduct, isPoint, ensurePoint, perpendicular, negatePt, normalizePt, addPts, distanceSq, distance, lerpPts, lengthOfPt, multiplyPts, dividePts, subPts, rotateDeg, rotateRad, toDegrees, toRadians } from "./functions";
3
- export { Circle, Point, Rect, Oval } from "./shapes";
3
+ export { Circle, Point, Rect, Oval, ShapeGroup } from "./shapes";
@@ -5,7 +5,7 @@ declare abstract class Shape implements IShape {
5
5
  get y(): number;
6
6
  protected pt: IPoint;
7
7
  protected constructor(x: number, y: number);
8
- abstract draw(ctx: CanvasRenderingContext2D, ratio?: number): void;
8
+ abstract getPath(x: number, y: number, ratio?: number): Path2D;
9
9
  abstract support(dir: IPoint): IPoint;
10
10
  abstract move(pos: IPoint): IShape;
11
11
  intersection(shape: IShape): ShapeIntersection;
@@ -18,7 +18,7 @@ export declare class Point extends Shape {
18
18
  get length(): number;
19
19
  get perpendicular(): Point;
20
20
  constructor(xOrP: number | IPoint, y?: number);
21
- draw(ctx: CanvasRenderingContext2D): void;
21
+ getPath(x: number, y: number): Path2D;
22
22
  support(): IPoint;
23
23
  move(pos: IPoint): IShape;
24
24
  add(p: IPoint): Point;
@@ -38,7 +38,7 @@ export declare class Rect extends Shape {
38
38
  readonly height: number;
39
39
  readonly rotation: number;
40
40
  constructor(x: number, y: number, width: number, height: number, rotation?: number);
41
- draw(ctx: CanvasRenderingContext2D, ratio: number): void;
41
+ getPath(x: number, y: number, ratio?: number): Path2D;
42
42
  support(dir: IPoint): IPoint;
43
43
  move(pos: IPoint): Rect;
44
44
  }
@@ -47,7 +47,7 @@ export declare class Oval extends Shape {
47
47
  readonly height: number;
48
48
  readonly rotation: number;
49
49
  constructor(x: number, y: number, width: number, height: number, rotation?: number);
50
- draw(ctx: CanvasRenderingContext2D, ratio: number): void;
50
+ getPath(x: number, y: number, ratio?: number): Path2D;
51
51
  support(dir: IPoint): IPoint;
52
52
  move(pos: IPoint): Oval;
53
53
  }
@@ -56,4 +56,11 @@ export declare class Circle extends Oval {
56
56
  constructor(x: number, y: number, radius: number, rotation?: number);
57
57
  move(pos: IPoint): Circle;
58
58
  }
59
+ export declare class ShapeGroup extends Shape {
60
+ readonly subShapes: ReadonlyArray<IShape>;
61
+ constructor(x: number, y: number, subShapes: ReadonlyArray<IShape>);
62
+ getPath(x: number, y: number, ratio?: number): Path2D;
63
+ support(): IPoint;
64
+ move(pos: IPoint): IShape;
65
+ }
59
66
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stemy/ngx-utils",
3
- "version": "19.8.2",
3
+ "version": "19.8.3",
4
4
  "license": "MIT",
5
5
  "public": true,
6
6
  "repository": "https://github.com/stemyke/ngx-utils.git",
package/public_api.d.ts CHANGED
@@ -15,7 +15,7 @@ export { GenericValue } from "./ngx-utils/utils/generic-value";
15
15
  export { FileSystemEntryOpenResult, FileSystemEntryOpenCb, FileSystemEntry } from "./ngx-utils/utils/file-system";
16
16
  export { ExclusionsRenderer } from "./ngx-utils/utils/canvas-renderers/exclusions-renderer";
17
17
  export { RulerCanvasRenderer } from "./ngx-utils/utils/canvas-renderers/ruler-canvas.renderer";
18
- export { dotProduct, tripleProduct, isPoint, ensurePoint, perpendicular, negatePt, normalizePt, addPts, distanceSq, distance, lerpPts, lengthOfPt, multiplyPts, dividePts, subPts, rotateDeg, rotateRad, toDegrees, toRadians, gjkDistance, gjkIntersection, Point, Rect, Oval, Circle } from "./ngx-utils/utils/geometry";
18
+ export { dotProduct, tripleProduct, isPoint, ensurePoint, perpendicular, negatePt, normalizePt, addPts, distanceSq, distance, lerpPts, lengthOfPt, multiplyPts, dividePts, subPts, rotateDeg, rotateRad, toDegrees, toRadians, gjkDistance, gjkIntersection, Point, Rect, Oval, Circle, ShapeGroup } from "./ngx-utils/utils/geometry";
19
19
  export { Initializer } from "./ngx-utils/utils/initializer";
20
20
  export { stringify } from "./ngx-utils/utils/json.utils";
21
21
  export { ReflectUtils } from "./ngx-utils/utils/reflect.utils";