@sprawlify/primitives 0.0.96 → 0.0.98

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 (120) hide show
  1. package/dist/{collection-DZeodezM.cjs → collection-BBgC8xCb.cjs} +22 -7
  2. package/dist/{collection-CcsrqDFY.mjs → collection-DgzidRvr.mjs} +22 -7
  3. package/dist/collection.cjs +1 -1
  4. package/dist/collection.d.cts +3 -3
  5. package/dist/collection.d.mts +3 -3
  6. package/dist/collection.mjs +1 -1
  7. package/dist/date-utils.d.cts +20 -20
  8. package/dist/date-utils.d.mts +2 -2
  9. package/dist/dom-query.d.cts +1 -1
  10. package/dist/dom-query.d.mts +1 -1
  11. package/dist/{i18n-utils-DHGN_KCY.mjs → i18n-utils-BsXTdcWB.mjs} +52 -1
  12. package/dist/{i18n-utils-Dm8cGCol.cjs → i18n-utils-bHwTSOWi.cjs} +57 -0
  13. package/dist/i18n-utils.cjs +2 -1
  14. package/dist/i18n-utils.d.cts +14 -1
  15. package/dist/i18n-utils.d.mts +14 -1
  16. package/dist/i18n-utils.mjs +2 -2
  17. package/dist/{index-8xpMF4wX.d.mts → index-ClVRyKIt.d.mts} +33 -32
  18. package/dist/{index-CwA19fjG.d.mts → index-DHp3-EkH.d.mts} +1 -1
  19. package/dist/{list-collection-DkRA5LOq.d.mts → list-collection-AgReIMJ0.d.mts} +1 -1
  20. package/dist/{list-collection-B_8BN0XB.d.cts → list-collection-C0swT4Wu.d.cts} +1 -1
  21. package/dist/machines/accordion/index.d.cts +1 -1
  22. package/dist/machines/accordion/index.d.mts +1 -1
  23. package/dist/machines/angle-slider/index.d.cts +1 -1
  24. package/dist/machines/angle-slider/index.d.mts +1 -1
  25. package/dist/machines/bottom-sheet/index.d.cts +1 -1
  26. package/dist/machines/bottom-sheet/index.d.mts +1 -1
  27. package/dist/machines/carousel/index.d.cts +1 -1
  28. package/dist/machines/carousel/index.d.mts +1 -1
  29. package/dist/machines/cascade-select/index.cjs +1367 -0
  30. package/dist/machines/cascade-select/index.d.cts +164 -0
  31. package/dist/machines/cascade-select/index.d.mts +164 -0
  32. package/dist/machines/cascade-select/index.mjs +1360 -0
  33. package/dist/machines/checkbox/index.d.cts +1 -1
  34. package/dist/machines/checkbox/index.d.mts +1 -1
  35. package/dist/machines/clipboard/index.d.cts +1 -1
  36. package/dist/machines/clipboard/index.d.mts +1 -1
  37. package/dist/machines/collapsible/index.d.cts +1 -1
  38. package/dist/machines/collapsible/index.d.mts +1 -1
  39. package/dist/machines/color-picker/index.d.cts +1 -1
  40. package/dist/machines/color-picker/index.d.mts +2 -2
  41. package/dist/machines/combobox/index.cjs +2 -2
  42. package/dist/machines/combobox/index.d.cts +2 -2
  43. package/dist/machines/combobox/index.d.mts +3 -3
  44. package/dist/machines/combobox/index.mjs +2 -2
  45. package/dist/machines/date-picker/index.d.cts +5 -5
  46. package/dist/machines/date-picker/index.d.mts +6 -6
  47. package/dist/machines/dialog/index.d.cts +1 -1
  48. package/dist/machines/dialog/index.d.mts +1 -1
  49. package/dist/machines/dropdown-menu/index.d.cts +1 -1
  50. package/dist/machines/dropdown-menu/index.d.mts +2 -2
  51. package/dist/machines/editable/index.d.cts +1 -1
  52. package/dist/machines/editable/index.d.mts +1 -1
  53. package/dist/machines/file-upload/index.cjs +1 -1
  54. package/dist/machines/file-upload/index.d.cts +1 -1
  55. package/dist/machines/file-upload/index.d.mts +1 -1
  56. package/dist/machines/file-upload/index.mjs +1 -1
  57. package/dist/machines/floating-panel/index.d.cts +1 -1
  58. package/dist/machines/floating-panel/index.d.mts +1 -1
  59. package/dist/machines/hover-card/index.d.cts +1 -1
  60. package/dist/machines/hover-card/index.d.mts +2 -2
  61. package/dist/machines/listbox/index.cjs +1 -1
  62. package/dist/machines/listbox/index.d.cts +3 -3
  63. package/dist/machines/listbox/index.d.mts +3 -3
  64. package/dist/machines/listbox/index.mjs +1 -1
  65. package/dist/machines/marquee/index.d.cts +2 -2
  66. package/dist/machines/marquee/index.d.mts +2 -2
  67. package/dist/machines/navigation-menu/index.d.cts +1 -1
  68. package/dist/machines/navigation-menu/index.d.mts +1 -1
  69. package/dist/machines/number-input/index.cjs +1 -1
  70. package/dist/machines/number-input/index.d.cts +1 -1
  71. package/dist/machines/number-input/index.d.mts +1 -1
  72. package/dist/machines/number-input/index.mjs +1 -1
  73. package/dist/machines/password-input/index.d.cts +1 -1
  74. package/dist/machines/password-input/index.d.mts +1 -1
  75. package/dist/machines/pin-input/index.d.cts +1 -1
  76. package/dist/machines/pin-input/index.d.mts +1 -1
  77. package/dist/machines/popover/index.d.cts +1 -1
  78. package/dist/machines/popover/index.d.mts +2 -2
  79. package/dist/machines/progress/index.d.cts +1 -1
  80. package/dist/machines/progress/index.d.mts +1 -1
  81. package/dist/machines/radio-group/index.d.cts +1 -1
  82. package/dist/machines/radio-group/index.d.mts +1 -1
  83. package/dist/machines/rating-group/index.d.cts +1 -1
  84. package/dist/machines/rating-group/index.d.mts +1 -1
  85. package/dist/machines/select/index.cjs +1 -1
  86. package/dist/machines/select/index.d.cts +2 -2
  87. package/dist/machines/select/index.d.mts +3 -3
  88. package/dist/machines/select/index.mjs +1 -1
  89. package/dist/machines/signature-pad/index.d.cts +1 -1
  90. package/dist/machines/signature-pad/index.d.mts +1 -1
  91. package/dist/machines/slider/index.d.cts +1 -1
  92. package/dist/machines/slider/index.d.mts +1 -1
  93. package/dist/machines/steps/index.d.cts +1 -1
  94. package/dist/machines/steps/index.d.mts +1 -1
  95. package/dist/machines/switch/index.d.cts +1 -1
  96. package/dist/machines/switch/index.d.mts +1 -1
  97. package/dist/machines/tabs/index.d.cts +1 -1
  98. package/dist/machines/tabs/index.d.mts +1 -1
  99. package/dist/machines/tags-input/index.d.cts +1 -1
  100. package/dist/machines/tags-input/index.d.mts +1 -1
  101. package/dist/machines/timer/index.d.cts +1 -1
  102. package/dist/machines/timer/index.d.mts +1 -1
  103. package/dist/machines/toast/index.d.cts +1 -1
  104. package/dist/machines/toast/index.d.mts +1 -1
  105. package/dist/machines/tooltip/index.d.cts +1 -1
  106. package/dist/machines/tooltip/index.d.mts +2 -2
  107. package/dist/machines/tour/index.d.cts +1 -1
  108. package/dist/machines/tour/index.d.mts +2 -2
  109. package/dist/machines/tree-view/index.cjs +1 -1
  110. package/dist/machines/tree-view/index.d.cts +2 -2
  111. package/dist/machines/tree-view/index.d.mts +2 -2
  112. package/dist/machines/tree-view/index.mjs +1 -1
  113. package/dist/popper.d.cts +1 -1
  114. package/dist/popper.d.mts +1 -1
  115. package/dist/{selection-DdNvrKbj.d.mts → selection-aObDFAzS.d.mts} +1 -1
  116. package/dist/{selection-Bb_ZSVxe.d.cts → selection-k8FM_y4w.d.cts} +1 -1
  117. package/dist/{tree-collection-DlBCued7.d.mts → tree-collection-Dlf9EUrT.d.mts} +2 -1
  118. package/dist/{tree-collection-DjtppzYh.d.cts → tree-collection-DlqV5kYO.d.cts} +2 -1
  119. package/dist/{types-BQMZ4iuP.d.cts → types-MFO-RQR7.d.cts} +9 -8
  120. package/package.json +11 -1
@@ -933,12 +933,6 @@ var TreeCollection = class TreeCollection {
933
933
  return acc;
934
934
  }, []).sort((a, b) => compareIndexPaths(a.indexPath, b.indexPath)).map(({ value }) => value);
935
935
  });
936
- require_defineProperty._defineProperty(this, "getIndexPath", (value) => {
937
- return findIndexPath(this.rootNode, {
938
- getChildren: this.getNodeChildren,
939
- predicate: (node) => this.getNodeValue(node) === value
940
- });
941
- });
942
936
  require_defineProperty._defineProperty(this, "getValue", (indexPath) => {
943
937
  const node = this.at(indexPath);
944
938
  return node ? this.getNodeValue(node) : void 0;
@@ -1200,6 +1194,27 @@ var TreeCollection = class TreeCollection {
1200
1194
  });
1201
1195
  this.rootNode = options.rootNode;
1202
1196
  }
1197
+ getIndexPath(valueOrValuePath) {
1198
+ if (Array.isArray(valueOrValuePath)) {
1199
+ if (valueOrValuePath.length === 0) return [];
1200
+ const indexPath = [];
1201
+ let currentChildren = this.getNodeChildren(this.rootNode);
1202
+ for (let i = 0; i < valueOrValuePath.length; i++) {
1203
+ const currentValue = valueOrValuePath[i];
1204
+ const matchingChildIndex = currentChildren.findIndex((child) => this.getNodeValue(child) === currentValue);
1205
+ if (matchingChildIndex === -1) break;
1206
+ indexPath.push(matchingChildIndex);
1207
+ if (i < valueOrValuePath.length - 1) {
1208
+ const currentNode = currentChildren[matchingChildIndex];
1209
+ currentChildren = this.getNodeChildren(currentNode);
1210
+ }
1211
+ }
1212
+ return indexPath;
1213
+ } else return findIndexPath(this.rootNode, {
1214
+ getChildren: this.getNodeChildren,
1215
+ predicate: (node) => this.getNodeValue(node) === valueOrValuePath
1216
+ });
1217
+ }
1203
1218
  };
1204
1219
  function flattenedToTree(nodes, options = fallbackMethods) {
1205
1220
  if (nodes.length === 0) throw new Error("[sprawlify-js/tree] Cannot create tree from empty flattened array");
@@ -1212,7 +1227,7 @@ function flattenedToTree(nodes, options = fallbackMethods) {
1212
1227
  const buildNode = (idx) => {
1213
1228
  const flatNode = nodeMap.get(idx);
1214
1229
  if (!flatNode) return {};
1215
- const { _children, ...cleanNode } = flatNode;
1230
+ const { _children, _parent, _index, ...cleanNode } = flatNode;
1216
1231
  const children = [];
1217
1232
  _children?.forEach((childIndex) => {
1218
1233
  children.push(buildNode(childIndex));
@@ -933,12 +933,6 @@ var TreeCollection = class TreeCollection {
933
933
  return acc;
934
934
  }, []).sort((a, b) => compareIndexPaths(a.indexPath, b.indexPath)).map(({ value }) => value);
935
935
  });
936
- _defineProperty(this, "getIndexPath", (value) => {
937
- return findIndexPath(this.rootNode, {
938
- getChildren: this.getNodeChildren,
939
- predicate: (node) => this.getNodeValue(node) === value
940
- });
941
- });
942
936
  _defineProperty(this, "getValue", (indexPath) => {
943
937
  const node = this.at(indexPath);
944
938
  return node ? this.getNodeValue(node) : void 0;
@@ -1200,6 +1194,27 @@ var TreeCollection = class TreeCollection {
1200
1194
  });
1201
1195
  this.rootNode = options.rootNode;
1202
1196
  }
1197
+ getIndexPath(valueOrValuePath) {
1198
+ if (Array.isArray(valueOrValuePath)) {
1199
+ if (valueOrValuePath.length === 0) return [];
1200
+ const indexPath = [];
1201
+ let currentChildren = this.getNodeChildren(this.rootNode);
1202
+ for (let i = 0; i < valueOrValuePath.length; i++) {
1203
+ const currentValue = valueOrValuePath[i];
1204
+ const matchingChildIndex = currentChildren.findIndex((child) => this.getNodeValue(child) === currentValue);
1205
+ if (matchingChildIndex === -1) break;
1206
+ indexPath.push(matchingChildIndex);
1207
+ if (i < valueOrValuePath.length - 1) {
1208
+ const currentNode = currentChildren[matchingChildIndex];
1209
+ currentChildren = this.getNodeChildren(currentNode);
1210
+ }
1211
+ }
1212
+ return indexPath;
1213
+ } else return findIndexPath(this.rootNode, {
1214
+ getChildren: this.getNodeChildren,
1215
+ predicate: (node) => this.getNodeValue(node) === valueOrValuePath
1216
+ });
1217
+ }
1203
1218
  };
1204
1219
  function flattenedToTree(nodes, options = fallbackMethods) {
1205
1220
  if (nodes.length === 0) throw new Error("[sprawlify-js/tree] Cannot create tree from empty flattened array");
@@ -1212,7 +1227,7 @@ function flattenedToTree(nodes, options = fallbackMethods) {
1212
1227
  const buildNode = (idx) => {
1213
1228
  const flatNode = nodeMap.get(idx);
1214
1229
  if (!flatNode) return {};
1215
- const { _children, ...cleanNode } = flatNode;
1230
+ const { _children, _parent, _index, ...cleanNode } = flatNode;
1216
1231
  const children = [];
1217
1232
  _children?.forEach((childIndex) => {
1218
1233
  children.push(buildNode(childIndex));
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  require("./utils-ByNiZU8f.cjs");
3
- const require_collection = require("./collection-DZeodezM.cjs");
3
+ const require_collection = require("./collection-BBgC8xCb.cjs");
4
4
  exports.GridCollection = require_collection.GridCollection;
5
5
  exports.ListCollection = require_collection.ListCollection;
6
6
  exports.Selection = require_collection.Selection;
@@ -1,5 +1,5 @@
1
1
  import { a as CollectionSearchState, c as FlatTreeNode, d as TreeCollectionMethods, f as TreeCollectionOptions, g as ValuePath, i as CollectionSearchOptions, l as FlatTreeNodeMeta, m as TreeSkipFn, n as CollectionMethods, p as TreeNode, r as CollectionOptions, s as FilePathTreeNode, t as CollectionItem, u as IndexPath } from "./types-D-7AMgSE.cjs";
2
- import { n as isListCollection, t as ListCollection } from "./list-collection-B_8BN0XB.cjs";
3
- import { a as isGridCollection, i as GridCollectionOptions, n as SelectionMode, r as GridCollection, t as Selection } from "./selection-Bb_ZSVxe.cjs";
4
- import { n as filePathToTree, r as flattenedToTree, t as TreeCollection } from "./tree-collection-DjtppzYh.cjs";
2
+ import { n as isListCollection, t as ListCollection } from "./list-collection-C0swT4Wu.cjs";
3
+ import { a as isGridCollection, i as GridCollectionOptions, n as SelectionMode, r as GridCollection, t as Selection } from "./selection-k8FM_y4w.cjs";
4
+ import { n as filePathToTree, r as flattenedToTree, t as TreeCollection } from "./tree-collection-DlqV5kYO.cjs";
5
5
  export { CollectionItem, CollectionMethods, CollectionOptions, CollectionSearchOptions, CollectionSearchState, FilePathTreeNode, FlatTreeNode, FlatTreeNodeMeta, GridCollection, GridCollectionOptions, IndexPath, ListCollection, Selection, SelectionMode, TreeCollection, TreeCollectionMethods, TreeCollectionOptions, TreeNode, TreeSkipFn, ValuePath, filePathToTree, flattenedToTree, isGridCollection, isListCollection };
@@ -1,5 +1,5 @@
1
1
  import { a as CollectionSearchState, c as FlatTreeNode, d as TreeCollectionMethods, f as TreeCollectionOptions, g as ValuePath, i as CollectionSearchOptions, l as FlatTreeNodeMeta, m as TreeSkipFn, n as CollectionMethods, p as TreeNode, r as CollectionOptions, s as FilePathTreeNode, t as CollectionItem, u as IndexPath } from "./types-9uw8LHpE.mjs";
2
- import { n as isListCollection, t as ListCollection } from "./list-collection-DkRA5LOq.mjs";
3
- import { a as isGridCollection, i as GridCollectionOptions, n as SelectionMode, r as GridCollection, t as Selection } from "./selection-DdNvrKbj.mjs";
4
- import { n as filePathToTree, r as flattenedToTree, t as TreeCollection } from "./tree-collection-DlBCued7.mjs";
2
+ import { n as isListCollection, t as ListCollection } from "./list-collection-AgReIMJ0.mjs";
3
+ import { a as isGridCollection, i as GridCollectionOptions, n as SelectionMode, r as GridCollection, t as Selection } from "./selection-aObDFAzS.mjs";
4
+ import { n as filePathToTree, r as flattenedToTree, t as TreeCollection } from "./tree-collection-Dlf9EUrT.mjs";
5
5
  export { CollectionItem, CollectionMethods, CollectionOptions, CollectionSearchOptions, CollectionSearchState, FilePathTreeNode, FlatTreeNode, FlatTreeNodeMeta, GridCollection, GridCollectionOptions, IndexPath, ListCollection, Selection, SelectionMode, TreeCollection, TreeCollectionMethods, TreeCollectionOptions, TreeNode, TreeSkipFn, ValuePath, filePathToTree, flattenedToTree, isGridCollection, isListCollection };
@@ -1,3 +1,3 @@
1
1
  import "./utils-VVoZ_v29.mjs";
2
- import { a as GridCollection, c as isListCollection, i as Selection, n as filePathToTree, o as isGridCollection, r as flattenedToTree, s as ListCollection, t as TreeCollection } from "./collection-CcsrqDFY.mjs";
2
+ import { a as GridCollection, c as isListCollection, i as Selection, n as filePathToTree, o as isGridCollection, r as flattenedToTree, s as ListCollection, t as TreeCollection } from "./collection-DgzidRvr.mjs";
3
3
  export { GridCollection, ListCollection, Selection, TreeCollection, filePathToTree, flattenedToTree, isGridCollection, isListCollection };
@@ -1,10 +1,10 @@
1
- import { a as DateRangePreset, i as DateGranularity, n as DateAlignment, r as DateAvailableFn, t as DateAdjustFn } from "./types-BQMZ4iuP.cjs";
1
+ import { a as DateRangePreset, i as DateGranularity, n as DateAlignment, o as DateValue, r as DateAvailableFn, t as DateAdjustFn } from "./types-MFO-RQR7.cjs";
2
2
  import * as _internationalized_date0 from "@internationalized/date";
3
- import { Calendar, DateDuration, DateFormatter, DateValue } from "@internationalized/date";
3
+ import { Calendar, DateDuration, DateFormatter, DateValue as DateValue$1 } from "@internationalized/date";
4
4
 
5
5
  //#region src/shared/date-utils/align.d.ts
6
- declare function alignDate(date: DateValue, alignment: DateAlignment, duration: DateDuration, locale: string, min?: DateValue | undefined, max?: DateValue | undefined): DateValue;
7
- declare function alignStartDate(date: DateValue, startDate: DateValue, endDate: DateValue, duration: DateDuration, locale: string, min?: DateValue | undefined, max?: DateValue | undefined): DateValue;
6
+ declare function alignDate(date: DateValue, alignment: DateAlignment, duration: DateDuration, locale: string, min?: DateValue | undefined, max?: DateValue | undefined): _internationalized_date0.DateValue;
7
+ declare function alignStartDate(date: DateValue, startDate: DateValue, endDate: DateValue, duration: DateDuration, locale: string, min?: DateValue | undefined, max?: DateValue | undefined): _internationalized_date0.CalendarDate | _internationalized_date0.CalendarDateTime | _internationalized_date0.ZonedDateTime;
8
8
  //#endregion
9
9
  //#region src/shared/date-utils/assertion.d.ts
10
10
  declare function isDateEqual(dateA: DateValue | null | undefined, dateB?: DateValue | null): boolean;
@@ -14,11 +14,11 @@ declare function isPreviousRangeInvalid(startDate: DateValue, minValue?: DateVal
14
14
  declare function isNextRangeInvalid(endDate: DateValue, minValue?: DateValue | null, maxValue?: DateValue | null): boolean;
15
15
  //#endregion
16
16
  //#region src/shared/date-utils/constrain.d.ts
17
- declare function alignCenter(date: DateValue, duration: DateDuration, locale: string, min?: DateValue, max?: DateValue): DateValue;
18
- declare function alignStart(date: DateValue, duration: DateDuration, locale: string, min?: DateValue, max?: DateValue): DateValue;
19
- declare function alignEnd(date: DateValue, duration: DateDuration, locale: string, min?: DateValue, max?: DateValue): DateValue;
20
- declare function constrainStart(date: DateValue, aligned: DateValue, duration: DateDuration, locale: string, min?: DateValue, max?: DateValue): DateValue;
21
- declare function constrainValue(date: DateValue, minValue?: DateValue, maxValue?: DateValue): DateValue;
17
+ declare function alignCenter(date: DateValue$1, duration: DateDuration, locale: string, min?: DateValue$1, max?: DateValue$1): DateValue$1;
18
+ declare function alignStart(date: DateValue$1, duration: DateDuration, locale: string, min?: DateValue$1, max?: DateValue$1): DateValue$1;
19
+ declare function alignEnd(date: DateValue$1, duration: DateDuration, locale: string, min?: DateValue$1, max?: DateValue$1): DateValue$1;
20
+ declare function constrainStart(date: DateValue$1, aligned: DateValue$1, duration: DateDuration, locale: string, min?: DateValue$1, max?: DateValue$1): DateValue$1;
21
+ declare function constrainValue(date: DateValue$1, minValue?: DateValue$1, maxValue?: DateValue$1): DateValue$1;
22
22
  //#endregion
23
23
  //#region src/shared/date-utils/duration.d.ts
24
24
  declare function getUnitDuration(duration: DateDuration): {
@@ -39,17 +39,17 @@ declare function getDayFormatter(locale: string, timeZone: string): DateFormatte
39
39
  declare function getMonthFormatter(locale: string, timeZone: string): DateFormatter;
40
40
  //#endregion
41
41
  //#region src/shared/date-utils/date-month.d.ts
42
- declare function getStartOfWeek(date: DateValue, locale: string, firstDayOfWeek?: number): DateValue;
43
- declare function getEndOfWeek(date: DateValue, locale: string, firstDayOfWeek?: number): DateValue;
44
- declare function getDaysInWeek(weekIndex: number, from: DateValue, locale: string, firstDayOfWeek?: number): DateValue[];
45
- declare function getMonthDays(from: DateValue, locale: string, numOfWeeks?: number, firstDayOfWeek?: number): DateValue[][];
46
- declare function getWeekdayFormats(locale: string, timeZone: string): <T extends DateValue | Date>(value: T) => {
42
+ declare function getStartOfWeek(date: DateValue$1, locale: string, firstDayOfWeek?: number): DateValue$1;
43
+ declare function getEndOfWeek(date: DateValue$1, locale: string, firstDayOfWeek?: number): DateValue$1;
44
+ declare function getDaysInWeek(weekIndex: number, from: DateValue$1, locale: string, firstDayOfWeek?: number): DateValue$1[];
45
+ declare function getMonthDays(from: DateValue$1, locale: string, numOfWeeks?: number, firstDayOfWeek?: number): DateValue$1[][];
46
+ declare function getWeekdayFormats(locale: string, timeZone: string): <T extends DateValue$1 | Date>(value: T) => {
47
47
  value: T;
48
48
  short: string;
49
49
  long: string;
50
50
  narrow: string;
51
51
  };
52
- declare function getWeekDays(date: DateValue, startOfWeekProp: number | undefined, timeZone: string, locale: string): {
52
+ declare function getWeekDays(date: DateValue$1, startOfWeekProp: number | undefined, timeZone: string, locale: string): {
53
53
  value: _internationalized_date0.CalendarDate | _internationalized_date0.CalendarDateTime | _internationalized_date0.ZonedDateTime;
54
54
  short: string;
55
55
  long: string;
@@ -70,9 +70,9 @@ declare function getDecadeRange(year: number, opts?: {
70
70
  //#endregion
71
71
  //#region src/shared/date-utils/mutation.d.ts
72
72
  declare function getTodayDate(timeZone?: string): _internationalized_date0.CalendarDate;
73
- declare function setCalendar(date: DateValue, calendar: Calendar): _internationalized_date0.CalendarDateTime;
74
- declare function setDate(date: DateValue, startDate: DateValue, isDateUnavailable: DateAvailableFn, locale: string, minValue: DateValue, maxValue: DateValue): DateValue | undefined;
75
- declare function getPreviousAvailableDate(date: DateValue, minValue: DateValue, locale: string, isDateUnavailable?: DateAvailableFn): DateValue | undefined;
73
+ declare function setCalendar(date: DateValue$1, calendar: Calendar): _internationalized_date0.CalendarDateTime;
74
+ declare function setDate(date: DateValue$1, startDate: DateValue$1, isDateUnavailable: DateAvailableFn, locale: string, minValue: DateValue$1, maxValue: DateValue$1): DateValue$1 | undefined;
75
+ declare function getPreviousAvailableDate(date: DateValue$1, minValue: DateValue$1, locale: string, isDateUnavailable?: DateAvailableFn): DateValue$1 | undefined;
76
76
  //#endregion
77
77
  //#region src/shared/date-utils/pagination.d.ts
78
78
  interface AdjustDateParams {
@@ -96,6 +96,6 @@ declare function getPreviousSection(focusedDate: DateValue, startDate: DateValue
96
96
  declare function parseDateString(date: string, locale: string, timeZone: string): DateValue | undefined;
97
97
  //#endregion
98
98
  //#region src/shared/date-utils/preset.d.ts
99
- declare function getDateRangePreset(preset: DateRangePreset, locale: string, timeZone: string): [DateValue, DateValue];
99
+ declare function getDateRangePreset(preset: DateRangePreset, locale: string, timeZone: string): [DateValue$1, DateValue$1];
100
100
  //#endregion
101
- export { AdjustDateParams, AdjustDateReturn, DateAdjustFn, DateGranularity, DateRangePreset, YearsRange, alignCenter, alignDate, alignEnd, alignStart, alignStartDate, constrainStart, constrainValue, formatRange, formatSelectedDate, formatVisibleRange, getAdjustedDateFn, getDateRangePreset, getDayFormatter, getDaysInWeek, getDecadeRange, getEndDate, getEndOfWeek, getMonthDays, getMonthFormatter, getMonthNames, getNextPage, getNextRow, getNextSection, getPreviousAvailableDate, getPreviousPage, getPreviousRow, getPreviousSection, getSectionEnd, getSectionStart, getStartOfWeek, getTodayDate, getUnitDuration, getWeekDays, getWeekdayFormats, getYearsRange, isDateEqual, isDateOutsideRange, isDateUnavailable, isNextRangeInvalid, isPreviousRangeInvalid, normalizeYear, parseDateString, setCalendar, setDate };
101
+ export { AdjustDateParams, AdjustDateReturn, DateAdjustFn, DateGranularity, DateRangePreset, DateValue, YearsRange, alignCenter, alignDate, alignEnd, alignStart, alignStartDate, constrainStart, constrainValue, formatRange, formatSelectedDate, formatVisibleRange, getAdjustedDateFn, getDateRangePreset, getDayFormatter, getDaysInWeek, getDecadeRange, getEndDate, getEndOfWeek, getMonthDays, getMonthFormatter, getMonthNames, getNextPage, getNextRow, getNextSection, getPreviousAvailableDate, getPreviousPage, getPreviousRow, getPreviousSection, getSectionEnd, getSectionStart, getStartOfWeek, getTodayDate, getUnitDuration, getWeekDays, getWeekdayFormats, getYearsRange, isDateEqual, isDateOutsideRange, isDateUnavailable, isNextRangeInvalid, isPreviousRangeInvalid, normalizeYear, parseDateString, setCalendar, setDate };
@@ -1,2 +1,2 @@
1
- import { A as getMonthFormatter, B as constrainValue, C as getEndOfWeek, D as getWeekDays, E as getStartOfWeek, F as getUnitDuration, G as isPreviousRangeInvalid, H as isDateOutsideRange, I as alignCenter, J as DateAdjustFn, K as alignDate, L as alignEnd, M as formatSelectedDate, N as formatVisibleRange, O as getWeekdayFormats, P as getEndDate, R as alignStart, S as getDaysInWeek, T as getMonthNames, U as isDateUnavailable, V as isDateEqual, W as isNextRangeInvalid, X as DateRangePreset, Y as DateGranularity, _ as setDate, a as getAdjustedDateFn, b as getYearsRange, c as getNextSection, d as getPreviousSection, f as getSectionEnd, g as setCalendar, h as getTodayDate, i as AdjustDateReturn, j as formatRange, k as getDayFormatter, l as getPreviousPage, m as getPreviousAvailableDate, n as parseDateString, o as getNextPage, p as getSectionStart, q as alignStartDate, r as AdjustDateParams, s as getNextRow, t as getDateRangePreset, u as getPreviousRow, v as YearsRange, w as getMonthDays, x as normalizeYear, y as getDecadeRange, z as constrainStart } from "./index-8xpMF4wX.mjs";
2
- export { AdjustDateParams, AdjustDateReturn, DateAdjustFn, DateGranularity, DateRangePreset, YearsRange, alignCenter, alignDate, alignEnd, alignStart, alignStartDate, constrainStart, constrainValue, formatRange, formatSelectedDate, formatVisibleRange, getAdjustedDateFn, getDateRangePreset, getDayFormatter, getDaysInWeek, getDecadeRange, getEndDate, getEndOfWeek, getMonthDays, getMonthFormatter, getMonthNames, getNextPage, getNextRow, getNextSection, getPreviousAvailableDate, getPreviousPage, getPreviousRow, getPreviousSection, getSectionEnd, getSectionStart, getStartOfWeek, getTodayDate, getUnitDuration, getWeekDays, getWeekdayFormats, getYearsRange, isDateEqual, isDateOutsideRange, isDateUnavailable, isNextRangeInvalid, isPreviousRangeInvalid, normalizeYear, parseDateString, setCalendar, setDate };
1
+ import { A as getMonthFormatter, B as constrainValue, C as getEndOfWeek, D as getWeekDays, E as getStartOfWeek, F as getUnitDuration, G as isPreviousRangeInvalid, H as isDateOutsideRange, I as alignCenter, J as DateAdjustFn, K as alignDate, L as alignEnd, M as formatSelectedDate, N as formatVisibleRange, O as getWeekdayFormats, P as getEndDate, R as alignStart, S as getDaysInWeek, T as getMonthNames, U as isDateUnavailable, V as isDateEqual, W as isNextRangeInvalid, X as DateRangePreset, Y as DateGranularity, Z as DateValue, _ as setDate, a as getAdjustedDateFn, b as getYearsRange, c as getNextSection, d as getPreviousSection, f as getSectionEnd, g as setCalendar, h as getTodayDate, i as AdjustDateReturn, j as formatRange, k as getDayFormatter, l as getPreviousPage, m as getPreviousAvailableDate, n as parseDateString, o as getNextPage, p as getSectionStart, q as alignStartDate, r as AdjustDateParams, s as getNextRow, t as getDateRangePreset, u as getPreviousRow, v as YearsRange, w as getMonthDays, x as normalizeYear, y as getDecadeRange, z as constrainStart } from "./index-ClVRyKIt.mjs";
2
+ export { AdjustDateParams, AdjustDateReturn, DateAdjustFn, DateGranularity, DateRangePreset, DateValue, YearsRange, alignCenter, alignDate, alignEnd, alignStart, alignStartDate, constrainStart, constrainValue, formatRange, formatSelectedDate, formatVisibleRange, getAdjustedDateFn, getDateRangePreset, getDayFormatter, getDaysInWeek, getDecadeRange, getEndDate, getEndOfWeek, getMonthDays, getMonthFormatter, getMonthNames, getNextPage, getNextRow, getNextSection, getPreviousAvailableDate, getPreviousPage, getPreviousRow, getPreviousSection, getSectionEnd, getSectionStart, getStartOfWeek, getTodayDate, getUnitDuration, getWeekDays, getWeekdayFormats, getYearsRange, isDateEqual, isDateOutsideRange, isDateUnavailable, isNextRangeInvalid, isPreviousRangeInvalid, normalizeYear, parseDateString, setCalendar, setDate };
@@ -57,7 +57,7 @@ declare const isModifierKey: (e: Pick<KeyboardEvent, "ctrlKey" | "metaKey" | "al
57
57
  declare const isTouchEvent: (event: AnyPointerEvent) => event is TouchEvent;
58
58
  declare function getEventKey(event: Pick<KeyboardEvent, "key">, options?: EventKeyOptions): string;
59
59
  declare function getNativeEvent<E>(event: E): NativeEvent<E>;
60
- declare function getEventStep(event: Pick<KeyboardEvent, "ctrlKey" | "metaKey" | "key" | "shiftKey">): 1 | 10 | 0.1;
60
+ declare function getEventStep(event: Pick<KeyboardEvent, "ctrlKey" | "metaKey" | "key" | "shiftKey">): 1 | 0.1 | 10;
61
61
  declare function getEventPoint(event: any, type?: "page" | "client"): {
62
62
  x: number;
63
63
  y: number;
@@ -57,7 +57,7 @@ declare const isModifierKey: (e: Pick<KeyboardEvent, "ctrlKey" | "metaKey" | "al
57
57
  declare const isTouchEvent: (event: AnyPointerEvent) => event is TouchEvent;
58
58
  declare function getEventKey(event: Pick<KeyboardEvent, "key">, options?: EventKeyOptions): string;
59
59
  declare function getNativeEvent<E>(event: E): NativeEvent<E>;
60
- declare function getEventStep(event: Pick<KeyboardEvent, "ctrlKey" | "metaKey" | "key" | "shiftKey">): 1 | 10 | 0.1;
60
+ declare function getEventStep(event: Pick<KeyboardEvent, "ctrlKey" | "metaKey" | "key" | "shiftKey">): 1 | 0.1 | 10;
61
61
  declare function getEventPoint(event: any, type?: "page" | "client"): {
62
62
  x: number;
63
63
  y: number;
@@ -349,6 +349,57 @@ function getDistance(startDate, endDate) {
349
349
  };
350
350
  }
351
351
  //#endregion
352
+ //#region src/shared/i18n-utils/format-time.ts
353
+ const getTimeFormatter = i18nCache(Intl.DateTimeFormat);
354
+ function splitTimeString(timeString) {
355
+ const [hours = null, minutes = null, seconds = null] = timeString.split(":");
356
+ const parsedHours = hours === null ? null : Number(hours);
357
+ const parsedMinutes = minutes === null ? null : Number(minutes);
358
+ const parsedSeconds = seconds === null ? null : Number(seconds);
359
+ return {
360
+ hours: Number.isNaN(parsedHours) ? null : parsedHours,
361
+ minutes: Number.isNaN(parsedMinutes) ? null : parsedMinutes,
362
+ seconds: Number.isNaN(parsedSeconds) ? null : parsedSeconds
363
+ };
364
+ }
365
+ function getTimeParts(value) {
366
+ if (value instanceof Date) {
367
+ if (Number.isNaN(value.getTime())) return null;
368
+ return {
369
+ date: value,
370
+ hours: value.getHours(),
371
+ minutes: value.getMinutes(),
372
+ seconds: value.getSeconds()
373
+ };
374
+ }
375
+ const { hours, minutes, seconds } = splitTimeString(value);
376
+ if (hours === null || minutes === null) return null;
377
+ if (hours < 0 || hours > 23 || minutes < 0 || minutes > 59) return null;
378
+ if (seconds !== null && (seconds < 0 || seconds > 59)) return null;
379
+ const date = /* @__PURE__ */ new Date(0);
380
+ date.setHours(hours, minutes, seconds ?? 0, 0);
381
+ return {
382
+ date,
383
+ hours,
384
+ minutes,
385
+ seconds: seconds ?? 0
386
+ };
387
+ }
388
+ function formatTime(value, locale, options = {}) {
389
+ const { format = "24h", amPmLabels, withSeconds = false } = options;
390
+ const parts = getTimeParts(value);
391
+ if (!parts) return null;
392
+ const formatter = getTimeFormatter(locale, {
393
+ hour: format === "24h" ? "2-digit" : "numeric",
394
+ minute: "2-digit",
395
+ second: withSeconds ? "2-digit" : void 0,
396
+ hour12: format === "12h"
397
+ });
398
+ if (format !== "12h" || !amPmLabels) return formatter.format(parts.date);
399
+ const isPm = parts.hours >= 12;
400
+ return formatter.formatToParts(parts.date).map((token) => token.type === "dayPeriod" ? isPm ? amPmLabels.pm : amPmLabels.am : token.value).join("");
401
+ }
402
+ //#endregion
352
403
  //#region src/shared/i18n-utils/is-rtl.ts
353
404
  const RTL_SCRIPTS = new Set([
354
405
  "Avst",
@@ -425,4 +476,4 @@ function trackLocale(options = {}) {
425
476
  };
426
477
  }
427
478
  //#endregion
428
- export { formatRelativeTime as a, formatBytes as c, createCollator as d, isRTL as i, formatNumber as l, getDefaultLocale as n, formatList as o, getLocaleDir as r, formatDate as s, trackLocale as t, createFilter as u };
479
+ export { formatTime as a, formatDate as c, createFilter as d, createCollator as f, isRTL as i, formatBytes as l, getDefaultLocale as n, formatRelativeTime as o, getLocaleDir as r, formatList as s, trackLocale as t, formatNumber as u };
@@ -349,6 +349,57 @@ function getDistance(startDate, endDate) {
349
349
  };
350
350
  }
351
351
  //#endregion
352
+ //#region src/shared/i18n-utils/format-time.ts
353
+ const getTimeFormatter = i18nCache(Intl.DateTimeFormat);
354
+ function splitTimeString(timeString) {
355
+ const [hours = null, minutes = null, seconds = null] = timeString.split(":");
356
+ const parsedHours = hours === null ? null : Number(hours);
357
+ const parsedMinutes = minutes === null ? null : Number(minutes);
358
+ const parsedSeconds = seconds === null ? null : Number(seconds);
359
+ return {
360
+ hours: Number.isNaN(parsedHours) ? null : parsedHours,
361
+ minutes: Number.isNaN(parsedMinutes) ? null : parsedMinutes,
362
+ seconds: Number.isNaN(parsedSeconds) ? null : parsedSeconds
363
+ };
364
+ }
365
+ function getTimeParts(value) {
366
+ if (value instanceof Date) {
367
+ if (Number.isNaN(value.getTime())) return null;
368
+ return {
369
+ date: value,
370
+ hours: value.getHours(),
371
+ minutes: value.getMinutes(),
372
+ seconds: value.getSeconds()
373
+ };
374
+ }
375
+ const { hours, minutes, seconds } = splitTimeString(value);
376
+ if (hours === null || minutes === null) return null;
377
+ if (hours < 0 || hours > 23 || minutes < 0 || minutes > 59) return null;
378
+ if (seconds !== null && (seconds < 0 || seconds > 59)) return null;
379
+ const date = /* @__PURE__ */ new Date(0);
380
+ date.setHours(hours, minutes, seconds ?? 0, 0);
381
+ return {
382
+ date,
383
+ hours,
384
+ minutes,
385
+ seconds: seconds ?? 0
386
+ };
387
+ }
388
+ function formatTime(value, locale, options = {}) {
389
+ const { format = "24h", amPmLabels, withSeconds = false } = options;
390
+ const parts = getTimeParts(value);
391
+ if (!parts) return null;
392
+ const formatter = getTimeFormatter(locale, {
393
+ hour: format === "24h" ? "2-digit" : "numeric",
394
+ minute: "2-digit",
395
+ second: withSeconds ? "2-digit" : void 0,
396
+ hour12: format === "12h"
397
+ });
398
+ if (format !== "12h" || !amPmLabels) return formatter.format(parts.date);
399
+ const isPm = parts.hours >= 12;
400
+ return formatter.formatToParts(parts.date).map((token) => token.type === "dayPeriod" ? isPm ? amPmLabels.pm : amPmLabels.am : token.value).join("");
401
+ }
402
+ //#endregion
352
403
  //#region src/shared/i18n-utils/is-rtl.ts
353
404
  const RTL_SCRIPTS = new Set([
354
405
  "Avst",
@@ -467,6 +518,12 @@ Object.defineProperty(exports, "formatRelativeTime", {
467
518
  return formatRelativeTime;
468
519
  }
469
520
  });
521
+ Object.defineProperty(exports, "formatTime", {
522
+ enumerable: true,
523
+ get: function() {
524
+ return formatTime;
525
+ }
526
+ });
470
527
  Object.defineProperty(exports, "getDefaultLocale", {
471
528
  enumerable: true,
472
529
  get: function() {
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  require("./dom-query-6Wt-Tikf.cjs");
3
- const require_i18n_utils = require("./i18n-utils-Dm8cGCol.cjs");
3
+ const require_i18n_utils = require("./i18n-utils-bHwTSOWi.cjs");
4
4
  exports.createCollator = require_i18n_utils.createCollator;
5
5
  exports.createFilter = require_i18n_utils.createFilter;
6
6
  exports.formatBytes = require_i18n_utils.formatBytes;
@@ -8,6 +8,7 @@ exports.formatDate = require_i18n_utils.formatDate;
8
8
  exports.formatList = require_i18n_utils.formatList;
9
9
  exports.formatNumber = require_i18n_utils.formatNumber;
10
10
  exports.formatRelativeTime = require_i18n_utils.formatRelativeTime;
11
+ exports.formatTime = require_i18n_utils.formatTime;
11
12
  exports.getDefaultLocale = require_i18n_utils.getDefaultLocale;
12
13
  exports.getLocaleDir = require_i18n_utils.getLocaleDir;
13
14
  exports.isRTL = require_i18n_utils.isRTL;
@@ -33,6 +33,19 @@ declare function formatNumber(v: number, locale: string, options?: Intl.NumberFo
33
33
  //#region src/shared/i18n-utils/format-relative-time.d.ts
34
34
  declare function formatRelativeTime(value: Date, locale: string, options?: Intl.RelativeTimeFormatOptions): string;
35
35
  //#endregion
36
+ //#region src/shared/i18n-utils/format-time.d.ts
37
+ type TimeFormat = "12h" | "24h";
38
+ interface AmPmLabels {
39
+ am: string;
40
+ pm: string;
41
+ }
42
+ interface FormatTimeOptions {
43
+ format?: TimeFormat;
44
+ amPmLabels?: AmPmLabels;
45
+ withSeconds?: boolean;
46
+ }
47
+ declare function formatTime(value: string | Date, locale: string, options?: FormatTimeOptions): string | null;
48
+ //#endregion
36
49
  //#region src/shared/i18n-utils/is-rtl.d.ts
37
50
  declare function isRTL(locale: string): boolean;
38
51
  declare function getLocaleDir(locale: string): "ltr" | "rtl";
@@ -58,4 +71,4 @@ interface LocaleOptions {
58
71
  }
59
72
  declare function trackLocale(options?: LocaleOptions): () => void;
60
73
  //#endregion
61
- export { FilterOptions, FilterReturn, FormatBytesOptions, type Locale, type LocaleOptions, createCollator, createFilter, formatBytes, formatDate, formatList, formatNumber, formatRelativeTime, getDefaultLocale, getLocaleDir, isRTL, trackLocale };
74
+ export { AmPmLabels, FilterOptions, FilterReturn, FormatBytesOptions, FormatTimeOptions, type Locale, type LocaleOptions, TimeFormat, createCollator, createFilter, formatBytes, formatDate, formatList, formatNumber, formatRelativeTime, formatTime, getDefaultLocale, getLocaleDir, isRTL, trackLocale };
@@ -33,6 +33,19 @@ declare function formatNumber(v: number, locale: string, options?: Intl.NumberFo
33
33
  //#region src/shared/i18n-utils/format-relative-time.d.ts
34
34
  declare function formatRelativeTime(value: Date, locale: string, options?: Intl.RelativeTimeFormatOptions): string;
35
35
  //#endregion
36
+ //#region src/shared/i18n-utils/format-time.d.ts
37
+ type TimeFormat = "12h" | "24h";
38
+ interface AmPmLabels {
39
+ am: string;
40
+ pm: string;
41
+ }
42
+ interface FormatTimeOptions {
43
+ format?: TimeFormat;
44
+ amPmLabels?: AmPmLabels;
45
+ withSeconds?: boolean;
46
+ }
47
+ declare function formatTime(value: string | Date, locale: string, options?: FormatTimeOptions): string | null;
48
+ //#endregion
36
49
  //#region src/shared/i18n-utils/is-rtl.d.ts
37
50
  declare function isRTL(locale: string): boolean;
38
51
  declare function getLocaleDir(locale: string): "ltr" | "rtl";
@@ -58,4 +71,4 @@ interface LocaleOptions {
58
71
  }
59
72
  declare function trackLocale(options?: LocaleOptions): () => void;
60
73
  //#endregion
61
- export { FilterOptions, FilterReturn, FormatBytesOptions, type Locale, type LocaleOptions, createCollator, createFilter, formatBytes, formatDate, formatList, formatNumber, formatRelativeTime, getDefaultLocale, getLocaleDir, isRTL, trackLocale };
74
+ export { AmPmLabels, FilterOptions, FilterReturn, FormatBytesOptions, FormatTimeOptions, type Locale, type LocaleOptions, TimeFormat, createCollator, createFilter, formatBytes, formatDate, formatList, formatNumber, formatRelativeTime, formatTime, getDefaultLocale, getLocaleDir, isRTL, trackLocale };
@@ -1,3 +1,3 @@
1
1
  import "./dom-query-dX8Dakb4.mjs";
2
- import { a as formatRelativeTime, c as formatBytes, d as createCollator, i as isRTL, l as formatNumber, n as getDefaultLocale, o as formatList, r as getLocaleDir, s as formatDate, t as trackLocale, u as createFilter } from "./i18n-utils-DHGN_KCY.mjs";
3
- export { createCollator, createFilter, formatBytes, formatDate, formatList, formatNumber, formatRelativeTime, getDefaultLocale, getLocaleDir, isRTL, trackLocale };
2
+ import { a as formatTime, c as formatDate, d as createFilter, f as createCollator, i as isRTL, l as formatBytes, n as getDefaultLocale, o as formatRelativeTime, r as getLocaleDir, s as formatList, t as trackLocale, u as formatNumber } from "./i18n-utils-BsXTdcWB.mjs";
3
+ export { createCollator, createFilter, formatBytes, formatDate, formatList, formatNumber, formatRelativeTime, formatTime, getDefaultLocale, getLocaleDir, isRTL, trackLocale };
@@ -1,30 +1,31 @@
1
1
  import * as _internationalized_date0 from "@internationalized/date";
2
- import { Calendar, DateDuration, DateFormatter, DateValue } from "@internationalized/date";
2
+ import { Calendar, CalendarDate, CalendarDateTime, DateDuration, DateFormatter, DateValue, ZonedDateTime } from "@internationalized/date";
3
3
 
4
4
  //#region src/shared/date-utils/types.d.ts
5
+ type DateValue$1 = CalendarDate | CalendarDateTime | ZonedDateTime;
5
6
  type DateGranularity = "day" | "hour" | "minute" | "second" | "year" | "month";
6
7
  type DateAlignment = "start" | "end" | "center";
7
- type DateAvailableFn = (date: DateValue, locale: string) => boolean;
8
+ type DateAvailableFn = (date: DateValue$1, locale: string) => boolean;
8
9
  type DateAdjustFn = (options: {
9
- startDate: DateValue;
10
- focusedDate: DateValue;
10
+ startDate: DateValue$1;
11
+ focusedDate: DateValue$1;
11
12
  }) => {
12
- startDate: DateValue;
13
- focusedDate: DateValue;
14
- endDate: DateValue;
13
+ startDate: DateValue$1;
14
+ focusedDate: DateValue$1;
15
+ endDate: DateValue$1;
15
16
  };
16
17
  type DateRangePreset = "thisWeek" | "lastWeek" | "thisMonth" | "lastMonth" | "thisQuarter" | "lastQuarter" | "thisYear" | "lastYear" | "last3Days" | "last7Days" | "last14Days" | "last30Days" | "last90Days";
17
18
  //#endregion
18
19
  //#region src/shared/date-utils/align.d.ts
19
- declare function alignDate(date: DateValue, alignment: DateAlignment, duration: DateDuration, locale: string, min?: DateValue | undefined, max?: DateValue | undefined): DateValue;
20
- declare function alignStartDate(date: DateValue, startDate: DateValue, endDate: DateValue, duration: DateDuration, locale: string, min?: DateValue | undefined, max?: DateValue | undefined): DateValue;
20
+ declare function alignDate(date: DateValue$1, alignment: DateAlignment, duration: DateDuration, locale: string, min?: DateValue$1 | undefined, max?: DateValue$1 | undefined): _internationalized_date0.DateValue;
21
+ declare function alignStartDate(date: DateValue$1, startDate: DateValue$1, endDate: DateValue$1, duration: DateDuration, locale: string, min?: DateValue$1 | undefined, max?: DateValue$1 | undefined): _internationalized_date0.CalendarDate | _internationalized_date0.CalendarDateTime | _internationalized_date0.ZonedDateTime;
21
22
  //#endregion
22
23
  //#region src/shared/date-utils/assertion.d.ts
23
- declare function isDateEqual(dateA: DateValue | null | undefined, dateB?: DateValue | null): boolean;
24
- declare function isDateUnavailable(date: DateValue | null, isUnavailable: DateAvailableFn | undefined, locale: string, minValue?: DateValue | null, maxValue?: DateValue | null): boolean;
25
- declare function isDateOutsideRange(date: DateValue, startDate?: DateValue | null, endDate?: DateValue | null): boolean;
26
- declare function isPreviousRangeInvalid(startDate: DateValue, minValue?: DateValue | null, maxValue?: DateValue | null): boolean;
27
- declare function isNextRangeInvalid(endDate: DateValue, minValue?: DateValue | null, maxValue?: DateValue | null): boolean;
24
+ declare function isDateEqual(dateA: DateValue$1 | null | undefined, dateB?: DateValue$1 | null): boolean;
25
+ declare function isDateUnavailable(date: DateValue$1 | null, isUnavailable: DateAvailableFn | undefined, locale: string, minValue?: DateValue$1 | null, maxValue?: DateValue$1 | null): boolean;
26
+ declare function isDateOutsideRange(date: DateValue$1, startDate?: DateValue$1 | null, endDate?: DateValue$1 | null): boolean;
27
+ declare function isPreviousRangeInvalid(startDate: DateValue$1, minValue?: DateValue$1 | null, maxValue?: DateValue$1 | null): boolean;
28
+ declare function isNextRangeInvalid(endDate: DateValue$1, minValue?: DateValue$1 | null, maxValue?: DateValue$1 | null): boolean;
28
29
  //#endregion
29
30
  //#region src/shared/date-utils/constrain.d.ts
30
31
  declare function alignCenter(date: DateValue, duration: DateDuration, locale: string, min?: DateValue, max?: DateValue): DateValue;
@@ -40,12 +41,12 @@ declare function getUnitDuration(duration: DateDuration): {
40
41
  weeks?: number;
41
42
  days?: number;
42
43
  };
43
- declare function getEndDate(startDate: DateValue, duration: DateDuration): _internationalized_date0.CalendarDate | _internationalized_date0.CalendarDateTime | _internationalized_date0.ZonedDateTime;
44
+ declare function getEndDate(startDate: DateValue$1, duration: DateDuration): _internationalized_date0.CalendarDate | _internationalized_date0.CalendarDateTime | _internationalized_date0.ZonedDateTime;
44
45
  //#endregion
45
46
  //#region src/shared/date-utils/format.d.ts
46
- declare function formatRange(startDate: DateValue, endDate: DateValue, formatter: DateFormatter, toString: (start: string, end: string) => string, timeZone: string): string;
47
- declare function formatSelectedDate(startDate: DateValue | null | undefined, endDate: DateValue | null, locale: string, timeZone: string): string;
48
- declare function formatVisibleRange(startDate: DateValue, endDate: DateValue | null, locale: string, timeZone: string): string;
47
+ declare function formatRange(startDate: DateValue$1, endDate: DateValue$1, formatter: DateFormatter, toString: (start: string, end: string) => string, timeZone: string): string;
48
+ declare function formatSelectedDate(startDate: DateValue$1 | null | undefined, endDate: DateValue$1 | null, locale: string, timeZone: string): string;
49
+ declare function formatVisibleRange(startDate: DateValue$1, endDate: DateValue$1 | null, locale: string, timeZone: string): string;
49
50
  //#endregion
50
51
  //#region src/shared/date-utils/formatter.d.ts
51
52
  declare function getDayFormatter(locale: string, timeZone: string): DateFormatter;
@@ -89,26 +90,26 @@ declare function getPreviousAvailableDate(date: DateValue, minValue: DateValue,
89
90
  //#endregion
90
91
  //#region src/shared/date-utils/pagination.d.ts
91
92
  interface AdjustDateParams {
92
- startDate: DateValue;
93
- focusedDate: DateValue;
93
+ startDate: DateValue$1;
94
+ focusedDate: DateValue$1;
94
95
  }
95
96
  interface AdjustDateReturn extends AdjustDateParams {
96
- endDate: DateValue;
97
+ endDate: DateValue$1;
97
98
  }
98
- declare function getAdjustedDateFn(visibleDuration: DateDuration, locale: string, minValue?: DateValue, maxValue?: DateValue): (options: AdjustDateParams) => AdjustDateReturn;
99
- declare function getNextPage(focusedDate: DateValue, startDate: DateValue, visibleDuration: DateDuration, locale: string, minValue?: DateValue, maxValue?: DateValue): AdjustDateReturn;
100
- declare function getPreviousPage(focusedDate: DateValue, startDate: DateValue, visibleDuration: DateDuration, locale: string, minValue?: DateValue, maxValue?: DateValue): AdjustDateReturn;
101
- declare function getNextRow(focusedDate: DateValue, startDate: DateValue, visibleDuration: DateDuration, locale: string, minValue?: DateValue, maxValue?: DateValue): AdjustDateReturn | undefined;
102
- declare function getPreviousRow(focusedDate: DateValue, startDate: DateValue, visibleDuration: DateDuration, locale: string, minValue?: DateValue, maxValue?: DateValue): AdjustDateReturn | undefined;
103
- declare function getSectionStart(focusedDate: DateValue, startDate: DateValue, visibleDuration: DateDuration, locale: string, minValue?: DateValue, maxValue?: DateValue): AdjustDateReturn | undefined;
104
- declare function getSectionEnd(focusedDate: DateValue, startDate: DateValue, visibleDuration: DateDuration, locale: string, minValue?: DateValue, maxValue?: DateValue): AdjustDateReturn | undefined;
105
- declare function getNextSection(focusedDate: DateValue, startDate: DateValue, larger: boolean, visibleDuration: DateDuration, locale: string, minValue?: DateValue, maxValue?: DateValue): AdjustDateReturn | undefined;
106
- declare function getPreviousSection(focusedDate: DateValue, startDate: DateValue, larger: boolean, visibleDuration: DateDuration, locale: string, minValue?: DateValue, maxValue?: DateValue): AdjustDateReturn | undefined;
99
+ declare function getAdjustedDateFn(visibleDuration: DateDuration, locale: string, minValue?: DateValue$1, maxValue?: DateValue$1): (options: AdjustDateParams) => AdjustDateReturn;
100
+ declare function getNextPage(focusedDate: DateValue$1, startDate: DateValue$1, visibleDuration: DateDuration, locale: string, minValue?: DateValue$1, maxValue?: DateValue$1): AdjustDateReturn;
101
+ declare function getPreviousPage(focusedDate: DateValue$1, startDate: DateValue$1, visibleDuration: DateDuration, locale: string, minValue?: DateValue$1, maxValue?: DateValue$1): AdjustDateReturn;
102
+ declare function getNextRow(focusedDate: DateValue$1, startDate: DateValue$1, visibleDuration: DateDuration, locale: string, minValue?: DateValue$1, maxValue?: DateValue$1): AdjustDateReturn | undefined;
103
+ declare function getPreviousRow(focusedDate: DateValue$1, startDate: DateValue$1, visibleDuration: DateDuration, locale: string, minValue?: DateValue$1, maxValue?: DateValue$1): AdjustDateReturn | undefined;
104
+ declare function getSectionStart(focusedDate: DateValue$1, startDate: DateValue$1, visibleDuration: DateDuration, locale: string, minValue?: DateValue$1, maxValue?: DateValue$1): AdjustDateReturn | undefined;
105
+ declare function getSectionEnd(focusedDate: DateValue$1, startDate: DateValue$1, visibleDuration: DateDuration, locale: string, minValue?: DateValue$1, maxValue?: DateValue$1): AdjustDateReturn | undefined;
106
+ declare function getNextSection(focusedDate: DateValue$1, startDate: DateValue$1, larger: boolean, visibleDuration: DateDuration, locale: string, minValue?: DateValue$1, maxValue?: DateValue$1): AdjustDateReturn | undefined;
107
+ declare function getPreviousSection(focusedDate: DateValue$1, startDate: DateValue$1, larger: boolean, visibleDuration: DateDuration, locale: string, minValue?: DateValue$1, maxValue?: DateValue$1): AdjustDateReturn | undefined;
107
108
  //#endregion
108
109
  //#region src/shared/date-utils/parse-date.d.ts
109
- declare function parseDateString(date: string, locale: string, timeZone: string): DateValue | undefined;
110
+ declare function parseDateString(date: string, locale: string, timeZone: string): DateValue$1 | undefined;
110
111
  //#endregion
111
112
  //#region src/shared/date-utils/preset.d.ts
112
113
  declare function getDateRangePreset(preset: DateRangePreset, locale: string, timeZone: string): [DateValue, DateValue];
113
114
  //#endregion
114
- export { getMonthFormatter as A, constrainValue as B, getEndOfWeek as C, getWeekDays as D, getStartOfWeek as E, getUnitDuration as F, isPreviousRangeInvalid as G, isDateOutsideRange as H, alignCenter as I, DateAdjustFn as J, alignDate as K, alignEnd as L, formatSelectedDate as M, formatVisibleRange as N, getWeekdayFormats as O, getEndDate as P, alignStart as R, getDaysInWeek as S, getMonthNames as T, isDateUnavailable as U, isDateEqual as V, isNextRangeInvalid as W, DateRangePreset as X, DateGranularity as Y, setDate as _, getAdjustedDateFn as a, getYearsRange as b, getNextSection as c, getPreviousSection as d, getSectionEnd as f, setCalendar as g, getTodayDate as h, AdjustDateReturn as i, formatRange as j, getDayFormatter as k, getPreviousPage as l, getPreviousAvailableDate as m, parseDateString as n, getNextPage as o, getSectionStart as p, alignStartDate as q, AdjustDateParams as r, getNextRow as s, getDateRangePreset as t, getPreviousRow as u, YearsRange as v, getMonthDays as w, normalizeYear as x, getDecadeRange as y, constrainStart as z };
115
+ export { getMonthFormatter as A, constrainValue as B, getEndOfWeek as C, getWeekDays as D, getStartOfWeek as E, getUnitDuration as F, isPreviousRangeInvalid as G, isDateOutsideRange as H, alignCenter as I, DateAdjustFn as J, alignDate as K, alignEnd as L, formatSelectedDate as M, formatVisibleRange as N, getWeekdayFormats as O, getEndDate as P, alignStart as R, getDaysInWeek as S, getMonthNames as T, isDateUnavailable as U, isDateEqual as V, isNextRangeInvalid as W, DateRangePreset as X, DateGranularity as Y, DateValue$1 as Z, setDate as _, getAdjustedDateFn as a, getYearsRange as b, getNextSection as c, getPreviousSection as d, getSectionEnd as f, setCalendar as g, getTodayDate as h, AdjustDateReturn as i, formatRange as j, getDayFormatter as k, getPreviousPage as l, getPreviousAvailableDate as m, parseDateString as n, getNextPage as o, getSectionStart as p, alignStartDate as q, AdjustDateParams as r, getNextRow as s, getDateRangePreset as t, getPreviousRow as u, YearsRange as v, getMonthDays as w, normalizeYear as x, getDecadeRange as y, constrainStart as z };
@@ -95,7 +95,7 @@ declare function getPlacementStyles(options?: Pick<PositioningOptions, "placemen
95
95
  readonly zIndex: "inherit";
96
96
  };
97
97
  floating: {
98
- readonly position: "fixed" | "absolute";
98
+ readonly position: "absolute" | "fixed";
99
99
  readonly isolation: "isolate";
100
100
  readonly minWidth: "max-content" | undefined;
101
101
  readonly width: "var(--reference-width)" | undefined;
@@ -46,7 +46,7 @@ declare class ListCollection<T extends CollectionItem = CollectionItem> {
46
46
  moveBefore: (value: string, ...values: string[]) => ListCollection<T>;
47
47
  moveAfter: (value: string, ...values: string[]) => ListCollection<T>;
48
48
  reorder: (fromIndex: number, toIndex: number) => ListCollection<T>;
49
- compareValue: (a: string, b: string) => 0 | 1 | -1;
49
+ compareValue: (a: string, b: string) => 1 | -1 | 0;
50
50
  private range;
51
51
  getValueRange: (from: string | null, to: string | null) => string[];
52
52
  toString: () => string;
@@ -46,7 +46,7 @@ declare class ListCollection<T extends CollectionItem = CollectionItem> {
46
46
  moveBefore: (value: string, ...values: string[]) => ListCollection<T>;
47
47
  moveAfter: (value: string, ...values: string[]) => ListCollection<T>;
48
48
  reorder: (fromIndex: number, toIndex: number) => ListCollection<T>;
49
- compareValue: (a: string, b: string) => 0 | 1 | -1;
49
+ compareValue: (a: string, b: string) => 1 | -1 | 0;
50
50
  private range;
51
51
  getValueRange: (from: string | null, to: string | null) => string[];
52
52
  toString: () => string;
@@ -3,7 +3,7 @@ import { p as Machine, u as EventObject, y as Service } from "../../types-B24gMT
3
3
  import { b as NormalizeProps, g as RequiredBy, r as DirectionProperty, t as CommonProperties, x as PropTypes } from "../../index-CLRsezW5.cjs";
4
4
 
5
5
  //#region src/machines/accordion/accordion.anatomy.d.ts
6
- declare const anatomy: AnatomyInstance<"root" | "item" | "itemIndicator" | "itemTrigger" | "itemContent">;
6
+ declare const anatomy: AnatomyInstance<"root" | "item" | "itemIndicator" | "itemContent" | "itemTrigger">;
7
7
  //#endregion
8
8
  //#region src/machines/accordion/accordion.types.d.ts
9
9
  interface ValueChangeDetails {