wip convo ui

This commit is contained in:
2026-06-23 00:59:06 +01:00
parent 25713ef614
commit 57c3275cce
30 changed files with 1649 additions and 251 deletions

View File

@@ -0,0 +1,23 @@
diff --git a/out/shared/disjoint.js b/out/shared/disjoint.js
index 9fb94ad4f257b95225536eb5fdf20eaf6193b7a6..377af13b28807b1943f14240c1e889c3b16efe94 100644
--- a/out/shared/disjoint.js
+++ b/out/shared/disjoint.js
@@ -48,11 +48,17 @@ export class Disjoint extends Array {
return result;
}
withPrefixKey(key, kind) {
- return this.map(entry => ({
+ const result = this.map(entry => ({
...entry,
path: [key, ...entry.path],
optional: entry.optional || kind === "optional"
}));
+ // Workaround for Static Hermes, which doesn't preserve the Disjoint Array subclass here.
+ // Mirrors the existing invert() guard added for https://github.com/arktypeio/arktype/issues/1027
+ // and covers the same failure mode reported in https://github.com/arktypeio/arktype/issues/1415.
+ if (!(result instanceof Disjoint))
+ return new Disjoint(...result);
+ return result;
}
toNeverIfDisjoint() {
return $ark.intrinsic.never;

18
patches/README.md Normal file
View File

@@ -0,0 +1,18 @@
# Dependency Patches
## `@ark/schema@0.56.0`
`@ark/schema` is patched for React Native/Hermes compatibility.
ArkType's internal `Disjoint` type extends `Array`. In Hermes, `Array.prototype.map()`
does not always preserve the subclass instance. If `Disjoint.withPrefixKey()` returns
a plain array, later ArkType reduction code can call schema methods such as `isRoot()`
on that array and crash during app startup.
The patch mirrors ArkType's existing guard in `Disjoint.invert()` by wrapping the
mapped result back into `new Disjoint(...)` when Hermes returns a plain array.
Upstream context:
- https://github.com/arktypeio/arktype/issues/1415
- https://github.com/arktypeio/arktype/issues/1027