noteloom 0.1.7 → 0.2.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/dist/style.css CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- * noteloom's default theme — minimal, clean, Notion/Linear-adjacent.
2
+ * noteloom's default theme — minimal, clean, modern SaaS-adjacent.
3
3
  *
4
4
  * Ships as plain CSS custom properties on :root (not scoped to a wrapper
5
5
  * element) deliberately: several of this package's own pieces — Select's
@@ -101,6 +101,18 @@
101
101
  }
102
102
 
103
103
  .be-editable {
104
+ /* Block-level and full-width so the whole line (including the blank
105
+ trailing space after short text, and an empty line's full height) is
106
+ part of the actual contentEditable hit-test box. Left inline/sized to
107
+ content, a click on that blank area lands on the non-editable wrapper
108
+ div instead of this element: the browser's native "nothing focused
109
+ yet" resolution still finds it on a first click, but re-clicking the
110
+ same dead-zone point while this element already holds the selection
111
+ collapses/clears it instead, since there's nothing here to re-anchor
112
+ the caret onto. */
113
+ display: block;
114
+ width: 100%;
115
+ min-height: 1em;
104
116
  outline: none;
105
117
  }
106
118
 
@@ -797,7 +809,7 @@
797
809
  .be-canvas-toolbar-btn {
798
810
  border: none;
799
811
  background: transparent;
800
- width: 26px;
812
+ width: 28px;
801
813
  height: 24px;
802
814
  display: flex;
803
815
  align-items: center;
@@ -2183,8 +2195,8 @@ tr.be-table-row:hover .be-table-delete-row {
2183
2195
  }
2184
2196
 
2185
2197
  /* A mention chip always uses this one fixed color, not each option's own
2186
- tag color — matches Notion/Slack/GitHub's "@mentions are one consistent
2187
- color" convention rather than a per-person palette. */
2198
+ tag color — "@mentions are one consistent color" is the common
2199
+ convention rather than a per-person palette. */
2188
2200
  .be-select-tag-mention {
2189
2201
  background: var(--noteloom-accent-soft);
2190
2202
  color: var(--noteloom-accent);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "noteloom",
3
- "version": "0.1.7",
4
- "description": "Zero-runtime-dependency, React-first block/rich-text editor — Notion-style blocks, inline widgets, slash commands, undo/redo, and clipboard, with an optional default theme (noteloom/style.css).",
3
+ "version": "0.2.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
5
  "keywords": [
6
6
  "react",
7
7
  "editor",
@@ -9,8 +9,13 @@
9
9
  "block-editor",
10
10
  "wysiwyg",
11
11
  "contenteditable",
12
- "notion",
13
- "slash-commands"
12
+ "slash-commands",
13
+ "collaborative-editing",
14
+ "crdt",
15
+ "webrtc",
16
+ "offline-first",
17
+ "pwa",
18
+ "real-time"
14
19
  ],
15
20
  "license": "MIT",
16
21
  "author": "Nikhil Vishwakarma",
@@ -28,9 +33,11 @@
28
33
  ],
29
34
  "main": "./dist/noteloom.cjs",
30
35
  "module": "./dist/noteloom.es.js",
36
+ "types": "./dist/index.d.ts",
31
37
  "style": "./dist/style.css",
32
38
  "exports": {
33
39
  ".": {
40
+ "types": "./dist/index.d.ts",
34
41
  "import": "./dist/noteloom.es.js",
35
42
  "require": "./dist/noteloom.cjs",
36
43
  "default": "./dist/noteloom.es.js"
@@ -46,9 +53,17 @@
46
53
  },
47
54
  "scripts": {
48
55
  "dev": "vite --config examples/basic/vite.config.js",
49
- "build": "vite build && node -e \"require('fs').copyFileSync('src/style.css','dist/style.css')\"",
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:collab": "vite --config examples/collab/vite.config.js",
61
+ "dev:lan-collab": "vite --config examples/lan-collab/vite.config.js",
62
+ "dev:offline-persist": "vite --config examples/offline-persist/vite.config.js",
63
+ "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')\"",
50
64
  "test": "vitest run",
51
- "prepublishOnly": "npm test && npm run build"
65
+ "typecheck": "tsc",
66
+ "prepublishOnly": "npm test && npm run typecheck && npm run build"
52
67
  },
53
68
  "peerDependencies": {
54
69
  "react": "^18.2.0 || ^19.0.0",
@@ -57,11 +72,16 @@
57
72
  "devDependencies": {
58
73
  "@testing-library/jest-dom": "^6.4.0",
59
74
  "@testing-library/react": "^16.0.0",
75
+ "@types/react": "^18.3.0",
76
+ "@types/react-dom": "^18.3.0",
60
77
  "@vitejs/plugin-react": "^4.3.0",
78
+ "fake-indexeddb": "^6.2.5",
61
79
  "jsdom": "^25.0.0",
62
80
  "react": "^18.3.1",
63
81
  "react-dom": "^18.3.1",
82
+ "typescript": "^5.6.0",
64
83
  "vite": "^5.4.0",
84
+ "vite-plugin-pwa": "^1.3.0",
65
85
  "vitest": "^2.1.0"
66
86
  }
67
87
  }