noteloom 0.3.2 → 0.4.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.
Files changed (104) hide show
  1. package/README.md +344 -53
  2. package/bin/noteloom.mjs +139 -0
  3. package/dist/canvas.cjs +2 -0
  4. package/dist/canvas.cjs.map +1 -0
  5. package/dist/canvas.d.ts +2 -0
  6. package/dist/canvas.js +5 -0
  7. package/dist/canvas.js.map +1 -0
  8. package/dist/collab.cjs +2 -0
  9. package/dist/collab.cjs.map +1 -0
  10. package/dist/collab.d.ts +19 -0
  11. package/dist/collab.js +379 -0
  12. package/dist/collab.js.map +1 -0
  13. package/dist/comments.cjs +2 -0
  14. package/dist/comments.cjs.map +1 -0
  15. package/dist/comments.d.ts +17 -0
  16. package/dist/comments.js +19 -0
  17. package/dist/comments.js.map +1 -0
  18. package/dist/index.cjs +2 -0
  19. package/dist/index.cjs.map +1 -0
  20. package/dist/index.d.ts +392 -32
  21. package/dist/index.js +3983 -0
  22. package/dist/index.js.map +1 -0
  23. package/dist/persistence.cjs +2 -0
  24. package/dist/persistence.cjs.map +1 -0
  25. package/dist/persistence.d.ts +11 -0
  26. package/dist/persistence.js +12 -0
  27. package/dist/persistence.js.map +1 -0
  28. package/dist/shared/CommentAvatar-TKqsM8vG.js +53 -0
  29. package/dist/shared/CommentAvatar-TKqsM8vG.js.map +1 -0
  30. package/dist/shared/CommentAvatar-V457IgoQ.cjs +2 -0
  31. package/dist/shared/CommentAvatar-V457IgoQ.cjs.map +1 -0
  32. package/dist/shared/CommentThreadCard-CAJ3oPdr.cjs +2 -0
  33. package/dist/shared/CommentThreadCard-CAJ3oPdr.cjs.map +1 -0
  34. package/dist/shared/CommentThreadCard-Cxf8GwHJ.js +213 -0
  35. package/dist/shared/CommentThreadCard-Cxf8GwHJ.js.map +1 -0
  36. package/dist/shared/CommentsPanel-BwVVyMOC.js +76 -0
  37. package/dist/shared/CommentsPanel-BwVVyMOC.js.map +1 -0
  38. package/dist/shared/CommentsPanel-CES4uzye.cjs +2 -0
  39. package/dist/shared/CommentsPanel-CES4uzye.cjs.map +1 -0
  40. package/dist/shared/VersionHistory-Bg6fufP5.js +1120 -0
  41. package/dist/shared/VersionHistory-Bg6fufP5.js.map +1 -0
  42. package/dist/shared/VersionHistory-DELa2Wbq.cjs +12 -0
  43. package/dist/shared/VersionHistory-DELa2Wbq.cjs.map +1 -0
  44. package/dist/shared/VoiceListeningIndicator-BOfVmLK0.js +338 -0
  45. package/dist/shared/VoiceListeningIndicator-BOfVmLK0.js.map +1 -0
  46. package/dist/shared/VoiceListeningIndicator-DNX8JlQM.cjs +2 -0
  47. package/dist/shared/VoiceListeningIndicator-DNX8JlQM.cjs.map +1 -0
  48. package/dist/shared/fieldRegistry-BoYyW3GH.cjs +2 -0
  49. package/dist/shared/fieldRegistry-BoYyW3GH.cjs.map +1 -0
  50. package/dist/shared/fieldRegistry-PjJWXFoB.js +223 -0
  51. package/dist/shared/fieldRegistry-PjJWXFoB.js.map +1 -0
  52. package/dist/shared/icons-C1_s0jKK.js +4269 -0
  53. package/dist/shared/icons-C1_s0jKK.js.map +1 -0
  54. package/dist/shared/icons-DtCsXuU6.cjs +3531 -0
  55. package/dist/shared/icons-DtCsXuU6.cjs.map +1 -0
  56. package/dist/shared/index-B9jyyL8u.js +2145 -0
  57. package/dist/shared/index-B9jyyL8u.js.map +1 -0
  58. package/dist/shared/index-D9WEXpYM.cjs +2 -0
  59. package/dist/shared/index-D9WEXpYM.cjs.map +1 -0
  60. package/dist/shared/indexedDbPersistence-BKlGPFTP.js +112 -0
  61. package/dist/shared/indexedDbPersistence-BKlGPFTP.js.map +1 -0
  62. package/dist/shared/indexedDbPersistence-BWJ1h5Vp.cjs +2 -0
  63. package/dist/shared/indexedDbPersistence-BWJ1h5Vp.cjs.map +1 -0
  64. package/dist/shared/leafBlockFactory-A9eUhSe-.js +335 -0
  65. package/dist/shared/leafBlockFactory-A9eUhSe-.js.map +1 -0
  66. package/dist/shared/leafBlockFactory-Dp382eP8.cjs +2 -0
  67. package/dist/shared/leafBlockFactory-Dp382eP8.cjs.map +1 -0
  68. package/dist/shared/serialize-DWEfk0vU.cjs +3 -0
  69. package/dist/shared/serialize-DWEfk0vU.cjs.map +1 -0
  70. package/dist/shared/serialize-T9Odwx24.js +86 -0
  71. package/dist/shared/serialize-T9Odwx24.js.map +1 -0
  72. package/dist/shared/starter-kit-CY5wzYDf.js +4980 -0
  73. package/dist/shared/starter-kit-CY5wzYDf.js.map +1 -0
  74. package/dist/shared/starter-kit-lPN-NpJ5.cjs +27 -0
  75. package/dist/shared/starter-kit-lPN-NpJ5.cjs.map +1 -0
  76. package/dist/shared/usePopoverEdgeClamp-CDG26jBM.cjs +2 -0
  77. package/dist/shared/usePopoverEdgeClamp-CDG26jBM.cjs.map +1 -0
  78. package/dist/shared/usePopoverEdgeClamp-gmFm0CnI.js +109 -0
  79. package/dist/shared/usePopoverEdgeClamp-gmFm0CnI.js.map +1 -0
  80. package/dist/shared/useServiceWorkerUpdate-BduabXv6.js +94 -0
  81. package/dist/shared/useServiceWorkerUpdate-BduabXv6.js.map +1 -0
  82. package/dist/shared/useServiceWorkerUpdate-DQboGesi.cjs +2 -0
  83. package/dist/shared/useServiceWorkerUpdate-DQboGesi.cjs.map +1 -0
  84. package/dist/starter-kit.cjs +2 -0
  85. package/dist/starter-kit.cjs.map +1 -0
  86. package/dist/starter-kit.d.ts +9 -0
  87. package/dist/starter-kit.js +10 -0
  88. package/dist/starter-kit.js.map +1 -0
  89. package/dist/style.css +3529 -3200
  90. package/dist/versions.cjs +2 -0
  91. package/dist/versions.cjs.map +1 -0
  92. package/dist/versions.d.ts +11 -0
  93. package/dist/versions.js +13 -0
  94. package/dist/versions.js.map +1 -0
  95. package/dist/voice.cjs +2 -0
  96. package/dist/voice.cjs.map +1 -0
  97. package/dist/voice.d.ts +7 -0
  98. package/dist/voice.js +8 -0
  99. package/dist/voice.js.map +1 -0
  100. package/package.json +159 -92
  101. package/dist/noteloom.cjs +0 -3209
  102. package/dist/noteloom.cjs.map +0 -1
  103. package/dist/noteloom.es.js +0 -14622
  104. package/dist/noteloom.es.js.map +0 -1
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./shared/VersionHistory-DELa2Wbq.cjs"),o=require("./shared/indexedDbPersistence-BWJ1h5Vp.cjs");exports.VersionHistory=e.VersionHistory;exports.createAutoVersionHistory=e.createAutoVersionHistory;exports.diffDocumentsHTML=e.diffDocumentsHTML;exports.useDocumentVersions=e.useDocumentVersions;exports.deleteDocumentVersion=o.deleteDocumentVersion;exports.listDocumentVersions=o.listDocumentVersions;exports.loadDocumentVersion=o.loadDocumentVersion;exports.saveDocumentVersion=o.saveDocumentVersion;
2
+ //# sourceMappingURL=versions.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"versions.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,11 @@
1
+ // noteloom/versions — types re-exported from the main declaration file.
2
+ export {
3
+ createAutoVersionHistory,
4
+ diffDocumentsHTML,
5
+ useDocumentVersions,
6
+ VersionHistory,
7
+ saveDocumentVersion,
8
+ loadDocumentVersion,
9
+ deleteDocumentVersion,
10
+ listDocumentVersions,
11
+ } from './index';
@@ -0,0 +1,13 @@
1
+ import { V as o, c as r, d as t, u as n } from "./shared/VersionHistory-Bg6fufP5.js";
2
+ import { b as i, c, e as u, f as m } from "./shared/indexedDbPersistence-BKlGPFTP.js";
3
+ export {
4
+ o as VersionHistory,
5
+ r as createAutoVersionHistory,
6
+ i as deleteDocumentVersion,
7
+ t as diffDocumentsHTML,
8
+ c as listDocumentVersions,
9
+ u as loadDocumentVersion,
10
+ m as saveDocumentVersion,
11
+ n as useDocumentVersions
12
+ };
13
+ //# sourceMappingURL=versions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"versions.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
package/dist/voice.cjs ADDED
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./shared/VoiceListeningIndicator-DNX8JlQM.cjs");exports.VoiceListeningIndicator=i.VoiceListeningIndicator;exports.VoicePermissionModal=i.VoicePermissionModal;exports.listVoiceCommands=i.listVoiceCommands;exports.useVoiceTyping=i.useVoiceTyping;
2
+ //# sourceMappingURL=voice.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"voice.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ // noteloom/voice — types re-exported from the main declaration file.
2
+ export {
3
+ useVoiceTyping,
4
+ VoicePermissionModal,
5
+ VoiceListeningIndicator,
6
+ listVoiceCommands,
7
+ } from './index';
package/dist/voice.js ADDED
@@ -0,0 +1,8 @@
1
+ import { V as s, a, l as e, u as n } from "./shared/VoiceListeningIndicator-BOfVmLK0.js";
2
+ export {
3
+ s as VoiceListeningIndicator,
4
+ a as VoicePermissionModal,
5
+ e as listVoiceCommands,
6
+ n as useVoiceTyping
7
+ };
8
+ //# sourceMappingURL=voice.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"voice.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
package/package.json CHANGED
@@ -1,92 +1,159 @@
1
- {
2
- "name": "noteloom",
3
- "version": "0.3.2",
4
- "description": "Zero-runtime-dependency, React-first block/rich-text editor — nestable content blocks, inline widgets, slash commands, undo/redo, clipboard, real-time collaborative editing (a custom CRDT over WebRTC), offline-first persistence (IndexedDB + PWA-ready), and live presence, with an optional default theme (noteloom/style.css).",
5
- "keywords": [
6
- "react",
7
- "editor",
8
- "rich-text",
9
- "block-editor",
10
- "wysiwyg",
11
- "contenteditable",
12
- "slash-commands",
13
- "collaborative-editing",
14
- "crdt",
15
- "webrtc",
16
- "offline-first",
17
- "pwa",
18
- "real-time"
19
- ],
20
- "license": "MIT",
21
- "author": "Nikhil Vishwakarma",
22
- "repository": {
23
- "type": "git",
24
- "url": "git+https://github.com/vishwakarmanikhil/noteloom.git"
25
- },
26
- "bugs": {
27
- "url": "https://github.com/vishwakarmanikhil/noteloom/issues"
28
- },
29
- "homepage": "https://noteloom.qusere.in",
30
- "type": "module",
31
- "sideEffects": [
32
- "*.css"
33
- ],
34
- "main": "./dist/noteloom.cjs",
35
- "module": "./dist/noteloom.es.js",
36
- "types": "./dist/index.d.ts",
37
- "style": "./dist/style.css",
38
- "exports": {
39
- ".": {
40
- "types": "./dist/index.d.ts",
41
- "import": "./dist/noteloom.es.js",
42
- "require": "./dist/noteloom.cjs",
43
- "default": "./dist/noteloom.es.js"
44
- },
45
- "./style.css": "./dist/style.css",
46
- "./package.json": "./package.json"
47
- },
48
- "files": [
49
- "dist"
50
- ],
51
- "engines": {
52
- "node": ">=18"
53
- },
54
- "scripts": {
55
- "dev": "vite --config examples/basic/vite.config.js",
56
- "dev:quickstart": "vite --config examples/01-quickstart/vite.config.js",
57
- "dev:custom-block": "vite --config examples/02-custom-block/vite.config.js",
58
- "dev:custom-field-type": "vite --config examples/03-custom-field-type/vite.config.js",
59
- "dev:styling": "vite --config examples/04-styling/vite.config.js",
60
- "dev:templates": "vite --config examples/05-templates/vite.config.js",
61
- "dev:comments": "vite --config examples/06-comments/vite.config.js",
62
- "dev:version-history": "vite --config examples/07-version-history/vite.config.js",
63
- "dev:collab": "vite --config examples/collab/vite.config.js",
64
- "dev:lan-collab": "vite --config examples/lan-collab/vite.config.js",
65
- "dev:offline-persist": "vite --config examples/offline-persist/vite.config.js",
66
- "build": "vite build && node -e \"require('fs').copyFileSync('src/style.css','dist/style.css');require('fs').copyFileSync('src/index.d.ts','dist/index.d.ts')\"",
67
- "test": "vitest run",
68
- "test:e2e": "playwright test",
69
- "typecheck": "tsc",
70
- "prepublishOnly": "npm test && npm run typecheck && npm run build"
71
- },
72
- "peerDependencies": {
73
- "react": "^18.2.0 || ^19.0.0",
74
- "react-dom": "^18.2.0 || ^19.0.0"
75
- },
76
- "devDependencies": {
77
- "@playwright/test": "^1.62.0",
78
- "@testing-library/jest-dom": "^6.4.0",
79
- "@testing-library/react": "^16.0.0",
80
- "@types/react": "^18.3.0",
81
- "@types/react-dom": "^18.3.0",
82
- "@vitejs/plugin-react": "^4.3.0",
83
- "fake-indexeddb": "^6.2.5",
84
- "jsdom": "^25.0.0",
85
- "react": "^18.3.1",
86
- "react-dom": "^18.3.1",
87
- "typescript": "^5.6.0",
88
- "vite": "^5.4.0",
89
- "vite-plugin-pwa": "^1.3.0",
90
- "vitest": "^2.1.0"
91
- }
92
- }
1
+ {
2
+ "name": "noteloom",
3
+ "version": "0.4.0",
4
+ "description": "Zero-runtime-dependency, React-first block/rich-text editor — nestable content blocks, inline widgets, slash commands, undo/redo, clipboard, real-time collaborative editing (a custom CRDT over WebRTC), offline-first persistence (IndexedDB + PWA-ready), and live presence, with an optional default theme (noteloom/style.css).",
5
+ "keywords": [
6
+ "react",
7
+ "editor",
8
+ "rich-text",
9
+ "block-editor",
10
+ "wysiwyg",
11
+ "contenteditable",
12
+ "slash-commands",
13
+ "collaborative-editing",
14
+ "crdt",
15
+ "webrtc",
16
+ "offline-first",
17
+ "pwa",
18
+ "real-time"
19
+ ],
20
+ "license": "MIT",
21
+ "author": "Nikhil Vishwakarma",
22
+ "repository": {
23
+ "type": "git",
24
+ "url": "git+https://github.com/vishwakarmanikhil/noteloom.git"
25
+ },
26
+ "bugs": {
27
+ "url": "https://github.com/vishwakarmanikhil/noteloom/issues"
28
+ },
29
+ "homepage": "https://noteloom.qusere.in",
30
+ "type": "module",
31
+ "sideEffects": [
32
+ "*.css"
33
+ ],
34
+ "main": "./dist/index.cjs",
35
+ "module": "./dist/index.js",
36
+ "types": "./dist/index.d.ts",
37
+ "style": "./dist/style.css",
38
+ "bin": {
39
+ "noteloom": "./bin/noteloom.mjs"
40
+ },
41
+ "exports": {
42
+ ".": {
43
+ "types": "./dist/index.d.ts",
44
+ "import": "./dist/index.js",
45
+ "require": "./dist/index.cjs",
46
+ "default": "./dist/index.js"
47
+ },
48
+ "./collab": {
49
+ "types": "./dist/collab.d.ts",
50
+ "import": "./dist/collab.js",
51
+ "require": "./dist/collab.cjs",
52
+ "default": "./dist/collab.js"
53
+ },
54
+ "./persistence": {
55
+ "types": "./dist/persistence.d.ts",
56
+ "import": "./dist/persistence.js",
57
+ "require": "./dist/persistence.cjs",
58
+ "default": "./dist/persistence.js"
59
+ },
60
+ "./comments": {
61
+ "types": "./dist/comments.d.ts",
62
+ "import": "./dist/comments.js",
63
+ "require": "./dist/comments.cjs",
64
+ "default": "./dist/comments.js"
65
+ },
66
+ "./versions": {
67
+ "types": "./dist/versions.d.ts",
68
+ "import": "./dist/versions.js",
69
+ "require": "./dist/versions.cjs",
70
+ "default": "./dist/versions.js"
71
+ },
72
+ "./voice": {
73
+ "types": "./dist/voice.d.ts",
74
+ "import": "./dist/voice.js",
75
+ "require": "./dist/voice.cjs",
76
+ "default": "./dist/voice.js"
77
+ },
78
+ "./canvas": {
79
+ "types": "./dist/canvas.d.ts",
80
+ "import": "./dist/canvas.js",
81
+ "require": "./dist/canvas.cjs",
82
+ "default": "./dist/canvas.js"
83
+ },
84
+ "./starter-kit": {
85
+ "types": "./dist/starter-kit.d.ts",
86
+ "import": "./dist/starter-kit.js",
87
+ "require": "./dist/starter-kit.cjs",
88
+ "default": "./dist/starter-kit.js"
89
+ },
90
+ "./theme": "./dist/style.css",
91
+ "./style.css": "./dist/style.css",
92
+ "./package.json": "./package.json"
93
+ },
94
+ "files": [
95
+ "dist",
96
+ "bin"
97
+ ],
98
+ "engines": {
99
+ "node": ">=18"
100
+ },
101
+ "scripts": {
102
+ "dev": "vite --config examples/basic/vite.config.js",
103
+ "dev:quickstart": "vite --config examples/01-quickstart/vite.config.js",
104
+ "dev:custom-block": "vite --config examples/02-custom-block/vite.config.js",
105
+ "dev:custom-field-type": "vite --config examples/03-custom-field-type/vite.config.js",
106
+ "dev:styling": "vite --config examples/04-styling/vite.config.js",
107
+ "dev:templates": "vite --config examples/05-templates/vite.config.js",
108
+ "dev:comments": "vite --config examples/06-comments/vite.config.js",
109
+ "dev:version-history": "vite --config examples/07-version-history/vite.config.js",
110
+ "dev:collab": "vite --config examples/collab/vite.config.js",
111
+ "dev:lan-collab": "vite --config examples/lan-collab/vite.config.js",
112
+ "dev:offline-persist": "vite --config examples/offline-persist/vite.config.js",
113
+ "build": "vite build && node scripts/copy-dist-assets.mjs",
114
+ "test": "vitest run",
115
+ "test:e2e": "playwright test",
116
+ "typecheck": "tsc",
117
+ "lint": "eslint .",
118
+ "lint:fix": "eslint . --fix",
119
+ "format": "prettier --write .",
120
+ "format:check": "prettier --check .",
121
+ "size": "npm run build && size-limit",
122
+ "changeset": "changeset",
123
+ "prepublishOnly": "npm run lint && npm test && npm run typecheck && npm run build"
124
+ },
125
+ "peerDependencies": {
126
+ "react": "^18.2.0 || ^19.0.0",
127
+ "react-dom": "^18.2.0 || ^19.0.0"
128
+ },
129
+ "devDependencies": {
130
+ "@changesets/cli": "^3.0.1",
131
+ "@eslint/js": "^9.39.5",
132
+ "@playwright/test": "^1.62.0",
133
+ "@size-limit/esbuild": "^13.0.3",
134
+ "@size-limit/file": "^13.0.3",
135
+ "@testing-library/jest-dom": "^6.4.0",
136
+ "@testing-library/react": "^16.0.0",
137
+ "@types/react": "^18.3.0",
138
+ "@types/react-dom": "^18.3.0",
139
+ "@vitejs/plugin-react": "^4.3.0",
140
+ "ajv": "^8.20.0",
141
+ "eslint": "^9.39.5",
142
+ "eslint-config-prettier": "^10.1.8",
143
+ "eslint-plugin-import": "^2.32.0",
144
+ "eslint-plugin-jsx-a11y": "^6.10.2",
145
+ "eslint-plugin-react": "^7.37.5",
146
+ "eslint-plugin-react-hooks": "^7.1.1",
147
+ "fake-indexeddb": "^6.2.5",
148
+ "globals": "^17.11.0",
149
+ "jsdom": "^25.0.0",
150
+ "prettier": "^3.9.6",
151
+ "react": "^18.3.1",
152
+ "react-dom": "^18.3.1",
153
+ "size-limit": "^13.0.3",
154
+ "typescript": "^5.6.0",
155
+ "vite": "^5.4.0",
156
+ "vite-plugin-pwa": "^1.3.0",
157
+ "vitest": "^2.1.0"
158
+ }
159
+ }