@qilin-agent/client-ui-primitives 3.1.3 → 3.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.i18n.yaml +38 -38
- package/README.md +8 -2
- package/README.zh.md +8 -2
- package/lib/CommandText.module.css +12 -0
- package/lib/MenuSurface.module.css +1 -1
- package/lib/index.js +964 -362
- package/lib/settings-form/SettingsForm.module.css +53 -0
- package/lib/settings-form/fields.module.css +145 -0
- package/lib/types/CommandText.d.ts +16 -0
- package/lib/types/TerminalBlock.d.ts +2 -0
- package/lib/types/darwin-desktop.d.ts +9 -0
- package/lib/types/icons/index.d.ts +3 -0
- package/lib/types/index.d.ts +9 -1
- package/lib/types/settings-form/SettingsForm.d.ts +46 -0
- package/lib/types/settings-form/fields.d.ts +70 -0
- package/lib/types/settings-form/form-model.d.ts +214 -0
- package/package.json +3 -2
package/lib/index.js
CHANGED
|
@@ -1,44 +1,48 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import clsx from "clsx";
|
|
3
|
-
import css from "./StateDot.module.css";
|
|
4
2
|
import { Fragment as Fragment$1, cloneElement, createContext, createElement, forwardRef, memo, useCallback, useContext, useEffect, useId, useLayoutEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
|
|
5
|
-
import css
|
|
6
|
-
import
|
|
7
|
-
import css$
|
|
8
|
-
import css$
|
|
9
|
-
import
|
|
10
|
-
import css$
|
|
11
|
-
import css$
|
|
12
|
-
import css$
|
|
13
|
-
import css$
|
|
3
|
+
import css from "./settings-form/SettingsForm.module.css";
|
|
4
|
+
import clsx from "clsx";
|
|
5
|
+
import css$1 from "./Tag.module.css";
|
|
6
|
+
import css$2 from "./settings-form/fields.module.css";
|
|
7
|
+
import { createSnapshotStore } from "@qilin-agent/client-store";
|
|
8
|
+
import css$3 from "./CommandText.module.css";
|
|
9
|
+
import css$4 from "./StateDot.module.css";
|
|
10
|
+
import css$5 from "./TextShimmer.module.css";
|
|
11
|
+
import css$6 from "./DisclosureRow.module.css";
|
|
12
|
+
import css$7 from "./Button.module.css";
|
|
13
|
+
import css$8 from "./Pill.module.css";
|
|
14
|
+
import css$9 from "./SegmentedControl.module.css";
|
|
15
|
+
import css$10 from "./Switch.module.css";
|
|
16
|
+
import css$11 from "./Checkbox.module.css";
|
|
17
|
+
import css$12 from "./Input.module.css";
|
|
14
18
|
import { createPortal } from "react-dom";
|
|
15
|
-
import css$
|
|
16
|
-
import css$
|
|
17
|
-
import css$
|
|
18
|
-
import css$
|
|
19
|
-
import css$
|
|
20
|
-
import css$
|
|
21
|
-
import css$
|
|
22
|
-
import css$
|
|
23
|
-
import css$
|
|
19
|
+
import css$13 from "./ShortcutKeys.module.css";
|
|
20
|
+
import css$14 from "./Menu.module.css";
|
|
21
|
+
import css$15 from "./Tooltip.module.css";
|
|
22
|
+
import css$16 from "./HoverCard.module.css";
|
|
23
|
+
import css$17 from "./Modal.module.css";
|
|
24
|
+
import css$18 from "./OnboardingSurface.module.css";
|
|
25
|
+
import css$19 from "./RiskConfirmation.module.css";
|
|
26
|
+
import css$20 from "./ConnectionIndicator.module.css";
|
|
27
|
+
import css$21 from "./FileTypeIcon.module.css";
|
|
24
28
|
import { siAliexpress, siApple, siBaidu, siBilibili, siCsdn, siDuckduckgo, siEbay, siFacebook, siGithub, siGitlab, siGoogle, siInstagram, siJuejin, siMdnwebdocs, siNetflix, siNpm, siPypi, siQq, siQuora, siReddit, siSinaweibo, siSpotify, siStackoverflow, siTaobao, siTelegram, siTiktok, siV2ex, siWechat, siWhatsapp, siWikipedia, siX, siYcombinator, siYoutube, siZhihu } from "simple-icons";
|
|
25
29
|
import { pathPartsOf } from "@qilin-agent/util-workspace-path";
|
|
26
|
-
import css$
|
|
27
|
-
import css$
|
|
30
|
+
import css$22 from "./PathLabel.module.css";
|
|
31
|
+
import css$23 from "./user-text.module.css";
|
|
28
32
|
import markdownCss from "./markdown/MarkdownText.module.css";
|
|
29
|
-
import css$
|
|
30
|
-
import css$
|
|
33
|
+
import css$24 from "./Toast.module.css";
|
|
34
|
+
import css$25 from "./JsonTree.module.css";
|
|
31
35
|
import Anser from "anser";
|
|
32
|
-
import css$
|
|
36
|
+
import css$26 from "./TerminalBlock.module.css";
|
|
33
37
|
import { createCssVariablesTheme, createHighlighterCoreSync } from "shiki/core";
|
|
34
38
|
import { createJavaScriptRegexEngine, defaultJavaScriptRegexConstructor } from "shiki/engine/javascript";
|
|
35
39
|
import langTs from "@shikijs/langs/typescript";
|
|
36
40
|
import langBash from "@shikijs/langs/shellscript";
|
|
37
41
|
import langJson from "@shikijs/langs/json";
|
|
38
|
-
import css$
|
|
42
|
+
import css$27 from "./ReadBlock.module.css";
|
|
39
43
|
import { structuredPatch } from "diff";
|
|
40
|
-
import css$
|
|
41
|
-
import css$
|
|
44
|
+
import css$28 from "./DiffBlock.module.css";
|
|
45
|
+
import css$29 from "./SearchBlock.module.css";
|
|
42
46
|
import { fromMarkdown } from "mdast-util-from-markdown";
|
|
43
47
|
import { gfmFromMarkdown } from "mdast-util-gfm";
|
|
44
48
|
import { mathFromMarkdown } from "mdast-util-math";
|
|
@@ -50,61 +54,70 @@ import { classifyCharacter } from "micromark-util-classify-character";
|
|
|
50
54
|
import { codes, constants, types } from "micromark-util-symbol";
|
|
51
55
|
import { factorySpace } from "micromark-factory-space";
|
|
52
56
|
import { normalizeUri } from "micromark-util-sanitize-uri";
|
|
53
|
-
import css$
|
|
54
|
-
import css$
|
|
57
|
+
import css$30 from "./markdown/CodeBlock.module.css";
|
|
58
|
+
import css$31 from "./markdown/mermaid.module.css";
|
|
55
59
|
import katex from "katex";
|
|
56
|
-
import css$
|
|
57
|
-
import css$
|
|
60
|
+
import css$32 from "./ImageLightbox.module.css";
|
|
61
|
+
import css$33 from "./ImagePreview.module.css";
|
|
58
62
|
import "katex/dist/katex.min.css";
|
|
59
|
-
import css$
|
|
60
|
-
import css$
|
|
61
|
-
import css$
|
|
62
|
-
import css$
|
|
63
|
-
//#region lib/types/
|
|
64
|
-
/**
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
63
|
+
import css$34 from "./WebBlock.module.css";
|
|
64
|
+
import css$35 from "./markdown/JsonBlock.module.css";
|
|
65
|
+
import css$36 from "./MenuGroup.module.css";
|
|
66
|
+
import css$37 from "./MenuSurface.module.css";
|
|
67
|
+
//#region lib/types/settings-form/SettingsForm.js
|
|
68
|
+
/**
|
|
69
|
+
* One plugin's settings form as its page on the Plugins page shows it: the
|
|
70
|
+
* read-only notice when the deployment stores settings read-only, the
|
|
71
|
+
* plugin's controls, and the save that writes every staged edit. The page
|
|
72
|
+
* draws the plugin's title and one-liner itself.
|
|
73
|
+
*
|
|
74
|
+
* Only a save writes. Leaving the page drops every staged edit, so the form
|
|
75
|
+
* discards on unmount and offers no discard control. A form whose namespace
|
|
76
|
+
* the Host stopped serving says so in place of its controls rather than
|
|
77
|
+
* showing fields nothing would accept.
|
|
78
|
+
*/
|
|
75
79
|
/**
|
|
76
|
-
* Render
|
|
77
|
-
* @param props
|
|
78
|
-
* @
|
|
79
|
-
* @param props.className - extra class for layout placement.
|
|
80
|
-
* @returns the dot element (aria-hidden; pair with text for accessibility).
|
|
80
|
+
* Render one plugin's settings form.
|
|
81
|
+
* @param props - the form's copy and state, its controls, and the save and discard actions.
|
|
82
|
+
* @returns the form, or the unavailable line while the namespace is not served.
|
|
81
83
|
*/
|
|
82
|
-
function
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
x,
|
|
94
|
-
y,
|
|
95
|
-
width: "2",
|
|
96
|
-
height: "2",
|
|
97
|
-
style: { animationDelay: `${(index - MATRIX_CELLS.length) * 125}ms` }
|
|
98
|
-
}, `${x}-${y}`))
|
|
84
|
+
function SettingsForm(props) {
|
|
85
|
+
const { state, labels } = props;
|
|
86
|
+
const discard = useRef(props.onDiscard);
|
|
87
|
+
discard.current = props.onDiscard;
|
|
88
|
+
useEffect(() => () => {
|
|
89
|
+
discard.current();
|
|
90
|
+
}, []);
|
|
91
|
+
if (!state.available) return jsx("p", {
|
|
92
|
+
className: css.unavailable,
|
|
93
|
+
role: "status",
|
|
94
|
+
children: labels.unavailable
|
|
99
95
|
});
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
96
|
+
const blocked = !state.dirty || state.invalid || state.saving;
|
|
97
|
+
return jsxs("div", {
|
|
98
|
+
className: css.form,
|
|
99
|
+
children: [
|
|
100
|
+
!state.writable ? jsx("p", {
|
|
101
|
+
className: css.readOnly,
|
|
102
|
+
role: "status",
|
|
103
|
+
children: labels.readOnly
|
|
104
|
+
}) : null,
|
|
105
|
+
props.children,
|
|
106
|
+
jsxs("div", {
|
|
107
|
+
className: css.footer,
|
|
108
|
+
children: [state.failed ? jsx("p", {
|
|
109
|
+
className: css.failed,
|
|
110
|
+
role: "status",
|
|
111
|
+
children: labels.saveFailed
|
|
112
|
+
}) : null, jsx("button", {
|
|
113
|
+
type: "button",
|
|
114
|
+
className: css.save,
|
|
115
|
+
disabled: blocked,
|
|
116
|
+
onClick: props.onSave,
|
|
117
|
+
children: state.saving ? labels.saving : labels.save
|
|
118
|
+
})]
|
|
119
|
+
})
|
|
120
|
+
]
|
|
108
121
|
});
|
|
109
122
|
}
|
|
110
123
|
//#endregion
|
|
@@ -1887,6 +1900,580 @@ const IconPinFillRegular = ({ size = 16, className }) => jsxs("svg", {
|
|
|
1887
1900
|
fill: "currentColor"
|
|
1888
1901
|
})]
|
|
1889
1902
|
});
|
|
1903
|
+
/**
|
|
1904
|
+
* Upstream-named icon surface. Community plugins written against
|
|
1905
|
+
* `@deepseek-ai/dsh-client-ui-primitives` import weight-suffixed names
|
|
1906
|
+
* (`OutlineRegular`/`OutlineMedium`) that this set spells with size
|
|
1907
|
+
* suffixes; each alias binds the same-name glyph in the nearest size. The
|
|
1908
|
+
* two names with no drawn QiLin glyph (Users, WorkspaceTree) port the
|
|
1909
|
+
* upstream artwork verbatim (dsh-context is the current consumer).
|
|
1910
|
+
*/
|
|
1911
|
+
const ICON_REGULAR_STROKE = 1;
|
|
1912
|
+
const IconUsersOutlineRegular = ({ size = 16, className }) => jsxs("svg", {
|
|
1913
|
+
width: size,
|
|
1914
|
+
height: size,
|
|
1915
|
+
className,
|
|
1916
|
+
viewBox: "0 0 16 16",
|
|
1917
|
+
fill: "none",
|
|
1918
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1919
|
+
"aria-hidden": "true",
|
|
1920
|
+
strokeWidth: ICON_REGULAR_STROKE,
|
|
1921
|
+
children: [
|
|
1922
|
+
jsx("path", {
|
|
1923
|
+
d: "M6 8.25C7.51878 8.25 8.75 7.01878 8.75 5.5C8.75 3.98122 7.51878 2.75 6 2.75C4.48122 2.75 3.25 3.98122 3.25 5.5C3.25 7.01878 4.48122 8.25 6 8.25Z",
|
|
1924
|
+
stroke: "currentColor"
|
|
1925
|
+
}),
|
|
1926
|
+
jsx("path", {
|
|
1927
|
+
d: "M1 14.5C1 11.5 3.5 10.25 6 10.25C8.5 10.25 11 11.5 11 14.5",
|
|
1928
|
+
stroke: "currentColor"
|
|
1929
|
+
}),
|
|
1930
|
+
jsx("path", {
|
|
1931
|
+
d: "M10.5 2.9C11.65 3.35 12.45 4.35 12.45 5.5C12.45 6.65 11.65 7.65 10.5 8.1",
|
|
1932
|
+
stroke: "currentColor"
|
|
1933
|
+
}),
|
|
1934
|
+
jsx("path", {
|
|
1935
|
+
d: "M12.4 10.6C13.9 11.3 15 12.6 15 14.5",
|
|
1936
|
+
stroke: "currentColor"
|
|
1937
|
+
})
|
|
1938
|
+
]
|
|
1939
|
+
});
|
|
1940
|
+
const IconWorkspaceTreeOutlineRegular = ({ size = 16, className }) => jsxs("svg", {
|
|
1941
|
+
width: size,
|
|
1942
|
+
height: size,
|
|
1943
|
+
className,
|
|
1944
|
+
viewBox: "0 0 16 16",
|
|
1945
|
+
fill: "none",
|
|
1946
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1947
|
+
"aria-hidden": "true",
|
|
1948
|
+
stroke: "currentColor",
|
|
1949
|
+
strokeLinecap: "round",
|
|
1950
|
+
strokeLinejoin: "round",
|
|
1951
|
+
strokeWidth: ICON_REGULAR_STROKE,
|
|
1952
|
+
children: [jsx("path", { d: "M14 12.05c0 .8-.65 1.45-1.46 1.45H3.46C2.65 13.5 2 12.85 2 12.05v-8.1c0-.8.65-1.45 1.46-1.45h2.4c.49 0 .94.24 1.21.65l.5.73c.27.4.73.65 1.21.65h3.76c.8 0 1.46.65 1.46 1.45v6.02Z" }), jsx("path", { d: "M8.7 8.1v3M11.2 8.1v3" })]
|
|
1953
|
+
});
|
|
1954
|
+
//#endregion
|
|
1955
|
+
//#region lib/types/Tag.js
|
|
1956
|
+
/**
|
|
1957
|
+
* Render a read-only tag.
|
|
1958
|
+
* @param props.tone - which palette to use (default `outline`).
|
|
1959
|
+
* @param props.className - extra class for layout placement.
|
|
1960
|
+
* @param props.children - the localized label, owned by the render site.
|
|
1961
|
+
* @returns the tag element.
|
|
1962
|
+
*/
|
|
1963
|
+
function Tag({ tone = "outline", className, children }) {
|
|
1964
|
+
return jsx("span", {
|
|
1965
|
+
className: clsx(css$1.tag, className),
|
|
1966
|
+
"data-tone": tone,
|
|
1967
|
+
children
|
|
1968
|
+
});
|
|
1969
|
+
}
|
|
1970
|
+
//#endregion
|
|
1971
|
+
//#region lib/types/settings-form/fields.js
|
|
1972
|
+
/**
|
|
1973
|
+
* The controls of a settings form. Each renders one field's label, its staged
|
|
1974
|
+
* text, whether saving would leave an override, and — when one stands — the
|
|
1975
|
+
* reset that stages a clear back to the composition layer. Nothing here
|
|
1976
|
+
* writes: a control reports what the user typed, and the form's save is the
|
|
1977
|
+
* single point where a draft becomes a document mutation.
|
|
1978
|
+
*/
|
|
1979
|
+
/**
|
|
1980
|
+
* A staged value field. `numeric` only hints the keypad: which drafts a field
|
|
1981
|
+
* accepts is decided by its spec, so the control never silently rewrites what
|
|
1982
|
+
* the user typed.
|
|
1983
|
+
* @param props - the field's copy, its staged text, and the edit actions.
|
|
1984
|
+
* @returns the labelled control.
|
|
1985
|
+
*/
|
|
1986
|
+
function SettingsValueField(props) {
|
|
1987
|
+
const [helpOpen, setHelpOpen] = useState(false);
|
|
1988
|
+
const helpId = `${props.id}-help`;
|
|
1989
|
+
const messageId = `${props.id}-message`;
|
|
1990
|
+
const hasMessage = props.invalid || Boolean(props.hint);
|
|
1991
|
+
const description = [hasMessage ? messageId : "", helpOpen ? helpId : ""].filter(Boolean).join(" ");
|
|
1992
|
+
return jsxs("div", {
|
|
1993
|
+
className: css$2.field,
|
|
1994
|
+
children: [
|
|
1995
|
+
jsxs("div", {
|
|
1996
|
+
className: css$2.head,
|
|
1997
|
+
children: [jsxs("div", {
|
|
1998
|
+
className: css$2.labelGroup,
|
|
1999
|
+
children: [jsx("label", {
|
|
2000
|
+
className: css$2.label,
|
|
2001
|
+
htmlFor: props.id,
|
|
2002
|
+
children: props.label
|
|
2003
|
+
}), props.help !== void 0 ? jsx("button", {
|
|
2004
|
+
type: "button",
|
|
2005
|
+
className: css$2.helpButton,
|
|
2006
|
+
"aria-label": props.help.label,
|
|
2007
|
+
"aria-expanded": helpOpen,
|
|
2008
|
+
"aria-controls": helpId,
|
|
2009
|
+
onClick: () => {
|
|
2010
|
+
setHelpOpen(!helpOpen);
|
|
2011
|
+
},
|
|
2012
|
+
children: jsx(IconInfoOutline14, { size: 12 })
|
|
2013
|
+
}) : null]
|
|
2014
|
+
}), props.overridden ? jsxs("span", {
|
|
2015
|
+
className: css$2.badges,
|
|
2016
|
+
children: [jsx(Tag, {
|
|
2017
|
+
tone: "neutral",
|
|
2018
|
+
children: props.overriddenLabel
|
|
2019
|
+
}), jsx("button", {
|
|
2020
|
+
type: "button",
|
|
2021
|
+
className: css$2.reset,
|
|
2022
|
+
disabled: props.disabled,
|
|
2023
|
+
onClick: props.onReset,
|
|
2024
|
+
children: props.resetLabel
|
|
2025
|
+
})]
|
|
2026
|
+
}) : null]
|
|
2027
|
+
}),
|
|
2028
|
+
jsx("input", {
|
|
2029
|
+
id: props.id,
|
|
2030
|
+
className: css$2.input,
|
|
2031
|
+
type: "text",
|
|
2032
|
+
...props.numeric === true ? { inputMode: "numeric" } : {},
|
|
2033
|
+
...props.invalid ? { "aria-invalid": true } : {},
|
|
2034
|
+
"aria-describedby": description || void 0,
|
|
2035
|
+
value: props.text,
|
|
2036
|
+
placeholder: props.placeholder ?? "",
|
|
2037
|
+
disabled: props.disabled,
|
|
2038
|
+
onChange: (event) => {
|
|
2039
|
+
props.onEdit(event.target.value);
|
|
2040
|
+
}
|
|
2041
|
+
}),
|
|
2042
|
+
hasMessage ? jsx("p", {
|
|
2043
|
+
id: messageId,
|
|
2044
|
+
className: props.invalid ? css$2.invalid : css$2.hint,
|
|
2045
|
+
children: props.invalid ? props.invalidLabel : props.hint
|
|
2046
|
+
}) : null,
|
|
2047
|
+
props.help !== void 0 && helpOpen ? jsx("div", {
|
|
2048
|
+
id: helpId,
|
|
2049
|
+
className: css$2.help,
|
|
2050
|
+
role: "region",
|
|
2051
|
+
"aria-label": props.help.label,
|
|
2052
|
+
children: props.help.content
|
|
2053
|
+
}) : null
|
|
2054
|
+
]
|
|
2055
|
+
});
|
|
2056
|
+
}
|
|
2057
|
+
/**
|
|
2058
|
+
* A write-only credential control. The value never rides a response, so the
|
|
2059
|
+
* control reports only whether one is configured and starts blank; a blank
|
|
2060
|
+
* draft writes nothing, which keeps the stored key rather than clearing it.
|
|
2061
|
+
* The control asks browsers not to autofill saved login passwords.
|
|
2062
|
+
* @param props - the field's copy, its staged text, and the configured state.
|
|
2063
|
+
* @returns the labelled control.
|
|
2064
|
+
*/
|
|
2065
|
+
function SettingsSecretField(props) {
|
|
2066
|
+
return jsxs("div", {
|
|
2067
|
+
className: css$2.field,
|
|
2068
|
+
children: [
|
|
2069
|
+
jsxs("div", {
|
|
2070
|
+
className: css$2.head,
|
|
2071
|
+
children: [jsx("label", {
|
|
2072
|
+
className: css$2.label,
|
|
2073
|
+
htmlFor: props.id,
|
|
2074
|
+
children: props.label
|
|
2075
|
+
}), jsx("span", {
|
|
2076
|
+
className: css$2.badges,
|
|
2077
|
+
children: jsx(Tag, {
|
|
2078
|
+
tone: props.configured ? "neutral" : "quiet",
|
|
2079
|
+
children: props.stateLabel
|
|
2080
|
+
})
|
|
2081
|
+
})]
|
|
2082
|
+
}),
|
|
2083
|
+
jsx("input", {
|
|
2084
|
+
id: props.id,
|
|
2085
|
+
className: css$2.input,
|
|
2086
|
+
type: "password",
|
|
2087
|
+
autoComplete: "new-password",
|
|
2088
|
+
value: props.text,
|
|
2089
|
+
disabled: props.disabled,
|
|
2090
|
+
onChange: (event) => {
|
|
2091
|
+
props.onEdit(event.target.value);
|
|
2092
|
+
}
|
|
2093
|
+
}),
|
|
2094
|
+
jsx("p", {
|
|
2095
|
+
className: css$2.hint,
|
|
2096
|
+
children: props.hint
|
|
2097
|
+
})
|
|
2098
|
+
]
|
|
2099
|
+
});
|
|
2100
|
+
}
|
|
2101
|
+
//#endregion
|
|
2102
|
+
//#region lib/types/settings-form/form-model.js
|
|
2103
|
+
/**
|
|
2104
|
+
* The staged form model behind a plugin's settings page.
|
|
2105
|
+
*
|
|
2106
|
+
* A card stages what the user types and writes it only when they save. Each
|
|
2107
|
+
* settings write is a durable, revision-fenced document mutation, so a control
|
|
2108
|
+
* that committed as it settled turned one edit into a write the user never
|
|
2109
|
+
* asked for and could not preview; staged text makes what is on screen exactly
|
|
2110
|
+
* what a save would store.
|
|
2111
|
+
*
|
|
2112
|
+
* A field shows its effective value — the user layer over the composition
|
|
2113
|
+
* layer over the schema default — and whether the user layer carries it. That
|
|
2114
|
+
* presence, not a value comparison, is what marks a field overridden: an
|
|
2115
|
+
* override equal to the composition default is still an override.
|
|
2116
|
+
*/
|
|
2117
|
+
/**
|
|
2118
|
+
* A whole-number field. An empty draft clears the field; any other draft that
|
|
2119
|
+
* is not a finite number blocks the save.
|
|
2120
|
+
* @param field - field name inside the namespace section.
|
|
2121
|
+
* @returns the field's conversion spec.
|
|
2122
|
+
*/
|
|
2123
|
+
function settingsNumberField(field) {
|
|
2124
|
+
return {
|
|
2125
|
+
field,
|
|
2126
|
+
format: (value) => typeof value === "number" ? String(value) : "",
|
|
2127
|
+
parse: (text) => {
|
|
2128
|
+
const trimmed = text.trim();
|
|
2129
|
+
if (trimmed === "") return { kind: "clear" };
|
|
2130
|
+
const parsed = Number(trimmed);
|
|
2131
|
+
return Number.isFinite(parsed) ? {
|
|
2132
|
+
kind: "set",
|
|
2133
|
+
value: parsed
|
|
2134
|
+
} : void 0;
|
|
2135
|
+
}
|
|
2136
|
+
};
|
|
2137
|
+
}
|
|
2138
|
+
/**
|
|
2139
|
+
* A free-text field. An empty draft clears the field, so emptying the control
|
|
2140
|
+
* and saving is the same gesture as resetting it.
|
|
2141
|
+
* @param field - field name inside the namespace section.
|
|
2142
|
+
* @returns the field's conversion spec.
|
|
2143
|
+
*/
|
|
2144
|
+
function settingsTextField(field) {
|
|
2145
|
+
return {
|
|
2146
|
+
field,
|
|
2147
|
+
format: (value) => typeof value === "string" ? value : "",
|
|
2148
|
+
parse: (text) => {
|
|
2149
|
+
const trimmed = text.trim();
|
|
2150
|
+
return trimmed === "" ? { kind: "clear" } : {
|
|
2151
|
+
kind: "set",
|
|
2152
|
+
value: trimmed
|
|
2153
|
+
};
|
|
2154
|
+
}
|
|
2155
|
+
};
|
|
2156
|
+
}
|
|
2157
|
+
/**
|
|
2158
|
+
* Stages one card's edits over one settings namespace and writes them on save.
|
|
2159
|
+
*
|
|
2160
|
+
* The form publishes through a snapshot store because slot components read
|
|
2161
|
+
* through a snapshot selector, while both the scope and the local drafts
|
|
2162
|
+
* change underneath; every projection is rebuilt from the two together.
|
|
2163
|
+
*/
|
|
2164
|
+
var SettingsFormModel = class {
|
|
2165
|
+
scope;
|
|
2166
|
+
specs;
|
|
2167
|
+
secretSpecs;
|
|
2168
|
+
staged = /* @__PURE__ */ new Map();
|
|
2169
|
+
listeners = /* @__PURE__ */ new Set();
|
|
2170
|
+
baseline;
|
|
2171
|
+
unsubscribe;
|
|
2172
|
+
saving = false;
|
|
2173
|
+
failed = false;
|
|
2174
|
+
/**
|
|
2175
|
+
* @param scope - the shared configuration form for this card's namespace.
|
|
2176
|
+
* @param specs - the section fields this card edits.
|
|
2177
|
+
* @param secrets - the card's write-only controls, written outside the section.
|
|
2178
|
+
*/
|
|
2179
|
+
constructor(scope, specs, secrets = []) {
|
|
2180
|
+
this.scope = scope;
|
|
2181
|
+
this.specs = new Map(specs.map((spec) => [spec.field, spec]));
|
|
2182
|
+
this.secretSpecs = new Map(secrets.map((spec) => [spec.field, spec]));
|
|
2183
|
+
this.unsubscribe = scope.subscribe(() => {
|
|
2184
|
+
this.publish();
|
|
2185
|
+
});
|
|
2186
|
+
}
|
|
2187
|
+
/**
|
|
2188
|
+
* Publish a projection of this form, rebuilt whenever the scope or a draft changes.
|
|
2189
|
+
* @param project - build the card's state from the form's current reads.
|
|
2190
|
+
* @returns the store the card's component reads through its bound selector.
|
|
2191
|
+
*/
|
|
2192
|
+
bind(project) {
|
|
2193
|
+
const store = createSnapshotStore(project());
|
|
2194
|
+
this.listeners.add(() => {
|
|
2195
|
+
store.set(project());
|
|
2196
|
+
});
|
|
2197
|
+
return store;
|
|
2198
|
+
}
|
|
2199
|
+
/**
|
|
2200
|
+
* Read the card-level state: what the Host serves, and what a save would do.
|
|
2201
|
+
* @returns the form state every card shares.
|
|
2202
|
+
*/
|
|
2203
|
+
shell() {
|
|
2204
|
+
const snapshot = this.scope.getSnapshot();
|
|
2205
|
+
const plan = this.plan();
|
|
2206
|
+
return {
|
|
2207
|
+
available: snapshot.status === "ready",
|
|
2208
|
+
writable: snapshot.writable,
|
|
2209
|
+
dirty: plan.length > 0,
|
|
2210
|
+
invalid: plan.some((item) => item.run === void 0 && item.op === void 0),
|
|
2211
|
+
saving: this.saving,
|
|
2212
|
+
failed: this.failed
|
|
2213
|
+
};
|
|
2214
|
+
}
|
|
2215
|
+
/**
|
|
2216
|
+
* Read one control's state.
|
|
2217
|
+
* @param field - field name of a section field or of a write-only control.
|
|
2218
|
+
* @returns the draft text, whether a save would leave an override, and whether it is invalid.
|
|
2219
|
+
*/
|
|
2220
|
+
field(field) {
|
|
2221
|
+
const staged = this.staged.get(field);
|
|
2222
|
+
if (this.secretSpecs.has(field)) return {
|
|
2223
|
+
text: staged?.text ?? "",
|
|
2224
|
+
overridden: false,
|
|
2225
|
+
invalid: false
|
|
2226
|
+
};
|
|
2227
|
+
const spec = this.spec(field);
|
|
2228
|
+
if (staged === void 0) return {
|
|
2229
|
+
text: spec.format(this.sectionValue(field)),
|
|
2230
|
+
overridden: this.stored(field),
|
|
2231
|
+
invalid: false
|
|
2232
|
+
};
|
|
2233
|
+
const write = staged.clear ? { kind: "clear" } : spec.parse(staged.text);
|
|
2234
|
+
return {
|
|
2235
|
+
text: staged.text,
|
|
2236
|
+
overridden: write?.kind === "set",
|
|
2237
|
+
invalid: write === void 0
|
|
2238
|
+
};
|
|
2239
|
+
}
|
|
2240
|
+
/**
|
|
2241
|
+
* Build the edit, reset, save, and discard actions bound to this form.
|
|
2242
|
+
* @returns the actions a card's slot entry injects.
|
|
2243
|
+
*/
|
|
2244
|
+
actions() {
|
|
2245
|
+
return {
|
|
2246
|
+
edit: (field, text) => {
|
|
2247
|
+
this.stage(field, {
|
|
2248
|
+
text,
|
|
2249
|
+
clear: false
|
|
2250
|
+
});
|
|
2251
|
+
},
|
|
2252
|
+
resetField: (field) => {
|
|
2253
|
+
this.stage(field, {
|
|
2254
|
+
text: this.spec(field).format(this.baseValue(field)),
|
|
2255
|
+
clear: true
|
|
2256
|
+
});
|
|
2257
|
+
},
|
|
2258
|
+
save: () => {
|
|
2259
|
+
this.save();
|
|
2260
|
+
},
|
|
2261
|
+
discard: () => {
|
|
2262
|
+
if (this.staged.size === 0 && !this.failed) return;
|
|
2263
|
+
this.staged.clear();
|
|
2264
|
+
this.baseline = void 0;
|
|
2265
|
+
this.failed = false;
|
|
2266
|
+
this.publish();
|
|
2267
|
+
}
|
|
2268
|
+
};
|
|
2269
|
+
}
|
|
2270
|
+
/**
|
|
2271
|
+
* Write every staged edit, then re-seed from what the Host accepted.
|
|
2272
|
+
*
|
|
2273
|
+
* The Host is the only authority on whether a value was accepted — its
|
|
2274
|
+
* validators own the constraints no schema can express — so the outcome is
|
|
2275
|
+
* read back from the section rather than predicted here. A save that did not
|
|
2276
|
+
* land keeps its drafts, so the user can correct them instead of retyping.
|
|
2277
|
+
* @returns settlement after every write and the read-back.
|
|
2278
|
+
*/
|
|
2279
|
+
async save() {
|
|
2280
|
+
const plan = this.plan();
|
|
2281
|
+
if (!plan.length || this.saving || !this.scope.getSnapshot().writable || plan.some((item) => item.run === void 0 && item.op === void 0)) return;
|
|
2282
|
+
this.saving = true;
|
|
2283
|
+
this.failed = false;
|
|
2284
|
+
this.publish();
|
|
2285
|
+
try {
|
|
2286
|
+
const ops = plan.flatMap((item) => item.op === void 0 ? [] : [item.op]);
|
|
2287
|
+
let landed = !ops.length || await this.scope.mutate(ops, this.baseline?.revision);
|
|
2288
|
+
if (!landed) {
|
|
2289
|
+
this.failed = true;
|
|
2290
|
+
return;
|
|
2291
|
+
}
|
|
2292
|
+
for (const item of plan) if (item.run) landed = await item.run() && landed;
|
|
2293
|
+
if (landed) {
|
|
2294
|
+
this.staged.clear();
|
|
2295
|
+
this.baseline = void 0;
|
|
2296
|
+
}
|
|
2297
|
+
this.failed = !landed;
|
|
2298
|
+
} catch (_error) {
|
|
2299
|
+
this.failed = true;
|
|
2300
|
+
} finally {
|
|
2301
|
+
this.saving = false;
|
|
2302
|
+
this.publish();
|
|
2303
|
+
}
|
|
2304
|
+
}
|
|
2305
|
+
/** Release the form's accepted-value subscription. */
|
|
2306
|
+
dispose() {
|
|
2307
|
+
this.unsubscribe();
|
|
2308
|
+
this.listeners.clear();
|
|
2309
|
+
}
|
|
2310
|
+
/**
|
|
2311
|
+
* Every staged edit a save would write. An entry whose draft is not a value
|
|
2312
|
+
* its field accepts carries no write: the form is still dirty, and the save
|
|
2313
|
+
* refuses rather than dropping the edit.
|
|
2314
|
+
* @returns the planned writes, in the order the fields were staged.
|
|
2315
|
+
*/
|
|
2316
|
+
plan() {
|
|
2317
|
+
const plan = [];
|
|
2318
|
+
for (const [field, staged] of this.staged) {
|
|
2319
|
+
const secret = this.secretSpecs.get(field);
|
|
2320
|
+
if (secret !== void 0) {
|
|
2321
|
+
const value = staged.text.trim();
|
|
2322
|
+
if (value !== "") plan.push({
|
|
2323
|
+
field,
|
|
2324
|
+
run: () => secret.write(value)
|
|
2325
|
+
});
|
|
2326
|
+
continue;
|
|
2327
|
+
}
|
|
2328
|
+
const spec = this.spec(field);
|
|
2329
|
+
if (staged.clear) {
|
|
2330
|
+
if (this.stored(field)) plan.push({
|
|
2331
|
+
field,
|
|
2332
|
+
op: {
|
|
2333
|
+
op: "unset",
|
|
2334
|
+
path: [field]
|
|
2335
|
+
}
|
|
2336
|
+
});
|
|
2337
|
+
continue;
|
|
2338
|
+
}
|
|
2339
|
+
if (staged.text === spec.format(this.sectionValue(field))) continue;
|
|
2340
|
+
const write = spec.parse(staged.text);
|
|
2341
|
+
if (write === void 0) plan.push({ field });
|
|
2342
|
+
else if (write.kind === "clear") plan.push({
|
|
2343
|
+
field,
|
|
2344
|
+
op: {
|
|
2345
|
+
op: "unset",
|
|
2346
|
+
path: [field]
|
|
2347
|
+
}
|
|
2348
|
+
});
|
|
2349
|
+
else plan.push({
|
|
2350
|
+
field,
|
|
2351
|
+
op: {
|
|
2352
|
+
op: "set",
|
|
2353
|
+
path: [field],
|
|
2354
|
+
value: write.value
|
|
2355
|
+
}
|
|
2356
|
+
});
|
|
2357
|
+
}
|
|
2358
|
+
return plan;
|
|
2359
|
+
}
|
|
2360
|
+
stage(field, edit) {
|
|
2361
|
+
this.baseline ??= this.scope.getSnapshot();
|
|
2362
|
+
this.staged.set(field, edit);
|
|
2363
|
+
this.failed = false;
|
|
2364
|
+
this.publish();
|
|
2365
|
+
}
|
|
2366
|
+
spec(field) {
|
|
2367
|
+
const spec = this.specs.get(field);
|
|
2368
|
+
if (spec === void 0) throw new Error(`plugin card has no field ${field}`);
|
|
2369
|
+
return spec;
|
|
2370
|
+
}
|
|
2371
|
+
snapshotOf() {
|
|
2372
|
+
return this.scope.getSnapshot();
|
|
2373
|
+
}
|
|
2374
|
+
sectionValue(field) {
|
|
2375
|
+
return this.snapshotOf().value?.[field];
|
|
2376
|
+
}
|
|
2377
|
+
baseValue(field) {
|
|
2378
|
+
return this.snapshotOf().base?.[field];
|
|
2379
|
+
}
|
|
2380
|
+
userLayer() {
|
|
2381
|
+
return this.snapshotOf().user;
|
|
2382
|
+
}
|
|
2383
|
+
stored(field) {
|
|
2384
|
+
const user = this.userLayer();
|
|
2385
|
+
return user !== void 0 && Object.hasOwn(user, field);
|
|
2386
|
+
}
|
|
2387
|
+
publish() {
|
|
2388
|
+
for (const listener of this.listeners) listener();
|
|
2389
|
+
}
|
|
2390
|
+
};
|
|
2391
|
+
//#endregion
|
|
2392
|
+
//#region lib/types/CommandText.js
|
|
2393
|
+
/** Selectable command text with keyboard access while horizontally overflowing. */
|
|
2394
|
+
/**
|
|
2395
|
+
* Render command text without adding Tab stops for content that fits.
|
|
2396
|
+
* @param props - Text, localized scrollport name, and owner styling.
|
|
2397
|
+
* @returns A horizontal text scrollport, named and keyboard-focusable only when overflowing.
|
|
2398
|
+
*/
|
|
2399
|
+
function CommandText({ text, label, className }) {
|
|
2400
|
+
const ref = useRef(null);
|
|
2401
|
+
const [overflow, setOverflow] = useState(false);
|
|
2402
|
+
useLayoutEffect(() => {
|
|
2403
|
+
const element = ref.current;
|
|
2404
|
+
/* v8 ignore next -- the span is rendered unconditionally. */
|
|
2405
|
+
if (element === null) return void 0;
|
|
2406
|
+
const measure = () => {
|
|
2407
|
+
setOverflow(element.scrollWidth > element.clientWidth);
|
|
2408
|
+
};
|
|
2409
|
+
measure();
|
|
2410
|
+
const observer = typeof ResizeObserver === "undefined" ? void 0 : new ResizeObserver(measure);
|
|
2411
|
+
observer?.observe(element);
|
|
2412
|
+
const fonts = "fonts" in element.ownerDocument ? element.ownerDocument.fonts : void 0;
|
|
2413
|
+
fonts?.addEventListener("loadingdone", measure);
|
|
2414
|
+
return () => {
|
|
2415
|
+
observer?.disconnect();
|
|
2416
|
+
fonts?.removeEventListener("loadingdone", measure);
|
|
2417
|
+
};
|
|
2418
|
+
}, [text]);
|
|
2419
|
+
return jsx("span", {
|
|
2420
|
+
ref,
|
|
2421
|
+
className: clsx(css$3.text, className),
|
|
2422
|
+
"data-command-text": true,
|
|
2423
|
+
tabIndex: overflow ? 0 : void 0,
|
|
2424
|
+
role: overflow ? "group" : void 0,
|
|
2425
|
+
"aria-label": overflow ? label : void 0,
|
|
2426
|
+
children: text
|
|
2427
|
+
});
|
|
2428
|
+
}
|
|
2429
|
+
//#endregion
|
|
2430
|
+
//#region lib/types/StateDot.js
|
|
2431
|
+
/** Outer 3x3 matrix cells (2px pixels on a 10px grid), clockwise from top-left. */
|
|
2432
|
+
const MATRIX_CELLS = [
|
|
2433
|
+
[0, 0],
|
|
2434
|
+
[4, 0],
|
|
2435
|
+
[8, 0],
|
|
2436
|
+
[8, 4],
|
|
2437
|
+
[8, 8],
|
|
2438
|
+
[4, 8],
|
|
2439
|
+
[0, 8],
|
|
2440
|
+
[0, 4]
|
|
2441
|
+
];
|
|
2442
|
+
/**
|
|
2443
|
+
* Render a state dot.
|
|
2444
|
+
* @param props.state - which of `done`, `warning`, `ongoing`, `error`, or `idle` to show.
|
|
2445
|
+
* @param props.size - outer diameter in px (default 10, the figma size).
|
|
2446
|
+
* @param props.className - extra class for layout placement.
|
|
2447
|
+
* @returns the dot element (aria-hidden; pair with text for accessibility).
|
|
2448
|
+
*/
|
|
2449
|
+
function StateDot({ state, size = 10, className }) {
|
|
2450
|
+
if (state === "ongoing") return jsx("svg", {
|
|
2451
|
+
className: clsx(css$4.matrix, className),
|
|
2452
|
+
"data-state": "ongoing",
|
|
2453
|
+
width: size,
|
|
2454
|
+
height: size,
|
|
2455
|
+
viewBox: "0 0 10 10",
|
|
2456
|
+
shapeRendering: "crispEdges",
|
|
2457
|
+
"aria-hidden": "true",
|
|
2458
|
+
children: MATRIX_CELLS.map(([x, y], index) => jsx("rect", {
|
|
2459
|
+
className: css$4.cell,
|
|
2460
|
+
x,
|
|
2461
|
+
y,
|
|
2462
|
+
width: "2",
|
|
2463
|
+
height: "2",
|
|
2464
|
+
style: { animationDelay: `${(index - MATRIX_CELLS.length) * 125}ms` }
|
|
2465
|
+
}, `${x}-${y}`))
|
|
2466
|
+
});
|
|
2467
|
+
return jsx("span", {
|
|
2468
|
+
className: clsx(css$4.dot, className),
|
|
2469
|
+
"data-state": state,
|
|
2470
|
+
style: {
|
|
2471
|
+
width: size,
|
|
2472
|
+
height: size
|
|
2473
|
+
},
|
|
2474
|
+
"aria-hidden": "true"
|
|
2475
|
+
});
|
|
2476
|
+
}
|
|
1890
2477
|
//#endregion
|
|
1891
2478
|
//#region lib/types/TextShimmer.js
|
|
1892
2479
|
/** Text activity animation shared by a row and its nested text fragments. */
|
|
@@ -1894,7 +2481,7 @@ const DecorativeCopy = createContext(void 0);
|
|
|
1894
2481
|
function TextContent({ children, className }) {
|
|
1895
2482
|
const generated = useContext(DecorativeCopy) === true && typeof children === "string";
|
|
1896
2483
|
return jsx("span", {
|
|
1897
|
-
className: clsx(css$
|
|
2484
|
+
className: clsx(css$5.text, className),
|
|
1898
2485
|
"data-shimmer-text": generated ? children : void 0,
|
|
1899
2486
|
children: generated ? null : children
|
|
1900
2487
|
});
|
|
@@ -1914,24 +2501,24 @@ const TextShimmer = memo(function TextShimmer({ children, active = false, classN
|
|
|
1914
2501
|
});
|
|
1915
2502
|
const content = typeof children === "string" ? jsx(TextContent, { children }) : children;
|
|
1916
2503
|
return jsxs("span", {
|
|
1917
|
-
className: clsx(css$
|
|
2504
|
+
className: clsx(css$5.root, className),
|
|
1918
2505
|
"data-shimmer": active || void 0,
|
|
1919
2506
|
children: [jsx(DecorativeCopy.Provider, {
|
|
1920
2507
|
value: false,
|
|
1921
2508
|
children: jsx("span", {
|
|
1922
|
-
className: clsx(css$
|
|
2509
|
+
className: clsx(css$5.content, contentClassName),
|
|
1923
2510
|
children: content
|
|
1924
2511
|
})
|
|
1925
2512
|
}), active && jsx("span", {
|
|
1926
|
-
className: css$
|
|
2513
|
+
className: css$5.decoration,
|
|
1927
2514
|
"aria-hidden": "true",
|
|
1928
2515
|
inert: "",
|
|
1929
2516
|
children: jsx("span", {
|
|
1930
|
-
className: css$
|
|
2517
|
+
className: css$5.sweep,
|
|
1931
2518
|
children: jsx(DecorativeCopy.Provider, {
|
|
1932
2519
|
value: true,
|
|
1933
2520
|
children: jsx("span", {
|
|
1934
|
-
className: clsx(css$
|
|
2521
|
+
className: clsx(css$5.content, css$5.highlight, contentClassName),
|
|
1935
2522
|
children: content
|
|
1936
2523
|
})
|
|
1937
2524
|
})
|
|
@@ -1959,15 +2546,15 @@ const DisclosureRow = memo(function DisclosureRow({ icon, title, open, expandabl
|
|
|
1959
2546
|
onToggle();
|
|
1960
2547
|
};
|
|
1961
2548
|
const collapsedLeading = previewChevron ? jsxs(Fragment, { children: [jsx("span", {
|
|
1962
|
-
className: css$
|
|
2549
|
+
className: css$6.iconIdle,
|
|
1963
2550
|
children: icon
|
|
1964
|
-
}), jsx(IconChevronDownOutline14, { className: clsx(chevronClassName, css$
|
|
2551
|
+
}), jsx(IconChevronDownOutline14, { className: clsx(chevronClassName, css$6.chevronHover) })] }) : icon;
|
|
1965
2552
|
const leading = open ? jsx(IconChevronUpOutline14, { className: chevronClassName }) : collapsedLeading;
|
|
1966
2553
|
return jsxs("div", {
|
|
1967
|
-
className: clsx(css$
|
|
2554
|
+
className: clsx(css$6.root, className),
|
|
1968
2555
|
"data-open": open || void 0,
|
|
1969
2556
|
children: [jsxs("div", {
|
|
1970
|
-
className: clsx(css$
|
|
2557
|
+
className: clsx(css$6.row, rowClassName),
|
|
1971
2558
|
"data-disclosure-row": true,
|
|
1972
2559
|
"data-expandable": rowExpands || void 0,
|
|
1973
2560
|
role: rowExpands ? "button" : void 0,
|
|
@@ -1977,19 +2564,19 @@ const DisclosureRow = memo(function DisclosureRow({ icon, title, open, expandabl
|
|
|
1977
2564
|
onKeyDown: rowExpands ? toggleFromKeyboard : void 0,
|
|
1978
2565
|
children: [expandable && !rowExpands ? jsx("button", {
|
|
1979
2566
|
type: "button",
|
|
1980
|
-
className: clsx(css$
|
|
2567
|
+
className: clsx(css$6.leading, leadingClassName),
|
|
1981
2568
|
"aria-expanded": open,
|
|
1982
2569
|
onClick: toggleFromLeading,
|
|
1983
2570
|
children: leading
|
|
1984
2571
|
}) : jsx("span", {
|
|
1985
|
-
className: clsx(css$
|
|
2572
|
+
className: clsx(css$6.leading, leadingClassName),
|
|
1986
2573
|
children: leading
|
|
1987
2574
|
}), jsxs(TextShimmer, {
|
|
1988
2575
|
active: running,
|
|
1989
2576
|
className: contentClassName,
|
|
1990
2577
|
contentClassName: contentLayoutClassName,
|
|
1991
2578
|
children: [jsx(TextShimmer, {
|
|
1992
|
-
className: clsx(css$
|
|
2579
|
+
className: clsx(css$6.title, titleClassName),
|
|
1993
2580
|
children: title
|
|
1994
2581
|
}), (keepContentWhenOpen || !open) && collapsedContent]
|
|
1995
2582
|
})]
|
|
@@ -2008,10 +2595,10 @@ const DisclosureRow = memo(function DisclosureRow({ icon, title, open, expandabl
|
|
|
2008
2595
|
function Button({ variant = "ghost", size = "md", icon, className, children, ...rest }) {
|
|
2009
2596
|
return jsxs("button", {
|
|
2010
2597
|
type: "button",
|
|
2011
|
-
className: clsx(css$
|
|
2598
|
+
className: clsx(css$7.button, css$7[variant], css$7[size], className),
|
|
2012
2599
|
...rest,
|
|
2013
2600
|
children: [icon != null && jsx("span", {
|
|
2014
|
-
className: css$
|
|
2601
|
+
className: css$7.icon,
|
|
2015
2602
|
children: icon
|
|
2016
2603
|
}), children]
|
|
2017
2604
|
});
|
|
@@ -2026,12 +2613,12 @@ function Button({ variant = "ghost", size = "md", icon, className, children, ...
|
|
|
2026
2613
|
*/
|
|
2027
2614
|
function Pill({ active = false, className, children, onClick, ...rest }) {
|
|
2028
2615
|
if (!onClick) return jsx("span", {
|
|
2029
|
-
className: clsx(css$
|
|
2616
|
+
className: clsx(css$8.pill, active && css$8.active, className),
|
|
2030
2617
|
children
|
|
2031
2618
|
});
|
|
2032
2619
|
return jsx("button", {
|
|
2033
2620
|
type: "button",
|
|
2034
|
-
className: clsx(css$
|
|
2621
|
+
className: clsx(css$8.pill, css$8.interactive, active && css$8.active, className),
|
|
2035
2622
|
onClick,
|
|
2036
2623
|
...rest,
|
|
2037
2624
|
children
|
|
@@ -2096,11 +2683,11 @@ function SegmentedControl({ id, value, options, onChange, label, disabled = fals
|
|
|
2096
2683
|
ref: list,
|
|
2097
2684
|
role: "tablist",
|
|
2098
2685
|
"aria-label": label,
|
|
2099
|
-
className: clsx(css$
|
|
2686
|
+
className: clsx(css$9.control, className),
|
|
2100
2687
|
style: indicator,
|
|
2101
2688
|
children: [jsx("span", {
|
|
2102
2689
|
"aria-hidden": "true",
|
|
2103
|
-
className: css$
|
|
2690
|
+
className: css$9.indicator
|
|
2104
2691
|
}), options.map((option) => {
|
|
2105
2692
|
const active = option.value === value;
|
|
2106
2693
|
return jsx("button", {
|
|
@@ -2112,7 +2699,7 @@ function SegmentedControl({ id, value, options, onChange, label, disabled = fals
|
|
|
2112
2699
|
tabIndex: active ? 0 : -1,
|
|
2113
2700
|
disabled: disabled || option.disabled === true,
|
|
2114
2701
|
title: option.title,
|
|
2115
|
-
className: css$
|
|
2702
|
+
className: css$9.tab,
|
|
2116
2703
|
onClick: () => {
|
|
2117
2704
|
if (!active) onChange(option.value);
|
|
2118
2705
|
},
|
|
@@ -2123,22 +2710,6 @@ function SegmentedControl({ id, value, options, onChange, label, disabled = fals
|
|
|
2123
2710
|
});
|
|
2124
2711
|
}
|
|
2125
2712
|
//#endregion
|
|
2126
|
-
//#region lib/types/Tag.js
|
|
2127
|
-
/**
|
|
2128
|
-
* Render a read-only tag.
|
|
2129
|
-
* @param props.tone - which palette to use (default `outline`).
|
|
2130
|
-
* @param props.className - extra class for layout placement.
|
|
2131
|
-
* @param props.children - the localized label, owned by the render site.
|
|
2132
|
-
* @returns the tag element.
|
|
2133
|
-
*/
|
|
2134
|
-
function Tag({ tone = "outline", className, children }) {
|
|
2135
|
-
return jsx("span", {
|
|
2136
|
-
className: clsx(css$6.tag, className),
|
|
2137
|
-
"data-tone": tone,
|
|
2138
|
-
children
|
|
2139
|
-
});
|
|
2140
|
-
}
|
|
2141
|
-
//#endregion
|
|
2142
2713
|
//#region lib/types/Switch.js
|
|
2143
2714
|
/**
|
|
2144
2715
|
* Render a toggle switch.
|
|
@@ -2159,11 +2730,11 @@ function Switch({ checked, onChange, label, disabled = false, title, className }
|
|
|
2159
2730
|
"aria-label": label,
|
|
2160
2731
|
title,
|
|
2161
2732
|
disabled,
|
|
2162
|
-
className: clsx(css$
|
|
2733
|
+
className: clsx(css$10.switch, className),
|
|
2163
2734
|
onClick: () => {
|
|
2164
2735
|
onChange(!checked);
|
|
2165
2736
|
},
|
|
2166
|
-
children: jsx("span", { className: css$
|
|
2737
|
+
children: jsx("span", { className: css$10.thumb })
|
|
2167
2738
|
});
|
|
2168
2739
|
}
|
|
2169
2740
|
//#endregion
|
|
@@ -2181,7 +2752,7 @@ function Switch({ checked, onChange, label, disabled = false, title, className }
|
|
|
2181
2752
|
*/
|
|
2182
2753
|
function Checkbox({ checked, onChange, label, disabled = false, title, className }) {
|
|
2183
2754
|
return jsxs("label", {
|
|
2184
|
-
className: clsx(css$
|
|
2755
|
+
className: clsx(css$11.checkbox, className),
|
|
2185
2756
|
title,
|
|
2186
2757
|
children: [jsx("input", {
|
|
2187
2758
|
type: "checkbox",
|
|
@@ -2203,13 +2774,13 @@ function Checkbox({ checked, onChange, label, disabled = false, title, className
|
|
|
2203
2774
|
*/
|
|
2204
2775
|
const Input = forwardRef(function Input({ icon, className, ...rest }, ref) {
|
|
2205
2776
|
return jsxs("span", {
|
|
2206
|
-
className: clsx(css$
|
|
2777
|
+
className: clsx(css$12.wrap, className),
|
|
2207
2778
|
children: [icon != null && jsx("span", {
|
|
2208
|
-
className: css$
|
|
2779
|
+
className: css$12.icon,
|
|
2209
2780
|
children: icon
|
|
2210
2781
|
}), jsx("input", {
|
|
2211
2782
|
ref,
|
|
2212
|
-
className: css$
|
|
2783
|
+
className: css$12.input,
|
|
2213
2784
|
...rest
|
|
2214
2785
|
})]
|
|
2215
2786
|
});
|
|
@@ -2423,9 +2994,9 @@ function useModalLayer(dialog, open, onClose) {
|
|
|
2423
2994
|
*/
|
|
2424
2995
|
function ShortcutKeys({ keys, variant = "plain", className }) {
|
|
2425
2996
|
return jsx("span", {
|
|
2426
|
-
className: clsx(css$
|
|
2997
|
+
className: clsx(css$13.keys, variant === "tooltip" && css$13.tooltip, variant === "tooltip" && keys.includes("+") && css$13.joined, className),
|
|
2427
2998
|
children: keys.map((key, index) => jsx("kbd", {
|
|
2428
|
-
className: key === "+" ? css$
|
|
2999
|
+
className: key === "+" ? css$13.separator : css$13.key,
|
|
2429
3000
|
children: key
|
|
2430
3001
|
}, index))
|
|
2431
3002
|
});
|
|
@@ -2449,32 +3020,32 @@ function ShortcutKeys({ keys, variant = "plain", className }) {
|
|
|
2449
3020
|
*/
|
|
2450
3021
|
function MenuItemButton({ children, shortcut, icon, disabled = false, danger = false, separatorBefore = false, onSelect }) {
|
|
2451
3022
|
return jsxs("div", {
|
|
2452
|
-
className: css$
|
|
3023
|
+
className: css$14.itemWrap,
|
|
2453
3024
|
children: [separatorBefore && jsx("div", {
|
|
2454
|
-
className: css$
|
|
3025
|
+
className: css$14.separator,
|
|
2455
3026
|
role: "separator"
|
|
2456
3027
|
}), jsxs("button", {
|
|
2457
3028
|
type: "button",
|
|
2458
3029
|
role: "menuitem",
|
|
2459
|
-
className: clsx(css$
|
|
3030
|
+
className: clsx(css$14.item, danger && css$14.danger),
|
|
2460
3031
|
disabled,
|
|
2461
3032
|
"aria-keyshortcuts": shortcut?.aria,
|
|
2462
3033
|
onClick: onSelect,
|
|
2463
3034
|
children: [
|
|
2464
3035
|
icon !== void 0 && jsx("span", {
|
|
2465
|
-
className: css$
|
|
3036
|
+
className: css$14.itemIcon,
|
|
2466
3037
|
children: icon
|
|
2467
3038
|
}),
|
|
2468
3039
|
jsx("span", {
|
|
2469
|
-
className: css$
|
|
3040
|
+
className: css$14.itemLabel,
|
|
2470
3041
|
children
|
|
2471
3042
|
}),
|
|
2472
3043
|
shortcut !== void 0 && jsx("span", {
|
|
2473
3044
|
"aria-hidden": "true",
|
|
2474
|
-
className: css$
|
|
3045
|
+
className: css$14.shortcut,
|
|
2475
3046
|
children: jsx(ShortcutKeys, {
|
|
2476
3047
|
keys: shortcut.keys,
|
|
2477
|
-
className: css$
|
|
3048
|
+
className: css$14.shortcutKeys
|
|
2478
3049
|
})
|
|
2479
3050
|
})
|
|
2480
3051
|
]
|
|
@@ -2746,11 +3317,11 @@ function Menu({ open, anchor, items, selectedId, selectedIds, onSelect, onClose,
|
|
|
2746
3317
|
const scrollable = !items.some((entry) => !isSeparator(entry) && !isLabel(entry) && entry.submenu !== void 0 && entry.submenu.length > 0);
|
|
2747
3318
|
const renderEntry = (entry) => {
|
|
2748
3319
|
if (isSeparator(entry)) return jsx("div", {
|
|
2749
|
-
className: css$
|
|
3320
|
+
className: css$14.separator,
|
|
2750
3321
|
role: "separator"
|
|
2751
3322
|
}, entry.id);
|
|
2752
3323
|
if (isLabel(entry)) return jsx("div", {
|
|
2753
|
-
className: css$
|
|
3324
|
+
className: css$14.label,
|
|
2754
3325
|
role: "presentation",
|
|
2755
3326
|
children: entry.text
|
|
2756
3327
|
}, entry.id);
|
|
@@ -2758,7 +3329,7 @@ function Menu({ open, anchor, items, selectedId, selectedIds, onSelect, onClose,
|
|
|
2758
3329
|
const subOpen = hasSub && openSubmenuId === entry.id;
|
|
2759
3330
|
const selected = entry.id === selectedId || selectedIds?.includes(entry.id) === true;
|
|
2760
3331
|
return jsxs("div", {
|
|
2761
|
-
className: css$
|
|
3332
|
+
className: css$14.itemWrap,
|
|
2762
3333
|
onMouseEnter: () => {
|
|
2763
3334
|
setOpenSubmenuId(hasSub ? entry.id : null);
|
|
2764
3335
|
},
|
|
@@ -2768,7 +3339,7 @@ function Menu({ open, anchor, items, selectedId, selectedIds, onSelect, onClose,
|
|
|
2768
3339
|
children: [jsxs("button", {
|
|
2769
3340
|
type: "button",
|
|
2770
3341
|
role: "menuitem",
|
|
2771
|
-
className: clsx(css$
|
|
3342
|
+
className: clsx(css$14.item, selected && (selection === "fill" ? css$14.selectedFill : css$14.selected), entry.danger === true && css$14.danger),
|
|
2772
3343
|
disabled: entry.disabled,
|
|
2773
3344
|
"aria-keyshortcuts": entry.shortcut?.aria,
|
|
2774
3345
|
"aria-haspopup": hasSub ? "menu" : void 0,
|
|
@@ -2786,30 +3357,30 @@ function Menu({ open, anchor, items, selectedId, selectedIds, onSelect, onClose,
|
|
|
2786
3357
|
},
|
|
2787
3358
|
children: [
|
|
2788
3359
|
entry.icon !== void 0 && jsx("span", {
|
|
2789
|
-
className: css$
|
|
3360
|
+
className: css$14.itemIcon,
|
|
2790
3361
|
children: entry.icon
|
|
2791
3362
|
}),
|
|
2792
3363
|
jsx("span", {
|
|
2793
|
-
className: css$
|
|
3364
|
+
className: css$14.itemLabel,
|
|
2794
3365
|
children: entry.label
|
|
2795
3366
|
}),
|
|
2796
3367
|
entry.shortcut !== void 0 && jsx("span", {
|
|
2797
3368
|
"aria-hidden": "true",
|
|
2798
|
-
className: css$
|
|
3369
|
+
className: css$14.shortcut,
|
|
2799
3370
|
children: jsx(ShortcutKeys, {
|
|
2800
3371
|
keys: entry.shortcut.keys,
|
|
2801
|
-
className: css$
|
|
3372
|
+
className: css$14.shortcutKeys
|
|
2802
3373
|
})
|
|
2803
3374
|
}),
|
|
2804
|
-
selected && selection === "check" && jsx(IconCheckOutline16, { className: css$
|
|
3375
|
+
selected && selection === "check" && jsx(IconCheckOutline16, { className: css$14.check })
|
|
2805
3376
|
]
|
|
2806
3377
|
}), subOpen && entry.submenu !== void 0 && jsx("div", {
|
|
2807
|
-
className: clsx(css$
|
|
3378
|
+
className: clsx(css$14.submenu, compact && css$14.compactList),
|
|
2808
3379
|
role: "menu",
|
|
2809
3380
|
children: entry.submenu.map((sub) => jsxs("button", {
|
|
2810
3381
|
type: "button",
|
|
2811
3382
|
role: "menuitem",
|
|
2812
|
-
className: css$
|
|
3383
|
+
className: css$14.item,
|
|
2813
3384
|
disabled: sub.disabled,
|
|
2814
3385
|
"aria-keyshortcuts": sub.shortcut?.aria,
|
|
2815
3386
|
onClick: () => {
|
|
@@ -2818,19 +3389,19 @@ function Menu({ open, anchor, items, selectedId, selectedIds, onSelect, onClose,
|
|
|
2818
3389
|
},
|
|
2819
3390
|
children: [
|
|
2820
3391
|
sub.icon !== void 0 && jsx("span", {
|
|
2821
|
-
className: css$
|
|
3392
|
+
className: css$14.itemIcon,
|
|
2822
3393
|
children: sub.icon
|
|
2823
3394
|
}),
|
|
2824
3395
|
jsx("span", {
|
|
2825
|
-
className: css$
|
|
3396
|
+
className: css$14.itemLabel,
|
|
2826
3397
|
children: sub.label
|
|
2827
3398
|
}),
|
|
2828
3399
|
sub.shortcut !== void 0 && jsx("span", {
|
|
2829
3400
|
"aria-hidden": "true",
|
|
2830
|
-
className: css$
|
|
3401
|
+
className: css$14.shortcut,
|
|
2831
3402
|
children: jsx(ShortcutKeys, {
|
|
2832
3403
|
keys: sub.shortcut.keys,
|
|
2833
|
-
className: css$
|
|
3404
|
+
className: css$14.shortcutKeys
|
|
2834
3405
|
})
|
|
2835
3406
|
})
|
|
2836
3407
|
]
|
|
@@ -2840,25 +3411,25 @@ function Menu({ open, anchor, items, selectedId, selectedIds, onSelect, onClose,
|
|
|
2840
3411
|
};
|
|
2841
3412
|
const list = open && jsxs("div", {
|
|
2842
3413
|
ref: listRef,
|
|
2843
|
-
className: clsx(css$
|
|
3414
|
+
className: clsx(css$14.list, dense && css$14.denseList, compact && css$14.compactList, scrollable && css$14.scrollable, portal && css$14.portal, side === "top" && !portal && css$14.sideTop, align === "end" && !portal && css$14.alignEnd),
|
|
2844
3415
|
style: portal ? fixedPos ?? MEASURE_STYLE : void 0,
|
|
2845
3416
|
role: "menu",
|
|
2846
3417
|
onClick: (e) => {
|
|
2847
3418
|
e.stopPropagation();
|
|
2848
3419
|
},
|
|
2849
3420
|
children: [jsx("div", {
|
|
2850
|
-
className: css$
|
|
3421
|
+
className: css$14.viewport,
|
|
2851
3422
|
role: "presentation",
|
|
2852
3423
|
children: items.map(renderEntry)
|
|
2853
3424
|
}), footer !== void 0 && footer.length > 0 && jsx("div", {
|
|
2854
|
-
className: css$
|
|
3425
|
+
className: css$14.footer,
|
|
2855
3426
|
role: "presentation",
|
|
2856
3427
|
children: footer.map(renderEntry)
|
|
2857
3428
|
})]
|
|
2858
3429
|
});
|
|
2859
3430
|
return jsxs("span", {
|
|
2860
3431
|
ref: rootRef,
|
|
2861
|
-
className: clsx(css$
|
|
3432
|
+
className: clsx(css$14.root, className),
|
|
2862
3433
|
onPointerEnter: closeOnPointerLeave ? cancelClose : void 0,
|
|
2863
3434
|
onPointerLeave: closeOnPointerLeave ? () => {
|
|
2864
3435
|
if (open) armClose();
|
|
@@ -3255,7 +3826,7 @@ function Tooltip({ label, shortcutKeys, side = "right", delayMs = 0, disabled =
|
|
|
3255
3826
|
};
|
|
3256
3827
|
const bubbleNode = visible && !suppressed && jsxs("span", {
|
|
3257
3828
|
ref: bubble,
|
|
3258
|
-
className: css$
|
|
3829
|
+
className: css$15.bubble,
|
|
3259
3830
|
"data-side": placement,
|
|
3260
3831
|
"data-portal": portal || void 0,
|
|
3261
3832
|
"data-has-shortcut": shortcutKeys?.length ? true : void 0,
|
|
@@ -3267,7 +3838,7 @@ function Tooltip({ label, shortcutKeys, side = "right", delayMs = 0, disabled =
|
|
|
3267
3838
|
role: "tooltip",
|
|
3268
3839
|
"aria-label": shortcutKeys?.length ? [resolvedLabel, shortcutKeys.join(" ")].filter(Boolean).join(" ") : void 0,
|
|
3269
3840
|
children: [resolvedLabel && jsx("span", {
|
|
3270
|
-
className: css$
|
|
3841
|
+
className: css$15.label,
|
|
3271
3842
|
children: resolvedLabel
|
|
3272
3843
|
}), shortcutKeys !== void 0 && shortcutKeys.length > 0 && jsx(ShortcutKeys, {
|
|
3273
3844
|
keys: shortcutKeys,
|
|
@@ -3473,7 +4044,7 @@ function HoverCard({ anchor, content, openDelayMs = 500, disabled = false, copyT
|
|
|
3473
4044
|
const copyable = copyText !== void 0;
|
|
3474
4045
|
const card = open && pos !== null && !suppressed && jsx("div", {
|
|
3475
4046
|
ref: cardRef,
|
|
3476
|
-
className: clsx(css$
|
|
4047
|
+
className: clsx(css$16.card, inline && css$16.media, copyable && css$16.copyable, copied && css$16.feedback),
|
|
3477
4048
|
style: {
|
|
3478
4049
|
...pos,
|
|
3479
4050
|
minHeight: copied && copyHeightRef.current !== null ? copyHeightRef.current : void 0
|
|
@@ -3494,14 +4065,14 @@ function HoverCard({ anchor, content, openDelayMs = 500, disabled = false, copyT
|
|
|
3494
4065
|
copy(copyText);
|
|
3495
4066
|
} : void 0,
|
|
3496
4067
|
children: copied ? jsx("span", {
|
|
3497
|
-
className: css$
|
|
4068
|
+
className: css$16.copied,
|
|
3498
4069
|
"aria-hidden": "true",
|
|
3499
4070
|
children: copiedLabel
|
|
3500
4071
|
}) : content
|
|
3501
4072
|
});
|
|
3502
4073
|
return jsxs("span", {
|
|
3503
4074
|
ref: rootRef,
|
|
3504
|
-
className: clsx(css$
|
|
4075
|
+
className: clsx(css$16.root, inline && css$16.inline),
|
|
3505
4076
|
onFocus: inline ? (event) => {
|
|
3506
4077
|
if (!disabled && event.target.matches(":focus-visible")) {
|
|
3507
4078
|
cancelClose();
|
|
@@ -3540,7 +4111,7 @@ function HoverCard({ anchor, content, openDelayMs = 500, disabled = false, copyT
|
|
|
3540
4111
|
children: anchor
|
|
3541
4112
|
}),
|
|
3542
4113
|
open && !suppressed && copyable && jsx("span", {
|
|
3543
|
-
className: css$
|
|
4114
|
+
className: css$16.status,
|
|
3544
4115
|
role: "status",
|
|
3545
4116
|
children: copied ? copiedLabel : ""
|
|
3546
4117
|
}),
|
|
@@ -3575,11 +4146,11 @@ function Modal({ open, onClose, title, closeLabel, description, children, footer
|
|
|
3575
4146
|
useModalLayer(dialog, open, onClose);
|
|
3576
4147
|
if (!open) return null;
|
|
3577
4148
|
return createPortal(jsxs("div", {
|
|
3578
|
-
className: css$
|
|
4149
|
+
className: css$17.root,
|
|
3579
4150
|
role: "presentation",
|
|
3580
4151
|
onKeyDownCapture,
|
|
3581
4152
|
children: [jsx("div", {
|
|
3582
|
-
className: css$
|
|
4153
|
+
className: css$17.mask,
|
|
3583
4154
|
style: backdropBlur ? void 0 : { backdropFilter: "none" },
|
|
3584
4155
|
"aria-hidden": "true",
|
|
3585
4156
|
onClick: onClose
|
|
@@ -3587,37 +4158,37 @@ function Modal({ open, onClose, title, closeLabel, description, children, footer
|
|
|
3587
4158
|
ref: dialog,
|
|
3588
4159
|
tabIndex: -1,
|
|
3589
4160
|
"data-shortcut-modal": shortcutModal,
|
|
3590
|
-
className: clsx(css$
|
|
4161
|
+
className: clsx(css$17.dialog, className),
|
|
3591
4162
|
role: "dialog",
|
|
3592
4163
|
"aria-modal": "true",
|
|
3593
4164
|
"aria-label": title,
|
|
3594
4165
|
children: headless ? children : jsxs(Fragment, { children: [jsxs("div", {
|
|
3595
|
-
className: clsx(css$
|
|
4166
|
+
className: clsx(css$17.content, contentClassName),
|
|
3596
4167
|
children: [
|
|
3597
4168
|
jsxs("div", {
|
|
3598
|
-
className: css$
|
|
4169
|
+
className: css$17.header,
|
|
3599
4170
|
children: [jsx("h2", {
|
|
3600
|
-
className: css$
|
|
4171
|
+
className: css$17.title,
|
|
3601
4172
|
children: title
|
|
3602
4173
|
}), jsx("button", {
|
|
3603
4174
|
type: "button",
|
|
3604
|
-
className: css$
|
|
4175
|
+
className: css$17.close,
|
|
3605
4176
|
"aria-label": closeLabel,
|
|
3606
4177
|
onClick: onClose,
|
|
3607
4178
|
children: jsx(IconCloseOutline16, { size: 14 })
|
|
3608
4179
|
})]
|
|
3609
4180
|
}),
|
|
3610
4181
|
description !== void 0 && description !== "" && jsx("p", {
|
|
3611
|
-
className: css$
|
|
4182
|
+
className: css$17.description,
|
|
3612
4183
|
children: description
|
|
3613
4184
|
}),
|
|
3614
4185
|
children !== void 0 && jsx("div", {
|
|
3615
|
-
className: css$
|
|
4186
|
+
className: css$17.body,
|
|
3616
4187
|
children
|
|
3617
4188
|
})
|
|
3618
4189
|
]
|
|
3619
4190
|
}), footer !== void 0 && jsx("div", {
|
|
3620
|
-
className: css$
|
|
4191
|
+
className: css$17.footer,
|
|
3621
4192
|
children: footer
|
|
3622
4193
|
})] })
|
|
3623
4194
|
})]
|
|
@@ -3641,13 +4212,13 @@ function OnboardingSurface({ children }) {
|
|
|
3641
4212
|
};
|
|
3642
4213
|
}, []);
|
|
3643
4214
|
return createPortal(jsxs("div", {
|
|
3644
|
-
className: css$
|
|
4215
|
+
className: css$18.onboardingOverlay,
|
|
3645
4216
|
role: "presentation",
|
|
3646
4217
|
children: [jsx("div", {
|
|
3647
|
-
className: css$
|
|
4218
|
+
className: css$18.onboardingMask,
|
|
3648
4219
|
"aria-hidden": "true"
|
|
3649
4220
|
}), jsx("div", {
|
|
3650
|
-
className: css$
|
|
4221
|
+
className: css$18.onboardingStage,
|
|
3651
4222
|
children
|
|
3652
4223
|
})]
|
|
3653
4224
|
}), document.body);
|
|
@@ -3668,28 +4239,28 @@ function RiskConfirmation({ open, title, description, acknowledgeLabel, cancelLa
|
|
|
3668
4239
|
onClose: onCancel,
|
|
3669
4240
|
title,
|
|
3670
4241
|
closeLabel,
|
|
3671
|
-
className: css$
|
|
3672
|
-
contentClassName: css$
|
|
4242
|
+
className: css$19.confirmation ?? "",
|
|
4243
|
+
contentClassName: css$19.confirmationContent ?? "",
|
|
3673
4244
|
footer: jsxs(Fragment, { children: [jsx(Button, {
|
|
3674
4245
|
variant: "outline",
|
|
3675
|
-
className: css$
|
|
4246
|
+
className: css$19.modalAction,
|
|
3676
4247
|
onClick: onCancel,
|
|
3677
4248
|
children: cancelLabel
|
|
3678
4249
|
}), jsx(Button, {
|
|
3679
4250
|
variant: "primary",
|
|
3680
|
-
className: css$
|
|
4251
|
+
className: css$19.confirmAction,
|
|
3681
4252
|
disabled: disabled || !acknowledged,
|
|
3682
4253
|
onClick: onConfirm,
|
|
3683
4254
|
children: confirmLabel
|
|
3684
4255
|
})] }),
|
|
3685
4256
|
children: [jsxs("div", {
|
|
3686
|
-
className: css$
|
|
4257
|
+
className: css$19.warning,
|
|
3687
4258
|
children: [jsx(IconWarningOutline16, {
|
|
3688
4259
|
size: 18,
|
|
3689
|
-
className: css$
|
|
4260
|
+
className: css$19.warningIcon
|
|
3690
4261
|
}), jsx("p", { children: description })]
|
|
3691
4262
|
}), jsxs("label", {
|
|
3692
|
-
className: css$
|
|
4263
|
+
className: css$19.acknowledgement,
|
|
3693
4264
|
children: [jsx("input", {
|
|
3694
4265
|
type: "checkbox",
|
|
3695
4266
|
checked: acknowledged,
|
|
@@ -3737,47 +4308,47 @@ function ConnectionIndicator({ state, disconnectedLabel, connectingLabel, recove
|
|
|
3737
4308
|
};
|
|
3738
4309
|
}, [state, rendered]);
|
|
3739
4310
|
if (rendered === void 0) return null;
|
|
3740
|
-
const leavingClass = leaving ? ` ${css$
|
|
4311
|
+
const leavingClass = leaving ? ` ${css$20.leaving}` : "";
|
|
3741
4312
|
if (rendered === "recovered") return jsxs("div", {
|
|
3742
|
-
className: `${css$
|
|
4313
|
+
className: `${css$20.indicator} ${css$20.success}${leavingClass}`,
|
|
3743
4314
|
role: "status",
|
|
3744
4315
|
"aria-label": recoveredLabel,
|
|
3745
4316
|
children: [jsx("span", {
|
|
3746
|
-
className: css$
|
|
4317
|
+
className: css$20.icon,
|
|
3747
4318
|
"aria-hidden": "true",
|
|
3748
4319
|
children: jsx(IconCheckOutline16, { size: 14 })
|
|
3749
4320
|
}), jsx("span", {
|
|
3750
|
-
className: css$
|
|
4321
|
+
className: css$20.label,
|
|
3751
4322
|
children: recoveredLabel
|
|
3752
4323
|
})]
|
|
3753
4324
|
});
|
|
3754
4325
|
const connecting = rendered === "connecting";
|
|
3755
4326
|
return jsxs("button", {
|
|
3756
4327
|
type: "button",
|
|
3757
|
-
className: `${css$
|
|
4328
|
+
className: `${css$20.indicator} ${css$20.warning}${leavingClass}`,
|
|
3758
4329
|
"data-phase": rendered,
|
|
3759
4330
|
"aria-label": connecting ? restartActionLabel : reconnectActionLabel,
|
|
3760
4331
|
onClick: onReconnect,
|
|
3761
4332
|
children: [jsx("span", {
|
|
3762
|
-
className: css$
|
|
4333
|
+
className: css$20.icon,
|
|
3763
4334
|
"aria-hidden": "true",
|
|
3764
4335
|
children: connecting ? jsx(IconLoadingOutline16, {
|
|
3765
4336
|
size: 14,
|
|
3766
|
-
className: css$
|
|
4337
|
+
className: css$20.spinner
|
|
3767
4338
|
}) : jsx(IconRefreshOutline14, { size: 14 })
|
|
3768
4339
|
}), jsx("span", {
|
|
3769
|
-
className: css$
|
|
4340
|
+
className: css$20.label,
|
|
3770
4341
|
children: connecting ? jsxs(Fragment, { children: [connectingLabel, jsxs("span", {
|
|
3771
|
-
className: css$
|
|
4342
|
+
className: css$20.dots,
|
|
3772
4343
|
"aria-hidden": "true",
|
|
3773
4344
|
children: [
|
|
3774
4345
|
jsx("span", { children: "." }),
|
|
3775
4346
|
jsx("span", {
|
|
3776
|
-
className: css$
|
|
4347
|
+
className: css$20.secondDot,
|
|
3777
4348
|
children: "."
|
|
3778
4349
|
}),
|
|
3779
4350
|
jsx("span", {
|
|
3780
|
-
className: css$
|
|
4351
|
+
className: css$20.thirdDot,
|
|
3781
4352
|
children: "."
|
|
3782
4353
|
})
|
|
3783
4354
|
]
|
|
@@ -3836,9 +4407,9 @@ function cellTransform(left) {
|
|
|
3836
4407
|
*/
|
|
3837
4408
|
/** Cinnabar body gradient, top to bottom: the seal's warm lit upper edge. */
|
|
3838
4409
|
const BODY_STOPS = [
|
|
3839
|
-
"#
|
|
3840
|
-
"#
|
|
3841
|
-
"#
|
|
4410
|
+
"#c94a40",
|
|
4411
|
+
"#b7352c",
|
|
4412
|
+
"#8f2a21"
|
|
3842
4413
|
];
|
|
3843
4414
|
/** Warm white of the glyphs against the cinnabar body. */
|
|
3844
4415
|
const GLYPH_FILL = "#fff5eb";
|
|
@@ -4602,7 +5173,7 @@ function FileTypeIcon(props) {
|
|
|
4602
5173
|
type: resolvedType,
|
|
4603
5174
|
size,
|
|
4604
5175
|
className
|
|
4605
|
-
}) : glyph(resolvedType, size, clsx(css$
|
|
5176
|
+
}) : glyph(resolvedType, size, clsx(css$21.icon, css$21[resolvedType], className));
|
|
4606
5177
|
}
|
|
4607
5178
|
//#endregion
|
|
4608
5179
|
//#region lib/types/SiteGlyph.js
|
|
@@ -4915,17 +5486,17 @@ function PathLabel({ path, className, ...attributes }) {
|
|
|
4915
5486
|
return jsx("span", {
|
|
4916
5487
|
...attributes,
|
|
4917
5488
|
ref: boxRef,
|
|
4918
|
-
className: clsx(css$
|
|
5489
|
+
className: clsx(css$22.path, className),
|
|
4919
5490
|
title: path,
|
|
4920
5491
|
"data-path-label": true,
|
|
4921
5492
|
children: jsxs("span", {
|
|
4922
5493
|
ref: textRef,
|
|
4923
|
-
className: css$
|
|
5494
|
+
className: css$22.text,
|
|
4924
5495
|
children: [directory !== "" && jsx("span", {
|
|
4925
|
-
className: css$
|
|
5496
|
+
className: css$22.directory,
|
|
4926
5497
|
children: directory
|
|
4927
5498
|
}), jsx("span", {
|
|
4928
|
-
className: css$
|
|
5499
|
+
className: css$22.name,
|
|
4929
5500
|
children: name
|
|
4930
5501
|
})]
|
|
4931
5502
|
})
|
|
@@ -4993,7 +5564,7 @@ function projectUserText(text, sessionLabels, slashNames = [], slashKind = "skil
|
|
|
4993
5564
|
let cursor = 0;
|
|
4994
5565
|
const pushPlain = (from, to) => {
|
|
4995
5566
|
parts.push(jsx("span", {
|
|
4996
|
-
className: css$
|
|
5567
|
+
className: css$23.plainRun,
|
|
4997
5568
|
children: text.slice(from, to)
|
|
4998
5569
|
}, `t${from}`));
|
|
4999
5570
|
};
|
|
@@ -5006,14 +5577,14 @@ function projectUserText(text, sessionLabels, slashNames = [], slashKind = "skil
|
|
|
5006
5577
|
const contents = jsxs(Fragment, { children: [referenceKind !== void 0 && jsx(ReferenceIcon, {
|
|
5007
5578
|
kind: referenceKind,
|
|
5008
5579
|
size: 16,
|
|
5009
|
-
className: css$
|
|
5580
|
+
className: css$23.refIcon
|
|
5010
5581
|
}), displayLabel] });
|
|
5011
5582
|
const open = references === void 0 ? void 0 : referenceKind === "file" ? () => {
|
|
5012
5583
|
references.openFile(label.slice(1).replace(/^"|"$/gu, ""));
|
|
5013
5584
|
} : referenceKind === void 0 && slashKind === "skill" ? () => {
|
|
5014
5585
|
references.openSkill(label.slice(1));
|
|
5015
5586
|
} : void 0;
|
|
5016
|
-
const className = clsx(css$
|
|
5587
|
+
const className = clsx(css$23.refChip, referenceKind === void 0 && css$23.slashChip);
|
|
5017
5588
|
parts.push(open === void 0 ? jsx("span", {
|
|
5018
5589
|
className,
|
|
5019
5590
|
"data-ref-chip": referenceKind ?? slashKind,
|
|
@@ -5033,7 +5604,7 @@ function projectUserText(text, sessionLabels, slashNames = [], slashKind = "skil
|
|
|
5033
5604
|
cursor = end;
|
|
5034
5605
|
}
|
|
5035
5606
|
if (parts.length === 0) return jsx("span", {
|
|
5036
|
-
className: css$
|
|
5607
|
+
className: css$23.plainRun,
|
|
5037
5608
|
children: text
|
|
5038
5609
|
});
|
|
5039
5610
|
if (cursor < text.length) pushPlain(cursor, text.length);
|
|
@@ -5092,22 +5663,22 @@ function Toast({ text, icon, tone, anchor, holdMs = HOLD_MS, onDone }) {
|
|
|
5092
5663
|
};
|
|
5093
5664
|
}, [anchor]);
|
|
5094
5665
|
return createPortal(jsxs("div", {
|
|
5095
|
-
className: css$
|
|
5666
|
+
className: css$24.toast,
|
|
5096
5667
|
role: "alert",
|
|
5097
5668
|
style: {
|
|
5098
5669
|
...left === null ? {} : { left },
|
|
5099
5670
|
"--qilin-toast-hold": `${String(holdMs)}ms`
|
|
5100
5671
|
},
|
|
5101
5672
|
children: [tone === "success" ? jsx("span", {
|
|
5102
|
-
className: `${css$
|
|
5673
|
+
className: `${css$24.icon} ${css$24.success}`,
|
|
5103
5674
|
"aria-hidden": true,
|
|
5104
5675
|
children: jsx(IconCheckOutline16, {})
|
|
5105
5676
|
}) : icon !== void 0 && jsx("span", {
|
|
5106
|
-
className: css$
|
|
5677
|
+
className: css$24.icon,
|
|
5107
5678
|
"aria-hidden": true,
|
|
5108
5679
|
children: icon
|
|
5109
5680
|
}), jsx("span", {
|
|
5110
|
-
className: css$
|
|
5681
|
+
className: css$24.text,
|
|
5111
5682
|
children: text
|
|
5112
5683
|
})]
|
|
5113
5684
|
}), document.body);
|
|
@@ -5304,8 +5875,28 @@ function rankByName(items, rawQuery) {
|
|
|
5304
5875
|
* @returns true only inside the macOS Electron shell.
|
|
5305
5876
|
*/
|
|
5306
5877
|
function isDarwinDesktop() {
|
|
5878
|
+
if (typeof document === "undefined") return false;
|
|
5307
5879
|
return document.documentElement.dataset.platform === "darwin";
|
|
5308
5880
|
}
|
|
5881
|
+
/**
|
|
5882
|
+
* Subscribe to `data-platform` flips on `<html>` for decisions made outside
|
|
5883
|
+
* render (apply-world projections that cannot re-read the DOM per frame).
|
|
5884
|
+
* The listener fires on attribute changes after this call, not for the
|
|
5885
|
+
* current value — pair it with a fresh `isDarwinDesktop()` read.
|
|
5886
|
+
* @param listener - Called on every `data-platform` attribute change.
|
|
5887
|
+
* @returns Disposer that stops watching.
|
|
5888
|
+
*/
|
|
5889
|
+
function watchDarwinDesktop(listener) {
|
|
5890
|
+
if (typeof document === "undefined") return () => {};
|
|
5891
|
+
const observer = new MutationObserver(listener);
|
|
5892
|
+
observer.observe(document.documentElement, {
|
|
5893
|
+
attributes: true,
|
|
5894
|
+
attributeFilter: ["data-platform"]
|
|
5895
|
+
});
|
|
5896
|
+
return () => {
|
|
5897
|
+
observer.disconnect();
|
|
5898
|
+
};
|
|
5899
|
+
}
|
|
5309
5900
|
//#endregion
|
|
5310
5901
|
//#region lib/types/JsonTree.js
|
|
5311
5902
|
const OBJECT_PREVIEW_LIMIT = 4;
|
|
@@ -5381,7 +5972,7 @@ function JsonCopyAction({ store, target, persistent, labels, onCopy, onClose })
|
|
|
5381
5972
|
const object = typeof target.value === "object" && target.value !== null;
|
|
5382
5973
|
const copyTitle = state === "copied" ? labels.copied : state === "failed" ? labels.copyFailed : object ? labels.copyPrettyJson : labels.copyValue;
|
|
5383
5974
|
return jsx("span", {
|
|
5384
|
-
className: css$
|
|
5975
|
+
className: css$25.copySlot,
|
|
5385
5976
|
children: (persistent || snapshot !== void 0) && jsx(Menu, {
|
|
5386
5977
|
open: snapshot?.menuOpen === true,
|
|
5387
5978
|
compact: true,
|
|
@@ -5390,7 +5981,7 @@ function JsonCopyAction({ store, target, persistent, labels, onCopy, onClose })
|
|
|
5390
5981
|
anchor: jsx("button", {
|
|
5391
5982
|
ref: buttonRef,
|
|
5392
5983
|
type: "button",
|
|
5393
|
-
className: css$
|
|
5984
|
+
className: css$25.actionButton,
|
|
5394
5985
|
"data-json-copy-button": true,
|
|
5395
5986
|
"data-state": state,
|
|
5396
5987
|
"aria-label": copyTitle,
|
|
@@ -5429,35 +6020,35 @@ function bracketOf(value) {
|
|
|
5429
6020
|
}
|
|
5430
6021
|
function previewPrimitive(value) {
|
|
5431
6022
|
if (value === null) return jsx("span", {
|
|
5432
|
-
className: css$
|
|
6023
|
+
className: css$25.keywordValue,
|
|
5433
6024
|
children: "null"
|
|
5434
6025
|
});
|
|
5435
6026
|
if (typeof value === "string") return jsx("span", {
|
|
5436
|
-
className: css$
|
|
6027
|
+
className: css$25.stringValue,
|
|
5437
6028
|
children: JSON.stringify(value)
|
|
5438
6029
|
});
|
|
5439
6030
|
if (typeof value === "number") return jsx("span", {
|
|
5440
|
-
className: css$
|
|
6031
|
+
className: css$25.numberValue,
|
|
5441
6032
|
children: String(value)
|
|
5442
6033
|
});
|
|
5443
6034
|
if (typeof value === "boolean") return jsx("span", {
|
|
5444
|
-
className: css$
|
|
6035
|
+
className: css$25.keywordValue,
|
|
5445
6036
|
children: String(value)
|
|
5446
6037
|
});
|
|
5447
6038
|
if (typeof value === "bigint") return jsx("span", {
|
|
5448
|
-
className: css$
|
|
6039
|
+
className: css$25.otherValue,
|
|
5449
6040
|
children: value.toString()
|
|
5450
6041
|
});
|
|
5451
6042
|
if (typeof value === "undefined") return jsx("span", {
|
|
5452
|
-
className: css$
|
|
6043
|
+
className: css$25.otherValue,
|
|
5453
6044
|
children: "undefined"
|
|
5454
6045
|
});
|
|
5455
6046
|
if (typeof value === "symbol") return jsx("span", {
|
|
5456
|
-
className: css$
|
|
6047
|
+
className: css$25.otherValue,
|
|
5457
6048
|
children: value.description ?? "Symbol"
|
|
5458
6049
|
});
|
|
5459
6050
|
if (typeof value === "function") return jsx("span", {
|
|
5460
|
-
className: css$
|
|
6051
|
+
className: css$25.otherValue,
|
|
5461
6052
|
children: value.name || "Function"
|
|
5462
6053
|
});
|
|
5463
6054
|
return null;
|
|
@@ -5471,71 +6062,71 @@ function previewValue(value, depth) {
|
|
|
5471
6062
|
const [open, close] = bracketOf(value);
|
|
5472
6063
|
return jsxs(Fragment, { children: [
|
|
5473
6064
|
jsx("span", {
|
|
5474
|
-
className: css$
|
|
6065
|
+
className: css$25.punctuation,
|
|
5475
6066
|
children: open
|
|
5476
6067
|
}),
|
|
5477
6068
|
depth >= PREVIEW_DEPTH_LIMIT ? jsx("span", {
|
|
5478
|
-
className: css$
|
|
6069
|
+
className: css$25.previewEllipsis,
|
|
5479
6070
|
children: "…"
|
|
5480
6071
|
}) : visible.map(([key, item], index) => jsxs("span", { children: [
|
|
5481
6072
|
index > 0 && jsx("span", {
|
|
5482
|
-
className: css$
|
|
6073
|
+
className: css$25.punctuation,
|
|
5483
6074
|
children: ", "
|
|
5484
6075
|
}),
|
|
5485
6076
|
!array && jsxs(Fragment, { children: [jsx("span", {
|
|
5486
|
-
className: css$
|
|
6077
|
+
className: css$25.previewProperty,
|
|
5487
6078
|
children: key
|
|
5488
6079
|
}), jsx("span", {
|
|
5489
|
-
className: css$
|
|
6080
|
+
className: css$25.punctuation,
|
|
5490
6081
|
children: ": "
|
|
5491
6082
|
})] }),
|
|
5492
6083
|
previewValue(item, depth + 1)
|
|
5493
6084
|
] }, key)),
|
|
5494
6085
|
depth < PREVIEW_DEPTH_LIMIT && entries.length > limit && jsx("span", {
|
|
5495
|
-
className: css$
|
|
6086
|
+
className: css$25.previewEllipsis,
|
|
5496
6087
|
children: ", …"
|
|
5497
6088
|
}),
|
|
5498
6089
|
jsx("span", {
|
|
5499
|
-
className: css$
|
|
6090
|
+
className: css$25.punctuation,
|
|
5500
6091
|
children: close
|
|
5501
6092
|
})
|
|
5502
6093
|
] });
|
|
5503
6094
|
}
|
|
5504
6095
|
function primitiveValue(value) {
|
|
5505
6096
|
if (value === null) return jsx("span", {
|
|
5506
|
-
className: css$
|
|
6097
|
+
className: css$25.keywordValue,
|
|
5507
6098
|
children: "null"
|
|
5508
6099
|
});
|
|
5509
6100
|
if (typeof value === "string") return jsx("span", {
|
|
5510
|
-
className: css$
|
|
6101
|
+
className: css$25.stringValue,
|
|
5511
6102
|
children: JSON.stringify(value)
|
|
5512
6103
|
});
|
|
5513
6104
|
if (typeof value === "boolean") return jsx("span", {
|
|
5514
|
-
className: css$
|
|
6105
|
+
className: css$25.keywordValue,
|
|
5515
6106
|
children: String(value)
|
|
5516
6107
|
});
|
|
5517
6108
|
if (typeof value === "number") return jsx("span", {
|
|
5518
|
-
className: css$
|
|
6109
|
+
className: css$25.numberValue,
|
|
5519
6110
|
children: String(value)
|
|
5520
6111
|
});
|
|
5521
6112
|
if (typeof value === "bigint") return jsx("span", {
|
|
5522
|
-
className: css$
|
|
6113
|
+
className: css$25.numberValue,
|
|
5523
6114
|
children: `${value.toString()}n`
|
|
5524
6115
|
});
|
|
5525
6116
|
if (value instanceof Date) return jsx("span", {
|
|
5526
|
-
className: css$
|
|
6117
|
+
className: css$25.otherValue,
|
|
5527
6118
|
children: value.toISOString()
|
|
5528
6119
|
});
|
|
5529
6120
|
if (typeof value === "function") return jsxs("span", {
|
|
5530
|
-
className: css$
|
|
6121
|
+
className: css$25.otherValue,
|
|
5531
6122
|
children: ["function() ", "{ }"]
|
|
5532
6123
|
});
|
|
5533
6124
|
if (typeof value === "undefined") return jsx("span", {
|
|
5534
|
-
className: css$
|
|
6125
|
+
className: css$25.otherValue,
|
|
5535
6126
|
children: "undefined"
|
|
5536
6127
|
});
|
|
5537
6128
|
return jsx("span", {
|
|
5538
|
-
className: css$
|
|
6129
|
+
className: css$25.otherValue,
|
|
5539
6130
|
children: value.toString()
|
|
5540
6131
|
});
|
|
5541
6132
|
}
|
|
@@ -5563,7 +6154,7 @@ function moveFocus(button, direction) {
|
|
|
5563
6154
|
function NodeField({ field, expandable, onToggle }) {
|
|
5564
6155
|
if (field === void 0) return null;
|
|
5565
6156
|
return jsxs("span", {
|
|
5566
|
-
className: clsx(css$
|
|
6157
|
+
className: clsx(css$25.label, expandable && css$25.clickableLabel),
|
|
5567
6158
|
onClick: expandable ? onToggle : void 0,
|
|
5568
6159
|
children: [fieldText(field), ":"]
|
|
5569
6160
|
});
|
|
@@ -5600,7 +6191,7 @@ function JsonString({ collapsedStringLines, stringWrapping, field, labels, lastE
|
|
|
5600
6191
|
if (!expanded) return;
|
|
5601
6192
|
const raw = rawRef.current;
|
|
5602
6193
|
const clips = [];
|
|
5603
|
-
const tree = raw.closest(`.${css$
|
|
6194
|
+
const tree = raw.closest(`.${css$25.root}`);
|
|
5604
6195
|
for (let parent = tree.parentElement; parent !== null; parent = parent.parentElement) if (/auto|scroll|hidden|clip/.test(getComputedStyle(parent).overflowY)) clips.push(parent);
|
|
5605
6196
|
const measure = () => {
|
|
5606
6197
|
let top = 0;
|
|
@@ -5629,33 +6220,33 @@ function JsonString({ collapsedStringLines, stringWrapping, field, labels, lastE
|
|
|
5629
6220
|
if (expanded) {
|
|
5630
6221
|
const fieldId = `${contentsId}-field`;
|
|
5631
6222
|
return jsxs("div", {
|
|
5632
|
-
className: css$
|
|
6223
|
+
className: css$25.stringField,
|
|
5633
6224
|
"data-expanded": true,
|
|
5634
6225
|
children: [
|
|
5635
6226
|
field !== void 0 && jsxs("span", {
|
|
5636
6227
|
id: fieldId,
|
|
5637
|
-
className: css$
|
|
6228
|
+
className: css$25.label,
|
|
5638
6229
|
children: [fieldText(field), ":"]
|
|
5639
6230
|
}),
|
|
5640
6231
|
jsx("pre", {
|
|
5641
6232
|
ref: rawRef,
|
|
5642
6233
|
id: contentsId,
|
|
5643
|
-
className: css$
|
|
6234
|
+
className: css$25.stringRaw,
|
|
5644
6235
|
"data-wrap": wrapped,
|
|
5645
6236
|
tabIndex: 0,
|
|
5646
6237
|
"aria-labelledby": field === void 0 ? void 0 : fieldId,
|
|
5647
6238
|
children: value
|
|
5648
6239
|
}),
|
|
5649
6240
|
!lastElement && jsx("span", {
|
|
5650
|
-
className: css$
|
|
6241
|
+
className: css$25.punctuation,
|
|
5651
6242
|
children: ","
|
|
5652
6243
|
}),
|
|
5653
6244
|
jsxs("div", {
|
|
5654
|
-
className: css$
|
|
6245
|
+
className: css$25.stringActions,
|
|
5655
6246
|
children: [
|
|
5656
6247
|
stringWrapping !== void 0 && jsx("button", {
|
|
5657
6248
|
type: "button",
|
|
5658
|
-
className: css$
|
|
6249
|
+
className: css$25.actionButton,
|
|
5659
6250
|
"aria-label": stringWrapping.label,
|
|
5660
6251
|
title: stringWrapping.label,
|
|
5661
6252
|
"aria-pressed": wrapped,
|
|
@@ -5669,7 +6260,7 @@ function JsonString({ collapsedStringLines, stringWrapping, field, labels, lastE
|
|
|
5669
6260
|
}),
|
|
5670
6261
|
jsx("button", {
|
|
5671
6262
|
type: "button",
|
|
5672
|
-
className: css$
|
|
6263
|
+
className: css$25.actionButton,
|
|
5673
6264
|
"aria-label": labels.collapseNode,
|
|
5674
6265
|
title: labels.collapseNode,
|
|
5675
6266
|
"aria-expanded": true,
|
|
@@ -5695,18 +6286,18 @@ function JsonString({ collapsedStringLines, stringWrapping, field, labels, lastE
|
|
|
5695
6286
|
});
|
|
5696
6287
|
}
|
|
5697
6288
|
return jsxs(Fragment, { children: [renderCopy?.(), jsx("span", {
|
|
5698
|
-
className: css$
|
|
6289
|
+
className: css$25.stringField,
|
|
5699
6290
|
"data-expanded": expanded,
|
|
5700
6291
|
children: jsxs("span", {
|
|
5701
6292
|
ref: contentRef,
|
|
5702
6293
|
id: contentsId,
|
|
5703
|
-
className: css$
|
|
6294
|
+
className: css$25.stringText,
|
|
5704
6295
|
children: [
|
|
5705
6296
|
truncated && jsx("span", {
|
|
5706
|
-
className: css$
|
|
6297
|
+
className: css$25.stringToggleSlot,
|
|
5707
6298
|
children: jsxs("button", {
|
|
5708
6299
|
type: "button",
|
|
5709
|
-
className: css$
|
|
6300
|
+
className: css$25.stringToggle,
|
|
5710
6301
|
"aria-label": labels.expandNode,
|
|
5711
6302
|
"aria-expanded": false,
|
|
5712
6303
|
"aria-controls": contentsId,
|
|
@@ -5721,12 +6312,12 @@ function JsonString({ collapsedStringLines, stringWrapping, field, labels, lastE
|
|
|
5721
6312
|
})
|
|
5722
6313
|
}),
|
|
5723
6314
|
field !== void 0 && jsxs("span", {
|
|
5724
|
-
className: css$
|
|
6315
|
+
className: css$25.label,
|
|
5725
6316
|
children: [fieldText(field), ":"]
|
|
5726
6317
|
}),
|
|
5727
6318
|
primitiveValue(value),
|
|
5728
6319
|
!lastElement && jsx("span", {
|
|
5729
|
-
className: css$
|
|
6320
|
+
className: css$25.punctuation,
|
|
5730
6321
|
children: ","
|
|
5731
6322
|
})
|
|
5732
6323
|
]
|
|
@@ -5757,7 +6348,7 @@ function JsonTreeNode({ collapsedStringLines, stringWrapping, field, initialExpa
|
|
|
5757
6348
|
}
|
|
5758
6349
|
};
|
|
5759
6350
|
const row = (children, ariaExpanded) => jsxs("div", {
|
|
5760
|
-
className: css$
|
|
6351
|
+
className: css$25.row,
|
|
5761
6352
|
role: "treeitem",
|
|
5762
6353
|
"aria-expanded": ariaExpanded,
|
|
5763
6354
|
onMouseOver: (event) => {
|
|
@@ -5792,7 +6383,7 @@ function JsonTreeNode({ collapsedStringLines, stringWrapping, field, initialExpa
|
|
|
5792
6383
|
}),
|
|
5793
6384
|
primitiveValue(value),
|
|
5794
6385
|
!lastElement && jsx("span", {
|
|
5795
|
-
className: css$
|
|
6386
|
+
className: css$25.punctuation,
|
|
5796
6387
|
children: ","
|
|
5797
6388
|
})
|
|
5798
6389
|
] }));
|
|
@@ -5804,22 +6395,22 @@ function JsonTreeNode({ collapsedStringLines, stringWrapping, field, initialExpa
|
|
|
5804
6395
|
onToggle: toggle
|
|
5805
6396
|
}),
|
|
5806
6397
|
jsx("span", {
|
|
5807
|
-
className: css$
|
|
6398
|
+
className: css$25.punctuation,
|
|
5808
6399
|
children: open
|
|
5809
6400
|
}),
|
|
5810
6401
|
jsx("span", {
|
|
5811
|
-
className: css$
|
|
6402
|
+
className: css$25.punctuation,
|
|
5812
6403
|
children: close
|
|
5813
6404
|
}),
|
|
5814
6405
|
!lastElement && jsx("span", {
|
|
5815
|
-
className: css$
|
|
6406
|
+
className: css$25.punctuation,
|
|
5816
6407
|
children: ","
|
|
5817
6408
|
})
|
|
5818
6409
|
] }));
|
|
5819
6410
|
return row(jsxs(Fragment, { children: [
|
|
5820
6411
|
jsx("span", {
|
|
5821
6412
|
ref: expanderRef,
|
|
5822
|
-
className: clsx(css$
|
|
6413
|
+
className: clsx(css$25.expander, expanded ? css$25.collapseIcon : css$25.expandIcon),
|
|
5823
6414
|
"data-json-expander": true,
|
|
5824
6415
|
role: "button",
|
|
5825
6416
|
"aria-label": expanded ? labels.collapseNode : labels.expandNode,
|
|
@@ -5833,7 +6424,7 @@ function JsonTreeNode({ collapsedStringLines, stringWrapping, field, initialExpa
|
|
|
5833
6424
|
onKeyDown: onExpanderKeyDown
|
|
5834
6425
|
}),
|
|
5835
6426
|
jsxs("span", {
|
|
5836
|
-
className: css$
|
|
6427
|
+
className: css$25.summary,
|
|
5837
6428
|
children: [
|
|
5838
6429
|
jsx(NodeField, {
|
|
5839
6430
|
field,
|
|
@@ -5841,11 +6432,11 @@ function JsonTreeNode({ collapsedStringLines, stringWrapping, field, initialExpa
|
|
|
5841
6432
|
onToggle: toggle
|
|
5842
6433
|
}),
|
|
5843
6434
|
jsx("span", {
|
|
5844
|
-
className: css$
|
|
6435
|
+
className: css$25.preview,
|
|
5845
6436
|
children: previewValue(value, 0)
|
|
5846
6437
|
}),
|
|
5847
6438
|
!lastElement && jsx("span", {
|
|
5848
|
-
className: css$
|
|
6439
|
+
className: css$25.punctuation,
|
|
5849
6440
|
children: ","
|
|
5850
6441
|
})
|
|
5851
6442
|
]
|
|
@@ -5853,7 +6444,7 @@ function JsonTreeNode({ collapsedStringLines, stringWrapping, field, initialExpa
|
|
|
5853
6444
|
expanded && jsx("ul", {
|
|
5854
6445
|
id: contentsId,
|
|
5855
6446
|
role: "group",
|
|
5856
|
-
className: css$
|
|
6447
|
+
className: css$25.children,
|
|
5857
6448
|
children: entries.map(([key, item], index) => jsx(JsonTreeNode, {
|
|
5858
6449
|
collapsedStringLines,
|
|
5859
6450
|
stringWrapping,
|
|
@@ -5985,17 +6576,17 @@ function JsonTree({ data, label, className, collapsedStringLines = 3, stringWrap
|
|
|
5985
6576
|
onClose: clearCopyTarget
|
|
5986
6577
|
}) : void 0;
|
|
5987
6578
|
return jsx("div", {
|
|
5988
|
-
className: clsx(css$
|
|
6579
|
+
className: clsx(css$25.root, className),
|
|
5989
6580
|
style: { "--json-tree-collapsed-lines": collapsedStringLines },
|
|
5990
6581
|
onMouseOver: handleRootMouseOver,
|
|
5991
6582
|
onMouseLeave: () => {
|
|
5992
6583
|
if (!copyStore.get()?.menuOpen) clearCopyTarget();
|
|
5993
6584
|
},
|
|
5994
6585
|
children: expandTopLevel ? jsxs("div", {
|
|
5995
|
-
className: css$
|
|
6586
|
+
className: css$25.expandedTopLevel,
|
|
5996
6587
|
children: [
|
|
5997
6588
|
jsxs("div", {
|
|
5998
|
-
className: clsx(css$
|
|
6589
|
+
className: clsx(css$25.row, css$25.topLevelBracket),
|
|
5999
6590
|
"data-json-root-row": true,
|
|
6000
6591
|
onMouseOver: (event) => {
|
|
6001
6592
|
event.stopPropagation();
|
|
@@ -6008,13 +6599,13 @@ function JsonTree({ data, label, className, collapsedStringLines = 3, stringWrap
|
|
|
6008
6599
|
path: [],
|
|
6009
6600
|
value: data
|
|
6010
6601
|
}), jsx("span", {
|
|
6011
|
-
className: css$
|
|
6602
|
+
className: css$25.punctuation,
|
|
6012
6603
|
children: rootOpen
|
|
6013
6604
|
})]
|
|
6014
6605
|
}),
|
|
6015
6606
|
jsx("div", {
|
|
6016
6607
|
"aria-label": label,
|
|
6017
|
-
className: clsx(css$
|
|
6608
|
+
className: clsx(css$25.container, css$25.expandedTopLevelContainer),
|
|
6018
6609
|
role: "tree",
|
|
6019
6610
|
children: rootEntries.map(([key, value], index) => jsx(JsonTreeNode, {
|
|
6020
6611
|
collapsedStringLines,
|
|
@@ -6032,16 +6623,16 @@ function JsonTree({ data, label, className, collapsedStringLines = 3, stringWrap
|
|
|
6032
6623
|
}, key))
|
|
6033
6624
|
}),
|
|
6034
6625
|
jsx("div", {
|
|
6035
|
-
className: clsx(css$
|
|
6626
|
+
className: clsx(css$25.row, css$25.topLevelBracket),
|
|
6036
6627
|
children: jsx("span", {
|
|
6037
|
-
className: css$
|
|
6628
|
+
className: css$25.punctuation,
|
|
6038
6629
|
children: rootClose
|
|
6039
6630
|
})
|
|
6040
6631
|
})
|
|
6041
6632
|
]
|
|
6042
6633
|
}) : jsx("div", {
|
|
6043
6634
|
"aria-label": label,
|
|
6044
|
-
className: css$
|
|
6635
|
+
className: css$25.container,
|
|
6045
6636
|
role: "tree",
|
|
6046
6637
|
children: jsx(JsonTreeNode, {
|
|
6047
6638
|
collapsedStringLines,
|
|
@@ -6579,67 +7170,68 @@ function TerminalBlock({ command, cwd, home, output, exitCode, signal, running =
|
|
|
6579
7170
|
const { hidden, capped, headLines, tailLines } = headTailCap(lines.length, maxLines, expanded);
|
|
6580
7171
|
const body = !running || !empty;
|
|
6581
7172
|
return jsxs("div", {
|
|
6582
|
-
className: clsx(css$
|
|
7173
|
+
className: clsx(css$26.block, className),
|
|
6583
7174
|
"data-terminal": "",
|
|
6584
7175
|
"data-running": running ? "" : void 0,
|
|
6585
7176
|
"data-body": body ? "" : void 0,
|
|
6586
7177
|
children: [jsxs("div", {
|
|
6587
|
-
className: css$
|
|
7178
|
+
className: css$26.header,
|
|
6588
7179
|
children: [
|
|
6589
7180
|
jsxs("div", {
|
|
6590
|
-
className: css$
|
|
7181
|
+
className: css$26.prompt,
|
|
6591
7182
|
children: [jsx("span", {
|
|
6592
|
-
className: css$
|
|
7183
|
+
className: css$26.runStateLabel,
|
|
6593
7184
|
children: state.label
|
|
6594
7185
|
}), commandLines.map((line, index) => jsxs("div", {
|
|
6595
|
-
className: css$
|
|
7186
|
+
className: css$26.promptLine,
|
|
6596
7187
|
children: [
|
|
6597
7188
|
index === 0 && jsx(StateDot, {
|
|
6598
7189
|
state: state.state,
|
|
6599
|
-
className: css$
|
|
7190
|
+
className: css$26.runState
|
|
6600
7191
|
}),
|
|
6601
7192
|
jsx("span", {
|
|
6602
|
-
className: css$
|
|
7193
|
+
className: css$26.cwd,
|
|
6603
7194
|
children: index > 0 || cwd === void 0 ? "$" : promptLabel(cwd, home)
|
|
6604
7195
|
}),
|
|
6605
|
-
jsx(
|
|
6606
|
-
className: css$
|
|
6607
|
-
|
|
7196
|
+
jsx(CommandText, {
|
|
7197
|
+
className: css$26.command,
|
|
7198
|
+
text: line,
|
|
7199
|
+
label: copy.commandLine(index + 1)
|
|
6608
7200
|
})
|
|
6609
7201
|
]
|
|
6610
7202
|
}, index))]
|
|
6611
7203
|
}),
|
|
6612
7204
|
status !== void 0 && jsx(Pill, {
|
|
6613
|
-
className: css$
|
|
7205
|
+
className: css$26.status,
|
|
6614
7206
|
children: status
|
|
6615
7207
|
}),
|
|
6616
7208
|
!running && !empty && jsx("button", {
|
|
6617
7209
|
type: "button",
|
|
6618
|
-
className: css$
|
|
7210
|
+
className: css$26.copyButton,
|
|
6619
7211
|
onClick: onCopy,
|
|
6620
7212
|
children: copied ? copy.copied : copy.copy
|
|
6621
7213
|
})
|
|
6622
7214
|
]
|
|
6623
7215
|
}), body && (empty ? jsx("div", {
|
|
6624
|
-
className: css$
|
|
7216
|
+
className: css$26.empty,
|
|
6625
7217
|
children: copy.noOutput
|
|
6626
7218
|
}) : jsxs("div", {
|
|
6627
|
-
className: css$
|
|
7219
|
+
className: css$26.output,
|
|
6628
7220
|
children: [
|
|
6629
7221
|
(capped ? lines.slice(0, headLines) : lines).map((line, index) => jsx("div", {
|
|
6630
|
-
className: css$
|
|
7222
|
+
className: css$26.line,
|
|
6631
7223
|
children: renderLine$1(line)
|
|
6632
7224
|
}, index)),
|
|
6633
7225
|
hidden > 0 && jsx("button", {
|
|
6634
7226
|
type: "button",
|
|
6635
|
-
className: css$
|
|
7227
|
+
className: css$26.expand,
|
|
6636
7228
|
"aria-expanded": expanded,
|
|
6637
7229
|
"aria-label": expanded ? copy.collapseAria : copy.expandAria(hidden),
|
|
6638
7230
|
onClick: onToggle,
|
|
6639
7231
|
children: expanded ? copy.collapse : copy.expand(hidden)
|
|
6640
7232
|
}),
|
|
6641
7233
|
capped && lines.slice(lines.length - tailLines).map((line, index) => jsx("div", {
|
|
6642
|
-
className: css$
|
|
7234
|
+
className: css$26.line,
|
|
6643
7235
|
children: renderLine$1(line)
|
|
6644
7236
|
}, index))
|
|
6645
7237
|
]
|
|
@@ -6812,6 +7404,13 @@ const regexEngine = createJavaScriptRegexEngine({
|
|
|
6812
7404
|
forgiving: true,
|
|
6813
7405
|
regexConstructor: (pattern) => defaultJavaScriptRegexConstructor(pattern, { lazyCompileLength: Number.POSITIVE_INFINITY })
|
|
6814
7406
|
});
|
|
7407
|
+
/**
|
|
7408
|
+
* Lines at least this many UTF-16 units long render as one uncolored token.
|
|
7409
|
+
* TextMate scanning cost grows superlinearly with line length (a 20,000-unit
|
|
7410
|
+
* string literal blocks the main thread for seconds), and minified or
|
|
7411
|
+
* generated lines are where that length occurs.
|
|
7412
|
+
*/
|
|
7413
|
+
const TOKENIZE_MAX_LINE_LENGTH = 1e3;
|
|
6815
7414
|
let singleton;
|
|
6816
7415
|
/** Representative paths through every boot grammar, compiled before user content is timed. */
|
|
6817
7416
|
const BOOT_GRAMMAR_WARMUPS = [
|
|
@@ -6919,7 +7518,8 @@ function highlightToHtml(code, lang) {
|
|
|
6919
7518
|
if (!ensureGrammar(resolved)) return void 0;
|
|
6920
7519
|
return highlighter().codeToHtml(code, {
|
|
6921
7520
|
lang: resolved,
|
|
6922
|
-
theme: "css-variables"
|
|
7521
|
+
theme: "css-variables",
|
|
7522
|
+
tokenizeMaxLineLength: TOKENIZE_MAX_LINE_LENGTH
|
|
6923
7523
|
});
|
|
6924
7524
|
}
|
|
6925
7525
|
/** vscode-textmate FontStyle bits shiki folds into `text-decoration` values. */
|
|
@@ -7012,6 +7612,7 @@ var StreamingHighlightSession = class {
|
|
|
7012
7612
|
return highlighter().codeToTokensBase(text, {
|
|
7013
7613
|
lang: resolved,
|
|
7014
7614
|
theme: "css-variables",
|
|
7615
|
+
tokenizeMaxLineLength: TOKENIZE_MAX_LINE_LENGTH,
|
|
7015
7616
|
...this.state === void 0 ? {} : { grammarState: this.state }
|
|
7016
7617
|
});
|
|
7017
7618
|
}
|
|
@@ -7091,7 +7692,8 @@ function highlightLines(code, lang) {
|
|
|
7091
7692
|
if (!ensureGrammar(resolved)) return void 0;
|
|
7092
7693
|
const { tokens } = highlighter().codeToTokens(code, {
|
|
7093
7694
|
lang: resolved,
|
|
7094
|
-
theme: "css-variables"
|
|
7695
|
+
theme: "css-variables",
|
|
7696
|
+
tokenizeMaxLineLength: TOKENIZE_MAX_LINE_LENGTH
|
|
7095
7697
|
});
|
|
7096
7698
|
const last = tokens[tokens.length - 1];
|
|
7097
7699
|
return (tokens.length > 1 && last !== void 0 && last.length === 0 ? tokens.slice(0, -1) : tokens).map((line) => line.map((token) => ({
|
|
@@ -7217,51 +7819,51 @@ function ReadBlock({ label, labels, lines, totalLines, lang, maxLines = 16, clas
|
|
|
7217
7819
|
const tailLines = maxLines - headLines;
|
|
7218
7820
|
const windowed = lines.length < totalLines;
|
|
7219
7821
|
const rows = (slice) => slice.map(([line, spans]) => jsxs("div", {
|
|
7220
|
-
className: css$
|
|
7822
|
+
className: css$27.line,
|
|
7221
7823
|
children: [jsx("span", {
|
|
7222
|
-
className: css$
|
|
7824
|
+
className: css$27.gutter,
|
|
7223
7825
|
"aria-hidden": true,
|
|
7224
7826
|
children: line.number
|
|
7225
7827
|
}), jsx("span", {
|
|
7226
|
-
className: css$
|
|
7828
|
+
className: css$27.content,
|
|
7227
7829
|
children: spans === void 0 ? line.text : renderSpans(spans)
|
|
7228
7830
|
})]
|
|
7229
7831
|
}, line.number));
|
|
7230
7832
|
const paired = lines.map((line, index) => [line, highlighted?.[index]]);
|
|
7231
7833
|
return jsxs("div", {
|
|
7232
7834
|
ref: rootRef,
|
|
7233
|
-
className: clsx(css$
|
|
7835
|
+
className: clsx(css$27.block, className),
|
|
7234
7836
|
"data-read": "",
|
|
7235
7837
|
children: [jsxs("div", {
|
|
7236
|
-
className: css$
|
|
7838
|
+
className: css$27.banner,
|
|
7237
7839
|
children: [jsx("div", {
|
|
7238
|
-
className: css$
|
|
7840
|
+
className: css$27.label,
|
|
7239
7841
|
children: label ?? ""
|
|
7240
7842
|
}), jsxs("div", {
|
|
7241
|
-
className: css$
|
|
7843
|
+
className: css$27.action,
|
|
7242
7844
|
children: [
|
|
7243
7845
|
windowed && jsx("span", {
|
|
7244
|
-
className: css$
|
|
7846
|
+
className: css$27.count,
|
|
7245
7847
|
children: labels.window(lines.length, totalLines)
|
|
7246
7848
|
}),
|
|
7247
7849
|
jsx("span", {
|
|
7248
|
-
className: css$
|
|
7850
|
+
className: css$27.lang,
|
|
7249
7851
|
children: lang ?? ""
|
|
7250
7852
|
}),
|
|
7251
7853
|
lines.length > 0 && jsx("button", {
|
|
7252
7854
|
type: "button",
|
|
7253
|
-
className: css$
|
|
7855
|
+
className: css$27.copyButton,
|
|
7254
7856
|
onClick: onCopy,
|
|
7255
7857
|
children: copied ? labels.copied : labels.copy
|
|
7256
7858
|
})
|
|
7257
7859
|
]
|
|
7258
7860
|
})]
|
|
7259
7861
|
}), jsxs("div", {
|
|
7260
|
-
className: css$
|
|
7862
|
+
className: css$27.body,
|
|
7261
7863
|
children: [
|
|
7262
7864
|
rows(capped ? paired.slice(0, headLines) : paired),
|
|
7263
7865
|
hidden > 0 && jsx(FoldToggle, {
|
|
7264
|
-
className: css$
|
|
7866
|
+
className: css$27.expand,
|
|
7265
7867
|
expanded,
|
|
7266
7868
|
hidden,
|
|
7267
7869
|
labels,
|
|
@@ -7283,11 +7885,11 @@ function assertNever(value) {
|
|
|
7283
7885
|
}
|
|
7284
7886
|
/** The dim class per row kind (path/gap chrome vs the diff's own +/- colors). */
|
|
7285
7887
|
const ROW_CLASS = {
|
|
7286
|
-
path: css$
|
|
7287
|
-
del: css$
|
|
7288
|
-
add: css$
|
|
7289
|
-
context: css$
|
|
7290
|
-
gap: css$
|
|
7888
|
+
path: css$28.path,
|
|
7889
|
+
del: css$28.del,
|
|
7890
|
+
add: css$28.add,
|
|
7891
|
+
context: css$28.context,
|
|
7892
|
+
gap: css$28.gap
|
|
7291
7893
|
};
|
|
7292
7894
|
/** Bound synchronous edit-graph search; one replacement consumes two edits. */
|
|
7293
7895
|
const MAX_DIFF_EDIT_LENGTH = 256;
|
|
@@ -7425,37 +8027,37 @@ function DiffBlock({ diffs, labels, maxLines = 16, className }) {
|
|
|
7425
8027
|
const head = capped ? rows.slice(0, headLines) : rows;
|
|
7426
8028
|
const tail = capped ? rows.slice(rows.length - tailLines) : [];
|
|
7427
8029
|
return jsxs("div", {
|
|
7428
|
-
className: clsx(css$
|
|
8030
|
+
className: clsx(css$28.block, className),
|
|
7429
8031
|
"data-diff": "",
|
|
7430
8032
|
children: [
|
|
7431
8033
|
jsx("button", {
|
|
7432
8034
|
type: "button",
|
|
7433
|
-
className: css$
|
|
8035
|
+
className: css$28.copyButton,
|
|
7434
8036
|
onClick: onCopy,
|
|
7435
8037
|
children: copied ? labels.copied : labels.copy
|
|
7436
8038
|
}),
|
|
7437
8039
|
jsxs("div", {
|
|
7438
|
-
className: css$
|
|
8040
|
+
className: css$28.body,
|
|
7439
8041
|
children: [
|
|
7440
8042
|
head.map((row, index) => jsx("div", {
|
|
7441
|
-
className: clsx(css$
|
|
8043
|
+
className: clsx(css$28.line, ROW_CLASS[row.kind]),
|
|
7442
8044
|
children: row.text
|
|
7443
8045
|
}, index)),
|
|
7444
8046
|
hidden > 0 && jsx(FoldToggle, {
|
|
7445
|
-
className: css$
|
|
8047
|
+
className: css$28.expand,
|
|
7446
8048
|
expanded,
|
|
7447
8049
|
hidden,
|
|
7448
8050
|
labels,
|
|
7449
8051
|
onToggle
|
|
7450
8052
|
}),
|
|
7451
8053
|
tail.map((row, index) => jsx("div", {
|
|
7452
|
-
className: clsx(css$
|
|
8054
|
+
className: clsx(css$28.line, ROW_CLASS[row.kind]),
|
|
7453
8055
|
children: row.text
|
|
7454
8056
|
}, index))
|
|
7455
8057
|
]
|
|
7456
8058
|
}),
|
|
7457
8059
|
jsxs("div", {
|
|
7458
|
-
className: css$
|
|
8060
|
+
className: css$28.footer,
|
|
7459
8061
|
children: [
|
|
7460
8062
|
"└ +",
|
|
7461
8063
|
added,
|
|
@@ -7591,56 +8193,56 @@ function SearchBlock(props) {
|
|
|
7591
8193
|
const tail = tailHeader === void 0 ? naturalTail : naturalTail.slice(1);
|
|
7592
8194
|
const renderRow = (row) => {
|
|
7593
8195
|
if (row.type === "path") return jsx("div", {
|
|
7594
|
-
className: css$
|
|
8196
|
+
className: css$29.line,
|
|
7595
8197
|
children: row.path
|
|
7596
8198
|
});
|
|
7597
8199
|
if (row.type === "match") return jsxs("div", {
|
|
7598
|
-
className: css$
|
|
8200
|
+
className: css$29.line,
|
|
7599
8201
|
children: [jsxs("span", {
|
|
7600
|
-
className: css$
|
|
8202
|
+
className: css$29.lineNumber,
|
|
7601
8203
|
children: [row.lineNumber, ": "]
|
|
7602
8204
|
}), row.line]
|
|
7603
8205
|
});
|
|
7604
8206
|
return jsxs("button", {
|
|
7605
8207
|
type: "button",
|
|
7606
|
-
className: css$
|
|
8208
|
+
className: css$29.fileHeader,
|
|
7607
8209
|
"aria-expanded": !row.collapsed,
|
|
7608
8210
|
onClick: () => {
|
|
7609
8211
|
toggleFile(row.index);
|
|
7610
8212
|
},
|
|
7611
8213
|
children: [jsx("span", {
|
|
7612
|
-
className: css$
|
|
8214
|
+
className: css$29.filePath,
|
|
7613
8215
|
children: row.path
|
|
7614
8216
|
}), jsx("span", {
|
|
7615
|
-
className: css$
|
|
8217
|
+
className: css$29.fileCount,
|
|
7616
8218
|
children: row.count
|
|
7617
8219
|
})]
|
|
7618
8220
|
});
|
|
7619
8221
|
};
|
|
7620
8222
|
return jsxs("div", {
|
|
7621
|
-
className: clsx(css$
|
|
8223
|
+
className: clsx(css$29.block, className),
|
|
7622
8224
|
"data-search": props.kind,
|
|
7623
8225
|
children: [jsxs("div", {
|
|
7624
|
-
className: css$
|
|
8226
|
+
className: css$29.header,
|
|
7625
8227
|
children: [jsx("span", {
|
|
7626
|
-
className: css$
|
|
8228
|
+
className: css$29.summary,
|
|
7627
8229
|
children: summaryText(props, shown, truncated, total)
|
|
7628
8230
|
}), !empty && jsx("button", {
|
|
7629
8231
|
type: "button",
|
|
7630
|
-
className: css$
|
|
8232
|
+
className: css$29.copyButton,
|
|
7631
8233
|
onClick: onCopy,
|
|
7632
8234
|
children: copied ? props.labels.copied : props.labels.copy
|
|
7633
8235
|
})]
|
|
7634
8236
|
}), empty ? jsx("div", {
|
|
7635
|
-
className: css$
|
|
8237
|
+
className: css$29.empty,
|
|
7636
8238
|
children: props.labels.noResults
|
|
7637
8239
|
}) : jsxs("div", {
|
|
7638
|
-
className: css$
|
|
8240
|
+
className: css$29.body,
|
|
7639
8241
|
children: [
|
|
7640
8242
|
head.map((row) => jsx("div", { children: renderRow(row) }, rowKey(row))),
|
|
7641
8243
|
hidden > 0 && jsx("button", {
|
|
7642
8244
|
type: "button",
|
|
7643
|
-
className: css$
|
|
8245
|
+
className: css$29.expand,
|
|
7644
8246
|
"aria-expanded": expanded,
|
|
7645
8247
|
"aria-label": expanded ? props.labels.collapseAria : props.labels.expandAria(hidden),
|
|
7646
8248
|
onClick: onToggle,
|
|
@@ -8468,7 +9070,7 @@ function CodeBlock({ code, lang, streaming, className, contentRef, lineNumbers =
|
|
|
8468
9070
|
});
|
|
8469
9071
|
}, [copied, trimmed]);
|
|
8470
9072
|
const body = streamedBody !== void 0 ? streamedBody : html === void 0 ? jsx("pre", {
|
|
8471
|
-
className: css$
|
|
9073
|
+
className: css$30.plain,
|
|
8472
9074
|
children: jsx("code", { children: sourceLines === void 0 ? trimmed : sourceLines.map((line, index) => jsxs(Fragment$1, { children: [index > 0 && "\n", jsx("span", {
|
|
8473
9075
|
className: "line",
|
|
8474
9076
|
children: line
|
|
@@ -8476,22 +9078,22 @@ function CodeBlock({ code, lang, streaming, className, contentRef, lineNumbers =
|
|
|
8476
9078
|
}) : jsx("div", { dangerouslySetInnerHTML: { __html: html } });
|
|
8477
9079
|
return jsxs("div", {
|
|
8478
9080
|
ref: rootRef,
|
|
8479
|
-
className: clsx(css$
|
|
9081
|
+
className: clsx(css$30.block, "md-code-block", lineNumbers && css$30.numbered, className),
|
|
8480
9082
|
"data-line-numbers": lineNumbers || void 0,
|
|
8481
9083
|
style: sourceLines === void 0 ? void 0 : { "--dsl-code-block-line-number-width": `${Math.max(2, String(sourceLines.length).length)}ch` },
|
|
8482
9084
|
children: [showHeader && jsx("div", {
|
|
8483
|
-
className: css$
|
|
9085
|
+
className: css$30.bannerWrap,
|
|
8484
9086
|
children: jsxs("div", {
|
|
8485
|
-
className: css$
|
|
9087
|
+
className: css$30.banner,
|
|
8486
9088
|
"data-code-block-banner": true,
|
|
8487
9089
|
children: [jsx("div", {
|
|
8488
|
-
className: css$
|
|
9090
|
+
className: css$30.infostring,
|
|
8489
9091
|
children: lang ?? ""
|
|
8490
9092
|
}), jsx("div", {
|
|
8491
|
-
className: css$
|
|
9093
|
+
className: css$30.action,
|
|
8492
9094
|
children: jsx("button", {
|
|
8493
9095
|
type: "button",
|
|
8494
|
-
className: css$
|
|
9096
|
+
className: css$30.copyButton,
|
|
8495
9097
|
onClick: onCopy,
|
|
8496
9098
|
children: copied ? copiedLabel : copyLabel
|
|
8497
9099
|
})
|
|
@@ -8499,7 +9101,7 @@ function CodeBlock({ code, lang, streaming, className, contentRef, lineNumbers =
|
|
|
8499
9101
|
})
|
|
8500
9102
|
}), jsx("div", {
|
|
8501
9103
|
ref: contentRef,
|
|
8502
|
-
className: css$
|
|
9104
|
+
className: css$30.content,
|
|
8503
9105
|
"data-code-block-content": true,
|
|
8504
9106
|
children: body
|
|
8505
9107
|
})]
|
|
@@ -8650,15 +9252,15 @@ function MermaidDiagram({ code, copyLabel, copiedLabel, diagramLabel, enlargedLa
|
|
|
8650
9252
|
};
|
|
8651
9253
|
}, [code, domId]);
|
|
8652
9254
|
if (state.status === "loading") return jsx("div", {
|
|
8653
|
-
className: css$
|
|
9255
|
+
className: css$31.stage,
|
|
8654
9256
|
"data-mermaid-loading": true,
|
|
8655
9257
|
"aria-hidden": "true"
|
|
8656
9258
|
});
|
|
8657
9259
|
if (state.status === "error") return jsxs("div", {
|
|
8658
|
-
className: css$
|
|
9260
|
+
className: css$31.error,
|
|
8659
9261
|
role: "alert",
|
|
8660
9262
|
children: [jsx("span", {
|
|
8661
|
-
className: css$
|
|
9263
|
+
className: css$31.errorLine,
|
|
8662
9264
|
children: state.message
|
|
8663
9265
|
}), jsx(CodeBlock, {
|
|
8664
9266
|
code: `${code}\n`,
|
|
@@ -8667,7 +9269,7 @@ function MermaidDiagram({ code, copyLabel, copiedLabel, diagramLabel, enlargedLa
|
|
|
8667
9269
|
})]
|
|
8668
9270
|
});
|
|
8669
9271
|
const stage = jsx("div", {
|
|
8670
|
-
className: css$
|
|
9272
|
+
className: css$31.stage,
|
|
8671
9273
|
"data-mermaid-diagram": true,
|
|
8672
9274
|
dangerouslySetInnerHTML: { __html: state.svg },
|
|
8673
9275
|
onClick: () => {
|
|
@@ -8682,13 +9284,13 @@ function MermaidDiagram({ code, copyLabel, copiedLabel, diagramLabel, enlargedLa
|
|
|
8682
9284
|
});
|
|
8683
9285
|
if (zoom === null) return stage;
|
|
8684
9286
|
return jsxs(Fragment, { children: [stage, createPortal(jsx("div", {
|
|
8685
|
-
className: css$
|
|
9287
|
+
className: css$31.zoomOverlay,
|
|
8686
9288
|
onClick: () => {
|
|
8687
9289
|
setZoom(null);
|
|
8688
9290
|
},
|
|
8689
9291
|
role: "presentation",
|
|
8690
9292
|
children: jsx("div", {
|
|
8691
|
-
className: css$
|
|
9293
|
+
className: css$31.zoomStage,
|
|
8692
9294
|
dangerouslySetInnerHTML: { __html: zoom },
|
|
8693
9295
|
onClick: (event) => {
|
|
8694
9296
|
event.stopPropagation();
|
|
@@ -8882,25 +9484,25 @@ function ImageLightbox({ src, alt, labels, onClose }) {
|
|
|
8882
9484
|
};
|
|
8883
9485
|
}, [onClose]);
|
|
8884
9486
|
return createPortal(jsxs("div", {
|
|
8885
|
-
className: css$
|
|
9487
|
+
className: css$32.backdrop,
|
|
8886
9488
|
role: "dialog",
|
|
8887
9489
|
"aria-modal": "true",
|
|
8888
9490
|
"aria-label": labels.dialog,
|
|
8889
9491
|
children: [
|
|
8890
9492
|
jsx("div", {
|
|
8891
|
-
className: css$
|
|
9493
|
+
className: css$32.mask,
|
|
8892
9494
|
"aria-hidden": "true",
|
|
8893
9495
|
onMouseDown: onClose
|
|
8894
9496
|
}),
|
|
8895
9497
|
jsx("img", {
|
|
8896
|
-
className: css$
|
|
9498
|
+
className: css$32.image,
|
|
8897
9499
|
src,
|
|
8898
9500
|
alt
|
|
8899
9501
|
}),
|
|
8900
9502
|
jsx("button", {
|
|
8901
9503
|
ref: closeRef,
|
|
8902
9504
|
type: "button",
|
|
8903
|
-
className: css$
|
|
9505
|
+
className: css$32.close,
|
|
8904
9506
|
"aria-label": labels.close,
|
|
8905
9507
|
onClick: onClose,
|
|
8906
9508
|
children: jsx(IconCloseOutline16, { size: 16 })
|
|
@@ -8927,14 +9529,14 @@ function ImagePreview({ src, alt, loadingLabel, failedLabel }) {
|
|
|
8927
9529
|
function Preview({ src, alt, loadingLabel, failedLabel }) {
|
|
8928
9530
|
const [state, setState] = useState("loading");
|
|
8929
9531
|
return jsxs("span", {
|
|
8930
|
-
className: css$
|
|
9532
|
+
className: css$33.frame,
|
|
8931
9533
|
children: [state !== "failed" && jsx("img", {
|
|
8932
9534
|
src,
|
|
8933
9535
|
alt,
|
|
8934
9536
|
loading: "lazy",
|
|
8935
9537
|
decoding: "async",
|
|
8936
9538
|
referrerPolicy: "no-referrer",
|
|
8937
|
-
className: css$
|
|
9539
|
+
className: css$33.image,
|
|
8938
9540
|
"data-ready": state === "ready" || void 0,
|
|
8939
9541
|
onLoad: () => {
|
|
8940
9542
|
setState("ready");
|
|
@@ -8943,7 +9545,7 @@ function Preview({ src, alt, loadingLabel, failedLabel }) {
|
|
|
8943
9545
|
setState("failed");
|
|
8944
9546
|
}
|
|
8945
9547
|
}), state !== "ready" && jsxs("span", {
|
|
8946
|
-
className: css$
|
|
9548
|
+
className: css$33.status,
|
|
8947
9549
|
role: "status",
|
|
8948
9550
|
children: [state === "loading" && jsx(IconLoadingOutline16, { size: 16 }), jsx("span", { children: state === "loading" ? loadingLabel : failedLabel })]
|
|
8949
9551
|
})]
|
|
@@ -9714,7 +10316,7 @@ function SafeLink({ url, label, className }) {
|
|
|
9714
10316
|
children: [jsx(LinkIcon, {
|
|
9715
10317
|
kind: "url",
|
|
9716
10318
|
href,
|
|
9717
|
-
className: css$
|
|
10319
|
+
className: css$34.linkIcon
|
|
9718
10320
|
}), label]
|
|
9719
10321
|
});
|
|
9720
10322
|
}
|
|
@@ -9729,20 +10331,20 @@ function SafeLink({ url, label, className }) {
|
|
|
9729
10331
|
*/
|
|
9730
10332
|
function SourceItem({ source, ordinal }) {
|
|
9731
10333
|
return jsxs("li", {
|
|
9732
|
-
className: css$
|
|
10334
|
+
className: css$34.source,
|
|
9733
10335
|
value: ordinal,
|
|
9734
10336
|
children: [
|
|
9735
10337
|
jsx(SafeLink, {
|
|
9736
10338
|
url: source.url,
|
|
9737
10339
|
label: linkLabel(source.url, source.title),
|
|
9738
|
-
className: css$
|
|
10340
|
+
className: css$34.sourceLink
|
|
9739
10341
|
}),
|
|
9740
10342
|
source.snippet !== void 0 && source.snippet !== "" && jsx("div", {
|
|
9741
|
-
className: css$
|
|
10343
|
+
className: css$34.snippet,
|
|
9742
10344
|
children: source.snippet
|
|
9743
10345
|
}),
|
|
9744
10346
|
source.publishedAt !== void 0 && source.publishedAt !== "" && jsx("div", {
|
|
9745
|
-
className: css$
|
|
10347
|
+
className: css$34.published,
|
|
9746
10348
|
children: source.publishedAt
|
|
9747
10349
|
})
|
|
9748
10350
|
]
|
|
@@ -9757,28 +10359,28 @@ function SourceItem({ source, ordinal }) {
|
|
|
9757
10359
|
function WebSearchBlock({ answer, sources, truncated, labels, className }) {
|
|
9758
10360
|
const empty = (answer === void 0 || answer === "") && sources.length === 0;
|
|
9759
10361
|
return jsxs("div", {
|
|
9760
|
-
className: clsx(css$
|
|
10362
|
+
className: clsx(css$34.block, className),
|
|
9761
10363
|
"data-web": "search",
|
|
9762
10364
|
children: [
|
|
9763
10365
|
answer !== void 0 && answer !== "" && jsx("div", {
|
|
9764
|
-
className: css$
|
|
10366
|
+
className: css$34.answer,
|
|
9765
10367
|
children: jsx(MarkdownText, {
|
|
9766
10368
|
text: answer,
|
|
9767
10369
|
labels: labels.markdown
|
|
9768
10370
|
})
|
|
9769
10371
|
}),
|
|
9770
10372
|
empty ? jsx("div", {
|
|
9771
|
-
className: css$
|
|
10373
|
+
className: css$34.empty,
|
|
9772
10374
|
children: labels.noResults
|
|
9773
10375
|
}) : jsx("ol", {
|
|
9774
|
-
className: css$
|
|
10376
|
+
className: css$34.sources,
|
|
9775
10377
|
children: sources.map((source, index) => jsx(SourceItem, {
|
|
9776
10378
|
source,
|
|
9777
10379
|
ordinal: index + 1
|
|
9778
10380
|
}, index))
|
|
9779
10381
|
}),
|
|
9780
10382
|
truncated && jsx("div", {
|
|
9781
|
-
className: css$
|
|
10383
|
+
className: css$34.truncated,
|
|
9782
10384
|
children: labels.sourcesTruncated
|
|
9783
10385
|
})
|
|
9784
10386
|
]
|
|
@@ -9791,23 +10393,23 @@ function WebSearchBlock({ answer, sources, truncated, labels, className }) {
|
|
|
9791
10393
|
*/
|
|
9792
10394
|
function WebFetchBlock({ url, statusCode, truncated, labels, className }) {
|
|
9793
10395
|
return jsxs("div", {
|
|
9794
|
-
className: clsx(css$
|
|
10396
|
+
className: clsx(css$34.block, css$34.fetch, className),
|
|
9795
10397
|
"data-web": "fetch",
|
|
9796
10398
|
children: [jsx(SafeLink, {
|
|
9797
10399
|
url,
|
|
9798
10400
|
label: url,
|
|
9799
|
-
className: css$
|
|
10401
|
+
className: css$34.fetchUrl
|
|
9800
10402
|
}), jsxs("div", {
|
|
9801
|
-
className: css$
|
|
10403
|
+
className: css$34.fetchMeta,
|
|
9802
10404
|
children: [jsxs("span", {
|
|
9803
|
-
className: css$
|
|
10405
|
+
className: css$34.status,
|
|
9804
10406
|
children: [
|
|
9805
10407
|
labels.http,
|
|
9806
10408
|
" ",
|
|
9807
10409
|
statusCode
|
|
9808
10410
|
]
|
|
9809
10411
|
}), truncated && jsx("span", {
|
|
9810
|
-
className: css$
|
|
10412
|
+
className: css$34.truncated,
|
|
9811
10413
|
children: labels.contentTruncated
|
|
9812
10414
|
})]
|
|
9813
10415
|
})]
|
|
@@ -9841,10 +10443,10 @@ function JsonBlock({ label, payload, defaultOpen = false, truncatedLabel }) {
|
|
|
9841
10443
|
truncatedLabel
|
|
9842
10444
|
]);
|
|
9843
10445
|
return jsxs("div", {
|
|
9844
|
-
className: css$
|
|
10446
|
+
className: css$35.root,
|
|
9845
10447
|
children: [jsxs("button", {
|
|
9846
10448
|
type: "button",
|
|
9847
|
-
className: css$
|
|
10449
|
+
className: css$35.toggle,
|
|
9848
10450
|
onClick: () => {
|
|
9849
10451
|
setOpen((v) => !v);
|
|
9850
10452
|
},
|
|
@@ -9854,7 +10456,7 @@ function JsonBlock({ label, payload, defaultOpen = false, truncatedLabel }) {
|
|
|
9854
10456
|
label
|
|
9855
10457
|
]
|
|
9856
10458
|
}), open && jsx("pre", {
|
|
9857
|
-
className: css$
|
|
10459
|
+
className: css$35.body,
|
|
9858
10460
|
children: body
|
|
9859
10461
|
})]
|
|
9860
10462
|
});
|
|
@@ -9944,17 +10546,17 @@ function MenuGroup({ label, children }) {
|
|
|
9944
10546
|
role: "group",
|
|
9945
10547
|
"aria-labelledby": headingId,
|
|
9946
10548
|
"data-menu-group": "",
|
|
9947
|
-
className: css$
|
|
10549
|
+
className: css$36.group,
|
|
9948
10550
|
children: [
|
|
9949
10551
|
jsx("span", {
|
|
9950
10552
|
"aria-hidden": "true",
|
|
9951
10553
|
"data-menu-group-start": "",
|
|
9952
|
-
className: css$
|
|
10554
|
+
className: css$36.start
|
|
9953
10555
|
}),
|
|
9954
10556
|
jsx("div", {
|
|
9955
10557
|
id: headingId,
|
|
9956
10558
|
"data-menu-group-heading": "",
|
|
9957
|
-
className: css$
|
|
10559
|
+
className: css$36.heading,
|
|
9958
10560
|
children: label
|
|
9959
10561
|
}),
|
|
9960
10562
|
children
|
|
@@ -10070,20 +10672,20 @@ const MenuSurface = forwardRef(function MenuSurface({ compact = false, className
|
|
|
10070
10672
|
...props,
|
|
10071
10673
|
ref,
|
|
10072
10674
|
"data-menu-material": "translucent",
|
|
10073
|
-
className: clsx(css$
|
|
10675
|
+
className: clsx(css$37.surface, compact && css$37.compact, className),
|
|
10074
10676
|
style: {
|
|
10075
10677
|
...style,
|
|
10076
10678
|
...anchorStyle
|
|
10077
10679
|
},
|
|
10078
10680
|
children: [jsx("div", {
|
|
10079
10681
|
"aria-hidden": "true",
|
|
10080
|
-
className: css$
|
|
10682
|
+
className: css$37.material
|
|
10081
10683
|
}), children]
|
|
10082
10684
|
}), createPortal(jsx("div", {
|
|
10083
10685
|
ref: backingRef,
|
|
10084
10686
|
"aria-hidden": "true",
|
|
10085
10687
|
"data-menu-backing": "",
|
|
10086
|
-
className: clsx(css$
|
|
10688
|
+
className: clsx(css$37.backing, compact && css$37.compact),
|
|
10087
10689
|
style: {
|
|
10088
10690
|
...anchorStyle,
|
|
10089
10691
|
visibility: style?.visibility
|
|
@@ -10091,6 +10693,6 @@ const MenuSurface = forwardRef(function MenuSurface({ compact = false, className
|
|
|
10091
10693
|
}), document.body)] });
|
|
10092
10694
|
});
|
|
10093
10695
|
//#endregion
|
|
10094
|
-
export { Button, Checkbox, CodeBlock, ConnectionIndicator, DEFAULT_DIFF_MAX_LINES, DEFAULT_READ_MAX_LINES, DEFAULT_SEARCH_MAX_LINES, DEFAULT_TERMINAL_MAX_LINES, DiffBlock, DisclosureRow, FileTypeIcon, HoverCard, IconAgentPresetOutline16, IconAlarmClockOutline16, IconApiOutline14, IconArchiveOutline20, IconBranchOutline16, IconBrowseOutline16, IconCheckOutline14, IconCheckOutline16, IconChecklistOutline14, IconChevronDownOutline14, IconChevronLeftOutline14, IconChevronRightOutline14, IconChevronUpOutline14, IconClockOutline16, IconCloseFill14, IconCloseOutline16, IconCodeOutline16, IconCompactOutline16, IconContextInjectionOutline16, IconCopyOutline16, IconCordisPluginOutline14, IconDarkOutline16, IconDataOutline16, IconDatabaseOutline16, IconDislikeFill16, IconDislikeOutline16, IconDownloadOutline16, IconEditOutline16, IconEllipsisOutline16, IconEnhanceOutline16, IconFolderClose16, IconFolderOpen16, IconFolderOpenOutline16, IconFollowsystemOutline16, IconFullscreenOutline16, IconGaugeOutline16, IconGlobeOutline14, IconGoalOutline16, IconInfoOutline14, IconInspectOutline12, IconLightOutline16, IconLikeFill16, IconLikeOutline16, IconLinkOutline14, IconLinkOutline16, IconListPenOutline16, IconLoadingOutline16, IconLogoutOutline16, IconMicrophoneOutline16, IconNewChatOutline16, IconPanelLeftOutline16, IconPaperPlaneOutline14, IconPaperclipOutline16, IconPauseOutline16, IconPersonalizationOutline16, IconPinFillRegular, IconPinOutlineRegular, IconPlanOutline14, IconPlayOutline16, IconPluginPinwheelOutline16, IconPlusOutline16, IconProjectAddOutline16, IconQuestionOutline14, IconQueueOutline14, IconRefreshOutline14, IconRefreshOutline16, IconRightUpOutline14, IconRightUpOutline16, IconSearchOutline16, IconSendOutline14, IconSendOutline16, IconSettingsOutline14, IconSettingsOutline16, IconShareOutline16, IconShieldOutline16, IconSkillOutline16, IconSparkle16, IconStopFill16, IconTerminalOutline16, IconThinkOutline14, IconThinkOutline16, IconTrashOutline16, IconTreeCorner8x10, IconTriangleRightFill14, IconUserOutline16, IconWarningOutline16, IconWrapLinesOutline16, ImageLightbox, Input, JsonBlock, JsonTree, LinkIcon, MarkdownDelegateProvider, MarkdownText, Menu, MenuGroup, MenuItemButton, MenuSurface, Modal, OnboardingSurface, PathLabel, Pill, QilinSeal, ReadBlock, ReferenceIcon, RiskConfirmation, SHIELD_OUTLINE_PATH, SHIELD_OUTLINE_STROKE, SearchBlock, SegmentedControl, ShortcutKeys, StateDot, Switch, Tag, TerminalBlock, TextShimmer, Toast, Tooltip, WebBlock, classifyFileType, classifyLinkPath, closeTopModal, diffTotals, extractMarkdownPlainText, fileExtension, fileSizeRoundedText, fileSizeText, focusWithoutRing, isBehindModal, isDarwinDesktop, modalSelector, observeComposition, observeStickyMenuGroups, overlayTopMargin, projectUserText, rankByName, relativeTime, useAnchoredMaxHeight, useAnchoredPosition, useCopyFeedback, useDismissOnOutsidePointer, useModalLayer, writeClipboard };
|
|
10696
|
+
export { Button, Checkbox, CodeBlock, CommandText, ConnectionIndicator, DEFAULT_DIFF_MAX_LINES, DEFAULT_READ_MAX_LINES, DEFAULT_SEARCH_MAX_LINES, DEFAULT_TERMINAL_MAX_LINES, DiffBlock, DisclosureRow, FileTypeIcon, HoverCard, IconAgentPresetOutline16, IconAlarmClockOutline16, IconApiOutline14, IconArchiveOutline20, IconBranchOutline16, IconBranchOutline16 as IconBranchOutlineRegular, IconBrowseOutline16, IconCheckOutline14, IconCheckOutline16, IconCheckOutline16 as IconCheckOutlineRegular, IconChecklistOutline14, IconChecklistOutline14 as IconChecklistOutlineRegular, IconChevronDownOutline14, IconChevronDownOutline14 as IconChevronDownOutlineMedium, IconChevronLeftOutline14, IconChevronRightOutline14, IconChevronUpOutline14, IconChevronUpOutline14 as IconChevronUpOutlineMedium, IconClockOutline16, IconCloseFill14, IconCloseOutline16, IconCloseOutline16 as IconCloseOutlineRegular, IconCodeOutline16, IconCompactOutline16, IconContextInjectionOutline16, IconCopyOutline16, IconCopyOutline16 as IconCopyOutlineRegular, IconCordisPluginOutline14, IconDarkOutline16, IconDataOutline16, IconDatabaseOutline16, IconDislikeFill16, IconDislikeOutline16, IconDownloadOutline16, IconEditOutline16, IconEllipsisOutline16, IconEnhanceOutline16, IconFolderClose16, IconFolderOpen16, IconFolderOpenOutline16, IconFollowsystemOutline16, IconFullscreenOutline16, IconGaugeOutline16, IconGlobeOutline14, IconGoalOutline16, IconInfoOutline14, IconInspectOutline12, IconLightOutline16, IconLikeFill16, IconLikeOutline16, IconLinkOutline14, IconLinkOutline16, IconListPenOutline16, IconLoadingOutline16, IconLogoutOutline16, IconMicrophoneOutline16, IconNewChatOutline16, IconPanelLeftOutline16, IconPaperPlaneOutline14, IconPaperclipOutline16, IconPauseOutline16, IconPersonalizationOutline16, IconPinFillRegular, IconPinOutlineRegular, IconPlanOutline14, IconPlayOutline16, IconPluginPinwheelOutline16, IconPlusOutline16, IconPlusOutline16 as IconPlusOutlineRegular, IconProjectAddOutline16, IconQuestionOutline14, IconQueueOutline14, IconRefreshOutline14, IconRefreshOutline16, IconRightUpOutline14, IconRightUpOutline16, IconSearchOutline16, IconSearchOutline16 as IconSearchOutlineRegular, IconSendOutline14, IconSendOutline16, IconSendOutline16 as IconSendOutlineRegular, IconSettingsOutline14, IconSettingsOutline14 as IconSettingsOutlineMedium, IconSettingsOutline16, IconShareOutline16, IconShieldOutline16, IconSkillOutline16, IconSparkle16, IconStopFill16, IconTerminalOutline16, IconThinkOutline14, IconThinkOutline16, IconTrashOutline16, IconTreeCorner8x10, IconTriangleRightFill14, IconUserOutline16, IconUserOutline16 as IconUserOutlineRegular, IconUsersOutlineRegular, IconWarningOutline16, IconWorkspaceTreeOutlineRegular, IconWrapLinesOutline16, ImageLightbox, Input, JsonBlock, JsonTree, LinkIcon, MarkdownDelegateProvider, MarkdownText, Menu, MenuGroup, MenuItemButton, MenuSurface, Modal, OnboardingSurface, PathLabel, Pill, QilinSeal, ReadBlock, ReferenceIcon, RiskConfirmation, SHIELD_OUTLINE_PATH, SHIELD_OUTLINE_STROKE, SearchBlock, SegmentedControl, SettingsForm, SettingsFormModel, SettingsSecretField, SettingsValueField, ShortcutKeys, StateDot, Switch, Tag, TerminalBlock, TextShimmer, Toast, Tooltip, WebBlock, classifyFileType, classifyLinkPath, closeTopModal, diffTotals, extractMarkdownPlainText, fileExtension, fileSizeRoundedText, fileSizeText, focusWithoutRing, isBehindModal, isDarwinDesktop, modalSelector, observeComposition, observeStickyMenuGroups, overlayTopMargin, projectUserText, rankByName, relativeTime, settingsNumberField, settingsTextField, useAnchoredMaxHeight, useAnchoredPosition, useCopyFeedback, useDismissOnOutsidePointer, useModalLayer, watchDarwinDesktop, writeClipboard };
|
|
10095
10697
|
|
|
10096
10698
|
//# sourceMappingURL=index.js.map
|