@flamingo-stack/openframe-frontend-core 0.0.578 → 0.0.579-1956.5350.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-NPNYQSCG.cjs → chunk-36TJYCF3.cjs} +27 -27
- package/dist/{chunk-NPNYQSCG.cjs.map → chunk-36TJYCF3.cjs.map} +1 -1
- package/dist/{chunk-NJDL7F7K.cjs → chunk-37XJYOAY.cjs} +17 -17
- package/dist/{chunk-NJDL7F7K.cjs.map → chunk-37XJYOAY.cjs.map} +1 -1
- package/dist/{chunk-LPFA56WY.js → chunk-3AX3ZEY3.js} +2 -2
- package/dist/{chunk-KQBYQBQN.cjs → chunk-4FJSN2XW.cjs} +10 -10
- package/dist/{chunk-KQBYQBQN.cjs.map → chunk-4FJSN2XW.cjs.map} +1 -1
- package/dist/{chunk-WUZQYZXI.cjs → chunk-4HGRXFQP.cjs} +3 -3
- package/dist/{chunk-WUZQYZXI.cjs.map → chunk-4HGRXFQP.cjs.map} +1 -1
- package/dist/{chunk-OIJWSYKP.cjs → chunk-4LZ7B5H5.cjs} +5 -5
- package/dist/{chunk-OIJWSYKP.cjs.map → chunk-4LZ7B5H5.cjs.map} +1 -1
- package/dist/{chunk-LEUJNBWU.js → chunk-4WSKSNXL.js} +9 -9
- package/dist/{chunk-QHGARH6P.js → chunk-5Y6TPFW7.js} +5 -5
- package/dist/{chunk-GOEBT72V.cjs → chunk-A6C5HOD7.cjs} +23 -23
- package/dist/{chunk-GOEBT72V.cjs.map → chunk-A6C5HOD7.cjs.map} +1 -1
- package/dist/{chunk-IWK2NFVR.js → chunk-AKPLEWMH.js} +2 -2
- package/dist/{chunk-E5QAU63Y.cjs → chunk-BCJQ7CJE.cjs} +11 -11
- package/dist/{chunk-E5QAU63Y.cjs.map → chunk-BCJQ7CJE.cjs.map} +1 -1
- package/dist/{chunk-5IAGT5LB.js → chunk-BW4WDUSI.js} +3 -3
- package/dist/{chunk-SNZZ6Q6G.js → chunk-CP5EYMNL.js} +276 -160
- package/dist/chunk-CP5EYMNL.js.map +1 -0
- package/dist/{chunk-ZBVMPVJF.js → chunk-D44S2QLI.js} +3 -3
- package/dist/{chunk-AJ67T7LI.js → chunk-DB3TV4CW.js} +6 -6
- package/dist/{chunk-BLPGMX2L.cjs → chunk-FEVLXRTC.cjs} +506 -390
- package/dist/chunk-FEVLXRTC.cjs.map +1 -0
- package/dist/{chunk-ESXUEMPA.js → chunk-H4BPHGU5.js} +3 -3
- package/dist/{chunk-SETRICAM.cjs → chunk-H54EPP3P.cjs} +7 -7
- package/dist/{chunk-SETRICAM.cjs.map → chunk-H54EPP3P.cjs.map} +1 -1
- package/dist/{chunk-SHJXC7A4.js → chunk-HGA74X35.js} +4 -4
- package/dist/{chunk-R7OJZCE6.cjs → chunk-HHJVIHVR.cjs} +81 -81
- package/dist/{chunk-R7OJZCE6.cjs.map → chunk-HHJVIHVR.cjs.map} +1 -1
- package/dist/{chunk-POB6GNIR.cjs → chunk-IFYQ7DHV.cjs} +48 -48
- package/dist/{chunk-POB6GNIR.cjs.map → chunk-IFYQ7DHV.cjs.map} +1 -1
- package/dist/{chunk-QYQXAXVR.cjs → chunk-IKDC3R7V.cjs} +4 -3
- package/dist/chunk-IKDC3R7V.cjs.map +1 -0
- package/dist/{chunk-W6JA6SFD.js → chunk-JRYS4VMV.js} +45 -45
- package/dist/chunk-JRYS4VMV.js.map +1 -0
- package/dist/{chunk-JJH4H4CJ.js → chunk-L2CF2QZW.js} +7 -7
- package/dist/{chunk-2BFZHTSD.cjs → chunk-LEISUAHF.cjs} +18 -8
- package/dist/chunk-LEISUAHF.cjs.map +1 -0
- package/dist/{chunk-ABWA3W3M.cjs → chunk-M5GWCMYE.cjs} +42 -42
- package/dist/{chunk-ABWA3W3M.cjs.map → chunk-M5GWCMYE.cjs.map} +1 -1
- package/dist/{chunk-PQETCTJ4.js → chunk-MXOSTJAG.js} +4 -3
- package/dist/chunk-MXOSTJAG.js.map +1 -0
- package/dist/{chunk-G3AJXLKH.cjs → chunk-NPVDKOGD.cjs} +22 -22
- package/dist/{chunk-G3AJXLKH.cjs.map → chunk-NPVDKOGD.cjs.map} +1 -1
- package/dist/{chunk-IBSOYTGZ.js → chunk-O2FTVZOD.js} +5 -5
- package/dist/{chunk-YOYHJQX3.cjs → chunk-OGZAFM6M.cjs} +5 -5
- package/dist/{chunk-YOYHJQX3.cjs.map → chunk-OGZAFM6M.cjs.map} +1 -1
- package/dist/{chunk-BFJBE4PQ.js → chunk-PMENIZXI.js} +6 -6
- package/dist/{chunk-5NG2P2KI.js → chunk-PWOYEUIQ.js} +7 -7
- package/dist/{chunk-KLG3MGRP.js → chunk-QCP2KV7P.js} +5 -5
- package/dist/{chunk-KPE277X2.js → chunk-QGJYWLF4.js} +2 -2
- package/dist/{chunk-M7FNT5AC.cjs → chunk-RKGOVTXZ.cjs} +48 -48
- package/dist/{chunk-M7FNT5AC.cjs.map → chunk-RKGOVTXZ.cjs.map} +1 -1
- package/dist/{chunk-HM2R5MDR.js → chunk-T5HDPHN6.js} +13 -3
- package/dist/chunk-T5HDPHN6.js.map +1 -0
- package/dist/{chunk-UQPA2XT7.cjs → chunk-YW4WBNYV.cjs} +37 -37
- package/dist/{chunk-UQPA2XT7.cjs.map → chunk-YW4WBNYV.cjs.map} +1 -1
- package/dist/{chunk-36NFJULV.cjs → chunk-ZI27ALYX.cjs} +41 -41
- package/dist/chunk-ZI27ALYX.cjs.map +1 -0
- package/dist/components/case-studies/index.cjs +12 -12
- package/dist/components/case-studies/index.js +6 -6
- package/dist/components/chat/index.cjs +3 -3
- package/dist/components/chat/index.js +2 -2
- package/dist/components/contact/index.cjs +7 -7
- package/dist/components/contact/index.js +6 -6
- package/dist/components/docs/index.cjs +10 -10
- package/dist/components/docs/index.js +9 -9
- package/dist/components/embeds/index.cjs +7 -7
- package/dist/components/embeds/index.js +6 -6
- package/dist/components/faq/index.cjs +7 -7
- package/dist/components/faq/index.js +6 -6
- package/dist/components/features/board/board.d.ts.map +1 -1
- package/dist/components/features/index.cjs +8 -6
- package/dist/components/features/index.cjs.map +1 -1
- package/dist/components/features/index.js +7 -5
- package/dist/components/features/sortable-list/index.d.ts +2 -1
- package/dist/components/features/sortable-list/index.d.ts.map +1 -1
- package/dist/components/features/sortable-list/sortable-list.d.ts +8 -1
- package/dist/components/features/sortable-list/sortable-list.d.ts.map +1 -1
- package/dist/components/features/sortable-list/sortable-move-buttons.d.ts +24 -0
- package/dist/components/features/sortable-list/sortable-move-buttons.d.ts.map +1 -0
- package/dist/components/features/sortable-list/use-sortable-item.d.ts +12 -4
- package/dist/components/features/sortable-list/use-sortable-item.d.ts.map +1 -1
- package/dist/components/features/ticket-status-config-list/ticket-status-config-list.d.ts +21 -5
- package/dist/components/features/ticket-status-config-list/ticket-status-config-list.d.ts.map +1 -1
- package/dist/components/help-center-pages/index.cjs +26 -26
- package/dist/components/help-center-pages/index.js +17 -17
- package/dist/components/index.cjs +131 -129
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.js +18 -16
- package/dist/components/index.js.map +1 -1
- package/dist/components/meeting-scheduler/index.cjs +37 -37
- package/dist/components/meeting-scheduler/index.js +5 -5
- package/dist/components/navigation/index.cjs +9 -9
- package/dist/components/navigation/index.js +8 -8
- package/dist/components/onboarding-guides/index.cjs +9 -9
- package/dist/components/onboarding-guides/index.js +8 -8
- package/dist/components/tickets/index.cjs +10 -10
- package/dist/components/tickets/index.js +9 -9
- package/dist/components/ui/file-manager/index.cjs +4 -4
- package/dist/components/ui/file-manager/index.js +1 -1
- package/dist/components/ui/index.cjs +6 -6
- package/dist/components/ui/index.js +5 -5
- package/dist/components/ui/input.d.ts +2 -0
- package/dist/components/ui/input.d.ts.map +1 -1
- package/dist/components/ui/textarea.d.ts +2 -0
- package/dist/components/ui/textarea.d.ts.map +1 -1
- package/dist/components/ui/ticket-status-config-row.d.ts +10 -4
- package/dist/components/ui/ticket-status-config-row.d.ts.map +1 -1
- package/dist/hooks/index.cjs +7 -3
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.js +6 -2
- package/dist/hooks/ui/index.d.ts +1 -0
- package/dist/hooks/ui/index.d.ts.map +1 -1
- package/dist/hooks/ui/use-drag-and-drop-enabled.d.ts +31 -0
- package/dist/hooks/ui/use-drag-and-drop-enabled.d.ts.map +1 -0
- package/dist/hooks/ui/use-media-query.d.ts.map +1 -1
- package/dist/index.cjs +17 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +15 -9
- package/dist/index.js.map +1 -1
- package/dist/schemas/meeting-booking-schema.d.ts +2 -2
- package/package.json +1 -4
- package/src/components/features/board/.board.md +1 -0
- package/src/components/features/board/board.tsx +11 -1
- package/src/components/features/sortable-list/.sortable-list.md +23 -12
- package/src/components/features/sortable-list/index.ts +2 -1
- package/src/components/features/sortable-list/sortable-list.tsx +16 -5
- package/src/components/features/sortable-list/sortable-move-buttons.tsx +81 -0
- package/src/components/features/sortable-list/use-sortable-item.ts +25 -13
- package/src/components/features/ticket-status-config-list/ticket-status-config-list.tsx +55 -62
- package/src/components/ui/.ticket-status-config-row.md +11 -9
- package/src/components/ui/input.tsx +5 -2
- package/src/components/ui/textarea.tsx +5 -2
- package/src/components/ui/ticket-status-config-row.tsx +162 -70
- package/src/hooks/ui/.index.md +1 -0
- package/src/hooks/ui/.use-drag-and-drop-enabled.md +32 -0
- package/src/hooks/ui/index.ts +1 -0
- package/src/hooks/ui/use-drag-and-drop-enabled.ts +37 -0
- package/src/hooks/ui/use-media-query.ts +3 -2
- package/dist/chunk-2BFZHTSD.cjs.map +0 -1
- package/dist/chunk-36NFJULV.cjs.map +0 -1
- package/dist/chunk-BLPGMX2L.cjs.map +0 -1
- package/dist/chunk-HM2R5MDR.js.map +0 -1
- package/dist/chunk-PQETCTJ4.js.map +0 -1
- package/dist/chunk-QYQXAXVR.cjs.map +0 -1
- package/dist/chunk-SNZZ6Q6G.js.map +0 -1
- package/dist/chunk-W6JA6SFD.js.map +0 -1
- /package/dist/{chunk-LPFA56WY.js.map → chunk-3AX3ZEY3.js.map} +0 -0
- /package/dist/{chunk-LEUJNBWU.js.map → chunk-4WSKSNXL.js.map} +0 -0
- /package/dist/{chunk-QHGARH6P.js.map → chunk-5Y6TPFW7.js.map} +0 -0
- /package/dist/{chunk-IWK2NFVR.js.map → chunk-AKPLEWMH.js.map} +0 -0
- /package/dist/{chunk-5IAGT5LB.js.map → chunk-BW4WDUSI.js.map} +0 -0
- /package/dist/{chunk-ZBVMPVJF.js.map → chunk-D44S2QLI.js.map} +0 -0
- /package/dist/{chunk-AJ67T7LI.js.map → chunk-DB3TV4CW.js.map} +0 -0
- /package/dist/{chunk-ESXUEMPA.js.map → chunk-H4BPHGU5.js.map} +0 -0
- /package/dist/{chunk-SHJXC7A4.js.map → chunk-HGA74X35.js.map} +0 -0
- /package/dist/{chunk-JJH4H4CJ.js.map → chunk-L2CF2QZW.js.map} +0 -0
- /package/dist/{chunk-IBSOYTGZ.js.map → chunk-O2FTVZOD.js.map} +0 -0
- /package/dist/{chunk-BFJBE4PQ.js.map → chunk-PMENIZXI.js.map} +0 -0
- /package/dist/{chunk-5NG2P2KI.js.map → chunk-PWOYEUIQ.js.map} +0 -0
- /package/dist/{chunk-KLG3MGRP.js.map → chunk-QCP2KV7P.js.map} +0 -0
- /package/dist/{chunk-KPE277X2.js.map → chunk-QGJYWLF4.js.map} +0 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<!-- source-hash: manual -->
|
|
2
|
+
The one rule for whether drag-and-drop is initialized anywhere in the UI. `SortableList` and
|
|
3
|
+
`Board` consume it themselves, so hosts get correct touch behavior without wiring anything.
|
|
4
|
+
|
|
5
|
+
## Key Components
|
|
6
|
+
|
|
7
|
+
| Export | Type | Description |
|
|
8
|
+
|---|---|---|
|
|
9
|
+
| `useDragAndDropEnabled` | Hook | `true` only when `(pointer: fine) and (hover: hover) and (min-width: 800px)` matches |
|
|
10
|
+
| `DRAG_AND_DROP_MEDIA_QUERY` | Const | The query itself, composed from `breakpoints.md` — no new breakpoint |
|
|
11
|
+
|
|
12
|
+
## Why pointer type AND breakpoint
|
|
13
|
+
|
|
14
|
+
- A breakpoint alone fails on tablets: an iPad in landscape is 1024-1366px wide and would pass any
|
|
15
|
+
sane `min-width` — exactly the case being excluded, because the HTML5 drag-and-drop API Pragmatic
|
|
16
|
+
builds on does not fire under touch.
|
|
17
|
+
- `pointer: coarse` alone fails the other way: a touchscreen laptop with a trackpad reports
|
|
18
|
+
`pointer: fine` and should keep DnD, but in a narrow window its lists collapse to the mobile
|
|
19
|
+
layout where a drag handle is out of place.
|
|
20
|
+
- No `'ontouchstart' in window`, no UA sniffing: the first is true on touch laptops, the second is
|
|
21
|
+
neither accurate nor reactive. A media query re-evaluates live when a mouse is attached or the
|
|
22
|
+
window resizes.
|
|
23
|
+
|
|
24
|
+
## SSR
|
|
25
|
+
|
|
26
|
+
Returns `false` during SSR and the first client render (`useMediaQuery` is still `undefined`):
|
|
27
|
+
DnD off means no dead drag handle in server HTML, and the layout effect settles the real answer
|
|
28
|
+
before first paint, so a desktop user never sees the touch fallback flash.
|
|
29
|
+
|
|
30
|
+
## Source
|
|
31
|
+
|
|
32
|
+
[`use-drag-and-drop-enabled.ts`](https://github.com/flamingo-stack/openframe-oss-lib/blob/main/use-drag-and-drop-enabled.ts)
|
package/src/hooks/ui/index.ts
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
export * from './use-auto-limit-tags';
|
|
3
3
|
export * from './use-debounce';
|
|
4
4
|
export * from './use-deferred-error';
|
|
5
|
+
export * from './use-drag-and-drop-enabled';
|
|
5
6
|
export * from './use-focus-trap';
|
|
6
7
|
export * from './use-header-height';
|
|
7
8
|
export * from './use-horizontal-scrollbar';
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { breakpoints, useMediaQuery } from './use-media-query';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* The one rule for whether drag-and-drop is initialized at all.
|
|
7
|
+
*
|
|
8
|
+
* Pointer type AND breakpoint, never either alone:
|
|
9
|
+
* - A breakpoint alone fails on tablets: an iPad in landscape is 1024-1366px
|
|
10
|
+
* wide and would pass any sane `min-width` — exactly the case being excluded,
|
|
11
|
+
* because the HTML5 drag-and-drop API Pragmatic builds on does not fire under
|
|
12
|
+
* touch.
|
|
13
|
+
* - `pointer: coarse` alone fails the other way: a touchscreen laptop with a
|
|
14
|
+
* trackpad reports `pointer: fine` and should keep DnD, but in a narrow
|
|
15
|
+
* window its lists collapse to the mobile layout where a drag handle is out
|
|
16
|
+
* of place.
|
|
17
|
+
* - No `'ontouchstart' in window`, no UA sniffing: the first is true on touch
|
|
18
|
+
* laptops, the second is neither accurate nor reactive. A media query
|
|
19
|
+
* re-evaluates live when a mouse is attached or the window resizes.
|
|
20
|
+
*
|
|
21
|
+
* `breakpoints.md` (800px) is the existing tablet step — no new breakpoint.
|
|
22
|
+
*/
|
|
23
|
+
export const DRAG_AND_DROP_MEDIA_QUERY = `(pointer: fine) and (hover: hover) and ${breakpoints.md}`;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Whether drag-and-drop should be available on this device/viewport.
|
|
27
|
+
*
|
|
28
|
+
* `false` on touch/narrow screens — there the reordering surfaces render
|
|
29
|
+
* explicit controls (`SortableMoveButtons`) instead of a drag handle, and no
|
|
30
|
+
* DnD is initialized at all. Also `false` during SSR and the first client
|
|
31
|
+
* render (`useMediaQuery` is still `undefined`): defaulting to "off" renders
|
|
32
|
+
* no dead drag handle, and the underlying layout effect settles the real
|
|
33
|
+
* answer before first paint, so a desktop user never sees the fallback flash.
|
|
34
|
+
*/
|
|
35
|
+
export function useDragAndDropEnabled(): boolean {
|
|
36
|
+
return useMediaQuery(DRAG_AND_DROP_MEDIA_QUERY) ?? false;
|
|
37
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { useState } from 'react';
|
|
4
|
+
import { useIsomorphicLayoutEffect } from './use-isomorphic-layout-effect';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* Hook to check if a media query matches
|
|
@@ -10,7 +11,7 @@ import { useLayoutEffect, useState } from 'react';
|
|
|
10
11
|
export function useMediaQuery(query: string): boolean | undefined {
|
|
11
12
|
const [matches, setMatches] = useState<boolean | undefined>(undefined);
|
|
12
13
|
|
|
13
|
-
|
|
14
|
+
useIsomorphicLayoutEffect(() => {
|
|
14
15
|
const matchMedia = window.matchMedia(query);
|
|
15
16
|
|
|
16
17
|
const handleChange = () => {
|