@filipc77/cowrite 0.4.28 → 0.6.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/README.md +31 -18
- package/dist/bin/cowrite.js +154 -45
- package/dist/bin/cowrite.js.map +1 -1
- package/package.json +5 -2
- package/ui/client.js +1011 -112
- package/ui/index.html +20 -2
- package/ui/styles.css +435 -147
package/ui/index.html
CHANGED
|
@@ -8,6 +8,10 @@
|
|
|
8
8
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
9
9
|
<link href="https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=JetBrains+Mono:wght@400;500;600&display=swap" rel="stylesheet">
|
|
10
10
|
<link rel="stylesheet" href="styles.css">
|
|
11
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/github-markdown-css@5/github-markdown-dark.css" id="gmc-dark" />
|
|
12
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/github-markdown-css@5/github-markdown-light.css" id="gmc-light" disabled />
|
|
13
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/highlight.js@11/styles/github-dark.min.css" id="hljs-dark" />
|
|
14
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/highlight.js@11/styles/github.min.css" id="hljs-light" disabled />
|
|
11
15
|
</head>
|
|
12
16
|
<body>
|
|
13
17
|
<header>
|
|
@@ -22,6 +26,9 @@
|
|
|
22
26
|
<span class="file-path" id="filePath"></span>
|
|
23
27
|
</div>
|
|
24
28
|
<div class="header-right">
|
|
29
|
+
<button class="undo-btn" id="undoBtn" disabled title="Undo (Cmd+Z)">
|
|
30
|
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="1 4 1 10 7 10"/><path d="M3.51 15a9 9 0 1 0 2.13-9.36L1 10"/></svg>
|
|
31
|
+
</button>
|
|
25
32
|
<span class="status" id="status">
|
|
26
33
|
<span class="status-dot"></span>
|
|
27
34
|
Connecting...
|
|
@@ -45,13 +52,16 @@
|
|
|
45
52
|
<div class="sidebar" id="sidebar">
|
|
46
53
|
<div class="sidebar-header">
|
|
47
54
|
<h2>Comments <span class="comment-count" id="commentCount">0</span></h2>
|
|
55
|
+
<button class="file-comment-btn" id="fileCommentBtn" title="Comment on whole file">+</button>
|
|
48
56
|
</div>
|
|
49
57
|
<div id="commentList"></div>
|
|
50
58
|
</div>
|
|
51
59
|
</main>
|
|
52
60
|
|
|
53
|
-
<!-- Floating
|
|
54
|
-
<
|
|
61
|
+
<!-- Floating selection toolbar (appears on text selection) -->
|
|
62
|
+
<div class="selection-toolbar" id="selectionToolbar" hidden>
|
|
63
|
+
<button id="commentTrigger">Comment</button>
|
|
64
|
+
</div>
|
|
55
65
|
|
|
56
66
|
<!-- Comment form (appears when comment button is clicked) -->
|
|
57
67
|
<div class="comment-popup" id="commentPopup" hidden>
|
|
@@ -64,6 +74,14 @@
|
|
|
64
74
|
</div>
|
|
65
75
|
</div>
|
|
66
76
|
|
|
77
|
+
<!-- Highlight popover (appears when clicking a comment highlight) -->
|
|
78
|
+
<div class="highlight-popover" id="highlightPopover" hidden>
|
|
79
|
+
<div class="highlight-popover-text" id="highlightPopoverText"></div>
|
|
80
|
+
<div class="highlight-popover-actions">
|
|
81
|
+
<button id="highlightEditBtn">Edit</button>
|
|
82
|
+
</div>
|
|
83
|
+
</div>
|
|
84
|
+
|
|
67
85
|
<script type="module">
|
|
68
86
|
import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.esm.min.mjs';
|
|
69
87
|
mermaid.initialize({ startOnLoad: false, theme: 'dark' });
|