@jotx-labs/editor 2.4.138 → 2.4.140

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 (57) hide show
  1. package/dist/components/Brand/JotxLogo.d.ts +9 -0
  2. package/dist/components/Brand/JotxLogo.d.ts.map +1 -0
  3. package/dist/components/Brand/JotxLogo.js +11 -0
  4. package/dist/components/Brand/JotxLogo.js.map +1 -0
  5. package/dist/components/DocumentHeader/DocumentHeader.d.ts +21 -0
  6. package/dist/components/DocumentHeader/DocumentHeader.d.ts.map +1 -0
  7. package/dist/components/DocumentHeader/DocumentHeader.js +83 -0
  8. package/dist/components/DocumentHeader/DocumentHeader.js.map +1 -0
  9. package/dist/components/DocumentHeader/ExportMenu.d.ts +11 -0
  10. package/dist/components/DocumentHeader/ExportMenu.d.ts.map +1 -0
  11. package/dist/components/DocumentHeader/ExportMenu.js +244 -0
  12. package/dist/components/DocumentHeader/ExportMenu.js.map +1 -0
  13. package/dist/components/DocumentHeader/ViewOptions.d.ts +6 -0
  14. package/dist/components/DocumentHeader/ViewOptions.d.ts.map +1 -0
  15. package/dist/components/DocumentHeader/ViewOptions.js +73 -0
  16. package/dist/components/DocumentHeader/ViewOptions.js.map +1 -0
  17. package/dist/components/GraphView/GraphView.d.ts +33 -0
  18. package/dist/components/GraphView/GraphView.d.ts.map +1 -0
  19. package/dist/components/GraphView/GraphView.js +234 -0
  20. package/dist/components/GraphView/GraphView.js.map +1 -0
  21. package/dist/extensions/ButtonNode 2.js +59 -0
  22. package/dist/extensions/ButtonNode.d 2.ts +7 -0
  23. package/dist/extensions/ButtonNode.d.ts 2.map +1 -0
  24. package/dist/extensions/ButtonNode.js 2.map +1 -0
  25. package/dist/extensions/CardNode 2.js +64 -0
  26. package/dist/extensions/CardNode.d 2.ts +7 -0
  27. package/dist/extensions/CardNode.d.ts 2.map +1 -0
  28. package/dist/extensions/CardNode.js 2.map +1 -0
  29. package/dist/extensions/GridCardNode.d 2.ts +7 -0
  30. package/dist/extensions/GridCardNode.d.ts 2.map +1 -0
  31. package/dist/extensions/GridCardNode.js 2.map +1 -0
  32. package/dist/extensions/ImageNode.d.ts 2.map +1 -0
  33. package/dist/extensions/LinkNode.js 2.map +1 -0
  34. package/dist/extensions/SearchExtension.d 2.ts +40 -0
  35. package/dist/extensions/SearchExtension.d.ts 2.map +1 -0
  36. package/dist/extensions/SearchExtension.js 2.map +1 -0
  37. package/dist/extensions/SectionNode 2.js +58 -0
  38. package/dist/extensions/SectionNode.d 2.ts +11 -0
  39. package/dist/extensions/SectionNode.d.ts 2.map +1 -0
  40. package/dist/extensions/SectionNode.js 2.map +1 -0
  41. package/dist/extensions/ToggleNode 2.js +58 -0
  42. package/dist/extensions/ToggleNode.d 2.ts +11 -0
  43. package/dist/extensions/ToggleNode.d.ts 2.map +1 -0
  44. package/dist/extensions/ToggleNode.js 2.map +1 -0
  45. package/dist/index 2.js +128 -0
  46. package/dist/index.d 2.ts +59 -0
  47. package/dist/index.d.ts +5 -0
  48. package/dist/index.d.ts 2.map +1 -0
  49. package/dist/index.d.ts.map +1 -1
  50. package/dist/index.js +13 -1
  51. package/dist/index.js 2.map +1 -0
  52. package/dist/index.js.map +1 -1
  53. package/dist/styles/DocumentHeader.css +294 -0
  54. package/dist/styles/GraphView.css +220 -0
  55. package/package.json +6 -5
  56. package/src/styles/DocumentHeader.css +294 -0
  57. package/src/styles/GraphView.css +220 -0
@@ -0,0 +1,220 @@
1
+ /* Graph View Styles */
2
+
3
+ .graph-view-overlay {
4
+ position: fixed;
5
+ top: 0;
6
+ left: 0;
7
+ right: 0;
8
+ bottom: 0;
9
+ background: rgba(0, 0, 0, 0.8);
10
+ z-index: 9999;
11
+ display: flex;
12
+ align-items: center;
13
+ justify-content: center;
14
+ }
15
+
16
+ .graph-view-container {
17
+ width: 90vw;
18
+ height: 85vh;
19
+ background: #1a1a2e;
20
+ border-radius: 12px;
21
+ overflow: hidden;
22
+ display: flex;
23
+ flex-direction: column;
24
+ box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
25
+ }
26
+
27
+ /* Header */
28
+ .graph-view-header {
29
+ display: flex;
30
+ justify-content: space-between;
31
+ align-items: center;
32
+ padding: 16px 24px;
33
+ background: #16162a;
34
+ border-bottom: 1px solid #2a2a4e;
35
+ }
36
+
37
+ .graph-view-title {
38
+ display: flex;
39
+ align-items: center;
40
+ gap: 12px;
41
+ }
42
+
43
+ .graph-icon {
44
+ font-size: 24px;
45
+ }
46
+
47
+ .graph-view-title h2 {
48
+ margin: 0;
49
+ font-size: 18px;
50
+ font-weight: 600;
51
+ color: #fff;
52
+ }
53
+
54
+ .graph-stats {
55
+ font-size: 12px;
56
+ color: #888;
57
+ padding: 4px 8px;
58
+ background: rgba(255, 255, 255, 0.05);
59
+ border-radius: 4px;
60
+ }
61
+
62
+ .graph-view-controls {
63
+ display: flex;
64
+ gap: 8px;
65
+ }
66
+
67
+ .graph-view-controls button {
68
+ background: rgba(255, 255, 255, 0.1);
69
+ border: none;
70
+ color: #fff;
71
+ padding: 8px;
72
+ border-radius: 6px;
73
+ cursor: pointer;
74
+ display: flex;
75
+ align-items: center;
76
+ justify-content: center;
77
+ transition: background 0.2s;
78
+ }
79
+
80
+ .graph-view-controls button:hover {
81
+ background: rgba(255, 255, 255, 0.2);
82
+ }
83
+
84
+ /* Graph Content */
85
+ .graph-view-content {
86
+ flex: 1;
87
+ position: relative;
88
+ background: #0d0d1a;
89
+ }
90
+
91
+ .graph-view-content svg {
92
+ display: block;
93
+ }
94
+
95
+ /* Legend */
96
+ .graph-legend {
97
+ position: absolute;
98
+ bottom: 20px;
99
+ left: 20px;
100
+ background: rgba(26, 26, 46, 0.95);
101
+ border: 1px solid #2a2a4e;
102
+ border-radius: 8px;
103
+ padding: 12px 16px;
104
+ font-size: 12px;
105
+ color: #ccc;
106
+ }
107
+
108
+ .legend-title {
109
+ font-weight: 600;
110
+ margin-bottom: 8px;
111
+ color: #fff;
112
+ }
113
+
114
+ .legend-item {
115
+ display: flex;
116
+ align-items: center;
117
+ gap: 8px;
118
+ margin-bottom: 4px;
119
+ }
120
+
121
+ .legend-dot {
122
+ width: 6px;
123
+ height: 6px;
124
+ border-radius: 50%;
125
+ flex-shrink: 0;
126
+ }
127
+
128
+ /* Node Panel */
129
+ .graph-node-panel {
130
+ position: absolute;
131
+ top: 20px;
132
+ right: 20px;
133
+ width: 280px;
134
+ background: rgba(26, 26, 46, 0.95);
135
+ border: 1px solid #2a2a4e;
136
+ border-radius: 8px;
137
+ overflow: hidden;
138
+ }
139
+
140
+ .panel-header {
141
+ display: flex;
142
+ justify-content: space-between;
143
+ align-items: center;
144
+ padding: 12px 16px;
145
+ background: rgba(0, 0, 0, 0.2);
146
+ border-bottom: 1px solid #2a2a4e;
147
+ }
148
+
149
+ .panel-header h3 {
150
+ margin: 0;
151
+ font-size: 14px;
152
+ font-weight: 600;
153
+ color: #fff;
154
+ overflow: hidden;
155
+ text-overflow: ellipsis;
156
+ white-space: nowrap;
157
+ }
158
+
159
+ .panel-header button {
160
+ background: none;
161
+ border: none;
162
+ color: #888;
163
+ cursor: pointer;
164
+ padding: 4px;
165
+ display: flex;
166
+ }
167
+
168
+ .panel-header button:hover {
169
+ color: #fff;
170
+ }
171
+
172
+ .panel-content {
173
+ padding: 12px 16px;
174
+ }
175
+
176
+ .panel-row {
177
+ display: flex;
178
+ justify-content: space-between;
179
+ margin-bottom: 8px;
180
+ }
181
+
182
+ .panel-label {
183
+ color: #888;
184
+ font-size: 12px;
185
+ }
186
+
187
+ .panel-value {
188
+ color: #fff;
189
+ font-size: 12px;
190
+ text-align: right;
191
+ overflow: hidden;
192
+ text-overflow: ellipsis;
193
+ max-width: 150px;
194
+ }
195
+
196
+ /* Responsive */
197
+ @media (max-width: 768px) {
198
+ .graph-view-container {
199
+ width: 100vw;
200
+ height: 100vh;
201
+ border-radius: 0;
202
+ }
203
+
204
+ .graph-legend {
205
+ bottom: auto;
206
+ top: 80px;
207
+ left: 10px;
208
+ font-size: 10px;
209
+ padding: 8px 12px;
210
+ }
211
+
212
+ .graph-node-panel {
213
+ width: 100%;
214
+ left: 0;
215
+ right: 0;
216
+ top: auto;
217
+ bottom: 0;
218
+ border-radius: 12px 12px 0 0;
219
+ }
220
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jotx-labs/editor",
3
- "version": "2.4.138",
3
+ "version": "2.4.140",
4
4
  "files": [
5
5
  "dist",
6
6
  "src/styles"
@@ -21,8 +21,6 @@
21
21
  "author": "balajiboominathan",
22
22
  "license": "Apache-2.0",
23
23
  "peerDependencies": {
24
- "react": "^18.0.0",
25
- "react-dom": "^18.0.0",
26
24
  "@tiptap/core": "^3.13.0",
27
25
  "@tiptap/extension-color": "^3.13.0",
28
26
  "@tiptap/extension-heading": "^3.13.0",
@@ -38,7 +36,10 @@
38
36
  "@tiptap/extension-task-list": "^3.13.0",
39
37
  "@tiptap/extension-text-style": "^3.13.0",
40
38
  "@tiptap/react": "^3.13.0",
41
- "@tiptap/starter-kit": "^3.13.0"
39
+ "@tiptap/starter-kit": "^3.13.0",
40
+ "d3": "^7.9.0",
41
+ "react": "^18.0.0",
42
+ "react-dom": "^18.0.0"
42
43
  },
43
44
  "dependencies": {
44
45
  "@jotx-labs/core": "^2.4.130",
@@ -55,4 +56,4 @@
55
56
  "@types/react-dom": "^18.0.0",
56
57
  "typescript": "^5.0.0"
57
58
  }
58
- }
59
+ }
@@ -0,0 +1,294 @@
1
+ /**
2
+ * Document Header Styles
3
+ */
4
+
5
+ .jotx-header {
6
+ position: sticky;
7
+ /* Sit below the tabs bar (web) so header never covers tabs */
8
+ top: var(--jotx-tabs-height, 40px);
9
+ left: 0;
10
+ right: 0;
11
+ z-index: 150;
12
+ flex-shrink: 0;
13
+ /* Never shrink */
14
+ display: flex;
15
+ align-items: center;
16
+ justify-content: space-between;
17
+ height: var(--jotx-header-height, 60px);
18
+ padding: 0 24px;
19
+ background-color: var(--vscode-editor-background);
20
+ border-bottom: 1px solid var(--vscode-panel-border);
21
+ backdrop-filter: blur(8px);
22
+ /* Critical: ensure it stays on top */
23
+ will-change: transform;
24
+ }
25
+
26
+ .jotx-header-left {
27
+ display: flex;
28
+ align-items: center;
29
+ gap: 12px;
30
+ flex: 1;
31
+ min-width: 0;
32
+ }
33
+
34
+ .jotx-header-right {
35
+ display: flex;
36
+ align-items: center;
37
+ gap: 8px;
38
+ }
39
+
40
+ /* Graph Button */
41
+ .jotx-header-graph-btn {
42
+ display: flex;
43
+ align-items: center;
44
+ justify-content: center;
45
+ padding: 8px;
46
+ background: transparent;
47
+ border: none;
48
+ border-radius: 6px;
49
+ color: #888;
50
+ cursor: pointer;
51
+ transition: all 0.2s ease;
52
+ }
53
+
54
+ .jotx-header-graph-btn:hover {
55
+ background: rgba(20, 184, 166, 0.1);
56
+ color: #14b8a6;
57
+ }
58
+
59
+ /* Help Button */
60
+ .jotx-header-help-btn {
61
+ display: flex;
62
+ align-items: center;
63
+ justify-content: center;
64
+ padding: 8px;
65
+ background: transparent;
66
+ border: none;
67
+ border-radius: 6px;
68
+ color: #888;
69
+ cursor: pointer;
70
+ transition: all 0.2s ease;
71
+ }
72
+
73
+ .jotx-header-help-btn:hover {
74
+ background: rgba(20, 184, 166, 0.1);
75
+ color: #14b8a6;
76
+ }
77
+
78
+ /* Logo */
79
+ .jotx-header-logo {
80
+ display: flex;
81
+ align-items: center;
82
+ justify-content: center;
83
+ width: var(--jotx-header-logoSize, 32px);
84
+ height: var(--jotx-header-logoSize, 32px);
85
+ flex-shrink: 0;
86
+ color: #20B2AA;
87
+ transition: color 0.2s ease;
88
+ }
89
+
90
+ .jotx-header-logo:hover {
91
+ color: #40E0D0;
92
+ }
93
+
94
+ .jotx-header-logo-svg {
95
+ display: block;
96
+ }
97
+
98
+ .jotx-header-logo-img {
99
+ width: 100%;
100
+ height: 100%;
101
+ object-fit: contain;
102
+ border-radius: 4px;
103
+ }
104
+
105
+ .jotx-header-icon {
106
+ font-size: 24px;
107
+ line-height: 1;
108
+ }
109
+
110
+ .jotx-header-icon-svg {
111
+ display: flex;
112
+ align-items: center;
113
+ justify-content: center;
114
+ color: var(--jotx-primary);
115
+ }
116
+
117
+ /* Type Selector (was Badge) */
118
+ .jotx-header-type-container {
119
+ position: relative;
120
+ }
121
+
122
+ .jotx-header-type-button {
123
+ display: flex;
124
+ align-items: center;
125
+ gap: 6px;
126
+ padding: 4px 8px;
127
+ border: none;
128
+ background: var(--jotx-backgroundSecondary);
129
+ border-radius: 4px;
130
+ cursor: pointer;
131
+ transition: all 0.2s;
132
+ color: var(--jotx-textSecondary);
133
+ }
134
+
135
+ .jotx-header-type-button:hover {
136
+ background: var(--jotx-border);
137
+ color: var(--jotx-text);
138
+ }
139
+
140
+ .jotx-header-type-label {
141
+ font-size: 13px;
142
+ font-weight: 500;
143
+ }
144
+
145
+ .jotx-header-type-icon {
146
+ display: flex;
147
+ align-items: center;
148
+ justify-content: center;
149
+ }
150
+
151
+ .jotx-header-type-chevron {
152
+ opacity: 0.5;
153
+ }
154
+
155
+ /* Dropdown Menu */
156
+ .jotx-header-type-menu {
157
+ position: absolute;
158
+ top: 100%;
159
+ left: 0;
160
+ margin-top: 4px;
161
+ background: var(--jotx-background);
162
+ border: 1px solid var(--jotx-border);
163
+ border-radius: 6px;
164
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
165
+ width: 180px;
166
+ z-index: 200;
167
+ overflow: hidden;
168
+ display: flex;
169
+ flex-direction: column;
170
+ }
171
+
172
+ .jotx-type-menu-header {
173
+ padding: 8px 12px;
174
+ font-size: 11px;
175
+ font-weight: 600;
176
+ color: var(--jotx-textSecondary);
177
+ border-bottom: 1px solid var(--jotx-border);
178
+ background: var(--jotx-backgroundSecondary);
179
+ text-transform: uppercase;
180
+ letter-spacing: 0.5px;
181
+ }
182
+
183
+ .jotx-type-menu-list {
184
+ padding: 4px;
185
+ max-height: 300px;
186
+ overflow-y: auto;
187
+ }
188
+
189
+ .jotx-type-menu-item {
190
+ display: flex;
191
+ align-items: center;
192
+ gap: 8px;
193
+ padding: 6px 8px;
194
+ width: 100%;
195
+ border: none;
196
+ background: transparent;
197
+ color: var(--jotx-text);
198
+ font-size: 13px;
199
+ text-align: left;
200
+ cursor: pointer;
201
+ border-radius: 4px;
202
+ transition: background 0.15s;
203
+ }
204
+
205
+ .jotx-type-menu-item:hover {
206
+ background: var(--jotx-backgroundSecondary);
207
+ }
208
+
209
+ .jotx-type-menu-item.active {
210
+ background: rgba(32, 178, 170, 0.2);
211
+ color: #20B2AA;
212
+ font-weight: 600;
213
+ }
214
+
215
+ /* Title */
216
+ .jotx-header-title-container {
217
+ flex: 1;
218
+ min-width: 0;
219
+ }
220
+
221
+ .jotx-header-title {
222
+ margin: 0;
223
+ font-size: var(--jotx-header-titleSize, 18px);
224
+ font-weight: var(--jotx-header-titleWeight, 600);
225
+ color: var(--jotx-text);
226
+ cursor: text;
227
+ white-space: nowrap;
228
+ overflow: hidden;
229
+ text-overflow: ellipsis;
230
+ transition: opacity 0.2s;
231
+ }
232
+
233
+ .jotx-header-title:hover {
234
+ opacity: 0.7;
235
+ }
236
+
237
+ .jotx-header-title-input {
238
+ width: 100%;
239
+ padding: 4px 8px;
240
+ font-size: var(--jotx-header-titleSize, 18px);
241
+ font-weight: var(--jotx-header-titleWeight, 600);
242
+ color: var(--jotx-text);
243
+ background-color: var(--jotx-backgroundSecondary);
244
+ border: 1px solid var(--jotx-primary);
245
+ border-radius: 4px;
246
+ outline: none;
247
+ font-family: inherit;
248
+ }
249
+
250
+ /* Buttons */
251
+ .jotx-header-button {
252
+ display: flex;
253
+ align-items: center;
254
+ justify-content: center;
255
+ width: var(--jotx-header-buttonSize, 36px);
256
+ height: var(--jotx-header-buttonSize, 36px);
257
+ padding: 0;
258
+ color: var(--jotx-textSecondary);
259
+ background-color: transparent;
260
+ border: none;
261
+ border-radius: 6px;
262
+ cursor: pointer;
263
+ transition: all 0.2s;
264
+ }
265
+
266
+ .jotx-header-button:hover:not(:disabled) {
267
+ color: #20B2AA;
268
+ background-color: rgba(32, 178, 170, 0.1);
269
+ }
270
+
271
+ .jotx-header-button:active:not(:disabled) {
272
+ transform: scale(0.95);
273
+ }
274
+
275
+ .jotx-header-button:disabled {
276
+ opacity: 0.4;
277
+ cursor: not-allowed;
278
+ }
279
+
280
+ .jotx-header-button svg {
281
+ width: 16px;
282
+ height: 16px;
283
+ }
284
+
285
+ /* Responsive */
286
+ @media (max-width: 768px) {
287
+ .jotx-header {
288
+ padding: 0 16px;
289
+ }
290
+
291
+ .jotx-header-badge {
292
+ display: none;
293
+ }
294
+ }