smoothly 0.1.77 → 0.1.81

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 (220) hide show
  1. package/dist/cjs/{App-eff713bd.js → App-ffc56e72.js} +1 -1
  2. package/dist/cjs/{Notice-e43922ea.js → Notice-9120d311.js} +1 -1
  3. package/dist/cjs/{css-shim-e3f30f9a.js → css-shim-88cc6900.js} +1 -1
  4. package/dist/cjs/{dom-c8b6d1a7.js → dom-95afd968.js} +1 -1
  5. package/dist/cjs/{generate-7f7f7d99.js → generate-14aca5d2.js} +1 -1
  6. package/dist/cjs/{index-b7e6a72c.js → index-138c41c2.js} +342 -147
  7. package/dist/cjs/{index-5537d93a.js → index-41a36ce2.js} +154 -88
  8. package/dist/cjs/{index-7c9d0102.js → index-42db74b3.js} +2 -2
  9. package/dist/cjs/{index-c973259c.js → index-de5d1ee1.js} +10 -7
  10. package/dist/cjs/{index-e37f73fe.js → index-fc82954f.js} +311 -12
  11. package/dist/cjs/index.cjs.js +3 -3
  12. package/dist/cjs/loader.cjs.js +4 -4
  13. package/dist/cjs/{shadow-css-6cbb23a9.js → shadow-css-71d0f821.js} +12 -6
  14. package/dist/cjs/smoothly-accordion-item.cjs.entry.js +2 -2
  15. package/dist/cjs/smoothly-accordion.cjs.entry.js +2 -2
  16. package/dist/cjs/{smoothly-accordion_46.cjs.entry.js → smoothly-accordion_47.cjs.entry.js} +7965 -2493
  17. package/dist/cjs/smoothly-app-demo.cjs.entry.js +3 -3
  18. package/dist/cjs/smoothly-app.cjs.entry.js +2 -2
  19. package/dist/cjs/smoothly-calendar.cjs.entry.js +4 -4
  20. package/dist/cjs/smoothly-checkbox.cjs.entry.js +5707 -504
  21. package/dist/cjs/smoothly-dialog-demo.cjs.entry.js +2 -2
  22. package/dist/cjs/smoothly-dialog.cjs.entry.js +3 -3
  23. package/dist/cjs/smoothly-display-amount.cjs.entry.js +3 -3
  24. package/dist/cjs/smoothly-display-date-time.cjs.entry.js +2 -2
  25. package/dist/cjs/smoothly-display-demo.cjs.entry.js +4 -4
  26. package/dist/cjs/smoothly-display.cjs.entry.js +3 -3
  27. package/dist/cjs/smoothly-frame.cjs.entry.js +3 -3
  28. package/dist/cjs/smoothly-icon-demo.cjs.entry.js +2 -2
  29. package/dist/cjs/smoothly-icon.cjs.entry.js +2 -2
  30. package/dist/cjs/smoothly-input-date-range.cjs.entry.js +3 -3
  31. package/dist/cjs/smoothly-input-date.cjs.entry.js +3 -3
  32. package/dist/cjs/smoothly-input-demo.cjs.entry.js +2 -2
  33. package/dist/cjs/smoothly-input-month.cjs.entry.js +4 -4
  34. package/dist/cjs/smoothly-input.cjs.entry.js +19 -12
  35. package/dist/cjs/smoothly-item.cjs.entry.js +6 -2
  36. package/dist/cjs/smoothly-menu-options.cjs.entry.js +2 -2
  37. package/dist/cjs/smoothly-notification.cjs.entry.js +2 -2
  38. package/dist/cjs/smoothly-notifier.cjs.entry.js +2 -2
  39. package/dist/cjs/smoothly-option.cjs.entry.js +2 -2
  40. package/dist/cjs/smoothly-picker.cjs.entry.js +2 -2
  41. package/dist/cjs/smoothly-popup.cjs.entry.js +2 -2
  42. package/dist/cjs/smoothly-quiet.cjs.entry.js +19 -0
  43. package/dist/cjs/smoothly-radio-group.cjs.entry.js +2 -2
  44. package/dist/cjs/smoothly-radio.cjs.entry.js +2 -2
  45. package/dist/cjs/smoothly-reorder.cjs.entry.js +2 -2
  46. package/dist/cjs/smoothly-room.cjs.entry.js +2 -2
  47. package/dist/cjs/smoothly-select-demo.cjs.entry.js +2 -2
  48. package/dist/cjs/smoothly-select.cjs.entry.js +2 -2
  49. package/dist/cjs/smoothly-selector.cjs.entry.js +2 -2
  50. package/dist/cjs/smoothly-spinner.cjs.entry.js +2 -2
  51. package/dist/cjs/smoothly-submit.cjs.entry.js +2 -2
  52. package/dist/cjs/smoothly-tab-switch.cjs.entry.js +2 -2
  53. package/dist/cjs/smoothly-tab.cjs.entry.js +2 -2
  54. package/dist/cjs/smoothly-table-cell.cjs.entry.js +2 -2
  55. package/dist/cjs/smoothly-table-demo.cjs.entry.js +2 -2
  56. package/dist/cjs/smoothly-table-expandable-cell.cjs.entry.js +2 -2
  57. package/dist/cjs/smoothly-table-expandable-row.cjs.entry.js +2 -2
  58. package/dist/cjs/smoothly-table-header.cjs.entry.js +2 -2
  59. package/dist/cjs/smoothly-table-row.cjs.entry.js +2 -2
  60. package/dist/cjs/smoothly-table.cjs.entry.js +2 -2
  61. package/dist/cjs/smoothly-trigger-sink.cjs.entry.js +3 -3
  62. package/dist/cjs/smoothly-trigger-source.cjs.entry.js +3 -3
  63. package/dist/cjs/smoothly-trigger.cjs.entry.js +2 -2
  64. package/dist/cjs/smoothly-tuple.cjs.entry.js +2 -2
  65. package/dist/cjs/smoothly-urlencoded.cjs.entry.js +2 -2
  66. package/dist/cjs/smoothly.cjs.js +10 -7
  67. package/dist/collection/collection-manifest.json +3 -2
  68. package/dist/collection/components/display-demo/index.js +4 -1
  69. package/dist/collection/components/input/index.js +16 -9
  70. package/dist/collection/components/item/index.js +4 -0
  71. package/dist/collection/components/quiet/index.js +34 -0
  72. package/dist/collection/components/quiet/style.css +3 -0
  73. package/dist/custom-elements/index.d.ts +6 -0
  74. package/dist/custom-elements/index.js +8186 -2655
  75. package/dist/{smoothly/App-bf78807d.js → esm/App-c5f6000f.js} +1 -1
  76. package/dist/esm/{Notice-966edc54.js → Notice-d87d90f7.js} +1 -1
  77. package/dist/esm/{css-shim-003e9264.js → css-shim-c64026cd.js} +1 -1
  78. package/dist/esm/{dom-1b195079.js → dom-a712b575.js} +1 -1
  79. package/dist/esm/{generate-7090dc14.js → generate-be25a8d1.js} +1 -1
  80. package/dist/esm/{index-0dd5f791.js → index-02a70ac1.js} +342 -147
  81. package/dist/{smoothly/index-01fedb5b.js → esm/index-36a04e8c.js} +2 -2
  82. package/dist/esm/{index-531e2f06.js → index-68492ed9.js} +10 -7
  83. package/dist/{smoothly/index-13251390.js → esm/index-a28d88cf.js} +311 -12
  84. package/dist/esm/{index-9d550804.js → index-dcb2b612.js} +154 -88
  85. package/dist/esm/index.js +3 -3
  86. package/dist/esm/loader.js +4 -4
  87. package/dist/esm/{shadow-css-c1ad5fdc.js → shadow-css-1e16431b.js} +12 -6
  88. package/dist/esm/smoothly-accordion-item.entry.js +2 -2
  89. package/dist/esm/smoothly-accordion.entry.js +2 -2
  90. package/dist/esm/{smoothly-accordion_46.entry.js → smoothly-accordion_47.entry.js} +7965 -2494
  91. package/dist/esm/smoothly-app-demo.entry.js +3 -3
  92. package/dist/esm/smoothly-app.entry.js +2 -2
  93. package/dist/esm/smoothly-calendar.entry.js +4 -4
  94. package/dist/esm/smoothly-checkbox.entry.js +5703 -500
  95. package/dist/esm/smoothly-dialog-demo.entry.js +2 -2
  96. package/dist/esm/smoothly-dialog.entry.js +3 -3
  97. package/dist/esm/smoothly-display-amount.entry.js +3 -3
  98. package/dist/esm/smoothly-display-date-time.entry.js +2 -2
  99. package/dist/esm/smoothly-display-demo.entry.js +4 -4
  100. package/dist/esm/smoothly-display.entry.js +3 -3
  101. package/dist/esm/smoothly-frame.entry.js +3 -3
  102. package/dist/esm/smoothly-icon-demo.entry.js +2 -2
  103. package/dist/esm/smoothly-icon.entry.js +2 -2
  104. package/dist/esm/smoothly-input-date-range.entry.js +3 -3
  105. package/dist/esm/smoothly-input-date.entry.js +3 -3
  106. package/dist/esm/smoothly-input-demo.entry.js +2 -2
  107. package/dist/esm/smoothly-input-month.entry.js +4 -4
  108. package/dist/esm/smoothly-input.entry.js +19 -12
  109. package/dist/esm/smoothly-item.entry.js +6 -2
  110. package/dist/esm/smoothly-menu-options.entry.js +2 -2
  111. package/dist/esm/smoothly-notification.entry.js +2 -2
  112. package/dist/esm/smoothly-notifier.entry.js +2 -2
  113. package/dist/esm/smoothly-option.entry.js +2 -2
  114. package/dist/esm/smoothly-picker.entry.js +2 -2
  115. package/dist/esm/smoothly-popup.entry.js +2 -2
  116. package/dist/esm/smoothly-quiet.entry.js +15 -0
  117. package/dist/esm/smoothly-radio-group.entry.js +2 -2
  118. package/dist/esm/smoothly-radio.entry.js +2 -2
  119. package/dist/esm/smoothly-reorder.entry.js +2 -2
  120. package/dist/esm/smoothly-room.entry.js +2 -2
  121. package/dist/esm/smoothly-select-demo.entry.js +2 -2
  122. package/dist/esm/smoothly-select.entry.js +2 -2
  123. package/dist/esm/smoothly-selector.entry.js +2 -2
  124. package/dist/esm/smoothly-spinner.entry.js +2 -2
  125. package/dist/esm/smoothly-submit.entry.js +2 -2
  126. package/dist/esm/smoothly-tab-switch.entry.js +2 -2
  127. package/dist/esm/smoothly-tab.entry.js +2 -2
  128. package/dist/esm/smoothly-table-cell.entry.js +2 -2
  129. package/dist/esm/smoothly-table-demo.entry.js +2 -2
  130. package/dist/esm/smoothly-table-expandable-cell.entry.js +2 -2
  131. package/dist/esm/smoothly-table-expandable-row.entry.js +2 -2
  132. package/dist/esm/smoothly-table-header.entry.js +2 -2
  133. package/dist/esm/smoothly-table-row.entry.js +2 -2
  134. package/dist/esm/smoothly-table.entry.js +2 -2
  135. package/dist/esm/smoothly-trigger-sink.entry.js +3 -3
  136. package/dist/esm/smoothly-trigger-source.entry.js +3 -3
  137. package/dist/esm/smoothly-trigger.entry.js +2 -2
  138. package/dist/esm/smoothly-tuple.entry.js +2 -2
  139. package/dist/esm/smoothly-urlencoded.entry.js +2 -2
  140. package/dist/esm/smoothly.js +10 -7
  141. package/dist/{esm/App-bf78807d.js → smoothly/App-c5f6000f.js} +1 -1
  142. package/dist/smoothly/{css-shim-003e9264.js → css-shim-c64026cd.js} +1 -1
  143. package/dist/smoothly/{dom-1b195079.js → dom-a712b575.js} +1 -1
  144. package/dist/smoothly/{generate-7090dc14.js → generate-be25a8d1.js} +1 -1
  145. package/dist/smoothly/{index-0dd5f791.js → index-02a70ac1.js} +342 -147
  146. package/dist/{esm/index-01fedb5b.js → smoothly/index-36a04e8c.js} +2 -2
  147. package/dist/smoothly/{index-531e2f06.js → index-68492ed9.js} +10 -7
  148. package/dist/{esm/index-13251390.js → smoothly/index-a28d88cf.js} +311 -12
  149. package/dist/smoothly/index.esm.js +3 -3
  150. package/dist/smoothly/{p-0906d4b2.js → p-074a0448.js} +1 -1
  151. package/dist/smoothly/p-09d633f8.entry.js +1 -0
  152. package/dist/smoothly/p-0c1e9588.entry.js +1 -0
  153. package/dist/smoothly/p-1a81597b.entry.js +1 -0
  154. package/dist/smoothly/{p-7f5dd95f.js → p-1e768876.js} +1 -1
  155. package/dist/smoothly/p-9fa3ab06.entry.js +1 -0
  156. package/dist/smoothly/p-c9d01e9b.entry.js +1 -0
  157. package/dist/smoothly/{shadow-css-c1ad5fdc.js → shadow-css-1e16431b.js} +12 -6
  158. package/dist/smoothly/smoothly-accordion-item.entry.js +2 -2
  159. package/dist/smoothly/smoothly-accordion.entry.js +2 -2
  160. package/dist/smoothly/smoothly-app-demo.entry.js +3 -3
  161. package/dist/smoothly/smoothly-app.entry.js +2 -2
  162. package/dist/smoothly/smoothly-calendar.entry.js +4 -4
  163. package/dist/smoothly/smoothly-checkbox.entry.js +5703 -500
  164. package/dist/smoothly/smoothly-dialog-demo.entry.js +2 -2
  165. package/dist/smoothly/smoothly-dialog.entry.js +3 -3
  166. package/dist/smoothly/smoothly-display-amount.entry.js +3 -3
  167. package/dist/smoothly/smoothly-display-date-time.entry.js +2 -2
  168. package/dist/smoothly/smoothly-display-demo.entry.js +4 -4
  169. package/dist/smoothly/smoothly-display.entry.js +3 -3
  170. package/dist/smoothly/smoothly-frame.entry.js +3 -3
  171. package/dist/smoothly/smoothly-icon-demo.entry.js +2 -2
  172. package/dist/smoothly/smoothly-icon.entry.js +2 -2
  173. package/dist/smoothly/smoothly-input-date-range.entry.js +3 -3
  174. package/dist/smoothly/smoothly-input-date.entry.js +3 -3
  175. package/dist/smoothly/smoothly-input-demo.entry.js +2 -2
  176. package/dist/smoothly/smoothly-input-month.entry.js +4 -4
  177. package/dist/smoothly/smoothly-input.entry.js +19 -12
  178. package/dist/smoothly/smoothly-item.entry.js +6 -2
  179. package/dist/smoothly/smoothly-menu-options.entry.js +2 -2
  180. package/dist/smoothly/smoothly-notification.entry.js +2 -2
  181. package/dist/smoothly/smoothly-notifier.entry.js +2 -2
  182. package/dist/smoothly/smoothly-option.entry.js +2 -2
  183. package/dist/smoothly/smoothly-picker.entry.js +2 -2
  184. package/dist/smoothly/smoothly-popup.entry.js +2 -2
  185. package/dist/smoothly/smoothly-quiet.entry.js +15 -0
  186. package/dist/smoothly/smoothly-radio-group.entry.js +2 -2
  187. package/dist/smoothly/smoothly-radio.entry.js +2 -2
  188. package/dist/smoothly/smoothly-reorder.entry.js +2 -2
  189. package/dist/smoothly/smoothly-room.entry.js +2 -2
  190. package/dist/smoothly/smoothly-select-demo.entry.js +2 -2
  191. package/dist/smoothly/smoothly-select.entry.js +2 -2
  192. package/dist/smoothly/smoothly-selector.entry.js +2 -2
  193. package/dist/smoothly/smoothly-spinner.entry.js +2 -2
  194. package/dist/smoothly/smoothly-submit.entry.js +2 -2
  195. package/dist/smoothly/smoothly-tab-switch.entry.js +2 -2
  196. package/dist/smoothly/smoothly-tab.entry.js +2 -2
  197. package/dist/smoothly/smoothly-table-cell.entry.js +2 -2
  198. package/dist/smoothly/smoothly-table-demo.entry.js +2 -2
  199. package/dist/smoothly/smoothly-table-expandable-cell.entry.js +2 -2
  200. package/dist/smoothly/smoothly-table-expandable-row.entry.js +2 -2
  201. package/dist/smoothly/smoothly-table-header.entry.js +2 -2
  202. package/dist/smoothly/smoothly-table-row.entry.js +2 -2
  203. package/dist/smoothly/smoothly-table.entry.js +2 -2
  204. package/dist/smoothly/smoothly-trigger-sink.entry.js +3 -3
  205. package/dist/smoothly/smoothly-trigger-source.entry.js +3 -3
  206. package/dist/smoothly/smoothly-trigger.entry.js +2 -2
  207. package/dist/smoothly/smoothly-tuple.entry.js +2 -2
  208. package/dist/smoothly/smoothly-urlencoded.entry.js +2 -2
  209. package/dist/smoothly/smoothly.esm.js +10 -7
  210. package/dist/types/components/item/index.d.ts +1 -0
  211. package/dist/types/components/quiet/index.d.ts +4 -0
  212. package/dist/types/components.d.ts +15 -0
  213. package/dist/types/stencil-public-runtime.d.ts +183 -182
  214. package/loader/index.d.ts +0 -1
  215. package/package.json +89 -90
  216. package/dist/smoothly/p-22bce579.entry.js +0 -1
  217. package/dist/smoothly/p-41528fcb.entry.js +0 -1
  218. package/dist/smoothly/p-89fe12b0.entry.js +0 -1
  219. package/dist/smoothly/p-e3d91e7a.entry.js +0 -1
  220. package/dist/smoothly/p-e79800d9.entry.js +0 -1
@@ -210,9 +210,9 @@ var Action;
210
210
  var _a, _b;
211
211
  let result = State_1.State.copy(formatter.unformat(StateEditor_1.StateEditor.copy(state)));
212
212
  if (action) {
213
- if (action.ctrlKey) {
213
+ if (action.ctrlKey || action.metaKey) {
214
214
  if (action.key == "a")
215
- select(state, 0, state.value.length, "forward");
215
+ select(result, 0, result.value.length, "forward");
216
216
  else if (["ArrowLeft", "ArrowRight"].includes(action.key) && ((_a = state) === null || _a === void 0 ? void 0 : _a.type) != "password")
217
217
  result = ctrlArrow(formatter, state, action);
218
218
  else if (["Delete", "Backspace"].includes(action.key) && ((_b = state) === null || _b === void 0 ? void 0 : _b.type) != "password")
@@ -78,13 +78,16 @@ class Algorithm$2 {
78
78
  return __awaiter$d(this, void 0, void 0, function* () {
79
79
  const iv = salt ? decode$1(salt, "url") : crypto.getRandomValues(new Uint8Array(16));
80
80
  return {
81
+ key: this.name,
81
82
  salt: salt || encode$1(iv, "url"),
82
83
  value: encode$1(new Uint8Array(yield crypto.subtle.encrypt({ name: (yield this.key).algorithm.name, iv }, yield this.key, new TextEncoder().encode(data))), "url"),
83
84
  };
84
85
  });
85
86
  }
86
- decrypt(encrypted) {
87
+ decrypt(encrypted, salt) {
87
88
  return __awaiter$d(this, void 0, void 0, function* () {
89
+ if (typeof encrypted == "string")
90
+ encrypted = { value: encrypted, salt: salt !== null && salt !== void 0 ? salt : "" };
88
91
  return new TextDecoder().decode(new Uint8Array(yield crypto.subtle.decrypt({ name: (yield this.key).algorithm.name, iv: decode$1(encrypted.salt, "url") }, yield this.key, decode$1(encrypted.value, "url"))));
89
92
  });
90
93
  }
@@ -1077,7 +1080,7 @@ class Issuer extends Actor {
1077
1080
  return __awaiter$1(this, void 0, void 0, function* () {
1078
1081
  payload = Object.assign(Object.assign({}, this.payload), payload);
1079
1082
  if (issuedAt)
1080
- payload.iat = typeof issuedAt == "number" ? issuedAt : issuedAt.getTime();
1083
+ payload.iat = typeof issuedAt == "number" ? issuedAt : issuedAt.getTime() / 1000;
1081
1084
  const transformed = yield this.transformers.reduce((p, c) => __awaiter$1(this, void 0, void 0, function* () { return c.apply(yield p); }), Promise.resolve(payload));
1082
1085
  const data = transformed &&
1083
1086
  `${encode$1(new TextEncoder().encode(JSON.stringify(this.header)), "url")}.${encode$1(new TextEncoder().encode(JSON.stringify(transformed)), "url")}`;
@@ -1089,7 +1092,7 @@ class Issuer extends Actor {
1089
1092
  ? Math.floor(Date.now() / 1000)
1090
1093
  : typeof Issuer.defaultIssuedAt == "number"
1091
1094
  ? Issuer.defaultIssuedAt
1092
- : Math.floor(Issuer.defaultIssuedAt.getTime());
1095
+ : Math.floor(Issuer.defaultIssuedAt.getTime() / 1000);
1093
1096
  }
1094
1097
  static create(issuer, algorithm) {
1095
1098
  return (algorithm && new Issuer(issuer, algorithm)) || undefined;
@@ -1153,10 +1156,6 @@ class Verifier extends Actor {
1153
1156
  result = undefined;
1154
1157
  }
1155
1158
  result = result && this.verifyAudience(result.aud, audience) ? result : undefined;
1156
- if (result) {
1157
- result.token = token;
1158
- result = yield this.transformers.reduceRight((p, c) => __awaiter(this, void 0, void 0, function* () { return c.reverse(yield p); }), Promise.resolve(result));
1159
- }
1160
1159
  if (result) {
1161
1160
  const now = Math.floor(Date.now() / 1000);
1162
1161
  if ((result === null || result === void 0 ? void 0 : result.iat) && result.iat > 1000000000000)
@@ -1168,6 +1167,10 @@ class Verifier extends Actor {
1168
1167
  ? result
1169
1168
  : undefined;
1170
1169
  }
1170
+ if (result) {
1171
+ result.token = token;
1172
+ result = yield this.transformers.reduceRight((p, c) => __awaiter(this, void 0, void 0, function* () { return c.reverse(yield p); }), Promise.resolve(result));
1173
+ }
1171
1174
  }
1172
1175
  }
1173
1176
  return result;
@@ -16572,7 +16572,9 @@ exports.Date = void 0;
16572
16572
  var Date;
16573
16573
  (function (Date) {
16574
16574
  function is(value) {
16575
- return (typeof value == "string" && /^(\d{4}-[01]\d-[0-3]\d)|(\d{4}-[01]\d-[0-3]\d)|(\d{4}-[01]\d-[0-3]\d)$/.test(value));
16575
+ return (typeof value == "string" &&
16576
+ value.length == 10 &&
16577
+ /^(\d{4}-[01]\d-[0-3]\d)|(\d{4}-[01]\d-[0-3]\d)|(\d{4}-[01]\d-[0-3]\d)$/.test(value));
16576
16578
  }
16577
16579
  Date.is = is;
16578
16580
  function parse(value, time) {
@@ -16587,16 +16589,13 @@ var Date;
16587
16589
  return create(new globalThis.Date());
16588
16590
  }
16589
16591
  Date.now = now;
16590
- function localize(value, locale) {
16592
+ function localize(value, locale, timezone) {
16591
16593
  return (is(value) ? parse(value) : value)
16592
16594
  .toLocaleString(locale ? locale : Intl.DateTimeFormat().resolvedOptions().locale, {
16593
16595
  year: "numeric",
16594
16596
  month: "2-digit",
16595
16597
  day: "2-digit",
16596
- hour: "2-digit",
16597
- minute: "2-digit",
16598
- second: "2-digit",
16599
- timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone,
16598
+ timeZone: timezone !== null && timezone !== void 0 ? timezone : Intl.DateTimeFormat().resolvedOptions().timeZone,
16600
16599
  })
16601
16600
  .substring(0, 10);
16602
16601
  }
@@ -16672,12 +16671,69 @@ var Date;
16672
16671
  return Date.create(result);
16673
16672
  }
16674
16673
  Date.lastOfMonth = lastOfMonth;
16674
+ function getYear(time) {
16675
+ return Number.parseInt(time.substring(0, 4));
16676
+ }
16677
+ Date.getYear = getYear;
16678
+ function getMonth(time) {
16679
+ return Number.parseInt(time.substring(5, 7));
16680
+ }
16681
+ Date.getMonth = getMonth;
16682
+ function getDay(time) {
16683
+ return Number.parseInt(time.substring(8, 10));
16684
+ }
16685
+ Date.getDay = getDay;
16675
16686
  })(Date = exports.Date || (exports.Date = {}));
16676
16687
  //# sourceMappingURL=Date.js.map
16677
16688
  });
16678
16689
 
16679
16690
  const _Date$1 = /*@__PURE__*/getDefaultExportFromCjs(_Date);
16680
16691
 
16692
+ var DateRange_1 = createCommonjsModule(function (module, exports) {
16693
+ "use strict";
16694
+ Object.defineProperty(exports, "__esModule", { value: true });
16695
+ exports.DateRange = void 0;
16696
+
16697
+ var DateRange;
16698
+ (function (DateRange) {
16699
+ function is(value) {
16700
+ return typeof value == "object" && _Date.Date.is(value.start) && _Date.Date.is(value.end);
16701
+ }
16702
+ DateRange.is = is;
16703
+ function create(start, end) {
16704
+ return !_Date.Date.is(end)
16705
+ ? create(start, _Date.Date.next(start, end))
16706
+ : start <= end
16707
+ ? { start, end }
16708
+ : { start: end, end: start };
16709
+ }
16710
+ DateRange.create = create;
16711
+ })(DateRange = exports.DateRange || (exports.DateRange = {}));
16712
+ //# sourceMappingURL=DateRange.js.map
16713
+ });
16714
+
16715
+ const DateRange = /*@__PURE__*/getDefaultExportFromCjs(DateRange_1);
16716
+
16717
+ var DateSpan_1 = createCommonjsModule(function (module, exports) {
16718
+ "use strict";
16719
+ Object.defineProperty(exports, "__esModule", { value: true });
16720
+ exports.DateSpan = void 0;
16721
+ var DateSpan;
16722
+ (function (DateSpan) {
16723
+ function is(value) {
16724
+ return (typeof value == "object" &&
16725
+ (typeof value.years == "number" || value.years == undefined) &&
16726
+ (typeof value.months == "number" || value.months == undefined) &&
16727
+ (typeof value.days == "number" || value.days == undefined) &&
16728
+ (typeof value.years == "number" || typeof value.months == "number" || typeof value.days == "number"));
16729
+ }
16730
+ DateSpan.is = is;
16731
+ })(DateSpan = exports.DateSpan || (exports.DateSpan = {}));
16732
+ //# sourceMappingURL=DateSpan.js.map
16733
+ });
16734
+
16735
+ const DateSpan = /*@__PURE__*/getDefaultExportFromCjs(DateSpan_1);
16736
+
16681
16737
  var DateTime_1 = createCommonjsModule(function (module, exports) {
16682
16738
  "use strict";
16683
16739
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -16690,18 +16746,32 @@ var DateTime;
16690
16746
  }
16691
16747
  DateTime.is = is;
16692
16748
  function parse(value) {
16693
- return new Date(value);
16749
+ return new globalThis.Date(value);
16694
16750
  }
16695
16751
  DateTime.parse = parse;
16696
- function create(value) {
16752
+ function create(value, resolution = "seconds") {
16753
+ if (typeof value == "number") {
16754
+ switch (resolution) {
16755
+ case "days":
16756
+ value = value * 24;
16757
+ case "hours":
16758
+ value = value * 60;
16759
+ case "minutes":
16760
+ value = value * 60;
16761
+ case "seconds":
16762
+ value = value * 1000;
16763
+ case "milliseconds":
16764
+ }
16765
+ value = new globalThis.Date(value);
16766
+ }
16697
16767
  return value.toISOString();
16698
16768
  }
16699
16769
  DateTime.create = create;
16700
16770
  function now() {
16701
- return create(new Date());
16771
+ return create(new globalThis.Date());
16702
16772
  }
16703
16773
  DateTime.now = now;
16704
- function localize(value, locale) {
16774
+ function localize(value, locale, timezone) {
16705
16775
  const localeString = locale ? locale : Intl.DateTimeFormat().resolvedOptions().locale;
16706
16776
  return (is(value) ? parse(value) : value).toLocaleString(localeString, {
16707
16777
  year: "numeric",
@@ -16710,10 +16780,176 @@ var DateTime;
16710
16780
  hour: "2-digit",
16711
16781
  minute: "2-digit",
16712
16782
  second: "2-digit",
16713
- timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone,
16783
+ timeZone: timezone !== null && timezone !== void 0 ? timezone : Intl.DateTimeFormat().resolvedOptions().timeZone,
16714
16784
  });
16715
16785
  }
16716
16786
  DateTime.localize = localize;
16787
+ function epoch(value, resolution = "seconds") {
16788
+ let result = (typeof value == "string" ? parse(value) : value).getTime();
16789
+ switch (resolution) {
16790
+ case "days":
16791
+ result = Math.round(result / 24);
16792
+ case "hours":
16793
+ result = Math.round(result / 60);
16794
+ case "minutes":
16795
+ result = Math.round(result / 60);
16796
+ case "seconds":
16797
+ result = Math.round(result / 1000);
16798
+ case "milliseconds":
16799
+ }
16800
+ return result;
16801
+ }
16802
+ DateTime.epoch = epoch;
16803
+ function next(time, span = 1) {
16804
+ let result;
16805
+ if (typeof span == "number")
16806
+ result = nextSecond(time, span);
16807
+ else {
16808
+ result = time;
16809
+ if (span.years)
16810
+ result = nextYear(result, span.years);
16811
+ if (span.months)
16812
+ result = nextMonth(result, span.months);
16813
+ if (span.days)
16814
+ result = nextDay(result, span.days);
16815
+ if (span.hours)
16816
+ result = nextHour(result, span.hours);
16817
+ if (span.minutes)
16818
+ result = nextMinute(result, span.minutes);
16819
+ if (span.seconds)
16820
+ result = nextSecond(result, span.seconds);
16821
+ if (span.milliseconds)
16822
+ result = nextMillisecond(result, span.milliseconds);
16823
+ }
16824
+ return result;
16825
+ }
16826
+ DateTime.next = next;
16827
+ function previous(time, span = 1) {
16828
+ let result;
16829
+ if (typeof span == "number")
16830
+ result = previousSecond(time, span);
16831
+ else {
16832
+ result = time;
16833
+ if (span.years)
16834
+ result = previousYear(result, span.years);
16835
+ if (span.months)
16836
+ result = previousMonth(result, span.months);
16837
+ if (span.days)
16838
+ result = previousDay(result, span.days);
16839
+ if (span.hours)
16840
+ result = previousHour(result, span.hours);
16841
+ if (span.minutes)
16842
+ result = previousMinute(result, span.minutes);
16843
+ if (span.seconds)
16844
+ result = previousSecond(result, span.seconds);
16845
+ if (span.milliseconds)
16846
+ result = previousMillisecond(result, span.milliseconds);
16847
+ }
16848
+ return result;
16849
+ }
16850
+ DateTime.previous = previous;
16851
+ function nextMillisecond(time, milliseconds = 1) {
16852
+ const result = parse(time);
16853
+ result.setMilliseconds(result.getMilliseconds() + milliseconds);
16854
+ return DateTime.create(result);
16855
+ }
16856
+ DateTime.nextMillisecond = nextMillisecond;
16857
+ function previousMillisecond(time, seconds = 1) {
16858
+ return nextMillisecond(time, -seconds);
16859
+ }
16860
+ DateTime.previousMillisecond = previousMillisecond;
16861
+ function nextSecond(time, seconds = 1) {
16862
+ const result = parse(time);
16863
+ result.setSeconds(result.getSeconds() + seconds);
16864
+ return DateTime.create(result);
16865
+ }
16866
+ DateTime.nextSecond = nextSecond;
16867
+ function previousSecond(time, seconds = 1) {
16868
+ return nextSecond(time, -seconds);
16869
+ }
16870
+ DateTime.previousSecond = previousSecond;
16871
+ function nextMinute(time, minutes = 1) {
16872
+ const result = parse(time);
16873
+ result.setMinutes(result.getMinutes() + minutes);
16874
+ return DateTime.create(result);
16875
+ }
16876
+ DateTime.nextMinute = nextMinute;
16877
+ function previousMinute(time, minutes = 1) {
16878
+ return nextMinute(time, -minutes);
16879
+ }
16880
+ DateTime.previousMinute = previousMinute;
16881
+ function nextHour(time, hours = 1) {
16882
+ const result = parse(time);
16883
+ result.setHours(result.getHours() + hours);
16884
+ return DateTime.create(result);
16885
+ }
16886
+ DateTime.nextHour = nextHour;
16887
+ function previousHour(time, hours = 1) {
16888
+ return nextHour(time, -hours);
16889
+ }
16890
+ DateTime.previousHour = previousHour;
16891
+ function nextDay(time, days = 1) {
16892
+ const result = parse(time);
16893
+ result.setDate(result.getDate() + days);
16894
+ return DateTime.create(result);
16895
+ }
16896
+ DateTime.nextDay = nextDay;
16897
+ function previousDay(time, days = 1) {
16898
+ return nextDay(time, -days);
16899
+ }
16900
+ DateTime.previousDay = previousDay;
16901
+ function nextMonth(time, months = 1) {
16902
+ const result = parse(time);
16903
+ result.setMonth(result.getMonth() + months);
16904
+ return DateTime.create(result);
16905
+ }
16906
+ DateTime.nextMonth = nextMonth;
16907
+ function previousMonth(time, months = 1) {
16908
+ return nextMonth(time, -months);
16909
+ }
16910
+ DateTime.previousMonth = previousMonth;
16911
+ function nextYear(time, years = 1) {
16912
+ const result = parse(time);
16913
+ result.setFullYear(result.getFullYear() + years);
16914
+ return DateTime.create(result);
16915
+ }
16916
+ DateTime.nextYear = nextYear;
16917
+ function previousYear(time, years = 1) {
16918
+ return nextYear(time, -years);
16919
+ }
16920
+ DateTime.previousYear = previousYear;
16921
+ function getDate(time) {
16922
+ return time.substring(0, 10);
16923
+ }
16924
+ DateTime.getDate = getDate;
16925
+ function getTime(time) {
16926
+ return time.substring(11);
16927
+ }
16928
+ DateTime.getTime = getTime;
16929
+ function getYear(time) {
16930
+ return Number.parseInt(time.substring(0, 4));
16931
+ }
16932
+ DateTime.getYear = getYear;
16933
+ function getMonth(time) {
16934
+ return Number.parseInt(time.substring(5, 7));
16935
+ }
16936
+ DateTime.getMonth = getMonth;
16937
+ function getDay(time) {
16938
+ return Number.parseInt(time.substring(8, 10));
16939
+ }
16940
+ DateTime.getDay = getDay;
16941
+ function getHour(time) {
16942
+ return Number.parseInt(time.substring(11, 13));
16943
+ }
16944
+ DateTime.getHour = getHour;
16945
+ function getMinute(time) {
16946
+ return Number.parseInt(time.substring(14, 16));
16947
+ }
16948
+ DateTime.getMinute = getMinute;
16949
+ function getSecond(time) {
16950
+ return Number.parseInt(time.substring(17, 19));
16951
+ }
16952
+ DateTime.getSecond = getSecond;
16717
16953
  })(DateTime = exports.DateTime || (exports.DateTime = {}));
16718
16954
  //# sourceMappingURL=DateTime.js.map
16719
16955
  });
@@ -18454,6 +18690,61 @@ var Locale;
18454
18690
 
18455
18691
  const Locale = /*@__PURE__*/getDefaultExportFromCjs(Locale_1);
18456
18692
 
18693
+ var TimeRange_1 = createCommonjsModule(function (module, exports) {
18694
+ "use strict";
18695
+ Object.defineProperty(exports, "__esModule", { value: true });
18696
+ exports.TimeRange = void 0;
18697
+
18698
+ var TimeRange;
18699
+ (function (TimeRange) {
18700
+ function is(value) {
18701
+ return typeof value == "object" && DateTime_1.DateTime.is(value.start) && DateTime_1.DateTime.is(value.end);
18702
+ }
18703
+ TimeRange.is = is;
18704
+ function create(start, end) {
18705
+ return !DateTime_1.DateTime.is(end)
18706
+ ? create(start, DateTime_1.DateTime.next(start, end))
18707
+ : start <= end
18708
+ ? { start, end }
18709
+ : { start: end, end: start };
18710
+ }
18711
+ TimeRange.create = create;
18712
+ })(TimeRange = exports.TimeRange || (exports.TimeRange = {}));
18713
+ //# sourceMappingURL=TimeRange.js.map
18714
+ });
18715
+
18716
+ const TimeRange = /*@__PURE__*/getDefaultExportFromCjs(TimeRange_1);
18717
+
18718
+ var TimeSpan_1 = createCommonjsModule(function (module, exports) {
18719
+ "use strict";
18720
+ Object.defineProperty(exports, "__esModule", { value: true });
18721
+ exports.TimeSpan = void 0;
18722
+ var TimeSpan;
18723
+ (function (TimeSpan) {
18724
+ function is(value) {
18725
+ return (typeof value == "object" &&
18726
+ (typeof value.years == "number" || value.years == undefined) &&
18727
+ (typeof value.months == "number" || value.months == undefined) &&
18728
+ (typeof value.days == "number" || value.days == undefined) &&
18729
+ (typeof value.hours == "number" || value.hours == undefined) &&
18730
+ (typeof value.minutes == "number" || value.minutes == undefined) &&
18731
+ (typeof value.seconds == "number" || value.seconds == undefined) &&
18732
+ (typeof value.milliseconds == "number" || value.milliseconds == undefined) &&
18733
+ (typeof value.years == "number" ||
18734
+ typeof value.months == "number" ||
18735
+ typeof value.days == "number" ||
18736
+ typeof value.hours == "number" ||
18737
+ typeof value.minutes == "number" ||
18738
+ typeof value.seconds == "number" ||
18739
+ typeof value.milliseconds == "number"));
18740
+ }
18741
+ TimeSpan.is = is;
18742
+ })(TimeSpan = exports.TimeSpan || (exports.TimeSpan = {}));
18743
+ //# sourceMappingURL=TimeSpan.js.map
18744
+ });
18745
+
18746
+ const TimeSpan = /*@__PURE__*/getDefaultExportFromCjs(TimeSpan_1);
18747
+
18457
18748
  var dist = createCommonjsModule(function (module, exports) {
18458
18749
  "use strict";
18459
18750
  var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
@@ -18476,7 +18767,7 @@ var __importStar = (commonjsGlobal && commonjsGlobal.__importStar) || function (
18476
18767
  return result;
18477
18768
  };
18478
18769
  Object.defineProperty(exports, "__esModule", { value: true });
18479
- exports.Locale = exports.Language = exports.Encoding = exports.DateTime = exports.Date = exports.CurrencyCode = exports.Currency = exports.CountryCode = exports.CallingCode = void 0;
18770
+ exports.TimeSpan = exports.TimeRange = exports.Locale = exports.Language = exports.Encoding = exports.DateTime = exports.Date = exports.CurrencyCode = exports.Currency = exports.DateRange = exports.DateSpan = exports.CountryCode = exports.CallingCode = void 0;
18480
18771
 
18481
18772
  Object.defineProperty(exports, "CallingCode", { enumerable: true, get: function () { return CallingCode_1.CallingCode; } });
18482
18773
  const CountryCode$1 = __importStar(CountryCode);
@@ -18488,6 +18779,10 @@ Object.defineProperty(exports, "CurrencyCode", { enumerable: true, get: function
18488
18779
 
18489
18780
  Object.defineProperty(exports, "Date", { enumerable: true, get: function () { return _Date.Date; } });
18490
18781
 
18782
+ Object.defineProperty(exports, "DateRange", { enumerable: true, get: function () { return DateRange_1.DateRange; } });
18783
+
18784
+ Object.defineProperty(exports, "DateSpan", { enumerable: true, get: function () { return DateSpan_1.DateSpan; } });
18785
+
18491
18786
  Object.defineProperty(exports, "DateTime", { enumerable: true, get: function () { return DateTime_1.DateTime; } });
18492
18787
 
18493
18788
  Object.defineProperty(exports, "Encoding", { enumerable: true, get: function () { return Encoding_1.Encoding; } });
@@ -18495,6 +18790,10 @@ Object.defineProperty(exports, "Encoding", { enumerable: true, get: function ()
18495
18790
  Object.defineProperty(exports, "Language", { enumerable: true, get: function () { return Language_1.Language; } });
18496
18791
 
18497
18792
  Object.defineProperty(exports, "Locale", { enumerable: true, get: function () { return Locale_1.Locale; } });
18793
+
18794
+ Object.defineProperty(exports, "TimeRange", { enumerable: true, get: function () { return TimeRange_1.TimeRange; } });
18795
+
18796
+ Object.defineProperty(exports, "TimeSpan", { enumerable: true, get: function () { return TimeSpan_1.TimeSpan; } });
18498
18797
  //# sourceMappingURL=index.js.map
18499
18798
  });
18500
18799