@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.
@@ -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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danxbot/ui",
3
- "version": "3.2.1",
3
+ "version": "3.3.1",
4
4
  "type": "module",
5
5
  "description": "Danxbot — a domain-agnostic React design system with motion as a first-class primitive.",
6
6
  "license": "MIT",