zidane-ui 9.5.3 → 9.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapters/index.d.ts +2 -1
- package/dist/adapters/index.js +2 -1
- package/dist/adapters/server-git-host.js +67 -0
- package/dist/adapters/server-host.js +9 -0
- package/dist/adapters/server-oauth-flow.d.ts +2 -2
- package/dist/adapters/server-oauth-flow.js +1 -1
- package/dist/adapters/server-projects.d.ts +53 -2
- package/dist/adapters/server-projects.js +4 -3
- package/dist/adapters/server-session-host.js +112 -4
- package/dist/channels/BindingEditorDialog.js +1 -1
- package/dist/channels/ChannelDefaultsSection.js +1 -1
- package/dist/channels/ChannelsSettingsSection.js +1 -1
- package/dist/channels/ConnectionSetupDialog.js +1 -1
- package/dist/channels/HeldRepliesList.js +1 -1
- package/dist/channels/ProjectChannelsSection.js +1 -1
- package/dist/chat/HostTranscript.js +1 -0
- package/dist/chat/SessionGroupHeader.js +2 -2
- package/dist/chat/composer/ComposerBadges.d.ts +27 -1
- package/dist/chat/composer/ComposerBadges.js +41 -5
- package/dist/chat/composer/ConversationBadges.d.ts +6 -0
- package/dist/chat/composer/ConversationBadges.js +70 -3
- package/dist/chat/composer/DraftPickers.js +4 -0
- package/dist/chat/composer/ServerScopeToggle.d.ts +16 -1
- package/dist/chat/composer/ServerScopeToggle.js +90 -47
- package/dist/chat/composer/index.d.ts +2 -2
- package/dist/chat/composer/use-draft-target.d.ts +18 -2
- package/dist/chat/composer/use-draft-target.js +74 -7
- package/dist/chat/composer/use-new-session-defaults.d.ts +3 -1
- package/dist/chat/composer/use-new-session-defaults.js +19 -14
- package/dist/chat/composer/use-send-prompt.js +2 -2
- package/dist/chat/headless/composer/index.d.ts +2 -2
- package/dist/chat/headless/composer/index.js +2 -2
- package/dist/chat/headless/composer/labels-chrome.d.ts +7 -0
- package/dist/chat/headless/composer/labels-chrome.js +7 -0
- package/dist/chat/headless/composer/labels-editor.d.ts +4 -0
- package/dist/chat/headless/composer/labels-editor.js +4 -0
- package/dist/chat/headless/composer/models.d.ts +2 -0
- package/dist/chat/headless/composer/new-session-defaults.d.ts +12 -1
- package/dist/chat/headless/composer/new-session-defaults.js +30 -1
- package/dist/chat/headless/draft-target.d.ts +27 -6
- package/dist/chat/headless/draft-target.js +36 -3
- package/dist/chat/headless/host.d.ts +7 -0
- package/dist/chat/headless/index.d.ts +4 -4
- package/dist/chat/headless/index.js +26 -26
- package/dist/chat/headless/labels.d.ts +4 -0
- package/dist/chat/headless/send-flow.d.ts +2 -0
- package/dist/chat/headless/send-flow.js +2 -1
- package/dist/chat/headless/session-list.d.ts +4 -0
- package/dist/chat/headless/sidebar/index.d.ts +2 -2
- package/dist/chat/headless/sidebar/labels.d.ts +9 -1
- package/dist/chat/headless/sidebar/labels.js +4 -0
- package/dist/chat/headless/sidebar/rows.d.ts +48 -7
- package/dist/chat/headless/sidebar/rows.js +121 -22
- package/dist/chat/headless/sidebar/types.d.ts +5 -0
- package/dist/chat/headless/transcript/fold-actions.d.ts +8 -3
- package/dist/chat/headless/transcript/fold-actions.js +29 -1
- package/dist/chat/index.d.ts +2 -2
- package/dist/chat/index.js +2 -2
- package/dist/chat/rich-composer/RichComposer.js +58 -11
- package/dist/chat/rich-composer/composer-controls.d.ts +5 -1
- package/dist/chat/rich-composer/composer-controls.js +4 -4
- package/dist/chat/rich-composer/composer-keys.js +2 -2
- package/dist/chat/rich-composer/draft-collab.d.ts +91 -0
- package/dist/chat/rich-composer/draft-collab.js +310 -0
- package/dist/chat/rich-composer/use-composer-editor.d.ts +2 -0
- package/dist/chat/rich-composer/use-draft-collab.d.ts +53 -0
- package/dist/chat/rich-composer/use-draft-collab.js +92 -0
- package/dist/chat/rich-composer/use-draft-mirror.d.ts +11 -0
- package/dist/chat/rich-composer/use-draft-mirror.js +38 -9
- package/dist/chat/sidebar/InboxList.js +1 -1
- package/dist/chat/sidebar/ProjectIcon.d.ts +6 -2
- package/dist/chat/sidebar/ProjectIcon.js +7 -3
- package/dist/chat/sidebar/SessionSidebar.d.ts +30 -1
- package/dist/chat/sidebar/SessionSidebar.js +79 -7
- package/dist/chat/sidebar/SidebarGroupHeader.d.ts +12 -4
- package/dist/chat/sidebar/SidebarGroupHeader.js +70 -28
- package/dist/chat/sidebar/index.d.ts +2 -2
- package/dist/chat/transcript/actions.d.ts +6 -0
- package/dist/chat/transcript/fold.d.ts +2 -1
- package/dist/chat/transcript/fold.js +26 -1
- package/dist/chat/transcript/index.js +3 -3
- package/dist/chat/transcript/notices.d.ts +5 -2
- package/dist/chat/transcript/notices.js +23 -3
- package/dist/chat/transcript/script-input.d.ts +1 -1
- package/dist/components/Avatar.d.ts +36 -0
- package/dist/components/Avatar.js +56 -0
- package/dist/components/AvatarStack.d.ts +58 -0
- package/dist/components/AvatarStack.js +187 -0
- package/dist/components/Tabs.d.ts +6 -1
- package/dist/components/Tabs.js +43 -39
- package/dist/core.css +19 -1
- package/dist/dist/{index-BsoTsm0E.d.ts → index-ChabiHpR.d.ts} +1 -1
- package/dist/dist/index.d.ts +1 -1
- package/dist/git/headless/environment.d.ts +15 -0
- package/dist/git/headless/environment.js +18 -1
- package/dist/git/headless/github.d.ts +11 -0
- package/dist/git/headless/github.js +15 -0
- package/dist/git/headless/host.d.ts +109 -0
- package/dist/git/headless/index.d.ts +5 -4
- package/dist/git/headless/index.js +4 -3
- package/dist/git/headless/labels.d.ts +16 -1
- package/dist/git/headless/labels.js +25 -1
- package/dist/git/testing/contract.d.ts +22 -4
- package/dist/git/testing/contract.js +173 -3
- package/dist/git/testing/index.d.ts +22 -1
- package/dist/git/testing/index.js +135 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +3 -1
- package/dist/labels.d.ts +4 -0
- package/dist/labels.js +4 -0
- package/dist/onboarding/headless/labels.d.ts +4 -0
- package/dist/session/DraftPeopleStack.d.ts +24 -0
- package/dist/session/DraftPeopleStack.js +48 -0
- package/dist/session/NewProjectDialog.d.ts +28 -8
- package/dist/session/NewProjectDialog.js +225 -40
- package/dist/session/PersonCard.d.ts +29 -0
- package/dist/session/PersonCard.js +199 -0
- package/dist/session/ProjectArtifactsSection.d.ts +4 -1
- package/dist/session/ProjectArtifactsSection.js +149 -34
- package/dist/session/ProjectHome.d.ts +1 -1
- package/dist/session/ProjectHome.js +23 -4
- package/dist/session/ProjectName.d.ts +11 -6
- package/dist/session/ProjectName.js +27 -13
- package/dist/session/ProjectPeopleStack.d.ts +26 -0
- package/dist/session/ProjectPeopleStack.js +56 -0
- package/dist/session/ProjectPublishDialog.js +9 -3
- package/dist/session/ProjectSettingsDialog.d.ts +1 -1
- package/dist/session/ProjectSettingsDialog.js +171 -66
- package/dist/session/ProjectShareDialog.d.ts +1 -1
- package/dist/session/ProjectShareDialog.js +16 -6
- package/dist/session/ProjectToolsSection.js +88 -96
- package/dist/session/ProjectUsage.d.ts +4 -1
- package/dist/session/ProjectUsage.js +13 -4
- package/dist/session/SessionDetailsDialog.d.ts +5 -1
- package/dist/session/SessionDetailsDialog.js +67 -10
- package/dist/session/SessionPeopleStack.js +19 -37
- package/dist/session/SessionProjectPicker.d.ts +54 -0
- package/dist/session/SessionProjectPicker.js +175 -0
- package/dist/session/SessionProvider.d.ts +15 -1
- package/dist/session/SessionProvider.js +28 -6
- package/dist/session/UsageSection.d.ts +2 -4
- package/dist/session/UsageSection.js +57 -55
- package/dist/session/headless/draft-collab.d.ts +55 -0
- package/dist/session/headless/draft-collab.js +127 -0
- package/dist/session/headless/draft-room.d.ts +124 -0
- package/dist/session/headless/draft-room.js +340 -0
- package/dist/session/headless/drafts.d.ts +93 -0
- package/dist/session/headless/drafts.js +79 -0
- package/dist/session/headless/fixture-drafts.d.ts +54 -0
- package/dist/session/headless/fixture-drafts.js +286 -0
- package/dist/session/headless/fixture-host.d.ts +18 -2
- package/dist/session/headless/fixture-host.js +41 -7
- package/dist/session/headless/fixture-projects.d.ts +6 -4
- package/dist/session/headless/fixture-projects.js +25 -4
- package/dist/session/headless/host.d.ts +34 -6
- package/dist/session/headless/index.d.ts +6 -3
- package/dist/session/headless/index.js +6 -3
- package/dist/session/headless/labels.d.ts +47 -2
- package/dist/session/headless/labels.js +17 -1
- package/dist/session/headless/people.d.ts +27 -3
- package/dist/session/headless/people.js +38 -20
- package/dist/session/headless/project-artifact-labels.d.ts +7 -0
- package/dist/session/headless/project-artifact-labels.js +7 -0
- package/dist/session/headless/project-artifacts.d.ts +8 -0
- package/dist/session/headless/project-artifacts.js +15 -1
- package/dist/session/headless/project-labels.d.ts +25 -0
- package/dist/session/headless/project-labels.js +25 -0
- package/dist/session/headless/shared-with.d.ts +28 -0
- package/dist/session/headless/shared-with.js +51 -0
- package/dist/session/host-context.d.ts +11 -0
- package/dist/session/host-context.js +14 -0
- package/dist/session/index.d.ts +7 -3
- package/dist/session/index.js +6 -2
- package/dist/session/new-project-parts.d.ts +67 -0
- package/dist/session/new-project-parts.js +470 -0
- package/dist/session/project-artifact-parts.d.ts +2 -1
- package/dist/session/project-artifact-parts.js +5 -2
- package/dist/session/project-people.d.ts +14 -0
- package/dist/session/project-people.js +86 -0
- package/dist/session/share-people.d.ts +12 -0
- package/dist/session/share-people.js +1 -1
- package/dist/session/testing/contract.d.ts +6 -3
- package/dist/session/testing/contract.js +24 -3
- package/dist/session/testing/drafts.contract.d.ts +30 -0
- package/dist/session/testing/drafts.contract.js +126 -0
- package/dist/session/testing/index.d.ts +2 -1
- package/dist/session/testing/index.js +2 -1
- package/dist/session/use-home-projects.d.ts +11 -2
- package/dist/session/use-home-projects.js +142 -5
- package/dist/session/useDraftCollab.d.ts +24 -0
- package/dist/session/useDraftCollab.js +78 -0
- package/dist/settings/headless/search.d.ts +1 -1
- package/dist/settings/index.js +3 -3
- package/dist/settings/sections/providers/CredentialSources.d.ts +5 -5
- package/dist/settings/sections/providers/CredentialSources.js +5 -22
- package/dist/settings/sections/providers/labels.d.ts +1 -9
- package/dist/settings/sections/providers/labels.js +1 -9
- package/dist/styles.css +20 -9
- package/package.json +4 -3
- package/src/styles/sidebar.css +2 -3
|
@@ -5,7 +5,7 @@ import { useProjectIcons } from "../chat/sidebar/ProjectIcon.js";
|
|
|
5
5
|
import { errorMessage } from "../components/report-error.js";
|
|
6
6
|
import { ProjectRefusedError, folderlessProjects, managesProject } from "./headless/projects.js";
|
|
7
7
|
import { createPushedOnce } from "./headless/pushed-once.js";
|
|
8
|
-
import { useProjectList, useSessionProjects } from "./SessionProvider.js";
|
|
8
|
+
import { useProjectList, useSessionProjects, useSessionProjectsOf } from "./SessionProvider.js";
|
|
9
9
|
import { useSessionLabels } from "./useSessionLabels.js";
|
|
10
10
|
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
11
11
|
// src/session/use-home-projects.ts
|
|
@@ -16,11 +16,13 @@ const NO_RECORDS = [];
|
|
|
16
16
|
const NO_SESSIONS = [];
|
|
17
17
|
const NOTHING_RESOLVED = /* @__PURE__ */ new Map();
|
|
18
18
|
const NOTHING_FILED = {};
|
|
19
|
+
const NO_SERVERS = [];
|
|
20
|
+
const NOTHING_READ = /* @__PURE__ */ new Map();
|
|
19
21
|
/** One key per set of this host's sessions and their folders: what can file a session elsewhere. */
|
|
20
22
|
function filingKey(sessions) {
|
|
21
|
-
|
|
22
|
-
for (const session of sessions) if (!session.hostId && session.id !== void 0)
|
|
23
|
-
return
|
|
23
|
+
const keys = [];
|
|
24
|
+
for (const session of sessions) if (!session.hostId && session.id !== void 0) keys.push(`${session.id}\u0001${projectPathOf(session)}`);
|
|
25
|
+
return keys.sort().join("\0");
|
|
24
26
|
}
|
|
25
27
|
/** The paths of the sidebar's groups of this host's folders, sorted, one per folder. */
|
|
26
28
|
function localFolders(sessions) {
|
|
@@ -32,8 +34,142 @@ function localFolders(sessions) {
|
|
|
32
34
|
return [...folders].sort();
|
|
33
35
|
}
|
|
34
36
|
/**
|
|
37
|
+
* The servers the sessions are on, sorted, and one key per set of each one's sessions and their folders: the order
|
|
38
|
+
* the list gives them in (most recent first) does not move it.
|
|
39
|
+
*/
|
|
40
|
+
function serverFiling(sessions) {
|
|
41
|
+
const by = /* @__PURE__ */ new Map();
|
|
42
|
+
for (const session of sessions) {
|
|
43
|
+
if (!session.hostId) continue;
|
|
44
|
+
const keys = by.get(session.hostId) ?? [];
|
|
45
|
+
keys.push(`${session.id ?? ""}\u0001${projectPathOf(session)}`);
|
|
46
|
+
by.set(session.hostId, keys);
|
|
47
|
+
}
|
|
48
|
+
const hosts = [...by.keys()].sort();
|
|
49
|
+
return {
|
|
50
|
+
hosts: hosts.join("\0"),
|
|
51
|
+
filing: hosts.map((hostId) => `${hostId}\u0002${by.get(hostId).sort().join("\0")}`).join("")
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* The projects of each server the sessions are on (`projectsOf`), with the sessions filed in each, once its list is read.
|
|
56
|
+
*
|
|
57
|
+
* @param enabled - Read them. Off, nothing is read.
|
|
58
|
+
* @param sessions - The sessions the sidebar lists.
|
|
59
|
+
*/
|
|
60
|
+
function useServerProjects(enabled, sessions) {
|
|
61
|
+
const projectsOf = useSessionProjectsOf();
|
|
62
|
+
const of = enabled ? projectsOf : void 0;
|
|
63
|
+
const { hosts, filing } = useMemo(() => serverFiling(sessions), [sessions]);
|
|
64
|
+
const [reads, setReads] = useState(NOTHING_READ);
|
|
65
|
+
/** Each watched server's read of its filed sessions. */
|
|
66
|
+
const refile = useRef(/* @__PURE__ */ new Set());
|
|
67
|
+
useEffect(() => {
|
|
68
|
+
if (!of || !hosts) return void 0;
|
|
69
|
+
let live = true;
|
|
70
|
+
const write = (hostId, read) => live && setReads((all) => {
|
|
71
|
+
const next = new Map(all);
|
|
72
|
+
if (read) next.set(hostId, read);
|
|
73
|
+
else next.delete(hostId);
|
|
74
|
+
return next;
|
|
75
|
+
});
|
|
76
|
+
const stops = hosts.split("\0").map((hostId) => {
|
|
77
|
+
const store = of(hostId);
|
|
78
|
+
let detach = () => {};
|
|
79
|
+
const attach = () => {
|
|
80
|
+
detach();
|
|
81
|
+
detach = () => {};
|
|
82
|
+
const projects = store.get();
|
|
83
|
+
if (!projects) {
|
|
84
|
+
write(hostId, null);
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
let filed = NOTHING_FILED;
|
|
88
|
+
let seq = 0;
|
|
89
|
+
const publish = () => {
|
|
90
|
+
const list = projects.list.get();
|
|
91
|
+
if (list) write(hostId, {
|
|
92
|
+
list,
|
|
93
|
+
filed
|
|
94
|
+
});
|
|
95
|
+
};
|
|
96
|
+
const readFiled = () => {
|
|
97
|
+
const at = ++seq;
|
|
98
|
+
projects.sessionProjects?.().then((map) => {
|
|
99
|
+
if (!live || at !== seq) return;
|
|
100
|
+
filed = map && typeof map === "object" ? map : NOTHING_FILED;
|
|
101
|
+
publish();
|
|
102
|
+
}, () => void 0);
|
|
103
|
+
};
|
|
104
|
+
const onList = () => {
|
|
105
|
+
if (!projects.list.get()) return;
|
|
106
|
+
publish();
|
|
107
|
+
readFiled();
|
|
108
|
+
};
|
|
109
|
+
const offList = projects.list.subscribe(onList);
|
|
110
|
+
projects.ensure();
|
|
111
|
+
onList();
|
|
112
|
+
refile.current.add(readFiled);
|
|
113
|
+
detach = () => {
|
|
114
|
+
offList();
|
|
115
|
+
refile.current.delete(readFiled);
|
|
116
|
+
seq++;
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
const offStore = store.subscribe(attach);
|
|
120
|
+
attach();
|
|
121
|
+
return () => {
|
|
122
|
+
offStore();
|
|
123
|
+
detach();
|
|
124
|
+
};
|
|
125
|
+
});
|
|
126
|
+
return () => {
|
|
127
|
+
live = false;
|
|
128
|
+
for (const stop of stops) stop();
|
|
129
|
+
};
|
|
130
|
+
}, [of, hosts]);
|
|
131
|
+
const filedAt = useRef({
|
|
132
|
+
hosts,
|
|
133
|
+
filing
|
|
134
|
+
});
|
|
135
|
+
useEffect(() => {
|
|
136
|
+
const was = filedAt.current;
|
|
137
|
+
filedAt.current = {
|
|
138
|
+
hosts,
|
|
139
|
+
filing
|
|
140
|
+
};
|
|
141
|
+
if (was.hosts !== hosts || was.filing === filing) return;
|
|
142
|
+
for (const read of refile.current) read();
|
|
143
|
+
}, [hosts, filing]);
|
|
144
|
+
return useMemo(() => {
|
|
145
|
+
if (!of || !hosts) return NO_SERVERS;
|
|
146
|
+
const out = [];
|
|
147
|
+
for (const hostId of hosts.split("\0")) {
|
|
148
|
+
const read = reads.get(hostId);
|
|
149
|
+
if (!read) continue;
|
|
150
|
+
const filedBy = /* @__PURE__ */ new Map();
|
|
151
|
+
for (const [sessionId, projectId] of Object.entries(read.filed)) filedBy.set(projectId, [...filedBy.get(projectId) ?? [], sessionId]);
|
|
152
|
+
out.push({
|
|
153
|
+
hostId,
|
|
154
|
+
projects: read.list.map((p) => ({
|
|
155
|
+
id: p.id,
|
|
156
|
+
name: p.name,
|
|
157
|
+
...p.home ? { home: p.home } : {},
|
|
158
|
+
...p.settings?.projectIcon ? { icon: p.settings.projectIcon } : {},
|
|
159
|
+
...filedBy.has(p.id) ? { sessions: filedBy.get(p.id) } : {}
|
|
160
|
+
}))
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
return out.length > 0 ? out : NO_SERVERS;
|
|
164
|
+
}, [
|
|
165
|
+
of,
|
|
166
|
+
hosts,
|
|
167
|
+
reads
|
|
168
|
+
]);
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
35
171
|
* The sidebar's projects: those with a home folder, their folders and their icons, and the window's icons sent to the
|
|
36
|
-
* host once; and those with no folder, with their icons.
|
|
172
|
+
* host once; and those with no folder, with their icons; and each listed server's.
|
|
37
173
|
*
|
|
38
174
|
* @param enabled - Read them (`Settings.projectHome`). Off, nothing is read or written.
|
|
39
175
|
* @param sessions - The sessions the sidebar lists: their folders that are no project's home are resolved on the host.
|
|
@@ -148,6 +284,7 @@ function useHomeProjects(enabled, sessions = NO_SESSIONS) {
|
|
|
148
284
|
return {
|
|
149
285
|
homeProjects,
|
|
150
286
|
folderlessProjects: recordProjects,
|
|
287
|
+
serverProjects: useServerProjects(enabled, sessions),
|
|
151
288
|
...setSettings ? { onSetProjectIcon } : {}
|
|
152
289
|
};
|
|
153
290
|
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { DraftCollab, DraftComposerState } from "./headless/draft-collab.js";
|
|
2
|
+
import { DraftRoomClient, DraftRoomView } from "./headless/draft-room.js";
|
|
3
|
+
import { DraftingPerson } from "./headless/drafts.js";
|
|
4
|
+
/** The window's collaborative drafts, or `null` when the host has none (or outside a `SessionProvider`). */
|
|
5
|
+
export declare function useDraftCollab(): DraftCollab | null;
|
|
6
|
+
/**
|
|
7
|
+
* What a session's composer shows: whose draft, and the room it edits in.
|
|
8
|
+
*
|
|
9
|
+
* @param sessionId - The session (`null`: a new chat, which has none).
|
|
10
|
+
*/
|
|
11
|
+
export declare function useDraftComposer(sessionId: string | null): DraftComposerState;
|
|
12
|
+
/**
|
|
13
|
+
* A room's status and people, kept current.
|
|
14
|
+
*
|
|
15
|
+
* @param room - The room's client (`null`: none).
|
|
16
|
+
*/
|
|
17
|
+
export declare function useDraftRoomView(room: DraftRoomClient | null): DraftRoomView;
|
|
18
|
+
/**
|
|
19
|
+
* Who else drafts in a session now, newest first: the people who have it open (presence), and the one whose draft
|
|
20
|
+
* the composer shows, whatever presence and the server's list say (its tab is the way back to your own draft).
|
|
21
|
+
*
|
|
22
|
+
* @param sessionId - The session (`null`: none).
|
|
23
|
+
*/
|
|
24
|
+
export declare function useDraftingHere(sessionId: string | null): readonly DraftingPerson[];
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { draftCollabOf } from "./headless/draft-collab.js";
|
|
2
|
+
import { useSessionSharing } from "./SessionProvider.js";
|
|
3
|
+
import { useEffect, useMemo, useState, useSyncExternalStore } from "react";
|
|
4
|
+
// src/session/useDraftCollab.ts
|
|
5
|
+
const NONE = {
|
|
6
|
+
viewing: null,
|
|
7
|
+
room: null
|
|
8
|
+
};
|
|
9
|
+
const NO_VIEW = {
|
|
10
|
+
status: "idle",
|
|
11
|
+
people: []
|
|
12
|
+
};
|
|
13
|
+
const NOBODY = [];
|
|
14
|
+
const nothing = () => () => {};
|
|
15
|
+
/** The window's collaborative drafts, or `null` when the host has none (or outside a `SessionProvider`). */
|
|
16
|
+
function useDraftCollab() {
|
|
17
|
+
const drafts = useSessionSharing()?.drafts;
|
|
18
|
+
return useMemo(() => drafts ? draftCollabOf(drafts) : null, [drafts]);
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* What a session's composer shows: whose draft, and the room it edits in.
|
|
22
|
+
*
|
|
23
|
+
* @param sessionId - The session (`null`: a new chat, which has none).
|
|
24
|
+
*/
|
|
25
|
+
function useDraftComposer(sessionId) {
|
|
26
|
+
const collab = useDraftCollab();
|
|
27
|
+
const store = useMemo(() => collab && sessionId ? collab.composer(sessionId) : null, [collab, sessionId]);
|
|
28
|
+
return useSyncExternalStore(store ? store.subscribe : nothing, store ? store.get : () => NONE, store ? store.get : () => NONE);
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* A room's status and people, kept current.
|
|
32
|
+
*
|
|
33
|
+
* @param room - The room's client (`null`: none).
|
|
34
|
+
*/
|
|
35
|
+
function useDraftRoomView(room) {
|
|
36
|
+
return useSyncExternalStore(room ? room.view.subscribe : nothing, room ? room.view.get : () => NO_VIEW, room ? room.view.get : () => NO_VIEW);
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Who else drafts in a session now, newest first: the people who have it open (presence), and the one whose draft
|
|
40
|
+
* the composer shows, whatever presence and the server's list say (its tab is the way back to your own draft).
|
|
41
|
+
*
|
|
42
|
+
* @param sessionId - The session (`null`: none).
|
|
43
|
+
*/
|
|
44
|
+
function useDraftingHere(sessionId) {
|
|
45
|
+
const collab = useDraftCollab();
|
|
46
|
+
const people = useSessionSharing()?.people;
|
|
47
|
+
const { viewing, room } = useDraftComposer(sessionId);
|
|
48
|
+
const roomPeople = useDraftRoomView(room).people;
|
|
49
|
+
const [drafting, setDrafting] = useState(NOBODY);
|
|
50
|
+
const [here, setHere] = useState(null);
|
|
51
|
+
useEffect(() => {
|
|
52
|
+
if (!collab || !sessionId) return void 0;
|
|
53
|
+
return collab.drafting.watch(sessionId, setDrafting);
|
|
54
|
+
}, [collab, sessionId]);
|
|
55
|
+
useEffect(() => {
|
|
56
|
+
if (!people || !sessionId) return void 0;
|
|
57
|
+
return people.watch(sessionId, setHere);
|
|
58
|
+
}, [people, sessionId]);
|
|
59
|
+
return useMemo(() => {
|
|
60
|
+
if (!collab || !sessionId) return NOBODY;
|
|
61
|
+
const present = here ? new Set(here.map((person) => person.userId)) : null;
|
|
62
|
+
const shown = drafting.filter((person) => !present || present.has(person.userId) || person.userId === viewing);
|
|
63
|
+
const owner = viewing !== null && !shown.some((person) => person.userId === viewing) ? roomPeople.find((person) => person.userId === viewing) : void 0;
|
|
64
|
+
if (owner) return [...shown, {
|
|
65
|
+
...owner,
|
|
66
|
+
since: 0
|
|
67
|
+
}];
|
|
68
|
+
return shown.length === drafting.length ? drafting : shown;
|
|
69
|
+
}, [
|
|
70
|
+
collab,
|
|
71
|
+
sessionId,
|
|
72
|
+
drafting,
|
|
73
|
+
here,
|
|
74
|
+
viewing,
|
|
75
|
+
roomPeople
|
|
76
|
+
]);
|
|
77
|
+
}
|
|
78
|
+
export { useDraftCollab, useDraftComposer, useDraftRoomView, useDraftingHere };
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* best first, once each, and `groupSettingsResults` groups them by page
|
|
13
13
|
* and section.
|
|
14
14
|
*/
|
|
15
|
-
import { DF as Settings } from "../../dist/index-
|
|
15
|
+
import { DF as Settings } from "../../dist/index-ChabiHpR.js";
|
|
16
16
|
import { SettingsActionId, SettingsPage } from "./layout.js";
|
|
17
17
|
import { SettingsSearchEntry, SettingsSection } from "./registry.js";
|
|
18
18
|
import { SettingSurface } from "zidane/chat/pure";
|
package/dist/settings/index.js
CHANGED
|
@@ -8,13 +8,13 @@ import { DEFAULT_CATALOG_SHARED_LABELS } from "./sections/shared/labels.js";
|
|
|
8
8
|
import { DEFAULT_EXTENSION_OPTIONS_LABELS } from "./sections/extensions/options-labels.js";
|
|
9
9
|
import { McpRequirementRow } from "./sections/extensions/McpRequirementRow.js";
|
|
10
10
|
import { ExtensionActionRow, ExtensionConfigRow, extensionConfigValue, useExtensionOptionsLabels } from "./sections/extensions/ExtensionConfigRows.js";
|
|
11
|
+
import { DEFAULT_ACCOUNTS_SECTION_LABELS } from "./sections/providers/labels.js";
|
|
12
|
+
import { ProvidersSection, useAccountsSectionLabels } from "./sections/providers/ProvidersSection.js";
|
|
13
|
+
import { ServerSignIn } from "./sections/providers/ServerSignIn.js";
|
|
11
14
|
import { scopeLabel, useScopeLabel } from "./scope.js";
|
|
12
15
|
import { SettingFocus, SettingsPanel, SettingsPanelActions, SettingsPanelBody, useSettingsSection } from "./section.js";
|
|
13
16
|
import { useServerAppSettingsSections } from "./server-app.js";
|
|
14
17
|
import { ScopeBadge, SettingBadges, SettingCard, SettingChoiceCards, SettingNoteLine } from "./SettingCard.js";
|
|
15
|
-
import { DEFAULT_ACCOUNTS_SECTION_LABELS } from "./sections/providers/labels.js";
|
|
16
|
-
import { ProvidersSection, useAccountsSectionLabels } from "./sections/providers/ProvidersSection.js";
|
|
17
|
-
import { ServerSignIn } from "./sections/providers/ServerSignIn.js";
|
|
18
18
|
import { SettingDemo } from "./SettingDemo.js";
|
|
19
19
|
import { AppUpdateButton, SettingsSetupRow, SettingsVersionRow } from "./SettingsFooter.js";
|
|
20
20
|
import { SettingsHeadingText } from "./SettingsHeadingText.js";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The credential sources of a provider holding more than one stored (an API
|
|
3
3
|
* key and an OAuth account side by side, or several accounts): each source
|
|
4
|
-
* with the
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
4
|
+
* with the actions the host offers on it, Rename, Re-auth and Remove, as icon
|
|
5
|
+
* buttons with tooltips in one aligned column. Which account a chat runs on
|
|
6
|
+
* is picked with its model, so no source is marked "in use". A provider with
|
|
7
|
+
* one stored source never renders this.
|
|
8
8
|
*
|
|
9
9
|
* `env` is shown for context only: it is observed, not stored, so it has no
|
|
10
|
-
* action
|
|
10
|
+
* action.
|
|
11
11
|
*/
|
|
12
12
|
import { ConfirmOptions } from "../../../components/ConfirmDialog.js";
|
|
13
13
|
import { SettingsError } from "../../headless/host.js";
|
|
@@ -12,7 +12,7 @@ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
|
12
12
|
function CredentialSources({ provider, cwd, host, labels: l, confirm, onError, onReauth }) {
|
|
13
13
|
const [busy, setBusy] = useState(null);
|
|
14
14
|
const [renaming, setRenaming] = useState(null);
|
|
15
|
-
const {
|
|
15
|
+
const { remove: removeCredential, rename } = host;
|
|
16
16
|
const identity = (method) => method.key ?? method.source;
|
|
17
17
|
const run = async (id, op) => {
|
|
18
18
|
try {
|
|
@@ -25,12 +25,11 @@ function CredentialSources({ provider, cwd, host, labels: l, confirm, onError, o
|
|
|
25
25
|
setBusy(null);
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
|
-
const use = (method) => run(`use:${identity(method)}`, () => setPreferred(cwd, provider.key, method.key ? { key: method.key } : method.source));
|
|
29
28
|
const remove = async (method) => {
|
|
30
29
|
const key = method.key;
|
|
31
30
|
if (!key) return;
|
|
32
31
|
if (!await confirm({
|
|
33
|
-
title: l.accountsRemoveConfirm(provider.label, method.label ?? method.source
|
|
32
|
+
title: l.accountsRemoveConfirm(provider.label, method.label ?? method.source),
|
|
34
33
|
confirmLabel: l.accountsRemove,
|
|
35
34
|
destructive: true
|
|
36
35
|
})) return;
|
|
@@ -49,18 +48,16 @@ function CredentialSources({ provider, cwd, host, labels: l, confirm, onError, o
|
|
|
49
48
|
"aria-label": l.accountsSources(provider.label),
|
|
50
49
|
children: provider.methods.map((method) => {
|
|
51
50
|
const isEnv = method.source === "env";
|
|
52
|
-
const selectable = !isEnv && !method.active && setPreferred !== void 0;
|
|
53
51
|
const id = identity(method);
|
|
54
52
|
const title = method.label ?? method.source;
|
|
55
53
|
const isRenaming = renaming !== null && renaming.key === method.key;
|
|
56
54
|
const renamable = method.source === "oauth" && !!method.key;
|
|
57
55
|
return /* @__PURE__ */ jsxs("li", {
|
|
58
|
-
"
|
|
59
|
-
className: "grid grid-cols-[14px_minmax(0,1fr)_auto] items-center gap-x-2.5 min-h-11 px-2.5 py-1.5 rounded-zg-sm data-[active]:bg-[var(--zg-raised)]",
|
|
56
|
+
className: "grid grid-cols-[14px_minmax(0,1fr)_auto] items-center gap-x-2.5 min-h-11 px-2.5 py-1.5 rounded-zg-sm",
|
|
60
57
|
children: [
|
|
61
58
|
/* @__PURE__ */ jsx("span", {
|
|
62
59
|
"aria-hidden": true,
|
|
63
|
-
className: `justify-self-center w-2 h-2 rounded-full ${
|
|
60
|
+
className: `justify-self-center w-2 h-2 rounded-full ${isRenaming ? "self-center" : "self-start mt-1.5"} ${isEnv ? "bg-[var(--zg-text-subtle)]" : "bg-zg-success"}`
|
|
64
61
|
}),
|
|
65
62
|
isRenaming ? /* @__PURE__ */ jsx("input", {
|
|
66
63
|
autoFocus: true,
|
|
@@ -80,7 +77,7 @@ function CredentialSources({ provider, cwd, host, labels: l, confirm, onError, o
|
|
|
80
77
|
}) : /* @__PURE__ */ jsxs("span", {
|
|
81
78
|
className: "flex flex-col min-w-0",
|
|
82
79
|
children: [/* @__PURE__ */ jsx("span", {
|
|
83
|
-
className:
|
|
80
|
+
className: "text-zg-ui leading-5 truncate text-[var(--zg-text)]",
|
|
84
81
|
children: title
|
|
85
82
|
}), (method.email || method.detail) && /* @__PURE__ */ jsxs("span", {
|
|
86
83
|
className: "flex items-baseline gap-1.5 min-w-0 leading-4",
|
|
@@ -114,20 +111,6 @@ function CredentialSources({ provider, cwd, host, labels: l, confirm, onError, o
|
|
|
114
111
|
title: l.accountsRenameCancelTitle,
|
|
115
112
|
children: l.accountsRenameCancel
|
|
116
113
|
})] }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
117
|
-
method.active ? /* @__PURE__ */ jsx("span", {
|
|
118
|
-
className: "zg-meta-chip text-zg-meta text-zg-success min-w-[4.5rem] justify-center",
|
|
119
|
-
children: l.accountsInUse
|
|
120
|
-
}) : selectable ? /* @__PURE__ */ jsx("button", {
|
|
121
|
-
type: "button",
|
|
122
|
-
disabled: busy !== null,
|
|
123
|
-
onClick: () => void use(method),
|
|
124
|
-
className: `${buttonClass({
|
|
125
|
-
variant: "secondary",
|
|
126
|
-
size: "sm"
|
|
127
|
-
})} min-w-[4.5rem]`,
|
|
128
|
-
title: l.accountsUseTitle(method.source, provider.label),
|
|
129
|
-
children: busy === `use:${id}` ? l.accountsSwitching : l.accountsUse
|
|
130
|
-
}) : null,
|
|
131
114
|
renamable && rename && /* @__PURE__ */ jsx(IconButton, {
|
|
132
115
|
icon: "i-ph-pencil-simple",
|
|
133
116
|
label: busy === `rename:${id}` ? l.accountsRenaming : l.accountsRename,
|
|
@@ -64,8 +64,6 @@ export declare const DEFAULT_ACCOUNTS_SECTION_LABELS: {
|
|
|
64
64
|
accountsKeyField: (provider: string) => string;
|
|
65
65
|
/** The credential sources list's name. */
|
|
66
66
|
accountsSources: (provider: string) => string;
|
|
67
|
-
/** After the credential in use. */
|
|
68
|
-
accountsInUse: string;
|
|
69
67
|
/** The rename field's name. */
|
|
70
68
|
accountsRenameField: (name: string) => string;
|
|
71
69
|
/** The rename field's placeholder. */
|
|
@@ -78,12 +76,6 @@ export declare const DEFAULT_ACCOUNTS_SECTION_LABELS: {
|
|
|
78
76
|
accountsRenameCancel: string;
|
|
79
77
|
/** Its tooltip. */
|
|
80
78
|
accountsRenameCancelTitle: string;
|
|
81
|
-
/** Makes a credential the one in use. */
|
|
82
|
-
accountsUse: string;
|
|
83
|
-
/** While that runs. */
|
|
84
|
-
accountsSwitching: string;
|
|
85
|
-
/** Its tooltip. */
|
|
86
|
-
accountsUseTitle: (source: string, provider: string) => string;
|
|
87
79
|
/** Renames an OAuth account. */
|
|
88
80
|
accountsRename: string;
|
|
89
81
|
/** While that runs. */
|
|
@@ -101,7 +93,7 @@ export declare const DEFAULT_ACCOUNTS_SECTION_LABELS: {
|
|
|
101
93
|
/** Its tooltip. */
|
|
102
94
|
accountsRemoveTitle: (name: string, provider: string) => string;
|
|
103
95
|
/** The confirm before Remove. */
|
|
104
|
-
accountsRemoveConfirm: (provider: string, name: string
|
|
96
|
+
accountsRemoveConfirm: (provider: string, name: string) => string;
|
|
105
97
|
/** Its list could not be read. */
|
|
106
98
|
accountsServerReadFailed: (host: string, reason: string) => string;
|
|
107
99
|
/** While it is read. */
|
|
@@ -58,8 +58,6 @@ const DEFAULT_ACCOUNTS_SECTION_LABELS = {
|
|
|
58
58
|
accountsKeyField: (provider) => `${provider} API key`,
|
|
59
59
|
/** The credential sources list's name. */
|
|
60
60
|
accountsSources: (provider) => `${provider} credential sources`,
|
|
61
|
-
/** After the credential in use. */
|
|
62
|
-
accountsInUse: "In use",
|
|
63
61
|
/** The rename field's name. */
|
|
64
62
|
accountsRenameField: (name) => `New name for ${name}`,
|
|
65
63
|
/** The rename field's placeholder. */
|
|
@@ -72,12 +70,6 @@ const DEFAULT_ACCOUNTS_SECTION_LABELS = {
|
|
|
72
70
|
accountsRenameCancel: "Cancel",
|
|
73
71
|
/** Its tooltip. */
|
|
74
72
|
accountsRenameCancelTitle: "Cancel rename",
|
|
75
|
-
/** Makes a credential the one in use. */
|
|
76
|
-
accountsUse: "Use",
|
|
77
|
-
/** While that runs. */
|
|
78
|
-
accountsSwitching: "Switching…",
|
|
79
|
-
/** Its tooltip. */
|
|
80
|
-
accountsUseTitle: (source, provider) => `Use this ${source} credential for ${provider}`,
|
|
81
73
|
/** Renames an OAuth account. */
|
|
82
74
|
accountsRename: "Rename",
|
|
83
75
|
/** While that runs. */
|
|
@@ -95,7 +87,7 @@ const DEFAULT_ACCOUNTS_SECTION_LABELS = {
|
|
|
95
87
|
/** Its tooltip. */
|
|
96
88
|
accountsRemoveTitle: (name, provider) => `Remove ${name} from ${provider}`,
|
|
97
89
|
/** The confirm before Remove. */
|
|
98
|
-
accountsRemoveConfirm: (provider, name
|
|
90
|
+
accountsRemoveConfirm: (provider, name) => `Remove ${provider} ${name}?`,
|
|
99
91
|
/** Its list could not be read. */
|
|
100
92
|
accountsServerReadFailed: (host, reason) => `Couldn't read ${host}'s providers: ${reason}`,
|
|
101
93
|
/** While it is read. */
|
package/dist/styles.css
CHANGED
|
@@ -320,6 +320,8 @@
|
|
|
320
320
|
.container{max-width:1536px;}
|
|
321
321
|
}
|
|
322
322
|
/* layer: default */
|
|
323
|
+
.\[--zg-avatar-bg\:var\(--zg-raised\)\]{--zg-avatar-bg:var(--zg-raised);}
|
|
324
|
+
.\[--zg-avatar-ring\:var\(--zg-tray\)\]{--zg-avatar-ring:var(--zg-tray);}
|
|
323
325
|
.\[box-shadow\:var\(--zg-shadow-raised\)\]{box-shadow:var(--zg-shadow-raised);}
|
|
324
326
|
.\[field-sizing\:content\]{field-sizing:content;}
|
|
325
327
|
.\[filter\:drop-shadow\(0_1px_2px_rgb\(0_0_0\/0\.22\)\)\]{filter:drop-shadow(0 1px 2px rgb(0 0 0/0.22));}
|
|
@@ -368,6 +370,7 @@
|
|
|
368
370
|
.-top-1\.5{top:-0.375rem;}
|
|
369
371
|
.-top-2{top:-0.5rem;}
|
|
370
372
|
.-top-3{top:-0.75rem;}
|
|
373
|
+
.-top-4{top:-1rem;}
|
|
371
374
|
.bottom-0{bottom:0;}
|
|
372
375
|
.bottom-0\.5{bottom:0.125rem;}
|
|
373
376
|
.bottom-1{bottom:0.25rem;}
|
|
@@ -478,6 +481,7 @@
|
|
|
478
481
|
.-mx-1{margin-left:-0.25rem;margin-right:-0.25rem;}
|
|
479
482
|
.-mx-1\.5{margin-left:-0.375rem;margin-right:-0.375rem;}
|
|
480
483
|
.-mx-2{margin-left:-0.5rem;margin-right:-0.5rem;}
|
|
484
|
+
.-mx-5{margin-left:-1.25rem;margin-right:-1.25rem;}
|
|
481
485
|
.-my-0\.5{margin-top:-0.125rem;margin-bottom:-0.125rem;}
|
|
482
486
|
.-my-1{margin-top:-0.25rem;margin-bottom:-0.25rem;}
|
|
483
487
|
.-my-px{margin-top:-1px;margin-bottom:-1px;}
|
|
@@ -514,6 +518,7 @@
|
|
|
514
518
|
.-mt-1{margin-top:-0.25rem;}
|
|
515
519
|
.-mt-1\.5{margin-top:-0.375rem;}
|
|
516
520
|
.-mt-2{margin-top:-0.5rem;}
|
|
521
|
+
.-mt-4{margin-top:-1rem;}
|
|
517
522
|
.-mt-5{margin-top:-1.25rem;}
|
|
518
523
|
.-mt-px{margin-top:-1px;}
|
|
519
524
|
.\!mb{margin-bottom:1rem !important;}
|
|
@@ -579,6 +584,7 @@
|
|
|
579
584
|
.aspect-square{aspect-ratio:1/1;}
|
|
580
585
|
.size-1\.5{width:0.375rem;height:0.375rem;}
|
|
581
586
|
.size-14{width:3.5rem;height:3.5rem;}
|
|
587
|
+
.size-2{width:0.5rem;height:0.5rem;}
|
|
582
588
|
.size-3{width:0.75rem;height:0.75rem;}
|
|
583
589
|
.size-3\.5{width:0.875rem;height:0.875rem;}
|
|
584
590
|
.size-4{width:1rem;height:1rem;}
|
|
@@ -615,6 +621,7 @@
|
|
|
615
621
|
.h-\[52px\]{height:52px;}
|
|
616
622
|
.h-\[7px\]{height:7px;}
|
|
617
623
|
.h-\[80px\]{height:80px;}
|
|
624
|
+
.h-\[85dvh\]{height:85dvh;}
|
|
618
625
|
.h-\[88px\]{height:88px;}
|
|
619
626
|
.h-\[8px\]{height:8px;}
|
|
620
627
|
.h-\[min\(60vh\,420px\)\]{height:min(60vh,420px);}
|
|
@@ -650,6 +657,7 @@
|
|
|
650
657
|
.h-full{height:100%;}
|
|
651
658
|
.h-px{height:1px;}
|
|
652
659
|
.h23{height:5.75rem;}
|
|
660
|
+
.max-h-\[132px\]{max-height:132px;}
|
|
653
661
|
.max-h-\[168px\]{max-height:168px;}
|
|
654
662
|
.max-h-\[264px\]{max-height:264px;}
|
|
655
663
|
.max-h-\[30\%\]{max-height:30%;}
|
|
@@ -671,6 +679,7 @@
|
|
|
671
679
|
.max-h-\[min\(400px\,55vh\)\]{max-height:min(400px,55vh);}
|
|
672
680
|
.max-h-\[min\(40vh\,280px\)\]{max-height:min(40vh,280px);}
|
|
673
681
|
.max-h-\[min\(440px\,60vh\)\]{max-height:min(440px,60vh);}
|
|
682
|
+
.max-h-\[min\(480px\,60dvh\)\]{max-height:min(480px,60dvh);}
|
|
674
683
|
.max-h-\[min\(48vh\,420px\)\]{max-height:min(48vh,420px);}
|
|
675
684
|
.max-h-\[min\(60vh\,460px\)\]{max-height:min(60vh,460px);}
|
|
676
685
|
.max-h-\[min\(60vh\,480px\)\]{max-height:min(60vh,480px);}
|
|
@@ -718,6 +727,7 @@
|
|
|
718
727
|
.max-w-\[340px\]{max-width:340px;}
|
|
719
728
|
.max-w-\[360px\]{max-width:360px;}
|
|
720
729
|
.max-w-\[36rem\]{max-width:36rem;}
|
|
730
|
+
.max-w-\[40\%\]{max-width:40%;}
|
|
721
731
|
.max-w-\[400px\]{max-width:400px;}
|
|
722
732
|
.max-w-\[440px\]{max-width:440px;}
|
|
723
733
|
.max-w-\[45\%\]{max-width:45%;}
|
|
@@ -772,7 +782,6 @@
|
|
|
772
782
|
.min-w-\[1ch\]{min-width:1ch;}
|
|
773
783
|
.min-w-\[1em\]{min-width:1em;}
|
|
774
784
|
.min-w-\[240px\]{min-width:240px;}
|
|
775
|
-
.min-w-\[4\.5rem\]{min-width:4.5rem;}
|
|
776
785
|
.min-w-\[45\%\]{min-width:45%;}
|
|
777
786
|
.min-w-\[4ch\]{min-width:4ch;}
|
|
778
787
|
.min-w-\[8rem\]{min-width:8rem;}
|
|
@@ -782,6 +791,7 @@
|
|
|
782
791
|
.min-w-16{min-width:4rem;}
|
|
783
792
|
.min-w-4{min-width:1rem;}
|
|
784
793
|
.min-w-5{min-width:1.25rem;}
|
|
794
|
+
.min-w-7{min-width:1.75rem;}
|
|
785
795
|
.min-w-full{min-width:100%;}
|
|
786
796
|
.min-w-max{min-width:max-content;}
|
|
787
797
|
.w-\[1040px\]{width:1040px;}
|
|
@@ -977,6 +987,7 @@
|
|
|
977
987
|
.gap-y-3\.5{row-gap:0.875rem;}
|
|
978
988
|
.gap-y-4{row-gap:1rem;}
|
|
979
989
|
.-space-x-1\.5>:not([hidden])~:not([hidden]){--un-space-x-reverse:0;margin-left:calc(calc(0.375rem * calc(1 - var(--un-space-x-reverse))) * -1);margin-right:calc(calc(0.375rem * var(--un-space-x-reverse)) * -1);}
|
|
990
|
+
.-space-x-2>:not([hidden])~:not([hidden]){--un-space-x-reverse:0;margin-left:calc(calc(0.5rem * calc(1 - var(--un-space-x-reverse))) * -1);margin-right:calc(calc(0.5rem * var(--un-space-x-reverse)) * -1);}
|
|
980
991
|
.space-y-0\.5>:not([hidden])~:not([hidden]){--un-space-y-reverse:0;margin-top:calc(0.125rem * calc(1 - var(--un-space-y-reverse)));margin-bottom:calc(0.125rem * var(--un-space-y-reverse));}
|
|
981
992
|
.space-y-1\.5>:not([hidden])~:not([hidden]){--un-space-y-reverse:0;margin-top:calc(0.375rem * calc(1 - var(--un-space-y-reverse)));margin-bottom:calc(0.375rem * var(--un-space-y-reverse));}
|
|
982
993
|
.space-y-1>:not([hidden])~:not([hidden]){--un-space-y-reverse:0;margin-top:calc(0.25rem * calc(1 - var(--un-space-y-reverse)));margin-bottom:calc(0.25rem * var(--un-space-y-reverse));}
|
|
@@ -1050,6 +1061,7 @@
|
|
|
1050
1061
|
.first\:rounded-l-full:first-child{border-top-left-radius:9999px;border-bottom-left-radius:9999px;}
|
|
1051
1062
|
.last\:rounded-r-full:last-child{border-top-right-radius:9999px;border-bottom-right-radius:9999px;}
|
|
1052
1063
|
.border-dashed{border-style:dashed;}
|
|
1064
|
+
.border-solid{border-style:solid;}
|
|
1053
1065
|
.\!bg-\[var\(--zg-raised\)\]{background-color:var(--zg-raised) !important;}
|
|
1054
1066
|
.bg-\[color-mix\(in_srgb\,var\(--zg-accent\)_55\%\,var\(--zg-track\)\)\]{background-color:color-mix(in srgb,var(--zg-accent) 55%,var(--zg-track));}
|
|
1055
1067
|
.bg-\[color-mix\(in_srgb\,var\(--zg-accent\)_8\%\,transparent\)\]{background-color:color-mix(in srgb,var(--zg-accent) 8%,transparent);}
|
|
@@ -1062,6 +1074,7 @@
|
|
|
1062
1074
|
.bg-\[var\(--zg-accent-fill\)\],
|
|
1063
1075
|
.bg-zg-accent-fill{background-color:var(--zg-accent-fill);}
|
|
1064
1076
|
.bg-\[var\(--zg-accent\)\]{background-color:var(--zg-accent);}
|
|
1077
|
+
.bg-\[var\(--zg-avatar-bg\,var\(--zg-track\)\)\]{background-color:var(--zg-avatar-bg,var(--zg-track));}
|
|
1065
1078
|
.bg-\[var\(--zg-bg-elevated\)\]{background-color:var(--zg-bg-elevated);}
|
|
1066
1079
|
.bg-\[var\(--zg-bg\)\]{background-color:var(--zg-bg);}
|
|
1067
1080
|
.bg-\[var\(--zg-border-strong\)\]{background-color:var(--zg-border-strong);}
|
|
@@ -1076,8 +1089,7 @@
|
|
|
1076
1089
|
.bg-\[var\(--zg-hairline\)\]{background-color:var(--zg-hairline);}
|
|
1077
1090
|
.bg-\[var\(--zg-overlay\)\]{background-color:var(--zg-overlay);}
|
|
1078
1091
|
.bg-\[var\(--zg-raised\)\],
|
|
1079
|
-
.bg-zg-raised
|
|
1080
|
-
.data-\[active\]\:bg-\[var\(--zg-raised\)\][data-active]{background-color:var(--zg-raised);}
|
|
1092
|
+
.bg-zg-raised{background-color:var(--zg-raised);}
|
|
1081
1093
|
.bg-\[var\(--zg-row-active\)\],
|
|
1082
1094
|
.data-\[highlighted\]\:bg-\[var\(--zg-row-active\)\][data-highlighted],
|
|
1083
1095
|
.data-\[state\=open\]\:bg-\[var\(--zg-row-active\)\][data-state=open]{background-color:var(--zg-row-active);}
|
|
@@ -1116,6 +1128,7 @@
|
|
|
1116
1128
|
.object-contain{object-fit:contain;}
|
|
1117
1129
|
.object-top{object-position:top;}
|
|
1118
1130
|
.p-0,
|
|
1131
|
+
.p-none,
|
|
1119
1132
|
.p\[0\]{padding:0;}
|
|
1120
1133
|
.p-0\.5{padding:0.125rem;}
|
|
1121
1134
|
.p-1{padding:0.25rem;}
|
|
@@ -1201,6 +1214,7 @@
|
|
|
1201
1214
|
.pl-2{padding-left:0.5rem;}
|
|
1202
1215
|
.pl-2\.5{padding-left:0.625rem;}
|
|
1203
1216
|
.pl-3{padding-left:0.75rem;}
|
|
1217
|
+
.pl-3\.5{padding-left:0.875rem;}
|
|
1204
1218
|
.pl-4{padding-left:1rem;}
|
|
1205
1219
|
.pl-5{padding-left:1.25rem;}
|
|
1206
1220
|
.pl-6{padding-left:1.5rem;}
|
|
@@ -1418,11 +1432,9 @@
|
|
|
1418
1432
|
.focus-visible\:ring-1:focus-visible{--un-ring-width:1px;--un-ring-offset-shadow:var(--un-ring-inset) 0 0 0 var(--un-ring-offset-width) var(--un-ring-offset-color);--un-ring-shadow:var(--un-ring-inset) 0 0 0 calc(var(--un-ring-width) + var(--un-ring-offset-width)) var(--un-ring-color);box-shadow:var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow);}
|
|
1419
1433
|
.\!ring-\[color-mix\(in_srgb\,var\(--zg-warn\)_50\%\,transparent\)\]{--un-ring-color:color-mix(in srgb,var(--zg-warn) 50%,transparent) !important;}
|
|
1420
1434
|
.ring-\[color-mix\(in_srgb\,var\(--zg-accent\)_55\%\,transparent\)\]{--un-ring-color:color-mix(in srgb,var(--zg-accent) 55%,transparent);}
|
|
1421
|
-
.ring-\[var\(--zg-bg\)\]{--un-ring-color:var(--zg-bg);}
|
|
1435
|
+
.ring-\[var\(--zg-avatar-ring\,var\(--zg-bg\)\)\]{--un-ring-color:var(--zg-avatar-ring,var(--zg-bg));}
|
|
1422
1436
|
.ring-\[var\(--zg-hairline\)\]{--un-ring-color:var(--zg-hairline);}
|
|
1423
|
-
.ring-\[var\(--zg-text-subtle\)\]{--un-ring-color:var(--zg-text-subtle);}
|
|
1424
1437
|
.focus-visible\:ring-\[var\(--zg-accent\)\]:focus-visible{--un-ring-color:var(--zg-accent);}
|
|
1425
|
-
.ring-inset{--un-ring-inset:inset;}
|
|
1426
1438
|
.blur{--un-blur:blur(8px);filter:var(--un-blur) var(--un-brightness) var(--un-contrast) var(--un-drop-shadow) var(--un-grayscale) var(--un-hue-rotate) var(--un-invert) var(--un-saturate) var(--un-sepia);}
|
|
1427
1439
|
.\!filter{filter:var(--un-blur) var(--un-brightness) var(--un-contrast) var(--un-drop-shadow) var(--un-grayscale) var(--un-hue-rotate) var(--un-invert) var(--un-saturate) var(--un-sepia) !important;}
|
|
1428
1440
|
.filter{filter:var(--un-blur) var(--un-brightness) var(--un-contrast) var(--un-drop-shadow) var(--un-grayscale) var(--un-hue-rotate) var(--un-invert) var(--un-saturate) var(--un-sepia);}
|
|
@@ -5418,11 +5430,10 @@ html[data-motion='reduced'] .zg-orb-ripple {
|
|
|
5418
5430
|
}
|
|
5419
5431
|
|
|
5420
5432
|
/* Dark appearance: primary text at the theme's strongest (pure white unless the theme names its text); muted and
|
|
5421
|
-
subtle keep the theme's gray.
|
|
5433
|
+
subtle keep the theme's gray. Group names, the New session label and the search placeholder stay muted
|
|
5434
|
+
(`--zg-sidebar-label-fg` unset), as in light. */
|
|
5422
5435
|
:root.dark .zg-sidebar {
|
|
5423
5436
|
--zg-text: var(--zg-text-strong);
|
|
5424
|
-
/* Project names, the New session label, the search placeholder; muted elsewhere. */
|
|
5425
|
-
--zg-sidebar-label-fg: var(--zg-text-strong);
|
|
5426
5437
|
}
|
|
5427
5438
|
/* Every session title, not only the active one (`.zg-session-title` is muted in chat.css). */
|
|
5428
5439
|
:root.dark .zg-sidebar .zg-session-title {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zidane-ui",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.6.1",
|
|
4
4
|
"description": "Zidane design system and chat kit: tokens, surface primitives, theme engine, React components, the chat layer (sessions, transcript, composer) and ChatHost adapters.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -564,7 +564,7 @@
|
|
|
564
564
|
"node": ">=20"
|
|
565
565
|
},
|
|
566
566
|
"scripts": {
|
|
567
|
-
"build": "tsdown && bun run scripts/build-css.ts",
|
|
567
|
+
"build": "NODE_OPTIONS=--max-old-space-size=4096 tsdown && bun run scripts/build-css.ts",
|
|
568
568
|
"prepack": "bun run build",
|
|
569
569
|
"size": "bun run scripts/size.ts",
|
|
570
570
|
"api": "bun run scripts/api-report.ts",
|
|
@@ -598,6 +598,7 @@
|
|
|
598
598
|
"d3-shape": "^3",
|
|
599
599
|
"heic-to": "^1.6.7",
|
|
600
600
|
"pele": "^1.13.0",
|
|
601
|
+
"prosemirror-collab": "^1.3.1",
|
|
601
602
|
"react-markdown": "^10.1.0",
|
|
602
603
|
"remark-gfm": "^4.0.1",
|
|
603
604
|
"sonner": "^2.0.8",
|
|
@@ -608,7 +609,7 @@
|
|
|
608
609
|
"react": "^19.3.0",
|
|
609
610
|
"react-dom": "^19.3.0",
|
|
610
611
|
"unocss": ">=66.0.0",
|
|
611
|
-
"zidane": "^9.
|
|
612
|
+
"zidane": "^9.6.1",
|
|
612
613
|
"vitest": ">=3"
|
|
613
614
|
},
|
|
614
615
|
"peerDependenciesMeta": {
|