@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
package/src/tree/types.ts DELETED
@@ -1,174 +0,0 @@
1
- /**
2
- * Tree collection types for Tree components.
3
- * Based on @react-stately/tree.
4
- */
5
-
6
- import type { Key, FocusStrategy } from '../collections/types';
7
- import type { GridNode, GridCollection } from '../grid/types';
8
-
9
- /**
10
- * Represents a node in a tree collection.
11
- * Extends GridNode with tree-specific properties.
12
- */
13
- export interface TreeNode<T = unknown> extends GridNode<T> {
14
- /** Whether this node has child nodes that can be expanded. */
15
- hasChildNodes: boolean;
16
- /** Child nodes of this tree item. */
17
- childNodes: TreeNode<T>[];
18
- /** The level of nesting (0 for root items). */
19
- level: number;
20
- /** The key of the parent node, if any. */
21
- parentKey?: Key | null;
22
- /** Whether this node is expandable. */
23
- isExpandable?: boolean;
24
- /** Whether this node is currently expanded (only meaningful if expandable). */
25
- isExpanded?: boolean;
26
- }
27
-
28
- /**
29
- * A collection of tree nodes with tree-specific navigation.
30
- * Only includes visible nodes (respects expanded state).
31
- */
32
- export interface TreeCollection<T = unknown> extends Omit<GridCollection<T>, 'rows' | 'columns' | 'headerRows' | 'columnCount' | 'getCell'> {
33
- /** All visible rows in the tree (respects expanded state). */
34
- readonly rows: TreeNode<T>[];
35
- /** Number of visible rows. */
36
- readonly rowCount: number;
37
-
38
- /** Get all keys in the collection (visible only). */
39
- getKeys(): Iterable<Key>;
40
-
41
- /** Get a node by its key (any node, visible or not). */
42
- getItem(key: Key): TreeNode<T> | null;
43
-
44
- /** Get a node by index (visible nodes only). */
45
- at(index: number): TreeNode<T> | null;
46
-
47
- /** Get the key before the given key (visible nodes only). */
48
- getKeyBefore(key: Key): Key | null;
49
-
50
- /** Get the key after the given key (visible nodes only). */
51
- getKeyAfter(key: Key): Key | null;
52
-
53
- /** Get the first key in the collection. */
54
- getFirstKey(): Key | null;
55
-
56
- /** Get the last key in the collection. */
57
- getLastKey(): Key | null;
58
-
59
- /** Get the children of a node. */
60
- getChildren(key: Key): Iterable<TreeNode<T>>;
61
-
62
- /** Get the text value for a key. */
63
- getTextValue(key: Key): string;
64
-
65
- /** Get the parent key for a node. */
66
- getParentKey(key: Key): Key | null;
67
-
68
- /** Iterator over visible nodes. */
69
- [Symbol.iterator](): Iterator<TreeNode<T>>;
70
- }
71
-
72
- /**
73
- * State for a tree component.
74
- * Extends grid state with expansion management.
75
- */
76
- export interface TreeState<T, C extends TreeCollection<T> = TreeCollection<T>> {
77
- /** The tree collection (only visible nodes). */
78
- readonly collection: C;
79
- /** Keys of disabled items. */
80
- readonly disabledKeys: Set<Key>;
81
- /** Keys of expanded items. */
82
- readonly expandedKeys: Set<Key>;
83
- /** Whether keyboard navigation is disabled. */
84
- readonly isKeyboardNavigationDisabled: boolean;
85
- /** Currently focused key. */
86
- readonly focusedKey: Key | null;
87
- /** Focus strategy for child focus. */
88
- readonly childFocusStrategy: FocusStrategy | null;
89
- /** Whether the tree is focused. */
90
- readonly isFocused: boolean;
91
- /** The selection mode. */
92
- readonly selectionMode: 'none' | 'single' | 'multiple';
93
- /** The currently selected keys. */
94
- readonly selectedKeys: 'all' | Set<Key>;
95
-
96
- /** Check if a key is selected. */
97
- isSelected(key: Key): boolean;
98
- /** Check if a key is disabled. */
99
- isDisabled(key: Key): boolean;
100
- /** Check if a key is expanded. */
101
- isExpanded(key: Key): boolean;
102
- /** Set the focused key. */
103
- setFocusedKey(key: Key | null, childFocusStrategy?: FocusStrategy): void;
104
- /** Set focused state. */
105
- setFocused(isFocused: boolean): void;
106
- /** Toggle selection for a key. */
107
- toggleSelection(key: Key): void;
108
- /** Replace selection with a key. */
109
- replaceSelection(key: Key): void;
110
- /** Extend selection to a key (shift-click). */
111
- extendSelection(toKey: Key): void;
112
- /** Select all visible items. */
113
- selectAll(): void;
114
- /** Clear selection. */
115
- clearSelection(): void;
116
- /** Toggle select all. */
117
- toggleSelectAll(): void;
118
- /** Toggle expansion for a key. */
119
- toggleKey(key: Key): void;
120
- /** Expand a key. */
121
- expandKey(key: Key): void;
122
- /** Collapse a key. */
123
- collapseKey(key: Key): void;
124
- /** Set the expanded keys. */
125
- setExpandedKeys(keys: Set<Key>): void;
126
- /** Set keyboard navigation disabled. */
127
- setKeyboardNavigationDisabled(isDisabled: boolean): void;
128
- }
129
-
130
- /**
131
- * Options for creating tree state.
132
- */
133
- export interface TreeStateOptions<T, C extends TreeCollection<T> = TreeCollection<T>> {
134
- /** The tree collection builder - receives expanded keys and returns collection. */
135
- collectionFactory: (expandedKeys: Set<Key>) => C;
136
- /** Keys of disabled items. */
137
- disabledKeys?: Iterable<Key>;
138
- /** Disabled behavior: 'selection' only or 'all' interactions. */
139
- disabledBehavior?: 'selection' | 'all';
140
- /** Selection mode. */
141
- selectionMode?: 'none' | 'single' | 'multiple';
142
- /** Selection behavior. */
143
- selectionBehavior?: 'toggle' | 'replace';
144
- /** Whether empty selection is disallowed. */
145
- disallowEmptySelection?: boolean;
146
- /** Currently selected keys (controlled). */
147
- selectedKeys?: 'all' | Iterable<Key>;
148
- /** Default selected keys (uncontrolled). */
149
- defaultSelectedKeys?: 'all' | Iterable<Key>;
150
- /** Handler for selection changes. */
151
- onSelectionChange?: (keys: 'all' | Set<Key>) => void;
152
- /** Currently expanded keys (controlled). */
153
- expandedKeys?: Iterable<Key>;
154
- /** Default expanded keys (uncontrolled). */
155
- defaultExpandedKeys?: Iterable<Key>;
156
- /** Handler for expansion changes. */
157
- onExpandedChange?: (keys: Set<Key>) => void;
158
- }
159
-
160
- /**
161
- * Item representation for building tree collections.
162
- */
163
- export interface TreeItemData<T = unknown> {
164
- /** Unique key for this item. */
165
- key: Key;
166
- /** The data value for this item. */
167
- value: T;
168
- /** Text content for accessibility and search. */
169
- textValue?: string;
170
- /** Child items (makes this item expandable). */
171
- children?: TreeItemData<T>[];
172
- /** Whether this item is disabled. */
173
- isDisabled?: boolean;
174
- }
@@ -1,2 +0,0 @@
1
- export { access, isAccessor, type MaybeAccessor, type MaybeAccessorValue } from './reactivity';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,cAAc,CAAC"}
@@ -1 +0,0 @@
1
- export { access, isAccessor, type MaybeAccessor, type MaybeAccessorValue } from './reactivity';
@@ -1,28 +0,0 @@
1
- /**
2
- * Reactivity utilities for Solid Stately
3
- *
4
- * Provides type-safe utilities for working with SolidJS reactivity patterns.
5
- */
6
- import { Accessor } from 'solid-js';
7
- /**
8
- * A value that may be either a raw value or an accessor function.
9
- * This is a common pattern in SolidJS for props that may be reactive.
10
- */
11
- export type MaybeAccessor<T> = T | Accessor<T>;
12
- /**
13
- * Unwraps a MaybeAccessor to get the underlying value.
14
- * If the input is a function, it calls it to get the value.
15
- * Otherwise, it returns the value directly.
16
- *
17
- * @param value - The value or accessor to unwrap.
18
- */
19
- export declare function access<T>(value: MaybeAccessor<T>): T;
20
- /**
21
- * A value that may be undefined or an accessor that returns the value or undefined.
22
- */
23
- export type MaybeAccessorValue<T> = T | undefined | Accessor<T | undefined>;
24
- /**
25
- * Checks if a value is an accessor function.
26
- */
27
- export declare function isAccessor<T>(value: MaybeAccessor<T>): value is Accessor<T>;
28
- //# sourceMappingURL=reactivity.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"reactivity.d.ts","sourceRoot":"","sources":["reactivity.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEpC;;;GAGG;AACH,MAAM,MAAM,aAAa,CAAC,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;AAE/C;;;;;;GAMG;AACH,wBAAgB,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,CAAC,CAEpD;AAED;;GAEG;AACH,MAAM,MAAM,kBAAkB,CAAC,CAAC,IAAI,CAAC,GAAG,SAAS,GAAG,QAAQ,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC;AAE5E;;GAEG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,KAAK,IAAI,QAAQ,CAAC,CAAC,CAAC,CAE3E"}
@@ -1,36 +0,0 @@
1
- /**
2
- * Reactivity utilities for Solid Stately
3
- *
4
- * Provides type-safe utilities for working with SolidJS reactivity patterns.
5
- */
6
-
7
- import { Accessor } from 'solid-js';
8
-
9
- /**
10
- * A value that may be either a raw value or an accessor function.
11
- * This is a common pattern in SolidJS for props that may be reactive.
12
- */
13
- export type MaybeAccessor<T> = T | Accessor<T>;
14
-
15
- /**
16
- * Unwraps a MaybeAccessor to get the underlying value.
17
- * If the input is a function, it calls it to get the value.
18
- * Otherwise, it returns the value directly.
19
- *
20
- * @param value - The value or accessor to unwrap.
21
- */
22
- export function access<T>(value: MaybeAccessor<T>): T {
23
- return typeof value === 'function' ? (value as Accessor<T>)() : value;
24
- }
25
-
26
- /**
27
- * A value that may be undefined or an accessor that returns the value or undefined.
28
- */
29
- export type MaybeAccessorValue<T> = T | undefined | Accessor<T | undefined>;
30
-
31
- /**
32
- * Checks if a value is an accessor function.
33
- */
34
- export function isAccessor<T>(value: MaybeAccessor<T>): value is Accessor<T> {
35
- return typeof value === 'function';
36
- }