@floegence/floe-webapp-core 0.35.55 → 0.35.57
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/components/notes/NotesBoard.d.ts +2 -0
- package/dist/components/notes/NotesBoard.js +30 -24
- package/dist/components/notes/NotesBoardNote.d.ts +2 -0
- package/dist/components/notes/NotesBoardNote.js +83 -76
- package/dist/components/notes/NotesOverlay.d.ts +2 -0
- package/dist/components/notes/NotesOverlay.js +154 -93
- package/dist/components/notes/notesNumbering.d.ts +18 -0
- package/dist/components/notes/notesNumbering.js +28 -0
- package/dist/components/notes/useNotesOverlayModel.d.ts +7 -0
- package/dist/components/notes/useNotesOverlayModel.js +467 -402
- package/dist/hooks/useOverlayMask.d.ts +6 -0
- package/dist/hooks/useOverlayMask.js +63 -51
- package/dist/notes-legacy.css +82 -0
- package/dist/styles.css +1 -1
- package/package.json +1 -1
|
@@ -1,170 +1,185 @@
|
|
|
1
|
-
import { createSignal as a, createMemo as c, createEffect as
|
|
2
|
-
import { Paste as
|
|
3
|
-
import { NOTES_CONTEXT_MENU_WIDTH_PX as
|
|
4
|
-
import { samePoint as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
1
|
+
import { createSignal as a, createMemo as c, createEffect as p, onCleanup as z, untrack as Ne } from "solid-js";
|
|
2
|
+
import { Paste as vo, Plus as To, Trash as go } from "../icons/index.js";
|
|
3
|
+
import { NOTES_CONTEXT_MENU_WIDTH_PX as yo, estimateNotesContextMenuHeight as No } from "./NotesContextMenu.js";
|
|
4
|
+
import { samePoint as xe, resolveFrameSize as J, resolveOverviewBounds as xo, createOverviewItem as bo, clamp as P, createContextMenuPosition as Co, NOTES_MOBILE_BREAKPOINT_PX as Mo, getNormalizedOverviewPoint as ft, normalizeNoteText as mt, findTrashTopicNoteCount as _o, hasLiveNotesForTopic as Po, NOTES_CANVAS_ZOOM_STEP as ht, resolveCenteredViewport as Io } from "./notesOverlayHelpers.js";
|
|
5
|
+
import { numberNotesInTopic as So, resolveNotesDigitSequence as ee } from "./notesNumbering.js";
|
|
6
|
+
import { normalizeNotesSnapshot as Do, groupTrashItems as ko, visibleWorldRect as Oo, computeBoardBounds as Xo } from "./types.js";
|
|
7
|
+
import { useNotification as Eo } from "../../context/NotificationContext.js";
|
|
8
|
+
const Lo = 650;
|
|
9
|
+
function h(r) {
|
|
8
10
|
return r instanceof Error ? r.message : String(r);
|
|
9
11
|
}
|
|
10
|
-
function
|
|
11
|
-
const
|
|
12
|
-
let
|
|
13
|
-
const
|
|
14
|
-
let O,
|
|
15
|
-
const
|
|
16
|
-
() =>
|
|
17
|
-
),
|
|
12
|
+
function jo(r) {
|
|
13
|
+
const s = Eo();
|
|
14
|
+
let be = 1, te = /* @__PURE__ */ new Set();
|
|
15
|
+
const F = /* @__PURE__ */ new Map(), A = /* @__PURE__ */ new Map(), [Ce, wt] = a(), [I, vt] = a({ width: 0, height: 0 }), [v, u] = a(null), [Me, _e] = a(""), [B, Pe] = a(null), [Ie, oe] = a(""), [V, S] = a(null), [ne, Se] = a(""), [De, ke] = a(""), [Oe, Xe] = a("amber"), [re, Ee] = a(!1), [Le, Ye] = a(!1), [j, Re] = a(null), [ie, ce] = a(""), [Tt, C] = a(null), [D, se] = a(""), [gt, yt] = a(Date.now()), [Nt, xt] = a(!1), [ze, T] = a(null), [bt, Fe] = a(null), [Ae, k] = a(null), [Be, $] = a(/* @__PURE__ */ new Map());
|
|
16
|
+
let O, N, ae, le = null;
|
|
17
|
+
const d = c(() => Do(r.controller.snapshot())), x = c(
|
|
18
|
+
() => d().topics.filter((e) => e.deleted_at_unix_ms <= 0)
|
|
19
|
+
), Ct = c(() => x().length), b = c(() => {
|
|
18
20
|
const e = r.controller.activeTopicID();
|
|
19
|
-
return
|
|
20
|
-
}),
|
|
21
|
-
() =>
|
|
22
|
-
),
|
|
23
|
-
const e =
|
|
24
|
-
return
|
|
21
|
+
return x().some((t) => t.topic_id === e) ? e : x()[0]?.topic_id ?? "";
|
|
22
|
+
}), X = c(
|
|
23
|
+
() => x().find((e) => e.topic_id === b())
|
|
24
|
+
), Mt = c(() => {
|
|
25
|
+
const e = Be();
|
|
26
|
+
return d().items.map((t) => {
|
|
25
27
|
const o = e.get(t.note_id);
|
|
26
|
-
return !o ||
|
|
28
|
+
return !o || xe({ x: t.x, y: t.y }, o) ? t : {
|
|
27
29
|
...t,
|
|
28
30
|
x: o.x,
|
|
29
31
|
y: o.y
|
|
30
32
|
};
|
|
31
33
|
});
|
|
32
|
-
}),
|
|
33
|
-
() =>
|
|
34
|
-
),
|
|
35
|
-
() =>
|
|
36
|
-
),
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
),
|
|
44
|
-
|
|
34
|
+
}), W = c(
|
|
35
|
+
() => Mt().filter((e) => e.topic_id === b())
|
|
36
|
+
), E = c(
|
|
37
|
+
() => So(d().items, b())
|
|
38
|
+
), _t = c(
|
|
39
|
+
() => new Map(E().map((e) => [e.item.note_id, e.label]))
|
|
40
|
+
), Pt = c(() => ko(d().trash_items)), Ve = c(() => d().trash_items.length), It = c(() => d().items.length), St = c(
|
|
41
|
+
() => W().reduce((e, t) => Math.max(e, t.z_index), 1)
|
|
42
|
+
), g = c(() => Ae() ?? r.controller.viewport()), Dt = c(() => X()?.name ?? "No topic"), kt = c(() => `${Math.round(g().scale * 100)}%`), Ot = c(() => {
|
|
43
|
+
const e = J(I());
|
|
44
|
+
return Oo(g(), e.width, e.height);
|
|
45
|
+
}), q = c(
|
|
46
|
+
() => xo(Xo(W()), Ot())
|
|
47
|
+
), Xt = c(
|
|
48
|
+
() => W().map((e) => bo(e, q()))
|
|
49
|
+
), je = c(() => {
|
|
50
|
+
const e = q(), t = J(I()), o = g(), n = -o.x / o.scale, i = -o.y / o.scale, l = t.width / o.scale, f = t.height / o.scale, m = P(n, e.minX, e.maxX), M = P(i, e.minY, e.maxY), _ = P(n + l, e.minX, e.maxX), ye = P(i + f, e.minY, e.maxY), R = Math.max((_ - m) / e.width * 100, 6), y = Math.max((ye - M) / e.height * 100, 8), ut = (m - e.minX) / e.width * 100, pt = (M - e.minY) / e.height * 100;
|
|
45
51
|
return {
|
|
46
|
-
left:
|
|
47
|
-
top:
|
|
48
|
-
width:
|
|
49
|
-
height:
|
|
50
|
-
centerX:
|
|
51
|
-
centerY:
|
|
52
|
+
left: ut,
|
|
53
|
+
top: pt,
|
|
54
|
+
width: R,
|
|
55
|
+
height: y,
|
|
56
|
+
centerX: ut + R / 2,
|
|
57
|
+
centerY: pt + y / 2
|
|
52
58
|
};
|
|
53
|
-
}),
|
|
54
|
-
const e =
|
|
59
|
+
}), Et = c(() => {
|
|
60
|
+
const e = je();
|
|
55
61
|
return {
|
|
56
62
|
left: `${e.left}%`,
|
|
57
63
|
top: `${e.top}%`,
|
|
58
64
|
width: `${e.width}%`,
|
|
59
65
|
height: `${e.height}%`
|
|
60
66
|
};
|
|
61
|
-
}),
|
|
62
|
-
const e =
|
|
63
|
-
return e ?
|
|
64
|
-
}),
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
},
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
},
|
|
83
|
-
|
|
84
|
-
},
|
|
85
|
-
|
|
86
|
-
},
|
|
67
|
+
}), $e = c(() => {
|
|
68
|
+
const e = V();
|
|
69
|
+
return e ? d().items.find((t) => t.note_id === e) : void 0;
|
|
70
|
+
}), We = c(
|
|
71
|
+
() => !!(V() || j() || B() || v() || re())
|
|
72
|
+
), Lt = c(() => {
|
|
73
|
+
const e = D();
|
|
74
|
+
if (!e) return null;
|
|
75
|
+
const t = ee(e, E());
|
|
76
|
+
return t.kind !== "pending" ? null : t.exactMatch?.item.note_id ?? null;
|
|
77
|
+
}), de = (e) => Ne(() => d().items.some((t) => t.note_id === e)), qe = () => {
|
|
78
|
+
const e = be;
|
|
79
|
+
return be += 1, e;
|
|
80
|
+
}, Yt = (e) => {
|
|
81
|
+
const t = qe();
|
|
82
|
+
return F.set(e, t), t;
|
|
83
|
+
}, Rt = (e) => {
|
|
84
|
+
const t = qe();
|
|
85
|
+
return A.set(e, t), t;
|
|
86
|
+
}, He = (e, t) => F.get(e) === t, Ge = (e, t) => A.get(e) === t, ue = (e) => {
|
|
87
|
+
F.delete(e);
|
|
88
|
+
}, pe = (e) => {
|
|
89
|
+
A.delete(e);
|
|
90
|
+
}, fe = (e) => {
|
|
91
|
+
ue(e), pe(e), H(e), T((t) => t === e ? null : t);
|
|
92
|
+
}, zt = (e) => {
|
|
93
|
+
for (const t of d().items)
|
|
94
|
+
t.topic_id === e && fe(t.note_id);
|
|
95
|
+
}, Ft = (e) => {
|
|
96
|
+
fe(e), L(), C((t) => t === e ? null : t), u((t) => t?.noteID === e ? null : t), S((t) => t === e ? null : t);
|
|
97
|
+
}, At = () => {
|
|
98
|
+
F.clear(), A.clear();
|
|
99
|
+
}, L = () => {
|
|
87
100
|
O !== void 0 && (window.clearTimeout(O), O = void 0);
|
|
88
|
-
},
|
|
89
|
-
|
|
101
|
+
}, w = () => {
|
|
102
|
+
N !== void 0 && (window.clearTimeout(N), N = void 0), se("");
|
|
103
|
+
}, Ue = (e, t) => {
|
|
104
|
+
$((o) => {
|
|
90
105
|
const n = o.get(e);
|
|
91
|
-
if (n &&
|
|
106
|
+
if (n && xe(n, t)) return o;
|
|
92
107
|
const i = new Map(o);
|
|
93
108
|
return i.set(e, t), i;
|
|
94
109
|
});
|
|
95
|
-
},
|
|
96
|
-
|
|
110
|
+
}, H = (e) => {
|
|
111
|
+
$((t) => {
|
|
97
112
|
if (!t.has(e)) return t;
|
|
98
113
|
const o = new Map(t);
|
|
99
114
|
return o.delete(e), o;
|
|
100
115
|
});
|
|
101
|
-
},
|
|
102
|
-
|
|
103
|
-
},
|
|
104
|
-
|
|
105
|
-
},
|
|
106
|
-
|
|
107
|
-
},
|
|
108
|
-
|
|
109
|
-
},
|
|
110
|
-
|
|
111
|
-
},
|
|
112
|
-
|
|
113
|
-
},
|
|
114
|
-
|
|
115
|
-
},
|
|
116
|
-
|
|
117
|
-
},
|
|
118
|
-
if (
|
|
119
|
-
|
|
116
|
+
}, G = () => {
|
|
117
|
+
Re(null), ce("");
|
|
118
|
+
}, U = () => {
|
|
119
|
+
S(null);
|
|
120
|
+
}, Y = () => {
|
|
121
|
+
Ye(!1);
|
|
122
|
+
}, Ke = () => {
|
|
123
|
+
Ye(!0);
|
|
124
|
+
}, K = () => {
|
|
125
|
+
Ee(!1);
|
|
126
|
+
}, me = () => {
|
|
127
|
+
Ee(!0);
|
|
128
|
+
}, Z = () => {
|
|
129
|
+
Pe(null), oe("");
|
|
130
|
+
}, Bt = () => {
|
|
131
|
+
u(null), K(), Y(), U(), G(), $(/* @__PURE__ */ new Map()), At();
|
|
132
|
+
}, Vt = () => {
|
|
133
|
+
if (v()) {
|
|
134
|
+
u(null);
|
|
120
135
|
return;
|
|
121
136
|
}
|
|
122
|
-
if (
|
|
123
|
-
|
|
137
|
+
if (V()) {
|
|
138
|
+
U();
|
|
124
139
|
return;
|
|
125
140
|
}
|
|
126
|
-
if (
|
|
127
|
-
|
|
141
|
+
if (j()) {
|
|
142
|
+
G();
|
|
128
143
|
return;
|
|
129
144
|
}
|
|
130
|
-
if (
|
|
131
|
-
|
|
145
|
+
if (Le()) {
|
|
146
|
+
Y();
|
|
132
147
|
return;
|
|
133
148
|
}
|
|
134
|
-
if (
|
|
135
|
-
|
|
149
|
+
if (re()) {
|
|
150
|
+
K();
|
|
136
151
|
return;
|
|
137
152
|
}
|
|
138
153
|
r.onClose();
|
|
139
|
-
},
|
|
154
|
+
}, Q = (e) => {
|
|
140
155
|
r.controller.setActiveTopicID(e);
|
|
141
|
-
},
|
|
156
|
+
}, Ze = (e) => Po(d().items, e), jt = (e, t, o = X()?.topic_id) => {
|
|
142
157
|
if (!o) return null;
|
|
143
|
-
const n =
|
|
158
|
+
const n = x().find((m) => m.topic_id === o);
|
|
144
159
|
if (!n) return null;
|
|
145
|
-
const i =
|
|
160
|
+
const i = Ce();
|
|
146
161
|
if (!i) return null;
|
|
147
|
-
const
|
|
148
|
-
if (
|
|
162
|
+
const l = i.getBoundingClientRect();
|
|
163
|
+
if (l.width <= 0 || l.height <= 0 || e < l.left || e > l.right || t < l.top || t > l.bottom)
|
|
149
164
|
return null;
|
|
150
|
-
const
|
|
165
|
+
const f = g();
|
|
151
166
|
return {
|
|
152
167
|
topicID: n.topic_id,
|
|
153
|
-
worldX: (e -
|
|
154
|
-
worldY: (t -
|
|
168
|
+
worldX: (e - l.left - f.x) / f.scale,
|
|
169
|
+
worldY: (t - l.top - f.y) / f.scale
|
|
155
170
|
};
|
|
156
|
-
},
|
|
171
|
+
}, $t = (e, t) => {
|
|
157
172
|
if (typeof document > "u") return [];
|
|
158
173
|
if (typeof document.elementsFromPoint == "function")
|
|
159
174
|
return document.elementsFromPoint(e, t);
|
|
160
175
|
const o = document.elementFromPoint(e, t);
|
|
161
176
|
return o ? [o] : [];
|
|
162
|
-
},
|
|
163
|
-
const o =
|
|
177
|
+
}, Wt = (e, t) => {
|
|
178
|
+
const o = $t(e, t).filter((n) => n instanceof HTMLElement).map((n) => n.closest("[data-floe-notes-note-id]")).find(Boolean)?.dataset.floeNotesNoteId?.trim();
|
|
164
179
|
if (o)
|
|
165
|
-
return
|
|
166
|
-
},
|
|
167
|
-
const n =
|
|
180
|
+
return d().items.find((n) => n.note_id === o);
|
|
181
|
+
}, he = (e, t, o) => {
|
|
182
|
+
const n = jt(e, t, o?.topicID);
|
|
168
183
|
return n ? {
|
|
169
184
|
clientX: e,
|
|
170
185
|
clientY: t,
|
|
@@ -173,86 +188,86 @@ function bo(r) {
|
|
|
173
188
|
topicID: n.topicID,
|
|
174
189
|
noteID: o?.noteID ?? null
|
|
175
190
|
} : null;
|
|
176
|
-
},
|
|
177
|
-
const e =
|
|
191
|
+
}, Qe = () => {
|
|
192
|
+
const e = X();
|
|
178
193
|
if (!e) return null;
|
|
179
|
-
const t =
|
|
194
|
+
const t = J(I()), o = g();
|
|
180
195
|
return {
|
|
181
196
|
topicID: e.topic_id,
|
|
182
197
|
worldX: (t.width / 2 - o.x) / o.scale,
|
|
183
198
|
worldY: (t.height / 2 - o.y) / o.scale
|
|
184
199
|
};
|
|
185
|
-
},
|
|
186
|
-
const n =
|
|
187
|
-
return n ? (
|
|
188
|
-
},
|
|
189
|
-
const o =
|
|
200
|
+
}, Je = (e, t, o) => {
|
|
201
|
+
const n = he(e, t, o);
|
|
202
|
+
return n ? (u(n), !0) : !1;
|
|
203
|
+
}, qt = (e, t) => {
|
|
204
|
+
const o = Wt(e, t);
|
|
190
205
|
if (o) {
|
|
191
|
-
|
|
192
|
-
const n =
|
|
206
|
+
Te(o.note_id);
|
|
207
|
+
const n = he(e, t, {
|
|
193
208
|
topicID: o.topic_id,
|
|
194
209
|
noteID: o.note_id
|
|
195
210
|
});
|
|
196
|
-
|
|
211
|
+
u(n);
|
|
197
212
|
return;
|
|
198
213
|
}
|
|
199
|
-
|
|
200
|
-
},
|
|
201
|
-
|
|
202
|
-
},
|
|
203
|
-
viewport:
|
|
204
|
-
frame:
|
|
205
|
-
bounds:
|
|
214
|
+
u(he(e, t));
|
|
215
|
+
}, et = (e) => {
|
|
216
|
+
k(e), r.controller.setViewport(e), k(null);
|
|
217
|
+
}, tt = (e, t, o) => Io({
|
|
218
|
+
viewport: g(),
|
|
219
|
+
frame: I(),
|
|
220
|
+
bounds: q(),
|
|
206
221
|
worldX: e,
|
|
207
222
|
worldY: t,
|
|
208
223
|
scale: o
|
|
209
|
-
}),
|
|
210
|
-
const t =
|
|
211
|
-
|
|
212
|
-
},
|
|
224
|
+
}), ot = (e) => {
|
|
225
|
+
const t = g(), o = J(I()), n = (o.width / 2 - t.x) / t.scale, i = (o.height / 2 - t.y) / t.scale, l = e === "in" ? t.scale * ht : t.scale / ht;
|
|
226
|
+
et(tt(n, i, l));
|
|
227
|
+
}, nt = (e, t, o) => {
|
|
213
228
|
const n = o.surfaceRect;
|
|
214
229
|
if (n.width <= 0 || n.height <= 0) return;
|
|
215
|
-
const i =
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
230
|
+
const i = ft(e, t, n), l = P(i.x - o.centerOffsetX, 0, 1), f = P(i.y - o.centerOffsetY, 0, 1), m = o.bounds;
|
|
231
|
+
k(
|
|
232
|
+
tt(
|
|
233
|
+
m.minX + l * m.width,
|
|
234
|
+
m.minY + f * m.height
|
|
220
235
|
)
|
|
221
236
|
);
|
|
222
|
-
},
|
|
223
|
-
if (
|
|
224
|
-
const t =
|
|
237
|
+
}, we = (e) => {
|
|
238
|
+
if (ae?.abort(), ae = void 0, e) {
|
|
239
|
+
const t = Ae();
|
|
225
240
|
t && r.controller.setViewport(t);
|
|
226
241
|
}
|
|
227
|
-
|
|
228
|
-
},
|
|
242
|
+
k(null), Fe(null);
|
|
243
|
+
}, Ht = (e) => {
|
|
229
244
|
if (e.button !== 0 && e.pointerType !== "touch" && e.pointerType !== "pen")
|
|
230
245
|
return;
|
|
231
246
|
const t = e.currentTarget, o = t.getBoundingClientRect();
|
|
232
247
|
if (o.width <= 0 || o.height <= 0) return;
|
|
233
|
-
const n =
|
|
248
|
+
const n = ft(e.clientX, e.clientY, o), i = je(), l = n.x * 100, f = n.y * 100, m = l >= i.left && l <= i.left + i.width && f >= i.top && f <= i.top + i.height, M = {
|
|
234
249
|
pointerId: e.pointerId,
|
|
235
|
-
bounds:
|
|
250
|
+
bounds: q(),
|
|
236
251
|
surfaceRect: o,
|
|
237
|
-
centerOffsetX:
|
|
238
|
-
centerOffsetY:
|
|
252
|
+
centerOffsetX: m ? n.x - i.centerX / 100 : 0,
|
|
253
|
+
centerOffsetY: m ? n.y - i.centerY / 100 : 0
|
|
239
254
|
};
|
|
240
|
-
|
|
241
|
-
const
|
|
242
|
-
|
|
243
|
-
const
|
|
244
|
-
|
|
245
|
-
},
|
|
246
|
-
|
|
255
|
+
we(!1), e.preventDefault(), e.stopPropagation(), Fe(M), nt(e.clientX, e.clientY, M), t.setPointerCapture?.(e.pointerId);
|
|
256
|
+
const _ = new AbortController();
|
|
257
|
+
ae = _;
|
|
258
|
+
const ye = (y) => {
|
|
259
|
+
y.pointerId === e.pointerId && nt(y.clientX, y.clientY, M);
|
|
260
|
+
}, R = (y) => {
|
|
261
|
+
y.pointerId === e.pointerId && (t.hasPointerCapture?.(e.pointerId) && t.releasePointerCapture(e.pointerId), we(!0));
|
|
247
262
|
};
|
|
248
|
-
t.addEventListener("pointermove",
|
|
263
|
+
t.addEventListener("pointermove", ye, { signal: _.signal }), t.addEventListener("pointerup", R, {
|
|
249
264
|
once: !0,
|
|
250
|
-
signal:
|
|
251
|
-
}), t.addEventListener("pointercancel",
|
|
265
|
+
signal: _.signal
|
|
266
|
+
}), t.addEventListener("pointercancel", R, {
|
|
252
267
|
once: !0,
|
|
253
|
-
signal:
|
|
268
|
+
signal: _.signal
|
|
254
269
|
});
|
|
255
|
-
},
|
|
270
|
+
}, rt = async (e) => {
|
|
256
271
|
try {
|
|
257
272
|
const t = await r.controller.createNote({
|
|
258
273
|
topic_id: e.topicID,
|
|
@@ -260,180 +275,216 @@ function bo(r) {
|
|
|
260
275
|
y: e.worldY,
|
|
261
276
|
body: ""
|
|
262
277
|
});
|
|
263
|
-
|
|
278
|
+
S(t.note_id);
|
|
264
279
|
} catch (t) {
|
|
265
|
-
|
|
280
|
+
s.error("Create failed", h(t));
|
|
266
281
|
}
|
|
267
|
-
},
|
|
282
|
+
}, it = async (e, t) => {
|
|
268
283
|
try {
|
|
269
284
|
await r.controller.createNote({
|
|
270
285
|
topic_id: e.topicID,
|
|
271
286
|
x: e.worldX,
|
|
272
287
|
y: e.worldY,
|
|
273
288
|
body: t
|
|
274
|
-
}),
|
|
289
|
+
}), s.success("Pasted", "Created a new note from clipboard text.");
|
|
275
290
|
} catch (o) {
|
|
276
|
-
|
|
291
|
+
s.error("Paste failed", h(o));
|
|
277
292
|
}
|
|
278
|
-
},
|
|
279
|
-
|
|
280
|
-
},
|
|
293
|
+
}, ct = (e) => {
|
|
294
|
+
ce(""), Re(e);
|
|
295
|
+
}, st = async (e) => {
|
|
281
296
|
try {
|
|
282
297
|
const t = await navigator.clipboard.readText();
|
|
283
298
|
if (!t.trim()) {
|
|
284
|
-
|
|
299
|
+
s.info("Clipboard empty", "Paste text into the dialog to create a note."), ct(e);
|
|
285
300
|
return;
|
|
286
301
|
}
|
|
287
|
-
await
|
|
302
|
+
await it(e, t);
|
|
288
303
|
} catch {
|
|
289
|
-
|
|
304
|
+
s.info("Clipboard blocked", "Manual paste is available as a fallback."), ct(e);
|
|
290
305
|
}
|
|
291
|
-
},
|
|
292
|
-
|
|
293
|
-
O = void 0,
|
|
306
|
+
}, at = (e) => {
|
|
307
|
+
L(), C(e), O = window.setTimeout(() => {
|
|
308
|
+
O = void 0, C((t) => t === e ? null : t);
|
|
294
309
|
}, 1100);
|
|
295
|
-
},
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
310
|
+
}, ve = async (e) => {
|
|
311
|
+
w();
|
|
312
|
+
const t = mt(e.item.body);
|
|
313
|
+
if (!t) {
|
|
314
|
+
s.info("Nothing to copy", `Note #${e.label} has no body text.`);
|
|
315
|
+
return;
|
|
316
|
+
}
|
|
317
|
+
try {
|
|
318
|
+
await navigator.clipboard.writeText(t), at(e.item.note_id), s.success("Copied", `Note #${e.label} copied to clipboard.`);
|
|
319
|
+
} catch {
|
|
320
|
+
s.error("Copy failed", "Clipboard write was not available.");
|
|
321
|
+
}
|
|
322
|
+
}, Gt = (e) => {
|
|
323
|
+
N !== void 0 && window.clearTimeout(N), se(e), N = window.setTimeout(() => {
|
|
324
|
+
if (N = void 0, Ne(D) !== e) return;
|
|
325
|
+
se("");
|
|
326
|
+
const t = ee(e, Ne(E));
|
|
327
|
+
if (t.kind === "ready") {
|
|
328
|
+
ve(t.match);
|
|
329
|
+
return;
|
|
330
|
+
}
|
|
331
|
+
t.kind === "pending" && t.exactMatch && ve(t.exactMatch);
|
|
332
|
+
}, Lo);
|
|
333
|
+
}, lt = (e) => {
|
|
334
|
+
const t = ee(e, E());
|
|
335
|
+
return t.kind === "invalid" ? !1 : t.kind === "ready" ? (w(), ve(t.match), !0) : (Gt(e), !0);
|
|
336
|
+
}, Ut = (e) => {
|
|
337
|
+
const t = D(), o = `${t}${e}`;
|
|
338
|
+
if (!lt(t ? o : e)) {
|
|
339
|
+
if (!t || e === "0") {
|
|
340
|
+
w();
|
|
341
|
+
return;
|
|
342
|
+
}
|
|
343
|
+
lt(e) || w();
|
|
344
|
+
}
|
|
345
|
+
}, Kt = (e) => {
|
|
346
|
+
T(e);
|
|
347
|
+
}, Te = (e) => {
|
|
348
|
+
const t = Yt(e);
|
|
349
|
+
T(e), Promise.resolve(r.controller.bringNoteToFront(e)).then(() => {
|
|
350
|
+
He(e, t) && ue(e);
|
|
301
351
|
}).catch((o) => {
|
|
302
|
-
if (
|
|
303
|
-
if (
|
|
304
|
-
|
|
352
|
+
if (He(e, t)) {
|
|
353
|
+
if (ue(e), !de(e)) {
|
|
354
|
+
T((n) => n === e ? null : n);
|
|
305
355
|
return;
|
|
306
356
|
}
|
|
307
|
-
|
|
357
|
+
s.error("Bring forward failed", h(o)), T((n) => n === e ? null : n);
|
|
308
358
|
}
|
|
309
359
|
});
|
|
310
|
-
},
|
|
311
|
-
|
|
312
|
-
},
|
|
313
|
-
|
|
360
|
+
}, Zt = (e) => {
|
|
361
|
+
w(), u(null), S(e);
|
|
362
|
+
}, Qt = async (e) => {
|
|
363
|
+
w();
|
|
364
|
+
const t = mt(e.body);
|
|
314
365
|
if (!t) {
|
|
315
|
-
|
|
366
|
+
u(null), S(e.note_id);
|
|
316
367
|
return;
|
|
317
368
|
}
|
|
318
369
|
try {
|
|
319
|
-
await navigator.clipboard.writeText(t),
|
|
370
|
+
await navigator.clipboard.writeText(t), at(e.note_id);
|
|
320
371
|
} catch {
|
|
321
|
-
|
|
372
|
+
s.error("Copy failed", "Clipboard write was not available.");
|
|
322
373
|
}
|
|
323
|
-
},
|
|
374
|
+
}, dt = async (e) => {
|
|
324
375
|
try {
|
|
325
|
-
|
|
376
|
+
fe(e), await r.controller.deleteNote(e), L(), C((t) => t === e ? null : t), me();
|
|
326
377
|
} catch (t) {
|
|
327
|
-
|
|
378
|
+
s.error("Delete failed", h(t));
|
|
328
379
|
}
|
|
329
|
-
},
|
|
380
|
+
}, Jt = async (e) => {
|
|
330
381
|
try {
|
|
331
|
-
|
|
382
|
+
H(e), await r.controller.restoreNote(e);
|
|
332
383
|
} catch (t) {
|
|
333
|
-
|
|
384
|
+
s.error("Restore failed", h(t));
|
|
334
385
|
}
|
|
335
|
-
},
|
|
386
|
+
}, eo = async (e) => {
|
|
336
387
|
if (r.controller.deleteTrashedNotePermanently)
|
|
337
388
|
try {
|
|
338
|
-
|
|
389
|
+
H(e), await r.controller.deleteTrashedNotePermanently(e);
|
|
339
390
|
} catch (t) {
|
|
340
|
-
|
|
391
|
+
s.error("Delete failed", h(t));
|
|
341
392
|
}
|
|
342
|
-
},
|
|
393
|
+
}, to = async (e) => {
|
|
343
394
|
try {
|
|
344
395
|
await r.controller.clearTrashTopic(e);
|
|
345
396
|
} catch (t) {
|
|
346
|
-
|
|
397
|
+
s.error("Trash failed", h(t));
|
|
347
398
|
}
|
|
348
|
-
},
|
|
349
|
-
const e =
|
|
399
|
+
}, oo = async () => {
|
|
400
|
+
const e = V();
|
|
350
401
|
if (e)
|
|
351
402
|
try {
|
|
352
403
|
await r.controller.updateNote(e, {
|
|
353
|
-
headline:
|
|
354
|
-
title:
|
|
355
|
-
body:
|
|
356
|
-
color_token:
|
|
357
|
-
}),
|
|
404
|
+
headline: ne(),
|
|
405
|
+
title: ne(),
|
|
406
|
+
body: De(),
|
|
407
|
+
color_token: Oe()
|
|
408
|
+
}), s.success("Saved", "Note updated."), U();
|
|
358
409
|
} catch (t) {
|
|
359
|
-
|
|
410
|
+
s.error("Save failed", h(t));
|
|
360
411
|
}
|
|
361
|
-
},
|
|
362
|
-
const e =
|
|
363
|
-
!e || !
|
|
364
|
-
},
|
|
365
|
-
const e =
|
|
412
|
+
}, no = async () => {
|
|
413
|
+
const e = j();
|
|
414
|
+
!e || !ie().trim() || (await it(e, ie()), G());
|
|
415
|
+
}, ro = async () => {
|
|
416
|
+
const e = Me().trim();
|
|
366
417
|
if (e)
|
|
367
418
|
try {
|
|
368
419
|
const t = await r.controller.createTopic({ name: e });
|
|
369
|
-
|
|
420
|
+
_e(""), Q(t.topic_id);
|
|
370
421
|
} catch (t) {
|
|
371
|
-
|
|
422
|
+
s.error("Topic failed", h(t));
|
|
372
423
|
}
|
|
373
|
-
},
|
|
374
|
-
|
|
375
|
-
},
|
|
376
|
-
const e =
|
|
424
|
+
}, io = (e) => {
|
|
425
|
+
Pe(e.topic_id), oe(e.name);
|
|
426
|
+
}, co = async () => {
|
|
427
|
+
const e = B();
|
|
377
428
|
if (!e) return;
|
|
378
|
-
const t =
|
|
379
|
-
if (
|
|
429
|
+
const t = Ie().trim();
|
|
430
|
+
if (Z(), !!t)
|
|
380
431
|
try {
|
|
381
432
|
await r.controller.updateTopic(e, { name: t });
|
|
382
433
|
} catch (o) {
|
|
383
|
-
|
|
434
|
+
s.error("Rename failed", h(o));
|
|
384
435
|
}
|
|
385
|
-
},
|
|
386
|
-
const t =
|
|
387
|
-
|
|
436
|
+
}, so = async (e) => {
|
|
437
|
+
const t = Ze(e.topic_id) + _o(d().trash_items, e.topic_id);
|
|
438
|
+
B() === e.topic_id && Z();
|
|
388
439
|
try {
|
|
389
|
-
if (
|
|
390
|
-
|
|
440
|
+
if (zt(e.topic_id), await r.controller.deleteTopic(e.topic_id) === !1) {
|
|
441
|
+
s.info("Keep one topic", "At least one topic needs to remain available.");
|
|
391
442
|
return;
|
|
392
443
|
}
|
|
393
444
|
if (t > 0) {
|
|
394
|
-
|
|
445
|
+
me(), s.success("Topic deleted", "Live notes moved into trash for this topic.");
|
|
395
446
|
return;
|
|
396
447
|
}
|
|
397
|
-
|
|
448
|
+
s.success("Topic deleted", "The empty topic was removed.");
|
|
398
449
|
} catch (o) {
|
|
399
|
-
|
|
450
|
+
s.error("Delete failed", h(o));
|
|
400
451
|
}
|
|
401
|
-
},
|
|
402
|
-
const o =
|
|
403
|
-
|
|
452
|
+
}, ao = async (e, t) => {
|
|
453
|
+
const o = Rt(e);
|
|
454
|
+
Ue(e, t);
|
|
404
455
|
try {
|
|
405
456
|
await r.controller.updateNote(e, {
|
|
406
457
|
x: t.x,
|
|
407
458
|
y: t.y
|
|
408
459
|
});
|
|
409
460
|
} catch (n) {
|
|
410
|
-
if (!
|
|
411
|
-
|
|
461
|
+
if (!Ge(e, o) || (pe(e), H(e), !de(e))) return;
|
|
462
|
+
s.error("Move failed", h(n));
|
|
412
463
|
return;
|
|
413
464
|
}
|
|
414
|
-
|
|
415
|
-
},
|
|
416
|
-
const e =
|
|
465
|
+
Ge(e, o) && pe(e);
|
|
466
|
+
}, ge = c(() => {
|
|
467
|
+
const e = v();
|
|
417
468
|
if (!e) return [];
|
|
418
469
|
const t = [
|
|
419
470
|
{
|
|
420
471
|
id: "paste",
|
|
421
472
|
kind: "action",
|
|
422
473
|
label: "Paste here",
|
|
423
|
-
icon:
|
|
474
|
+
icon: vo,
|
|
424
475
|
onSelect: () => {
|
|
425
|
-
const o =
|
|
426
|
-
o && (
|
|
476
|
+
const o = v();
|
|
477
|
+
o && (u(null), st(o));
|
|
427
478
|
}
|
|
428
479
|
},
|
|
429
480
|
{
|
|
430
481
|
id: "new",
|
|
431
482
|
kind: "action",
|
|
432
483
|
label: "New note",
|
|
433
|
-
icon:
|
|
484
|
+
icon: To,
|
|
434
485
|
onSelect: () => {
|
|
435
|
-
const o =
|
|
436
|
-
o && (
|
|
486
|
+
const o = v();
|
|
487
|
+
o && (u(null), rt(o));
|
|
437
488
|
}
|
|
438
489
|
}
|
|
439
490
|
];
|
|
@@ -441,225 +492,239 @@ function bo(r) {
|
|
|
441
492
|
id: "delete",
|
|
442
493
|
kind: "action",
|
|
443
494
|
label: "Delete",
|
|
444
|
-
icon:
|
|
495
|
+
icon: go,
|
|
445
496
|
destructive: !0,
|
|
446
497
|
onSelect: () => {
|
|
447
|
-
const o =
|
|
448
|
-
o?.noteID && (
|
|
498
|
+
const o = v();
|
|
499
|
+
o?.noteID && (u(null), dt(o.noteID));
|
|
449
500
|
}
|
|
450
501
|
})), t;
|
|
451
|
-
}),
|
|
452
|
-
const e =
|
|
502
|
+
}), lo = c(() => {
|
|
503
|
+
const e = v();
|
|
453
504
|
if (!e) return;
|
|
454
|
-
const t =
|
|
455
|
-
return
|
|
505
|
+
const t = ge().filter((n) => n.kind === "action").length, o = ge().filter((n) => n.kind === "separator").length;
|
|
506
|
+
return Co({
|
|
456
507
|
clientX: e.clientX,
|
|
457
508
|
clientY: e.clientY,
|
|
458
|
-
menuWidth:
|
|
459
|
-
menuHeight:
|
|
509
|
+
menuWidth: yo,
|
|
510
|
+
menuHeight: No(t, o)
|
|
460
511
|
});
|
|
461
|
-
}),
|
|
462
|
-
const t =
|
|
463
|
-
t &&
|
|
512
|
+
}), uo = (e) => {
|
|
513
|
+
const t = X();
|
|
514
|
+
t && u({
|
|
464
515
|
clientX: e.clientX,
|
|
465
516
|
clientY: e.clientY,
|
|
466
517
|
worldX: e.worldX,
|
|
467
518
|
worldY: e.worldY,
|
|
468
519
|
topicID: t.topic_id
|
|
469
520
|
});
|
|
470
|
-
},
|
|
471
|
-
|
|
521
|
+
}, po = (e, t) => {
|
|
522
|
+
Te(t.note_id), Je(e.clientX, e.clientY, {
|
|
472
523
|
topicID: t.topic_id,
|
|
473
524
|
noteID: t.note_id
|
|
474
525
|
});
|
|
475
|
-
},
|
|
476
|
-
|
|
477
|
-
},
|
|
478
|
-
e.preventDefault(), e.stopPropagation(),
|
|
526
|
+
}, fo = (e) => {
|
|
527
|
+
K(), Je(e.clientX, e.clientY);
|
|
528
|
+
}, mo = (e) => {
|
|
529
|
+
e.preventDefault(), e.stopPropagation(), qt(e.clientX, e.clientY);
|
|
479
530
|
};
|
|
480
|
-
|
|
481
|
-
const e = new Set(
|
|
482
|
-
for (const t of
|
|
483
|
-
e.has(t) ||
|
|
484
|
-
|
|
485
|
-
}),
|
|
486
|
-
const e =
|
|
487
|
-
e?.noteID && (
|
|
488
|
-
}),
|
|
489
|
-
r.open || (
|
|
531
|
+
p(() => {
|
|
532
|
+
const e = new Set(d().items.map((t) => t.note_id));
|
|
533
|
+
for (const t of te)
|
|
534
|
+
e.has(t) || Ft(t);
|
|
535
|
+
te = e;
|
|
536
|
+
}), p(() => {
|
|
537
|
+
const e = v();
|
|
538
|
+
e?.noteID && (de(e.noteID) || u(null));
|
|
539
|
+
}), p(() => {
|
|
540
|
+
r.open || (te = /* @__PURE__ */ new Set());
|
|
490
541
|
});
|
|
491
|
-
const
|
|
492
|
-
const e =
|
|
493
|
-
e && (
|
|
494
|
-
},
|
|
495
|
-
const e =
|
|
496
|
-
e && (
|
|
542
|
+
const ho = async () => {
|
|
543
|
+
const e = Qe();
|
|
544
|
+
e && (Y(), await rt(e));
|
|
545
|
+
}, wo = async () => {
|
|
546
|
+
const e = Qe();
|
|
547
|
+
e && (Y(), await st(e));
|
|
497
548
|
};
|
|
498
|
-
return
|
|
499
|
-
r.open || (
|
|
500
|
-
}),
|
|
501
|
-
const e =
|
|
502
|
-
e && r.controller.activeTopicID() !== e &&
|
|
503
|
-
}),
|
|
504
|
-
const e =
|
|
549
|
+
return p(() => {
|
|
550
|
+
r.open || (Bt(), Z(), k(null), T(null), C(null));
|
|
551
|
+
}), p(() => {
|
|
552
|
+
const e = b();
|
|
553
|
+
e && r.controller.activeTopicID() !== e && Q(e);
|
|
554
|
+
}), p(() => {
|
|
555
|
+
const e = $e();
|
|
505
556
|
if (!e) {
|
|
506
|
-
|
|
557
|
+
le = null;
|
|
507
558
|
return;
|
|
508
559
|
}
|
|
509
|
-
|
|
510
|
-
}),
|
|
511
|
-
const e =
|
|
560
|
+
le !== e.note_id && (le = e.note_id, Se(e.title), ke(e.body), Xe(e.color_token));
|
|
561
|
+
}), p(() => {
|
|
562
|
+
const e = ze();
|
|
512
563
|
if (!e) return;
|
|
513
|
-
const t =
|
|
564
|
+
const t = d().items.find((n) => n.note_id === e);
|
|
514
565
|
if (!t) {
|
|
515
|
-
|
|
566
|
+
T(null);
|
|
516
567
|
return;
|
|
517
568
|
}
|
|
518
|
-
const o =
|
|
569
|
+
const o = d().items.reduce(
|
|
519
570
|
(n, i) => Math.max(n, i.z_index),
|
|
520
571
|
0
|
|
521
572
|
);
|
|
522
|
-
t.z_index >= o &&
|
|
523
|
-
}),
|
|
524
|
-
|
|
573
|
+
t.z_index >= o && T(null);
|
|
574
|
+
}), p(() => {
|
|
575
|
+
r.open || (L(), w(), C(null));
|
|
576
|
+
}), p(() => {
|
|
577
|
+
D() && We() && w();
|
|
578
|
+
}), p(() => {
|
|
579
|
+
const e = D();
|
|
580
|
+
e && ee(e, E()).kind === "invalid" && w();
|
|
581
|
+
}), p(() => {
|
|
582
|
+
const e = d().items, t = Be();
|
|
525
583
|
if (t.size === 0) return;
|
|
526
584
|
let o = null;
|
|
527
585
|
for (const [n, i] of t) {
|
|
528
|
-
const
|
|
529
|
-
(!
|
|
586
|
+
const l = e.find((f) => f.note_id === n);
|
|
587
|
+
(!l || xe({ x: l.x, y: l.y }, i)) && (o ??= new Map(t), o.delete(n));
|
|
530
588
|
}
|
|
531
|
-
o &&
|
|
532
|
-
}),
|
|
589
|
+
o && $(o);
|
|
590
|
+
}), p(() => {
|
|
533
591
|
if (!r.open) return;
|
|
534
592
|
const e = () => {
|
|
535
|
-
|
|
593
|
+
xt(window.innerWidth < Mo);
|
|
536
594
|
};
|
|
537
|
-
e(), window.addEventListener("resize", e),
|
|
538
|
-
}),
|
|
539
|
-
const e =
|
|
595
|
+
e(), window.addEventListener("resize", e), z(() => window.removeEventListener("resize", e));
|
|
596
|
+
}), p(() => {
|
|
597
|
+
const e = Ce();
|
|
540
598
|
if (!e) return;
|
|
541
599
|
const t = () => {
|
|
542
|
-
|
|
600
|
+
vt({
|
|
543
601
|
width: e.clientWidth,
|
|
544
602
|
height: e.clientHeight
|
|
545
603
|
});
|
|
546
604
|
};
|
|
547
605
|
if (t(), typeof ResizeObserver > "u") {
|
|
548
|
-
window.addEventListener("resize", t),
|
|
606
|
+
window.addEventListener("resize", t), z(() => window.removeEventListener("resize", t));
|
|
549
607
|
return;
|
|
550
608
|
}
|
|
551
609
|
const o = new ResizeObserver(t);
|
|
552
|
-
o.observe(e),
|
|
553
|
-
}),
|
|
610
|
+
o.observe(e), z(() => o.disconnect());
|
|
611
|
+
}), p(() => {
|
|
554
612
|
if (!r.open) return;
|
|
555
|
-
const e = window.setInterval(() =>
|
|
556
|
-
|
|
557
|
-
}),
|
|
558
|
-
|
|
559
|
-
}),
|
|
560
|
-
|
|
613
|
+
const e = window.setInterval(() => yt(Date.now()), 60 * 1e3);
|
|
614
|
+
z(() => window.clearInterval(e));
|
|
615
|
+
}), p(() => {
|
|
616
|
+
b() && u(null);
|
|
617
|
+
}), z(() => {
|
|
618
|
+
L(), w(), we(!1);
|
|
561
619
|
}), {
|
|
562
620
|
header: {
|
|
563
|
-
topicCount:
|
|
564
|
-
totalLiveNotes:
|
|
565
|
-
trashCount:
|
|
621
|
+
topicCount: Ct,
|
|
622
|
+
totalLiveNotes: It,
|
|
623
|
+
trashCount: Ve
|
|
566
624
|
},
|
|
567
625
|
rail: {
|
|
568
|
-
topics:
|
|
569
|
-
activeTopicID:
|
|
570
|
-
draftTopicTitle:
|
|
571
|
-
renamingTopicID:
|
|
572
|
-
renamingTopicTitle:
|
|
573
|
-
getLiveNoteCount:
|
|
574
|
-
setDraftTopicTitle:
|
|
575
|
-
submitTopic:
|
|
576
|
-
selectTopic:
|
|
577
|
-
startTopicRename:
|
|
578
|
-
setRenamingTopicTitle:
|
|
579
|
-
saveTopicRename:
|
|
580
|
-
cancelTopicRename:
|
|
581
|
-
deleteTopic:
|
|
626
|
+
topics: x,
|
|
627
|
+
activeTopicID: b,
|
|
628
|
+
draftTopicTitle: Me,
|
|
629
|
+
renamingTopicID: B,
|
|
630
|
+
renamingTopicTitle: Ie,
|
|
631
|
+
getLiveNoteCount: Ze,
|
|
632
|
+
setDraftTopicTitle: _e,
|
|
633
|
+
submitTopic: ro,
|
|
634
|
+
selectTopic: Q,
|
|
635
|
+
startTopicRename: io,
|
|
636
|
+
setRenamingTopicTitle: oe,
|
|
637
|
+
saveTopicRename: co,
|
|
638
|
+
cancelTopicRename: Z,
|
|
639
|
+
deleteTopic: so
|
|
582
640
|
},
|
|
583
641
|
board: {
|
|
584
|
-
activeTopic:
|
|
585
|
-
activeTopicLabel:
|
|
586
|
-
activeItems:
|
|
587
|
-
activeTopicID:
|
|
588
|
-
topics:
|
|
589
|
-
topZIndex:
|
|
590
|
-
viewport:
|
|
591
|
-
boardScaleLabel:
|
|
592
|
-
isMobile:
|
|
593
|
-
overviewOpen:
|
|
594
|
-
optimisticFrontNoteID:
|
|
595
|
-
copiedNoteID:
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
642
|
+
activeTopic: X,
|
|
643
|
+
activeTopicLabel: Dt,
|
|
644
|
+
activeItems: W,
|
|
645
|
+
activeTopicID: b,
|
|
646
|
+
topics: x,
|
|
647
|
+
topZIndex: St,
|
|
648
|
+
viewport: g,
|
|
649
|
+
boardScaleLabel: kt,
|
|
650
|
+
isMobile: Nt,
|
|
651
|
+
overviewOpen: Le,
|
|
652
|
+
optimisticFrontNoteID: ze,
|
|
653
|
+
copiedNoteID: Tt,
|
|
654
|
+
noteNumberByID: _t,
|
|
655
|
+
pendingShortcutNoteID: Lt,
|
|
656
|
+
setCanvasFrameRef: wt,
|
|
657
|
+
commitViewport: et,
|
|
658
|
+
openCanvasContextMenu: uo,
|
|
659
|
+
zoomOut: () => ot("out"),
|
|
660
|
+
zoomIn: () => ot("in"),
|
|
661
|
+
openOverview: Ke,
|
|
662
|
+
selectTopic: Q,
|
|
663
|
+
mobileCreateNote: ho,
|
|
664
|
+
mobilePaste: wo,
|
|
665
|
+
seedMoveProjection: Ue,
|
|
666
|
+
copyNote: Qt,
|
|
667
|
+
openNoteContextMenu: po,
|
|
668
|
+
openEditor: Zt,
|
|
669
|
+
moveToTrash: dt,
|
|
670
|
+
startOptimisticFront: Kt,
|
|
671
|
+
commitFront: Te,
|
|
672
|
+
commitMove: ao
|
|
613
673
|
},
|
|
614
674
|
overview: {
|
|
615
|
-
items:
|
|
616
|
-
viewportStyle:
|
|
617
|
-
navigationState:
|
|
618
|
-
beginNavigation:
|
|
619
|
-
close:
|
|
620
|
-
open:
|
|
675
|
+
items: Xt,
|
|
676
|
+
viewportStyle: Et,
|
|
677
|
+
navigationState: bt,
|
|
678
|
+
beginNavigation: Ht,
|
|
679
|
+
close: Y,
|
|
680
|
+
open: Ke
|
|
621
681
|
},
|
|
622
682
|
trash: {
|
|
623
|
-
open:
|
|
624
|
-
groups:
|
|
625
|
-
count:
|
|
626
|
-
now:
|
|
683
|
+
open: re,
|
|
684
|
+
groups: Pt,
|
|
685
|
+
count: Ve,
|
|
686
|
+
now: gt,
|
|
627
687
|
canDeleteNow: !!r.controller.deleteTrashedNotePermanently,
|
|
628
|
-
close:
|
|
629
|
-
openDock:
|
|
630
|
-
backdropContextMenu:
|
|
631
|
-
restore:
|
|
632
|
-
deleteNow:
|
|
633
|
-
clearTopic:
|
|
688
|
+
close: K,
|
|
689
|
+
openDock: me,
|
|
690
|
+
backdropContextMenu: fo,
|
|
691
|
+
restore: Jt,
|
|
692
|
+
deleteNow: eo,
|
|
693
|
+
clearTopic: to
|
|
634
694
|
},
|
|
635
695
|
contextMenu: {
|
|
636
|
-
state:
|
|
637
|
-
items:
|
|
638
|
-
position:
|
|
639
|
-
close: () =>
|
|
640
|
-
retarget:
|
|
696
|
+
state: v,
|
|
697
|
+
items: ge,
|
|
698
|
+
position: lo,
|
|
699
|
+
close: () => u(null),
|
|
700
|
+
retarget: mo
|
|
641
701
|
},
|
|
642
702
|
editor: {
|
|
643
|
-
note:
|
|
644
|
-
draftTitle:
|
|
645
|
-
draftBody:
|
|
646
|
-
draftColor:
|
|
647
|
-
setDraftTitle:
|
|
648
|
-
setDraftBody:
|
|
649
|
-
setDraftColor:
|
|
650
|
-
close:
|
|
651
|
-
save:
|
|
703
|
+
note: $e,
|
|
704
|
+
draftTitle: ne,
|
|
705
|
+
draftBody: De,
|
|
706
|
+
draftColor: Oe,
|
|
707
|
+
setDraftTitle: Se,
|
|
708
|
+
setDraftBody: ke,
|
|
709
|
+
setDraftColor: Xe,
|
|
710
|
+
close: U,
|
|
711
|
+
save: oo
|
|
652
712
|
},
|
|
653
713
|
manualPaste: {
|
|
654
|
-
open: () => !!
|
|
655
|
-
text:
|
|
656
|
-
setText:
|
|
657
|
-
close:
|
|
658
|
-
confirm:
|
|
714
|
+
open: () => !!j(),
|
|
715
|
+
text: ie,
|
|
716
|
+
setText: ce,
|
|
717
|
+
close: G,
|
|
718
|
+
confirm: no
|
|
719
|
+
},
|
|
720
|
+
shortcuts: {
|
|
721
|
+
blocked: We,
|
|
722
|
+
handleDigitShortcut: Ut,
|
|
723
|
+
clearPendingDigitState: w
|
|
659
724
|
},
|
|
660
|
-
handleCloseRequest:
|
|
725
|
+
handleCloseRequest: Vt
|
|
661
726
|
};
|
|
662
727
|
}
|
|
663
728
|
export {
|
|
664
|
-
|
|
729
|
+
jo as useNotesOverlayModel
|
|
665
730
|
};
|