@fiduswriter/image-manager 0.1.5 → 0.1.6

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.
Files changed (2) hide show
  1. package/README.md +53 -3
  2. package/package.json +94 -80
package/README.md CHANGED
@@ -1,5 +1,55 @@
1
- # @fiduswriter/image-manager
1
+ <p align="center">
2
+ <img src="logo.svg" alt="@fiduswriter/image-manager" width="100" height="100">
3
+ </p>
2
4
 
3
- Fidus Writer image/media manager overview, upload/edit dialog and selection dialog.
5
+ <h1 align="center">@fiduswriter/image-manager</h1>
4
6
 
5
- This package is a freestanding JavaScript library extracted from the main Fidus Writer Django application.
7
+ <p align="center">Image and media manager for Fidus Writer</p>
8
+
9
+ ---
10
+
11
+ ## What it does
12
+
13
+ Manages images and other media for Fidus Writer. Provides a client-side image
14
+ database, an overview table for browsing images, an edit dialog for cropping
15
+ and metadata, and a selection dialog for inserting images into documents.
16
+
17
+ ## Exports
18
+
19
+ | Export | Description |
20
+ | ---------------------- | ----------------------------------------------------------- |
21
+ | `ImageDB` | Client-side connector to the server's image database |
22
+ | `ImageOverview` | Overview component for browsing all images in the library |
23
+ | `ImageEditDialog` | Dialog for editing image properties, cropping, and metadata |
24
+ | `ImageSelectionDialog` | Dialog for selecting images to insert into documents |
25
+
26
+ ## Installation
27
+
28
+ ```bash
29
+ npm install @fiduswriter/image-manager
30
+ ```
31
+
32
+ ## Usage
33
+
34
+ ```ts
35
+ import {
36
+ ImageDB,
37
+ ImageOverview,
38
+ ImageEditDialog,
39
+ ImageSelectionDialog,
40
+ } from "@fiduswriter/image-manager";
41
+ ```
42
+
43
+ ## Development
44
+
45
+ ```bash
46
+ npm install # Install dependencies
47
+ npm run build # Compile TypeScript to dist/
48
+ npm run typecheck # Check types without emitting
49
+ npm run lint # Lint with ESLint
50
+ npm run format:check # Check formatting with Prettier
51
+ ```
52
+
53
+ ## License
54
+
55
+ AGPL-3.0 — see [LICENSE](LICENSE) for details.
package/package.json CHANGED
@@ -1,87 +1,101 @@
1
1
  {
2
- "name": "@fiduswriter/image-manager",
3
- "version": "0.1.5",
4
- "description": "Fidus Writer image/media manager",
5
- "repository": {
6
- "type": "git",
7
- "url": "ssh://git@codeberg.org/fiduswriter/fiduswriter-image-manager-js.git"
2
+ "name": "@fiduswriter/image-manager",
3
+ "version": "0.1.6",
4
+ "description": "Fidus Writer image/media manager",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "ssh://git@codeberg.org/fiduswriter/fiduswriter-image-manager-js.git"
8
+ },
9
+ "license": "AGPL-3.0",
10
+ "author": "Johannes Wilm",
11
+ "type": "module",
12
+ "main": "./dist/index.js",
13
+ "types": "./dist/index.d.ts",
14
+ "exports": {
15
+ ".": {
16
+ "types": "./dist/index.d.ts",
17
+ "default": "./dist/index.js"
8
18
  },
9
- "license": "AGPL-3.0",
10
- "author": "Johannes Wilm",
11
- "type": "module",
12
- "main": "./dist/index.js",
13
- "types": "./dist/index.d.ts",
14
- "exports": {
15
- ".": {
16
- "types": "./dist/index.d.ts",
17
- "default": "./dist/index.js"
18
- },
19
- "./*": {
20
- "types": "./dist/*.d.ts",
21
- "default": "./dist/*.js"
22
- },
23
- "./copyright_dialog": {
24
- "types": "./dist/copyright_dialog/index.d.ts",
25
- "default": "./dist/copyright_dialog/index.js"
26
- },
27
- "./copyright_dialog/*": {
28
- "types": "./dist/copyright_dialog/*.d.ts",
29
- "default": "./dist/copyright_dialog/*.js"
30
- },
31
- "./edit_dialog": {
32
- "types": "./dist/edit_dialog/index.d.ts",
33
- "default": "./dist/edit_dialog/index.js"
34
- },
35
- "./edit_dialog/*": {
36
- "types": "./dist/edit_dialog/*.d.ts",
37
- "default": "./dist/edit_dialog/*.js"
38
- },
39
- "./overview": {
40
- "types": "./dist/overview/index.d.ts",
41
- "default": "./dist/overview/index.js"
42
- },
43
- "./overview/*": {
44
- "types": "./dist/overview/*.d.ts",
45
- "default": "./dist/overview/*.js"
46
- },
47
- "./selection_dialog": {
48
- "types": "./dist/selection_dialog/index.d.ts",
49
- "default": "./dist/selection_dialog/index.js"
50
- },
51
- "./selection_dialog/*": {
52
- "types": "./dist/selection_dialog/*.d.ts",
53
- "default": "./dist/selection_dialog/*.js"
54
- }
19
+ "./*": {
20
+ "types": "./dist/*.d.ts",
21
+ "default": "./dist/*.js"
55
22
  },
56
- "files": [
57
- "dist/",
58
- "src/",
59
- "README.md",
60
- "LICENSE"
61
- ],
62
- "scripts": {
63
- "build": "tsc",
64
- "prepare": "npm run build",
65
- "prepublishOnly": "npm run build",
66
- "typecheck": "tsc --noEmit",
67
- "lint": "eslint src",
68
- "lint:fix": "eslint src --fix",
69
- "format": "prettier --write .",
70
- "format:check": "prettier --check ."
23
+ "./copyright_dialog": {
24
+ "types": "./dist/copyright_dialog/index.d.ts",
25
+ "default": "./dist/copyright_dialog/index.js"
26
+ },
27
+ "./copyright_dialog/*": {
28
+ "types": "./dist/copyright_dialog/*.d.ts",
29
+ "default": "./dist/copyright_dialog/*.js"
30
+ },
31
+ "./edit_dialog": {
32
+ "types": "./dist/edit_dialog/index.d.ts",
33
+ "default": "./dist/edit_dialog/index.js"
34
+ },
35
+ "./edit_dialog/*": {
36
+ "types": "./dist/edit_dialog/*.d.ts",
37
+ "default": "./dist/edit_dialog/*.js"
71
38
  },
72
- "dependencies": {
73
- "@fiduswriter/common": "^0.1.4",
74
- "bibliojson": "^4.0.3",
75
- "cropperjs": "^1.6.2",
76
- "fast-deep-equal": "^3.1.3",
77
- "fwtoolkit": "^0.1.9"
39
+ "./overview": {
40
+ "types": "./dist/overview/index.d.ts",
41
+ "default": "./dist/overview/index.js"
78
42
  },
79
- "devDependencies": {
80
- "@eslint/js": "^10.0.1",
81
- "eslint": "^10.6.0",
82
- "globals": "^15.15.0",
83
- "prettier": "^3.5.3",
84
- "typescript": "^6.0.3",
85
- "typescript-eslint": "^8.62.0"
43
+ "./overview/*": {
44
+ "types": "./dist/overview/*.d.ts",
45
+ "default": "./dist/overview/*.js"
46
+ },
47
+ "./selection_dialog": {
48
+ "types": "./dist/selection_dialog/index.d.ts",
49
+ "default": "./dist/selection_dialog/index.js"
50
+ },
51
+ "./selection_dialog/*": {
52
+ "types": "./dist/selection_dialog/*.d.ts",
53
+ "default": "./dist/selection_dialog/*.js"
86
54
  }
55
+ },
56
+ "files": [
57
+ "dist/",
58
+ "src/",
59
+ "README.md",
60
+ "LICENSE"
61
+ ],
62
+ "scripts": {
63
+ "build": "tsc",
64
+ "prepare": "npm run build",
65
+ "prepublishOnly": "npm run build",
66
+ "typecheck": "tsc --noEmit",
67
+ "lint": "eslint src",
68
+ "lint:fix": "eslint src --fix",
69
+ "format": "prettier --write .",
70
+ "format:check": "prettier --check .",
71
+ "test": "node --experimental-vm-modules node_modules/jest/bin/jest.js --config jest.config.js"
72
+ },
73
+ "dependencies": {
74
+ "@fiduswriter/common": "^0.1.4",
75
+ "bibliojson": "^4.0.3",
76
+ "cropperjs": "^1.6.2",
77
+ "fast-deep-equal": "^3.1.3",
78
+ "fwtoolkit": "^0.1.9"
79
+ },
80
+ "devDependencies": {
81
+ "@eslint/js": "^10.0.1",
82
+ "@types/jest": "^30.0.0",
83
+ "eslint": "^10.6.0",
84
+ "globals": "^15.15.0",
85
+ "happy-dom": "^20.10.6",
86
+ "jest": "^30.4.2",
87
+ "prettier": "^3.5.3",
88
+ "ts-jest": "^29.4.11",
89
+ "ts-jest-resolver": "^2.0.1",
90
+ "typescript": "^6.0.3",
91
+ "typescript-eslint": "^8.62.0"
92
+ },
93
+ "lint-staged": {
94
+ "*.{ts,js,mjs,css,md,json,html}": [
95
+ "prettier --write"
96
+ ],
97
+ "*.{ts,js,mjs}": [
98
+ "eslint --fix"
99
+ ]
100
+ }
87
101
  }