@danxbot/ui 5.1.1 → 5.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.
- package/dist/index.js +7622 -7489
- package/dist/index.js.map +1 -1
- package/dist/pure.js +250 -13
- package/dist/pure.js.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/lib/values/boolean.d.ts +28 -0
- package/dist/types/lib/values/currency.d.ts +22 -0
- package/dist/types/lib/values/date.d.ts +30 -0
- package/dist/types/lib/values/datetime.d.ts +48 -0
- package/dist/types/lib/values/index.d.ts +6 -0
- package/dist/types/lib/values/number.d.ts +27 -0
- package/dist/types/lib/values/phone.d.ts +23 -0
- package/dist/types/pure.d.ts +11 -5
- package/package.json +1 -1
package/dist/types/pure.d.ts
CHANGED
|
@@ -24,13 +24,19 @@
|
|
|
24
24
|
*
|
|
25
25
|
* WHAT BELONGS HERE. Decisions about how a value READS, with no dependencies:
|
|
26
26
|
* precision, units, the point at which a rounded figure stops telling the
|
|
27
|
-
* truth. Deliberately NOT the calendar
|
|
28
|
-
* `hoursInDay` and the rest
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
27
|
+
* truth. Deliberately NOT the whole calendar layer — `formatDateRange`,
|
|
28
|
+
* `hoursInDay`, `monthGridDays` and the rest of `lib/time`'s CALENDAR-UI
|
|
29
|
+
* surface are equally pure but answer a question this entry's consumers do
|
|
30
|
+
* not have: they are grid-layout and scheduling math, not "turn a stored
|
|
31
|
+
* value into a string." `lib/values/date.ts` and `datetime.ts` are the
|
|
32
|
+
* question that WAS asked (a consumer's data grid duplicating this exact
|
|
33
|
+
* display/parse logic locally, instead of sourcing it from one place) and are
|
|
34
|
+
* exported below. They reuse `lib/time`'s zone arithmetic internally — that
|
|
35
|
+
* module has no React in it either, so pulling it in transitively costs real
|
|
36
|
+
* bytes but not the one thing this entry actually guards against.
|
|
32
37
|
*
|
|
33
38
|
* Everything exported here is ALSO exported from the main entry, so nothing
|
|
34
39
|
* about this is a migration and no existing import has to change.
|
|
35
40
|
*/
|
|
36
41
|
export { formatBytes, formatTokens } from "./lib/format";
|
|
42
|
+
export { formatDate, parseDate, formatDateTime, parseDateTime, type FormatDateTimeOptions, type ParseDateTimeOptions, formatCurrency, parseCurrency, formatPhone, parsePhone, formatNumber, parseNumber, type FormatNumberOptions, formatBoolean, parseBoolean, type FormatBooleanOptions, } from "./lib/values";
|