@compass-framework/core 1.1.0 → 1.1.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,23 +1,27 @@
1
1
  import { ApplicationFrameObserver } from "./ApplicationFrameObserver";
2
- import { ApplicationFrameContext } from "./ApplicationFrameContext";
3
2
  import { ICursor } from "./ICursor";
3
+ import { Configuration } from "./Configuration";
4
4
  import { IWindow } from "./IWindow";
5
+ import { ApplicationFrameContext } from "./ApplicationFrameContext";
6
+ import {ApplicationFrameSettings} from "./ApplicationFrameSettings";
5
7
 
6
8
  export declare class ApplicationFrame {
7
- public constructor(configuration?: ApplicationFrame.Configuration);
8
-
9
- public attachWindow(window: IWindow): void;
9
+ public constructor(settings?: ApplicationFrameSettings);
10
10
 
11
- public detachWindow(window: IWindow): void;
11
+ public applicationFrameScreenshot(): string;
12
12
 
13
13
  public closeApplicationFrame(): void;
14
14
 
15
- public applicationFrameScreenshot(): string;
15
+ public attachWindow(window: IWindow): void;
16
+
17
+ public detachWindow(window: IWindow): void;
16
18
 
17
19
  public onAttach(applicationFrameContext: ApplicationFrameContext): void;
18
20
 
19
21
  public onDetach(): void;
20
22
 
23
+ public onConfigurationChanged(configuration: Configuration): void;
24
+
21
25
  public getApplicationFrameWidth(): number;
22
26
 
23
27
  public getApplicationFrameHeight(): number;
@@ -40,23 +44,3 @@ export declare class ApplicationFrame {
40
44
 
41
45
  public setApplicationFrameHeight(applicationFrameHeight: number): void;
42
46
  }
43
-
44
- export namespace ApplicationFrame {
45
- export interface Configuration {
46
- container?: string;
47
- width?: number,
48
- height?: number,
49
- }
50
-
51
- export interface OnCloseListener {
52
- onClose(): void;
53
- }
54
-
55
- export interface OnOpenListener {
56
- onOpen(): void;
57
- }
58
-
59
- export interface OnResizeListener {
60
- onResize(): void;
61
- }
62
- }
@@ -0,0 +1,5 @@
1
+ export interface ApplicationFrameSettings {
2
+ container?: string;
3
+ width?: number,
4
+ height?: number,
5
+ }
@@ -5,6 +5,7 @@ import { View } from "./View";
5
5
  import { ViewGroup } from "./ViewGroup";
6
6
  import { WindowContext } from "./WindowContext";
7
7
  import { WindowManager } from "./WindowManager";
8
+ import { Configuration } from "./Configuration";
8
9
 
9
10
  export declare class ApplicationWindow implements IWindow {
10
11
  public constructor();
@@ -17,20 +18,18 @@ export declare class ApplicationWindow implements IWindow {
17
18
 
18
19
  public findViewsByTag(tag: string): ArrayList<View>;
19
20
 
20
- public onAttach(context: WindowContext): void;
21
-
22
21
  public onCreate(): void;
23
22
 
24
23
  public onResume(): void;
25
24
 
26
25
  public onDestroy(): void;
27
26
 
28
- public onDetach(): void;
29
-
30
- public getLayoutParams(): WindowManager.LayoutParams;
27
+ public onConfigurationChanged(configuration: Configuration): void;
31
28
 
32
29
  public getContentView(): ViewGroup;
33
30
 
31
+ public getLayoutParams(): WindowManager.LayoutParams;
32
+
34
33
  public getResources(): Resources;
35
34
 
36
35
  public getWindowContext(): WindowContext;
@@ -1,5 +1,8 @@
1
1
  import { DensityMetrics } from "./DensityMetrics";
2
+ import {Theme} from "./Theme";
2
3
 
3
4
  export declare interface Configuration {
4
- densityMetrics: DensityMetrics;
5
+ getDensityMetrics(): DensityMetrics;
6
+
7
+ getTheme(): Theme;
5
8
  }
@@ -14,16 +14,12 @@ export interface IWindow {
14
14
 
15
15
  findViewsByTag(tag: string): ArrayList<View>;
16
16
 
17
- onAttach(context: WindowContext): void
18
-
19
17
  onCreate(): void;
20
18
 
21
19
  onResume(): void;
22
20
 
23
21
  onDestroy(): void;
24
22
 
25
- onDetach(): void;
26
-
27
23
  getWindowContext(): WindowContext;
28
24
 
29
25
  getResources(): Resources;
@@ -4,6 +4,7 @@ import { View } from "./View";
4
4
  import { IWindow } from "./IWindow";
5
5
  import { WindowContext } from "./WindowContext";
6
6
  import { WindowManager } from "./WindowManager";
7
+ import {Configuration} from "./Configuration";
7
8
 
8
9
  export declare class PopupWindow implements IWindow {
9
10
  public constructor();
@@ -25,6 +26,8 @@ export declare class PopupWindow implements IWindow {
25
26
 
26
27
  public onDetach(): void;
27
28
 
29
+ public onConfigurationChanged(configuration: Configuration): void;
30
+
28
31
  public dismiss(): void;
29
32
 
30
33
  public showAtLocation(parent: View, gravity: number, x: number, y: number): void;
@@ -1,15 +1,18 @@
1
1
  import { CharSequence, RefValue, XML } from "@compass-framework/library";
2
2
  import { Drawable } from "./Drawable";
3
- import { AttributeSet } from "./AttributeSet";
4
- import { ColorDrawable } from "./ColorDrawable";
5
- import { Assets } from "./Assets";
6
3
  import { DisplayMetrics } from "./DisplayMetrics";
4
+ import { Assets } from "./Assets";
5
+ import { ColorDrawable } from "./ColorDrawable";
6
+ import {Configuration} from "./Configuration";
7
+ import { AttributeSet } from "./AttributeSet";
7
8
 
8
9
  export declare class Resources {
9
10
  public getDisplayMetrics(): DisplayMetrics;
10
11
 
11
12
  public getAssets(): Assets;
12
13
 
14
+ public getConfiguration(): Configuration;
15
+
13
16
  /// ///////////////////////////////////////////////////////////////////////////////////////////////////////
14
17
  /// ///////////////////////////////////////////////////////////////////////////////////////////////////////
15
18
  /// ///////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -0,0 +1,4 @@
1
+ export enum Theme {
2
+ Light,
3
+ Dark,
4
+ }
package/index.d.ts CHANGED
@@ -61,6 +61,9 @@ export * from "./@types/Resources";
61
61
  export * from "./@types/Readying";
62
62
  export * from "./@types/RotateAnimation";
63
63
  export * from "./@types/RoundedCornersDrawable";
64
+ export * from './@types/Slot';
65
+ export * from './@types/ViewSlot';
66
+ export * from "./@types/Theme";
64
67
  export * from "./@types/ScaleAnimation";
65
68
  export * from "./@types/ScrollView";
66
69
  export * from "./@types/Shader";
@@ -103,5 +106,4 @@ export * from './@types/CornerPathEffect';
103
106
  export * from './@types/DensityMetrics';
104
107
  export * from './@types/ApplicationFrameContext';
105
108
  export * from './@types/ResourcesInflater';
106
- export * from './@types/Slot';
107
- export * from './@types/ViewSlot';
109
+ export * from './@types/ApplicationFrameSettings';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@compass-framework/core",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "description": "@compass-framework/core public api",
5
5
  "types": "./index.d.ts",
6
6
  "main": "./index.js",