@snap/valdi 1.1.5 → 1.2.0
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/.metadata/.bazelrc.template +9 -3
- package/.metadata/MODULE.bazel.template +112 -3
- package/.metadata/bzl/patches/rules_python/1.9.0/BUILD.bazel.template +1 -0
- package/.metadata/bzl/patches/rules_python/1.9.0/remove_setuptools_spaces.patch.template +96 -0
- package/README.md +35 -1
- package/bundled-skills/registry.json +2 -1
- package/bundled-skills/skills/valdi-animations/skill.md +49 -0
- package/bundled-skills/skills/valdi-async/skill.md +3 -2
- package/bundled-skills/skills/valdi-bazel/skill.md +2 -6
- package/bundled-skills/skills/valdi-compiler/skill.md +4 -4
- package/bundled-skills/skills/valdi-cpp-runtime/skill.md +18 -0
- package/bundled-skills/skills/valdi-error-handling/skill.md +1 -1
- package/bundled-skills/skills/valdi-gestures/skill.md +3 -3
- package/bundled-skills/skills/valdi-migrate/skill.md +2 -1
- package/bundled-skills/skills/valdi-mock-breakdown/skill.md +4 -4
- package/bundled-skills/skills/valdi-mock-to-module/skill.md +9 -6
- package/bundled-skills/skills/valdi-overview/skill.md +2 -1
- package/bundled-skills/skills/valdi-perf/skill.md +121 -5
- package/bundled-skills/skills/valdi-pr-review/skill.md +189 -0
- package/bundled-skills/skills/valdi-profile/skill.md +5 -3
- package/bundled-skills/skills/valdi-setup/skill.md +3 -6
- package/bundled-skills/skills/valdi-testing/skill.md +1 -1
- package/bundled-skills/skills/valdi-tsx/skill.md +47 -11
- package/debugger/README.md +356 -0
- package/debugger/debugger-actions.js +373 -0
- package/debugger/debugger-api.js +225 -0
- package/debugger/debugger-bootstrap.js +295 -0
- package/debugger/debugger-model.js +790 -0
- package/debugger/debugger-performance.js +573 -0
- package/debugger/debugger-preview-html.js +676 -0
- package/debugger/debugger-providers.js +389 -0
- package/debugger/debugger-render.js +529 -0
- package/debugger/debugger-runtime.js +387 -0
- package/debugger/debugger-session.js +188 -0
- package/debugger/debugger-settings.js +209 -0
- package/debugger/debugger-state.js +221 -0
- package/debugger/debugger-tree-model.js +539 -0
- package/debugger/debugger.css +1865 -0
- package/debugger/devtools-panel.css +1318 -0
- package/debugger/devtools-panel.html +273 -0
- package/debugger/devtools-panel.js +3329 -0
- package/debugger/index.html +279 -0
- package/dist/commands/bootstrap.js +6 -5
- package/dist/commands/build.js +6 -0
- package/dist/commands/debugger.js +163 -0
- package/dist/commands/doctor.js +5 -125
- package/dist/commands/inspect.js +5 -2
- package/dist/commands/inspect_commands/input.js +176 -0
- package/dist/commands/inspect_commands/snapshot.js +1 -1
- package/dist/commands/inspect_commands/tree.js +1 -1
- package/dist/commands/install.js +6 -0
- package/dist/commands/projectsync.js +15 -0
- package/dist/commands/webHotreload.js +31 -0
- package/dist/core/constants.js +26 -7
- package/dist/debugger/chromiumConsole.js +279 -0
- package/dist/debugger/inputClient.js +473 -0
- package/dist/debugger/server.js +3801 -0
- package/dist/debugger/targetRegistry.js +436 -0
- package/dist/debugger/webPreviewPerformance.js +864 -0
- package/dist/index.js +0 -0
- package/dist/setup/DevSetupHelper.js +0 -3
- package/dist/setup/linuxSetup.js +0 -14
- package/dist/setup/macOSSetup.js +1 -2
- package/dist/utils/BazelClient.js +34 -5
- package/dist/utils/applicationUtils.js +18 -0
- package/dist/utils/chromiumDevToolsClient.js +350 -0
- package/dist/utils/daemonClient.js +364 -44
- package/dist/utils/hermesClient.js +82 -176
- package/dist/utils/linuxDistro.js +0 -21
- package/dist/utils/loopbackHost.js +14 -0
- package/dist/utils/owlCdpClient.js +282 -0
- package/dist/utils/owlDevToolsExtension.js +142 -0
- package/dist/utils/skillsAdapters.js +40 -14
- package/dist/utils/stringUtils.js +13 -1
- package/package.json +4 -2
- package/dist/commands/inspect_commands/snapshot.spec.js +0 -105
- package/dist/core/packageFiles.spec.js +0 -29
- package/dist/preview/previewGenerator.spec.js +0 -203
- package/dist/preview/viewModelParser.spec.js +0 -171
- package/dist/utils/linuxDistro.spec.js +0 -170
- package/dist/utils/skillsAdapters.spec.js +0 -60
- package/dist/utils/stringUtils.spec.js +0 -81
|
@@ -17,7 +17,7 @@ common --incompatible_java_common_parameters=false
|
|
|
17
17
|
# Flags for compilation
|
|
18
18
|
common --define enable_web=true
|
|
19
19
|
|
|
20
|
-
build --tool_java_language_version=
|
|
20
|
+
build --tool_java_language_version=17
|
|
21
21
|
build --java_language_version=11
|
|
22
22
|
|
|
23
23
|
## Disable sandboxing for macs, both laptops and in CI; the performance hit is much too high.
|
|
@@ -35,7 +35,6 @@ build --host_cxxopt=-Wno-nullability-extension
|
|
|
35
35
|
## we need to disable this due to a bug in bazel
|
|
36
36
|
## see https://github.com/bazelbuild/bazel/issues/12381
|
|
37
37
|
build --incompatible_use_specific_tool_files=false
|
|
38
|
-
build --incompatible_enable_cc_toolchain_resolution
|
|
39
38
|
|
|
40
39
|
# iOS and Apple cc changes and hacks
|
|
41
40
|
## For Objective-C source files
|
|
@@ -79,7 +78,14 @@ build:linux --sandbox_writable_path=/var/tmp
|
|
|
79
78
|
build --disk_cache=""
|
|
80
79
|
|
|
81
80
|
# common build configuration
|
|
82
|
-
build --
|
|
81
|
+
build --generate_json_trace_profile
|
|
82
|
+
|
|
83
|
+
# Alternating a Valdi test target and a web/npm target trims test-only options
|
|
84
|
+
# differently, so their exec tool configs collide under one output path and
|
|
85
|
+
# recompile thousands of shared tool actions. Opt-in config that the `valdi`
|
|
86
|
+
# CLI passes to its build/test flows so they converge; raw `bazel` keeps the
|
|
87
|
+
# default. Changing test flags (e.g. --test_output) repopulates it once.
|
|
88
|
+
build:stable_exec --notrim_test_configuration
|
|
83
89
|
# enable grpc log
|
|
84
90
|
build --remote_grpc_log=/tmp/snap_client_grpc.log
|
|
85
91
|
build --experimental_reuse_sandbox_directories
|
|
@@ -36,9 +36,6 @@ archive_override(module_name = "rules_hdrs", urls = [VALDI_URL], strip_prefix =
|
|
|
36
36
|
bazel_dep(name = "valdi_toolchain")
|
|
37
37
|
archive_override(module_name = "valdi_toolchain", urls = [VALDI_URL], strip_prefix = VALDI_PREFIX + "/bin")
|
|
38
38
|
|
|
39
|
-
bazel_dep(name = "resvg_libs")
|
|
40
|
-
archive_override(module_name = "resvg_libs", urls = [VALDI_URL], strip_prefix = VALDI_PREFIX + "/third-party/resvg/resvg_libs")
|
|
41
|
-
|
|
42
39
|
# -- Valdi Widgets (https://github.com/Snapchat/Valdi_Widgets) ---------------
|
|
43
40
|
WIDGETS_TAG = "{{VALDI_WIDGETS_RELEASE_TAG}}"
|
|
44
41
|
|
|
@@ -55,8 +52,120 @@ use_repo(valdi_toolchains, "local_config_apple_cc_toolchains", "local_config_app
|
|
|
55
52
|
register_toolchains("@local_config_apple_cc_toolchains//:all")
|
|
56
53
|
register_toolchains("@llvm_toolchain//:all")
|
|
57
54
|
|
|
55
|
+
# -- Android dependencies ----------------------------------------------------
|
|
56
|
+
bazel_dep(name = "rules_java", version = "7.4.0")
|
|
57
|
+
bazel_dep(name = "rules_android", version = "0.6.5")
|
|
58
|
+
# Resolve rules_android from the Valdi registry, which carries the hermetic Android SDK
|
|
59
|
+
# patch (registry/modules/rules_android/0.6.5) so bootstrapped apps build Android targets
|
|
60
|
+
# with no local ANDROID_HOME.
|
|
61
|
+
single_version_override(module_name = "rules_android", version = "0.6.5")
|
|
62
|
+
bazel_dep(name = "rules_android_ndk", version = "0.1.3")
|
|
63
|
+
|
|
64
|
+
remote_android_extensions = use_extension(
|
|
65
|
+
"@rules_android//bzlmod_extensions:android_extensions.bzl",
|
|
66
|
+
"remote_android_tools_extensions",
|
|
67
|
+
)
|
|
68
|
+
use_repo(remote_android_extensions, "android_gmaven_r8", "android_tools")
|
|
69
|
+
|
|
70
|
+
hermetic_android_sdk_extension = use_extension("@valdi//bzl:hermetic_android_sdk.bzl", "hermetic_android_sdk_extension")
|
|
71
|
+
hermetic_android_sdk_extension.configure(
|
|
72
|
+
api_level = 36,
|
|
73
|
+
build_tools_version = "34.0.0",
|
|
74
|
+
)
|
|
75
|
+
use_repo(hermetic_android_sdk_extension, "androidsdk")
|
|
76
|
+
|
|
77
|
+
register_toolchains(
|
|
78
|
+
"@rules_android//toolchains/android:all",
|
|
79
|
+
"@rules_android//toolchains/android_sdk:all",
|
|
80
|
+
)
|
|
81
|
+
register_toolchains("@androidsdk//:sdk-toolchain", "@androidsdk//:all")
|
|
82
|
+
|
|
83
|
+
hermetic_ndk_extension = use_extension("@valdi//bzl:hermetic_ndk.bzl", "hermetic_ndk_extension")
|
|
84
|
+
use_repo(hermetic_ndk_extension, "androidndk")
|
|
85
|
+
|
|
86
|
+
register_toolchains("@androidndk//:all")
|
|
87
|
+
|
|
88
|
+
bazel_dep(name = "rules_kotlin", version = "1.9.0")
|
|
89
|
+
single_version_override(module_name = "rules_kotlin", version = "1.9.0")
|
|
90
|
+
bazel_dep(name = "rules_jvm_external", version = "6.2")
|
|
91
|
+
|
|
92
|
+
# -- Maven (Android) ---------------------------------------------------------
|
|
93
|
+
maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven")
|
|
94
|
+
|
|
95
|
+
maven.install(
|
|
96
|
+
name = "android_mvn",
|
|
97
|
+
artifacts = [
|
|
98
|
+
"androidx.annotation:annotation:1.1.0",
|
|
99
|
+
"androidx.appcompat:appcompat:1.2.0",
|
|
100
|
+
"androidx.appcompat:appcompat-resources:1.2.0",
|
|
101
|
+
"androidx.collection:collection:1.1.0",
|
|
102
|
+
"androidx.constraintlayout:constraintlayout:2.1.4",
|
|
103
|
+
"androidx.core:core:1.6.0",
|
|
104
|
+
"androidx.customview:customview:1.1.0",
|
|
105
|
+
"androidx.dynamicanimation:dynamicanimation:1.0.0",
|
|
106
|
+
"androidx.fragment:fragment:1.1.0",
|
|
107
|
+
"androidx.interpolator:interpolator:1.0.0",
|
|
108
|
+
"androidx.lifecycle:lifecycle-common:2.2.0",
|
|
109
|
+
"androidx.lifecycle:lifecycle-process:2.2.0",
|
|
110
|
+
"androidx.lifecycle:lifecycle-viewmodel:2.2.0",
|
|
111
|
+
"androidx.recyclerview:recyclerview:1.2.1",
|
|
112
|
+
"androidx.test:core:1.5.0",
|
|
113
|
+
"androidx.test.ext:junit:1.1.3",
|
|
114
|
+
"androidx.test:monitor:1.5.0",
|
|
115
|
+
"androidx.test:runner:1.5.0",
|
|
116
|
+
"com.google.android.material:material:1.2.0",
|
|
117
|
+
"com.google.code.findbugs:jsr305:3.0.2",
|
|
118
|
+
"com.google.code.gson:gson:2.8.6",
|
|
119
|
+
"com.google.protobuf.nano:protobuf-javanano:3.1.0",
|
|
120
|
+
"com.jakewharton.timber:timber:4.7.1",
|
|
121
|
+
"com.squareup.leakcanary:leakcanary-android:2.10",
|
|
122
|
+
"com.squareup.okhttp3:okhttp:4.9.0",
|
|
123
|
+
"com.squareup.okio:okio:2.10.0",
|
|
124
|
+
"io.reactivex.rxjava3:rxandroid:3.0.0",
|
|
125
|
+
"io.reactivex.rxjava3:rxjava:3.1.0",
|
|
126
|
+
"io.reactivex.rxjava3:rxkotlin:3.0.0",
|
|
127
|
+
"javax.inject:javax.inject:1",
|
|
128
|
+
"junit:junit:4.13.2",
|
|
129
|
+
"org.junit.jupiter:junit-jupiter-api:5.9.3",
|
|
130
|
+
"org.junit.jupiter:junit-jupiter-engine:5.9.3",
|
|
131
|
+
"org.junit.jupiter:junit-jupiter-params:5.9.3",
|
|
132
|
+
"org.junit.platform:junit-platform-console:1.9.2",
|
|
133
|
+
"org.junit.platform:junit-platform-launcher:1.9.2",
|
|
134
|
+
"org.junit.platform:junit-platform-reporting:1.9.2",
|
|
135
|
+
"org.junit.vintage:junit-vintage-engine:5.9.3",
|
|
136
|
+
"org.robolectric:android-all:10-robolectric-5803371",
|
|
137
|
+
"org.robolectric:annotations:4.10.3",
|
|
138
|
+
"org.robolectric:robolectric:4.10.3",
|
|
139
|
+
],
|
|
140
|
+
repositories = [
|
|
141
|
+
"https://repo1.maven.org/maven2",
|
|
142
|
+
"https://maven.google.com",
|
|
143
|
+
],
|
|
144
|
+
aar_import_bzl_label = "@rules_android//rules:rules.bzl",
|
|
145
|
+
use_starlark_android_rules = True,
|
|
146
|
+
version_conflict_policy = "pinned",
|
|
147
|
+
)
|
|
148
|
+
|
|
149
|
+
use_repo(maven, "android_mvn")
|
|
150
|
+
|
|
58
151
|
# -- Version pins (must match Valdi's MODULE.bazel) ---------------------------
|
|
59
152
|
single_version_override(module_name = "protobuf", version = "27.0")
|
|
60
153
|
single_version_override(module_name = "rules_apple", version = "4.0.0")
|
|
61
154
|
single_version_override(module_name = "rules_pkg", version = "0.9.1")
|
|
62
155
|
single_version_override(module_name = "zlib", version = "1.3.2")
|
|
156
|
+
|
|
157
|
+
# rules_python 1.9.0's hermetic Python toolchain bundles setuptools files whose
|
|
158
|
+
# names contain spaces (e.g. "Lorem ipsum.txt"), which Bazel's build-runfiles
|
|
159
|
+
# cannot materialize on macOS. The patch renames them. It is vendored into this
|
|
160
|
+
# app (bzl/patches/...) and referenced with a root-local `//` label on purpose:
|
|
161
|
+
# bzlmod only applies this override from the ROOT module, and `@valdi` resolves
|
|
162
|
+
# to the pinned public release, which may not ship the patch. See the CLI
|
|
163
|
+
# README ("Bootstrap pins and patches").
|
|
164
|
+
bazel_dep(name = "rules_python", version = "1.9.0")
|
|
165
|
+
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
|
|
166
|
+
python.single_version_platform_override(
|
|
167
|
+
patch_strip = 1,
|
|
168
|
+
patches = ["//bzl/patches/rules_python/1.9.0:remove_setuptools_spaces.patch"],
|
|
169
|
+
platform = "aarch64-apple-darwin",
|
|
170
|
+
python_version = "3.11.14",
|
|
171
|
+
)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
exports_files(glob(["*.patch"]))
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
diff --git a/lib/python3.11/site-packages/setuptools/_vendor/jaraco/text/__init__.py b/lib/python3.11/site-packages/setuptools/_vendor/jaraco/text/__init__.py
|
|
2
|
+
index 4e29031..8b5af7e 100644
|
|
3
|
+
--- a/lib/python3.11/site-packages/setuptools/_vendor/jaraco/text/__init__.py
|
|
4
|
+
+++ b/lib/python3.11/site-packages/setuptools/_vendor/jaraco/text/__init__.py
|
|
5
|
+
@@ -230 +230 @@ lorem_ipsum: str = (
|
|
6
|
+
- files(__name__).joinpath('Lorem ipsum.txt').read_text(encoding='utf-8')
|
|
7
|
+
+ files(__name__).joinpath('Lorem_ipsum.txt').read_text(encoding='utf-8')
|
|
8
|
+
diff --git a/lib/python3.11/site-packages/setuptools/_vendor/jaraco/text/Lorem_ipsum.txt b/lib/python3.11/site-packages/setuptools/_vendor/jaraco/text/Lorem_ipsum.txt
|
|
9
|
+
new file mode 100644
|
|
10
|
+
index 0000000..7c2da63
|
|
11
|
+
--- /dev/null
|
|
12
|
+
+++ b/lib/python3.11/site-packages/setuptools/_vendor/jaraco/text/Lorem_ipsum.txt
|
|
13
|
+
@@ -0,0 +1,2 @@
|
|
14
|
+
+Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
|
15
|
+
+Curabitur pretium tincidunt lacus. Nulla gravida orci a odio. Nullam varius, turpis et commodo pharetra, est eros bibendum elit, nec luctus magna felis sollicitudin mauris. Integer in mauris eu nibh euismod gravida. Duis ac tellus et risus vulputate vehicula. Donec lobortis risus a elit. Etiam tempor. Ut ullamcorper, ligula eu tempor congue, eros est euismod turpis, id tincidunt sapien risus a quam. Maecenas fermentum consequat mi. Donec fermentum. Pellentesque malesuada nulla a mi. Duis sapien sem, aliquet nec, commodo eget, consequat quis, neque. Aliquam faucibus, elit ut dictum aliquet, felis nisl adipiscing sapien, sed malesuada diam lacus eget erat. Cras mollis scelerisque nunc. Nullam arcu. Aliquam consequat. Curabitur augue lorem, dapibus quis, laoreet et, pretium ac, nisi. Aenean magna nisl, mollis quis, molestie eu, feugiat in, orci. In hac habitasse platea dictumst.
|
|
16
|
+
diff --git a/lib/python3.11/site-packages/setuptools/_vendor/jaraco/text/Lorem ipsum.txt b/lib/python3.11/site-packages/setuptools/_vendor/jaraco/text/Lorem ipsum.txt
|
|
17
|
+
deleted file mode 100644
|
|
18
|
+
index 7c2da63..0000000
|
|
19
|
+
--- a/lib/python3.11/site-packages/setuptools/_vendor/jaraco/text/Lorem ipsum.txt
|
|
20
|
+
+++ /dev/null
|
|
21
|
+
@@ -1,2 +0,0 @@
|
|
22
|
+
-Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
|
23
|
+
-Curabitur pretium tincidunt lacus. Nulla gravida orci a odio. Nullam varius, turpis et commodo pharetra, est eros bibendum elit, nec luctus magna felis sollicitudin mauris. Integer in mauris eu nibh euismod gravida. Duis ac tellus et risus vulputate vehicula. Donec lobortis risus a elit. Etiam tempor. Ut ullamcorper, ligula eu tempor congue, eros est euismod turpis, id tincidunt sapien risus a quam. Maecenas fermentum consequat mi. Donec fermentum. Pellentesque malesuada nulla a mi. Duis sapien sem, aliquet nec, commodo eget, consequat quis, neque. Aliquam faucibus, elit ut dictum aliquet, felis nisl adipiscing sapien, sed malesuada diam lacus eget erat. Cras mollis scelerisque nunc. Nullam arcu. Aliquam consequat. Curabitur augue lorem, dapibus quis, laoreet et, pretium ac, nisi. Aenean magna nisl, mollis quis, molestie eu, feugiat in, orci. In hac habitasse platea dictumst.
|
|
24
|
+
diff --git a/lib/python3.11/site-packages/setuptools/_scripts.py b/lib/python3.11/site-packages/setuptools/_scripts.py
|
|
25
|
+
index 788a7a7..d479258 100644
|
|
26
|
+
--- a/lib/python3.11/site-packages/setuptools/_scripts.py
|
|
27
|
+
+++ b/lib/python3.11/site-packages/setuptools/_scripts.py
|
|
28
|
+
@@ -336 +336 @@ def load_launcher_manifest(name):
|
|
29
|
+
- res = resources.files(__name__).joinpath('launcher manifest.xml')
|
|
30
|
+
+ res = resources.files('setuptools.command').joinpath('launcher_manifest.xml')
|
|
31
|
+
diff --git a/lib/python3.11/site-packages/setuptools/command/launcher_manifest.xml b/lib/python3.11/site-packages/setuptools/command/launcher_manifest.xml
|
|
32
|
+
new file mode 100644
|
|
33
|
+
index 0000000..7bf2e5d
|
|
34
|
+
--- /dev/null
|
|
35
|
+
+++ b/lib/python3.11/site-packages/setuptools/command/launcher_manifest.xml
|
|
36
|
+
@@ -0,0 +1,15 @@
|
|
37
|
+
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
38
|
+
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
|
39
|
+
+ <assemblyIdentity version="1.0.0.0"
|
|
40
|
+
+ processorArchitecture="X86"
|
|
41
|
+
+ name="%(name)s"
|
|
42
|
+
+ type="win32"/>
|
|
43
|
+
+ <!-- Identify the application security requirements. -->
|
|
44
|
+
+ <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
|
|
45
|
+
+ <security>
|
|
46
|
+
+ <requestedPrivileges>
|
|
47
|
+
+ <requestedExecutionLevel level="asInvoker" uiAccess="false"/>
|
|
48
|
+
+ </requestedPrivileges>
|
|
49
|
+
+ </security>
|
|
50
|
+
+ </trustInfo>
|
|
51
|
+
+</assembly>
|
|
52
|
+
diff --git a/lib/python3.11/site-packages/setuptools/command/launcher manifest.xml b/lib/python3.11/site-packages/setuptools/command/launcher manifest.xml
|
|
53
|
+
deleted file mode 100644
|
|
54
|
+
index 7bf2e5d..0000000
|
|
55
|
+
--- a/lib/python3.11/site-packages/setuptools/command/launcher manifest.xml
|
|
56
|
+
+++ /dev/null
|
|
57
|
+
@@ -1,15 +0,0 @@
|
|
58
|
+
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
59
|
+
-<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
|
60
|
+
- <assemblyIdentity version="1.0.0.0"
|
|
61
|
+
- processorArchitecture="X86"
|
|
62
|
+
- name="%(name)s"
|
|
63
|
+
- type="win32"/>
|
|
64
|
+
- <!-- Identify the application security requirements. -->
|
|
65
|
+
- <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
|
|
66
|
+
- <security>
|
|
67
|
+
- <requestedPrivileges>
|
|
68
|
+
- <requestedExecutionLevel level="asInvoker" uiAccess="false"/>
|
|
69
|
+
- </requestedPrivileges>
|
|
70
|
+
- </security>
|
|
71
|
+
- </trustInfo>
|
|
72
|
+
-</assembly>
|
|
73
|
+
diff --git a/lib/python3.11/site-packages/setuptools/script_dev.tmpl b/lib/python3.11/site-packages/setuptools/script_dev.tmpl
|
|
74
|
+
new file mode 100644
|
|
75
|
+
index 0000000..c10078f
|
|
76
|
+
--- /dev/null
|
|
77
|
+
+++ b/lib/python3.11/site-packages/setuptools/script_dev.tmpl
|
|
78
|
+
@@ -0,0 +1,6 @@
|
|
79
|
+
+# EASY-INSTALL-DEV-SCRIPT: %(spec)r,%(script_name)r
|
|
80
|
+
+__requires__ = %(spec)r
|
|
81
|
+
+__import__('pkg_resources').require(%(spec)r)
|
|
82
|
+
+__file__ = %(dev_path)r
|
|
83
|
+
+with open(__file__) as f:
|
|
84
|
+
+ exec(compile(f.read(), __file__, 'exec'))
|
|
85
|
+
diff --git a/lib/python3.11/site-packages/setuptools/script (dev).tmpl b/lib/python3.11/site-packages/setuptools/script (dev).tmpl
|
|
86
|
+
deleted file mode 100644
|
|
87
|
+
index c10078f..0000000
|
|
88
|
+
--- a/lib/python3.11/site-packages/setuptools/script (dev).tmpl
|
|
89
|
+
+++ /dev/null
|
|
90
|
+
@@ -1,6 +0,0 @@
|
|
91
|
+
-# EASY-INSTALL-DEV-SCRIPT: %(spec)r,%(script_name)r
|
|
92
|
+
-__requires__ = %(spec)r
|
|
93
|
+
-__import__('pkg_resources').require(%(spec)r)
|
|
94
|
+
-__file__ = %(dev_path)r
|
|
95
|
+
-with open(__file__) as f:
|
|
96
|
+
- exec(compile(f.read(), __file__, 'exec'))
|
package/README.md
CHANGED
|
@@ -47,7 +47,7 @@ Now you can edit your TypeScript files and see changes instantly on your device!
|
|
|
47
47
|
For complete documentation, see:
|
|
48
48
|
- [Command Line Reference](https://github.com/Snapchat/Valdi/blob/main/docs/docs/command-line-references.md)
|
|
49
49
|
- [Installation Guide](https://github.com/Snapchat/Valdi/blob/main/docs/INSTALL.md)
|
|
50
|
-
- [Troubleshooting](https://github.com/Snapchat/Valdi/blob/main/docs/TROUBLESHOOTING.md) — run `valdi doctor` to diagnose issues, or ask
|
|
50
|
+
- [Troubleshooting](https://github.com/Snapchat/Valdi/blob/main/docs/TROUBLESHOOTING.md) — run `valdi doctor` to diagnose issues, or ask in [GitHub Discussions](https://github.com/Snapchat/Valdi/discussions)
|
|
51
51
|
|
|
52
52
|
### Key Commands
|
|
53
53
|
|
|
@@ -82,6 +82,15 @@ For complete documentation, see:
|
|
|
82
82
|
- Enables instant hot reload during development
|
|
83
83
|
- Watches for file changes and updates app in milliseconds
|
|
84
84
|
|
|
85
|
+
**`valdi debugger`** - Local debugger web interface
|
|
86
|
+
- Starts the browser-based Valdi debugger at `127.0.0.1`
|
|
87
|
+
- Uses live daemon data from running Valdi targets for view hierarchy, preview, inspector state, snapshots, heap, and runtime logs
|
|
88
|
+
- Captures CPU profiles through a separate Hermes debugger connection
|
|
89
|
+
- Restricts the server to loopback addresses because debugger snapshots can contain application data
|
|
90
|
+
- Prefers port `8765` and automatically selects the next available port so multiple local sessions can run at once
|
|
91
|
+
- Supports `--json` for automation-friendly startup output
|
|
92
|
+
- Supports exact-page Owl/Chromium attachment with `--web-preview-url` and `--chromium-debugging-port`; this emits a temporary first-party DevTools extension directory and an explicitly opted-in preview URL
|
|
93
|
+
|
|
85
94
|
**`valdi skills`** - AI assistant skills
|
|
86
95
|
- Installs Valdi context files into Claude Code, Cursor, or GitHub Copilot so AI tools generate correct Valdi code instead of React patterns
|
|
87
96
|
- `valdi skills install` — auto-detects installed AI tools and installs all skills
|
|
@@ -217,3 +226,28 @@ Install the `valdi` command locally:
|
|
|
217
226
|
```sh
|
|
218
227
|
npm run cli:install
|
|
219
228
|
```
|
|
229
|
+
|
|
230
|
+
### Bootstrap pins and patches
|
|
231
|
+
|
|
232
|
+
The bootstrap template (`.metadata/MODULE.bazel.template`) is what `valdi
|
|
233
|
+
bootstrap` uses to wire up a user's app. The generated app is the **root**
|
|
234
|
+
bzlmod module, and it pins the Valdi framework to a *published* release
|
|
235
|
+
(`DEFAULT_VALDI_RELEASE_TAG`); it fetches `@valdi` from public GitHub, **not**
|
|
236
|
+
from this checkout.
|
|
237
|
+
|
|
238
|
+
Two rules follow from that:
|
|
239
|
+
|
|
240
|
+
1. **A patch the generated app must apply belongs *in the app*, referenced with
|
|
241
|
+
a root-local `//` label — never `@valdi//`.** bzlmod only honors a
|
|
242
|
+
`single_version_*override`/patch from the **root** module, so the app (not
|
|
243
|
+
`@valdi`) has to carry it; and `@valdi` resolves to the pinned public
|
|
244
|
+
release, which may not contain internal-only files. Vendor the patch as a
|
|
245
|
+
`.metadata` template asset (see `RULES_PYTHON_PATCH*` and the
|
|
246
|
+
`bzl/patches/...` block in the template). A `@valdi//bzl/patches/...`
|
|
247
|
+
reference fails at bootstrap time with `BUILD file not found in @@valdi~` and
|
|
248
|
+
breaks the `release_test` CI gate.
|
|
249
|
+
|
|
250
|
+
2. **Only bump the template's framework pins (`DEFAULT_VALDI_RELEASE_TAG` and
|
|
251
|
+
any `@valdi`-sourced overrides) when you are cutting the release that ships
|
|
252
|
+
the matching files.** Pointing the template at a release that doesn't exist
|
|
253
|
+
yet produces an app that can't build.
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
{ "name": "valdi-gestures", "description": "Touch and gesture handling: onTap, onDrag, onPinch, onRotate, onLongPress, TouchEvent, gesture predicates", "tags": ["gestures", "touch", "input"], "path": "skills/valdi-gestures/skill.md", "category": ["client"] },
|
|
28
28
|
{ "name": "valdi-localization", "description": "Internationalization: strings-en.json, Strings.d.ts generation, template variables, valdi projectsync", "tags": ["localization", "i18n", "strings"], "path": "skills/valdi-localization/skill.md", "category": ["client"] },
|
|
29
29
|
{ "name": "valdi-error-handling", "description": "Error handling patterns: CancelablePromise safety, HTTPClient errors, isDestroyed guards, error UI states", "tags": ["errors", "async", "lifecycle", "safety"], "path": "skills/valdi-error-handling/skill.md", "category": ["client"] },
|
|
30
|
-
{ "name": "valdi-component-dedup", "description": "Find and extract duplicated component patterns across Valdi modules into shared libraries", "tags": ["deduplication", "analysis", "refactoring", "ai"], "path": "skills/valdi-component-dedup/skill.md", "category": ["client"] }
|
|
30
|
+
{ "name": "valdi-component-dedup", "description": "Find and extract duplicated component patterns across Valdi modules into shared libraries", "tags": ["deduplication", "analysis", "refactoring", "ai"], "path": "skills/valdi-component-dedup/skill.md", "category": ["client"] },
|
|
31
|
+
{ "name": "valdi-pr-review", "description": "Review a Valdi PR for regression risk: gating audit, blast radius, and native C++/Android/iOS perf and thread-safety checks", "tags": ["review", "regression", "gating", "performance", "native"], "path": "skills/valdi-pr-review/skill.md", "category": ["framework", "client"] }
|
|
31
32
|
]
|
|
32
33
|
}
|
|
@@ -125,6 +125,55 @@ this.animate({ stiffness: 500, damping: 40 }, () => {
|
|
|
125
125
|
});
|
|
126
126
|
```
|
|
127
127
|
|
|
128
|
+
## Animating text and attributed text
|
|
129
|
+
|
|
130
|
+
The imperative `animate()` / `setStateAnimated()` API above does not drive per-character or per-word text reveals. For those, use the **text-animation surface**: an `AttributedText` chunk carries an `animationTransform`, and a `<textanimationgroup>` container coordinates one shared timeline across all of its descendant `<label>` / `<textview>` elements.
|
|
131
|
+
|
|
132
|
+
`animationTransform` fields (`valdi_tsx/src/AttributedText.d.ts`, `AttributedTextAnimationTransform`):
|
|
133
|
+
|
|
134
|
+
| Field | Meaning |
|
|
135
|
+
|-------|---------|
|
|
136
|
+
| `translationY` | Initial vertical offset (logical px); animates back to the normal position |
|
|
137
|
+
| `scale` | Initial scale; animates back to 1 |
|
|
138
|
+
| `opacity` | Initial opacity; animates back to 1 |
|
|
139
|
+
| `duration` | Seconds for each part to reach its normal appearance |
|
|
140
|
+
| `timeOffsetBetweenParts` | Delay (seconds) staggered between consecutive parts (0 = all at once) |
|
|
141
|
+
| `partPattern` | Native regex; each non-overlapping match becomes a separately animated part (unmatched text stays static). Omit to animate the whole chunk as one part |
|
|
142
|
+
| `key` | Stable animation identity; preserves progress across view-pool recycling. Change it to restart the animation |
|
|
143
|
+
|
|
144
|
+
```tsx
|
|
145
|
+
import { AttributedTextBuilder } from 'valdi_core/src/utils/AttributedTextBuilder';
|
|
146
|
+
|
|
147
|
+
// ✅ Build attributed text with a per-chunk animation transform
|
|
148
|
+
private animatedText(text: string) {
|
|
149
|
+
return new AttributedTextBuilder()
|
|
150
|
+
.append(text, {
|
|
151
|
+
animationTransform: {
|
|
152
|
+
duration: 0.45,
|
|
153
|
+
key: `run-${this.state.runId}`, // change key to replay
|
|
154
|
+
opacity: 0,
|
|
155
|
+
translationY: 8,
|
|
156
|
+
timeOffsetBetweenParts: 0.08, // stagger each part
|
|
157
|
+
},
|
|
158
|
+
})
|
|
159
|
+
.build();
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
// ✅ <textanimationgroup> runs ONE shared timeline across every descendant
|
|
163
|
+
// label/textview, even nested ones
|
|
164
|
+
onRender(): void {
|
|
165
|
+
<textanimationgroup>
|
|
166
|
+
<label value={this.animatedText('First line joins the timeline.')} />
|
|
167
|
+
<view>
|
|
168
|
+
<label value={this.animatedText('So does this nested one.')} />
|
|
169
|
+
</view>
|
|
170
|
+
<textview value={this.animatedText('And the textview animates last.')} />
|
|
171
|
+
</textanimationgroup>;
|
|
172
|
+
}
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
`<textanimationgroup>` is a container (`CommonView` + `ContainerTemplateElement`) with no animation-specific attributes of its own — its only job is to group descendants onto a single coordinated timeline. Without it, each animated chunk runs on its own timeline.
|
|
176
|
+
|
|
128
177
|
## Common patterns
|
|
129
178
|
|
|
130
179
|
### Show/hide with fade
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
# Valdi Async & Lifecycle Safety
|
|
2
2
|
|
|
3
3
|
Async operations that complete after a component is destroyed will call `setState()`
|
|
4
|
-
on a dead component —
|
|
5
|
-
guard before the callback
|
|
4
|
+
on a dead component — Valdi logs a `console.error` and drops the update (a silent
|
|
5
|
+
no-op, not a thrown error). The fix is always to cancel or guard before the callback
|
|
6
|
+
fires.
|
|
6
7
|
|
|
7
8
|
## HTTPClient: Store, Cancel, Repeat
|
|
8
9
|
|
|
@@ -13,7 +13,7 @@ Valdi uses Bazel as its build system. Bazel provides reproducible, incremental b
|
|
|
13
13
|
bazel build //...
|
|
14
14
|
|
|
15
15
|
# Build specific target
|
|
16
|
-
bazel build //apps/helloworld:
|
|
16
|
+
bazel build //apps/helloworld:hello_world
|
|
17
17
|
|
|
18
18
|
# Run tests
|
|
19
19
|
bazel test //...
|
|
@@ -103,10 +103,6 @@ valdi install ios
|
|
|
103
103
|
|
|
104
104
|
# Build and install Android app
|
|
105
105
|
valdi install android
|
|
106
|
-
|
|
107
|
-
# Or use bazel directly with configs
|
|
108
|
-
bazel build //apps/helloworld:hello_world --config=ios
|
|
109
|
-
bazel build //apps/helloworld:hello_world --config=android
|
|
110
106
|
```
|
|
111
107
|
|
|
112
108
|
## Configuration
|
|
@@ -137,5 +133,5 @@ bazel coverage //...
|
|
|
137
133
|
## More Information
|
|
138
134
|
|
|
139
135
|
- Bazel docs: https://bazel.build
|
|
140
|
-
- Valdi build rules:
|
|
136
|
+
- Valdi build rules: `bzl/valdi/npm/README.md`
|
|
141
137
|
- Framework docs: `/AGENTS.md`
|
|
@@ -55,7 +55,7 @@ enum CompilerError: Error {
|
|
|
55
55
|
|
|
56
56
|
## Testing
|
|
57
57
|
|
|
58
|
-
Tests are critical - add tests for new features and error cases.
|
|
58
|
+
Tests are critical - add tests for new features and error cases. Run the test suite with `bzl test //compiler/compiler/...` (the build script below does not run tests).
|
|
59
59
|
|
|
60
60
|
## Build
|
|
61
61
|
|
|
@@ -63,12 +63,12 @@ Tests are critical - add tests for new features and error cases. The `update_com
|
|
|
63
63
|
|
|
64
64
|
```bash
|
|
65
65
|
cd compiler/compiler
|
|
66
|
-
./scripts/
|
|
66
|
+
./scripts/update_compiler_bazel.sh -o bin/compiler
|
|
67
67
|
```
|
|
68
68
|
|
|
69
69
|
This script:
|
|
70
|
-
-
|
|
71
|
-
- Builds the compiler for the correct architecture
|
|
70
|
+
- Builds the compiler with Bazel (`//compiler/compiler:local_valdi_compiler`); no Swift toolchain install is required
|
|
71
|
+
- Builds the compiler for the correct architecture (on macOS, lipos arm64 + x86_64 into a universal binary and codesigns it)
|
|
72
72
|
- Copies the binary to `bin/compiler/macos/valdi_compiler` (or `linux/valdi_compiler`)
|
|
73
73
|
- Handles platform differences (macOS vs Linux)
|
|
74
74
|
|
|
@@ -45,6 +45,24 @@ Valdi's runtime and layout engine are implemented in C++ for cross-platform perf
|
|
|
45
45
|
- **Don't modify generated code** - change the .djinni file instead
|
|
46
46
|
- Generated files typically in `generated-src/` directories
|
|
47
47
|
|
|
48
|
+
### Native Bindings Exposed to JS
|
|
49
|
+
|
|
50
|
+
The runtime exposes selected native (C++) classes and functions to the JS engine so
|
|
51
|
+
TypeScript can call into performance-critical native code directly.
|
|
52
|
+
|
|
53
|
+
- **`Base64` namespace** (`coreutils/src/Base64.ts`) is a good example of a
|
|
54
|
+
native-backed binding: the TS surface (`fromByteArray(uint8, { urlSafe })`,
|
|
55
|
+
`toByteArray(b64)`, `byteLength(b64)`) delegates to native encode/decode
|
|
56
|
+
(`Base64Native`) rather than doing the work in JS. Use this shape when a hot codec
|
|
57
|
+
or transform belongs in native code but needs a clean JS entry point.
|
|
58
|
+
- **`WeakRef`** is supported by the runtime (recently added). JS-side weak references
|
|
59
|
+
hold their referent without preventing garbage collection — useful for caches and
|
|
60
|
+
back-references that must not keep objects alive.
|
|
61
|
+
|
|
62
|
+
**V8 caveat:** some native class bindings (e.g. `Base64` and `Unicode`) are wired for
|
|
63
|
+
QuickJS and may **throw on the V8 runtime**. Don't assume a native binding is present
|
|
64
|
+
on every JS engine — guard or feature-check when the same code can run under V8.
|
|
65
|
+
|
|
48
66
|
### Performance
|
|
49
67
|
|
|
50
68
|
- This is performance-critical code
|
|
@@ -37,7 +37,7 @@ onCreate() {
|
|
|
37
37
|
// ❌ WRONG — Raw promise with no lifecycle safety
|
|
38
38
|
onCreate() {
|
|
39
39
|
this.fetchData().then(data => {
|
|
40
|
-
this.setState({ data }); //
|
|
40
|
+
this.setState({ data }); // Logs a console.error and no-ops if destroyed
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
43
|
```
|
|
@@ -10,7 +10,7 @@ When handling user touch interactions beyond basic `onTap` — drag-to-reorder,
|
|
|
10
10
|
|
|
11
11
|
Valdi gesture handling is **attribute-based on `<view>` elements**. Each gesture type has three attributes:
|
|
12
12
|
- `on<Gesture>` — the callback
|
|
13
|
-
-
|
|
13
|
+
- `on<Gesture>Disabled` — boolean to disable the gesture (the gesture is enabled by default once a callback is set; there is no `<gesture>Enabled` attribute)
|
|
14
14
|
- `on<Gesture>Predicate` — function returning boolean, controls whether the gesture should fire
|
|
15
15
|
|
|
16
16
|
The topmost visible element with a matching gesture wins. Conflicting gestures on parent elements are suppressed.
|
|
@@ -60,7 +60,7 @@ private handleTap = (event: TouchEvent) => {
|
|
|
60
60
|
// ✅ Long press with custom duration
|
|
61
61
|
<view
|
|
62
62
|
onLongPress={this.handleLongPress}
|
|
63
|
-
longPressDuration={
|
|
63
|
+
longPressDuration={0.5} // seconds before trigger
|
|
64
64
|
>
|
|
65
65
|
<label value="Hold me" />
|
|
66
66
|
</view>
|
|
@@ -143,7 +143,7 @@ Inside a `<scroll>`, touches are delayed to avoid conflicts with scrolling:
|
|
|
143
143
|
// ✅ Delay touch recognition inside scrollable content
|
|
144
144
|
<view
|
|
145
145
|
onTouch={this.handleTouch}
|
|
146
|
-
onTouchDelayDuration={
|
|
146
|
+
onTouchDelayDuration={0.15} // seconds before onTouch fires during scroll
|
|
147
147
|
/>
|
|
148
148
|
```
|
|
149
149
|
|
|
@@ -119,6 +119,7 @@ const cardStyle = new Style<View>({ backgroundColor: '#fff', borderRadius: 8 });
|
|
|
119
119
|
| `Row` | `Row` | `flexDirection: 'row'` | `<view flexDirection="row">` |
|
|
120
120
|
| `Stack` | `Box` with `align` | `position: absolute` | `<view>` + children with `position="absolute"` |
|
|
121
121
|
| `Modifier.padding(16.dp)` | `Modifier.padding(16.dp)` | `style={{padding:16}}` | `padding={16}` on any element |
|
|
122
|
+
| `Wrap(spacing:)` / spacers | `Arrangement.spacedBy(8.dp)` | CSS `gap` | `gap` / `rowGap` / `columnGap` (newly available via Yoga; margins still common in practice) |
|
|
122
123
|
| `Navigator.push` | `navController.navigate("route")` | `navigate()` / `router.push` | `navigationController.push(Page, vm, ctx)` |
|
|
123
124
|
| `Navigator.pop` | `navController.popBackStack()` | `goBack()` / `router.back` | `navigationController.pop()` |
|
|
124
125
|
| `showModalBottomSheet` | `ModalBottomSheet` / `Dialog` | `<Modal>` | `navigationController.present(Page, vm, ctx)` |
|
|
@@ -126,7 +127,7 @@ const cardStyle = new Style<View>({ backgroundColor: '#fff', borderRadius: 8 });
|
|
|
126
127
|
| `SharedPreferences` | `SharedPreferences` / `DataStore` | `AsyncStorage` / `localStorage` | `PersistentStore` (valdi persistence) |
|
|
127
128
|
| `http.get()` / `dio` | `viewModelScope.launch { api.get() }` | `fetch()` / `axios` | `HTTPClient.get()` (valdi_http) |
|
|
128
129
|
| `Lottie` | `LottieAnimation` | `<Lottie>` | `<animatedimage>` |
|
|
129
|
-
| `BackdropFilter` | `BlurMaskFilter` | CSS `backdrop-filter` | `<blur>` (iOS
|
|
130
|
+
| `BackdropFilter` | `BlurMaskFilter` | CSS `backdrop-filter` | `<blur>` (iOS); `<glass>` for Liquid Glass (iOS 26+; falls back to a blur on older iOS, plain view on Android). Tint with `glassTintColor`, not `backgroundColor` |
|
|
130
131
|
|
|
131
132
|
## Key import paths
|
|
132
133
|
|
|
@@ -96,7 +96,7 @@ Common widgets in `widgets/`:
|
|
|
96
96
|
| Tappable row | `onTap` on `<view>` |
|
|
97
97
|
| Scrollable list | `<scroll>` wrapping children |
|
|
98
98
|
| Fixed header + scrolling body | Outer `<view>` with header + `<scroll flexGrow={1}>` body |
|
|
99
|
-
| Spacer between items | margin on children
|
|
99
|
+
| Spacer between items | margin on children, or `gap` on the parent (newly available via Yoga) |
|
|
100
100
|
|
|
101
101
|
---
|
|
102
102
|
|
|
@@ -186,12 +186,12 @@ class MyComponent extends StatefulComponent<VM, State> {
|
|
|
186
186
|
- Prefer `padding` and `margin` shorthand: `padding: '16 20'` (vertical horizontal)
|
|
187
187
|
- Colors: use hex strings `'#RRGGBB'` or `'#RRGGBBAA'`
|
|
188
188
|
- Layout: Yoga flexbox — `flexDirection`, `justifyContent`, `alignItems`, `flexGrow`
|
|
189
|
-
-
|
|
189
|
+
- `gap`/`rowGap`/`columnGap` now exist (Yoga layout props on View/Layout); margin on children still works and remains the common convention in practice
|
|
190
190
|
- No `fontSize` — use `font` string on labels
|
|
191
191
|
- Overflow: only `'visible'` or `'scroll'` (NOT `'hidden'`)
|
|
192
192
|
- **`opacity` must be a number**, not a string: `opacity: 0.3` (NOT `'0.3'`)
|
|
193
193
|
- **`flexGrow` must be a number**, not a string: `flexGrow: 1` (NOT `'1'`)
|
|
194
|
-
- **
|
|
194
|
+
- **Font weights**: `system`, `system-medium`, `system-semibold`, `system-bold`, plus italic variants (`system-italic`, `system-medium-italic`, …). Prefer the `SystemFont` helpers (`systemSemiboldFont(16)`). Only `system-light` does not exist.
|
|
195
195
|
- **ScrollView has no `flexDirection`** — `<scroll>` always scrolls vertically, do not set flexDirection on it
|
|
196
196
|
- `boxShadow` format: `'xOffset yOffset blur color'` e.g. `'0 2 8 rgba(0,0,0,0.12)'`
|
|
197
197
|
|
|
@@ -204,7 +204,7 @@ class MyComponent extends StatefulComponent<VM, State> {
|
|
|
204
204
|
- No `flex: 1` — use `flexGrow: 1` (number, not string).
|
|
205
205
|
- `flexGrow` must be a number, not a string.
|
|
206
206
|
- `Shape` is not exported — use `ShapeView` from NativeTemplateElements.
|
|
207
|
-
- `font
|
|
207
|
+
- `font` weights `system` / `system-medium` / `system-semibold` / `system-bold` (+ italic variants) all work; only `system-light` is absent.
|
|
208
208
|
- `overflow: 'hidden'` doesn't exist — only `'visible'` or `'scroll'`.
|
|
209
209
|
- `flexDirection` on `<scroll>` doesn't exist — ScrollView always scrolls vertically.
|
|
210
210
|
|
|
@@ -214,9 +214,12 @@ opacity: '0.3' // WRONG — TypeScript error
|
|
|
214
214
|
overflow: 'visible' // CORRECT
|
|
215
215
|
overflow: 'hidden' // WRONG — only 'visible' or 'scroll'
|
|
216
216
|
|
|
217
|
-
//
|
|
217
|
+
// Font weights: system, system-medium, system-semibold,
|
|
218
|
+
// system-bold, + italic variants all render. Prefer the SystemFont helpers.
|
|
218
219
|
font: 'system-bold 16' // CORRECT
|
|
219
|
-
font: 'system-semibold 16' //
|
|
220
|
+
font: 'system-semibold 16' // CORRECT (systemSemiboldFont(16))
|
|
221
|
+
font: 'system-medium 14' // CORRECT (systemMediumFont(14))
|
|
222
|
+
font: 'system-light 14' // WRONG — system-light does not exist
|
|
220
223
|
|
|
221
224
|
// flexGrow is a number
|
|
222
225
|
flexGrow: 1 // CORRECT
|
|
@@ -245,9 +248,9 @@ import { Image } from 'valdi_tsx/src/NativeTemplateElements';
|
|
|
245
248
|
// CORRECT: <image> is a JSX intrinsic, not an importable class
|
|
246
249
|
// Use Style<View> for image container styles
|
|
247
250
|
|
|
248
|
-
//
|
|
249
|
-
new Style<View>({ flexDirection: 'row', gap:
|
|
250
|
-
//
|
|
251
|
+
// OK: gap / rowGap / columnGap now exist on View/Layout (Yoga layout props)
|
|
252
|
+
new Style<View>({ flexDirection: 'row', gap: 8 })
|
|
253
|
+
// margins still work and remain the common convention:
|
|
251
254
|
// In JSX: <view marginRight={8}> or margin="0 8 0 0"
|
|
252
255
|
|
|
253
256
|
// WRONG: icon typed as string
|
|
@@ -432,7 +435,7 @@ The pixel diff misses small semantic differences (e.g., gray icon vs blue badge)
|
|
|
432
435
|
|
|
433
436
|
**`overflow: 'hidden'` error** -- Only `'visible'` or `'scroll'` supported.
|
|
434
437
|
|
|
435
|
-
|
|
438
|
+
**Font weights** -- `system`, `system-medium`, `system-semibold`, and `system-bold` (plus italic variants) all render; prefer the `SystemFont` helpers (`systemSemiboldFont(16)`). Only `system-light` does not exist.
|
|
436
439
|
|
|
437
440
|
**Pixel diff shows stretched layout** -- Missing 390px phone frame in PreviewRoot.
|
|
438
441
|
|
|
@@ -63,4 +63,5 @@ valdi agent-check --module X --quick --json # Quick check with machine-readab
|
|
|
63
63
|
- **Comprehensive guide**: `/AGENTS.md`
|
|
64
64
|
- **AI tooling**: `/docs/docs/ai-tooling.md`
|
|
65
65
|
- **Support**: `/SUPPORT.md`
|
|
66
|
-
- **
|
|
66
|
+
- **Discussions**: https://github.com/Snapchat/Valdi/discussions
|
|
67
|
+
- **Issues**: https://github.com/Snapchat/Valdi/issues
|