studiograph 1.3.2 → 1.3.3-next.10
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/agent/orchestrator.d.ts +8 -0
- package/dist/agent/orchestrator.js +13 -2
- package/dist/agent/orchestrator.js.map +1 -1
- package/dist/agent/tools/graph-tools.d.ts +5 -1
- package/dist/agent/tools/graph-tools.js +161 -9
- package/dist/agent/tools/graph-tools.js.map +1 -1
- package/dist/agent/tools/permission-tools.d.ts +15 -14
- package/dist/agent/tools/permission-tools.js +65 -128
- package/dist/agent/tools/permission-tools.js.map +1 -1
- package/dist/cli/commands/join.d.ts +3 -2
- package/dist/cli/commands/join.js +93 -98
- package/dist/cli/commands/join.js.map +1 -1
- package/dist/cli/commands/redeploy.js +14 -22
- package/dist/cli/commands/redeploy.js.map +1 -1
- package/dist/cli/commands/serve.js +3 -3
- package/dist/cli/commands/serve.js.map +1 -1
- package/dist/cli/commands/sync.d.ts +4 -2
- package/dist/cli/commands/sync.js +21 -22
- package/dist/cli/commands/sync.js.map +1 -1
- package/dist/cli/commands/user.d.ts +7 -0
- package/dist/cli/commands/user.js +153 -0
- package/dist/cli/commands/user.js.map +1 -0
- package/dist/cli/index.js +3 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/core/graph.d.ts +8 -2
- package/dist/core/graph.js +11 -7
- package/dist/core/graph.js.map +1 -1
- package/dist/core/types.d.ts +9 -0
- package/dist/core/types.js +1 -0
- package/dist/core/types.js.map +1 -1
- package/dist/core/workspace-manager.js +1 -5
- package/dist/core/workspace-manager.js.map +1 -1
- package/dist/core/workspace.js +1 -1
- package/dist/core/workspace.js.map +1 -1
- package/dist/server/chrome/chrome.js +12 -212
- package/dist/server/commit-scheduler.d.ts +39 -0
- package/dist/server/commit-scheduler.js +99 -0
- package/dist/server/commit-scheduler.js.map +1 -0
- package/dist/server/index.js +86 -46
- package/dist/server/index.js.map +1 -1
- package/dist/server/routes/auth-api.d.ts +8 -0
- package/dist/server/routes/auth-api.js +163 -0
- package/dist/server/routes/auth-api.js.map +1 -0
- package/dist/server/routes/chat.js +4 -0
- package/dist/server/routes/chat.js.map +1 -1
- package/dist/server/routes/git-http.d.ts +23 -0
- package/dist/server/routes/git-http.js +213 -0
- package/dist/server/routes/git-http.js.map +1 -0
- package/dist/server/routes/graph-api.d.ts +6 -2
- package/dist/server/routes/graph-api.js +230 -50
- package/dist/server/routes/graph-api.js.map +1 -1
- package/dist/server/routes/permissions-api.d.ts +5 -4
- package/dist/server/routes/permissions-api.js +39 -167
- package/dist/server/routes/permissions-api.js.map +1 -1
- package/dist/server/routes/ws.d.ts +7 -0
- package/dist/server/routes/ws.js +35 -0
- package/dist/server/routes/ws.js.map +1 -0
- package/dist/server/ws-hub.d.ts +36 -0
- package/dist/server/ws-hub.js +63 -0
- package/dist/server/ws-hub.js.map +1 -0
- package/dist/services/auth-service.d.ts +77 -0
- package/dist/services/auth-service.js +302 -0
- package/dist/services/auth-service.js.map +1 -0
- package/dist/utils/git.d.ts +21 -1
- package/dist/utils/git.js +69 -3
- package/dist/utils/git.js.map +1 -1
- package/dist/web/_app/immutable/assets/{0.CDbX4Cwz.css → 0.CL-hNrKE.css} +1 -1
- package/dist/web/_app/immutable/assets/7.Cn2DG-J6.css +1 -0
- package/dist/web/_app/immutable/assets/8.Sm6jB3a0.css +1 -0
- package/dist/web/_app/immutable/assets/AppShell.RYbgfVr0.css +1 -0
- package/dist/web/_app/immutable/chunks/-lhxaNNQ.js +1 -0
- package/dist/web/_app/immutable/chunks/BFD-PG4k.js +2 -0
- package/dist/web/_app/immutable/chunks/BKhAbhZ4.js +1 -0
- package/dist/web/_app/immutable/chunks/BUuoVpOJ.js +1 -0
- package/dist/web/_app/immutable/chunks/BuHHk4nP.js +1 -0
- package/dist/web/_app/immutable/chunks/Bv8xNJQh.js +1 -0
- package/dist/web/_app/immutable/chunks/C0iyiXwO.js +1 -0
- package/dist/web/_app/immutable/chunks/CH-raHh7.js +1 -0
- package/dist/web/_app/immutable/chunks/{DTUXhwEY.js → CQo_whF8.js} +1 -1
- package/dist/web/_app/immutable/chunks/CiIF45lL.js +1 -0
- package/dist/web/_app/immutable/chunks/{DEJSHbC3.js → Cs6vwwZC.js} +1 -1
- package/dist/web/_app/immutable/chunks/{C1SF7XfX.js → DJO0wVMY.js} +4 -4
- package/dist/web/_app/immutable/chunks/DeY0oOW3.js +2 -0
- package/dist/web/_app/immutable/chunks/{BHedmkKI.js → Dj2efhG6.js} +18 -18
- package/dist/web/_app/immutable/chunks/ew-IdGn0.js +1 -0
- package/dist/web/_app/immutable/chunks/yEjjrv_c.js +23 -0
- package/dist/web/_app/immutable/entry/app.BNN66g6y.js +2 -0
- package/dist/web/_app/immutable/entry/start.CbKqTiwM.js +1 -0
- package/dist/web/_app/immutable/nodes/0.DthLeuCh.js +2 -0
- package/dist/web/_app/immutable/nodes/1.ZBkeuxO_.js +1 -0
- package/dist/web/_app/immutable/nodes/2.CioLRnGy.js +1 -0
- package/dist/web/_app/immutable/nodes/3.Df3ut4ji.js +1 -0
- package/dist/web/_app/immutable/nodes/4.HFzA-u2O.js +16 -0
- package/dist/web/_app/immutable/nodes/5.h31NMedP.js +4 -0
- package/dist/web/_app/immutable/nodes/6.MktCIoXa.js +2 -0
- package/dist/web/_app/immutable/nodes/7.CZ7lC_rb.js +1 -0
- package/dist/web/_app/immutable/nodes/8.CRf2WFmY.js +1 -0
- package/dist/web/_app/version.json +1 -1
- package/dist/web/index.html +12 -12
- package/package.json +11 -2
- package/dist/web/_app/immutable/assets/AppShell.D0rmbdqF.css +0 -1
- package/dist/web/_app/immutable/chunks/Bopa-Ask.js +0 -1
- package/dist/web/_app/immutable/chunks/CEkx7wvp.js +0 -1
- package/dist/web/_app/immutable/chunks/COwytaCP.js +0 -1
- package/dist/web/_app/immutable/chunks/Dml-u95b.js +0 -2
- package/dist/web/_app/immutable/chunks/DvKVaE7M.js +0 -1
- package/dist/web/_app/immutable/chunks/J4wxg_sP.js +0 -23
- package/dist/web/_app/immutable/chunks/MbiSz-iW.js +0 -2
- package/dist/web/_app/immutable/chunks/bSAC733J.js +0 -1
- package/dist/web/_app/immutable/entry/app.B0KkA_jR.js +0 -2
- package/dist/web/_app/immutable/entry/start.DFSNI2p-.js +0 -1
- package/dist/web/_app/immutable/nodes/0.DfbCOBhn.js +0 -2
- package/dist/web/_app/immutable/nodes/1.DMtWWiM4.js +0 -1
- package/dist/web/_app/immutable/nodes/2.CgKSJOen.js +0 -1
- package/dist/web/_app/immutable/nodes/3.CVYHBZE3.js +0 -1
- package/dist/web/_app/immutable/nodes/4.CHN1uWec.js +0 -16
- package/dist/web/_app/immutable/nodes/5.B4_87Wva.js +0 -4
- package/dist/web/_app/immutable/nodes/6.CGZ970f8.js +0 -2
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Authentication service
|
|
3
|
+
*
|
|
4
|
+
* SQLite-backed user store with bcrypt password hashing and JWT sessions.
|
|
5
|
+
* Database lives at .studiograph/auth.db inside the workspace.
|
|
6
|
+
*
|
|
7
|
+
* Auth state is portable via .studiograph/auth-seed.json — a JSON export of
|
|
8
|
+
* all users (with bcrypt hashes) and the JWT secret. The seed file is
|
|
9
|
+
* committed to the config repo so it syncs between local and Railway:
|
|
10
|
+
* local setup → commit → push → Railway redeploy → users restored from seed
|
|
11
|
+
*/
|
|
12
|
+
import Database from 'better-sqlite3';
|
|
13
|
+
import bcrypt from 'bcryptjs';
|
|
14
|
+
import jwt from 'jsonwebtoken';
|
|
15
|
+
import { randomBytes } from 'crypto';
|
|
16
|
+
import { spawnSync } from 'child_process';
|
|
17
|
+
import { existsSync, readFileSync, writeFileSync, mkdirSync } from 'fs';
|
|
18
|
+
import { join } from 'path';
|
|
19
|
+
const BCRYPT_ROUNDS = 12;
|
|
20
|
+
const JWT_EXPIRY = '7d';
|
|
21
|
+
export class AuthService {
|
|
22
|
+
db;
|
|
23
|
+
jwtSecret;
|
|
24
|
+
sgDir;
|
|
25
|
+
constructor(workspacePath) {
|
|
26
|
+
this.sgDir = join(workspacePath, '.studiograph');
|
|
27
|
+
if (!existsSync(this.sgDir)) {
|
|
28
|
+
mkdirSync(this.sgDir, { recursive: true });
|
|
29
|
+
}
|
|
30
|
+
// Open/create SQLite database
|
|
31
|
+
const dbPath = join(this.sgDir, 'auth.db');
|
|
32
|
+
this.db = new Database(dbPath);
|
|
33
|
+
this.db.pragma('journal_mode = WAL');
|
|
34
|
+
// Create users table
|
|
35
|
+
this.db.exec(`
|
|
36
|
+
CREATE TABLE IF NOT EXISTS users (
|
|
37
|
+
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
38
|
+
email TEXT UNIQUE NOT NULL,
|
|
39
|
+
password_hash TEXT NOT NULL,
|
|
40
|
+
display_name TEXT NOT NULL,
|
|
41
|
+
role TEXT NOT NULL DEFAULT 'member' CHECK(role IN ('admin', 'member')),
|
|
42
|
+
created_at TEXT NOT NULL DEFAULT (datetime('now')),
|
|
43
|
+
updated_at TEXT NOT NULL DEFAULT (datetime('now'))
|
|
44
|
+
)
|
|
45
|
+
`);
|
|
46
|
+
// Create collection_access table for per-collection permissions
|
|
47
|
+
this.db.exec(`
|
|
48
|
+
CREATE TABLE IF NOT EXISTS collection_access (
|
|
49
|
+
user_id INTEGER NOT NULL REFERENCES users(id) ON DELETE CASCADE,
|
|
50
|
+
collection_name TEXT NOT NULL,
|
|
51
|
+
created_at TEXT NOT NULL DEFAULT (datetime('now')),
|
|
52
|
+
PRIMARY KEY (user_id, collection_name)
|
|
53
|
+
)
|
|
54
|
+
`);
|
|
55
|
+
this.db.pragma('foreign_keys = ON');
|
|
56
|
+
// Ensure auth.db and auth-secret are gitignored (only seed file should be committed)
|
|
57
|
+
this.ensureGitignore();
|
|
58
|
+
// If DB is empty, try restoring from seed file (synced via config repo)
|
|
59
|
+
if (!this.hasUsers()) {
|
|
60
|
+
this.importFromSeed();
|
|
61
|
+
}
|
|
62
|
+
// Load or generate JWT secret (seed import may have set it)
|
|
63
|
+
const secretPath = join(this.sgDir, 'auth-secret');
|
|
64
|
+
if (existsSync(secretPath)) {
|
|
65
|
+
this.jwtSecret = readFileSync(secretPath, 'utf-8').trim();
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
this.jwtSecret = randomBytes(32).toString('hex');
|
|
69
|
+
writeFileSync(secretPath, this.jwtSecret, { mode: 0o600 });
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
createUser(email, password, displayName, role = 'member') {
|
|
73
|
+
const normalized = email.toLowerCase().trim();
|
|
74
|
+
if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(normalized)) {
|
|
75
|
+
throw new Error('Invalid email address');
|
|
76
|
+
}
|
|
77
|
+
if (!password || password.length < 8) {
|
|
78
|
+
throw new Error('Password must be at least 8 characters');
|
|
79
|
+
}
|
|
80
|
+
const hash = bcrypt.hashSync(password, BCRYPT_ROUNDS);
|
|
81
|
+
const stmt = this.db.prepare('INSERT INTO users (email, password_hash, display_name, role) VALUES (?, ?, ?, ?)');
|
|
82
|
+
const result = stmt.run(normalized, hash, displayName.trim(), role);
|
|
83
|
+
this.exportSeed();
|
|
84
|
+
return {
|
|
85
|
+
id: result.lastInsertRowid,
|
|
86
|
+
email: normalized,
|
|
87
|
+
displayName: displayName.trim(),
|
|
88
|
+
role,
|
|
89
|
+
createdAt: new Date().toISOString(),
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
authenticate(email, password) {
|
|
93
|
+
const normalized = email.toLowerCase().trim();
|
|
94
|
+
const row = this.db.prepare('SELECT * FROM users WHERE email = ?').get(normalized);
|
|
95
|
+
if (!row || !bcrypt.compareSync(password, row.password_hash)) {
|
|
96
|
+
return null;
|
|
97
|
+
}
|
|
98
|
+
const user = this.toAuthUser(row);
|
|
99
|
+
const token = jwt.sign({ userId: user.id, email: user.email, role: user.role }, this.jwtSecret, { expiresIn: JWT_EXPIRY });
|
|
100
|
+
return { user, token };
|
|
101
|
+
}
|
|
102
|
+
verifyToken(token) {
|
|
103
|
+
try {
|
|
104
|
+
const payload = jwt.verify(token, this.jwtSecret);
|
|
105
|
+
const row = this.db.prepare('SELECT * FROM users WHERE id = ?').get(payload.userId);
|
|
106
|
+
return row ? this.toAuthUser(row) : null;
|
|
107
|
+
}
|
|
108
|
+
catch {
|
|
109
|
+
return null;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
listUsers() {
|
|
113
|
+
const rows = this.db.prepare('SELECT * FROM users ORDER BY created_at ASC').all();
|
|
114
|
+
return rows.map(r => this.toAuthUser(r));
|
|
115
|
+
}
|
|
116
|
+
deleteUser(email) {
|
|
117
|
+
const normalized = email.toLowerCase().trim();
|
|
118
|
+
const result = this.db.prepare('DELETE FROM users WHERE email = ?').run(normalized);
|
|
119
|
+
if (result.changes > 0)
|
|
120
|
+
this.exportSeed();
|
|
121
|
+
return result.changes > 0;
|
|
122
|
+
}
|
|
123
|
+
updatePassword(email, newPassword) {
|
|
124
|
+
if (!newPassword || newPassword.length < 8) {
|
|
125
|
+
throw new Error('Password must be at least 8 characters');
|
|
126
|
+
}
|
|
127
|
+
const normalized = email.toLowerCase().trim();
|
|
128
|
+
const hash = bcrypt.hashSync(newPassword, BCRYPT_ROUNDS);
|
|
129
|
+
const result = this.db.prepare("UPDATE users SET password_hash = ?, updated_at = datetime('now') WHERE email = ?").run(hash, normalized);
|
|
130
|
+
if (result.changes > 0)
|
|
131
|
+
this.exportSeed();
|
|
132
|
+
return result.changes > 0;
|
|
133
|
+
}
|
|
134
|
+
// ── Collection access management ──
|
|
135
|
+
grantCollectionAccess(userId, collectionName) {
|
|
136
|
+
this.db.prepare('INSERT OR IGNORE INTO collection_access (user_id, collection_name) VALUES (?, ?)').run(userId, collectionName);
|
|
137
|
+
this.exportSeed();
|
|
138
|
+
}
|
|
139
|
+
revokeCollectionAccess(userId, collectionName) {
|
|
140
|
+
this.db.prepare('DELETE FROM collection_access WHERE user_id = ? AND collection_name = ?').run(userId, collectionName);
|
|
141
|
+
this.exportSeed();
|
|
142
|
+
}
|
|
143
|
+
getUserCollections(userId) {
|
|
144
|
+
const rows = this.db.prepare('SELECT collection_name FROM collection_access WHERE user_id = ? ORDER BY collection_name').all(userId);
|
|
145
|
+
return rows.map(r => r.collection_name);
|
|
146
|
+
}
|
|
147
|
+
getCollectionUsers(collectionName) {
|
|
148
|
+
const rows = this.db.prepare(`
|
|
149
|
+
SELECT u.* FROM users u
|
|
150
|
+
JOIN collection_access ca ON ca.user_id = u.id
|
|
151
|
+
WHERE ca.collection_name = ?
|
|
152
|
+
ORDER BY u.display_name
|
|
153
|
+
`).all(collectionName);
|
|
154
|
+
return rows.map(r => this.toAuthUser(r));
|
|
155
|
+
}
|
|
156
|
+
renameCollection(oldName, newName) {
|
|
157
|
+
this.db.prepare('UPDATE collection_access SET collection_name = ? WHERE collection_name = ?').run(newName, oldName);
|
|
158
|
+
this.exportSeed();
|
|
159
|
+
}
|
|
160
|
+
hasUsers() {
|
|
161
|
+
const row = this.db.prepare('SELECT COUNT(*) as count FROM users').get();
|
|
162
|
+
return row.count > 0;
|
|
163
|
+
}
|
|
164
|
+
getUserCount() {
|
|
165
|
+
const row = this.db.prepare('SELECT COUNT(*) as count FROM users').get();
|
|
166
|
+
return row.count;
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Ensure auth.db and auth-secret are in .studiograph/.gitignore.
|
|
170
|
+
* Only the seed JSON file should be committed to the config repo.
|
|
171
|
+
*/
|
|
172
|
+
ensureGitignore() {
|
|
173
|
+
const gitignorePath = join(this.sgDir, '.gitignore');
|
|
174
|
+
const entries = ['auth.db', 'auth.db-wal', 'auth.db-shm', 'auth-secret'];
|
|
175
|
+
let content = '';
|
|
176
|
+
if (existsSync(gitignorePath)) {
|
|
177
|
+
content = readFileSync(gitignorePath, 'utf-8');
|
|
178
|
+
}
|
|
179
|
+
const missing = entries.filter(e => !content.includes(e));
|
|
180
|
+
if (missing.length > 0) {
|
|
181
|
+
const suffix = (content && !content.endsWith('\n') ? '\n' : '') +
|
|
182
|
+
'# Auth database is ephemeral — rebuilt from auth-seed.json\n' +
|
|
183
|
+
missing.join('\n') + '\n';
|
|
184
|
+
writeFileSync(gitignorePath, content + suffix, 'utf-8');
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Export all users and JWT secret to .studiograph/auth-seed.json.
|
|
189
|
+
* If .studiograph/ is a git repo with a remote, auto-commits and pushes
|
|
190
|
+
* the seed file so it syncs between environments.
|
|
191
|
+
*/
|
|
192
|
+
exportSeed() {
|
|
193
|
+
const rows = this.db.prepare('SELECT email, password_hash, display_name, role, created_at FROM users ORDER BY id ASC').all();
|
|
194
|
+
const accessRows = this.db.prepare(`
|
|
195
|
+
SELECT u.email AS user_email, ca.collection_name
|
|
196
|
+
FROM collection_access ca JOIN users u ON u.id = ca.user_id
|
|
197
|
+
ORDER BY u.email, ca.collection_name
|
|
198
|
+
`).all();
|
|
199
|
+
const seed = {
|
|
200
|
+
jwtSecret: this.jwtSecret,
|
|
201
|
+
users: rows,
|
|
202
|
+
collection_access: accessRows,
|
|
203
|
+
};
|
|
204
|
+
const seedPath = join(this.sgDir, 'auth-seed.json');
|
|
205
|
+
writeFileSync(seedPath, JSON.stringify(seed, null, 2), 'utf-8');
|
|
206
|
+
this.pushSeed();
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* Commit and push auth-seed.json if .studiograph/ is a git repo with a remote.
|
|
210
|
+
* Non-fatal — logs warnings on failure but never throws.
|
|
211
|
+
*/
|
|
212
|
+
pushSeed() {
|
|
213
|
+
try {
|
|
214
|
+
// Check if .studiograph/ is a git repo
|
|
215
|
+
const isRepo = spawnSync('git', ['rev-parse', '--git-dir'], {
|
|
216
|
+
cwd: this.sgDir, encoding: 'utf-8', stdio: 'pipe',
|
|
217
|
+
});
|
|
218
|
+
if (isRepo.status !== 0)
|
|
219
|
+
return;
|
|
220
|
+
// Check if there's a remote to push to
|
|
221
|
+
const hasRemote = spawnSync('git', ['remote'], {
|
|
222
|
+
cwd: this.sgDir, encoding: 'utf-8', stdio: 'pipe',
|
|
223
|
+
});
|
|
224
|
+
if (hasRemote.status !== 0 || !hasRemote.stdout.trim())
|
|
225
|
+
return;
|
|
226
|
+
// Stage only auth-seed.json and .gitignore (in case it was just updated)
|
|
227
|
+
spawnSync('git', ['add', 'auth-seed.json', '.gitignore'], {
|
|
228
|
+
cwd: this.sgDir, encoding: 'utf-8', stdio: 'pipe',
|
|
229
|
+
});
|
|
230
|
+
// Check if there's anything to commit
|
|
231
|
+
const diff = spawnSync('git', ['diff', '--cached', '--quiet'], {
|
|
232
|
+
cwd: this.sgDir, encoding: 'utf-8', stdio: 'pipe',
|
|
233
|
+
});
|
|
234
|
+
if (diff.status === 0)
|
|
235
|
+
return; // nothing staged
|
|
236
|
+
// Commit
|
|
237
|
+
const commit = spawnSync('git', ['commit', '-m', 'Update auth users'], {
|
|
238
|
+
cwd: this.sgDir, encoding: 'utf-8', stdio: 'pipe',
|
|
239
|
+
});
|
|
240
|
+
if (commit.status !== 0) {
|
|
241
|
+
console.warn(`Auth: failed to commit seed — ${(commit.stderr || '').trim()}`);
|
|
242
|
+
return;
|
|
243
|
+
}
|
|
244
|
+
// Push
|
|
245
|
+
const push = spawnSync('git', ['push'], {
|
|
246
|
+
cwd: this.sgDir, encoding: 'utf-8', stdio: 'pipe', timeout: 30_000,
|
|
247
|
+
});
|
|
248
|
+
if (push.status !== 0) {
|
|
249
|
+
console.warn(`Auth: failed to push seed — ${(push.stderr || '').trim()}`);
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
catch (err) {
|
|
253
|
+
console.warn(`Auth: seed sync failed — ${err.message}`);
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* Import users and JWT secret from .studiograph/auth-seed.json.
|
|
258
|
+
* Only runs when the database is empty (fresh boot / volume wipe).
|
|
259
|
+
*/
|
|
260
|
+
importFromSeed() {
|
|
261
|
+
const seedPath = join(this.sgDir, 'auth-seed.json');
|
|
262
|
+
if (!existsSync(seedPath))
|
|
263
|
+
return;
|
|
264
|
+
try {
|
|
265
|
+
const seed = JSON.parse(readFileSync(seedPath, 'utf-8'));
|
|
266
|
+
// Restore JWT secret so existing tokens remain valid
|
|
267
|
+
if (seed.jwtSecret) {
|
|
268
|
+
const secretPath = join(this.sgDir, 'auth-secret');
|
|
269
|
+
writeFileSync(secretPath, seed.jwtSecret, { mode: 0o600 });
|
|
270
|
+
}
|
|
271
|
+
// Restore users with their original password hashes (no re-hashing needed)
|
|
272
|
+
const stmt = this.db.prepare('INSERT OR IGNORE INTO users (email, password_hash, display_name, role, created_at) VALUES (?, ?, ?, ?, ?)');
|
|
273
|
+
for (const u of seed.users) {
|
|
274
|
+
stmt.run(u.email, u.password_hash, u.display_name, u.role, u.created_at);
|
|
275
|
+
}
|
|
276
|
+
// Restore collection access grants (uses email as portable key)
|
|
277
|
+
if (seed.collection_access?.length) {
|
|
278
|
+
const accessStmt = this.db.prepare('INSERT OR IGNORE INTO collection_access (user_id, collection_name) SELECT id, ? FROM users WHERE email = ?');
|
|
279
|
+
for (const ca of seed.collection_access) {
|
|
280
|
+
accessStmt.run(ca.collection_name, ca.user_email);
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
console.log(`Auth: restored ${seed.users.length} user(s) from seed`);
|
|
284
|
+
}
|
|
285
|
+
catch (err) {
|
|
286
|
+
console.warn(`Auth: failed to import seed — ${err.message}`);
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
close() {
|
|
290
|
+
this.db.close();
|
|
291
|
+
}
|
|
292
|
+
toAuthUser(row) {
|
|
293
|
+
return {
|
|
294
|
+
id: row.id,
|
|
295
|
+
email: row.email,
|
|
296
|
+
displayName: row.display_name,
|
|
297
|
+
role: row.role,
|
|
298
|
+
createdAt: row.created_at,
|
|
299
|
+
};
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
//# sourceMappingURL=auth-service.js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AAM,UAAU,GAAG,IAAI,CAAC,EAAE,CAAC,OAAO,CAChC,4GAA4G,CAC7G,CAAC;gBACF,KAAK,MAAM,EAAE,IAAI,IAAI,CAAC,iBAAiB,EAAE,CAAC;oBACxC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC,eAAe,EAAE,EAAE,CAAC,UAAU,CAAC,CAAC;gBACpD,CAAC;YACH,CAAC;YAED,OAAO,CAAC,GAAG,CAAC,kBAAkB,IAAI,CAAC,KAAK,CAAC,MAAM,oBAAoB,CAAC,CAAC;QACvE,CAAC;QAAC,OAAO,GAAQ,EAAE,CAAC;YAClB,OAAO,CAAC,IAAI,CAAC,iCAAiC,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;QAC/D,CAAC;IACH,CAAC;IAED,KAAK;QACH,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC;IAClB,CAAC;IAEO,UAAU,CAAC,GAAY;QAC7B,OAAO;YACL,EAAE,EAAE,GAAG,CAAC,EAAE;YACV,KAAK,EAAE,GAAG,CAAC,KAAK;YAChB,WAAW,EAAE,GAAG,CAAC,YAAY;YAC7B,IAAI,EAAE,GAAG,CAAC,IAA0B;YACpC,SAAS,EAAE,GAAG,CAAC,UAAU;SAC1B,CAAC;IACJ,CAAC;CACF"}
|
package/dist/utils/git.d.ts
CHANGED
|
@@ -38,11 +38,31 @@ export declare function gitHasUncommittedChanges(repoPath: string): boolean;
|
|
|
38
38
|
* Check if a directory is a git repository.
|
|
39
39
|
*/
|
|
40
40
|
export declare function isGitRepo(repoPath: string): boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Check if a git repo has a remote named "origin" configured.
|
|
43
|
+
*/
|
|
44
|
+
export declare function gitHasRemote(repoPath: string): boolean;
|
|
45
|
+
export interface GitCloneOptions {
|
|
46
|
+
/** When true, suppress all output and disable interactive prompts (for server use). */
|
|
47
|
+
silent?: boolean;
|
|
48
|
+
/** Basic Auth credentials for the embedded git server. */
|
|
49
|
+
credentials?: {
|
|
50
|
+
username: string;
|
|
51
|
+
password: string;
|
|
52
|
+
};
|
|
53
|
+
}
|
|
41
54
|
/**
|
|
42
55
|
* Clone a remote repository to a local path.
|
|
56
|
+
*
|
|
57
|
+
* Automatically injects the stored GitHub PAT (from `studiograph auth` or
|
|
58
|
+
* GITHUB_TOKEN env) via GIT_ASKPASS so Git never blocks on an interactive
|
|
59
|
+
* credential prompt. If no token is available and `silent` is false (the
|
|
60
|
+
* default), uses `stdio: 'inherit'` so Git's credential prompt can reach
|
|
61
|
+
* the user's terminal.
|
|
62
|
+
*
|
|
43
63
|
* Throws if the git command fails.
|
|
44
64
|
*/
|
|
45
|
-
export declare function gitClone(remoteUrl: string, localPath: string): void;
|
|
65
|
+
export declare function gitClone(remoteUrl: string, localPath: string, opts?: GitCloneOptions): void;
|
|
46
66
|
/**
|
|
47
67
|
* Check if a git repo is currently in a rebase state.
|
|
48
68
|
* Looks for .git/rebase-merge/ or .git/rebase-apply/ directories.
|
package/dist/utils/git.js
CHANGED
|
@@ -3,8 +3,10 @@
|
|
|
3
3
|
* Extracted so tests can mock them without mocking the built-in child_process.
|
|
4
4
|
*/
|
|
5
5
|
import { execSync, spawnSync } from 'child_process';
|
|
6
|
-
import { existsSync } from 'fs';
|
|
6
|
+
import { existsSync, writeFileSync, chmodSync, unlinkSync } from 'fs';
|
|
7
7
|
import { join } from 'path';
|
|
8
|
+
import { tmpdir } from 'os';
|
|
9
|
+
import { loadToken } from '../auth/github.js';
|
|
8
10
|
/**
|
|
9
11
|
* Pull the latest changes in a local git repo.
|
|
10
12
|
* Uses --rebase to automatically handle divergent branches
|
|
@@ -83,12 +85,76 @@ export function isGitRepo(repoPath) {
|
|
|
83
85
|
const result = spawnSync('git', ['rev-parse', '--git-dir'], { cwd: repoPath, encoding: 'utf-8' });
|
|
84
86
|
return result.status === 0;
|
|
85
87
|
}
|
|
88
|
+
/**
|
|
89
|
+
* Check if a git repo has a remote named "origin" configured.
|
|
90
|
+
*/
|
|
91
|
+
export function gitHasRemote(repoPath) {
|
|
92
|
+
const result = spawnSync('git', ['remote', 'get-url', 'origin'], { cwd: repoPath, encoding: 'utf-8' });
|
|
93
|
+
return result.status === 0 && result.stdout.trim().length > 0;
|
|
94
|
+
}
|
|
86
95
|
/**
|
|
87
96
|
* Clone a remote repository to a local path.
|
|
97
|
+
*
|
|
98
|
+
* Automatically injects the stored GitHub PAT (from `studiograph auth` or
|
|
99
|
+
* GITHUB_TOKEN env) via GIT_ASKPASS so Git never blocks on an interactive
|
|
100
|
+
* credential prompt. If no token is available and `silent` is false (the
|
|
101
|
+
* default), uses `stdio: 'inherit'` so Git's credential prompt can reach
|
|
102
|
+
* the user's terminal.
|
|
103
|
+
*
|
|
88
104
|
* Throws if the git command fails.
|
|
89
105
|
*/
|
|
90
|
-
export function gitClone(remoteUrl, localPath) {
|
|
91
|
-
|
|
106
|
+
export function gitClone(remoteUrl, localPath, opts) {
|
|
107
|
+
const silent = opts?.silent ?? false;
|
|
108
|
+
const creds = opts?.credentials;
|
|
109
|
+
const env = { ...process.env };
|
|
110
|
+
let hasCredentials = false;
|
|
111
|
+
if (creds) {
|
|
112
|
+
// Basic Auth for embedded git server — use GIT_ASKPASS to supply credentials
|
|
113
|
+
const askpassPath = join(tmpdir(), `.studiograph-askpass-${process.pid}`);
|
|
114
|
+
// The script receives the prompt ("Username for ..." or "Password for ...") as $1
|
|
115
|
+
writeFileSync(askpassPath, [
|
|
116
|
+
'#!/bin/sh',
|
|
117
|
+
`case "$1" in`,
|
|
118
|
+
` *[Uu]sername*) echo "${creds.username}" ;;`,
|
|
119
|
+
` *) echo "${creds.password}" ;;`,
|
|
120
|
+
'esac',
|
|
121
|
+
].join('\n'), 'utf-8');
|
|
122
|
+
chmodSync(askpassPath, 0o700);
|
|
123
|
+
env.GIT_ASKPASS = askpassPath;
|
|
124
|
+
env.GIT_TERMINAL_PROMPT = '0';
|
|
125
|
+
hasCredentials = true;
|
|
126
|
+
}
|
|
127
|
+
else {
|
|
128
|
+
// Try to inject stored GitHub PAT for HTTPS URLs
|
|
129
|
+
const stored = loadToken();
|
|
130
|
+
const token = stored?.token;
|
|
131
|
+
const isHttps = remoteUrl.startsWith('https://');
|
|
132
|
+
if (token && isHttps) {
|
|
133
|
+
const askpassPath = join(tmpdir(), `.studiograph-askpass-${process.pid}`);
|
|
134
|
+
writeFileSync(askpassPath, `#!/bin/sh\necho "${token}"\n`, 'utf-8');
|
|
135
|
+
chmodSync(askpassPath, 0o700);
|
|
136
|
+
env.GIT_ASKPASS = askpassPath;
|
|
137
|
+
env.GIT_TERMINAL_PROMPT = '0';
|
|
138
|
+
hasCredentials = true;
|
|
139
|
+
}
|
|
140
|
+
else if (silent) {
|
|
141
|
+
env.GIT_TERMINAL_PROMPT = '0';
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
// If !silent and no credentials/token, leave stdio inherited so Git can prompt the user
|
|
145
|
+
const stdio = (hasCredentials || silent) ? 'pipe' : 'inherit';
|
|
146
|
+
try {
|
|
147
|
+
execSync(`git clone "${remoteUrl}" "${localPath}"`, { stdio, env, timeout: 120_000 });
|
|
148
|
+
}
|
|
149
|
+
finally {
|
|
150
|
+
// Clean up askpass script
|
|
151
|
+
if (env.GIT_ASKPASS) {
|
|
152
|
+
try {
|
|
153
|
+
unlinkSync(env.GIT_ASKPASS);
|
|
154
|
+
}
|
|
155
|
+
catch { /* non-fatal */ }
|
|
156
|
+
}
|
|
157
|
+
}
|
|
92
158
|
}
|
|
93
159
|
/**
|
|
94
160
|
* Check if a git repo is currently in a rebase state.
|
package/dist/utils/git.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"git.js","sourceRoot":"","sources":["../../src/utils/git.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"git.js","source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AC;YAAC,MAAM,CAAC,CAAC,eAAe,CAAC,CAAC;QAChE,CAAC;IACH,CAAC;AACH,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,UAAU,CAAC,QAAgB;IACzC,OAAO,UAAU,CAAC,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE,cAAc,CAAC,CAAC;QAClD,UAAU,CAAC,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE,cAAc,CAAC,CAAC,CAAC;AAC5D,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,GAAW;IACtC,IAAI,CAAC;QACH,OAAO,QAAQ,CAAC,cAAc,GAAG,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,SAAS,CAAC;IACzF,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-ease:initial}}}@layer theme{:root,:host{--font-sans:"Inter", ui-sans-serif, system-ui, sans-serif;--font-mono:"JetBrains Mono", ui-monospace, monospace;--spacing:.25rem;--ease-in-out:cubic-bezier(.4, 0, .2, 1);--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-accent:#6e6ee8;--color-accent-hover:#5c5cd6;--color-destructive:#e54d4d;--color-link:#8b8bf0}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.visible{visibility:visible}.absolute{position:absolute}.relative{position:relative}.start{inset-inline-start:var(--spacing)}.end{inset-inline-end:var(--spacing)}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.block{display:block}.contents{display:contents}.flex{display:flex}.hidden{display:none}.inline{display:inline}.list-item{display:list-item}.table{display:table}.size-6{width:calc(var(--spacing) * 6);height:calc(var(--spacing) * 6)}.size-7{width:calc(var(--spacing) * 7);height:calc(var(--spacing) * 7)}.size-8{width:calc(var(--spacing) * 8);height:calc(var(--spacing) * 8)}.flex-shrink{flex-shrink:1}.border-collapse{border-collapse:collapse}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.resize{resize:both}.flex-wrap{flex-wrap:wrap}.rounded-\[6px\]{border-radius:6px}.border{border-style:var(--tw-border-style);border-width:1px}.italic{font-style:italic}.underline{text-decoration-line:underline}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}}:root,[data-theme=dark]{--color-bg:#09090b;--color-bg-elevated:#0f0f12;--color-bg-surface:#141418;--color-bg-hover:#1a1a1f;--color-bg-selected:#1a1a1f;--color-border:#1e1e24;--color-border-strong:#2a2a32;--color-text-primary:#ededef;--color-text-secondary:#a0a0a6;--color-text-tertiary:#5c5c66;--color-accent-muted:#8b8bf014;--color-badge-bg:#1a1a22;--color-badge-text:#8b8b94}[data-theme=light]{--color-bg:#f8f8fa;--color-bg-elevated:#f0f0f3;--color-bg-surface:#e8e8ec;--color-bg-hover:#e2e2e8;--color-bg-selected:#e2e2e8;--color-border:#dadadf;--color-border-strong:#c9c9d0;--color-text-primary:#1a1a1f;--color-text-secondary:#63636b;--color-text-tertiary:#9898a0;--color-accent-muted:#6e6ee814;--color-badge-bg:#e0e0e5;--color-badge-text:#63636b}*{box-sizing:border-box;margin:0;padding:0}:focus{outline:none}body{font-family:var(--font-sans);color:var(--color-text-primary);background:var(--color-bg);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:13px;line-height:20px}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{background:0 0}::-webkit-scrollbar-thumb{background:var(--color-border-strong);border-radius:3px}::-webkit-scrollbar-thumb:hover{background:var(--color-text-tertiary)}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}
|
|
1
|
+
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-ease:initial}}}@layer theme{:root,:host{--font-sans:"Inter", ui-sans-serif, system-ui, sans-serif;--font-mono:"JetBrains Mono", ui-monospace, monospace;--spacing:.25rem;--ease-in-out:cubic-bezier(.4, 0, .2, 1);--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-accent:#6e6ee8;--color-accent-hover:#5c5cd6;--color-destructive:#e54d4d;--color-link:#8b8bf0}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.visible{visibility:visible}.absolute{position:absolute}.relative{position:relative}.start{inset-inline-start:var(--spacing)}.end{inset-inline-end:var(--spacing)}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.block{display:block}.contents{display:contents}.flex{display:flex}.hidden{display:none}.inline{display:inline}.list-item{display:list-item}.table{display:table}.size-6{width:calc(var(--spacing) * 6);height:calc(var(--spacing) * 6)}.size-7{width:calc(var(--spacing) * 7);height:calc(var(--spacing) * 7)}.size-8{width:calc(var(--spacing) * 8);height:calc(var(--spacing) * 8)}.flex-shrink{flex-shrink:1}.border-collapse{border-collapse:collapse}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.resize{resize:both}.flex-wrap{flex-wrap:wrap}.rounded-\[6px\]{border-radius:6px}.border{border-style:var(--tw-border-style);border-width:1px}.italic{font-style:italic}.underline{text-decoration-line:underline}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}}:root,[data-theme=dark]{--color-bg:#09090b;--color-bg-elevated:#0f0f12;--color-bg-surface:#141418;--color-bg-hover:#1a1a1f;--color-bg-selected:#1a1a1f;--color-border:#1e1e24;--color-border-strong:#2a2a32;--color-text-primary:#ededef;--color-text-secondary:#a0a0a6;--color-text-tertiary:#5c5c66;--color-accent-muted:#8b8bf014;--color-badge-bg:#1a1a22;--color-badge-text:#8b8b94}[data-theme=light]{--color-bg:#f8f8fa;--color-bg-elevated:#f0f0f3;--color-bg-surface:#e8e8ec;--color-bg-hover:#e2e2e8;--color-bg-selected:#e2e2e8;--color-border:#dadadf;--color-border-strong:#c9c9d0;--color-text-primary:#1a1a1f;--color-text-secondary:#63636b;--color-text-tertiary:#9898a0;--color-accent-muted:#6e6ee814;--color-badge-bg:#e0e0e5;--color-badge-text:#63636b}*{box-sizing:border-box;margin:0;padding:0}:focus{outline:none}body{font-family:var(--font-sans);color:var(--color-text-primary);background:var(--color-bg);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:13px;line-height:20px}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{background:0 0}::-webkit-scrollbar-thumb{background:var(--color-border-strong);border-radius:3px}::-webkit-scrollbar-thumb:hover{background:var(--color-text-tertiary)}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}.toast-container.svelte-16oeye1{position:fixed;bottom:1rem;right:1rem;z-index:50;display:flex;flex-direction:column;gap:.5rem;max-width:360px}.toast.svelte-16oeye1{display:flex;align-items:center;gap:.5rem;padding:.625rem .75rem;background:var(--color-surface, #1e1e1e);border:1px solid var(--color-border, #333);border-radius:6px;color:var(--color-text, #e0e0e0);font-size:.8125rem;box-shadow:0 4px 12px #0000004d;animation:svelte-16oeye1-toast-in .2s ease-out}.toast-icon.svelte-16oeye1{flex-shrink:0;color:var(--color-text-muted, #888)}.toast-message.svelte-16oeye1{flex:1;min-width:0}.toast-dismiss.svelte-16oeye1{flex-shrink:0;background:none;border:none;color:var(--color-text-muted, #888);cursor:pointer;padding:2px;border-radius:3px;display:flex;align-items:center}.toast-dismiss.svelte-16oeye1:hover{color:var(--color-text, #e0e0e0);background:var(--color-hover, rgba(255, 255, 255, .1))}@keyframes svelte-16oeye1-toast-in{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.login-page.svelte-1x05zx6{width:100vw;height:100vh;display:flex;align-items:center;justify-content:center;background:var(--color-bg)}.login-card.svelte-1x05zx6{width:100%;max-width:360px;padding:40px 32px}.logo.svelte-1x05zx6{display:flex;align-items:center;gap:12px;margin-bottom:36px;justify-content:center}.logo-icon.svelte-1x05zx6{width:32px;height:32px;border-radius:50%;background:var(--color-accent, #6e6ee8);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:14px}.logo-text.svelte-1x05zx6{font-size:18px;font-weight:600;color:var(--color-text-primary)}form.svelte-1x05zx6{display:flex;flex-direction:column;gap:20px}.field.svelte-1x05zx6{display:flex;flex-direction:column;gap:6px}.field-label.svelte-1x05zx6{font-size:13px;font-weight:500;color:var(--color-text-secondary)}.field.svelte-1x05zx6 input:where(.svelte-1x05zx6){width:100%;height:40px;padding:0 12px;border:1px solid var(--color-border);border-radius:8px;background:var(--color-bg-surface);color:var(--color-text-primary);font-size:14px;font-family:inherit;outline:none;box-sizing:border-box}.field.svelte-1x05zx6 input:where(.svelte-1x05zx6):focus{border-color:var(--color-accent, #6e6ee8);box-shadow:0 0 0 2px color-mix(in srgb,var(--color-accent, #6e6ee8) 20%,transparent)}.error-msg.svelte-1x05zx6{margin:0;font-size:13px;color:#e55;text-align:center}.submit-btn.svelte-1x05zx6{height:40px;border:none;border-radius:8px;background:var(--color-accent, #6e6ee8);color:#fff;font-size:14px;font-weight:600;font-family:inherit;cursor:pointer;margin-top:4px}.submit-btn.svelte-1x05zx6:hover:not(:disabled){background:var(--color-accent-hover, #5c5cd6)}.submit-btn.svelte-1x05zx6:disabled{opacity:.6;cursor:not-allowed}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.setup-page.svelte-g40i6i{width:100vw;height:100vh;display:flex;align-items:center;justify-content:center;background:var(--color-bg)}.setup-card.svelte-g40i6i{width:100%;max-width:360px;padding:40px 32px}.logo.svelte-g40i6i{display:flex;align-items:center;gap:12px;margin-bottom:12px;justify-content:center}.logo-icon.svelte-g40i6i{width:32px;height:32px;border-radius:50%;background:var(--color-accent, #6e6ee8);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:14px}.logo-text.svelte-g40i6i{font-size:18px;font-weight:600;color:var(--color-text-primary)}.subtitle.svelte-g40i6i{text-align:center;color:var(--color-text-secondary);font-size:14px;margin:0 0 28px}form.svelte-g40i6i{display:flex;flex-direction:column;gap:20px}.field.svelte-g40i6i{display:flex;flex-direction:column;gap:6px}.field-label.svelte-g40i6i{font-size:13px;font-weight:500;color:var(--color-text-secondary)}.field-hint.svelte-g40i6i{font-size:12px;color:var(--color-text-tertiary, var(--color-text-secondary));opacity:.7}.field.svelte-g40i6i input:where(.svelte-g40i6i){width:100%;height:40px;padding:0 12px;border:1px solid var(--color-border);border-radius:8px;background:var(--color-bg-surface);color:var(--color-text-primary);font-size:14px;font-family:inherit;outline:none;box-sizing:border-box}.field.svelte-g40i6i input:where(.svelte-g40i6i):focus{border-color:var(--color-accent, #6e6ee8);box-shadow:0 0 0 2px color-mix(in srgb,var(--color-accent, #6e6ee8) 20%,transparent)}.error-msg.svelte-g40i6i{margin:0;font-size:13px;color:#e55;text-align:center}.submit-btn.svelte-g40i6i{height:40px;border:none;border-radius:8px;background:var(--color-accent, #6e6ee8);color:#fff;font-size:14px;font-weight:600;font-family:inherit;cursor:pointer;margin-top:4px}.submit-btn.svelte-g40i6i:hover:not(:disabled){background:var(--color-accent-hover, #5c5cd6)}.submit-btn.svelte-g40i6i:disabled{opacity:.6;cursor:not-allowed}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.confirm-backdrop.svelte-193t4hn{position:fixed;inset:0;z-index:1000;display:flex;align-items:flex-start;justify-content:center;padding-top:140px}[data-theme=dark] .confirm-backdrop.svelte-193t4hn{background:#0009}[data-theme=light] .confirm-backdrop.svelte-193t4hn{background:#00000040}.confirm-modal.svelte-193t4hn{width:420px;display:flex;flex-direction:column;background:var(--color-bg-elevated);border:1px solid var(--color-border-strong);border-radius:12px;overflow:hidden;box-shadow:0 24px 80px #00000080}.confirm-header.svelte-193t4hn{padding:20px 24px 0}.confirm-title.svelte-193t4hn{font-size:16px;font-weight:500;color:var(--color-text-primary)}.confirm-body.svelte-193t4hn{padding:12px 24px 20px}.confirm-message.svelte-193t4hn{font-size:13px;color:var(--color-text-secondary);line-height:1.5}.confirm-footer.svelte-193t4hn{display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:16px 24px;border-top:1px solid var(--color-border)}.footer-btn.svelte-193t4hn{font-family:inherit;font-size:13px;font-weight:500;padding:6px 12px;border-radius:6px;border:none;cursor:pointer}.footer-btn.ghost.svelte-193t4hn{color:var(--color-text-secondary);background:none}.footer-btn.ghost.svelte-193t4hn:hover{color:var(--color-text-primary);background:var(--color-bg-hover)}.footer-btn.accent.svelte-193t4hn{color:#fff;background:var(--color-accent)}.footer-btn.accent.svelte-193t4hn:hover{background:var(--color-accent-hover)}.footer-btn.destructive.svelte-193t4hn{color:#fff;background:var(--color-error, #e55)}.footer-btn.destructive.svelte-193t4hn:hover{background:color-mix(in srgb,var(--color-error, #e55) 85%,black)}.entity-dialog-backdrop.svelte-ak7t5k{position:fixed;inset:0;z-index:1000;display:flex;align-items:flex-start;justify-content:center;padding-top:80px}[data-theme=dark] .entity-dialog-backdrop.svelte-ak7t5k{background:#0009}[data-theme=light] .entity-dialog-backdrop.svelte-ak7t5k{background:#00000040}.entity-dialog.svelte-ak7t5k{width:560px;max-height:520px;display:flex;flex-direction:column;background:var(--color-bg-elevated);border:1px solid var(--color-border-strong);border-radius:12px;overflow:hidden;box-shadow:0 24px 80px #00000080}.entity-dialog-header.svelte-ak7t5k{display:flex;align-items:center;justify-content:space-between;padding:16px 14px 16px 24px;flex-shrink:0}.entity-dialog-title.svelte-ak7t5k{font-size:16px;font-weight:500;color:var(--color-text-primary)}.dialog-close.svelte-ak7t5k{width:28px;height:28px;display:flex;align-items:center;justify-content:center;border:none;background:transparent;color:var(--color-text-tertiary);font-size:18px;cursor:pointer;border-radius:6px;line-height:1}.dialog-close.svelte-ak7t5k:hover{background:var(--color-bg-hover);color:var(--color-text-primary)}.entity-dialog-body.svelte-ak7t5k{padding:16px 24px 24px;display:flex;flex-direction:column;gap:20px;overflow-y:auto}.type-section.svelte-ak7t5k{display:flex;flex-direction:column;gap:8px}.type-section-label.svelte-ak7t5k{font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:var(--color-text-tertiary)}.type-grid.svelte-ak7t5k{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.type-card.svelte-ak7t5k{display:flex;flex-direction:column;gap:10px;padding:12px;border:1px solid var(--color-border);background:transparent;color:var(--color-text-secondary);font-family:inherit;cursor:pointer;border-radius:8px;text-align:left;transition:background .12s,color .12s,border-color .12s}.type-card.svelte-ak7t5k:hover{background:var(--color-bg-hover);border-color:var(--color-border-strong)}.type-card.svelte-ak7t5k:hover .type-name:where(.svelte-ak7t5k){color:var(--color-text-primary)}.type-dot.svelte-ak7t5k{width:8px;height:8px;border-radius:50%}.type-info.svelte-ak7t5k{display:flex;flex-direction:column;gap:2px}.type-name.svelte-ak7t5k{font-size:13px;font-weight:500;color:var(--color-text-secondary)}.type-desc.svelte-ak7t5k{font-size:11px;color:var(--color-text-tertiary);line-height:1.3}.perm-backdrop.svelte-1qsmvmm{position:fixed;inset:0;z-index:1000;display:flex;align-items:flex-start;justify-content:center;padding-top:80px}[data-theme=dark] .perm-backdrop.svelte-1qsmvmm{background:#0009}[data-theme=light] .perm-backdrop.svelte-1qsmvmm{background:#00000040}.perm-modal.svelte-1qsmvmm{width:600px;max-height:calc(100vh - 120px);display:flex;flex-direction:column;background:var(--color-bg-elevated);border:1px solid var(--color-border-strong);border-radius:12px;overflow:hidden;box-shadow:0 24px 80px #00000080}.perm-header.svelte-1qsmvmm{display:flex;align-items:center;justify-content:space-between;padding:20px 24px 0}.perm-title.svelte-1qsmvmm{font-size:16px;font-weight:500;color:var(--color-text-primary)}.close-btn.svelte-1qsmvmm{display:flex;align-items:center;justify-content:center;width:28px;height:28px;border:none;background:transparent;color:var(--color-text-tertiary);cursor:pointer;border-radius:6px}.close-btn.svelte-1qsmvmm:hover{background:var(--color-bg-hover);color:var(--color-text-primary)}.tab-bar.svelte-1qsmvmm{display:flex;gap:0;padding:16px 24px 0;border-bottom:1px solid var(--color-border)}.tab-btn.svelte-1qsmvmm{font-family:inherit;font-size:13px;font-weight:500;color:var(--color-text-tertiary);background:none;border:none;border-bottom:2px solid transparent;padding:8px 14px;cursor:pointer;margin-bottom:-1px}.tab-btn.svelte-1qsmvmm:hover{color:var(--color-text-secondary)}.tab-btn.active.svelte-1qsmvmm{color:var(--color-text-primary);border-bottom-color:var(--color-accent)}.perm-body.svelte-1qsmvmm{flex:1;overflow-y:auto;padding:16px 24px 24px}.add-trigger.svelte-1qsmvmm{display:flex;align-items:center;gap:8px;width:100%;height:36px;padding:0;border:none;background:transparent;cursor:pointer;border-radius:6px;font-family:inherit;font-size:13px;color:var(--color-text-tertiary)}.add-trigger.svelte-1qsmvmm:hover{color:var(--color-text-secondary)}.add-trigger-icon.svelte-1qsmvmm{display:flex;align-items:center;justify-content:center;width:22px;height:22px;flex-shrink:0}.status-msg.svelte-1qsmvmm{font-size:13px;color:var(--color-error, #e55);padding:0;background:none}.loading-text.svelte-1qsmvmm{font-size:13px;color:var(--color-text-tertiary);padding:20px 0;text-align:center}.avatar.svelte-1qsmvmm{width:22px;height:22px;border-radius:50%;flex-shrink:0;object-fit:cover}.avatar.placeholder.svelte-1qsmvmm{background:var(--color-bg-surface);border:1px solid var(--color-border);display:flex;align-items:center;justify-content:center;font-size:10px;font-weight:600;color:var(--color-text-secondary)}.icon-btn.svelte-1qsmvmm{display:flex;align-items:center;justify-content:center;width:24px;height:24px;border:none;background:transparent;cursor:pointer;border-radius:4px;flex-shrink:0;padding:0}.icon-btn.svelte-1qsmvmm:first-of-type{margin-left:auto}.icon-btn.svelte-1qsmvmm{color:var(--color-text-tertiary)}.icon-btn.svelte-1qsmvmm:hover{color:var(--color-text-primary)}.icon-btn.danger.svelte-1qsmvmm:hover{color:var(--color-error, #e55)}.collection-list.svelte-1qsmvmm{display:flex;flex-direction:column;gap:16px}.collection-list.user-list.svelte-1qsmvmm{gap:0}.collection-section.svelte-1qsmvmm{display:flex;flex-direction:column;gap:2px}.collection-header.svelte-1qsmvmm{display:flex;align-items:center;gap:8px;width:100%;padding:6px 0;border:none;background:transparent;cursor:pointer;border-radius:6px;font-family:inherit;text-align:left}.collection-header.svelte-1qsmvmm:hover{background:var(--color-bg-hover)}.collection-chevron.svelte-1qsmvmm{display:flex;align-items:center;justify-content:center;width:22px;height:22px;color:var(--color-text-tertiary);flex-shrink:0}.collection-text.svelte-1qsmvmm{display:flex;align-items:baseline}.collection-name.svelte-1qsmvmm{font-size:13px;font-weight:500;color:var(--color-text-primary)}.collection-count.svelte-1qsmvmm{font-size:11px;color:var(--color-text-tertiary);margin-left:8px}.access-row.svelte-1qsmvmm{display:flex;align-items:center;gap:8px;height:36px;padding:0;font-size:13px}.access-row.svelte-1qsmvmm .avatar:where(.svelte-1qsmvmm){flex-shrink:0}.icon-spacer.svelte-1qsmvmm{width:52px;flex-shrink:0;margin-left:auto}.access-text.svelte-1qsmvmm{display:flex;align-items:baseline;gap:0;min-width:0}.access-label.svelte-1qsmvmm{color:var(--color-text-primary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.access-email.svelte-1qsmvmm{font-size:11px;color:var(--color-text-tertiary);margin-left:8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.perm-badge.svelte-1qsmvmm{font-size:11px;color:var(--color-text-tertiary);flex-shrink:0;text-transform:capitalize;margin-left:8px}.admin-badge.svelte-1qsmvmm{color:var(--color-accent, #6e6ee8)}.inline-reset-row.svelte-1qsmvmm{display:flex;align-items:center;gap:8px;height:36px}.inline-reset-row.svelte-1qsmvmm .form-input:where(.svelte-1qsmvmm){flex:1;height:28px;font-size:13px}.confirm-btn.reset.svelte-1qsmvmm{color:#fff;background:var(--color-accent, #6e6ee8)}.confirm-btn.reset.svelte-1qsmvmm:hover:not(:disabled){background:var(--color-accent-hover, #5c5cd6)}.confirm-row.svelte-1qsmvmm{background:#e5555514;border-radius:6px;padding:0 10px 0 30px}.confirm-text.svelte-1qsmvmm{flex:1;font-size:13px;color:var(--color-text-primary)}.confirm-btn.svelte-1qsmvmm{font-family:inherit;font-size:12px;font-weight:500;padding:4px 10px;border-radius:4px;border:none;cursor:pointer;flex-shrink:0}.confirm-btn.cancel.svelte-1qsmvmm{color:var(--color-text-secondary);background:transparent}.confirm-btn.cancel.svelte-1qsmvmm:hover{color:var(--color-text-primary)}.confirm-btn.revoke.svelte-1qsmvmm{color:#fff;background:var(--color-error, #e55)}.confirm-btn.revoke.svelte-1qsmvmm:hover:not(:disabled){background:color-mix(in srgb,var(--color-error, #e55) 85%,black)}.confirm-btn.svelte-1qsmvmm:disabled{opacity:.5;cursor:not-allowed}.inline-add-rows.svelte-1qsmvmm{display:flex;flex-direction:column;gap:6px;margin-top:4px}.form-row.svelte-1qsmvmm{display:flex;gap:8px}.form-actions.svelte-1qsmvmm{justify-content:flex-end}.form-input.svelte-1qsmvmm{flex:1;height:32px;padding:0 8px;border:1px solid var(--color-border);border-radius:6px;background:var(--color-bg);color:var(--color-text-primary);font-size:13px;font-family:inherit;outline:none;box-sizing:border-box}.form-input.svelte-1qsmvmm:focus{border-color:var(--color-accent, #6e6ee8)}.candidate-row.svelte-1qsmvmm{opacity:.55}.grant-btn.svelte-1qsmvmm{color:var(--color-text-tertiary)}.grant-btn.svelte-1qsmvmm:hover{color:var(--color-text-primary)}.sidebar.svelte-6dohdz{width:340px;min-width:340px;display:flex;flex-direction:column;overflow:hidden;background:var(--color-bg);border-right:1px solid var(--color-border)}.sidebar-header.svelte-6dohdz{height:40px;display:flex;align-items:center;gap:11px;padding:0 12px 0 19px;border-bottom:1px solid var(--color-border);flex-shrink:0}.settings-btn.svelte-6dohdz{display:flex;align-items:center;justify-content:center;width:28px;height:28px;border:none;background:transparent;color:var(--color-text-tertiary);cursor:pointer;border-radius:6px;margin-left:auto;padding:0}.settings-btn.svelte-6dohdz:hover{color:var(--color-text-secondary);background:var(--color-bg-hover)}.home-btn.svelte-6dohdz{display:flex;align-items:center;gap:11px;border:none;background:transparent;padding:0;cursor:pointer;min-width:0;flex:1;text-align:left}.home-btn.svelte-6dohdz:hover .workspace-icon:where(.svelte-6dohdz){opacity:.8}.home-btn.svelte-6dohdz:hover .workspace-name:where(.svelte-6dohdz){color:var(--color-text-secondary)}.workspace-icon.svelte-6dohdz{width:22px;height:22px;border-radius:50%;background:var(--color-accent, #6e6ee8);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:600;font-size:10px;flex-shrink:0}.workspace-name.svelte-6dohdz{flex:1;font-size:13px;font-weight:600;color:var(--color-text-primary)}.filter-bar.svelte-6dohdz{position:relative;display:flex;align-items:center;height:40px;padding:0 12px 0 52px;border-bottom:1px solid var(--color-border);flex-shrink:0}.filter-icon.svelte-6dohdz{position:absolute;left:22px;top:50%;transform:translateY(-50%);display:flex;align-items:center;justify-content:center;width:16px;color:var(--color-text-tertiary)}.filter-input.svelte-6dohdz{flex:1;background:transparent;border:none;outline:none;padding:0;margin:0;font-size:13px;line-height:1.4;font-family:inherit;color:var(--color-text-primary)}.filter-input.svelte-6dohdz::placeholder{color:var(--color-text-tertiary)}.filter-clear.svelte-6dohdz{display:flex;align-items:center;justify-content:center;width:20px;height:20px;border:none;background:transparent;border-radius:3px;cursor:pointer;color:var(--color-text-tertiary);flex-shrink:0;padding:0}.filter-clear.svelte-6dohdz:hover{color:var(--color-text-primary)}.sort-toggle.svelte-6dohdz{display:flex;align-items:center;justify-content:center;width:28px;height:28px;border:none;background:transparent;border-radius:6px;cursor:pointer;color:var(--color-text-tertiary);flex-shrink:0;padding:0;margin-right:0;margin-left:4px}.sort-toggle.svelte-6dohdz:hover{color:var(--color-text-secondary);background:var(--color-bg-hover)}.sort-toggle.active.svelte-6dohdz{color:var(--color-accent, #6e6ee8)}.repo-type-icon.svelte-6dohdz{display:inline-flex;align-items:center;color:var(--color-text-tertiary);margin-right:6px;flex-shrink:0;align-self:center}.tree.svelte-6dohdz{flex:1;overflow-y:auto;padding-top:0}.tree-group.svelte-6dohdz{display:flex;flex-direction:column}.tree-group.svelte-6dohdz+.tree-group:where(.svelte-6dohdz){margin-top:0}.repo-row.svelte-6dohdz{display:flex;align-items:baseline;height:32px;line-height:32px;width:100%;padding:0 12px 0 20px;border:none;background:transparent;cursor:pointer;font-family:inherit;text-align:left;border-left:2px solid transparent}.repo-row.svelte-6dohdz:hover,.repo-row.focused.svelte-6dohdz{background:var(--color-bg-hover)}.repo-row.repo-active.svelte-6dohdz{border-left-color:var(--active-color)}.repo-name.svelte-6dohdz{font-size:13px;color:var(--color-text-secondary)}.repo-row.repo-active.svelte-6dohdz .repo-name:where(.svelte-6dohdz),.repo-row.repo-active.svelte-6dohdz .repo-type-icon:where(.svelte-6dohdz){font-weight:600;color:var(--color-text-primary)}.tree-row.svelte-6dohdz{display:flex;align-items:baseline;height:32px;line-height:32px;padding-right:40px;color:var(--color-text-secondary);font-size:13px;cursor:pointer;border:none;background:transparent;font-family:inherit;text-align:left;width:100%;border-left:2px solid transparent}.tree-row.svelte-6dohdz:hover,.tree-row.focused.svelte-6dohdz{background:var(--color-bg-hover)}.tree-row.selected.svelte-6dohdz{background:var(--color-bg-selected);border-left-color:var(--active-color);color:var(--color-text-primary);font-weight:600}.row-chevron.svelte-6dohdz{display:inline-flex;align-items:center;justify-content:center;width:16px;height:32px;flex-shrink:0;margin-right:14px;color:var(--color-text-tertiary);align-self:center}.row-label.svelte-6dohdz{flex:1;overflow:hidden;white-space:nowrap;mask-image:linear-gradient(to right,black calc(100% - 16px),transparent 100%);-webkit-mask-image:linear-gradient(to right,black calc(100% - 16px),transparent 100%)}.item-count.svelte-6dohdz{font-size:11px;color:var(--color-text-tertiary);margin-left:8px;flex-shrink:0}.dirty-dot.svelte-6dohdz{width:6px;height:6px;border-radius:3px;flex-shrink:0;margin-left:auto;display:none;align-self:center;background:var(--color-text-tertiary)}.tree-row.dirty.svelte-6dohdz .dirty-dot:where(.svelte-6dohdz){display:block}.repo-dirty-dot.svelte-6dohdz{width:20px;height:20px;flex-shrink:0;margin-left:auto;margin-right:4px;align-self:center;display:flex;align-items:center;justify-content:center;background:transparent}.repo-dirty-dot.svelte-6dohdz:after{content:"";width:6px;height:6px;border-radius:3px;background:var(--color-text-tertiary)}.repo-row.svelte-6dohdz:hover .repo-dirty-dot:where(.svelte-6dohdz){display:none}.indent-group.svelte-6dohdz{position:relative}.indent-group.svelte-6dohdz:before{content:"";position:absolute;left:var(--guide-left);top:0;bottom:0;width:1px;background:var(--color-border);pointer-events:none}.loading-row.svelte-6dohdz{height:32px;display:flex;align-items:center;font-size:13px;color:var(--color-text-tertiary)}.type-header-row.svelte-6dohdz{color:var(--color-text-secondary);border-left:2px solid transparent}.type-header-row.type-active.svelte-6dohdz{color:var(--color-text-primary);font-weight:600}.type-header-row.svelte-6dohdz .row-label:where(.svelte-6dohdz){flex:none;mask-image:none;-webkit-mask-image:none}.new-entity-row.svelte-6dohdz{color:var(--color-text-tertiary);align-items:center}.new-entity-row.svelte-6dohdz:hover{color:var(--color-text-secondary)}.entity-row-wrapper.svelte-6dohdz{position:relative;display:flex;align-items:center}.entity-row-wrapper.svelte-6dohdz .tree-row:where(.svelte-6dohdz){flex:1;min-width:0}.entity-delete-btn.svelte-6dohdz{display:none;align-items:center;justify-content:center;width:20px;height:20px;border:none;background:transparent;color:var(--color-text-tertiary);cursor:pointer;border-radius:3px;position:absolute;right:16px;flex-shrink:0;padding:0}.entity-delete-btn.svelte-6dohdz:hover{color:var(--color-error, #e55)}.entity-row-wrapper.svelte-6dohdz:hover .tree-row:where(.svelte-6dohdz){background:var(--color-bg-hover)}.entity-row-wrapper.svelte-6dohdz:hover .entity-delete-btn:where(.svelte-6dohdz){display:flex}.entity-row-wrapper.svelte-6dohdz:hover .dirty-dot:where(.svelte-6dohdz){display:none!important}.entity-type-dot.svelte-6dohdz{width:6px;height:6px;border-radius:50%;flex-shrink:0;margin-right:19px;align-self:center}.recent-time.svelte-6dohdz{font-size:11px;color:var(--color-text-tertiary);position:absolute;right:26px;top:50%;transform:translate(50%,-50%);white-space:nowrap}.entity-row-wrapper.svelte-6dohdz:hover .recent-time:where(.svelte-6dohdz){display:none}.filter-match.svelte-6dohdz{background:color-mix(in srgb,var(--color-accent, #6e6ee8) 25%,transparent);color:inherit;border-radius:2px;padding:0}.no-results.svelte-6dohdz{padding:24px 16px;font-size:13px;color:var(--color-text-tertiary);text-align:center}.repo-rename-input.svelte-6dohdz{flex:1;min-width:0;height:100%;padding:0 6px;margin:0;border:1px solid var(--color-accent, #6e6ee8);border-radius:3px;background:var(--color-bg-primary);color:var(--color-text-primary);font-size:13px;font-weight:600;font-family:inherit;outline:none;box-sizing:border-box}.repo-row-wrapper.svelte-6dohdz{position:relative;display:flex;align-items:center}.repo-row-wrapper.svelte-6dohdz .repo-row:where(.svelte-6dohdz){flex:1;min-width:0}.repo-delete-btn.svelte-6dohdz{display:none;align-items:center;justify-content:center;width:20px;height:20px;border:none;background:transparent;color:var(--color-text-tertiary);cursor:pointer;border-radius:3px;position:absolute;right:16px;flex-shrink:0;padding:0}.repo-delete-btn.svelte-6dohdz:hover{color:var(--color-error, #e55)}.repo-row-wrapper.svelte-6dohdz:hover .repo-row:where(.svelte-6dohdz){background:var(--color-bg-hover)}.repo-row-wrapper.svelte-6dohdz:hover .repo-delete-btn:where(.svelte-6dohdz){display:flex}.new-collection-btn.svelte-6dohdz,.new-collection-btn.svelte-6dohdz .repo-name:where(.svelte-6dohdz){color:var(--color-text-tertiary)}.new-collection-btn.svelte-6dohdz .row-chevron:where(.svelte-6dohdz){color:var(--color-text-tertiary)}.new-collection-btn.svelte-6dohdz:hover,.new-collection-btn.svelte-6dohdz:hover .repo-name:where(.svelte-6dohdz){color:var(--color-text-secondary)}.new-collection-row.svelte-6dohdz{display:flex;align-items:center;height:32px;padding:0 12px 0 20px;border-left:2px solid transparent}.new-collection-row.svelte-6dohdz input:where(.svelte-6dohdz){flex:1;height:100%;padding:0 0 0 30px;border:none;background:transparent;color:var(--color-text-primary);font-size:13px;font-family:inherit;outline:none}.new-collection-clear.svelte-6dohdz{display:flex;align-items:center;justify-content:center;width:20px;height:20px;border:none;background:transparent;color:var(--color-text-tertiary);cursor:pointer;border-radius:3px;flex-shrink:0;padding:0;margin-right:4px}.new-collection-clear.svelte-6dohdz:hover{color:var(--color-text-primary)}.private-toggle.svelte-6dohdz{display:flex;align-items:center;justify-content:center;width:20px;height:20px;border:none;background:transparent;color:var(--color-text-secondary);cursor:pointer;border-radius:3px;margin-left:auto;margin-right:4px;flex-shrink:0;padding:0}.private-toggle.svelte-6dohdz:hover{color:var(--color-text-primary)}.private-toggle.active.svelte-6dohdz{color:var(--color-accent, #6e6ee8)}@keyframes svelte-6dohdz-shake{0%,to{transform:translate(0)}20%{transform:translate(-4px)}40%{transform:translate(4px)}60%{transform:translate(-3px)}80%{transform:translate(2px)}}.new-collection-row.svelte-6dohdz input:where(.svelte-6dohdz).shake{animation:svelte-6dohdz-shake .3s ease-in-out}.sidebar-footer.svelte-6dohdz{display:flex;align-items:center;height:40px;padding:0 12px 0 19px;border-top:1px solid var(--color-border);flex-shrink:0;gap:8px}.user-email.svelte-6dohdz{flex:1;font-size:12px;color:var(--color-text-tertiary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sidebar-footer.svelte-6dohdz .confirm-text:where(.svelte-6dohdz){flex:1;font-size:12px;color:var(--color-text-secondary)}.sidebar-footer.svelte-6dohdz .confirm-btn:where(.svelte-6dohdz){font-size:11px;padding:3px 10px;border:none;border-radius:4px;cursor:pointer;background:transparent;color:var(--color-text-tertiary)}.sidebar-footer.svelte-6dohdz .confirm-btn:where(.svelte-6dohdz):hover{color:var(--color-text-primary)}.sidebar-footer.svelte-6dohdz .confirm-btn.danger:where(.svelte-6dohdz){background:var(--color-danger, #e53935);color:#fff}.sidebar-footer.svelte-6dohdz .confirm-btn.danger:where(.svelte-6dohdz):hover{opacity:.9}.footer-icon-btn.svelte-6dohdz{display:flex;align-items:center;justify-content:center;width:28px;height:28px;border:none;background:transparent;color:var(--color-text-tertiary);cursor:pointer;border-radius:6px;padding:0}.footer-icon-btn.svelte-6dohdz:hover{color:var(--color-text-secondary);background:var(--color-bg-hover)}.search-backdrop.svelte-1xems06{position:fixed;inset:0;z-index:1000;display:flex;align-items:flex-start;justify-content:center;padding-top:80px}[data-theme=dark] .search-backdrop.svelte-1xems06{background:#0009}[data-theme=light] .search-backdrop.svelte-1xems06{background:#00000040}.search-modal.svelte-1xems06{width:680px;max-height:560px;display:flex;flex-direction:column;background:var(--color-bg-elevated);border:1px solid var(--color-border-strong);border-radius:12px;overflow:hidden;box-shadow:0 24px 48px #0006}.search-header.svelte-1xems06{display:flex;align-items:center;height:52px;padding:0 16px;gap:10px;border-bottom:1px solid var(--color-border)}.search-header.svelte-1xems06 svg{color:var(--color-text-tertiary);flex-shrink:0}.search-input.svelte-1xems06{flex:1;font-size:15px;color:var(--color-text-primary);line-height:20px;background:transparent;border:none;outline:none;font-family:inherit}.search-input.svelte-1xems06::placeholder{color:var(--color-text-tertiary)}.esc-badge.svelte-1xems06{font-family:var(--font-sans);font-size:11px;line-height:1;padding:3px 6px;border-radius:4px;background:var(--color-bg-surface);border:1px solid var(--color-border);color:var(--color-text-tertiary)}.results-list.svelte-1xems06{flex:1;overflow-y:auto;min-height:0}.empty-results.svelte-1xems06{padding:24px 16px;text-align:center;font-size:13px;color:var(--color-text-tertiary)}.result-row.svelte-1xems06{display:flex;align-items:flex-start;padding:10px 16px;cursor:pointer;border:none;background:transparent;width:100%;text-align:left;font-family:inherit}.result-row.svelte-1xems06:hover,.result-row.selected.svelte-1xems06{background:var(--color-bg-hover)}.result-body.svelte-1xems06{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.result-title-row.svelte-1xems06{display:flex;align-items:center;gap:8px}.result-title.svelte-1xems06{font-size:13px;font-weight:500;color:var(--color-text-primary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.entity-tag.svelte-1xems06{flex-shrink:0;font-size:10px;font-weight:500;letter-spacing:.04em;text-transform:uppercase;padding:1px 6px;border-radius:3px;background:var(--color-badge-bg);color:var(--color-badge-text)}.result-meta.svelte-1xems06{font-size:12px;color:var(--color-text-tertiary)}.search-footer.svelte-1xems06{display:flex;align-items:center;height:39px;padding:0 16px;gap:16px;border-top:1px solid var(--color-border)}.shortcut-group.svelte-1xems06{display:flex;align-items:center;gap:4px}.shortcut-key.svelte-1xems06{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 4px;border-radius:4px;background:var(--color-bg-surface);border:1px solid var(--color-border);color:var(--color-text-tertiary)}.shortcut-label.svelte-1xems06{font-size:11px;color:var(--color-text-tertiary);margin-left:2px}.app-frame.svelte-vr1z90{width:100vw;height:100vh;display:flex;flex-direction:column;overflow:hidden;background:var(--color-bg)}.app-body.svelte-vr1z90{flex:1;display:flex;min-height:0;overflow:hidden}.main-content.svelte-vr1z90{flex:1;display:flex;flex-direction:column;min-width:0;min-height:0;overflow:hidden}#sg-chrome-footer{flex-shrink:0}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as k,k as t,u as S,q as b,S as h}from"./Cs6vwwZC.js";function u(r,i){return r===i||r?.[h]===i}function c(r={},i,a,q){return k(()=>{var f,s;return t(()=>{f=s,s=[],S(()=>{r!==a(...s)&&(i(r,...s),f&&u(a(...f),r)&&i(null,...f))})}),()=>{b(()=>{s&&u(a(...s),r)&&i(null,...s)})}}),r}export{c as b};
|