@floegence/floe-webapp-core 0.35.43 → 0.35.44
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/NotesOverlay.js +165 -145
- package/package.json +1 -1
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { createComponent as o, insert as a, addEventListener as
|
|
1
|
+
import { createComponent as o, insert as a, addEventListener as m, effect as f, setAttribute as S, Portal as u, memo as $, template as c, delegateEvents as k } from "solid-js/web";
|
|
2
2
|
import { Show as s } from "solid-js";
|
|
3
|
-
import { Motion as
|
|
4
|
-
import { easing as
|
|
5
|
-
import { useOverlayMask as
|
|
6
|
-
import { X as
|
|
7
|
-
import { NotesBoard as
|
|
8
|
-
import { NotesContextMenu as
|
|
9
|
-
import { NotesEditorFlyout as
|
|
10
|
-
import { NotesOverviewPanel as
|
|
11
|
-
import { NotesTopicRail as
|
|
3
|
+
import { Motion as _ } from "../../node_modules/.pnpm/solid-motionone@1.0.4_solid-js@1.9.11/node_modules/solid-motionone/dist/index.js";
|
|
4
|
+
import { easing as O, duration as T } from "../../utils/animations.js";
|
|
5
|
+
import { useOverlayMask as x } from "../../hooks/useOverlayMask.js";
|
|
6
|
+
import { X as D } from "../icons/index.js";
|
|
7
|
+
import { NotesBoard as I } from "./NotesBoard.js";
|
|
8
|
+
import { NotesContextMenu as F } from "./NotesContextMenu.js";
|
|
9
|
+
import { NotesEditorFlyout as R, NotesManualPasteFlyout as L } from "./NotesEditorFlyout.js";
|
|
10
|
+
import { NotesOverviewPanel as C } from "./NotesOverviewPanel.js";
|
|
11
|
+
import { NotesTopicRail as P } from "./NotesTopicRail.js";
|
|
12
12
|
import { NotesTrashFlyout as B } from "./NotesTrashFlyout.js";
|
|
13
|
-
import { NotesTrashCanIcon as
|
|
14
|
-
import { useNotesOverlayModel as
|
|
15
|
-
var
|
|
16
|
-
function
|
|
13
|
+
import { NotesTrashCanIcon as E } from "./notesAppearance.js";
|
|
14
|
+
import { useNotesOverlayModel as Z } from "./useNotesOverlayModel.js";
|
|
15
|
+
var z = /* @__PURE__ */ c('<header class=notes-overlay__header data-floe-canvas-interactive=true><div class=notes-overlay__header-brand><div class=notes-overlay__header-title>Notes</div><div class=notes-overlay__header-separator></div><div class=notes-overlay__header-stat> topics</div><div class=notes-overlay__header-stat> live note</div><div class=notes-overlay__header-stat> trash</div></div><div class=notes-overlay__header-actions><button type=button class=notes-overlay__close aria-label="Close notes overlay"data-floe-overlay-close=true>'), W = /* @__PURE__ */ c("<button type=button class=notes-trash__toggle><div class=notes-trash__toggle-mark>"), q = /* @__PURE__ */ c("<div class=notes-overlay__body><div class=notes-trash data-floe-canvas-interactive=true>"), V = /* @__PURE__ */ c("<div class=notes-overview-backdrop>"), A = /* @__PURE__ */ c("<div class=notes-overview-flyout>"), H = /* @__PURE__ */ c("<div class=notes-menu-backdrop>");
|
|
16
|
+
function X(l) {
|
|
17
17
|
return l === "floating" ? {
|
|
18
18
|
mode: l,
|
|
19
19
|
ariaModal: void 0,
|
|
@@ -36,13 +36,13 @@ function H(l) {
|
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
}
|
|
39
|
-
function
|
|
40
|
-
const e =
|
|
41
|
-
let
|
|
42
|
-
const i = () =>
|
|
43
|
-
return
|
|
39
|
+
function le(l) {
|
|
40
|
+
const e = Z(l);
|
|
41
|
+
let v;
|
|
42
|
+
const i = () => X(l.interactionMode);
|
|
43
|
+
return x({
|
|
44
44
|
open: () => l.open,
|
|
45
|
-
root: () =>
|
|
45
|
+
root: () => v,
|
|
46
46
|
onClose: () => e.handleCloseRequest(),
|
|
47
47
|
lockBodyScroll: i().lockBodyScroll,
|
|
48
48
|
trapFocus: i().trapFocus,
|
|
@@ -57,10 +57,10 @@ function ie(l) {
|
|
|
57
57
|
return l.open;
|
|
58
58
|
},
|
|
59
59
|
get children() {
|
|
60
|
-
return o(
|
|
60
|
+
return o(_.section, {
|
|
61
61
|
ref(t) {
|
|
62
|
-
var n =
|
|
63
|
-
typeof n == "function" ? n(t) :
|
|
62
|
+
var n = v;
|
|
63
|
+
typeof n == "function" ? n(t) : v = t;
|
|
64
64
|
},
|
|
65
65
|
class: "notes-overlay",
|
|
66
66
|
role: "dialog",
|
|
@@ -80,11 +80,11 @@ function ie(l) {
|
|
|
80
80
|
},
|
|
81
81
|
get transition() {
|
|
82
82
|
return {
|
|
83
|
-
duration:
|
|
83
|
+
duration: T.fast
|
|
84
84
|
};
|
|
85
85
|
},
|
|
86
86
|
get children() {
|
|
87
|
-
return [o(
|
|
87
|
+
return [o(_.div, {
|
|
88
88
|
class: "notes-overlay__frame",
|
|
89
89
|
initial: {
|
|
90
90
|
opacity: 0,
|
|
@@ -98,19 +98,19 @@ function ie(l) {
|
|
|
98
98
|
},
|
|
99
99
|
get transition() {
|
|
100
100
|
return {
|
|
101
|
-
duration:
|
|
102
|
-
easing:
|
|
101
|
+
duration: T.normal,
|
|
102
|
+
easing: O.easeOut
|
|
103
103
|
};
|
|
104
104
|
},
|
|
105
105
|
get children() {
|
|
106
106
|
return [(() => {
|
|
107
|
-
var t =
|
|
108
|
-
return a(
|
|
107
|
+
var t = z(), n = t.firstChild, r = n.firstChild, g = r.nextSibling, p = g.nextSibling, y = p.firstChild, d = p.nextSibling, w = d.firstChild, b = d.nextSibling, M = b.firstChild, N = n.nextSibling, h = N.firstChild;
|
|
108
|
+
return a(p, () => e.header.topicCount(), y), a(d, () => e.header.totalLiveNotes(), w), a(d, () => e.header.totalLiveNotes() === 1 ? "" : "s", null), a(b, () => e.header.trashCount(), M), h.$$click = () => e.handleCloseRequest(), a(h, o(D, {
|
|
109
109
|
class: "w-4 h-4"
|
|
110
110
|
})), t;
|
|
111
111
|
})(), (() => {
|
|
112
|
-
var t =
|
|
113
|
-
return a(t, o(
|
|
112
|
+
var t = q(), n = t.firstChild;
|
|
113
|
+
return a(t, o(P, {
|
|
114
114
|
get topics() {
|
|
115
115
|
return e.rail.topics();
|
|
116
116
|
},
|
|
@@ -153,7 +153,7 @@ function ie(l) {
|
|
|
153
153
|
onDeleteTopic: (r) => {
|
|
154
154
|
e.rail.deleteTopic(r);
|
|
155
155
|
}
|
|
156
|
-
}), n), a(t, o(
|
|
156
|
+
}), n), a(t, o(I, {
|
|
157
157
|
get activeTopic() {
|
|
158
158
|
return e.board.activeTopic();
|
|
159
159
|
},
|
|
@@ -243,7 +243,7 @@ function ie(l) {
|
|
|
243
243
|
return !e.board.isMobile();
|
|
244
244
|
},
|
|
245
245
|
get children() {
|
|
246
|
-
return o(
|
|
246
|
+
return o(C, {
|
|
247
247
|
mode: "desktop",
|
|
248
248
|
get items() {
|
|
249
249
|
return e.overview.items();
|
|
@@ -273,153 +273,173 @@ function ie(l) {
|
|
|
273
273
|
return !e.trash.open();
|
|
274
274
|
},
|
|
275
275
|
get children() {
|
|
276
|
-
var r =
|
|
277
|
-
return
|
|
276
|
+
var r = W(), g = r.firstChild;
|
|
277
|
+
return m(r, "click", e.trash.openDock, !0), a(g, o(E, {
|
|
278
278
|
class: "notes-trash__toggle-icon"
|
|
279
|
-
})),
|
|
279
|
+
})), f(() => S(r, "aria-label", `Open trash dock${e.trash.count() > 0 ? `, ${e.trash.count()} items` : ""}`)), r;
|
|
280
280
|
}
|
|
281
|
-
})),
|
|
281
|
+
})), f(() => n.classList.toggle("is-open", !!e.trash.open())), t;
|
|
282
282
|
})()];
|
|
283
283
|
}
|
|
284
284
|
}), o(s, {
|
|
285
285
|
get when() {
|
|
286
|
-
return
|
|
286
|
+
return $(() => !!e.board.isMobile())() && e.board.overviewOpen();
|
|
287
287
|
},
|
|
288
288
|
get children() {
|
|
289
|
-
return
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
289
|
+
return o(u, {
|
|
290
|
+
get children() {
|
|
291
|
+
return [(() => {
|
|
292
|
+
var t = V();
|
|
293
|
+
return m(t, "click", e.overview.close, !0), t;
|
|
294
|
+
})(), (() => {
|
|
295
|
+
var t = A();
|
|
296
|
+
return a(t, o(C, {
|
|
297
|
+
mode: "mobile",
|
|
298
|
+
get items() {
|
|
299
|
+
return e.overview.items();
|
|
300
|
+
},
|
|
301
|
+
get boardScaleLabel() {
|
|
302
|
+
return e.board.boardScaleLabel();
|
|
303
|
+
},
|
|
304
|
+
get viewportStyle() {
|
|
305
|
+
return e.overview.viewportStyle();
|
|
306
|
+
},
|
|
307
|
+
get navigationState() {
|
|
308
|
+
return e.overview.navigationState();
|
|
309
|
+
},
|
|
310
|
+
get onPointerDown() {
|
|
311
|
+
return e.overview.beginNavigation;
|
|
312
|
+
},
|
|
313
|
+
get onZoomOut() {
|
|
314
|
+
return e.board.zoomOut;
|
|
315
|
+
},
|
|
316
|
+
get onZoomIn() {
|
|
317
|
+
return e.board.zoomIn;
|
|
318
|
+
},
|
|
319
|
+
get onClose() {
|
|
320
|
+
return e.overview.close;
|
|
321
|
+
}
|
|
322
|
+
})), t;
|
|
323
|
+
})()];
|
|
324
|
+
}
|
|
325
|
+
});
|
|
322
326
|
}
|
|
323
|
-
}), o(
|
|
324
|
-
get
|
|
325
|
-
return
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
327
|
+
}), o(u, {
|
|
328
|
+
get children() {
|
|
329
|
+
return o(B, {
|
|
330
|
+
get open() {
|
|
331
|
+
return e.trash.open();
|
|
332
|
+
},
|
|
333
|
+
get groups() {
|
|
334
|
+
return e.trash.groups();
|
|
335
|
+
},
|
|
336
|
+
get now() {
|
|
337
|
+
return e.trash.now();
|
|
338
|
+
},
|
|
339
|
+
get canDeleteNow() {
|
|
340
|
+
return e.trash.canDeleteNow;
|
|
341
|
+
},
|
|
342
|
+
get onClose() {
|
|
343
|
+
return e.trash.close;
|
|
344
|
+
},
|
|
345
|
+
get onBackdropContextMenu() {
|
|
346
|
+
return e.trash.backdropContextMenu;
|
|
347
|
+
},
|
|
348
|
+
onRestore: (t) => {
|
|
349
|
+
e.trash.restore(t);
|
|
350
|
+
},
|
|
351
|
+
onDeleteNow: (t) => {
|
|
352
|
+
e.trash.deleteNow(t);
|
|
353
|
+
},
|
|
354
|
+
onClearTopicTrash: (t) => {
|
|
355
|
+
e.trash.clearTopic(t);
|
|
356
|
+
}
|
|
357
|
+
});
|
|
350
358
|
}
|
|
351
359
|
}), o(s, {
|
|
352
360
|
get when() {
|
|
353
361
|
return e.contextMenu.state();
|
|
354
362
|
},
|
|
355
363
|
get children() {
|
|
356
|
-
return
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
364
|
+
return o(u, {
|
|
365
|
+
get children() {
|
|
366
|
+
return [(() => {
|
|
367
|
+
var t = H();
|
|
368
|
+
return m(t, "click", e.contextMenu.close, !0), t;
|
|
369
|
+
})(), o(F, {
|
|
370
|
+
get x() {
|
|
371
|
+
return e.contextMenu.position()?.left ?? 0;
|
|
372
|
+
},
|
|
373
|
+
get y() {
|
|
374
|
+
return e.contextMenu.position()?.top ?? 0;
|
|
375
|
+
},
|
|
376
|
+
get items() {
|
|
377
|
+
return e.contextMenu.items();
|
|
378
|
+
}
|
|
379
|
+
})];
|
|
368
380
|
}
|
|
369
|
-
})
|
|
381
|
+
});
|
|
370
382
|
}
|
|
371
383
|
}), o(s, {
|
|
372
384
|
get when() {
|
|
373
385
|
return !!e.editor.note();
|
|
374
386
|
},
|
|
375
387
|
get children() {
|
|
376
|
-
return o(
|
|
377
|
-
get
|
|
378
|
-
return
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
388
|
+
return o(u, {
|
|
389
|
+
get children() {
|
|
390
|
+
return o(R, {
|
|
391
|
+
get note() {
|
|
392
|
+
return e.editor.note();
|
|
393
|
+
},
|
|
394
|
+
get draftBody() {
|
|
395
|
+
return e.editor.draftBody();
|
|
396
|
+
},
|
|
397
|
+
get draftColor() {
|
|
398
|
+
return e.editor.draftColor();
|
|
399
|
+
},
|
|
400
|
+
get onDraftBodyChange() {
|
|
401
|
+
return e.editor.setDraftBody;
|
|
402
|
+
},
|
|
403
|
+
get onDraftColorChange() {
|
|
404
|
+
return e.editor.setDraftColor;
|
|
405
|
+
},
|
|
406
|
+
get onClose() {
|
|
407
|
+
return e.editor.close;
|
|
408
|
+
},
|
|
409
|
+
onSave: () => {
|
|
410
|
+
e.editor.save();
|
|
411
|
+
}
|
|
412
|
+
});
|
|
413
|
+
}
|
|
414
|
+
});
|
|
415
|
+
}
|
|
416
|
+
}), o(u, {
|
|
417
|
+
get children() {
|
|
418
|
+
return o(L, {
|
|
419
|
+
get open() {
|
|
420
|
+
return e.manualPaste.open();
|
|
385
421
|
},
|
|
386
|
-
get
|
|
387
|
-
return e.
|
|
422
|
+
get text() {
|
|
423
|
+
return e.manualPaste.text();
|
|
388
424
|
},
|
|
389
|
-
get
|
|
390
|
-
return e.
|
|
425
|
+
get onTextChange() {
|
|
426
|
+
return e.manualPaste.setText;
|
|
391
427
|
},
|
|
392
428
|
get onClose() {
|
|
393
|
-
return e.
|
|
429
|
+
return e.manualPaste.close;
|
|
394
430
|
},
|
|
395
|
-
|
|
396
|
-
e.
|
|
431
|
+
onConfirm: () => {
|
|
432
|
+
e.manualPaste.confirm();
|
|
397
433
|
}
|
|
398
434
|
});
|
|
399
435
|
}
|
|
400
|
-
}), o(R, {
|
|
401
|
-
get open() {
|
|
402
|
-
return e.manualPaste.open();
|
|
403
|
-
},
|
|
404
|
-
get text() {
|
|
405
|
-
return e.manualPaste.text();
|
|
406
|
-
},
|
|
407
|
-
get onTextChange() {
|
|
408
|
-
return e.manualPaste.setText;
|
|
409
|
-
},
|
|
410
|
-
get onClose() {
|
|
411
|
-
return e.manualPaste.close;
|
|
412
|
-
},
|
|
413
|
-
onConfirm: () => {
|
|
414
|
-
e.manualPaste.confirm();
|
|
415
|
-
}
|
|
416
436
|
})];
|
|
417
437
|
}
|
|
418
438
|
});
|
|
419
439
|
}
|
|
420
440
|
});
|
|
421
441
|
}
|
|
422
|
-
|
|
442
|
+
k(["click"]);
|
|
423
443
|
export {
|
|
424
|
-
|
|
444
|
+
le as NotesOverlay
|
|
425
445
|
};
|