@danxbot/ui 3.2.1 → 3.3.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/index.js +6340 -6280
- package/dist/index.js.map +1 -1
- package/dist/types/components/drag-drop/context.d.ts +20 -0
- package/package.json +1 -1
|
@@ -33,6 +33,26 @@ export interface DragDropContextValue {
|
|
|
33
33
|
renderCarried: ((id: DragId) => ReactNode) | undefined;
|
|
34
34
|
/** Items and containers publish their spoken names here at mount. */
|
|
35
35
|
registerLabel: (kind: "item" | "container", id: string, label: string | undefined) => () => void;
|
|
36
|
+
/**
|
|
37
|
+
* THE CENSUS — what this board is actually made of, so a board that cannot
|
|
38
|
+
* work can say so.
|
|
39
|
+
*
|
|
40
|
+
* A misconfiguration that produces SILENCE is a library defect, not a
|
|
41
|
+
* consumer defect, and this surface is full of the shape: a board whose rows
|
|
42
|
+
* have no drag source renders perfectly, announces itself correctly, passes
|
|
43
|
+
* every test, and cannot be dragged at all. No error, nothing to see. Same
|
|
44
|
+
* for a board with no `onDragEnd`, which drags beautifully and drops nothing.
|
|
45
|
+
*
|
|
46
|
+
* Parts report themselves here at mount; `DragDrop` reads the tally once the
|
|
47
|
+
* page has settled and warns in development. See `DragDrop.tsx#useCensus`.
|
|
48
|
+
*/
|
|
49
|
+
census: DragDropCensus;
|
|
50
|
+
}
|
|
51
|
+
export interface DragDropCensus {
|
|
52
|
+
/** One row. `container` and `index` are reported so duplicates can be found. */
|
|
53
|
+
item: (id: string, container: string, index: number) => () => void;
|
|
54
|
+
/** One thing the sensors can actually attach to — a grip, or a whole surface. */
|
|
55
|
+
source: (id: string) => () => void;
|
|
36
56
|
}
|
|
37
57
|
export interface DragDropContainerContextValue {
|
|
38
58
|
id: ContainerId;
|