@octanejs/zag 0.0.8 → 0.0.10

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.
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2026 Dominic Gannaway
3
+ Copyright (c) 2021 Chakra UI
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/UPSTREAM.md CHANGED
@@ -11,13 +11,21 @@
11
11
  | React oracle | `19.2.7` with `@types/react@19.2.7` and `@types/react-dom@19.2.3` (`catalog:zag-react-oracle`) |
12
12
  | Testing Library oracle | `@testing-library/react@16.3.2` (`catalog:zag-react-oracle`; satisfies upstream `^16.3.2`) |
13
13
  | jsdom oracle | `29.0.1` (`catalog:zag-react-oracle`; satisfies upstream `^29.0.1`) |
14
- | Vendored tree integrity | `sha256:037f857d00462559b9790acc2214c818678eb9d61970d6c394dc26dcfcd1516d` (`packages/zag/upstream/SHA256SUMS`) |
15
- | License | MIT, © Chakra UI |
14
+ | Pinned tree integrity | `audit/upstream.lock.json` (fingerprint `3883ca3c33ce1b95fcb8b5d8969c267081eabc0ff6a295d8415d4f2184974114`; per-file git blob shas) |
15
+ | License | MIT, © Chakra UI (`LICENSE.upstream`, hash-matched to the lock) |
16
16
 
17
17
  Repository: `https://github.com/chakra-ui/zag.git`. The npm artifact publishes
18
18
  compiled `dist/` output. The framework adapter source and its Vitest suite at
19
- this pin live under `packages/frameworks/react` in the canonical repository and
20
- are vendored byte-exact at `packages/zag/upstream/` (MIT). Framework-agnostic
19
+ this pin live under `packages/frameworks/react` in the canonical repository.
20
+ They are committed byte-exact under `packages/zag/upstream/` and pinned by
21
+ `audit/upstream.lock.json`, which records each file's git blob sha — its
22
+ content address in the upstream repository — so the committed copy verifies
23
+ offline against the pinned commit (`pnpm react-port:materialize run --check`).
24
+ The adapted suite regenerates into `tests/upstream/` (git-ignored) from the
25
+ pristine bytes plus the lock's mechanical `adaptedRewrites`; every mapped file
26
+ currently needs no divergence patch, and the pinned StrictMode suite is
27
+ dispositioned out via its committed `.skip` rationale in
28
+ `audit/upstream-patches/`. Framework-agnostic
21
29
  `@zag-js/core`, `@zag-js/store`, `@zag-js/types`, and `@zag-js/utils` at the same
22
30
  version are reused unchanged and are not reimplemented here.
23
31
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@octanejs/zag",
3
- "version": "0.0.8",
3
+ "version": "0.0.10",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "engines": {
@@ -32,7 +32,8 @@
32
32
  "files": [
33
33
  "src",
34
34
  "README.md",
35
- "UPSTREAM.md"
35
+ "UPSTREAM.md",
36
+ "LICENSE.upstream"
36
37
  ],
37
38
  "exports": {
38
39
  ".": "./src/index.ts"
@@ -44,7 +45,7 @@
44
45
  "@zag-js/utils": "1.42.0"
45
46
  },
46
47
  "peerDependencies": {
47
- "octane": "0.1.42"
48
+ "octane": "0.1.44"
48
49
  },
49
50
  "devDependencies": {
50
51
  "@tsrx/react": "^0.2.58",
@@ -59,13 +60,14 @@
59
60
  "@testing-library/react": "16.3.2",
60
61
  "@vitejs/plugin-react": "^6.0.3",
61
62
  "jsdom": "29.0.1",
62
- "octane": "0.1.42",
63
- "@octanejs/testing-library": "0.1.39"
63
+ "octane": "0.1.44",
64
+ "@octanejs/testing-library": "0.1.41"
64
65
  },
65
66
  "scripts": {
66
- "test": "vitest run --root ../.. --project zag --project zag-differential --project zag-ssr --project zag-pristine",
67
- "test:upstream": "node scripts/run-pristine-upstream.mjs",
67
+ "test": "pnpm upstream:materialize && vitest run --root ../.. --project zag --project zag-differential --project zag-ssr --project zag-pristine",
68
+ "test:upstream": "node ../../scripts/react-parity/run-pristine.mjs zag",
68
69
  "typecheck": "tsrx-tsc --noEmit -p tsconfig.json && tsrx-tsc --noEmit -p typetests/tsconfig.json",
69
- "upstream:verify": "node scripts/verify-upstream.mjs"
70
+ "upstream:materialize": "node ../../scripts/react-port/materialize.mjs run --package-dir .",
71
+ "upstream:verify": "node ../../scripts/react-port/materialize.mjs run --check --package-dir ."
70
72
  }
71
73
  }
package/src/internal.ts CHANGED
@@ -1,29 +1,6 @@
1
- const subSlotCache = new Map<symbol, Map<string, symbol>>();
2
- const bareSlotCache = new Map<string, symbol>();
1
+ import { createSubSlot } from 'octane';
3
2
 
4
- export function subSlot(slot: symbol | undefined, tag: string): symbol {
5
- if (slot === undefined) {
6
- let bare = bareSlotCache.get(tag);
7
- if (bare === undefined) {
8
- bare = Symbol.for(`@octanejs/zag:${tag}`);
9
- bareSlotCache.set(tag, bare);
10
- }
11
- return bare;
12
- }
13
-
14
- let byTag = subSlotCache.get(slot);
15
- if (byTag === undefined) {
16
- byTag = new Map();
17
- subSlotCache.set(slot, byTag);
18
- }
19
-
20
- let child = byTag.get(tag);
21
- if (child === undefined) {
22
- child = Symbol.for(`${slot.description ?? ''}:${tag}`);
23
- byTag.set(tag, child);
24
- }
25
- return child;
26
- }
3
+ export const subSlot = createSubSlot({ slotlessPrefix: '@octanejs/zag:' });
27
4
 
28
5
  export function splitSlot(args: unknown[]): [unknown[], symbol | undefined] {
29
6
  const tail = args[args.length - 1];