@native-sdk/cli 0.4.1 → 0.4.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.
- package/assets/native-sdk.manifest +17 -1
- package/build/app.zig +40 -1
- package/build.zig +49 -3
- package/package.json +10 -9
- package/src/platform/macos/appkit_host.m +21 -6
- package/src/platform/windows/webview2_host.cpp +377 -72
- package/src/primitives/canvas/chart.zig +8 -7
- package/src/primitives/canvas/chart_tests.zig +2 -2
- package/src/primitives/canvas/commands.zig +27 -0
- package/src/primitives/canvas/gpu.zig +8 -0
- package/src/primitives/canvas/markdown_tests.zig +1 -1
- package/src/primitives/canvas/reference.zig +82 -3
- package/src/primitives/canvas/reference_tests.zig +155 -1
- package/src/primitives/canvas/serialization.zig +16 -3
- package/src/primitives/canvas/themes/geist.zig +6 -0
- package/src/primitives/canvas/tokens.zig +7 -0
- package/src/primitives/canvas/widget_builtin_tests.zig +191 -0
- package/src/primitives/canvas/widget_render.zig +29 -41
- package/src/primitives/canvas/widget_render_controls.zig +55 -42
- package/src/primitives/canvas/widget_render_style.zig +53 -0
- package/src/primitives/canvas/widget_render_surfaces.zig +19 -18
- package/src/primitives/canvas/widget_runtime_tests.zig +20 -21
- package/src/runtime/canvas_frame_packet_tests.zig +9 -1
- package/src/runtime/canvas_frame_patch_tests.zig +39 -1
- package/src/runtime/canvas_widget_control_tests.zig +4 -4
- package/src/runtime/ui_app.zig +78 -10
- package/src/runtime/ui_app_tests.zig +109 -0
- package/src/runtime/ui_app_window_tests.zig +93 -0
- package/src/tooling/package.zig +45 -0
- package/src/tooling/templates.zig +42 -1
- package/third_party/webview2/LICENSE.txt +27 -0
- package/third_party/webview2/README.md +19 -0
- package/third_party/webview2/arm64/WebView2Loader.dll +0 -0
- package/third_party/webview2/include/EventToken.h +12 -0
- package/third_party/webview2/include/WebView2.h +60636 -0
- package/third_party/webview2/x64/WebView2Loader.dll +0 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
Copyright (C) Microsoft Corporation. All rights reserved.
|
|
2
|
+
|
|
3
|
+
Redistribution and use in source and binary forms, with or without
|
|
4
|
+
modification, are permitted provided that the following conditions are
|
|
5
|
+
met:
|
|
6
|
+
|
|
7
|
+
* Redistributions of source code must retain the above copyright
|
|
8
|
+
notice, this list of conditions and the following disclaimer.
|
|
9
|
+
* Redistributions in binary form must reproduce the above
|
|
10
|
+
copyright notice, this list of conditions and the following disclaimer
|
|
11
|
+
in the documentation and/or other materials provided with the
|
|
12
|
+
distribution.
|
|
13
|
+
* The name of Microsoft Corporation, or the names of its contributors
|
|
14
|
+
may not be used to endorse or promote products derived from this
|
|
15
|
+
software without specific prior written permission.
|
|
16
|
+
|
|
17
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
18
|
+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
19
|
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
20
|
+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
21
|
+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
22
|
+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
23
|
+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
24
|
+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
25
|
+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
26
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
27
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# WebView2 SDK Vendor Layout
|
|
2
|
+
|
|
3
|
+
The Windows system web engine embeds the OS WebView2 runtime. The interface header and the loader library that discovers the installed runtime come from the WebView2 SDK NuGet package and are vendored here so a repo checkout builds the real embedded-WebView Windows host with no extra fetch step.
|
|
4
|
+
|
|
5
|
+
Vendored from the `Microsoft.Web.WebView2` NuGet package, version `1.0.2903.40` (package sha256 `ef128016dd1e51c59178c827ed5b8aa3322c57afa8675d930f8109505542ad74`), under the package's BSD-style license (`LICENSE.txt`, kept verbatim alongside the files it covers):
|
|
6
|
+
|
|
7
|
+
```text
|
|
8
|
+
third_party/webview2/
|
|
9
|
+
LICENSE.txt package LICENSE.txt, verbatim
|
|
10
|
+
include/WebView2.h build/native/include/WebView2.h, verbatim
|
|
11
|
+
x64/WebView2Loader.dll build/native/x64/WebView2Loader.dll, verbatim
|
|
12
|
+
arm64/WebView2Loader.dll build/native/arm64/WebView2Loader.dll, verbatim
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
`include/EventToken.h` is a first-party compatibility shim (see its header comment), not a package file.
|
|
16
|
+
|
|
17
|
+
The build adds `include/` to the include path of the Windows host and stages the architecture's `WebView2Loader.dll` next to the app executable; the host loads it at runtime to locate the installed WebView2 runtime (preinstalled on stock Windows 11; on older machines the Evergreen runtime installer provides it). Apps that never load a WebView run fine without either piece.
|
|
18
|
+
|
|
19
|
+
To update: download a newer `Microsoft.Web.WebView2` package from NuGet, replace the files listed above verbatim, and record the new version and package sha256 here.
|
|
Binary file
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/* First-party compatibility shim, not part of the WebView2 SDK package:
|
|
2
|
+
* WebView2.h includes "EventToken.h" for this one struct, and the
|
|
3
|
+
* mingw-w64 headers zig ships do not carry that file. The layout is the
|
|
4
|
+
* OS ABI's event-registration cookie — a single 64-bit value. */
|
|
5
|
+
#ifndef __EVENTTOKEN_H__
|
|
6
|
+
#define __EVENTTOKEN_H__
|
|
7
|
+
|
|
8
|
+
typedef struct EventRegistrationToken {
|
|
9
|
+
__int64 value;
|
|
10
|
+
} EventRegistrationToken;
|
|
11
|
+
|
|
12
|
+
#endif
|