@talkjs/react-components 0.0.8 → 0.0.9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@talkjs/react-components",
3
- "version": "0.0.8",
3
+ "version": "0.0.9",
4
4
  "bugs": {
5
5
  "url": "https://talkjs.com/?chat"
6
6
  },
@@ -43,8 +43,8 @@
43
43
  "wavesurfer.js": "^7.7.7"
44
44
  },
45
45
  "peerDependencies": {
46
- "react": "^18.2.0",
47
- "react-dom": "^18.2.0"
46
+ "react": ">=17.0.0 <20.0.0",
47
+ "react-dom": ">=17.0.0 <20.0.0"
48
48
  },
49
49
  "keywords": [
50
50
  "chat",
package/theming.d.ts CHANGED
@@ -399,27 +399,11 @@ export declare interface TimeAgo {
399
399
  * An amount of milliseconds after which the values in `long` and `short` _may_ have changed.
400
400
  * If undefined, the values will not change within any meaningful period.
401
401
  */
402
- changeTimeout: number | undefined;
402
+ changeTimeout?: number | undefined;
403
403
  long: string;
404
404
  short: string;
405
405
  }
406
406
 
407
- /**
408
- *
409
- * This timer triggers only when a human-readable timestamp needs to be updated.
410
- * For example, you could use it to display that a messages was updated X
411
- * minutes or Y hours ago.
412
- *
413
- * @public
414
- */
415
- export declare class TimeAgoTimer {
416
- timestamp: number;
417
- t: Translation;
418
- constructor(timestamp: number, t: Translation);
419
- onTick(callback: (timeAgo: TimeAgo) => void): () => void;
420
- currentValue(): TimeAgo;
421
- }
422
-
423
407
  export declare type Translation = TranslationData & TranslationStrings;
424
408
 
425
409
  declare interface TranslationData {
@@ -510,6 +494,16 @@ export declare interface UserPermissions {
510
494
 
511
495
  export { UserSnapshot }
512
496
 
497
+ /**
498
+ *
499
+ * This hooks triggers only when a human-readable timestamp needs to be updated.
500
+ * For example, you could use it to display that a messages was updated X
501
+ * minutes or Y hours ago.
502
+ *
503
+ * @public
504
+ */
505
+ export declare function useTimeAgo(timestamp: number, t: Translation): TimeAgo;
506
+
513
507
  export { VideoBlock }
514
508
 
515
509
  export declare interface VideoBlockProps extends ContentBlockProps {