@rokkit/core 1.0.0-next.113 → 1.0.0-next.114

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 (162) hide show
  1. package/dist/packages/actions/src/delegate.svelte.d.ts +13 -0
  2. package/dist/packages/actions/src/dismissable.svelte.d.ts +7 -0
  3. package/dist/packages/actions/src/fillable.svelte.d.ts +8 -0
  4. package/dist/packages/actions/src/index.d.ts +11 -0
  5. package/dist/packages/actions/src/kbd.d.ts +44 -0
  6. package/dist/packages/actions/src/keyboard.svelte.d.ts +7 -0
  7. package/dist/packages/actions/src/lib/event-manager.d.ts +8 -0
  8. package/dist/packages/actions/src/lib/index.d.ts +2 -0
  9. package/dist/packages/actions/src/lib/internal.d.ts +19 -0
  10. package/dist/packages/actions/src/navigable.svelte.d.ts +8 -0
  11. package/dist/packages/actions/src/navigator.svelte.d.ts +20 -0
  12. package/dist/packages/actions/src/pannable.svelte.d.ts +6 -0
  13. package/dist/packages/actions/src/skinnable.svelte.d.ts +8 -0
  14. package/dist/packages/actions/src/swipeable.svelte.d.ts +14 -0
  15. package/dist/packages/actions/src/themable.svelte.d.ts +7 -0
  16. package/dist/packages/actions/src/types.d.ts +72 -0
  17. package/dist/packages/actions/src/utils.d.ts +18 -0
  18. package/dist/packages/bits-ui/src/index.d.ts +2 -0
  19. package/dist/packages/bits-ui/src/reference.d.ts +22 -0
  20. package/dist/packages/bits-ui/src/tree/constants.d.ts +13 -0
  21. package/dist/packages/bits-ui/src/tree/index.d.ts +7 -0
  22. package/dist/packages/bits-ui/src/tree/types.d.ts +71 -0
  23. package/dist/packages/core/src/calendar.d.ts +10 -0
  24. package/dist/packages/core/src/colors/index.d.ts +333 -0
  25. package/dist/packages/core/src/connector.d.ts +8 -0
  26. package/dist/packages/core/src/constants.d.ts +39 -0
  27. package/dist/packages/core/src/events.d.ts +12 -0
  28. package/dist/packages/core/src/field-mapper.d.ts +63 -0
  29. package/dist/packages/core/src/index.d.ts +13 -0
  30. package/dist/packages/core/src/key-event-map.d.ts +18 -0
  31. package/dist/packages/core/src/mapped-items.d.ts +14 -0
  32. package/dist/packages/core/src/mapping.d.ts +75 -0
  33. package/dist/packages/core/src/nested.d.ts +18 -0
  34. package/dist/packages/core/src/string.d.ts +59 -0
  35. package/dist/packages/core/src/theme.d.ts +52 -0
  36. package/dist/packages/core/src/ticks.d.ts +10 -0
  37. package/dist/packages/core/src/types.d.ts +245 -0
  38. package/dist/packages/core/src/utils.d.ts +70 -0
  39. package/dist/packages/data/src/aggregators.d.ts +2 -0
  40. package/dist/packages/data/src/constants.d.ts +46 -0
  41. package/dist/packages/data/src/convert.d.ts +10 -0
  42. package/dist/packages/data/src/dataset.d.ts +43 -0
  43. package/dist/packages/data/src/filter.d.ts +26 -0
  44. package/dist/packages/data/src/formatter.d.ts +10 -0
  45. package/dist/packages/data/src/hierarchy.d.ts +36 -0
  46. package/dist/packages/data/src/index.d.ts +7 -0
  47. package/dist/packages/data/src/infer.d.ts +80 -0
  48. package/dist/packages/data/src/join.d.ts +95 -0
  49. package/dist/packages/data/src/list.d.ts +121 -0
  50. package/dist/packages/data/src/metadata.d.ts +32 -0
  51. package/dist/packages/data/src/model.d.ts +29 -0
  52. package/dist/packages/data/src/parser.d.ts +31 -0
  53. package/dist/packages/data/src/renamer.d.ts +37 -0
  54. package/dist/packages/data/src/rollup.d.ts +51 -0
  55. package/dist/packages/data/src/types.d.ts +346 -0
  56. package/dist/packages/data/src/utils.d.ts +6 -0
  57. package/dist/packages/data/src/view.d.ts +35 -0
  58. package/dist/packages/helpers/src/components/index.d.ts +2 -0
  59. package/dist/packages/helpers/src/index.d.ts +1 -0
  60. package/dist/packages/helpers/src/matchers/action.d.ts +27 -0
  61. package/dist/packages/helpers/src/matchers/array.d.ts +10 -0
  62. package/dist/packages/helpers/src/matchers/dataset.d.ts +10 -0
  63. package/dist/packages/helpers/src/matchers/event.d.ts +10 -0
  64. package/dist/packages/helpers/src/matchers/index.d.ts +4 -0
  65. package/dist/packages/helpers/src/matchers/internal.d.ts +1 -0
  66. package/dist/packages/helpers/src/mocks/animate.d.ts +1 -0
  67. package/dist/packages/helpers/src/mocks/element.d.ts +60 -0
  68. package/dist/packages/helpers/src/mocks/index.d.ts +2 -0
  69. package/dist/packages/helpers/src/mocks/match-media.d.ts +30 -0
  70. package/dist/packages/helpers/src/mocks/resize-observer.d.ts +9 -0
  71. package/dist/packages/helpers/src/simulators/index.d.ts +1 -0
  72. package/dist/packages/helpers/src/simulators/touch.d.ts +40 -0
  73. package/dist/packages/icons/src/convert.d.ts +22 -0
  74. package/dist/packages/icons/src/index.d.ts +2 -0
  75. package/dist/packages/input/src/index.d.ts +18 -0
  76. package/dist/packages/states/src/constants.d.ts +27 -0
  77. package/dist/packages/states/src/derive.svelte.d.ts +22 -0
  78. package/dist/packages/states/src/hierarchy.d.ts +34 -0
  79. package/dist/packages/states/src/index.d.ts +5 -0
  80. package/dist/packages/states/src/list-controller.svelte.d.ts +70 -0
  81. package/dist/packages/states/src/nested-controller.svelte.d.ts +32 -0
  82. package/dist/packages/states/src/proxy.svelte.d.ts +43 -0
  83. package/dist/packages/states/src/tabular.svelte.d.ts +5 -0
  84. package/dist/packages/states/src/traversal.svelte.d.ts +69 -0
  85. package/dist/packages/states/src/vibe.svelte.d.ts +622 -0
  86. package/dist/packages/themes/src/constants.d.ts +6 -0
  87. package/dist/packages/themes/src/index.d.ts +2 -0
  88. package/dist/packages/tutorial/src/assimilate.d.ts +25 -0
  89. package/dist/packages/tutorial/src/collector.d.ts +46 -0
  90. package/dist/packages/tutorial/src/files.d.ts +8 -0
  91. package/dist/packages/tutorial/src/index.d.ts +2 -0
  92. package/dist/packages/tutorial/src/metadata/base.d.ts +19 -0
  93. package/dist/packages/tutorial/src/metadata/factory.d.ts +19 -0
  94. package/dist/packages/tutorial/src/metadata/index.d.ts +2 -0
  95. package/dist/packages/tutorial/src/metadata/javascript.d.ts +7 -0
  96. package/dist/packages/tutorial/src/metadata/json.d.ts +7 -0
  97. package/dist/packages/tutorial/src/metadata/markdown.d.ts +7 -0
  98. package/dist/packages/tutorial/src/metadata/registry.d.ts +26 -0
  99. package/dist/packages/tutorial/src/metamodel.d.ts +45 -0
  100. package/dist/packages/tutorial/src/tutorial.d.ts +21 -0
  101. package/dist/packages/tutorial/src/types.d.ts +172 -0
  102. package/dist/packages/tutorial/src/utils.d.ts +13 -0
  103. package/dist/packages/ui/src/constants.d.ts +2 -0
  104. package/dist/packages/ui/src/index.d.ts +42 -0
  105. package/dist/packages/ui/src/input/types.d.ts +9 -0
  106. package/dist/packages/ui/src/lib/fields.d.ts +16 -0
  107. package/dist/packages/ui/src/lib/form.d.ts +95 -0
  108. package/dist/packages/ui/src/lib/index.d.ts +6 -0
  109. package/dist/packages/ui/src/lib/layout.d.ts +7 -0
  110. package/dist/packages/ui/src/lib/nested.d.ts +48 -0
  111. package/dist/packages/ui/src/lib/schema.d.ts +7 -0
  112. package/dist/packages/ui/src/lib/select.d.ts +8 -0
  113. package/dist/packages/ui/src/lib/tree.d.ts +9 -0
  114. package/dist/packages/ui/src/types.d.ts +5 -0
  115. package/dist/packages/ui/src/wrappers/index.d.ts +3 -0
  116. package/dist/sites/learn/src/hooks.d.ts +1 -0
  117. package/dist/sites/learn/src/hooks.server.d.ts +2 -0
  118. package/dist/sites/learn/src/lib/index.d.ts +7 -0
  119. package/dist/sites/learn/src/lib/media.d.ts +13 -0
  120. package/dist/sites/learn/src/lib/paraglide/messages/en.d.ts +3 -0
  121. package/dist/sites/learn/src/lib/paraglide/messages/fr.d.ts +3 -0
  122. package/dist/sites/learn/src/lib/paraglide/messages/hi.d.ts +3 -0
  123. package/dist/sites/learn/src/lib/paraglide/messages.d.ts +5 -0
  124. package/dist/sites/learn/src/lib/paraglide/runtime.d.ts +52 -0
  125. package/dist/sites/learn/src/lib/stories/02-elements/01-list/03-mapping/src/data.d.ts +5 -0
  126. package/dist/sites/learn/src/lib/stories/02-elements/01-list/04-mixed/src/data.d.ts +13 -0
  127. package/dist/sites/learn/src/lib/stories/02-elements/02-tabs/04-fields/src/data.d.ts +5 -0
  128. package/dist/sites/learn/src/lib/stories/02-elements/02-tabs/05-using/src/data.d.ts +6 -0
  129. package/dist/sites/learn/src/lib/stories/02-elements/03-accordion/01-intro/src/data.d.ts +4 -0
  130. package/dist/sites/learn/src/lib/stories/02-elements/03-accordion/02-fields/src/data.d.ts +9 -0
  131. package/dist/sites/learn/src/lib/stories/02-elements/03-accordion/03-using/src/data.d.ts +19 -0
  132. package/dist/sites/learn/src/lib/stories/02-elements/03-accordion/04-mixed/src/data.d.ts +30 -0
  133. package/dist/sites/learn/src/lib/stories/02-elements/03-accordion/props.d.ts +15 -0
  134. package/dist/sites/learn/src/lib/stories/02-elements/04-tree/01-intro/src/data.d.ts +12 -0
  135. package/dist/sites/learn/src/lib/stories/02-elements/06-select/02-fields/src/data.d.ts +5 -0
  136. package/dist/sites/learn/src/lib/stories/02-elements/07-multi-select/02-fields/src/data.d.ts +5 -0
  137. package/dist/sites/learn/src/lib/stories/02-elements/08-drop-down/02-fields/src/data.d.ts +5 -0
  138. package/dist/sites/learn/src/lib/stories/05-templates/01-form/02-schema/src/schema.d.ts +22 -0
  139. package/dist/sites/learn/src/lib/stories/05-templates/01-form/03-layout/src/layout.d.ts +19 -0
  140. package/dist/sites/learn/src/lib/stories/05-templates/01-form/03-layout/src/schema.d.ts +36 -0
  141. package/dist/sites/learn/src/lib/stories/05-templates/01-form/05-validation/src/schema.d.ts +34 -0
  142. package/dist/sites/learn/src/lib/stories/05-templates/02-editor/01-introduction/src/data.d.ts +39 -0
  143. package/dist/sites/learn/src/lib/stories/05-templates/02-editor/01-introduction/src/schema.d.ts +187 -0
  144. package/dist/sites/learn/src/lib/stories/06-layout/03-stepper/01-intro/src/data.d.ts +37 -0
  145. package/dist/sites/learn/src/lib/stories/06-layout/03-stepper/02-play/src/data.d.ts +37 -0
  146. package/dist/sites/learn/src/lib/stories/index.d.ts +1 -0
  147. package/dist/sites/learn/src/lib/theme.svelte.d.ts +70 -0
  148. package/dist/sites/learn/src/routes/(learn)/+layout.d.ts +12 -0
  149. package/dist/sites/learn/src/routes/(learn)/[segment]/[...slug]/+page.d.ts +8 -0
  150. package/dist/sites/learn/src/routes/+layout.d.ts +18 -0
  151. package/dist/sites/quick-start/src/hooks.d.ts +1 -0
  152. package/dist/sites/quick-start/src/hooks.server.d.ts +2 -0
  153. package/dist/sites/quick-start/src/lib/index.d.ts +1 -0
  154. package/dist/sites/quick-start/src/lib/paraglide/messages/en.d.ts +3 -0
  155. package/dist/sites/quick-start/src/lib/paraglide/messages/fr.d.ts +3 -0
  156. package/dist/sites/quick-start/src/lib/paraglide/messages/hi.d.ts +3 -0
  157. package/dist/sites/quick-start/src/lib/paraglide/messages.d.ts +5 -0
  158. package/dist/sites/quick-start/src/lib/paraglide/runtime.d.ts +52 -0
  159. package/dist/sites/quick-start/src/routes/+layout.d.ts +9 -0
  160. package/package.json +2 -2
  161. package/src/constants.js +5 -4
  162. package/src/utils.js +2 -2
@@ -0,0 +1,346 @@
1
+ declare const _default: {};
2
+ export default _default;
3
+ export type FieldMapping = import("@rokkit/core").FieldMapping;
4
+ export type SortOptions = import("@rokkit/core").SortOptions;
5
+ export type HorizontalAlignOptions = import("@rokkit/core").HorizontalAlignOptions;
6
+ export type ActionTypes = import("@rokkit/core").ActionTypes;
7
+ export type SelectionState = import("@rokkit/core").SelectionState;
8
+ export type ColumnSorter = {
9
+ name: string;
10
+ sorter: Function;
11
+ };
12
+ export type SortableColumn = string | [string, boolean] | ColumnSorter;
13
+ export type ColumnAggregator = {
14
+ name: string;
15
+ aggregator: Function;
16
+ suffix: string;
17
+ };
18
+ /**
19
+ * Options for joining two data sets
20
+ */
21
+ export type OptionsToRenameKeys = {
22
+ /**
23
+ * - Prefix to be added to each attribute
24
+ */
25
+ prefix?: string | undefined;
26
+ /**
27
+ * - Suffix to be added to each attribute
28
+ */
29
+ suffix?: string | undefined;
30
+ /**
31
+ * - Separator to be used when adding prefix or suffix. defaults to _
32
+ */
33
+ separator?: string | undefined;
34
+ };
35
+ /**
36
+ * Column metadata for the table.
37
+ */
38
+ export type ColumnMetadata = {
39
+ /**
40
+ * - The name of the column.
41
+ */
42
+ name: string;
43
+ /**
44
+ * - The data type of the column (e.g., "string", "number", "date").
45
+ */
46
+ type: string;
47
+ /**
48
+ * - The field mapping for the column.
49
+ */
50
+ field?: import("@rokkit/core").FieldMapping | undefined;
51
+ /**
52
+ * - The number of digits for numeric values (defaults to 0).
53
+ */
54
+ digits?: number | undefined;
55
+ /**
56
+ * - A function to format the column value.
57
+ */
58
+ formatter: Function;
59
+ /**
60
+ * - Indicates if the column is sortable (true/false).
61
+ */
62
+ sortable?: boolean | undefined;
63
+ /**
64
+ * - The sort order of the column.
65
+ */
66
+ sortOrder?: import("@rokkit/core").SortOptions | undefined;
67
+ /**
68
+ * - The alignment of the column content.
69
+ */
70
+ align?: import("@rokkit/core").HorizontalAlignOptions | undefined;
71
+ /**
72
+ * - Action attribute for action columns.
73
+ */
74
+ action?: import("@rokkit/core").ActionTypes | undefined;
75
+ };
76
+ export type Metadata = Array<ColumnMetadata>;
77
+ export type ColumnIndexMap = {
78
+ [x: string]: number;
79
+ };
80
+ /**
81
+ * Track the state of a row in the table.
82
+ */
83
+ export type TreeTableNode = {
84
+ /**
85
+ * - Reference to actual row in the data.
86
+ */
87
+ row: number;
88
+ /**
89
+ * - The depth of the node in the hierarchy.
90
+ */
91
+ depth: number;
92
+ /**
93
+ * - The value of the hierarchy node.
94
+ */
95
+ value?: string | undefined;
96
+ /**
97
+ * - Indicates whether the node is visible (true/false).
98
+ */
99
+ isHidden?: boolean | undefined;
100
+ /**
101
+ * - Indicates if this node is a parent (true/false).
102
+ */
103
+ isParent?: boolean | undefined;
104
+ /**
105
+ * - Indicates whether the node is expanded (true/false).
106
+ */
107
+ isExpanded?: boolean | undefined;
108
+ /**
109
+ * - Reference to the parent node in the flat list.
110
+ */
111
+ parent?: number | undefined;
112
+ /**
113
+ * - Indicates whether the node is selected (true/false/indeterminate).
114
+ */
115
+ selected?: import("@rokkit/core").SelectionState | undefined;
116
+ /**
117
+ * - Reference to the children nodes in the flat list.
118
+ */
119
+ children: Array<any>;
120
+ };
121
+ /**
122
+ * Track the state of all rows in the table.
123
+ */
124
+ export type TreeTable = {
125
+ /**
126
+ * - Flat list of hierarchy nodes.
127
+ */
128
+ rows: TreeTableNode[];
129
+ };
130
+ export type OverrideConfig = {
131
+ /**
132
+ * - the field used for identifying filler rows in the data
133
+ */
134
+ actual_flag: string;
135
+ /**
136
+ * - the field used for collecting children of a node in rollup
137
+ */
138
+ children: string;
139
+ };
140
+ export type ReducerConfig = {
141
+ /**
142
+ * - The target field to hold the reduced value
143
+ */
144
+ field: string;
145
+ /**
146
+ * - The function to use for reducing the data
147
+ */
148
+ using: Function;
149
+ };
150
+ export type SummaryConfig = {
151
+ /**
152
+ * - A function used to collect the data for the summary
153
+ */
154
+ mapper: Function;
155
+ /**
156
+ * - Array of reducer configurations
157
+ */
158
+ reducers: Array<ReducerConfig>;
159
+ /**
160
+ * - Array of column metadata for the summary
161
+ */
162
+ metadata?: Metadata | undefined;
163
+ };
164
+ export type DataFrameConfig = {
165
+ /**
166
+ * =[] - The columns to group by.
167
+ */
168
+ group_by: Array<string>;
169
+ /**
170
+ * =[] - The columns to be aligned during rollup.
171
+ */
172
+ align_by: Array<string>;
173
+ /**
174
+ * =[] - Array of summary configurations.
175
+ */
176
+ summaries: Array<SummaryConfig>;
177
+ /**
178
+ * ={} - Template row to be used for filling in missing rows.
179
+ */
180
+ template: any;
181
+ };
182
+ export type SortBy = Function;
183
+ /**
184
+ * DataFrame-like object with data manipulation methods.
185
+ */
186
+ export type DataFrame = {
187
+ /**
188
+ * - Array of objects representing the rows of data.
189
+ */
190
+ data: Array<Object>;
191
+ /**
192
+ * - Array of column metadata for the data.
193
+ */
194
+ metadata: Metadata;
195
+ /**
196
+ * - Configuration options for the DataFrame.
197
+ */
198
+ config: DataFrameConfig;
199
+ /**
200
+ * - A map of column names to their index in the metadata.
201
+ */
202
+ columns: ColumnIndexMap;
203
+ /**
204
+ * - Method to override the configuration of the DataFrame.
205
+ */
206
+ override: (arg0: OverrideConfig) => DataFrame;
207
+ /**
208
+ * - Method to group the DataFrame by specified columns.
209
+ */
210
+ groupBy: (...args: string[]) => DataFrame;
211
+ /**
212
+ * - Sets the filter function for the DataFrame
213
+ */
214
+ where: (arg0: (arg0: any) => any) => DataFrame;
215
+ /**
216
+ * - Method to align the DataFrame.
217
+ */
218
+ align: () => DataFrame;
219
+ /**
220
+ * - set the template to be used for filling in missing rows.
221
+ */
222
+ using: () => DataFrame;
223
+ /**
224
+ * - add a summarizer to be used during rollup
225
+ */
226
+ summarize: () => DataFrame;
227
+ /**
228
+ * - Method to sort the DataFrame by specified columns.
229
+ */
230
+ sortBy: (...args: SortableColumn[]) => DataFrame;
231
+ /**
232
+ * - perform join with another DataFrame returning a new DataFrmae. Defaults to innerJoin, other join types can be specified.
233
+ */
234
+ join: () => DataFrame;
235
+ /**
236
+ * - perform an ineer join with another DataFrame and return a new DataFrame.
237
+ */
238
+ innerJoin: () => DataFrame;
239
+ /**
240
+ * - perform a left join with another DataFrame and return a new DataFrame.
241
+ */
242
+ leftJoin: () => DataFrame;
243
+ /**
244
+ * - perform a right join with another DataFrame returning a new DataFrame.
245
+ */
246
+ rightJoin: () => DataFrame;
247
+ /**
248
+ * - perform a full join with another DataFrame returning a new DataFrame.
249
+ */
250
+ fullJoin: () => DataFrame;
251
+ /**
252
+ * - perform a nested join with another DataFrame returning a new DataFrame.
253
+ */
254
+ nestedJoin: () => DataFrame;
255
+ /**
256
+ * - Method to rename the columns of the DataFrame.
257
+ */
258
+ rename: () => DataFrame;
259
+ /**
260
+ * - Method to drop the columns of the DataFrame.
261
+ */
262
+ drop: () => DataFrame;
263
+ /**
264
+ * - Method to delete the rows of the DataFrame.
265
+ */
266
+ delete: () => DataFrame;
267
+ /**
268
+ * - Method to update the rows of the DataFrame.
269
+ */
270
+ update: () => DataFrame;
271
+ /**
272
+ * - Method to combine the rows of the DataFrame with another DataFrame.
273
+ */
274
+ union: () => DataFrame;
275
+ /**
276
+ * - Method to remove the rows of the DataFrame which are present in another DataFrame.
277
+ */
278
+ minus: () => DataFrame;
279
+ /**
280
+ * - Method to keep the rows of the DataFrame which are present in another DataFrame.
281
+ */
282
+ intersect: () => DataFrame;
283
+ /**
284
+ * - Method to rollup the DataFrame.
285
+ */
286
+ rollup: () => DataFrame;
287
+ /**
288
+ * - Method to select the columns of the DataFrame.
289
+ */
290
+ select: () => Arrat<Object>;
291
+ };
292
+ export type JoinType = inner | outer | full | nested;
293
+ /**
294
+ * Options for joining two data sets
295
+ */
296
+ export type JoinOptions = {
297
+ /**
298
+ * - Flag indicating inner join
299
+ */
300
+ inner?: boolean | undefined;
301
+ /**
302
+ * {string} [prefix] - prefix to be used for renaming keys in the second data set.
303
+ */
304
+ type?: JoinType;
305
+ /**
306
+ * - suffix to be used for renaming keys in the second data set.
307
+ */
308
+ suffix?: string | undefined;
309
+ /**
310
+ * - separator to be used for renaming keys in the second data set.
311
+ */
312
+ separator?: string | undefined;
313
+ };
314
+ /**
315
+ * DataView
316
+ */
317
+ export type DataView = {
318
+ /**
319
+ * - The state of the rows in the table.
320
+ */
321
+ hierarchy: TreeTable;
322
+ /**
323
+ * - The metadata for the columns in the table.
324
+ */
325
+ columns: Metadata;
326
+ /**
327
+ * - Sort the DataView by the specified columns.
328
+ */
329
+ sortBy: Function;
330
+ /**
331
+ * - Clear the sorting of the DataView.
332
+ */
333
+ clearSort: Function;
334
+ /**
335
+ * - Filter the DataView by the specified columns.
336
+ */
337
+ filter: Function;
338
+ /**
339
+ * - toggle expand or collapse the DataView by the specified columns.
340
+ */
341
+ toggle: Function;
342
+ /**
343
+ * - select the DataView by the specified columns.
344
+ */
345
+ select: Function;
346
+ };
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Derive the type of a value
3
+ * @param {any} value
4
+ * @returns {string}
5
+ */
6
+ export function typeOf(value: any): string;
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Sorts a hierarchy based on a group of sorters.
3
+ *
4
+ * @param {Array<Object>} hierarchy - The hierarchy to sort.
5
+ * @param {Array<Array<string, boolean>>} sortGroup - The group of sorters to apply.
6
+ */
7
+ export function groupSort(hierarchy: Array<Object>, sortGroup: Array<Array<string, boolean>>): void;
8
+ /**
9
+ * Determines the selected state of a group of children in the hierarchy.
10
+ * If all children are checked, returns 'checked'.
11
+ * If all children are unchecked, returns 'unchecked'.
12
+ * Otherwise, returns 'indeterminate'.
13
+ *
14
+ * @param {Array<Object>} children - The array of child objects with a 'selected' property.
15
+ * @returns {string} The determined selected state: 'checked', 'unchecked', or 'indeterminate'.
16
+ */
17
+ export function determineSelectedState(children: Array<Object>): string;
18
+ /**
19
+ * Toggles the selection state of a node in the hierarchy.
20
+ * Depending on whether the node to toggle is a parent or child,
21
+ * it will either select or deselect all children, or update the parent's selection state based on its children's states.
22
+ *
23
+ * @param {import('./types').Hierarchy} item - The node to toggle.
24
+ *
25
+ */
26
+ export function toggleSelection(item: import("./types").Hierarchy): void;
27
+ /**
28
+ * Creates a view object for managing data presentation with metadata and hierarchy structures,
29
+ * as well as providing methods for sorting, selection, and toggling of data expansion.
30
+ *
31
+ * @param {Array<Object>} data - The source data array to be presented by the view.
32
+ * @param {Object} options - The configuration options used for deriving metadata and hierarchy from the data.
33
+ * @returns {import('svelte/store').Writable} An object representing the view, providing methods to manipulate and query the presentation state.
34
+ */
35
+ export function dataview(data: Array<Object>, options: Object): import("svelte/store").Writable<any>;
@@ -0,0 +1,2 @@
1
+ export { default as MockItem } from "./MockItem.svelte";
2
+ export { default as StaticContent } from "./StaticContent.svelte";
@@ -0,0 +1 @@
1
+ export * from "./simulators/touch";
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Checks if all the given events are registered by the action and cleaned up on destroy.
3
+ *
4
+ * @param {*} action
5
+ * @param {Object<string,any>} options
6
+ * @param {string|Array<string>} events
7
+ * @returns
8
+ */
9
+ export function toUseHandlersFor(action: any, options: {
10
+ [x: string]: any;
11
+ }, events: string | Array<string>): {
12
+ message: () => string;
13
+ pass: boolean;
14
+ };
15
+ /**
16
+ * Verifies that only the specified events are triggered. Expects an object of spies with key as event names.
17
+ *
18
+ * @param {Object<string,any>} handler : Object with keys as event names and values as spies
19
+ * @param {string|Array<string>} events : An event name or an array of event names
20
+ * @returns
21
+ */
22
+ export function toOnlyTrigger(handler: {
23
+ [x: string]: any;
24
+ }, events: string | Array<string>): {
25
+ message: () => string;
26
+ pass: boolean;
27
+ };
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Verify that an array contains all of the expected values
3
+ *
4
+ * @param {Array} received - the array to inspect
5
+ * @param {Array} expected - the values to check for
6
+ */
7
+ export function toIncludeAll(received: any[], expected: any[]): {
8
+ message: () => string;
9
+ pass: boolean;
10
+ };
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Check if the element has valid data attributes
3
+ *
4
+ * @param {HTMLElement} received - HTML element to be checked
5
+ * @param {Object} expected - data to be compared
6
+ */
7
+ export function toHaveValidData(received: HTMLElement, expected: Object): {
8
+ message: () => string;
9
+ pass: boolean;
10
+ };
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Verify that a spy event has been dispatched with data in event detail
3
+ *
4
+ * @param {Function} spy - the event handler to inspect
5
+ * @param {Object} data - data expected inthe event detail
6
+ */
7
+ export function toHaveBeenDispatchedWith(spy: Function, data: Object): {
8
+ message: () => string;
9
+ pass: boolean;
10
+ };
@@ -0,0 +1,4 @@
1
+ export * from "./array";
2
+ export * from "./action";
3
+ export * from "./dataset";
4
+ export * from "./event";
@@ -0,0 +1 @@
1
+ export function getMessage(actual: any, expected: any, pass: any, condition?: string): string;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,60 @@
1
+ /**
2
+ * Creates an array of elements with the specified size
3
+ *
4
+ * @param {number} count
5
+ * @param {number} size
6
+ * @param {string} [prop='offsetHeight']
7
+ * @returns {Array<Object<string, number>>}
8
+ */
9
+ export function elementsWithSize(count: number, size: number, prop?: string): Array<{
10
+ [x: string]: number;
11
+ }>;
12
+ /**
13
+ * Creates an array of elements with mixed sizes
14
+ *
15
+ * @param {Array<{count: number, size: number}>} data
16
+ * @param {string} prop
17
+ * @returns {Array<Object<string, number>>}
18
+ */
19
+ export function mixedSizeElements(data: Array<{
20
+ count: number;
21
+ size: number;
22
+ }>, prop: string): Array<{
23
+ [x: string]: number;
24
+ }>;
25
+ /**
26
+ * Creates a mock node with functions to add and remove event handlers
27
+ *
28
+ * @param {Array<string} events
29
+ * @returns {{node: HTMLElement, listeners: Object<string, integer>}}
30
+ */
31
+ export function getMockNode(events: Array<string>): {
32
+ node: HTMLElement;
33
+ listeners: {
34
+ [x: string]: integer;
35
+ };
36
+ };
37
+ /**
38
+ * @typedef {Object} NestedItem
39
+ * @property {string} name
40
+ * @property {string} [dataPath]
41
+ * @property {string} [id]
42
+ * @property {Array<NestedItem>} [children]
43
+ */
44
+ /**
45
+ * Creates a nested HTML element structure using the provided data
46
+ *
47
+ * @param {NestedItem} item
48
+ * @returns {HTMLElement}
49
+ */
50
+ export function createNestedElement(item: NestedItem): HTMLElement;
51
+ /**
52
+ * Mocks the requestSubmit function for HTMLFormElement which is not implemented by JSDOM
53
+ */
54
+ export function mockFormRequestSubmit(): boolean;
55
+ export type NestedItem = {
56
+ name: string;
57
+ dataPath?: string | undefined;
58
+ id?: string | undefined;
59
+ children?: NestedItem[] | undefined;
60
+ };
@@ -0,0 +1,2 @@
1
+ export * from "./match-media";
2
+ export * from "./element";
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Updates the media query matches
3
+ * @returns {void}
4
+ */
5
+ export function updateMedia(): void;
6
+ /**
7
+ * Mocks the window.matchMedia function
8
+ * @param {string} query
9
+ * @returns {Object}
10
+ */
11
+ export const matchMediaMock: import("vitest").Mock<(...args: any[]) => any>;
12
+ export type MediaQuery = {
13
+ "min-width"?: integer;
14
+ "max-width"?: integer;
15
+ "min-height"?: integer;
16
+ "max-height"?: integer;
17
+ width?: integer;
18
+ height?: integer;
19
+ orientation?: integer;
20
+ "aspect-ratio"?: integer;
21
+ "min-aspect-ratio"?: integer;
22
+ "max-aspect-ratio"?: integer;
23
+ resolution?: integer;
24
+ "min-resolution"?: integer;
25
+ "max-resolution"?: integer;
26
+ scan?: integer;
27
+ grid?: integer;
28
+ update?: integer;
29
+ "overflow-block"?: integer;
30
+ };
@@ -0,0 +1,9 @@
1
+ export class ResizeObserver {
2
+ constructor(callback: any);
3
+ callback: any;
4
+ elements: Map<any, any>;
5
+ observe(element: any): void;
6
+ unobserve(element: any): void;
7
+ disconnect(): void;
8
+ simulateResize(element: any, contentRect: any): void;
9
+ }
@@ -0,0 +1 @@
1
+ export * from "./touch";
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Simulates a mouse event on a given node.
3
+ * @param {number} x
4
+ * @param {number} y
5
+ * @returns
6
+ */
7
+ export function simulateMouseEvent(x: number, y: number): {
8
+ clientX: number;
9
+ clientY: number;
10
+ stopPropagation: import("vitest").Mock<(...args: any[]) => any>;
11
+ preventDefault: import("vitest").Mock<(...args: any[]) => any>;
12
+ };
13
+ /**
14
+ * Simulates a touch event on a given node.
15
+ * @param {number} clientX
16
+ * @param {number} clientY
17
+ * @returns
18
+ */
19
+ export function simulateTouchEvent(clientX: number, clientY: number): {
20
+ touches: {
21
+ clientX: number;
22
+ clientY: number;
23
+ }[];
24
+ preventDefault: import("vitest").Mock<(...args: any[]) => any>;
25
+ stopPropagation: import("vitest").Mock<(...args: any[]) => any>;
26
+ };
27
+ /**
28
+ * Simulates a touch swipe on a given node.
29
+ * @param {HTMLElement} node
30
+ * @param {number} distance
31
+ * @param {number} [delay=0]
32
+ */
33
+ export function simulateTouchSwipe(node: HTMLElement, distance: number, delay?: number): void;
34
+ /**
35
+ * Simulates a mouse swipe on a given node.
36
+ * @param {HTMLElement} node
37
+ * @param {number} distance
38
+ * @param {number} [delay=0]
39
+ */
40
+ export function simulateMouseSwipe(node: HTMLElement, distance: number, delay?: number): void;
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Clean up and optimise SVG icon
3
+ *
4
+ * @param {string} svg SVG code
5
+ * @param {boolean} color True if color should be preserved
6
+ */
7
+ export function cleanAndOptimizeIcon(svg: string, color: boolean): void;
8
+ /**
9
+ * Process icons
10
+ *
11
+ * @param {IconifyTools} iconSet Icon set
12
+ * @param {boolean} color True if color should be preserved
13
+ */
14
+ export function processIcons(iconSet: IconifyTools, color: boolean): void;
15
+ /**
16
+ * Convert icons
17
+ *
18
+ * @param {string} folder Folder with icons
19
+ * @param {string} prefix Prefix for icon set
20
+ * @param {boolean} color True if color should be preserved
21
+ */
22
+ export function convert(folder: string, prefix: string, color?: boolean): Promise<void>;
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
@@ -0,0 +1,18 @@
1
+ export { default as InputCheckbox } from "./InputCheckbox.svelte";
2
+ export { default as InputColor } from "./InputColor.svelte";
3
+ export { default as InputDate } from "./InputDate.svelte";
4
+ export { default as InputDateTime } from "./InputDateTime.svelte";
5
+ export { default as InputEmail } from "./InputEmail.svelte";
6
+ export { default as InputFile } from "./InputFile.svelte";
7
+ export { default as InputMonth } from "./InputMonth.svelte";
8
+ export { default as InputNumber } from "./InputNumber.svelte";
9
+ export { default as InputPassword } from "./InputPassword.svelte";
10
+ export { default as InputRadio } from "./InputRadio.svelte";
11
+ export { default as InputRange } from "./InputRange.svelte";
12
+ export { default as InputSelect } from "./InputSelect.svelte";
13
+ export { default as InputTel } from "./InputTel.svelte";
14
+ export { default as InputText } from "./InputText.svelte";
15
+ export { default as InputTextArea } from "./InputTextArea.svelte";
16
+ export { default as InputTime } from "./InputTime.svelte";
17
+ export { default as InputUrl } from "./InputUrl.svelte";
18
+ export { default as InputWeek } from "./InputWeek.svelte";