@floegence/floe-webapp-core 0.35.51 → 0.35.53
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/NotesBoardNote.js +100 -82
- package/dist/components/notes/NotesEditorFlyout.d.ts +2 -0
- package/dist/components/notes/NotesEditorFlyout.js +60 -45
- package/dist/components/notes/NotesOverlay.js +19 -13
- package/dist/components/notes/NotesTrashFlyout.js +56 -47
- package/dist/components/notes/notesOverlayHelpers.d.ts +1 -0
- package/dist/components/notes/notesOverlayHelpers.js +26 -22
- package/dist/components/notes/types.d.ts +6 -0
- package/dist/components/notes/types.js +103 -74
- package/dist/components/notes/useNotesOverlayModel.d.ts +6 -0
- package/dist/components/notes/useNotesOverlayModel.js +276 -283
- package/dist/notes-legacy.css +248 -26
- package/dist/styles.css +1 -1
- package/package.json +2 -2
|
@@ -1,104 +1,119 @@
|
|
|
1
|
-
import { insert as
|
|
2
|
-
import { createSignal as
|
|
3
|
-
import { startHotInteraction as
|
|
4
|
-
import { GripVertical as
|
|
5
|
-
import { notePreviewMetrics as
|
|
6
|
-
var
|
|
7
|
-
const
|
|
8
|
-
function
|
|
9
|
-
const [
|
|
10
|
-
let
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import { insert as l, createComponent as $, memo as y, effect as G, className as H, setAttribute as K, setStyleProperty as w, template as f, delegateEvents as V } from "solid-js/web";
|
|
2
|
+
import { createSignal as Z, onCleanup as q, untrack as A, createMemo as d } from "solid-js";
|
|
3
|
+
import { startHotInteraction as J } from "../../utils/hotInteraction.js";
|
|
4
|
+
import { GripVertical as Q, Pencil as U, Trash as p, Check as tt } from "../icons/index.js";
|
|
5
|
+
import { notePreviewMetrics as et, normalizeNoteTitle as ot, normalizeNoteText as nt, getNotePreviewText as it, noteColorClass as at, samePoint as lt } from "./notesOverlayHelpers.js";
|
|
6
|
+
var st = /* @__PURE__ */ f('<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 data-floe-notes-front-skip=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 data-floe-notes-front-skip=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>'), rt = /* @__PURE__ */ f("<span class=notes-note__title-block><span class=notes-note__title>"), dt = /* @__PURE__ */ f("<span class=notes-note__body-copy>"), ct = /* @__PURE__ */ f("<span class=notes-note__body-copy>Empty note"), mt = /* @__PURE__ */ f("<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
|
+
const ut = '[data-floe-notes-front-skip="true"]';
|
|
8
|
+
function bt(e) {
|
|
9
|
+
const [h, C] = Z(null);
|
|
10
|
+
let u;
|
|
11
|
+
q(() => {
|
|
12
|
+
u?.abort(), u = void 0, A(h)?.stopInteraction();
|
|
13
13
|
});
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
return
|
|
17
|
-
x:
|
|
18
|
-
y:
|
|
14
|
+
const x = d(() => et(e.item)), I = d(() => ot(e.item.title)), T = d(() => nt(e.item.body)), B = d(() => T() ? it(e.item.body, x().preview_limit) : ""), _ = d(() => I().length > 0), k = d(() => T().length > 0), M = d(() => !_() && !k()), S = () => h() !== null, X = d(() => {
|
|
15
|
+
const o = h();
|
|
16
|
+
return o ? {
|
|
17
|
+
x: o.worldX,
|
|
18
|
+
y: o.worldY
|
|
19
19
|
} : {
|
|
20
|
-
x:
|
|
21
|
-
y:
|
|
20
|
+
x: e.item.x,
|
|
21
|
+
y: e.item.y
|
|
22
22
|
};
|
|
23
|
-
}),
|
|
24
|
-
const
|
|
25
|
-
if (!
|
|
23
|
+
}), R = (o) => !(o instanceof Element && o.closest(ut)), Y = (o) => {
|
|
24
|
+
const a = A(h);
|
|
25
|
+
if (!a) return;
|
|
26
26
|
const r = {
|
|
27
|
-
x:
|
|
28
|
-
y:
|
|
29
|
-
},
|
|
30
|
-
x:
|
|
31
|
-
y:
|
|
32
|
-
},
|
|
33
|
-
|
|
34
|
-
},
|
|
35
|
-
if (
|
|
36
|
-
|
|
37
|
-
const
|
|
27
|
+
x: a.worldX,
|
|
28
|
+
y: a.worldY
|
|
29
|
+
}, c = {
|
|
30
|
+
x: a.startWorldX,
|
|
31
|
+
y: a.startWorldY
|
|
32
|
+
}, v = o && !lt(r, c);
|
|
33
|
+
v && e.onSeedMoveProjection(e.item.note_id, r), a.stopInteraction(), C(null), u?.abort(), u = void 0, e.onCommitFront(e.item.note_id), v && e.onCommitMove(e.item.note_id, r);
|
|
34
|
+
}, j = (o) => {
|
|
35
|
+
if (o.button !== 0) return;
|
|
36
|
+
o.preventDefault(), o.stopPropagation(), u?.abort(), e.onStartOptimisticFront(e.item.note_id);
|
|
37
|
+
const a = J({
|
|
38
38
|
kind: "drag",
|
|
39
39
|
cursor: "grabbing"
|
|
40
|
-
}), r = Math.max(
|
|
40
|
+
}), r = Math.max(e.viewportScale, 1e-3);
|
|
41
41
|
C({
|
|
42
|
-
pointerId:
|
|
43
|
-
startClientX:
|
|
44
|
-
startClientY:
|
|
45
|
-
startWorldX:
|
|
46
|
-
startWorldY:
|
|
47
|
-
worldX:
|
|
48
|
-
worldY:
|
|
42
|
+
pointerId: o.pointerId,
|
|
43
|
+
startClientX: o.clientX,
|
|
44
|
+
startClientY: o.clientY,
|
|
45
|
+
startWorldX: e.item.x,
|
|
46
|
+
startWorldY: e.item.y,
|
|
47
|
+
worldX: e.item.x,
|
|
48
|
+
worldY: e.item.y,
|
|
49
49
|
moved: !1,
|
|
50
50
|
scale: r,
|
|
51
|
-
stopInteraction:
|
|
51
|
+
stopInteraction: a
|
|
52
52
|
});
|
|
53
|
-
const
|
|
54
|
-
C((
|
|
55
|
-
if (!
|
|
56
|
-
const
|
|
53
|
+
const c = (n) => {
|
|
54
|
+
C((t) => {
|
|
55
|
+
if (!t || t.pointerId !== n.pointerId) return t;
|
|
56
|
+
const i = t.startWorldX + (n.clientX - t.startClientX) / t.scale, s = t.startWorldY + (n.clientY - t.startClientY) / t.scale;
|
|
57
57
|
return {
|
|
58
|
-
...
|
|
59
|
-
worldX:
|
|
60
|
-
worldY:
|
|
61
|
-
moved:
|
|
58
|
+
...t,
|
|
59
|
+
worldX: i,
|
|
60
|
+
worldY: s,
|
|
61
|
+
moved: t.moved || Math.abs(i - t.startWorldX) > 2 || Math.abs(s - t.startWorldY) > 2
|
|
62
62
|
};
|
|
63
63
|
});
|
|
64
|
-
},
|
|
65
|
-
|
|
66
|
-
},
|
|
67
|
-
|
|
68
|
-
},
|
|
69
|
-
|
|
70
|
-
signal:
|
|
71
|
-
}), window.addEventListener("pointerup",
|
|
64
|
+
}, v = (n) => {
|
|
65
|
+
n.pointerId === o.pointerId && Y(!0);
|
|
66
|
+
}, g = (n) => {
|
|
67
|
+
n.pointerId === o.pointerId && Y(!1);
|
|
68
|
+
}, m = new AbortController();
|
|
69
|
+
u = m, window.addEventListener("pointermove", c, {
|
|
70
|
+
signal: m.signal
|
|
71
|
+
}), window.addEventListener("pointerup", v, {
|
|
72
72
|
once: !0,
|
|
73
|
-
signal:
|
|
74
|
-
}), window.addEventListener("pointercancel",
|
|
73
|
+
signal: m.signal
|
|
74
|
+
}), window.addEventListener("pointercancel", g, {
|
|
75
75
|
once: !0,
|
|
76
|
-
signal:
|
|
76
|
+
signal: m.signal
|
|
77
77
|
});
|
|
78
78
|
};
|
|
79
79
|
return (() => {
|
|
80
|
-
var
|
|
81
|
-
return
|
|
82
|
-
|
|
83
|
-
},
|
|
84
|
-
|
|
85
|
-
},
|
|
80
|
+
var o = st(), a = o.firstChild, r = a.firstChild, c = r.firstChild, v = c.nextSibling, g = v.firstChild, m = g.nextSibling, n = r.nextSibling;
|
|
81
|
+
return o.$$click = (t) => {
|
|
82
|
+
R(t.target) && e.onCommitFront(e.item.note_id);
|
|
83
|
+
}, o.$$contextmenu = (t) => {
|
|
84
|
+
t.preventDefault(), t.stopPropagation(), e.onOpenContextMenu(t, e.item);
|
|
85
|
+
}, c.$$pointerdown = j, l(c, $(Q, {
|
|
86
86
|
class: "w-3.5 h-3.5"
|
|
87
|
-
})),
|
|
87
|
+
})), g.$$click = () => e.onOpenEditor(e.item.note_id), l(g, $(U, {
|
|
88
88
|
class: "w-3.5 h-3.5"
|
|
89
|
-
})),
|
|
89
|
+
})), m.$$click = () => e.onMoveToTrash(e.item.note_id), l(m, $(p, {
|
|
90
90
|
class: "w-3.5 h-3.5"
|
|
91
|
-
})),
|
|
92
|
-
var
|
|
93
|
-
return () =>
|
|
94
|
-
var
|
|
95
|
-
return
|
|
91
|
+
})), n.$$click = () => e.onCopy(e.item), l(n, (() => {
|
|
92
|
+
var t = y(() => !!_());
|
|
93
|
+
return () => t() ? (() => {
|
|
94
|
+
var i = rt(), s = i.firstChild;
|
|
95
|
+
return l(s, I), i;
|
|
96
|
+
})() : null;
|
|
97
|
+
})(), null), l(n, (() => {
|
|
98
|
+
var t = y(() => !!k());
|
|
99
|
+
return () => t() ? (() => {
|
|
100
|
+
var i = dt();
|
|
101
|
+
return l(i, B), i;
|
|
102
|
+
})() : null;
|
|
103
|
+
})(), null), l(n, (() => {
|
|
104
|
+
var t = y(() => !!M());
|
|
105
|
+
return () => t() ? ct() : null;
|
|
106
|
+
})(), null), l(a, (() => {
|
|
107
|
+
var t = y(() => !!e.copied);
|
|
108
|
+
return () => t() ? (() => {
|
|
109
|
+
var i = mt(), s = i.firstChild, b = s.firstChild;
|
|
110
|
+
return l(b, $(tt, {
|
|
96
111
|
class: "w-3.5 h-3.5"
|
|
97
|
-
})),
|
|
112
|
+
})), i;
|
|
98
113
|
})() : null;
|
|
99
|
-
})(), null),
|
|
100
|
-
var
|
|
101
|
-
return
|
|
114
|
+
})(), null), G((t) => {
|
|
115
|
+
var i = `${at(e.item.color_token)} notes-note notes-note--size-${e.item.size_bucket - 1}`, s = !!e.copied, b = !!S(), E = !!_(), L = e.item.note_id, P = `translate(${X().x}px, ${X().y}px)`, N = `${x().width}px`, W = `${x().height}px`, D = S() || e.optimisticFront ? `${e.topZIndex + 1}` : `${e.item.z_index}`, F = !!M(), z = !!_(), O = !!(_() && !k());
|
|
116
|
+
return i !== t.e && H(o, t.e = i), s !== t.t && o.classList.toggle("is-copied", t.t = s), b !== t.a && o.classList.toggle("is-dragging", t.a = b), E !== t.o && o.classList.toggle("has-title", t.o = E), L !== t.i && K(o, "data-floe-notes-note-id", t.i = L), P !== t.n && w(o, "transform", t.n = P), N !== t.s && w(o, "--note-width", t.s = N), W !== t.h && w(o, "--note-height", t.h = W), D !== t.r && w(o, "z-index", t.r = D), F !== t.d && n.classList.toggle("is-empty", t.d = F), z !== t.l && n.classList.toggle("has-title", t.l = z), O !== t.u && n.classList.toggle("is-title-only", t.u = O), t;
|
|
102
117
|
}, {
|
|
103
118
|
e: void 0,
|
|
104
119
|
t: void 0,
|
|
@@ -108,11 +123,14 @@ function lt(t) {
|
|
|
108
123
|
n: void 0,
|
|
109
124
|
s: void 0,
|
|
110
125
|
h: void 0,
|
|
111
|
-
r: void 0
|
|
112
|
-
|
|
126
|
+
r: void 0,
|
|
127
|
+
d: void 0,
|
|
128
|
+
l: void 0,
|
|
129
|
+
u: void 0
|
|
130
|
+
}), o;
|
|
113
131
|
})();
|
|
114
132
|
}
|
|
115
|
-
|
|
133
|
+
V(["contextmenu", "click", "pointerdown"]);
|
|
116
134
|
export {
|
|
117
|
-
|
|
135
|
+
bt as NotesBoardNote
|
|
118
136
|
};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { type NoteColorToken, type NotesItem } from './types';
|
|
2
2
|
export interface NotesEditorFlyoutProps {
|
|
3
3
|
note: NotesItem | undefined;
|
|
4
|
+
draftTitle: string;
|
|
4
5
|
draftBody: string;
|
|
5
6
|
draftColor: NoteColorToken;
|
|
7
|
+
onDraftTitleChange: (value: string) => void;
|
|
6
8
|
onDraftBodyChange: (value: string) => void;
|
|
7
9
|
onDraftColorChange: (value: NoteColorToken) => void;
|
|
8
10
|
onClose: () => void;
|
|
@@ -1,92 +1,107 @@
|
|
|
1
|
-
import { insert as
|
|
2
|
-
import { For as
|
|
3
|
-
import { X as
|
|
4
|
-
import { NOTE_COLOR_LABELS as
|
|
5
|
-
import { noteColorClass as
|
|
6
|
-
import { NOTE_COLOR_TOKENS as
|
|
7
|
-
import { Textarea as
|
|
8
|
-
import { Button as
|
|
9
|
-
var
|
|
10
|
-
function
|
|
1
|
+
import { insert as t, createComponent as l, effect as O, className as E, template as h, delegateEvents as k } from "solid-js/web";
|
|
2
|
+
import { For as p, Show as N } from "solid-js";
|
|
3
|
+
import { X as y } from "../icons/index.js";
|
|
4
|
+
import { NOTE_COLOR_LABELS as L } from "./notesAppearance.js";
|
|
5
|
+
import { noteColorClass as B } from "./notesOverlayHelpers.js";
|
|
6
|
+
import { NOTE_COLOR_TOKENS as I } from "./types.js";
|
|
7
|
+
import { Input as P, Textarea as x } from "../ui/Input.js";
|
|
8
|
+
import { Button as _ } from "../ui/Button.js";
|
|
9
|
+
var D = /* @__PURE__ */ h('<div class="notes-flyout notes-flyout--editor"data-floe-notes-boundary=true><div class=notes-flyout__header><div><div class=notes-editor__label>Edit note</div><div class=notes-flyout__title></div></div><button type=button class=notes-flyout__close aria-label="Close editor"></button></div><div class=notes-editor><div class=notes-editor__palette><div class=notes-editor__label>Color</div><div class=notes-editor__swatches></div></div><div class="notes-editor__field notes-editor__field--headline"><div class=notes-editor__label>Headline</div></div><div class=notes-editor__field><div class=notes-editor__label>Text</div></div></div><div class=notes-flyout__footer>'), F = /* @__PURE__ */ h("<button type=button><span>"), R = /* @__PURE__ */ h('<div class="notes-flyout notes-flyout--paste"data-floe-notes-boundary=true><div class=notes-flyout__header><div><div class=notes-editor__label>Manual paste</div><div class=notes-flyout__title>Clipboard access was unavailable</div></div><button type=button class=notes-flyout__close aria-label="Close paste panel"></button></div><div class=notes-flyout__body></div><div class=notes-flyout__footer>');
|
|
10
|
+
function G(e) {
|
|
11
11
|
return (() => {
|
|
12
|
-
var i =
|
|
13
|
-
|
|
14
|
-
var
|
|
15
|
-
|
|
12
|
+
var i = D(), a = i.firstChild, u = a.firstChild, c = u.firstChild, v = c.nextSibling, r = u.nextSibling, n = a.nextSibling, g = n.firstChild, S = g.firstChild, w = S.nextSibling, f = g.nextSibling;
|
|
13
|
+
f.firstChild;
|
|
14
|
+
var C = f.nextSibling;
|
|
15
|
+
C.firstChild;
|
|
16
|
+
var b = n.nextSibling;
|
|
17
|
+
return i.$$pointerdown = (o) => o.stopPropagation(), t(v, () => e.note?.body.trim() ? "Refine note" : "Compose note"), r.$$click = () => e.onClose(), t(r, l(y, {
|
|
16
18
|
class: "w-4 h-4"
|
|
17
|
-
})),
|
|
18
|
-
each:
|
|
19
|
+
})), t(w, l(p, {
|
|
20
|
+
each: I,
|
|
19
21
|
children: (o) => (() => {
|
|
20
|
-
var
|
|
21
|
-
return
|
|
22
|
-
var $ = `notes-editor__swatch ${
|
|
23
|
-
return $ !==
|
|
22
|
+
var d = F(), T = d.firstChild;
|
|
23
|
+
return d.$$click = () => e.onDraftColorChange(o), t(T, () => L[o]), O((s) => {
|
|
24
|
+
var $ = `notes-editor__swatch ${B(o)}`, m = e.draftColor === o;
|
|
25
|
+
return $ !== s.e && E(d, s.e = $), m !== s.t && d.classList.toggle("is-active", s.t = m), s;
|
|
24
26
|
}, {
|
|
25
27
|
e: void 0,
|
|
26
28
|
t: void 0
|
|
27
|
-
}),
|
|
29
|
+
}), d;
|
|
28
30
|
})()
|
|
29
|
-
})),
|
|
30
|
-
"data-floe-autofocus"
|
|
31
|
+
})), t(f, l(P, {
|
|
32
|
+
get "data-floe-autofocus"() {
|
|
33
|
+
return !e.note?.title.trim() && !e.note?.body.trim() ? !0 : void 0;
|
|
34
|
+
},
|
|
35
|
+
size: "lg",
|
|
36
|
+
get value() {
|
|
37
|
+
return e.draftTitle;
|
|
38
|
+
},
|
|
39
|
+
onInput: (o) => e.onDraftTitleChange(o.currentTarget.value),
|
|
40
|
+
placeholder: "Optional note headline",
|
|
41
|
+
helperText: "Shown as a large accent title on the card."
|
|
42
|
+
}), null), t(C, l(x, {
|
|
43
|
+
get "data-floe-autofocus"() {
|
|
44
|
+
return e.note?.title.trim() || e.note?.body.trim() ? !0 : void 0;
|
|
45
|
+
},
|
|
31
46
|
rows: 10,
|
|
32
47
|
get value() {
|
|
33
|
-
return
|
|
48
|
+
return e.draftBody;
|
|
34
49
|
},
|
|
35
|
-
onInput: (o) =>
|
|
50
|
+
onInput: (o) => e.onDraftBodyChange(o.currentTarget.value),
|
|
36
51
|
placeholder: "Type or paste anything worth keeping..."
|
|
37
|
-
}), null),
|
|
52
|
+
}), null), t(b, l(_, {
|
|
38
53
|
variant: "ghost",
|
|
39
54
|
get onClick() {
|
|
40
|
-
return
|
|
55
|
+
return e.onClose;
|
|
41
56
|
},
|
|
42
57
|
children: "Cancel"
|
|
43
|
-
}), null),
|
|
58
|
+
}), null), t(b, l(_, {
|
|
44
59
|
variant: "primary",
|
|
45
60
|
get onClick() {
|
|
46
|
-
return
|
|
61
|
+
return e.onSave;
|
|
47
62
|
},
|
|
48
63
|
children: "Save"
|
|
49
64
|
}), null), i;
|
|
50
65
|
})();
|
|
51
66
|
}
|
|
52
|
-
function
|
|
53
|
-
return l(
|
|
67
|
+
function J(e) {
|
|
68
|
+
return l(N, {
|
|
54
69
|
get when() {
|
|
55
|
-
return
|
|
70
|
+
return e.open;
|
|
56
71
|
},
|
|
57
72
|
get children() {
|
|
58
|
-
var i = R(),
|
|
59
|
-
return i.$$pointerdown = (n) => n.stopPropagation(), c.$$click = () =>
|
|
73
|
+
var i = R(), a = i.firstChild, u = a.firstChild, c = u.nextSibling, v = a.nextSibling, r = v.nextSibling;
|
|
74
|
+
return i.$$pointerdown = (n) => n.stopPropagation(), c.$$click = () => e.onClose(), t(c, l(y, {
|
|
60
75
|
class: "w-4 h-4"
|
|
61
|
-
})),
|
|
76
|
+
})), t(v, l(x, {
|
|
62
77
|
"data-floe-autofocus": !0,
|
|
63
78
|
rows: 12,
|
|
64
79
|
get value() {
|
|
65
|
-
return
|
|
80
|
+
return e.text;
|
|
66
81
|
},
|
|
67
|
-
onInput: (n) =>
|
|
82
|
+
onInput: (n) => e.onTextChange(n.currentTarget.value),
|
|
68
83
|
placeholder: "Paste clipboard text here..."
|
|
69
|
-
})),
|
|
84
|
+
})), t(r, l(_, {
|
|
70
85
|
variant: "ghost",
|
|
71
86
|
get onClick() {
|
|
72
|
-
return
|
|
87
|
+
return e.onClose;
|
|
73
88
|
},
|
|
74
89
|
children: "Cancel"
|
|
75
|
-
}), null),
|
|
90
|
+
}), null), t(r, l(_, {
|
|
76
91
|
variant: "primary",
|
|
77
92
|
get disabled() {
|
|
78
|
-
return !
|
|
93
|
+
return !e.text.trim();
|
|
79
94
|
},
|
|
80
95
|
get onClick() {
|
|
81
|
-
return
|
|
96
|
+
return e.onConfirm;
|
|
82
97
|
},
|
|
83
98
|
children: "Create note"
|
|
84
99
|
}), null), i;
|
|
85
100
|
}
|
|
86
101
|
});
|
|
87
102
|
}
|
|
88
|
-
|
|
103
|
+
k(["pointerdown", "click"]);
|
|
89
104
|
export {
|
|
90
|
-
|
|
91
|
-
|
|
105
|
+
G as NotesEditorFlyout,
|
|
106
|
+
J as NotesManualPasteFlyout
|
|
92
107
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { createComponent as o, insert as i, addEventListener as v, effect as y, setAttribute as k, Portal as
|
|
1
|
+
import { createComponent as o, insert as i, addEventListener as v, effect as y, setAttribute as k, Portal as c, memo as x, template as u, delegateEvents as $ } from "solid-js/web";
|
|
2
2
|
import { createEffect as D, onCleanup as I, Show as s } from "solid-js";
|
|
3
|
-
import { Motion as
|
|
4
|
-
import { easing as E, duration as
|
|
3
|
+
import { Motion as T } 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 E, duration as C } from "../../utils/animations.js";
|
|
5
5
|
import { useOverlayMask as F } from "../../hooks/useOverlayMask.js";
|
|
6
6
|
import { X as L } from "../icons/index.js";
|
|
7
7
|
import { NotesBoard as R } from "./NotesBoard.js";
|
|
@@ -12,7 +12,7 @@ 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
14
|
import { useNotesOverlayModel as j } from "./useNotesOverlayModel.js";
|
|
15
|
-
var A = /* @__PURE__ */
|
|
15
|
+
var A = /* @__PURE__ */ u('<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__ */ u("<button type=button class=notes-trash__toggle><div class=notes-trash__toggle-mark>"), H = /* @__PURE__ */ u("<div class=notes-overlay__body><div class=notes-trash data-floe-canvas-interactive=true>"), U = /* @__PURE__ */ u("<div class=notes-overview-backdrop data-floe-notes-boundary=true>"), X = /* @__PURE__ */ u("<div class=notes-overview-flyout data-floe-notes-boundary=true>"), Y = /* @__PURE__ */ u("<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;
|
|
@@ -72,7 +72,7 @@ function ge(r) {
|
|
|
72
72
|
return r.open;
|
|
73
73
|
},
|
|
74
74
|
get children() {
|
|
75
|
-
return o(
|
|
75
|
+
return o(T.section, {
|
|
76
76
|
ref(t) {
|
|
77
77
|
var n = g;
|
|
78
78
|
typeof n == "function" ? n(t) : g = t;
|
|
@@ -95,11 +95,11 @@ function ge(r) {
|
|
|
95
95
|
},
|
|
96
96
|
get transition() {
|
|
97
97
|
return {
|
|
98
|
-
duration:
|
|
98
|
+
duration: C.fast
|
|
99
99
|
};
|
|
100
100
|
},
|
|
101
101
|
get children() {
|
|
102
|
-
return [o(
|
|
102
|
+
return [o(T.div, {
|
|
103
103
|
class: "notes-overlay__frame",
|
|
104
104
|
"data-floe-notes-boundary": "true",
|
|
105
105
|
initial: {
|
|
@@ -114,7 +114,7 @@ function ge(r) {
|
|
|
114
114
|
},
|
|
115
115
|
get transition() {
|
|
116
116
|
return {
|
|
117
|
-
duration:
|
|
117
|
+
duration: C.normal,
|
|
118
118
|
easing: E.easeOut
|
|
119
119
|
};
|
|
120
120
|
},
|
|
@@ -305,7 +305,7 @@ function ge(r) {
|
|
|
305
305
|
return x(() => !!e.board.isMobile())() && e.board.overviewOpen();
|
|
306
306
|
},
|
|
307
307
|
get children() {
|
|
308
|
-
return o(
|
|
308
|
+
return o(c, {
|
|
309
309
|
get children() {
|
|
310
310
|
return [(() => {
|
|
311
311
|
var t = U();
|
|
@@ -343,7 +343,7 @@ function ge(r) {
|
|
|
343
343
|
}
|
|
344
344
|
});
|
|
345
345
|
}
|
|
346
|
-
}), o(
|
|
346
|
+
}), o(c, {
|
|
347
347
|
get children() {
|
|
348
348
|
return o(W, {
|
|
349
349
|
get open() {
|
|
@@ -380,7 +380,7 @@ function ge(r) {
|
|
|
380
380
|
return e.contextMenu.state();
|
|
381
381
|
},
|
|
382
382
|
get children() {
|
|
383
|
-
return o(
|
|
383
|
+
return o(c, {
|
|
384
384
|
get children() {
|
|
385
385
|
return [(() => {
|
|
386
386
|
var t = Y();
|
|
@@ -404,18 +404,24 @@ function ge(r) {
|
|
|
404
404
|
return !!e.editor.note();
|
|
405
405
|
},
|
|
406
406
|
get children() {
|
|
407
|
-
return o(
|
|
407
|
+
return o(c, {
|
|
408
408
|
get children() {
|
|
409
409
|
return o(P, {
|
|
410
410
|
get note() {
|
|
411
411
|
return e.editor.note();
|
|
412
412
|
},
|
|
413
|
+
get draftTitle() {
|
|
414
|
+
return e.editor.draftTitle();
|
|
415
|
+
},
|
|
413
416
|
get draftBody() {
|
|
414
417
|
return e.editor.draftBody();
|
|
415
418
|
},
|
|
416
419
|
get draftColor() {
|
|
417
420
|
return e.editor.draftColor();
|
|
418
421
|
},
|
|
422
|
+
get onDraftTitleChange() {
|
|
423
|
+
return e.editor.setDraftTitle;
|
|
424
|
+
},
|
|
419
425
|
get onDraftBodyChange() {
|
|
420
426
|
return e.editor.setDraftBody;
|
|
421
427
|
},
|
|
@@ -432,7 +438,7 @@ function ge(r) {
|
|
|
432
438
|
}
|
|
433
439
|
});
|
|
434
440
|
}
|
|
435
|
-
}), o(
|
|
441
|
+
}), o(c, {
|
|
436
442
|
get children() {
|
|
437
443
|
return o(Z, {
|
|
438
444
|
get open() {
|