@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.
Files changed (187) hide show
  1. package/dist/{chunk-6ER3AYJM.js → chunk-25YLMIWU.js} +3 -3
  2. package/dist/{chunk-HO3Q7NXJ.js → chunk-26HAJBSQ.js} +2 -2
  3. package/dist/{chunk-P22HM2MO.cjs → chunk-33FOBAWS.cjs} +18 -18
  4. package/dist/{chunk-P22HM2MO.cjs.map → chunk-33FOBAWS.cjs.map} +1 -1
  5. package/dist/{chunk-N5A4AC2J.cjs → chunk-4EGNYOZA.cjs} +23 -23
  6. package/dist/{chunk-N5A4AC2J.cjs.map → chunk-4EGNYOZA.cjs.map} +1 -1
  7. package/dist/{chunk-A7ES3NZK.cjs → chunk-4WREPWRL.cjs} +3 -3
  8. package/dist/{chunk-A7ES3NZK.cjs.map → chunk-4WREPWRL.cjs.map} +1 -1
  9. package/dist/{chunk-CU6Q2KQT.cjs → chunk-5HNZTPAB.cjs} +12 -12
  10. package/dist/{chunk-CU6Q2KQT.cjs.map → chunk-5HNZTPAB.cjs.map} +1 -1
  11. package/dist/{chunk-MLVF3OXU.cjs → chunk-5JF6H7OJ.cjs} +76 -76
  12. package/dist/{chunk-MLVF3OXU.cjs.map → chunk-5JF6H7OJ.cjs.map} +1 -1
  13. package/dist/{chunk-UXW63WCV.cjs → chunk-64HHDGRN.cjs} +4 -4
  14. package/dist/{chunk-UXW63WCV.cjs.map → chunk-64HHDGRN.cjs.map} +1 -1
  15. package/dist/{chunk-KXLQITOX.cjs → chunk-6YXEZCVG.cjs} +5 -5
  16. package/dist/{chunk-KXLQITOX.cjs.map → chunk-6YXEZCVG.cjs.map} +1 -1
  17. package/dist/{chunk-SST2YI7S.cjs → chunk-6ZOVSD4M.cjs} +14 -14
  18. package/dist/{chunk-SST2YI7S.cjs.map → chunk-6ZOVSD4M.cjs.map} +1 -1
  19. package/dist/{chunk-M5TWHFIN.cjs → chunk-A6TAVIBX.cjs} +42 -42
  20. package/dist/{chunk-M5TWHFIN.cjs.map → chunk-A6TAVIBX.cjs.map} +1 -1
  21. package/dist/{chunk-J76LCSR4.cjs → chunk-BE6TRUKY.cjs} +40 -40
  22. package/dist/{chunk-J76LCSR4.cjs.map → chunk-BE6TRUKY.cjs.map} +1 -1
  23. package/dist/{chunk-Q6RC3YGW.cjs → chunk-DFJ7TWH6.cjs} +3 -3
  24. package/dist/{chunk-Q6RC3YGW.cjs.map → chunk-DFJ7TWH6.cjs.map} +1 -1
  25. package/dist/{chunk-B2GEKAAA.js → chunk-DRNSIK3V.js} +2 -2
  26. package/dist/{chunk-CTTY5EKH.js → chunk-FXVMRZIQ.js} +5 -5
  27. package/dist/{chunk-QZ64JOE2.js → chunk-G3NBTL4I.js} +3246 -2557
  28. package/dist/chunk-G3NBTL4I.js.map +1 -0
  29. package/dist/{chunk-TXV444YV.js → chunk-G7ROZAY5.js} +3 -3
  30. package/dist/{chunk-E56VNTBV.cjs → chunk-IPO24G7U.cjs} +1775 -1086
  31. package/dist/chunk-IPO24G7U.cjs.map +1 -0
  32. package/dist/{chunk-CVCQW7WG.js → chunk-LJWTXODF.js} +3 -3
  33. package/dist/{chunk-P7MSXPGL.js → chunk-NNGQ6ONX.js} +8 -8
  34. package/dist/{chunk-XOKRFZBD.cjs → chunk-QCBBX6DO.cjs} +97 -97
  35. package/dist/{chunk-XOKRFZBD.cjs.map → chunk-QCBBX6DO.cjs.map} +1 -1
  36. package/dist/{chunk-GSONSIWG.js → chunk-R7A7WHXP.js} +60 -35
  37. package/dist/chunk-R7A7WHXP.js.map +1 -0
  38. package/dist/{chunk-L36R3G7Z.js → chunk-RPCY2FAC.js} +6 -6
  39. package/dist/{chunk-QMQQ37RW.js → chunk-RRWWAH37.js} +2 -2
  40. package/dist/{chunk-ODRMPI3Y.js → chunk-SBKX2VSG.js} +2 -2
  41. package/dist/{chunk-KQKU4VXB.cjs → chunk-STHVHAV4.cjs} +82 -57
  42. package/dist/chunk-STHVHAV4.cjs.map +1 -0
  43. package/dist/{chunk-E2IPBWGT.js → chunk-UTEQHK3H.js} +6 -6
  44. package/dist/{chunk-6QRKCVYR.cjs → chunk-V5EYGEX7.cjs} +7 -7
  45. package/dist/{chunk-6QRKCVYR.cjs.map → chunk-V5EYGEX7.cjs.map} +1 -1
  46. package/dist/{chunk-K432ES7N.js → chunk-VJL46NHW.js} +4 -4
  47. package/dist/{chunk-QTO3WYB2.cjs → chunk-VJTD2DGF.cjs} +3 -3
  48. package/dist/{chunk-QTO3WYB2.cjs.map → chunk-VJTD2DGF.cjs.map} +1 -1
  49. package/dist/{chunk-VGLDA77S.js → chunk-VRX6Y6A7.js} +2 -2
  50. package/dist/{chunk-OR67WC32.js → chunk-WBQ3NOH7.js} +2 -2
  51. package/dist/{chunk-UL3WQWTF.js → chunk-Y6TXTBIQ.js} +2 -2
  52. package/dist/{chunk-YAOBDOI5.cjs → chunk-YHRE4JBF.cjs} +32 -32
  53. package/dist/{chunk-YAOBDOI5.cjs.map → chunk-YHRE4JBF.cjs.map} +1 -1
  54. package/dist/components/case-studies/index.cjs +10 -10
  55. package/dist/components/case-studies/index.js +4 -4
  56. package/dist/components/chat/index.cjs +4 -4
  57. package/dist/components/chat/index.js +3 -3
  58. package/dist/components/contact/index.cjs +5 -5
  59. package/dist/components/contact/index.js +4 -4
  60. package/dist/components/docs/index.cjs +7 -7
  61. package/dist/components/docs/index.js +6 -6
  62. package/dist/components/embeds/index.cjs +5 -5
  63. package/dist/components/embeds/index.js +4 -4
  64. package/dist/components/faq/index.cjs +6 -6
  65. package/dist/components/faq/index.js +5 -5
  66. package/dist/components/features/board/aim.d.ts +57 -0
  67. package/dist/components/features/board/aim.d.ts.map +1 -0
  68. package/dist/components/features/board/board-column-header.d.ts.map +1 -1
  69. package/dist/components/features/board/board-column.d.ts +8 -4
  70. package/dist/components/features/board/board-column.d.ts.map +1 -1
  71. package/dist/components/features/board/board.d.ts +15 -4
  72. package/dist/components/features/board/board.d.ts.map +1 -1
  73. package/dist/components/features/board/drop-aim.d.ts +34 -0
  74. package/dist/components/features/board/drop-aim.d.ts.map +1 -0
  75. package/dist/components/features/board/lane-geometry.d.ts +22 -0
  76. package/dist/components/features/board/lane-geometry.d.ts.map +1 -0
  77. package/dist/components/features/board/pending-move.d.ts +77 -0
  78. package/dist/components/features/board/pending-move.d.ts.map +1 -0
  79. package/dist/components/features/board/resolve-drop.d.ts +19 -0
  80. package/dist/components/features/board/resolve-drop.d.ts.map +1 -0
  81. package/dist/components/features/board/ticket-card.d.ts +25 -9
  82. package/dist/components/features/board/ticket-card.d.ts.map +1 -1
  83. package/dist/components/features/board/use-board-collapse.d.ts.map +1 -1
  84. package/dist/components/features/board/use-lane-scroll-anchor.d.ts +27 -0
  85. package/dist/components/features/board/use-lane-scroll-anchor.d.ts.map +1 -0
  86. package/dist/components/features/index.cjs +10 -4
  87. package/dist/components/features/index.cjs.map +1 -1
  88. package/dist/components/features/index.d.ts +1 -0
  89. package/dist/components/features/index.d.ts.map +1 -1
  90. package/dist/components/features/index.js +9 -3
  91. package/dist/components/features/sortable-list/index.d.ts +4 -0
  92. package/dist/components/features/sortable-list/index.d.ts.map +1 -0
  93. package/dist/components/features/sortable-list/slot-geometry.d.ts +57 -0
  94. package/dist/components/features/sortable-list/slot-geometry.d.ts.map +1 -0
  95. package/dist/components/features/sortable-list/sortable-list.d.ts +50 -0
  96. package/dist/components/features/sortable-list/sortable-list.d.ts.map +1 -0
  97. package/dist/components/features/sortable-list/use-sortable-item.d.ts +29 -0
  98. package/dist/components/features/sortable-list/use-sortable-item.d.ts.map +1 -0
  99. package/dist/components/help-center-pages/index.cjs +25 -25
  100. package/dist/components/help-center-pages/index.js +16 -16
  101. package/dist/components/index.cjs +144 -138
  102. package/dist/components/index.cjs.map +1 -1
  103. package/dist/components/index.js +20 -14
  104. package/dist/components/index.js.map +1 -1
  105. package/dist/components/meeting-scheduler/index.cjs +35 -35
  106. package/dist/components/meeting-scheduler/index.js +5 -5
  107. package/dist/components/navigation/index.cjs +4 -4
  108. package/dist/components/navigation/index.js +3 -3
  109. package/dist/components/onboarding-guides/index.cjs +8 -8
  110. package/dist/components/onboarding-guides/index.js +7 -7
  111. package/dist/components/related-content/index.cjs +6 -6
  112. package/dist/components/related-content/index.js +5 -5
  113. package/dist/components/tickets/index.cjs +8 -8
  114. package/dist/components/tickets/index.js +7 -7
  115. package/dist/components/ui/index.cjs +4 -4
  116. package/dist/components/ui/index.js +3 -3
  117. package/dist/components/ui/square-avatar.d.ts.map +1 -1
  118. package/dist/hooks/index.cjs +3 -3
  119. package/dist/hooks/index.js +2 -2
  120. package/dist/index.cjs +10 -4
  121. package/dist/index.cjs.map +1 -1
  122. package/dist/index.js +9 -3
  123. package/dist/nats/index.cjs +2 -2
  124. package/dist/nats/index.js +1 -1
  125. package/dist/nats/nats.d.ts.map +1 -1
  126. package/dist/nats/shared-connection.d.ts +13 -6
  127. package/dist/nats/shared-connection.d.ts.map +1 -1
  128. package/dist/utils/auto-scroll-ancestors.d.ts +43 -0
  129. package/dist/utils/auto-scroll-ancestors.d.ts.map +1 -0
  130. package/dist/utils/drag-effect.d.ts +21 -0
  131. package/dist/utils/drag-effect.d.ts.map +1 -0
  132. package/dist/utils/scroll-parent.d.ts +11 -0
  133. package/dist/utils/scroll-parent.d.ts.map +1 -0
  134. package/package.json +6 -3
  135. package/src/__tests__/board-aim.test.ts +152 -0
  136. package/src/__tests__/board-pending-move.test.ts +113 -0
  137. package/src/__tests__/board-resolve-drop.test.ts +68 -0
  138. package/src/__tests__/sortable-slot-geometry.test.ts +105 -0
  139. package/src/components/features/board/.board-column.md +17 -4
  140. package/src/components/features/board/.board.md +11 -7
  141. package/src/components/features/board/.ticket-card.md +27 -5
  142. package/src/components/features/board/aim.ts +131 -0
  143. package/src/components/features/board/board-column-header.tsx +2 -9
  144. package/src/components/features/board/board-column.tsx +137 -66
  145. package/src/components/features/board/board.tsx +501 -258
  146. package/src/components/features/board/drop-aim.ts +50 -0
  147. package/src/components/features/board/lane-geometry.ts +44 -0
  148. package/src/components/features/board/pending-move.ts +116 -0
  149. package/src/components/features/board/resolve-drop.ts +28 -0
  150. package/src/components/features/board/ticket-card.tsx +256 -47
  151. package/src/components/features/board/use-board-collapse.ts +16 -14
  152. package/src/components/features/board/use-lane-scroll-anchor.ts +79 -0
  153. package/src/components/features/index.ts +1 -0
  154. package/src/components/features/sortable-list/.sortable-list.md +82 -0
  155. package/src/components/features/sortable-list/index.ts +3 -0
  156. package/src/components/features/sortable-list/slot-geometry.ts +100 -0
  157. package/src/components/features/sortable-list/sortable-list.tsx +270 -0
  158. package/src/components/features/sortable-list/use-sortable-item.ts +92 -0
  159. package/src/components/ui/square-avatar.tsx +5 -0
  160. package/src/nats/__tests__/reconnect-lifecycle.test.tsx +814 -0
  161. package/src/nats/nats.ts +56 -13
  162. package/src/nats/shared-connection.ts +132 -36
  163. package/src/stories/.TicketCard.stories.md +6 -12
  164. package/src/stories/Board.stories.tsx +16 -7
  165. package/src/stories/TicketCard.stories.tsx +38 -76
  166. package/src/utils/auto-scroll-ancestors.ts +90 -0
  167. package/src/utils/drag-effect.ts +26 -0
  168. package/src/utils/scroll-parent.ts +23 -0
  169. package/dist/chunk-E56VNTBV.cjs.map +0 -1
  170. package/dist/chunk-GSONSIWG.js.map +0 -1
  171. package/dist/chunk-KQKU4VXB.cjs.map +0 -1
  172. package/dist/chunk-QZ64JOE2.js.map +0 -1
  173. /package/dist/{chunk-6ER3AYJM.js.map → chunk-25YLMIWU.js.map} +0 -0
  174. /package/dist/{chunk-HO3Q7NXJ.js.map → chunk-26HAJBSQ.js.map} +0 -0
  175. /package/dist/{chunk-B2GEKAAA.js.map → chunk-DRNSIK3V.js.map} +0 -0
  176. /package/dist/{chunk-CTTY5EKH.js.map → chunk-FXVMRZIQ.js.map} +0 -0
  177. /package/dist/{chunk-TXV444YV.js.map → chunk-G7ROZAY5.js.map} +0 -0
  178. /package/dist/{chunk-CVCQW7WG.js.map → chunk-LJWTXODF.js.map} +0 -0
  179. /package/dist/{chunk-P7MSXPGL.js.map → chunk-NNGQ6ONX.js.map} +0 -0
  180. /package/dist/{chunk-L36R3G7Z.js.map → chunk-RPCY2FAC.js.map} +0 -0
  181. /package/dist/{chunk-QMQQ37RW.js.map → chunk-RRWWAH37.js.map} +0 -0
  182. /package/dist/{chunk-ODRMPI3Y.js.map → chunk-SBKX2VSG.js.map} +0 -0
  183. /package/dist/{chunk-E2IPBWGT.js.map → chunk-UTEQHK3H.js.map} +0 -0
  184. /package/dist/{chunk-K432ES7N.js.map → chunk-VJL46NHW.js.map} +0 -0
  185. /package/dist/{chunk-VGLDA77S.js.map → chunk-VRX6Y6A7.js.map} +0 -0
  186. /package/dist/{chunk-OR67WC32.js.map → chunk-WBQ3NOH7.js.map} +0 -0
  187. /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
+ }