@instructure/platform-notebook 0.2.0 → 0.3.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/Highlight.d.ts +11 -0
- package/dist/Highlight.d.ts.map +1 -0
- package/dist/NoteCard.d.ts +32 -0
- package/dist/NoteCard.d.ts.map +1 -0
- package/dist/NoteChip.d.ts +8 -0
- package/dist/NoteChip.d.ts.map +1 -0
- package/dist/NoteReactionMenu.d.ts +7 -0
- package/dist/NoteReactionMenu.d.ts.map +1 -0
- package/dist/TranslationsContext.d.ts.map +1 -1
- package/dist/highlighter.d.ts +1 -0
- package/dist/highlighter.d.ts.map +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +707 -372
- package/locales/en.json +5 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,102 +1,112 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
1
|
+
import { jsx as a, jsxs as C } from "react/jsx-runtime";
|
|
2
|
+
import { Flex as x } from "@instructure/ui-flex";
|
|
3
|
+
import { IconWarningLine as De, IconQuestionLine as ee, IconPinLine as te, IconArrowOpenDownLine as Ae, IconEditLine as ue, IconTrashLine as fe } from "@instructure/ui-icons";
|
|
4
|
+
import { TruncateText as J } from "@instructure/ui-truncate-text";
|
|
5
|
+
import { z as l } from "zod";
|
|
6
|
+
import Le from "diff-match-patch";
|
|
7
|
+
import { createContext as ye, useContext as Ce, useMemo as Ee, useReducer as Me, useState as j, useRef as K, useCallback as Pe, useEffect as Fe } from "react";
|
|
8
|
+
import { useQueryClient as ne, useMutation as oe, useQuery as Be } from "@tanstack/react-query";
|
|
9
|
+
import { ScreenReaderContent as He } from "@instructure/ui-a11y-content";
|
|
10
|
+
import { Button as q, IconButton as Z } from "@instructure/ui-buttons";
|
|
11
|
+
import { Text as P } from "@instructure/ui-text";
|
|
12
|
+
import { TextArea as _e } from "@instructure/ui-text-area";
|
|
13
|
+
import { View as je } from "@instructure/ui-view";
|
|
14
|
+
import { Menu as F } from "@instructure/ui-menu";
|
|
15
|
+
import { Pill as me } from "@instructure/ui-pill";
|
|
16
|
+
const Ue = l.object({
|
|
17
|
+
startContainer: l.string(),
|
|
18
|
+
endContainer: l.string(),
|
|
19
|
+
startOffset: l.number(),
|
|
20
|
+
endOffset: l.number()
|
|
21
|
+
}), We = l.object({
|
|
22
|
+
start: l.number(),
|
|
23
|
+
end: l.number()
|
|
24
|
+
}), re = l.object({
|
|
25
|
+
selectedText: l.string(),
|
|
26
|
+
hasNoHighlightAnymore: l.boolean().optional(),
|
|
27
|
+
textPosition: We.nullable(),
|
|
28
|
+
range: Ue.nullable(),
|
|
29
|
+
pageLastModifiedAt: l.string()
|
|
20
30
|
});
|
|
21
|
-
var
|
|
22
|
-
const
|
|
31
|
+
var b = /* @__PURE__ */ ((n) => (n.IMPORTANT = "Important", n.CONFUSING = "Confusing", n))(b || {});
|
|
32
|
+
const se = l.enum([
|
|
23
33
|
"Important",
|
|
24
34
|
"Confusing"
|
|
25
35
|
/* CONFUSING */
|
|
26
|
-
]),
|
|
27
|
-
startCursor:
|
|
28
|
-
endCursor:
|
|
29
|
-
hasNextPage:
|
|
30
|
-
hasPreviousPage:
|
|
31
|
-
}),
|
|
32
|
-
id:
|
|
33
|
-
rootAccountUuid:
|
|
34
|
-
userId:
|
|
35
|
-
courseId:
|
|
36
|
-
objectId:
|
|
37
|
-
objectType:
|
|
38
|
-
userText:
|
|
39
|
-
reaction:
|
|
40
|
-
highlightData:
|
|
41
|
-
createdAt:
|
|
42
|
-
updatedAt:
|
|
43
|
-
}),
|
|
44
|
-
cursor:
|
|
45
|
-
node:
|
|
36
|
+
]), Se = l.object({
|
|
37
|
+
startCursor: l.string().nullish(),
|
|
38
|
+
endCursor: l.string().nullish(),
|
|
39
|
+
hasNextPage: l.boolean().nullish(),
|
|
40
|
+
hasPreviousPage: l.boolean().nullish()
|
|
41
|
+
}), X = l.object({
|
|
42
|
+
id: l.string(),
|
|
43
|
+
rootAccountUuid: l.string(),
|
|
44
|
+
userId: l.string(),
|
|
45
|
+
courseId: l.string(),
|
|
46
|
+
objectId: l.string(),
|
|
47
|
+
objectType: l.string(),
|
|
48
|
+
userText: l.string().optional(),
|
|
49
|
+
reaction: l.array(se),
|
|
50
|
+
highlightData: re,
|
|
51
|
+
createdAt: l.string(),
|
|
52
|
+
updatedAt: l.string()
|
|
53
|
+
}), qe = l.object({
|
|
54
|
+
cursor: l.string(),
|
|
55
|
+
node: X
|
|
46
56
|
});
|
|
47
|
-
|
|
48
|
-
notes:
|
|
49
|
-
edges:
|
|
50
|
-
nodes:
|
|
51
|
-
pageInfo:
|
|
57
|
+
l.object({
|
|
58
|
+
notes: l.object({
|
|
59
|
+
edges: l.array(qe),
|
|
60
|
+
nodes: l.array(X),
|
|
61
|
+
pageInfo: Se
|
|
52
62
|
})
|
|
53
63
|
});
|
|
54
|
-
const
|
|
55
|
-
type:
|
|
56
|
-
id:
|
|
57
|
-
}),
|
|
58
|
-
courseId:
|
|
59
|
-
learningObject:
|
|
60
|
-
reactions:
|
|
64
|
+
const ze = l.object({
|
|
65
|
+
type: l.string(),
|
|
66
|
+
id: l.string()
|
|
67
|
+
}), $e = l.object({
|
|
68
|
+
courseId: l.string().optional(),
|
|
69
|
+
learningObject: ze.optional(),
|
|
70
|
+
reactions: l.array(l.string()).optional()
|
|
61
71
|
}).optional();
|
|
62
|
-
|
|
63
|
-
courseId:
|
|
64
|
-
filter:
|
|
65
|
-
pageParams:
|
|
66
|
-
direction:
|
|
67
|
-
pageSize:
|
|
72
|
+
l.object({
|
|
73
|
+
courseId: l.string().optional(),
|
|
74
|
+
filter: $e,
|
|
75
|
+
pageParams: Se.optional(),
|
|
76
|
+
direction: l.enum(["next", "prev"]).optional(),
|
|
77
|
+
pageSize: l.number().optional()
|
|
68
78
|
});
|
|
69
|
-
|
|
70
|
-
courseId:
|
|
71
|
-
objectId:
|
|
72
|
-
objectType:
|
|
73
|
-
userText:
|
|
74
|
-
reaction:
|
|
75
|
-
highlightData:
|
|
79
|
+
l.object({
|
|
80
|
+
courseId: l.string(),
|
|
81
|
+
objectId: l.string(),
|
|
82
|
+
objectType: l.string(),
|
|
83
|
+
userText: l.string().optional(),
|
|
84
|
+
reaction: l.array(se),
|
|
85
|
+
highlightData: re
|
|
76
86
|
});
|
|
77
|
-
|
|
78
|
-
createNote:
|
|
87
|
+
l.object({
|
|
88
|
+
createNote: X
|
|
79
89
|
});
|
|
80
|
-
|
|
81
|
-
id:
|
|
82
|
-
userText:
|
|
83
|
-
reaction:
|
|
84
|
-
highlightData:
|
|
90
|
+
l.object({
|
|
91
|
+
id: l.string(),
|
|
92
|
+
userText: l.string().optional(),
|
|
93
|
+
reaction: l.array(se),
|
|
94
|
+
highlightData: re
|
|
85
95
|
});
|
|
86
|
-
|
|
87
|
-
updateNote:
|
|
96
|
+
l.object({
|
|
97
|
+
updateNote: X
|
|
88
98
|
});
|
|
89
|
-
|
|
90
|
-
deleteNote:
|
|
99
|
+
l.object({
|
|
100
|
+
deleteNote: l.string()
|
|
91
101
|
});
|
|
92
|
-
var
|
|
93
|
-
class
|
|
102
|
+
var Te = /* @__PURE__ */ ((n) => (n[n.FORWARDS = 1] = "FORWARDS", n[n.BACKWARDS = 2] = "BACKWARDS", n))(Te || {});
|
|
103
|
+
class R {
|
|
94
104
|
constructor(e, t) {
|
|
95
105
|
this.start = e, this.end = t;
|
|
96
106
|
}
|
|
97
107
|
toRange() {
|
|
98
108
|
let e, t;
|
|
99
|
-
if (this.start.element === this.end.element && this.start.offset <= this.end.offset ? [e, t] =
|
|
109
|
+
if (this.start.element === this.end.element && this.start.offset <= this.end.offset ? [e, t] = Oe(this.start.element, this.start.offset, this.end.offset) : (e = this.start.resolve({
|
|
100
110
|
direction: 1
|
|
101
111
|
/* FORWARDS */
|
|
102
112
|
}), t = this.end.resolve({
|
|
@@ -108,28 +118,28 @@ class S {
|
|
|
108
118
|
return o.setStart(e.node, e.offset), o.setEnd(t.node, t.offset), o;
|
|
109
119
|
}
|
|
110
120
|
static fromRange(e) {
|
|
111
|
-
const t =
|
|
112
|
-
return !t || !o ? null : new
|
|
121
|
+
const t = O.fromPoint(e.startContainer, e.startOffset), o = O.fromPoint(e.endContainer, e.endOffset);
|
|
122
|
+
return !t || !o ? null : new R(t, o);
|
|
113
123
|
}
|
|
114
124
|
static fromOffsets(e, t, o) {
|
|
115
|
-
return new
|
|
125
|
+
return new R(new O(e, t), new O(e, o));
|
|
116
126
|
}
|
|
117
127
|
relativeTo(e) {
|
|
118
|
-
return new
|
|
128
|
+
return new R(this.start.relativeTo(e), this.end.relativeTo(e));
|
|
119
129
|
}
|
|
120
130
|
}
|
|
121
|
-
class
|
|
131
|
+
class O {
|
|
122
132
|
constructor(e, t) {
|
|
123
133
|
t < 0 && console.error("Offset is invalid"), this.element = e, this.offset = t;
|
|
124
134
|
}
|
|
125
135
|
resolve(e = {}) {
|
|
126
136
|
try {
|
|
127
|
-
return
|
|
137
|
+
return Oe(this.element, this.offset)[0];
|
|
128
138
|
} catch (t) {
|
|
129
139
|
if (this.offset === 0 && e.direction !== void 0) {
|
|
130
140
|
const o = document.createTreeWalker(this.element.getRootNode(), NodeFilter.SHOW_TEXT);
|
|
131
141
|
o.currentNode = this.element;
|
|
132
|
-
const r = e.direction ===
|
|
142
|
+
const r = e.direction === Te.FORWARDS, s = r ? o.nextNode() : o.previousNode();
|
|
133
143
|
if (!s)
|
|
134
144
|
throw t;
|
|
135
145
|
return { node: s, offset: r ? 0 : s.data.length };
|
|
@@ -140,9 +150,9 @@ class E {
|
|
|
140
150
|
static fromCharOffset(e, t) {
|
|
141
151
|
switch (e.nodeType) {
|
|
142
152
|
case Node.TEXT_NODE:
|
|
143
|
-
return
|
|
153
|
+
return O.fromPoint(e, t);
|
|
144
154
|
case Node.ELEMENT_NODE:
|
|
145
|
-
return new
|
|
155
|
+
return new O(e, t);
|
|
146
156
|
default:
|
|
147
157
|
return console.error("Node is not an element or text node"), null;
|
|
148
158
|
}
|
|
@@ -154,16 +164,16 @@ class E {
|
|
|
154
164
|
return console.error("Text node offset is out of range"), null;
|
|
155
165
|
if (!e.parentElement)
|
|
156
166
|
return console.error("Text node has no parent"), null;
|
|
157
|
-
const o =
|
|
158
|
-
return new
|
|
167
|
+
const o = pe(e) + t;
|
|
168
|
+
return new O(e.parentElement, o);
|
|
159
169
|
}
|
|
160
170
|
case Node.ELEMENT_NODE: {
|
|
161
171
|
if (t < 0 || t > e.childNodes.length)
|
|
162
172
|
return console.error("Child node offset is out of range"), null;
|
|
163
173
|
let o = 0;
|
|
164
174
|
for (let r = 0; r < t; r++)
|
|
165
|
-
o +=
|
|
166
|
-
return new
|
|
175
|
+
o += Ie(e.childNodes[r]);
|
|
176
|
+
return new O(e, o);
|
|
167
177
|
}
|
|
168
178
|
default:
|
|
169
179
|
return console.error("Point is not in an element or text node"), null;
|
|
@@ -174,99 +184,99 @@ class E {
|
|
|
174
184
|
throw new Error("Parent is not an ancestor of current element");
|
|
175
185
|
let t = this.element, o = this.offset;
|
|
176
186
|
for (; t !== e; )
|
|
177
|
-
o +=
|
|
178
|
-
return new
|
|
187
|
+
o += pe(t), t.parentElement && (t = t.parentElement);
|
|
188
|
+
return new O(t, o);
|
|
179
189
|
}
|
|
180
190
|
}
|
|
181
|
-
const
|
|
191
|
+
const Ke = (n) => {
|
|
182
192
|
const e = n.nodeName.toLowerCase();
|
|
183
193
|
return e === "#text" ? "text()" : e;
|
|
184
194
|
};
|
|
185
|
-
function
|
|
195
|
+
function Ge(n) {
|
|
186
196
|
let e = 0, t = n;
|
|
187
197
|
for (; t; )
|
|
188
198
|
t.nodeName === n.nodeName && (e += 1), t = t.previousSibling;
|
|
189
199
|
return e;
|
|
190
200
|
}
|
|
191
|
-
const
|
|
192
|
-
const e =
|
|
201
|
+
const Xe = (n) => {
|
|
202
|
+
const e = Ke(n), t = Ge(n);
|
|
193
203
|
return `${e}[${t}]`;
|
|
194
|
-
},
|
|
204
|
+
}, ge = (n, e) => {
|
|
195
205
|
let t = "", o = n;
|
|
196
206
|
for (; o !== e; ) {
|
|
197
207
|
if (!o) {
|
|
198
208
|
console.error("Node is not a descendant of root");
|
|
199
209
|
return;
|
|
200
210
|
}
|
|
201
|
-
t = `${
|
|
211
|
+
t = `${Xe(o)}/${t}`, o = o.parentNode;
|
|
202
212
|
}
|
|
203
213
|
return t = `/${t}`, t = t.replace(/\/$/, ""), t;
|
|
204
|
-
},
|
|
214
|
+
}, Qe = (n, e, t) => {
|
|
205
215
|
const o = e.toUpperCase();
|
|
206
216
|
let r = -1;
|
|
207
217
|
for (let s = 0; s < n.children.length; s++) {
|
|
208
|
-
const
|
|
209
|
-
if (
|
|
210
|
-
return
|
|
218
|
+
const i = n.children[s];
|
|
219
|
+
if (i.nodeName.toUpperCase() === o && (++r, r === t))
|
|
220
|
+
return i;
|
|
211
221
|
}
|
|
212
222
|
return null;
|
|
213
|
-
},
|
|
223
|
+
}, Ye = (n, e) => {
|
|
214
224
|
if (!(n.match(/^(\/[A-Za-z0-9-]+(\[[0-9]+])?)+$/) !== null))
|
|
215
225
|
return console.error("Expression is not a simple XPath"), null;
|
|
216
226
|
const o = n.split("/");
|
|
217
227
|
let r = e;
|
|
218
228
|
o.shift();
|
|
219
229
|
for (const s of o) {
|
|
220
|
-
let
|
|
221
|
-
const
|
|
222
|
-
if (
|
|
223
|
-
|
|
224
|
-
const
|
|
225
|
-
if (
|
|
230
|
+
let i, d;
|
|
231
|
+
const f = s.indexOf("[");
|
|
232
|
+
if (f !== -1) {
|
|
233
|
+
i = s.slice(0, f);
|
|
234
|
+
const g = s.slice(f + 1, s.indexOf("]"));
|
|
235
|
+
if (d = Number.parseInt(g, 10) - 1, d < 0)
|
|
226
236
|
return null;
|
|
227
237
|
} else
|
|
228
|
-
|
|
229
|
-
const
|
|
230
|
-
if (!
|
|
238
|
+
i = s, d = 0;
|
|
239
|
+
const c = Qe(r, i, d);
|
|
240
|
+
if (!c)
|
|
231
241
|
return null;
|
|
232
|
-
r =
|
|
242
|
+
r = c;
|
|
233
243
|
}
|
|
234
244
|
return r;
|
|
235
|
-
},
|
|
245
|
+
}, he = (n, e = document.body) => {
|
|
236
246
|
try {
|
|
237
|
-
return
|
|
247
|
+
return Ye(n, e);
|
|
238
248
|
} catch {
|
|
239
249
|
return document.evaluate(`.${n}`, e, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
|
|
240
250
|
}
|
|
241
251
|
};
|
|
242
|
-
class
|
|
252
|
+
class G {
|
|
243
253
|
constructor(e, t) {
|
|
244
254
|
this.root = e, this.range = t;
|
|
245
255
|
}
|
|
246
256
|
static fromRange(e, t) {
|
|
247
|
-
return new
|
|
257
|
+
return new G(e, t);
|
|
248
258
|
}
|
|
249
259
|
static fromSelector(e, t) {
|
|
250
260
|
if (!(t != null && t.startContainer) || !(t != null && t.endContainer))
|
|
251
261
|
return console.error("No start or end container in selector"), null;
|
|
252
|
-
const o =
|
|
262
|
+
const o = he(t.startContainer, e);
|
|
253
263
|
if (!o)
|
|
254
264
|
return console.error("Failed to resolve startContainer XPath"), null;
|
|
255
|
-
const r =
|
|
265
|
+
const r = he(t.endContainer, e);
|
|
256
266
|
if (!r)
|
|
257
267
|
return console.error("Failed to resolve endContainer XPath"), null;
|
|
258
|
-
const s =
|
|
259
|
-
if (!s || !
|
|
268
|
+
const s = O.fromCharOffset(o, t.startOffset), i = O.fromCharOffset(r, t.endOffset);
|
|
269
|
+
if (!s || !i)
|
|
260
270
|
return null;
|
|
261
|
-
const
|
|
262
|
-
return
|
|
271
|
+
const d = new R(s, i).toRange();
|
|
272
|
+
return d ? new G(e, d) : null;
|
|
263
273
|
}
|
|
264
274
|
toRange() {
|
|
265
275
|
return this.range;
|
|
266
276
|
}
|
|
267
277
|
toSelector() {
|
|
268
278
|
var s;
|
|
269
|
-
const e = (s =
|
|
279
|
+
const e = (s = R.fromRange(this.range)) == null ? void 0 : s.toRange(), t = e && R.fromRange(e), o = t && ge(t.start.element, this.root), r = t && ge(t.end.element, this.root);
|
|
270
280
|
return !o || !r ? null : {
|
|
271
281
|
startContainer: o,
|
|
272
282
|
startOffset: t.start.offset,
|
|
@@ -275,17 +285,17 @@ class A {
|
|
|
275
285
|
};
|
|
276
286
|
}
|
|
277
287
|
}
|
|
278
|
-
class
|
|
288
|
+
class H {
|
|
279
289
|
constructor(e, t, o) {
|
|
280
290
|
this.root = e, this.start = t, this.end = o;
|
|
281
291
|
}
|
|
282
292
|
static fromRange(e, t) {
|
|
283
293
|
var r;
|
|
284
|
-
const o = (r =
|
|
285
|
-
return o ? new
|
|
294
|
+
const o = (r = R.fromRange(t)) == null ? void 0 : r.relativeTo(e);
|
|
295
|
+
return o ? new H(e, o.start.offset, o.end.offset) : null;
|
|
286
296
|
}
|
|
287
297
|
static fromSelector(e, t) {
|
|
288
|
-
return new
|
|
298
|
+
return new H(e, t.start, t.end);
|
|
289
299
|
}
|
|
290
300
|
toSelector() {
|
|
291
301
|
return {
|
|
@@ -294,10 +304,10 @@ class v {
|
|
|
294
304
|
};
|
|
295
305
|
}
|
|
296
306
|
toRange() {
|
|
297
|
-
return
|
|
307
|
+
return R.fromOffsets(this.root, this.start, this.end).toRange();
|
|
298
308
|
}
|
|
299
309
|
}
|
|
300
|
-
const
|
|
310
|
+
const Ie = (n) => {
|
|
301
311
|
var e;
|
|
302
312
|
switch (n.nodeType) {
|
|
303
313
|
case Node.ELEMENT_NODE:
|
|
@@ -306,70 +316,70 @@ const J = (n) => {
|
|
|
306
316
|
default:
|
|
307
317
|
return 0;
|
|
308
318
|
}
|
|
309
|
-
},
|
|
319
|
+
}, pe = (n) => {
|
|
310
320
|
let e = n.previousSibling, t = 0;
|
|
311
321
|
for (; e; )
|
|
312
|
-
t +=
|
|
322
|
+
t += Ie(e), e = e.previousSibling;
|
|
313
323
|
return t;
|
|
314
|
-
},
|
|
324
|
+
}, Oe = (n, ...e) => {
|
|
315
325
|
let t = e.shift();
|
|
316
326
|
const o = n.ownerDocument.createNodeIterator(n, NodeFilter.SHOW_TEXT), r = [];
|
|
317
|
-
let s = o.nextNode(),
|
|
327
|
+
let s = o.nextNode(), i = null, d = 0;
|
|
318
328
|
for (; t !== void 0 && s; )
|
|
319
|
-
|
|
320
|
-
for (; t !== void 0 &&
|
|
321
|
-
r.push({ node:
|
|
329
|
+
i = s, d + i.data.length > t ? (r.push({ node: i, offset: t - d }), t = e.shift()) : (s = o.nextNode(), d += i.data.length);
|
|
330
|
+
for (; t !== void 0 && i && d === t; )
|
|
331
|
+
r.push({ node: i, offset: i.data.length }), t = e.shift();
|
|
322
332
|
return t !== void 0 && console.error("Offset exceeds text length"), r;
|
|
323
|
-
},
|
|
333
|
+
}, Ve = (n, e, t, o) => {
|
|
324
334
|
const r = t - e;
|
|
325
|
-
return Math.abs(r - o) <= 5 ?
|
|
335
|
+
return Math.abs(r - o) <= 5 ? H.fromSelector(n, {
|
|
326
336
|
start: e,
|
|
327
337
|
end: t
|
|
328
338
|
}) : null;
|
|
329
|
-
},
|
|
330
|
-
const r = new
|
|
339
|
+
}, Ze = (n, e, t, o) => {
|
|
340
|
+
const r = new Le();
|
|
331
341
|
r.Match_Distance = 5e3;
|
|
332
342
|
const s = n.textContent;
|
|
333
343
|
if (!s)
|
|
334
344
|
return null;
|
|
335
345
|
if (e.length > 32) {
|
|
336
|
-
const
|
|
337
|
-
let
|
|
338
|
-
const
|
|
339
|
-
if (
|
|
346
|
+
const i = e.slice(0, 32), d = e.slice(-32), f = o - t;
|
|
347
|
+
let c = r.match_main(s, i, t);
|
|
348
|
+
const g = r.match_main(s, d, o), m = g + d.length;
|
|
349
|
+
if (c === -1 || g === -1)
|
|
340
350
|
return null;
|
|
341
|
-
const
|
|
342
|
-
if ((
|
|
343
|
-
return
|
|
344
|
-
if (
|
|
345
|
-
return
|
|
346
|
-
start:
|
|
347
|
-
end:
|
|
351
|
+
const u = m - c, p = Math.abs(u - f);
|
|
352
|
+
if ((c > m || p > 5) && (r.Match_Distance = e.length + 100, c = r.match_main(s, i, m), c !== -1 && c < m))
|
|
353
|
+
return Ve(n, c, m, f);
|
|
354
|
+
if (c < m && p <= 5)
|
|
355
|
+
return H.fromSelector(n, {
|
|
356
|
+
start: c,
|
|
357
|
+
end: m
|
|
348
358
|
});
|
|
349
359
|
} else {
|
|
350
|
-
const
|
|
351
|
-
if (
|
|
352
|
-
return
|
|
353
|
-
start:
|
|
354
|
-
end:
|
|
360
|
+
const i = r.match_main(s, e, t);
|
|
361
|
+
if (i !== -1)
|
|
362
|
+
return H.fromSelector(n, {
|
|
363
|
+
start: i,
|
|
364
|
+
end: i + e.length
|
|
355
365
|
});
|
|
356
366
|
}
|
|
357
367
|
return null;
|
|
358
|
-
},
|
|
368
|
+
}, Je = (n, e) => {
|
|
359
369
|
if (!e) return null;
|
|
360
370
|
const { highlightData: t } = n, { textPosition: o, selectedText: r } = t;
|
|
361
|
-
return
|
|
371
|
+
return Ze(
|
|
362
372
|
e,
|
|
363
373
|
r,
|
|
364
374
|
(o == null ? void 0 : o.start) ?? 0,
|
|
365
375
|
(o == null ? void 0 : o.end) ?? 0
|
|
366
376
|
);
|
|
367
|
-
},
|
|
377
|
+
}, ln = (n, e, t) => {
|
|
368
378
|
const o = [], r = [];
|
|
369
379
|
for (const s of e) {
|
|
370
|
-
const
|
|
371
|
-
if (
|
|
372
|
-
const
|
|
380
|
+
const i = Je(s, n);
|
|
381
|
+
if (i) {
|
|
382
|
+
const d = i.toRange(), f = d && G.fromRange(n, d);
|
|
373
383
|
o.push({
|
|
374
384
|
id: s.id,
|
|
375
385
|
reaction: s.reaction,
|
|
@@ -377,8 +387,8 @@ const J = (n) => {
|
|
|
377
387
|
highlightData: {
|
|
378
388
|
...s.highlightData,
|
|
379
389
|
hasNoHighlightAnymore: !1,
|
|
380
|
-
range: (
|
|
381
|
-
textPosition:
|
|
390
|
+
range: (f == null ? void 0 : f.toSelector()) ?? null,
|
|
391
|
+
textPosition: i.toSelector(),
|
|
382
392
|
pageLastModifiedAt: t
|
|
383
393
|
}
|
|
384
394
|
});
|
|
@@ -395,54 +405,54 @@ const J = (n) => {
|
|
|
395
405
|
}) : r.push(s.id);
|
|
396
406
|
}
|
|
397
407
|
return { notesForUpdate: o, noteIdsForDelete: r };
|
|
398
|
-
},
|
|
399
|
-
const e = document.getElementById(
|
|
408
|
+
}, an = (n) => {
|
|
409
|
+
const e = document.getElementById(le(n));
|
|
400
410
|
if (e) {
|
|
401
411
|
const t = e.getBoundingClientRect();
|
|
402
412
|
t.top >= 0 && t.left >= 0 && t.bottom <= (window.innerHeight || document.documentElement.clientHeight) && t.right <= (window.innerWidth || document.documentElement.clientWidth) || e.scrollIntoView({ behavior: "smooth", block: "start" });
|
|
403
413
|
}
|
|
404
|
-
},
|
|
414
|
+
}, z = 90, $ = 172, cn = (n) => {
|
|
405
415
|
const e = n.getClientRects();
|
|
406
416
|
if (!e.length)
|
|
407
417
|
return null;
|
|
408
|
-
const t = e[0], o = e[e.length - 1], r = 4, s = 16,
|
|
409
|
-
const
|
|
410
|
-
return N >= s &&
|
|
411
|
-
},
|
|
412
|
-
const
|
|
413
|
-
return N >= s &&
|
|
418
|
+
const t = e[0], o = e[e.length - 1], r = 4, s = 16, i = window.innerWidth || document.documentElement.clientWidth, d = window.innerHeight || document.documentElement.clientHeight, f = (N) => {
|
|
419
|
+
const v = N + $;
|
|
420
|
+
return N >= s && v <= i - s;
|
|
421
|
+
}, c = (N) => {
|
|
422
|
+
const v = N + z;
|
|
423
|
+
return N >= s && v <= d - s;
|
|
414
424
|
};
|
|
415
|
-
let
|
|
416
|
-
const
|
|
417
|
-
if (
|
|
418
|
-
|
|
425
|
+
let g;
|
|
426
|
+
const m = t.right - $;
|
|
427
|
+
if (f(m))
|
|
428
|
+
g = m;
|
|
419
429
|
else {
|
|
420
430
|
const N = t.left;
|
|
421
|
-
if (
|
|
422
|
-
|
|
431
|
+
if (f(N))
|
|
432
|
+
g = N;
|
|
423
433
|
else {
|
|
424
|
-
const
|
|
425
|
-
|
|
434
|
+
const I = (t.left + t.right) / 2 - $ / 2;
|
|
435
|
+
f(I) ? g = I : m < s ? g = s : g = i - $ - s;
|
|
426
436
|
}
|
|
427
437
|
}
|
|
428
|
-
let
|
|
429
|
-
const
|
|
430
|
-
if (
|
|
431
|
-
|
|
438
|
+
let u;
|
|
439
|
+
const p = o.bottom + r;
|
|
440
|
+
if (c(p))
|
|
441
|
+
u = p;
|
|
432
442
|
else {
|
|
433
|
-
const N = t.top -
|
|
434
|
-
|
|
443
|
+
const N = t.top - z - r;
|
|
444
|
+
c(N) ? u = N : p + z > d - s ? u = d - z - s : u = s;
|
|
435
445
|
}
|
|
436
|
-
return { top:
|
|
437
|
-
},
|
|
446
|
+
return { top: u, left: g };
|
|
447
|
+
}, dn = (n, e) => {
|
|
438
448
|
for (const t of e)
|
|
439
449
|
if (n.start < t.end && n.end > t.start)
|
|
440
450
|
return !0;
|
|
441
451
|
return !1;
|
|
442
|
-
},
|
|
452
|
+
}, ie = (n) => `highlight-wrapper-${n}`, le = (n) => `${ie(n)}-start`, xe = (n) => `${ie(n)}-end`, U = (n) => `[data-highlight-id="${CSS.escape(n)}"]`, Q = (n, e) => {
|
|
443
453
|
const t = Number.parseInt(n.slice(1, 3), 16), o = Number.parseInt(n.slice(3, 5), 16), r = Number.parseInt(n.slice(5, 7), 16);
|
|
444
454
|
return `rgba(${t}, ${o}, ${r}, ${e})`;
|
|
445
|
-
},
|
|
455
|
+
}, et = (n, e) => {
|
|
446
456
|
var t;
|
|
447
457
|
try {
|
|
448
458
|
const o = ((t = e.nodeValue) == null ? void 0 : t.length) ?? e.childNodes.length;
|
|
@@ -450,7 +460,7 @@ const J = (n) => {
|
|
|
450
460
|
} catch {
|
|
451
461
|
return !1;
|
|
452
462
|
}
|
|
453
|
-
},
|
|
463
|
+
}, tt = (n) => {
|
|
454
464
|
var s;
|
|
455
465
|
if (n.collapsed)
|
|
456
466
|
return [];
|
|
@@ -460,216 +470,249 @@ const J = (n) => {
|
|
|
460
470
|
const t = [], o = (s = e == null ? void 0 : e.ownerDocument) == null ? void 0 : s.createNodeIterator(e, NodeFilter.SHOW_TEXT);
|
|
461
471
|
let r = (o == null ? void 0 : o.nextNode()) || null;
|
|
462
472
|
for (; r; ) {
|
|
463
|
-
if (!
|
|
473
|
+
if (!et(n, r)) {
|
|
464
474
|
r = (o == null ? void 0 : o.nextNode()) || null;
|
|
465
475
|
continue;
|
|
466
476
|
}
|
|
467
|
-
const
|
|
468
|
-
if (
|
|
469
|
-
|
|
477
|
+
const i = r;
|
|
478
|
+
if (i === n.startContainer && n.startOffset > 0) {
|
|
479
|
+
i.splitText(n.startOffset), r = (o == null ? void 0 : o.nextNode()) || null;
|
|
470
480
|
continue;
|
|
471
481
|
}
|
|
472
|
-
|
|
482
|
+
i === n.endContainer && n.endOffset < i.data.length && i.splitText(n.endOffset), t.push(i), r = (o == null ? void 0 : o.nextNode()) || null;
|
|
473
483
|
}
|
|
474
484
|
return t;
|
|
475
|
-
},
|
|
485
|
+
}, un = (n, e, t) => {
|
|
476
486
|
if (n.collapsed) return;
|
|
477
|
-
const o = e.id ?? "", r =
|
|
478
|
-
if (document.getElementById(
|
|
479
|
-
|
|
487
|
+
const o = e.id ?? "", r = ie(o);
|
|
488
|
+
if (document.getElementById(le(o))) {
|
|
489
|
+
nt(e, t);
|
|
480
490
|
return;
|
|
481
491
|
}
|
|
482
|
-
const
|
|
483
|
-
|
|
484
|
-
const
|
|
485
|
-
|
|
492
|
+
const i = e.type === b.IMPORTANT ? t.colors.importantBackground : t.colors.confusingBackground, f = e.id === e.selectedNoteId ? i : Q(i, 0.5), c = e.type === b.IMPORTANT ? t.colors.importantUnderline : t.colors.confusingUnderline, g = e.type === b.IMPORTANT ? "solid" : "dashed", m = n.toString(), u = document.createElement("span");
|
|
493
|
+
u.id = `${r}-start`, u.className = "highlight-marker-start", u.dataset.highlightId = o || "", u.setAttribute("role", "button"), u.setAttribute("tabindex", "0"), u.setAttribute("aria-label", m), u.style.position = "relative", u.style.fontSize = "0", u.style.lineHeight = "0", u.style.width = "0", u.style.height = "0", u.style.margin = "0", u.style.padding = "0", u.style.border = "0";
|
|
494
|
+
const p = document.createElement("span");
|
|
495
|
+
p.id = xe(o), p.className = "highlight-marker-end", p.dataset.highlightId = o || "";
|
|
486
496
|
const N = n.cloneRange();
|
|
487
|
-
N.collapse(!1), N.insertNode(
|
|
488
|
-
const
|
|
489
|
-
|
|
490
|
-
const
|
|
491
|
-
|
|
492
|
-
const
|
|
493
|
-
|
|
494
|
-
var
|
|
495
|
-
const
|
|
496
|
-
if ((
|
|
497
|
-
const
|
|
498
|
-
let
|
|
499
|
-
|
|
500
|
-
const
|
|
501
|
-
|
|
502
|
-
var
|
|
503
|
-
|
|
504
|
-
}), (
|
|
505
|
-
}),
|
|
497
|
+
N.collapse(!1), N.insertNode(p);
|
|
498
|
+
const v = n.cloneRange();
|
|
499
|
+
v.collapse(!0), v.insertNode(u);
|
|
500
|
+
const I = document.createRange();
|
|
501
|
+
I.setStartAfter(u), I.setEndBefore(p);
|
|
502
|
+
const D = tt(I).filter((h) => h.textContent && h.textContent.length > 0);
|
|
503
|
+
D.forEach((h, y) => {
|
|
504
|
+
var W;
|
|
505
|
+
const w = h.parentElement;
|
|
506
|
+
if ((w == null ? void 0 : w.dataset.highlightId) === o) return;
|
|
507
|
+
const A = y === 0, L = y === D.length - 1, V = D.length === 1;
|
|
508
|
+
let k;
|
|
509
|
+
V ? k = "single" : A ? k = "first" : L ? k = "last" : k = "middle";
|
|
510
|
+
const S = document.createElement("span");
|
|
511
|
+
S.className = "highlight-content", S.dataset.highlightId = o || "", S.dataset.position = k, S.style.backgroundColor = f, S.style.textDecorationLine = "underline", S.style.textDecorationColor = c, S.style.textDecorationStyle = g, S.style.textDecorationThickness = t.borderWidthSmall, S.style.textUnderlineOffset = t.underlineOffset, S.style.cursor = "pointer", S.addEventListener("click", (M) => {
|
|
512
|
+
var _;
|
|
513
|
+
M.target.tagName !== "A" && ((_ = e.onClick) == null || _.call(e));
|
|
514
|
+
}), (W = h.parentNode) == null || W.insertBefore(S, h), S.appendChild(h);
|
|
515
|
+
}), u.addEventListener("click", (h) => {
|
|
506
516
|
var y;
|
|
507
|
-
|
|
508
|
-
}),
|
|
517
|
+
h.target.tagName !== "A" && ((y = e.onClick) == null || y.call(e));
|
|
518
|
+
}), u.addEventListener("keydown", (h) => {
|
|
509
519
|
var y;
|
|
510
|
-
if (
|
|
511
|
-
|
|
512
|
-
else if (
|
|
513
|
-
const
|
|
514
|
-
for (const
|
|
515
|
-
const
|
|
516
|
-
if (
|
|
517
|
-
|
|
520
|
+
if (h.key === "Enter" || h.key === " ")
|
|
521
|
+
h.preventDefault(), (y = e.onClick) == null || y.call(e);
|
|
522
|
+
else if (h.key === "Tab" && !h.shiftKey) {
|
|
523
|
+
const w = document.querySelectorAll(U(o));
|
|
524
|
+
for (const A of w) {
|
|
525
|
+
const L = A.querySelector("a");
|
|
526
|
+
if (L) {
|
|
527
|
+
h.preventDefault(), L.focus();
|
|
518
528
|
break;
|
|
519
529
|
}
|
|
520
530
|
}
|
|
521
531
|
}
|
|
522
|
-
}),
|
|
532
|
+
}), u.addEventListener("focus", () => {
|
|
523
533
|
document.querySelectorAll(
|
|
524
|
-
|
|
534
|
+
U(o)
|
|
525
535
|
).forEach((y) => {
|
|
526
536
|
y.classList.add("highlight-focused");
|
|
527
537
|
});
|
|
528
|
-
}),
|
|
538
|
+
}), u.addEventListener("blur", () => {
|
|
529
539
|
document.querySelectorAll(
|
|
530
|
-
|
|
540
|
+
U(o)
|
|
531
541
|
).forEach((y) => {
|
|
532
542
|
y.classList.remove("highlight-focused");
|
|
533
543
|
});
|
|
534
544
|
});
|
|
535
545
|
};
|
|
536
|
-
function
|
|
537
|
-
const t = n.type ===
|
|
546
|
+
function nt(n, e) {
|
|
547
|
+
const t = n.type === b.IMPORTANT ? e.colors.importantBackground : e.colors.confusingBackground, r = n.id === n.selectedNoteId ? t : Q(t, 0.5);
|
|
538
548
|
document.querySelectorAll(
|
|
539
|
-
|
|
540
|
-
).forEach((
|
|
541
|
-
|
|
549
|
+
U(n.id ?? "")
|
|
550
|
+
).forEach((i) => {
|
|
551
|
+
i.style.backgroundColor = r;
|
|
542
552
|
});
|
|
543
553
|
}
|
|
544
|
-
const
|
|
545
|
-
const e = n.id ?? "", t = document.getElementById(
|
|
554
|
+
const fn = (n) => {
|
|
555
|
+
const e = n.id ?? "", t = document.getElementById(le(e)), o = document.getElementById(xe(e));
|
|
546
556
|
document.querySelectorAll(
|
|
547
|
-
|
|
557
|
+
U(e)
|
|
548
558
|
).forEach((s) => {
|
|
549
|
-
var
|
|
559
|
+
var i;
|
|
550
560
|
for (; s.firstChild; )
|
|
551
|
-
(
|
|
561
|
+
(i = s.parentNode) == null || i.insertBefore(s.firstChild, s);
|
|
552
562
|
s.remove();
|
|
553
563
|
}), t == null || t.remove(), o == null || o.remove();
|
|
554
|
-
},
|
|
564
|
+
}, ot = "Notebook", rt = "Notes", st = "Important", it = "Unclear", lt = "Edit note", at = "Save", ct = "Cancel", dt = "Delete note", ut = "note", ft = "Add note (optional)", mt = "Remove from Notebook", gt = "Add a note (optional).", ht = "Mark important", pt = "Mark unclear", Nt = "Saved to Notebook.", bt = "Note updated", yt = "Note deleted", Ct = "Error saving to Notebook.", Et = "Error updating note", St = "Note deletion failed", Tt = "Loading notes", It = "Failed to load notes", Ot = "Start capturing your notes", xt = "Your notes from learning materials will appear here. Highlight key ideas, reflections, or questions as you learn—they'll all be saved in your Notebook for easy review later.", vt = "Nothing here yet", wt = "Adjust your filters or create a new note to get started.", kt = "You have no notes for the selected filter", Rt = "Previous page", Dt = "Next page", At = "All courses", Lt = "All notes", Mt = "Close Notebook panel", Pt = "To use the Notebook feature, highlight an excerpt from your learning material to flag it as 'confusing' or 'important' and leave an optional note.", Ft = "The content you highlighted is no longer available.", ae = {
|
|
565
|
+
notebook: ot,
|
|
566
|
+
notes: rt,
|
|
567
|
+
important: st,
|
|
568
|
+
unclear: it,
|
|
569
|
+
editNote: lt,
|
|
570
|
+
save: at,
|
|
571
|
+
cancel: ct,
|
|
572
|
+
deleteNote: dt,
|
|
573
|
+
note: ut,
|
|
574
|
+
addNotePrompt: ft,
|
|
575
|
+
removeFromNotebook: mt,
|
|
576
|
+
addNoteOptional: gt,
|
|
577
|
+
markImportant: ht,
|
|
578
|
+
markUnclear: pt,
|
|
579
|
+
savedToNotebook: Nt,
|
|
580
|
+
noteUpdated: bt,
|
|
581
|
+
noteDeleted: yt,
|
|
582
|
+
errorSavingNote: Ct,
|
|
583
|
+
errorUpdatingNote: Et,
|
|
584
|
+
noteDeletionFailed: St,
|
|
585
|
+
loadingNotes: Tt,
|
|
586
|
+
failedToLoadNotes: It,
|
|
587
|
+
emptyStateHeading: Ot,
|
|
588
|
+
emptyStateDescription: xt,
|
|
589
|
+
nothingHereYet: vt,
|
|
590
|
+
adjustFiltersOrCreate: wt,
|
|
591
|
+
noNotesForFilter: kt,
|
|
592
|
+
previousPage: Rt,
|
|
593
|
+
nextPage: Dt,
|
|
594
|
+
allCourses: At,
|
|
595
|
+
allNotes: Lt,
|
|
596
|
+
closeNotebookPanel: Mt,
|
|
597
|
+
featureDescription: Pt,
|
|
598
|
+
highlightUnavailable: Ft
|
|
599
|
+
}, ve = ye(null);
|
|
600
|
+
function we(n, e) {
|
|
601
|
+
const t = ae[n] ?? n;
|
|
602
|
+
return e ? t.replace(/%\{([^}]+)}/g, (o, r) => String(e[r] ?? `%{${r}}`)) : t;
|
|
603
|
+
}
|
|
604
|
+
function Bt({
|
|
605
|
+
translations: n,
|
|
606
|
+
translate: e,
|
|
607
|
+
children: t
|
|
608
|
+
}) {
|
|
609
|
+
const o = Ee(
|
|
610
|
+
() => ({
|
|
611
|
+
translations: { ...ae, ...n },
|
|
612
|
+
translate: e ?? we
|
|
613
|
+
}),
|
|
614
|
+
[n, e]
|
|
615
|
+
);
|
|
616
|
+
return /* @__PURE__ */ a(ve.Provider, { value: o, children: t });
|
|
617
|
+
}
|
|
618
|
+
function Y() {
|
|
619
|
+
const n = Ce(ve);
|
|
620
|
+
return n || { translations: ae, translate: we };
|
|
621
|
+
}
|
|
622
|
+
const Ht = (n, e) => ({
|
|
623
|
+
backgroundColor: n === b.IMPORTANT ? e.colors.importantBackground : e.colors.confusingBackground,
|
|
624
|
+
underlineColor: n === b.IMPORTANT ? e.colors.importantUnderline : e.colors.confusingUnderline,
|
|
625
|
+
underlineStyle: n === b.IMPORTANT ? "solid" : "dashed"
|
|
626
|
+
}), Ne = ({
|
|
627
|
+
children: n,
|
|
628
|
+
type: e = b.IMPORTANT,
|
|
629
|
+
isCardActive: t = !0,
|
|
630
|
+
theme: o
|
|
631
|
+
}) => {
|
|
632
|
+
const r = Ht(e, o), i = {
|
|
633
|
+
position: "relative",
|
|
634
|
+
backgroundColor: t ? r.backgroundColor : Q(r.backgroundColor, 0.5),
|
|
635
|
+
textDecorationLine: "underline",
|
|
636
|
+
textDecorationStyle: r.underlineStyle,
|
|
637
|
+
textDecorationColor: r.underlineColor,
|
|
638
|
+
textDecorationThickness: o.borderWidthSmall,
|
|
639
|
+
textUnderlineOffset: o.underlineOffset,
|
|
640
|
+
lineHeight: "normal"
|
|
641
|
+
};
|
|
642
|
+
return /* @__PURE__ */ a("span", { "data-note-highlight": "true", style: i, children: n });
|
|
643
|
+
}, _t = () => {
|
|
644
|
+
const { translations: n } = Y();
|
|
645
|
+
return /* @__PURE__ */ C(x, { gap: "xx-small", alignItems: "start", as: "div", children: [
|
|
646
|
+
/* @__PURE__ */ a(x.Item, { as: "div", children: /* @__PURE__ */ a(De, { color: "error" }) }),
|
|
647
|
+
/* @__PURE__ */ a(x.Item, { padding: "xxx-small none", shouldShrink: !0, children: /* @__PURE__ */ a(J, { maxLines: 3, children: n.highlightUnavailable }) })
|
|
648
|
+
] });
|
|
649
|
+
}, B = {
|
|
555
650
|
all: ["notebook"],
|
|
556
651
|
notes: (n) => ["notebook", "notes", n]
|
|
557
652
|
};
|
|
558
|
-
function
|
|
559
|
-
const e =
|
|
560
|
-
return
|
|
653
|
+
function mn(n) {
|
|
654
|
+
const e = ne();
|
|
655
|
+
return oe({
|
|
561
656
|
mutationFn: (t) => n.createNote(t),
|
|
562
657
|
onSuccess: () => {
|
|
563
|
-
e.invalidateQueries({ queryKey:
|
|
658
|
+
e.invalidateQueries({ queryKey: B.all });
|
|
564
659
|
}
|
|
565
660
|
});
|
|
566
661
|
}
|
|
567
|
-
function
|
|
568
|
-
const e =
|
|
569
|
-
return
|
|
662
|
+
function gn(n) {
|
|
663
|
+
const e = ne();
|
|
664
|
+
return oe({
|
|
570
665
|
mutationFn: (t) => n.deleteNote(t),
|
|
571
666
|
onSuccess: () => {
|
|
572
|
-
e.invalidateQueries({ queryKey:
|
|
667
|
+
e.invalidateQueries({ queryKey: B.all });
|
|
573
668
|
}
|
|
574
669
|
});
|
|
575
670
|
}
|
|
576
|
-
function
|
|
671
|
+
function hn({
|
|
577
672
|
api: n,
|
|
578
673
|
enabled: e = !0,
|
|
579
674
|
...t
|
|
580
675
|
}) {
|
|
581
|
-
return
|
|
582
|
-
queryKey:
|
|
676
|
+
return Be({
|
|
677
|
+
queryKey: B.notes(t),
|
|
583
678
|
queryFn: () => n.getNotes(t),
|
|
584
679
|
enabled: e
|
|
585
680
|
});
|
|
586
681
|
}
|
|
587
|
-
function
|
|
588
|
-
const e =
|
|
589
|
-
return
|
|
682
|
+
function pn(n) {
|
|
683
|
+
const e = ne();
|
|
684
|
+
return oe({
|
|
590
685
|
mutationFn: ({ id: t, input: o }) => n.updateNote(t, o),
|
|
591
686
|
onMutate: async ({ id: t, input: o }) => {
|
|
592
|
-
await e.cancelQueries({ queryKey:
|
|
593
|
-
const s = e.getQueryCache().findAll({ queryKey:
|
|
594
|
-
for (const
|
|
595
|
-
const
|
|
596
|
-
|
|
597
|
-
...
|
|
598
|
-
notes:
|
|
599
|
-
(
|
|
687
|
+
await e.cancelQueries({ queryKey: B.all });
|
|
688
|
+
const s = e.getQueryCache().findAll({ queryKey: B.all }), i = /* @__PURE__ */ new Map();
|
|
689
|
+
for (const d of s) {
|
|
690
|
+
const f = d.state.data;
|
|
691
|
+
f && (i.set(d.queryKey, f), e.setQueryData(d.queryKey, {
|
|
692
|
+
...f,
|
|
693
|
+
notes: f.notes.map(
|
|
694
|
+
(c) => c.id === t ? { ...c, ...o, updatedAt: (/* @__PURE__ */ new Date()).toISOString() } : c
|
|
600
695
|
)
|
|
601
696
|
}));
|
|
602
697
|
}
|
|
603
|
-
return { previousData:
|
|
698
|
+
return { previousData: i };
|
|
604
699
|
},
|
|
605
700
|
onError: (t, o, r) => {
|
|
606
701
|
if (r != null && r.previousData)
|
|
607
|
-
for (const [s,
|
|
608
|
-
e.setQueryData(s,
|
|
702
|
+
for (const [s, i] of r.previousData)
|
|
703
|
+
e.setQueryData(s, i);
|
|
609
704
|
},
|
|
610
705
|
onSettled: () => {
|
|
611
|
-
e.invalidateQueries({ queryKey:
|
|
706
|
+
e.invalidateQueries({ queryKey: B.all });
|
|
612
707
|
}
|
|
613
708
|
});
|
|
614
709
|
}
|
|
615
|
-
const
|
|
616
|
-
notebook: De,
|
|
617
|
-
notes: xe,
|
|
618
|
-
important: Re,
|
|
619
|
-
unclear: ke,
|
|
620
|
-
editNote: Ae,
|
|
621
|
-
save: Le,
|
|
622
|
-
cancel: He,
|
|
623
|
-
deleteNote: Fe,
|
|
624
|
-
removeFromNotebook: _e,
|
|
625
|
-
addNoteOptional: je,
|
|
626
|
-
markImportant: Pe,
|
|
627
|
-
markUnclear: qe,
|
|
628
|
-
savedToNotebook: Me,
|
|
629
|
-
noteUpdated: We,
|
|
630
|
-
noteDeleted: $e,
|
|
631
|
-
errorSavingNote: Be,
|
|
632
|
-
errorUpdatingNote: Ue,
|
|
633
|
-
noteDeletionFailed: Xe,
|
|
634
|
-
loadingNotes: Ke,
|
|
635
|
-
failedToLoadNotes: Qe,
|
|
636
|
-
emptyStateHeading: Ve,
|
|
637
|
-
emptyStateDescription: Ge,
|
|
638
|
-
nothingHereYet: Ye,
|
|
639
|
-
adjustFiltersOrCreate: ze,
|
|
640
|
-
noNotesForFilter: Ze,
|
|
641
|
-
previousPage: Je,
|
|
642
|
-
nextPage: et,
|
|
643
|
-
allCourses: tt,
|
|
644
|
-
allNotes: nt,
|
|
645
|
-
closeNotebookPanel: ot,
|
|
646
|
-
featureDescription: rt
|
|
647
|
-
}, oe = G(null);
|
|
648
|
-
function re(n, e) {
|
|
649
|
-
const t = B[n] ?? n;
|
|
650
|
-
return e ? t.replace(/%\{([^}]+)}/g, (o, r) => String(e[r] ?? `%{${r}}`)) : t;
|
|
651
|
-
}
|
|
652
|
-
function st({
|
|
653
|
-
translations: n,
|
|
654
|
-
translate: e,
|
|
655
|
-
children: t
|
|
656
|
-
}) {
|
|
657
|
-
const r = {
|
|
658
|
-
translations: { ...B, ...n },
|
|
659
|
-
translate: e ?? re
|
|
660
|
-
};
|
|
661
|
-
return /* @__PURE__ */ _(oe.Provider, { value: r, children: t });
|
|
662
|
-
}
|
|
663
|
-
function vt() {
|
|
664
|
-
const n = Y(oe);
|
|
665
|
-
return n || { translations: B, translate: re };
|
|
666
|
-
}
|
|
667
|
-
const it = {
|
|
710
|
+
const jt = {
|
|
668
711
|
selectedNoteId: null,
|
|
669
712
|
isNoteEditing: !1,
|
|
670
713
|
isTrayOpen: !1
|
|
671
714
|
};
|
|
672
|
-
function
|
|
715
|
+
function Ut(n, e) {
|
|
673
716
|
switch (e.type) {
|
|
674
717
|
case "SELECT_NOTE":
|
|
675
718
|
return {
|
|
@@ -689,20 +732,20 @@ function at(n, e) {
|
|
|
689
732
|
return n;
|
|
690
733
|
}
|
|
691
734
|
}
|
|
692
|
-
const
|
|
693
|
-
function
|
|
735
|
+
const ke = ye(null);
|
|
736
|
+
function Nn({
|
|
694
737
|
api: n,
|
|
695
738
|
currentUserId: e,
|
|
696
739
|
objectId: t,
|
|
697
740
|
objectType: o,
|
|
698
741
|
courseId: r,
|
|
699
742
|
pageLastModifiedAt: s,
|
|
700
|
-
onAnalyticsEvent:
|
|
701
|
-
translations:
|
|
702
|
-
translate:
|
|
703
|
-
children:
|
|
743
|
+
onAnalyticsEvent: i,
|
|
744
|
+
translations: d,
|
|
745
|
+
translate: f,
|
|
746
|
+
children: c
|
|
704
747
|
}) {
|
|
705
|
-
const [
|
|
748
|
+
const [g, m] = Me(Ut, jt), u = Ee(
|
|
706
749
|
() => ({
|
|
707
750
|
api: n,
|
|
708
751
|
currentUserId: e,
|
|
@@ -710,13 +753,13 @@ function Ot({
|
|
|
710
753
|
objectType: o,
|
|
711
754
|
courseId: r,
|
|
712
755
|
pageLastModifiedAt: s,
|
|
713
|
-
onAnalyticsEvent:
|
|
714
|
-
...
|
|
715
|
-
selectNote: (
|
|
716
|
-
clearSelectedNote: () =>
|
|
717
|
-
setEditing: (
|
|
718
|
-
openTray: () =>
|
|
719
|
-
closeTray: () =>
|
|
756
|
+
onAnalyticsEvent: i,
|
|
757
|
+
...g,
|
|
758
|
+
selectNote: (p, N = !1) => m({ type: "SELECT_NOTE", payload: { id: p, isEditing: N } }),
|
|
759
|
+
clearSelectedNote: () => m({ type: "CLEAR_SELECTED_NOTE" }),
|
|
760
|
+
setEditing: (p) => m({ type: "SET_EDITING", payload: p }),
|
|
761
|
+
openTray: () => m({ type: "OPEN_TRAY" }),
|
|
762
|
+
closeTray: () => m({ type: "CLOSE_TRAY" })
|
|
720
763
|
}),
|
|
721
764
|
[
|
|
722
765
|
n,
|
|
@@ -725,37 +768,329 @@ function Ot({
|
|
|
725
768
|
o,
|
|
726
769
|
r,
|
|
727
770
|
s,
|
|
728
|
-
|
|
729
|
-
|
|
771
|
+
i,
|
|
772
|
+
g
|
|
730
773
|
]
|
|
731
774
|
);
|
|
732
|
-
return /* @__PURE__ */
|
|
775
|
+
return /* @__PURE__ */ a(ke.Provider, { value: u, children: /* @__PURE__ */ a(Bt, { translations: d, translate: f, children: c }) });
|
|
733
776
|
}
|
|
734
|
-
function
|
|
735
|
-
const n =
|
|
777
|
+
function bn() {
|
|
778
|
+
const n = Ce(ke);
|
|
736
779
|
if (!n)
|
|
737
780
|
throw new Error("useNotebook must be used within a NotebookProvider");
|
|
738
781
|
return n;
|
|
739
782
|
}
|
|
783
|
+
const Wt = {
|
|
784
|
+
[b.IMPORTANT]: {
|
|
785
|
+
color: "info",
|
|
786
|
+
translationKey: "important",
|
|
787
|
+
icon: /* @__PURE__ */ a(te, { size: "x-small" })
|
|
788
|
+
},
|
|
789
|
+
[b.CONFUSING]: {
|
|
790
|
+
color: "danger",
|
|
791
|
+
translationKey: "unclear",
|
|
792
|
+
icon: /* @__PURE__ */ a(ee, { size: "x-small" })
|
|
793
|
+
}
|
|
794
|
+
}, qt = ({ type: n, onTypeChange: e, renderAsMenuTrigger: t = !1 }) => {
|
|
795
|
+
const { translations: o } = Y(), r = Wt[n], s = o[r.translationKey], [i, d] = j(!1), f = K(null), c = K(null), g = Pe(
|
|
796
|
+
(m) => {
|
|
797
|
+
e == null || e(m), d(!1);
|
|
798
|
+
},
|
|
799
|
+
[e]
|
|
800
|
+
);
|
|
801
|
+
return t && e ? /* @__PURE__ */ C(
|
|
802
|
+
F,
|
|
803
|
+
{
|
|
804
|
+
placement: "bottom start",
|
|
805
|
+
show: i,
|
|
806
|
+
onToggle: (m) => d(m),
|
|
807
|
+
shouldHideOnSelect: !0,
|
|
808
|
+
shouldFocusTriggerOnClose: !0,
|
|
809
|
+
trigger: /* @__PURE__ */ C(me, { color: r.color, renderIcon: r.icon, children: [
|
|
810
|
+
s,
|
|
811
|
+
" ",
|
|
812
|
+
/* @__PURE__ */ a(Ae, { size: "x-small" })
|
|
813
|
+
] }),
|
|
814
|
+
children: [
|
|
815
|
+
/* @__PURE__ */ C(F.Item, { ref: f, onClick: () => g(b.CONFUSING), children: [
|
|
816
|
+
/* @__PURE__ */ a(ee, { size: "x-small" }),
|
|
817
|
+
` ${o.markUnclear}`
|
|
818
|
+
] }),
|
|
819
|
+
/* @__PURE__ */ C(F.Item, { ref: c, onClick: () => g(b.IMPORTANT), children: [
|
|
820
|
+
/* @__PURE__ */ a(te, { size: "x-small" }),
|
|
821
|
+
` ${o.markImportant}`
|
|
822
|
+
] })
|
|
823
|
+
]
|
|
824
|
+
}
|
|
825
|
+
) : /* @__PURE__ */ a(me, { color: r.color, renderIcon: r.icon, children: s });
|
|
826
|
+
};
|
|
827
|
+
function be(n, e) {
|
|
828
|
+
return (n instanceof Date ? n : new Date(n)).toLocaleString(e, {
|
|
829
|
+
year: "numeric",
|
|
830
|
+
month: "short",
|
|
831
|
+
day: "numeric"
|
|
832
|
+
});
|
|
833
|
+
}
|
|
834
|
+
const yn = ({
|
|
835
|
+
noteId: n,
|
|
836
|
+
date: e,
|
|
837
|
+
highlight: t,
|
|
838
|
+
note: o,
|
|
839
|
+
type: r,
|
|
840
|
+
onClick: s,
|
|
841
|
+
onDelete: i,
|
|
842
|
+
onSaveNote: d,
|
|
843
|
+
onTypeChange: f,
|
|
844
|
+
isActive: c,
|
|
845
|
+
isPanelView: g = !1,
|
|
846
|
+
courseName: m,
|
|
847
|
+
locale: u,
|
|
848
|
+
highlightTheme: p,
|
|
849
|
+
cardTheme: N,
|
|
850
|
+
renderLink: v,
|
|
851
|
+
href: I
|
|
852
|
+
}) => {
|
|
853
|
+
const { translations: T } = Y(), [D, h] = j(!1), [y, w] = j(!1), [A, L] = j(o || ""), [V, k] = j(!1), S = r === b.IMPORTANT ? T.important : T.unclear, W = (E) => {
|
|
854
|
+
E.key === "Enter" && (E.preventDefault(), s == null || s());
|
|
855
|
+
}, M = [S, T.note];
|
|
856
|
+
t && M.push(t), o && M.push(o), e && M.push(be(e, u)), m && M.push(m);
|
|
857
|
+
const _ = M.join(", "), ce = r === b.CONFUSING ? N.confusingBorderColor : N.importantBorderColor, Re = {
|
|
858
|
+
borderStyle: "solid",
|
|
859
|
+
borderColor: c || D ? ce : Q(ce, 0.5),
|
|
860
|
+
borderWidth: "0.0625rem 0.0625rem 0.25rem 0.25rem",
|
|
861
|
+
borderRadius: "1rem",
|
|
862
|
+
padding: "1rem",
|
|
863
|
+
cursor: y ? "default" : "pointer",
|
|
864
|
+
position: "relative"
|
|
865
|
+
}, de = (
|
|
866
|
+
// biome-ignore lint/a11y/noStaticElementInteractions: role is conditionally set to "button"
|
|
867
|
+
// biome-ignore lint/a11y/useAriaPropsSupportedByRole: aria-label applies when role="button"
|
|
868
|
+
/* @__PURE__ */ C(
|
|
869
|
+
"div",
|
|
870
|
+
{
|
|
871
|
+
role: I || y ? void 0 : "button",
|
|
872
|
+
"aria-label": I ? void 0 : _,
|
|
873
|
+
"aria-pressed": I || y ? void 0 : c,
|
|
874
|
+
tabIndex: I || c ? -1 : 0,
|
|
875
|
+
"data-testid": "note-card",
|
|
876
|
+
onClick: c ? void 0 : s,
|
|
877
|
+
onMouseEnter: () => h(!0),
|
|
878
|
+
onMouseLeave: () => h(!1),
|
|
879
|
+
onKeyDown: c ? void 0 : W,
|
|
880
|
+
style: Re,
|
|
881
|
+
children: [
|
|
882
|
+
/* @__PURE__ */ C(x, { direction: "column", gap: "small", children: [
|
|
883
|
+
/* @__PURE__ */ a(
|
|
884
|
+
qt,
|
|
885
|
+
{
|
|
886
|
+
type: r,
|
|
887
|
+
onTypeChange: g && f ? (E) => f(n, E) : void 0,
|
|
888
|
+
renderAsMenuTrigger: g && !!f && !!c
|
|
889
|
+
}
|
|
890
|
+
),
|
|
891
|
+
t ? /* @__PURE__ */ a("div", { style: { wordBreak: "break-word", overflowWrap: "break-word" }, children: /* @__PURE__ */ a(P, { children: c && g ? /* @__PURE__ */ a(
|
|
892
|
+
Ne,
|
|
893
|
+
{
|
|
894
|
+
type: r,
|
|
895
|
+
isCardActive: !!c || D,
|
|
896
|
+
theme: p,
|
|
897
|
+
children: t
|
|
898
|
+
}
|
|
899
|
+
) : /* @__PURE__ */ a(J, { maxLines: 3, truncate: "word", children: /* @__PURE__ */ a(
|
|
900
|
+
Ne,
|
|
901
|
+
{
|
|
902
|
+
type: r,
|
|
903
|
+
isCardActive: !!c || D,
|
|
904
|
+
theme: p,
|
|
905
|
+
children: t
|
|
906
|
+
}
|
|
907
|
+
) }) }) }) : /* @__PURE__ */ a(_t, {}),
|
|
908
|
+
/* @__PURE__ */ C(x, { direction: "column", gap: c ? "small" : "none", children: [
|
|
909
|
+
y && g ? /* @__PURE__ */ C(x, { direction: "column", gap: "x-small", children: [
|
|
910
|
+
/* @__PURE__ */ a(
|
|
911
|
+
_e,
|
|
912
|
+
{
|
|
913
|
+
label: /* @__PURE__ */ a(He, { children: T.editNote }),
|
|
914
|
+
value: A,
|
|
915
|
+
onChange: (E) => L(E.target.value),
|
|
916
|
+
placeholder: T.addNoteOptional
|
|
917
|
+
}
|
|
918
|
+
),
|
|
919
|
+
/* @__PURE__ */ C(x, { gap: "xx-small", children: [
|
|
920
|
+
/* @__PURE__ */ a(x.Item, { shouldGrow: !0, children: /* @__PURE__ */ a(
|
|
921
|
+
q,
|
|
922
|
+
{
|
|
923
|
+
display: "block",
|
|
924
|
+
size: "small",
|
|
925
|
+
onClick: () => {
|
|
926
|
+
L(o || ""), w(!1);
|
|
927
|
+
},
|
|
928
|
+
children: T.cancel
|
|
929
|
+
}
|
|
930
|
+
) }),
|
|
931
|
+
/* @__PURE__ */ a(x.Item, { shouldGrow: !0, children: /* @__PURE__ */ a(
|
|
932
|
+
q,
|
|
933
|
+
{
|
|
934
|
+
display: "block",
|
|
935
|
+
color: "primary",
|
|
936
|
+
size: "small",
|
|
937
|
+
onClick: () => {
|
|
938
|
+
d == null || d(n, A), w(!1);
|
|
939
|
+
},
|
|
940
|
+
interaction: A.trim() ? "enabled" : "disabled",
|
|
941
|
+
children: T.save
|
|
942
|
+
}
|
|
943
|
+
) })
|
|
944
|
+
] })
|
|
945
|
+
] }) : o ? /* @__PURE__ */ a("div", { style: { wordBreak: "break-word", overflowWrap: "break-word" }, children: c && g ? /* @__PURE__ */ C(P, { children: [
|
|
946
|
+
o,
|
|
947
|
+
" ",
|
|
948
|
+
/* @__PURE__ */ a(
|
|
949
|
+
Z,
|
|
950
|
+
{
|
|
951
|
+
size: "small",
|
|
952
|
+
withBackground: !1,
|
|
953
|
+
withBorder: !1,
|
|
954
|
+
screenReaderLabel: T.editNote,
|
|
955
|
+
onClick: (E) => {
|
|
956
|
+
E.stopPropagation(), w(!0);
|
|
957
|
+
},
|
|
958
|
+
children: /* @__PURE__ */ a(ue, {})
|
|
959
|
+
}
|
|
960
|
+
)
|
|
961
|
+
] }) : /* @__PURE__ */ a(P, { children: /* @__PURE__ */ a(J, { maxLines: 3, truncate: "word", children: o }) }) }) : g && c ? /* @__PURE__ */ a("div", { children: /* @__PURE__ */ C(P, { color: "secondary", children: [
|
|
962
|
+
T.addNotePrompt,
|
|
963
|
+
" ",
|
|
964
|
+
/* @__PURE__ */ a(
|
|
965
|
+
Z,
|
|
966
|
+
{
|
|
967
|
+
size: "small",
|
|
968
|
+
withBackground: !1,
|
|
969
|
+
withBorder: !1,
|
|
970
|
+
screenReaderLabel: T.editNote,
|
|
971
|
+
onClick: (E) => {
|
|
972
|
+
E.stopPropagation(), w(!0);
|
|
973
|
+
},
|
|
974
|
+
children: /* @__PURE__ */ a(ue, {})
|
|
975
|
+
}
|
|
976
|
+
)
|
|
977
|
+
] }) }) : null,
|
|
978
|
+
/* @__PURE__ */ C(x, { justifyItems: "space-between", alignItems: "center", children: [
|
|
979
|
+
/* @__PURE__ */ a(P, { size: "small", color: "secondary", children: be(e, u) }),
|
|
980
|
+
c && i && /* @__PURE__ */ a(
|
|
981
|
+
Z,
|
|
982
|
+
{
|
|
983
|
+
size: "small",
|
|
984
|
+
withBackground: !1,
|
|
985
|
+
withBorder: !1,
|
|
986
|
+
color: "danger",
|
|
987
|
+
screenReaderLabel: T.deleteNote,
|
|
988
|
+
onClick: (E) => {
|
|
989
|
+
E.stopPropagation(), k(!0);
|
|
990
|
+
},
|
|
991
|
+
children: /* @__PURE__ */ a(fe, {})
|
|
992
|
+
}
|
|
993
|
+
)
|
|
994
|
+
] }),
|
|
995
|
+
m && /* @__PURE__ */ a(P, { size: "small", color: "secondary", children: m })
|
|
996
|
+
] })
|
|
997
|
+
] }),
|
|
998
|
+
V && i && /* @__PURE__ */ a(
|
|
999
|
+
je,
|
|
1000
|
+
{
|
|
1001
|
+
as: "div",
|
|
1002
|
+
background: "primary",
|
|
1003
|
+
padding: "medium",
|
|
1004
|
+
borderRadius: "large",
|
|
1005
|
+
position: "absolute",
|
|
1006
|
+
insetBlockStart: "0",
|
|
1007
|
+
insetBlockEnd: "0",
|
|
1008
|
+
insetInlineStart: "0",
|
|
1009
|
+
insetInlineEnd: "0",
|
|
1010
|
+
stacking: "above",
|
|
1011
|
+
children: /* @__PURE__ */ C(
|
|
1012
|
+
x,
|
|
1013
|
+
{
|
|
1014
|
+
direction: "column",
|
|
1015
|
+
justifyItems: "center",
|
|
1016
|
+
alignItems: "center",
|
|
1017
|
+
gap: "x-small",
|
|
1018
|
+
height: "100%",
|
|
1019
|
+
children: [
|
|
1020
|
+
/* @__PURE__ */ a(
|
|
1021
|
+
q,
|
|
1022
|
+
{
|
|
1023
|
+
display: "block",
|
|
1024
|
+
color: "danger",
|
|
1025
|
+
size: "small",
|
|
1026
|
+
renderIcon: /* @__PURE__ */ a(fe, {}),
|
|
1027
|
+
onClick: (E) => {
|
|
1028
|
+
E.stopPropagation(), i(n), k(!1);
|
|
1029
|
+
},
|
|
1030
|
+
children: T.deleteNote
|
|
1031
|
+
}
|
|
1032
|
+
),
|
|
1033
|
+
/* @__PURE__ */ a(
|
|
1034
|
+
q,
|
|
1035
|
+
{
|
|
1036
|
+
display: "block",
|
|
1037
|
+
size: "small",
|
|
1038
|
+
onClick: (E) => {
|
|
1039
|
+
E.stopPropagation(), k(!1);
|
|
1040
|
+
},
|
|
1041
|
+
children: T.cancel
|
|
1042
|
+
}
|
|
1043
|
+
)
|
|
1044
|
+
]
|
|
1045
|
+
}
|
|
1046
|
+
)
|
|
1047
|
+
}
|
|
1048
|
+
)
|
|
1049
|
+
]
|
|
1050
|
+
}
|
|
1051
|
+
)
|
|
1052
|
+
);
|
|
1053
|
+
return I && v ? v({ href: I, children: de, ariaLabel: _ }) : de;
|
|
1054
|
+
}, Cn = ({ currentType: n, onSelectReaction: e }) => {
|
|
1055
|
+
const { translations: t } = Y(), o = K(null), r = K(null);
|
|
1056
|
+
return Fe(() => {
|
|
1057
|
+
n === b.CONFUSING && o.current ? o.current.focus() : n === b.IMPORTANT && r.current ? r.current.focus() : o.current && o.current.focus();
|
|
1058
|
+
}, [n]), /* @__PURE__ */ C(F, { children: [
|
|
1059
|
+
/* @__PURE__ */ C(F.Item, { ref: o, onClick: () => e(b.CONFUSING), children: [
|
|
1060
|
+
/* @__PURE__ */ a(ee, { size: "x-small" }),
|
|
1061
|
+
` ${t.markUnclear}`
|
|
1062
|
+
] }),
|
|
1063
|
+
/* @__PURE__ */ C(F.Item, { ref: r, onClick: () => e(b.IMPORTANT), children: [
|
|
1064
|
+
/* @__PURE__ */ a(te, { size: "x-small" }),
|
|
1065
|
+
` ${t.markImportant}`
|
|
1066
|
+
] })
|
|
1067
|
+
] });
|
|
1068
|
+
};
|
|
740
1069
|
export {
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
1070
|
+
Ne as Highlight,
|
|
1071
|
+
_t as HighlightError,
|
|
1072
|
+
yn as NoteCard,
|
|
1073
|
+
qt as NoteChip,
|
|
1074
|
+
Cn as NoteReactionMenu,
|
|
1075
|
+
Nn as NotebookProvider,
|
|
1076
|
+
b as REACTION_TYPE,
|
|
1077
|
+
G as RangeAnchor,
|
|
1078
|
+
O as TextPosition,
|
|
1079
|
+
H as TextPositionAnchor,
|
|
1080
|
+
R as TextRange,
|
|
1081
|
+
un as addHighlight,
|
|
1082
|
+
Q as createTransparentColor,
|
|
1083
|
+
cn as getPlacement,
|
|
1084
|
+
dn as isOverlapping,
|
|
1085
|
+
he as nodeFromXPath,
|
|
1086
|
+
ln as recoverHighlights,
|
|
1087
|
+
fn as removeHighlights,
|
|
1088
|
+
an as scrollToHighlight,
|
|
1089
|
+
mn as useCreateNote,
|
|
1090
|
+
gn as useDeleteNote,
|
|
1091
|
+
hn as useGetNotes,
|
|
1092
|
+
bn as useNotebook,
|
|
1093
|
+
Y as useNotebookTranslations,
|
|
1094
|
+
pn as useUpdateNote,
|
|
1095
|
+
ge as xpathFromNode
|
|
761
1096
|
};
|