@flamingo-stack/openframe-frontend-core 0.0.555 → 0.0.556-snapshot.20260818165639
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-6ER3AYJM.js → chunk-25YLMIWU.js} +3 -3
- package/dist/{chunk-HO3Q7NXJ.js → chunk-26HAJBSQ.js} +2 -2
- package/dist/{chunk-P22HM2MO.cjs → chunk-33FOBAWS.cjs} +18 -18
- package/dist/{chunk-P22HM2MO.cjs.map → chunk-33FOBAWS.cjs.map} +1 -1
- package/dist/{chunk-N5A4AC2J.cjs → chunk-4EGNYOZA.cjs} +23 -23
- package/dist/{chunk-N5A4AC2J.cjs.map → chunk-4EGNYOZA.cjs.map} +1 -1
- package/dist/{chunk-A7ES3NZK.cjs → chunk-4WREPWRL.cjs} +3 -3
- package/dist/{chunk-A7ES3NZK.cjs.map → chunk-4WREPWRL.cjs.map} +1 -1
- package/dist/{chunk-CU6Q2KQT.cjs → chunk-5HNZTPAB.cjs} +12 -12
- package/dist/{chunk-CU6Q2KQT.cjs.map → chunk-5HNZTPAB.cjs.map} +1 -1
- package/dist/{chunk-MLVF3OXU.cjs → chunk-5JF6H7OJ.cjs} +76 -76
- package/dist/{chunk-MLVF3OXU.cjs.map → chunk-5JF6H7OJ.cjs.map} +1 -1
- package/dist/{chunk-UXW63WCV.cjs → chunk-64HHDGRN.cjs} +4 -4
- package/dist/{chunk-UXW63WCV.cjs.map → chunk-64HHDGRN.cjs.map} +1 -1
- package/dist/{chunk-KXLQITOX.cjs → chunk-6YXEZCVG.cjs} +5 -5
- package/dist/{chunk-KXLQITOX.cjs.map → chunk-6YXEZCVG.cjs.map} +1 -1
- package/dist/{chunk-SST2YI7S.cjs → chunk-6ZOVSD4M.cjs} +14 -14
- package/dist/{chunk-SST2YI7S.cjs.map → chunk-6ZOVSD4M.cjs.map} +1 -1
- package/dist/{chunk-M5TWHFIN.cjs → chunk-A6TAVIBX.cjs} +42 -42
- package/dist/{chunk-M5TWHFIN.cjs.map → chunk-A6TAVIBX.cjs.map} +1 -1
- package/dist/{chunk-J76LCSR4.cjs → chunk-BE6TRUKY.cjs} +40 -40
- package/dist/{chunk-J76LCSR4.cjs.map → chunk-BE6TRUKY.cjs.map} +1 -1
- package/dist/{chunk-Q6RC3YGW.cjs → chunk-DFJ7TWH6.cjs} +3 -3
- package/dist/{chunk-Q6RC3YGW.cjs.map → chunk-DFJ7TWH6.cjs.map} +1 -1
- package/dist/{chunk-B2GEKAAA.js → chunk-DRNSIK3V.js} +2 -2
- package/dist/{chunk-CTTY5EKH.js → chunk-FXVMRZIQ.js} +5 -5
- package/dist/{chunk-QZ64JOE2.js → chunk-G3NBTL4I.js} +3246 -2557
- package/dist/chunk-G3NBTL4I.js.map +1 -0
- package/dist/{chunk-TXV444YV.js → chunk-G7ROZAY5.js} +3 -3
- package/dist/{chunk-E56VNTBV.cjs → chunk-IPO24G7U.cjs} +1775 -1086
- package/dist/chunk-IPO24G7U.cjs.map +1 -0
- package/dist/{chunk-CVCQW7WG.js → chunk-LJWTXODF.js} +3 -3
- package/dist/{chunk-P7MSXPGL.js → chunk-NNGQ6ONX.js} +8 -8
- package/dist/{chunk-XOKRFZBD.cjs → chunk-QCBBX6DO.cjs} +97 -97
- package/dist/{chunk-XOKRFZBD.cjs.map → chunk-QCBBX6DO.cjs.map} +1 -1
- package/dist/{chunk-GSONSIWG.js → chunk-R7A7WHXP.js} +60 -35
- package/dist/chunk-R7A7WHXP.js.map +1 -0
- package/dist/{chunk-L36R3G7Z.js → chunk-RPCY2FAC.js} +6 -6
- package/dist/{chunk-QMQQ37RW.js → chunk-RRWWAH37.js} +2 -2
- package/dist/{chunk-ODRMPI3Y.js → chunk-SBKX2VSG.js} +2 -2
- package/dist/{chunk-KQKU4VXB.cjs → chunk-STHVHAV4.cjs} +82 -57
- package/dist/chunk-STHVHAV4.cjs.map +1 -0
- package/dist/{chunk-E2IPBWGT.js → chunk-UTEQHK3H.js} +6 -6
- package/dist/{chunk-6QRKCVYR.cjs → chunk-V5EYGEX7.cjs} +7 -7
- package/dist/{chunk-6QRKCVYR.cjs.map → chunk-V5EYGEX7.cjs.map} +1 -1
- package/dist/{chunk-K432ES7N.js → chunk-VJL46NHW.js} +4 -4
- package/dist/{chunk-QTO3WYB2.cjs → chunk-VJTD2DGF.cjs} +3 -3
- package/dist/{chunk-QTO3WYB2.cjs.map → chunk-VJTD2DGF.cjs.map} +1 -1
- package/dist/{chunk-VGLDA77S.js → chunk-VRX6Y6A7.js} +2 -2
- package/dist/{chunk-OR67WC32.js → chunk-WBQ3NOH7.js} +2 -2
- package/dist/{chunk-UL3WQWTF.js → chunk-Y6TXTBIQ.js} +2 -2
- package/dist/{chunk-YAOBDOI5.cjs → chunk-YHRE4JBF.cjs} +32 -32
- package/dist/{chunk-YAOBDOI5.cjs.map → chunk-YHRE4JBF.cjs.map} +1 -1
- package/dist/components/case-studies/index.cjs +10 -10
- package/dist/components/case-studies/index.js +4 -4
- package/dist/components/chat/index.cjs +4 -4
- package/dist/components/chat/index.js +3 -3
- package/dist/components/contact/index.cjs +5 -5
- package/dist/components/contact/index.js +4 -4
- package/dist/components/docs/index.cjs +7 -7
- package/dist/components/docs/index.js +6 -6
- package/dist/components/embeds/index.cjs +5 -5
- package/dist/components/embeds/index.js +4 -4
- package/dist/components/faq/index.cjs +6 -6
- package/dist/components/faq/index.js +5 -5
- 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 +10 -4
- 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 +9 -3
- 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 +25 -25
- package/dist/components/help-center-pages/index.js +16 -16
- package/dist/components/index.cjs +144 -138
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.js +20 -14
- package/dist/components/index.js.map +1 -1
- package/dist/components/meeting-scheduler/index.cjs +35 -35
- package/dist/components/meeting-scheduler/index.js +5 -5
- package/dist/components/navigation/index.cjs +4 -4
- package/dist/components/navigation/index.js +3 -3
- package/dist/components/onboarding-guides/index.cjs +8 -8
- package/dist/components/onboarding-guides/index.js +7 -7
- package/dist/components/related-content/index.cjs +6 -6
- package/dist/components/related-content/index.js +5 -5
- package/dist/components/tickets/index.cjs +8 -8
- package/dist/components/tickets/index.js +7 -7
- package/dist/components/ui/index.cjs +4 -4
- package/dist/components/ui/index.js +3 -3
- package/dist/components/ui/square-avatar.d.ts.map +1 -1
- package/dist/hooks/index.cjs +3 -3
- package/dist/hooks/index.js +2 -2
- package/dist/index.cjs +10 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -3
- package/dist/nats/index.cjs +2 -2
- package/dist/nats/index.js +1 -1
- package/dist/nats/nats.d.ts.map +1 -1
- package/dist/nats/shared-connection.d.ts +13 -6
- package/dist/nats/shared-connection.d.ts.map +1 -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/nats/__tests__/reconnect-lifecycle.test.tsx +814 -0
- package/src/nats/nats.ts +56 -13
- package/src/nats/shared-connection.ts +132 -36
- 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-E56VNTBV.cjs.map +0 -1
- package/dist/chunk-GSONSIWG.js.map +0 -1
- package/dist/chunk-KQKU4VXB.cjs.map +0 -1
- package/dist/chunk-QZ64JOE2.js.map +0 -1
- /package/dist/{chunk-6ER3AYJM.js.map → chunk-25YLMIWU.js.map} +0 -0
- /package/dist/{chunk-HO3Q7NXJ.js.map → chunk-26HAJBSQ.js.map} +0 -0
- /package/dist/{chunk-B2GEKAAA.js.map → chunk-DRNSIK3V.js.map} +0 -0
- /package/dist/{chunk-CTTY5EKH.js.map → chunk-FXVMRZIQ.js.map} +0 -0
- /package/dist/{chunk-TXV444YV.js.map → chunk-G7ROZAY5.js.map} +0 -0
- /package/dist/{chunk-CVCQW7WG.js.map → chunk-LJWTXODF.js.map} +0 -0
- /package/dist/{chunk-P7MSXPGL.js.map → chunk-NNGQ6ONX.js.map} +0 -0
- /package/dist/{chunk-L36R3G7Z.js.map → chunk-RPCY2FAC.js.map} +0 -0
- /package/dist/{chunk-QMQQ37RW.js.map → chunk-RRWWAH37.js.map} +0 -0
- /package/dist/{chunk-ODRMPI3Y.js.map → chunk-SBKX2VSG.js.map} +0 -0
- /package/dist/{chunk-E2IPBWGT.js.map → chunk-UTEQHK3H.js.map} +0 -0
- /package/dist/{chunk-K432ES7N.js.map → chunk-VJL46NHW.js.map} +0 -0
- /package/dist/{chunk-VGLDA77S.js.map → chunk-VRX6Y6A7.js.map} +0 -0
- /package/dist/{chunk-OR67WC32.js.map → chunk-WBQ3NOH7.js.map} +0 -0
- /package/dist/{chunk-UL3WQWTF.js.map → chunk-Y6TXTBIQ.js.map} +0 -0
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { combine } from '@atlaskit/pragmatic-drag-and-drop/combine'
|
|
2
|
+
import {
|
|
3
|
+
autoScrollForElements,
|
|
4
|
+
autoScrollWindowForElements,
|
|
5
|
+
} from '@atlaskit/pragmatic-drag-and-drop-auto-scroll/element'
|
|
6
|
+
import { unsafeOverflowAutoScrollForElements } from '@atlaskit/pragmatic-drag-and-drop-auto-scroll/unsafe-overflow/element'
|
|
7
|
+
import { scrollableAncestorsOf } from './scroll-parent'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* How far past a scroller's edge a drag still counts as "scroll this".
|
|
11
|
+
*
|
|
12
|
+
* Big on purpose: past the edge there is nothing else to hit, so the only
|
|
13
|
+
* question is whether the intent is obvious, and dragging beyond a container is
|
|
14
|
+
* about as obvious as intent gets.
|
|
15
|
+
*/
|
|
16
|
+
const OVERFLOW_REACH = 5000
|
|
17
|
+
|
|
18
|
+
const overflow = () => ({
|
|
19
|
+
forTopEdge: { top: OVERFLOW_REACH, left: OVERFLOW_REACH, right: OVERFLOW_REACH },
|
|
20
|
+
forBottomEdge: { bottom: OVERFLOW_REACH, left: OVERFLOW_REACH, right: OVERFLOW_REACH },
|
|
21
|
+
forLeftEdge: { left: OVERFLOW_REACH, top: OVERFLOW_REACH, bottom: OVERFLOW_REACH },
|
|
22
|
+
forRightEdge: { right: OVERFLOW_REACH, top: OVERFLOW_REACH, bottom: OVERFLOW_REACH },
|
|
23
|
+
})
|
|
24
|
+
|
|
25
|
+
/** Straight up and straight down only — no sideways reach at all. */
|
|
26
|
+
const verticalOverflow = () => ({
|
|
27
|
+
forTopEdge: { top: OVERFLOW_REACH },
|
|
28
|
+
forBottomEdge: { bottom: OVERFLOW_REACH },
|
|
29
|
+
})
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Registers drag auto-scroll for one scroller, both **inside** its edges and
|
|
33
|
+
* **past** them.
|
|
34
|
+
*
|
|
35
|
+
* Pragmatic's over-element scrolling only engages in a band just inside the
|
|
36
|
+
* edge, so a drag that has already left the container stops scrolling it — you
|
|
37
|
+
* have to hunt for the strip where it works. dnd-kit kept scrolling however far
|
|
38
|
+
* out you went, and `unsafeOverflowAutoScrollForElements` is Pragmatic's own
|
|
39
|
+
* answer for that; "unsafe" here only means it can reach a container the pointer
|
|
40
|
+
* is not over, which is exactly what is wanted.
|
|
41
|
+
*/
|
|
42
|
+
export function autoScrollBothWays(element: HTMLElement): () => void {
|
|
43
|
+
return combine(
|
|
44
|
+
autoScrollForElements({ element }),
|
|
45
|
+
unsafeOverflowAutoScrollForElements({ element, getOverflow: overflow }),
|
|
46
|
+
)
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Auto-scroll for one of several scrollers standing side by side — a board lane.
|
|
51
|
+
*
|
|
52
|
+
* Same as {@link autoScrollBothWays} except that its reach past the edges is
|
|
53
|
+
* vertical only, and that is the whole point. Lanes sit shoulder to shoulder, so
|
|
54
|
+
* a reach that also spreads sideways puts a pointer below the board inside
|
|
55
|
+
* EVERY lane's overflow region at once and scrolls all of them together. Keeping
|
|
56
|
+
* the region to the lane's own width means the pointer is below exactly one
|
|
57
|
+
* lane, and only that lane moves — which is what a board is expected to do.
|
|
58
|
+
*/
|
|
59
|
+
export function autoScrollColumn(element: HTMLElement): () => void {
|
|
60
|
+
return combine(
|
|
61
|
+
autoScrollForElements({ element }),
|
|
62
|
+
unsafeOverflowAutoScrollForElements({ element, getOverflow: verticalOverflow }),
|
|
63
|
+
)
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Registers auto-scroll on every scrollable ancestor of `element`, and on the
|
|
68
|
+
* window.
|
|
69
|
+
*
|
|
70
|
+
* dnd-kit walked the ancestor chain for you; Pragmatic makes each scroller opt
|
|
71
|
+
* in by name, which is why dragging towards the edge of the screen stopped
|
|
72
|
+
* scrolling anything after the migration. Registering the window alone would
|
|
73
|
+
* have fixed nothing either: the app's real scroller is the layout's `<main>`,
|
|
74
|
+
* not the document — so the chain has to be walked.
|
|
75
|
+
*
|
|
76
|
+
* Registration is passive; a scroller only moves while a drag is actually near
|
|
77
|
+
* its edge, so it is safe to call this once on mount.
|
|
78
|
+
*
|
|
79
|
+
* Register this ONCE per page region, not once per thing that can be dragged:
|
|
80
|
+
* Pragmatic keeps one entry per registration and each entry scrolls on its own,
|
|
81
|
+
* so registering the same `<main>` from five lanes scrolls it five times as
|
|
82
|
+
* fast.
|
|
83
|
+
*/
|
|
84
|
+
export function autoScrollAncestors(element: HTMLElement): () => void {
|
|
85
|
+
const cleanups = scrollableAncestorsOf(element).map(autoScrollBothWays)
|
|
86
|
+
// Cheap and harmless when the document itself does not scroll, and the only
|
|
87
|
+
// thing that works when it does.
|
|
88
|
+
cleanups.push(autoScrollWindowForElements())
|
|
89
|
+
return combine(...cleanups)
|
|
90
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Holds a native drag started from `element` to the "move" effect, from its very
|
|
3
|
+
* first frame.
|
|
4
|
+
*
|
|
5
|
+
* The browser picks the drag cursor from `dataTransfer.dropEffect`, and the
|
|
6
|
+
* value it starts each drag with comes from `effectAllowed`. Pragmatic never
|
|
7
|
+
* writes `effectAllowed`, so it stays `uninitialized` — which the browser reads
|
|
8
|
+
* as "all", whose initial `dropEffect` is `copy`. That is the green plus cursor
|
|
9
|
+
* flashing for one frame at the start of every drag, before the first `dragover`
|
|
10
|
+
* has had a chance to say otherwise.
|
|
11
|
+
*
|
|
12
|
+
* This is a raw listener rather than a Pragmatic callback because `effectAllowed`
|
|
13
|
+
* can only be written during the `dragstart` event itself, and none of
|
|
14
|
+
* Pragmatic's callbacks are handed the event.
|
|
15
|
+
*
|
|
16
|
+
* Distinct from `preventUnhandled`, which answers the other half of the same
|
|
17
|
+
* question: this sets what the drag starts as, that keeps it from falling back
|
|
18
|
+
* to "no drop" over everything that is not a drop target.
|
|
19
|
+
*/
|
|
20
|
+
export function holdMoveDragEffect(element: HTMLElement): () => void {
|
|
21
|
+
const onDragStart = (event: DragEvent) => {
|
|
22
|
+
if (event.dataTransfer) event.dataTransfer.effectAllowed = 'move'
|
|
23
|
+
}
|
|
24
|
+
element.addEventListener('dragstart', onDragStart)
|
|
25
|
+
return () => element.removeEventListener('dragstart', onDragStart)
|
|
26
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** Anything the browser can scroll. */
|
|
2
|
+
const SCROLLABLE = /(auto|scroll|overlay)/
|
|
3
|
+
|
|
4
|
+
/** Every scrollable ancestor of `element`, innermost first. */
|
|
5
|
+
export function scrollableAncestorsOf(element: HTMLElement): HTMLElement[] {
|
|
6
|
+
const found: HTMLElement[] = []
|
|
7
|
+
for (let node = element.parentElement; node && node !== document.body; node = node.parentElement) {
|
|
8
|
+
const style = getComputedStyle(node)
|
|
9
|
+
if (SCROLLABLE.test(style.overflowY) || SCROLLABLE.test(style.overflowX)) found.push(node)
|
|
10
|
+
}
|
|
11
|
+
return found
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* The nearest scrollable ancestor, or `null`.
|
|
16
|
+
*
|
|
17
|
+
* Stands in for "the working area this thing lives in": in an app whose layout
|
|
18
|
+
* scrolls a `<main>` rather than the document, that element is exactly the
|
|
19
|
+
* region a user considers to be the page.
|
|
20
|
+
*/
|
|
21
|
+
export function nearestScrollableAncestor(element: HTMLElement): HTMLElement | null {
|
|
22
|
+
return scrollableAncestorsOf(element)[0] ?? null
|
|
23
|
+
}
|