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
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { isGithubRepoName } from "../headless/github.js";
|
|
1
2
|
import { prMatches } from "../headless/switcher.js";
|
|
2
3
|
import { WORST_CASE_BRANCH, WORST_CASE_GIT, WORST_CASE_GIT_EMPTY } from "./worst-case.js";
|
|
3
4
|
// src/git/testing/index.ts
|
|
@@ -190,6 +191,42 @@ const DEMO_GIT_CLONE = {
|
|
|
190
191
|
imageUrl: "https://opengraph.githubassets.com/1/zidane-ai/zidane"
|
|
191
192
|
} }
|
|
192
193
|
};
|
|
194
|
+
/** The demo person on GitHub: their login, organization and repositories. */
|
|
195
|
+
const DEMO_GITHUB = {
|
|
196
|
+
login: "you",
|
|
197
|
+
orgs: ["zidane-ai"],
|
|
198
|
+
repos: [
|
|
199
|
+
{
|
|
200
|
+
fullName: "zidane-ai/zidane",
|
|
201
|
+
owner: "zidane-ai",
|
|
202
|
+
name: "zidane",
|
|
203
|
+
url: "https://github.com/zidane-ai/zidane",
|
|
204
|
+
private: false,
|
|
205
|
+
description: "An agent harness and the apps around it.",
|
|
206
|
+
updatedAt: DEMO_NOW - HOUR,
|
|
207
|
+
defaultBranch: "main"
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
fullName: "zidane-ai/website",
|
|
211
|
+
owner: "zidane-ai",
|
|
212
|
+
name: "website",
|
|
213
|
+
url: "https://github.com/zidane-ai/website",
|
|
214
|
+
private: true,
|
|
215
|
+
updatedAt: DEMO_NOW - 5 * HOUR,
|
|
216
|
+
defaultBranch: "main"
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
fullName: "you/dotfiles",
|
|
220
|
+
owner: "you",
|
|
221
|
+
name: "dotfiles",
|
|
222
|
+
url: "https://github.com/you/dotfiles",
|
|
223
|
+
private: false,
|
|
224
|
+
updatedAt: DEMO_NOW - 720 * HOUR,
|
|
225
|
+
defaultBranch: "main"
|
|
226
|
+
}
|
|
227
|
+
],
|
|
228
|
+
appCovers: ["zidane-ai"]
|
|
229
|
+
};
|
|
193
230
|
/**
|
|
194
231
|
* Creates a {@link GitHost} held in memory. Switching and starting branches change its current
|
|
195
232
|
* branch; a branch in `held` is refused with its worktree.
|
|
@@ -224,6 +261,8 @@ function createFixtureGitHost(options = {}) {
|
|
|
224
261
|
const repo = options.clone === false ? null : options.clone ?? DEMO_GIT_CLONE;
|
|
225
262
|
const progressListeners = /* @__PURE__ */ new Set();
|
|
226
263
|
let drift = null;
|
|
264
|
+
const githubCreated = [];
|
|
265
|
+
let githubSignedIn = true;
|
|
227
266
|
const later = (value) => latency > 0 ? new Promise((resolve) => setTimeout(() => resolve(value()), latency)) : Promise.resolve(value());
|
|
228
267
|
const switchTo = (branch) => {
|
|
229
268
|
const holder = held.find((h) => h.branch === branch);
|
|
@@ -256,6 +295,13 @@ function createFixtureGitHost(options = {}) {
|
|
|
256
295
|
});
|
|
257
296
|
const listing = (path) => {
|
|
258
297
|
if (!folders) return null;
|
|
298
|
+
if (folders.roots.length === 0 && path === void 0) return {
|
|
299
|
+
roots: [],
|
|
300
|
+
path: "",
|
|
301
|
+
parent: null,
|
|
302
|
+
dirs: [],
|
|
303
|
+
allows: { ...folderAllows }
|
|
304
|
+
};
|
|
259
305
|
const at = path ?? folders.roots[0];
|
|
260
306
|
if (!inRoots(at)) return null;
|
|
261
307
|
const children = tree[at] ?? [];
|
|
@@ -293,6 +339,11 @@ function createFixtureGitHost(options = {}) {
|
|
|
293
339
|
synced,
|
|
294
340
|
cloned,
|
|
295
341
|
serverClones,
|
|
342
|
+
githubCreated,
|
|
343
|
+
signOutGithub: () => {
|
|
344
|
+
githubSignedIn = false;
|
|
345
|
+
},
|
|
346
|
+
...options.githubRepos ? { githubRepos: fixtureGithubRepos(options.githubRepos, githubCreated, () => githubSignedIn, later) } : {},
|
|
296
347
|
...origins ? { originUrl: (cwd) => later(() => origins[cwd] ?? null) } : {},
|
|
297
348
|
subscribeActivity: (sessionId, onChange) => {
|
|
298
349
|
let set = activity.get(sessionId);
|
|
@@ -503,4 +554,87 @@ function createFixtureGitHost(options = {}) {
|
|
|
503
554
|
...options.pickedFolder !== void 0 ? { pickFolder: () => later(() => options.pickedFolder ?? null) } : {}
|
|
504
555
|
};
|
|
505
556
|
}
|
|
506
|
-
|
|
557
|
+
/** The person's GitHub repositories over `github`: creates land in it and in `created`. */
|
|
558
|
+
function fixtureGithubRepos(github, created, signedIn, later) {
|
|
559
|
+
const repos = [...github.repos];
|
|
560
|
+
const same = (a, b) => a.toLowerCase() === b.toLowerCase();
|
|
561
|
+
const owns = (owner) => same(owner, github.login) || github.orgs.some((org) => same(org, owner));
|
|
562
|
+
const out = {
|
|
563
|
+
ok: false,
|
|
564
|
+
error: { kind: "not-signed-in" }
|
|
565
|
+
};
|
|
566
|
+
return {
|
|
567
|
+
status: () => later(() => signedIn() ? {
|
|
568
|
+
available: true,
|
|
569
|
+
login: github.login,
|
|
570
|
+
orgs: [...github.orgs]
|
|
571
|
+
} : {
|
|
572
|
+
available: false,
|
|
573
|
+
error: { kind: "not-signed-in" }
|
|
574
|
+
}),
|
|
575
|
+
search: ({ query, owner, limit } = {}) => later(() => {
|
|
576
|
+
if (!signedIn()) return out;
|
|
577
|
+
const words = (query ?? "").toLowerCase().split(/\s+/).filter(Boolean);
|
|
578
|
+
return {
|
|
579
|
+
ok: true,
|
|
580
|
+
repos: repos.filter((repo) => owner ? same(repo.owner, owner) : owns(repo.owner)).filter((repo) => words.every((word) => repo.name.toLowerCase().includes(word))).sort((a, b) => (b.updatedAt ?? 0) - (a.updatedAt ?? 0)).slice(0, limit ?? 20).map((repo) => ({ ...repo }))
|
|
581
|
+
};
|
|
582
|
+
}),
|
|
583
|
+
check: (owner, name) => later(() => {
|
|
584
|
+
if (!signedIn()) return out;
|
|
585
|
+
if (!isGithubRepoName(name)) return {
|
|
586
|
+
ok: true,
|
|
587
|
+
verdict: "invalid"
|
|
588
|
+
};
|
|
589
|
+
if (!owns(owner)) return {
|
|
590
|
+
ok: true,
|
|
591
|
+
verdict: "forbidden"
|
|
592
|
+
};
|
|
593
|
+
return {
|
|
594
|
+
ok: true,
|
|
595
|
+
verdict: repos.some((repo) => same(repo.fullName, `${owner}/${name}`)) ? "taken" : "available"
|
|
596
|
+
};
|
|
597
|
+
}),
|
|
598
|
+
create: (draft) => later(() => {
|
|
599
|
+
if (!signedIn()) return out;
|
|
600
|
+
if (!isGithubRepoName(draft.name)) return {
|
|
601
|
+
ok: false,
|
|
602
|
+
error: { kind: "invalid-name" }
|
|
603
|
+
};
|
|
604
|
+
if (!owns(draft.owner)) return {
|
|
605
|
+
ok: false,
|
|
606
|
+
error: { kind: "forbidden" }
|
|
607
|
+
};
|
|
608
|
+
const fullName = `${draft.owner}/${draft.name}`;
|
|
609
|
+
if (repos.some((repo) => same(repo.fullName, fullName))) return {
|
|
610
|
+
ok: false,
|
|
611
|
+
error: {
|
|
612
|
+
kind: "name-taken",
|
|
613
|
+
...github.takenDetail ? { detail: github.takenDetail } : {}
|
|
614
|
+
}
|
|
615
|
+
};
|
|
616
|
+
created.push({ ...draft });
|
|
617
|
+
const url = `https://github.com/${fullName}`;
|
|
618
|
+
const newest = Math.max(0, ...repos.map((repo) => repo.updatedAt ?? 0)) + 1;
|
|
619
|
+
repos.push({
|
|
620
|
+
fullName,
|
|
621
|
+
owner: draft.owner,
|
|
622
|
+
name: draft.name,
|
|
623
|
+
url,
|
|
624
|
+
private: draft.private,
|
|
625
|
+
updatedAt: newest,
|
|
626
|
+
defaultBranch: "main"
|
|
627
|
+
});
|
|
628
|
+
const covers = github.appCovers;
|
|
629
|
+
return {
|
|
630
|
+
ok: true,
|
|
631
|
+
url,
|
|
632
|
+
fullName,
|
|
633
|
+
defaultBranch: "main",
|
|
634
|
+
hasApp: covers !== void 0,
|
|
635
|
+
appCovered: covers !== void 0 && covers.some((c) => same(c, draft.owner) || same(c, fullName))
|
|
636
|
+
};
|
|
637
|
+
})
|
|
638
|
+
};
|
|
639
|
+
}
|
|
640
|
+
export { DEMO_GITHUB, DEMO_GIT_BRANCHES, DEMO_GIT_BRANCH_PULL_REQUESTS, DEMO_GIT_CLONE, DEMO_GIT_ENVIRONMENTS, DEMO_GIT_FOLDERS, DEMO_GIT_ORIGINS, DEMO_GIT_PULL_REQUESTS, DEMO_GIT_STATUS, WORST_CASE_BRANCH, WORST_CASE_GIT, WORST_CASE_GIT_EMPTY, createFixtureGitHost };
|
package/dist/index.d.ts
CHANGED
|
@@ -18,6 +18,8 @@ import { HighlightedCode, HighlightedCodeProps } from "./code/HighlightedCode.js
|
|
|
18
18
|
import { CodeHighlighter, CodeHighlighterOptions, HighlightRequest, HighlightResponse, createCodeHighlighter } from "./code/highlighter.js";
|
|
19
19
|
import { defaultShikiTheme, shikiThemeFor } from "./code/shiki-theme.js";
|
|
20
20
|
import { Accordion, AccordionItem, AccordionProps } from "./components/Accordion.js";
|
|
21
|
+
import { Avatar, AvatarProps, AvatarSize } from "./components/Avatar.js";
|
|
22
|
+
import { AvatarStack, AvatarStackPerson, AvatarStackProps } from "./components/AvatarStack.js";
|
|
21
23
|
import { BrandMark, BrandMarkProps, BrandMarkSize, hasBrandMark } from "./components/BrandMark.js";
|
|
22
24
|
import { Breadcrumb, BreadcrumbProps } from "./components/Breadcrumb.js";
|
|
23
25
|
import { BREAKDOWN_MIN_SHARE, BREAKDOWN_SHOW_ALL, Breakdown, BreakdownPart, BreakdownProps, BreakdownSlice, breakdownColor, breakdownSlices, breakdownTop } from "./components/Breakdown.js";
|
|
@@ -122,4 +124,4 @@ import { IconCollection, RuntimeIconsOptions, watchRuntimeIcons } from "./theme/
|
|
|
122
124
|
import { themeCssVars, themeStylesheet } from "./theme/stylesheet.js";
|
|
123
125
|
import { BUILTIN_THEMES, DEFAULT_THEME, SyntaxStyles, SyntaxTokenStyle, Theme, ThemeColors, ThemeDiff, ThemeSelect, ThemeSurfaces, resolveTheme } from "./theme/themes.js";
|
|
124
126
|
import { withoutTransitions } from "./theme/without-transitions.js";
|
|
125
|
-
export { ACCENT_PRESETS, AccentPreset, Accordion, AccordionItem, AccordionProps, AddressBar, AddressBarProps, Align, Anchor, Appearance, ApplyMotionOptions, BRAND_MARKS, BREAKDOWN_MIN_SHARE, BREAKDOWN_SHOW_ALL, BTN_DANGER, BTN_DANGER_CONFIRM, BTN_LG_DANGER, BTN_LG_PRIMARY, BTN_LG_SECONDARY, BTN_LG_SOLID, BTN_PRIMARY, BTN_SECONDARY, BUILTIN_THEMES, BadgeTone, BrandMark, BrandMarkData, BrandMarkPath, BrandMarkProps, BrandMarkSize, Breadcrumb, BreadcrumbProps, Breakdown, BreakdownPart, BreakdownProps, BreakdownSlice, BrowserSignIn, BrowserSignInProps, BrowserSignInState, ButtonVariant, CONFIRM_TITLE_ID, CONTRAST, Callout, CalloutProps, CalloutTone, CalloutVariant, Checkbox, CheckboxProps, Checklist, ChecklistGroup, ChecklistItem, ChecklistProps, ChecklistStatus, ChipColors, ChipKind, ChoiceCardOption, ChoiceCards, ChoiceCardsProps, CodeFrame, CodeFrameProps, CodeHighlightProvider, CodeHighlightProviderProps, CodeHighlighter, CodeHighlighterOptions, CodePanel, CodePanelProps, CodeWrapProvider, CodeWrapProviderProps, Compare, CompareProps, CompareRow, CompareVerdict, ConfirmDialog, ConfirmDialogProps, ConfirmOptions, CopyButton, CopyButtonProps, CopyValue, CopyValueProps, CountBadge, CountBadgeProps, CountTone, Crossfade, CrossfadeProps, CssVarMap, DARK_LUMINANCE_THRESHOLD, DEFAULT_EDITOR_SETTINGS, DEFAULT_LABELS, DEFAULT_PANEL_MS, DEFAULT_THEME, Delta, DeltaProps, DeltaTone, DiffColors, DiffCounts, DiffCountsProps, DismissHandlers, DotColors, EditableTitle, EditableTitleProps, EditorEnvironment, EditorEnvironmentProvider, EditorEnvironmentProviderProps, EditorSettings, EmptyState, EmptyStateProps, ErrorBoundary, ErrorBoundaryProps, ErrorDetails, ErrorDetailsProps, ErrorFallback, ErrorFallbackFrameProps, ErrorFallbackProps, ErrorNote, ErrorNoteProps, ErrorReport, ErrorReportOptions, ErrorReportSink, FADE_KEYS, FIELD_LABEL_CLASS, FLIP_CLIP_ATTR, FLIP_FLIGHT_ATTR, FLIP_KEY_ATTR, FLIP_MOVING_ATTR, FLIP_REGION_ATTR, FLIP_SCROLLER_ATTR, FLIP_STICKY_ATTR, FORM_CARD_CLASS, Facts, FactsProps, FlipLanding, FlipList, FlipListOptions, FlipMode, FlipPlan, FlipSnapshot, FlipSnapshotProps, FloatingSurface, FloatingSurfaceProps, FormCard, FormCardProps, FormSection, FormSectionProps, Grow, GrowPresence, GrowProps, HOVER_MOTION, HeldWidth, HeldWidthProps, HelpTip, HelpTipProps, HighlightRequest, HighlightResponse, Highlighted, HighlightedCode, HighlightedCodeProps, HighlightedProps, HostRow, HostRowProps, HoverCard, HoverCardProps, HoverCardTriggerProps, HowItWorks, HowItWorksProps, HowItWorksStep, INPUT_CLASS, INSTANT, IconButton, IconButtonLook, IconButtonProps, IconButtonRenderProps, IconButtonSize, IconCollection, IconToggle, IconToggleProps, KeyCombo, KeyComboProps, KeyValue, KeyValueItem, KeyValueProps, Keycap, KeycapProps, KeyedStore, LabelOverrides, Labels, LabelsProvider, LabelsProviderProps, LayerOptions, LightboxItem, LoadError, LoadErrorProps, MAX_REAL_SCALE, MENU_FADE_RATIO, MOTIONS, MOTION_NAMES, MatchedTitle, MatchedTitleProps, MediaNav, type MediaNavProps, Menu, MenuNote, MenuNoteProps, MenuProps, MenuRow, MenuRowProps, MenuRowRenderProps, MenuSection, MenuSectionProps, MenuSeparator, MenuSeparatorProps, MenuSwitch, MenuSwitchProps, Meta, MetaChip, MetaChipProps, MetaProps, MotionLevel, MotionName, MotionPrefs, MotionProvider, MotionProviderProps, NavButton, NavButtonProps, NavRow, NavRowProps, Notice, NoticeProps, NoticeTone, NumberFormats, Oklch, OpLine, OpLineProps, Overlay, OverlayProps, PANEL_ROW, PANEL_ROW_HOVER, PUNCTUATION_CODES, PaletteEntry, PaletteIcon, PaletteIconProps, PaletteKeys, PaletteList, PaletteListProps, PaletteNotice, PaletteOption, PaletteOptionProps, PalettePanel, PalettePanelProps, PaletteRow, PaletteRowData, PaletteRowProps, PaletteSection, PanelEmpty, PanelEmptyProps, PanelLoading, PanelLoadingProps, PathDisplay, PathDisplayProvider, PathDisplayProviderProps, PathDisplayScope, PathDisplayScopeProps, Placement, Popover, PopoverProps, PopoverState, PopoverTriggerProps, Presence, type Presence$1 as PresenceHandle, type PresenceOptions, PresenceProps, type PresenceState, PreviewWindow, PreviewWindowProps, Progress, ProgressProps, ProgressTone, REDUCED_FADE, ROW_BUTTON_CLASS, ROW_CHIP_TRIGGER_CLASS, ROW_CLASS, ROW_HOST_CLASS, ROW_TRIGGER_CLASS, Raised, RaisedProps, Rect, ReorderTabState, ReorderTabs, ReorderTabsProps, ResizeDrag, ResizeDragHandleProps, ResizeDragOptions, ResolvedPalette, Restricted, RestrictedProps, Rgb, RollDirection, RollingText, RollingTextProps, RowActionItem, RowActionsMenu, RowActionsMenuProps, RowBadge, RowBadgeProps, RowMenuButton, RowMenuButtonProps, RowText, RowTextProps, RuntimeIconsOptions, SHIMMER_MS, SHOW_MORE_CAP, STAT_ROW_COLUMNS, SearchField, SearchFieldProps, SectionLabel, SectionLabelProps, SegmentSpinner, SegmentSpinnerProps, Segmented, SegmentedOption, SegmentedProps, SegmentedRow, SegmentedRowProps, ShowMore, ShowMoreButton, ShowMoreButtonProps, Side, Skeleton, SkeletonProps, SliderRow, SliderRowProps, SmoothHeight, SmoothHeightProps, SmoothWidth, SmoothWidthProps, SphereShading, Stat, StatProps, StatRow, StatRowProps, StatSize, StatTone, StepActions, StepActionsProps, StepFrame, StepFrameProps, StepStatus, Stepper, StepperProps, StepperStep, Steps, StepsItem, StepsProps, SurfaceLadder, SwapIcon, SwapIconProps, Swatch, SwatchPicker, SwatchPickerProps, Switch, SwitchGlyph, SwitchGlyphProps, SwitchProps, SwitchRow, SwitchRowProps, SyntaxStyles, SyntaxTokenStyle, TEXTAREA_CLASS, TabDragBounds, TabPill, TabPillProps, Table, TableCellValue, TableColumn, TableFilterBar, TableProps, TableSort, Tabs, TabsItem, TabsProps, Theme, ThemeColors, ThemeDiff, ThemeSeed, ThemeSelect, ThemeSurfaces, ThemeThumb, ThemeThumbProps, TitleText, TitleTextProps, ToggleCard, ToggleCardProps, ToggleSwitch, ToggleSwitchProps, Tooltip, type TooltipProps, Tray, TrayProps, UseFlipList, UseFlipListOptions, type UseTooltip, type UseTooltipOptions, WaapiTiming, ZidaneMark, ZidaneMarkProps, ZoomableImage, type ZoomableImageHandle, type ZoomableImageProps, _resetKeyboardLayout, anchorNudge, applyMotionVars, basename, beginLayoutAnimation, breakdownColor, breakdownSlices, breakdownTop, buttonClass, capChroma, checklistIsGrid, clampWidth, compactPath, compareBars, compareCells, configureErrorReports, contrastRatio, contrastToCssVars, createCodeHighlighter, createFlipList, createKeyedStore, cssMotionVars, currentMotionPrefs, currentMotionTransition, currentWithFade, defaultPaletteKeys, defaultShikiTheme, deltaTone, depthToCssVars, derivePalette, ensureContrast, errorMessage, errorStacksShown, extendLabels, fadeTransition, filterByQuery, focusMenuRow, formatColor, formatPathForCwd, handleMenuKeyDown, hasBrandMark, iconButtonClass, inferAppearance, installRendererErrorHandlers, isCompact, isDark, isLayoutAnimating, layoutKeyLabel, luminance, menuTransition, mix, motionTransition, motionVars, moveId, numberFormats, oklch, oklchToRgb, oneOf, paletteToCssVars, paletteVerb, panelMotionVars, parseBoolean, parseColor, placeSurface, presetFor, progressShare, progressTone, pulseLayout, readDurationVar, readExitMs, readMenuExitMs, readMotionMs, readPanelMs, readPersisted, readRollMs, readableOn, reportRendererError, resetReportedErrors, resolveTheme, returnFocus, rgbToOklch, rollCells, scrollRootOf, seedFromTheme, setDecimals, shareDecimals, shikiThemeFor, splitPath, subscribeLayoutAnimating, syncShimmer, themeCssVars, themeStylesheet, tildePath, tildeText, tintedNeutral, toOklch, transitionState, trueMinus, typesStandIn, unitDecimals, useAnchoredPosition, useCadencedValue, useCodeHighlight, useDismiss, useDisplayPath, useDocumentAppearance, useEditorEnvironment, useFlipList, useKeyboardLayout, useKeyedValue, useLabels, useLastCount, useLatest, useLayer, useLightbox, useMenuTransition, useMinuteTick, useMotionLevel, useMotionPrefs, useMotionTransition, useNearViewport, usePersistedState, usePopover, usePresence, useReducedMotion, useResizeDrag, useRowHint, useScrollLock, useShowMore, useSprings, useStaysMounted, useTabDrag, useTabExit, useTooltip, useWithFade, waapiTiming, watchRuntimeIcons, withAlpha, withFade, withLightness, withUnit, withoutTransitions, writePersisted };
|
|
127
|
+
export { ACCENT_PRESETS, AccentPreset, Accordion, AccordionItem, AccordionProps, AddressBar, AddressBarProps, Align, Anchor, Appearance, ApplyMotionOptions, Avatar, AvatarProps, AvatarSize, AvatarStack, AvatarStackPerson, AvatarStackProps, BRAND_MARKS, BREAKDOWN_MIN_SHARE, BREAKDOWN_SHOW_ALL, BTN_DANGER, BTN_DANGER_CONFIRM, BTN_LG_DANGER, BTN_LG_PRIMARY, BTN_LG_SECONDARY, BTN_LG_SOLID, BTN_PRIMARY, BTN_SECONDARY, BUILTIN_THEMES, BadgeTone, BrandMark, BrandMarkData, BrandMarkPath, BrandMarkProps, BrandMarkSize, Breadcrumb, BreadcrumbProps, Breakdown, BreakdownPart, BreakdownProps, BreakdownSlice, BrowserSignIn, BrowserSignInProps, BrowserSignInState, ButtonVariant, CONFIRM_TITLE_ID, CONTRAST, Callout, CalloutProps, CalloutTone, CalloutVariant, Checkbox, CheckboxProps, Checklist, ChecklistGroup, ChecklistItem, ChecklistProps, ChecklistStatus, ChipColors, ChipKind, ChoiceCardOption, ChoiceCards, ChoiceCardsProps, CodeFrame, CodeFrameProps, CodeHighlightProvider, CodeHighlightProviderProps, CodeHighlighter, CodeHighlighterOptions, CodePanel, CodePanelProps, CodeWrapProvider, CodeWrapProviderProps, Compare, CompareProps, CompareRow, CompareVerdict, ConfirmDialog, ConfirmDialogProps, ConfirmOptions, CopyButton, CopyButtonProps, CopyValue, CopyValueProps, CountBadge, CountBadgeProps, CountTone, Crossfade, CrossfadeProps, CssVarMap, DARK_LUMINANCE_THRESHOLD, DEFAULT_EDITOR_SETTINGS, DEFAULT_LABELS, DEFAULT_PANEL_MS, DEFAULT_THEME, Delta, DeltaProps, DeltaTone, DiffColors, DiffCounts, DiffCountsProps, DismissHandlers, DotColors, EditableTitle, EditableTitleProps, EditorEnvironment, EditorEnvironmentProvider, EditorEnvironmentProviderProps, EditorSettings, EmptyState, EmptyStateProps, ErrorBoundary, ErrorBoundaryProps, ErrorDetails, ErrorDetailsProps, ErrorFallback, ErrorFallbackFrameProps, ErrorFallbackProps, ErrorNote, ErrorNoteProps, ErrorReport, ErrorReportOptions, ErrorReportSink, FADE_KEYS, FIELD_LABEL_CLASS, FLIP_CLIP_ATTR, FLIP_FLIGHT_ATTR, FLIP_KEY_ATTR, FLIP_MOVING_ATTR, FLIP_REGION_ATTR, FLIP_SCROLLER_ATTR, FLIP_STICKY_ATTR, FORM_CARD_CLASS, Facts, FactsProps, FlipLanding, FlipList, FlipListOptions, FlipMode, FlipPlan, FlipSnapshot, FlipSnapshotProps, FloatingSurface, FloatingSurfaceProps, FormCard, FormCardProps, FormSection, FormSectionProps, Grow, GrowPresence, GrowProps, HOVER_MOTION, HeldWidth, HeldWidthProps, HelpTip, HelpTipProps, HighlightRequest, HighlightResponse, Highlighted, HighlightedCode, HighlightedCodeProps, HighlightedProps, HostRow, HostRowProps, HoverCard, HoverCardProps, HoverCardTriggerProps, HowItWorks, HowItWorksProps, HowItWorksStep, INPUT_CLASS, INSTANT, IconButton, IconButtonLook, IconButtonProps, IconButtonRenderProps, IconButtonSize, IconCollection, IconToggle, IconToggleProps, KeyCombo, KeyComboProps, KeyValue, KeyValueItem, KeyValueProps, Keycap, KeycapProps, KeyedStore, LabelOverrides, Labels, LabelsProvider, LabelsProviderProps, LayerOptions, LightboxItem, LoadError, LoadErrorProps, MAX_REAL_SCALE, MENU_FADE_RATIO, MOTIONS, MOTION_NAMES, MatchedTitle, MatchedTitleProps, MediaNav, type MediaNavProps, Menu, MenuNote, MenuNoteProps, MenuProps, MenuRow, MenuRowProps, MenuRowRenderProps, MenuSection, MenuSectionProps, MenuSeparator, MenuSeparatorProps, MenuSwitch, MenuSwitchProps, Meta, MetaChip, MetaChipProps, MetaProps, MotionLevel, MotionName, MotionPrefs, MotionProvider, MotionProviderProps, NavButton, NavButtonProps, NavRow, NavRowProps, Notice, NoticeProps, NoticeTone, NumberFormats, Oklch, OpLine, OpLineProps, Overlay, OverlayProps, PANEL_ROW, PANEL_ROW_HOVER, PUNCTUATION_CODES, PaletteEntry, PaletteIcon, PaletteIconProps, PaletteKeys, PaletteList, PaletteListProps, PaletteNotice, PaletteOption, PaletteOptionProps, PalettePanel, PalettePanelProps, PaletteRow, PaletteRowData, PaletteRowProps, PaletteSection, PanelEmpty, PanelEmptyProps, PanelLoading, PanelLoadingProps, PathDisplay, PathDisplayProvider, PathDisplayProviderProps, PathDisplayScope, PathDisplayScopeProps, Placement, Popover, PopoverProps, PopoverState, PopoverTriggerProps, Presence, type Presence$1 as PresenceHandle, type PresenceOptions, PresenceProps, type PresenceState, PreviewWindow, PreviewWindowProps, Progress, ProgressProps, ProgressTone, REDUCED_FADE, ROW_BUTTON_CLASS, ROW_CHIP_TRIGGER_CLASS, ROW_CLASS, ROW_HOST_CLASS, ROW_TRIGGER_CLASS, Raised, RaisedProps, Rect, ReorderTabState, ReorderTabs, ReorderTabsProps, ResizeDrag, ResizeDragHandleProps, ResizeDragOptions, ResolvedPalette, Restricted, RestrictedProps, Rgb, RollDirection, RollingText, RollingTextProps, RowActionItem, RowActionsMenu, RowActionsMenuProps, RowBadge, RowBadgeProps, RowMenuButton, RowMenuButtonProps, RowText, RowTextProps, RuntimeIconsOptions, SHIMMER_MS, SHOW_MORE_CAP, STAT_ROW_COLUMNS, SearchField, SearchFieldProps, SectionLabel, SectionLabelProps, SegmentSpinner, SegmentSpinnerProps, Segmented, SegmentedOption, SegmentedProps, SegmentedRow, SegmentedRowProps, ShowMore, ShowMoreButton, ShowMoreButtonProps, Side, Skeleton, SkeletonProps, SliderRow, SliderRowProps, SmoothHeight, SmoothHeightProps, SmoothWidth, SmoothWidthProps, SphereShading, Stat, StatProps, StatRow, StatRowProps, StatSize, StatTone, StepActions, StepActionsProps, StepFrame, StepFrameProps, StepStatus, Stepper, StepperProps, StepperStep, Steps, StepsItem, StepsProps, SurfaceLadder, SwapIcon, SwapIconProps, Swatch, SwatchPicker, SwatchPickerProps, Switch, SwitchGlyph, SwitchGlyphProps, SwitchProps, SwitchRow, SwitchRowProps, SyntaxStyles, SyntaxTokenStyle, TEXTAREA_CLASS, TabDragBounds, TabPill, TabPillProps, Table, TableCellValue, TableColumn, TableFilterBar, TableProps, TableSort, Tabs, TabsItem, TabsProps, Theme, ThemeColors, ThemeDiff, ThemeSeed, ThemeSelect, ThemeSurfaces, ThemeThumb, ThemeThumbProps, TitleText, TitleTextProps, ToggleCard, ToggleCardProps, ToggleSwitch, ToggleSwitchProps, Tooltip, type TooltipProps, Tray, TrayProps, UseFlipList, UseFlipListOptions, type UseTooltip, type UseTooltipOptions, WaapiTiming, ZidaneMark, ZidaneMarkProps, ZoomableImage, type ZoomableImageHandle, type ZoomableImageProps, _resetKeyboardLayout, anchorNudge, applyMotionVars, basename, beginLayoutAnimation, breakdownColor, breakdownSlices, breakdownTop, buttonClass, capChroma, checklistIsGrid, clampWidth, compactPath, compareBars, compareCells, configureErrorReports, contrastRatio, contrastToCssVars, createCodeHighlighter, createFlipList, createKeyedStore, cssMotionVars, currentMotionPrefs, currentMotionTransition, currentWithFade, defaultPaletteKeys, defaultShikiTheme, deltaTone, depthToCssVars, derivePalette, ensureContrast, errorMessage, errorStacksShown, extendLabels, fadeTransition, filterByQuery, focusMenuRow, formatColor, formatPathForCwd, handleMenuKeyDown, hasBrandMark, iconButtonClass, inferAppearance, installRendererErrorHandlers, isCompact, isDark, isLayoutAnimating, layoutKeyLabel, luminance, menuTransition, mix, motionTransition, motionVars, moveId, numberFormats, oklch, oklchToRgb, oneOf, paletteToCssVars, paletteVerb, panelMotionVars, parseBoolean, parseColor, placeSurface, presetFor, progressShare, progressTone, pulseLayout, readDurationVar, readExitMs, readMenuExitMs, readMotionMs, readPanelMs, readPersisted, readRollMs, readableOn, reportRendererError, resetReportedErrors, resolveTheme, returnFocus, rgbToOklch, rollCells, scrollRootOf, seedFromTheme, setDecimals, shareDecimals, shikiThemeFor, splitPath, subscribeLayoutAnimating, syncShimmer, themeCssVars, themeStylesheet, tildePath, tildeText, tintedNeutral, toOklch, transitionState, trueMinus, typesStandIn, unitDecimals, useAnchoredPosition, useCadencedValue, useCodeHighlight, useDismiss, useDisplayPath, useDocumentAppearance, useEditorEnvironment, useFlipList, useKeyboardLayout, useKeyedValue, useLabels, useLastCount, useLatest, useLayer, useLightbox, useMenuTransition, useMinuteTick, useMotionLevel, useMotionPrefs, useMotionTransition, useNearViewport, usePersistedState, usePopover, usePresence, useReducedMotion, useResizeDrag, useRowHint, useScrollLock, useShowMore, useSprings, useStaysMounted, useTabDrag, useTabExit, useTooltip, useWithFade, waapiTiming, watchRuntimeIcons, withAlpha, withFade, withLightness, withUnit, withoutTransitions, writePersisted };
|
package/dist/index.js
CHANGED
|
@@ -5,6 +5,8 @@ import { HighlightedCode } from "./code/HighlightedCode.js";
|
|
|
5
5
|
import { createCodeHighlighter } from "./code/highlighter.js";
|
|
6
6
|
import { defaultShikiTheme, shikiThemeFor } from "./code/shiki-theme.js";
|
|
7
7
|
import { Accordion } from "./components/Accordion.js";
|
|
8
|
+
import { Avatar } from "./components/Avatar.js";
|
|
9
|
+
import { AvatarStack } from "./components/AvatarStack.js";
|
|
8
10
|
import { BrandMark, hasBrandMark } from "./components/BrandMark.js";
|
|
9
11
|
import { Breadcrumb } from "./components/Breadcrumb.js";
|
|
10
12
|
import { BREAKDOWN_MIN_SHARE, BREAKDOWN_SHOW_ALL, Breakdown, breakdownColor, breakdownSlices, breakdownTop } from "./components/Breakdown.js";
|
|
@@ -109,4 +111,4 @@ import { watchRuntimeIcons } from "./theme/runtime-icons.js";
|
|
|
109
111
|
import { themeCssVars, themeStylesheet } from "./theme/stylesheet.js";
|
|
110
112
|
import { BUILTIN_THEMES, DEFAULT_THEME, resolveTheme } from "./theme/themes.js";
|
|
111
113
|
import { withoutTransitions } from "./theme/without-transitions.js";
|
|
112
|
-
export { ACCENT_PRESETS, Accordion, AddressBar, BRAND_MARKS, BREAKDOWN_MIN_SHARE, BREAKDOWN_SHOW_ALL, BTN_DANGER, BTN_DANGER_CONFIRM, BTN_LG_DANGER, BTN_LG_PRIMARY, BTN_LG_SECONDARY, BTN_LG_SOLID, BTN_PRIMARY, BTN_SECONDARY, BUILTIN_THEMES, BrandMark, Breadcrumb, Breakdown, BrowserSignIn, CONFIRM_TITLE_ID, CONTRAST, Callout, Checkbox, Checklist, ChoiceCards, CodeFrame, CodeHighlightProvider, CodePanel, CodeWrapProvider, Compare, ConfirmDialog, CopyButton, CopyValue, CountBadge, Crossfade, DARK_LUMINANCE_THRESHOLD, DEFAULT_EDITOR_SETTINGS, DEFAULT_LABELS, DEFAULT_PANEL_MS, DEFAULT_THEME, Delta, DiffCounts, EditableTitle, EditorEnvironmentProvider, EmptyState, ErrorBoundary, ErrorDetails, ErrorFallback, ErrorNote, FADE_KEYS, FIELD_LABEL_CLASS, FLIP_CLIP_ATTR, FLIP_FLIGHT_ATTR, FLIP_KEY_ATTR, FLIP_MOVING_ATTR, FLIP_REGION_ATTR, FLIP_SCROLLER_ATTR, FLIP_STICKY_ATTR, FORM_CARD_CLASS, Facts, FlipSnapshot, FloatingSurface, FormCard, FormSection, Grow, GrowPresence, HOVER_MOTION, HeldWidth, HelpTip, Highlighted, HighlightedCode, HostRow, HoverCard, HowItWorks, INPUT_CLASS, INSTANT, IconButton, IconToggle, KeyCombo, KeyValue, Keycap, LabelsProvider, LoadError, MAX_REAL_SCALE, MENU_FADE_RATIO, MOTIONS, MOTION_NAMES, MatchedTitle, MediaNav, Menu, MenuNote, MenuRow, MenuSection, MenuSeparator, MenuSwitch, Meta, MetaChip, MotionProvider, NavButton, NavRow, Notice, OpLine, Overlay, PANEL_ROW, PANEL_ROW_HOVER, PUNCTUATION_CODES, PaletteIcon, PaletteList, PaletteOption, PalettePanel, PaletteRow, PanelEmpty, PanelLoading, PathDisplayProvider, PathDisplayScope, Popover, Presence, PreviewWindow, Progress, REDUCED_FADE, ROW_BUTTON_CLASS, ROW_CHIP_TRIGGER_CLASS, ROW_CLASS, ROW_HOST_CLASS, ROW_TRIGGER_CLASS, Raised, ReorderTabs, Restricted, RollingText, RowActionsMenu, RowBadge, RowMenuButton, RowText, SHIMMER_MS, SHOW_MORE_CAP, STAT_ROW_COLUMNS, SearchField, SectionLabel, SegmentSpinner, Segmented, SegmentedRow, ShowMoreButton, Skeleton, SliderRow, SmoothHeight, SmoothWidth, Stat, StatRow, StepActions, StepFrame, Stepper, Steps, SwapIcon, SwatchPicker, Switch, SwitchGlyph, SwitchRow, TEXTAREA_CLASS, TabPill, Table, Tabs, ThemeThumb, TitleText, ToggleCard, ToggleSwitch, Tooltip, Tray, ZidaneMark, ZoomableImage, _resetKeyboardLayout, anchorNudge, applyMotionVars, basename, beginLayoutAnimation, breakdownColor, breakdownSlices, breakdownTop, buttonClass, capChroma, checklistIsGrid, clampWidth, compactPath, compareBars, compareCells, configureErrorReports, contrastRatio, contrastToCssVars, createCodeHighlighter, createFlipList, createKeyedStore, cssMotionVars, currentMotionPrefs, currentMotionTransition, currentWithFade, defaultPaletteKeys, defaultShikiTheme, deltaTone, depthToCssVars, derivePalette, ensureContrast, errorMessage, errorStacksShown, extendLabels, fadeTransition, filterByQuery, focusMenuRow, formatColor, formatPathForCwd, handleMenuKeyDown, hasBrandMark, iconButtonClass, inferAppearance, installRendererErrorHandlers, isCompact, isDark, isLayoutAnimating, layoutKeyLabel, luminance, menuTransition, mix, motionTransition, motionVars, moveId, numberFormats, oklch, oklchToRgb, oneOf, paletteToCssVars, paletteVerb, panelMotionVars, parseBoolean, parseColor, placeSurface, presetFor, progressShare, progressTone, pulseLayout, readDurationVar, readExitMs, readMenuExitMs, readMotionMs, readPanelMs, readPersisted, readRollMs, readableOn, reportRendererError, resetReportedErrors, resolveTheme, returnFocus, rgbToOklch, rollCells, scrollRootOf, seedFromTheme, setDecimals, shareDecimals, shikiThemeFor, splitPath, subscribeLayoutAnimating, syncShimmer, themeCssVars, themeStylesheet, tildePath, tildeText, tintedNeutral, toOklch, transitionState, trueMinus, typesStandIn, unitDecimals, useAnchoredPosition, useCadencedValue, useCodeHighlight, useDismiss, useDisplayPath, useDocumentAppearance, useEditorEnvironment, useFlipList, useKeyboardLayout, useKeyedValue, useLabels, useLastCount, useLatest, useLayer, useLightbox, useMenuTransition, useMinuteTick, useMotionLevel, useMotionPrefs, useMotionTransition, useNearViewport, usePersistedState, usePopover, usePresence, useReducedMotion, useResizeDrag, useRowHint, useScrollLock, useShowMore, useSprings, useStaysMounted, useTabDrag, useTabExit, useTooltip, useWithFade, waapiTiming, watchRuntimeIcons, withAlpha, withFade, withLightness, withUnit, withoutTransitions, writePersisted };
|
|
114
|
+
export { ACCENT_PRESETS, Accordion, AddressBar, Avatar, AvatarStack, BRAND_MARKS, BREAKDOWN_MIN_SHARE, BREAKDOWN_SHOW_ALL, BTN_DANGER, BTN_DANGER_CONFIRM, BTN_LG_DANGER, BTN_LG_PRIMARY, BTN_LG_SECONDARY, BTN_LG_SOLID, BTN_PRIMARY, BTN_SECONDARY, BUILTIN_THEMES, BrandMark, Breadcrumb, Breakdown, BrowserSignIn, CONFIRM_TITLE_ID, CONTRAST, Callout, Checkbox, Checklist, ChoiceCards, CodeFrame, CodeHighlightProvider, CodePanel, CodeWrapProvider, Compare, ConfirmDialog, CopyButton, CopyValue, CountBadge, Crossfade, DARK_LUMINANCE_THRESHOLD, DEFAULT_EDITOR_SETTINGS, DEFAULT_LABELS, DEFAULT_PANEL_MS, DEFAULT_THEME, Delta, DiffCounts, EditableTitle, EditorEnvironmentProvider, EmptyState, ErrorBoundary, ErrorDetails, ErrorFallback, ErrorNote, FADE_KEYS, FIELD_LABEL_CLASS, FLIP_CLIP_ATTR, FLIP_FLIGHT_ATTR, FLIP_KEY_ATTR, FLIP_MOVING_ATTR, FLIP_REGION_ATTR, FLIP_SCROLLER_ATTR, FLIP_STICKY_ATTR, FORM_CARD_CLASS, Facts, FlipSnapshot, FloatingSurface, FormCard, FormSection, Grow, GrowPresence, HOVER_MOTION, HeldWidth, HelpTip, Highlighted, HighlightedCode, HostRow, HoverCard, HowItWorks, INPUT_CLASS, INSTANT, IconButton, IconToggle, KeyCombo, KeyValue, Keycap, LabelsProvider, LoadError, MAX_REAL_SCALE, MENU_FADE_RATIO, MOTIONS, MOTION_NAMES, MatchedTitle, MediaNav, Menu, MenuNote, MenuRow, MenuSection, MenuSeparator, MenuSwitch, Meta, MetaChip, MotionProvider, NavButton, NavRow, Notice, OpLine, Overlay, PANEL_ROW, PANEL_ROW_HOVER, PUNCTUATION_CODES, PaletteIcon, PaletteList, PaletteOption, PalettePanel, PaletteRow, PanelEmpty, PanelLoading, PathDisplayProvider, PathDisplayScope, Popover, Presence, PreviewWindow, Progress, REDUCED_FADE, ROW_BUTTON_CLASS, ROW_CHIP_TRIGGER_CLASS, ROW_CLASS, ROW_HOST_CLASS, ROW_TRIGGER_CLASS, Raised, ReorderTabs, Restricted, RollingText, RowActionsMenu, RowBadge, RowMenuButton, RowText, SHIMMER_MS, SHOW_MORE_CAP, STAT_ROW_COLUMNS, SearchField, SectionLabel, SegmentSpinner, Segmented, SegmentedRow, ShowMoreButton, Skeleton, SliderRow, SmoothHeight, SmoothWidth, Stat, StatRow, StepActions, StepFrame, Stepper, Steps, SwapIcon, SwatchPicker, Switch, SwitchGlyph, SwitchRow, TEXTAREA_CLASS, TabPill, Table, Tabs, ThemeThumb, TitleText, ToggleCard, ToggleSwitch, Tooltip, Tray, ZidaneMark, ZoomableImage, _resetKeyboardLayout, anchorNudge, applyMotionVars, basename, beginLayoutAnimation, breakdownColor, breakdownSlices, breakdownTop, buttonClass, capChroma, checklistIsGrid, clampWidth, compactPath, compareBars, compareCells, configureErrorReports, contrastRatio, contrastToCssVars, createCodeHighlighter, createFlipList, createKeyedStore, cssMotionVars, currentMotionPrefs, currentMotionTransition, currentWithFade, defaultPaletteKeys, defaultShikiTheme, deltaTone, depthToCssVars, derivePalette, ensureContrast, errorMessage, errorStacksShown, extendLabels, fadeTransition, filterByQuery, focusMenuRow, formatColor, formatPathForCwd, handleMenuKeyDown, hasBrandMark, iconButtonClass, inferAppearance, installRendererErrorHandlers, isCompact, isDark, isLayoutAnimating, layoutKeyLabel, luminance, menuTransition, mix, motionTransition, motionVars, moveId, numberFormats, oklch, oklchToRgb, oneOf, paletteToCssVars, paletteVerb, panelMotionVars, parseBoolean, parseColor, placeSurface, presetFor, progressShare, progressTone, pulseLayout, readDurationVar, readExitMs, readMenuExitMs, readMotionMs, readPanelMs, readPersisted, readRollMs, readableOn, reportRendererError, resetReportedErrors, resolveTheme, returnFocus, rgbToOklch, rollCells, scrollRootOf, seedFromTheme, setDecimals, shareDecimals, shikiThemeFor, splitPath, subscribeLayoutAnimating, syncShimmer, themeCssVars, themeStylesheet, tildePath, tildeText, tintedNeutral, toOklch, transitionState, trueMinus, typesStandIn, unitDecimals, useAnchoredPosition, useCadencedValue, useCodeHighlight, useDismiss, useDisplayPath, useDocumentAppearance, useEditorEnvironment, useFlipList, useKeyboardLayout, useKeyedValue, useLabels, useLastCount, useLatest, useLayer, useLightbox, useMenuTransition, useMinuteTick, useMotionLevel, useMotionPrefs, useMotionTransition, useNearViewport, usePersistedState, usePopover, usePresence, useReducedMotion, useResizeDrag, useRowHint, useScrollLock, useShowMore, useSprings, useStaysMounted, useTabDrag, useTabExit, useTooltip, useWithFade, waapiTiming, watchRuntimeIcons, withAlpha, withFade, withLightness, withUnit, withoutTransitions, writePersisted };
|
package/dist/labels.d.ts
CHANGED
|
@@ -33,6 +33,10 @@ export declare const DEFAULT_LABELS: {
|
|
|
33
33
|
noticeShowLess: string;
|
|
34
34
|
showMoreCount: (count: number) => string;
|
|
35
35
|
showFewer: string;
|
|
36
|
+
avatarMore: (count: number) => string;
|
|
37
|
+
avatarMoreLabel: (count: number) => string;
|
|
38
|
+
avatarOnline: (name: string) => string;
|
|
39
|
+
avatarUnnamed: string;
|
|
36
40
|
help: string;
|
|
37
41
|
helpAbout: (what: string) => string;
|
|
38
42
|
toastRegion: string;
|
package/dist/labels.js
CHANGED
|
@@ -26,6 +26,10 @@ const DEFAULT_LABELS = {
|
|
|
26
26
|
noticeShowLess: "Show less",
|
|
27
27
|
showMoreCount: (count) => `Show ${count.toLocaleString("en-US")} more`,
|
|
28
28
|
showFewer: "Show fewer",
|
|
29
|
+
avatarMore: (count) => `+${count}`,
|
|
30
|
+
avatarMoreLabel: (count) => count === 1 ? "1 more person" : `${count} more people`,
|
|
31
|
+
avatarOnline: (name) => `${name}, online`,
|
|
32
|
+
avatarUnnamed: "Someone",
|
|
29
33
|
help: "Help",
|
|
30
34
|
helpAbout: (what) => `About ${what}`,
|
|
31
35
|
toastRegion: "Notifications",
|
|
@@ -336,6 +336,10 @@ export declare const DEFAULT_ONBOARDING_LABELS: {
|
|
|
336
336
|
noticeShowLess: string;
|
|
337
337
|
showMoreCount: (count: number) => string;
|
|
338
338
|
showFewer: string;
|
|
339
|
+
avatarMore: (count: number) => string;
|
|
340
|
+
avatarMoreLabel: (count: number) => string;
|
|
341
|
+
avatarOnline: (name: string) => string;
|
|
342
|
+
avatarUnnamed: string;
|
|
339
343
|
help: string;
|
|
340
344
|
helpAbout: (what: string) => string;
|
|
341
345
|
toastRegion: string;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Who else is in the draft a composer edits together (docs/MULTIPLAYER.md,
|
|
3
|
+
* Collaborative drafts): a small stack of faces in the composer's toolbar, at
|
|
4
|
+
* the right of its pickers. The owner sees who joined their draft; someone in
|
|
5
|
+
* another person's draft sees its owner and the others. Hovering a face opens
|
|
6
|
+
* their `PersonCard`. Nothing while nobody else is in it, or without the
|
|
7
|
+
* host's `sharing.drafts`.
|
|
8
|
+
*/
|
|
9
|
+
import { CSSProperties } from "react";
|
|
10
|
+
/** Props for {@link DraftPeopleStack}. */
|
|
11
|
+
export interface DraftPeopleStackProps {
|
|
12
|
+
/** The session the composer shows (`null`: a new chat: nothing). */
|
|
13
|
+
sessionId: string | null;
|
|
14
|
+
/** Extra classes on the root. */
|
|
15
|
+
className?: string;
|
|
16
|
+
/** Inline styles on the root. */
|
|
17
|
+
style?: CSSProperties;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Renders the other people in the draft the composer of `sessionId` edits, or nothing.
|
|
21
|
+
*
|
|
22
|
+
* @param props - The {@link DraftPeopleStackProps}.
|
|
23
|
+
*/
|
|
24
|
+
export declare function DraftPeopleStack({ sessionId, className, style }: DraftPeopleStackProps): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { AvatarStack } from "../components/AvatarStack.js";
|
|
2
|
+
import { LabelsProvider } from "../labels.js";
|
|
3
|
+
import { PersonCard } from "./PersonCard.js";
|
|
4
|
+
import { useDraftCollab, useDraftComposer, useDraftRoomView } from "./useDraftCollab.js";
|
|
5
|
+
import { useSessionLabels } from "./useSessionLabels.js";
|
|
6
|
+
import { useCallback, useMemo } from "react";
|
|
7
|
+
import { jsx } from "react/jsx-runtime";
|
|
8
|
+
// src/session/DraftPeopleStack.tsx
|
|
9
|
+
/**
|
|
10
|
+
* Renders the other people in the draft the composer of `sessionId` edits, or nothing.
|
|
11
|
+
*
|
|
12
|
+
* @param props - The {@link DraftPeopleStackProps}.
|
|
13
|
+
*/
|
|
14
|
+
function DraftPeopleStack({ sessionId, className = "", style }) {
|
|
15
|
+
const collab = useDraftCollab();
|
|
16
|
+
const { room } = useDraftComposer(sessionId);
|
|
17
|
+
const view = useDraftRoomView(room);
|
|
18
|
+
const labels = useSessionLabels();
|
|
19
|
+
const self = collab && sessionId ? collab.self(sessionId) : void 0;
|
|
20
|
+
const others = view.status === "open" ? view.people.filter((person) => person.userId !== self) : [];
|
|
21
|
+
const key = others.map((person) => `${person.userId}\u0000${person.name}\u0000${person.avatar ?? ""}`).join("");
|
|
22
|
+
const faces = useMemo(() => others.map((person) => ({
|
|
23
|
+
id: person.userId,
|
|
24
|
+
name: person.name,
|
|
25
|
+
online: true,
|
|
26
|
+
...person.avatar ? { avatar: person.avatar } : {}
|
|
27
|
+
})), [key]);
|
|
28
|
+
const renderCard = useCallback((person) => /* @__PURE__ */ jsx(PersonCard, { person: {
|
|
29
|
+
userId: person.id,
|
|
30
|
+
name: person.name,
|
|
31
|
+
online: true,
|
|
32
|
+
...person.avatar ? { avatar: person.avatar } : {}
|
|
33
|
+
} }), []);
|
|
34
|
+
const more = useMemo(() => ({ avatarMore: labels.peopleMore }), [labels.peopleMore]);
|
|
35
|
+
if (faces.length === 0) return null;
|
|
36
|
+
return /* @__PURE__ */ jsx(LabelsProvider, {
|
|
37
|
+
labels: more,
|
|
38
|
+
children: /* @__PURE__ */ jsx(AvatarStack, {
|
|
39
|
+
people: faces,
|
|
40
|
+
renderCard,
|
|
41
|
+
label: labels.draftPeople(faces.map((face) => face.name.trim() || labels.peopleUnnamed)),
|
|
42
|
+
testId: "draft-people",
|
|
43
|
+
className: `shrink-0 px-1 ${className}`.trimEnd(),
|
|
44
|
+
style
|
|
45
|
+
})
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
export { DraftPeopleStack };
|
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* New project (docs/PROJECTS.md): a dialog on the modal layer, opened with
|
|
3
|
-
* `useNewProject()`, over `SessionHost.projects.create
|
|
4
|
-
*
|
|
5
|
-
* needs a name, with one its name
|
|
6
|
-
* folder dialog shows no folder row.
|
|
7
|
-
* refusal (a folder that is another
|
|
3
|
+
* `useNewProject()`, over `SessionHost.projects.create` (or a saved server's,
|
|
4
|
+
* `SessionHost.projectsOf`). A project has a home folder (picked with the
|
|
5
|
+
* host's folder dialog) or none; with none it needs a name, with one its name
|
|
6
|
+
* defaults to the folder's. A host with no folder dialog shows no folder row.
|
|
7
|
+
* Create waits for the host, and its refusal (a folder that is another
|
|
8
|
+
* project's home) shows in the dialog.
|
|
9
|
+
*
|
|
10
|
+
* On a host whose projects are shared (a server in organization mode), the
|
|
11
|
+
* home is none or a repository (`new-project-parts.tsx`: one of the person's
|
|
12
|
+
* GitHub repositories, a new one made on submit before the project, or a
|
|
13
|
+
* pasted URL), and the access is private, people invited or open to the
|
|
14
|
+
* organization: one `create` writes it all. A repository the server's GitHub
|
|
15
|
+
* App does not cover says so once the project is made.
|
|
8
16
|
*/
|
|
9
17
|
import { Project } from "./headless/host.js";
|
|
10
18
|
import { CSSProperties } from "react";
|
|
@@ -14,6 +22,10 @@ export interface NewProjectDialogProps {
|
|
|
14
22
|
onClose: () => void;
|
|
15
23
|
/** The project was created. */
|
|
16
24
|
onCreated?: (project: Project) => void;
|
|
25
|
+
/** The host it is made on (a saved server's id, `SessionHost.projectsOf`). Absent: the window's own projects. */
|
|
26
|
+
hostId?: string;
|
|
27
|
+
/** Starts with a repository as its home, offered whatever the host (Import repository on a server with no folders). */
|
|
28
|
+
home?: 'repo';
|
|
17
29
|
/** Extra classes on the root. */
|
|
18
30
|
className?: string;
|
|
19
31
|
/** Inline styles on the root. */
|
|
@@ -24,10 +36,18 @@ export interface NewProjectDialogProps {
|
|
|
24
36
|
*
|
|
25
37
|
* @param props - The {@link NewProjectDialogProps}.
|
|
26
38
|
*/
|
|
27
|
-
export declare function NewProjectDialog({ onClose, onCreated, className, style }: NewProjectDialogProps): import("react").JSX.Element | null;
|
|
39
|
+
export declare function NewProjectDialog({ onClose, onCreated, hostId, home: startHome, className, style }: NewProjectDialogProps): import("react").JSX.Element | null;
|
|
40
|
+
/** Where {@link useNewProject} makes the project, and how its dialog starts. */
|
|
41
|
+
export interface NewProjectTarget {
|
|
42
|
+
/** A host this window reaches (a saved server's id, `SessionHost.projectsOf`). Absent: the window's own projects. */
|
|
43
|
+
hostId?: string;
|
|
44
|
+
/** Start with a repository as its home ({@link NewProjectDialogProps.home}). */
|
|
45
|
+
home?: 'repo';
|
|
46
|
+
}
|
|
28
47
|
/**
|
|
29
|
-
* Opens New project on the modal layer. `undefined` without `
|
|
48
|
+
* Opens New project on the modal layer. `undefined` without the host's `projects.create` or a modal layer.
|
|
30
49
|
*
|
|
31
50
|
* @param onCreated - Called with the project once created (open its home).
|
|
51
|
+
* @param target - The host to make it on, and how the dialog starts. Absent: the window's own projects.
|
|
32
52
|
*/
|
|
33
|
-
export declare function useNewProject(onCreated?: (project: Project) => void): (() => void) | undefined;
|
|
53
|
+
export declare function useNewProject(onCreated?: (project: Project) => void, target?: NewProjectTarget): (() => void) | undefined;
|