@flamingo-stack/openframe-frontend-core 0.0.556 → 0.0.557-1828.4873.1
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/{chunk-5756Q6UN.js → chunk-25YLMIWU.js} +2 -2
- package/dist/{chunk-FLSEJSTN.js → chunk-26HAJBSQ.js} +2 -2
- package/dist/{chunk-JDUPAHJR.cjs → chunk-33FOBAWS.cjs} +11 -11
- package/dist/{chunk-JDUPAHJR.cjs.map → chunk-33FOBAWS.cjs.map} +1 -1
- package/dist/{chunk-CRGIXNUE.cjs → chunk-4EGNYOZA.cjs} +20 -20
- package/dist/{chunk-CRGIXNUE.cjs.map → chunk-4EGNYOZA.cjs.map} +1 -1
- package/dist/{chunk-SXMJLNOF.cjs → chunk-4WREPWRL.cjs} +3 -3
- package/dist/{chunk-SXMJLNOF.cjs.map → chunk-4WREPWRL.cjs.map} +1 -1
- package/dist/{chunk-LZD3VSPS.cjs → chunk-5HNZTPAB.cjs} +9 -9
- package/dist/{chunk-LZD3VSPS.cjs.map → chunk-5HNZTPAB.cjs.map} +1 -1
- package/dist/{chunk-HYABNMBN.cjs → chunk-5JF6H7OJ.cjs} +62 -62
- package/dist/{chunk-HYABNMBN.cjs.map → chunk-5JF6H7OJ.cjs.map} +1 -1
- package/dist/{chunk-BNMKHG2L.cjs → chunk-64HHDGRN.cjs} +4 -4
- package/dist/{chunk-BNMKHG2L.cjs.map → chunk-64HHDGRN.cjs.map} +1 -1
- package/dist/{chunk-Z3R3LOC5.cjs → chunk-6YXEZCVG.cjs} +5 -5
- package/dist/{chunk-Z3R3LOC5.cjs.map → chunk-6YXEZCVG.cjs.map} +1 -1
- package/dist/{chunk-BZKUID4R.cjs → chunk-6ZOVSD4M.cjs} +14 -14
- package/dist/{chunk-BZKUID4R.cjs.map → chunk-6ZOVSD4M.cjs.map} +1 -1
- package/dist/{chunk-Q5SZ2QTZ.cjs → chunk-A6TAVIBX.cjs} +39 -39
- package/dist/{chunk-Q5SZ2QTZ.cjs.map → chunk-A6TAVIBX.cjs.map} +1 -1
- package/dist/{chunk-ICG7JRYT.cjs → chunk-BE6TRUKY.cjs} +31 -31
- package/dist/{chunk-ICG7JRYT.cjs.map → chunk-BE6TRUKY.cjs.map} +1 -1
- package/dist/{chunk-JRWOHH7K.js → chunk-DRNSIK3V.js} +2 -2
- package/dist/{chunk-VF4DCOPD.js → chunk-FXVMRZIQ.js} +4 -4
- package/dist/{chunk-XGBVHQP7.js → chunk-G3NBTL4I.js} +3244 -2555
- package/dist/chunk-G3NBTL4I.js.map +1 -0
- package/dist/{chunk-JXJ4FTKN.js → chunk-G7ROZAY5.js} +2 -2
- package/dist/{chunk-S4LL6QI6.cjs → chunk-IPO24G7U.cjs} +1630 -941
- package/dist/chunk-IPO24G7U.cjs.map +1 -0
- package/dist/{chunk-5M4PS3XX.js → chunk-LJWTXODF.js} +2 -2
- package/dist/{chunk-CGUSNV6R.js → chunk-NNGQ6ONX.js} +6 -6
- package/dist/{chunk-HOEOGFQM.cjs → chunk-QCBBX6DO.cjs} +86 -86
- package/dist/{chunk-HOEOGFQM.cjs.map → chunk-QCBBX6DO.cjs.map} +1 -1
- package/dist/{chunk-VXNMOGRP.js → chunk-RPCY2FAC.js} +4 -4
- package/dist/{chunk-WX5UCLL7.js → chunk-RRWWAH37.js} +2 -2
- package/dist/{chunk-5JWLZJK5.js → chunk-SBKX2VSG.js} +2 -2
- package/dist/{chunk-5EES5HD4.js → chunk-UTEQHK3H.js} +5 -5
- package/dist/{chunk-7Q7GFIFB.cjs → chunk-V5EYGEX7.cjs} +7 -7
- package/dist/{chunk-7Q7GFIFB.cjs.map → chunk-V5EYGEX7.cjs.map} +1 -1
- package/dist/{chunk-YM2WHYYK.js → chunk-VJL46NHW.js} +2 -2
- package/dist/{chunk-FZT7BYNF.js → chunk-Y6TXTBIQ.js} +2 -2
- package/dist/{chunk-C74PZU6M.cjs → chunk-YHRE4JBF.cjs} +26 -26
- package/dist/{chunk-C74PZU6M.cjs.map → chunk-YHRE4JBF.cjs.map} +1 -1
- package/dist/components/case-studies/index.cjs +8 -8
- package/dist/components/case-studies/index.js +2 -2
- package/dist/components/chat/index.cjs +2 -2
- package/dist/components/chat/index.js +1 -1
- package/dist/components/contact/index.cjs +3 -3
- package/dist/components/contact/index.js +2 -2
- package/dist/components/docs/index.cjs +5 -5
- package/dist/components/docs/index.js +4 -4
- package/dist/components/embeds/index.cjs +3 -3
- package/dist/components/embeds/index.js +2 -2
- package/dist/components/faq/index.cjs +3 -3
- package/dist/components/faq/index.js +2 -2
- package/dist/components/features/board/aim.d.ts +57 -0
- package/dist/components/features/board/aim.d.ts.map +1 -0
- package/dist/components/features/board/board-column-header.d.ts.map +1 -1
- package/dist/components/features/board/board-column.d.ts +8 -4
- package/dist/components/features/board/board-column.d.ts.map +1 -1
- package/dist/components/features/board/board.d.ts +15 -4
- package/dist/components/features/board/board.d.ts.map +1 -1
- package/dist/components/features/board/drop-aim.d.ts +34 -0
- package/dist/components/features/board/drop-aim.d.ts.map +1 -0
- package/dist/components/features/board/lane-geometry.d.ts +22 -0
- package/dist/components/features/board/lane-geometry.d.ts.map +1 -0
- package/dist/components/features/board/pending-move.d.ts +77 -0
- package/dist/components/features/board/pending-move.d.ts.map +1 -0
- package/dist/components/features/board/resolve-drop.d.ts +19 -0
- package/dist/components/features/board/resolve-drop.d.ts.map +1 -0
- package/dist/components/features/board/ticket-card.d.ts +25 -9
- package/dist/components/features/board/ticket-card.d.ts.map +1 -1
- package/dist/components/features/board/use-board-collapse.d.ts.map +1 -1
- package/dist/components/features/board/use-lane-scroll-anchor.d.ts +27 -0
- package/dist/components/features/board/use-lane-scroll-anchor.d.ts.map +1 -0
- package/dist/components/features/index.cjs +8 -2
- package/dist/components/features/index.cjs.map +1 -1
- package/dist/components/features/index.d.ts +1 -0
- package/dist/components/features/index.d.ts.map +1 -1
- package/dist/components/features/index.js +7 -1
- package/dist/components/features/sortable-list/index.d.ts +4 -0
- package/dist/components/features/sortable-list/index.d.ts.map +1 -0
- package/dist/components/features/sortable-list/slot-geometry.d.ts +57 -0
- package/dist/components/features/sortable-list/slot-geometry.d.ts.map +1 -0
- package/dist/components/features/sortable-list/sortable-list.d.ts +50 -0
- package/dist/components/features/sortable-list/sortable-list.d.ts.map +1 -0
- package/dist/components/features/sortable-list/use-sortable-item.d.ts +29 -0
- package/dist/components/features/sortable-list/use-sortable-item.d.ts.map +1 -0
- package/dist/components/help-center-pages/index.cjs +22 -22
- package/dist/components/help-center-pages/index.js +13 -13
- package/dist/components/index.cjs +137 -131
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.js +17 -11
- package/dist/components/index.js.map +1 -1
- package/dist/components/meeting-scheduler/index.cjs +28 -28
- package/dist/components/meeting-scheduler/index.js +3 -3
- package/dist/components/navigation/index.cjs +2 -2
- package/dist/components/navigation/index.js +1 -1
- package/dist/components/onboarding-guides/index.cjs +5 -5
- package/dist/components/onboarding-guides/index.js +4 -4
- package/dist/components/related-content/index.cjs +3 -3
- package/dist/components/related-content/index.js +2 -2
- package/dist/components/tickets/index.cjs +6 -6
- package/dist/components/tickets/index.js +5 -5
- package/dist/components/ui/index.cjs +2 -2
- package/dist/components/ui/index.js +1 -1
- package/dist/components/ui/square-avatar.d.ts.map +1 -1
- package/dist/index.cjs +8 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +7 -1
- package/dist/utils/auto-scroll-ancestors.d.ts +43 -0
- package/dist/utils/auto-scroll-ancestors.d.ts.map +1 -0
- package/dist/utils/drag-effect.d.ts +21 -0
- package/dist/utils/drag-effect.d.ts.map +1 -0
- package/dist/utils/scroll-parent.d.ts +11 -0
- package/dist/utils/scroll-parent.d.ts.map +1 -0
- package/package.json +6 -3
- package/src/__tests__/board-aim.test.ts +152 -0
- package/src/__tests__/board-pending-move.test.ts +113 -0
- package/src/__tests__/board-resolve-drop.test.ts +68 -0
- package/src/__tests__/sortable-slot-geometry.test.ts +105 -0
- package/src/components/features/board/.board-column.md +17 -4
- package/src/components/features/board/.board.md +11 -7
- package/src/components/features/board/.ticket-card.md +27 -5
- package/src/components/features/board/aim.ts +131 -0
- package/src/components/features/board/board-column-header.tsx +2 -9
- package/src/components/features/board/board-column.tsx +137 -66
- package/src/components/features/board/board.tsx +501 -258
- package/src/components/features/board/drop-aim.ts +50 -0
- package/src/components/features/board/lane-geometry.ts +44 -0
- package/src/components/features/board/pending-move.ts +116 -0
- package/src/components/features/board/resolve-drop.ts +28 -0
- package/src/components/features/board/ticket-card.tsx +256 -47
- package/src/components/features/board/use-board-collapse.ts +16 -14
- package/src/components/features/board/use-lane-scroll-anchor.ts +79 -0
- package/src/components/features/index.ts +1 -0
- package/src/components/features/sortable-list/.sortable-list.md +82 -0
- package/src/components/features/sortable-list/index.ts +3 -0
- package/src/components/features/sortable-list/slot-geometry.ts +100 -0
- package/src/components/features/sortable-list/sortable-list.tsx +270 -0
- package/src/components/features/sortable-list/use-sortable-item.ts +92 -0
- package/src/components/ui/square-avatar.tsx +5 -0
- package/src/stories/.TicketCard.stories.md +6 -12
- package/src/stories/Board.stories.tsx +16 -7
- package/src/stories/TicketCard.stories.tsx +38 -76
- package/src/utils/auto-scroll-ancestors.ts +90 -0
- package/src/utils/drag-effect.ts +26 -0
- package/src/utils/scroll-parent.ts +23 -0
- package/dist/chunk-S4LL6QI6.cjs.map +0 -1
- package/dist/chunk-XGBVHQP7.js.map +0 -1
- /package/dist/{chunk-5756Q6UN.js.map → chunk-25YLMIWU.js.map} +0 -0
- /package/dist/{chunk-FLSEJSTN.js.map → chunk-26HAJBSQ.js.map} +0 -0
- /package/dist/{chunk-JRWOHH7K.js.map → chunk-DRNSIK3V.js.map} +0 -0
- /package/dist/{chunk-VF4DCOPD.js.map → chunk-FXVMRZIQ.js.map} +0 -0
- /package/dist/{chunk-JXJ4FTKN.js.map → chunk-G7ROZAY5.js.map} +0 -0
- /package/dist/{chunk-5M4PS3XX.js.map → chunk-LJWTXODF.js.map} +0 -0
- /package/dist/{chunk-CGUSNV6R.js.map → chunk-NNGQ6ONX.js.map} +0 -0
- /package/dist/{chunk-VXNMOGRP.js.map → chunk-RPCY2FAC.js.map} +0 -0
- /package/dist/{chunk-WX5UCLL7.js.map → chunk-RRWWAH37.js.map} +0 -0
- /package/dist/{chunk-5JWLZJK5.js.map → chunk-SBKX2VSG.js.map} +0 -0
- /package/dist/{chunk-5EES5HD4.js.map → chunk-UTEQHK3H.js.map} +0 -0
- /package/dist/{chunk-YM2WHYYK.js.map → chunk-VJL46NHW.js.map} +0 -0
- /package/dist/{chunk-FZT7BYNF.js.map → chunk-Y6TXTBIQ.js.map} +0 -0
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import type { BoardColumnDef } from './types';
|
|
2
|
+
/** The move that was reported, so we can show it and recognise it arriving. */
|
|
3
|
+
export interface PendingMove {
|
|
4
|
+
ticketId: string;
|
|
5
|
+
/** The lane it came from — what tells a lane change apart from a reorder. */
|
|
6
|
+
fromColumnId: string;
|
|
7
|
+
toColumnId: string;
|
|
8
|
+
/** The card it was dropped after, or `null` for the head of the lane. */
|
|
9
|
+
afterTicketId: string | null;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* `columns` with a move that has been reported but not yet answered already
|
|
13
|
+
* applied — what the board renders between the drop and the host's new data.
|
|
14
|
+
*
|
|
15
|
+
* A drop cannot repaint the board from the host's data in the same frame it
|
|
16
|
+
* happens: the host is told about the move through `onChange` and answers with
|
|
17
|
+
* new `columns`, and no data layer worth using is synchronous about that —
|
|
18
|
+
* react-query, for one, notifies its subscribers from a `setTimeout(0)`, which
|
|
19
|
+
* is a whole macrotask (and therefore at least one paint) after the drop event.
|
|
20
|
+
* Rendering the host's answer literally therefore means the card is still in its
|
|
21
|
+
* old lane for that gap and arrives in the new one afterwards.
|
|
22
|
+
*
|
|
23
|
+
* Hiding the card across the gap was the previous answer, and it is why a drop
|
|
24
|
+
* read as the ticket vanishing and reappearing somewhere else. Showing the move
|
|
25
|
+
* immediately is the same optimistic update every board of this kind does, and
|
|
26
|
+
* it makes the handover invisible: the host's answer, when it comes, describes
|
|
27
|
+
* exactly the picture already on screen.
|
|
28
|
+
*
|
|
29
|
+
* Untouched columns keep their identity so the memoized lanes can skip the
|
|
30
|
+
* render.
|
|
31
|
+
*/
|
|
32
|
+
export declare function applyPendingMove(columns: BoardColumnDef[], move: PendingMove): BoardColumnDef[];
|
|
33
|
+
/**
|
|
34
|
+
* The id of the card currently flying from the pointer into the slot it was
|
|
35
|
+
* dropped in — hidden for exactly that long, because the drag preview is
|
|
36
|
+
* covering it.
|
|
37
|
+
*
|
|
38
|
+
* Only the one card cares, which is why this is an id and not a flag on every
|
|
39
|
+
* card.
|
|
40
|
+
*/
|
|
41
|
+
export declare const LandingCardContext: import("react").Context<string | null>;
|
|
42
|
+
/** True while this card is under the preview travelling into its slot. */
|
|
43
|
+
export declare function useIsLanding(ticketId: string): boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Whether THIS move has reached `columns`, so the board can stop standing in for
|
|
46
|
+
* the host and render its data plainly again.
|
|
47
|
+
*
|
|
48
|
+
* Two weaker tests were tried and both hand back too early, at which point the
|
|
49
|
+
* board snaps to whatever the host currently says — the card jumping back to its
|
|
50
|
+
* old lane for a frame:
|
|
51
|
+
*
|
|
52
|
+
* - The identity of the `columns` array. A host on react-query hands the board a
|
|
53
|
+
* fresh one whenever anything notifies — a cancelled refetch, a loading flag,
|
|
54
|
+
* a live update on an untouched lane.
|
|
55
|
+
* - The card no longer sitting at its old index. Each lane here polls on its own
|
|
56
|
+
* timer and takes live updates, so a ticket arriving above this one shifts the
|
|
57
|
+
* index and reads as "the move landed" when nothing of the sort happened.
|
|
58
|
+
*
|
|
59
|
+
* A lane change and a reorder need different tests, though, and using the strict
|
|
60
|
+
* one for both is what left a card to jump seconds after it landed:
|
|
61
|
+
*
|
|
62
|
+
* - **Across lanes**, arriving in the new lane IS the host applying the move.
|
|
63
|
+
* Which slot it ends up in is then the host's business — a server that sorts a
|
|
64
|
+
* lane its own way will not reproduce the dropped index, and holding out for
|
|
65
|
+
* one it will never send means showing a position that is quietly wrong until
|
|
66
|
+
* the timeout corrects it in a visible jump. The old lane has to have let go
|
|
67
|
+
* of the card as well: the two lanes are separate queries answering at their
|
|
68
|
+
* own pace, and standing aside in between would show the card in both.
|
|
69
|
+
* - **Within one lane** the card is in that lane either way, so only the exact
|
|
70
|
+
* slot distinguishes "applied" from "not yet".
|
|
71
|
+
*
|
|
72
|
+
* Answering "not yet" for a move the host never applies is safe: the board gives
|
|
73
|
+
* up on it after a timeout regardless, and the card returns to where the host
|
|
74
|
+
* says it is — which is the correct thing to show once a move has failed.
|
|
75
|
+
*/
|
|
76
|
+
export declare function hasMoveSettled(columns: readonly BoardColumnDef[], move: PendingMove): boolean;
|
|
77
|
+
//# sourceMappingURL=pending-move.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pending-move.d.ts","sourceRoot":"","sources":["../../../../src/components/features/board/pending-move.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAE7C,+EAA+E;AAC/E,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,MAAM,CAAA;IAChB,6EAA6E;IAC7E,YAAY,EAAE,MAAM,CAAA;IACpB,UAAU,EAAE,MAAM,CAAA;IAClB,yEAAyE;IACzE,aAAa,EAAE,MAAM,GAAG,IAAI,CAAA;CAC7B;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,cAAc,EAAE,EAAE,IAAI,EAAE,WAAW,GAAG,cAAc,EAAE,CAW/F;AAYD;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,wCAAqC,CAAA;AAEpE,0EAA0E;AAC1E,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAEtD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,SAAS,cAAc,EAAE,EAAE,IAAI,EAAE,WAAW,GAAG,OAAO,CAS7F"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { BoardChange, BoardColumnDef } from './types';
|
|
2
|
+
/** What a drop carries: the card that moved, and what it was dropped onto. */
|
|
3
|
+
interface DropInput {
|
|
4
|
+
/** `getInitialData` from the dragged card. */
|
|
5
|
+
source: Record<string | symbol, unknown>;
|
|
6
|
+
/** The innermost drop target under the pointer — a card, or a lane. */
|
|
7
|
+
target: Record<string | symbol, unknown> | undefined;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Turns a drop into the move to report, or `null` when nothing moved.
|
|
11
|
+
*
|
|
12
|
+
* Both steps live in `aim.ts`, shared with the keyboard and with the line drawn
|
|
13
|
+
* during the drag: the target becomes a slot, the slot becomes a change. Having
|
|
14
|
+
* the drop work it out separately is how a board ends up drawing a line in one
|
|
15
|
+
* place and committing a move to another.
|
|
16
|
+
*/
|
|
17
|
+
export declare function resolveBoardDrop(columns: readonly BoardColumnDef[], { source, target }: DropInput): BoardChange | null;
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=resolve-drop.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-drop.d.ts","sourceRoot":"","sources":["../../../../src/components/features/board/resolve-drop.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAE1D,8EAA8E;AAC9E,UAAU,SAAS;IACjB,8CAA8C;IAC9C,MAAM,EAAE,MAAM,CAAC,MAAM,GAAG,MAAM,EAAE,OAAO,CAAC,CAAA;IACxC,uEAAuE;IACvE,MAAM,EAAE,MAAM,CAAC,MAAM,GAAG,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAA;CACrD;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,SAAS,cAAc,EAAE,EAClC,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,SAAS,GAC5B,WAAW,GAAG,IAAI,CAKpB"}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type CSSProperties, type ReactNode } from 'react';
|
|
2
2
|
import type { BoardTicket } from './types';
|
|
3
|
+
/** How solid the card under the pointer is. Jira's look: carried, not lifted off
|
|
4
|
+
* the page entirely. */
|
|
5
|
+
export declare const DRAG_PREVIEW_OPACITY = 0.9;
|
|
3
6
|
export interface TicketCardBodyProps {
|
|
4
7
|
ticket: BoardTicket;
|
|
5
8
|
columnColor?: string;
|
|
6
|
-
renderAssignSlot?: (ticket: BoardTicket) =>
|
|
9
|
+
renderAssignSlot?: (ticket: BoardTicket) => ReactNode;
|
|
7
10
|
/** Approval callbacks receive the request id directly (the draggable
|
|
8
11
|
* `TicketCard` adapts its own `(ticketId, requestId)` signature onto these). */
|
|
9
12
|
onApprove?: (requestId?: string) => void | Promise<void>;
|
|
@@ -11,26 +14,39 @@ export interface TicketCardBodyProps {
|
|
|
11
14
|
}
|
|
12
15
|
/** The card's inner content: title + device/org, priority + assignees, tags,
|
|
13
16
|
* timestamp, "New Message", and the approval row. Pure — driven only by props. */
|
|
14
|
-
export declare function TicketCardBody({ ticket, columnColor, renderAssignSlot, onApprove, onReject }: TicketCardBodyProps):
|
|
17
|
+
export declare function TicketCardBody({ ticket, columnColor, renderAssignSlot, onApprove, onReject }: TicketCardBodyProps): import("react").JSX.Element;
|
|
15
18
|
export interface TicketCardViewProps extends TicketCardBodyProps {
|
|
16
19
|
className?: string;
|
|
20
|
+
/** Merged over the shell's own — the board uses it to fade the copy it leaves
|
|
21
|
+
* behind and to place the one that follows the pointer. */
|
|
22
|
+
style?: CSSProperties;
|
|
17
23
|
}
|
|
18
24
|
/**
|
|
19
25
|
* The exact board `TicketCard` visual, standalone — same shell + `TicketCardBody`
|
|
20
|
-
* as the draggable card, but
|
|
21
|
-
*
|
|
26
|
+
* as the draggable card, but registering no drag behaviour, so it renders
|
|
27
|
+
* anywhere from static props. Use this outside a `<Board>`.
|
|
22
28
|
*/
|
|
23
|
-
export declare function TicketCardView({ className, ...bodyProps }: TicketCardViewProps):
|
|
29
|
+
export declare function TicketCardView({ className, style, ...bodyProps }: TicketCardViewProps): import("react").JSX.Element;
|
|
24
30
|
export interface TicketCardProps {
|
|
25
31
|
ticket: BoardTicket;
|
|
26
32
|
columnId: string;
|
|
27
33
|
columnColor?: string;
|
|
28
34
|
href?: string;
|
|
29
|
-
isOverlay?: boolean;
|
|
30
35
|
dragDisabled?: boolean;
|
|
31
|
-
|
|
36
|
+
/** The owning column's drop rules. A card is a drop target in its own right,
|
|
37
|
+
* and Pragmatic does not let a lane's `canDrop` veto its children — so the
|
|
38
|
+
* rules have to be answered here too, or a blocked lane still accepts a drop
|
|
39
|
+
* straight onto one of its cards. */
|
|
40
|
+
dropDisabled?: boolean;
|
|
41
|
+
allowedFromColumns?: string[];
|
|
42
|
+
renderAssignSlot?: (ticket: BoardTicket) => ReactNode;
|
|
32
43
|
onApprove?: (ticketId: string, requestId?: string) => void | Promise<void>;
|
|
33
44
|
onReject?: (ticketId: string, requestId?: string) => void | Promise<void>;
|
|
34
45
|
}
|
|
35
|
-
|
|
46
|
+
/** Memoized: a drag moves one card, but it re-renders the column lists around
|
|
47
|
+
* it, and a board carries dozens of cards whose props did not change. Hosts
|
|
48
|
+
* must pass stable `renderAssignSlot` / `onApprove` / `onReject` (useCallback)
|
|
49
|
+
* for this to bite — an inline arrow re-renders every card on every keystroke
|
|
50
|
+
* anywhere in the page. */
|
|
51
|
+
export declare const TicketCard: import("react").NamedExoticComponent<TicketCardProps>;
|
|
36
52
|
//# sourceMappingURL=ticket-card.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ticket-card.d.ts","sourceRoot":"","sources":["../../../../src/components/features/board/ticket-card.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ticket-card.d.ts","sourceRoot":"","sources":["../../../../src/components/features/board/ticket-card.tsx"],"names":[],"mappings":"AAQA,OAAO,EAML,KAAK,aAAa,EAGlB,KAAK,SAAS,EACf,MAAM,OAAO,CAAA;AAsBd,OAAO,KAAK,EAAiB,WAAW,EAA2B,MAAM,SAAS,CAAA;AAYlF;yBACyB;AACzB,eAAO,MAAM,oBAAoB,MAAM,CAAA;AAsBvC,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,WAAW,CAAA;IACnB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,gBAAgB,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,SAAS,CAAA;IACrD;qFACiF;IACjF,SAAS,CAAC,EAAE,CAAC,SAAS,CAAC,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACxD,QAAQ,CAAC,EAAE,CAAC,SAAS,CAAC,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CACxD;AAED;mFACmF;AACnF,wBAAgB,cAAc,CAAC,EAAE,MAAM,EAAE,WAAW,EAAE,gBAAgB,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,mBAAmB,+BA0GjH;AAOD,MAAM,WAAW,mBAAoB,SAAQ,mBAAmB;IAC9D,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;gEAC4D;IAC5D,KAAK,CAAC,EAAE,aAAa,CAAA;CACtB;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,SAAS,EAAE,EAAE,mBAAmB,+BAarF;AAMD,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,WAAW,CAAA;IACnB,QAAQ,EAAE,MAAM,CAAA;IAChB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB;;;0CAGsC;IACtC,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAA;IAC7B,gBAAgB,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,SAAS,CAAA;IACrD,SAAS,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAC1E,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CAC1E;AAED;;;;4BAI4B;AAC5B,eAAO,MAAM,UAAU,uDA8PrB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-board-collapse.d.ts","sourceRoot":"","sources":["../../../../src/components/features/board/use-board-collapse.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAEtD,MAAM,WAAW,sBAAsB;IACrC,SAAS,EAAE,gBAAgB,CAAA;IAC3B,MAAM,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAA;IAClC,YAAY,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,CAAA;CACzD;AAED,wBAAgB,gBAAgB,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,sBAAsB,
|
|
1
|
+
{"version":3,"file":"use-board-collapse.d.ts","sourceRoot":"","sources":["../../../../src/components/features/board/use-board-collapse.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAEtD,MAAM,WAAW,sBAAsB;IACrC,SAAS,EAAE,gBAAgB,CAAA;IAC3B,MAAM,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAA;IAClC,YAAY,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,CAAA;CACzD;AAED,wBAAgB,gBAAgB,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,sBAAsB,CA2B5E"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type RefObject } from 'react';
|
|
2
|
+
import type { BoardTicket } from './types';
|
|
3
|
+
/** Attribute the lane's cards carry so the anchor can find them again. */
|
|
4
|
+
export declare const TICKET_ID_ATTRIBUTE = "data-ticket-id";
|
|
5
|
+
/**
|
|
6
|
+
* Keeps a scrolled lane visually still when its list changes above the viewport.
|
|
7
|
+
*
|
|
8
|
+
* Browsers do this themselves — it is called scroll anchoring — but the lane turns
|
|
9
|
+
* theirs off (`overflow-anchor:none`), because leaving both on double-corrects
|
|
10
|
+
* every insertion. So a ticket arriving from a live update is inserted above the
|
|
11
|
+
* viewport with nothing to compensate, and the whole list slides down by a card.
|
|
12
|
+
*
|
|
13
|
+
* NOTE: the original reason for taking this over by hand was that Chrome skips
|
|
14
|
+
* anchor candidates carrying a `transform`, and dnd-kit transformed every card in
|
|
15
|
+
* the lane during a drag. Nothing transforms cards any more, so the browser's own
|
|
16
|
+
* anchoring may well be enough now — worth testing against live updates before
|
|
17
|
+
* deleting this and the `overflow-anchor:none` that goes with it.
|
|
18
|
+
*
|
|
19
|
+
* The fix is one measurement: whichever card sits at the top of the viewport,
|
|
20
|
+
* note where it is, and after the list changes put the viewport back the same
|
|
21
|
+
* distance from it.
|
|
22
|
+
*
|
|
23
|
+
* Deliberately inert at the very top of a lane (`scrollTop === 0`), matching what
|
|
24
|
+
* browsers do — there a new ticket is meant to be seen, not scrolled away.
|
|
25
|
+
*/
|
|
26
|
+
export declare function useLaneScrollAnchor(scrollRef: RefObject<HTMLDivElement | null>, tickets: readonly BoardTicket[]): void;
|
|
27
|
+
//# sourceMappingURL=use-lane-scroll-anchor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-lane-scroll-anchor.d.ts","sourceRoot":"","sources":["../../../../src/components/features/board/use-lane-scroll-anchor.ts"],"names":[],"mappings":"AAEA,OAAO,EAAU,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAE9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAE1C,0EAA0E;AAC1E,eAAO,MAAM,mBAAmB,mBAAmB,CAAA;AAqBnD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,EAC3C,OAAO,EAAE,SAAS,WAAW,EAAE,GAC9B,IAAI,CA0BN"}
|
|
@@ -153,7 +153,10 @@
|
|
|
153
153
|
|
|
154
154
|
|
|
155
155
|
|
|
156
|
-
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
var _chunkIPO24G7Ucjs = require('../../chunk-IPO24G7U.cjs');
|
|
157
160
|
require('../../chunk-C5RS3QLV.cjs');
|
|
158
161
|
require('../../chunk-XL4V2PYG.cjs');
|
|
159
162
|
require('../../chunk-BZFW3FOF.cjs');
|
|
@@ -323,5 +326,8 @@ require('../../chunk-VRHGVLSL.cjs');
|
|
|
323
326
|
|
|
324
327
|
|
|
325
328
|
|
|
326
|
-
|
|
329
|
+
|
|
330
|
+
|
|
331
|
+
|
|
332
|
+
exports.ADMIN_APPROVAL_REQUEST_CONTEXT_TYPE = _chunkIPO24G7Ucjs.ADMIN_APPROVAL_REQUEST_CONTEXT_TYPE; exports.AIEnrichButton = _chunkIPO24G7Ucjs.AIEnrichButton; exports.AIEnrichSection = _chunkIPO24G7Ucjs.AIEnrichSection; exports.AIRequiredBadge = _chunkIPO24G7Ucjs.AIRequiredBadge; exports.AIStatusIndicator = _chunkIPO24G7Ucjs.AIStatusIndicator; exports.AIWarningsSection = _chunkIPO24G7Ucjs.AIWarningsSection; exports.ApprovalRequestNotificationTile = _chunkIPO24G7Ucjs.ApprovalRequestNotificationTile; exports.ArrayEntryManager = _chunkIPO24G7Ucjs.ArrayEntryManager; exports.AuthBenefitsPanel = _chunkIPO24G7Ucjs.AuthBenefitsPanel; exports.AuthProvidersList = _chunkIPO24G7Ucjs.AuthProvidersList; exports.AuthShell = _chunkIPO24G7Ucjs.AuthShell; exports.BackToLoginLink = _chunkIPO24G7Ucjs.BackToLoginLink; exports.Board = _chunkIPO24G7Ucjs.Board; exports.BoardColumn = _chunkIPO24G7Ucjs.BoardColumn; exports.BoardColumnHeader = _chunkIPO24G7Ucjs.BoardColumnHeader; exports.BoardTicketApproval = _chunkIPO24G7Ucjs.BoardTicketApproval; exports.CardHitLayer = _chunkIPO24G7Ucjs.CardHitLayer; exports.CardsStrip = _chunkIPO24G7Ucjs.CardsStrip; exports.ChangelogManager = _chunkIPO24G7Ucjs.ChangelogManager; exports.ChangelogSectionsManager = _chunkIPO24G7Ucjs.ChangelogSectionsManager; exports.ClickUpTasksManager = _chunkIPO24G7Ucjs.ClickUpTasksManager; exports.CommandBox = _chunkIPO24G7Ucjs.CommandBox; exports.CompleteAccountForm = _chunkIPO24G7Ucjs.CompleteAccountForm; exports.ConfidenceBadge = _chunkIPO24G7Ucjs.ConfidenceBadge; exports.CreateOrganizationForm = _chunkIPO24G7Ucjs.CreateOrganizationForm; exports.DEFAULT_THEME = _chunkIPO24G7Ucjs.DEFAULT_THEME; exports.DEFAULT_VIDEO_BITES_TITLE = _chunkIPO24G7Ucjs.DEFAULT_VIDEO_BITES_TITLE; exports.DynamicThemeProvider = _chunkIPO24G7Ucjs.DynamicThemeProvider; exports.EntitySummaryEditor = _chunkIPO24G7Ucjs.EntitySummaryEditor; exports.EntityTagBadges = _chunkIPO24G7Ucjs.EntityTagBadges; exports.EntityVideoSection = _chunkIPO24G7Ucjs.EntityVideoSection; exports.ErrorBoundary = _chunkIPO24G7Ucjs.ErrorBoundary; exports.FigmaPrototypeViewer = _chunkIPO24G7Ucjs.FigmaPrototypeViewer; exports.FiltersDropdown = _chunkIPO24G7Ucjs.FiltersDropdown; exports.FloatingWalkthroughVideo = _chunkIPO24G7Ucjs.FloatingWalkthroughVideo; exports.GitHubReleasesManager = _chunkIPO24G7Ucjs.GitHubReleasesManager; exports.HighlightConfigSection = _chunkIPO24G7Ucjs.HighlightConfigSection; exports.HighlightGenerationSection = _chunkIPO24G7Ucjs.HighlightGenerationSection; exports.HighlightVideoCombinedSection = _chunkIPO24G7Ucjs.HighlightVideoCombinedSection; exports.HighlightVideoPreview = _chunkIPO24G7Ucjs.HighlightVideoPreview; exports.HighlightVideoSection = _chunkIPO24G7Ucjs.HighlightVideoSection; exports.InviteLinkInvalidModal = _chunkIPO24G7Ucjs.InviteLinkInvalidModal; exports.KnowledgeBaseLinksManager = _chunkIPO24G7Ucjs.KnowledgeBaseLinksManager; exports.LoadingProvider = _chunkIPO24G7Ucjs.LoadingProvider; exports.LoginForm = _chunkIPO24G7Ucjs.LoginForm; exports.MUX_IMAGE_ORIGIN = _chunkIPO24G7Ucjs.MUX_IMAGE_ORIGIN; exports.MUX_STREAM_ORIGIN = _chunkIPO24G7Ucjs.MUX_STREAM_ORIGIN; exports.MediaGalleryManager = _chunkIPO24G7Ucjs.MediaGalleryManager; exports.MoreAboutButton = _chunkIPO24G7Ucjs.MoreAboutButton; exports.NotificationDrawer = _chunkIPO24G7Ucjs.NotificationDrawer; exports.NotificationPopups = _chunkIPO24G7Ucjs.NotificationPopups; exports.NotificationTile = _chunkIPO24G7Ucjs.NotificationTile; exports.NotificationsProvider = _chunkIPO24G7Ucjs.NotificationsProvider; exports.OPENFRAME_DOCTOR_COMMANDS = _chunkIPO24G7Ucjs.OPENFRAME_DOCTOR_COMMANDS; exports.OPENFRAME_PATHS = _chunkIPO24G7Ucjs.OPENFRAME_PATHS; exports.OSTypeBadge = _chunkIPO24G7Ucjs.OSTypeBadge; exports.OSTypeBadgeGroup = _chunkIPO24G7Ucjs.OSTypeBadgeGroup; exports.OSTypeIcon = _chunkIPO24G7Ucjs.OSTypeIcon; exports.OSTypeLabel = _chunkIPO24G7Ucjs.OSTypeLabel; exports.OpenFrameSsoLoginForm = _chunkIPO24G7Ucjs.OpenFrameSsoLoginForm; exports.OpenFrameSsoSignUpForm = _chunkIPO24G7Ucjs.OpenFrameSsoSignUpForm; exports.OpenFrameWordmark = _chunkIPO24G7Ucjs.OpenFrameWordmark; exports.PROVIDER_META = _chunkIPO24G7Ucjs.PROVIDER_META; exports.ParallaxImageShowcase = _chunkIPO24G7Ucjs.ParallaxImageShowcase; exports.PasswordResetForm = _chunkIPO24G7Ucjs.PasswordResetForm; exports.PathsDisplay = _chunkIPO24G7Ucjs.PathsDisplay; exports.PlatformBadge = _chunkIPO24G7Ucjs.PlatformBadge; exports.PlatformFilterComponent = _chunkIPO24G7Ucjs.PlatformFilterComponent; exports.PolicyConfigurationPanel = _chunkIPO24G7Ucjs.PolicyConfigurationPanel; exports.PoweredByFlamingo = _chunkIPO24G7Ucjs.PoweredByFlamingo; exports.ProviderButton = _chunkIPO24G7Ucjs.ProviderButton; exports.PushButtonSelector = _chunkIPO24G7Ucjs.PushButtonSelector; exports.RATIO_GRID_CLASS = _chunkIPO24G7Ucjs.RATIO_GRID_CLASS; exports.RATIO_TO_CSS_ASPECT = _chunkIPO24G7Ucjs.RATIO_TO_CSS_ASPECT; exports.RatioTabs = _chunkIPO24G7Ucjs.RatioTabs; exports.ReleaseMediaManager = _chunkIPO24G7Ucjs.ReleaseMediaManager; exports.SEOEditorPreview = _chunkIPO24G7Ucjs.SEOEditorPreview; exports.SLOT_STICKINESS = _chunkIPO24G7Ucjs.SLOT_STICKINESS; exports.STRIP_CELL_MAX_WIDTH = _chunkIPO24G7Ucjs.STRIP_CELL_MAX_WIDTH; exports.SectionSelector = _chunkIPO24G7Ucjs.SectionSelector; exports.SelectButton = _chunkIPO24G7Ucjs.SelectButton; exports.SocialLinksManager = _chunkIPO24G7Ucjs.SocialLinksManager; exports.SortableList = _chunkIPO24G7Ucjs.SortableList; exports.SsoAuthShell = _chunkIPO24G7Ucjs.SsoAuthShell; exports.SsoProviderButtons = _chunkIPO24G7Ucjs.SsoProviderButtons; exports.StartWithOpenFrameButton = _chunkIPO24G7Ucjs.StartWithOpenFrameButton; exports.StatusFilterComponent = _chunkIPO24G7Ucjs.StatusFilterComponent; exports.SubtitlesEditor = _chunkIPO24G7Ucjs.SubtitlesEditor; exports.TAG_BADGE_CLASS = _chunkIPO24G7Ucjs.TAG_BADGE_CLASS; exports.THEME_ATTRIBUTE = _chunkIPO24G7Ucjs.THEME_ATTRIBUTE; exports.THEME_STORAGE_KEY = _chunkIPO24G7Ucjs.THEME_STORAGE_KEY; exports.TagsSelector = _chunkIPO24G7Ucjs.TagsSelector; exports.TermsAgreementLabel = _chunkIPO24G7Ucjs.TermsAgreementLabel; exports.ThemeProvider = _chunkIPO24G7Ucjs.ThemeProvider; exports.TicketCard = _chunkIPO24G7Ucjs.TicketCard; exports.TicketCardBody = _chunkIPO24G7Ucjs.TicketCardBody; exports.TicketCardSkeleton = _chunkIPO24G7Ucjs.TicketCardSkeleton; exports.TicketCardView = _chunkIPO24G7Ucjs.TicketCardView; exports.TicketStatusConfigList = _chunkIPO24G7Ucjs.TicketStatusConfigList; exports.TimeTrackerHeaderButton = _chunkIPO24G7Ucjs.TimeTrackerHeaderButton; exports.TimeTrackerPanel = _chunkIPO24G7Ucjs.TimeTrackerPanel; exports.TimeTrackerProvider = _chunkIPO24G7Ucjs.TimeTrackerProvider; exports.TranscribeAndSummarizeCombinedSection = _chunkIPO24G7Ucjs.TranscribeAndSummarizeCombinedSection; exports.TranscribeSummarizeSection = _chunkIPO24G7Ucjs.TranscribeSummarizeSection; exports.TranscriptSummaryEditor = _chunkIPO24G7Ucjs.TranscriptSummaryEditor; exports.Video = _chunkIPO24G7Ucjs.Video; exports.VideoBiteCard = _chunkIPO24G7Ucjs.VideoBiteCard; exports.VideoBitesDisplay = _chunkIPO24G7Ucjs.VideoBitesDisplay; exports.VideoBitesStrip = _chunkIPO24G7Ucjs.VideoBitesStrip; exports.VideoClipsSection = _chunkIPO24G7Ucjs.VideoClipsSection; exports.VideoHoverPreviewSurface = _chunkIPO24G7Ucjs.VideoHoverPreviewSurface; exports.VideoPlayBadge = _chunkIPO24G7Ucjs.VideoPlayBadge; exports.VideoSourceSelector = _chunkIPO24G7Ucjs.VideoSourceSelector; exports.VideoUnmuteGlyph = _chunkIPO24G7Ucjs.VideoUnmuteGlyph; exports.ViewToggle = _chunkIPO24G7Ucjs.ViewToggle; exports.WaitlistForm = _chunkIPO24G7Ucjs.WaitlistForm; exports.WarningBlock = _chunkIPO24G7Ucjs.WarningBlock; exports.approvalMetaToBatchData = _chunkIPO24G7Ucjs.approvalMetaToBatchData; exports.buildCaptionsUrl = _chunkIPO24G7Ucjs.buildCaptionsUrl; exports.captionsEntityTypeForDocType = _chunkIPO24G7Ucjs.captionsEntityTypeForDocType; exports.columnFromTicketStatus = _chunkIPO24G7Ucjs.columnFromTicketStatus; exports.detectAspectRatio = _chunkIPO24G7Ucjs.detectAspectRatio; exports.extractYouTubeId = _chunkIPO24G7Ucjs.extractYouTubeId; exports.getApprovalMeta = _chunkIPO24G7Ucjs.getApprovalMeta; exports.getCaptionsUrl = _chunkIPO24G7Ucjs.getCaptionsUrl; exports.getEntityCaptionUrls = _chunkIPO24G7Ucjs.getEntityCaptionUrls; exports.getEntityCaptionUrlsById = _chunkIPO24G7Ucjs.getEntityCaptionUrlsById; exports.getOpenFrameDoctorCommand = _chunkIPO24G7Ucjs.getOpenFrameDoctorCommand; exports.getOpenFramePaths = _chunkIPO24G7Ucjs.getOpenFramePaths; exports.groupByAspectRatio = _chunkIPO24G7Ucjs.groupByAspectRatio; exports.groupTicketsByStatus = _chunkIPO24G7Ucjs.groupTicketsByStatus; exports.isApprovalNotification = _chunkIPO24G7Ucjs.isApprovalNotification; exports.ratioToCategory = _chunkIPO24G7Ucjs.ratioToCategory; exports.rebaseCaptionsUrl = _chunkIPO24G7Ucjs.rebaseCaptionsUrl; exports.resolutionToStatus = _chunkIPO24G7Ucjs.resolutionToStatus; exports.saveDataEnabled = _chunkIPO24G7Ucjs.saveDataEnabled; exports.sortBitesByCreatedAtDesc = _chunkIPO24G7Ucjs.sortBitesByCreatedAtDesc; exports.tintOnDark = _chunkIPO24G7Ucjs.tintOnDark; exports.toStripProfile = _chunkIPO24G7Ucjs.toStripProfile; exports.useBoardCollapse = _chunkIPO24G7Ucjs.useBoardCollapse; exports.useCaptions = _chunkIPO24G7Ucjs.useCaptions; exports.useDynamicTheme = _chunkIPO24G7Ucjs.useDynamicTheme; exports.useFiltersDropdown = _chunkIPO24G7Ucjs.useFiltersDropdown; exports.useLoading = _chunkIPO24G7Ucjs.useLoading; exports.useNotifications = _chunkIPO24G7Ucjs.useNotifications; exports.useOptionalNotifications = _chunkIPO24G7Ucjs.useOptionalNotifications; exports.useOptionalTimeTracker = _chunkIPO24G7Ucjs.useOptionalTimeTracker; exports.useSortableItem = _chunkIPO24G7Ucjs.useSortableItem; exports.useTheme = _chunkIPO24G7Ucjs.useTheme; exports.useThemeToggle = _chunkIPO24G7Ucjs.useThemeToggle; exports.useTimeTracker = _chunkIPO24G7Ucjs.useTimeTracker; exports.useTrackerClock = _chunkIPO24G7Ucjs.useTrackerClock; exports.useVideoOriginPreconnect = _chunkIPO24G7Ucjs.useVideoOriginPreconnect; exports.useVideoWarmup = _chunkIPO24G7Ucjs.useVideoWarmup; exports.useWalkthroughVideo = _chunkIPO24G7Ucjs.useWalkthroughVideo;
|
|
327
333
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/components/features/index.cjs"],"names":[],"mappings":"AAAA,qFAAY;AACZ,YAAY;AACZ;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,4DAAiC;AACjC,oCAAiC;AACjC,oCAAiC;AACjC,oCAAiC;AACjC,oCAAiC;AACjC,oCAAiC;AACjC,oCAAiC;AACjC,oCAAiC;AACjC,oCAAiC;AACjC,oCAAiC;AACjC,oCAAiC;AACjC,oCAAiC;AACjC,oCAAiC;AACjC,oCAAiC;AACjC,oCAAiC;AACjC,oCAAiC;AACjC,oCAAiC;AACjC;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/components/features/index.cjs"],"names":[],"mappings":"AAAA,qFAAY;AACZ,YAAY;AACZ;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,4DAAiC;AACjC,oCAAiC;AACjC,oCAAiC;AACjC,oCAAiC;AACjC,oCAAiC;AACjC,oCAAiC;AACjC,oCAAiC;AACjC,oCAAiC;AACjC,oCAAiC;AACjC,oCAAiC;AACjC,oCAAiC;AACjC,oCAAiC;AACjC,oCAAiC;AACjC,oCAAiC;AACjC,oCAAiC;AACjC,oCAAiC;AACjC,oCAAiC;AACjC;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,47TAAC","file":"/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/components/features/index.cjs"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/features/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAA;AAK3F,OAAO,EACL,aAAa,EACb,QAAQ,EACR,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,aAAa,EACb,KAAK,KAAK,EACV,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,GAC1B,MAAM,6BAA6B,CAAA;AACpC,cAAc,uBAAuB,CAAA;AACrC,cAAc,QAAQ,CAAA;AACtB,cAAc,uBAAuB,CAAA;AACrC,cAAc,qBAAqB,CAAA;AACnC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,yBAAyB,CAAA;AACvC,cAAc,eAAe,CAAA;AAC7B,cAAc,qBAAqB,CAAA;AACnC,cAAc,kBAAkB,CAAA;AAChC,cAAc,0BAA0B,CAAA;AACxC,cAAc,oBAAoB,CAAA;AAClC,cAAc,2BAA2B,CAAA;AACzC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,oBAAoB,CAAA;AAClC,cAAc,yBAAyB,CAAA;AACvC,cAAc,qBAAqB,CAAA;AACnC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,uBAAuB,CAAA;AACrC,cAAc,2BAA2B,CAAA;AACzC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,kBAAkB,CAAA;AAChC,cAAc,mBAAmB,CAAA;AACjC,cAAc,mBAAmB,CAAA;AACjC,cAAc,wBAAwB,CAAA;AACtC,cAAc,yBAAyB,CAAA;AACvC,cAAc,oBAAoB,CAAA;AAClC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,sBAAsB,CAAA;AACpC,cAAc,wBAAwB,CAAA;AACtC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,2BAA2B,CAAA;AACzC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,iBAAiB,CAAA;AAS/B,cAAc,eAAe,CAAA;AAC7B,cAAc,SAAS,CAAA;AACvB,cAAc,sBAAsB,CAAA;AACpC,cAAc,oBAAoB,CAAA;AAClC,cAAc,sBAAsB,CAAA;AACpC,cAAc,qBAAqB,CAAA;AACnC,cAAc,uBAAuB,CAAA;AACrC,cAAc,kBAAkB,CAAA;AAChC,cAAc,uBAAuB,CAAA;AACrC,cAAc,wBAAwB,CAAA;AACtC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,yBAAyB,CAAA;AACvC,cAAc,oBAAoB,CAAA;AAClC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,yBAAyB,CAAA;AACvC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,oBAAoB,CAAA;AAClC,cAAc,2BAA2B,CAAA;AACzC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,yBAAyB,CAAA;AACvC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,uBAAuB,CAAA;AACrC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,2BAA2B,CAAA;AACzC,cAAc,6CAA6C,CAAA;AAC3D,cAAc,oCAAoC,CAAA;AAClD,cAAc,eAAe,CAAA;AAE7B,cAAc,aAAa,CAAA;AAC3B,cAAc,8BAA8B,CAAA;AAC5C,cAAc,iBAAiB,CAAA;AAC/B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,SAAS,CAAA;AACvB,cAAc,6BAA6B,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/features/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAA;AAK3F,OAAO,EACL,aAAa,EACb,QAAQ,EACR,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,aAAa,EACb,KAAK,KAAK,EACV,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,GAC1B,MAAM,6BAA6B,CAAA;AACpC,cAAc,uBAAuB,CAAA;AACrC,cAAc,QAAQ,CAAA;AACtB,cAAc,uBAAuB,CAAA;AACrC,cAAc,qBAAqB,CAAA;AACnC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,yBAAyB,CAAA;AACvC,cAAc,eAAe,CAAA;AAC7B,cAAc,qBAAqB,CAAA;AACnC,cAAc,kBAAkB,CAAA;AAChC,cAAc,0BAA0B,CAAA;AACxC,cAAc,oBAAoB,CAAA;AAClC,cAAc,2BAA2B,CAAA;AACzC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,oBAAoB,CAAA;AAClC,cAAc,yBAAyB,CAAA;AACvC,cAAc,qBAAqB,CAAA;AACnC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,uBAAuB,CAAA;AACrC,cAAc,2BAA2B,CAAA;AACzC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,kBAAkB,CAAA;AAChC,cAAc,mBAAmB,CAAA;AACjC,cAAc,mBAAmB,CAAA;AACjC,cAAc,wBAAwB,CAAA;AACtC,cAAc,yBAAyB,CAAA;AACvC,cAAc,oBAAoB,CAAA;AAClC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,sBAAsB,CAAA;AACpC,cAAc,wBAAwB,CAAA;AACtC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,2BAA2B,CAAA;AACzC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,iBAAiB,CAAA;AAS/B,cAAc,eAAe,CAAA;AAC7B,cAAc,SAAS,CAAA;AACvB,cAAc,sBAAsB,CAAA;AACpC,cAAc,oBAAoB,CAAA;AAClC,cAAc,sBAAsB,CAAA;AACpC,cAAc,qBAAqB,CAAA;AACnC,cAAc,uBAAuB,CAAA;AACrC,cAAc,kBAAkB,CAAA;AAChC,cAAc,uBAAuB,CAAA;AACrC,cAAc,wBAAwB,CAAA;AACtC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,yBAAyB,CAAA;AACvC,cAAc,oBAAoB,CAAA;AAClC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,yBAAyB,CAAA;AACvC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,oBAAoB,CAAA;AAClC,cAAc,2BAA2B,CAAA;AACzC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,yBAAyB,CAAA;AACvC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,uBAAuB,CAAA;AACrC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,2BAA2B,CAAA;AACzC,cAAc,6CAA6C,CAAA;AAC3D,cAAc,oCAAoC,CAAA;AAClD,cAAc,eAAe,CAAA;AAE7B,cAAc,aAAa,CAAA;AAC3B,cAAc,8BAA8B,CAAA;AAC5C,cAAc,iBAAiB,CAAA;AAC/B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,SAAS,CAAA;AACvB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,6BAA6B,CAAA"}
|
|
@@ -78,10 +78,12 @@ import {
|
|
|
78
78
|
RatioTabs,
|
|
79
79
|
ReleaseMediaManager,
|
|
80
80
|
SEOEditorPreview,
|
|
81
|
+
SLOT_STICKINESS,
|
|
81
82
|
STRIP_CELL_MAX_WIDTH,
|
|
82
83
|
SectionSelector,
|
|
83
84
|
SelectButton,
|
|
84
85
|
SocialLinksManager,
|
|
86
|
+
SortableList,
|
|
85
87
|
SsoAuthShell,
|
|
86
88
|
SsoProviderButtons,
|
|
87
89
|
StartWithOpenFrameButton,
|
|
@@ -146,6 +148,7 @@ import {
|
|
|
146
148
|
useNotifications,
|
|
147
149
|
useOptionalNotifications,
|
|
148
150
|
useOptionalTimeTracker,
|
|
151
|
+
useSortableItem,
|
|
149
152
|
useTheme,
|
|
150
153
|
useThemeToggle,
|
|
151
154
|
useTimeTracker,
|
|
@@ -153,7 +156,7 @@ import {
|
|
|
153
156
|
useVideoOriginPreconnect,
|
|
154
157
|
useVideoWarmup,
|
|
155
158
|
useWalkthroughVideo
|
|
156
|
-
} from "../../chunk-
|
|
159
|
+
} from "../../chunk-G3NBTL4I.js";
|
|
157
160
|
import "../../chunk-7EUIW46X.js";
|
|
158
161
|
import "../../chunk-LXC6P2EO.js";
|
|
159
162
|
import "../../chunk-EL5YVPD5.js";
|
|
@@ -248,10 +251,12 @@ export {
|
|
|
248
251
|
RatioTabs,
|
|
249
252
|
ReleaseMediaManager,
|
|
250
253
|
SEOEditorPreview,
|
|
254
|
+
SLOT_STICKINESS,
|
|
251
255
|
STRIP_CELL_MAX_WIDTH,
|
|
252
256
|
SectionSelector,
|
|
253
257
|
SelectButton,
|
|
254
258
|
SocialLinksManager,
|
|
259
|
+
SortableList,
|
|
255
260
|
SsoAuthShell,
|
|
256
261
|
SsoProviderButtons,
|
|
257
262
|
StartWithOpenFrameButton,
|
|
@@ -316,6 +321,7 @@ export {
|
|
|
316
321
|
useNotifications,
|
|
317
322
|
useOptionalNotifications,
|
|
318
323
|
useOptionalTimeTracker,
|
|
324
|
+
useSortableItem,
|
|
319
325
|
useTheme,
|
|
320
326
|
useThemeToggle,
|
|
321
327
|
useTimeTracker,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/features/sortable-list/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AACtE,OAAO,EAAE,KAAK,YAAY,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The arithmetic behind a vertical sortable list: where a dragged item would
|
|
3
|
+
* come to rest at each index, which of those places it is currently nearest to,
|
|
4
|
+
* and how far that pushes everything else.
|
|
5
|
+
*
|
|
6
|
+
* Pure on purpose. The DOM is read exactly once, when the drag starts, and
|
|
7
|
+
* everything after that is numbers — so the rules can be unit-tested instead of
|
|
8
|
+
* discovered in a browser, and a card moving out of the way can never change the
|
|
9
|
+
* answer that moved it and start an oscillation.
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Share of one slot's travel that the slot an item already holds keeps as a
|
|
13
|
+
* handicap.
|
|
14
|
+
*
|
|
15
|
+
* Without it an item ends up sitting exactly ON a boundary the instant it
|
|
16
|
+
* crosses one: leaving a slot costs half an item of dragging and coming back
|
|
17
|
+
* costs a pixel, which reads as the list changing its mind about the rules. The
|
|
18
|
+
* handicap turns that into a dead band, so both cost the same movement — and a
|
|
19
|
+
* boundary just crossed cannot be re-crossed by jitter, or by the hand simply
|
|
20
|
+
* stopping.
|
|
21
|
+
*/
|
|
22
|
+
export declare const SLOT_STICKINESS = 0.25;
|
|
23
|
+
export interface DragSlots {
|
|
24
|
+
/** Every item's top edge, before anything moved, measured from the list's own
|
|
25
|
+
* top rather than the viewport or the document — so a scroll during the drag
|
|
26
|
+
* (the page, the layout's `<main>`, any ancestor) leaves them all valid. */
|
|
27
|
+
tops: number[];
|
|
28
|
+
/** Every item's bottom edge, same frame of reference. */
|
|
29
|
+
bottoms: number[];
|
|
30
|
+
/** The dragged item's own height. */
|
|
31
|
+
height: number;
|
|
32
|
+
/** The index the drag started from. */
|
|
33
|
+
from: number;
|
|
34
|
+
/** How far a displaced item travels: the dragged item's height + the row gap. */
|
|
35
|
+
step: number;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Reads the list once, at drag start. The only DOM access in this module.
|
|
39
|
+
*
|
|
40
|
+
* `origin` is the list's own top edge in viewport coordinates; everything is
|
|
41
|
+
* stored relative to it, so auto-scrolling an ancestor mid-drag moves the list
|
|
42
|
+
* and the pointer together and none of this goes stale.
|
|
43
|
+
*/
|
|
44
|
+
export declare function measureSlots(items: readonly HTMLElement[], from: number, gap: number, origin: number): DragSlots;
|
|
45
|
+
/**
|
|
46
|
+
* The slot the dragged item is now nearest to landing in, given the one it
|
|
47
|
+
* currently holds and how far it has been dragged.
|
|
48
|
+
*
|
|
49
|
+
* Nearest — not "has crossed" — is what dnd-kit sorted by, and it is why the
|
|
50
|
+
* list opens up when it does: nearest flips at the midpoint between two slots,
|
|
51
|
+
* so half an item of travel is enough, where waiting for the item to cross a
|
|
52
|
+
* neighbour outright takes twice as long and reads as late.
|
|
53
|
+
*/
|
|
54
|
+
export declare function resolveSlot(slots: DragSlots, held: number, offset: number): number;
|
|
55
|
+
/** How far the item at `index` has to stand aside while the drop is aimed at `to`. */
|
|
56
|
+
export declare function shiftFor(slots: DragSlots, index: number, to: number): number;
|
|
57
|
+
//# sourceMappingURL=slot-geometry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slot-geometry.d.ts","sourceRoot":"","sources":["../../../../src/components/features/sortable-list/slot-geometry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH;;;;;;;;;;GAUG;AACH,eAAO,MAAM,eAAe,OAAO,CAAA;AAEnC,MAAM,WAAW,SAAS;IACxB;;iFAE6E;IAC7E,IAAI,EAAE,MAAM,EAAE,CAAA;IACd,yDAAyD;IACzD,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,qCAAqC;IACrC,MAAM,EAAE,MAAM,CAAA;IACd,uCAAuC;IACvC,IAAI,EAAE,MAAM,CAAA;IACZ,iFAAiF;IACjF,IAAI,EAAE,MAAM,CAAA;CACb;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,SAAS,WAAW,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,SAAS,CAShH;AAcD;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAalF;AAED,sFAAsF;AACtF,wBAAgB,QAAQ,CAAC,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAK5E"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
/** Marks the elements the list reorders. Set by `useSortableItem`, never by hand. */
|
|
3
|
+
export declare const SORTABLE_ITEM_ATTRIBUTE = "data-sortable-item";
|
|
4
|
+
interface SortableListContextValue {
|
|
5
|
+
/** Distinguishes this list's drags from any other list's on the page. */
|
|
6
|
+
dragType: string;
|
|
7
|
+
disabled: boolean;
|
|
8
|
+
/** Reorders the list. Used by the drop AND by a handle's arrow keys. */
|
|
9
|
+
reorder: (from: number, to: number) => void;
|
|
10
|
+
/** Every registered item, in DOM order. */
|
|
11
|
+
readItems: () => HTMLElement[];
|
|
12
|
+
}
|
|
13
|
+
export declare function useSortableListContext(): SortableListContextValue;
|
|
14
|
+
export interface SortableListProps {
|
|
15
|
+
/** Called once, on drop or on an arrow key — never mid-drag. */
|
|
16
|
+
onReorder: (from: number, to: number) => void;
|
|
17
|
+
/**
|
|
18
|
+
* Names an item for the live region, e.g. `index => scripts[index].name`.
|
|
19
|
+
* Without it a move is announced as "Item moved to position 2 of 5".
|
|
20
|
+
*/
|
|
21
|
+
getItemLabel?: (index: number) => string | undefined;
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
className?: string;
|
|
24
|
+
children: ReactNode;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* A vertical list whose items can be reordered by dragging a handle.
|
|
28
|
+
*
|
|
29
|
+
* **The drag moves nothing but transforms.** The item being dragged keeps its
|
|
30
|
+
* slot and is translated to follow the pointer; the items it passes are
|
|
31
|
+
* translated by exactly its height plus the row gap, into the slot it vacated.
|
|
32
|
+
* The list's layout — and so the height of the page around it — is therefore
|
|
33
|
+
* identical from the first frame of the drag to the last, which is what makes
|
|
34
|
+
* the slide safe to animate. Opening and closing real space instead (margins,
|
|
35
|
+
* `display: none`) cannot be: interrupt one of those transitions by moving the
|
|
36
|
+
* pointer, or reorder the DOM on drop, and the two ends run at different rates
|
|
37
|
+
* and the page jumps.
|
|
38
|
+
*
|
|
39
|
+
* The native drag image is switched off — the browser draws it washed out and
|
|
40
|
+
* offers no way to style it — so what follows the pointer is the real item, at
|
|
41
|
+
* full opacity, styled by the consumer off `isDragging`.
|
|
42
|
+
*
|
|
43
|
+
* Deliberately NOT what the ticket board does: a board moves cards between
|
|
44
|
+
* columns and its cards are drop targets in their own right. Here the answer is
|
|
45
|
+
* geometry over a single column, which is why it fits in one small module. The
|
|
46
|
+
* rules it sorts by live in `slot-geometry.ts`.
|
|
47
|
+
*/
|
|
48
|
+
export declare function SortableList({ onReorder, getItemLabel, disabled, className, children }: SortableListProps): import("react").JSX.Element;
|
|
49
|
+
export {};
|
|
50
|
+
//# sourceMappingURL=sortable-list.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sortable-list.d.ts","sourceRoot":"","sources":["../../../../src/components/features/sortable-list/sortable-list.tsx"],"names":[],"mappings":"AAKA,OAAO,EAEL,KAAK,SAAS,EAQf,MAAM,OAAO,CAAA;AAKd,qFAAqF;AACrF,eAAO,MAAM,uBAAuB,uBAAuB,CAAA;AAQ3D,UAAU,wBAAwB;IAChC,yEAAyE;IACzE,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,OAAO,CAAA;IACjB,wEAAwE;IACxE,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IAC3C,2CAA2C;IAC3C,SAAS,EAAE,MAAM,WAAW,EAAE,CAAA;CAC/B;AAID,wBAAgB,sBAAsB,IAAI,wBAAwB,CAIjE;AAED,MAAM,WAAW,iBAAiB;IAChC,gEAAgE;IAChE,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IAC7C;;;OAGG;IACH,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAA;IACpD,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,EAAE,SAAS,CAAA;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,YAAY,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,QAAgB,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,iBAAiB,+BA2LjH"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type KeyboardEvent } from 'react';
|
|
2
|
+
export interface SortableItem {
|
|
3
|
+
/** Goes on the item's root element — the thing that moves. */
|
|
4
|
+
itemRef: (node: HTMLElement | null) => void;
|
|
5
|
+
/**
|
|
6
|
+
* Goes on the grip. Only the grip starts a drag, so text selection and normal
|
|
7
|
+
* clicking inside the item keep working, and it carries the keyboard
|
|
8
|
+
* alternative — so spread it rather than picking it apart.
|
|
9
|
+
*/
|
|
10
|
+
dragHandleProps: {
|
|
11
|
+
ref: (node: HTMLElement | null) => void;
|
|
12
|
+
onKeyDown: (event: KeyboardEvent<HTMLElement>) => void;
|
|
13
|
+
};
|
|
14
|
+
isDragging: boolean;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Registers one item of a {@link SortableList}.
|
|
18
|
+
*
|
|
19
|
+
* The item's own element is the draggable, and the list finds it by the marker
|
|
20
|
+
* this hook sets — so nothing about a row's identity has to survive a round trip
|
|
21
|
+
* through the DOM, and there is no per-item id to mismatch during hydration.
|
|
22
|
+
*
|
|
23
|
+
* Pragmatic drag and drop deliberately ships no keyboard dragging, so the grip
|
|
24
|
+
* carries its own: Arrow Up / Arrow Down move the item one place. One press, one
|
|
25
|
+
* move — no lift-and-place mode to get stuck in, and it works identically for
|
|
26
|
+
* screen-reader users, who hear the result from the list's live region.
|
|
27
|
+
*/
|
|
28
|
+
export declare function useSortableItem(): SortableItem;
|
|
29
|
+
//# sourceMappingURL=use-sortable-item.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-sortable-item.d.ts","sourceRoot":"","sources":["../../../../src/components/features/sortable-list/use-sortable-item.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,aAAa,EAAoC,MAAM,OAAO,CAAA;AAI5E,MAAM,WAAW,YAAY;IAC3B,8DAA8D;IAC9D,OAAO,EAAE,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAA;IAC3C;;;;OAIG;IACH,eAAe,EAAE;QAIf,GAAG,EAAE,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAA;QACvC,SAAS,EAAE,CAAC,KAAK,EAAE,aAAa,CAAC,WAAW,CAAC,KAAK,IAAI,CAAA;KACvD,CAAA;IACD,UAAU,EAAE,OAAO,CAAA;CACpB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,IAAI,YAAY,CAoD9C"}
|