@akylas/nativescript-app-utils 2.1.3 → 2.1.4

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 CHANGED
@@ -3,6 +3,12 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [2.1.4](https://github.com/akylas/nativescript-app-utils/compare/v2.1.3...v2.1.4) (2024-10-20)
7
+
8
+ ### Bug Fixes
9
+
10
+ * package native typings ([06c5e36](https://github.com/akylas/nativescript-app-utils/commit/06c5e36aec45381597981a99203605f6cc0439d3))
11
+
6
12
  ## [2.1.3](https://github.com/akylas/nativescript-app-utils/compare/v2.1.2...v2.1.3) (2024-10-19)
7
13
 
8
14
  ### Bug Fixes
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@akylas/nativescript-app-utils",
3
- "version": "2.1.3",
3
+ "version": "2.1.4",
4
4
  "description": "Provides API for changing the styles of SystemUI (StatusBar, NavigationBar...) on iOS.",
5
5
  "main": "index",
6
6
  "sideEffects": false,
7
7
  "typings": "index.d.ts",
8
8
  "scripts": {
9
- "tsc": "cpy ../../src/app-utils/index.d.ts ./ && tsc -d",
9
+ "tsc": "cpy '**/*.d.ts' '../../packages/app-utils' --parents --cwd=../../src/app-utils && tsc -d",
10
10
  "build": "npm run tsc",
11
11
  "build.watch": "npm run tsc -- -w",
12
12
  "build.win": "npm run tsc-win",
@@ -63,5 +63,5 @@
63
63
  "bugs": {
64
64
  "url": "https://github.com/akylas/nativescript-app-utils/issues"
65
65
  },
66
- "gitHead": "392b5842047b75e2e4eba2cbcae8979789d453c6"
66
+ "gitHead": "01efe0e30f9de488e8cd4255771b049664e39c14"
67
67
  }
@@ -0,0 +1,85 @@
1
+ /* eslint-disable @typescript-eslint/unified-signatures */
2
+ declare namespace com {
3
+ export namespace nativescript {
4
+ export namespace apputils {
5
+ export class FunctionCallback extends java.lang.Object {
6
+ public constructor(implementation: { onResult(param0: java.lang.Exception, param1: any): void });
7
+ public onResult(param0: java.lang.Exception, param1: any): void;
8
+ }
9
+ export namespace WorkersContext {
10
+ export class Companion {
11
+ public static getValue(key): any;
12
+ public static setValue(key: string, value);
13
+ }
14
+ }
15
+ export namespace Utils {
16
+ export class WindowInsetsCallback extends java.lang.Object {
17
+ public constructor(implementation: { onWindowInsetsChange(result: number[]): void });
18
+ public constructor();
19
+ public onWindowInsetsChange(result: number[]): void;
20
+ }
21
+ export class Companion {
22
+ static prepareActivity(arg0: androidx.appcompat.app.AppCompatActivity, applyDynamicColors?: boolean);
23
+ static prepareWindow(arg0: android.view.Window);
24
+ static applyDayNight(context: android.content.Context, applyDynamicColors: boolean);
25
+ static applyDynamicColors(context: android.content.Context);
26
+ static getDimensionFromInt(context: android.content.Context, intToGet): number;
27
+ static getColorFromInt(context: android.content.Context, intToGet): number;
28
+ static getColorFromName(context: android.content.Context, intToGet): number;
29
+ static restartApp(context: android.content.Context, activity: android.app.Activity);
30
+ static getSystemLocale(): java.util.Locale;
31
+ static getRootWindowInsets(view: android.view.View): number[];
32
+ static listenForWindowInsetsChange(view: android.view.View, callback: WindowInsetsCallback);
33
+ }
34
+ }
35
+ export class ImageUtils extends java.lang.Object {
36
+ public static class: java.lang.Class<ImageUtils>;
37
+ public constructor();
38
+ }
39
+ export namespace ImageUtils {
40
+ export class Companion extends java.lang.Object {
41
+ public static class: java.lang.Class<Companion>;
42
+ public static getImageSize(param0: globalAndroid.content.Context, param1: string): number[];
43
+ public static readBitmapFromFileSync(param0: globalAndroid.content.Context, param1: string, param2?: LoadImageOptions): globalAndroid.graphics.Bitmap;
44
+ public static readBitmapFromFileSync(param0: globalAndroid.content.Context, param1: string, param2: string): globalAndroid.graphics.Bitmap;
45
+ public static readBitmapFromFile(param0: globalAndroid.content.Context, param1: string, callback: FunctionCallback, param2: string);
46
+ public static calculateInSampleSize(param0: number, param1: number, param2: number, param3: number): number;
47
+ public static getTargetFormat(param0: string): globalAndroid.graphics.Bitmap.CompressFormat;
48
+ }
49
+ export class ImageAssetOptions extends java.lang.Object {
50
+ public static class: java.lang.Class<ImageAssetOptions>;
51
+ public setAutoScaleFactor(param0: boolean): void;
52
+ public setWidth(param0: number): void;
53
+ public getAutoScaleFactor(): boolean;
54
+ public constructor(param0: globalAndroid.graphics.BitmapFactory.Options, param1: LoadImageOptions);
55
+ public constructor(param0: globalAndroid.graphics.BitmapFactory.Options);
56
+ public getWidth(): number;
57
+ public setHeight(param0: number): void;
58
+ public setKeepAspectRatio(param0: boolean): void;
59
+ public getKeepAspectRatio(): boolean;
60
+ public getHeight(): number;
61
+ }
62
+ export class LoadImageOptions extends java.lang.Object {
63
+ public static class: java.lang.Class<LoadImageOptions>;
64
+ public setAutoScaleFactor(param0: boolean): void;
65
+ public setWidth(param0: number): void;
66
+ public setMaxHeight(param0: number): void;
67
+ public setMaxWidth(param0: number): void;
68
+ public getResizeThreshold(): number;
69
+ public constructor(param0: string);
70
+ public constructor(param0: org.json.JSONObject);
71
+ public getHeight(): number;
72
+ public initWithJSON(param0: org.json.JSONObject): void;
73
+ public getAutoScaleFactor(): boolean;
74
+ public getWidth(): number;
75
+ public getMaxWidth(): number;
76
+ public getMaxHeight(): number;
77
+ public setHeight(param0: number): void;
78
+ public setKeepAspectRatio(param0: boolean): void;
79
+ public getKeepAspectRatio(): boolean;
80
+ public setResizeThreshold(param0: number): void;
81
+ }
82
+ }
83
+ }
84
+ }
85
+ }
@@ -0,0 +1,38 @@
1
+ /* eslint-disable no-redeclare */
2
+ /* eslint-disable no-var */
3
+ declare class NWorkerContext {
4
+ static setValue(key: string, value: any);
5
+ static getValue(key: string);
6
+ }
7
+
8
+ declare interface NSLocale {
9
+ ISO639_2LanguageCode();
10
+ }
11
+ declare class ImageUtils extends NSObject {
12
+ static alloc(): ImageUtils; // inherited from NSObject
13
+
14
+ static getAspectSafeDimensions(sourceWidth: number, sourceHeight: number, reqWidth: number, reqHeight: number): CGSize;
15
+
16
+ static getImageSize(src: string): NSDictionary<string, any>;
17
+
18
+ static new(): ImageUtils; // inherited from NSObject
19
+
20
+ static readImageFromFile(src: string, delegate: NCompletionDelegate, stringOptions: string): void;
21
+
22
+ static readImageFromFileSync(src: string, stringOptions: string): UIImage;
23
+
24
+ static readImageFromFileSyncOptions(src: string, options: NSDictionary<any, any>): UIImage;
25
+
26
+ static scaleImage(image: UIImage, scaledImageSize: CGSize): UIImage;
27
+
28
+ static toJSON(str: string): NSDictionary<any, any>;
29
+ }
30
+
31
+ interface NCompletionDelegate {
32
+ onCompleteError(result: NSObject, error: NSError): void;
33
+
34
+ onProgress(progress: number): void;
35
+ }
36
+ declare var NCompletionDelegate: {
37
+ prototype: CompletionDelegate;
38
+ };