@tap-payments/os-micro-frontend-shared 0.3.219-test.11 → 0.3.219

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 (192) hide show
  1. package/build/_chunks/{chunk-STSV7NAV.js → chunk-2K7FRRCP.js} +1 -1
  2. package/build/_chunks/{chunk-FCQZSF6C.js → chunk-3D3WKTFY.js} +1 -1
  3. package/build/_chunks/{chunk-2ZTDZMQV.js → chunk-3FL6JKDE.js} +1 -1
  4. package/build/_chunks/{chunk-WUVLXFRD.js → chunk-3TO7YUM5.js} +1 -1
  5. package/build/_chunks/{chunk-BBR3H3KM.js → chunk-3XNXNKGA.js} +1 -1
  6. package/build/_chunks/{chunk-YIZ2SJ2R.js → chunk-3ZQC3MDU.js} +1 -1
  7. package/build/_chunks/{chunk-OFUQV2S7.js → chunk-4B2QTPTE.js} +1 -1
  8. package/build/_chunks/{chunk-SIPE5HWZ.js → chunk-4WHJ7C3Y.js} +1 -1
  9. package/build/_chunks/{chunk-IQRA43OV.js → chunk-57COBHS2.js} +1 -1
  10. package/build/_chunks/{chunk-5VZHYPFP.js → chunk-5CQG3WDG.js} +1 -1
  11. package/build/_chunks/{chunk-EBY66HDS.js → chunk-5K5Q4DZF.js} +1 -1
  12. package/build/_chunks/{chunk-GHCK3XPZ.js → chunk-67EIV5FM.js} +1 -1
  13. package/build/_chunks/{chunk-AB3JAJHF.js → chunk-6Z6BI3UQ.js} +1 -1
  14. package/build/_chunks/{chunk-VWFJNIS6.js → chunk-BFNXERA5.js} +1 -1
  15. package/build/_chunks/{chunk-BN5OZACX.js → chunk-CB7QJIZT.js} +1 -1
  16. package/build/_chunks/{chunk-VJPODV3I.js → chunk-CBQF2JOF.js} +1 -1
  17. package/build/_chunks/{chunk-SRYFBQ3L.js → chunk-CC3OHCAU.js} +1 -1
  18. package/build/_chunks/chunk-CCNYVQRG.js +1 -0
  19. package/build/_chunks/{chunk-DF7YGDHF.js → chunk-CJBK6DV4.js} +1 -1
  20. package/build/_chunks/{chunk-CPXC2HIM.js → chunk-CWNJS74Z.js} +1 -1
  21. package/build/_chunks/{chunk-CYONSJOA.js → chunk-DILHFFYM.js} +1 -1
  22. package/build/_chunks/{chunk-7DF4OCNS.js → chunk-EBHPTELD.js} +1 -1
  23. package/build/_chunks/{chunk-ZL23AW36.js → chunk-EOPHF3KG.js} +1 -1
  24. package/build/_chunks/{chunk-KU2GYOVJ.js → chunk-ERL2AD3X.js} +1 -1
  25. package/build/_chunks/{chunk-RXZVFV7R.js → chunk-F4ONOXPC.js} +1 -1
  26. package/build/_chunks/{chunk-YRQ3E36X.js → chunk-GKSTVWG7.js} +1 -1
  27. package/build/_chunks/{chunk-2ZC24DCN.js → chunk-I4MFMAUT.js} +1 -1
  28. package/build/_chunks/{chunk-EHHY7NAU.js → chunk-JDD6SWME.js} +1 -1
  29. package/build/_chunks/{chunk-XIUJHYEE.js → chunk-K3VCY2Z7.js} +1 -1
  30. package/build/_chunks/{chunk-RNECVM7G.js → chunk-KGJKMOL6.js} +1 -1
  31. package/build/_chunks/{chunk-2GIBPPKW.js → chunk-LEGFRHUY.js} +1 -1
  32. package/build/_chunks/{chunk-DTQFVATX.js → chunk-LMQIQCKU.js} +1 -1
  33. package/build/_chunks/{chunk-IARFCKXQ.js → chunk-LNXP6W5X.js} +1 -1
  34. package/build/_chunks/{chunk-UBHPOQSK.js → chunk-MW3S7RYL.js} +1 -1
  35. package/build/_chunks/{chunk-3F5ATMQB.js → chunk-MXC3TARS.js} +1 -1
  36. package/build/_chunks/{chunk-32QJM33C.js → chunk-NLUIDNSG.js} +1 -1
  37. package/build/_chunks/{chunk-GYFZ73GR.js → chunk-O7MIU67I.js} +1 -1
  38. package/build/_chunks/{chunk-TGWIC62V.js → chunk-OQM5HYDJ.js} +1 -1
  39. package/build/_chunks/{chunk-FVQ3OAN4.js → chunk-OQXHFUUW.js} +1 -1
  40. package/build/_chunks/{chunk-74FYV7XE.js → chunk-P3UNUMRE.js} +1 -1
  41. package/build/_chunks/{chunk-CSKIZJMP.js → chunk-PDRNFDWB.js} +1 -1
  42. package/build/_chunks/{chunk-OHP3DSFR.js → chunk-PVE26KKA.js} +1 -1
  43. package/build/_chunks/{chunk-DSKS3MZK.js → chunk-PYBAY4RD.js} +1 -1
  44. package/build/_chunks/{chunk-RDK2KF63.js → chunk-RJGHAJAS.js} +1 -1
  45. package/build/_chunks/{chunk-7JTOHX7G.js → chunk-RLUMXH63.js} +1 -1
  46. package/build/_chunks/{chunk-4KBICMEZ.js → chunk-RQRTDUVJ.js} +1 -1
  47. package/build/_chunks/{chunk-NUN7SFUM.js → chunk-RRNCLEPN.js} +1 -1
  48. package/build/_chunks/{chunk-NHNYMEO4.js → chunk-SLOXJ5HL.js} +1 -1
  49. package/build/_chunks/{chunk-S7DGEHY2.js → chunk-TATV6PD5.js} +1 -1
  50. package/build/_chunks/{chunk-BIY6O5KE.js → chunk-TBK5B4PF.js} +1 -1
  51. package/build/_chunks/{chunk-B5EVH3FW.js → chunk-TCP65H54.js} +1 -1
  52. package/build/_chunks/{chunk-JK3V4FT5.js → chunk-TRCRPJLO.js} +1 -1
  53. package/build/_chunks/{chunk-45YGTVZP.js → chunk-TYUXEDNW.js} +1 -1
  54. package/build/_chunks/{chunk-7LVTTKBG.js → chunk-TZJUIC5Q.js} +1 -1
  55. package/build/_chunks/{chunk-DNVGTZES.js → chunk-U5S2TDEO.js} +1 -1
  56. package/build/_chunks/{chunk-DILJTXAK.js → chunk-UL4GWIQX.js} +1 -1
  57. package/build/_chunks/{chunk-NE7LDEJD.js → chunk-UQVXIIIV.js} +1 -1
  58. package/build/_chunks/{chunk-HCO33BCV.js → chunk-VKHUWB7W.js} +1 -1
  59. package/build/_chunks/{chunk-XX5Q5MBU.js → chunk-VR7ZRZKQ.js} +1 -1
  60. package/build/_chunks/{chunk-NQ7BU6UU.js → chunk-VRGWLZGG.js} +1 -1
  61. package/build/_chunks/{chunk-IRYRPNQZ.js → chunk-VS4GPQTT.js} +1 -1
  62. package/build/_chunks/{chunk-32FV6NCN.js → chunk-VSI64YFN.js} +1 -1
  63. package/build/_chunks/{chunk-KNCLMG4I.js → chunk-W6OPWYPX.js} +1 -1
  64. package/build/_chunks/{chunk-SFJXGJ6O.js → chunk-WWPYJOBT.js} +1 -1
  65. package/build/_chunks/chunk-XJU7WNPR.js +2 -0
  66. package/build/_chunks/{chunk-K223QU64.js → chunk-XWCBQTXR.js} +1 -1
  67. package/build/_chunks/{chunk-MOFWTHBX.js → chunk-YOFP6Q2H.js} +1 -1
  68. package/build/_chunks/{chunk-MOCDGJR4.js → chunk-ZHEAWCTY.js} +1 -1
  69. package/build/_chunks/{chunk-7Y422WAK.js → chunk-ZIL2SD2V.js} +1 -1
  70. package/build/_chunks/{chunk-LSKSOVDA.js → chunk-ZQ52HZBG.js} +1 -1
  71. package/build/_chunks/{chunk-DIOBCQQT.js → chunk-ZZJGMJCQ.js} +1 -1
  72. package/build/components/ActionsDropdownMenu/index.js +1 -1
  73. package/build/components/ActiveFilterChip/index.js +1 -1
  74. package/build/components/AmountInput/index.js +1 -1
  75. package/build/components/AnimatedSpinnerIcon/index.js +1 -1
  76. package/build/components/AppServices/index.js +1 -1
  77. package/build/components/AppServicesBar/index.js +1 -1
  78. package/build/components/AppWindowWrapper/index.js +1 -1
  79. package/build/components/AreaChart/index.js +1 -1
  80. package/build/components/Autocomplete/index.js +1 -1
  81. package/build/components/BrandLogo/index.js +1 -1
  82. package/build/components/Calender/index.js +1 -1
  83. package/build/components/ChipStack/index.js +1 -1
  84. package/build/components/ColorPicker/index.js +1 -1
  85. package/build/components/ColumnViews/index.js +1 -1
  86. package/build/components/ConfirmDialog/index.js +1 -1
  87. package/build/components/CountryFilter/index.js +1 -1
  88. package/build/components/CountryFlag/index.js +1 -1
  89. package/build/components/CurrencyAmount/index.js +1 -1
  90. package/build/components/CurrencySymbol/index.js +1 -1
  91. package/build/components/CustomBackdrop/index.js +1 -1
  92. package/build/components/Customer/index.js +1 -1
  93. package/build/components/DateFilter/DateFilter.d.ts +2 -3
  94. package/build/components/DateFilter/index.js +1 -1
  95. package/build/components/DeviceIcon/index.js +1 -1
  96. package/build/components/Discount/index.js +1 -1
  97. package/build/components/DisplayAmount/index.js +1 -1
  98. package/build/components/DropdownMenu/index.js +1 -1
  99. package/build/components/EmptyState/index.js +1 -1
  100. package/build/components/Error/index.js +1 -1
  101. package/build/components/ErrorToast/index.js +1 -1
  102. package/build/components/ExpandableSideBar/index.js +1 -1
  103. package/build/components/FileInputPreview/index.js +1 -1
  104. package/build/components/FilePreview/index.js +1 -1
  105. package/build/components/FileUpload/index.js +1 -1
  106. package/build/components/FileUploader/index.js +1 -1
  107. package/build/components/FilterDropdown/index.js +1 -1
  108. package/build/components/Filters/index.js +1 -1
  109. package/build/components/FlippingCard/index.js +1 -1
  110. package/build/components/HeatMap/index.js +1 -1
  111. package/build/components/IconWithBadge/index.js +1 -1
  112. package/build/components/InputBase/index.js +1 -1
  113. package/build/components/Inputs/index.js +1 -1
  114. package/build/components/JSONViewer/index.js +1 -1
  115. package/build/components/LeftPeekRightExpandingChip/index.js +1 -1
  116. package/build/components/ListColumnFilter/index.js +1 -1
  117. package/build/components/ListHeader/index.js +1 -1
  118. package/build/components/ListHeader/types.d.ts +1 -3
  119. package/build/components/ListLayout/index.js +1 -1
  120. package/build/components/Loader/index.js +1 -1
  121. package/build/components/MFWidgetLoader/index.js +1 -1
  122. package/build/components/MaskedText/index.js +1 -1
  123. package/build/components/MerchantCurrencyDropdown/index.js +1 -1
  124. package/build/components/MerchantLogo/index.js +1 -1
  125. package/build/components/MerchantsDropdown/index.js +1 -1
  126. package/build/components/NestedDropdown/index.js +1 -1
  127. package/build/components/NestedMultiSelect/index.js +1 -1
  128. package/build/components/OpenFileInNewTab/index.js +1 -1
  129. package/build/components/PaymentSourceFilter/index.js +1 -1
  130. package/build/components/PhoneFilter/index.js +1 -1
  131. package/build/components/PhoneInput/index.js +1 -1
  132. package/build/components/ProgressRing/index.js +1 -1
  133. package/build/components/RFH/index.js +1 -1
  134. package/build/components/RHFInput/index.js +1 -1
  135. package/build/components/RHFPhoneInput/index.js +1 -1
  136. package/build/components/RHFSwitch/index.js +1 -1
  137. package/build/components/RadioGroup/index.js +1 -1
  138. package/build/components/RangeCalender/index.js +1 -1
  139. package/build/components/RangeCalender/type.d.ts +1 -17
  140. package/build/components/RangeCalender/utils.d.ts +0 -7
  141. package/build/components/RatingCount/index.js +1 -1
  142. package/build/components/ReferenceTypeFilter/index.js +1 -1
  143. package/build/components/RightLeftExpandingCenterChip/index.js +1 -1
  144. package/build/components/SearchButton/index.js +1 -1
  145. package/build/components/SearchInput/index.js +1 -1
  146. package/build/components/SelectDropdown/index.js +1 -1
  147. package/build/components/SheetViewChip/index.js +1 -1
  148. package/build/components/StatusBar/index.js +1 -1
  149. package/build/components/StatusButton/index.js +1 -1
  150. package/build/components/StatusFilter/index.js +1 -1
  151. package/build/components/StatusIcons/index.js +1 -1
  152. package/build/components/StatusLabel/index.js +1 -1
  153. package/build/components/TableCells/CustomCells/DateCell/DateCell.d.ts +0 -4
  154. package/build/components/TableCells/CustomCells/DateCell/DateViewer.d.ts +1 -5
  155. package/build/components/TableCells/CustomCells/RefundStatusCell/style.d.ts +1 -1
  156. package/build/components/TableCells/CustomCells/index.d.ts +0 -1
  157. package/build/components/TableCells/index.js +1 -1
  158. package/build/components/TableReports/index.js +1 -1
  159. package/build/components/TextInput/index.js +1 -1
  160. package/build/components/Timeline/index.js +1 -1
  161. package/build/components/Timepicker/index.js +1 -1
  162. package/build/components/ToggleView/index.js +1 -1
  163. package/build/components/Toolbar/index.js +1 -1
  164. package/build/components/TreeDropdown/index.js +1 -1
  165. package/build/components/VAT/index.js +1 -1
  166. package/build/components/VerificationIcon/index.js +1 -1
  167. package/build/components/ViewColumnRadioFilter/index.js +1 -1
  168. package/build/components/VirtualTables/index.js +1 -1
  169. package/build/components/Widget/index.js +1 -1
  170. package/build/components/WindowSideBar/index.js +1 -1
  171. package/build/components/index.js +1 -1
  172. package/build/components/primitives/index.js +1 -1
  173. package/build/constants/currency.d.ts +0 -1
  174. package/build/constants/timezones.d.ts +0 -12
  175. package/build/hooks/index.js +1 -1
  176. package/build/index.js +1 -1
  177. package/build/types/appConfig.d.ts +0 -4
  178. package/build/types/day.d.ts +0 -2
  179. package/build/utils/date.d.ts +16 -33
  180. package/build/utils/index.js +1 -1
  181. package/build/utils/localStorage.d.ts +0 -2
  182. package/build/utils/timezone.d.ts +0 -7
  183. package/package.json +2 -6
  184. package/build/_chunks/chunk-5NJT3KT7.js +0 -1
  185. package/build/_chunks/chunk-DPXDHE2P.js +0 -2
  186. package/build/_chunks/chunk-ELLSLTUV.js +0 -1
  187. package/build/components/TableCells/CustomCells/ZonedDateCell/ZonedDateCell.d.ts +0 -28
  188. package/build/components/TableCells/CustomCells/ZonedDateCell/index.d.ts +0 -2
  189. package/build/datetime/index.d.ts +0 -8
  190. package/build/datetime/index.js +0 -1
  191. package/build/datetime/instant.d.ts +0 -79
  192. package/build/datetime/zone.d.ts +0 -32
@@ -1 +0,0 @@
1
- import I from'dayjs';import O from'dayjs/plugin/calendar.js';import {getTimezone,getCountry}from'countries-and-timezones';var S=new Intl.DisplayNames(["en"],{type:"region"}),T=e=>{try{return S.of(e)}catch{return}},C={US:"America/New_York",CA:"America/Toronto",BR:"America/Sao_Paulo",MX:"America/Mexico_City",AR:"America/Argentina/Buenos_Aires",CL:"America/Santiago",AU:"Australia/Sydney",NZ:"Pacific/Auckland",RU:"Europe/Moscow",UA:"Europe/Kyiv",ES:"Europe/Madrid",PT:"Europe/Lisbon",ID:"Asia/Jakarta",KZ:"Asia/Almaty",UZ:"Asia/Tashkent",MN:"Asia/Ulaanbaatar"},Z={id:"UTC",countryCode:"UTC",countryName:"UTC"},b=e=>{if(!e)return false;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}),!0}catch{return false}},p=e=>{if(!e)return;if(e==="UTC")return Z;let n=getTimezone(e);if(n){let[t]=n.countries;return {id:e,countryCode:t??"",countryName:T(t)??t??e}}return b(e)?{id:e,countryCode:"",countryName:e}:void 0},$=e=>{let n=e?.trim().toUpperCase();if(!n)return;if(n==="UTC")return Z;let t=getCountry(n),o=C[n]??t?.timezones[0];if(o)return {id:o,countryCode:n,countryName:T(n)??t?.name??n}},E=()=>{try{return Intl.DateTimeFormat().resolvedOptions().timeZone||void 0}catch{return}},R=e=>typeof e=="string"?e:"id"in e?e.id:e.timezone;I.extend(O);var N=(e,n=Date.now())=>`${p(e)?.countryName??e} (${F(e,n)})`,_=(e,n=Date.now())=>({countryCode:e.countryCode,label:N(e.id,n),timezone:e.id,offset:(s(e.id,n)??0)/60}),c=6e4,Y=/^(\d{4})-(\d{2})-(\d{2})(?:[T ](\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,3}))?)?)?$/,g=/(?:Z|[+-]\d{2}:?\d{2})$/i,D=e=>Number.isNaN(e.getTime())?void 0:{year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate(),hour:e.getHours(),minute:e.getMinutes(),second:e.getSeconds(),ms:e.getMilliseconds()},x=e=>{let n=e.trim().match(Y);if(!n)return;let[,t,o,r,a="0",i="0",d="0",u="0"]=n;return {year:Number(t),month:Number(o),day:Number(r),hour:Number(a),minute:Number(i),second:Number(d),ms:Number(u.padEnd(3,"0"))}},A=e=>{let n=t=>Number(e.find(o=>o.type===t)?.value??0);return {year:n("year"),month:n("month"),day:n("day"),hour:n("hour"),minute:n("minute"),second:n("second"),ms:0}},h=new Map,w=e=>{let n=h.get(e);if(n)return n;try{let t=new Intl.DateTimeFormat("en-US",{timeZone:e,hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"});return h.set(e,t),t}catch{return}},y=e=>{if(e==null||e==="")return;if(e instanceof Date)return Number.isNaN(e.getTime())?void 0:e;if(typeof e=="number")return Number.isFinite(e)?new Date(e):void 0;let n=e.trim();if(!g.test(n))return;let t=new Date(n);return Number.isNaN(t.getTime())?void 0:t},s=(e,n=Date.now())=>{let t=y(n),o=w(e);if(!t||!o)return;let{year:r,month:a,day:i,hour:d,minute:u,second:l}=A(o.formatToParts(t)),M=Date.UTC(r,a-1,i,d,u,l);return Math.round((M-t.getTime())/c)},F=(e,n=Date.now())=>{let t=s(e,n);if(t===void 0)return "";let o=a=>String(a).padStart(2,"0"),r=Math.abs(t);return `UTC${t<0?"-":"+"}${o(Math.floor(r/60))}:${o(r%60)}`},f=(e,n)=>{if(e==null||e==="")return;if(!(e instanceof Date)){if(typeof e=="number")return Number.isFinite(e)?new Date(e):void 0;if(g.test(e.trim()))return y(e)}let t=typeof e=="string"?x(e):D(e);if(!t)return;let o=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,t.second,t.ms),r=s(n,o);if(r===void 0)return;let a=s(n,o-r*c)??r;return new Date(o-Math.min(r,a)*c)},L=(e,n)=>{if(!(typeof e!="number"||!Number.isFinite(e)))return f(new Date(e).toISOString().replace(/Z$/,""),n)},P=(e,n)=>{let t=y(e);if(!t)return;let o=s(n,t);if(o!==void 0)return t.getTime()+o*c},m=(e,n)=>{let t=y(e),o=w(n);if(!t||!o)return;let{year:r,month:a,day:i,hour:d,minute:u,second:l}=A(o.formatToParts(t));return new Date(r,a-1,i,d,u,l,t.getMilliseconds())},W=(e,n)=>{if(e==null||e==="")return;if(e instanceof Date)return D(e);if(typeof e=="string"&&!g.test(e.trim()))return x(e);let t=m(e,n);return t?D(t):void 0},B=(e,n)=>{let t=f(e?.[0],n);if(!t)return {};let o=W(e?.[1],n);if(!o)return {from:t.getTime()};let r=f(new Date(o.year,o.month-1,o.day+1),n);return r?{from:t.getTime(),to:r.getTime()-1}:{from:t.getTime()}},z=(e,n)=>{let t=", h:mma",o=e.isSame(n,"year")?"MMM DD":"MMM DD, YYYY";return {sameDay:`[Today]${t}`,nextDay:`[Tomorrow]${t}`,lastDay:`[Yesterday]${t}`,sameElse:`${o}${t}`,lastWeek:`${o}${t}`,nextWeek:`${o}${t}`}},j=(e,n,t)=>{let o=m(e,n),r=m(Date.now(),n);if(!o||!r)return "";let a=I(o),i=I(r);return a.calendar(i,t??z(a,i))},K=(e,n)=>{let t=m(Date.now(),n);if(!t)return;let o=Number.isFinite(e)&&e>=1?Math.floor(e):1,{year:r,month:a,day:i}={year:t.getFullYear(),month:t.getMonth(),day:t.getDate()};return [new Date(r,a,i-(o-1)),new Date(r,a,i,23,59,59,999)]};export{C as a,b,p as c,$ as d,E as e,R as f,N as g,_ as h,s as i,F as j,f as k,L as l,P as m,m as n,B as o,j as p,K as q};
@@ -1,28 +0,0 @@
1
- /// <reference types="react" />
2
- import type { TableCellProps } from '@mui/material';
3
- import { type Instant, type ZoneId } from '../../../../datetime/index.js';
4
- import type { CalendarFormats } from '../../../../utils/index.js';
5
- import type { TableMode } from '../../../../types/index.js';
6
- export interface ZonedDateCellProps extends TableCellProps {
7
- /** The instant exactly as the backend sent it — epoch ms, or an ISO string with an offset. */
8
- value: Instant;
9
- /**
10
- * The zone the backend serialised `value` in — `'UTC'` when it is true UTC. Required
11
- * on purpose: a silent `?? 'UTC'` default is how a zone-less wall clock gets rendered
12
- * as if it were UTC. This prop records a backend defect; the endpoint should emit offsets.
13
- */
14
- source: ZoneId;
15
- /** The zone to display in. */
16
- zone: ZoneId;
17
- /** A second zone for the tooltip icon. Shown only when it differs from `zone`. */
18
- tooltipZone?: ZoneId;
19
- format?: CalendarFormats;
20
- flagIcon?: string;
21
- hasFlag?: boolean;
22
- tableMode?: TableMode;
23
- }
24
- /**
25
- * States zones instead of offsets. A layout adapter, not a logic owner: the MFE names
26
- * *which* zones, `@datetime` decides *how*, this only renders.
27
- */
28
- export default function ZonedDateCell({ value, source, zone, tooltipZone, format, ...props }: ZonedDateCellProps): import("react").JSX.Element;
@@ -1,2 +0,0 @@
1
- export { default as ZonedDateCell } from './ZonedDateCell';
2
- export type { ZonedDateCellProps } from './ZonedDateCell';
@@ -1,8 +0,0 @@
1
- /**
2
- * The module's public surface, and nothing else: `./zone` owns zone identity,
3
- * `./instant` owns offsets and the instant ↔ wall-clock conversion.
4
- */
5
- export { formatInZone, lastNDays, offsetLabelAt, offsetMinutesAt, toEpochFromInstant, toInstant, toInstantFromEpoch, toInstantRange, toLegacyTimezone, toWallClock, zoneLabelOf, } from './instant';
6
- export type { DateInput, Instant, InstantRange } from './instant';
7
- export { PRIMARY_ZONE_BY_COUNTRY, isZoneId, localZone, zoneByCountry, zoneById, zoneIdOf } from './zone';
8
- export type { Zone, ZoneId } from './zone';
@@ -1 +0,0 @@
1
- export{a as PRIMARY_ZONE_BY_COUNTRY,p as formatInZone,b as isZoneId,q as lastNDays,e as localZone,j as offsetLabelAt,i as offsetMinutesAt,m as toEpochFromInstant,k as toInstant,l as toInstantFromEpoch,o as toInstantRange,h as toLegacyTimezone,n as toWallClock,d as zoneByCountry,c as zoneById,f as zoneIdOf,g as zoneLabelOf}from'../_chunks/chunk-ELLSLTUV.js';
@@ -1,79 +0,0 @@
1
- import type { CalendarFormats, Timezone } from '../types/index.js';
2
- import type { Zone, ZoneId } from './zone';
3
- /**
4
- * An absolute moment: epoch ms, a `Date`, or a string with an explicit offset.
5
- * A zone-less string like `'2026-07-04 15:00'` is a wall clock, not an `Instant`.
6
- */
7
- export type Instant = Date | number | string;
8
- /** Everything the conversion helpers accept, including the "no value" cases. */
9
- export type DateInput = Instant | null | undefined;
10
- /** The wire shape of a date filter. Either end may be absent, never `NaN`. */
11
- export interface InstantRange {
12
- from?: number;
13
- to?: number;
14
- }
15
- /**
16
- * The picker's label — `'Egypt (UTC+03:00)'` — with the offset resolved at `at`.
17
- * Resolving it here, and not when the zone was built, is the Egypt fix.
18
- */
19
- export declare const zoneLabelOf: (zoneId: ZoneId, at?: Instant) => string;
20
- /** Migration boundary: for components still typed against the legacy `Timezone`. */
21
- export declare const toLegacyTimezone: (zone: Zone, at?: Instant) => Timezone;
22
- /**
23
- * The zone's offset in **minutes, not hours**, at the instant — `180` for Cairo in
24
- * July, `120` in January, `330` for Kolkata. `undefined` for an unknown zone, because
25
- * `0` would claim the zone *is* UTC.
26
- *
27
- * The legacy `formatUTCOffset` and `Timezone.offset` are in hours; the two units are
28
- * not interchangeable.
29
- */
30
- export declare const offsetMinutesAt: (zone: ZoneId, at?: Instant) => number | undefined;
31
- /**
32
- * The wire string `'UTC+03:00'` / `'UTC+05:30'` / `'UTC-04:00'`, built from minutes so
33
- * no zone round-trips through a fractional hour. `''` for an unknown zone.
34
- */
35
- export declare const offsetLabelAt: (zone: ZoneId, at?: Instant) => string;
36
- /**
37
- * Places a wall clock in a zone; an epoch or an offset-bearing string is already
38
- * absolute and passes through. A wall clock occurring twice takes the **earlier**
39
- * occurrence, one that does not exist shifts **forward** past the gap.
40
- */
41
- export declare const toInstant: (value: DateInput, zone: ZoneId) => Date | undefined;
42
- /**
43
- * The receive direction of a **wire epoch**: an epoch whose UTC rendering *is* a wall
44
- * clock in `zone` — the shape backends serialise when they encode a wall clock as an
45
- * epoch (the wallet's Kuwait contract). Round-trips
46
- * `toWallClock(instant, zone).getTime()`. `undefined` for a non-finite epoch or an
47
- * unknown zone.
48
- */
49
- export declare const toInstantFromEpoch: (epoch: DateInput, zone: ZoneId) => Date | undefined;
50
- /**
51
- * The send direction of a **wire epoch**: the zone's wall clock at `instant`, encoded as
52
- * an epoch whose UTC rendering *is* that wall clock — the inverse of
53
- * `toInstantFromEpoch` for a fixed-offset zone. Built from the instant plus the offset,
54
- * never from a wall-clock `Date`'s `getTime()`, which would re-interpret its fields on
55
- * the host's clock. `undefined` for an unknown zone or an unreadable instant.
56
- */
57
- export declare const toEpochFromInstant: (instant: Instant, zone: ZoneId) => number | undefined;
58
- /**
59
- * The zone's wall clock at an instant. The returned `Date`'s **local** fields are that
60
- * wall clock, so every formatter renders it identically on every machine.
61
- */
62
- export declare const toWallClock: (value: DateInput, zone: ZoneId) => Date | undefined;
63
- /**
64
- * A picked range → the wire's `period.date` pair. The upper bound is the **end of the
65
- * last day**, taken as the next day's start − 1 ms, because a day is not 24 hours.
66
- * An unreadable bound is omitted, never thrown on.
67
- */
68
- export declare const toInstantRange: (range: readonly DateInput[] | undefined, zone: ZoneId) => InstantRange;
69
- /**
70
- * Formats an instant as it reads in a zone — "Today, 3:00pm", "Mar 05, 2:00pm".
71
- * The value *and* the "now" behind Today/Yesterday are the zone's wall clocks, so
72
- * the answer is the same on every machine.
73
- */
74
- export declare const formatInZone: (value: DateInput, zone: ZoneId, format?: CalendarFormats) => string;
75
- /**
76
- * The last `days` days in a zone, today included, as wall clocks.
77
- * `undefined` for an unknown zone, so nothing silently falls back to the host's today.
78
- */
79
- export declare const lastNDays: (days: number, zone: ZoneId) => [Date, Date] | undefined;
@@ -1,32 +0,0 @@
1
- import type { Timezone } from '../types/index.js';
2
- /** An IANA zone identifier, e.g. `'Africa/Cairo'`. */
3
- export type ZoneId = string;
4
- /**
5
- * A country's zone. Carries **no offset** — an offset is a property of a zone
6
- * at a moment, not of the zone, so it is always resolved with `offsetMinutesAt`.
7
- */
8
- export interface Zone {
9
- id: ZoneId;
10
- /** For the flag. Empty when the zone has no single country. */
11
- countryCode: string;
12
- /** For the label. Falls back to the zone id. */
13
- countryName: string;
14
- }
15
- /**
16
- * Pins multi-zone countries to their primary commercial zone. The package lists a
17
- * country's zones alphabetically, so its first entry is meaningless — `'US'` would
18
- * be `America/Adak`. Knowingly lossy: no record carries an IANA zone, so `country`
19
- * is the only input available. Countries whose zones share one offset (MY, VN, CN,
20
- * DE, PS, CY) are absent — the alphabetical pick is already right there.
21
- */
22
- export declare const PRIMARY_ZONE_BY_COUNTRY: Record<string, ZoneId>;
23
- /** Whether `Intl` recognises `value` as a zone. Never throws. */
24
- export declare const isZoneId: (value: string) => boolean;
25
- /** Resolves a zone id, or `undefined` — substituting a default is the bug this replaces. */
26
- export declare const zoneById: (id: ZoneId) => Zone | undefined;
27
- /** Resolves a country's zone, or `undefined` when it has none (a typo must not become Riyadh). */
28
- export declare const zoneByCountry: (countryCode: string) => Zone | undefined;
29
- /** The browser's own zone, or `undefined` in an environment without `Intl`. */
30
- export declare const localZone: () => ZoneId | undefined;
31
- /** Migration boundary: a caller still holding a legacy `Timezone` or `Zone` normalizes once here. */
32
- export declare const zoneIdOf: (ref: ZoneId | Zone | Timezone) => ZoneId;