@cloudgrid-io/ui 0.68.0 → 0.70.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/badge/marks.d.ts +2 -0
- package/dist/badge/marks.d.ts.map +1 -1
- package/dist/badge/marks.js +5 -0
- package/dist/badge/marks.js.map +1 -1
- package/dist/badge/watermark.js +2 -2
- package/dist/badge/watermark.js.map +1 -1
- package/dist/blocks/browse-categories.d.ts +80 -0
- package/dist/blocks/browse-categories.d.ts.map +1 -0
- package/dist/blocks/browse-categories.js +106 -0
- package/dist/blocks/browse-categories.js.map +1 -0
- package/dist/blocks/creation-search.d.ts +145 -102
- package/dist/blocks/creation-search.d.ts.map +1 -1
- package/dist/blocks/creation-search.js +502 -125
- package/dist/blocks/creation-search.js.map +1 -1
- package/dist/blocks/entity-card.d.ts +23 -8
- package/dist/blocks/entity-card.d.ts.map +1 -1
- package/dist/blocks/entity-card.js +25 -47
- package/dist/blocks/entity-card.js.map +1 -1
- package/dist/blocks/feed-row.d.ts +92 -0
- package/dist/blocks/feed-row.d.ts.map +1 -0
- package/dist/blocks/feed-row.js +30 -0
- package/dist/blocks/feed-row.js.map +1 -0
- package/dist/blocks/filter-tabs.d.ts +12 -1
- package/dist/blocks/filter-tabs.d.ts.map +1 -1
- package/dist/blocks/filter-tabs.js +11 -2
- package/dist/blocks/filter-tabs.js.map +1 -1
- package/dist/blocks/greeting.d.ts +42 -0
- package/dist/blocks/greeting.d.ts.map +1 -0
- package/dist/blocks/greeting.js +38 -0
- package/dist/blocks/greeting.js.map +1 -0
- package/dist/blocks/header-menu.d.ts +35 -2
- package/dist/blocks/header-menu.d.ts.map +1 -1
- package/dist/blocks/header-menu.js +67 -3
- package/dist/blocks/header-menu.js.map +1 -1
- package/dist/blocks/help-menu.d.ts +18 -3
- package/dist/blocks/help-menu.d.ts.map +1 -1
- package/dist/blocks/help-menu.js +59 -6
- package/dist/blocks/help-menu.js.map +1 -1
- package/dist/blocks/home-bento.d.ts +11 -4
- package/dist/blocks/home-bento.d.ts.map +1 -1
- package/dist/blocks/home-bento.js +22 -6
- package/dist/blocks/home-bento.js.map +1 -1
- package/dist/blocks/home-pinned.d.ts +87 -3
- package/dist/blocks/home-pinned.d.ts.map +1 -1
- package/dist/blocks/home-pinned.js +205 -12
- package/dist/blocks/home-pinned.js.map +1 -1
- package/dist/blocks/icons.d.ts +54 -6
- package/dist/blocks/icons.d.ts.map +1 -1
- package/dist/blocks/icons.js +67 -6
- package/dist/blocks/icons.js.map +1 -1
- package/dist/blocks/impact-card.d.ts +105 -0
- package/dist/blocks/impact-card.d.ts.map +1 -0
- package/dist/blocks/impact-card.js +57 -0
- package/dist/blocks/impact-card.js.map +1 -0
- package/dist/blocks/inspiration-cards.d.ts +251 -5
- package/dist/blocks/inspiration-cards.d.ts.map +1 -1
- package/dist/blocks/inspiration-cards.js +348 -8
- package/dist/blocks/inspiration-cards.js.map +1 -1
- package/dist/blocks/jump-back-in.d.ts +249 -0
- package/dist/blocks/jump-back-in.d.ts.map +1 -0
- package/dist/blocks/jump-back-in.js +272 -0
- package/dist/blocks/jump-back-in.js.map +1 -0
- package/dist/blocks/load-more-grid.d.ts +125 -0
- package/dist/blocks/load-more-grid.d.ts.map +1 -0
- package/dist/blocks/load-more-grid.js +157 -0
- package/dist/blocks/load-more-grid.js.map +1 -0
- package/dist/blocks/menu-trigger.d.ts +7 -2
- package/dist/blocks/menu-trigger.d.ts.map +1 -1
- package/dist/blocks/menu-trigger.js +2 -0
- package/dist/blocks/menu-trigger.js.map +1 -1
- package/dist/blocks/phosphor-marks.d.ts +17 -1
- package/dist/blocks/phosphor-marks.d.ts.map +1 -1
- package/dist/blocks/phosphor-marks.js +25 -1
- package/dist/blocks/phosphor-marks.js.map +1 -1
- package/dist/blocks/recent-plugs.js +1 -1
- package/dist/blocks/recent-plugs.js.map +1 -1
- package/dist/blocks/start-card.d.ts +76 -0
- package/dist/blocks/start-card.d.ts.map +1 -0
- package/dist/blocks/start-card.js +82 -0
- package/dist/blocks/start-card.js.map +1 -0
- package/dist/blocks/top-creations.js +1 -1
- package/dist/blocks/top-creations.js.map +1 -1
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/fade-in-picture.d.ts +37 -0
- package/dist/lib/fade-in-picture.d.ts.map +1 -0
- package/dist/lib/fade-in-picture.js +72 -0
- package/dist/lib/fade-in-picture.js.map +1 -0
- package/dist/lib/motion.d.ts +14 -0
- package/dist/lib/motion.d.ts.map +1 -1
- package/dist/lib/motion.js +4 -0
- package/dist/lib/motion.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type HomeCreation, type RecentlyOpenedCreation } from "./home-pinned.js";
|
|
3
|
+
/**
|
|
4
|
+
* JUMP BACK IN (ui#605, Asaf's design for console#1182, 2026-11-25, on top of
|
|
5
|
+
* Tamir's issue): the block both front pages place, and its "See all" window.
|
|
6
|
+
*
|
|
7
|
+
* Presentational, as the Home's pieces are: the pins, the recent opens, the
|
|
8
|
+
* window's rows and every handler are the caller's; nothing here fetches, and
|
|
9
|
+
* nothing here decides what is pinned.
|
|
10
|
+
*
|
|
11
|
+
* ## The block (`JumpBackIn`)
|
|
12
|
+
*
|
|
13
|
+
* One card, in the Home's card shell, the one every Home card wears
|
|
14
|
+
* (`BentoCard`'s look, class for class): `bg-card`, the hairline edge
|
|
15
|
+
* (`border-hairline`), radius 12 (`rounded-md`), 24 inside, no shadow. The
|
|
16
|
+
* issue first said radius 20 with the card shadow; the lead corrected it.
|
|
17
|
+
*
|
|
18
|
+
* header "Jump back in" at the Home's section title size (the
|
|
19
|
+
* `BentoCard` title: 20 bold on a 28 line), and 12 after it the
|
|
20
|
+
* line "Your pins, then what you opened last." in Small, muted
|
|
21
|
+
* (`text-faint-strong`); on a narrow card the line wraps under
|
|
22
|
+
* the title. At the far right, with `onSeeAll`, "See all N" and
|
|
23
|
+
* the arrow: the Home's teal text link (`ActionLink`, bold, the
|
|
24
|
+
* 16 arrow 6 after the words), a button that calls `onSeeAll`;
|
|
25
|
+
* the caller opens `JumpBackInWindow`
|
|
26
|
+
* Pinned "Pinned · N", a small label (Small, muted) after the outline
|
|
27
|
+
* pin, then `PinnedCreations` at its small size
|
|
28
|
+
* (`size="small"`, Asaf, 2026-11-26): the same small My
|
|
29
|
+
* creations cards, as many as fit at 192 or more (five of
|
|
30
|
+
* about 206 at the Console's 1440), sharing the row to its
|
|
31
|
+
* edge or the arrow, the arrows, Unpin on hover, and the
|
|
32
|
+
* "Pin a creation" slots filling the columns left, each My
|
|
33
|
+
* creations' empty card with the push pin, which stands up on
|
|
34
|
+
* hover. Its other props pass through untouched
|
|
35
|
+
* Recently "Recently opened", the same small label, then the recent
|
|
36
|
+
* opened opens as tiles (`RecentlyOpened layout="tiles"`): four in a
|
|
37
|
+
* row, two where four do not fit, one on a phone, "Continue"
|
|
38
|
+
* on the newest, "Pin it" on one that is not pinned
|
|
39
|
+
* spacing 16 between the header and the parts, 12 from a label to its row
|
|
40
|
+
*
|
|
41
|
+
* Each part can be absent. No `recent`, or none yet (the recent opens route is
|
|
42
|
+
* not live), and Recently opened is not drawn at all, not even its empty
|
|
43
|
+
* line. No `pinned` and Pinned is not drawn; an empty list is Pinned's own
|
|
44
|
+
* empty state, the soft slots.
|
|
45
|
+
*
|
|
46
|
+
* ## The window (`JumpBackInWindow`)
|
|
47
|
+
*
|
|
48
|
+
* The library's dialog, 680 wide where there is room (the search window's
|
|
49
|
+
* width, ui#531): the title "Everything you can open", the line "N creations
|
|
50
|
+
* across the spaces you belong to.", the tabs (`FilterTabs`): All with its
|
|
51
|
+
* count, Pinned with its count, Recently opened; and the rows. A row is the
|
|
52
|
+
* picture (64 by 40 at 8, the tiles' picture), the name, and under it "owner ·
|
|
53
|
+
* space · Opened 2h ago" (each part when known), the whole row the creation's
|
|
54
|
+
* link; at its end "Pinned" after the filled pin, or "+ Pin". With `onUnpin`
|
|
55
|
+
* "Pinned" is a button that unpins; with `onPin`, "+ Pin" pins. Both sit above
|
|
56
|
+
* the row's link, never inside it.
|
|
57
|
+
*
|
|
58
|
+
* The tabs filter the rows the caller gives (`jumpBackInRows`): All, every
|
|
59
|
+
* row; Pinned, those `pinned`; Recently opened, those with an `opened`. A
|
|
60
|
+
* caller that loads each tab's own rows (`onTabChange`) passes them as they
|
|
61
|
+
* come; the filter then changes nothing. A row whose id came before is never
|
|
62
|
+
* drawn again, so a page that repeats one cannot show it twice.
|
|
63
|
+
*
|
|
64
|
+
* It loads more as the reader scrolls: the rows are their own scrolling box,
|
|
65
|
+
* and when the reader is within 160 of its end (`JUMP_BACK_IN_LOAD_MARGIN`),
|
|
66
|
+
* or the rows do not fill it, `onLoadMore` is called, once for each count of
|
|
67
|
+
* the caller's rows, so a page that brings nothing the tab shows, or only
|
|
68
|
+
* repeats, still counts as come (`jumpBackInShouldLoad`,
|
|
69
|
+
* `jumpBackInLoadSettled`, `jumpBackInLoadAsk`). A load that ended without
|
|
70
|
+
* new rows (a failed page) is asked again on the reader's next scroll, wheel
|
|
71
|
+
* or touch on the rows, or tab, never by itself; not while `loading`, not without `hasMore`,
|
|
72
|
+
* and not again until the caller's rows have grown. While
|
|
73
|
+
* `loading`, a skeleton row stands at the end. Not in this cut: Edit pins,
|
|
74
|
+
* search, "Most used".
|
|
75
|
+
*
|
|
76
|
+
* An overlay: it portals to the body, out of any surface scope, so it is the
|
|
77
|
+
* white popover on the card, the panel and ink alike.
|
|
78
|
+
*
|
|
79
|
+
* ## Tokens
|
|
80
|
+
*
|
|
81
|
+
* the label Small (`text-caption`) in `text-faint-strong`, the 16 outline
|
|
82
|
+
* pin in `text-faint`
|
|
83
|
+
* Continue the accent role (`--cg-text-accent`), as Pinned's filled pin
|
|
84
|
+
* Pinned the 15 filled pin in the accent role, "Pinned" in Small, muted
|
|
85
|
+
* + Pin Small Medium in the accent role, the 14 plus before it
|
|
86
|
+
* the rows 60 tall, 2 apart, radius 8, the hover wash
|
|
87
|
+
*/
|
|
88
|
+
/** Every line the block and the window write, as the design writes them. */
|
|
89
|
+
export declare const JUMP_BACK_IN_COPY: {
|
|
90
|
+
readonly title: "Jump back in";
|
|
91
|
+
readonly line: "Your pins, then what you opened last.";
|
|
92
|
+
readonly seeAll: "See all";
|
|
93
|
+
readonly pinned: "Pinned";
|
|
94
|
+
readonly recent: "Recently opened";
|
|
95
|
+
readonly windowTitle: "Everything you can open";
|
|
96
|
+
readonly tabsLabel: "Filter what you can open";
|
|
97
|
+
readonly tabAll: "All";
|
|
98
|
+
readonly tabPinned: "Pinned";
|
|
99
|
+
readonly tabRecent: "Recently opened";
|
|
100
|
+
readonly rowPinned: "Pinned";
|
|
101
|
+
readonly rowPin: "Pin";
|
|
102
|
+
readonly rowUnpin: "unpin";
|
|
103
|
+
readonly loading: "Loading more";
|
|
104
|
+
readonly emptyAll: "Creations you can open will appear here.";
|
|
105
|
+
readonly emptyPinned: "Nothing pinned yet. Pin a creation and it stays here.";
|
|
106
|
+
readonly emptyRecent: "Creations you open will appear here.";
|
|
107
|
+
};
|
|
108
|
+
/** The window's line: "15 creations across the spaces you belong to." */
|
|
109
|
+
export declare function jumpBackInWindowLine(count: number): string;
|
|
110
|
+
/** The window's tabs. */
|
|
111
|
+
export type JumpBackInTab = "all" | "pinned" | "recent";
|
|
112
|
+
/** A creation in the window. */
|
|
113
|
+
export type JumpBackInRow = HomeCreation & {
|
|
114
|
+
/** "You", or the owner's name. */
|
|
115
|
+
owner?: React.ReactNode;
|
|
116
|
+
/** The space it lives in. */
|
|
117
|
+
space?: React.ReactNode;
|
|
118
|
+
/** "Opened 2h ago", when known. A row with it is on Recently opened. */
|
|
119
|
+
opened?: React.ReactNode;
|
|
120
|
+
/** Whether the reader has pinned it: "Pinned" at the row's end, or "+ Pin". */
|
|
121
|
+
pinned?: boolean;
|
|
122
|
+
};
|
|
123
|
+
/**
|
|
124
|
+
* The rows a tab shows, in the caller's order: All every row, Pinned the
|
|
125
|
+
* pinned, Recently opened those with an `opened`. A row whose id came before
|
|
126
|
+
* is left out, so nothing shows twice.
|
|
127
|
+
*/
|
|
128
|
+
export declare function jumpBackInRows<T extends JumpBackInRow>(rows: readonly T[], tab: JumpBackInTab): T[];
|
|
129
|
+
/** How near the end of the rows, in px, the reader is when the next page is asked for. */
|
|
130
|
+
export declare const JUMP_BACK_IN_LOAD_MARGIN = 160;
|
|
131
|
+
/**
|
|
132
|
+
* Whether to ask for the next page: the reader is within `margin` of the end
|
|
133
|
+
* of the rows' box (or the rows do not fill it), there is more, nothing is
|
|
134
|
+
* loading, and either the rows have grown since the last ask (`count` and
|
|
135
|
+
* `askedAt` are the caller's rows, `rows.length`, not the rows a tab shows:
|
|
136
|
+
* a page that brings nothing the tab shows, or only repeats, still came), or
|
|
137
|
+
* the last load ended without new rows (`stalled`, a failed page) and the
|
|
138
|
+
* reader has just acted on the rows (`reader`: a scroll, a wheel or a touch on
|
|
139
|
+
* them, or a tab). A stalled load is never asked again by itself, so a
|
|
140
|
+
* failing feed is not asked in a loop (Nataly's review, PR #613).
|
|
141
|
+
*/
|
|
142
|
+
export declare function jumpBackInShouldLoad(view: {
|
|
143
|
+
scrollTop: number;
|
|
144
|
+
clientHeight: number;
|
|
145
|
+
scrollHeight: number;
|
|
146
|
+
}, state: {
|
|
147
|
+
hasMore: boolean;
|
|
148
|
+
loading: boolean;
|
|
149
|
+
count: number;
|
|
150
|
+
askedAt: number | null;
|
|
151
|
+
stalled?: boolean;
|
|
152
|
+
reader?: boolean;
|
|
153
|
+
}, margin?: number): boolean;
|
|
154
|
+
/**
|
|
155
|
+
* The window's paging bookkeeping between renders: `askedAt`, the caller's
|
|
156
|
+
* row count at the last ask (null before any, or after the list was
|
|
157
|
+
* replaced); `stalled`, the last load ended without new rows; `wasLoading`,
|
|
158
|
+
* `loading` at the last render.
|
|
159
|
+
*/
|
|
160
|
+
export type JumpBackInLoadTrack = {
|
|
161
|
+
askedAt: number | null;
|
|
162
|
+
stalled: boolean;
|
|
163
|
+
wasLoading: boolean;
|
|
164
|
+
};
|
|
165
|
+
/** The bookkeeping before the first ask. */
|
|
166
|
+
export declare const JUMP_BACK_IN_LOAD_START: JumpBackInLoadTrack;
|
|
167
|
+
/**
|
|
168
|
+
* The bookkeeping after a render with `rows` and `loading`: a load that has
|
|
169
|
+
* just ended with no more rows than when it was asked is stalled; a list
|
|
170
|
+
* shorter than at the last ask was replaced (a new tab's own rows, a reset),
|
|
171
|
+
* so it starts over.
|
|
172
|
+
*/
|
|
173
|
+
export declare function jumpBackInLoadSettled(track: JumpBackInLoadTrack, rows: readonly unknown[], loading: boolean): JumpBackInLoadTrack;
|
|
174
|
+
/**
|
|
175
|
+
* Whether to ask for the next page now, by `jumpBackInShouldLoad` with the
|
|
176
|
+
* caller's own `rows`: the bookkeeping after the ask, or null for no ask.
|
|
177
|
+
*/
|
|
178
|
+
export declare function jumpBackInLoadAsk(view: {
|
|
179
|
+
scrollTop: number;
|
|
180
|
+
clientHeight: number;
|
|
181
|
+
scrollHeight: number;
|
|
182
|
+
}, track: JumpBackInLoadTrack, now: {
|
|
183
|
+
rows: readonly unknown[];
|
|
184
|
+
hasMore: boolean;
|
|
185
|
+
loading: boolean;
|
|
186
|
+
reader?: boolean;
|
|
187
|
+
}): JumpBackInLoadTrack | null;
|
|
188
|
+
declare function JumpBackIn({ pinned, pinnedCount, recent, onUnpin, onAddPin, onPin, onOpen, onSeeAll, seeAllCount, linkComponent, title, line, seeAllLabel, pinnedLabel, recentLabel, level, className, ...props }: Omit<React.ComponentProps<"section">, "title" | "children"> & {
|
|
189
|
+
/** The pins, in the caller's order. Without it, no Pinned; empty, Pinned's soft slots. */
|
|
190
|
+
pinned?: readonly HomeCreation[];
|
|
191
|
+
/** The N in "Pinned · N". Defaults to how many `pinned` holds. */
|
|
192
|
+
pinnedCount?: number;
|
|
193
|
+
/** The recent opens, newest first. Without any, no Recently opened. */
|
|
194
|
+
recent?: readonly RecentlyOpenedCreation[];
|
|
195
|
+
/** Pinned's Unpin chip (PinnedCreations' own). */
|
|
196
|
+
onUnpin?: (item: HomeCreation) => void;
|
|
197
|
+
/** Pinned's empty slots, "Pin a creation" (PinnedCreations' own). */
|
|
198
|
+
onAddPin?: () => void;
|
|
199
|
+
/** "Pin it" on a recent tile that is not pinned. */
|
|
200
|
+
onPin?: (item: RecentlyOpenedCreation) => void;
|
|
201
|
+
/** Opens a creation that has no `href`. */
|
|
202
|
+
onOpen?: (item: HomeCreation) => void;
|
|
203
|
+
/** "See all N": the caller opens the window. No See all without it. */
|
|
204
|
+
onSeeAll?: () => void;
|
|
205
|
+
/** The N in "See all N": everything the reader can open. */
|
|
206
|
+
seeAllCount?: number;
|
|
207
|
+
/** The element a link renders through, for a router's own link. */
|
|
208
|
+
linkComponent?: React.ElementType;
|
|
209
|
+
title?: React.ReactNode;
|
|
210
|
+
line?: React.ReactNode;
|
|
211
|
+
seeAllLabel?: string;
|
|
212
|
+
pinnedLabel?: React.ReactNode;
|
|
213
|
+
recentLabel?: React.ReactNode;
|
|
214
|
+
/** The title's heading level; the labels are one under it. */
|
|
215
|
+
level?: 2 | 3 | 4;
|
|
216
|
+
}): React.JSX.Element;
|
|
217
|
+
declare function JumpBackInWindow({ open, onOpenChange, rows, total, pinnedCount, tab: tabProp, defaultTab, onTabChange, hasMore, loading, onLoadMore, onPin, onUnpin, onOpen, linkComponent, title, line, className, }: {
|
|
218
|
+
open: boolean;
|
|
219
|
+
onOpenChange: (open: boolean) => void;
|
|
220
|
+
/** Every row loaded so far, in the caller's order. */
|
|
221
|
+
rows: readonly JumpBackInRow[];
|
|
222
|
+
/** Everything the reader can open: the line's N and All's count. */
|
|
223
|
+
total: number;
|
|
224
|
+
/** Pinned's count. Without it, how many loaded rows are pinned. */
|
|
225
|
+
pinnedCount?: number;
|
|
226
|
+
/** The tab, when the caller holds it. */
|
|
227
|
+
tab?: JumpBackInTab;
|
|
228
|
+
defaultTab?: JumpBackInTab;
|
|
229
|
+
onTabChange?: (tab: JumpBackInTab) => void;
|
|
230
|
+
/** There are rows not yet loaded. */
|
|
231
|
+
hasMore?: boolean;
|
|
232
|
+
/** The next page is on its way: a skeleton row at the end, and no new ask. */
|
|
233
|
+
loading?: boolean;
|
|
234
|
+
/** The reader nears the end of the rows. */
|
|
235
|
+
onLoadMore?: () => void;
|
|
236
|
+
/** "+ Pin" on a row that is not pinned. */
|
|
237
|
+
onPin?: (row: JumpBackInRow) => void;
|
|
238
|
+
/** "Pinned" on a pinned row, pressed: unpin it. Without it, "Pinned" is a word, not a button. */
|
|
239
|
+
onUnpin?: (row: JumpBackInRow) => void;
|
|
240
|
+
/** Opens a creation that has no `href`. */
|
|
241
|
+
onOpen?: (item: HomeCreation) => void;
|
|
242
|
+
linkComponent?: React.ElementType;
|
|
243
|
+
title?: React.ReactNode;
|
|
244
|
+
/** Under the title. Defaults to "N creations across the spaces you belong to." */
|
|
245
|
+
line?: React.ReactNode;
|
|
246
|
+
className?: string;
|
|
247
|
+
}): React.JSX.Element;
|
|
248
|
+
export { JumpBackIn, JumpBackInWindow };
|
|
249
|
+
//# sourceMappingURL=jump-back-in.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jump-back-in.d.ts","sourceRoot":"","sources":["../../src/blocks/jump-back-in.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAQ9B,OAAO,EAAmC,KAAK,YAAY,EAAE,KAAK,sBAAsB,EAAE,MAAM,2BAA2B,CAAA;AAK3H;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoFG;AAEH,4EAA4E;AAC5E,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;CAkBpB,CAAA;AAEV,yEAAyE;AACzE,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG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W,CAAC,EAAE,CAAC,GAAG,EAAE,aAAa,KAAK,IAAI,CAAA;IAC1C,qCAAqC;IACrC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,8EAA8E;IAC9E,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,4CAA4C;IAC5C,UAAU,CAAC,EAAE,MAAM,IAAI,CAAA;IACvB,2CAA2C;IAC3C,KAAK,CAAC,EAAE,CAAC,GAAG,EAAE,aAAa,KAAK,IAAI,CAAA;IACpC,iGAAiG;IACjG,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,aAAa,KAAK,IAAI,CAAA;IACtC,2CAA2C;IAC3C,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,IAAI,CAAA;IACrC,aAAa,CAAC,EAAE,KAAK,CAAC,WAAW,CAAA;IACjC,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACvB,kFAAkF;IAClF,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,qBA0GA;AAED,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,CAAA"}
|
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { cn } from "../lib/cloudgrid-cn.js";
|
|
5
|
+
import { ActionLink } from "./action-link.js";
|
|
6
|
+
import { formatChartNumber } from "./chart-parts.js";
|
|
7
|
+
import { Button } from "../ui/button.js";
|
|
8
|
+
import { Dialog, DialogClose, DialogContent, DialogDescription, DialogHeader, DialogTitle } from "../ui/dialog.js";
|
|
9
|
+
import { FilterTab, FilterTabs } from "./filter-tabs.js";
|
|
10
|
+
import { PinnedCreations, RecentlyOpened } from "./home-pinned.js";
|
|
11
|
+
import { CloseIcon, ForwardIcon, PinFilledIcon, PinIcon, PlusIcon } from "./icons.js";
|
|
12
|
+
import { Skeleton } from "../ui/skeleton.js";
|
|
13
|
+
import { PictureOverIdentity, THUMBNAIL_WITH_IDENTITY, ThumbnailIdentity } from "../lib/thumbnail-identity.js";
|
|
14
|
+
/**
|
|
15
|
+
* JUMP BACK IN (ui#605, Asaf's design for console#1182, 2026-11-25, on top of
|
|
16
|
+
* Tamir's issue): the block both front pages place, and its "See all" window.
|
|
17
|
+
*
|
|
18
|
+
* Presentational, as the Home's pieces are: the pins, the recent opens, the
|
|
19
|
+
* window's rows and every handler are the caller's; nothing here fetches, and
|
|
20
|
+
* nothing here decides what is pinned.
|
|
21
|
+
*
|
|
22
|
+
* ## The block (`JumpBackIn`)
|
|
23
|
+
*
|
|
24
|
+
* One card, in the Home's card shell, the one every Home card wears
|
|
25
|
+
* (`BentoCard`'s look, class for class): `bg-card`, the hairline edge
|
|
26
|
+
* (`border-hairline`), radius 12 (`rounded-md`), 24 inside, no shadow. The
|
|
27
|
+
* issue first said radius 20 with the card shadow; the lead corrected it.
|
|
28
|
+
*
|
|
29
|
+
* header "Jump back in" at the Home's section title size (the
|
|
30
|
+
* `BentoCard` title: 20 bold on a 28 line), and 12 after it the
|
|
31
|
+
* line "Your pins, then what you opened last." in Small, muted
|
|
32
|
+
* (`text-faint-strong`); on a narrow card the line wraps under
|
|
33
|
+
* the title. At the far right, with `onSeeAll`, "See all N" and
|
|
34
|
+
* the arrow: the Home's teal text link (`ActionLink`, bold, the
|
|
35
|
+
* 16 arrow 6 after the words), a button that calls `onSeeAll`;
|
|
36
|
+
* the caller opens `JumpBackInWindow`
|
|
37
|
+
* Pinned "Pinned · N", a small label (Small, muted) after the outline
|
|
38
|
+
* pin, then `PinnedCreations` at its small size
|
|
39
|
+
* (`size="small"`, Asaf, 2026-11-26): the same small My
|
|
40
|
+
* creations cards, as many as fit at 192 or more (five of
|
|
41
|
+
* about 206 at the Console's 1440), sharing the row to its
|
|
42
|
+
* edge or the arrow, the arrows, Unpin on hover, and the
|
|
43
|
+
* "Pin a creation" slots filling the columns left, each My
|
|
44
|
+
* creations' empty card with the push pin, which stands up on
|
|
45
|
+
* hover. Its other props pass through untouched
|
|
46
|
+
* Recently "Recently opened", the same small label, then the recent
|
|
47
|
+
* opened opens as tiles (`RecentlyOpened layout="tiles"`): four in a
|
|
48
|
+
* row, two where four do not fit, one on a phone, "Continue"
|
|
49
|
+
* on the newest, "Pin it" on one that is not pinned
|
|
50
|
+
* spacing 16 between the header and the parts, 12 from a label to its row
|
|
51
|
+
*
|
|
52
|
+
* Each part can be absent. No `recent`, or none yet (the recent opens route is
|
|
53
|
+
* not live), and Recently opened is not drawn at all, not even its empty
|
|
54
|
+
* line. No `pinned` and Pinned is not drawn; an empty list is Pinned's own
|
|
55
|
+
* empty state, the soft slots.
|
|
56
|
+
*
|
|
57
|
+
* ## The window (`JumpBackInWindow`)
|
|
58
|
+
*
|
|
59
|
+
* The library's dialog, 680 wide where there is room (the search window's
|
|
60
|
+
* width, ui#531): the title "Everything you can open", the line "N creations
|
|
61
|
+
* across the spaces you belong to.", the tabs (`FilterTabs`): All with its
|
|
62
|
+
* count, Pinned with its count, Recently opened; and the rows. A row is the
|
|
63
|
+
* picture (64 by 40 at 8, the tiles' picture), the name, and under it "owner ·
|
|
64
|
+
* space · Opened 2h ago" (each part when known), the whole row the creation's
|
|
65
|
+
* link; at its end "Pinned" after the filled pin, or "+ Pin". With `onUnpin`
|
|
66
|
+
* "Pinned" is a button that unpins; with `onPin`, "+ Pin" pins. Both sit above
|
|
67
|
+
* the row's link, never inside it.
|
|
68
|
+
*
|
|
69
|
+
* The tabs filter the rows the caller gives (`jumpBackInRows`): All, every
|
|
70
|
+
* row; Pinned, those `pinned`; Recently opened, those with an `opened`. A
|
|
71
|
+
* caller that loads each tab's own rows (`onTabChange`) passes them as they
|
|
72
|
+
* come; the filter then changes nothing. A row whose id came before is never
|
|
73
|
+
* drawn again, so a page that repeats one cannot show it twice.
|
|
74
|
+
*
|
|
75
|
+
* It loads more as the reader scrolls: the rows are their own scrolling box,
|
|
76
|
+
* and when the reader is within 160 of its end (`JUMP_BACK_IN_LOAD_MARGIN`),
|
|
77
|
+
* or the rows do not fill it, `onLoadMore` is called, once for each count of
|
|
78
|
+
* the caller's rows, so a page that brings nothing the tab shows, or only
|
|
79
|
+
* repeats, still counts as come (`jumpBackInShouldLoad`,
|
|
80
|
+
* `jumpBackInLoadSettled`, `jumpBackInLoadAsk`). A load that ended without
|
|
81
|
+
* new rows (a failed page) is asked again on the reader's next scroll, wheel
|
|
82
|
+
* or touch on the rows, or tab, never by itself; not while `loading`, not without `hasMore`,
|
|
83
|
+
* and not again until the caller's rows have grown. While
|
|
84
|
+
* `loading`, a skeleton row stands at the end. Not in this cut: Edit pins,
|
|
85
|
+
* search, "Most used".
|
|
86
|
+
*
|
|
87
|
+
* An overlay: it portals to the body, out of any surface scope, so it is the
|
|
88
|
+
* white popover on the card, the panel and ink alike.
|
|
89
|
+
*
|
|
90
|
+
* ## Tokens
|
|
91
|
+
*
|
|
92
|
+
* the label Small (`text-caption`) in `text-faint-strong`, the 16 outline
|
|
93
|
+
* pin in `text-faint`
|
|
94
|
+
* Continue the accent role (`--cg-text-accent`), as Pinned's filled pin
|
|
95
|
+
* Pinned the 15 filled pin in the accent role, "Pinned" in Small, muted
|
|
96
|
+
* + Pin Small Medium in the accent role, the 14 plus before it
|
|
97
|
+
* the rows 60 tall, 2 apart, radius 8, the hover wash
|
|
98
|
+
*/
|
|
99
|
+
/** Every line the block and the window write, as the design writes them. */
|
|
100
|
+
export const JUMP_BACK_IN_COPY = {
|
|
101
|
+
title: "Jump back in",
|
|
102
|
+
line: "Your pins, then what you opened last.",
|
|
103
|
+
seeAll: "See all",
|
|
104
|
+
pinned: "Pinned",
|
|
105
|
+
recent: "Recently opened",
|
|
106
|
+
windowTitle: "Everything you can open",
|
|
107
|
+
tabsLabel: "Filter what you can open",
|
|
108
|
+
tabAll: "All",
|
|
109
|
+
tabPinned: "Pinned",
|
|
110
|
+
tabRecent: "Recently opened",
|
|
111
|
+
rowPinned: "Pinned",
|
|
112
|
+
rowPin: "Pin",
|
|
113
|
+
rowUnpin: "unpin",
|
|
114
|
+
loading: "Loading more",
|
|
115
|
+
emptyAll: "Creations you can open will appear here.",
|
|
116
|
+
emptyPinned: "Nothing pinned yet. Pin a creation and it stays here.",
|
|
117
|
+
emptyRecent: "Creations you open will appear here.",
|
|
118
|
+
};
|
|
119
|
+
/** The window's line: "15 creations across the spaces you belong to." */
|
|
120
|
+
export function jumpBackInWindowLine(count) {
|
|
121
|
+
return `${formatChartNumber(count)} ${count === 1 ? "creation" : "creations"} across the spaces you belong to.`;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* The rows a tab shows, in the caller's order: All every row, Pinned the
|
|
125
|
+
* pinned, Recently opened those with an `opened`. A row whose id came before
|
|
126
|
+
* is left out, so nothing shows twice.
|
|
127
|
+
*/
|
|
128
|
+
export function jumpBackInRows(rows, tab) {
|
|
129
|
+
const seen = new Set();
|
|
130
|
+
const out = [];
|
|
131
|
+
for (const row of rows) {
|
|
132
|
+
if (seen.has(row.id))
|
|
133
|
+
continue;
|
|
134
|
+
seen.add(row.id);
|
|
135
|
+
if (tab === "pinned" && row.pinned !== true)
|
|
136
|
+
continue;
|
|
137
|
+
if (tab === "recent" && (row.opened === undefined || row.opened === null))
|
|
138
|
+
continue;
|
|
139
|
+
out.push(row);
|
|
140
|
+
}
|
|
141
|
+
return out;
|
|
142
|
+
}
|
|
143
|
+
/** How near the end of the rows, in px, the reader is when the next page is asked for. */
|
|
144
|
+
export const JUMP_BACK_IN_LOAD_MARGIN = 160;
|
|
145
|
+
/**
|
|
146
|
+
* Whether to ask for the next page: the reader is within `margin` of the end
|
|
147
|
+
* of the rows' box (or the rows do not fill it), there is more, nothing is
|
|
148
|
+
* loading, and either the rows have grown since the last ask (`count` and
|
|
149
|
+
* `askedAt` are the caller's rows, `rows.length`, not the rows a tab shows:
|
|
150
|
+
* a page that brings nothing the tab shows, or only repeats, still came), or
|
|
151
|
+
* the last load ended without new rows (`stalled`, a failed page) and the
|
|
152
|
+
* reader has just acted on the rows (`reader`: a scroll, a wheel or a touch on
|
|
153
|
+
* them, or a tab). A stalled load is never asked again by itself, so a
|
|
154
|
+
* failing feed is not asked in a loop (Nataly's review, PR #613).
|
|
155
|
+
*/
|
|
156
|
+
export function jumpBackInShouldLoad(view, state, margin = JUMP_BACK_IN_LOAD_MARGIN) {
|
|
157
|
+
if (!state.hasMore || state.loading)
|
|
158
|
+
return false;
|
|
159
|
+
const grown = state.askedAt === null || state.count > state.askedAt;
|
|
160
|
+
if (!grown && !(state.stalled === true && state.reader === true))
|
|
161
|
+
return false;
|
|
162
|
+
return view.scrollHeight - view.scrollTop - view.clientHeight <= margin;
|
|
163
|
+
}
|
|
164
|
+
/** The bookkeeping before the first ask. */
|
|
165
|
+
export const JUMP_BACK_IN_LOAD_START = { askedAt: null, stalled: false, wasLoading: false };
|
|
166
|
+
/**
|
|
167
|
+
* The bookkeeping after a render with `rows` and `loading`: a load that has
|
|
168
|
+
* just ended with no more rows than when it was asked is stalled; a list
|
|
169
|
+
* shorter than at the last ask was replaced (a new tab's own rows, a reset),
|
|
170
|
+
* so it starts over.
|
|
171
|
+
*/
|
|
172
|
+
export function jumpBackInLoadSettled(track, rows, loading) {
|
|
173
|
+
if (track.askedAt !== null && rows.length < track.askedAt)
|
|
174
|
+
return { askedAt: null, stalled: false, wasLoading: loading };
|
|
175
|
+
const ended = track.wasLoading && !loading;
|
|
176
|
+
const stalled = ended ? track.askedAt !== null && rows.length <= track.askedAt : track.stalled;
|
|
177
|
+
return { askedAt: track.askedAt, stalled, wasLoading: loading };
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Whether to ask for the next page now, by `jumpBackInShouldLoad` with the
|
|
181
|
+
* caller's own `rows`: the bookkeeping after the ask, or null for no ask.
|
|
182
|
+
*/
|
|
183
|
+
export function jumpBackInLoadAsk(view, track, now) {
|
|
184
|
+
const state = { hasMore: now.hasMore, loading: now.loading, count: now.rows.length, askedAt: track.askedAt, stalled: track.stalled, reader: now.reader };
|
|
185
|
+
if (!jumpBackInShouldLoad(view, state))
|
|
186
|
+
return null;
|
|
187
|
+
return { askedAt: now.rows.length, stalled: false, wasLoading: track.wasLoading };
|
|
188
|
+
}
|
|
189
|
+
/** The small label over a part: Small, muted. */
|
|
190
|
+
const PART_LABEL = "m-0 flex min-w-0 items-center gap-1.5 text-caption font-normal text-faint-strong";
|
|
191
|
+
function JumpBackIn({ pinned, pinnedCount, recent, onUnpin, onAddPin, onPin, onOpen, onSeeAll, seeAllCount, linkComponent, title = JUMP_BACK_IN_COPY.title, line = JUMP_BACK_IN_COPY.line, seeAllLabel = JUMP_BACK_IN_COPY.seeAll, pinnedLabel = JUMP_BACK_IN_COPY.pinned, recentLabel = JUMP_BACK_IN_COPY.recent, level = 2, className, ...props }) {
|
|
192
|
+
const id = React.useId();
|
|
193
|
+
const Heading = `h${level}`;
|
|
194
|
+
const Label = `h${level + 1}`;
|
|
195
|
+
const count = pinnedCount ?? pinned?.length ?? 0;
|
|
196
|
+
return (_jsxs("section", { "data-slot": "jump-back-in", "aria-labelledby": id, className: cn("flex min-w-0 flex-col gap-4 rounded-md border border-hairline bg-card p-6 text-ink", className), ...props, children: [_jsxs("div", { "data-slot": "jump-back-in-header", className: "flex min-w-0 items-baseline justify-between gap-3", children: [_jsxs("div", { "data-slot": "jump-back-in-heading", className: "flex min-w-0 flex-wrap items-baseline gap-x-3 gap-y-1", children: [_jsx(Heading, { id: id, "data-slot": "jump-back-in-title", className: "m-0 min-w-0 text-heading-md leading-7 font-bold text-ink", children: title }), line !== undefined && line !== null ? (_jsx("p", { "data-slot": "jump-back-in-line", className: "m-0 min-w-0 text-caption text-faint-strong", children: line })) : null] }), onSeeAll ? (_jsxs(ActionLink, { "data-slot": "jump-back-in-see-all", weight: "bold", render: _jsx("button", { type: "button", "aria-haspopup": "dialog", onClick: () => onSeeAll() }), className: "shrink-0 cursor-pointer gap-1.5 whitespace-nowrap", children: [seeAllCount === undefined ? seeAllLabel : `${seeAllLabel} ${formatChartNumber(seeAllCount)}`, _jsx(ForwardIcon, { className: "size-4" })] })) : null] }), pinned !== undefined ? (_jsxs("div", { "data-slot": "jump-back-in-pinned", className: "flex min-w-0 flex-col gap-3", children: [_jsxs(Label, { "data-slot": "jump-back-in-pinned-label", className: PART_LABEL, children: [_jsx(PinIcon, { className: "size-4 shrink-0 text-faint" }), _jsxs("span", { children: [pinnedLabel, " \u00B7 ", formatChartNumber(count)] })] }), _jsx(PinnedCreations, { size: "small", items: pinned, onUnpin: onUnpin, onOpen: onOpen, onAddPin: onAddPin, linkComponent: linkComponent })] })) : null, recent !== undefined && recent.length > 0 ? (_jsxs("div", { "data-slot": "jump-back-in-recent", className: "flex min-w-0 flex-col gap-3", children: [_jsx(Label, { "data-slot": "jump-back-in-recent-label", className: PART_LABEL, children: recentLabel }), _jsx(RecentlyOpened, { layout: "tiles", items: recent, onOpen: onOpen, onPin: onPin, linkComponent: linkComponent })] })) : null] }));
|
|
197
|
+
}
|
|
198
|
+
/** A window row's picture: the tiles' 64 by 40 at 8, the identity under it with a `seed`. */
|
|
199
|
+
const ROW_THUMBNAIL = "block h-10 w-16 shrink-0 overflow-hidden rounded-xs bg-raised";
|
|
200
|
+
/** The row's link covers the row (its `::after`); the keyboard frame is drawn on that cover. */
|
|
201
|
+
const ROW_LINK = cn("flex min-w-0 flex-1 items-center gap-3 text-start outline-none", "after:absolute after:inset-0 after:rounded-xs after:content-['']", "focus-key:after:outline-1 focus-key:after:outline-offset-2 focus-key:after:outline-(--ring) focus-key:after:outline-solid");
|
|
202
|
+
/** "Pinned" and "+ Pin": above the row's link. */
|
|
203
|
+
const ROW_END = "relative z-10 inline-flex shrink-0 items-center gap-1 rounded-2xs text-caption outline-none focus-line";
|
|
204
|
+
function RowOpener({ row, onOpen, linkComponent, children, }) {
|
|
205
|
+
if (row.href !== undefined) {
|
|
206
|
+
const Link = linkComponent ?? "a";
|
|
207
|
+
return (_jsx(Link, { href: row.href, "data-slot": "jump-back-in-row-link", className: cn("text-ink no-underline", ROW_LINK), children: children }));
|
|
208
|
+
}
|
|
209
|
+
if (onOpen) {
|
|
210
|
+
return (_jsx("button", { type: "button", "data-slot": "jump-back-in-row-link", onClick: () => onOpen(row), className: cn("cursor-pointer text-ink", ROW_LINK), children: children }));
|
|
211
|
+
}
|
|
212
|
+
return (_jsx("div", { "data-slot": "jump-back-in-row-link", className: ROW_LINK, children: children }));
|
|
213
|
+
}
|
|
214
|
+
function WindowRow({ row, onPin, onUnpin, onOpen, linkComponent, }) {
|
|
215
|
+
const meta = [row.owner, row.space, row.opened].filter((part) => part !== undefined && part !== null && part !== "");
|
|
216
|
+
return (_jsxs("li", { "data-slot": "jump-back-in-row", className: "relative flex h-15 min-w-0 items-center gap-3 rounded-xs px-2 hover:bg-(--cg-hover)", children: [_jsxs(RowOpener, { row: row, onOpen: onOpen, linkComponent: linkComponent, children: [_jsxs("span", { "data-slot": "jump-back-in-row-thumbnail", className: row.seed === undefined ? ROW_THUMBNAIL : `${ROW_THUMBNAIL} ${THUMBNAIL_WITH_IDENTITY}`, children: [row.seed !== undefined ? _jsx(ThumbnailIdentity, { seed: row.seed, name: row.name, size: "thumb" }) : null, row.thumbnailSrc !== undefined && row.seed !== undefined ? (_jsx(PictureOverIdentity, { src: row.thumbnailSrc, alt: "", decoding: "async", draggable: false, className: "block size-full object-cover object-top" })) : row.thumbnailSrc !== undefined ? (_jsx("img", { src: row.thumbnailSrc, alt: "", decoding: "async", draggable: false, className: "block size-full object-cover object-top" })) : null] }), _jsxs("span", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [_jsx("span", { "data-slot": "jump-back-in-row-name", className: "min-w-0 truncate text-body-sm font-medium text-ink", children: row.name }), meta.length > 0 ? (_jsx("span", { "data-slot": "jump-back-in-row-meta", className: "min-w-0 truncate text-caption text-faint-strong", children: meta.map((part, i) => (_jsxs(React.Fragment, { children: [i > 0 ? " · " : null, part] }, i))) })) : null] })] }), row.pinned === true ? (onUnpin ? (_jsxs("button", { type: "button", "data-slot": "jump-back-in-row-pinned", "aria-label": `${JUMP_BACK_IN_COPY.rowPinned}, ${JUMP_BACK_IN_COPY.rowUnpin} ${row.name}`, onClick: () => onUnpin(row), className: cn(ROW_END, "cursor-pointer text-faint-strong hover:text-ink"), children: [_jsx(PinFilledIcon, { className: "size-3.75 shrink-0 text-(--cg-text-accent)" }), JUMP_BACK_IN_COPY.rowPinned] })) : (_jsxs("span", { "data-slot": "jump-back-in-row-pinned", className: cn(ROW_END, "text-faint-strong"), children: [_jsx(PinFilledIcon, { className: "size-3.75 shrink-0 text-(--cg-text-accent)" }), JUMP_BACK_IN_COPY.rowPinned] }))) : onPin ? (_jsxs("button", { type: "button", "data-slot": "jump-back-in-row-pin", onClick: () => onPin(row), className: cn(ROW_END, "cursor-pointer font-medium text-(--cg-text-accent) hover:underline underline-offset-4"), children: [_jsx(PlusIcon, { className: "size-3.5 shrink-0" }), JUMP_BACK_IN_COPY.rowPin, _jsx("span", { className: "sr-only", children: ` ${row.name}` })] })) : null] }));
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Every control in the block and the window shows the hand (Asaf's standing
|
|
220
|
+
* rule); a tab that is disabled keeps the arrow. `FilterTab` draws none of
|
|
221
|
+
* its own, so the window's tabs add it.
|
|
222
|
+
*/
|
|
223
|
+
const TAB_HAND = "enabled:cursor-pointer";
|
|
224
|
+
/** The skeleton row at the end while the next page loads. */
|
|
225
|
+
function SkeletonRow() {
|
|
226
|
+
return (_jsxs("li", { "data-slot": "jump-back-in-row-skeleton", "aria-hidden": "true", className: "flex h-15 min-w-0 items-center gap-3 px-2", children: [_jsx(Skeleton, { className: "h-10 w-16 shrink-0 rounded-xs" }), _jsxs("span", { className: "flex min-w-0 flex-1 flex-col gap-2", children: [_jsx(Skeleton, { className: "h-3.5 w-2/5 rounded-2xs" }), _jsx(Skeleton, { className: "h-3 w-3/5 rounded-2xs" })] })] }));
|
|
227
|
+
}
|
|
228
|
+
function JumpBackInWindow({ open, onOpenChange, rows, total, pinnedCount, tab: tabProp, defaultTab = "all", onTabChange, hasMore = false, loading = false, onLoadMore, onPin, onUnpin, onOpen, linkComponent, title = JUMP_BACK_IN_COPY.windowTitle, line, className, }) {
|
|
229
|
+
const [ownTab, setOwnTab] = React.useState(defaultTab);
|
|
230
|
+
const tab = tabProp ?? ownTab;
|
|
231
|
+
const shown = jumpBackInRows(rows, tab);
|
|
232
|
+
const pinned = pinnedCount ?? jumpBackInRows(rows, "pinned").length;
|
|
233
|
+
// The rows' box, once the dialog has mounted it: the popup mounts after
|
|
234
|
+
// `open` turns true, so a ref read in that commit would still be empty.
|
|
235
|
+
const [box, setBox] = React.useState(null);
|
|
236
|
+
// The paging bookkeeping, on the caller's own rows (all of them, not the
|
|
237
|
+
// tab's), so a page that brings nothing the tab shows still counts as come.
|
|
238
|
+
const track = React.useRef(JUMP_BACK_IN_LOAD_START);
|
|
239
|
+
const check = React.useCallback((reader) => {
|
|
240
|
+
if (!box || !onLoadMore)
|
|
241
|
+
return;
|
|
242
|
+
const next = jumpBackInLoadAsk(box, track.current, { rows, hasMore, loading, reader });
|
|
243
|
+
if (!next)
|
|
244
|
+
return;
|
|
245
|
+
track.current = next;
|
|
246
|
+
onLoadMore();
|
|
247
|
+
}, [box, rows, hasMore, loading, onLoadMore]);
|
|
248
|
+
// Each render: settle the bookkeeping (a load that ended without new rows
|
|
249
|
+
// is stalled), then ask if the box is at its end, which rows that do not
|
|
250
|
+
// fill it are. A stalled load waits for the reader. A new tab is the
|
|
251
|
+
// reader's act.
|
|
252
|
+
const lastTab = React.useRef(tab);
|
|
253
|
+
React.useEffect(() => {
|
|
254
|
+
track.current = jumpBackInLoadSettled(track.current, rows, loading);
|
|
255
|
+
const tabbed = lastTab.current !== tab;
|
|
256
|
+
lastTab.current = tab;
|
|
257
|
+
check(tabbed);
|
|
258
|
+
}, [check, rows, loading, tab]);
|
|
259
|
+
// The reader acting on the rows: a scroll, a wheel or a touch on them.
|
|
260
|
+
const byReader = () => check(true);
|
|
261
|
+
const pick = (next) => {
|
|
262
|
+
const value = next;
|
|
263
|
+
if (tabProp === undefined)
|
|
264
|
+
setOwnTab(value);
|
|
265
|
+
onTabChange?.(value);
|
|
266
|
+
box?.scrollTo?.({ top: 0 });
|
|
267
|
+
};
|
|
268
|
+
const empty = tab === "pinned" ? JUMP_BACK_IN_COPY.emptyPinned : tab === "recent" ? JUMP_BACK_IN_COPY.emptyRecent : JUMP_BACK_IN_COPY.emptyAll;
|
|
269
|
+
return (_jsx(Dialog, { open: open, onOpenChange: (next) => onOpenChange(next), children: _jsxs(DialogContent, { "data-slot": "jump-back-in-window", showCloseButton: false, className: cn("flex max-h-[min(calc(100svh-2rem),45rem)] flex-col gap-4 overflow-hidden sm:max-w-170", className), children: [_jsxs(DialogClose, { "data-slot": "dialog-close", render: _jsx(Button, { variant: "ghost", size: "icon", className: "absolute top-5 right-6.5 cursor-pointer text-ink" }), children: [_jsx(CloseIcon, { className: "size-5" }), _jsx("span", { className: "sr-only", children: "Close" })] }), _jsxs(DialogHeader, { children: [_jsx(DialogTitle, { "data-slot": "jump-back-in-window-title", children: title }), _jsx(DialogDescription, { "data-slot": "jump-back-in-window-line", className: "text-faint-strong", children: line ?? jumpBackInWindowLine(total) })] }), _jsxs(FilterTabs, { label: JUMP_BACK_IN_COPY.tabsLabel, value: tab, onValueChange: pick, className: "flex-wrap", children: [_jsx(FilterTab, { value: "all", count: total, className: TAB_HAND, children: JUMP_BACK_IN_COPY.tabAll }), _jsx(FilterTab, { value: "pinned", count: pinned, className: TAB_HAND, children: JUMP_BACK_IN_COPY.tabPinned }), _jsx(FilterTab, { value: "recent", className: TAB_HAND, children: JUMP_BACK_IN_COPY.tabRecent })] }), shown.length === 0 && !loading ? (_jsx("p", { "data-slot": "jump-back-in-window-empty", className: "m-0 py-6 text-center text-body-sm text-faint-strong", children: empty })) : null, _jsxs("ul", { ref: setBox, "data-slot": "jump-back-in-window-rows", "aria-busy": loading ? true : undefined, onScroll: byReader, onWheel: byReader, onTouchMove: byReader, className: cn("-mx-2 my-0 grid min-h-0 flex-1 list-none content-start gap-0.5 overflow-y-auto p-0", shown.length === 0 && !loading && "hidden"), children: [shown.map((row) => (_jsx(WindowRow, { row: row, onPin: onPin, onUnpin: onUnpin, onOpen: onOpen, linkComponent: linkComponent }, row.id))), loading ? _jsx(SkeletonRow, {}) : null] }), loading ? (_jsx("span", { role: "status", className: "sr-only", children: JUMP_BACK_IN_COPY.loading })) : null] }) }));
|
|
270
|
+
}
|
|
271
|
+
export { JumpBackIn, JumpBackInWindow };
|
|
272
|
+
//# sourceMappingURL=jump-back-in.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jump-back-in.js","sourceRoot":"","sources":["../../src/blocks/jump-back-in.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAA;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAC7C,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,aAAa,EAAE,iBAAiB,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AACvH,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AACjE,OAAO,EAAE,eAAe,EAAE,cAAc,EAAkD,MAAM,2BAA2B,CAAA;AAC3H,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,aAAa,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AAC9F,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAA;AACjD,OAAO,EAAE,mBAAm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