bun-app-window 0.1.0 → 0.2.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.
Files changed (91) hide show
  1. package/CHANGELOG.md +202 -0
  2. package/README.md +35 -3
  3. package/README.zh-CN.md +35 -3
  4. package/README.zh-TW.md +35 -3
  5. package/dist/libshell.dll +0 -0
  6. package/package.json +8 -10
  7. package/src/shell/native-asset.d.ts +18 -0
  8. package/src/shell/resolve.ts +1 -1
  9. package/native/build.ps1 +0 -67
  10. package/native/fetch.ps1 +0 -66
  11. package/native/shell.cc +0 -2134
  12. package/vendor/webview/compatibility/CMakeLists.txt +0 -3
  13. package/vendor/webview/compatibility/mingw/CMakeLists.txt +0 -14
  14. package/vendor/webview/compatibility/mingw/include/EventToken.h +0 -25
  15. package/vendor/webview/core/CMakeLists.txt +0 -94
  16. package/vendor/webview/core/include/webview/api.h +0 -251
  17. package/vendor/webview/core/include/webview/backends.hh +0 -40
  18. package/vendor/webview/core/include/webview/c_api_impl.hh +0 -258
  19. package/vendor/webview/core/include/webview/detail/backends/cocoa_webkit.hh +0 -626
  20. package/vendor/webview/core/include/webview/detail/backends/gtk_webkitgtk.hh +0 -355
  21. package/vendor/webview/core/include/webview/detail/backends/win32_edge.hh +0 -909
  22. package/vendor/webview/core/include/webview/detail/basic_result.hh +0 -119
  23. package/vendor/webview/core/include/webview/detail/engine_base.hh +0 -382
  24. package/vendor/webview/core/include/webview/detail/exceptions.hh +0 -42
  25. package/vendor/webview/core/include/webview/detail/json.hh +0 -337
  26. package/vendor/webview/core/include/webview/detail/native_library.hh +0 -170
  27. package/vendor/webview/core/include/webview/detail/optional.hh +0 -118
  28. package/vendor/webview/core/include/webview/detail/platform/darwin/cocoa/NSApplication.hh +0 -107
  29. package/vendor/webview/core/include/webview/detail/platform/darwin/cocoa/NSBundle.hh +0 -56
  30. package/vendor/webview/core/include/webview/detail/platform/darwin/cocoa/NSEvent.hh +0 -71
  31. package/vendor/webview/core/include/webview/detail/platform/darwin/cocoa/NSInvocation.hh +0 -66
  32. package/vendor/webview/core/include/webview/detail/platform/darwin/cocoa/NSMethodSignature.hh +0 -52
  33. package/vendor/webview/core/include/webview/detail/platform/darwin/cocoa/NSNotification.hh +0 -51
  34. package/vendor/webview/core/include/webview/detail/platform/darwin/cocoa/NSNumber.hh +0 -53
  35. package/vendor/webview/core/include/webview/detail/platform/darwin/cocoa/NSObject.hh +0 -51
  36. package/vendor/webview/core/include/webview/detail/platform/darwin/cocoa/NSOpenPanel.hh +0 -71
  37. package/vendor/webview/core/include/webview/detail/platform/darwin/cocoa/NSPoint.hh +0 -53
  38. package/vendor/webview/core/include/webview/detail/platform/darwin/cocoa/NSRect.hh +0 -53
  39. package/vendor/webview/core/include/webview/detail/platform/darwin/cocoa/NSSavePanel.hh +0 -52
  40. package/vendor/webview/core/include/webview/detail/platform/darwin/cocoa/NSSize.hh +0 -53
  41. package/vendor/webview/core/include/webview/detail/platform/darwin/cocoa/NSString.hh +0 -87
  42. package/vendor/webview/core/include/webview/detail/platform/darwin/cocoa/NSURL.hh +0 -63
  43. package/vendor/webview/core/include/webview/detail/platform/darwin/cocoa/NSURLRequest.hh +0 -52
  44. package/vendor/webview/core/include/webview/detail/platform/darwin/cocoa/NSValue.hh +0 -56
  45. package/vendor/webview/core/include/webview/detail/platform/darwin/cocoa/NSView.hh +0 -91
  46. package/vendor/webview/core/include/webview/detail/platform/darwin/cocoa/NSWindow.hh +0 -137
  47. package/vendor/webview/core/include/webview/detail/platform/darwin/cocoa/cocoa.hh +0 -59
  48. package/vendor/webview/core/include/webview/detail/platform/darwin/cocoa/types.hh +0 -49
  49. package/vendor/webview/core/include/webview/detail/platform/darwin/objc/Class.hh +0 -55
  50. package/vendor/webview/core/include/webview/detail/platform/darwin/objc/autoreleasepool.hh +0 -70
  51. package/vendor/webview/core/include/webview/detail/platform/darwin/objc/invoke.hh +0 -75
  52. package/vendor/webview/core/include/webview/detail/platform/darwin/objc/memory.hh +0 -57
  53. package/vendor/webview/core/include/webview/detail/platform/darwin/objc/objc.hh +0 -47
  54. package/vendor/webview/core/include/webview/detail/platform/darwin/webkit/WKOpenPanelParameters.hh +0 -57
  55. package/vendor/webview/core/include/webview/detail/platform/darwin/webkit/WKScriptMessage.hh +0 -51
  56. package/vendor/webview/core/include/webview/detail/platform/darwin/webkit/WKUserContentController.hh +0 -61
  57. package/vendor/webview/core/include/webview/detail/platform/darwin/webkit/WKUserScript.hh +0 -71
  58. package/vendor/webview/core/include/webview/detail/platform/darwin/webkit/WKWebView.hh +0 -108
  59. package/vendor/webview/core/include/webview/detail/platform/darwin/webkit/WKWebViewConfiguration.hh +0 -60
  60. package/vendor/webview/core/include/webview/detail/platform/darwin/webkit/webkit.hh +0 -46
  61. package/vendor/webview/core/include/webview/detail/platform/linux/gtk/compat.hh +0 -137
  62. package/vendor/webview/core/include/webview/detail/platform/linux/webkitgtk/compat.hh +0 -142
  63. package/vendor/webview/core/include/webview/detail/platform/linux/webkitgtk/dmabuf.hh +0 -167
  64. package/vendor/webview/core/include/webview/detail/platform/windows/com_init_wrapper.hh +0 -126
  65. package/vendor/webview/core/include/webview/detail/platform/windows/dpi.hh +0 -161
  66. package/vendor/webview/core/include/webview/detail/platform/windows/dwmapi.hh +0 -67
  67. package/vendor/webview/core/include/webview/detail/platform/windows/iid.hh +0 -78
  68. package/vendor/webview/core/include/webview/detail/platform/windows/ntdll.hh +0 -58
  69. package/vendor/webview/core/include/webview/detail/platform/windows/reg_key.hh +0 -135
  70. package/vendor/webview/core/include/webview/detail/platform/windows/shcore.hh +0 -59
  71. package/vendor/webview/core/include/webview/detail/platform/windows/theme.hh +0 -76
  72. package/vendor/webview/core/include/webview/detail/platform/windows/user32.hh +0 -90
  73. package/vendor/webview/core/include/webview/detail/platform/windows/version.hh +0 -151
  74. package/vendor/webview/core/include/webview/detail/platform/windows/webview2/loader.hh +0 -391
  75. package/vendor/webview/core/include/webview/detail/user_script.hh +0 -76
  76. package/vendor/webview/core/include/webview/detail/utility/string.hh +0 -99
  77. package/vendor/webview/core/include/webview/errors.h +0 -67
  78. package/vendor/webview/core/include/webview/errors.hh +0 -85
  79. package/vendor/webview/core/include/webview/json_deprecated.hh +0 -61
  80. package/vendor/webview/core/include/webview/macros.h +0 -123
  81. package/vendor/webview/core/include/webview/types.h +0 -81
  82. package/vendor/webview/core/include/webview/types.hh +0 -48
  83. package/vendor/webview/core/include/webview/version.h +0 -67
  84. package/vendor/webview/core/include/webview/webview.h +0 -32
  85. package/vendor/webview/core/include/webview.h +0 -15
  86. package/vendor/webview/core/src/webview.cc +0 -1
  87. package/vendor/webview/core/tests/CMakeLists.txt +0 -18
  88. package/vendor/webview/core/tests/src/functional_tests.cc +0 -316
  89. package/vendor/webview/core/tests/src/unit_tests.cc +0 -188
  90. package/vendor/webview2/build/native/include/WebView2.h +0 -23568
  91. package/vendor/webview2/build/native/include/WebView2EnvironmentOptions.h +0 -144
@@ -1,144 +0,0 @@
1
- // Copyright (C) Microsoft Corporation. All rights reserved.
2
- // Use of this source code is governed by a BSD-style license that can be
3
- // found in the LICENSE file.
4
-
5
- #ifndef __core_webview2_environment_options_h__
6
- #define __core_webview2_environment_options_h__
7
-
8
- #include <objbase.h>
9
- #include <wrl/implements.h>
10
-
11
- #include "webview2.h"
12
- #define CORE_WEBVIEW_TARGET_PRODUCT_VERSION L"99.0.1150.38"
13
-
14
- #define COREWEBVIEW2ENVIRONMENTOPTIONS_STRING_PROPERTY(p) \
15
- public: \
16
- HRESULT STDMETHODCALLTYPE get_##p(LPWSTR* value) override { \
17
- if (!value) \
18
- return E_POINTER; \
19
- *value = m_##p.Copy(); \
20
- if ((*value == nullptr) && (m_##p.Get() != nullptr)) \
21
- return HRESULT_FROM_WIN32(GetLastError()); \
22
- return S_OK; \
23
- } \
24
- HRESULT STDMETHODCALLTYPE put_##p(LPCWSTR value) override { \
25
- LPCWSTR result = m_##p.Set(value); \
26
- if ((result == nullptr) && (value != nullptr)) \
27
- return HRESULT_FROM_WIN32(GetLastError()); \
28
- return S_OK; \
29
- } \
30
- \
31
- protected: \
32
- AutoCoMemString m_##p;
33
-
34
- #define COREWEBVIEW2ENVIRONMENTOPTIONS_BOOL_PROPERTY(p) \
35
- public: \
36
- HRESULT STDMETHODCALLTYPE get_##p(BOOL* value) override { \
37
- if (!value) \
38
- return E_POINTER; \
39
- *value = m_##p; \
40
- return S_OK; \
41
- } \
42
- HRESULT STDMETHODCALLTYPE put_##p(BOOL value) override { \
43
- m_##p = value; \
44
- return S_OK; \
45
- } \
46
- \
47
- protected: \
48
- BOOL m_##p = FALSE;
49
-
50
- // This is a base COM class that implements ICoreWebView2EnvironmentOptions.
51
- template <typename allocate_fn_t,
52
- allocate_fn_t allocate_fn,
53
- typename deallocate_fn_t,
54
- deallocate_fn_t deallocate_fn>
55
- class CoreWebView2EnvironmentOptionsBase
56
- : public Microsoft::WRL::Implements<
57
- Microsoft::WRL::RuntimeClassFlags<Microsoft::WRL::ClassicCom>,
58
- ICoreWebView2EnvironmentOptions> {
59
- public:
60
- CoreWebView2EnvironmentOptionsBase() {
61
- // Initialize the target compatible browser version value to the version of
62
- // the browser binaries corresponding to this version of the SDK.
63
- m_TargetCompatibleBrowserVersion.Set(CORE_WEBVIEW_TARGET_PRODUCT_VERSION);
64
- }
65
-
66
- protected:
67
- ~CoreWebView2EnvironmentOptionsBase(){};
68
-
69
- class AutoCoMemString {
70
- public:
71
- AutoCoMemString() {}
72
- ~AutoCoMemString() { Release(); }
73
- void Release() {
74
- if (m_string) {
75
- deallocate_fn(m_string);
76
- m_string = nullptr;
77
- }
78
- }
79
-
80
- LPCWSTR Set(LPCWSTR str) {
81
- Release();
82
- if (str) {
83
- m_string = MakeCoMemString(str);
84
- }
85
- return m_string;
86
- }
87
- LPCWSTR Get() { return m_string; }
88
- LPWSTR Copy() {
89
- if (m_string)
90
- return MakeCoMemString(m_string);
91
- return nullptr;
92
- }
93
-
94
- protected:
95
- LPWSTR MakeCoMemString(LPCWSTR source) {
96
- const size_t length = wcslen(source);
97
- const size_t bytes = (length + 1) * sizeof(*source);
98
- // Ensure we didn't overflow during our size calculation.
99
- if (bytes <= length) {
100
- return nullptr;
101
- }
102
-
103
- wchar_t* result = reinterpret_cast<wchar_t*>(allocate_fn(bytes));
104
- if (result)
105
- memcpy(result, source, bytes);
106
-
107
- return result;
108
- }
109
-
110
- LPWSTR m_string = nullptr;
111
- };
112
-
113
- COREWEBVIEW2ENVIRONMENTOPTIONS_STRING_PROPERTY(AdditionalBrowserArguments)
114
- COREWEBVIEW2ENVIRONMENTOPTIONS_STRING_PROPERTY(Language)
115
- COREWEBVIEW2ENVIRONMENTOPTIONS_STRING_PROPERTY(TargetCompatibleBrowserVersion)
116
- COREWEBVIEW2ENVIRONMENTOPTIONS_BOOL_PROPERTY(
117
- AllowSingleSignOnUsingOSPrimaryAccount)
118
- };
119
-
120
- template <typename allocate_fn_t,
121
- allocate_fn_t allocate_fn,
122
- typename deallocate_fn_t,
123
- deallocate_fn_t deallocate_fn>
124
- class CoreWebView2EnvironmentOptionsBaseClass
125
- : public Microsoft::WRL::RuntimeClass<
126
- Microsoft::WRL::RuntimeClassFlags<Microsoft::WRL::ClassicCom>,
127
- CoreWebView2EnvironmentOptionsBase<allocate_fn_t,
128
- allocate_fn,
129
- deallocate_fn_t,
130
- deallocate_fn>> {
131
- public:
132
- CoreWebView2EnvironmentOptionsBaseClass() {}
133
-
134
- protected:
135
- ~CoreWebView2EnvironmentOptionsBaseClass() override{};
136
- };
137
-
138
- typedef CoreWebView2EnvironmentOptionsBaseClass<decltype(&::CoTaskMemAlloc),
139
- ::CoTaskMemAlloc,
140
- decltype(&::CoTaskMemFree),
141
- ::CoTaskMemFree>
142
- CoreWebView2EnvironmentOptions;
143
-
144
- #endif // __core_webview2_environment_options_h__