@bereasoftware/time-guard 2.6.1 → 2.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/README.en.md +232 -0
  2. package/README.md +259 -4
  3. package/dist/angular/index.cjs +148 -0
  4. package/dist/angular/index.d.ts +2 -0
  5. package/dist/angular/index.es.js +143 -0
  6. package/dist/angular.d.ts +59 -0
  7. package/dist/calendars/index.cjs +357 -2
  8. package/dist/calendars/index.es.js +99 -68
  9. package/dist/chunk-Ddh6569R.cjs +36 -0
  10. package/dist/core-BAd7GYfw.js +1809 -0
  11. package/dist/core-CafqOI7W.cjs +1892 -0
  12. package/dist/core.d.ts +224 -0
  13. package/dist/index.d.ts +9 -0
  14. package/dist/locales/african.locale.d.ts +7 -0
  15. package/dist/locales/index.cjs +7 -1
  16. package/dist/{types/locales → locales}/index.d.ts +2 -2
  17. package/dist/locales/index.es.js +3 -3
  18. package/dist/locales/south-american.locale.d.ts +7 -0
  19. package/dist/locales-C2-lOmC8.cjs +3537 -0
  20. package/dist/{locales-DSBvgSaw.js → locales-CcuSu4P1.js} +749 -33
  21. package/dist/native/index.cjs +48 -0
  22. package/dist/native/index.d.ts +2 -0
  23. package/dist/native/index.es.js +18 -0
  24. package/dist/native.d.ts +9 -0
  25. package/dist/plugins/advanced-format.cjs +105 -2
  26. package/dist/plugins/advanced-format.es.js +63 -45
  27. package/dist/plugins/duration.cjs +258 -2
  28. package/dist/plugins/duration.es.js +165 -61
  29. package/dist/plugins/relative-time.cjs +166 -2
  30. package/dist/plugins/relative-time.es.js +74 -37
  31. package/dist/qwik/index.cjs +104 -0
  32. package/dist/qwik/index.d.ts +2 -0
  33. package/dist/qwik/index.es.js +100 -0
  34. package/dist/qwik.d.ts +32 -0
  35. package/dist/react/index.cjs +112 -0
  36. package/dist/react/index.d.ts +2 -0
  37. package/dist/react/index.es.js +103 -0
  38. package/dist/react.d.ts +46 -0
  39. package/dist/solid/index.cjs +127 -0
  40. package/dist/solid/index.d.ts +2 -0
  41. package/dist/solid/index.es.js +122 -0
  42. package/dist/solid.d.ts +53 -0
  43. package/dist/svelte/index.cjs +398 -0
  44. package/dist/svelte/index.d.ts +2 -0
  45. package/dist/svelte/index.es.js +393 -0
  46. package/dist/svelte.d.ts +88 -0
  47. package/dist/time-guard.cjs +7359 -4
  48. package/dist/time-guard.es.js +3625 -8085
  49. package/dist/time-guard.iife.js +13549 -4
  50. package/dist/time-guard.umd.js +13550 -4
  51. package/dist/types/index.d.ts +651 -127
  52. package/dist/vue/index.cjs +143 -0
  53. package/dist/vue/index.d.ts +2 -0
  54. package/dist/vue/index.es.js +137 -0
  55. package/dist/vue.d.ts +35 -0
  56. package/package.json +107 -27
  57. package/dist/calendars/index.cjs.map +0 -1
  58. package/dist/calendars/index.es.js.map +0 -1
  59. package/dist/locales-DSBvgSaw.js.map +0 -1
  60. package/dist/locales-ybx7jS8G.cjs +0 -2
  61. package/dist/locales-ybx7jS8G.cjs.map +0 -1
  62. package/dist/plugins/advanced-format.cjs.map +0 -1
  63. package/dist/plugins/advanced-format.es.js.map +0 -1
  64. package/dist/plugins/duration.cjs.map +0 -1
  65. package/dist/plugins/duration.es.js.map +0 -1
  66. package/dist/plugins/relative-time.cjs.map +0 -1
  67. package/dist/plugins/relative-time.es.js.map +0 -1
  68. package/dist/time-guard.cjs.map +0 -1
  69. package/dist/time-guard.es.js.map +0 -1
  70. package/dist/time-guard.iife.js.map +0 -1
  71. package/dist/time-guard.umd.js.map +0 -1
  72. package/dist/types/types/index.d.ts +0 -641
  73. /package/dist/{types/adapters → adapters}/temporal.adapter.d.ts +0 -0
  74. /package/dist/{types/calendars → calendars}/calendar.manager.d.ts +0 -0
  75. /package/dist/{types/calendars → calendars}/index.d.ts +0 -0
  76. /package/dist/{types/formatters → formatters}/date.formatter.d.ts +0 -0
  77. /package/dist/{types/locales → locales}/additional.locale.d.ts +0 -0
  78. /package/dist/{types/locales → locales}/asian.locale.d.ts +0 -0
  79. /package/dist/{types/locales → locales}/english.locale.d.ts +0 -0
  80. /package/dist/{types/locales → locales}/european.locale.d.ts +0 -0
  81. /package/dist/{types/locales → locales}/locale.manager.d.ts +0 -0
  82. /package/dist/{types/locales → locales}/middle-eastern.locale.d.ts +0 -0
  83. /package/dist/{types/locales → locales}/nordic.locale.d.ts +0 -0
  84. /package/dist/{types/locales → locales}/romance.locale.d.ts +0 -0
  85. /package/dist/{types/locales → locales}/slavic.locale.d.ts +0 -0
  86. /package/dist/{types/locales → locales}/spanish.locale.d.ts +0 -0
  87. /package/dist/{types/plugins → plugins}/advanced-format/index.d.ts +0 -0
  88. /package/dist/{types/plugins → plugins}/advanced-format.d.ts +0 -0
  89. /package/dist/{types/plugins → plugins}/duration/index.d.ts +0 -0
  90. /package/dist/{types/plugins → plugins}/duration/types.d.ts +0 -0
  91. /package/dist/{types/plugins → plugins}/duration.d.ts +0 -0
  92. /package/dist/{types/plugins → plugins}/index.d.ts +0 -0
  93. /package/dist/{types/plugins → plugins}/manager.d.ts +0 -0
  94. /package/dist/{types/plugins → plugins}/relative-time/index.d.ts +0 -0
  95. /package/dist/{types/plugins → plugins}/relative-time/types.d.ts +0 -0
  96. /package/dist/{types/plugins → plugins}/relative-time.d.ts +0 -0
  97. /package/dist/{types/time-guard.d.ts → time-guard.d.ts} +0 -0
  98. /package/dist/{types/utils → utils}/duration-locale.d.ts +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"file":"relative-time.cjs","names":[],"sources":["../../src/plugins/relative-time/index.ts"],"sourcesContent":["/**\n * TimeGuard Relative Time Plugin\n * Adds human-readable time differences (e.g., \"2 hours ago\", \"in 3 days\")\n * Follows SOLID principles and Temporal API standards\n */\n\nimport type { ITimeGuardPlugin } from '../../types';\nimport type { TimeGuard } from '../../index';\nimport type {\n RelativeTimeConfig,\n RelativeTimeFormats,\n RelativeTimeThreshold,\n} from './types';\n\nconst DEFAULT_THRESHOLDS: RelativeTimeThreshold[] = [\n { l: 's', r: 44, d: 'second' },\n { l: 'm', r: 89 },\n { l: 'mm', r: 44, d: 'minute' },\n { l: 'h', r: 89 },\n { l: 'hh', r: 21, d: 'hour' },\n { l: 'd', r: 35 },\n { l: 'dd', r: 25, d: 'day' },\n { l: 'M', r: 45 },\n { l: 'MM', r: 10, d: 'month' },\n { l: 'y', r: 17 },\n { l: 'yy', d: 'year' },\n];\n\nconst DEFAULT_FORMATS: RelativeTimeFormats = {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n};\n\nexport class RelativeTimePlugin implements ITimeGuardPlugin {\n name = 'relative-time';\n version = '1.0.0';\n\n private config: RelativeTimeConfig;\n private formats: RelativeTimeFormats;\n\n constructor(config?: RelativeTimeConfig) {\n this.config = {\n thresholds: config?.thresholds || DEFAULT_THRESHOLDS,\n rounding: config?.rounding || Math.round,\n };\n this.formats = DEFAULT_FORMATS;\n }\n\n /**\n * Install plugin into TimeGuard\n */\n install(TimeGuardClass: typeof TimeGuard): void {\n const plugin = this;\n\n /**\n * Get relative time string (e.g., \"2 hours ago\")\n */\n (\n TimeGuardClass.prototype as unknown as {\n fromNow: (withoutSuffix?: boolean) => string;\n }\n ).fromNow = function (withoutSuffix?: boolean): string {\n return plugin.formatRelativeTime(\n this as unknown as TimeGuard,\n false,\n withoutSuffix,\n );\n };\n\n (\n TimeGuardClass.prototype as unknown as {\n toNow: (withoutSuffix?: boolean) => string;\n }\n ).toNow = function (withoutSuffix?: boolean): string {\n return plugin.formatRelativeTime(\n this as unknown as TimeGuard,\n true,\n withoutSuffix,\n );\n };\n\n (\n TimeGuardClass.prototype as unknown as {\n humanize: (other?: TimeGuard, withoutSuffix?: boolean) => string;\n }\n ).humanize = function (other?: TimeGuard, withoutSuffix?: boolean): string {\n if (other) {\n return plugin.formatRelativeTime(\n this as unknown as TimeGuard,\n other.isAfter(this as unknown as TimeGuard),\n withoutSuffix,\n );\n }\n return plugin.formatRelativeTime(\n this as unknown as TimeGuard,\n false,\n withoutSuffix,\n );\n };\n }\n\n /**\n * Format relative time\n */\n private formatRelativeTime(\n date: TimeGuard,\n isFuture: boolean,\n withoutSuffix?: boolean,\n ): string {\n const now = (date.constructor as typeof TimeGuard).now();\n const diff = now.diff(date, 'millisecond');\n const absDiff = Math.abs(diff);\n const isFromNow = diff > 0;\n const actualIsFuture = isFuture ?? !isFromNow;\n\n const result = this.getRelativeTimeString(absDiff);\n\n if (withoutSuffix) {\n return result;\n }\n\n const suffix = actualIsFuture ? this.formats.future : this.formats.past;\n return suffix.replace('%s', result);\n }\n\n /**\n * Get relative time string based on milliseconds\n */\n private getRelativeTimeString(milliseconds: number): string {\n const thresholds = this.config.thresholds || DEFAULT_THRESHOLDS;\n const rounding = this.config.rounding || Math.round;\n\n for (let i = 0; i < thresholds.length; i++) {\n const threshold = thresholds[i];\n const nextThreshold =\n i + 1 < thresholds.length ? thresholds[i + 1] : null;\n\n // Skip if we haven't reached this threshold\n if (nextThreshold && threshold.r && milliseconds < threshold.r * 1000) {\n continue;\n }\n\n // Convert to appropriate unit\n let value: number;\n if (threshold.d) {\n const unitMs = this.getUnitMilliseconds(threshold.d);\n value = rounding(milliseconds / unitMs);\n } else {\n value = 1;\n }\n\n const label = threshold.l;\n const format = this.formats[label as keyof typeof this.formats] || label;\n\n if (typeof format === 'string') {\n return format.includes('%d')\n ? format.replace('%d', String(value))\n : format;\n }\n\n return format;\n }\n\n // Fallback\n return `${rounding(milliseconds / 1000)} seconds`;\n }\n\n /**\n * Get milliseconds per unit\n */\n private getUnitMilliseconds(unit: string): number {\n const msMap: Record<string, number> = {\n second: 1000,\n minute: 1000 * 60,\n hour: 1000 * 60 * 60,\n day: 1000 * 60 * 60 * 24,\n month: 1000 * 60 * 60 * 24 * 30,\n year: 1000 * 60 * 60 * 24 * 365,\n };\n return msMap[unit] || 1;\n }\n\n /**\n * Set format strings\n */\n setFormats(formats: Partial<RelativeTimeFormats>): void {\n Object.assign(this.formats, formats);\n }\n\n /**\n * Get current formats\n */\n getFormats(): RelativeTimeFormats {\n return { ...this.formats };\n }\n}\n\n/**\n * Create and export default instance\n */\nexport default new RelativeTimePlugin();\n"],"mappings":"+FAcA,IAAM,EAA8C,CAClD,CAAE,EAAG,IAAK,EAAG,GAAI,EAAG,QAAS,EAC7B,CAAE,EAAG,IAAK,EAAG,EAAG,EAChB,CAAE,EAAG,KAAM,EAAG,GAAI,EAAG,QAAS,EAC9B,CAAE,EAAG,IAAK,EAAG,EAAG,EAChB,CAAE,EAAG,KAAM,EAAG,GAAI,EAAG,MAAO,EAC5B,CAAE,EAAG,IAAK,EAAG,EAAG,EAChB,CAAE,EAAG,KAAM,EAAG,GAAI,EAAG,KAAM,EAC3B,CAAE,EAAG,IAAK,EAAG,EAAG,EAChB,CAAE,EAAG,KAAM,EAAG,GAAI,EAAG,OAAQ,EAC7B,CAAE,EAAG,IAAK,EAAG,EAAG,EAChB,CAAE,EAAG,KAAM,EAAG,MAAO,CACvB,EAEM,EAAuC,CAC3C,OAAQ,QACR,KAAM,SACN,EAAG,gBACH,EAAG,WACH,GAAI,aACJ,EAAG,UACH,GAAI,WACJ,EAAG,QACH,GAAI,UACJ,EAAG,UACH,GAAI,YACJ,EAAG,SACH,GAAI,UACN,EAEa,EAAb,KAA4D,CAC1D,KAAO,gBACP,QAAU,QAEV,OACA,QAEA,YAAY,EAA6B,CACvC,KAAK,OAAS,CACZ,WAAY,GAAQ,YAAc,EAClC,SAAU,GAAQ,UAAY,KAAK,KACrC,EACA,KAAK,QAAU,CACjB,CAKA,QAAQ,EAAwC,CAC9C,IAAM,EAAS,KAKf,EACiB,UAGf,QAAU,SAAU,EAAiC,CACrD,OAAO,EAAO,mBACZ,KACA,GACA,CACF,CACF,EAEA,EACiB,UAGf,MAAQ,SAAU,EAAiC,CACnD,OAAO,EAAO,mBACZ,KACA,GACA,CAC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AKA,WAAW,EAA6C,CACtD,OAAO,OAAO,KAAK,QAAS,CAAO,CACrC,CAKA,YAAkC,CAChC,MAAO,CAAE,GAAG,KAAK,OAAQ,CAC3B,CACF,EAKA,EAAe,IAAI"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"relative-time.es.js","names":[],"sources":["../../src/plugins/relative-time/index.ts"],"sourcesContent":["/**\n * TimeGuard Relative Time Plugin\n * Adds human-readable time differences (e.g., \"2 hours ago\", \"in 3 days\")\n * Follows SOLID principles and Temporal API standards\n */\n\nimport type { ITimeGuardPlugin } from '../../types';\nimport type { TimeGuard } from '../../index';\nimport type {\n RelativeTimeConfig,\n RelativeTimeFormats,\n RelativeTimeThreshold,\n} from './types';\n\nconst DEFAULT_THRESHOLDS: RelativeTimeThreshold[] = [\n { l: 's', r: 44, d: 'second' },\n { l: 'm', r: 89 },\n { l: 'mm', r: 44, d: 'minute' },\n { l: 'h', r: 89 },\n { l: 'hh', r: 21, d: 'hour' },\n { l: 'd', r: 35 },\n { l: 'dd', r: 25, d: 'day' },\n { l: 'M', r: 45 },\n { l: 'MM', r: 10, d: 'month' },\n { l: 'y', r: 17 },\n { l: 'yy', d: 'year' },\n];\n\nconst DEFAULT_FORMATS: RelativeTimeFormats = {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n};\n\nexport class RelativeTimePlugin implements ITimeGuardPlugin {\n name = 'relative-time';\n version = '1.0.0';\n\n private config: RelativeTimeConfig;\n private formats: RelativeTimeFormats;\n\n constructor(config?: RelativeTimeConfig) {\n this.config = {\n thresholds: config?.thresholds || DEFAULT_THRESHOLDS,\n rounding: config?.rounding || Math.round,\n };\n this.formats = DEFAULT_FORMATS;\n }\n\n /**\n * Install plugin into TimeGuard\n */\n install(TimeGuardClass: typeof TimeGuard): void {\n const plugin = this;\n\n /**\n * Get relative time string (e.g., \"2 hours ago\")\n */\n (\n TimeGuardClass.prototype as unknown as {\n fromNow: (withoutSuffix?: boolean) => string;\n }\n ).fromNow = function (withoutSuffix?: boolean): string {\n return plugin.formatRelativeTime(\n this as unknown as TimeGuard,\n false,\n withoutSuffix,\n );\n };\n\n (\n TimeGuardClass.prototype as unknown as {\n toNow: (withoutSuffix?: boolean) => string;\n }\n ).toNow = function (withoutSuffix?: boolean): string {\n return plugin.formatRelativeTime(\n this as unknown as TimeGuard,\n true,\n withoutSuffix,\n );\n };\n\n (\n TimeGuardClass.prototype as unknown as {\n humanize: (other?: TimeGuard, withoutSuffix?: boolean) => string;\n }\n ).humanize = function (other?: TimeGuard, withoutSuffix?: boolean): string {\n if (other) {\n return plugin.formatRelativeTime(\n this as unknown as TimeGuard,\n other.isAfter(this as unknown as TimeGuard),\n withoutSuffix,\n );\n }\n return plugin.formatRelativeTime(\n this as unknown as TimeGuard,\n false,\n withoutSuffix,\n );\n };\n }\n\n /**\n * Format relative time\n */\n private formatRelativeTime(\n date: TimeGuard,\n isFuture: boolean,\n withoutSuffix?: boolean,\n ): string {\n const now = (date.constructor as typeof TimeGuard).now();\n const diff = now.diff(date, 'millisecond');\n const absDiff = Math.abs(diff);\n const isFromNow = diff > 0;\n const actualIsFuture = isFuture ?? !isFromNow;\n\n const result = this.getRelativeTimeString(absDiff);\n\n if (withoutSuffix) {\n return result;\n }\n\n const suffix = actualIsFuture ? this.formats.future : this.formats.past;\n return suffix.replace('%s', result);\n }\n\n /**\n * Get relative time string based on milliseconds\n */\n private getRelativeTimeString(milliseconds: number): string {\n const thresholds = this.config.thresholds || DEFAULT_THRESHOLDS;\n const rounding = this.config.rounding || Math.round;\n\n for (let i = 0; i < thresholds.length; i++) {\n const threshold = thresholds[i];\n const nextThreshold =\n i + 1 < thresholds.length ? thresholds[i + 1] : null;\n\n // Skip if we haven't reached this threshold\n if (nextThreshold && threshold.r && milliseconds < threshold.r * 1000) {\n continue;\n }\n\n // Convert to appropriate unit\n let value: number;\n if (threshold.d) {\n const unitMs = this.getUnitMilliseconds(threshold.d);\n value = rounding(milliseconds / unitMs);\n } else {\n value = 1;\n }\n\n const label = threshold.l;\n const format = this.formats[label as keyof typeof this.formats] || label;\n\n if (typeof format === 'string') {\n return format.includes('%d')\n ? format.replace('%d', String(value))\n : format;\n }\n\n return format;\n }\n\n // Fallback\n return `${rounding(milliseconds / 1000)} seconds`;\n }\n\n /**\n * Get milliseconds per unit\n */\n private getUnitMilliseconds(unit: string): number {\n const msMap: Record<string, number> = {\n second: 1000,\n minute: 1000 * 60,\n hour: 1000 * 60 * 60,\n day: 1000 * 60 * 60 * 24,\n month: 1000 * 60 * 60 * 24 * 30,\n year: 1000 * 60 * 60 * 24 * 365,\n };\n return msMap[unit] || 1;\n }\n\n /**\n * Set format strings\n */\n setFormats(formats: Partial<RelativeTimeFormats>): void {\n Object.assign(this.formats, formats);\n }\n\n /**\n * Get current formats\n */\n getFormats(): RelativeTimeFormats {\n return { ...this.formats };\n }\n}\n\n/**\n * Create and export default instance\n */\nexport default new RelativeTimePlugin();\n"],"mappings":";;AAcA,IAAM,IAA8C;CAClD;EAAE,GAAG;EAAK,GAAG;EAAI,GAAG;CAAS;CAC7B;EAAE,GAAG;EAAK,GAAG;CAAG;CAChB;EAAE,GAAG;EAAM,GAAG;EAAI,GAAG;CAAS;CAC9B;EAAE,GAAG;EAAK,GAAG;CAAG;CAChB;EAAE,GAAG;EAAM,GAAG;EAAI,GAAG;CAAO;CAC5B;EAAE,GAAG;EAAK,GAAG;CAAG;CAChB;EAAE,GAAG;EAAM,GAAG;EAAI,GAAG;CAAM;CAC3B;EAAE,GAAG;EAAK,GAAG;CAAG;CAChB;EAAE,GAAG;EAAM,GAAG;EAAI,GAAG;CAAQ;CAC7B;EAAE,GAAG;EAAK,GAAG;CAAG;CAChB;EAAE,GAAG;EAAM,GAAG;CAAO;AACvB,GAEM,IAAuC;CAC3C,QAAQ;CACR,MAAM;C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