@floegence/floe-webapp-core 0.78.10 → 0.79.0
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/layout/Shell.d.ts +2 -0
- package/dist/components/layout/Shell.js +268 -207
- package/dist/components/notes/notesOverlayHelpers.d.ts +0 -1
- package/dist/components/notes/notesOverlayHelpers.js +26 -27
- package/dist/components/notes/useNotesOverlayModel.js +196 -201
- package/dist/components/ui/Dialog.d.ts +2 -0
- package/dist/components/ui/Dialog.js +78 -74
- package/dist/components/ui/FloatingWindow.js +86 -85
- package/dist/context/LayoutContext.d.ts +2 -0
- package/dist/context/LayoutContext.js +43 -30
- package/dist/context/index.d.ts +1 -1
- package/dist/floe.css +10 -0
- package/dist/full.js +331 -328
- package/dist/hooks/createAdaptiveSidebar.d.ts +12 -0
- package/dist/hooks/createAdaptiveSidebar.js +12 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/useMediaQuery.d.ts +2 -4
- package/dist/hooks/useMediaQuery.js +12 -11
- package/dist/index.js +102 -99
- package/dist/styles.css +1 -1
- package/dist/widgets/TerminalWidget.js +71 -72
- package/package.json +1 -1
|
@@ -3,7 +3,6 @@ export declare const NOTES_TRASH_RETENTION_MS: number;
|
|
|
3
3
|
export declare const NOTES_CANVAS_ZOOM_STEP = 1.18;
|
|
4
4
|
export declare const NOTES_DEFAULT_FRAME_WIDTH = 1280;
|
|
5
5
|
export declare const NOTES_DEFAULT_FRAME_HEIGHT = 880;
|
|
6
|
-
export declare const NOTES_MOBILE_BREAKPOINT_PX = 960;
|
|
7
6
|
export interface NotesCanvasPlacement {
|
|
8
7
|
topicID: string;
|
|
9
8
|
worldX: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { NOTE_BUCKET_METRICS as c, clampScale as u, centerViewportOnWorldPoint as d } from "./types.js";
|
|
2
|
-
const l = 4320 * 60 * 1e3,
|
|
2
|
+
const l = 4320 * 60 * 1e3, X = 1.18, s = 1280, f = 880, w = Object.freeze({
|
|
3
3
|
amber: "butter",
|
|
4
4
|
azure: "mist",
|
|
5
5
|
coral: "coral",
|
|
@@ -21,26 +21,26 @@ function m(e, t, n, i) {
|
|
|
21
21
|
const r = i - n;
|
|
22
22
|
return !Number.isFinite(r) || r <= 0 ? e : t >= r ? n + r / 2 : a(e, n + t / 2, i - t / 2);
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function E(e, t, n) {
|
|
25
25
|
return {
|
|
26
26
|
x: a((e - n.left) / n.width, 0, 1),
|
|
27
27
|
y: a((t - n.top) / n.height, 0, 1)
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
|
-
function
|
|
30
|
+
function g(e) {
|
|
31
31
|
return String(e ?? "").replace(/\r\n/g, `
|
|
32
32
|
`).trim();
|
|
33
33
|
}
|
|
34
34
|
function S(e) {
|
|
35
35
|
return String(e ?? "").replace(/\s+/g, " ").trim();
|
|
36
36
|
}
|
|
37
|
-
function
|
|
38
|
-
const n =
|
|
37
|
+
function N(e, t) {
|
|
38
|
+
const n = g(e).replace(/\n{3,}/g, `
|
|
39
39
|
|
|
40
40
|
`);
|
|
41
41
|
return n ? n.length <= t ? n : `${n.slice(0, Math.max(0, t - 1)).trimEnd()}...` : "Empty note";
|
|
42
42
|
}
|
|
43
|
-
function
|
|
43
|
+
function Y(e, t = Date.now()) {
|
|
44
44
|
const n = Math.max(0, l - (t - e)), i = Math.ceil(n / (3600 * 1e3));
|
|
45
45
|
if (i >= 24) {
|
|
46
46
|
const r = Math.floor(i / 24), o = i % 24;
|
|
@@ -48,7 +48,7 @@ function v(e, t = Date.now()) {
|
|
|
48
48
|
}
|
|
49
49
|
return `${Math.max(1, i)}h left`;
|
|
50
50
|
}
|
|
51
|
-
function
|
|
51
|
+
function v(e) {
|
|
52
52
|
return new Intl.DateTimeFormat(void 0, {
|
|
53
53
|
month: "short",
|
|
54
54
|
day: "numeric",
|
|
@@ -56,10 +56,10 @@ function C(e) {
|
|
|
56
56
|
minute: "2-digit"
|
|
57
57
|
}).format(e);
|
|
58
58
|
}
|
|
59
|
-
function
|
|
59
|
+
function T(e) {
|
|
60
60
|
return `notes-note--${w[e]}`;
|
|
61
61
|
}
|
|
62
|
-
function
|
|
62
|
+
function C(e) {
|
|
63
63
|
return `notes-topic-tone--${x[e]}`;
|
|
64
64
|
}
|
|
65
65
|
function _(e) {
|
|
@@ -69,7 +69,7 @@ function _(e) {
|
|
|
69
69
|
height: e.maxY - e.minY
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function y(e, t) {
|
|
73
73
|
const n = t.maxX - t.minX, i = t.maxY - t.minY;
|
|
74
74
|
return _({
|
|
75
75
|
minX: Math.min(e.minX - n / 2, t.minX),
|
|
@@ -84,7 +84,7 @@ function M(e) {
|
|
|
84
84
|
height: e.height > 0 ? e.height : typeof window > "u" ? f : window.innerHeight
|
|
85
85
|
};
|
|
86
86
|
}
|
|
87
|
-
function
|
|
87
|
+
function p(e) {
|
|
88
88
|
const t = u(e.scale ?? e.viewport.scale), n = M(e.frame), i = n.width / t, r = n.height / t, o = m(
|
|
89
89
|
e.worldX,
|
|
90
90
|
i,
|
|
@@ -108,14 +108,14 @@ function F(e, t) {
|
|
|
108
108
|
const n = c[e.size_bucket];
|
|
109
109
|
return {
|
|
110
110
|
id: e.note_id,
|
|
111
|
-
className:
|
|
111
|
+
className: T(e.color_token),
|
|
112
112
|
x: (e.x - t.minX) / t.width * 100,
|
|
113
113
|
y: (e.y - t.minY) / t.height * 100,
|
|
114
114
|
width: n.width / t.width * 100,
|
|
115
115
|
height: n.height / t.height * 100
|
|
116
116
|
};
|
|
117
117
|
}
|
|
118
|
-
function
|
|
118
|
+
function A(e) {
|
|
119
119
|
const t = typeof window > "u" ? e.clientX : window.innerWidth - e.menuWidth, n = typeof window > "u" ? e.clientY : window.innerHeight - e.menuHeight;
|
|
120
120
|
return {
|
|
121
121
|
left: Math.max(16, Math.min(e.clientX, t)),
|
|
@@ -131,33 +131,32 @@ function z(e, t) {
|
|
|
131
131
|
function H(e, t) {
|
|
132
132
|
return e.reduce((n, i) => n + (i.topic_id === t ? 1 : 0), 0);
|
|
133
133
|
}
|
|
134
|
-
function
|
|
134
|
+
function I(e, t) {
|
|
135
135
|
return e.x === t.x && e.y === t.y;
|
|
136
136
|
}
|
|
137
137
|
export {
|
|
138
|
-
|
|
138
|
+
X as NOTES_CANVAS_ZOOM_STEP,
|
|
139
139
|
f as NOTES_DEFAULT_FRAME_HEIGHT,
|
|
140
140
|
s as NOTES_DEFAULT_FRAME_WIDTH,
|
|
141
|
-
X as NOTES_MOBILE_BREAKPOINT_PX,
|
|
142
141
|
l as NOTES_TRASH_RETENTION_MS,
|
|
143
142
|
_ as buildOverviewBounds,
|
|
144
143
|
a as clamp,
|
|
145
144
|
m as clampOverviewCenter,
|
|
146
|
-
|
|
145
|
+
A as createContextMenuPosition,
|
|
147
146
|
F as createOverviewItem,
|
|
148
147
|
H as findTrashTopicNoteCount,
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
148
|
+
v as formatDeletedTimestamp,
|
|
149
|
+
Y as formatRemainingTrashTime,
|
|
150
|
+
E as getNormalizedOverviewPoint,
|
|
151
|
+
N as getNotePreviewText,
|
|
153
152
|
z as hasLiveNotesForTopic,
|
|
154
|
-
|
|
153
|
+
g as normalizeNoteText,
|
|
155
154
|
S as normalizeNoteTitle,
|
|
156
|
-
|
|
155
|
+
T as noteColorClass,
|
|
157
156
|
W as notePreviewMetrics,
|
|
158
|
-
|
|
157
|
+
p as resolveCenteredViewport,
|
|
159
158
|
M as resolveFrameSize,
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
159
|
+
y as resolveOverviewBounds,
|
|
160
|
+
I as samePoint,
|
|
161
|
+
C as topicAccentClass
|
|
163
162
|
};
|