@floegence/floe-webapp-core 0.35.45 → 0.35.47
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 +4 -0
- package/dist/components/notes/NotesBoard.js +37 -34
- package/dist/components/notes/NotesBoardNote.d.ts +1 -0
- package/dist/components/notes/NotesBoardNote.js +67 -66
- package/dist/components/notes/NotesOverlay.js +23 -20
- package/dist/components/notes/useNotesOverlayModel.d.ts +5 -0
- package/dist/components/notes/useNotesOverlayModel.js +394 -332
- package/dist/notes-legacy.css +10 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
|
@@ -22,6 +22,10 @@ export interface NotesBoardProps {
|
|
|
22
22
|
onSelectTopic: (topicID: string) => void;
|
|
23
23
|
onMobileCreateNote: () => void;
|
|
24
24
|
onMobilePaste: () => void;
|
|
25
|
+
onSeedMoveProjection: (noteID: string, position: {
|
|
26
|
+
x: number;
|
|
27
|
+
y: number;
|
|
28
|
+
}) => void;
|
|
25
29
|
onCopyNote: (item: NotesItem) => void;
|
|
26
30
|
onOpenNoteContextMenu: (event: MouseEvent, item: NotesItem) => void;
|
|
27
31
|
onOpenEditor: (noteID: string) => void;
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { insert as t, createComponent as o, className as
|
|
1
|
+
import { insert as t, createComponent as o, className as k, effect as S, use as x, memo as O, template as r, delegateEvents as I } from "solid-js/web";
|
|
2
2
|
import { Show as u, For as y } from "solid-js";
|
|
3
|
-
import { Minus as
|
|
3
|
+
import { Minus as N, Plus as w, Layers as M, Paste as p } from "../icons/index.js";
|
|
4
4
|
import { NotesAnimalIcon as F } from "./notesAppearance.js";
|
|
5
5
|
import { NotesBoardNote as T } from "./NotesBoardNote.js";
|
|
6
|
-
import { topicAccentClass as
|
|
7
|
-
import { InfiniteCanvas as
|
|
8
|
-
var
|
|
6
|
+
import { topicAccentClass as P } from "./notesOverlayHelpers.js";
|
|
7
|
+
import { InfiniteCanvas as Z } from "../ui/InfiniteCanvas.js";
|
|
8
|
+
var L = /* @__PURE__ */ r('<button type=button class=notes-overlay__hud-button aria-label="Open overview map">'), A = /* @__PURE__ */ r("<div class=notes-page__mobile-toolbar><div class=notes-page__mobile-topics>"), D = /* @__PURE__ */ r("<div class=notes-canvas__field>"), E = /* @__PURE__ */ r('<div class=notes-mobile-dock data-floe-canvas-interactive=true><button type=button class=notes-mobile-dock__action aria-label="Create note at canvas center"><span>New</span></button><button type=button class=notes-mobile-dock__action aria-label="Paste note at canvas center"><span>Paste</span></button><button type=button class="notes-mobile-dock__action is-emphasis"aria-label="Open overview map"><span>Map'), j = /* @__PURE__ */ r('<section class="notes-page notes-overlay__board"><div class=notes-overlay__board-head data-floe-canvas-interactive=true><div class=notes-overlay__board-topic></div><div class=notes-overlay__board-actions><button type=button class=notes-overlay__hud-button aria-label="Zoom out"></button><div class=notes-overlay__hud-scale></div><button type=button class=notes-overlay__hud-button aria-label="Zoom in"></button></div></div><div class=notes-page__canvas>'), B = /* @__PURE__ */ r("<div>"), R = /* @__PURE__ */ r("<div class=notes-overlay__board-topic-copy><div class=notes-page__eyebrow>Active Topic</div><div class=notes-overlay__board-title></div><div class=notes-overlay__board-meta> live note"), V = /* @__PURE__ */ r("<button type=button class=notes-page__mobile-topic>");
|
|
9
9
|
function U(e) {
|
|
10
10
|
return (() => {
|
|
11
|
-
var
|
|
11
|
+
var s = j(), b = s.firstChild, $ = b.firstChild, g = $.nextSibling, d = g.firstChild, h = d.nextSibling, C = h.nextSibling, v = b.nextSibling;
|
|
12
12
|
t($, o(u, {
|
|
13
13
|
get when() {
|
|
14
14
|
return e.activeTopic;
|
|
15
15
|
},
|
|
16
16
|
children: (n) => {
|
|
17
|
-
const
|
|
17
|
+
const i = P(n().icon_accent);
|
|
18
18
|
return [(() => {
|
|
19
|
-
var
|
|
20
|
-
return
|
|
19
|
+
var a = B();
|
|
20
|
+
return k(a, `notes-topic-mark notes-topic-mark--board ${i}`), t(a, o(F, {
|
|
21
21
|
get iconKey() {
|
|
22
22
|
return n().icon_key;
|
|
23
23
|
},
|
|
24
24
|
class: "notes-topic-mark__icon"
|
|
25
|
-
})),
|
|
25
|
+
})), a;
|
|
26
26
|
})(), (() => {
|
|
27
|
-
var
|
|
28
|
-
return t(_, () => n().name), t(
|
|
27
|
+
var a = R(), l = a.firstChild, _ = l.nextSibling, c = _.nextSibling, m = c.firstChild;
|
|
28
|
+
return t(_, () => n().name), t(c, () => e.activeItems.length, m), t(c, () => e.activeItems.length === 1 ? "" : "s", null), a;
|
|
29
29
|
})()];
|
|
30
30
|
}
|
|
31
|
-
})), d.$$click = () => e.onZoomOut(), t(d, o(
|
|
31
|
+
})), d.$$click = () => e.onZoomOut(), t(d, o(N, {
|
|
32
32
|
class: "w-3.5 h-3.5"
|
|
33
33
|
})), t(h, () => e.boardScaleLabel), C.$$click = () => e.onZoomIn(), t(C, o(w, {
|
|
34
34
|
class: "w-3.5 h-3.5"
|
|
@@ -37,30 +37,30 @@ function U(e) {
|
|
|
37
37
|
return e.isMobile;
|
|
38
38
|
},
|
|
39
39
|
get children() {
|
|
40
|
-
var n =
|
|
41
|
-
return n.$$click = () => e.onOpenOverview(), t(n, o(
|
|
40
|
+
var n = L();
|
|
41
|
+
return n.$$click = () => e.onOpenOverview(), t(n, o(M, {
|
|
42
42
|
class: "w-3.5 h-3.5"
|
|
43
43
|
})), n;
|
|
44
44
|
}
|
|
45
|
-
}), null), t(
|
|
45
|
+
}), null), t(s, o(u, {
|
|
46
46
|
get when() {
|
|
47
47
|
return e.isMobile;
|
|
48
48
|
},
|
|
49
49
|
get children() {
|
|
50
|
-
var n = A(),
|
|
51
|
-
return t(
|
|
50
|
+
var n = A(), i = n.firstChild;
|
|
51
|
+
return t(i, o(y, {
|
|
52
52
|
get each() {
|
|
53
53
|
return e.topics;
|
|
54
54
|
},
|
|
55
|
-
children: (
|
|
56
|
-
var l =
|
|
57
|
-
return l.$$click = () => e.onSelectTopic(
|
|
55
|
+
children: (a) => (() => {
|
|
56
|
+
var l = V();
|
|
57
|
+
return l.$$click = () => e.onSelectTopic(a.topic_id), t(l, () => a.name), S(() => l.classList.toggle("is-active", a.topic_id === e.activeTopicID)), l;
|
|
58
58
|
})()
|
|
59
59
|
})), n;
|
|
60
60
|
}
|
|
61
61
|
}), v);
|
|
62
62
|
var f = e.setCanvasFrameRef;
|
|
63
|
-
return typeof f == "function" ?
|
|
63
|
+
return typeof f == "function" ? x(f, v) : e.setCanvasFrameRef = v, t(v, o(Z, {
|
|
64
64
|
get ariaLabel() {
|
|
65
65
|
return `Canvas for ${e.activeTopicLabel}`;
|
|
66
66
|
},
|
|
@@ -80,13 +80,13 @@ function U(e) {
|
|
|
80
80
|
get each() {
|
|
81
81
|
return e.activeItems;
|
|
82
82
|
},
|
|
83
|
-
children: (
|
|
84
|
-
item:
|
|
83
|
+
children: (i) => o(T, {
|
|
84
|
+
item: i,
|
|
85
85
|
get copied() {
|
|
86
|
-
return e.copiedNoteID ===
|
|
86
|
+
return e.copiedNoteID === i.note_id;
|
|
87
87
|
},
|
|
88
88
|
get optimisticFront() {
|
|
89
|
-
return e.optimisticFrontNoteID ===
|
|
89
|
+
return e.optimisticFrontNoteID === i.note_id;
|
|
90
90
|
},
|
|
91
91
|
get topZIndex() {
|
|
92
92
|
return e.topZIndex;
|
|
@@ -94,6 +94,9 @@ function U(e) {
|
|
|
94
94
|
get viewportScale() {
|
|
95
95
|
return e.viewport.scale;
|
|
96
96
|
},
|
|
97
|
+
get onSeedMoveProjection() {
|
|
98
|
+
return e.onSeedMoveProjection;
|
|
99
|
+
},
|
|
97
100
|
get onCopy() {
|
|
98
101
|
return e.onCopyNote;
|
|
99
102
|
},
|
|
@@ -118,24 +121,24 @@ function U(e) {
|
|
|
118
121
|
})
|
|
119
122
|
})), n;
|
|
120
123
|
}
|
|
121
|
-
})), t(
|
|
124
|
+
})), t(s, o(u, {
|
|
122
125
|
get when() {
|
|
123
|
-
return
|
|
126
|
+
return O(() => !!e.isMobile)() && !e.overviewOpen;
|
|
124
127
|
},
|
|
125
128
|
get children() {
|
|
126
|
-
var n = E(),
|
|
127
|
-
return
|
|
129
|
+
var n = E(), i = n.firstChild, a = i.firstChild, l = i.nextSibling, _ = l.firstChild, c = l.nextSibling, m = c.firstChild;
|
|
130
|
+
return i.$$click = () => e.onMobileCreateNote(), t(i, o(w, {
|
|
128
131
|
class: "w-4 h-4"
|
|
129
|
-
}),
|
|
132
|
+
}), a), l.$$click = () => e.onMobilePaste(), t(l, o(p, {
|
|
130
133
|
class: "w-4 h-4"
|
|
131
|
-
}), _),
|
|
134
|
+
}), _), c.$$click = () => e.onOpenOverview(), t(c, o(M, {
|
|
132
135
|
class: "w-4 h-4"
|
|
133
136
|
}), m), n;
|
|
134
137
|
}
|
|
135
|
-
}), null),
|
|
138
|
+
}), null), s;
|
|
136
139
|
})();
|
|
137
140
|
}
|
|
138
|
-
|
|
141
|
+
I(["click"]);
|
|
139
142
|
export {
|
|
140
143
|
U as NotesBoard
|
|
141
144
|
};
|
|
@@ -6,6 +6,7 @@ export interface NotesBoardNoteProps {
|
|
|
6
6
|
optimisticFront: boolean;
|
|
7
7
|
topZIndex: number;
|
|
8
8
|
viewportScale: number;
|
|
9
|
+
onSeedMoveProjection: (noteID: string, position: NotesPoint) => void;
|
|
9
10
|
onCopy: (item: NotesItem) => void;
|
|
10
11
|
onOpenContextMenu: (event: MouseEvent, item: NotesItem) => void;
|
|
11
12
|
onOpenEditor: (noteID: string) => void;
|
|
@@ -1,73 +1,73 @@
|
|
|
1
|
-
import { insert as
|
|
2
|
-
import { createSignal as
|
|
3
|
-
import { startHotInteraction as
|
|
4
|
-
import { GripVertical as
|
|
5
|
-
import { notePreviewMetrics as
|
|
6
|
-
var
|
|
7
|
-
function
|
|
8
|
-
const [
|
|
1
|
+
import { insert as v, createComponent as b, memo as z, effect as F, className as N, setAttribute as A, setStyleProperty as h, template as D, delegateEvents as O } from "solid-js/web";
|
|
2
|
+
import { createSignal as j, onCleanup as B, untrack as W, createMemo as w } from "solid-js";
|
|
3
|
+
import { startHotInteraction as G } from "../../utils/hotInteraction.js";
|
|
4
|
+
import { GripVertical as H, Pencil as V, Trash as Z, Check as q } from "../icons/index.js";
|
|
5
|
+
import { notePreviewMetrics as J, getNotePreviewText as K, noteColorClass as Q, samePoint as R } from "./notesOverlayHelpers.js";
|
|
6
|
+
var U = /* @__PURE__ */ D('<article data-floe-geometry-surface=notes-note><div class=notes-note__surface><header class=notes-note__header><button type=button class=notes-note__drag aria-label="Drag note"data-floe-canvas-interactive=true></button><div class=notes-note__actions><button type=button class=notes-note__icon-button data-floe-canvas-interactive=true aria-label="Edit note"></button><button type=button class="notes-note__icon-button is-danger"data-floe-canvas-interactive=true aria-label="Move note to trash"></button></div></header><button type=button class=notes-note__body data-floe-canvas-interactive=true data-floe-canvas-pan-surface=true><span>'), p = /* @__PURE__ */ D("<div class=notes-note__copied-state aria-hidden=true><div class=notes-note__copied-pill><span class=notes-note__copied-icon></span><span class=notes-note__copied-copy>Copied");
|
|
7
|
+
function at(t) {
|
|
8
|
+
const [g, $] = j(null);
|
|
9
9
|
let c;
|
|
10
|
-
|
|
11
|
-
c?.abort(), c = void 0,
|
|
10
|
+
B(() => {
|
|
11
|
+
c?.abort(), c = void 0, W(g)?.stopInteraction();
|
|
12
12
|
});
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
return
|
|
16
|
-
x:
|
|
17
|
-
y:
|
|
13
|
+
const C = w(() => J(t.item)), L = w(() => K(t.item.body, C().preview_limit)), E = w(() => !t.item.body.trim()), x = () => g() !== null, y = w(() => {
|
|
14
|
+
const o = g();
|
|
15
|
+
return o ? {
|
|
16
|
+
x: o.worldX,
|
|
17
|
+
y: o.worldY
|
|
18
18
|
} : {
|
|
19
19
|
x: t.item.x,
|
|
20
20
|
y: t.item.y
|
|
21
21
|
};
|
|
22
|
-
}), I = (
|
|
23
|
-
const
|
|
24
|
-
if (!
|
|
25
|
-
const
|
|
26
|
-
x:
|
|
27
|
-
y:
|
|
22
|
+
}), I = (o) => {
|
|
23
|
+
const n = W(g);
|
|
24
|
+
if (!n) return;
|
|
25
|
+
const l = {
|
|
26
|
+
x: n.worldX,
|
|
27
|
+
y: n.worldY
|
|
28
28
|
}, s = {
|
|
29
|
-
x:
|
|
30
|
-
y:
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
},
|
|
34
|
-
if (
|
|
35
|
-
|
|
36
|
-
const
|
|
29
|
+
x: n.startWorldX,
|
|
30
|
+
y: n.startWorldY
|
|
31
|
+
}, m = o && !R(l, s);
|
|
32
|
+
m && t.onSeedMoveProjection(t.item.note_id, l), n.stopInteraction(), $(null), c?.abort(), c = void 0, t.onCommitFront(t.item.note_id), m && t.onCommitMove(t.item.note_id, l);
|
|
33
|
+
}, T = (o) => {
|
|
34
|
+
if (o.button !== 0) return;
|
|
35
|
+
o.preventDefault(), o.stopPropagation(), c?.abort(), t.onStartOptimisticFront(t.item.note_id);
|
|
36
|
+
const n = G({
|
|
37
37
|
kind: "drag",
|
|
38
38
|
cursor: "grabbing"
|
|
39
|
-
}),
|
|
40
|
-
|
|
41
|
-
pointerId:
|
|
42
|
-
startClientX:
|
|
43
|
-
startClientY:
|
|
39
|
+
}), l = Math.max(t.viewportScale, 1e-3);
|
|
40
|
+
$({
|
|
41
|
+
pointerId: o.pointerId,
|
|
42
|
+
startClientX: o.clientX,
|
|
43
|
+
startClientY: o.clientY,
|
|
44
44
|
startWorldX: t.item.x,
|
|
45
45
|
startWorldY: t.item.y,
|
|
46
46
|
worldX: t.item.x,
|
|
47
47
|
worldY: t.item.y,
|
|
48
48
|
moved: !1,
|
|
49
|
-
scale:
|
|
50
|
-
stopInteraction:
|
|
49
|
+
scale: l,
|
|
50
|
+
stopInteraction: n
|
|
51
51
|
});
|
|
52
52
|
const s = (a) => {
|
|
53
|
-
|
|
54
|
-
if (!
|
|
55
|
-
const
|
|
53
|
+
$((i) => {
|
|
54
|
+
if (!i || i.pointerId !== a.pointerId) return i;
|
|
55
|
+
const e = i.startWorldX + (a.clientX - i.startClientX) / i.scale, r = i.startWorldY + (a.clientY - i.startClientY) / i.scale;
|
|
56
56
|
return {
|
|
57
|
-
...
|
|
58
|
-
worldX:
|
|
59
|
-
worldY:
|
|
60
|
-
moved:
|
|
57
|
+
...i,
|
|
58
|
+
worldX: e,
|
|
59
|
+
worldY: r,
|
|
60
|
+
moved: i.moved || Math.abs(e - i.startWorldX) > 2 || Math.abs(r - i.startWorldY) > 2
|
|
61
61
|
};
|
|
62
62
|
});
|
|
63
|
-
},
|
|
64
|
-
a.pointerId ===
|
|
63
|
+
}, m = (a) => {
|
|
64
|
+
a.pointerId === o.pointerId && I(!0);
|
|
65
65
|
}, u = (a) => {
|
|
66
|
-
a.pointerId ===
|
|
66
|
+
a.pointerId === o.pointerId && I(!1);
|
|
67
67
|
}, d = new AbortController();
|
|
68
68
|
c = d, window.addEventListener("pointermove", s, {
|
|
69
69
|
signal: d.signal
|
|
70
|
-
}), window.addEventListener("pointerup",
|
|
70
|
+
}), window.addEventListener("pointerup", m, {
|
|
71
71
|
once: !0,
|
|
72
72
|
signal: d.signal
|
|
73
73
|
}), window.addEventListener("pointercancel", u, {
|
|
@@ -76,26 +76,26 @@ function nt(t) {
|
|
|
76
76
|
});
|
|
77
77
|
};
|
|
78
78
|
return (() => {
|
|
79
|
-
var
|
|
80
|
-
return
|
|
81
|
-
|
|
82
|
-
}, s.$$pointerdown =
|
|
79
|
+
var o = U(), n = o.firstChild, l = n.firstChild, s = l.firstChild, m = s.nextSibling, u = m.firstChild, d = u.nextSibling, a = l.nextSibling, i = a.firstChild;
|
|
80
|
+
return o.$$click = () => t.onCommitFront(t.item.note_id), o.$$contextmenu = (e) => {
|
|
81
|
+
e.preventDefault(), e.stopPropagation(), t.onOpenContextMenu(e, t.item);
|
|
82
|
+
}, s.$$pointerdown = T, v(s, b(H, {
|
|
83
83
|
class: "w-3.5 h-3.5"
|
|
84
|
-
})), u.$$click = () => t.onOpenEditor(t.item.note_id),
|
|
84
|
+
})), u.$$click = () => t.onOpenEditor(t.item.note_id), v(u, b(V, {
|
|
85
85
|
class: "w-3.5 h-3.5"
|
|
86
|
-
})), d.$$click = () => t.onMoveToTrash(t.item.note_id),
|
|
86
|
+
})), d.$$click = () => t.onMoveToTrash(t.item.note_id), v(d, b(Z, {
|
|
87
87
|
class: "w-3.5 h-3.5"
|
|
88
|
-
})), a.$$click = () => t.onCopy(t.item),
|
|
89
|
-
var
|
|
90
|
-
return () =>
|
|
91
|
-
var
|
|
92
|
-
return
|
|
88
|
+
})), a.$$click = () => t.onCopy(t.item), v(i, L), v(n, (() => {
|
|
89
|
+
var e = z(() => !!t.copied);
|
|
90
|
+
return () => e() ? (() => {
|
|
91
|
+
var r = p(), f = r.firstChild, _ = f.firstChild;
|
|
92
|
+
return v(_, b(q, {
|
|
93
93
|
class: "w-3.5 h-3.5"
|
|
94
|
-
})),
|
|
94
|
+
})), r;
|
|
95
95
|
})() : null;
|
|
96
|
-
})(), null),
|
|
97
|
-
var
|
|
98
|
-
return
|
|
96
|
+
})(), null), F((e) => {
|
|
97
|
+
var r = `${Q(t.item.color_token)} notes-note notes-note--size-${t.item.size_bucket - 1}`, f = !!t.copied, _ = !!x(), M = t.item.note_id, X = `translate(${y().x}px, ${y().y}px)`, Y = `${C().width}px`, k = `${C().height}px`, S = x() || t.optimisticFront ? `${t.topZIndex + 1}` : `${t.item.z_index}`, P = !!E();
|
|
98
|
+
return r !== e.e && N(o, e.e = r), f !== e.t && o.classList.toggle("is-copied", e.t = f), _ !== e.a && o.classList.toggle("is-dragging", e.a = _), M !== e.o && A(o, "data-floe-notes-note-id", e.o = M), X !== e.i && h(o, "transform", e.i = X), Y !== e.n && h(o, "--note-width", e.n = Y), k !== e.s && h(o, "--note-height", e.s = k), S !== e.h && h(o, "z-index", e.h = S), P !== e.r && a.classList.toggle("is-empty", e.r = P), e;
|
|
99
99
|
}, {
|
|
100
100
|
e: void 0,
|
|
101
101
|
t: void 0,
|
|
@@ -104,11 +104,12 @@ function nt(t) {
|
|
|
104
104
|
i: void 0,
|
|
105
105
|
n: void 0,
|
|
106
106
|
s: void 0,
|
|
107
|
-
h: void 0
|
|
108
|
-
|
|
107
|
+
h: void 0,
|
|
108
|
+
r: void 0
|
|
109
|
+
}), o;
|
|
109
110
|
})();
|
|
110
111
|
}
|
|
111
|
-
|
|
112
|
+
O(["contextmenu", "click", "pointerdown"]);
|
|
112
113
|
export {
|
|
113
|
-
|
|
114
|
+
at as NotesBoardNote
|
|
114
115
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createComponent as o, insert as i, addEventListener as
|
|
1
|
+
import { createComponent as o, insert as i, addEventListener as v, effect as y, setAttribute as k, Portal as u, memo as x, template as c, delegateEvents as $ } from "solid-js/web";
|
|
2
2
|
import { createEffect as D, onCleanup as I, Show as s } from "solid-js";
|
|
3
3
|
import { Motion as C } from "../../node_modules/.pnpm/solid-motionone@1.0.4_solid-js@1.9.11/node_modules/solid-motionone/dist/index.js";
|
|
4
4
|
import { easing as E, duration as T } from "../../utils/animations.js";
|
|
@@ -11,8 +11,8 @@ import { NotesOverviewPanel as _ } from "./NotesOverviewPanel.js";
|
|
|
11
11
|
import { NotesTopicRail as z } from "./NotesTopicRail.js";
|
|
12
12
|
import { NotesTrashFlyout as W } from "./NotesTrashFlyout.js";
|
|
13
13
|
import { NotesTrashCanIcon as q } from "./notesAppearance.js";
|
|
14
|
-
import { useNotesOverlayModel as
|
|
15
|
-
var
|
|
14
|
+
import { useNotesOverlayModel as j } from "./useNotesOverlayModel.js";
|
|
15
|
+
var A = /* @__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>'), V = /* @__PURE__ */ c("<button type=button class=notes-trash__toggle><div class=notes-trash__toggle-mark>"), H = /* @__PURE__ */ c("<div class=notes-overlay__body><div class=notes-trash data-floe-canvas-interactive=true>"), U = /* @__PURE__ */ c("<div class=notes-overview-backdrop data-floe-notes-boundary=true>"), X = /* @__PURE__ */ c("<div class=notes-overview-flyout data-floe-notes-boundary=true>"), Y = /* @__PURE__ */ c("<div class=notes-menu-backdrop data-floe-notes-boundary=true>");
|
|
16
16
|
const G = '[data-floe-notes-boundary="true"]';
|
|
17
17
|
function J(r) {
|
|
18
18
|
return typeof Element < "u" && r instanceof Element ? r : typeof Node < "u" && r instanceof Node ? r.parentElement : null;
|
|
@@ -44,8 +44,8 @@ function K(r) {
|
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
46
|
function ge(r) {
|
|
47
|
-
const e =
|
|
48
|
-
let
|
|
47
|
+
const e = j(r);
|
|
48
|
+
let g;
|
|
49
49
|
const l = () => K(r.interactionMode), b = () => r.onClose();
|
|
50
50
|
return D(() => {
|
|
51
51
|
if (!r.open || l().mode !== "floating" || typeof document > "u") return;
|
|
@@ -55,7 +55,7 @@ function ge(r) {
|
|
|
55
55
|
document.addEventListener("click", t, !0), I(() => document.removeEventListener("click", t, !0));
|
|
56
56
|
}), F({
|
|
57
57
|
open: () => r.open,
|
|
58
|
-
root: () =>
|
|
58
|
+
root: () => g,
|
|
59
59
|
onClose: () => e.handleCloseRequest(),
|
|
60
60
|
onEscapeOutside: l().mode === "floating" ? b : void 0,
|
|
61
61
|
containsTarget: w,
|
|
@@ -74,8 +74,8 @@ function ge(r) {
|
|
|
74
74
|
get children() {
|
|
75
75
|
return o(C.section, {
|
|
76
76
|
ref(t) {
|
|
77
|
-
var n =
|
|
78
|
-
typeof n == "function" ? n(t) :
|
|
77
|
+
var n = g;
|
|
78
|
+
typeof n == "function" ? n(t) : g = t;
|
|
79
79
|
},
|
|
80
80
|
class: "notes-overlay",
|
|
81
81
|
role: "dialog",
|
|
@@ -120,12 +120,12 @@ function ge(r) {
|
|
|
120
120
|
},
|
|
121
121
|
get children() {
|
|
122
122
|
return [(() => {
|
|
123
|
-
var t =
|
|
124
|
-
return i(
|
|
123
|
+
var t = A(), n = t.firstChild, a = n.firstChild, m = a.nextSibling, p = m.nextSibling, N = p.firstChild, d = p.nextSibling, M = d.firstChild, f = d.nextSibling, S = f.firstChild, O = n.nextSibling, h = O.firstChild;
|
|
124
|
+
return i(p, () => e.header.topicCount(), N), i(d, () => e.header.totalLiveNotes(), M), i(d, () => e.header.totalLiveNotes() === 1 ? "" : "s", null), i(f, () => e.header.trashCount(), S), h.$$click = () => e.handleCloseRequest(), i(h, o(L, {
|
|
125
125
|
class: "w-4 h-4"
|
|
126
126
|
})), t;
|
|
127
127
|
})(), (() => {
|
|
128
|
-
var t =
|
|
128
|
+
var t = H(), n = t.firstChild;
|
|
129
129
|
return i(t, o(z, {
|
|
130
130
|
get topics() {
|
|
131
131
|
return e.rail.topics();
|
|
@@ -233,6 +233,9 @@ function ge(r) {
|
|
|
233
233
|
onMobilePaste: () => {
|
|
234
234
|
e.board.mobilePaste();
|
|
235
235
|
},
|
|
236
|
+
get onSeedMoveProjection() {
|
|
237
|
+
return e.board.seedMoveProjection;
|
|
238
|
+
},
|
|
236
239
|
onCopyNote: (a) => {
|
|
237
240
|
e.board.copyNote(a);
|
|
238
241
|
},
|
|
@@ -289,8 +292,8 @@ function ge(r) {
|
|
|
289
292
|
return !e.trash.open();
|
|
290
293
|
},
|
|
291
294
|
get children() {
|
|
292
|
-
var a =
|
|
293
|
-
return
|
|
295
|
+
var a = V(), m = a.firstChild;
|
|
296
|
+
return v(a, "click", e.trash.openDock, !0), i(m, o(q, {
|
|
294
297
|
class: "notes-trash__toggle-icon"
|
|
295
298
|
})), y(() => k(a, "aria-label", `Open trash dock${e.trash.count() > 0 ? `, ${e.trash.count()} items` : ""}`)), a;
|
|
296
299
|
}
|
|
@@ -299,16 +302,16 @@ function ge(r) {
|
|
|
299
302
|
}
|
|
300
303
|
}), o(s, {
|
|
301
304
|
get when() {
|
|
302
|
-
return
|
|
305
|
+
return x(() => !!e.board.isMobile())() && e.board.overviewOpen();
|
|
303
306
|
},
|
|
304
307
|
get children() {
|
|
305
308
|
return o(u, {
|
|
306
309
|
get children() {
|
|
307
310
|
return [(() => {
|
|
308
|
-
var t =
|
|
309
|
-
return
|
|
311
|
+
var t = U();
|
|
312
|
+
return v(t, "click", e.overview.close, !0), t;
|
|
310
313
|
})(), (() => {
|
|
311
|
-
var t =
|
|
314
|
+
var t = X();
|
|
312
315
|
return i(t, o(_, {
|
|
313
316
|
mode: "mobile",
|
|
314
317
|
get items() {
|
|
@@ -380,8 +383,8 @@ function ge(r) {
|
|
|
380
383
|
return o(u, {
|
|
381
384
|
get children() {
|
|
382
385
|
return [(() => {
|
|
383
|
-
var t =
|
|
384
|
-
return
|
|
386
|
+
var t = Y();
|
|
387
|
+
return v(t, "contextmenu", e.contextMenu.retarget, !0), v(t, "click", e.contextMenu.close, !0), t;
|
|
385
388
|
})(), o(B, {
|
|
386
389
|
get x() {
|
|
387
390
|
return e.contextMenu.position()?.left ?? 0;
|
|
@@ -455,7 +458,7 @@ function ge(r) {
|
|
|
455
458
|
}
|
|
456
459
|
});
|
|
457
460
|
}
|
|
458
|
-
|
|
461
|
+
$(["click", "contextmenu"]);
|
|
459
462
|
export {
|
|
460
463
|
ge as NotesOverlay
|
|
461
464
|
};
|
|
@@ -101,6 +101,10 @@ export declare function useNotesOverlayModel(options: UseNotesOverlayModelOption
|
|
|
101
101
|
selectTopic: (topicID: string) => void;
|
|
102
102
|
mobileCreateNote: () => Promise<void>;
|
|
103
103
|
mobilePaste: () => Promise<void>;
|
|
104
|
+
seedMoveProjection: (noteID: string, position: {
|
|
105
|
+
x: number;
|
|
106
|
+
y: number;
|
|
107
|
+
}) => void;
|
|
104
108
|
copyNote: (item: NotesItem) => Promise<void>;
|
|
105
109
|
openNoteContextMenu: (event: MouseEvent, item: NotesItem) => void;
|
|
106
110
|
openEditor: (noteID: string) => void;
|
|
@@ -161,6 +165,7 @@ export declare function useNotesOverlayModel(options: UseNotesOverlayModelOption
|
|
|
161
165
|
top: number;
|
|
162
166
|
} | undefined>;
|
|
163
167
|
close: () => null;
|
|
168
|
+
retarget: (event: MouseEvent) => void;
|
|
164
169
|
};
|
|
165
170
|
editor: {
|
|
166
171
|
note: import("solid-js").Accessor<Readonly<{
|