electrobun 0.0.11 → 0.0.13
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/README.md +2 -5
- package/dist/api/browser/index.js +10 -12
- package/dist/api/bun/index.js +151 -166
- package/dist/bsdiff +0 -0
- package/dist/bspatch +0 -0
- package/dist/bun +0 -0
- package/dist/electrobun +0 -0
- package/dist/extractor +0 -0
- package/dist/launcher +0 -0
- package/dist/webview +0 -0
- package/package.json +20 -16
- package/dist/api/browser/index.js.map +0 -15
- package/dist/api/bun/index.js.map +0 -75
package/README.md
CHANGED
|
@@ -61,9 +61,6 @@ Ways to get involved at this early stage:
|
|
|
61
61
|
|
|
62
62
|
run `bun run install-zig` to install the right version of zig to vendors/zig
|
|
63
63
|
|
|
64
|
-
`bun dev:
|
|
64
|
+
`bun dev:playground` and `bun dev:playground:canary` will compile everything in electrobun in either dev mode and then compile the playground app in either dev or canary modes and run it.
|
|
65
65
|
|
|
66
|
-
Note:
|
|
67
|
-
Setting up a more complex release process is a todo, since those binaries should ideally stay in sync with the bun and browser typescript apis.
|
|
68
|
-
|
|
69
|
-
More work is needed to separate out "build everything in release mode for testing with the example app" vs. "build everything in release mode and prepare for distribution"
|
|
66
|
+
Note: use `lldb <path-to-bundle>/Contents/MacOS/launcher` and then `run` to debug release builds
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
//
|
|
2
|
-
|
|
1
|
+
// node_modules/rpc-anywhere/dist/esm/rpc.js
|
|
2
|
+
function missingTransportMethodError(methods, action) {
|
|
3
3
|
const methodsString = methods.map((method) => `"${method}"`).join(", ");
|
|
4
4
|
return new Error(`This RPC instance cannot ${action} because the transport did not provide one or more of these methods: ${methodsString}`);
|
|
5
|
-
}
|
|
5
|
+
}
|
|
6
6
|
function _createRPC(options = {}) {
|
|
7
7
|
let debugHooks = {};
|
|
8
8
|
function _setDebugHooks(newDebugHooks) {
|
|
@@ -188,7 +188,7 @@ function _createRPC(options = {}) {
|
|
|
188
188
|
var MAX_ID = 10000000000;
|
|
189
189
|
var DEFAULT_MAX_REQUEST_TIME = 1000;
|
|
190
190
|
|
|
191
|
-
//
|
|
191
|
+
// node_modules/rpc-anywhere/dist/esm/create-rpc.js
|
|
192
192
|
function createRPC(options) {
|
|
193
193
|
return _createRPC(options);
|
|
194
194
|
}
|
|
@@ -259,7 +259,7 @@ var ConfigureWebviewTags = (enableWebviewTags, zigRpc, syncRpc) => {
|
|
|
259
259
|
}
|
|
260
260
|
});
|
|
261
261
|
this.webviewId = webviewId;
|
|
262
|
-
this.id = `electrobun-webview-${
|
|
262
|
+
this.id = `electrobun-webview-${webviewId}`;
|
|
263
263
|
this.setAttribute("id", this.id);
|
|
264
264
|
}
|
|
265
265
|
asyncResolvers = {};
|
|
@@ -347,7 +347,7 @@ var ConfigureWebviewTags = (enableWebviewTags, zigRpc, syncRpc) => {
|
|
|
347
347
|
this.dispatchEvent(new CustomEvent(event, { detail }));
|
|
348
348
|
}
|
|
349
349
|
syncDimensions(force = false) {
|
|
350
|
-
if (!force && this.hidden) {
|
|
350
|
+
if (!this.webviewId || !force && this.hidden) {
|
|
351
351
|
return;
|
|
352
352
|
}
|
|
353
353
|
const rect = this.getBoundingClientRect();
|
|
@@ -501,7 +501,7 @@ var ConfigureWebviewTags = (enableWebviewTags, zigRpc, syncRpc) => {
|
|
|
501
501
|
}
|
|
502
502
|
};
|
|
503
503
|
}
|
|
504
|
-
DEFAULT_FRAME_RATE = Math.round(
|
|
504
|
+
DEFAULT_FRAME_RATE = Math.round(1000 / 30);
|
|
505
505
|
streamScreenInterval;
|
|
506
506
|
startMirroringToDom(frameRate = this.DEFAULT_FRAME_RATE) {
|
|
507
507
|
if (this.streamScreenInterval) {
|
|
@@ -805,10 +805,10 @@ class Electroview {
|
|
|
805
805
|
}
|
|
806
806
|
}
|
|
807
807
|
};
|
|
808
|
-
const
|
|
808
|
+
const rpc = createRPC(rpcOptions);
|
|
809
809
|
const messageHandlers = config.handlers.messages;
|
|
810
810
|
if (messageHandlers) {
|
|
811
|
-
|
|
811
|
+
rpc.addMessageListener("*", (messageName, payload) => {
|
|
812
812
|
const globalHandler = messageHandlers["*"];
|
|
813
813
|
if (globalHandler) {
|
|
814
814
|
globalHandler(messageName, payload);
|
|
@@ -819,7 +819,7 @@ class Electroview {
|
|
|
819
819
|
}
|
|
820
820
|
});
|
|
821
821
|
}
|
|
822
|
-
return
|
|
822
|
+
return rpc;
|
|
823
823
|
}
|
|
824
824
|
}
|
|
825
825
|
var Electrobun = {
|
|
@@ -831,5 +831,3 @@ export {
|
|
|
831
831
|
createRPC,
|
|
832
832
|
Electroview
|
|
833
833
|
};
|
|
834
|
-
|
|
835
|
-
//# debugId=5A7994858FFC99B964756e2164756e21
|