convex-feedback 0.1.0 → 0.1.2

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.
Files changed (36) hide show
  1. package/README.md +351 -92
  2. package/dist/.tsbuildinfo +1 -1
  3. package/dist/client/api.d.ts +267 -68
  4. package/dist/client/api.d.ts.map +1 -1
  5. package/dist/client/config.d.ts +168 -29
  6. package/dist/client/config.d.ts.map +1 -1
  7. package/dist/client/config.js.map +1 -1
  8. package/dist/client/index.d.ts +167 -172
  9. package/dist/client/index.d.ts.map +1 -1
  10. package/dist/client/index.js +75 -14
  11. package/dist/client/index.js.map +1 -1
  12. package/dist/component/_generated/component.d.ts +2 -2
  13. package/dist/component/_generated/component.d.ts.map +1 -1
  14. package/dist/component/comments.d.ts +12 -12
  15. package/dist/component/comments.d.ts.map +1 -1
  16. package/dist/component/comments.js +43 -60
  17. package/dist/component/comments.js.map +1 -1
  18. package/dist/component/entries.d.ts +30 -30
  19. package/dist/component/entries.d.ts.map +1 -1
  20. package/dist/component/entries.js +216 -97
  21. package/dist/component/entries.js.map +1 -1
  22. package/dist/component/model.d.ts +151 -0
  23. package/dist/component/model.d.ts.map +1 -1
  24. package/dist/react/index.d.ts +178 -56
  25. package/dist/react/index.d.ts.map +1 -1
  26. package/dist/react/index.js +70 -4
  27. package/dist/react/index.js.map +1 -1
  28. package/package.json +1 -1
  29. package/src/client/api.ts +326 -36
  30. package/src/client/config.ts +191 -29
  31. package/src/client/index.ts +437 -16
  32. package/src/component/_generated/component.ts +2 -2
  33. package/src/component/comments.ts +43 -61
  34. package/src/component/entries.ts +300 -123
  35. package/src/component/model.ts +158 -0
  36. package/src/react/index.ts +217 -9
@@ -165,12 +165,163 @@ export declare const similarEntriesValidator: import("convex/values").VObject<{
165
165
  viewerHasUpvoted: import("convex/values").VBoolean<boolean, "required">;
166
166
  }, "required", "id" | "creationTime" | "actorId" | "kind" | "status" | "title" | "body" | "upvoteCount" | "commentCount" | "updatedAt" | "viewerHasUpvoted">, "required">;
167
167
  }, "required", "exact" | "similar">;
168
+ /**
169
+ * Category of feedback represented by an entry.
170
+ *
171
+ * - `"feedback"` — general feedback that is not specifically a bug or feature request.
172
+ * - `"feature_request"` — a request for new or changed functionality.
173
+ * - `"bug_report"` — a report describing incorrect or broken behavior.
174
+ */
168
175
  export type EntryKind = Infer<typeof entryKindValidator>;
176
+ /**
177
+ * Workflow state of a feedback entry.
178
+ *
179
+ * Status values are fixed by the component so consumers can rely on a stable,
180
+ * fully typed lifecycle. UI labels and presentation can be customized.
181
+ */
169
182
  export type EntryStatus = Infer<typeof entryStatusValidator>;
183
+ /**
184
+ * Server-side ordering strategy for feedback entries.
185
+ *
186
+ * - `"top"` — entries with the most upvotes first, with creation time used as
187
+ * the deterministic tie-breaker.
188
+ * - `"newest"` — newest entries first.
189
+ */
170
190
  export type EntrySort = Infer<typeof entrySortValidator>;
191
+ /**
192
+ * Server-side ordering strategy for comments and replies.
193
+ *
194
+ * - `"top"` — comments with the most likes first, with creation time used as
195
+ * the deterministic tie-breaker.
196
+ * - `"newest"` — newest comments first.
197
+ * - `"oldest"` — oldest comments first.
198
+ */
171
199
  export type CommentSort = Infer<typeof commentSortValidator>;
200
+ /**
201
+ * Authenticated or anonymous actor resolved by the host application.
202
+ *
203
+ * The component does not access the host application's authentication system
204
+ * directly. The host resolves its current user/session into this shape.
205
+ *
206
+ * @property id
207
+ * Stable identifier for the actor. This can be a Clerk ID, Convex Auth ID,
208
+ * application user ID, anonymous installation ID, or another stable
209
+ * host-controlled identifier.
210
+ *
211
+ * @property isModerator
212
+ * Whether the actor can perform moderator-only actions such as changing entry
213
+ * status or modifying content they do not own.
214
+ */
172
215
  export type FeedbackActor = Infer<typeof actorValidator>;
216
+ /**
217
+ * Public representation of a feedback, feature-request, or bug-report entry.
218
+ *
219
+ * @property id
220
+ * Public component document identifier.
221
+ *
222
+ * @property creationTime
223
+ * Convex document creation timestamp in milliseconds since the Unix epoch.
224
+ *
225
+ * @property actorId
226
+ * Stable identifier of the actor who created the entry.
227
+ *
228
+ * @property kind
229
+ * Entry category.
230
+ *
231
+ * @property status
232
+ * Current workflow status.
233
+ *
234
+ * @property title
235
+ * User-provided entry title.
236
+ *
237
+ * @property body
238
+ * User-provided entry description.
239
+ *
240
+ * @property upvoteCount
241
+ * Denormalized number of actors currently upvoting this entry.
242
+ *
243
+ * @property commentCount
244
+ * Denormalized total number of comments belonging to the entry, including
245
+ * nested replies.
246
+ *
247
+ * @property updatedAt
248
+ * Millisecond timestamp of the most recent content update. Absent when the
249
+ * entry has never been edited.
250
+ *
251
+ * @property viewerHasUpvoted
252
+ * Whether the actor associated with the current query has upvoted the entry.
253
+ * `false` when no viewer actor is available.
254
+ */
173
255
  export type FeedbackEntry = Infer<typeof publicEntryValidator>;
256
+ /**
257
+ * Public representation of a comment or reply.
258
+ *
259
+ * Comments are returned one level at a time. Child comments are not included
260
+ * automatically; query them separately using the comment's `id` as
261
+ * `parentCommentId`.
262
+ *
263
+ * @property id
264
+ * Public component document identifier.
265
+ *
266
+ * @property creationTime
267
+ * Convex document creation timestamp in milliseconds since the Unix epoch.
268
+ *
269
+ * @property entryId
270
+ * Entry this comment belongs to.
271
+ *
272
+ * @property parentCommentId
273
+ * Direct parent comment. Absent for top-level comments.
274
+ *
275
+ * @property actorId
276
+ * Stable identifier of the actor who created the comment.
277
+ *
278
+ * @property depth
279
+ * Zero-based nesting depth. Top-level comments have depth `0`.
280
+ *
281
+ * @property body
282
+ * User-provided comment text. `null` when the comment was soft-deleted so
283
+ * nested replies can retain their place in the conversation.
284
+ *
285
+ * @property likeCount
286
+ * Denormalized number of actors currently liking this comment.
287
+ *
288
+ * @property replyCount
289
+ * Number of direct child replies. Descendants below those direct children are
290
+ * not included in this count.
291
+ *
292
+ * @property updatedAt
293
+ * Millisecond timestamp of the latest edit, when the comment has been edited.
294
+ *
295
+ * @property deletedAt
296
+ * Millisecond timestamp at which the comment was soft-deleted.
297
+ *
298
+ * @property viewerHasLiked
299
+ * Whether the actor associated with the current query likes this comment.
300
+ * `false` when no viewer actor is available.
301
+ */
174
302
  export type FeedbackComment = Infer<typeof publicCommentValidator>;
303
+ /**
304
+ * Duplicate-detection result for a proposed entry.
305
+ *
306
+ * Exact normalized-title matches always receive priority. The requested
307
+ * `limit` is a combined limit across both arrays: exact matches consume the
308
+ * available slots first and only the remaining slots can be populated by
309
+ * relevance-ranked full-text matches.
310
+ *
311
+ * For `limit: 3`:
312
+ *
313
+ * - 3 exact matches → `3 exact + 0 similar`
314
+ * - 2 exact matches → `2 exact + at most 1 similar`
315
+ * - 0 exact matches → `0 exact + at most 3 similar`
316
+ *
317
+ * An entry returned in `exact` is never repeated in `similar`.
318
+ *
319
+ * @property exact
320
+ * Entries whose normalized title exactly matches the proposed title.
321
+ *
322
+ * @property similar
323
+ * Full-text matches ordered by search relevance after exact matches have been
324
+ * removed.
325
+ */
175
326
  export type SimilarEntriesResult = Infer<typeof similarEntriesValidator>;
176
327
  //# sourceMappingURL=model.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../src/component/model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAG3C,eAAO,MAAM,kBAAkB,2RAI9B,CAAC;AAEF,eAAO,MAAM,oBAAoB,geAOhC,CAAC;AAEF,eAAO,MAAM,kBAAkB,oLAG9B,CAAC;AAEF,eAAO,MAAM,oBAAoB,uPAIhC,CAAC;AAEF,eAAO,MAAM,cAAc;;;;;;oCAGzB,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;4JAY/B,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;gLAajC,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;GAMG;AACH,MAAM,MAAM,SAAS,GAAG,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAEzD;;;;;GAKG;AACH,MAAM,MAAM,WAAW,GAAG,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAE7D;;;;;;GAMG;AACH,MAAM,MAAM,SAAS,GAAG,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAEzD;;;;;;;GAOG;AACH,MAAM,MAAM,WAAW,GAAG,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAE7D;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,aAAa,GAAG,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAEzD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,MAAM,MAAM,aAAa,GAAG,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAE/D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,MAAM,MAAM,eAAe,GAAG,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEnE;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,MAAM,oBAAoB,GAAG,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
@@ -1,44 +1,165 @@
1
1
  import type { FeedbackPublicApi } from "../client/api.js";
2
2
  import type { CommentSort, EntryKind, EntrySort, EntryStatus } from "../component/model.js";
3
+ /**
4
+ * Client-side pagination defaults used by hooks created with
5
+ * `createFeedbackHooks`.
6
+ *
7
+ * These values control initial page sizes and subsequent `loadMore` sizes in
8
+ * the UI. They do not override the server-side maximum page sizes configured
9
+ * on the component.
10
+ */
3
11
  export interface FeedbackHooksOptions {
12
+ /**
13
+ * Number of entries initially requested by `useEntries`.
14
+ *
15
+ * @default 20
16
+ */
4
17
  entryPageSize?: number;
18
+ /**
19
+ * Number of top-level comments initially requested by `useComments`.
20
+ *
21
+ * @default 20
22
+ */
5
23
  commentPageSize?: number;
24
+ /**
25
+ * Number of direct child replies initially requested when
26
+ * `parentCommentId` is supplied to `useComments`.
27
+ *
28
+ * @default 10
29
+ */
6
30
  replyPageSize?: number;
7
31
  }
32
+ /**
33
+ * Arguments accepted by `useEntries`.
34
+ */
8
35
  export interface UseEntriesArgs {
9
- kind?: EntryKind;
36
+ /**
37
+ * Entry kinds to include.
38
+ *
39
+ * Filtering occurs in Convex before pagination. Omit to include every kind.
40
+ *
41
+ * The hook accepts a readonly array so configuration constants such as
42
+ * `readonly EntryKind[]` can be passed directly.
43
+ */
44
+ kinds?: readonly EntryKind[];
45
+ /** Optional workflow-status filter. */
10
46
  status?: EntryStatus;
47
+ /**
48
+ * Server-side entry ordering.
49
+ *
50
+ * When omitted, the host's configured default is used.
51
+ */
11
52
  sort?: EntrySort;
12
53
  }
54
+ /**
55
+ * Arguments accepted by `useComments`.
56
+ *
57
+ * Comment trees are intentionally loaded lazily. Every invocation retrieves
58
+ * exactly one level of the tree.
59
+ */
13
60
  export interface UseCommentsArgs {
61
+ /** Entry whose comments are being requested. */
14
62
  entryId: string;
63
+ /**
64
+ * Direct parent whose replies should be requested.
65
+ *
66
+ * - Omitted → returns top-level comments.
67
+ * - Supplied → returns only direct children of this comment.
68
+ *
69
+ * Grandchildren and deeper descendants are never automatically loaded.
70
+ * Call `useComments` again with the child comment's ID when that branch is
71
+ * expanded.
72
+ */
15
73
  parentCommentId?: string;
74
+ /**
75
+ * Server-side ordering for this level of comments.
76
+ *
77
+ * When omitted, the host's configured default is used.
78
+ */
16
79
  sort?: CommentSort;
17
80
  }
81
+ /**
82
+ * Arguments accepted by `useSearchEntries`.
83
+ */
18
84
  export interface SearchEntriesArgs {
85
+ /**
86
+ * Full-text query.
87
+ *
88
+ * Whitespace-only values skip the Convex query and return an empty array.
89
+ */
19
90
  searchQuery: string;
20
- kind?: EntryKind;
91
+ /**
92
+ * Entry kinds to include.
93
+ *
94
+ * Filtering occurs on the server.
95
+ */
96
+ kinds?: readonly EntryKind[];
97
+ /** Optional workflow-status filter. */
21
98
  status?: EntryStatus;
99
+ /**
100
+ * Maximum number of results requested.
101
+ *
102
+ * The server applies its configured default when omitted and clamps the
103
+ * value to its configured maximum.
104
+ */
22
105
  limit?: number;
23
106
  }
107
+ /**
108
+ * Arguments accepted by `useSimilarEntries`.
109
+ */
24
110
  export interface SimilarEntriesArgs {
111
+ /**
112
+ * Proposed entry title.
113
+ *
114
+ * Used both for normalized exact-title matching and full-text search.
115
+ */
25
116
  title: string;
117
+ /**
118
+ * Proposed entry body.
119
+ *
120
+ * Used together with the title for full-text similarity search.
121
+ */
26
122
  body: string;
123
+ /**
124
+ * Restricts duplicate detection to one entry kind.
125
+ *
126
+ * Omit to search every kind.
127
+ */
27
128
  kind?: EntryKind;
129
+ /**
130
+ * Maximum combined number of suggestions requested.
131
+ *
132
+ * Exact normalized-title matches consume the limit first. Only remaining
133
+ * slots may be filled by relevance-ranked full-text matches.
134
+ *
135
+ * For example, `limit: 3` with two exact matches can return at most one
136
+ * additional similar match.
137
+ */
28
138
  limit?: number;
29
139
  }
30
- export declare function createFeedbackHooks(api: FeedbackPublicApi, options?: FeedbackHooksOptions): {
140
+ /**
141
+ * Creates React hooks bound to a host application's exposed feedback API.
142
+ *
143
+ * Create this once in the consuming application and reuse the returned hook
144
+ * collection.
145
+ *
146
+ * @typeParam RateLimitResult The validated non-throwing rate-limit rejection
147
+ * type returned by mutation hooks. It is inferred from the supplied API.
148
+ */
149
+ export declare function createFeedbackHooks<RateLimitResult = never>(api: FeedbackPublicApi<string | undefined, RateLimitResult>, options?: FeedbackHooksOptions): {
150
+ /**
151
+ * Resolved client-side page sizes used by the generated hooks and useful
152
+ * when calling their `loadMore` functions.
153
+ */
31
154
  pageSizes: {
32
155
  readonly entries: number;
33
156
  readonly comments: number;
34
157
  readonly replies: number;
35
158
  };
36
- useEntries(args?: UseEntriesArgs): import("convex/react").UsePaginatedQueryReturnType<import("convex/server").FunctionReference<"query", "public", {
37
- paginationOpts: import("convex/server").PaginationOptions;
38
- kind?: EntryKind;
39
- status?: EntryStatus;
40
- sort?: EntrySort;
41
- }, import("convex/server").PaginationResult<{
159
+ /**
160
+ * Returns a cursor-paginated, server-filtered entry list.
161
+ */
162
+ useEntries(args?: UseEntriesArgs): import("convex/react").UsePaginatedQueryReturnType<import("convex/server").FunctionReference<"query", "public", import("../client/api.js").ListEntriesArgs, import("convex/server").PaginationResult<{
42
163
  updatedAt?: number | undefined;
43
164
  id: string;
44
165
  creationTime: number;
@@ -51,6 +172,11 @@ export declare function createFeedbackHooks(api: FeedbackPublicApi, options?: Fe
51
172
  commentCount: number;
52
173
  viewerHasUpvoted: boolean;
53
174
  }>, string | undefined>>;
175
+ /**
176
+ * Reactively retrieves one entry.
177
+ *
178
+ * Passing `null` or `undefined` skips the query.
179
+ */
54
180
  useEntry(entryId: string | null | undefined): {
55
181
  updatedAt?: number | undefined;
56
182
  id: string;
@@ -64,6 +190,11 @@ export declare function createFeedbackHooks(api: FeedbackPublicApi, options?: Fe
64
190
  commentCount: number;
65
191
  viewerHasUpvoted: boolean;
66
192
  } | null | undefined;
193
+ /**
194
+ * Performs reactive full-text entry search.
195
+ *
196
+ * An empty/whitespace-only query returns `[]` without running Convex.
197
+ */
67
198
  useSearchEntries(args: SearchEntriesArgs): {
68
199
  updatedAt?: number | undefined;
69
200
  id: string;
@@ -77,6 +208,14 @@ export declare function createFeedbackHooks(api: FeedbackPublicApi, options?: Fe
77
208
  commentCount: number;
78
209
  viewerHasUpvoted: boolean;
79
210
  }[] | undefined;
211
+ /**
212
+ * Reactively finds exact and similar entries for a proposed draft.
213
+ *
214
+ * The query is skipped only when both title and body are blank.
215
+ *
216
+ * `limit` is forwarded to the server unchanged. The server applies the
217
+ * combined exact-first limit semantics documented by `SimilarEntriesArgs`.
218
+ */
80
219
  useSimilarEntries(args: SimilarEntriesArgs): {
81
220
  exact: {
82
221
  updatedAt?: number | undefined;
@@ -105,12 +244,10 @@ export declare function createFeedbackHooks(api: FeedbackPublicApi, options?: Fe
105
244
  viewerHasUpvoted: boolean;
106
245
  }[];
107
246
  } | undefined;
108
- useComments(args: UseCommentsArgs): import("convex/react").UsePaginatedQueryReturnType<import("convex/server").FunctionReference<"query", "public", {
109
- paginationOpts: import("convex/server").PaginationOptions;
110
- entryId: string;
111
- parentCommentId?: string;
112
- sort?: CommentSort;
113
- }, import("convex/server").PaginationResult<{
247
+ /**
248
+ * Returns one independently paginated level of comments.
249
+ */
250
+ useComments(args: UseCommentsArgs): import("convex/react").UsePaginatedQueryReturnType<import("convex/server").FunctionReference<"query", "public", import("../client/api.js").ListCommentsArgs, import("convex/server").PaginationResult<{
114
251
  updatedAt?: number | undefined;
115
252
  parentCommentId?: string | undefined;
116
253
  deletedAt?: number | undefined;
@@ -124,46 +261,31 @@ export declare function createFeedbackHooks(api: FeedbackPublicApi, options?: Fe
124
261
  replyCount: number;
125
262
  viewerHasLiked: boolean;
126
263
  }>, string | undefined>>;
127
- useCreateEntry(): import("convex/react").ReactMutation<import("convex/server").FunctionReference<"mutation", "public", {
128
- kind: EntryKind;
129
- title: string;
130
- body: string;
131
- }, string, string | undefined>>;
132
- useUpdateEntry(): import("convex/react").ReactMutation<import("convex/server").FunctionReference<"mutation", "public", {
133
- entryId: string;
134
- title: string;
135
- body: string;
136
- }, null, string | undefined>>;
137
- useSetEntryStatus(): import("convex/react").ReactMutation<import("convex/server").FunctionReference<"mutation", "public", {
138
- entryId: string;
139
- status: EntryStatus;
140
- }, null, string | undefined>>;
141
- useSetEntryUpvote(): import("convex/react").ReactMutation<import("convex/server").FunctionReference<"mutation", "public", {
142
- entryId: string;
143
- desiredState: boolean;
144
- }, {
145
- active: boolean;
146
- upvoteCount: number;
147
- }, string | undefined>>;
148
- useCreateComment(): import("convex/react").ReactMutation<import("convex/server").FunctionReference<"mutation", "public", {
149
- entryId: string;
150
- parentCommentId?: string;
151
- body: string;
152
- }, string, string | undefined>>;
153
- useUpdateComment(): import("convex/react").ReactMutation<import("convex/server").FunctionReference<"mutation", "public", {
154
- commentId: string;
155
- body: string;
156
- }, null, string | undefined>>;
157
- useDeleteComment(): import("convex/react").ReactMutation<import("convex/server").FunctionReference<"mutation", "public", {
158
- commentId: string;
159
- }, null, string | undefined>>;
160
- useSetCommentLike(): import("convex/react").ReactMutation<import("convex/server").FunctionReference<"mutation", "public", {
161
- commentId: string;
162
- desiredState: boolean;
163
- }, {
164
- active: boolean;
165
- likeCount: number;
166
- }, string | undefined>>;
264
+ /** Returns the bound create-entry mutation. */
265
+ useCreateEntry(): import("convex/react").ReactMutation<import("convex/server").FunctionReference<"mutation", "public", import("../client/api.js").CreateEntryArgs, string | RateLimitResult, string | undefined>>;
266
+ /** Returns the bound update-entry mutation. */
267
+ useUpdateEntry(): import("convex/react").ReactMutation<import("convex/server").FunctionReference<"mutation", "public", import("../client/api.js").UpdateEntryArgs, RateLimitResult | null, string | undefined>>;
268
+ /** Returns the bound status mutation. */
269
+ useSetEntryStatus(): import("convex/react").ReactMutation<import("convex/server").FunctionReference<"mutation", "public", import("../client/api.js").SetEntryStatusArgs, RateLimitResult | null, string | undefined>>;
270
+ /** Returns the idempotent entry-upvote state mutation. */
271
+ useSetEntryUpvote(): import("convex/react").ReactMutation<import("convex/server").FunctionReference<"mutation", "public", import("../client/api.js").SetEntryUpvoteArgs, import("../client/api.js").SetEntryUpvoteResult | RateLimitResult, string | undefined>>;
272
+ /** Returns the create-comment/reply mutation. */
273
+ useCreateComment(): import("convex/react").ReactMutation<import("convex/server").FunctionReference<"mutation", "public", import("../client/api.js").CreateCommentArgs, string | RateLimitResult, string | undefined>>;
274
+ /** Returns the update-comment mutation. */
275
+ useUpdateComment(): import("convex/react").ReactMutation<import("convex/server").FunctionReference<"mutation", "public", import("../client/api.js").UpdateCommentArgs, RateLimitResult | null, string | undefined>>;
276
+ /** Returns the soft-delete-comment mutation. */
277
+ useDeleteComment(): import("convex/react").ReactMutation<import("convex/server").FunctionReference<"mutation", "public", import("../client/api.js").DeleteCommentArgs, RateLimitResult | null, string | undefined>>;
278
+ /** Returns the idempotent comment-like state mutation. */
279
+ useSetCommentLike(): import("convex/react").ReactMutation<import("convex/server").FunctionReference<"mutation", "public", import("../client/api.js").SetCommentLikeArgs, import("../client/api.js").SetCommentLikeResult | RateLimitResult, string | undefined>>;
167
280
  };
168
- export type FeedbackHooks = ReturnType<typeof createFeedbackHooks>;
281
+ /**
282
+ * Hook collection returned by `createFeedbackHooks`.
283
+ *
284
+ * This type is intended to be passed to `FeedbackScreen` and other
285
+ * `convex-feedback-ui` integrations.
286
+ *
287
+ * @typeParam RateLimitResult The validated non-throwing rate-limit rejection
288
+ * type returned by mutation hooks.
289
+ */
290
+ export type FeedbackHooks<RateLimitResult = never> = ReturnType<typeof createFeedbackHooks<RateLimitResult>>;
169
291
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,KAAK,EACV,WAAW,EACX,SAAS,EACT,SAAS,EACT,WAAW,EACZ,MAAM,uBAAuB,CAAC;AAE/B,MAAM,WAAW,oBAAoB;IACnC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB;AAED,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,IAAI,CAAC,EAAE,WAAW,CAAC;CACpB;AAED,MAAM,WAAW,iBAAiB;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,C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C;;IAK/C,+CAA+C;;IAK/C,yCAAyC;;IAKzC,0DAA0D;;IAK1D,iDAAiD;;IAKjD,2CAA2C;;IAK3C,gDAAgD;;IAKhD,0DAA0D;;EAK7D;AAED;;;;;;;;GAQG;AACH,MAAM,MAAM,aAAa,CAAC,eAAe,GAAG,KAAK,IAAI,UAAU,CAC7D,OAAO,mBAAmB,CAAC,eAAe,CAAC,CAC5C,CAAC"}
@@ -1,65 +1,131 @@
1
1
  "use client";
2
2
  import { usePaginatedQuery } from "convex-helpers/react";
3
3
  import { useMutation, useQuery } from "convex/react";
4
+ const emptySimilarEntriesResult = {
5
+ exact: [],
6
+ similar: [],
7
+ };
4
8
  function positivePageSize(value, fallback) {
5
9
  return value !== undefined && Number.isInteger(value) && value > 0
6
10
  ? value
7
11
  : fallback;
8
12
  }
13
+ /**
14
+ * Creates React hooks bound to a host application's exposed feedback API.
15
+ *
16
+ * Create this once in the consuming application and reuse the returned hook
17
+ * collection.
18
+ *
19
+ * @typeParam RateLimitResult The validated non-throwing rate-limit rejection
20
+ * type returned by mutation hooks. It is inferred from the supplied API.
21
+ */
9
22
  export function createFeedbackHooks(api, options = {}) {
10
23
  const entryPageSize = positivePageSize(options.entryPageSize, 20);
11
24
  const commentPageSize = positivePageSize(options.commentPageSize, 20);
12
25
  const replyPageSize = positivePageSize(options.replyPageSize, 10);
13
26
  return {
27
+ /**
28
+ * Resolved client-side page sizes used by the generated hooks and useful
29
+ * when calling their `loadMore` functions.
30
+ */
14
31
  pageSizes: {
15
32
  entries: entryPageSize,
16
33
  comments: commentPageSize,
17
34
  replies: replyPageSize,
18
35
  },
36
+ /**
37
+ * Returns a cursor-paginated, server-filtered entry list.
38
+ */
19
39
  useEntries(args = {}) {
20
- return usePaginatedQuery(api.listEntries, args, {
40
+ const queryArgs = {
41
+ ...(args.kinds === undefined ? {} : { kinds: [...args.kinds] }),
42
+ ...(args.status === undefined ? {} : { status: args.status }),
43
+ ...(args.sort === undefined ? {} : { sort: args.sort }),
44
+ };
45
+ return usePaginatedQuery(api.listEntries, queryArgs, {
21
46
  initialNumItems: entryPageSize,
22
47
  });
23
48
  },
49
+ /**
50
+ * Reactively retrieves one entry.
51
+ *
52
+ * Passing `null` or `undefined` skips the query.
53
+ */
24
54
  useEntry(entryId) {
25
55
  return useQuery(api.getEntry, entryId === null || entryId === undefined ? "skip" : { entryId });
26
56
  },
57
+ /**
58
+ * Performs reactive full-text entry search.
59
+ *
60
+ * An empty/whitespace-only query returns `[]` without running Convex.
61
+ */
27
62
  useSearchEntries(args) {
28
63
  const searchQuery = args.searchQuery.trim();
29
- const result = useQuery(api.searchEntries, searchQuery.length === 0 ? "skip" : { ...args, searchQuery });
64
+ const queryArgs = {
65
+ searchQuery,
66
+ ...(args.kinds === undefined ? {} : { kinds: [...args.kinds] }),
67
+ ...(args.status === undefined ? {} : { status: args.status }),
68
+ ...(args.limit === undefined ? {} : { limit: args.limit }),
69
+ };
70
+ const result = useQuery(api.searchEntries, searchQuery.length === 0 ? "skip" : queryArgs);
30
71
  return searchQuery.length === 0 ? [] : result;
31
72
  },
73
+ /**
74
+ * Reactively finds exact and similar entries for a proposed draft.
75
+ *
76
+ * The query is skipped only when both title and body are blank.
77
+ *
78
+ * `limit` is forwarded to the server unchanged. The server applies the
79
+ * combined exact-first limit semantics documented by `SimilarEntriesArgs`.
80
+ */
32
81
  useSimilarEntries(args) {
33
82
  const shouldSkip = args.title.trim().length === 0 && args.body.trim().length === 0;
34
- const result = useQuery(api.findSimilarEntries, shouldSkip ? "skip" : args);
35
- return shouldSkip ? { exact: [], similar: [] } : result;
83
+ const queryArgs = {
84
+ title: args.title,
85
+ body: args.body,
86
+ ...(args.kind === undefined ? {} : { kind: args.kind }),
87
+ ...(args.limit === undefined ? {} : { limit: args.limit }),
88
+ };
89
+ const result = useQuery(api.findSimilarEntries, shouldSkip ? "skip" : queryArgs);
90
+ return shouldSkip ? emptySimilarEntriesResult : result;
36
91
  },
92
+ /**
93
+ * Returns one independently paginated level of comments.
94
+ */
37
95
  useComments(args) {
38
96
  return usePaginatedQuery(api.listComments, args, {
39
97
  initialNumItems: args.parentCommentId === undefined ? commentPageSize : replyPageSize,
40
98
  });
41
99
  },
100
+ /** Returns the bound create-entry mutation. */
42
101
  useCreateEntry() {
43
102
  return useMutation(api.createEntry);
44
103
  },
104
+ /** Returns the bound update-entry mutation. */
45
105
  useUpdateEntry() {
46
106
  return useMutation(api.updateEntry);
47
107
  },
108
+ /** Returns the bound status mutation. */
48
109
  useSetEntryStatus() {
49
110
  return useMutation(api.setEntryStatus);
50
111
  },
112
+ /** Returns the idempotent entry-upvote state mutation. */
51
113
  useSetEntryUpvote() {
52
114
  return useMutation(api.setEntryUpvote);
53
115
  },
116
+ /** Returns the create-comment/reply mutation. */
54
117
  useCreateComment() {
55
118
  return useMutation(api.createComment);
56
119
  },
120
+ /** Returns the update-comment mutation. */
57
121
  useUpdateComment() {
58
122
  return useMutation(api.updateComment);
59
123
  },
124
+ /** Returns the soft-delete-comment mutation. */
60
125
  useDeleteComment() {
61
126
  return useMutation(api.deleteComment);
62
127
  },
128
+ /** Returns the idempotent comment-like state mutation. */
63
129
  useSetCommentLike() {
64
130
  return useMutation(api.setCommentLike);
65
131
  },
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AA0CrD,SAAS,gBAAgB,CAAC,KAAyB,EAAE,QAAgB;IACnE,OAAO,KAAK,KAAK,SAAS,IAAI,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC;QAChE,CAAC,CAAC,KAAK;QACP,CAAC,CAAC,QAAQ,CAAC;AACf,CAAC;AAED,MAAM,UAAU,mBAAmB,CACjC,GAAsB,EACtB,UAAgC,EAAE;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AED,+CAA+C;QAC/C,cAAc;YACZ,OAAO,WAAW,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;QACtC,CAAC;QAED,yCAAyC;QACzC,iBAAiB;YACf,OAAO,WAAW,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;QACzC,CAAC;QAED,0DAA0D;QAC1D,iBAAiB;YACf,OAAO,WAAW,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;QACzC,CAAC;QAED,iDAAiD;QACjD,gBAAgB;YACd,OAAO,WAAW,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;QACxC,CAAC;QAED,2CAA2C;QAC3C,gBAAgB;YACd,OAAO,WAAW,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;QACxC,CAAC;QAED,gDAAgD;QAChD,gBAAgB;YACd,OAAO,WAAW,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;QACxC,CAAC;QAED,0DAA0D;QAC1D,iBAAiB;YACf,OAAO,WAAW,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;QACzC,CAAC;KACF,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "convex-feedback",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Type-safe Convex component for feedback, feature requests, bug reports, voting, comments, and duplicate search.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",