@hazem3500/palette 0.9.115 → 0.9.117
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/NODE.md +1 -1
- package/README.md +3 -1
- package/dist/chunk-ZGJYCFAB.js +1 -0
- package/dist/frame-size-24FEF7RJ.js +1 -0
- package/dist/index.js +1 -1
- package/dist/node.mjs +3 -3
- package/dist/react.js +1 -1
- package/dist/server.js +3 -3
- package/dist/setup.js +1 -1
- package/dist/types.d.ts +2 -0
- package/package.json +1 -1
- package/server/setup-client.txt +14 -14
- package/server/tokens.ts +2 -2
- package/src/types.ts +2 -0
- package/dist/chunk-PI5FFV5P.js +0 -1
- package/dist/frame-size-TF6SIUFO.js +0 -1
package/server/tokens.ts
CHANGED
|
@@ -101,9 +101,9 @@ export const pruneAudit = (db: D1Database, now: number) =>
|
|
|
101
101
|
/** Projects an account holder may limit a token to: owned or joined. */
|
|
102
102
|
export async function accountProjects(env: Env, userId: string, activeMembership = false) {
|
|
103
103
|
const rows = await env.DB.prepare(
|
|
104
|
-
`SELECT id AS project FROM workspaces WHERE owner_id=? UNION SELECT project FROM ${activeMembership ? "project_access" : "project_members"} WHERE user_id=? UNION SELECT project FROM project_owners WHERE user_id
|
|
104
|
+
`SELECT id AS project FROM workspaces WHERE owner_id=? UNION SELECT project FROM ${activeMembership ? "project_access" : "project_members"} WHERE user_id=? UNION SELECT project FROM project_owners WHERE user_id=?${activeMembership ? " UNION SELECT m.project FROM project_members m WHERE m.user_id=? AND NOT EXISTS(SELECT 1 FROM project_settings s WHERE s.project=m.project AND s.access='private')" : ""}`
|
|
105
105
|
)
|
|
106
|
-
.bind(userId, userId, userId)
|
|
106
|
+
.bind(userId, userId, userId, ...(activeMembership ? [userId] : []))
|
|
107
107
|
.all<{ project: string }>();
|
|
108
108
|
return rows.results.map((row) => row.project).sort();
|
|
109
109
|
}
|
package/src/types.ts
CHANGED
|
@@ -281,6 +281,8 @@ export interface CommentsOptions {
|
|
|
281
281
|
*/
|
|
282
282
|
defaultMode?: "iframe" | "transform";
|
|
283
283
|
iframeUrl?(location: Location): string;
|
|
284
|
+
/** Resolve a comment destination before same-origin iframe navigation. Null cancels; current is the live framed page, not the shell. */
|
|
285
|
+
resolveUrl?(destination: URL, current: Location): URL | null;
|
|
284
286
|
/**
|
|
285
287
|
* Single-copy simulated viewport (with mode "iframe"): turning it on reloads this page as a
|
|
286
288
|
* shell for Palette, so the app runs once, in the frame. Requires the app's entry
|