sparkbun 0.1.5 → 0.1.6

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.
Files changed (79) hide show
  1. package/dist-linux-arm64/libNativeWrapper.so +0 -0
  2. package/dist-linux-arm64/{libElectrobunCore.so → libSparkBunCore.so} +0 -0
  3. package/dist-linux-x64/libNativeWrapper.so +0 -0
  4. package/dist-linux-x64/{libElectrobunCore.so → libSparkBunCore.so} +0 -0
  5. package/dist-macos-arm64/libNativeWrapper.dylib +0 -0
  6. package/dist-macos-arm64/libSparkBunCore.dylib +0 -0
  7. package/dist-macos-x64/libNativeWrapper.dylib +0 -0
  8. package/dist-macos-x64/libSparkBunCore.dylib +0 -0
  9. package/dist-macos-x64/libasar.dylib +0 -0
  10. package/dist-macos-x64/libwebgpu_dawn.dylib +0 -0
  11. package/dist-macos-x64/process_helper +0 -0
  12. package/dist-win-arm64/SparkBunCore.dll +0 -0
  13. package/dist-win-arm64/WebView2Loader.dll +0 -0
  14. package/dist-win-arm64/libNativeWrapper.dll +0 -0
  15. package/dist-win-arm64/zig-asar/arm64/libasar.dll +0 -0
  16. package/dist-win-arm64/zig-asar/x64/libasar.dll +0 -0
  17. package/dist-win-x64/SparkBunCore.dll +0 -0
  18. package/package.json +1 -1
  19. package/scripts/setup-win-arm64.ps1 +19 -0
  20. package/src/browser/global.d.ts +11 -11
  21. package/src/browser/index.ts +10 -10
  22. package/src/bun/core/BrowserView.ts +2 -2
  23. package/src/bun/core/Updater.ts +6 -56
  24. package/src/bun/preload/.generated/compiled.ts +2 -2
  25. package/src/bun/preload/dragRegions.ts +2 -2
  26. package/src/bun/preload/encryption.ts +4 -4
  27. package/src/bun/preload/events.ts +4 -4
  28. package/src/bun/preload/globals.d.ts +14 -14
  29. package/src/bun/preload/index-sandboxed.ts +3 -3
  30. package/src/bun/preload/index.ts +19 -19
  31. package/src/bun/preload/internalRpc.ts +3 -3
  32. package/src/bun/preload/webviewTag.ts +2 -2
  33. package/src/bun/preload/wgpuTag.ts +1 -1
  34. package/src/bun/proc/native.ts +6 -6
  35. package/src/cli/index.ts +17 -49
  36. package/src/core/build.zig +1 -1
  37. package/src/core/main.zig +25 -24
  38. package/src/installer/installer-template.ts +1 -1
  39. package/src/launcher/main.ts +10 -10
  40. package/src/native/linux/cef_process_helper_linux.cpp +4 -4
  41. package/src/native/linux/nativeWrapper.cpp +230 -230
  42. package/src/native/macos/cef_process_helper_mac.cc +4 -4
  43. package/src/native/macos/nativeWrapper.mm +100 -100
  44. package/src/native/shared/accelerator_parser.h +5 -5
  45. package/src/native/shared/app_paths.h +7 -7
  46. package/src/native/shared/asar.h +5 -5
  47. package/src/native/shared/cache_migration.h +14 -14
  48. package/src/native/shared/callbacks.h +5 -5
  49. package/src/native/shared/cef_response_filter.h +18 -18
  50. package/src/native/shared/chromium_flags.h +6 -6
  51. package/src/native/shared/config.h +5 -5
  52. package/src/native/shared/download_event.h +5 -5
  53. package/src/native/shared/ffi_helpers.h +6 -6
  54. package/src/native/shared/glob_match.h +5 -5
  55. package/src/native/shared/json_menu_parser.h +5 -5
  56. package/src/native/shared/mime_types.h +5 -5
  57. package/src/native/shared/navigation_rules.h +5 -5
  58. package/src/native/shared/partition_context.h +5 -5
  59. package/src/native/shared/permissions.h +5 -5
  60. package/src/native/shared/permissions_cef.h +5 -5
  61. package/src/native/shared/preload_script.h +5 -5
  62. package/src/native/shared/shutdown_guard.h +5 -5
  63. package/src/native/shared/thread_safe_map.h +5 -5
  64. package/src/native/shared/webview_storage.h +5 -5
  65. package/src/native/win/cef_process_helper_win.cpp +4 -4
  66. package/src/native/win/dcomp_compositor.h +1 -1
  67. package/src/native/win/nativeWrapper.cpp +288 -288
  68. package/src/shared/bsdiff.ts +236 -0
  69. package/src/shared/bspatch.ts +98 -0
  70. package/dist-linux-arm64/bsdiff +0 -0
  71. package/dist-linux-arm64/bspatch +0 -0
  72. package/dist-linux-x64/bsdiff +0 -0
  73. package/dist-linux-x64/bspatch +0 -0
  74. package/dist-macos-arm64/bsdiff +0 -0
  75. package/dist-macos-arm64/bspatch +0 -0
  76. package/dist-macos-arm64/libElectrobunCore.dylib +0 -0
  77. package/dist-win-x64/ElectrobunCore.dll +0 -0
  78. package/dist-win-x64/bsdiff.exe +0 -0
  79. package/dist-win-x64/bspatch.exe +0 -0
@@ -4,15 +4,15 @@
4
4
  //
5
5
  // This is a header-only implementation to avoid build complexity.
6
6
 
7
- #ifndef ELECTROBUN_SHUTDOWN_GUARD_H
8
- #define ELECTROBUN_SHUTDOWN_GUARD_H
7
+ #ifndef SPARKBUN_SHUTDOWN_GUARD_H
8
+ #define SPARKBUN_SHUTDOWN_GUARD_H
9
9
 
10
10
  #include <atomic>
11
11
  #include <mutex>
12
12
  #include <thread>
13
13
  #include <chrono>
14
14
 
15
- namespace electrobun {
15
+ namespace sparkbun {
16
16
 
17
17
  // Singleton for managing global shutdown state
18
18
  // Allows code to check if shutdown is in progress and avoid race conditions
@@ -129,6 +129,6 @@ inline void initiateShutdown() {
129
129
  ShutdownManager::getInstance().initiateShutdown();
130
130
  }
131
131
 
132
- } // namespace electrobun
132
+ } // namespace sparkbun
133
133
 
134
- #endif // ELECTROBUN_SHUTDOWN_GUARD_H
134
+ #endif // SPARKBUN_SHUTDOWN_GUARD_H
@@ -4,8 +4,8 @@
4
4
  //
5
5
  // This is a header-only implementation to avoid build complexity.
6
6
 
7
- #ifndef ELECTROBUN_THREAD_SAFE_MAP_H
8
- #define ELECTROBUN_THREAD_SAFE_MAP_H
7
+ #ifndef SPARKBUN_THREAD_SAFE_MAP_H
8
+ #define SPARKBUN_THREAD_SAFE_MAP_H
9
9
 
10
10
  #include <map>
11
11
  #include <mutex>
@@ -13,7 +13,7 @@
13
13
  #include <optional>
14
14
  #include <vector>
15
15
 
16
- namespace electrobun {
16
+ namespace sparkbun {
17
17
 
18
18
  // Thread-safe wrapper around std::map
19
19
  // Provides synchronized access to key-value storage
@@ -133,6 +133,6 @@ private:
133
133
  std::map<KeyType, ValueType> map_;
134
134
  };
135
135
 
136
- } // namespace electrobun
136
+ } // namespace sparkbun
137
137
 
138
- #endif // ELECTROBUN_THREAD_SAFE_MAP_H
138
+ #endif // SPARKBUN_THREAD_SAFE_MAP_H
@@ -4,8 +4,8 @@
4
4
  //
5
5
  // This is a header-only implementation to avoid build complexity.
6
6
 
7
- #ifndef ELECTROBUN_WEBVIEW_STORAGE_H
8
- #define ELECTROBUN_WEBVIEW_STORAGE_H
7
+ #ifndef SPARKBUN_WEBVIEW_STORAGE_H
8
+ #define SPARKBUN_WEBVIEW_STORAGE_H
9
9
 
10
10
  #include <string>
11
11
  #include <map>
@@ -13,7 +13,7 @@
13
13
  #include <cstdint>
14
14
  #include <cstring>
15
15
 
16
- namespace electrobun {
16
+ namespace sparkbun {
17
17
 
18
18
  // Thread-safe storage for webview HTML content
19
19
  // Replaces the duplicated webviewHTMLContent maps across platforms
@@ -86,6 +86,6 @@ inline const char* getWebviewHTMLContentShared(uint32_t webviewId) {
86
86
  return WebviewContentStorage::getInstance().getContentForFFI(webviewId);
87
87
  }
88
88
 
89
- } // namespace electrobun
89
+ } // namespace sparkbun
90
90
 
91
- #endif // ELECTROBUN_WEBVIEW_STORAGE_H
91
+ #endif // SPARKBUN_WEBVIEW_STORAGE_H
@@ -60,7 +60,7 @@ public:
60
60
  CefRefPtr<CefV8Value> eventBridge = CefV8Value::CreateObject(nullptr, nullptr);
61
61
  CefRefPtr<CefV8Value> eventPostMessage = CreatePostMessageFunction(browser, "EventBridgeMessage");
62
62
  eventBridge->SetValue("postMessage", eventPostMessage, V8_PROPERTY_ATTRIBUTE_NONE);
63
- window->SetValue("__electrobunEventBridge", eventBridge, V8_PROPERTY_ATTRIBUTE_NONE);
63
+ window->SetValue("__sparkbunEventBridge", eventBridge, V8_PROPERTY_ATTRIBUTE_NONE);
64
64
 
65
65
  // Only create hostBridge/bunBridge aliases and internalBridge for non-sandboxed webviews
66
66
  if (!is_sandboxed) {
@@ -68,14 +68,14 @@ public:
68
68
  CefRefPtr<CefV8Value> bunBridge = CefV8Value::CreateObject(nullptr, nullptr);
69
69
  CefRefPtr<CefV8Value> bunPostMessage = CreatePostMessageFunction(browser, "BunBridgeMessage");
70
70
  bunBridge->SetValue("postMessage", bunPostMessage, V8_PROPERTY_ATTRIBUTE_NONE);
71
- window->SetValue("__electrobunHostBridge", bunBridge, V8_PROPERTY_ATTRIBUTE_NONE);
72
- window->SetValue("__electrobunBunBridge", bunBridge, V8_PROPERTY_ATTRIBUTE_NONE);
71
+ window->SetValue("__sparkbunHostBridge", bunBridge, V8_PROPERTY_ATTRIBUTE_NONE);
72
+ window->SetValue("__sparkbunBunBridge", bunBridge, V8_PROPERTY_ATTRIBUTE_NONE);
73
73
 
74
74
  // Create internalBridge - internal RPC bridge
75
75
  CefRefPtr<CefV8Value> internalBridge = CefV8Value::CreateObject(nullptr, nullptr);
76
76
  CefRefPtr<CefV8Value> internalPostMessage = CreatePostMessageFunction(browser, "internalMessage");
77
77
  internalBridge->SetValue("postMessage", internalPostMessage, V8_PROPERTY_ATTRIBUTE_NONE);
78
- window->SetValue("__electrobunInternalBridge", internalBridge, V8_PROPERTY_ATTRIBUTE_NONE);
78
+ window->SetValue("__sparkbunInternalBridge", internalBridge, V8_PROPERTY_ATTRIBUTE_NONE);
79
79
  }
80
80
 
81
81
  v8Context->Exit();
@@ -1,7 +1,7 @@
1
1
  // dcomp_compositor.h — DirectComposition GPU surface compositor for Windows
2
2
  //
3
3
  // Provides zero-copy GPU compositing using DirectComposition + DXGI swap chain.
4
- // This matches the macOS CAMetalLayer compositing pattern used in Electrobun
4
+ // This matches the macOS CAMetalLayer compositing pattern used in SparkBun
5
5
  // for native GPU rendering.
6
6
  //
7
7
  // Usage: initMinimal() to create DComp visual tree, then initSwapChainFromDevice()