@patch-kit/history 1.0.0 → 1.0.1
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 +4 -0
- package/package.json +7 -2
package/README.md
CHANGED
|
@@ -2,12 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
A self-contained undo/redo system for using the Command Pattern.
|
|
4
4
|
|
|
5
|
+
**Interactive demo:** [Default](https://xkeexe.github.io/patchkit/?path=/story/history--default)
|
|
6
|
+
|
|
5
7
|
---
|
|
6
8
|
|
|
7
9
|
## Overview
|
|
8
10
|
|
|
9
11
|
Each user action is recorded as a command with `undo()` and `redo()` functions, enabling full history traversal. The factory pattern ensures each history instance is independently scoped and fully typed.
|
|
10
12
|
|
|
13
|
+
Example usage
|
|
14
|
+
|
|
11
15
|
---
|
|
12
16
|
|
|
13
17
|
## Setup
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@patch-kit/history",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "History Manager for React",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -18,7 +18,12 @@
|
|
|
18
18
|
"require": "./dist/index.cjs"
|
|
19
19
|
}
|
|
20
20
|
},
|
|
21
|
-
"files": [
|
|
21
|
+
"files": [
|
|
22
|
+
"dist"
|
|
23
|
+
],
|
|
24
|
+
"publishConfig": {
|
|
25
|
+
"access": "public"
|
|
26
|
+
},
|
|
22
27
|
"scripts": {
|
|
23
28
|
"build": "tsup",
|
|
24
29
|
"dev": "tsup --watch",
|