domma-js 0.55.0 → 0.57.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 (116) hide show
  1. package/assets/types/generated/public/assets/flags/africa.d.ts +6 -0
  2. package/assets/types/generated/public/assets/flags/americas.d.ts +6 -0
  3. package/assets/types/generated/public/assets/flags/asia.d.ts +6 -0
  4. package/assets/types/generated/public/assets/flags/europe.d.ts +9 -0
  5. package/assets/types/generated/public/assets/flags/index.d.ts +11 -0
  6. package/assets/types/generated/public/assets/flags/oceania.d.ts +2 -0
  7. package/assets/types/generated/public/assets/icons/buildings.d.ts +6 -0
  8. package/assets/types/generated/public/assets/icons/code.d.ts +2 -0
  9. package/assets/types/generated/public/assets/icons/commerce.d.ts +7 -0
  10. package/assets/types/generated/public/assets/icons/communication.d.ts +7 -0
  11. package/assets/types/generated/public/assets/icons/devices.d.ts +6 -0
  12. package/assets/types/generated/public/assets/icons/emojis.d.ts +6 -0
  13. package/assets/types/generated/public/assets/icons/files.d.ts +7 -0
  14. package/assets/types/generated/public/assets/icons/finance.d.ts +6 -0
  15. package/assets/types/generated/public/assets/icons/forms.d.ts +5 -0
  16. package/assets/types/generated/public/assets/icons/health.d.ts +6 -0
  17. package/assets/types/generated/public/assets/icons/index.d.ts +24 -0
  18. package/assets/types/generated/public/assets/icons/media.d.ts +7 -0
  19. package/assets/types/generated/public/assets/icons/navigation.d.ts +7 -0
  20. package/assets/types/generated/public/assets/icons/seasonal.d.ts +6 -0
  21. package/assets/types/generated/public/assets/icons/social.d.ts +7 -0
  22. package/assets/types/generated/public/assets/icons/sport.d.ts +6 -0
  23. package/assets/types/generated/public/assets/icons/status.d.ts +7 -0
  24. package/assets/types/generated/public/assets/icons/transport.d.ts +7 -0
  25. package/assets/types/generated/public/assets/icons/ui.d.ts +7 -0
  26. package/assets/types/generated/public/assets/icons/weather.d.ts +6 -0
  27. package/assets/types/generated/src/auth.d.ts +424 -0
  28. package/assets/types/generated/src/avatar.d.ts +270 -0
  29. package/assets/types/generated/src/binding-source.d.ts +58 -0
  30. package/assets/types/generated/src/butterfly-drawing.d.ts +2 -0
  31. package/assets/types/generated/src/component-factory.d.ts +150 -0
  32. package/assets/types/generated/src/component.d.ts +162 -0
  33. package/assets/types/generated/src/components/back-to-top.d.ts +150 -0
  34. package/assets/types/generated/src/components/badge.d.ts +208 -0
  35. package/assets/types/generated/src/components/card.d.ts +189 -0
  36. package/assets/types/generated/src/components/command-palette.d.ts +352 -0
  37. package/assets/types/generated/src/components/dropzone.d.ts +342 -0
  38. package/assets/types/generated/src/components/focus-trap.d.ts +238 -0
  39. package/assets/types/generated/src/components/loader.d.ts +133 -0
  40. package/assets/types/generated/src/components/modal.d.ts +341 -0
  41. package/assets/types/generated/src/components/range-slider.d.ts +267 -0
  42. package/assets/types/generated/src/components/shared.d.ts +91 -0
  43. package/assets/types/generated/src/components/split-pane.d.ts +239 -0
  44. package/assets/types/generated/src/components/toast.d.ts +284 -0
  45. package/assets/types/generated/src/components/tooltip.d.ts +200 -0
  46. package/assets/types/generated/src/components/virtual-list.d.ts +340 -0
  47. package/assets/types/generated/src/config.d.ts +193 -0
  48. package/assets/types/generated/src/context-cursor.d.ts +69 -0
  49. package/assets/types/generated/src/context-menu.d.ts +596 -0
  50. package/assets/types/generated/src/dates.d.ts +367 -0
  51. package/assets/types/generated/src/dom.d.ts +1221 -0
  52. package/assets/types/generated/src/effects.d.ts +1281 -0
  53. package/assets/types/generated/src/elements.d.ts +4996 -0
  54. package/assets/types/generated/src/escape.d.ts +5 -0
  55. package/assets/types/generated/src/flags-bundle.d.ts +4 -0
  56. package/assets/types/generated/src/flags.d.ts +338 -0
  57. package/assets/types/generated/src/forms.d.ts +1060 -0
  58. package/assets/types/generated/src/globals.d.ts +45 -0
  59. package/assets/types/generated/src/http.d.ts +131 -0
  60. package/assets/types/generated/src/i18n.d.ts +261 -0
  61. package/assets/types/generated/src/icons.d.ts +213 -0
  62. package/assets/types/generated/src/index.d.ts +249 -0
  63. package/assets/types/generated/src/input-group.d.ts +135 -0
  64. package/assets/types/generated/src/models.d.ts +968 -0
  65. package/assets/types/generated/src/popover.d.ts +412 -0
  66. package/assets/types/generated/src/router.d.ts +344 -0
  67. package/assets/types/generated/src/safe-url.d.ts +10 -0
  68. package/assets/types/generated/src/sanitize.d.ts +97 -0
  69. package/assets/types/generated/src/schema-builder.d.ts +420 -0
  70. package/assets/types/generated/src/skeleton.d.ts +135 -0
  71. package/assets/types/generated/src/smooth-caret.d.ts +61 -0
  72. package/assets/types/generated/src/sortable.d.ts +369 -0
  73. package/assets/types/generated/src/storage.d.ts +93 -0
  74. package/assets/types/generated/src/tables.d.ts +901 -0
  75. package/assets/types/generated/src/theme.d.ts +277 -0
  76. package/assets/types/generated/src/ticker-tape-drawing.d.ts +2 -0
  77. package/assets/types/generated/src/treeview.d.ts +504 -0
  78. package/assets/types/generated/src/utils.d.ts +1667 -0
  79. package/assets/types/generated/src/web-components/base/domma-element.d.ts +134 -0
  80. package/assets/types/generated/src/web-components/index.d.ts +14 -0
  81. package/assets/types/generated/vendor/domma-reactive.d.ts +587 -0
  82. package/assets/types/index.d.ts +104 -216
  83. package/package.json +5 -2
  84. package/public/dist/bundles/domma-complete.css +1084 -14
  85. package/public/dist/bundles/domma-data-focused.css +1084 -14
  86. package/public/dist/bundles/domma-essentials.css +1084 -14
  87. package/public/dist/bundles/domma-full.css +1084 -14
  88. package/public/dist/bundles/domma-minimal.css +8 -8
  89. package/public/dist/domma-flags.esm.js +3 -3
  90. package/public/dist/domma-flags.esm.js.map +1 -1
  91. package/public/dist/domma-flags.min.js +3 -3
  92. package/public/dist/domma-flags.min.js.map +1 -1
  93. package/public/dist/domma-syntax.min.js +3 -3
  94. package/public/dist/domma.css +3 -3
  95. package/public/dist/domma.esm.js +5 -5
  96. package/public/dist/domma.esm.js.map +1 -1
  97. package/public/dist/domma.min.js +5 -5
  98. package/public/dist/domma.min.js.map +1 -1
  99. package/public/dist/elements.css +1073 -3
  100. package/public/dist/grid.css +3 -3
  101. package/public/dist/syntax.css +3 -3
  102. package/public/dist/themes/domma-themes.css +3 -3
  103. package/templates/kickstart/frontend/types/domma.d.ts +2 -1
  104. package/assets/types/config.d.ts +0 -136
  105. package/assets/types/dates.d.ts +0 -209
  106. package/assets/types/dom.d.ts +0 -448
  107. package/assets/types/elements.d.ts +0 -682
  108. package/assets/types/flags.d.ts +0 -130
  109. package/assets/types/http.d.ts +0 -97
  110. package/assets/types/icons.d.ts +0 -147
  111. package/assets/types/models.d.ts +0 -260
  112. package/assets/types/smooth-caret.d.ts +0 -12
  113. package/assets/types/storage.d.ts +0 -93
  114. package/assets/types/tables.d.ts +0 -327
  115. package/assets/types/theme.d.ts +0 -137
  116. package/assets/types/utils.d.ts +0 -675
@@ -0,0 +1,367 @@
1
+ /**
2
+ * Anything a date can be made from. `null`/`undefined` mean now.
3
+ * @typedef {Date|string|number|DommaDate|null|undefined} DateInput
4
+ */
5
+ /**
6
+ * A unit of time - singular or plural, any case. `date` is the day of the month; `day` is the
7
+ * day of the week for `get()` and a calendar day elsewhere.
8
+ * @typedef {'year'|'years'|'month'|'months'|'week'|'weeks'|'day'|'days'|'date'|'hour'|'hours'|'minute'|'minutes'|'second'|'seconds'|'millisecond'|'milliseconds'} DateUnit
9
+ */
10
+ /**
11
+ * A unit for `diff()` - singular or plural.
12
+ * @typedef {'milliseconds'|'seconds'|'minutes'|'hours'|'days'|'weeks'|'months'|'years'|'millisecond'|'second'|'minute'|'hour'|'day'|'week'|'month'|'year'} DiffUnit
13
+ */
14
+ /**
15
+ * Bounds for `isBetween()`: `(` / `)` exclusive, `[` / `]` inclusive.
16
+ * @typedef {'()'|'[]'|'[)'|'(]'} Inclusivity
17
+ */
18
+ /**
19
+ * Chainable date wrapper class
20
+ */
21
+ export class DommaDate {
22
+ /**
23
+ * @param {DateInput} [value] The date; now when omitted
24
+ */
25
+ constructor(value?: DateInput);
26
+ /**
27
+ * @type {Date}
28
+ * @private
29
+ */
30
+ private _date;
31
+ /**
32
+ * Add time to the date (mutates and returns this date)
33
+ * @param {number} amount
34
+ * @param {DateUnit} unit
35
+ * @returns {this}
36
+ */
37
+ add(amount: number, unit: DateUnit): this;
38
+ /**
39
+ * Subtract time from the date (mutates and returns this date)
40
+ * @param {number} amount
41
+ * @param {DateUnit} unit
42
+ * @returns {this}
43
+ */
44
+ subtract(amount: number, unit: DateUnit): this;
45
+ /**
46
+ * Set to the start of a unit of time (weeks start on Sunday)
47
+ * @param {DateUnit} unit
48
+ * @returns {this}
49
+ */
50
+ startOf(unit: DateUnit): this;
51
+ /**
52
+ * Set to the end of a unit of time
53
+ * @param {DateUnit} unit
54
+ * @returns {this}
55
+ */
56
+ endOf(unit: DateUnit): this;
57
+ /**
58
+ * Set a unit of time (`month` is 0-11; `day` and `date` both set the day of the month)
59
+ * @param {DateUnit} unit
60
+ * @param {number} value
61
+ * @returns {this}
62
+ */
63
+ set(unit: DateUnit, value: number): this;
64
+ /**
65
+ * @overload
66
+ * @returns {Date} The underlying Date (not a copy)
67
+ */
68
+ get(): Date;
69
+ /**
70
+ * @overload
71
+ * @param {Exclude<DateUnit, 'week'|'weeks'>} unit
72
+ * @returns {number} The unit's value (`day` is the day of the week, `date` the day of the month)
73
+ */
74
+ get(unit: Exclude<DateUnit, "week" | "weeks">): number;
75
+ /**
76
+ * Get the year
77
+ * @returns {number}
78
+ */
79
+ year(): number;
80
+ /**
81
+ * Get the month (0-11)
82
+ * @returns {number}
83
+ */
84
+ month(): number;
85
+ /**
86
+ * Get the date of month (1-31)
87
+ * @returns {number}
88
+ */
89
+ date(): number;
90
+ /**
91
+ * Get the day of week (0-6, Sunday=0)
92
+ * @returns {number}
93
+ */
94
+ day(): number;
95
+ /**
96
+ * Get the hour (0-23)
97
+ * @returns {number}
98
+ */
99
+ hour(): number;
100
+ /**
101
+ * Get the minute (0-59)
102
+ * @returns {number}
103
+ */
104
+ minute(): number;
105
+ /**
106
+ * Get the second (0-59)
107
+ * @returns {number}
108
+ */
109
+ second(): number;
110
+ /**
111
+ * Get the millisecond (0-999)
112
+ * @returns {number}
113
+ */
114
+ millisecond(): number;
115
+ /**
116
+ * Get the day of year (1-366)
117
+ * @returns {number}
118
+ */
119
+ dayOfYear(): number;
120
+ /**
121
+ * Get the week of year
122
+ * @returns {number}
123
+ */
124
+ week(): number;
125
+ /**
126
+ * Get the quarter (1-4)
127
+ * @returns {number}
128
+ */
129
+ quarter(): number;
130
+ /**
131
+ * Get Unix timestamp (seconds)
132
+ * @returns {number}
133
+ */
134
+ unix(): number;
135
+ /**
136
+ * Get milliseconds since epoch
137
+ * @returns {number}
138
+ */
139
+ valueOf(): number;
140
+ /**
141
+ * Format the date using tokens (see `D.tokens`)
142
+ * @param {string} [formatStr='YYYY-MM-DD HH:mm:ss']
143
+ * @returns {string}
144
+ */
145
+ format(formatStr?: string): string;
146
+ /**
147
+ * Get ISO 8601 string
148
+ * @returns {string}
149
+ */
150
+ toISOString(): string;
151
+ /**
152
+ * Get a copy of the native Date
153
+ * @returns {Date}
154
+ */
155
+ toDate(): Date;
156
+ /**
157
+ * Get string representation
158
+ * @returns {string}
159
+ */
160
+ toString(): string;
161
+ /**
162
+ * Relative time from now (or from `relativeTo`), e.g. `3 days ago`, `in 2 hours`, `just now`
163
+ * @param {DateInput} [relativeTo]
164
+ * @returns {string}
165
+ */
166
+ fromNow(relativeTo?: DateInput): string;
167
+ /**
168
+ * Relative time from this date to another
169
+ * @param {DateInput} date
170
+ * @returns {string}
171
+ */
172
+ to(date: DateInput): string;
173
+ /**
174
+ * Check if date is before another (at the granularity of `unit` when given)
175
+ * @param {DateInput} other
176
+ * @param {DateUnit} [unit]
177
+ * @returns {boolean}
178
+ */
179
+ isBefore(other: DateInput, unit?: DateUnit): boolean;
180
+ /**
181
+ * Check if date is after another (at the granularity of `unit` when given)
182
+ * @param {DateInput} other
183
+ * @param {DateUnit} [unit]
184
+ * @returns {boolean}
185
+ */
186
+ isAfter(other: DateInput, unit?: DateUnit): boolean;
187
+ /**
188
+ * Check if date is the same as another (within the same `unit` when given)
189
+ * @param {DateInput} other
190
+ * @param {DateUnit} [unit]
191
+ * @returns {boolean}
192
+ */
193
+ isSame(other: DateInput, unit?: DateUnit): boolean;
194
+ /**
195
+ * Check if date is between two dates
196
+ * @param {DateInput} start
197
+ * @param {DateInput} end
198
+ * @param {DateUnit|null} [unit]
199
+ * @param {Inclusivity} [inclusivity='()']
200
+ * @returns {boolean}
201
+ */
202
+ isBetween(start: DateInput, end: DateInput, unit?: DateUnit | null, inclusivity?: Inclusivity): boolean;
203
+ /**
204
+ * Difference between this date and another (positive when this one is later), floored unless `precise`
205
+ * @param {DateInput} other
206
+ * @param {DiffUnit} [unit='milliseconds']
207
+ * @param {boolean} [precise=false]
208
+ * @returns {number}
209
+ */
210
+ diff(other: DateInput, unit?: DiffUnit, precise?: boolean): number;
211
+ /**
212
+ * @param {DommaDate} other
213
+ * @returns {number}
214
+ * @private
215
+ */
216
+ private _monthDiff;
217
+ /**
218
+ * Check if date is valid
219
+ * @returns {boolean}
220
+ */
221
+ isValid(): boolean;
222
+ /**
223
+ * Check if year is a leap year
224
+ * @returns {boolean}
225
+ */
226
+ isLeapYear(): boolean;
227
+ /**
228
+ * Get number of days in month
229
+ * @returns {number}
230
+ */
231
+ daysInMonth(): number;
232
+ /**
233
+ * Create a copy of this date
234
+ * @returns {DommaDate}
235
+ */
236
+ clone(): DommaDate;
237
+ /**
238
+ * @param {string} unit
239
+ * @returns {string}
240
+ * @private
241
+ */
242
+ private _normalizeUnit;
243
+ }
244
+ /**
245
+ * Anything a date can be made from. `null`/`undefined` mean now.
246
+ */
247
+ export type DateInput = Date | string | number | DommaDate | null | undefined;
248
+ /**
249
+ * A unit of time - singular or plural, any case. `date` is the day of the month; `day` is the
250
+ * day of the week for `get()` and a calendar day elsewhere.
251
+ */
252
+ export type DateUnit = "year" | "years" | "month" | "months" | "week" | "weeks" | "day" | "days" | "date" | "hour" | "hours" | "minute" | "minutes" | "second" | "seconds" | "millisecond" | "milliseconds";
253
+ /**
254
+ * A unit for `diff()` - singular or plural.
255
+ */
256
+ export type DiffUnit = "milliseconds" | "seconds" | "minutes" | "hours" | "days" | "weeks" | "months" | "years" | "millisecond" | "second" | "minute" | "hour" | "day" | "week" | "month" | "year";
257
+ /**
258
+ * Bounds for `isBetween()`: `(` / `)` exclusive, `[` / `]` inclusive.
259
+ */
260
+ export type Inclusivity = "()" | "[]" | "[)" | "(]";
261
+ /**
262
+ * Descriptions of the `format()` tokens, keyed by token.
263
+ */
264
+ export type FormatTokens = {
265
+ YYYY: string;
266
+ YY: string;
267
+ MM: string;
268
+ M: string;
269
+ DD: string;
270
+ D: string;
271
+ HH: string;
272
+ H: string;
273
+ hh: string;
274
+ h: string;
275
+ mm: string;
276
+ m: string;
277
+ ss: string;
278
+ s: string;
279
+ SSS: string;
280
+ A: string;
281
+ a: string;
282
+ ddd: string;
283
+ dddd: string;
284
+ MMM: string;
285
+ MMMM: string;
286
+ };
287
+ /**
288
+ * The statics on the date factory.
289
+ */
290
+ export type DatesStatics = {
291
+ /**
292
+ * Get current timestamp in milliseconds
293
+ */
294
+ now: () => number;
295
+ /**
296
+ * Parse a date string, optionally with a
297
+ * format of YYYY YY MM M DD D HH H mm m ss s tokens; an unmatched string gives an invalid date
298
+ */
299
+ parse: (dateString: string, format?: string) => DommaDate;
300
+ /**
301
+ * Check if a value is a valid date
302
+ */
303
+ isValid: (value: DateInput) => boolean;
304
+ /**
305
+ * The earliest of the dates (arrays are flattened)
306
+ */
307
+ min: (...dates: Array<DateInput | DateInput[]>) => DommaDate;
308
+ /**
309
+ * The latest of the dates (arrays are flattened)
310
+ */
311
+ max: (...dates: Array<DateInput | DateInput[]>) => DommaDate;
312
+ /**
313
+ * Format tokens reference
314
+ */
315
+ tokens: FormatTokens;
316
+ };
317
+ /**
318
+ * The date factory (`D`): `D(value?)` wraps a date in a chainable {@link DommaDate};
319
+ * the statics (`D.now()`, `D.parse()`, ...) do the rest.
320
+ */
321
+ export type Dates = ((value?: DateInput) => DommaDate) & DatesStatics;
322
+ /**
323
+ * Descriptions of the `format()` tokens, keyed by token.
324
+ * @typedef {object} FormatTokens
325
+ * @property {string} YYYY
326
+ * @property {string} YY
327
+ * @property {string} MM
328
+ * @property {string} M
329
+ * @property {string} DD
330
+ * @property {string} D
331
+ * @property {string} HH
332
+ * @property {string} H
333
+ * @property {string} hh
334
+ * @property {string} h
335
+ * @property {string} mm
336
+ * @property {string} m
337
+ * @property {string} ss
338
+ * @property {string} s
339
+ * @property {string} SSS
340
+ * @property {string} A
341
+ * @property {string} a
342
+ * @property {string} ddd
343
+ * @property {string} dddd
344
+ * @property {string} MMM
345
+ * @property {string} MMMM
346
+ */
347
+ /**
348
+ * The statics on the date factory.
349
+ * @typedef {object} DatesStatics
350
+ * @property {() => number} now Get current timestamp in milliseconds
351
+ * @property {(dateString: string, format?: string) => DommaDate} parse Parse a date string, optionally with a
352
+ * format of YYYY YY MM M DD D HH H mm m ss s tokens; an unmatched string gives an invalid date
353
+ * @property {(value: DateInput) => boolean} isValid Check if a value is a valid date
354
+ * @property {(...dates: Array<DateInput|DateInput[]>) => DommaDate} min The earliest of the dates (arrays are flattened)
355
+ * @property {(...dates: Array<DateInput|DateInput[]>) => DommaDate} max The latest of the dates (arrays are flattened)
356
+ * @property {FormatTokens} tokens Format tokens reference
357
+ */
358
+ /**
359
+ * The date factory (`D`): `D(value?)` wraps a date in a chainable {@link DommaDate};
360
+ * the statics (`D.now()`, `D.parse()`, ...) do the rest.
361
+ * @typedef {((value?: DateInput) => DommaDate) & DatesStatics} Dates
362
+ */
363
+ /**
364
+ * Main date factory function
365
+ * @type {Dates}
366
+ */
367
+ export const dates: Dates;