electrobun 1.18.4-beta.19 → 1.18.4-beta.21

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 (53) hide show
  1. package/dist/api/browser/ui/__tests__/dom.test.ts +473 -0
  2. package/dist/api/browser/ui/__tests__/domStub.ts +218 -0
  3. package/dist/api/browser/ui/dom.ts +490 -0
  4. package/dist/api/browser/ui/index.ts +44 -0
  5. package/dist/api/browser/ui/jsx-dev-runtime.ts +16 -0
  6. package/dist/api/browser/ui/jsx-runtime.ts +56 -0
  7. package/dist/api/config/ElectrobunConfig.ts +33 -0
  8. package/dist/api/preload/.generated/compiled.ts +1 -1
  9. package/dist/api/preload/index.ts +2 -0
  10. package/dist/api/preload/uiTag.ts +45 -0
  11. package/dist/api/sdks/main/__tests__/utils-quit-exit-code.test.ts +44 -0
  12. package/dist/api/sdks/main/core/GpuWindow.ts +19 -0
  13. package/dist/api/sdks/main/core/Utils.ts +52 -4
  14. package/dist/api/sdks/main/core/WGPUView.ts +9 -0
  15. package/dist/api/sdks/main/entries/ui.ts +1 -0
  16. package/dist/api/sdks/main/proc/native.ts +187 -0
  17. package/dist/api/sdks/main/ui/__tests__/font.test.ts +49 -0
  18. package/dist/api/sdks/main/ui/__tests__/hit.test.ts +64 -0
  19. package/dist/api/sdks/main/ui/__tests__/jsx.test.ts +252 -0
  20. package/dist/api/sdks/main/ui/__tests__/layout.test.ts +159 -0
  21. package/dist/api/sdks/main/ui/__tests__/paint.test.ts +115 -0
  22. package/dist/api/sdks/main/ui/__tests__/reactive.test.ts +456 -0
  23. package/dist/api/sdks/main/ui/__tests__/scroll-focus-input.test.ts +298 -0
  24. package/dist/api/sdks/main/ui/__tests__/tree.test.ts +96 -0
  25. package/dist/api/sdks/main/ui/__tests__/ui.test.ts +170 -0
  26. package/dist/api/sdks/main/ui/elements.ts +135 -0
  27. package/dist/api/sdks/main/ui/font.ts +168 -0
  28. package/dist/api/sdks/main/ui/hit.ts +46 -0
  29. package/dist/api/sdks/main/ui/index.ts +71 -0
  30. package/dist/api/sdks/main/ui/input.ts +268 -0
  31. package/dist/api/sdks/main/ui/jsx-dev-runtime.ts +16 -0
  32. package/dist/api/sdks/main/ui/jsx-runtime.ts +136 -0
  33. package/dist/api/sdks/main/ui/keymap.ts +147 -0
  34. package/dist/api/sdks/main/ui/layout.ts +178 -0
  35. package/dist/api/sdks/main/ui/paint.ts +196 -0
  36. package/dist/api/sdks/main/ui/reactive.ts +4 -0
  37. package/dist/api/sdks/main/ui/renderer.ts +278 -0
  38. package/dist/api/sdks/main/ui/text.ts +175 -0
  39. package/dist/api/sdks/main/ui/textInput.ts +121 -0
  40. package/dist/api/sdks/main/ui/tree.ts +276 -0
  41. package/dist/api/sdks/main/ui/ui.ts +457 -0
  42. package/dist/api/sdks/main/ui/uiTagHost.ts +56 -0
  43. package/dist/api/sdks/main/ui/uiwindow.ts +330 -0
  44. package/dist/api/shared/build-dependencies.test.ts +1 -1
  45. package/dist/api/shared/build-dependencies.ts +4 -4
  46. package/dist/api/shared/linux-webkit-automation.test.ts +1 -1
  47. package/dist/api/shared/warren/jsx.ts +279 -0
  48. package/dist/api/shared/warren/reactive.ts +638 -0
  49. package/dist/api/shared/windows-unicode-ui.test.ts +4 -4
  50. package/dist/preload-full.js +35 -0
  51. package/dist/zig-sdk/electrobun.zig +197 -162
  52. package/{dash.config.ts → hutch.config.ts} +3 -2
  53. package/package.json +11 -2
@@ -1,21 +1,65 @@
1
1
  const std = @import("std");
2
2
  const builtin = @import("builtin");
3
3
 
4
- pub const WindowCloseHandler = *const fn (u32) callconv(.C) void;
5
- pub const WindowShouldCloseHandler = *const fn (u32) callconv(.C) void;
6
- pub const WindowMoveHandler = *const fn (u32, f64, f64) callconv(.C) void;
7
- pub const WindowResizeHandler = *const fn (u32, f64, f64, f64, f64) callconv(.C) void;
8
- pub const WindowFocusHandler = *const fn (u32) callconv(.C) void;
9
- pub const WindowBlurHandler = *const fn (u32) callconv(.C) void;
10
- pub const WindowKeyHandler = *const fn (u32, u32, u32, u32, u32) callconv(.C) void;
11
- pub const DecideNavigationHandler = *const fn (u32, [*:0]const u8) callconv(.C) u32;
12
- pub const WebviewEventHandler = *const fn (u32, [*:0]const u8, [*:0]const u8) callconv(.C) void;
13
- pub const WebviewPostMessageHandler = *const fn (u32, [*:0]const u8) callconv(.C) void;
14
- pub const StatusItemHandler = *const fn (u32, [*:0]const u8) callconv(.C) void;
15
- pub const GlobalShortcutHandler = *const fn ([*:0]const u8) callconv(.C) void;
16
- pub const QuitRequestedHandler = *const fn () callconv(.C) void;
17
- pub const URLOpenHandler = *const fn ([*:0]const u8) callconv(.C) void;
18
- pub const AppReopenHandler = *const fn () callconv(.C) void;
4
+ // The SDK owns a lazily-initialized event-loop-free Io implementation so its
5
+ // allocator-based public API keeps working without threading `std.Io` through
6
+ // every call site. Apps with their own `Io` can keep using it side by side.
7
+ var io_state: struct {
8
+ status: std.atomic.Value(u8) = .init(0), // 0 = uninitialized, 1 = initializing, 2 = ready
9
+ threaded: std.Io.Threaded = undefined,
10
+ } = .{};
11
+
12
+ /// The `std.Io` instance backing the SDK's filesystem and process helpers.
13
+ pub fn defaultIo() std.Io {
14
+ while (true) {
15
+ switch (io_state.status.load(.acquire)) {
16
+ 2 => return io_state.threaded.io(),
17
+ 0 => {
18
+ if (io_state.status.cmpxchgStrong(0, 1, .acquire, .acquire) == null) {
19
+ io_state.threaded = std.Io.Threaded.init(std.heap.page_allocator, .{
20
+ .environ = processEnviron(),
21
+ });
22
+ io_state.status.store(2, .release);
23
+ return io_state.threaded.io();
24
+ }
25
+ },
26
+ else => std.atomic.spinLoopHint(),
27
+ }
28
+ }
29
+ }
30
+
31
+ /// The calling process's environment variables.
32
+ pub fn processEnviron() std.process.Environ {
33
+ return switch (builtin.os.tag) {
34
+ .windows => .{ .block = .global },
35
+ else => blk: {
36
+ const c_environ = std.c.environ;
37
+ var count: usize = 0;
38
+ while (c_environ[count] != null) : (count += 1) {}
39
+ break :blk .{ .block = .{ .slice = @ptrCast(c_environ[0..count :null]) } };
40
+ },
41
+ };
42
+ }
43
+
44
+ fn getEnvVarOwned(allocator: std.mem.Allocator, key: []const u8) ![]u8 {
45
+ return processEnviron().getAlloc(allocator, key);
46
+ }
47
+
48
+ pub const WindowCloseHandler = *const fn (u32) callconv(.c) void;
49
+ pub const WindowShouldCloseHandler = *const fn (u32) callconv(.c) void;
50
+ pub const WindowMoveHandler = *const fn (u32, f64, f64) callconv(.c) void;
51
+ pub const WindowResizeHandler = *const fn (u32, f64, f64, f64, f64) callconv(.c) void;
52
+ pub const WindowFocusHandler = *const fn (u32) callconv(.c) void;
53
+ pub const WindowBlurHandler = *const fn (u32) callconv(.c) void;
54
+ pub const WindowKeyHandler = *const fn (u32, u32, u32, u32, u32) callconv(.c) void;
55
+ pub const DecideNavigationHandler = *const fn (u32, [*:0]const u8) callconv(.c) u32;
56
+ pub const WebviewEventHandler = *const fn (u32, [*:0]const u8, [*:0]const u8) callconv(.c) void;
57
+ pub const WebviewPostMessageHandler = *const fn (u32, [*:0]const u8) callconv(.c) void;
58
+ pub const StatusItemHandler = *const fn (u32, [*:0]const u8) callconv(.c) void;
59
+ pub const GlobalShortcutHandler = *const fn ([*:0]const u8) callconv(.c) void;
60
+ pub const QuitRequestedHandler = *const fn () callconv(.c) void;
61
+ pub const URLOpenHandler = *const fn ([*:0]const u8) callconv(.c) void;
62
+ pub const AppReopenHandler = *const fn () callconv(.c) void;
19
63
 
20
64
  pub const Renderer = enum {
21
65
  native,
@@ -350,13 +394,13 @@ pub const SessionPartition = struct {
350
394
  partition: []const u8,
351
395
 
352
396
  pub fn getCookies(self: SessionPartition, filter: ?CookieFilter) ![]Cookie {
353
- const filter_json = try std.json.stringifyAlloc(self.core.allocator, filter orelse CookieFilter{}, .{});
397
+ const filter_json = try std.json.Stringify.valueAlloc(self.core.allocator, filter orelse CookieFilter{}, .{});
354
398
  defer self.core.allocator.free(filter_json);
355
399
  return self.core.sessionGetCookies(self.partition, filter_json);
356
400
  }
357
401
 
358
402
  pub fn setCookie(self: SessionPartition, cookie: Cookie) !bool {
359
- const cookie_json = try std.json.stringifyAlloc(self.core.allocator, cookie, .{});
403
+ const cookie_json = try std.json.Stringify.valueAlloc(self.core.allocator, cookie, .{});
360
404
  defer self.core.allocator.free(cookie_json);
361
405
  return self.core.sessionSetCookie(self.partition, cookie_json);
362
406
  }
@@ -381,7 +425,7 @@ pub const SessionPartition = struct {
381
425
  names[index] = @tagName(storage_type);
382
426
  }
383
427
 
384
- const storage_types_json = try std.json.stringifyAlloc(self.core.allocator, names, .{});
428
+ const storage_types_json = try std.json.Stringify.valueAlloc(self.core.allocator, names, .{});
385
429
  defer self.core.allocator.free(storage_types_json);
386
430
  try self.core.sessionClearStorageData(self.partition, storage_types_json);
387
431
  }
@@ -409,8 +453,8 @@ pub const WgpuNative = struct {
409
453
  lib: std.DynLib,
410
454
  symbols: Symbols,
411
455
 
412
- const CreateInstanceFn = *const fn (?*const anyopaque) callconv(.C) ?*anyopaque;
413
- const DeviceGetQueueFn = *const fn (?*anyopaque) callconv(.C) ?*anyopaque;
456
+ const CreateInstanceFn = *const fn (?*const anyopaque) callconv(.c) ?*anyopaque;
457
+ const DeviceGetQueueFn = *const fn (?*anyopaque) callconv(.c) ?*anyopaque;
414
458
 
415
459
  const Symbols = struct {
416
460
  create_instance: CreateInstanceFn,
@@ -543,7 +587,7 @@ pub const BundlePaths = struct {
543
587
  };
544
588
 
545
589
  pub fn resolveBundlePaths(allocator: std.mem.Allocator) !BundlePaths {
546
- const exe_path = try std.fs.selfExePathAlloc(allocator);
590
+ const exe_path = try std.process.executablePathAlloc(defaultIo(), allocator);
547
591
  defer allocator.free(exe_path);
548
592
 
549
593
  const exe_dir_name = std.fs.path.dirname(exe_path) orelse return error.InvalidExePath;
@@ -586,122 +630,122 @@ pub const Core = struct {
586
630
  lib: std.DynLib,
587
631
  symbols: Symbols,
588
632
 
589
- const LastErrorFn = *const fn () callconv(.C) [*:0]const u8;
590
- const RunMainThreadFn = *const fn ([*:0]const u8, [*:0]const u8, [*:0]const u8, c_int) callconv(.C) c_int;
591
- const ConfigureWebviewRuntimeFn = *const fn (u32, [*:0]const u8, [*:0]const u8) callconv(.C) bool;
592
- const GetWindowStyleFn = *const fn (bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool) callconv(.C) u32;
593
- const CreateWindowFn = *const fn (f64, f64, f64, f64, u32, [*:0]const u8, bool, [*:0]const u8, bool, bool, bool, f64, f64, ?WindowCloseHandler, ?WindowMoveHandler, ?WindowResizeHandler, ?WindowFocusHandler, ?WindowBlurHandler, ?WindowKeyHandler, ?WindowShouldCloseHandler) callconv(.C) u32;
594
- const CreateWebviewFn = *const fn (u32, u32, [*:0]const u8, [*:0]const u8, f64, f64, f64, f64, bool, [*:0]const u8, ?DecideNavigationHandler, ?WebviewEventHandler, ?WebviewPostMessageHandler, ?WebviewPostMessageHandler, ?WebviewPostMessageHandler, [*:0]const u8, [*:0]const u8, [*:0]const u8, bool, bool, bool, bool) callconv(.C) u32;
595
- const CreateWGPUViewFn = *const fn (u32, f64, f64, f64, f64, bool, bool, bool) callconv(.C) u32;
596
- const SetWindowTitleFn = *const fn (u32, [*:0]const u8) callconv(.C) void;
597
- const MinimizeWindowFn = *const fn (u32) callconv(.C) void;
598
- const RestoreWindowFn = *const fn (u32) callconv(.C) void;
599
- const IsWindowMinimizedFn = *const fn (u32) callconv(.C) bool;
600
- const MaximizeWindowFn = *const fn (u32) callconv(.C) void;
601
- const UnmaximizeWindowFn = *const fn (u32) callconv(.C) void;
602
- const IsWindowMaximizedFn = *const fn (u32) callconv(.C) bool;
603
- const SetWindowFullScreenFn = *const fn (u32, bool) callconv(.C) void;
604
- const IsWindowFullScreenFn = *const fn (u32) callconv(.C) bool;
605
- const SetWindowAlwaysOnTopFn = *const fn (u32, bool) callconv(.C) void;
606
- const IsWindowAlwaysOnTopFn = *const fn (u32) callconv(.C) bool;
607
- const SetWindowVisibleOnAllWorkspacesFn = *const fn (u32, bool) callconv(.C) void;
608
- const IsWindowVisibleOnAllWorkspacesFn = *const fn (u32) callconv(.C) bool;
609
- const ShowWindowFn = *const fn (u32, bool) callconv(.C) void;
610
- const ActivateWindowFn = *const fn (u32) callconv(.C) void;
611
- const HideWindowFn = *const fn (u32) callconv(.C) void;
612
- const IsWindowVisibleFn = *const fn (u32) callconv(.C) bool;
613
- const SetWindowButtonPositionFn = *const fn (u32, f64, f64) callconv(.C) void;
614
- const GetWindowButtonPositionFn = *const fn (u32, *f64, *f64) callconv(.C) void;
615
- const CenterWindowFn = *const fn (u32) callconv(.C) void;
616
- const SetWindowPositionFn = *const fn (u32, f64, f64) callconv(.C) void;
617
- const SetWindowSizeFn = *const fn (u32, f64, f64) callconv(.C) void;
618
- const SetWindowFrameFn = *const fn (u32, f64, f64, f64, f64) callconv(.C) void;
619
- const GetWindowFrameFn = *const fn (u32, *f64, *f64, *f64, *f64) callconv(.C) void;
620
- const CloseWindowFn = *const fn (u32) callconv(.C) void;
621
- const RequestWindowCloseFn = *const fn (u32) callconv(.C) void;
622
- const ResizeWebviewFn = *const fn (u32, f64, f64, f64, f64, [*:0]const u8) callconv(.C) void;
623
- const LoadURLInWebViewFn = *const fn (u32, [*:0]const u8) callconv(.C) void;
624
- const LoadHTMLInWebViewFn = *const fn (u32, [*:0]const u8) callconv(.C) void;
625
- const UpdatePreloadScriptToWebViewFn = *const fn (u32, [*:0]const u8, [*:0]const u8, bool) callconv(.C) void;
626
- const WebviewCanGoBackFn = *const fn (u32) callconv(.C) bool;
627
- const WebviewCanGoForwardFn = *const fn (u32) callconv(.C) bool;
628
- const WebviewGoBackFn = *const fn (u32) callconv(.C) void;
629
- const WebviewGoForwardFn = *const fn (u32) callconv(.C) void;
630
- const WebviewReloadFn = *const fn (u32) callconv(.C) void;
631
- const WebviewRemoveFn = *const fn (u32) callconv(.C) void;
632
- const SetWebviewHTMLContentFn = *const fn (u32, [*:0]const u8) callconv(.C) void;
633
- const WebviewSetTransparentFn = *const fn (u32, bool) callconv(.C) void;
634
- const WebviewSetPassthroughFn = *const fn (u32, bool) callconv(.C) void;
635
- const WebviewSetHiddenFn = *const fn (u32, bool) callconv(.C) void;
636
- const WebviewSetSpellCheckFn = *const fn (u32, bool) callconv(.C) bool;
637
- const SetWebviewNavigationRulesFn = *const fn (u32, [*:0]const u8) callconv(.C) void;
638
- const WebviewFindInPageFn = *const fn (u32, [*:0]const u8, bool, bool) callconv(.C) void;
639
- const WebviewStopFindFn = *const fn (u32) callconv(.C) void;
640
- const SendInternalMessageToWebviewFn = *const fn (u32, [*:0]const u8) callconv(.C) bool;
641
- const SendHostMessageToWebviewViaTransportFn = *const fn (u32, [*:0]const u8) callconv(.C) bool;
642
- const PopNextQueuedHostMessageFn = *const fn (*u32) callconv(.C) ?[*:0]u8;
643
- const FreeCoreStringFn = *const fn (?[*:0]u8) callconv(.C) void;
644
- const WebviewOpenDevToolsFn = *const fn (u32) callconv(.C) void;
645
- const WebviewCloseDevToolsFn = *const fn (u32) callconv(.C) void;
646
- const WebviewToggleDevToolsFn = *const fn (u32) callconv(.C) void;
647
- const WebviewSetPageZoomFn = *const fn (u32, f64) callconv(.C) void;
648
- const WebviewGetPageZoomFn = *const fn (u32) callconv(.C) f64;
649
- const SetWGPUViewFrameFn = *const fn (u32, f64, f64, f64, f64) callconv(.C) void;
650
- const ResizeWGPUViewFn = *const fn (u32, f64, f64, f64, f64, [*:0]const u8) callconv(.C) void;
651
- const SetWGPUViewTransparentFn = *const fn (u32, bool) callconv(.C) void;
652
- const SetWGPUViewPassthroughFn = *const fn (u32, bool) callconv(.C) void;
653
- const SetWGPUViewHiddenFn = *const fn (u32, bool) callconv(.C) void;
654
- const RemoveWGPUViewFn = *const fn (u32) callconv(.C) void;
655
- const GetWGPUViewPointerFn = *const fn (u32) callconv(.C) ?*anyopaque;
656
- const GetWGPUViewNativeHandleFn = *const fn (u32) callconv(.C) ?*anyopaque;
657
- const RunWGPUViewTestFn = *const fn (u32) callconv(.C) void;
658
- const ToggleWGPUViewTestShaderFn = *const fn (u32) callconv(.C) void;
659
- const EvaluateJavaScriptWithNoCompletionFn = *const fn (u32, [*:0]const u8) callconv(.C) void;
660
- const CreateTrayFn = *const fn ([*:0]const u8, [*:0]const u8, bool, u32, u32, ?*const fn (u32, [*:0]const u8) callconv(.C) void) callconv(.C) u32;
661
- const ShowTrayFn = *const fn (u32) callconv(.C) bool;
662
- const HideTrayFn = *const fn (u32) callconv(.C) void;
663
- const SetTrayTitleFn = *const fn (u32, [*:0]const u8) callconv(.C) void;
664
- const RemoveTrayFn = *const fn (u32) callconv(.C) void;
665
- const GetTrayBoundsFn = *const fn (u32) callconv(.C) [*:0]const u8;
666
- const SetDockIconVisibleFn = *const fn (bool) callconv(.C) void;
667
- const IsDockIconVisibleFn = *const fn () callconv(.C) bool;
668
- const GetPrimaryDisplayFn = *const fn () callconv(.C) ?[*:0]const u8;
669
- const GetAllDisplaysFn = *const fn () callconv(.C) ?[*:0]const u8;
670
- const GetCursorScreenPointFn = *const fn () callconv(.C) ?[*:0]const u8;
671
- const MoveToTrashFn = *const fn ([*:0]const u8) callconv(.C) bool;
672
- const ShowItemInFolderFn = *const fn ([*:0]const u8) callconv(.C) void;
673
- const OpenExternalFn = *const fn ([*:0]const u8) callconv(.C) bool;
674
- const OpenPathFn = *const fn ([*:0]const u8) callconv(.C) bool;
675
- const ShowNotificationFn = *const fn ([*:0]const u8, [*:0]const u8, [*:0]const u8, bool) callconv(.C) void;
676
- const ClipboardReadTextFn = *const fn () callconv(.C) ?[*:0]const u8;
677
- const ClipboardWriteTextFn = *const fn ([*:0]const u8) callconv(.C) void;
678
- const ClipboardClearFn = *const fn () callconv(.C) void;
679
- const ClipboardAvailableFormatsFn = *const fn () callconv(.C) ?[*:0]const u8;
680
- const SetApplicationMenuFn = *const fn ([*:0]const u8, ?StatusItemHandler) callconv(.C) void;
681
- const ShowContextMenuFn = *const fn ([*:0]const u8, ?StatusItemHandler) callconv(.C) void;
682
- const OpenFileDialogFn = *const fn ([*:0]const u8, [*:0]const u8, c_int, c_int, c_int) callconv(.C) ?[*:0]const u8;
683
- const ShowMessageBoxFn = *const fn ([*:0]const u8, [*:0]const u8, [*:0]const u8, [*:0]const u8, [*:0]const u8, c_int, c_int) callconv(.C) c_int;
684
- const SetGlobalShortcutCallbackFn = *const fn (?GlobalShortcutHandler) callconv(.C) void;
685
- const RegisterGlobalShortcutFn = *const fn ([*:0]const u8) callconv(.C) bool;
686
- const UnregisterGlobalShortcutFn = *const fn ([*:0]const u8) callconv(.C) bool;
687
- const UnregisterAllGlobalShortcutsFn = *const fn () callconv(.C) void;
688
- const IsGlobalShortcutRegisteredFn = *const fn ([*:0]const u8) callconv(.C) bool;
689
- const SessionGetCookiesFn = *const fn ([*:0]const u8, [*:0]const u8) callconv(.C) ?[*:0]const u8;
690
- const SessionSetCookieFn = *const fn ([*:0]const u8, [*:0]const u8) callconv(.C) bool;
691
- const SessionRemoveCookieFn = *const fn ([*:0]const u8, [*:0]const u8, [*:0]const u8) callconv(.C) bool;
692
- const SessionClearCookiesFn = *const fn ([*:0]const u8) callconv(.C) void;
693
- const SessionClearStorageDataFn = *const fn ([*:0]const u8, [*:0]const u8) callconv(.C) void;
694
- const SetURLOpenHandlerFn = *const fn (?URLOpenHandler) callconv(.C) void;
695
- const SetAppReopenHandlerFn = *const fn (?AppReopenHandler) callconv(.C) void;
696
- const SetQuitRequestedHandlerFn = *const fn (?QuitRequestedHandler) callconv(.C) void;
697
- const StopEventLoopFn = *const fn () callconv(.C) void;
698
- const WaitForShutdownCompleteFn = *const fn (c_int) callconv(.C) void;
699
- const ForceExitFn = *const fn (c_int) callconv(.C) void;
700
- const WgpuCreateSurfaceForViewFn = *const fn (?*anyopaque, ?*anyopaque) callconv(.C) ?*anyopaque;
701
- const WgpuCreateAdapterDeviceMainThreadFn = *const fn (?*anyopaque, ?*anyopaque, ?*anyopaque) callconv(.C) void;
702
- const WgpuSurfaceConfigureMainThreadFn = *const fn (?*anyopaque, ?*anyopaque) callconv(.C) void;
703
- const WgpuSurfaceGetCurrentTextureMainThreadFn = *const fn (?*anyopaque, ?*anyopaque) callconv(.C) void;
704
- const WgpuSurfacePresentMainThreadFn = *const fn (?*anyopaque) callconv(.C) i32;
633
+ const LastErrorFn = *const fn () callconv(.c) [*:0]const u8;
634
+ const RunMainThreadFn = *const fn ([*:0]const u8, [*:0]const u8, [*:0]const u8, c_int) callconv(.c) c_int;
635
+ const ConfigureWebviewRuntimeFn = *const fn (u32, [*:0]const u8, [*:0]const u8) callconv(.c) bool;
636
+ const GetWindowStyleFn = *const fn (bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool) callconv(.c) u32;
637
+ const CreateWindowFn = *const fn (f64, f64, f64, f64, u32, [*:0]const u8, bool, [*:0]const u8, bool, bool, bool, f64, f64, ?WindowCloseHandler, ?WindowMoveHandler, ?WindowResizeHandler, ?WindowFocusHandler, ?WindowBlurHandler, ?WindowKeyHandler, ?WindowShouldCloseHandler) callconv(.c) u32;
638
+ const CreateWebviewFn = *const fn (u32, u32, [*:0]const u8, [*:0]const u8, f64, f64, f64, f64, bool, [*:0]const u8, ?DecideNavigationHandler, ?WebviewEventHandler, ?WebviewPostMessageHandler, ?WebviewPostMessageHandler, ?WebviewPostMessageHandler, [*:0]const u8, [*:0]const u8, [*:0]const u8, bool, bool, bool, bool) callconv(.c) u32;
639
+ const CreateWGPUViewFn = *const fn (u32, f64, f64, f64, f64, bool, bool, bool) callconv(.c) u32;
640
+ const SetWindowTitleFn = *const fn (u32, [*:0]const u8) callconv(.c) void;
641
+ const MinimizeWindowFn = *const fn (u32) callconv(.c) void;
642
+ const RestoreWindowFn = *const fn (u32) callconv(.c) void;
643
+ const IsWindowMinimizedFn = *const fn (u32) callconv(.c) bool;
644
+ const MaximizeWindowFn = *const fn (u32) callconv(.c) void;
645
+ const UnmaximizeWindowFn = *const fn (u32) callconv(.c) void;
646
+ const IsWindowMaximizedFn = *const fn (u32) callconv(.c) bool;
647
+ const SetWindowFullScreenFn = *const fn (u32, bool) callconv(.c) void;
648
+ const IsWindowFullScreenFn = *const fn (u32) callconv(.c) bool;
649
+ const SetWindowAlwaysOnTopFn = *const fn (u32, bool) callconv(.c) void;
650
+ const IsWindowAlwaysOnTopFn = *const fn (u32) callconv(.c) bool;
651
+ const SetWindowVisibleOnAllWorkspacesFn = *const fn (u32, bool) callconv(.c) void;
652
+ const IsWindowVisibleOnAllWorkspacesFn = *const fn (u32) callconv(.c) bool;
653
+ const ShowWindowFn = *const fn (u32, bool) callconv(.c) void;
654
+ const ActivateWindowFn = *const fn (u32) callconv(.c) void;
655
+ const HideWindowFn = *const fn (u32) callconv(.c) void;
656
+ const IsWindowVisibleFn = *const fn (u32) callconv(.c) bool;
657
+ const SetWindowButtonPositionFn = *const fn (u32, f64, f64) callconv(.c) void;
658
+ const GetWindowButtonPositionFn = *const fn (u32, *f64, *f64) callconv(.c) void;
659
+ const CenterWindowFn = *const fn (u32) callconv(.c) void;
660
+ const SetWindowPositionFn = *const fn (u32, f64, f64) callconv(.c) void;
661
+ const SetWindowSizeFn = *const fn (u32, f64, f64) callconv(.c) void;
662
+ const SetWindowFrameFn = *const fn (u32, f64, f64, f64, f64) callconv(.c) void;
663
+ const GetWindowFrameFn = *const fn (u32, *f64, *f64, *f64, *f64) callconv(.c) void;
664
+ const CloseWindowFn = *const fn (u32) callconv(.c) void;
665
+ const RequestWindowCloseFn = *const fn (u32) callconv(.c) void;
666
+ const ResizeWebviewFn = *const fn (u32, f64, f64, f64, f64, [*:0]const u8) callconv(.c) void;
667
+ const LoadURLInWebViewFn = *const fn (u32, [*:0]const u8) callconv(.c) void;
668
+ const LoadHTMLInWebViewFn = *const fn (u32, [*:0]const u8) callconv(.c) void;
669
+ const UpdatePreloadScriptToWebViewFn = *const fn (u32, [*:0]const u8, [*:0]const u8, bool) callconv(.c) void;
670
+ const WebviewCanGoBackFn = *const fn (u32) callconv(.c) bool;
671
+ const WebviewCanGoForwardFn = *const fn (u32) callconv(.c) bool;
672
+ const WebviewGoBackFn = *const fn (u32) callconv(.c) void;
673
+ const WebviewGoForwardFn = *const fn (u32) callconv(.c) void;
674
+ const WebviewReloadFn = *const fn (u32) callconv(.c) void;
675
+ const WebviewRemoveFn = *const fn (u32) callconv(.c) void;
676
+ const SetWebviewHTMLContentFn = *const fn (u32, [*:0]const u8) callconv(.c) void;
677
+ const WebviewSetTransparentFn = *const fn (u32, bool) callconv(.c) void;
678
+ const WebviewSetPassthroughFn = *const fn (u32, bool) callconv(.c) void;
679
+ const WebviewSetHiddenFn = *const fn (u32, bool) callconv(.c) void;
680
+ const WebviewSetSpellCheckFn = *const fn (u32, bool) callconv(.c) bool;
681
+ const SetWebviewNavigationRulesFn = *const fn (u32, [*:0]const u8) callconv(.c) void;
682
+ const WebviewFindInPageFn = *const fn (u32, [*:0]const u8, bool, bool) callconv(.c) void;
683
+ const WebviewStopFindFn = *const fn (u32) callconv(.c) void;
684
+ const SendInternalMessageToWebviewFn = *const fn (u32, [*:0]const u8) callconv(.c) bool;
685
+ const SendHostMessageToWebviewViaTransportFn = *const fn (u32, [*:0]const u8) callconv(.c) bool;
686
+ const PopNextQueuedHostMessageFn = *const fn (*u32) callconv(.c) ?[*:0]u8;
687
+ const FreeCoreStringFn = *const fn (?[*:0]u8) callconv(.c) void;
688
+ const WebviewOpenDevToolsFn = *const fn (u32) callconv(.c) void;
689
+ const WebviewCloseDevToolsFn = *const fn (u32) callconv(.c) void;
690
+ const WebviewToggleDevToolsFn = *const fn (u32) callconv(.c) void;
691
+ const WebviewSetPageZoomFn = *const fn (u32, f64) callconv(.c) void;
692
+ const WebviewGetPageZoomFn = *const fn (u32) callconv(.c) f64;
693
+ const SetWGPUViewFrameFn = *const fn (u32, f64, f64, f64, f64) callconv(.c) void;
694
+ const ResizeWGPUViewFn = *const fn (u32, f64, f64, f64, f64, [*:0]const u8) callconv(.c) void;
695
+ const SetWGPUViewTransparentFn = *const fn (u32, bool) callconv(.c) void;
696
+ const SetWGPUViewPassthroughFn = *const fn (u32, bool) callconv(.c) void;
697
+ const SetWGPUViewHiddenFn = *const fn (u32, bool) callconv(.c) void;
698
+ const RemoveWGPUViewFn = *const fn (u32) callconv(.c) void;
699
+ const GetWGPUViewPointerFn = *const fn (u32) callconv(.c) ?*anyopaque;
700
+ const GetWGPUViewNativeHandleFn = *const fn (u32) callconv(.c) ?*anyopaque;
701
+ const RunWGPUViewTestFn = *const fn (u32) callconv(.c) void;
702
+ const ToggleWGPUViewTestShaderFn = *const fn (u32) callconv(.c) void;
703
+ const EvaluateJavaScriptWithNoCompletionFn = *const fn (u32, [*:0]const u8) callconv(.c) void;
704
+ const CreateTrayFn = *const fn ([*:0]const u8, [*:0]const u8, bool, u32, u32, ?*const fn (u32, [*:0]const u8) callconv(.c) void) callconv(.c) u32;
705
+ const ShowTrayFn = *const fn (u32) callconv(.c) bool;
706
+ const HideTrayFn = *const fn (u32) callconv(.c) void;
707
+ const SetTrayTitleFn = *const fn (u32, [*:0]const u8) callconv(.c) void;
708
+ const RemoveTrayFn = *const fn (u32) callconv(.c) void;
709
+ const GetTrayBoundsFn = *const fn (u32) callconv(.c) [*:0]const u8;
710
+ const SetDockIconVisibleFn = *const fn (bool) callconv(.c) void;
711
+ const IsDockIconVisibleFn = *const fn () callconv(.c) bool;
712
+ const GetPrimaryDisplayFn = *const fn () callconv(.c) ?[*:0]const u8;
713
+ const GetAllDisplaysFn = *const fn () callconv(.c) ?[*:0]const u8;
714
+ const GetCursorScreenPointFn = *const fn () callconv(.c) ?[*:0]const u8;
715
+ const MoveToTrashFn = *const fn ([*:0]const u8) callconv(.c) bool;
716
+ const ShowItemInFolderFn = *const fn ([*:0]const u8) callconv(.c) void;
717
+ const OpenExternalFn = *const fn ([*:0]const u8) callconv(.c) bool;
718
+ const OpenPathFn = *const fn ([*:0]const u8) callconv(.c) bool;
719
+ const ShowNotificationFn = *const fn ([*:0]const u8, [*:0]const u8, [*:0]const u8, bool) callconv(.c) void;
720
+ const ClipboardReadTextFn = *const fn () callconv(.c) ?[*:0]const u8;
721
+ const ClipboardWriteTextFn = *const fn ([*:0]const u8) callconv(.c) void;
722
+ const ClipboardClearFn = *const fn () callconv(.c) void;
723
+ const ClipboardAvailableFormatsFn = *const fn () callconv(.c) ?[*:0]const u8;
724
+ const SetApplicationMenuFn = *const fn ([*:0]const u8, ?StatusItemHandler) callconv(.c) void;
725
+ const ShowContextMenuFn = *const fn ([*:0]const u8, ?StatusItemHandler) callconv(.c) void;
726
+ const OpenFileDialogFn = *const fn ([*:0]const u8, [*:0]const u8, c_int, c_int, c_int) callconv(.c) ?[*:0]const u8;
727
+ const ShowMessageBoxFn = *const fn ([*:0]const u8, [*:0]const u8, [*:0]const u8, [*:0]const u8, [*:0]const u8, c_int, c_int) callconv(.c) c_int;
728
+ const SetGlobalShortcutCallbackFn = *const fn (?GlobalShortcutHandler) callconv(.c) void;
729
+ const RegisterGlobalShortcutFn = *const fn ([*:0]const u8) callconv(.c) bool;
730
+ const UnregisterGlobalShortcutFn = *const fn ([*:0]const u8) callconv(.c) bool;
731
+ const UnregisterAllGlobalShortcutsFn = *const fn () callconv(.c) void;
732
+ const IsGlobalShortcutRegisteredFn = *const fn ([*:0]const u8) callconv(.c) bool;
733
+ const SessionGetCookiesFn = *const fn ([*:0]const u8, [*:0]const u8) callconv(.c) ?[*:0]const u8;
734
+ const SessionSetCookieFn = *const fn ([*:0]const u8, [*:0]const u8) callconv(.c) bool;
735
+ const SessionRemoveCookieFn = *const fn ([*:0]const u8, [*:0]const u8, [*:0]const u8) callconv(.c) bool;
736
+ const SessionClearCookiesFn = *const fn ([*:0]const u8) callconv(.c) void;
737
+ const SessionClearStorageDataFn = *const fn ([*:0]const u8, [*:0]const u8) callconv(.c) void;
738
+ const SetURLOpenHandlerFn = *const fn (?URLOpenHandler) callconv(.c) void;
739
+ const SetAppReopenHandlerFn = *const fn (?AppReopenHandler) callconv(.c) void;
740
+ const SetQuitRequestedHandlerFn = *const fn (?QuitRequestedHandler) callconv(.c) void;
741
+ const StopEventLoopFn = *const fn () callconv(.c) void;
742
+ const WaitForShutdownCompleteFn = *const fn (c_int) callconv(.c) void;
743
+ const ForceExitFn = *const fn (c_int) callconv(.c) void;
744
+ const WgpuCreateSurfaceForViewFn = *const fn (?*anyopaque, ?*anyopaque) callconv(.c) ?*anyopaque;
745
+ const WgpuCreateAdapterDeviceMainThreadFn = *const fn (?*anyopaque, ?*anyopaque, ?*anyopaque) callconv(.c) void;
746
+ const WgpuSurfaceConfigureMainThreadFn = *const fn (?*anyopaque, ?*anyopaque) callconv(.c) void;
747
+ const WgpuSurfaceGetCurrentTextureMainThreadFn = *const fn (?*anyopaque, ?*anyopaque) callconv(.c) void;
748
+ const WgpuSurfacePresentMainThreadFn = *const fn (?*anyopaque) callconv(.c) i32;
705
749
 
706
750
  const Symbols = struct {
707
751
  last_error: LastErrorFn,
@@ -1488,7 +1532,7 @@ pub const Core = struct {
1488
1532
  }
1489
1533
 
1490
1534
  pub fn sendHostMessageToWebview(self: *Core, webview_id: u32, message: anytype) !void {
1491
- const message_json = try std.json.stringifyAlloc(self.allocator, message, .{});
1535
+ const message_json = try std.json.Stringify.valueAlloc(self.allocator, message, .{});
1492
1536
  defer self.allocator.free(message_json);
1493
1537
  const message_json_z = try self.dupeZ(message_json);
1494
1538
  defer self.allocator.free(message_json_z);
@@ -1520,7 +1564,7 @@ pub const Core = struct {
1520
1564
  }
1521
1565
 
1522
1566
  pub fn sendInternalMessageToWebview(self: *Core, webview_id: u32, message: anytype) !void {
1523
- const message_json = try std.json.stringifyAlloc(self.allocator, message, .{});
1567
+ const message_json = try std.json.Stringify.valueAlloc(self.allocator, message, .{});
1524
1568
  defer self.allocator.free(message_json);
1525
1569
  const message_json_z = try self.dupeZ(message_json);
1526
1570
  defer self.allocator.free(message_json_z);
@@ -1902,9 +1946,9 @@ pub fn quit(code: u8) noreturn {
1902
1946
 
1903
1947
  fn getHomeDirOwned(allocator: std.mem.Allocator) ![]u8 {
1904
1948
  return switch (builtin.os.tag) {
1905
- .windows => std.process.getEnvVarOwned(allocator, "USERPROFILE") catch
1906
- std.process.getEnvVarOwned(allocator, "HOME"),
1907
- else => std.process.getEnvVarOwned(allocator, "HOME"),
1949
+ .windows => getEnvVarOwned(allocator, "USERPROFILE") catch
1950
+ getEnvVarOwned(allocator, "HOME"),
1951
+ else => getEnvVarOwned(allocator, "HOME"),
1908
1952
  };
1909
1953
  }
1910
1954
 
@@ -1943,11 +1987,11 @@ fn getConfigDirOwned(allocator: std.mem.Allocator, home: []const u8) ![]u8 {
1943
1987
  fn getTempDirOwned(allocator: std.mem.Allocator, home: []const u8) ![]u8 {
1944
1988
  return switch (builtin.os.tag) {
1945
1989
  .windows => blk: {
1946
- break :blk std.process.getEnvVarOwned(allocator, "TEMP") catch
1947
- std.process.getEnvVarOwned(allocator, "TMP") catch
1990
+ break :blk getEnvVarOwned(allocator, "TEMP") catch
1991
+ getEnvVarOwned(allocator, "TMP") catch
1948
1992
  std.fs.path.join(allocator, &.{ home, "AppData", "Local", "Temp" });
1949
1993
  },
1950
- else => std.process.getEnvVarOwned(allocator, "TMPDIR") catch allocator.dupe(u8, "/tmp"),
1994
+ else => getEnvVarOwned(allocator, "TMPDIR") catch allocator.dupe(u8, "/tmp"),
1951
1995
  };
1952
1996
  }
1953
1997
 
@@ -1967,8 +2011,8 @@ fn getUserDirOwned(
1967
2011
  }
1968
2012
 
1969
2013
  fn envOrJoin(allocator: std.mem.Allocator, env_name: []const u8, fallback_parts: []const []const u8) ![]u8 {
1970
- return std.process.getEnvVarOwned(allocator, env_name) catch |err| switch (err) {
1971
- error.EnvironmentVariableNotFound => std.fs.path.join(allocator, fallback_parts),
2014
+ return getEnvVarOwned(allocator, env_name) catch |err| switch (err) {
2015
+ error.EnvironmentVariableMissing => std.fs.path.join(allocator, fallback_parts),
1972
2016
  else => err,
1973
2017
  };
1974
2018
  }
@@ -1985,10 +2029,7 @@ fn linuxXdgUserDirOwned(
1985
2029
  const fallback = try std.fs.path.join(allocator, &.{ home, fallback_name });
1986
2030
  errdefer allocator.free(fallback);
1987
2031
 
1988
- const file = std.fs.openFileAbsolute(config_path, .{}) catch return fallback;
1989
- defer file.close();
1990
-
1991
- const content = file.readToEndAlloc(allocator, 64 * 1024) catch return fallback;
2032
+ const content = std.Io.Dir.cwd().readFileAlloc(defaultIo(), config_path, allocator, .limited(64 * 1024)) catch return fallback;
1992
2033
  defer allocator.free(content);
1993
2034
 
1994
2035
  var lines = std.mem.splitScalar(u8, content, '\n');
@@ -2022,19 +2063,13 @@ fn buildAppScopedDir(allocator: std.mem.Allocator, base: []const u8, app_info: A
2022
2063
  }
2023
2064
 
2024
2065
  fn readFileZ(allocator: std.mem.Allocator, path: []const u8) ![:0]u8 {
2025
- const file = try std.fs.openFileAbsolute(path, .{});
2026
- defer file.close();
2027
-
2028
- const content = try file.readToEndAlloc(allocator, 1024 * 1024);
2066
+ const content = try readFileAlloc(allocator, path);
2029
2067
  defer allocator.free(content);
2030
2068
  return try allocator.dupeZ(u8, content);
2031
2069
  }
2032
2070
 
2033
2071
  fn readFileAlloc(allocator: std.mem.Allocator, path: []const u8) ![]u8 {
2034
- const file = try std.fs.openFileAbsolute(path, .{});
2035
- defer file.close();
2036
-
2037
- return try file.readToEndAlloc(allocator, 1024 * 1024);
2072
+ return try std.Io.Dir.cwd().readFileAlloc(defaultIo(), path, allocator, .limited(1024 * 1024));
2038
2073
  }
2039
2074
 
2040
2075
  fn parseRectJson(allocator: std.mem.Allocator, json: []const u8) !Rect {
@@ -2114,13 +2149,13 @@ fn errorFromLastError(message: []const u8) anyerror {
2114
2149
  return error.ElectrobunCoreFailure;
2115
2150
  }
2116
2151
 
2117
- pub fn allowAllNavigation(_: u32, _: [*:0]const u8) callconv(.C) u32 {
2152
+ pub fn allowAllNavigation(_: u32, _: [*:0]const u8) callconv(.c) u32 {
2118
2153
  return 1;
2119
2154
  }
2120
2155
 
2121
- pub fn noopWebviewEvent(_: u32, _: [*:0]const u8, _: [*:0]const u8) callconv(.C) void {}
2156
+ pub fn noopWebviewEvent(_: u32, _: [*:0]const u8, _: [*:0]const u8) callconv(.c) void {}
2122
2157
 
2123
- pub fn noopWebviewPostMessage(_: u32, _: [*:0]const u8) callconv(.C) void {}
2158
+ pub fn noopWebviewPostMessage(_: u32, _: [*:0]const u8) callconv(.c) void {}
2124
2159
 
2125
2160
  test "dialog path JSON preserves commas and escaped characters" {
2126
2161
  const allocator = std.testing.allocator;
@@ -1,4 +1,4 @@
1
- // @dash cli=0.5.0-canary.9 cottontail=0.2.3
1
+ // @hutch cli=0.5.0 cottontail=0.3.0
2
2
  export default {
3
3
  scripts: {
4
4
  start: "hutch src/sdks/main/index.ts",
@@ -18,7 +18,7 @@ export default {
18
18
  "npm:publish:beta": "hutch build:release && npm publish --tag beta",
19
19
  typecheck:
20
20
  "node node_modules/typescript/bin/tsc --noEmit && cd ../kitchen && node node_modules/typescript/bin/tsc --noEmit",
21
- "check:release": "hutch typecheck && hutch test:templates && hutch test:template-publisher && hutch test:signing && hutch test:deployment-target && hutch test:linux-abi && hutch test:linux-extractor && hutch test:npm-bootstrap && hutch test:release-notes",
21
+ "check:release": "hutch typecheck && hutch test:templates && hutch test:odin-templates && hutch test:template-publisher && hutch test:signing && hutch test:deployment-target && hutch test:linux-abi && hutch test:linux-extractor && hutch test:npm-bootstrap && hutch test:release-notes",
22
22
  "push:beta": "hutch check:release && node scripts/push-version.js beta",
23
23
  "push:patch": "hutch check:release && node scripts/push-version.js patch",
24
24
  "push:minor": "hutch check:release && node scripts/push-version.js minor",
@@ -41,6 +41,7 @@ export default {
41
41
  "test:webview2-permissions": "scripts/test-webview2-permissions.ts",
42
42
  "test:macos-inspector-layout": "scripts/test-macos-inspector-layout.sh",
43
43
  "test:templates": "node scripts/run-cottontail-test.js ../templates/template-manifests.test.ts",
44
+ "test:odin-templates": "node scripts/test-odin-templates.mjs",
44
45
  "test:template-publisher": "node --test ../scripts/publish-templates.test.mjs",
45
46
  "test:signing": "node scripts/run-cottontail-test.js scripts/verify-macho-code-signing.test.ts",
46
47
  "test:deployment-target": "node scripts/run-cottontail-test.js scripts/verify-macho-deployment-target.test.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "electrobun",
3
- "version": "1.18.4-beta.19",
3
+ "version": "1.18.4-beta.21",
4
4
  "description": "Build ultra fast, tiny, and cross-platform desktop apps with Typescript.",
5
5
  "license": "MIT",
6
6
  "author": "Blackboard Technologies Inc.",
@@ -26,6 +26,9 @@
26
26
  "./main/rpc": "./dist/api/sdks/main/entries/rpc.ts",
27
27
  "./main/socket": "./dist/api/sdks/main/entries/socket.ts",
28
28
  "./main/tray": "./dist/api/sdks/main/entries/tray.ts",
29
+ "./main/ui": "./dist/api/sdks/main/entries/ui.ts",
30
+ "./main/ui/jsx-runtime": "./dist/api/sdks/main/ui/jsx-runtime.ts",
31
+ "./main/ui/jsx-dev-runtime": "./dist/api/sdks/main/ui/jsx-dev-runtime.ts",
29
32
  "./main/updater": "./dist/api/sdks/main/entries/updater.ts",
30
33
  "./main/utils": "./dist/api/sdks/main/entries/utils.ts",
31
34
  "./main/webgpu": "./dist/api/sdks/main/entries/webgpu.ts",
@@ -43,12 +46,18 @@
43
46
  "./bun/rpc": "./dist/api/sdks/main/entries/rpc.ts",
44
47
  "./bun/socket": "./dist/api/sdks/main/entries/socket.ts",
45
48
  "./bun/tray": "./dist/api/sdks/main/entries/tray.ts",
49
+ "./bun/ui": "./dist/api/sdks/main/entries/ui.ts",
50
+ "./bun/ui/jsx-runtime": "./dist/api/sdks/main/ui/jsx-runtime.ts",
51
+ "./bun/ui/jsx-dev-runtime": "./dist/api/sdks/main/ui/jsx-dev-runtime.ts",
46
52
  "./bun/updater": "./dist/api/sdks/main/entries/updater.ts",
47
53
  "./bun/utils": "./dist/api/sdks/main/entries/utils.ts",
48
54
  "./bun/webgpu": "./dist/api/sdks/main/entries/webgpu.ts",
49
55
  "./bun/wgpu-view": "./dist/api/sdks/main/entries/wgpu-view.ts",
50
56
  "./rpc": "./dist/api/sdks/main/entries/rpc.ts",
51
- "./view": "./dist/api/browser/index.ts"
57
+ "./view": "./dist/api/browser/index.ts",
58
+ "./browser/ui": "./dist/api/browser/ui/index.ts",
59
+ "./browser/ui/jsx-runtime": "./dist/api/browser/ui/jsx-runtime.ts",
60
+ "./browser/ui/jsx-dev-runtime": "./dist/api/browser/ui/jsx-dev-runtime.ts"
52
61
  },
53
62
  "type": "module",
54
63
  "homepage": "https://electrobun.dev",