@proyecto-viviana/solid-stately 0.1.5 → 0.2.0

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 (217) hide show
  1. package/dist/index.js +226 -504
  2. package/dist/index.jsx +6407 -0
  3. package/package.json +3 -5
  4. package/dist/index.js.map +0 -1
  5. package/src/autocomplete/createAutocompleteState.d.ts +0 -46
  6. package/src/autocomplete/createAutocompleteState.d.ts.map +0 -1
  7. package/src/autocomplete/createAutocompleteState.ts +0 -90
  8. package/src/autocomplete/index.d.ts +0 -2
  9. package/src/autocomplete/index.d.ts.map +0 -1
  10. package/src/autocomplete/index.ts +0 -5
  11. package/src/calendar/createCalendarState.d.ts +0 -130
  12. package/src/calendar/createCalendarState.d.ts.map +0 -1
  13. package/src/calendar/createCalendarState.ts +0 -461
  14. package/src/calendar/createDateFieldState.d.ts +0 -110
  15. package/src/calendar/createDateFieldState.d.ts.map +0 -1
  16. package/src/calendar/createDateFieldState.ts +0 -562
  17. package/src/calendar/createRangeCalendarState.d.ts +0 -146
  18. package/src/calendar/createRangeCalendarState.d.ts.map +0 -1
  19. package/src/calendar/createRangeCalendarState.ts +0 -535
  20. package/src/calendar/createTimeFieldState.d.ts +0 -95
  21. package/src/calendar/createTimeFieldState.d.ts.map +0 -1
  22. package/src/calendar/createTimeFieldState.ts +0 -483
  23. package/src/calendar/index.d.ts +0 -7
  24. package/src/calendar/index.d.ts.map +0 -1
  25. package/src/calendar/index.ts +0 -81
  26. package/src/checkbox/createCheckboxGroupState.d.ts +0 -71
  27. package/src/checkbox/createCheckboxGroupState.d.ts.map +0 -1
  28. package/src/checkbox/createCheckboxGroupState.ts +0 -193
  29. package/src/checkbox/index.d.ts +0 -2
  30. package/src/checkbox/index.d.ts.map +0 -1
  31. package/src/checkbox/index.ts +0 -5
  32. package/src/collections/ListCollection.d.ts +0 -37
  33. package/src/collections/ListCollection.d.ts.map +0 -1
  34. package/src/collections/ListCollection.ts +0 -146
  35. package/src/collections/createListState.d.ts +0 -79
  36. package/src/collections/createListState.d.ts.map +0 -1
  37. package/src/collections/createListState.ts +0 -264
  38. package/src/collections/createMenuState.d.ts +0 -50
  39. package/src/collections/createMenuState.d.ts.map +0 -1
  40. package/src/collections/createMenuState.ts +0 -106
  41. package/src/collections/createSelectionState.d.ts +0 -76
  42. package/src/collections/createSelectionState.d.ts.map +0 -1
  43. package/src/collections/createSelectionState.ts +0 -336
  44. package/src/collections/index.d.ts +0 -6
  45. package/src/collections/index.d.ts.map +0 -1
  46. package/src/collections/index.ts +0 -46
  47. package/src/collections/types.d.ts +0 -147
  48. package/src/collections/types.d.ts.map +0 -1
  49. package/src/collections/types.ts +0 -169
  50. package/src/color/Color.d.ts +0 -28
  51. package/src/color/Color.d.ts.map +0 -1
  52. package/src/color/Color.ts +0 -951
  53. package/src/color/createColorAreaState.d.ts +0 -76
  54. package/src/color/createColorAreaState.d.ts.map +0 -1
  55. package/src/color/createColorAreaState.ts +0 -293
  56. package/src/color/createColorFieldState.d.ts +0 -55
  57. package/src/color/createColorFieldState.d.ts.map +0 -1
  58. package/src/color/createColorFieldState.ts +0 -292
  59. package/src/color/createColorSliderState.d.ts +0 -67
  60. package/src/color/createColorSliderState.d.ts.map +0 -1
  61. package/src/color/createColorSliderState.ts +0 -241
  62. package/src/color/createColorWheelState.d.ts +0 -51
  63. package/src/color/createColorWheelState.d.ts.map +0 -1
  64. package/src/color/createColorWheelState.ts +0 -211
  65. package/src/color/index.d.ts +0 -10
  66. package/src/color/index.d.ts.map +0 -1
  67. package/src/color/index.ts +0 -47
  68. package/src/color/types.d.ts +0 -106
  69. package/src/color/types.d.ts.map +0 -1
  70. package/src/color/types.ts +0 -127
  71. package/src/combobox/createComboBoxState.d.ts +0 -125
  72. package/src/combobox/createComboBoxState.d.ts.map +0 -1
  73. package/src/combobox/createComboBoxState.ts +0 -703
  74. package/src/combobox/index.d.ts +0 -5
  75. package/src/combobox/index.d.ts.map +0 -1
  76. package/src/combobox/index.ts +0 -13
  77. package/src/disclosure/createDisclosureState.d.ts +0 -64
  78. package/src/disclosure/createDisclosureState.d.ts.map +0 -1
  79. package/src/disclosure/createDisclosureState.ts +0 -193
  80. package/src/disclosure/index.d.ts +0 -2
  81. package/src/disclosure/index.d.ts.map +0 -1
  82. package/src/disclosure/index.ts +0 -9
  83. package/src/dnd/createDragState.d.ts +0 -59
  84. package/src/dnd/createDragState.d.ts.map +0 -1
  85. package/src/dnd/createDragState.ts +0 -153
  86. package/src/dnd/createDraggableCollectionState.d.ts +0 -57
  87. package/src/dnd/createDraggableCollectionState.d.ts.map +0 -1
  88. package/src/dnd/createDraggableCollectionState.ts +0 -165
  89. package/src/dnd/createDropState.d.ts +0 -61
  90. package/src/dnd/createDropState.d.ts.map +0 -1
  91. package/src/dnd/createDropState.ts +0 -212
  92. package/src/dnd/createDroppableCollectionState.d.ts +0 -78
  93. package/src/dnd/createDroppableCollectionState.d.ts.map +0 -1
  94. package/src/dnd/createDroppableCollectionState.ts +0 -357
  95. package/src/dnd/index.d.ts +0 -11
  96. package/src/dnd/index.d.ts.map +0 -1
  97. package/src/dnd/index.ts +0 -76
  98. package/src/dnd/types.d.ts +0 -264
  99. package/src/dnd/types.d.ts.map +0 -1
  100. package/src/dnd/types.ts +0 -317
  101. package/src/form/createFormValidationState.d.ts +0 -100
  102. package/src/form/createFormValidationState.d.ts.map +0 -1
  103. package/src/form/createFormValidationState.ts +0 -389
  104. package/src/form/index.d.ts +0 -2
  105. package/src/form/index.d.ts.map +0 -1
  106. package/src/form/index.ts +0 -15
  107. package/src/grid/createGridState.d.ts +0 -12
  108. package/src/grid/createGridState.d.ts.map +0 -1
  109. package/src/grid/createGridState.ts +0 -327
  110. package/src/grid/index.d.ts +0 -7
  111. package/src/grid/index.d.ts.map +0 -1
  112. package/src/grid/index.ts +0 -13
  113. package/src/grid/types.d.ts +0 -156
  114. package/src/grid/types.d.ts.map +0 -1
  115. package/src/grid/types.ts +0 -179
  116. package/src/index.d.ts +0 -26
  117. package/src/index.d.ts.map +0 -1
  118. package/src/index.ts +0 -383
  119. package/src/numberfield/createNumberFieldState.d.ts +0 -65
  120. package/src/numberfield/createNumberFieldState.d.ts.map +0 -1
  121. package/src/numberfield/createNumberFieldState.ts +0 -383
  122. package/src/numberfield/index.d.ts +0 -2
  123. package/src/numberfield/index.d.ts.map +0 -1
  124. package/src/numberfield/index.ts +0 -5
  125. package/src/overlays/createOverlayTriggerState.d.ts +0 -32
  126. package/src/overlays/createOverlayTriggerState.d.ts.map +0 -1
  127. package/src/overlays/createOverlayTriggerState.ts +0 -67
  128. package/src/overlays/index.d.ts +0 -2
  129. package/src/overlays/index.d.ts.map +0 -1
  130. package/src/overlays/index.ts +0 -5
  131. package/src/radio/createRadioGroupState.d.ts +0 -77
  132. package/src/radio/createRadioGroupState.d.ts.map +0 -1
  133. package/src/radio/createRadioGroupState.ts +0 -201
  134. package/src/radio/index.d.ts +0 -2
  135. package/src/radio/index.d.ts.map +0 -1
  136. package/src/radio/index.ts +0 -6
  137. package/src/searchfield/createSearchFieldState.d.ts +0 -25
  138. package/src/searchfield/createSearchFieldState.d.ts.map +0 -1
  139. package/src/searchfield/createSearchFieldState.ts +0 -62
  140. package/src/searchfield/index.d.ts +0 -3
  141. package/src/searchfield/index.d.ts.map +0 -1
  142. package/src/searchfield/index.ts +0 -5
  143. package/src/select/createSelectState.d.ts +0 -73
  144. package/src/select/createSelectState.d.ts.map +0 -1
  145. package/src/select/createSelectState.ts +0 -181
  146. package/src/select/index.d.ts +0 -2
  147. package/src/select/index.d.ts.map +0 -1
  148. package/src/select/index.ts +0 -5
  149. package/src/slider/createSliderState.d.ts +0 -72
  150. package/src/slider/createSliderState.d.ts.map +0 -1
  151. package/src/slider/createSliderState.ts +0 -211
  152. package/src/slider/index.d.ts +0 -3
  153. package/src/slider/index.d.ts.map +0 -1
  154. package/src/slider/index.ts +0 -6
  155. package/src/ssr/index.d.ts +0 -28
  156. package/src/ssr/index.d.ts.map +0 -1
  157. package/src/ssr/index.ts +0 -41
  158. package/src/table/TableCollection.d.ts +0 -52
  159. package/src/table/TableCollection.d.ts.map +0 -1
  160. package/src/table/TableCollection.ts +0 -388
  161. package/src/table/createTableState.d.ts +0 -12
  162. package/src/table/createTableState.d.ts.map +0 -1
  163. package/src/table/createTableState.ts +0 -127
  164. package/src/table/index.d.ts +0 -8
  165. package/src/table/index.d.ts.map +0 -1
  166. package/src/table/index.ts +0 -18
  167. package/src/table/types.d.ts +0 -139
  168. package/src/table/types.d.ts.map +0 -1
  169. package/src/table/types.ts +0 -150
  170. package/src/tabs/createTabListState.d.ts +0 -68
  171. package/src/tabs/createTabListState.d.ts.map +0 -1
  172. package/src/tabs/createTabListState.ts +0 -240
  173. package/src/tabs/index.d.ts +0 -2
  174. package/src/tabs/index.d.ts.map +0 -1
  175. package/src/tabs/index.ts +0 -7
  176. package/src/textfield/createTextFieldState.d.ts +0 -30
  177. package/src/textfield/createTextFieldState.d.ts.map +0 -1
  178. package/src/textfield/createTextFieldState.ts +0 -75
  179. package/src/textfield/index.d.ts +0 -2
  180. package/src/textfield/index.d.ts.map +0 -1
  181. package/src/textfield/index.ts +0 -5
  182. package/src/toast/createToastState.d.ts +0 -118
  183. package/src/toast/createToastState.d.ts.map +0 -1
  184. package/src/toast/createToastState.ts +0 -316
  185. package/src/toast/index.d.ts +0 -2
  186. package/src/toast/index.d.ts.map +0 -1
  187. package/src/toast/index.ts +0 -11
  188. package/src/toggle/createToggleState.d.ts +0 -34
  189. package/src/toggle/createToggleState.d.ts.map +0 -1
  190. package/src/toggle/createToggleState.ts +0 -94
  191. package/src/toggle/index.d.ts +0 -2
  192. package/src/toggle/index.d.ts.map +0 -1
  193. package/src/toggle/index.ts +0 -5
  194. package/src/tooltip/createTooltipTriggerState.d.ts +0 -39
  195. package/src/tooltip/createTooltipTriggerState.d.ts.map +0 -1
  196. package/src/tooltip/createTooltipTriggerState.ts +0 -183
  197. package/src/tooltip/index.d.ts +0 -2
  198. package/src/tooltip/index.d.ts.map +0 -1
  199. package/src/tooltip/index.ts +0 -6
  200. package/src/tree/TreeCollection.d.ts +0 -40
  201. package/src/tree/TreeCollection.d.ts.map +0 -1
  202. package/src/tree/TreeCollection.ts +0 -175
  203. package/src/tree/createTreeState.d.ts +0 -14
  204. package/src/tree/createTreeState.d.ts.map +0 -1
  205. package/src/tree/createTreeState.ts +0 -392
  206. package/src/tree/index.d.ts +0 -7
  207. package/src/tree/index.d.ts.map +0 -1
  208. package/src/tree/index.ts +0 -13
  209. package/src/tree/types.d.ts +0 -157
  210. package/src/tree/types.d.ts.map +0 -1
  211. package/src/tree/types.ts +0 -174
  212. package/src/utils/index.d.ts +0 -2
  213. package/src/utils/index.d.ts.map +0 -1
  214. package/src/utils/index.ts +0 -1
  215. package/src/utils/reactivity.d.ts +0 -28
  216. package/src/utils/reactivity.d.ts.map +0 -1
  217. package/src/utils/reactivity.ts +0 -36
@@ -1,264 +0,0 @@
1
- /**
2
- * Drag and Drop types for solid-stately.
3
- *
4
- * Core types for drag and drop operations, matching React Aria's DnD API.
5
- */
6
- /** The type of drop operation to perform. */
7
- export type DropOperation = 'copy' | 'link' | 'move' | 'cancel';
8
- /** Drag item data as key-value pairs where keys are MIME types or custom types. */
9
- export interface DragItem {
10
- [type: string]: string;
11
- }
12
- /** Base event for drag/drop operations with coordinates. */
13
- export interface DragDropEvent {
14
- /** The x coordinate of the event, relative to the target element. */
15
- x: number;
16
- /** The y coordinate of the event, relative to the target element. */
17
- y: number;
18
- }
19
- /** Event fired when a drag operation starts. */
20
- export interface DragStartEvent extends DragDropEvent {
21
- /** The event type. */
22
- type: 'dragstart';
23
- }
24
- /** Event fired as a drag moves. */
25
- export interface DragMoveEvent extends DragDropEvent {
26
- /** The event type. */
27
- type: 'dragmove';
28
- }
29
- /** Event fired when a drag operation ends. */
30
- export interface DragEndEvent extends DragDropEvent {
31
- /** The event type. */
32
- type: 'dragend';
33
- /** The drop operation that occurred. */
34
- dropOperation: DropOperation;
35
- }
36
- /** Event fired when a drag enters a drop target. */
37
- export interface DropEnterEvent extends DragDropEvent {
38
- /** The event type. */
39
- type: 'dropenter';
40
- }
41
- /** Event fired as a drag moves within a drop target. */
42
- export interface DropMoveEvent extends DragDropEvent {
43
- /** The event type. */
44
- type: 'dropmove';
45
- }
46
- /** Event fired when a drag is held over a drop target. */
47
- export interface DropActivateEvent extends DragDropEvent {
48
- /** The event type. */
49
- type: 'dropactivate';
50
- }
51
- /** Event fired when a drag exits a drop target. */
52
- export interface DropExitEvent extends DragDropEvent {
53
- /** The event type. */
54
- type: 'dropexit';
55
- }
56
- /** A text item in a drop operation. */
57
- export interface TextDropItem {
58
- /** The item kind. */
59
- kind: 'text';
60
- /** The drag types available for this item. */
61
- types: Set<string>;
62
- /** Returns the data for the given type as a string. */
63
- getText(type: string): Promise<string>;
64
- }
65
- /** A file item in a drop operation. */
66
- export interface FileDropItem {
67
- /** The item kind. */
68
- kind: 'file';
69
- /** The file type (usually a mime type). */
70
- type: string;
71
- /** The file name. */
72
- name: string;
73
- /** Returns the contents of the file as a blob. */
74
- getFile(): Promise<File>;
75
- /** Returns the contents of the file as a string. */
76
- getText(): Promise<string>;
77
- }
78
- /** A directory item in a drop operation. */
79
- export interface DirectoryDropItem {
80
- /** The item kind. */
81
- kind: 'directory';
82
- /** The directory name. */
83
- name: string;
84
- /** Returns the entries contained within the directory. */
85
- getEntries(): AsyncIterable<FileDropItem | DirectoryDropItem>;
86
- }
87
- /** Union of all drop item types. */
88
- export type DropItem = TextDropItem | FileDropItem | DirectoryDropItem;
89
- /** Event fired when items are dropped. */
90
- export interface DropEvent extends DragDropEvent {
91
- /** The event type. */
92
- type: 'drop';
93
- /** The drop operation that should occur. */
94
- dropOperation: DropOperation;
95
- /** The dropped items. */
96
- items: DropItem[];
97
- }
98
- /** Position relative to an item for drop operations. */
99
- export type DropPosition = 'on' | 'before' | 'after';
100
- /** Drop target representing the root of a collection. */
101
- export interface RootDropTarget {
102
- /** The drop target type. */
103
- type: 'root';
104
- }
105
- /** Drop target representing an item in a collection. */
106
- export interface ItemDropTarget {
107
- /** The drop target type. */
108
- type: 'item';
109
- /** The item key. */
110
- key: string | number;
111
- /** The drop position relative to the item. */
112
- dropPosition: DropPosition;
113
- }
114
- /** Union of drop target types. */
115
- export type DropTarget = RootDropTarget | ItemDropTarget;
116
- /** Event fired when a drag enters a droppable collection. */
117
- export interface DroppableCollectionEnterEvent extends DropEnterEvent {
118
- /** The drop target. */
119
- target: DropTarget;
120
- }
121
- /** Event fired as a drag moves within a droppable collection. */
122
- export interface DroppableCollectionMoveEvent extends DropMoveEvent {
123
- /** The drop target. */
124
- target: DropTarget;
125
- }
126
- /** Event fired when a drag is held over a droppable collection item. */
127
- export interface DroppableCollectionActivateEvent extends DropActivateEvent {
128
- /** The drop target. */
129
- target: DropTarget;
130
- }
131
- /** Event fired when a drag exits a droppable collection. */
132
- export interface DroppableCollectionExitEvent extends DropExitEvent {
133
- /** The drop target. */
134
- target: DropTarget;
135
- }
136
- /** Event fired when items are dropped on a droppable collection. */
137
- export interface DroppableCollectionDropEvent extends DropEvent {
138
- /** The drop target. */
139
- target: DropTarget;
140
- }
141
- /** Event for inserting items between existing collection items. */
142
- export interface DroppableCollectionInsertDropEvent {
143
- /** The dropped items. */
144
- items: DropItem[];
145
- /** The drop operation that should occur. */
146
- dropOperation: DropOperation;
147
- /** The drop target. */
148
- target: ItemDropTarget;
149
- }
150
- /** Event for dropping on the root of a collection. */
151
- export interface DroppableCollectionRootDropEvent {
152
- /** The dropped items. */
153
- items: DropItem[];
154
- /** The drop operation that should occur. */
155
- dropOperation: DropOperation;
156
- }
157
- /** Event for dropping on a specific item. */
158
- export interface DroppableCollectionOnItemDropEvent {
159
- /** The dropped items. */
160
- items: DropItem[];
161
- /** The drop operation that should occur. */
162
- dropOperation: DropOperation;
163
- /** Whether the drag originated within the same collection as the drop. */
164
- isInternal: boolean;
165
- /** The drop target. */
166
- target: ItemDropTarget;
167
- }
168
- /** Event for reordering items within a collection. */
169
- export interface DroppableCollectionReorderEvent {
170
- /** The keys of the items that were reordered. */
171
- keys: Set<string | number>;
172
- /** The drop operation that should occur. */
173
- dropOperation: DropOperation;
174
- /** The drop target. */
175
- target: ItemDropTarget;
176
- }
177
- /** Interface for checking drag types. */
178
- export interface DragTypes {
179
- /** Returns whether the drag contains data of the given type. */
180
- has(type: string | symbol): boolean;
181
- }
182
- /** Delegate for determining drop targets within a collection. */
183
- export interface DropTargetDelegate {
184
- /**
185
- * Returns a drop target within a collection for the given coordinates.
186
- * @param x - X coordinate relative to the collection container
187
- * @param y - Y coordinate relative to the collection container
188
- * @param isValidDropTarget - Function to check if a target is valid
189
- */
190
- getDropTargetFromPoint(x: number, y: number, isValidDropTarget: (target: DropTarget) => boolean): DropTarget | null;
191
- }
192
- /** Event fired when a collection drag starts. */
193
- export interface DraggableCollectionStartEvent extends DragStartEvent {
194
- /** The keys of the items that were dragged. */
195
- keys: Set<string | number>;
196
- }
197
- /** Event fired as a collection drag moves. */
198
- export interface DraggableCollectionMoveEvent extends DragMoveEvent {
199
- /** The keys of the items that were dragged. */
200
- keys: Set<string | number>;
201
- }
202
- /** Event fired when a collection drag ends. */
203
- export interface DraggableCollectionEndEvent extends DragEndEvent {
204
- /** The keys of the items that were dragged. */
205
- keys: Set<string | number>;
206
- /** Whether the drop ended within the same collection as it originated. */
207
- isInternal: boolean;
208
- }
209
- /** Function to render a custom drag preview. */
210
- export type DragPreviewRenderer = (items: DragItem[], callback: (node: HTMLElement | null, x?: number, y?: number) => void) => void;
211
- /** Props for droppable collection utility handlers. */
212
- export interface DroppableCollectionUtilityOptions {
213
- /**
214
- * The drag types that the droppable collection accepts.
215
- * @default 'all'
216
- */
217
- acceptedDragTypes?: 'all' | Array<string | symbol>;
218
- /** Handler that is called when external items are dropped "between" items. */
219
- onInsert?: (e: DroppableCollectionInsertDropEvent) => void;
220
- /** Handler that is called when external items are dropped on the collection's root. */
221
- onRootDrop?: (e: DroppableCollectionRootDropEvent) => void;
222
- /** Handler that is called when items are dropped "on" an item. */
223
- onItemDrop?: (e: DroppableCollectionOnItemDropEvent) => void;
224
- /** Handler that is called when items are reordered within the collection. */
225
- onReorder?: (e: DroppableCollectionReorderEvent) => void;
226
- /** Handler that is called when items are moved within the source collection. */
227
- onMove?: (e: DroppableCollectionReorderEvent) => void;
228
- /** A function returning whether a given target is a valid "on" drop target. */
229
- shouldAcceptItemDrop?: (target: ItemDropTarget, types: DragTypes) => boolean;
230
- }
231
- /** Base props for droppable collections. */
232
- export interface DroppableCollectionBaseProps {
233
- /** Handler that is called when a valid drag enters a drop target. */
234
- onDropEnter?: (e: DroppableCollectionEnterEvent) => void;
235
- /** Handler that is called after a valid drag is held over a drop target. */
236
- onDropActivate?: (e: DroppableCollectionActivateEvent) => void;
237
- /** Handler that is called when a valid drag exits a drop target. */
238
- onDropExit?: (e: DroppableCollectionExitEvent) => void;
239
- /** Handler that is called when a valid drag is dropped on a drop target. */
240
- onDrop?: (e: DroppableCollectionDropEvent) => void;
241
- /** A function returning the drop operation to be performed. */
242
- getDropOperation?: (target: DropTarget, types: DragTypes, allowedOperations: DropOperation[]) => DropOperation;
243
- }
244
- /** Combined props for droppable collections. */
245
- export interface DroppableCollectionProps extends DroppableCollectionUtilityOptions, DroppableCollectionBaseProps {
246
- }
247
- /** Props for draggable collections. */
248
- export interface DraggableCollectionProps<T = object> {
249
- /** Handler that is called when a drag operation is started. */
250
- onDragStart?: (e: DraggableCollectionStartEvent) => void;
251
- /** Handler that is called when the drag is moved. */
252
- onDragMove?: (e: DraggableCollectionMoveEvent) => void;
253
- /** Handler that is called when the drag operation ends. */
254
- onDragEnd?: (e: DraggableCollectionEndEvent) => void;
255
- /** A function that returns the items being dragged. */
256
- getItems: (keys: Set<string | number>, items: T[]) => DragItem[];
257
- /** The ref of the element that will be rendered as the drag preview. */
258
- preview?: {
259
- current: DragPreviewRenderer | null;
260
- };
261
- /** Function that returns the allowed drop operations. */
262
- getAllowedDropOperations?: () => DropOperation[];
263
- }
264
- //#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E,KAC/B,aAAa,CAAC;CACpB;AAED,gDAAgD;AAChD,MAAM,WAAW,wBACf,SAAQ,iCAAiC,EACvC,4BAA4B;CAAG;AAEnC,uCAAuC;AACvC,MAAM,WAAW,wBAAwB,CAAC,CAAC,GAAG,MAAM;IAClD,+DAA+D;IAC/D,WAAW,CAAC,EAAE,CAAC,CAAC,EAAE,6BAA6B,KAAK,IAAI,CAAC;IACzD,qDAAqD;IACrD,UAAU,CAAC,EAAE,CAAC,CAAC,EAAE,4BAA4B,KAAK,IAAI,CAAC;IACvD,2DAA2D;IAC3D,SAAS,CAAC,EAAE,CAAC,CAAC,EAAE,2BAA2B,KAAK,IAAI,CAAC;IACrD,uDAAuD;IACvD,QAAQ,EAAE,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,QAAQ,EAAE,CAAC;IACjE,wEAAwE;IACxE,OAAO,CAAC,EAAE;QAAE,OAAO,EAAE,mBAAmB,GAAG,IAAI,CAAA;KAAE,CAAC;IAClD,yDAAyD;IACzD,wBAAwB,CAAC,EAAE,MAAM,aAAa,EAAE,CAAC;CAClD"}
package/src/dnd/types.ts DELETED
@@ -1,317 +0,0 @@
1
- /**
2
- * Drag and Drop types for solid-stately.
3
- *
4
- * Core types for drag and drop operations, matching React Aria's DnD API.
5
- */
6
-
7
- /** The type of drop operation to perform. */
8
- export type DropOperation = 'copy' | 'link' | 'move' | 'cancel';
9
-
10
- /** Drag item data as key-value pairs where keys are MIME types or custom types. */
11
- export interface DragItem {
12
- [type: string]: string;
13
- }
14
-
15
- /** Base event for drag/drop operations with coordinates. */
16
- export interface DragDropEvent {
17
- /** The x coordinate of the event, relative to the target element. */
18
- x: number;
19
- /** The y coordinate of the event, relative to the target element. */
20
- y: number;
21
- }
22
-
23
- /** Event fired when a drag operation starts. */
24
- export interface DragStartEvent extends DragDropEvent {
25
- /** The event type. */
26
- type: 'dragstart';
27
- }
28
-
29
- /** Event fired as a drag moves. */
30
- export interface DragMoveEvent extends DragDropEvent {
31
- /** The event type. */
32
- type: 'dragmove';
33
- }
34
-
35
- /** Event fired when a drag operation ends. */
36
- export interface DragEndEvent extends DragDropEvent {
37
- /** The event type. */
38
- type: 'dragend';
39
- /** The drop operation that occurred. */
40
- dropOperation: DropOperation;
41
- }
42
-
43
- /** Event fired when a drag enters a drop target. */
44
- export interface DropEnterEvent extends DragDropEvent {
45
- /** The event type. */
46
- type: 'dropenter';
47
- }
48
-
49
- /** Event fired as a drag moves within a drop target. */
50
- export interface DropMoveEvent extends DragDropEvent {
51
- /** The event type. */
52
- type: 'dropmove';
53
- }
54
-
55
- /** Event fired when a drag is held over a drop target. */
56
- export interface DropActivateEvent extends DragDropEvent {
57
- /** The event type. */
58
- type: 'dropactivate';
59
- }
60
-
61
- /** Event fired when a drag exits a drop target. */
62
- export interface DropExitEvent extends DragDropEvent {
63
- /** The event type. */
64
- type: 'dropexit';
65
- }
66
-
67
- /** A text item in a drop operation. */
68
- export interface TextDropItem {
69
- /** The item kind. */
70
- kind: 'text';
71
- /** The drag types available for this item. */
72
- types: Set<string>;
73
- /** Returns the data for the given type as a string. */
74
- getText(type: string): Promise<string>;
75
- }
76
-
77
- /** A file item in a drop operation. */
78
- export interface FileDropItem {
79
- /** The item kind. */
80
- kind: 'file';
81
- /** The file type (usually a mime type). */
82
- type: string;
83
- /** The file name. */
84
- name: string;
85
- /** Returns the contents of the file as a blob. */
86
- getFile(): Promise<File>;
87
- /** Returns the contents of the file as a string. */
88
- getText(): Promise<string>;
89
- }
90
-
91
- /** A directory item in a drop operation. */
92
- export interface DirectoryDropItem {
93
- /** The item kind. */
94
- kind: 'directory';
95
- /** The directory name. */
96
- name: string;
97
- /** Returns the entries contained within the directory. */
98
- getEntries(): AsyncIterable<FileDropItem | DirectoryDropItem>;
99
- }
100
-
101
- /** Union of all drop item types. */
102
- export type DropItem = TextDropItem | FileDropItem | DirectoryDropItem;
103
-
104
- /** Event fired when items are dropped. */
105
- export interface DropEvent extends DragDropEvent {
106
- /** The event type. */
107
- type: 'drop';
108
- /** The drop operation that should occur. */
109
- dropOperation: DropOperation;
110
- /** The dropped items. */
111
- items: DropItem[];
112
- }
113
-
114
- /** Position relative to an item for drop operations. */
115
- export type DropPosition = 'on' | 'before' | 'after';
116
-
117
- /** Drop target representing the root of a collection. */
118
- export interface RootDropTarget {
119
- /** The drop target type. */
120
- type: 'root';
121
- }
122
-
123
- /** Drop target representing an item in a collection. */
124
- export interface ItemDropTarget {
125
- /** The drop target type. */
126
- type: 'item';
127
- /** The item key. */
128
- key: string | number;
129
- /** The drop position relative to the item. */
130
- dropPosition: DropPosition;
131
- }
132
-
133
- /** Union of drop target types. */
134
- export type DropTarget = RootDropTarget | ItemDropTarget;
135
-
136
- // Collection drag/drop events
137
-
138
- /** Event fired when a drag enters a droppable collection. */
139
- export interface DroppableCollectionEnterEvent extends DropEnterEvent {
140
- /** The drop target. */
141
- target: DropTarget;
142
- }
143
-
144
- /** Event fired as a drag moves within a droppable collection. */
145
- export interface DroppableCollectionMoveEvent extends DropMoveEvent {
146
- /** The drop target. */
147
- target: DropTarget;
148
- }
149
-
150
- /** Event fired when a drag is held over a droppable collection item. */
151
- export interface DroppableCollectionActivateEvent extends DropActivateEvent {
152
- /** The drop target. */
153
- target: DropTarget;
154
- }
155
-
156
- /** Event fired when a drag exits a droppable collection. */
157
- export interface DroppableCollectionExitEvent extends DropExitEvent {
158
- /** The drop target. */
159
- target: DropTarget;
160
- }
161
-
162
- /** Event fired when items are dropped on a droppable collection. */
163
- export interface DroppableCollectionDropEvent extends DropEvent {
164
- /** The drop target. */
165
- target: DropTarget;
166
- }
167
-
168
- /** Event for inserting items between existing collection items. */
169
- export interface DroppableCollectionInsertDropEvent {
170
- /** The dropped items. */
171
- items: DropItem[];
172
- /** The drop operation that should occur. */
173
- dropOperation: DropOperation;
174
- /** The drop target. */
175
- target: ItemDropTarget;
176
- }
177
-
178
- /** Event for dropping on the root of a collection. */
179
- export interface DroppableCollectionRootDropEvent {
180
- /** The dropped items. */
181
- items: DropItem[];
182
- /** The drop operation that should occur. */
183
- dropOperation: DropOperation;
184
- }
185
-
186
- /** Event for dropping on a specific item. */
187
- export interface DroppableCollectionOnItemDropEvent {
188
- /** The dropped items. */
189
- items: DropItem[];
190
- /** The drop operation that should occur. */
191
- dropOperation: DropOperation;
192
- /** Whether the drag originated within the same collection as the drop. */
193
- isInternal: boolean;
194
- /** The drop target. */
195
- target: ItemDropTarget;
196
- }
197
-
198
- /** Event for reordering items within a collection. */
199
- export interface DroppableCollectionReorderEvent {
200
- /** The keys of the items that were reordered. */
201
- keys: Set<string | number>;
202
- /** The drop operation that should occur. */
203
- dropOperation: DropOperation;
204
- /** The drop target. */
205
- target: ItemDropTarget;
206
- }
207
-
208
- /** Interface for checking drag types. */
209
- export interface DragTypes {
210
- /** Returns whether the drag contains data of the given type. */
211
- has(type: string | symbol): boolean;
212
- }
213
-
214
- /** Delegate for determining drop targets within a collection. */
215
- export interface DropTargetDelegate {
216
- /**
217
- * Returns a drop target within a collection for the given coordinates.
218
- * @param x - X coordinate relative to the collection container
219
- * @param y - Y coordinate relative to the collection container
220
- * @param isValidDropTarget - Function to check if a target is valid
221
- */
222
- getDropTargetFromPoint(
223
- x: number,
224
- y: number,
225
- isValidDropTarget: (target: DropTarget) => boolean
226
- ): DropTarget | null;
227
- }
228
-
229
- // Draggable collection types
230
-
231
- /** Event fired when a collection drag starts. */
232
- export interface DraggableCollectionStartEvent extends DragStartEvent {
233
- /** The keys of the items that were dragged. */
234
- keys: Set<string | number>;
235
- }
236
-
237
- /** Event fired as a collection drag moves. */
238
- export interface DraggableCollectionMoveEvent extends DragMoveEvent {
239
- /** The keys of the items that were dragged. */
240
- keys: Set<string | number>;
241
- }
242
-
243
- /** Event fired when a collection drag ends. */
244
- export interface DraggableCollectionEndEvent extends DragEndEvent {
245
- /** The keys of the items that were dragged. */
246
- keys: Set<string | number>;
247
- /** Whether the drop ended within the same collection as it originated. */
248
- isInternal: boolean;
249
- }
250
-
251
- /** Function to render a custom drag preview. */
252
- export type DragPreviewRenderer = (
253
- items: DragItem[],
254
- callback: (node: HTMLElement | null, x?: number, y?: number) => void
255
- ) => void;
256
-
257
- // Props interfaces
258
-
259
- /** Props for droppable collection utility handlers. */
260
- export interface DroppableCollectionUtilityOptions {
261
- /**
262
- * The drag types that the droppable collection accepts.
263
- * @default 'all'
264
- */
265
- acceptedDragTypes?: 'all' | Array<string | symbol>;
266
- /** Handler that is called when external items are dropped "between" items. */
267
- onInsert?: (e: DroppableCollectionInsertDropEvent) => void;
268
- /** Handler that is called when external items are dropped on the collection's root. */
269
- onRootDrop?: (e: DroppableCollectionRootDropEvent) => void;
270
- /** Handler that is called when items are dropped "on" an item. */
271
- onItemDrop?: (e: DroppableCollectionOnItemDropEvent) => void;
272
- /** Handler that is called when items are reordered within the collection. */
273
- onReorder?: (e: DroppableCollectionReorderEvent) => void;
274
- /** Handler that is called when items are moved within the source collection. */
275
- onMove?: (e: DroppableCollectionReorderEvent) => void;
276
- /** A function returning whether a given target is a valid "on" drop target. */
277
- shouldAcceptItemDrop?: (target: ItemDropTarget, types: DragTypes) => boolean;
278
- }
279
-
280
- /** Base props for droppable collections. */
281
- export interface DroppableCollectionBaseProps {
282
- /** Handler that is called when a valid drag enters a drop target. */
283
- onDropEnter?: (e: DroppableCollectionEnterEvent) => void;
284
- /** Handler that is called after a valid drag is held over a drop target. */
285
- onDropActivate?: (e: DroppableCollectionActivateEvent) => void;
286
- /** Handler that is called when a valid drag exits a drop target. */
287
- onDropExit?: (e: DroppableCollectionExitEvent) => void;
288
- /** Handler that is called when a valid drag is dropped on a drop target. */
289
- onDrop?: (e: DroppableCollectionDropEvent) => void;
290
- /** A function returning the drop operation to be performed. */
291
- getDropOperation?: (
292
- target: DropTarget,
293
- types: DragTypes,
294
- allowedOperations: DropOperation[]
295
- ) => DropOperation;
296
- }
297
-
298
- /** Combined props for droppable collections. */
299
- export interface DroppableCollectionProps
300
- extends DroppableCollectionUtilityOptions,
301
- DroppableCollectionBaseProps {}
302
-
303
- /** Props for draggable collections. */
304
- export interface DraggableCollectionProps<T = object> {
305
- /** Handler that is called when a drag operation is started. */
306
- onDragStart?: (e: DraggableCollectionStartEvent) => void;
307
- /** Handler that is called when the drag is moved. */
308
- onDragMove?: (e: DraggableCollectionMoveEvent) => void;
309
- /** Handler that is called when the drag operation ends. */
310
- onDragEnd?: (e: DraggableCollectionEndEvent) => void;
311
- /** A function that returns the items being dragged. */
312
- getItems: (keys: Set<string | number>, items: T[]) => DragItem[];
313
- /** The ref of the element that will be rendered as the drag preview. */
314
- preview?: { current: DragPreviewRenderer | null };
315
- /** Function that returns the allowed drop operations. */
316
- getAllowedDropOperations?: () => DropOperation[];
317
- }