@marktiderman/genesis-chat 0.5.0 → 0.6.1
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/dist/native.d.ts +40 -1
- package/dist/native.js +20 -6
- package/dist/native.js.map +1 -1
- package/dist/react.d.ts +8 -8
- package/dist/web.js +1 -1
- package/dist/web.js.map +1 -1
- package/package.json +37 -13
- package/src/native/__tests__/tus.test.ts +51 -0
- package/src/native/index.ts +1 -1
- package/src/native/tus.ts +72 -10
- package/src/web/thread.tsx +1 -1
package/dist/react.d.ts
CHANGED
|
@@ -142,10 +142,10 @@ declare function useInbox(opts?: {
|
|
|
142
142
|
archived?: boolean;
|
|
143
143
|
limit?: number;
|
|
144
144
|
}): {
|
|
145
|
-
items:
|
|
145
|
+
items: ChatInboxItem[];
|
|
146
146
|
isLoading: boolean;
|
|
147
147
|
error: Error | null;
|
|
148
|
-
refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<
|
|
148
|
+
refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<ChatInboxItem[], Error>>;
|
|
149
149
|
};
|
|
150
150
|
/** How many messages wait for you everywhere (for a badge), live. */
|
|
151
151
|
declare function useUnreadTotal(opts?: {
|
|
@@ -162,8 +162,8 @@ interface UseConversationOptions {
|
|
|
162
162
|
}
|
|
163
163
|
/** One conversation: its messages (with what you are still sending), members, your role, and who is typing. */
|
|
164
164
|
declare function useConversation(conversationId: string | null | undefined, opts?: UseConversationOptions): {
|
|
165
|
-
conversation:
|
|
166
|
-
members:
|
|
165
|
+
conversation: ChatConversation | null;
|
|
166
|
+
members: ChatMember[];
|
|
167
167
|
role: ChatRole | null;
|
|
168
168
|
canPost: boolean;
|
|
169
169
|
/** Your role and posting rights are still loading: show the composer as waiting, not refused. */
|
|
@@ -177,7 +177,7 @@ declare function useConversation(conversationId: string | null | undefined, opts
|
|
|
177
177
|
/** Same as refetchAccess: every per-conversation lookup again, for a Retry after being offline. */
|
|
178
178
|
refetchConversation: () => Promise<undefined>;
|
|
179
179
|
/** The kind's rules (max members, threads, who posts). */
|
|
180
|
-
kind:
|
|
180
|
+
kind: ChatKindRules | null;
|
|
181
181
|
/** May you pin here: owners and admins, or anyone in a two-person conversation. */
|
|
182
182
|
canPin: boolean;
|
|
183
183
|
/** Gives a message whose files were lost on a relaunch its files again. */
|
|
@@ -239,7 +239,7 @@ declare function useTopics(conversationId: string | null | undefined): {
|
|
|
239
239
|
isLoading: boolean;
|
|
240
240
|
error: Error | null;
|
|
241
241
|
setTopic: (topic: string, input?: TopicInput) => Promise<void>;
|
|
242
|
-
refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<
|
|
242
|
+
refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<ChatTopic[], Error>>;
|
|
243
243
|
};
|
|
244
244
|
/**
|
|
245
245
|
* Your scheduled messages (in one conversation, or all), soonest first, with `schedule` and
|
|
@@ -257,14 +257,14 @@ declare function useScheduled(conversationId?: string | null, opts?: {
|
|
|
257
257
|
clientId?: string;
|
|
258
258
|
}, files?: LocalFile[]) => Promise<string>;
|
|
259
259
|
cancel: (id: string) => Promise<void>;
|
|
260
|
-
refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<
|
|
260
|
+
refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<ScheduledMessage[], Error>>;
|
|
261
261
|
};
|
|
262
262
|
/**
|
|
263
263
|
* Availability: yours (`mine`, `setMine`) and, given a conversation, its members' (`members`,
|
|
264
264
|
* `forUser`). Pair with `awayLine` and `isWithinWorkingHours` from the core.
|
|
265
265
|
*/
|
|
266
266
|
declare function useAvailability(conversationId?: string | null): {
|
|
267
|
-
mine:
|
|
267
|
+
mine: ChatAvailability | null;
|
|
268
268
|
mineLoading: boolean;
|
|
269
269
|
setMine: (input: AvailabilityInput) => Promise<void>;
|
|
270
270
|
members: ChatAvailability[];
|
package/dist/web.js
CHANGED
|
@@ -3226,7 +3226,7 @@ function ChatThread({
|
|
|
3226
3226
|
]
|
|
3227
3227
|
}
|
|
3228
3228
|
),
|
|
3229
|
-
search && !threadRootId ? /* @__PURE__ */ jsx(Sheet, { open: searching, onOpenChange: setSearching, children: /* @__PURE__ */ jsxs(SheetContent, { side: "right", className: "flex w-full flex-col gap-0 p-0 sm:max-w-md", children: [
|
|
3229
|
+
search && !threadRootId ? /* @__PURE__ */ jsx(Sheet, { open: searching, onOpenChange: setSearching, children: /* @__PURE__ */ jsxs(SheetContent, { side: "right", className: "flex w-full flex-col gap-0 p-0 pt-[env(safe-area-inset-top)] pb-[env(safe-area-inset-bottom)] sm:max-w-md", children: [
|
|
3230
3230
|
/* @__PURE__ */ jsxs(SheetHeader, { className: "border-b px-4 py-3", children: [
|
|
3231
3231
|
/* @__PURE__ */ jsx(SheetTitle, { children: "Search" }),
|
|
3232
3232
|
/* @__PURE__ */ jsx(SheetDescription, { className: "sr-only", children: "Search this conversation and jump to a message." })
|