@anth0nycodes/fabric-history 0.1.2 → 0.1.3

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/dist/canvas.js CHANGED
@@ -25,7 +25,7 @@ export class CanvasWithHistory extends Canvas {
25
25
  "path:created": this._historySaveAction.bind(this),
26
26
  "erasing:end": this._historySaveAction.bind(this),
27
27
  "object:added": this._historySaveAction.bind(this),
28
- "object:removed": this._historySaveAction.bind(this),
28
+ "object:removed": this._historySaveAction.bind(this), // TODO: handle object modification + deletion batching
29
29
  "object:moving": this._objectMoving.bind(this),
30
30
  "object:modified": this._handleObjectModified.bind(this),
31
31
  "canvas:cleared": this._historySaveAction.bind(this),
@@ -1 +1 @@
1
- {"version":3,"file":"canvas.js","sourceRoot":"","sources":["../src/canvas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,MAAM,OAAO,iBAAkB,SAAQ,MAAM;IAC3C,iBAAiB;IACT,YAAY,CAAW;IACvB,YAAY,CAAW;IAE/B,uEAAuE;IAC/D,SAAS,CAAU;IACnB,kBAAkB,CAAU;IAE5B,oBAAoB,CAAS;IAErC,YAAY,GAAG,IAA0C;QACvD,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC;QAEf,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC;QACvB,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC;QACvB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;QACvB,IAAI,CAAC,kBAAkB,GAAG,KAAK,CAAC;QAChC,IAAI,CAAC,oBAAoB,GAAG,IAAI,CAAC,eAAe,EAAE,CAAC;QAEnD,IAAI,CAAC,mBAAmB,EAAE,CAAC;QAC3B,IAAI,CAAC,iBAAiB,EAAE,CAAC;IAC3B,CAAC;IAED;;OAEG;IACK,mBAAmB;QACzB,IAAI,CAAC,EAAE,CAAC;YACN,cAAc,EAAE,IAAI,CAAC,kBAAkB,C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@@
1
1
  {
2
2
  "name": "@anth0nycodes/fabric-history",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "A library built on top of fabric.js that allows for easy access to canvas history.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
+ "files": [
8
+ "dist",
9
+ "src"
10
+ ],
7
11
  "types": "dist/index.d.ts",
8
12
  "keywords": [
9
13
  "fabric",
package/src/canvas.ts CHANGED
@@ -32,7 +32,7 @@ export class CanvasWithHistory extends Canvas {
32
32
  "path:created": this._historySaveAction.bind(this),
33
33
  "erasing:end": this._historySaveAction.bind(this),
34
34
  "object:added": this._historySaveAction.bind(this),
35
- "object:removed": this._historySaveAction.bind(this),
35
+ "object:removed": this._historySaveAction.bind(this), // TODO: handle object modification + deletion batching
36
36
  "object:moving": this._objectMoving.bind(this),
37
37
  "object:modified": this._handleObjectModified.bind(this),
38
38
  "canvas:cleared": this._historySaveAction.bind(this),
@@ -1,14 +0,0 @@
1
- {
2
- "permissions": {
3
- "allow": [
4
- "Bash(ls:*)",
5
- "Bash(npm run build:*)",
6
- "Bash(npm create:*)",
7
- "Bash(npm install)",
8
- "Bash(npm install:*)",
9
- "mcp__context7__query-docs",
10
- "Bash(pnpm remove:*)",
11
- "Bash(pnpm add:*)"
12
- ]
13
- }
14
- }
@@ -1,45 +0,0 @@
1
- ---
2
- name: Bug Report
3
- about: Report a bug or unexpected behavior
4
- title: "[BUG] "
5
- labels: bug
6
- assignees: ""
7
- ---
8
-
9
- ## Description
10
-
11
- <!-- A clear and concise description of the bug -->
12
-
13
- ## Steps to Reproduce
14
-
15
- 1.
16
- 2.
17
- 3.
18
- 4.
19
-
20
- ## Expected Behavior
21
-
22
- <!-- What you expected to happen -->
23
-
24
- ## Actual Behavior
25
-
26
- <!-- What actually happened -->
27
-
28
- ## Environment
29
-
30
- - **OS:** <!-- e.g., macOS 14.0, Windows 11, Ubuntu 22.04 -->
31
- - **Node.js version:** <!-- run `node --version` -->
32
- - **Package version:** <!-- run `npm list -g @anth0nycodes/fabric-history` -->
33
- - **Installation method:** <!-- npm or pnpm -->
34
-
35
- ## Error Output
36
-
37
- <!-- If applicable, paste any error messages or screenshots -->
38
-
39
- ```
40
- Paste error output here
41
- ```
42
-
43
- ## Additional Context
44
-
45
- <!-- Add any other context about the problem here -->
@@ -1,36 +0,0 @@
1
- ---
2
- name: Feature Request
3
- about: Suggest a new feature or enhancement
4
- title: "[FEATURE] "
5
- labels: enhancement
6
- assignees: ""
7
- ---
8
-
9
- ## Feature Description
10
-
11
- <!-- A clear and concise description of the feature you'd like to see -->
12
-
13
- ## Problem/Use Case
14
-
15
- <!-- What problem does this solve? Why would this feature be useful? -->
16
-
17
- ## Proposed Solution
18
-
19
- <!-- How do you envision this feature working? -->
20
-
21
- ## Alternative Solutions
22
-
23
- <!-- Have you considered any alternative solutions or features? -->
24
-
25
- ## Examples
26
-
27
- <!-- If applicable, provide examples of how this feature would be used -->
28
-
29
- ## Additional Context
30
-
31
- <!-- Add any other context, screenshots, or references about the feature request -->
32
-
33
- ## Would you like to contribute this feature?
34
-
35
- - [ ] Yes, I'd like to work on this
36
- - [ ] No, just suggesting
@@ -1,11 +0,0 @@
1
- # To get started with Dependabot version updates, you'll need to specify which
2
- # package ecosystems to update and where the package manifests are located.
3
- # Please see the documentation for all configuration options:
4
- # https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5
-
6
- version: 2
7
- updates:
8
- - package-ecosystem: "npm" # See documentation for possible values
9
- directory: "/" # Location of package manifests
10
- schedule:
11
- interval: "weekly"
@@ -1,44 +0,0 @@
1
- ## Description
2
-
3
- <!-- Provide a brief description of the changes in this PR -->
4
-
5
- ## Type of Change
6
-
7
- <!-- Mark the relevant option with an "x" -->
8
-
9
- - [ ] Bug fix (non-breaking change which fixes an issue)
10
- - [ ] New feature (non-breaking change which adds functionality)
11
- - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
12
- - [ ] Documentation update
13
- - [ ] Refactoring (no functional changes)
14
- - [ ] Other (please describe):
15
-
16
- ## Related Issues
17
-
18
- <!-- Link to related issues using #issue_number -->
19
-
20
- Fixes #
21
-
22
- ## Changes Made
23
-
24
- <!-- List the specific changes made in this PR -->
25
-
26
- -
27
- -
28
- -
29
-
30
- ## Testing
31
-
32
- <!-- Describe the testing you've done -->
33
-
34
- - [ ] Tests pass locally with `pnpm test`
35
- - [ ] Type checking passes with `pnpm check`
36
- - [ ] Build succeeds with `pnpm build`
37
-
38
- ## Checklist
39
-
40
- - [ ] My code follows the project's coding style
41
- - [ ] I have performed a self-review of my own code
42
- - [ ] I have commented my code where necessary
43
- - [ ] My changes generate no new warnings or errors
44
- - [ ] I have updated the documentation (if applicable)
package/.prettierignore DELETED
@@ -1,23 +0,0 @@
1
- # Dependencies
2
- node_modules
3
-
4
- # Build outputs
5
- dist
6
- build
7
- .next
8
- out
9
-
10
- # Coverage
11
- coverage
12
-
13
- # Lock files
14
- pnpm-lock.yaml
15
- package-lock.json
16
- yarn.lock
17
-
18
- # Environment files
19
- .env
20
- .env.*
21
-
22
- # Generated files
23
- *.log
package/.prettierrc DELETED
@@ -1,18 +0,0 @@
1
- {
2
- "semi": true,
3
- "singleQuote": false,
4
- "tabWidth": 2,
5
- "trailingComma": "es5",
6
- "printWidth": 80,
7
- "plugins": [
8
- "@ianvs/prettier-plugin-sort-imports",
9
- "prettier-plugin-tailwindcss"
10
- ],
11
- "importOrder": [
12
- "^react",
13
- "^next",
14
- "<THIRD_PARTY_MODULES>",
15
- "^@/(.*)$",
16
- "^[./]"
17
- ]
18
- }
package/CONTRIBUTING.md DELETED
@@ -1,79 +0,0 @@
1
- # Contributing to fabric-history
2
-
3
- Thank you for your interest in contributing to fabric-history! We welcome contributions from the community.
4
-
5
- ## Getting Started
6
-
7
- 1. Fork the repository
8
- 2. Clone your fork:
9
- ```bash
10
- git clone https://github.com/YOUR_USERNAME/fabric-history.git
11
- cd fabric-history
12
- ```
13
- 3. Install dependencies:
14
- ```bash
15
- pnpm install
16
- ```
17
-
18
- ## Development Workflow
19
-
20
- 1. Create a new branch for your feature or bug fix:
21
-
22
- ```bash
23
- git checkout -b feature/your-feature-name
24
- ```
25
-
26
- 2. Make your changes and ensure they follow the project's coding standards
27
-
28
- 3. Run the test suite to ensure all tests pass:
29
-
30
- ```bash
31
- pnpm test
32
- ```
33
-
34
- For test coverage:
35
-
36
- ```bash
37
- pnpm coverage
38
- ```
39
-
40
- 4. Run type checking to ensure there are no TypeScript errors:
41
-
42
- ```bash
43
- pnpm check
44
- ```
45
-
46
- 5. Build the project to verify everything compiles:
47
-
48
- ```bash
49
- pnpm build
50
- ```
51
-
52
- 7. Commit your changes with a clear and descriptive commit message:
53
-
54
- ```bash
55
- git commit -m "Add: description of your changes"
56
- ```
57
-
58
- 8. Push to your fork:
59
-
60
- ```bash
61
- git push origin feature/your-feature-name
62
- ```
63
-
64
- 9. Open a pull request against the main repository
65
-
66
- ## Reporting Issues
67
-
68
- If you find a bug or have a feature request, please create an issue on GitHub with:
69
-
70
- - A clear title and description
71
- - Steps to reproduce (for bugs)
72
- - Expected vs actual behavior
73
- - Your environment details (fabric.js version, browser, etc.)
74
-
75
- ## Questions?
76
-
77
- Feel free to open an issue for any questions or concerns.
78
-
79
- Thank you for contributing!
package/tsconfig.json DELETED
@@ -1,24 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES2022",
4
- "module": "ES2022",
5
- "lib": ["ES2022", "dom"],
6
- "moduleResolution": "bundler",
7
- "resolveJsonModule": true,
8
- "skipDefaultLibCheck": true,
9
- "allowJs": true,
10
- "checkJs": false,
11
- "outDir": "./dist",
12
- "rootDir": "./src",
13
- "strict": true,
14
- "esModuleInterop": true,
15
- "skipLibCheck": true,
16
- "forceConsistentCasingInFileNames": true,
17
- "declaration": true,
18
- "declarationMap": true,
19
- "sourceMap": true,
20
- "types": ["node"]
21
- },
22
- "include": ["src/**/*"],
23
- "exclude": ["node_modules", "dist", "src/**/*.test.ts"]
24
- }
package/vitest.config.ts DELETED
@@ -1,9 +0,0 @@
1
- import { defineConfig } from "vitest/config";
2
-
3
- export default defineConfig({
4
- test: {
5
- environment: "jsdom",
6
- setupFiles: ["./vitest.setup.ts"],
7
- exclude: ["node_modules", "dist"],
8
- },
9
- });
package/vitest.setup.ts DELETED
@@ -1,34 +0,0 @@
1
- import { vi } from "vitest";
2
-
3
- // Mock canvas getContext for jsdom
4
- const getContext = vi.fn(() => ({
5
- scale: vi.fn(),
6
- clearRect: vi.fn(),
7
- fillRect: vi.fn(),
8
- getImageData: vi.fn(() => ({ data: [] })),
9
- putImageData: vi.fn(),
10
- createImageData: vi.fn(() => []),
11
- setTransform: vi.fn(),
12
- drawImage: vi.fn(),
13
- save: vi.fn(),
14
- restore: vi.fn(),
15
- beginPath: vi.fn(),
16
- moveTo: vi.fn(),
17
- lineTo: vi.fn(),
18
- closePath: vi.fn(),
19
- stroke: vi.fn(),
20
- fill: vi.fn(),
21
- translate: vi.fn(),
22
- rotate: vi.fn(),
23
- arc: vi.fn(),
24
- rect: vi.fn(),
25
- clip: vi.fn(),
26
- measureText: vi.fn(() => ({ width: 0 })),
27
- transform: vi.fn(),
28
- canvas: {
29
- width: 300,
30
- height: 150,
31
- },
32
- }));
33
-
34
- HTMLCanvasElement.prototype.getContext = getContext as any;