@generaltranslation/react-core 1.6.7 → 1.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # @generaltranslation/react-core
2
2
 
3
+ ## 1.7.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#1153](https://github.com/generaltranslation/gt/pull/1153) [`df6bea8`](https://github.com/generaltranslation/gt/commit/df6bea819a4274018d6d99c7d3e00e7c5372ccbc) Thanks [@moss-bryophyta](https://github.com/moss-bryophyta)! - Add `<RelativeTime>` component for localized relative time formatting
8
+ - New `<RelativeTime>` component with two usage modes:
9
+ - Auto-select unit from a Date: `<RelativeTime>{someDate}</RelativeTime>` → "2 hours ago"
10
+ - Explicit value + unit: `<RelativeTime value={-1} unit="day" />` → "yesterday"
11
+ - Core: `_selectRelativeTimeUnit()` auto-selects the best unit (seconds → minutes → hours → days → weeks → months → years)
12
+ - Core: `formatRelativeTimeFromDate()` standalone function and `GT.formatRelativeTimeFromDate()` class method
13
+ - Week unit included in auto-selection thresholds (7-27 days)
14
+ - CLI, compiler, and SWC plugin updated to recognize `RelativeTime` as a variable component
15
+
16
+ ### Patch Changes
17
+
18
+ - Updated dependencies [[`9d2349c`](https://github.com/generaltranslation/gt/commit/9d2349cfc41862d9e3d8364659b678055b9fa290), [`df6bea8`](https://github.com/generaltranslation/gt/commit/df6bea819a4274018d6d99c7d3e00e7c5372ccbc)]:
19
+ - generaltranslation@8.2.0
20
+ - gt-i18n@0.7.8
21
+ - @generaltranslation/supported-locales@2.0.58
22
+
3
23
  ## 1.6.7
4
24
 
5
25
  ### Patch Changes