@oh-just-another/history 0.57.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/CHANGELOG.md ADDED
@@ -0,0 +1,13 @@
1
+ # @oh-just-another/history
2
+
3
+ ## 0.57.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Version bump just for publishing.
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies
12
+ - @oh-just-another/scene@0.57.0
13
+ - @oh-just-another/types@0.57.0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Rustam Garifulin
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,54 @@
1
+ # @oh-just-another/history
2
+
3
+ L1 undo / redo for `@oh-just-another/scene` patches.
4
+
5
+ Pure logic — no DOM, no Node API. Depends only on `@types` and `@scene`. The class owns no scene; callers push patches and apply the returned inverse / replay patches themselves.
6
+
7
+ ## Why a separate package
8
+
9
+ History is what's needed to make `Editor` (in `@state`) commit drags as a single undo step, but it is also useful outside the editor:
10
+
11
+ - A collab pipeline (Phase 13) can reuse the patch-based model.
12
+ - A headless / CLI tool can rebuild scenes by replaying patches.
13
+ - A server can audit operations by collecting `Patch`es from clients.
14
+
15
+ ## Quick start
16
+
17
+ ```ts
18
+ import { History } from "@oh-just-another/history";
19
+ import { apply } from "@oh-just-another/scene";
20
+
21
+ const history = new History({ limit: 100 });
22
+
23
+ // Single op
24
+ history.push(patch);
25
+ scene = apply(scene, history.undo()!); // returns the inverse to apply
26
+ scene = apply(scene, history.redo()!); // re-apply the original
27
+
28
+ // Gesture: many patches → one undo step
29
+ const tx = history.transaction();
30
+ for (const p of dragPatches) tx.add(p);
31
+ tx.commit(); // merged per entity: 100 moves of one shape collapse to 1
32
+ ```
33
+
34
+ ## API
35
+
36
+ | Name | Purpose |
37
+ | ------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
38
+ | `new History(options?)` | Construct. `options.limit` (default `Infinity`), `options.mergeTransactions` (default `true`). |
39
+ | `push(patch)` | Append. Clears the redo stack. No-ops are skipped. |
40
+ | `undo() / redo()` | Return the patch to apply (inverse for undo), or `null` if empty. Moves the record onto the other stack. |
41
+ | `canUndo / canRedo / size / redoSize` | Stack introspection. |
42
+ | `clear()` | Drop both stacks. |
43
+ | `transaction()` | Open a transaction. Returns `{ add, commit, cancel, isOpen }`. |
44
+ | `hasOpenTransaction()` | True between `transaction()` and `commit/cancel()`. |
45
+ | `record(patch, { transaction? })` | Route through a given open transaction, or `push` directly. |
46
+ | `mergeByEntity(patches)` | Standalone helper: collapses a patch list per entity (first.`before` / latest.`after`). Used internally too. |
47
+
48
+ ## Design notes
49
+
50
+ - **`History` owns no scene.** Returning patches (not applying them) keeps the class trivial to test, lets the host integrate with any state container, and makes the same instance reusable for offline replay.
51
+ - **`undo()` returns the _inverse_ patch; `redo()` returns the _original_.** That is the form callers need at the application site.
52
+ - **Transactions merge per entity by default.** A 100-tick drag of one shape becomes one undo record with `before = shape-at-press`, `after = shape-at-up`. Disable for debug logs that want every intermediate state.
53
+ - **Selection should not be a patch.** Most editors (standard, standard) exclude selection from undo. The kernel doesn't enforce it — just don't `push` selection-only changes.
54
+ - **Branches (CRDT)** will live alongside the linear stack when Phase 13 lands; the API will gain an `apply(remotePatch)` path without breaking `undo/redo` semantics for local operations.
@@ -0,0 +1 @@
1
+ {"fileNames":["../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../types/dist/vec2.d.ts","../../types/dist/bounds.d.ts","../../types/dist/transform.d.ts","../../types/dist/color.d.ts","../../types/dist/ids.d.ts","../../types/dist/events.d.ts","../../types/dist/index.d.ts","../../scene/dist/style.d.ts","../../scene/dist/constants.d.ts","../../../node_modules/.pnpm/fractional-keys@0.1.1/node_modules/fractional-keys/dist/types.d.ts","../../../node_modules/.pnpm/fractional-keys@0.1.1/node_modules/fractional-keys/dist/generate.d.ts","../../../node_modules/.pnpm/fractional-keys@0.1.1/node_modules/fractional-keys/dist/jitter.d.ts","../../../node_modules/.pnpm/fractional-keys@0.1.1/node_modules/fractional-keys/dist/digits.d.ts","../../../node_modules/.pnpm/fractional-keys@0.1.1/node_modules/fractional-keys/dist/errors.d.ts","../../../node_modules/.pnpm/fractional-keys@0.1.1/node_modules/fractional-keys/dist/index.d.ts","../../scene/dist/edge.d.ts","../../scene/dist/shape.d.ts","../../scene/dist/edge-curve.d.ts","../../scene/dist/annotation.d.ts","../../scene/dist/file.d.ts","../../scene/dist/layer.d.ts","../../scene/dist/viewport.d.ts","../../scene/dist/patch.d.ts","../../scene/dist/scene.d.ts","../../scene/dist/edge-geometry.d.ts","../../scene/dist/operations.d.ts","../../scene/dist/render-bounds.d.ts","../../scene/dist/text-measure.d.ts","../../scene/dist/anchors.d.ts","../../scene/dist/snap.d.ts","../../scene/dist/outline.d.ts","../../scene/dist/annotation-geometry.d.ts","../../scene/dist/spatial.d.ts","../../scene/dist/queries.d.ts","../../scene/dist/a11y.d.ts","../../scene/dist/layout.d.ts","../../scene/dist/layout-registry.d.ts","../../scene/dist/elbow-router.d.ts","../../scene/dist/elbow-link.d.ts","../../scene/dist/heading.d.ts","../../scene/dist/diff.d.ts","../../scene/dist/three-way-merge.d.ts","../../scene/dist/container.d.ts","../../scene/dist/index.d.ts","../src/describe.ts","../src/merge.ts","../src/provider.ts","../src/history.ts","../src/index.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/compatibility/disposable.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/compatibility/indexable.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/compatibility/iterators.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/compatibility/index.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/globals.typedarray.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/buffer.buffer.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/globals.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/web-globals/abortcontroller.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/web-globals/domexception.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/web-globals/events.d.ts","../../../node_modules/.pnpm/buffer@5.7.1/node_modules/buffer/index.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/header.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/readable.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/file.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/fetch.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/formdata.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/connector.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/client.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/errors.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/dispatcher.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/global-dispatcher.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/global-origin.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/pool-stats.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/pool.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/handlers.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/balanced-pool.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/agent.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-interceptor.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-agent.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-client.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-pool.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-errors.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/proxy-agent.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/env-http-proxy-agent.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/retry-handler.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/retry-agent.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/api.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/interceptors.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/util.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/cookies.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/patch.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/websocket.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/eventsource.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/filereader.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/diagnostics-channel.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/content-type.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/cache.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/index.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/web-globals/fetch.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/web-globals/navigator.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/web-globals/storage.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/assert.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/assert/strict.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/async_hooks.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/buffer.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/child_process.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/cluster.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/console.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/constants.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/crypto.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/dgram.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/dns.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/dns/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/domain.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/events.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/fs.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/fs/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/http.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/http2.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/https.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/inspector.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/inspector.generated.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/module.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/net.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/os.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/path.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/process.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/punycode.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/querystring.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/readline.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/readline/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/repl.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/sea.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/sqlite.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/stream.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/stream/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/stream/web.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/string_decoder.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/test.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/timers.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/timers/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/tls.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/trace_events.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/tty.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/url.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/util.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/v8.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/vm.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/wasi.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/worker_threads.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/zlib.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/index.d.ts"],"fileIdsList":[[112,158,159,161,178,179],[112,160,161,178,179],[161,178,179],[112,161,166,178,179,196],[112,161,162,167,172,178,179,181,193,204],[112,161,162,163,172,178,179,181],[112,161,178,179],[107,108,109,112,161,178,179],[112,161,164,178,179,205],[112,161,165,166,173,178,179,182],[112,161,166,178,179,193,201],[112,161,167,169,172,178,179,181],[112,160,161,168,178,179],[112,161,169,170,178,179],[112,161,171,172,178,179],[112,160,161,172,178,179],[112,161,172,173,174,178,179,193,204],[112,161,172,173,174,178,179,188,193,196],[112,154,161,169,172,175,178,179,181,193,204],[112,161,172,173,175,176,178,179,181,193,201,204],[112,161,175,177,178,179,193,201,204],[110,111,112,113,114,115,116,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210],[112,161,172,178,179],[112,161,178,179,180,204],[112,161,169,172,178,179,181,193],[112,161,178,179,182],[112,161,178,179,183],[112,160,161,178,179,184],[112,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210],[112,161,178,179,186],[112,161,178,179,187],[112,161,172,178,179,188,189],[112,161,178,179,188,190,205,207],[112,161,173,178,179],[112,161,172,178,179,193,194,196],[112,161,178,179,195,196],[112,161,178,179,193,194],[112,161,178,179,196],[112,161,178,179,197],[112,158,161,178,179,193,198,204],[112,161,172,178,179,199,200],[112,161,178,179,199,200],[112,161,166,178,179,181,193,201],[112,161,178,179,202],[112,161,178,179,181,203],[112,161,175,178,179,187,204],[112,161,166,178,179,205],[112,161,178,179,193,206],[112,161,178,179,180,207],[112,161,178,179,208],[112,154,161,178,179],[112,154,161,172,174,178,179,184,193,196,204,206,207,209],[112,161,178,179,193,210],[67,112,161,178,179],[67,68,69,70,71,112,161,178,179],[112,126,130,161,178,179,204],[112,126,161,178,179,193,204],[112,121,161,178,179],[112,123,126,161,178,179,201,204],[112,161,178,179,181,201],[112,161,178,179,211],[112,121,161,178,179,211],[112,123,126,161,178,179,181,204],[112,118,119,122,125,161,172,178,179,193,204],[112,126,133,161,178,179],[112,118,124,161,178,179],[112,126,147,148,161,178,179],[112,122,126,161,178,179,196,204,211],[112,147,161,178,179,211],[112,120,121,161,178,179,211],[112,126,161,178,179],[112,120,121,122,123,124,125,126,127,128,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,148,149,150,151,152,153,161,178,179],[112,126,141,161,178,179],[112,126,133,134,161,178,179],[112,124,126,134,135,161,178,179],[112,125,161,178,179],[112,118,121,126,161,178,179],[112,126,130,134,135,161,178,179],[112,130,161,178,179],[112,124,126,129,161,178,179,204],[112,118,123,126,133,161,178,179],[112,161,178,179,193],[112,121,126,147,161,178,179,209,211],[101,112,161,178,179],[101,103,104,112,161,178,179],[102,103,104,105,112,161,178,179],[101,105,112,161,178,179],[74,112,161,178,179],[64,73,74,112,161,178,179],[64,76,81,112,161,178,179],[64,112,161,178,179],[64,74,81,112,161,178,179],[64,81,112,161,178,179],[64,73,75,81,112,161,178,179],[64,65,72,112,161,178,179],[64,73,81,112,161,178,179],[64,74,112,161,178,179],[65,66,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,112,161,178,179],[64,72,112,161,178,179],[64,80,81,112,161,178,179],[64,74,80,81,112,161,178,179],[64,73,74,76,78,79,80,81,112,161,178,179],[64,73,74,76,77,78,79,112,161,178,179],[64,73,74,78,81,90,112,161,178,179],[64,72,73,74,76,77,78,79,80,112,161,178,179],[64,65,72,73,112,161,178,179],[58,112,161,178,179],[58,59,60,61,62,63,112,161,178,179]],"fileInfos":[{"version":"c430d44666289dae81f30fa7b2edebf186ecc91a2d4c71266ea6ae76388792e1","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"ee7bad0c15b58988daa84371e0b89d313b762ab83cb5b31b8a2d1162e8eb41c2","impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"fb0f136d372979348d59b3f5020b4cdb81b5504192b1cacff5d1fbba29378aa1","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"a680117f487a4d2f30ea46f1b4b7f58bef1480456e18ba53ee85c2746eeca012","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","affectsGlobalScope":true,"impliedFormat":1},{"version":"3925a6c820dcb1a06506c90b1577db1fdbf7705d65b62b99dce4be75c637e26b","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a3d63ef2b853447ec4f749d3f368ce642264246e02911fcb1590d8c161b8005","affectsGlobalScope":true,"impliedFormat":1},{"version":"8cdf8847677ac7d20486e54dd3fcf09eda95812ac8ace44b4418da1bbbab6eb8","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},"a9dc2e59fb40b94411bd995a0013c15385b99599a18b7141cf3eafd80c7f0f96","4015dc819b09b93f989d4df8f1f0f36cb99cb2aad8102ab8b4b27fb6020beb5f","ed06a7b359e2125c375f6bada6631fd038473dd624309b8a43a824693a6f6c89","46fa0b276ad58dc963c574f72bb9456b881f3d61bc0fe6827c24f3f02baa6038","1f0260dbafda11af88b11f1b6d662ee45517d44c8cc9a7248bd61d2d8ab1f880","502657b9a54e290098ba4f955efa476b91648b24d5310b8c6e7aa0d4cf8945ae","90755de39a18e2894ad3cced6cdf4cb670e09868b01a6f6465af558d865bf848","b8e3c1f3a85e05bcbc56fa28558cffc68ac40e4158afdc2d702ea825ce21d14d","c196961c4aa13e3bf28a7e56ac7fa0b0cbfc668eca4496292d629dd18f43296b",{"version":"bce89d3ef847715b91ffd525a157c779be8fafebe823671815f7ce96f27afcda","impliedFormat":99},{"version":"c67f9d85070618f586d632cf184b986eb604f426b90aa68ecdad1ac68ca3151c","impliedFormat":99},{"version":"c656cc6ded557aff87a6c823142852e3548c6a14f84bb48ee35c3e57b6ebc03b","impliedFormat":99},{"version":"0e34130243c29d8d826f868c4e00ff586b349627cb241b3d89f0459a6cdeff4d","impliedFormat":99},{"version":"d555c6cb465cc5cf8127adbbc496720d5200c9dfafa777bbf9dfdea74ebfe3a3","impliedFormat":99},{"version":"27a6936a863edf777150af3ebc65939fa34f51d68385f8a7f198d8ea53685a4d","impliedFormat":99},"17ee722c53770caad5479081a3db9f0df8135a8f061ea9ce57a507ca0c424cce","78bde316dcb094df77d06b893e0b965d318ac5708d09e7cf6206931263be32e6","d081374b0bf74e2748138e8b0a56458e12e2ee7bd07fb239b92c97a33bba8d70","b85f83aa4b7fb1abc375a73cb706295a146b9f22cf9fa5ec89105fcff6ea1495","fd0cd0a179e95f7d4d5f7370209f6b413006242a045137d33ca230ae015ba760","fa716666e5bedc99e38d37def5182924b9dd9e6298c2751f8cebe0fc631ef697","48280d2635c39dd226b7e5bb71d0519f355b60d4d92e9f6b5b4a427aa28412f8","8bdcd8a58fead736e81808193884907482c8d354f13a0516e9b236a07622c727","8ebfa15cb2e79b885a21ae5f92507b5b9dd9b01041143554903c163f86611849","4233c4d8ac9cb79b3b71e4923eb486f08f5f2c6508fc177192081a402bee38b3","dfa88df7638cc24634255691d0a3fb72a4910b73211da89fab8f2362730cb3b2","75ea946ee4d31489f494b0def56b2db669c3aac052713387d6edc51dc2ca86db","26ce9aa6f798212e39770c45142239f3a54fa63697ba90bae90c6d7ac7da825a","eceda86937454d399a4e4cd4a3e25835a4ac80ab930f399b20f53d8f1c772457","8b12bcaa49f76ee1ce7f77943a297078dba53abedd344da6d370012eab482c07","ebfed381c5296dbb1ebae8265ca08dbce33929fa829f6ac11f2f591beb1f4485","ae557ba7a3d28e8909ac395365eb5f8ff63bc28eb2eaace61650ed51f1bc1808","95784f449b26dbdf4aadd2f99a5c2f6c419d80f993ececa6c0c3e0159b452aa5","89c0f7c64772fcb38eda1e15b26da3e53e4101c968a0eeb14954f154aee4dac1","6e7e44d7615d2899c2dd6be4e15bbb2cd0b7f4afec2379c08db14b9eac5c9b43","a1f5b4a129cd4b8f013533f200baf74615d690c41f1ef2147bd40ef6110c4a1b","d1b901b618ec72bff0fcb657edf03d83e2bcbb2687a9cddadea48a24ab23faf2","9a02cb3cccc3eeb3fea9327c47dbda2076e21f3da7b2eb659871dc91b8572f42","1778dfd35a7d5885896c436792662c8d602ea8cf03aeed97b0381b6e82c4e980","f730ff4577c8d45cb4a587d078ee5b692613c3de57f26a27a4be74c183adc226","60bd456f1b63861f880c386ddf1b3916098bbafbf4b5a46a5e5ebc4fcb9434c4","f2c0b5b634eed4010d9396710281a7fdc7019fe47507e8bcb706a58af985548a","baeb8f9be968778478ffa26099ec4211dd28c6dea1633fd8fd1560c34fdd0269","5df76ca2d799039334a825b621129061b89022808e0943397e045bc6feec894c",{"version":"05d855f031949b66c56292e7ea72a8b92275bf368b8db48bc9d060752fd65091","signature":"300ab95a9ea3196d03a723316337e91f354b8249973bf3bf3de10422252536b9"},{"version":"2f5c5fcd28f7650de0bc4517d6f14ffd9e4557bf717bf8a82917a547a13accd9","signature":"b82e615005b6b77992bf46f3e2be1a675b268054c494c34df5667d935d58284a"},{"version":"ca007bc75838e7e6187f8421e293fa5d2257a5ef8c7df1bbb0bdbb7595f45b82","signature":"13540c6a09d86fd62349ceba561390cd1468481ebb46659a401c90bc9010a613"},{"version":"7e89a4bbfd2eb1dced7a2aebb1c5e86d7c67096d3f97ddfb75cf07b407b19f04","signature":"c883cc76a206788d1309f90a456993b6c60a576953e981b1a36bb18dd100632c"},"29836755cbd12110cd4229539ad820312f3b0357963339dc08f08c3cad7e620d",{"version":"6c7176368037af28cb72f2392010fa1cef295d6d6744bca8cfb54985f3a18c3e","affectsGlobalScope":true,"impliedFormat":1},{"version":"ab41ef1f2cdafb8df48be20cd969d875602483859dc194e9c97c8a576892c052","affectsGlobalScope":true,"impliedFormat":1},{"version":"437e20f2ba32abaeb7985e0afe0002de1917bc74e949ba585e49feba65da6ca1","affectsGlobalScope":true,"impliedFormat":1},{"version":"21d819c173c0cf7cc3ce57c3276e77fd9a8a01d35a06ad87158781515c9a438a","impliedFormat":1},{"version":"98cffbf06d6bab333473c70a893770dbe990783904002c4f1a960447b4b53dca","affectsGlobalScope":true,"impliedFormat":1},{"version":"3af97acf03cc97de58a3a4bc91f8f616408099bc4233f6d0852e72a8ffb91ac9","affectsGlobalScope":true,"impliedFormat":1},{"version":"808069bba06b6768b62fd22429b53362e7af342da4a236ed2d2e1c89fcca3b4a","affectsGlobalScope":true,"impliedFormat":1},{"version":"1db0b7dca579049ca4193d034d835f6bfe73096c73663e5ef9a0b5779939f3d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"9798340ffb0d067d69b1ae5b32faa17ab31b82466a3fc00d8f2f2df0c8554aaa","affectsGlobalScope":true,"impliedFormat":1},{"version":"f26b11d8d8e4b8028f1c7d618b22274c892e4b0ef5b3678a8ccbad85419aef43","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e9c23ba78aabc2e0a27033f18737a6df754067731e69dc5f52823957d60a4b6","impliedFormat":1},{"version":"5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","impliedFormat":1},{"version":"763fe0f42b3d79b440a9b6e51e9ba3f3f91352469c1e4b3b67bfa4ff6352f3f4","impliedFormat":1},{"version":"25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","impliedFormat":1},{"version":"c464d66b20788266e5353b48dc4aa6bc0dc4a707276df1e7152ab0c9ae21fad8","impliedFormat":1},{"version":"78d0d27c130d35c60b5e5566c9f1e5be77caf39804636bc1a40133919a949f21","impliedFormat":1},{"version":"c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","impliedFormat":1},{"version":"1d6e127068ea8e104a912e42fc0a110e2aa5a66a356a917a163e8cf9a65e4a75","impliedFormat":1},{"version":"5ded6427296cdf3b9542de4471d2aa8d3983671d4cac0f4bf9c637208d1ced43","impliedFormat":1},{"version":"7f182617db458e98fc18dfb272d40aa2fff3a353c44a89b2c0ccb3937709bfb5","impliedFormat":1},{"version":"cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","impliedFormat":1},{"version":"385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","impliedFormat":1},{"version":"9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","impliedFormat":1},{"version":"0b8a9268adaf4da35e7fa830c8981cfa22adbbe5b3f6f5ab91f6658899e657a7","impliedFormat":1},{"version":"11396ed8a44c02ab9798b7dca436009f866e8dae3c9c25e8c1fbc396880bf1bb","impliedFormat":1},{"version":"ba7bc87d01492633cb5a0e5da8a4a42a1c86270e7b3d2dea5d156828a84e4882","impliedFormat":1},{"version":"4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","impliedFormat":1},{"version":"c21dc52e277bcfc75fac0436ccb75c204f9e1b3fa5e12729670910639f27343e","impliedFormat":1},{"version":"13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","impliedFormat":1},{"version":"9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","impliedFormat":1},{"version":"4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","impliedFormat":1},{"version":"24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","impliedFormat":1},{"version":"ea0148f897b45a76544ae179784c95af1bd6721b8610af9ffa467a518a086a43","impliedFormat":1},{"version":"24c6a117721e606c9984335f71711877293a9651e44f59f3d21c1ea0856f9cc9","impliedFormat":1},{"version":"dd3273ead9fbde62a72949c97dbec2247ea08e0c6952e701a483d74ef92d6a17","impliedFormat":1},{"version":"405822be75ad3e4d162e07439bac80c6bcc6dbae1929e179cf467ec0b9ee4e2e","impliedFormat":1},{"version":"0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","impliedFormat":1},{"version":"e61be3f894b41b7baa1fbd6a66893f2579bfad01d208b4ff61daef21493ef0a8","impliedFormat":1},{"version":"bd0532fd6556073727d28da0edfd1736417a3f9f394877b6d5ef6ad88fba1d1a","impliedFormat":1},{"version":"89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","impliedFormat":1},{"version":"615ba88d0128ed16bf83ef8ccbb6aff05c3ee2db1cc0f89ab50a4939bfc1943f","impliedFormat":1},{"version":"a4d551dbf8746780194d550c88f26cf937caf8d56f102969a110cfaed4b06656","impliedFormat":1},{"version":"8bd86b8e8f6a6aa6c49b71e14c4ffe1211a0e97c80f08d2c8cc98838006e4b88","impliedFormat":1},{"version":"317e63deeb21ac07f3992f5b50cdca8338f10acd4fbb7257ebf56735bf52ab00","impliedFormat":1},{"version":"4732aec92b20fb28c5fe9ad99521fb59974289ed1e45aecb282616202184064f","impliedFormat":1},{"version":"2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","impliedFormat":1},{"version":"c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","impliedFormat":1},{"version":"bf67d53d168abc1298888693338cb82854bdb2e69ef83f8a0092093c2d562107","impliedFormat":1},{"version":"b52476feb4a0cbcb25e5931b930fc73cb6643fb1a5060bf8a3dda0eeae5b4b68","affectsGlobalScope":true,"impliedFormat":1},{"version":"f9501cc13ce624c72b61f12b3963e84fad210fbdf0ffbc4590e08460a3f04eba","affectsGlobalScope":true,"impliedFormat":1},{"version":"e7721c4f69f93c91360c26a0a84ee885997d748237ef78ef665b153e622b36c1","affectsGlobalScope":true,"impliedFormat":1},{"version":"0fa06ada475b910e2106c98c68b10483dc8811d0c14a8a8dd36efb2672485b29","impliedFormat":1},{"version":"33e5e9aba62c3193d10d1d33ae1fa75c46a1171cf76fef750777377d53b0303f","impliedFormat":1},{"version":"2b06b93fd01bcd49d1a6bd1f9b65ddcae6480b9a86e9061634d6f8e354c1468f","impliedFormat":1},{"version":"6a0cd27e5dc2cfbe039e731cf879d12b0e2dded06d1b1dedad07f7712de0d7f4","affectsGlobalScope":true,"impliedFormat":1},{"version":"13f5c844119c43e51ce777c509267f14d6aaf31eafb2c2b002ca35584cd13b29","impliedFormat":1},{"version":"e60477649d6ad21542bd2dc7e3d9ff6853d0797ba9f689ba2f6653818999c264","impliedFormat":1},{"version":"c2510f124c0293ab80b1777c44d80f812b75612f297b9857406468c0f4dafe29","affectsGlobalScope":true,"impliedFormat":1},{"version":"5524481e56c48ff486f42926778c0a3cce1cc85dc46683b92b1271865bcf015a","impliedFormat":1},{"version":"4c829ab315f57c5442c6667b53769975acbf92003a66aef19bce151987675bd1","affectsGlobalScope":true,"impliedFormat":1},{"version":"b2ade7657e2db96d18315694789eff2ddd3d8aea7215b181f8a0b303277cc579","impliedFormat":1},{"version":"9855e02d837744303391e5623a531734443a5f8e6e8755e018c41d63ad797db2","impliedFormat":1},{"version":"4d631b81fa2f07a0e63a9a143d6a82c25c5f051298651a9b69176ba28930756d","impliedFormat":1},{"version":"836a356aae992ff3c28a0212e3eabcb76dd4b0cc06bcb9607aeef560661b860d","impliedFormat":1},{"version":"1e0d1f8b0adfa0b0330e028c7941b5a98c08b600efe7f14d2d2a00854fb2f393","impliedFormat":1},{"version":"41670ee38943d9cbb4924e436f56fc19ee94232bc96108562de1a734af20dc2c","affectsGlobalScope":true,"impliedFormat":1},{"version":"c906fb15bd2aabc9ed1e3f44eb6a8661199d6c320b3aa196b826121552cb3695","impliedFormat":1},{"version":"22295e8103f1d6d8ea4b5d6211e43421fe4564e34d0dd8e09e520e452d89e659","impliedFormat":1},{"version":"58647d85d0f722a1ce9de50955df60a7489f0593bf1a7015521efe901c06d770","impliedFormat":1},{"version":"73b5fa37db36eeac90c4d752e39586f1b57187400c4f5280fd05f16437287a45","impliedFormat":1},{"version":"a10f0e1854f3316d7ee437b79649e5a6ae3ae14ffe6322b02d4987071a95362e","impliedFormat":1},{"version":"e208f73ef6a980104304b0d2ca5f6bf1b85de6009d2c7e404028b875020fa8f2","impliedFormat":1},{"version":"d163b6bc2372b4f07260747cbc6c0a6405ab3fbcea3852305e98ac43ca59f5bc","impliedFormat":1},{"version":"e6fa9ad47c5f71ff733744a029d1dc472c618de53804eae08ffc243b936f87ff","affectsGlobalScope":true,"impliedFormat":1},{"version":"a6f137d651076822d4fe884287e68fd61785a0d3d1fdb250a5059b691fa897db","impliedFormat":1},{"version":"24826ed94a78d5c64bd857570fdbd96229ad41b5cb654c08d75a9845e3ab7dde","impliedFormat":1},{"version":"8b479a130ccb62e98f11f136d3ac80f2984fdc07616516d29881f3061f2dd472","impliedFormat":1},{"version":"928af3d90454bf656a52a48679f199f64c1435247d6189d1caf4c68f2eaf921f","affectsGlobalScope":true,"impliedFormat":1},{"version":"bceb58df66ab8fb00170df20cd813978c5ab84be1d285710c4eb005d8e9d8efb","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f16a7e4deafa527ed9995a772bb380eb7d3c2c0fd4ae178c5263ed18394db2c","impliedFormat":1},{"version":"933921f0bb0ec12ef45d1062a1fc0f27635318f4d294e4d99de9a5493e618ca2","impliedFormat":1},{"version":"71a0f3ad612c123b57239a7749770017ecfe6b66411488000aba83e4546fde25","impliedFormat":1},{"version":"77fbe5eecb6fac4b6242bbf6eebfc43e98ce5ccba8fa44e0ef6a95c945ff4d98","impliedFormat":1},{"version":"4f9d8ca0c417b67b69eeb54c7ca1bedd7b56034bb9bfd27c5d4f3bc4692daca7","impliedFormat":1},{"version":"814118df420c4e38fe5ae1b9a3bafb6e9c2aa40838e528cde908381867be6466","impliedFormat":1},{"version":"a3fc63c0d7b031693f665f5494412ba4b551fe644ededccc0ab5922401079c95","impliedFormat":1},{"version":"80523c00b8544a2000ae0143e4a90a00b47f99823eb7926c1e03c494216fc363","impliedFormat":1},{"version":"37ba7b45141a45ce6e80e66f2a96c8a5ab1bcef0fc2d0f56bb58df96ec67e972","impliedFormat":1},{"version":"45650f47bfb376c8a8ed39d4bcda5902ab899a3150029684ee4c10676d9fbaee","impliedFormat":1},{"version":"746911b62b329587939560deb5c036aca48aece03147b021fa680223255d5183","affectsGlobalScope":true,"impliedFormat":1},{"version":"18fd40412d102c5564136f29735e5d1c3b455b8a37f920da79561f1fde068208","impliedFormat":1},{"version":"c8d3e5a18ba35629954e48c4cc8f11dc88224650067a172685c736b27a34a4dc","impliedFormat":1},{"version":"f0be1b8078cd549d91f37c30c222c2a187ac1cf981d994fb476a1adc61387b14","affectsGlobalScope":true,"impliedFormat":1},{"version":"0aaed1d72199b01234152f7a60046bc947f1f37d78d182e9ae09c4289e06a592","impliedFormat":1},{"version":"2b55d426ff2b9087485e52ac4bc7cfafe1dc420fc76dad926cd46526567c501a","impliedFormat":1},{"version":"66ba1b2c3e3a3644a1011cd530fb444a96b1b2dfe2f5e837a002d41a1a799e60","impliedFormat":1},{"version":"7e514f5b852fdbc166b539fdd1f4e9114f29911592a5eb10a94bb3a13ccac3c4","impliedFormat":1},{"version":"5b7aa3c4c1a5d81b411e8cb302b45507fea9358d3569196b27eb1a27ae3a90ef","affectsGlobalScope":true,"impliedFormat":1},{"version":"5987a903da92c7462e0b35704ce7da94d7fdc4b89a984871c0e2b87a8aae9e69","affectsGlobalScope":true,"impliedFormat":1},{"version":"ea08a0345023ade2b47fbff5a76d0d0ed8bff10bc9d22b83f40858a8e941501c","impliedFormat":1},{"version":"47613031a5a31510831304405af561b0ffaedb734437c595256bb61a90f9311b","impliedFormat":1},{"version":"ae062ce7d9510060c5d7e7952ae379224fb3f8f2dd74e88959878af2057c143b","impliedFormat":1},{"version":"8a1a0d0a4a06a8d278947fcb66bf684f117bf147f89b06e50662d79a53be3e9f","affectsGlobalScope":true,"impliedFormat":1},{"version":"358765d5ea8afd285d4fd1532e78b88273f18cb3f87403a9b16fef61ac9fdcfe","impliedFormat":1},{"version":"9f55299850d4f0921e79b6bf344b47c420ce0f507b9dcf593e532b09ea7eeea1","impliedFormat":1}],"root":[[102,106]],"options":{"allowSyntheticDefaultImports":true,"composite":true,"declaration":true,"declarationMap":true,"esModuleInterop":true,"exactOptionalPropertyTypes":true,"module":99,"noFallthroughCasesInSwitch":true,"noImplicitOverride":true,"noPropertyAccessFromIndexSignature":false,"noUncheckedIndexedAccess":true,"outDir":"./","rootDir":"../src","skipLibCheck":true,"sourceMap":true,"strict":true,"target":9,"tsBuildInfoFile":"./.tsbuildinfo","verbatimModuleSyntax":true},"referencedMap":[[158,1],[159,1],[160,2],[112,3],[161,4],[162,5],[163,6],[107,7],[110,8],[108,7],[109,7],[164,9],[165,10],[166,11],[167,12],[168,13],[169,14],[170,14],[171,15],[172,16],[173,17],[174,18],[113,7],[111,7],[175,19],[176,20],[177,21],[211,22],[178,23],[179,7],[180,24],[181,25],[182,26],[183,27],[184,28],[185,29],[186,30],[187,31],[188,32],[189,32],[190,33],[191,7],[192,34],[193,35],[195,36],[194,37],[196,38],[197,39],[198,40],[199,41],[200,42],[201,43],[202,44],[203,45],[204,46],[205,47],[206,48],[207,49],[208,50],[114,7],[115,7],[116,7],[155,51],[156,7],[157,7],[209,52],[210,53],[117,7],[70,7],[71,7],[68,54],[72,55],[69,54],[67,7],[56,7],[57,7],[11,7],[10,7],[2,7],[12,7],[13,7],[14,7],[15,7],[16,7],[17,7],[18,7],[19,7],[3,7],[20,7],[21,7],[4,7],[22,7],[26,7],[23,7],[24,7],[25,7],[27,7],[28,7],[29,7],[5,7],[30,7],[31,7],[32,7],[33,7],[6,7],[37,7],[34,7],[35,7],[36,7],[38,7],[7,7],[39,7],[44,7],[45,7],[40,7],[41,7],[42,7],[43,7],[8,7],[49,7],[46,7],[47,7],[48,7],[50,7],[9,7],[51,7],[52,7],[53,7],[55,7],[54,7],[1,7],[133,56],[143,57],[132,56],[153,58],[124,59],[123,60],[152,61],[146,62],[151,63],[126,64],[140,65],[125,66],[149,67],[121,68],[120,61],[150,69],[122,70],[127,71],[128,7],[131,71],[118,7],[154,72],[144,73],[135,74],[136,75],[138,76],[134,77],[137,78],[147,61],[129,79],[130,80],[139,81],[119,82],[142,73],[141,71],[145,7],[148,83],[102,84],[105,85],[106,86],[103,84],[104,87],[92,88],[86,89],[89,90],[76,91],[66,7],[100,92],[98,93],[75,91],[82,94],[73,95],[96,96],[95,91],[77,91],[97,97],[101,98],[78,99],[94,100],[93,101],[83,102],[88,97],[80,103],[91,104],[84,97],[81,105],[74,106],[87,93],[90,91],[65,91],[85,7],[99,92],[79,91],[59,7],[61,7],[63,107],[62,7],[64,108],[60,7],[58,7]],"latestChangedDtsFile":"./index.d.ts","version":"5.9.3"}
@@ -0,0 +1,10 @@
1
+ import type { Patch } from "@oh-just-another/scene";
2
+ /**
3
+ * Best-effort short label for a patch, suitable for a history side-panel.
4
+ * The wording is deliberately generic ("Update shape", "Move/resize shape",
5
+ * "Create rectangle") because the kernel does not know enough about user
6
+ * intent to say more. Hosts that want richer labels can attach `metadata` to
7
+ * their shapes and read it here.
8
+ */
9
+ export declare const describe: (patch: Patch) => string;
10
+ //# sourceMappingURL=describe.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"describe.d.ts","sourceRoot":"","sources":["../src/describe.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAEpD;;;;;;GAMG;AACH,eAAO,MAAM,QAAQ,GAAI,OAAO,KAAK,KAAG,MA6CvC,CAAC"}
@@ -0,0 +1,94 @@
1
+ /**
2
+ * Best-effort short label for a patch, suitable for a history side-panel.
3
+ * The wording is deliberately generic ("Update shape", "Move/resize shape",
4
+ * "Create rectangle") because the kernel does not know enough about user
5
+ * intent to say more. Hosts that want richer labels can attach `metadata` to
6
+ * their shapes and read it here.
7
+ */
8
+ export const describe = (patch) => {
9
+ switch (patch.kind) {
10
+ case "element": {
11
+ if (patch.before === null) {
12
+ return labelForCreate(patch.after);
13
+ }
14
+ if (patch.after === null) {
15
+ return labelForRemove(patch.before);
16
+ }
17
+ return labelForUpdate(patch.before, patch.after);
18
+ }
19
+ case "link": {
20
+ if (patch.before === null)
21
+ return "Create edge";
22
+ if (patch.after === null)
23
+ return "Delete edge";
24
+ return "Update edge";
25
+ }
26
+ case "layer": {
27
+ if (patch.before === null)
28
+ return "Create layer";
29
+ if (patch.after === null)
30
+ return "Delete layer";
31
+ return "Update layer";
32
+ }
33
+ case "annotation": {
34
+ if (patch.before === null)
35
+ return "Add comment";
36
+ if (patch.after === null)
37
+ return "Delete comment";
38
+ return "Update comment";
39
+ }
40
+ case "viewport":
41
+ return "Camera change";
42
+ case "file": {
43
+ if (patch.before === null)
44
+ return "Add file";
45
+ if (patch.after === null)
46
+ return "Remove file";
47
+ return "Update file";
48
+ }
49
+ case "batch": {
50
+ if (patch.patches.length === 0)
51
+ return "Empty batch";
52
+ const firstPatch = patch.patches[0];
53
+ if (firstPatch === undefined)
54
+ return "Empty batch";
55
+ if (patch.patches.length === 1)
56
+ return describe(firstPatch);
57
+ // If every inner patch describes to the same label, surface it; otherwise
58
+ // give a generic n-count.
59
+ const first = describe(firstPatch);
60
+ const allSame = patch.patches.every((p) => describe(p) === first);
61
+ return allSame ? `${first} (×${patch.patches.length})` : `${patch.patches.length} changes`;
62
+ }
63
+ }
64
+ };
65
+ const titleCase = (s) => (s ? s.charAt(0).toUpperCase() + s.slice(1) : s);
66
+ const labelForCreate = (shape) => shape ? `Create ${titleCase(shape.type)}` : "Create shape";
67
+ const labelForRemove = (shape) => shape ? `Delete ${titleCase(shape.type)}` : "Delete shape";
68
+ const labelForUpdate = (before, after) => {
69
+ const type = typeof after.type === "string" ? titleCase(after.type) : "shape";
70
+ const positionChanged = before.position &&
71
+ after.position &&
72
+ (before.position.x !== after.position.x || before.position.y !== after.position.y);
73
+ const sizeChanged = (before.width !== undefined && before.width !== after.width) ||
74
+ (before.height !== undefined && before.height !== after.height);
75
+ const rotationChanged = before.rotation !== after.rotation;
76
+ const scaleChanged = before.scale &&
77
+ after.scale &&
78
+ (before.scale.x !== after.scale.x || before.scale.y !== after.scale.y);
79
+ const textChanged = before.text !== after.text;
80
+ if (sizeChanged && positionChanged)
81
+ return `Resize ${type}`;
82
+ if (sizeChanged)
83
+ return `Resize ${type}`;
84
+ if (positionChanged)
85
+ return `Move ${type}`;
86
+ if (rotationChanged)
87
+ return `Rotate ${type}`;
88
+ if (scaleChanged)
89
+ return `Scale ${type}`;
90
+ if (textChanged)
91
+ return `Edit ${type}`;
92
+ return `Update ${type}`;
93
+ };
94
+ //# sourceMappingURL=describe.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C,CAAC;IACzE,MAAM,WAAW,GAAG,MAAM,CAAC,IAAI,KAAK,KAAK,CAAC,IAAI,CAAC;IAE/C,IAAI,WAAW,IAAI,eAAe;QAAE,OAAO,UAAU,IAAI,EAAE,CAAC;IAC5D,IAAI,WAAW;QAAE,OAAO,UAAU,IAAI,EAAE,CAAC;IACzC,IAAI,eAAe;QAAE,OAAO,QAAQ,IAAI,EAAE,CAAC;IAC3C,IAAI,eAAe;QAAE,OAAO,UAAU,IAAI,EAAE,CAAC;IAC7C,IAAI,YAAY;QAAE,OAAO,SAAS,IAAI,EAAE,CAAC;IACzC,IAAI,WAAW;QAAE,OAAO,QAAQ,IAAI,EAAE,CAAC;IACvC,OAAO,UAAU,IAAI,EAAE,CAAC;AAC1B,CAAC,CAAC"}
@@ -0,0 +1,84 @@
1
+ import { type Patch } from "@oh-just-another/scene";
2
+ import type { HistoryProvider } from "./provider.js";
3
+ export interface HistoryOptions {
4
+ /**
5
+ * Cap the number of undo records. The oldest record is dropped when the
6
+ * limit is exceeded. `Infinity` (the default) keeps everything.
7
+ */
8
+ readonly limit?: number;
9
+ /**
10
+ * When committing a transaction with multiple patches, collapse them per
11
+ * entity so each undo step is one operation per touched entity. Default: true.
12
+ */
13
+ readonly mergeTransactions?: boolean;
14
+ }
15
+ /**
16
+ * Linear undo/redo stack over `@oh-just-another/scene` patches.
17
+ *
18
+ * The history owns no scene; callers supply patches via `push(...)` and apply
19
+ * the returned patches from `undo()` / `redo()` themselves. Multiple operations
20
+ * can be grouped into one logical step via `transaction()`.
21
+ *
22
+ * The redo stack is cleared on any non-undo `push`.
23
+ */
24
+ export declare class History implements HistoryProvider {
25
+ private readonly past;
26
+ private readonly future;
27
+ private readonly limit;
28
+ private readonly mergeTransactions;
29
+ constructor(options?: HistoryOptions);
30
+ /** Push a single patch. Clears the redo stack. No-ops are ignored. */
31
+ push(patch: Patch): void;
32
+ /**
33
+ * Returns the inverse patch the caller should apply to scene, or `null` if
34
+ * there is nothing to undo. The popped patch moves onto the redo stack so
35
+ * `redo()` can replay it.
36
+ */
37
+ undo(): Patch | null;
38
+ /**
39
+ * Returns the patch to re-apply, or `null` if there is nothing to redo.
40
+ * The patch moves back onto the undo stack.
41
+ */
42
+ redo(): Patch | null;
43
+ get canUndo(): boolean;
44
+ get canRedo(): boolean;
45
+ get size(): number;
46
+ get redoSize(): number;
47
+ /** Read-only view of the undo stack, oldest first. */
48
+ get undoStack(): readonly Patch[];
49
+ /** Read-only view of the redo stack — the most-recently undone is **last**. */
50
+ get redoStack(): readonly Patch[];
51
+ clear(): void;
52
+ /**
53
+ * Open a transaction: subsequent patches are collected and pushed as a
54
+ * single `batch` record (optionally merged per entity). The returned
55
+ * `commit` / `cancel` close it.
56
+ *
57
+ * Only one transaction can be open at a time; calling `transaction()` while
58
+ * another is open throws.
59
+ */
60
+ transaction(): TransactionHandle;
61
+ /** True while a transaction is open. */
62
+ hasOpenTransaction(): boolean;
63
+ /**
64
+ * Add a patch to the currently-open transaction, or `push` directly if no
65
+ * transaction is open.
66
+ */
67
+ record(patch: Patch, options?: {
68
+ transaction?: TransactionHandle;
69
+ }): void;
70
+ private current;
71
+ private trim;
72
+ }
73
+ /** Handle to an open transaction. Returned by `History.transaction()`. */
74
+ export interface TransactionHandle {
75
+ /** Add a patch to the transaction. Throws if the transaction has closed. */
76
+ add(patch: Patch): void;
77
+ /** Commit the transaction: push the (merged) batch onto the undo stack. */
78
+ commit(): void;
79
+ /** Discard the transaction without recording anything. */
80
+ cancel(): void;
81
+ /** True until `commit()` or `cancel()` is called. */
82
+ isOpen(): boolean;
83
+ }
84
+ //# sourceMappingURL=history.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"history.d.ts","sourceRoot":"","sources":["../src/history.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,KAAK,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAE3E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAErD,MAAM,WAAW,cAAc;I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AI,CAAC;IACxB,2EAA2E;IAC3E,MAAM,IAAI,IAAI,CAAC;IACf,0DAA0D;IAC1D,MAAM,IAAI,IAAI,CAAC;IACf,qDAAqD;IACrD,MAAM,IAAI,OAAO,CAAC;CACnB"}
@@ -0,0 +1,148 @@
1
+ import { batch, invert, isNoop } from "@oh-just-another/scene";
2
+ import { mergeByEntity } from "./merge.js";
3
+ /**
4
+ * Linear undo/redo stack over `@oh-just-another/scene` patches.
5
+ *
6
+ * The history owns no scene; callers supply patches via `push(...)` and apply
7
+ * the returned patches from `undo()` / `redo()` themselves. Multiple operations
8
+ * can be grouped into one logical step via `transaction()`.
9
+ *
10
+ * The redo stack is cleared on any non-undo `push`.
11
+ */
12
+ export class History {
13
+ past = [];
14
+ future = [];
15
+ limit;
16
+ mergeTransactions;
17
+ constructor(options = {}) {
18
+ this.limit = options.limit ?? Infinity;
19
+ this.mergeTransactions = options.mergeTransactions ?? true;
20
+ }
21
+ /** Push a single patch. Clears the redo stack. No-ops are ignored. */
22
+ push(patch) {
23
+ if (isNoop(patch))
24
+ return;
25
+ this.past.push(patch);
26
+ this.future.length = 0;
27
+ this.trim();
28
+ }
29
+ /**
30
+ * Returns the inverse patch the caller should apply to scene, or `null` if
31
+ * there is nothing to undo. The popped patch moves onto the redo stack so
32
+ * `redo()` can replay it.
33
+ */
34
+ undo() {
35
+ const patch = this.past.pop();
36
+ if (!patch)
37
+ return null;
38
+ this.future.push(patch);
39
+ return invert(patch);
40
+ }
41
+ /**
42
+ * Returns the patch to re-apply, or `null` if there is nothing to redo.
43
+ * The patch moves back onto the undo stack.
44
+ */
45
+ redo() {
46
+ const patch = this.future.pop();
47
+ if (!patch)
48
+ return null;
49
+ this.past.push(patch);
50
+ return patch;
51
+ }
52
+ get canUndo() {
53
+ return this.past.length > 0;
54
+ }
55
+ get canRedo() {
56
+ return this.future.length > 0;
57
+ }
58
+ get size() {
59
+ return this.past.length;
60
+ }
61
+ get redoSize() {
62
+ return this.future.length;
63
+ }
64
+ /** Read-only view of the undo stack, oldest first. */
65
+ get undoStack() {
66
+ return this.past;
67
+ }
68
+ /** Read-only view of the redo stack — the most-recently undone is **last**. */
69
+ get redoStack() {
70
+ return this.future;
71
+ }
72
+ clear() {
73
+ this.past.length = 0;
74
+ this.future.length = 0;
75
+ }
76
+ /**
77
+ * Open a transaction: subsequent patches are collected and pushed as a
78
+ * single `batch` record (optionally merged per entity). The returned
79
+ * `commit` / `cancel` close it.
80
+ *
81
+ * Only one transaction can be open at a time; calling `transaction()` while
82
+ * another is open throws.
83
+ */
84
+ transaction() {
85
+ if (this.current !== null) {
86
+ throw new Error("A transaction is already open");
87
+ }
88
+ const tx = [];
89
+ this.current = tx;
90
+ return {
91
+ add: (patch) => {
92
+ if (this.current !== tx) {
93
+ throw new Error("Transaction is no longer open");
94
+ }
95
+ if (!isNoop(patch))
96
+ tx.push(patch);
97
+ },
98
+ commit: () => {
99
+ if (this.current !== tx)
100
+ return;
101
+ this.current = null;
102
+ if (tx.length === 0)
103
+ return;
104
+ const collapsed = this.mergeTransactions ? mergeByEntity(tx) : tx;
105
+ if (collapsed.length === 0)
106
+ return;
107
+ const firstCollapsed = collapsed[0];
108
+ const record = collapsed.length === 1 && firstCollapsed !== undefined
109
+ ? firstCollapsed
110
+ : batch(collapsed);
111
+ if (isNoop(record))
112
+ return;
113
+ this.past.push(record);
114
+ this.future.length = 0;
115
+ this.trim();
116
+ },
117
+ cancel: () => {
118
+ if (this.current !== tx)
119
+ return;
120
+ this.current = null;
121
+ },
122
+ isOpen: () => this.current === tx,
123
+ };
124
+ }
125
+ /** True while a transaction is open. */
126
+ hasOpenTransaction() {
127
+ return this.current !== null;
128
+ }
129
+ /**
130
+ * Add a patch to the currently-open transaction, or `push` directly if no
131
+ * transaction is open.
132
+ */
133
+ record(patch, options) {
134
+ if (options?.transaction?.isOpen()) {
135
+ options.transaction.add(patch);
136
+ return;
137
+ }
138
+ this.push(patch);
139
+ }
140
+ current = null;
141
+ trim() {
142
+ if (!Number.isFinite(this.limit))
143
+ return;
144
+ while (this.past.length > this.limit)
145
+ this.past.shift();
146
+ }
147
+ }
148
+ //# sourceMappingURL=history.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"history.js","sourceRoot":"","sources":["../src/history.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAc,MAAM,wBAAwB,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAgB3C;;;;;;;;GAQG;AACH,MAAM,OAAO,OAAO;IACD,IAAI,GAAY,EAAE,CAAC;IACnB,MAAM,GAAY,EAAE,CAAC;IACrB,KAAK,CAAS;IACd,iBAAiB,CAAU;IAE5C,YAAY,UAA0B,EAAE;QACtC,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,QAAQ,CAAC;QACvC,IAAI,CAAC,iBAAiB,GAAG,OAAO,CAAC,iBAAiB,IAAI,IAAI,CAAC;IAC7D,CAAC;IAED,sEAAsE;IACtE,IAAI,CAAC,KAAY;QACf,IAAI,MAAM,CAAC,KAAK,CAAC;YAAE,OAAO;QAC1B,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACtB,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC;QACvB,IAAI,CAAC,IAAI,EAAE,CAAC;IACd,CAAC;IAED;;;;OAIG;IACH,IAAI;QACF,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC;QAC9B,IAAI,CAAC,KAAK;YAAE,OAAO,IAAI,CAAC;QACxB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACxB,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;IACvB,CAAC;IAED;;;OAGG;IACH,IAAI;QACF,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC;QAChC,IAAI,CAAC,KAAK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AAC,WAAW,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YAC/B,OAAO;QACT,CAAC;QACD,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACnB,CAAC;IAEO,OAAO,GAAmB,IAAI,CAAC;IAE/B,IAAI;QACV,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC;YAAE,OAAO;QACzC,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK;YAAE,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;IAC1D,CAAC;CACF"}
@@ -0,0 +1,5 @@
1
+ export { History, type HistoryOptions, type TransactionHandle } from "./history.js";
2
+ export { mergeByEntity } from "./merge.js";
3
+ export { describe } from "./describe.js";
4
+ export type { HistoryProvider } from "./provider.js";
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACpF,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,YAAY,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,4 @@
1
+ export { History } from "./history.js";
2
+ export { mergeByEntity } from "./merge.js";
3
+ export { describe } from "./describe.js";
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAA+C,MAAM,cAAc,CAAC;AACpF,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC"}
@@ -0,0 +1,14 @@
1
+ import type { Patch } from "@oh-just-another/scene";
2
+ /**
3
+ * Merge a sequence of patches produced inside a single transaction so that
4
+ * each entity has at most one patch. The merged patch keeps the *first*
5
+ * `before` and the *last* `after` for that entity — the round trip is
6
+ * indistinguishable from applying the whole sequence, but the patch list is
7
+ * O(touched entities) rather than O(gesture-tick count).
8
+ *
9
+ * Batches are flattened before merging. Viewport patches are merged the same
10
+ * way (only one slot). Patches that turn out to be no-ops (`before === after`
11
+ * after the merge) are dropped. First-appearance order is preserved.
12
+ */
13
+ export declare const mergeByEntity: (patches: readonly Patch[]) => readonly Patch[];
14
+ //# sourceMappingURL=merge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"merge.d.ts","sourceRoot":"","sources":["../src/merge.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAmBpD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,aAAa,GAAI,SAAS,SAAS,KAAK,EAAE,KAAG,SAAS,KAAK,EA4IvE,CAAC"}
package/dist/merge.js ADDED
@@ -0,0 +1,180 @@
1
+ const req = (v) => {
2
+ if (v === undefined)
3
+ throw new Error("packages/history: slot missing for visited patch");
4
+ return v;
5
+ };
6
+ /**
7
+ * Merge a sequence of patches produced inside a single transaction so that
8
+ * each entity has at most one patch. The merged patch keeps the *first*
9
+ * `before` and the *last* `after` for that entity — the round trip is
10
+ * indistinguishable from applying the whole sequence, but the patch list is
11
+ * O(touched entities) rather than O(gesture-tick count).
12
+ *
13
+ * Batches are flattened before merging. Viewport patches are merged the same
14
+ * way (only one slot). Patches that turn out to be no-ops (`before === after`
15
+ * after the merge) are dropped. First-appearance order is preserved.
16
+ */
17
+ export const mergeByEntity = (patches) => {
18
+ const shapes = new Map();
19
+ const edges = new Map();
20
+ const layers = new Map();
21
+ const annotations = new Map();
22
+ const files = new Map();
23
+ let viewport = null;
24
+ // Read through a function so the post-loop call sites see the declared union
25
+ // type rather than the `null` flow-narrowing TS infers after the
26
+ // closure-driven population loop below.
27
+ const getViewport = () => viewport;
28
+ const order = [];
29
+ let viewportOrderIndex = -1;
30
+ const visit = (p) => {
31
+ if (p.kind === "batch") {
32
+ for (const inner of p.patches)
33
+ visit(inner);
34
+ return;
35
+ }
36
+ if (p.kind === "element") {
37
+ const existing = shapes.get(p.id);
38
+ if (existing) {
39
+ existing.latest = { ...existing.latest, after: p.after };
40
+ }
41
+ else {
42
+ shapes.set(p.id, { first: p, latest: p });
43
+ order.push(p);
44
+ }
45
+ return;
46
+ }
47
+ if (p.kind === "link") {
48
+ const existing = edges.get(p.id);
49
+ if (existing) {
50
+ existing.latest = { ...existing.latest, after: p.after };
51
+ }
52
+ else {
53
+ edges.set(p.id, { first: p, latest: p });
54
+ order.push(p);
55
+ }
56
+ return;
57
+ }
58
+ if (p.kind === "layer") {
59
+ const existing = layers.get(p.id);
60
+ if (existing) {
61
+ existing.latest = { ...existing.latest, after: p.after };
62
+ }
63
+ else {
64
+ layers.set(p.id, { first: p, latest: p });
65
+ order.push(p);
66
+ }
67
+ return;
68
+ }
69
+ if (p.kind === "annotation") {
70
+ const existing = annotations.get(p.id);
71
+ if (existing) {
72
+ existing.latest = { ...existing.latest, after: p.after };
73
+ }
74
+ else {
75
+ annotations.set(p.id, { first: p, latest: p });
76
+ order.push(p);
77
+ }
78
+ return;
79
+ }
80
+ if (p.kind === "file") {
81
+ const existing = files.get(p.id);
82
+ if (existing) {
83
+ existing.latest = { ...existing.latest, after: p.after };
84
+ }
85
+ else {
86
+ files.set(p.id, { first: p, latest: p });
87
+ order.push(p);
88
+ }
89
+ return;
90
+ }
91
+ if (viewport) {
92
+ viewport = { first: viewport.first, latest: { ...viewport.latest, after: p.after } };
93
+ }
94
+ else {
95
+ viewport = { first: p, latest: p };
96
+ viewportOrderIndex = order.length;
97
+ order.push(p);
98
+ }
99
+ };
100
+ for (const p of patches)
101
+ visit(p);
102
+ const viewportSlot = getViewport();
103
+ const out = [];
104
+ for (let i = 0; i < order.length; i++) {
105
+ const p = req(order[i]);
106
+ let merged;
107
+ if (p.kind === "element") {
108
+ const slot = req(shapes.get(p.id));
109
+ merged = {
110
+ kind: "element",
111
+ id: slot.first.id,
112
+ before: slot.first.before,
113
+ after: slot.latest.after,
114
+ };
115
+ }
116
+ else if (p.kind === "link") {
117
+ const slot = req(edges.get(p.id));
118
+ merged = {
119
+ kind: "link",
120
+ id: slot.first.id,
121
+ before: slot.first.before,
122
+ after: slot.latest.after,
123
+ };
124
+ }
125
+ else if (p.kind === "layer") {
126
+ const slot = req(layers.get(p.id));
127
+ merged = {
128
+ kind: "layer",
129
+ id: slot.first.id,
130
+ before: slot.first.before,
131
+ after: slot.latest.after,
132
+ };
133
+ }
134
+ else if (p.kind === "annotation") {
135
+ const slot = req(annotations.get(p.id));
136
+ merged = {
137
+ kind: "annotation",
138
+ id: slot.first.id,
139
+ before: slot.first.before,
140
+ after: slot.latest.after,
141
+ };
142
+ }
143
+ else if (p.kind === "file") {
144
+ const slot = req(files.get(p.id));
145
+ merged = {
146
+ kind: "file",
147
+ id: slot.first.id,
148
+ before: slot.first.before,
149
+ after: slot.latest.after,
150
+ };
151
+ }
152
+ else if (i === viewportOrderIndex && viewportSlot !== null) {
153
+ merged = {
154
+ kind: "viewport",
155
+ before: viewportSlot.first.before,
156
+ after: viewportSlot.latest.after,
157
+ };
158
+ }
159
+ else {
160
+ continue;
161
+ }
162
+ if (isMergedNoop(merged))
163
+ continue;
164
+ out.push(merged);
165
+ }
166
+ return out;
167
+ };
168
+ const isMergedNoop = (p) => {
169
+ if (p.kind === "element" ||
170
+ p.kind === "link" ||
171
+ p.kind === "layer" ||
172
+ p.kind === "annotation" ||
173
+ p.kind === "file") {
174
+ return p.before === p.after;
175
+ }
176
+ if (p.kind === "viewport")
177
+ return p.before === p.after;
178
+ return false;
179
+ };
180
+ //# sourceMappingURL=merge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"merge.js","sourceRoot":"","sources":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,GAAG;gBACP,IAAI,EAAE,UAAU;gBAChB,MAAM,EAAE,YAAY,CAAC,KAAK,CAAC,MAAM;gBACjC,KAAK,EAAE,YAAY,CAAC,MAAM,CAAC,KAAK;aACjC,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,SAAS;QACX,CAAC;QACD,IAAI,YAAY,CAAC,MAAM,CAAC;YAAE,SAAS;QACnC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACnB,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC,CAAC;AAEF,MAAM,YAAY,GAAG,CAAC,CAAQ,EAAW,EAAE;IACzC,IACE,CAAC,CAAC,IAAI,KAAK,SAAS;QACpB,CAAC,CAAC,IAAI,KAAK,MAAM;QACjB,CAAC,CAAC,IAAI,KAAK,OAAO;QAClB,CAAC,CAAC,IAAI,KAAK,YAAY;QACvB,CAAC,CAAC,IAAI,KAAK,MAAM,EACjB,CAAC;QACD,OAAO,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,KAAK,CAAC;IAC9B,CAAC;IACD,IAAI,CAAC,CAAC,IAAI,KAAK,UAAU;QAAE,OAAO,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,KAAK,CAAC;IACvD,OAAO,KAAK,CAAC;AACf,CAAC,CAAC"}
@@ -0,0 +1,35 @@
1
+ import type { Patch } from "@oh-just-another/scene";
2
+ import type { TransactionHandle } from "./history.js";
3
+ /**
4
+ * Pluggable history backend. Implementations:
5
+ *
6
+ * - `History` — linear stack, standalone editing.
7
+ * - `YjsHistory` (lives in `@collab`) — wraps `Y.UndoManager` so Cmd+Z in
8
+ * collab affects only the local clientID's patches, surviving concurrent
9
+ * remote edits.
10
+ *
11
+ * Hosts pass an instance via `EditorOptions.history`; default is the linear
12
+ * `History` class. Both implementations expose this surface.
13
+ */
14
+ export interface HistoryProvider {
15
+ readonly canUndo: boolean;
16
+ readonly canRedo: boolean;
17
+ push(patch: Patch): void;
18
+ undo(): Patch | null;
19
+ redo(): Patch | null;
20
+ clear(): void;
21
+ transaction(): TransactionHandle;
22
+ /** Number of past patches, exposed for UI counters. */
23
+ readonly size: number;
24
+ /**
25
+ * Optional inspection hooks for UIs that visualise the undo timeline
26
+ * (`<HistoryPanel>`). The linear `History` exposes both as native arrays;
27
+ * `YjsHistory` leaves them `undefined` because `Y.UndoManager`'s `undoStack`
28
+ * items are opaque `StackItem`s, not `Patch`es. Hosts that depend on a
29
+ * specific stack representation should narrow to the implementation they
30
+ * instantiate.
31
+ */
32
+ readonly undoStack?: readonly Patch[];
33
+ readonly redoStack?: readonly Patch[];
34
+ }
35
+ //# sourceMappingURL=provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../src/provider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEtD;;;;;;;;;;GAUG;AACH,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,IAAI,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACzB,IAAI,IAAI,KAAK,GAAG,IAAI,CAAC;IACrB,IAAI,IAAI,KAAK,GAAG,IAAI,CAAC;IACrB,KAAK,IAAI,IAAI,CAAC;IACd,WAAW,IAAI,iBAAiB,CAAC;IACjC,uDAAuD;IACvD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB;;;;;;;OAOG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,KAAK,EAAE,CAAC;IACtC,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,KAAK,EAAE,CAAC;CACvC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider.js","sourceRoot":"","sources":["../src/provider.ts"],"names":[],"mappings":""}
package/package.json ADDED
@@ -0,0 +1,53 @@
1
+ {
2
+ "name": "@oh-just-another/history",
3
+ "version": "0.57.0",
4
+ "description": "history package",
5
+ "license": "MIT",
6
+ "author": "Rustam Garifulin <rustam@n69.in>",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/oh-just-another/diagram.git",
10
+ "directory": "packages/history"
11
+ },
12
+ "homepage": "https://github.com/oh-just-another/diagram#readme",
13
+ "bugs": "https://github.com/oh-just-another/diagram/issues",
14
+ "keywords": [
15
+ "diagram",
16
+ "canvas",
17
+ "svg",
18
+ "editor",
19
+ "graph",
20
+ "drawing"
21
+ ],
22
+ "type": "module",
23
+ "main": "./dist/index.js",
24
+ "module": "./dist/index.js",
25
+ "types": "./dist/index.d.ts",
26
+ "exports": {
27
+ ".": {
28
+ "types": "./dist/index.d.ts",
29
+ "import": "./dist/index.js"
30
+ }
31
+ },
32
+ "files": [
33
+ "dist",
34
+ "README.md",
35
+ "CHANGELOG.md"
36
+ ],
37
+ "sideEffects": false,
38
+ "publishConfig": {
39
+ "access": "public"
40
+ },
41
+ "dependencies": {
42
+ "@oh-just-another/scene": "0.57.0",
43
+ "@oh-just-another/types": "0.57.0"
44
+ },
45
+ "scripts": {
46
+ "build": "tsc -b tsconfig.build.json",
47
+ "typecheck": "tsc --noEmit",
48
+ "test": "vitest run",
49
+ "test:watch": "vitest",
50
+ "lint": "eslint src tests",
51
+ "clean": "rm -rf dist *.tsbuildinfo"
52
+ }
53
+ }