@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.
@@ -1,104 +1,119 @@
1
- import { insert as u, createComponent as h, memo as N, effect as O, className as z, setAttribute as A, setStyleProperty as b, template as T, delegateEvents as R } from "solid-js/web";
2
- import { createSignal as j, onCleanup as B, untrack as E, createMemo as w } from "solid-js";
3
- import { startHotInteraction as G } from "../../utils/hotInteraction.js";
4
- import { GripVertical as H, Pencil as K, Trash as V, Check as Z } from "../icons/index.js";
5
- import { notePreviewMetrics as q, getNotePreviewText as J, noteColorClass as Q, samePoint as U } from "./notesOverlayHelpers.js";
6
- var p = /* @__PURE__ */ T('<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><span>'), tt = /* @__PURE__ */ T("<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 et = '[data-floe-notes-front-skip="true"]';
8
- function lt(t) {
9
- const [f, C] = j(null);
10
- let c;
11
- B(() => {
12
- c?.abort(), c = void 0, E(f)?.stopInteraction();
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 $ = w(() => q(t.item)), W = w(() => J(t.item.body, $().preview_limit)), D = w(() => !t.item.body.trim()), x = () => f() !== null, y = w(() => {
15
- const e = f();
16
- return e ? {
17
- x: e.worldX,
18
- y: e.worldY
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: t.item.x,
21
- y: t.item.y
20
+ x: e.item.x,
21
+ y: e.item.y
22
22
  };
23
- }), F = (e) => !(e instanceof Element && e.closest(et)), k = (e) => {
24
- const i = E(f);
25
- if (!i) return;
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: i.worldX,
28
- y: i.worldY
29
- }, s = {
30
- x: i.startWorldX,
31
- y: i.startWorldY
32
- }, m = e && !U(r, s);
33
- m && t.onSeedMoveProjection(t.item.note_id, r), i.stopInteraction(), C(null), c?.abort(), c = void 0, t.onCommitFront(t.item.note_id), m && t.onCommitMove(t.item.note_id, r);
34
- }, L = (e) => {
35
- if (e.button !== 0) return;
36
- e.preventDefault(), e.stopPropagation(), c?.abort(), t.onStartOptimisticFront(t.item.note_id);
37
- const i = G({
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(t.viewportScale, 1e-3);
40
+ }), r = Math.max(e.viewportScale, 1e-3);
41
41
  C({
42
- pointerId: e.pointerId,
43
- startClientX: e.clientX,
44
- startClientY: e.clientY,
45
- startWorldX: t.item.x,
46
- startWorldY: t.item.y,
47
- worldX: t.item.x,
48
- worldY: t.item.y,
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: i
51
+ stopInteraction: a
52
52
  });
53
- const s = (a) => {
54
- C((n) => {
55
- if (!n || n.pointerId !== a.pointerId) return n;
56
- const o = n.startWorldX + (a.clientX - n.startClientX) / n.scale, l = n.startWorldY + (a.clientY - n.startClientY) / n.scale;
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
- ...n,
59
- worldX: o,
60
- worldY: l,
61
- moved: n.moved || Math.abs(o - n.startWorldX) > 2 || Math.abs(l - n.startWorldY) > 2
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
- }, m = (a) => {
65
- a.pointerId === e.pointerId && k(!0);
66
- }, v = (a) => {
67
- a.pointerId === e.pointerId && k(!1);
68
- }, d = new AbortController();
69
- c = d, window.addEventListener("pointermove", s, {
70
- signal: d.signal
71
- }), window.addEventListener("pointerup", m, {
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: d.signal
74
- }), window.addEventListener("pointercancel", v, {
73
+ signal: m.signal
74
+ }), window.addEventListener("pointercancel", g, {
75
75
  once: !0,
76
- signal: d.signal
76
+ signal: m.signal
77
77
  });
78
78
  };
79
79
  return (() => {
80
- var e = p(), i = e.firstChild, r = i.firstChild, s = r.firstChild, m = s.nextSibling, v = m.firstChild, d = v.nextSibling, a = r.nextSibling, n = a.firstChild;
81
- return e.$$click = (o) => {
82
- F(o.target) && t.onCommitFront(t.item.note_id);
83
- }, e.$$contextmenu = (o) => {
84
- o.preventDefault(), o.stopPropagation(), t.onOpenContextMenu(o, t.item);
85
- }, s.$$pointerdown = L, u(s, h(H, {
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
- })), v.$$click = () => t.onOpenEditor(t.item.note_id), u(v, h(K, {
87
+ })), g.$$click = () => e.onOpenEditor(e.item.note_id), l(g, $(U, {
88
88
  class: "w-3.5 h-3.5"
89
- })), d.$$click = () => t.onMoveToTrash(t.item.note_id), u(d, h(V, {
89
+ })), m.$$click = () => e.onMoveToTrash(e.item.note_id), l(m, $(p, {
90
90
  class: "w-3.5 h-3.5"
91
- })), a.$$click = () => t.onCopy(t.item), u(n, W), u(i, (() => {
92
- var o = N(() => !!t.copied);
93
- return () => o() ? (() => {
94
- var l = tt(), _ = l.firstChild, g = _.firstChild;
95
- return u(g, h(Z, {
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
- })), l;
112
+ })), i;
98
113
  })() : null;
99
- })(), null), O((o) => {
100
- var l = `${Q(t.item.color_token)} notes-note notes-note--size-${t.item.size_bucket - 1}`, _ = !!t.copied, g = !!x(), I = t.item.note_id, M = `translate(${y().x}px, ${y().y}px)`, S = `${$().width}px`, X = `${$().height}px`, Y = x() || t.optimisticFront ? `${t.topZIndex + 1}` : `${t.item.z_index}`, P = !!D();
101
- return l !== o.e && z(e, o.e = l), _ !== o.t && e.classList.toggle("is-copied", o.t = _), g !== o.a && e.classList.toggle("is-dragging", o.a = g), I !== o.o && A(e, "data-floe-notes-note-id", o.o = I), M !== o.i && b(e, "transform", o.i = M), S !== o.n && b(e, "--note-width", o.n = S), X !== o.s && b(e, "--note-height", o.s = X), Y !== o.h && b(e, "z-index", o.h = Y), P !== o.r && a.classList.toggle("is-empty", o.r = P), o;
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
- }), e;
126
+ r: void 0,
127
+ d: void 0,
128
+ l: void 0,
129
+ u: void 0
130
+ }), o;
113
131
  })();
114
132
  }
115
- R(["contextmenu", "click", "pointerdown"]);
133
+ V(["contextmenu", "click", "pointerdown"]);
116
134
  export {
117
- lt as NotesBoardNote
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 e, createComponent as l, effect as w, className as T, template as f, delegateEvents as E } from "solid-js/web";
2
- import { For as O, Show as k } from "solid-js";
3
- import { X as m } from "../icons/index.js";
4
- import { NOTE_COLOR_LABELS as N } from "./notesAppearance.js";
5
- import { noteColorClass as L } from "./notesOverlayHelpers.js";
6
- import { NOTE_COLOR_TOKENS as B } from "./types.js";
7
- import { Textarea as y } from "../ui/Input.js";
8
- import { Button as v } from "../ui/Button.js";
9
- var P = /* @__PURE__ */ f('<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><div class=notes-editor__label>Text</div></div></div><div class=notes-flyout__footer>'), F = /* @__PURE__ */ f("<button type=button><span>"), R = /* @__PURE__ */ f('<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 z(t) {
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 = P(), r = i.firstChild, u = r.firstChild, c = u.firstChild, _ = c.nextSibling, a = u.nextSibling, n = r.nextSibling, C = n.firstChild, x = C.firstChild, S = x.nextSibling, h = C.nextSibling;
13
- h.firstChild;
14
- var g = n.nextSibling;
15
- return i.$$pointerdown = (o) => o.stopPropagation(), e(_, () => t.note?.body.trim() ? "Refine note" : "Compose note"), a.$$click = () => t.onClose(), e(a, l(m, {
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
- })), e(S, l(O, {
18
- each: B,
19
+ })), t(w, l(p, {
20
+ each: I,
19
21
  children: (o) => (() => {
20
- var s = F(), p = s.firstChild;
21
- return s.$$click = () => t.onDraftColorChange(o), e(p, () => N[o]), w((d) => {
22
- var $ = `notes-editor__swatch ${L(o)}`, b = t.draftColor === o;
23
- return $ !== d.e && T(s, d.e = $), b !== d.t && s.classList.toggle("is-active", d.t = b), d;
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
- }), s;
29
+ }), d;
28
30
  })()
29
- })), e(h, l(y, {
30
- "data-floe-autofocus": !0,
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 t.draftBody;
48
+ return e.draftBody;
34
49
  },
35
- onInput: (o) => t.onDraftBodyChange(o.currentTarget.value),
50
+ onInput: (o) => e.onDraftBodyChange(o.currentTarget.value),
36
51
  placeholder: "Type or paste anything worth keeping..."
37
- }), null), e(g, l(v, {
52
+ }), null), t(b, l(_, {
38
53
  variant: "ghost",
39
54
  get onClick() {
40
- return t.onClose;
55
+ return e.onClose;
41
56
  },
42
57
  children: "Cancel"
43
- }), null), e(g, l(v, {
58
+ }), null), t(b, l(_, {
44
59
  variant: "primary",
45
60
  get onClick() {
46
- return t.onSave;
61
+ return e.onSave;
47
62
  },
48
63
  children: "Save"
49
64
  }), null), i;
50
65
  })();
51
66
  }
52
- function G(t) {
53
- return l(k, {
67
+ function J(e) {
68
+ return l(N, {
54
69
  get when() {
55
- return t.open;
70
+ return e.open;
56
71
  },
57
72
  get children() {
58
- var i = R(), r = i.firstChild, u = r.firstChild, c = u.nextSibling, _ = r.nextSibling, a = _.nextSibling;
59
- return i.$$pointerdown = (n) => n.stopPropagation(), c.$$click = () => t.onClose(), e(c, l(m, {
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
- })), e(_, l(y, {
76
+ })), t(v, l(x, {
62
77
  "data-floe-autofocus": !0,
63
78
  rows: 12,
64
79
  get value() {
65
- return t.text;
80
+ return e.text;
66
81
  },
67
- onInput: (n) => t.onTextChange(n.currentTarget.value),
82
+ onInput: (n) => e.onTextChange(n.currentTarget.value),
68
83
  placeholder: "Paste clipboard text here..."
69
- })), e(a, l(v, {
84
+ })), t(r, l(_, {
70
85
  variant: "ghost",
71
86
  get onClick() {
72
- return t.onClose;
87
+ return e.onClose;
73
88
  },
74
89
  children: "Cancel"
75
- }), null), e(a, l(v, {
90
+ }), null), t(r, l(_, {
76
91
  variant: "primary",
77
92
  get disabled() {
78
- return !t.text.trim();
93
+ return !e.text.trim();
79
94
  },
80
95
  get onClick() {
81
- return t.onConfirm;
96
+ return e.onConfirm;
82
97
  },
83
98
  children: "Create note"
84
99
  }), null), i;
85
100
  }
86
101
  });
87
102
  }
88
- E(["pointerdown", "click"]);
103
+ k(["pointerdown", "click"]);
89
104
  export {
90
- z as NotesEditorFlyout,
91
- G as NotesManualPasteFlyout
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 u, memo as x, template as c, delegateEvents as $ } from "solid-js/web";
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 C } 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 T } from "../../utils/animations.js";
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__ */ 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>");
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(C.section, {
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: T.fast
98
+ duration: C.fast
99
99
  };
100
100
  },
101
101
  get children() {
102
- return [o(C.div, {
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: T.normal,
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(u, {
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(u, {
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(u, {
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(u, {
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(u, {
441
+ }), o(c, {
436
442
  get children() {
437
443
  return o(Z, {
438
444
  get open() {