@bun-native/renderer 0.33.2 → 0.33.4

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/README.md CHANGED
@@ -2,4 +2,4 @@
2
2
 
3
3
  Native element tree and batching shared by Bun Native adapters.
4
4
 
5
- Part of [Bun Native](https://github.com/0xPlayerOne/bun-native), an experimental developer preview. Version 0.33.2 was built from [577f6fc5015b](https://github.com/0xPlayerOne/bun-native/tree/577f6fc5015b6eeef956efcc63f97e2a749d74ff) and published from GitHub Actions with npm provenance. Use the Bun revision pinned in that commit's toolchain.json. Start with the [getting-started guide](https://github.com/0xPlayerOne/bun-native/blob/577f6fc5015b6eeef956efcc63f97e2a749d74ff/docs/getting-started.md); `bun-native host install` fetches the matching release host. The license notice is in LICENSE.
5
+ Part of [Bun Native](https://github.com/0xPlayerOne/bun-native), an experimental developer preview. Version 0.33.4 was built from [15878c8be33a](https://github.com/0xPlayerOne/bun-native/tree/15878c8be33a5e2e551ec410efa913d766322d58) and published from GitHub Actions with npm provenance. Use the Bun revision pinned in that commit's toolchain.json. Start with the [getting-started guide](https://github.com/0xPlayerOne/bun-native/blob/15878c8be33a5e2e551ec410efa913d766322d58/docs/getting-started.md); `bun-native host install` fetches the matching release host. The license notice is in LICENSE.
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "commit": "577f6fc5015b6eeef956efcc63f97e2a749d74ff",
4
- "tree": "c599e781af2ce0749d5e3a6d8700834690e872f4",
3
+ "commit": "15878c8be33a5e2e551ec410efa913d766322d58",
4
+ "tree": "a171291687ce489ba071fee44181bde13ce4a858",
5
5
  "files": {
6
6
  "package.json": {
7
7
  "bytes": 2258,
8
- "sha256": "38e2f0f89b5f6c4ba80b3baefcdf0806dd73c684294153df74ab470fda6bf3f9"
8
+ "sha256": "18b028c0ddc8ed94f8dc8c8bb8e3e953a19ba65818acf19b829d70221caeca6b"
9
9
  },
10
10
  "packages/renderer/package.json": {
11
11
  "bytes": 192,
@@ -24,8 +24,8 @@
24
24
  "sha256": "efe908fe1df1d14a7cbc1e3e30e8e76dc888fb865dca6b203bf91c18f3bb4d02"
25
25
  },
26
26
  "packages/renderer/src/native-tree.ts": {
27
- "bytes": 10697,
28
- "sha256": "9bf0216b2adf0f2ac44d0d9bc0fd15f1b4501c333fc9b664c711e1e2960a4267"
27
+ "bytes": 10947,
28
+ "sha256": "6e42f29c1405b4f728b6df0b9ef1f959ac403516a9a99582354c513d7e9e91ac"
29
29
  },
30
30
  "packages/renderer/src/nodes.ts": {
31
31
  "bytes": 27579,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bun-native/renderer",
3
- "version": "0.33.2",
3
+ "version": "0.33.4",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "files": [
@@ -15,7 +15,7 @@
15
15
  "exports": "./src/index.ts",
16
16
  "description": "Native element tree and batching shared by Bun Native adapters.",
17
17
  "dependencies": {
18
- "@bun-native/core": "0.33.2"
18
+ "@bun-native/core": "0.33.4"
19
19
  },
20
20
  "repository": {
21
21
  "type": "git",
@@ -180,7 +180,11 @@ export async function commitNativeTree(
180
180
  if (kept === 0) continue
181
181
  const retained = new Set(after.slice(start, afterEnd))
182
182
  const lost = new Set<Node>()
183
- for (let index = start; index < end; index += 1) {
183
+ // A pure suffix can leave last-first, making each core/native removal a tail pop.
184
+ const tail = afterEnd === start && end === before.length
185
+ const stop = tail ? start - 1 : end
186
+ const step = tail ? -1 : 1
187
+ for (let index = tail ? end - 1 : start; index !== stop; index += step) {
184
188
  const node = before[index]!
185
189
  if (changes.has(node) || retained.has(node)) continue
186
190
  rescue(node)