@apolitical/component-library 5.0.7-jc.4 → 5.1.0-jc.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.
@@ -1,16 +1,2 @@
1
- import type { ICache, ICacheItem, ICacheItems } from './cache.interface';
2
- interface IAdditionOptions {
3
- append?: boolean;
4
- replace?: boolean;
5
- }
6
- export declare function addItem(item: ICacheItem, cache?: ICache, opts?: IAdditionOptions): {
7
- pages: {
8
- next: string;
9
- results: import("../../../shared").IReaction[];
10
- }[];
11
- pageParams: string[];
12
- };
13
- export declare function findItem(itemId: string, cache?: ICache): import("../../../shared").IReaction | undefined;
14
- export declare function removeItem(itemId: string, cache: ICache): ICache;
1
+ import type { ICache, ICacheItems } from './cache.interface';
15
2
  export declare function flattenCache(cache?: ICache): ICacheItems;
16
- export {};
@@ -1,12 +1,10 @@
1
1
  import { InfiniteData } from '@tanstack/query-core';
2
2
  import type { ReactionFilterAPIResponse } from 'getstream';
3
- import type { IReaction, IUser } from '../../../../discussion/shared';
3
+ import type { IReaction } from '../../../../discussion/shared';
4
4
  export type ICache = InfiniteData<ICachePage, string>;
5
5
  export type ICachePage = ExtendedReactionFilterAPIResponse;
6
6
  export type ICacheItems = ICacheItem[];
7
- export type ICacheItem = IReaction;
8
- export type ICacheSubitem = IReaction;
9
- export type ICacheUser = IUser;
7
+ type ICacheItem = IReaction;
10
8
  interface ExtendedReactionFilterAPIResponse extends ReactionFilterAPIResponse {
11
9
  results: IReaction[];
12
10
  }
package/index.mjs CHANGED
@@ -23325,7 +23325,10 @@ function VC({ queryFns: { list: e }, queryKey: t }) {
23325
23325
  }
23326
23326
  function KC(e) {
23327
23327
  var t;
23328
- return ((t = e == null ? void 0 : e.pages) == null ? void 0 : t.reduce((n, r) => [...n, ...r == null ? void 0 : r.results], [])) || [];
23328
+ return ((t = e == null ? void 0 : e.pages) == null ? void 0 : t.reduce(
23329
+ (n, r) => [...n, ...r == null ? void 0 : r.results],
23330
+ []
23331
+ )) || [];
23329
23332
  }
23330
23333
  function ZC({
23331
23334
  badges: e,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apolitical/component-library",
3
- "version": "5.0.7-jc.4",
3
+ "version": "5.1.0-jc.0",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {