@hazem3500/palette 0.9.131 → 0.9.133
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/README.md +10 -6
- package/dist/adapters/css-variables.js +1 -1
- package/dist/adapters/tailwind.d.ts +1 -1
- package/dist/adapters/tailwind.js +1 -1
- package/dist/anchors.d.ts +2 -1
- package/dist/chunk-3SNXBRAS.js +1 -0
- package/dist/chunk-JWGDIIKJ.js +1 -0
- package/dist/{chunk-UUV356RI.js → chunk-KMRWUNT7.js} +1 -1
- package/dist/{chunk-RAAJF54I.js → chunk-OAGWNW4W.js} +1 -1
- package/dist/{color-editor-I5ELNYPO.js → color-editor-GCCLM3TV.js} +1 -1
- package/dist/design-comment-LHFSWNU7.js +1 -0
- package/dist/{design-export-55QSPEWM.js → design-export-I766FRDX.js} +1 -1
- package/dist/{design-geometry-OXGWR5J2.js → design-geometry-W7PSW5J2.js} +1 -1
- package/dist/design-mode.js +1 -1
- package/dist/design-system.d.ts +1 -1
- package/dist/frame-size-E6OGNHNX.js +1 -0
- package/dist/frame-size.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/{inline-text-editor-S4LVCKZL.js → inline-text-editor-5JSAHEHE.js} +1 -1
- package/dist/message-links.d.ts +2 -0
- package/dist/node.mjs +100 -21
- package/dist/open-state.d.ts +7 -0
- package/dist/postgres/011_comment_api_key_name.sql +1 -0
- package/dist/postgres/012_comment_images.sql +25 -0
- package/dist/react-props-panel-P47YFFSU.js +1 -0
- package/dist/react-props-panel.d.ts +1 -1
- package/dist/react.js +1 -1
- package/dist/review-layer.d.ts +1 -0
- package/dist/server.js +97 -20
- package/dist/setup.js +1 -1
- package/dist/snapshot-CFKV3VWX.js +1 -0
- package/dist/snapshot-annotate-HW4ZWT7T.js +1 -0
- package/dist/snapshot-annotate.d.ts +16 -0
- package/dist/snapshot.d.ts +15 -4
- package/dist/thread-snapshot-2V4AV3UN.js +1 -0
- package/dist/thread-snapshot.d.ts +4 -6
- package/dist/token-adapter.d.ts +1 -0
- package/dist/{token-custom-7MJFPGVB.js → token-custom-CPPHGYMJ.js} +1 -1
- package/dist/{token-page-YQ52JS6G.js → token-page-63C3T4DY.js} +1 -1
- package/dist/{token-picker-HHT4OC3V.js → token-picker-ARVCFUCY.js} +1 -1
- package/dist/types.d.ts +4 -0
- package/package.json +1 -1
- package/server/bot-tokens.ts +7 -3
- package/server/index.ts +80 -17
- package/server/migrations/0025_comment_api_key_name.sql +1 -0
- package/server/migrations/0026_comment_images.sql +22 -0
- package/server/setup-client.txt +115 -79
- package/server/snapshots.ts +2 -1
- package/server/tokens.ts +2 -2
- package/src/types.ts +4 -0
- package/dist/chunk-EVRPBA4F.js +0 -1
- package/dist/design-comment-VXRH45UI.js +0 -1
- package/dist/frame-size-EAVSR4SA.js +0 -1
- package/dist/react-props-panel-VON2NO7N.js +0 -1
- package/dist/snapshot-BFHCCGOL.js +0 -1
- package/dist/thread-snapshot-TJHRZZOR.js +0 -1
- /package/dist/{design-panel-DBAUVCIJ.js → design-panel-GU2SWV33.js} +0 -0
package/server/snapshots.ts
CHANGED
|
@@ -211,7 +211,7 @@ export function storeSnapshot(
|
|
|
211
211
|
) {
|
|
212
212
|
return db
|
|
213
213
|
.prepare(
|
|
214
|
-
`INSERT ${replace ? "" : "OR IGNORE "}INTO snapshots(thread_id,kind,mime,bytes,size,created_at) SELECT ?,?,?,?,?,? WHERE (SELECT COALESCE(SUM(s.size),0) FROM snapshots s JOIN threads t ON t.id=s.thread_id WHERE t.project=? AND NOT (s.thread_id=? AND s.kind=?))+?<=?${
|
|
214
|
+
`INSERT ${replace ? "" : "OR IGNORE "}INTO snapshots(thread_id,kind,mime,bytes,size,created_at) SELECT ?,?,?,?,?,? WHERE (SELECT COALESCE(SUM(s.size),0) FROM snapshots s JOIN threads t ON t.id=s.thread_id WHERE t.project=? AND NOT (s.thread_id=? AND s.kind=?))+(SELECT COALESCE(SUM(size),0) FROM comment_images WHERE project=?)+?<=?${
|
|
215
215
|
replace
|
|
216
216
|
? " ON CONFLICT(thread_id,kind) DO UPDATE SET mime=excluded.mime,bytes=excluded.bytes,size=excluded.size,created_at=excluded.created_at"
|
|
217
217
|
: " RETURNING thread_id"
|
|
@@ -227,6 +227,7 @@ export function storeSnapshot(
|
|
|
227
227
|
project,
|
|
228
228
|
threadId,
|
|
229
229
|
snapshot.kind,
|
|
230
|
+
project,
|
|
230
231
|
snapshot.bytes.length,
|
|
231
232
|
cap
|
|
232
233
|
);
|
package/server/tokens.ts
CHANGED
|
@@ -266,7 +266,7 @@ export async function authenticateToken(
|
|
|
266
266
|
project: string,
|
|
267
267
|
access: PatAccess | undefined,
|
|
268
268
|
request: Request
|
|
269
|
-
): Promise<TokenUser> {
|
|
269
|
+
): Promise<TokenUser & { tokenName: string }> {
|
|
270
270
|
const parts = bearer.match(PAT_PATTERN);
|
|
271
271
|
const row = parts
|
|
272
272
|
? await env.DB.prepare(
|
|
@@ -339,5 +339,5 @@ export async function authenticateToken(
|
|
|
339
339
|
method: request.method,
|
|
340
340
|
path: new URL(request.url).pathname,
|
|
341
341
|
}).run();
|
|
342
|
-
return user;
|
|
342
|
+
return { ...user, tokenName: row.name };
|
|
343
343
|
}
|
package/src/types.ts
CHANGED
|
@@ -39,6 +39,10 @@ export interface Comment {
|
|
|
39
39
|
id: string;
|
|
40
40
|
body: string;
|
|
41
41
|
author: Identity;
|
|
42
|
+
/** Display name of the personal access key that posted this comment. */
|
|
43
|
+
apiKeyName?: string;
|
|
44
|
+
/** Authenticated URL for an image the author attached. */
|
|
45
|
+
image?: string;
|
|
42
46
|
createdAt: number;
|
|
43
47
|
editedAt: number | null;
|
|
44
48
|
reactions: Record<string, string[]>;
|