@nativescript/core 9.1.0-alpha.1 → 9.1.0-alpha.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.
@@ -0,0 +1 @@
1
+ export declare const getTimeInFrameBase: () => number;
@@ -0,0 +1,3 @@
1
+ import { time } from '../profiling';
2
+ export const getTimeInFrameBase = time;
3
+ //# sourceMappingURL=animation-native.macos.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"animation-native.macos.js","sourceRoot":"","sources":["../../../../packages/core/animation-frame/animation-native.macos.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,MAAM,CAAC,MAAM,kBAAkB,GAAG,IAAI,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { ApplicationCommon } from './application-common';
2
+ export * from './application-common';
3
+ export * from './application-shims';
4
+ declare class MacOSApplication extends ApplicationCommon {
5
+ run(): void;
6
+ }
7
+ export declare const Application: MacOSApplication;
@@ -0,0 +1,8 @@
1
+ import { ApplicationCommon } from './application-common';
2
+ export * from './application-common';
3
+ export * from './application-shims';
4
+ class MacOSApplication extends ApplicationCommon {
5
+ run() { }
6
+ }
7
+ export const Application = new MacOSApplication();
8
+ //# sourceMappingURL=index.macos.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.macos.js","sourceRoot":"","sources":["../../../../packages/core/application/index.macos.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AAEpC,MAAM,gBAAiB,SAAQ,iBAAiB;IAC/C,GAAG,KAAU,CAAC;CACd;AAED,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,gBAAgB,EAAE,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { ColorBase } from './color-common';
2
+ import type { IColor } from './color-types';
3
+ export declare class Color extends ColorBase implements IColor {
4
+ private _macos;
5
+ get ios(): any;
6
+ static fromIosColor(value: any): Color;
7
+ }
@@ -0,0 +1,21 @@
1
+ import { ColorBase } from './color-common';
2
+ export class Color extends ColorBase {
3
+ get ios() {
4
+ if (!this._macos) {
5
+ this._macos = NSColor.colorWithSRGBRedGreenBlueAlpha(this.r / 255, this.g / 255, this.b / 255, this.a / 255);
6
+ }
7
+ return this._macos;
8
+ }
9
+ static fromIosColor(value) {
10
+ if (!value) {
11
+ return null;
12
+ }
13
+ const color = value;
14
+ const r = Math.round((color.redComponent ?? 0) * 255);
15
+ const g = Math.round((color.greenComponent ?? 0) * 255);
16
+ const b = Math.round((color.blueComponent ?? 0) * 255);
17
+ const a = Math.round((color.alphaComponent ?? 1) * 255);
18
+ return new Color(a, r, g, b);
19
+ }
20
+ }
21
+ //# sourceMappingURL=index.macos.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.macos.js","sourceRoot":"","sources":["../../../../packages/core/color/index.macos.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAG3C,MAAM,OAAO,KAAM,SAAQ,SAAS;IAGnC,IAAI,GAAG;QACN,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;YAClB,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,8BAA8B,CACnD,IAAI,CAAC,CAAC,GAAG,GAAG,EACZ,IAAI,CAAC,CAAC,GAAG,GAAG,EACZ,IAAI,CAAC,CAAC,GAAG,GAAG,EACZ,IAAI,CAAC,CAAC,GAAG,GAAG,CACZ,CAAC;QACH,CAAC;QAED,OAAO,IAAI,CAAC,MAAM,CAAC;IACpB,CAAC;IAEM,MAAM,CAAC,YAAY,CAAC,KAAU;QACpC,IAAI,CAAC,KAAK,EAAE,CAAC;YACZ,OAAO,IAAI,CAAC;QACb,CAAC;QAED,MAAM,KAAK,GAAG,KAAgB,CAAC;QAC/B,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,YAAY,IAAI,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC;QACtD,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,cAAc,IAAI,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC;QACxD,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,aAAa,IAAI,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC;QACvD,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,cAAc,IAAI,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC;QACxD,OAAO,IAAI,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IAC9B,CAAC;CACD"}
@@ -0,0 +1,8 @@
1
+ export declare class FPSCallback {
2
+ running: boolean;
3
+ private readonly onFrame;
4
+ private handle;
5
+ constructor(onFrame: (currentTimeMillis: number) => void);
6
+ start(): void;
7
+ stop(): void;
8
+ }
@@ -0,0 +1,24 @@
1
+ export class FPSCallback {
2
+ constructor(onFrame) {
3
+ this.running = false;
4
+ this.onFrame = onFrame;
5
+ }
6
+ start() {
7
+ if (this.running) {
8
+ return;
9
+ }
10
+ this.running = true;
11
+ this.handle = setInterval(() => {
12
+ this.onFrame(Date.now());
13
+ }, 16);
14
+ }
15
+ stop() {
16
+ if (!this.running) {
17
+ return;
18
+ }
19
+ this.running = false;
20
+ clearInterval(this.handle);
21
+ this.handle = null;
22
+ }
23
+ }
24
+ //# sourceMappingURL=fps-native.macos.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fps-native.macos.js","sourceRoot":"","sources":["../../../../packages/core/fps-meter/fps-native.macos.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,WAAW;IAKvB,YAAY,OAA4C;QAJjD,YAAO,GAAG,KAAK,CAAC;QAKtB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACxB,CAAC;IAEM,KAAK;QACX,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YAClB,OAAO;QACR,CAAC;QAED,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QACpB,IAAI,CAAC,MAAM,GAAG,WAAW,CAAC,GAAG,EAAE;YAC9B,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;QAC1B,CAAC,EAAE,EAAE,CAAC,CAAC;IACR,CAAC;IAEM,IAAI;QACV,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;YACnB,OAAO;QACR,CAAC;QAED,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QACrB,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC3B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;IACpB,CAAC;CACD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nativescript/core",
3
- "version": "9.1.0-alpha.1",
3
+ "version": "9.1.0-alpha.2",
4
4
  "description": "A JavaScript library providing an easy to use api for interacting with iOS and Android platform APIs.",
5
5
  "type": "module",
6
6
  "main": "index",
@@ -0,0 +1 @@
1
+ export * from './index.ios';
@@ -0,0 +1,2 @@
1
+ export * from './index.ios';
2
+ //# sourceMappingURL=index.macos.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.macos.js","sourceRoot":"","sources":["../../../../packages/core/timer/index.macos.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { AnimationBase, AnimationDefinition, AnimationPromise } from './animation-common';
2
+ export * from './animation-common';
3
+ export declare class Animation extends AnimationBase {
4
+ constructor(animationDefinitions: Array<AnimationDefinition>, playSequentially?: boolean);
5
+ _resolveAnimationCurve(curve: any): any;
6
+ play(): AnimationPromise;
7
+ cancel(): void;
8
+ }
@@ -0,0 +1,17 @@
1
+ import { AnimationBase } from './animation-common';
2
+ export * from './animation-common';
3
+ export class Animation extends AnimationBase {
4
+ constructor(animationDefinitions, playSequentially) {
5
+ super(animationDefinitions, playSequentially);
6
+ }
7
+ _resolveAnimationCurve(curve) {
8
+ return curve;
9
+ }
10
+ play() {
11
+ return super.play();
12
+ }
13
+ cancel() {
14
+ this._rejectAnimationFinishedPromise();
15
+ }
16
+ }
17
+ //# sourceMappingURL=index.macos.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.macos.js","sourceRoot":"","sources":["../../../../../packages/core/ui/animation/index.macos.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAyC,MAAM,oBAAoB,CAAC;AAE1F,cAAc,oBAAoB,CAAC;AAEnC,MAAM,OAAO,SAAU,SAAQ,aAAa;IAC3C,YAAY,oBAAgD,EAAE,gBAA0B;QACvF,KAAK,CAAC,oBAAoB,EAAE,gBAAgB,CAAC,CAAC;IAC/C,CAAC;IAED,sBAAsB,CAAC,KAAU;QAChC,OAAO,KAAK,CAAC;IACd,CAAC;IAEM,IAAI;QACV,OAAO,KAAK,CAAC,IAAI,EAAE,CAAC;IACrB,CAAC;IAEM,MAAM;QACZ,IAAI,CAAC,+BAA+B,EAAE,CAAC;IACxC,CAAC;CACD"}
@@ -0,0 +1 @@
1
+ export * from './background-common';
@@ -0,0 +1,2 @@
1
+ export * from './background-common';
2
+ //# sourceMappingURL=background.macos.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"background.macos.js","sourceRoot":"","sources":["../../../../../packages/core/ui/styling/background.macos.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { Font as FontBase, FontStyle, FontVariationSettings, FontWeight, parseFont } from './font-common';
2
+ import { FontStyleType, FontVariationSettingsType, FontWeightType } from './font-interfaces';
3
+ export { FontStyle, FontVariationSettings, FontWeight, parseFont };
4
+ export declare class Font extends FontBase {
5
+ static default: Font;
6
+ constructor(family: string, size: number, style?: FontStyleType, weight?: FontWeightType, scale?: number, variationSettings?: Array<FontVariationSettingsType>);
7
+ withFontFamily(family: string): Font;
8
+ withFontStyle(style: FontStyleType): Font;
9
+ withFontWeight(weight: FontWeightType): Font;
10
+ withFontSize(size: number): Font;
11
+ withFontScale(scale: number): Font;
12
+ withFontVariationSettings(variationSettings: Array<FontVariationSettingsType> | null): Font;
13
+ getUIFont(defaultFont: any): any;
14
+ getAndroidTypeface(): any;
15
+ }
16
+ export declare namespace ios {
17
+ function registerFont(_fontFile: string): void;
18
+ }
@@ -0,0 +1,38 @@
1
+ import { Font as FontBase, FontStyle, FontVariationSettings, FontWeight, parseFont } from './font-common';
2
+ export { FontStyle, FontVariationSettings, FontWeight, parseFont };
3
+ export class Font extends FontBase {
4
+ constructor(family, size, style, weight, scale, variationSettings) {
5
+ super(family, size, style, weight, scale, variationSettings);
6
+ }
7
+ withFontFamily(family) {
8
+ return new Font(family, this.fontSize, this.fontStyle, this.fontWeight, this.fontScale, this.fontVariationSettings);
9
+ }
10
+ withFontStyle(style) {
11
+ return new Font(this.fontFamily, this.fontSize, style, this.fontWeight, this.fontScale, this.fontVariationSettings);
12
+ }
13
+ withFontWeight(weight) {
14
+ return new Font(this.fontFamily, this.fontSize, this.fontStyle, weight, this.fontScale, this.fontVariationSettings);
15
+ }
16
+ withFontSize(size) {
17
+ return new Font(this.fontFamily, size, this.fontStyle, this.fontWeight, this.fontScale, this.fontVariationSettings);
18
+ }
19
+ withFontScale(scale) {
20
+ return new Font(this.fontFamily, this.fontSize, this.fontStyle, this.fontWeight, scale, this.fontVariationSettings);
21
+ }
22
+ withFontVariationSettings(variationSettings) {
23
+ return new Font(this.fontFamily, this.fontSize, this.fontStyle, this.fontWeight, this.fontScale, variationSettings);
24
+ }
25
+ getUIFont(defaultFont) {
26
+ return defaultFont;
27
+ }
28
+ getAndroidTypeface() {
29
+ return undefined;
30
+ }
31
+ }
32
+ Font.default = new Font(undefined, undefined);
33
+ export var ios;
34
+ (function (ios) {
35
+ function registerFont(_fontFile) { }
36
+ ios.registerFont = registerFont;
37
+ })(ios || (ios = {}));
38
+ //# sourceMappingURL=font.macos.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"font.macos.js","sourceRoot":"","sources":["../../../../../packages/core/ui/styling/font.macos.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAE,SAAS,EAAE,qBAAqB,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAG1G,OAAO,EAAE,SAAS,EAAE,qBAAqB,EAAE,UAAU,EAAE,SAAS,EAAE,CAAC;AAEnE,MAAM,OAAO,IAAK,SAAQ,QAAQ;IAGjC,YAAY,MAAc,EAAE,IAAY,EAAE,KAAqB,EAAE,MAAuB,EAAE,KAAc,EAAE,iBAAoD;QAC7J,KAAK,CAAC,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,iBAAiB,CAAC,CAAC;IAC9D,CAAC;IAEM,cAAc,CAAC,MAAc;QACnC,OAAO,IAAI,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,qBAAqB,CAAC,CAAC;IACrH,CAAC;IAEM,aAAa,CAAC,KAAoB;QACxC,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,QAAQ,EAAE,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,qBAAqB,CAAC,CAAC;IACrH,CAAC;IAEM,cAAc,CAAC,MAAsB;QAC3C,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,qBAAqB,CAAC,CAAC;IACrH,CAAC;IAEM,YAAY,CAAC,IAAY;QAC/B,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,qBAAqB,CAAC,CAAC;IACrH,CAAC;IAEM,aAAa,CAAC,KAAa;QACjC,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,UAAU,EAAE,KAAK,EAAE,IAAI,CAAC,qBAAqB,CAAC,CAAC;IACrH,CAAC;IAEM,yBAAyB,CAAC,iBAA0D;QAC1F,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,SAAS,EAAE,iBAAiB,CAAC,CAAC;IACrH,CAAC;IAED,SAAS,CAAC,WAAgB;QACzB,OAAO,WAAW,CAAC;IACpB,CAAC;IAED,kBAAkB;QACjB,OAAO,SAAS,CAAC;IAClB,CAAC;;AApCM,YAAO,GAAG,IAAI,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;AAuCjD,MAAM,KAAW,GAAG,CAEnB;AAFD,WAAiB,GAAG;IACnB,SAAgB,YAAY,CAAC,SAAiB,IAAG,CAAC;IAAlC,gBAAY,eAAsB,CAAA;AACnD,CAAC,EAFgB,GAAG,KAAH,GAAG,QAEnB"}
@@ -0,0 +1,25 @@
1
+ export declare namespace layout {
2
+ const MODE_SHIFT = 30;
3
+ const MODE_MASK: number;
4
+ const UNSPECIFIED: number;
5
+ const EXACTLY: number;
6
+ const AT_MOST: number;
7
+ const MEASURED_HEIGHT_STATE_SHIFT = 16;
8
+ const MEASURED_STATE_TOO_SMALL = 16777216;
9
+ const MEASURED_STATE_MASK = 4278190080;
10
+ const MEASURED_SIZE_MASK = 16777215;
11
+ function getMode(mode: number): string;
12
+ function getMeasureSpecMode(spec: number): number;
13
+ function getMeasureSpecSize(spec: number): number;
14
+ function makeMeasureSpec(size: number, mode: number): number;
15
+ function hasRtlSupport(): boolean;
16
+ function getDisplayDensity(): number;
17
+ function toDevicePixels(value: number): number;
18
+ function toDeviceIndependentPixels(value: number): number;
19
+ function round(value: number): number;
20
+ function measureNativeView(nativeView: any, width: number, widthMode: number, height: number, heightMode: number): {
21
+ width: number;
22
+ height: number;
23
+ };
24
+ function measureSpecToString(measureSpec: number): string;
25
+ }
@@ -0,0 +1,68 @@
1
+ import * as layoutCommon from './layout-helper-common';
2
+ function getMainScreenScale() {
3
+ return NSScreen.mainScreen?.backingScaleFactor ?? 1;
4
+ }
5
+ export var layout;
6
+ (function (layout) {
7
+ layout.MODE_SHIFT = 30;
8
+ layout.MODE_MASK = 0x3 << layout.MODE_SHIFT;
9
+ layout.UNSPECIFIED = 0 << layout.MODE_SHIFT;
10
+ layout.EXACTLY = 1 << layout.MODE_SHIFT;
11
+ layout.AT_MOST = 2 << layout.MODE_SHIFT;
12
+ layout.MEASURED_HEIGHT_STATE_SHIFT = 0x00000010;
13
+ layout.MEASURED_STATE_TOO_SMALL = 0x01000000;
14
+ layout.MEASURED_STATE_MASK = 0xff000000;
15
+ layout.MEASURED_SIZE_MASK = 0x00ffffff;
16
+ function getMode(mode) {
17
+ return layoutCommon.getMode(mode);
18
+ }
19
+ layout.getMode = getMode;
20
+ function getMeasureSpecMode(spec) {
21
+ return layoutCommon.getMeasureSpecMode(spec);
22
+ }
23
+ layout.getMeasureSpecMode = getMeasureSpecMode;
24
+ function getMeasureSpecSize(spec) {
25
+ return layoutCommon.getMeasureSpecSize(spec);
26
+ }
27
+ layout.getMeasureSpecSize = getMeasureSpecSize;
28
+ function makeMeasureSpec(size, mode) {
29
+ return (Math.round(Math.max(0, size)) & ~layout.MODE_MASK) | (mode & layout.MODE_MASK);
30
+ }
31
+ layout.makeMeasureSpec = makeMeasureSpec;
32
+ function hasRtlSupport() {
33
+ return true;
34
+ }
35
+ layout.hasRtlSupport = hasRtlSupport;
36
+ function getDisplayDensity() {
37
+ return getMainScreenScale();
38
+ }
39
+ layout.getDisplayDensity = getDisplayDensity;
40
+ function toDevicePixels(value) {
41
+ return value * getMainScreenScale();
42
+ }
43
+ layout.toDevicePixels = toDevicePixels;
44
+ function toDeviceIndependentPixels(value) {
45
+ return value / getMainScreenScale();
46
+ }
47
+ layout.toDeviceIndependentPixels = toDeviceIndependentPixels;
48
+ function round(value) {
49
+ return layoutCommon.round(value);
50
+ }
51
+ layout.round = round;
52
+ function measureNativeView(nativeView, width, widthMode, height, heightMode) {
53
+ const view = nativeView;
54
+ const fittingSize = view?.fittingSize;
55
+ const measuredWidth = widthMode === layout.EXACTLY ? width : toDevicePixels(fittingSize?.width ?? 0);
56
+ const measuredHeight = heightMode === layout.EXACTLY ? height : toDevicePixels(fittingSize?.height ?? 0);
57
+ return {
58
+ width: round(measuredWidth),
59
+ height: round(measuredHeight),
60
+ };
61
+ }
62
+ layout.measureNativeView = measureNativeView;
63
+ function measureSpecToString(measureSpec) {
64
+ return layoutCommon.measureSpecToString(measureSpec);
65
+ }
66
+ layout.measureSpecToString = measureSpecToString;
67
+ })(layout || (layout = {}));
68
+ //# sourceMappingURL=index.macos.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.macos.js","sourceRoot":"","sources":["../../../../../packages/core/utils/layout-helper/index.macos.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,3 @@
1
+ export declare function dispatchToMainThread(func: () => void): void;
2
+ export declare function isMainThread(): boolean;
3
+ export declare function dispatchToUIThread(func: () => void): void;
@@ -0,0 +1,17 @@
1
+ export function dispatchToMainThread(func) {
2
+ NSOperationQueue.mainQueue.addOperationWithBlock(func);
3
+ }
4
+ export function isMainThread() {
5
+ return NSThread.isMainThread;
6
+ }
7
+ export function dispatchToUIThread(func) {
8
+ const runloop = CFRunLoopGetMain();
9
+ if (runloop && func) {
10
+ CFRunLoopPerformBlock(runloop, kCFRunLoopDefaultMode, func);
11
+ CFRunLoopWakeUp(runloop);
12
+ }
13
+ else if (func) {
14
+ func();
15
+ }
16
+ }
17
+ //# sourceMappingURL=mainthread-helper.macos.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mainthread-helper.macos.js","sourceRoot":"","sources":["../../../../packages/core/utils/mainthread-helper.macos.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,oBAAoB,CAAC,IAAgB;IACpD,gBAAgB,CAAC,SAAS,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC;AACxD,CAAC;AAED,MAAM,UAAU,YAAY;IAC3B,OAAO,QAAQ,CAAC,YAAY,CAAC;AAC9B,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,IAAgB;IAClD,MAAM,OAAO,GAAG,gBAAgB,EAAE,CAAC;IACnC,IAAI,OAAO,IAAI,IAAI,EAAE,CAAC;QACrB,qBAAqB,CAAC,OAAO,EAAE,qBAAqB,EAAE,IAAI,CAAC,CAAC;QAC5D,eAAe,CAAC,OAAO,CAAC,CAAC;IAC1B,CAAC;SAAM,IAAI,IAAI,EAAE,CAAC;QACjB,IAAI,EAAE,CAAC;IACR,CAAC;AACF,CAAC"}