@openpeepshq/react 0.2.4 → 0.2.5

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.
@@ -1335,6 +1335,61 @@ export declare const profileHooks: (client: OpenpeepsClient, setCurrentProfile:
1335
1335
  } | undefined;
1336
1336
  };
1337
1337
  }[];
1338
+ reposts: {
1339
+ profile: {
1340
+ id: string;
1341
+ type: "guest" | "local" | "federated";
1342
+ createdAt: string;
1343
+ updatedAt: string;
1344
+ handle: string;
1345
+ memberships: {
1346
+ group: {
1347
+ handle: string;
1348
+ capabilities: Record<string, {
1349
+ add?: string[] | undefined;
1350
+ remove?: string[] | undefined;
1351
+ } | undefined>;
1352
+ id: string;
1353
+ createdAt: string;
1354
+ updatedAt: string;
1355
+ avatar?: string | null | undefined;
1356
+ header?: string | null | undefined;
1357
+ displayName?: string | undefined;
1358
+ description?: string | undefined;
1359
+ rules?: string | undefined;
1360
+ pinnedPostId?: string | undefined;
1361
+ discoverable?: boolean | undefined;
1362
+ deletedAt?: string | null | undefined;
1363
+ };
1364
+ roles?: ("none" | "local" | "member" | "admin" | "moderator" | "invited")[] | null | undefined;
1365
+ }[] | undefined;
1366
+ deletedAt?: string | null | undefined;
1367
+ avatar?: string | null | undefined;
1368
+ header?: string | null | undefined;
1369
+ displayName?: string | undefined;
1370
+ bio?: string | undefined;
1371
+ location?: {
1372
+ text: string;
1373
+ coordinates?: {
1374
+ lat: number;
1375
+ lng: number;
1376
+ alt?: number | undefined;
1377
+ } | undefined;
1378
+ } | undefined;
1379
+ locked?: boolean | undefined;
1380
+ bot?: boolean | undefined;
1381
+ discoverable?: boolean | undefined;
1382
+ fields?: {
1383
+ name: string;
1384
+ value: string;
1385
+ }[] | undefined;
1386
+ profileStats?: {
1387
+ followersCount: number;
1388
+ followingCount: number;
1389
+ } | undefined;
1390
+ };
1391
+ createdAt: string;
1392
+ }[];
1338
1393
  mentions: {
1339
1394
  profile: {
1340
1395
  id: string;
@@ -3385,6 +3440,61 @@ export declare const profileHooks: (client: OpenpeepsClient, setCurrentProfile:
3385
3440
  } | undefined;
3386
3441
  };
3387
3442
  }[];
3443
+ reposts: {
3444
+ profile: {
3445
+ id: string;
3446
+ type: "guest" | "local" | "federated";
3447
+ createdAt: string;
3448
+ updatedAt: string;
3449
+ handle: string;
3450
+ memberships: {
3451
+ group: {
3452
+ handle: string;
3453
+ capabilities: Record<string, {
3454
+ add?: string[] | undefined;
3455
+ remove?: string[] | undefined;
3456
+ } | undefined>;
3457
+ id: string;
3458
+ createdAt: string;
3459
+ updatedAt: string;
3460
+ avatar?: string | null | undefined;
3461
+ header?: string | null | undefined;
3462
+ displayName?: string | undefined;
3463
+ description?: string | undefined;
3464
+ rules?: string | undefined;
3465
+ pinnedPostId?: string | undefined;
3466
+ discoverable?: boolean | undefined;
3467
+ deletedAt?: string | null | undefined;
3468
+ };
3469
+ roles?: ("none" | "local" | "member" | "admin" | "moderator" | "invited")[] | null | undefined;
3470
+ }[] | undefined;
3471
+ deletedAt?: string | null | undefined;
3472
+ avatar?: string | null | undefined;
3473
+ header?: string | null | undefined;
3474
+ displayName?: string | undefined;
3475
+ bio?: string | undefined;
3476
+ location?: {
3477
+ text: string;
3478
+ coordinates?: {
3479
+ lat: number;
3480
+ lng: number;
3481
+ alt?: number | undefined;
3482
+ } | undefined;
3483
+ } | undefined;
3484
+ locked?: boolean | undefined;
3485
+ bot?: boolean | undefined;
3486
+ discoverable?: boolean | undefined;
3487
+ fields?: {
3488
+ name: string;
3489
+ value: string;
3490
+ }[] | undefined;
3491
+ profileStats?: {
3492
+ followersCount: number;
3493
+ followingCount: number;
3494
+ } | undefined;
3495
+ };
3496
+ createdAt: string;
3497
+ }[];
3388
3498
  mentions: {
3389
3499
  profile: {
3390
3500
  id: string;
@@ -4536,6 +4646,61 @@ export declare const profileHooks: (client: OpenpeepsClient, setCurrentProfile:
4536
4646
  } | undefined;
4537
4647
  };
4538
4648
  }[];
4649
+ reposts: {
4650
+ profile: {
4651
+ id: string;
4652
+ type: "guest" | "local" | "federated";
4653
+ createdAt: string;
4654
+ updatedAt: string;
4655
+ handle: string;
4656
+ memberships: {
4657
+ group: {
4658
+ handle: string;
4659
+ capabilities: Record<string, {
4660
+ add?: string[] | undefined;
4661
+ remove?: string[] | undefined;
4662
+ } | undefined>;
4663
+ id: string;
4664
+ createdAt: string;
4665
+ updatedAt: string;
4666
+ avatar?: string | null | undefined;
4667
+ header?: string | null | undefined;
4668
+ displayName?: string | undefined;
4669
+ description?: string | undefined;
4670
+ rules?: string | undefined;
4671
+ pinnedPostId?: string | undefined;
4672
+ discoverable?: boolean | undefined;
4673
+ deletedAt?: string | null | undefined;
4674
+ };
4675
+ roles?: ("none" | "local" | "member" | "admin" | "moderator" | "invited")[] | null | undefined;
4676
+ }[] | undefined;
4677
+ deletedAt?: string | null | undefined;
4678
+ avatar?: string | null | undefined;
4679
+ header?: string | null | undefined;
4680
+ displayName?: string | undefined;
4681
+ bio?: string | undefined;
4682
+ location?: {
4683
+ text: string;
4684
+ coordinates?: {
4685
+ lat: number;
4686
+ lng: number;
4687
+ alt?: number | undefined;
4688
+ } | undefined;
4689
+ } | undefined;
4690
+ locked?: boolean | undefined;
4691
+ bot?: boolean | undefined;
4692
+ discoverable?: boolean | undefined;
4693
+ fields?: {
4694
+ name: string;
4695
+ value: string;
4696
+ }[] | undefined;
4697
+ profileStats?: {
4698
+ followersCount: number;
4699
+ followingCount: number;
4700
+ } | undefined;
4701
+ };
4702
+ createdAt: string;
4703
+ }[];
4539
4704
  mentions: {
4540
4705
  profile: {
4541
4706
  id: string;
@@ -6586,6 +6751,61 @@ export declare const profileHooks: (client: OpenpeepsClient, setCurrentProfile:
6586
6751
  } | undefined;
6587
6752
  };
6588
6753
  }[];
6754
+ reposts: {
6755
+ profile: {
6756
+ id: string;
6757
+ type: "guest" | "local" | "federated";
6758
+ createdAt: string;
6759
+ updatedAt: string;
6760
+ handle: string;
6761
+ memberships: {
6762
+ group: {
6763
+ handle: string;
6764
+ capabilities: Record<string, {
6765
+ add?: string[] | undefined;
6766
+ remove?: string[] | undefined;
6767
+ } | undefined>;
6768
+ id: string;
6769
+ createdAt: string;
6770
+ updatedAt: string;
6771
+ avatar?: string | null | undefined;
6772
+ header?: string | null | undefined;
6773
+ displayName?: string | undefined;
6774
+ description?: string | undefined;
6775
+ rules?: string | undefined;
6776
+ pinnedPostId?: string | undefined;
6777
+ discoverable?: boolean | undefined;
6778
+ deletedAt?: string | null | undefined;
6779
+ };
6780
+ roles?: ("none" | "local" | "member" | "admin" | "moderator" | "invited")[] | null | undefined;
6781
+ }[] | undefined;
6782
+ deletedAt?: string | null | undefined;
6783
+ avatar?: string | null | undefined;
6784
+ header?: string | null | undefined;
6785
+ displayName?: string | undefined;
6786
+ bio?: string | undefined;
6787
+ location?: {
6788
+ text: string;
6789
+ coordinates?: {
6790
+ lat: number;
6791
+ lng: number;
6792
+ alt?: number | undefined;
6793
+ } | undefined;
6794
+ } | undefined;
6795
+ locked?: boolean | undefined;
6796
+ bot?: boolean | undefined;
6797
+ discoverable?: boolean | undefined;
6798
+ fields?: {
6799
+ name: string;
6800
+ value: string;
6801
+ }[] | undefined;
6802
+ profileStats?: {
6803
+ followersCount: number;
6804
+ followingCount: number;
6805
+ } | undefined;
6806
+ };
6807
+ createdAt: string;
6808
+ }[];
6589
6809
  mentions: {
6590
6810
  profile: {
6591
6811
  id: string;
@@ -938,6 +938,61 @@ export declare const searchHooks: (client: OpenpeepsClient) => {
938
938
  } | undefined;
939
939
  };
940
940
  }[];
941
+ reposts: {
942
+ profile: {
943
+ id: string;
944
+ type: "guest" | "local" | "federated";
945
+ createdAt: string;
946
+ updatedAt: string;
947
+ handle: string;
948
+ memberships: {
949
+ group: {
950
+ handle: string;
951
+ capabilities: Record<string, {
952
+ add?: string[] | undefined;
953
+ remove?: string[] | undefined;
954
+ } | undefined>;
955
+ id: string;
956
+ createdAt: string;
957
+ updatedAt: string;
958
+ avatar?: string | null | undefined;
959
+ header?: string | null | undefined;
960
+ displayName?: string | undefined;
961
+ description?: string | undefined;
962
+ rules?: string | undefined;
963
+ pinnedPostId?: string | undefined;
964
+ discoverable?: boolean | undefined;
965
+ deletedAt?: string | null | undefined;
966
+ };
967
+ roles?: ("none" | "local" | "member" | "admin" | "moderator" | "invited")[] | null | undefined;
968
+ }[] | undefined;
969
+ deletedAt?: string | null | undefined;
970
+ avatar?: string | null | undefined;
971
+ header?: string | null | undefined;
972
+ displayName?: string | undefined;
973
+ bio?: string | undefined;
974
+ location?: {
975
+ text: string;
976
+ coordinates?: {
977
+ lat: number;
978
+ lng: number;
979
+ alt?: number | undefined;
980
+ } | undefined;
981
+ } | undefined;
982
+ locked?: boolean | undefined;
983
+ bot?: boolean | undefined;
984
+ discoverable?: boolean | undefined;
985
+ fields?: {
986
+ name: string;
987
+ value: string;
988
+ }[] | undefined;
989
+ profileStats?: {
990
+ followersCount: number;
991
+ followingCount: number;
992
+ } | undefined;
993
+ };
994
+ createdAt: string;
995
+ }[];
941
996
  mentions: {
942
997
  profile: {
943
998
  id: string;
@@ -2988,6 +3043,61 @@ export declare const searchHooks: (client: OpenpeepsClient) => {
2988
3043
  } | undefined;
2989
3044
  };
2990
3045
  }[];
3046
+ reposts: {
3047
+ profile: {
3048
+ id: string;
3049
+ type: "guest" | "local" | "federated";
3050
+ createdAt: string;
3051
+ updatedAt: string;
3052
+ handle: string;
3053
+ memberships: {
3054
+ group: {
3055
+ handle: string;
3056
+ capabilities: Record<string, {
3057
+ add?: string[] | undefined;
3058
+ remove?: string[] | undefined;
3059
+ } | undefined>;
3060
+ id: string;
3061
+ createdAt: string;
3062
+ updatedAt: string;
3063
+ avatar?: string | null | undefined;
3064
+ header?: string | null | undefined;
3065
+ displayName?: string | undefined;
3066
+ description?: string | undefined;
3067
+ rules?: string | undefined;
3068
+ pinnedPostId?: string | undefined;
3069
+ discoverable?: boolean | undefined;
3070
+ deletedAt?: string | null | undefined;
3071
+ };
3072
+ roles?: ("none" | "local" | "member" | "admin" | "moderator" | "invited")[] | null | undefined;
3073
+ }[] | undefined;
3074
+ deletedAt?: string | null | undefined;
3075
+ avatar?: string | null | undefined;
3076
+ header?: string | null | undefined;
3077
+ displayName?: string | undefined;
3078
+ bio?: string | undefined;
3079
+ location?: {
3080
+ text: string;
3081
+ coordinates?: {
3082
+ lat: number;
3083
+ lng: number;
3084
+ alt?: number | undefined;
3085
+ } | undefined;
3086
+ } | undefined;
3087
+ locked?: boolean | undefined;
3088
+ bot?: boolean | undefined;
3089
+ discoverable?: boolean | undefined;
3090
+ fields?: {
3091
+ name: string;
3092
+ value: string;
3093
+ }[] | undefined;
3094
+ profileStats?: {
3095
+ followersCount: number;
3096
+ followingCount: number;
3097
+ } | undefined;
3098
+ };
3099
+ createdAt: string;
3100
+ }[];
2991
3101
  mentions: {
2992
3102
  profile: {
2993
3103
  id: string;
@@ -4113,6 +4223,61 @@ export declare const searchHooks: (client: OpenpeepsClient) => {
4113
4223
  } | undefined;
4114
4224
  };
4115
4225
  }[];
4226
+ reposts: {
4227
+ profile: {
4228
+ id: string;
4229
+ type: "guest" | "local" | "federated";
4230
+ createdAt: string;
4231
+ updatedAt: string;
4232
+ handle: string;
4233
+ memberships: {
4234
+ group: {
4235
+ handle: string;
4236
+ capabilities: Record<string, {
4237
+ add?: string[] | undefined;
4238
+ remove?: string[] | undefined;
4239
+ } | undefined>;
4240
+ id: string;
4241
+ createdAt: string;
4242
+ updatedAt: string;
4243
+ avatar?: string | null | undefined;
4244
+ header?: string | null | undefined;
4245
+ displayName?: string | undefined;
4246
+ description?: string | undefined;
4247
+ rules?: string | undefined;
4248
+ pinnedPostId?: string | undefined;
4249
+ discoverable?: boolean | undefined;
4250
+ deletedAt?: string | null | undefined;
4251
+ };
4252
+ roles?: ("none" | "local" | "member" | "admin" | "moderator" | "invited")[] | null | undefined;
4253
+ }[] | undefined;
4254
+ deletedAt?: string | null | undefined;
4255
+ avatar?: string | null | undefined;
4256
+ header?: string | null | undefined;
4257
+ displayName?: string | undefined;
4258
+ bio?: string | undefined;
4259
+ location?: {
4260
+ text: string;
4261
+ coordinates?: {
4262
+ lat: number;
4263
+ lng: number;
4264
+ alt?: number | undefined;
4265
+ } | undefined;
4266
+ } | undefined;
4267
+ locked?: boolean | undefined;
4268
+ bot?: boolean | undefined;
4269
+ discoverable?: boolean | undefined;
4270
+ fields?: {
4271
+ name: string;
4272
+ value: string;
4273
+ }[] | undefined;
4274
+ profileStats?: {
4275
+ followersCount: number;
4276
+ followingCount: number;
4277
+ } | undefined;
4278
+ };
4279
+ createdAt: string;
4280
+ }[];
4116
4281
  mentions: {
4117
4282
  profile: {
4118
4283
  id: string;
@@ -6163,6 +6328,61 @@ export declare const searchHooks: (client: OpenpeepsClient) => {
6163
6328
  } | undefined;
6164
6329
  };
6165
6330
  }[];
6331
+ reposts: {
6332
+ profile: {
6333
+ id: string;
6334
+ type: "guest" | "local" | "federated";
6335
+ createdAt: string;
6336
+ updatedAt: string;
6337
+ handle: string;
6338
+ memberships: {
6339
+ group: {
6340
+ handle: string;
6341
+ capabilities: Record<string, {
6342
+ add?: string[] | undefined;
6343
+ remove?: string[] | undefined;
6344
+ } | undefined>;
6345
+ id: string;
6346
+ createdAt: string;
6347
+ updatedAt: string;
6348
+ avatar?: string | null | undefined;
6349
+ header?: string | null | undefined;
6350
+ displayName?: string | undefined;
6351
+ description?: string | undefined;
6352
+ rules?: string | undefined;
6353
+ pinnedPostId?: string | undefined;
6354
+ discoverable?: boolean | undefined;
6355
+ deletedAt?: string | null | undefined;
6356
+ };
6357
+ roles?: ("none" | "local" | "member" | "admin" | "moderator" | "invited")[] | null | undefined;
6358
+ }[] | undefined;
6359
+ deletedAt?: string | null | undefined;
6360
+ avatar?: string | null | undefined;
6361
+ header?: string | null | undefined;
6362
+ displayName?: string | undefined;
6363
+ bio?: string | undefined;
6364
+ location?: {
6365
+ text: string;
6366
+ coordinates?: {
6367
+ lat: number;
6368
+ lng: number;
6369
+ alt?: number | undefined;
6370
+ } | undefined;
6371
+ } | undefined;
6372
+ locked?: boolean | undefined;
6373
+ bot?: boolean | undefined;
6374
+ discoverable?: boolean | undefined;
6375
+ fields?: {
6376
+ name: string;
6377
+ value: string;
6378
+ }[] | undefined;
6379
+ profileStats?: {
6380
+ followersCount: number;
6381
+ followingCount: number;
6382
+ } | undefined;
6383
+ };
6384
+ createdAt: string;
6385
+ }[];
6166
6386
  mentions: {
6167
6387
  profile: {
6168
6388
  id: string;
@@ -7344,6 +7564,61 @@ export declare const searchHooks: (client: OpenpeepsClient) => {
7344
7564
  } | undefined;
7345
7565
  };
7346
7566
  }[];
7567
+ reposts: {
7568
+ profile: {
7569
+ id: string;
7570
+ type: "guest" | "local" | "federated";
7571
+ createdAt: string;
7572
+ updatedAt: string;
7573
+ handle: string;
7574
+ memberships: {
7575
+ group: {
7576
+ handle: string;
7577
+ capabilities: Record<string, {
7578
+ add?: string[] | undefined;
7579
+ remove?: string[] | undefined;
7580
+ } | undefined>;
7581
+ id: string;
7582
+ createdAt: string;
7583
+ updatedAt: string;
7584
+ avatar?: string | null | undefined;
7585
+ header?: string | null | undefined;
7586
+ displayName?: string | undefined;
7587
+ description?: string | undefined;
7588
+ rules?: string | undefined;
7589
+ pinnedPostId?: string | undefined;
7590
+ discoverable?: boolean | undefined;
7591
+ deletedAt?: string | null | undefined;
7592
+ };
7593
+ roles?: ("none" | "local" | "member" | "admin" | "moderator" | "invited")[] | null | undefined;
7594
+ }[] | undefined;
7595
+ deletedAt?: string | null | undefined;
7596
+ avatar?: string | null | undefined;
7597
+ header?: string | null | undefined;
7598
+ displayName?: string | undefined;
7599
+ bio?: string | undefined;
7600
+ location?: {
7601
+ text: string;
7602
+ coordinates?: {
7603
+ lat: number;
7604
+ lng: number;
7605
+ alt?: number | undefined;
7606
+ } | undefined;
7607
+ } | undefined;
7608
+ locked?: boolean | undefined;
7609
+ bot?: boolean | undefined;
7610
+ discoverable?: boolean | undefined;
7611
+ fields?: {
7612
+ name: string;
7613
+ value: string;
7614
+ }[] | undefined;
7615
+ profileStats?: {
7616
+ followersCount: number;
7617
+ followingCount: number;
7618
+ } | undefined;
7619
+ };
7620
+ createdAt: string;
7621
+ }[];
7347
7622
  mentions: {
7348
7623
  profile: {
7349
7624
  id: string;
@@ -9394,6 +9669,61 @@ export declare const searchHooks: (client: OpenpeepsClient) => {
9394
9669
  } | undefined;
9395
9670
  };
9396
9671
  }[];
9672
+ reposts: {
9673
+ profile: {
9674
+ id: string;
9675
+ type: "guest" | "local" | "federated";
9676
+ createdAt: string;
9677
+ updatedAt: string;
9678
+ handle: string;
9679
+ memberships: {
9680
+ group: {
9681
+ handle: string;
9682
+ capabilities: Record<string, {
9683
+ add?: string[] | undefined;
9684
+ remove?: string[] | undefined;
9685
+ } | undefined>;
9686
+ id: string;
9687
+ createdAt: string;
9688
+ updatedAt: string;
9689
+ avatar?: string | null | undefined;
9690
+ header?: string | null | undefined;
9691
+ displayName?: string | undefined;
9692
+ description?: string | undefined;
9693
+ rules?: string | undefined;
9694
+ pinnedPostId?: string | undefined;
9695
+ discoverable?: boolean | undefined;
9696
+ deletedAt?: string | null | undefined;
9697
+ };
9698
+ roles?: ("none" | "local" | "member" | "admin" | "moderator" | "invited")[] | null | undefined;
9699
+ }[] | undefined;
9700
+ deletedAt?: string | null | undefined;
9701
+ avatar?: string | null | undefined;
9702
+ header?: string | null | undefined;
9703
+ displayName?: string | undefined;
9704
+ bio?: string | undefined;
9705
+ location?: {
9706
+ text: string;
9707
+ coordinates?: {
9708
+ lat: number;
9709
+ lng: number;
9710
+ alt?: number | undefined;
9711
+ } | undefined;
9712
+ } | undefined;
9713
+ locked?: boolean | undefined;
9714
+ bot?: boolean | undefined;
9715
+ discoverable?: boolean | undefined;
9716
+ fields?: {
9717
+ name: string;
9718
+ value: string;
9719
+ }[] | undefined;
9720
+ profileStats?: {
9721
+ followersCount: number;
9722
+ followingCount: number;
9723
+ } | undefined;
9724
+ };
9725
+ createdAt: string;
9726
+ }[];
9397
9727
  mentions: {
9398
9728
  profile: {
9399
9729
  id: string;
@@ -14,7 +14,7 @@ export declare const OpenpeepsProvider: React.FC<{
14
14
  * Must return an unsubscribe function.
15
15
  *
16
16
  * React Native consumers should import `OpenpeepsProvider` from
17
- * `@openpeepshq/react-native`, which wires this up against `AppState` so
17
+ * `@openpeepshq/rn-components`, which wires this up against `AppState` so
18
18
  * `@openpeepshq/react` itself stays free of any `react-native` import.
19
19
  */
20
20
  subscribeToForeground?: (onForeground: () => void) => () => void;
@@ -1,2 +1,9 @@
1
1
  import type { PublicPost } from '@openpeepshq/common/types';
2
2
  export declare const isUnreadPostForViewer: (post: PublicPost, viewerId?: string) => boolean;
3
+ /**
4
+ * Unseen SQL counts the feed row (`post.id`). For a repost that is the
5
+ * wrapper, not the nested original — viewing the original elsewhere must
6
+ * not clear the wrapper, and mark-seen must write `post_seen` for the
7
+ * wrapper.
8
+ */
9
+ export declare const isUnreadFeedActivityForViewer: (post: PublicPost, viewerId?: string) => boolean;
@@ -1 +1,8 @@
1
1
  export const isUnreadPostForViewer = (post, viewerId) => post.seen === false && !!viewerId && post.profile.id !== viewerId;
2
+ /**
3
+ * Unseen SQL counts the feed row (`post.id`). For a repost that is the
4
+ * wrapper, not the nested original — viewing the original elsewhere must
5
+ * not clear the wrapper, and mark-seen must write `post_seen` for the
6
+ * wrapper.
7
+ */
8
+ export const isUnreadFeedActivityForViewer = (post, viewerId) => isUnreadPostForViewer(post, viewerId);