bundo-window 0.0.0-stage → 0.0.1-beta.8
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/BundoWindow.podspec +23 -0
- package/apple/BundoWindow.h +5 -0
- package/apple/BundoWindow.mm +63 -0
- package/bundo.plugin.mjs +8 -0
- package/lib/bundo.plugin.mjs +104 -0
- package/lib/commonjs/_internal/native-modules/NativeBundoWindow.js +9 -0
- package/lib/commonjs/_internal/native-modules/NativeBundoWindow.js.map +1 -0
- package/lib/commonjs/get-traffic-light-start-inset.js +10 -0
- package/lib/commonjs/get-traffic-light-start-inset.js.map +1 -0
- package/lib/commonjs/get-traffic-light-start-inset.macos.js +12 -0
- package/lib/commonjs/get-traffic-light-start-inset.macos.js.map +1 -0
- package/lib/commonjs/index.js +28 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/is-full-screen.js +10 -0
- package/lib/commonjs/is-full-screen.js.map +1 -0
- package/lib/commonjs/is-full-screen.macos.js +12 -0
- package/lib/commonjs/is-full-screen.macos.js.map +1 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/module/_internal/native-modules/NativeBundoWindow.js +5 -0
- package/lib/module/_internal/native-modules/NativeBundoWindow.js.map +1 -0
- package/lib/module/get-traffic-light-start-inset.js +6 -0
- package/lib/module/get-traffic-light-start-inset.js.map +1 -0
- package/lib/module/get-traffic-light-start-inset.macos.js +7 -0
- package/lib/module/get-traffic-light-start-inset.macos.js.map +1 -0
- package/lib/module/index.js +5 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/is-full-screen.js +6 -0
- package/lib/module/is-full-screen.js.map +1 -0
- package/lib/module/is-full-screen.macos.js +7 -0
- package/lib/module/is-full-screen.macos.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/typescript/_internal/native-modules/NativeBundoWindow.d.ts +8 -0
- package/lib/typescript/_internal/native-modules/NativeBundoWindow.d.ts.map +1 -0
- package/lib/typescript/get-traffic-light-start-inset.d.ts +2 -0
- package/lib/typescript/get-traffic-light-start-inset.d.ts.map +1 -0
- package/lib/typescript/get-traffic-light-start-inset.macos.d.ts +2 -0
- package/lib/typescript/get-traffic-light-start-inset.macos.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +3 -0
- package/lib/typescript/index.d.ts.map +1 -0
- package/lib/typescript/is-full-screen.d.ts +2 -0
- package/lib/typescript/is-full-screen.d.ts.map +1 -0
- package/lib/typescript/is-full-screen.macos.d.ts +2 -0
- package/lib/typescript/is-full-screen.macos.d.ts.map +1 -0
- package/package.json +48 -5
- package/src/_internal/native-modules/NativeBundoWindow.ts +15 -0
- package/src/get-traffic-light-start-inset.macos.ts +5 -0
- package/src/get-traffic-light-start-inset.ts +3 -0
- package/src/index.ts +2 -0
- package/src/is-full-screen.macos.ts +5 -0
- package/src/is-full-screen.ts +3 -0
- package/README.md +0 -3
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
require "json"
|
|
2
|
+
|
|
3
|
+
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
|
|
4
|
+
|
|
5
|
+
Pod::Spec.new do |s|
|
|
6
|
+
s.name = "BundoWindow"
|
|
7
|
+
s.version = package["version"]
|
|
8
|
+
s.summary = package["description"]
|
|
9
|
+
s.homepage = package["homepage"]
|
|
10
|
+
s.license = package["license"]
|
|
11
|
+
s.authors = package["author"]
|
|
12
|
+
|
|
13
|
+
s.platforms = { :osx => "10.14" }
|
|
14
|
+
s.source = { :git => package["repository"]["url"], :tag => "#{s.version}" }
|
|
15
|
+
|
|
16
|
+
s.source_files = "apple/**/*.{h,m,mm,cpp}", "cpp/*.{cpp,h}"
|
|
17
|
+
s.ios.exclude_files = "**/*.macos.{h,m,mm}"
|
|
18
|
+
s.tvos.exclude_files = "**/*.macos.{h,m,mm}"
|
|
19
|
+
s.osx.exclude_files = "**/*.ios.{h,m,mm}"
|
|
20
|
+
s.private_header_files = "apple/**/*.h"
|
|
21
|
+
|
|
22
|
+
install_modules_dependencies(s)
|
|
23
|
+
end
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
#import "BundoWindow.h"
|
|
2
|
+
|
|
3
|
+
#import <BundoWindowSpecs/BundoWindowSpecs.h>
|
|
4
|
+
|
|
5
|
+
@implementation BundoWindow
|
|
6
|
+
|
|
7
|
+
- (NSNumber *)getTrafficLightStartInset {
|
|
8
|
+
__block CGFloat maxX = 0;
|
|
9
|
+
|
|
10
|
+
dispatch_sync(dispatch_get_main_queue(), ^{
|
|
11
|
+
NSWindow *window = NSApp.keyWindow ?: NSApp.mainWindow;
|
|
12
|
+
|
|
13
|
+
NSButton *closeButton = [window standardWindowButton:NSWindowCloseButton];
|
|
14
|
+
NSButton *miniaturizeButton = [window standardWindowButton:NSWindowMiniaturizeButton];
|
|
15
|
+
NSButton *zoomButton = [window standardWindowButton:NSWindowZoomButton];
|
|
16
|
+
|
|
17
|
+
NSMutableArray<NSButton *> *trafficLightButtons = [@[] mutableCopy];
|
|
18
|
+
|
|
19
|
+
if(closeButton) {
|
|
20
|
+
[trafficLightButtons insertObject:closeButton atIndex:trafficLightButtons.count];
|
|
21
|
+
}
|
|
22
|
+
if(miniaturizeButton) {
|
|
23
|
+
[trafficLightButtons insertObject:miniaturizeButton atIndex:trafficLightButtons.count];
|
|
24
|
+
}
|
|
25
|
+
if(zoomButton) {
|
|
26
|
+
[trafficLightButtons insertObject:zoomButton atIndex:trafficLightButtons.count];
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
for(NSButton *button in trafficLightButtons) {
|
|
30
|
+
if(!button) {
|
|
31
|
+
continue;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
NSRect rect = [button.superview convertRect:button.frame
|
|
35
|
+
toView:window.contentView];
|
|
36
|
+
|
|
37
|
+
maxX = MAX(maxX, NSMaxX(rect));
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
return [NSNumber numberWithDouble:maxX];
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
- (NSNumber *)isFullScreen {
|
|
45
|
+
__block BOOL isFullScreen = false;
|
|
46
|
+
|
|
47
|
+
dispatch_sync(dispatch_get_main_queue(), ^{
|
|
48
|
+
NSWindow *window = NSApp.keyWindow ?: NSApp.mainWindow;
|
|
49
|
+
isFullScreen = (window.styleMask & NSWindowStyleMaskFullScreen) != 0;
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
return [NSNumber numberWithBool:isFullScreen];
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
- (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:
|
|
56
|
+
(const facebook::react::ObjCTurboModule::InitParams &)params
|
|
57
|
+
{
|
|
58
|
+
return std::make_shared<facebook::react::NativeBundoWindowSpecJSI>(params);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
RCT_EXPORT_MODULE()
|
|
62
|
+
|
|
63
|
+
@end
|
package/bundo.plugin.mjs
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
// _plugin/_find-last-line-of.mts
|
|
2
|
+
function findLastLineOf(line, lines, startIndex = 0, endIndex) {
|
|
3
|
+
let endLine = -1;
|
|
4
|
+
for (let ln = startIndex;ln < lines.length; ln++) {
|
|
5
|
+
const currentLine = lines[ln];
|
|
6
|
+
if (!currentLine) {
|
|
7
|
+
break;
|
|
8
|
+
}
|
|
9
|
+
if (line.test(currentLine)) {
|
|
10
|
+
endLine = ln;
|
|
11
|
+
} else if (typeof endIndex === "number" && endIndex == ln || endLine > -1) {
|
|
12
|
+
break;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
return endLine;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// _plugin/bundo.plugin.mts
|
|
19
|
+
function bundo_plugin_default(ctx) {
|
|
20
|
+
if (ctx.parameter?.hideTitleBar) {
|
|
21
|
+
const appDelegateLines = ctx.macos.files.Project["AppDelegate.swift"].split(/\n/);
|
|
22
|
+
let existingModifierChainLine = -1, windowBlockStartLine = -1;
|
|
23
|
+
{
|
|
24
|
+
let ln = -1;
|
|
25
|
+
for (const line of appDelegateLines) {
|
|
26
|
+
ln++;
|
|
27
|
+
if (/\s\s\s\sWindow\(.*\{/.test(line)) {
|
|
28
|
+
windowBlockStartLine = ln;
|
|
29
|
+
break;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
{
|
|
34
|
+
let ln = -1;
|
|
35
|
+
for (const line of appDelegateLines) {
|
|
36
|
+
ln++;
|
|
37
|
+
if (ln < windowBlockStartLine) {
|
|
38
|
+
continue;
|
|
39
|
+
}
|
|
40
|
+
if (/\s\s\s\s\.windowStyle\(.hiddenTitleBar\)/.test(line)) {
|
|
41
|
+
existingModifierChainLine = ln;
|
|
42
|
+
break;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
if (windowBlockStartLine == -1) {
|
|
47
|
+
throw new Error('Unexpected template files. Cannot find "Window(...)" line in AppDelegate.swift.');
|
|
48
|
+
}
|
|
49
|
+
const windowBlockEndLine = findLastLineOf(/\s\s\s\s\}/, appDelegateLines, windowBlockStartLine);
|
|
50
|
+
if (windowBlockEndLine == -1) {
|
|
51
|
+
throw new Error('Unexpected template files. Cannot find the end "}" of "Window" line in AppDelegate.swift.');
|
|
52
|
+
}
|
|
53
|
+
if (existingModifierChainLine == -1) {
|
|
54
|
+
const modifierEndLine = findLastLineOf(/(\s+\..*\()/, appDelegateLines, windowBlockEndLine);
|
|
55
|
+
appDelegateLines.splice(modifierEndLine > -1 ? modifierEndLine + 1 : windowBlockEndLine + 1, 0, " .windowStyle(.hiddenTitleBar)");
|
|
56
|
+
}
|
|
57
|
+
{
|
|
58
|
+
let reactNativeViewStartLine = -1;
|
|
59
|
+
{
|
|
60
|
+
let ln = -1;
|
|
61
|
+
for (const line of appDelegateLines) {
|
|
62
|
+
ln++;
|
|
63
|
+
if (ln <= windowBlockStartLine) {
|
|
64
|
+
continue;
|
|
65
|
+
}
|
|
66
|
+
if (/\s+ReactNativeView\(.*/.test(line)) {
|
|
67
|
+
reactNativeViewStartLine = ln;
|
|
68
|
+
break;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
if (reactNativeViewStartLine == -1) {
|
|
73
|
+
throw new Error('Unexpected template files. Cannot find "ReactNativeView(...)" line in AppDelegate.swift.');
|
|
74
|
+
}
|
|
75
|
+
let reactNativeViewEndLine = reactNativeViewStartLine;
|
|
76
|
+
for (let ln = reactNativeViewStartLine;ln < windowBlockEndLine; ln++) {
|
|
77
|
+
const line = appDelegateLines[ln];
|
|
78
|
+
if (!line) {
|
|
79
|
+
continue;
|
|
80
|
+
}
|
|
81
|
+
if (ln == reactNativeViewStartLine && line.includes(".ignoresSafeArea()")) {
|
|
82
|
+
reactNativeViewEndLine = -1;
|
|
83
|
+
break;
|
|
84
|
+
}
|
|
85
|
+
if (/(\s+\..*\()/.test(line)) {
|
|
86
|
+
if (line.includes(".ignoresSafeArea()")) {
|
|
87
|
+
reactNativeViewEndLine = -1;
|
|
88
|
+
break;
|
|
89
|
+
} else {
|
|
90
|
+
reactNativeViewEndLine = ln;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
if (reactNativeViewEndLine > -1) {
|
|
95
|
+
appDelegateLines.splice(reactNativeViewEndLine + 1, 0, " .ignoresSafeArea()");
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
ctx.macos.files.Project["AppDelegate.swift"] = appDelegateLines.join(`
|
|
99
|
+
`);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
export {
|
|
103
|
+
bundo_plugin_default as default
|
|
104
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _reactNative = require("react-native");
|
|
8
|
+
var _default = exports.default = _reactNative.TurboModuleRegistry.getEnforcing("BundoWindow");
|
|
9
|
+
//# sourceMappingURL=NativeBundoWindow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_default","exports","default","TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../../../src","sources":["_internal/native-modules/NativeBundoWindow.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAIqB,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAUNC,gCAAmB,CAACC,YAAY,CAAO,aAAa,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getTrafficLightStartInset = getTrafficLightStartInset;
|
|
7
|
+
function getTrafficLightStartInset() {
|
|
8
|
+
return 0;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=get-traffic-light-start-inset.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["getTrafficLightStartInset"],"sourceRoot":"../../src","sources":["get-traffic-light-start-inset.ts"],"mappings":";;;;;;AAAO,SAASA,yBAAyBA,CAAA,EAAW;EACnD,OAAO,CAAC;AACT","ignoreList":[]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getTrafficLightStartInset = getTrafficLightStartInset;
|
|
7
|
+
var _NativeBundoWindow = _interopRequireDefault(require("./_internal/native-modules/NativeBundoWindow.js"));
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
+
function getTrafficLightStartInset() {
|
|
10
|
+
return _NativeBundoWindow.default.getTrafficLightStartInset();
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=get-traffic-light-start-inset.macos.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_NativeBundoWindow","_interopRequireDefault","require","e","__esModule","default","getTrafficLightStartInset","NativeBundoWindow"],"sourceRoot":"../../src","sources":["get-traffic-light-start-inset.macos.ts"],"mappings":";;;;;;AAAA,IAAAA,kBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA4E,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAErE,SAASG,yBAAyBA,CAAA,EAAG;EAC3C,OAAOC,0BAAiB,CAACD,yBAAyB,CAAC,CAAC;AACrD","ignoreList":[]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _getTrafficLightStartInset = require("./get-traffic-light-start-inset");
|
|
7
|
+
Object.keys(_getTrafficLightStartInset).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _getTrafficLightStartInset[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _getTrafficLightStartInset[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
var _isFullScreen = require("./is-full-screen");
|
|
18
|
+
Object.keys(_isFullScreen).forEach(function (key) {
|
|
19
|
+
if (key === "default" || key === "__esModule") return;
|
|
20
|
+
if (key in exports && exports[key] === _isFullScreen[key]) return;
|
|
21
|
+
Object.defineProperty(exports, key, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () {
|
|
24
|
+
return _isFullScreen[key];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_getTrafficLightStartInset","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_isFullScreen"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;;;;AAAA,IAAAA,0BAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,0BAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,0BAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,0BAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,aAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,aAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,aAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,aAAA,CAAAL,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["isFullScreen"],"sourceRoot":"../../src","sources":["is-full-screen.ts"],"mappings":";;;;;;AAAO,SAASA,YAAYA,CAAA,EAAY;EACvC,OAAO,KAAK;AACb","ignoreList":[]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.isFullScreen = isFullScreen;
|
|
7
|
+
var _NativeBundoWindow = _interopRequireDefault(require("./_internal/native-modules/NativeBundoWindow.js"));
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
+
function isFullScreen() {
|
|
10
|
+
return _NativeBundoWindow.default.isFullScreen();
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=is-full-screen.macos.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_NativeBundoWindow","_interopRequireDefault","require","e","__esModule","default","isFullScreen","NativeBundoWindow"],"sourceRoot":"../../src","sources":["is-full-screen.macos.ts"],"mappings":";;;;;;AAAA,IAAAA,kBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA4E,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAErE,SAASG,YAAYA,CAAA,EAAG;EAC9B,OAAOC,0BAAiB,CAACD,YAAY,CAAC,CAAC;AACxC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"commonjs"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../../../src","sources":["_internal/native-modules/NativeBundoWindow.ts"],"mappings":";;AAAA,SACCA,mBAAmB,QAGb,cAAc;AAUrB,eAAeA,mBAAmB,CAACC,YAAY,CAAO,aAAa,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["getTrafficLightStartInset"],"sourceRoot":"../../src","sources":["get-traffic-light-start-inset.ts"],"mappings":";;AAAA,OAAO,SAASA,yBAAyBA,CAAA,EAAW;EACnD,OAAO,CAAC;AACT","ignoreList":[]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import NativeBundoWindow from "./_internal/native-modules/NativeBundoWindow.js";
|
|
4
|
+
export function getTrafficLightStartInset() {
|
|
5
|
+
return NativeBundoWindow.getTrafficLightStartInset();
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=get-traffic-light-start-inset.macos.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["NativeBundoWindow","getTrafficLightStartInset"],"sourceRoot":"../../src","sources":["get-traffic-light-start-inset.macos.ts"],"mappings":";;AAAA,OAAOA,iBAAiB,MAAM,iDAA8C;AAE5E,OAAO,SAASC,yBAAyBA,CAAA,EAAG;EAC3C,OAAOD,iBAAiB,CAACC,yBAAyB,CAAC,CAAC;AACrD","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA,cAAc,iCAAiC;AAC/C,cAAc,kBAAkB","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["isFullScreen"],"sourceRoot":"../../src","sources":["is-full-screen.ts"],"mappings":";;AAAA,OAAO,SAASA,YAAYA,CAAA,EAAY;EACvC,OAAO,KAAK;AACb","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["NativeBundoWindow","isFullScreen"],"sourceRoot":"../../src","sources":["is-full-screen.macos.ts"],"mappings":";;AAAA,OAAOA,iBAAiB,MAAM,iDAA8C;AAE5E,OAAO,SAASC,YAAYA,CAAA,EAAG;EAC9B,OAAOD,iBAAiB,CAACC,YAAY,CAAC,CAAC;AACxC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"module"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type CodegenTypes, type TurboModule } from "react-native";
|
|
2
|
+
export interface Spec extends TurboModule {
|
|
3
|
+
getTrafficLightStartInset(): CodegenTypes.Int32;
|
|
4
|
+
isFullScreen(): boolean;
|
|
5
|
+
}
|
|
6
|
+
declare const _default: Spec;
|
|
7
|
+
export default _default;
|
|
8
|
+
//# sourceMappingURL=NativeBundoWindow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NativeBundoWindow.d.ts","sourceRoot":"","sources":["../../../../src/_internal/native-modules/NativeBundoWindow.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,MAAM,cAAc,CAAA;AAErB,MAAM,WAAW,IAAK,SAAQ,WAAW;IAExC,yBAAyB,IAAI,YAAY,CAAC,KAAK,CAAC;IAEhD,YAAY,IAAI,OAAO,CAAC;CAExB;;AAED,wBAAoE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-traffic-light-start-inset.d.ts","sourceRoot":"","sources":["../../src/get-traffic-light-start-inset.ts"],"names":[],"mappings":"AAAA,wBAAgB,yBAAyB,IAAI,MAAM,CAElD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-traffic-light-start-inset.macos.d.ts","sourceRoot":"","sources":["../../src/get-traffic-light-start-inset.macos.ts"],"names":[],"mappings":"AAEA,wBAAgB,yBAAyB,WAExC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAA;AAC/C,cAAc,kBAAkB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-full-screen.d.ts","sourceRoot":"","sources":["../../src/is-full-screen.ts"],"names":[],"mappings":"AAAA,wBAAgB,YAAY,IAAI,OAAO,CAEtC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-full-screen.macos.d.ts","sourceRoot":"","sources":["../../src/is-full-screen.macos.ts"],"names":[],"mappings":"AAEA,wBAAgB,YAAY,YAE3B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,49 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
"name": "bundo-window",
|
|
3
|
+
"version": "0.0.1-beta.8",
|
|
4
|
+
"description": "Manage your React Native app window",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "RakaDoank <rakaaudira@gmail.com> (https://github.com/RakaDoank)",
|
|
7
|
+
"homepage": "https://github.com/RakaDoank/bundo.rn",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://github.com/RakaDoank/bundo.rn.git",
|
|
11
|
+
"directory": "packages/bundo-window"
|
|
12
|
+
},
|
|
13
|
+
"scripts": {
|
|
14
|
+
"build": "bun run ./_scripts/build.mts"
|
|
15
|
+
},
|
|
16
|
+
"peerDependencies": {
|
|
17
|
+
"react-native-macos": "^0.81"
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"android",
|
|
21
|
+
"apple",
|
|
22
|
+
"lib",
|
|
23
|
+
"src",
|
|
24
|
+
"*.podspec",
|
|
25
|
+
"bundo.plugin.mjs",
|
|
26
|
+
"react-native.config.js",
|
|
27
|
+
"!*.tsbuildinfo",
|
|
28
|
+
"!android/build",
|
|
29
|
+
"!android/gradle",
|
|
30
|
+
"!android/gradlew",
|
|
31
|
+
"!android/gradlew.bat",
|
|
32
|
+
"!android/local.properties",
|
|
33
|
+
"!ios/build"
|
|
34
|
+
],
|
|
35
|
+
"main": "./lib/commonjs/index.js",
|
|
36
|
+
"types": "./lib/typescript/index.d.ts",
|
|
37
|
+
"exports": {
|
|
38
|
+
".": {
|
|
39
|
+
"import": "./lib/module/index.js",
|
|
40
|
+
"require": "./lib/commonjs/index.js",
|
|
41
|
+
"types": "./lib/typescript/index.d.ts"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"codegenConfig": {
|
|
45
|
+
"name": "BundoWindowSpecs",
|
|
46
|
+
"type": "modules",
|
|
47
|
+
"jsSrcsDir": "./src/_internal/native-modules"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import {
|
|
2
|
+
TurboModuleRegistry,
|
|
3
|
+
type CodegenTypes,
|
|
4
|
+
type TurboModule,
|
|
5
|
+
} from "react-native"
|
|
6
|
+
|
|
7
|
+
export interface Spec extends TurboModule {
|
|
8
|
+
|
|
9
|
+
getTrafficLightStartInset(): CodegenTypes.Int32,
|
|
10
|
+
|
|
11
|
+
isFullScreen(): boolean,
|
|
12
|
+
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export default TurboModuleRegistry.getEnforcing<Spec>("BundoWindow")
|
package/src/index.ts
ADDED
package/README.md
DELETED