@compass-framework/core 1.2.0 → 1.2.2

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.
@@ -1,7 +1,6 @@
1
1
  import { Drawable } from "./Drawable";
2
2
  import { Bitmap } from "./Bitmap";
3
3
  import { Canvas } from "./Canvas";
4
- import { Context } from "./Context";
5
4
 
6
5
  export declare abstract class BitmapDrawable extends Drawable {
7
6
  protected constructor(bitmap: Bitmap);
@@ -1,3 +1,22 @@
1
- import { View } from "./View";
1
+ import {
2
+ Consumer,
3
+ InterfaceTemplate
4
+ } from "@compass-framework/library";
5
+
6
+ import {
7
+ View
8
+ } from "./View";
2
9
 
3
10
  export declare class ImageView extends View {}
11
+
12
+ export declare namespace ImageView {
13
+ export interface UpdateNotification<S> {
14
+ addNotification(c: Consumer<S>): void;
15
+
16
+ oneNotification(c: Consumer<S>): void;
17
+
18
+ removeNotification(c: Consumer<S>): void;
19
+ }
20
+
21
+ export class UpdateNotification<S> extends InterfaceTemplate {}
22
+ }
@@ -1,14 +1,30 @@
1
+ import { Consumer, Implements } from "@compass-framework/library";
2
+ import { Paint } from "./Paint";
1
3
  import { BitmapDrawable } from "./BitmapDrawable";
2
4
  import { Picture } from "./Picture";
5
+ import { ImageView } from "./ImageView";
3
6
 
4
- export declare class PictureDrawable extends BitmapDrawable {
5
- public constructor(url: string);
7
+ @Implements(ImageView.UpdateNotification)
8
+ export declare class PictureDrawable extends BitmapDrawable implements ImageView.UpdateNotification<Picture.PictureStatus> {
9
+ public constructor(url?: string);
10
+
11
+ public addNotification(c: Consumer<Picture.PictureStatus>): void;
12
+
13
+ public oneNotification(c: Consumer<Picture.PictureStatus>): void;
14
+
15
+ public removeNotification(c: Consumer<Picture.PictureStatus>): void;
16
+
17
+ public setUrl(url: string): void;
6
18
 
7
19
  public invalidate() : void;
8
20
 
9
- public getPictureWidth(): number;
21
+ public getUrl(): string;
10
22
 
11
23
  public getPicture(): Picture;
12
24
 
25
+ public getPaint(): Paint;
26
+
27
+ public getPictureWidth(): number;
28
+
13
29
  public getPictureHeight(): number
14
30
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@compass-framework/core",
3
- "version": "1.2.0",
3
+ "version": "1.2.2",
4
4
  "description": "@compass-framework/core public api",
5
5
  "types": "./index.d.ts",
6
6
  "main": "./index.js",