@morlay/ui-conversation-message-actions 0.1.4 → 0.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/dist/client.cjs +1216 -2337
- package/dist/{rolldown-runtime-BMI-E3GI.mjs → rolldown-runtime-Dr7-SnC6.mjs} +2 -1
- package/dist/testing.mjs +1 -1
- package/package.json +4 -4
- package/src/client/chat-node/MessageItem.tsx +36 -17
- package/src/client/index.ts +1 -6
- package/src/client/chat-node/MessageIconActions.styles.ts +0 -76
- package/src/client/chat-node/MessageIconActions.tsx +0 -166
- package/src/client/chat-node/MessageItem.styles.ts +0 -248
- package/src/client/chat-node/message-chrome.ts +0 -44
- package/src/client/chat-node/use-calendar-day.ts +0 -19
- package/src/client/composer-stats/StatsPills.styles.ts +0 -57
- package/src/client/composer-stats/StatsPills.tsx +0 -362
- package/src/client/composer-stats/register.ts +0 -17
- package/src/client/composer-stats/stat-dialog.styles.ts +0 -70
- package/src/client/composer-stats/stat-dialog.ts +0 -52
- package/src/client/composer-stats/token-format.ts +0 -84
- package/src/client/composer-stats/turn-reading.ts +0 -35
package/dist/client.cjs
CHANGED
|
@@ -6,6 +6,9 @@ window.__ModuleLoader__.load({
|
|
|
6
6
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
7
7
|
//#region \0rolldown/runtime.js
|
|
8
8
|
var __defProp = Object.defineProperty;
|
|
9
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
10
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
11
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
12
|
var __exportAll = (all, no_symbols) => {
|
|
10
13
|
let target = {};
|
|
11
14
|
for (var name in all) __defProp(target, name, {
|
|
@@ -15,13 +18,23 @@ window.__ModuleLoader__.load({
|
|
|
15
18
|
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
16
19
|
return target;
|
|
17
20
|
};
|
|
21
|
+
var __copyProps = (to, from, except, desc) => {
|
|
22
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
23
|
+
key = keys[i];
|
|
24
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
25
|
+
get: ((k) => from[k]).bind(null, key),
|
|
26
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
return to;
|
|
30
|
+
};
|
|
31
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
18
32
|
//#endregion
|
|
19
33
|
let _deepseek_ai_dsh_client_store = require("@deepseek-ai/dsh-client-store");
|
|
20
34
|
let _deepseek_ai_cordis = require("@deepseek-ai/cordis");
|
|
21
35
|
let react = require("react");
|
|
22
36
|
let _deepseek_ai_dsh_client_ui_primitives = require("@deepseek-ai/dsh-client-ui-primitives");
|
|
23
37
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
24
|
-
let react_dom = require("react-dom");
|
|
25
38
|
//#region src/shared.ts
|
|
26
39
|
const SESSION_EDITOR_PATHS = {
|
|
27
40
|
edit: "/api/morlay/v1/session/edit",
|
|
@@ -1038,7 +1051,7 @@ window.__ModuleLoader__.load({
|
|
|
1038
1051
|
return this.#ns;
|
|
1039
1052
|
}
|
|
1040
1053
|
refresh() {
|
|
1041
|
-
this.#
|
|
1054
|
+
this.#sync();
|
|
1042
1055
|
}
|
|
1043
1056
|
dispose() {
|
|
1044
1057
|
for (const dispose of this.#disposers.splice(0)) dispose();
|
|
@@ -1558,1212 +1571,37 @@ window.__ModuleLoader__.load({
|
|
|
1558
1571
|
return prefix.every((segment, index) => path[index] === segment);
|
|
1559
1572
|
}
|
|
1560
1573
|
//#endregion
|
|
1561
|
-
//#region
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
}
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
const tokensSymbol = Symbol("tokens");
|
|
1592
|
-
const tokenInstSymbol = Symbol("tokenInst");
|
|
1593
|
-
const SELF = "$";
|
|
1594
|
-
function tokenVars(token, tokens, path) {
|
|
1595
|
-
const reserved = /* @__PURE__ */ new Set([
|
|
1596
|
-
"constructor",
|
|
1597
|
-
"toJSON",
|
|
1598
|
-
"__proto__"
|
|
1599
|
-
]);
|
|
1600
|
-
return new Proxy(() => {}, {
|
|
1601
|
-
apply() {
|
|
1602
|
-
return Token.fallbackVar(token.cssVar(path));
|
|
1603
|
-
},
|
|
1604
|
-
get(_target, property) {
|
|
1605
|
-
if (property === Symbol.toPrimitive || property === Symbol.toStringTag || property === "toString") return () => `var(${token.cssVar(path)})`;
|
|
1606
|
-
if (property === "valueOf") return () => Token.fallbackVar(token.cssVar(path));
|
|
1607
|
-
if (property === tokenInstSymbol) return token;
|
|
1608
|
-
if (property === tokensSymbol) return tokens;
|
|
1609
|
-
if (property === cssVarSymbol) return token.cssVar(path);
|
|
1610
|
-
if (!isString(property) || reserved.has(property)) return void 0;
|
|
1611
|
-
const next = tokens[property];
|
|
1612
|
-
if (isUndefined(next)) return void 0;
|
|
1613
|
-
return tokenVars(token, next, [...path, property]);
|
|
1614
|
-
}
|
|
1615
|
-
});
|
|
1616
|
-
}
|
|
1617
|
-
var Token = class Token {
|
|
1618
|
-
prefix;
|
|
1619
|
-
static vars(tokens, options = {}) {
|
|
1620
|
-
return tokenVars(new Token(options.prefix ?? ""), tokens, []);
|
|
1621
|
-
}
|
|
1622
|
-
static extendsVars(vars, extra) {
|
|
1623
|
-
const tokens = vars[tokensSymbol] ?? {};
|
|
1624
|
-
return Token.vars(toMerged(tokens, extra));
|
|
1625
|
-
}
|
|
1626
|
-
static assignVars(vars, overwrites) {
|
|
1627
|
-
const tokens = overwrites ?? vars[tokensSymbol] ?? {};
|
|
1628
|
-
const token = vars[tokenInstSymbol] ?? new Token("");
|
|
1629
|
-
const result = {};
|
|
1630
|
-
for (const [name, value] of flattenTokens(token, tokens, [])) result[name] = token.normalize(value);
|
|
1631
|
-
return result;
|
|
1632
|
-
}
|
|
1633
|
-
static variants(variants) {
|
|
1634
|
-
return mapKeys(variants, (key) => `&[data-variant="${key}"]`);
|
|
1635
|
-
}
|
|
1636
|
-
static val(strings, ...values) {
|
|
1637
|
-
return function* () {
|
|
1638
|
-
for (let index = 0; index < strings.length; index += 1) {
|
|
1639
|
-
const literal = strings[index];
|
|
1640
|
-
if (literal) yield literal;
|
|
1641
|
-
if (index >= values.length) continue;
|
|
1642
|
-
const value = values[index];
|
|
1643
|
-
yield* isFunction(value) ? value() : [value];
|
|
1644
|
-
}
|
|
1645
|
-
};
|
|
1646
|
-
}
|
|
1647
|
-
static calc(strings, ...values) {
|
|
1648
|
-
return combinator("calc(", ")", strings, values);
|
|
1649
|
-
}
|
|
1650
|
-
static min(strings, ...values) {
|
|
1651
|
-
return combinator("min(", ")", strings, values);
|
|
1652
|
-
}
|
|
1653
|
-
static max(strings, ...values) {
|
|
1654
|
-
return combinator("max(", ")", strings, values);
|
|
1655
|
-
}
|
|
1656
|
-
static url(strings, ...values) {
|
|
1657
|
-
return combinator("url(", ")", strings, values);
|
|
1658
|
-
}
|
|
1659
|
-
static colorMix(strings, ...values) {
|
|
1660
|
-
return combinator("color-mix(", ")", strings, values);
|
|
1661
|
-
}
|
|
1662
|
-
static colorScale(color, options = {}) {
|
|
1663
|
-
const channel = (name, amount, max) => Token.calc`${name} + (${String(max)} - ${name}) * max(${amount}, 0) + ${name} * min(${amount}, 0)`;
|
|
1664
|
-
const mix = (from, to, amount) => Token.colorMix`in srgb, ${from}, ${to} ${Token.calc`${amount} * 100%`}`;
|
|
1665
|
-
let result = color;
|
|
1666
|
-
if (!isUndefined(options.alpha) || !isUndefined(options.lightness) || !isUndefined(options.saturation)) result = Token.val`hsl(from ${result} h ${isUndefined(options.saturation) ? "s" : channel("s", options.saturation, 100)} ${isUndefined(options.lightness) ? "l" : channel("l", options.lightness, 100)} / ${isUndefined(options.alpha) ? "alpha" : channel("alpha", options.alpha, 1)})`;
|
|
1667
|
-
if (!isUndefined(options.whiteness)) result = mix(result, "white", options.whiteness);
|
|
1668
|
-
if (!isUndefined(options.blackness)) result = mix(result, "black", options.blackness);
|
|
1669
|
-
return result;
|
|
1670
|
-
}
|
|
1671
|
-
static fallbackVar(value, ...fallbacks) {
|
|
1672
|
-
return Object.assign(function* () {
|
|
1673
|
-
yield "var(";
|
|
1674
|
-
for (const [index, item] of [value, ...fallbacks].entries()) {
|
|
1675
|
-
if (index > 0) yield ", ";
|
|
1676
|
-
yield* asIterable(item);
|
|
1677
|
-
}
|
|
1678
|
-
yield ")";
|
|
1679
|
-
}, { [cssVarSymbol]: value });
|
|
1680
|
-
}
|
|
1681
|
-
static collect(value) {
|
|
1682
|
-
const iterable = isFunction(value) ? value() : value;
|
|
1683
|
-
let result = "";
|
|
1684
|
-
for (const item of iterable) result += `${item}`;
|
|
1685
|
-
return result;
|
|
1686
|
-
}
|
|
1687
|
-
constructor(prefix = "") {
|
|
1688
|
-
this.prefix = prefix;
|
|
1689
|
-
}
|
|
1690
|
-
prop = (key) => key.startsWith("--") ? key : kebabCase(key);
|
|
1691
|
-
normalize = (input) => {
|
|
1692
|
-
const value = isFunction(input) ? input() : input;
|
|
1693
|
-
if (typeof value === "number") return `${value}`;
|
|
1694
|
-
if (typeof value === "string") return value;
|
|
1695
|
-
if (isUndefined(value) || isNull(value)) return "";
|
|
1696
|
-
if (isFunction(value)) return Token.collect(value);
|
|
1697
|
-
if (isPlainObject(value) && Symbol.iterator in value) return Token.collect(value);
|
|
1698
|
-
return "";
|
|
1699
|
-
};
|
|
1700
|
-
cssVar = (paths) => `--${[this.prefix, ...paths].filter(Boolean).join("-")}`;
|
|
1701
|
-
};
|
|
1702
|
-
function combinator(open, close, strings, values) {
|
|
1703
|
-
return function* () {
|
|
1704
|
-
yield open;
|
|
1705
|
-
yield* Token.val(strings, ...values)();
|
|
1706
|
-
yield close;
|
|
1707
|
-
};
|
|
1708
|
-
}
|
|
1709
|
-
function* asIterable(value) {
|
|
1710
|
-
const resolved = isFunction(value) ? value() : value;
|
|
1711
|
-
const variable = resolved?.[cssVarSymbol];
|
|
1712
|
-
if (!isUndefined(variable)) {
|
|
1713
|
-
yield variable;
|
|
1714
|
-
return;
|
|
1715
|
-
}
|
|
1716
|
-
if (typeof resolved === "object" && resolved !== null && Symbol.iterator in resolved) {
|
|
1717
|
-
yield* resolved;
|
|
1718
|
-
return;
|
|
1719
|
-
}
|
|
1720
|
-
yield resolved;
|
|
1721
|
-
}
|
|
1722
|
-
function* flattenTokens(token, value, parents) {
|
|
1723
|
-
for (const [property, child] of Object.entries(value)) {
|
|
1724
|
-
if (property === SELF) continue;
|
|
1725
|
-
if (isPlainObject(child)) {
|
|
1726
|
-
yield* flattenTokens(token, child, [...parents, property]);
|
|
1727
|
-
continue;
|
|
1728
|
-
}
|
|
1729
|
-
yield [token.cssVar([...parents, property]), child];
|
|
1730
|
-
}
|
|
1731
|
-
}
|
|
1732
|
-
function kebabCase(value) {
|
|
1733
|
-
return value.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
1734
|
-
}
|
|
1735
|
-
//#endregion
|
|
1736
|
-
//#region ../../client/ui-primitives/src/client/styling/styling.ts
|
|
1737
|
-
var Styling = class Styling {
|
|
1738
|
-
static create() {
|
|
1739
|
-
return new Styling();
|
|
1740
|
-
}
|
|
1741
|
-
static toRule(sheet) {
|
|
1742
|
-
return sheet.selector === void 0 ? sheet.contents.join("") : `${sheet.selector} {${sheet.contents.join("")} }`;
|
|
1743
|
-
}
|
|
1744
|
-
#token = new Token();
|
|
1745
|
-
#sheets = /* @__PURE__ */ new Map();
|
|
1746
|
-
#injected = /* @__PURE__ */ new Set();
|
|
1747
|
-
props = (...styles) => {
|
|
1748
|
-
const merged = mergeStyles(styles);
|
|
1749
|
-
if (Object.keys(merged).length === 0) return {};
|
|
1750
|
-
const sheet = this.#sheet(2, this.#rules(merged));
|
|
1751
|
-
return sheet === void 0 ? {} : { [`data-css-${sheet.id}`]: "" };
|
|
1752
|
-
};
|
|
1753
|
-
keyframes = (frames = {}) => {
|
|
1754
|
-
return this.#sheet(1, this.#rules(frames))?.id ?? "anim-none";
|
|
1755
|
-
};
|
|
1756
|
-
injectGlobals = (styles = {}) => {
|
|
1757
|
-
for (const [name, style] of Object.entries(styles)) this.#sheet(0, this.#rules(style), name);
|
|
1758
|
-
};
|
|
1759
|
-
className = (...styles) => {
|
|
1760
|
-
const merged = mergeStyles(styles);
|
|
1761
|
-
if (Object.keys(merged).length === 0) return "";
|
|
1762
|
-
const sheet = this.#sheet(3, this.#rules(merged));
|
|
1763
|
-
return sheet === void 0 ? "" : `cls-${sheet.id}`;
|
|
1764
|
-
};
|
|
1765
|
-
sheets = () => [...this.#sheets.values()].map((sheet) => Styling.toRule(sheet));
|
|
1766
|
-
#sheet(type, rules, selector) {
|
|
1767
|
-
let hash = 0;
|
|
1768
|
-
const contents = [];
|
|
1769
|
-
for (const rule of rules) {
|
|
1770
|
-
contents.push(rule);
|
|
1771
|
-
hash = incrementalHash(rule, hash);
|
|
1772
|
-
}
|
|
1773
|
-
if (selector !== void 0) hash = incrementalHash(selector, hash);
|
|
1774
|
-
if (hash === 0) return void 0;
|
|
1775
|
-
let id = selector ?? "";
|
|
1776
|
-
if (type === 2) id = `s${hash.toString(36)}`;
|
|
1777
|
-
if (type === 3) id = `c${hash.toString(36)}`;
|
|
1778
|
-
if (type === 0) id = `g${hash.toString(36)}`;
|
|
1779
|
-
if (type === 1) id = `a${hash.toString(36)}`;
|
|
1780
|
-
let resolvedSelector = selector;
|
|
1781
|
-
if (resolvedSelector === void 0) {
|
|
1782
|
-
if (type === 1) resolvedSelector = `@keyframes ${id}`;
|
|
1783
|
-
if (type === 2) resolvedSelector = `[data-css-${id}]`;
|
|
1784
|
-
if (type === 3) resolvedSelector = `.cls-${id}`;
|
|
1785
|
-
}
|
|
1786
|
-
const sheet = {
|
|
1787
|
-
id,
|
|
1788
|
-
contents,
|
|
1789
|
-
selector: resolvedSelector
|
|
1790
|
-
};
|
|
1791
|
-
const existing = this.#sheets.get(id);
|
|
1792
|
-
if (existing !== void 0 && existing.contents.join("") === contents.join("")) return existing;
|
|
1793
|
-
this.#sheets.set(id, sheet);
|
|
1794
|
-
this.#inject(sheet);
|
|
1795
|
-
return sheet;
|
|
1796
|
-
}
|
|
1797
|
-
#inject(sheet) {
|
|
1798
|
-
if (this.#injected.has(sheet.id)) return;
|
|
1799
|
-
this.#injected.add(sheet.id);
|
|
1800
|
-
if (typeof document === "undefined") return;
|
|
1801
|
-
const element = document.createElement("style");
|
|
1802
|
-
element.setAttribute("data-css", sheet.id);
|
|
1803
|
-
element.textContent = Styling.toRule(sheet);
|
|
1804
|
-
document.head.appendChild(element);
|
|
1805
|
-
}
|
|
1806
|
-
*#rules(styles) {
|
|
1807
|
-
const nested = /* @__PURE__ */ new Map();
|
|
1808
|
-
for (const [key, value] of Object.entries(styles)) {
|
|
1809
|
-
if (isNull(value) || isUndefined(value)) continue;
|
|
1810
|
-
if (isPlainObject(value)) {
|
|
1811
|
-
nested.set(key, value);
|
|
1812
|
-
continue;
|
|
1813
|
-
}
|
|
1814
|
-
yield ` ${this.#token.prop(key)}: ${this.#token.normalize(value)};`;
|
|
1815
|
-
}
|
|
1816
|
-
for (const [key, value] of nested.entries()) {
|
|
1817
|
-
yield ` ${key} {`;
|
|
1818
|
-
yield* this.#rules(value);
|
|
1819
|
-
yield " }";
|
|
1820
|
-
}
|
|
1821
|
-
}
|
|
1574
|
+
//#region \0dsh-css-modules:/Users/morlay/src/github.com/morlay/dsh-plugin/packages/client/ui-primitives/src/client/schema-form/schema-form.module.css.mjs
|
|
1575
|
+
const css$17 = ".B1Faoa_editorRoot{width:100%;color:var(--dsw-alias-label-primary);flex-direction:column;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,monospace;font-size:14px;line-height:22px;display:flex}.B1Faoa_lineRow{white-space:nowrap;align-items:flex-start;gap:6px;min-height:22px;padding-right:8px;display:flex}.B1Faoa_lineRow:hover{background:var(--dsw-alias-bg-layer-2)}.B1Faoa_lineRow[data-selected=true]{background:var(--dsw-alias-bg-layer-3)}.B1Faoa_lineRow[data-dirty=true]{box-shadow:inset 2px 0 0 var(--dsw-alias-brand-primary)}.B1Faoa_lineRow[data-overridden=true]{box-shadow:inset 2px 0 0 var(--dsw-elevation-stroke-color)}.B1Faoa_lineRow[data-dirty=true] [data-role=key],.B1Faoa_lineRow[data-overridden=true] [data-role=key]{color:var(--dsw-alias-brand-primary)}.B1Faoa_lineRow[data-invalid=true]{background:color-mix(in srgb, var(--dsw-alias-state-error-secondary) 12%, transparent);box-shadow:inset 2px 0 0 var(--dsw-alias-state-error-primary)}.B1Faoa_lineRow[data-invalid=true] [data-role=key]{color:var(--dsw-alias-state-error-primary)}.B1Faoa_lineRow:hover [data-role=actions]{opacity:1}.B1Faoa_lineBody{flex:1;align-items:center;gap:6px;min-width:0;min-height:22px;display:flex}.B1Faoa_lineNumber{text-align:right;width:32px;color:var(--dsw-alias-label-caption);user-select:none;cursor:pointer;flex:none;line-height:22px}.B1Faoa_lineFold{width:14px;height:22px;color:var(--dsw-alias-label-caption);cursor:pointer;background:0 0;border:0;flex:none;justify-content:center;align-items:center;padding:0;display:inline-flex}.B1Faoa_lineFold:hover{color:var(--dsw-alias-label-secondary)}.B1Faoa_lineFoldSpacer{flex:none;width:14px}.B1Faoa_lineKey{color:var(--dsw-alias-label-primary);flex:none}.B1Faoa_lineKey[data-index=true]{color:var(--dsw-alias-label-caption)}.B1Faoa_lineToken{color:var(--dsw-alias-label-caption);flex:none}.B1Faoa_lineValue{text-overflow:ellipsis;cursor:text;min-width:0;color:var(--dsw-alias-state-business-primary);display:block;overflow:hidden}.B1Faoa_lineValue[data-tone=number]{color:var(--dsw-alias-state-warn-primary)}.B1Faoa_lineValue[data-tone=boolean]{color:var(--dsw-alias-state-success-primary)}.B1Faoa_lineValue[data-tone=empty]{color:var(--dsw-alias-label-caption)}.B1Faoa_valueSlot{flex:0 auto;min-width:0;display:block;overflow:hidden}.B1Faoa_valueTrigger{min-width:0;font:inherit;text-align:left;cursor:pointer;color:var(--dsw-alias-label-caption);background:0 0;border:0;align-items:center;gap:2px;padding:0;display:inline-flex}.B1Faoa_valueTrigger:disabled{cursor:default}.B1Faoa_valueTrigger:focus-visible{outline:none}.B1Faoa_compactInput{flex:auto;min-width:0;display:inline-flex}.B1Faoa_compactInput>span{border-radius:4px;width:100%;height:22px;padding:0 6px}.B1Faoa_compactInput input{font-size:14px;line-height:22px}.B1Faoa_compactTextField{background:var(--dsw-alias-bg-layer-1);min-width:0;box-shadow:0 0 0 .5px var(--dsw-elevation-stroke-color);border:0;border-radius:4px;flex:auto;padding:0 6px;display:inline-flex}.B1Faoa_compactTextField:focus-within{--dsw-elevation-stroke-color:var(--dsw-alias-brand-primary)}.B1Faoa_compactTextField>textarea{resize:none;field-sizing:content;width:100%;min-height:20px;max-height:240px;color:var(--dsw-alias-label-primary);background:0 0;border:0;outline:none;flex:1;padding:0;font-family:inherit;font-size:14px;line-height:22px}.B1Faoa_lineComment{text-overflow:ellipsis;min-width:0;color:var(--dsw-alias-label-tertiary);flex:auto;font-family:inherit;font-size:12px;overflow:hidden}.B1Faoa_lineInvalid{text-overflow:ellipsis;min-width:0;color:var(--dsw-alias-state-error-primary);flex:0 auto;font-family:inherit;font-size:12px;overflow:hidden}.B1Faoa_lineActions{opacity:0;flex:none;align-items:center;gap:4px;display:inline-flex}.B1Faoa_lineActions>button{width:20px;height:20px;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:0;border-radius:4px;justify-content:center;align-items:center;padding:0;display:inline-flex}.B1Faoa_lineActions>button:hover{background:var(--dsw-alias-bg-layer-3);color:var(--dsw-alias-label-primary)}.B1Faoa_lineActions>button:disabled{cursor:not-allowed;color:var(--dsw-alias-label-dimmed)}.B1Faoa_hoverActions[data-editing=true]{opacity:1;gap:6px}.B1Faoa_hoverActions[data-editing=true]>button{box-shadow:0 0 0 .5px var(--dsw-elevation-stroke-color);background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary)}.B1Faoa_hoverActions[data-editing=true]>button:first-of-type{color:var(--dsw-alias-state-success-primary)}.B1Faoa_addWrap{flex:auto;align-items:center;gap:6px;min-width:0;margin-left:6px;display:inline-flex;position:relative}.B1Faoa_addWrap[data-invalid=true] input{border-color:var(--dsw-alias-state-error-primary)}.B1Faoa_hint{color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px;line-height:1.5}";
|
|
1576
|
+
const tagId$17 = "@morlay/ui-conversation-message-actions/schema-form.module.css";
|
|
1577
|
+
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@morlay/ui-conversation-message-actions/schema-form.module.css\"]") === null) {
|
|
1578
|
+
const tag = document.createElement("style");
|
|
1579
|
+
tag.dataset.plugin = "@morlay/ui-conversation-message-actions";
|
|
1580
|
+
tag.dataset.pluginCss = tagId$17;
|
|
1581
|
+
tag.textContent = css$17;
|
|
1582
|
+
document.head.appendChild(tag);
|
|
1583
|
+
}
|
|
1584
|
+
var schema_form_module_css_default = {
|
|
1585
|
+
"lineInvalid": "B1Faoa_lineInvalid",
|
|
1586
|
+
"lineFold": "B1Faoa_lineFold",
|
|
1587
|
+
"compactInput": "B1Faoa_compactInput",
|
|
1588
|
+
"lineRow": "B1Faoa_lineRow",
|
|
1589
|
+
"lineToken": "B1Faoa_lineToken",
|
|
1590
|
+
"compactTextField": "B1Faoa_compactTextField",
|
|
1591
|
+
"lineValue": "B1Faoa_lineValue",
|
|
1592
|
+
"editorRoot": "B1Faoa_editorRoot",
|
|
1593
|
+
"lineNumber": "B1Faoa_lineNumber",
|
|
1594
|
+
"valueSlot": "B1Faoa_valueSlot",
|
|
1595
|
+
"lineComment": "B1Faoa_lineComment",
|
|
1596
|
+
"lineFoldSpacer": "B1Faoa_lineFoldSpacer",
|
|
1597
|
+
"hint": "B1Faoa_hint",
|
|
1598
|
+
"lineKey": "B1Faoa_lineKey",
|
|
1599
|
+
"lineBody": "B1Faoa_lineBody",
|
|
1600
|
+
"valueTrigger": "B1Faoa_valueTrigger",
|
|
1601
|
+
"hoverActions": "B1Faoa_hoverActions",
|
|
1602
|
+
"lineActions": "B1Faoa_lineActions",
|
|
1603
|
+
"addWrap": "B1Faoa_addWrap"
|
|
1822
1604
|
};
|
|
1823
|
-
function mergeStyles(styles) {
|
|
1824
|
-
return styles.reduce((accumulated, style) => style ? toMerged(accumulated, style) : accumulated, {});
|
|
1825
|
-
}
|
|
1826
|
-
function incrementalHash(value, previous = 0) {
|
|
1827
|
-
let hash = previous;
|
|
1828
|
-
for (let index = 0; index < value.length; index += 1) {
|
|
1829
|
-
hash = (hash << 5) - hash + value.charCodeAt(index);
|
|
1830
|
-
hash &= 2147483647;
|
|
1831
|
-
}
|
|
1832
|
-
return hash;
|
|
1833
|
-
}
|
|
1834
|
-
const STYLING_SINGLETON = Symbol.for("@morlay/dsh-client-ui-primitives/styling");
|
|
1835
|
-
const globalScope = globalThis;
|
|
1836
|
-
const styling = globalScope[STYLING_SINGLETON] ??= Styling.create();
|
|
1837
|
-
//#endregion
|
|
1838
|
-
//#region ../../client/ui-primitives/src/client/styling/styled.tsx
|
|
1839
|
-
const sxSymbol = Symbol("styled.sx");
|
|
1840
|
-
function styled(Component, defaultProps = {}) {
|
|
1841
|
-
return (...styles) => {
|
|
1842
|
-
const sx = styles.reduce((merged, style) => toMerged(merged, style), {});
|
|
1843
|
-
const Styled = (0, react.forwardRef)((props, ref) => {
|
|
1844
|
-
const styleProps = (0, react.useMemo)(() => styling.props(sx), []);
|
|
1845
|
-
return (0, react.createElement)(Component, {
|
|
1846
|
-
...defaultProps,
|
|
1847
|
-
...props,
|
|
1848
|
-
...styleProps,
|
|
1849
|
-
ref
|
|
1850
|
-
});
|
|
1851
|
-
});
|
|
1852
|
-
Styled.displayName = `styled(${typeof Component === "string" ? Component : Component.displayName ?? Component.name ?? "Component"})`;
|
|
1853
|
-
return Object.assign(Styled, { [sxSymbol]: sx });
|
|
1854
|
-
};
|
|
1855
|
-
}
|
|
1856
|
-
//#endregion
|
|
1857
|
-
//#region ../../client/ui-primitives/src/client/theme.ts
|
|
1858
|
-
const dsw = Token.vars({
|
|
1859
|
-
alias: {
|
|
1860
|
-
bg: {
|
|
1861
|
-
base: "var(--dsw-static-neutral-bluish-00)",
|
|
1862
|
-
document: {
|
|
1863
|
-
preview: "var(--dsw-static-neutral-bluish-100)",
|
|
1864
|
-
selection: "color-mix(in srgb, var(--dsw-static-blue-500) 40%, transparent)"
|
|
1865
|
-
},
|
|
1866
|
-
layer: {
|
|
1867
|
-
"1": "var(--dsw-static-neutral-bluish-00)",
|
|
1868
|
-
"2": "var(--dsw-static-neutral-bluish-00)",
|
|
1869
|
-
"3": "var(--dsw-static-neutral-bluish-00)"
|
|
1870
|
-
},
|
|
1871
|
-
mask: {
|
|
1872
|
-
"1": "rgba(0, 0, 0, 0.24)",
|
|
1873
|
-
"2": "rgba(0, 0, 0, 0.12)",
|
|
1874
|
-
"3": "rgba(0, 0, 0, 0.48)",
|
|
1875
|
-
drop: "rgba(255, 255, 255, 0.7)",
|
|
1876
|
-
photo: "rgba(0, 0, 0, 0.88)"
|
|
1877
|
-
},
|
|
1878
|
-
module: { platform: "var(--dsw-static-neutral-bluish-60)" },
|
|
1879
|
-
multi: { select: "var(--dsw-static-neutral-bluish-60)" },
|
|
1880
|
-
overlay: "var(--dsw-static-neutral-bluish-150)",
|
|
1881
|
-
skeleton: "rgba(0, 0, 0, 0.04)"
|
|
1882
|
-
},
|
|
1883
|
-
border: {
|
|
1884
|
-
inverted: "rgba(0, 0, 0, 0)",
|
|
1885
|
-
inverted2: "rgba(0, 0, 0, 0)",
|
|
1886
|
-
l1: "rgba(0, 0, 0, 0.04)",
|
|
1887
|
-
l2: {
|
|
1888
|
-
$: "rgba(0, 0, 0, 0.1)",
|
|
1889
|
-
darkmode: { thin: "rgba(0, 0, 0, 0.1)" }
|
|
1890
|
-
},
|
|
1891
|
-
l3: "rgba(0, 0, 0, 0.12)",
|
|
1892
|
-
l4: "rgba(0, 0, 0, 0.16)"
|
|
1893
|
-
},
|
|
1894
|
-
brand: {
|
|
1895
|
-
primary: {
|
|
1896
|
-
$: "var(--dsw-static-neutral-bluish-1000)",
|
|
1897
|
-
invert: "var(--dsw-static-neutral-bluish-1000)",
|
|
1898
|
-
new: { colorprimary: { new: { color: "rgb(65, 118, 230)" } } }
|
|
1899
|
-
},
|
|
1900
|
-
text: "var(--dsw-static-neutral-bluish-1000)"
|
|
1901
|
-
},
|
|
1902
|
-
button: {
|
|
1903
|
-
contrast: { fill: "var(--dsw-static-neutral-bluish-700)" },
|
|
1904
|
-
elevated: { fill: "var(--dsw-static-neutral-bluish-00)" },
|
|
1905
|
-
floating: {
|
|
1906
|
-
fill: "var(--dsw-static-neutral-bluish-00)",
|
|
1907
|
-
hover: "var(--dsw-static-neutral-bluish-75)"
|
|
1908
|
-
},
|
|
1909
|
-
ghost: { active: {
|
|
1910
|
-
border: "var(--dsw-static-neutral-bluish-500)",
|
|
1911
|
-
fill: "var(--dsw-static-neutral-bluish-100)",
|
|
1912
|
-
hover: "var(--dsw-static-neutral-bluish-150)"
|
|
1913
|
-
} },
|
|
1914
|
-
info: {
|
|
1915
|
-
fill: "var(--dsw-static-deepseek-500)",
|
|
1916
|
-
hover: "var(--dsw-static-deepseek-400)"
|
|
1917
|
-
},
|
|
1918
|
-
primary: {
|
|
1919
|
-
dimmed: "var(--dsw-static-neutral-bluish-100)",
|
|
1920
|
-
fill: "var(--dsw-alias-brand-primary)",
|
|
1921
|
-
hover: "var(--dsw-static-neutral-bluish-750)"
|
|
1922
|
-
},
|
|
1923
|
-
tool: { bar: {
|
|
1924
|
-
fill: {
|
|
1925
|
-
$: "rgba(84, 85, 87, 0.5)",
|
|
1926
|
-
invisible: "rgba(31, 31, 31, 0.36)"
|
|
1927
|
-
},
|
|
1928
|
-
hover: "rgba(84, 85, 87, 0.6)"
|
|
1929
|
-
} }
|
|
1930
|
-
},
|
|
1931
|
-
code: { diff: {
|
|
1932
|
-
added: "var(--dsw-static-green-500-a08)",
|
|
1933
|
-
deleted: "var(--dsw-static-red-600-a08)"
|
|
1934
|
-
} },
|
|
1935
|
-
file: { diff: {
|
|
1936
|
-
added: {
|
|
1937
|
-
bg: "rgb(230, 244, 231)",
|
|
1938
|
-
gutter: "rgb(237, 247, 237)",
|
|
1939
|
-
marker: "rgb(1, 162, 65)"
|
|
1940
|
-
},
|
|
1941
|
-
deleted: {
|
|
1942
|
-
bg: "rgb(252, 230, 226)",
|
|
1943
|
-
gutter: "rgb(253, 236, 233)",
|
|
1944
|
-
marker: "rgb(186, 39, 35)"
|
|
1945
|
-
}
|
|
1946
|
-
} },
|
|
1947
|
-
interactive: { bg: {
|
|
1948
|
-
active: "rgba(38, 49, 72, 0.1)",
|
|
1949
|
-
hover: {
|
|
1950
|
-
$: "rgba(38, 49, 72, 0.06)",
|
|
1951
|
-
accent: "rgba(38, 49, 72, 0.14)",
|
|
1952
|
-
danger: "rgba(236, 19, 19, 0.05)",
|
|
1953
|
-
solid: "var(--dsw-static-neutral-bluish-75)"
|
|
1954
|
-
}
|
|
1955
|
-
} },
|
|
1956
|
-
label: {
|
|
1957
|
-
caption: "var(--dsw-static-neutral-bluish-400)",
|
|
1958
|
-
deep: { diving: {
|
|
1959
|
-
$: "color-mix(in srgb, var(--dsw-static-deepseek-500) 70%, var(--dsw-static-blue-950))",
|
|
1960
|
-
shimmer: "color-mix(in srgb, var(--dsw-static-deepseek-500) 30%, var(--dsw-static-blue-950))"
|
|
1961
|
-
} },
|
|
1962
|
-
dimmed: "var(--dsw-static-neutral-bluish-200)",
|
|
1963
|
-
document: { preview: "var(--dsw-static-neutral-bluish-700)" },
|
|
1964
|
-
primary: {
|
|
1965
|
-
$: "var(--dsw-static-neutral-bluish-1000)",
|
|
1966
|
-
bluish: "var(--dsw-static-blue-900)",
|
|
1967
|
-
dimmed: "var(--dsw-static-neutral-bluish-950)",
|
|
1968
|
-
foreground: "var(--dsw-static-neutral-bluish-00)",
|
|
1969
|
-
inverted: "var(--dsw-static-neutral-bluish-00)"
|
|
1970
|
-
},
|
|
1971
|
-
secondary: "var(--dsw-static-neutral-bluish-700)",
|
|
1972
|
-
shimmer: "color-mix(in srgb, var(--dsw-static-neutral-1000) 30%, transparent)",
|
|
1973
|
-
tertiary: "var(--dsw-static-neutral-bluish-600)"
|
|
1974
|
-
},
|
|
1975
|
-
link: "var(--dsw-static-deepseek-500)",
|
|
1976
|
-
markdown: {
|
|
1977
|
-
citation: "var(--dsw-static-neutral-bluish-100)",
|
|
1978
|
-
code: {
|
|
1979
|
-
block: {
|
|
1980
|
-
$: "var(--dsw-static-neutral-bluish-50)",
|
|
1981
|
-
banner: "var(--dsw-static-neutral-bluish-50)"
|
|
1982
|
-
},
|
|
1983
|
-
segment: {
|
|
1984
|
-
selected: "var(--dsw-static-neutral-bluish-00)",
|
|
1985
|
-
unselected: "var(--dsw-static-neutral-bluish-75)"
|
|
1986
|
-
}
|
|
1987
|
-
},
|
|
1988
|
-
inline: { code: "var(--dsw-static-neutral-50)" },
|
|
1989
|
-
placeholder: "var(--dsw-static-neutral-bluish-60)",
|
|
1990
|
-
tag: "var(--dsw-static-neutral-bluish-75)"
|
|
1991
|
-
},
|
|
1992
|
-
menu: {
|
|
1993
|
-
group: { header: { fill: "rgba(248, 249, 250, 0.94)" } },
|
|
1994
|
-
icon: "var(--dsw-static-neutral-bluish-800)"
|
|
1995
|
-
},
|
|
1996
|
-
onboarding: {
|
|
1997
|
-
accent: "rgb(57, 100, 254)",
|
|
1998
|
-
card: { fill: "color-mix(in srgb, var(--dsw-static-neutral-bluish-00) 80%, transparent)" },
|
|
1999
|
-
checkbox: { border: "color-mix(in srgb, var(--dsw-static-neutral-bluish-1000) 20%, transparent)" },
|
|
2000
|
-
secondary: { fill: "var(--dsw-static-neutral-bluish-00)" }
|
|
2001
|
-
},
|
|
2002
|
-
scrollbar: {
|
|
2003
|
-
bg: {
|
|
2004
|
-
l1: "var(--dsw-static-neutral-200)",
|
|
2005
|
-
l2: "var(--dsw-static-neutral-200)"
|
|
2006
|
-
},
|
|
2007
|
-
hover: {
|
|
2008
|
-
l1: "var(--dsw-static-neutral-300)",
|
|
2009
|
-
l2: "var(--dsw-static-neutral-300)"
|
|
2010
|
-
}
|
|
2011
|
-
},
|
|
2012
|
-
settings: { card: {
|
|
2013
|
-
fill: "var(--dsw-alias-bg-layer-2)",
|
|
2014
|
-
stroke: "var(--dsw-alias-border-l4)"
|
|
2015
|
-
} },
|
|
2016
|
-
state: {
|
|
2017
|
-
business: {
|
|
2018
|
-
primary: "var(--dsw-static-deepseek-500)",
|
|
2019
|
-
tertiary: "var(--dsw-static-deepseek-100)"
|
|
2020
|
-
},
|
|
2021
|
-
error: {
|
|
2022
|
-
primary: "var(--dsw-static-red-600)",
|
|
2023
|
-
secondary: "var(--dsw-static-red-400)"
|
|
2024
|
-
},
|
|
2025
|
-
idle: { primary: "var(--dsw-static-neutral-300)" },
|
|
2026
|
-
success: {
|
|
2027
|
-
primary: "var(--dsw-static-green-500)",
|
|
2028
|
-
secondary: "var(--dsw-static-green-400)",
|
|
2029
|
-
tertiary: "var(--dsw-static-green-100)"
|
|
2030
|
-
},
|
|
2031
|
-
warn: {
|
|
2032
|
-
label: "var(--dsw-static-amber-600)",
|
|
2033
|
-
primary: "var(--dsw-static-amber-500)",
|
|
2034
|
-
secondary: "var(--dsw-static-amber-400)",
|
|
2035
|
-
tertiary: "var(--dsw-static-amber-100)"
|
|
2036
|
-
}
|
|
2037
|
-
},
|
|
2038
|
-
switch: { thumb: "var(--dsw-static-neutral-bluish-00)" },
|
|
2039
|
-
toast: {
|
|
2040
|
-
bg: "var(--dsw-static-neutral-bluish-800)",
|
|
2041
|
-
label: "var(--dsw-static-neutral-bluish-00)"
|
|
2042
|
-
},
|
|
2043
|
-
tooltip: {
|
|
2044
|
-
bg: "var(--dsw-static-neutral-bluish-850)",
|
|
2045
|
-
key: { bg: "color-mix(in srgb, var(--dsw-alias-tooltip-bg), white 18%)" }
|
|
2046
|
-
},
|
|
2047
|
-
turn: { trigger: { bg: {
|
|
2048
|
-
$: "var(--dsw-alias-markdown-code-block)",
|
|
2049
|
-
hover: "var(--dsw-alias-interactive-bg-hover)"
|
|
2050
|
-
} } }
|
|
2051
|
-
},
|
|
2052
|
-
corner: { shape: "superellipse(1.5)" },
|
|
2053
|
-
elevation: {
|
|
2054
|
-
panel: "var(--dsw-elevation-stroke), 0 3px 8px 0 rgba(0, 0, 0, 0.03), 0 0 16px 0 rgba(0, 0, 0, 0.02)",
|
|
2055
|
-
prominent: "var(--dsw-elevation-stroke), 0 3px 8px 0 rgba(0, 0, 0, 0.04), 0 0 20px 0 rgba(0, 0, 0, 0.05)",
|
|
2056
|
-
soft: "var(--dsw-elevation-stroke), 0 4px 16px 0 rgba(0, 0, 0, 0.03), 0 0 24px 0 rgba(0, 0, 0, 0.03)",
|
|
2057
|
-
stroke: {
|
|
2058
|
-
$: "0 0 0 0.5px var(--dsw-elevation-stroke-color)",
|
|
2059
|
-
color: "var(--dsw-alias-border-l4)"
|
|
2060
|
-
}
|
|
2061
|
-
},
|
|
2062
|
-
focus: { ring: {
|
|
2063
|
-
color: "transparent",
|
|
2064
|
-
width: "2px"
|
|
2065
|
-
} },
|
|
2066
|
-
font: {
|
|
2067
|
-
base: {
|
|
2068
|
-
"16": {
|
|
2069
|
-
$: "16px/24px var(--dsw-font-family)",
|
|
2070
|
-
font: {
|
|
2071
|
-
family: "var(--dsw-font-family)",
|
|
2072
|
-
size: "16px",
|
|
2073
|
-
style: "normal",
|
|
2074
|
-
weight: "400"
|
|
2075
|
-
},
|
|
2076
|
-
line: { height: "24px" }
|
|
2077
|
-
},
|
|
2078
|
-
strong: { "16": {
|
|
2079
|
-
$: "500 16px/24px var(--dsw-font-family)",
|
|
2080
|
-
font: {
|
|
2081
|
-
family: "var(--dsw-font-family)",
|
|
2082
|
-
size: "16px",
|
|
2083
|
-
style: "normal",
|
|
2084
|
-
weight: "500"
|
|
2085
|
-
},
|
|
2086
|
-
line: { height: "24px" }
|
|
2087
|
-
} }
|
|
2088
|
-
},
|
|
2089
|
-
family: {
|
|
2090
|
-
$: "-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',\n 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif",
|
|
2091
|
-
brand: "'Montserrat', var(--dsw-font-family)"
|
|
2092
|
-
},
|
|
2093
|
-
l: { "20": {
|
|
2094
|
-
$: "500 20px/28px var(--dsw-font-family)",
|
|
2095
|
-
font: {
|
|
2096
|
-
family: "var(--dsw-font-family)",
|
|
2097
|
-
size: "20px",
|
|
2098
|
-
style: "normal",
|
|
2099
|
-
weight: "500"
|
|
2100
|
-
},
|
|
2101
|
-
line: { height: "28px" }
|
|
2102
|
-
} },
|
|
2103
|
-
m: { "18": {
|
|
2104
|
-
$: "500 16px/28px var(--dsw-font-family)",
|
|
2105
|
-
font: {
|
|
2106
|
-
family: "var(--dsw-font-family)",
|
|
2107
|
-
size: "16px",
|
|
2108
|
-
style: "normal",
|
|
2109
|
-
weight: "500"
|
|
2110
|
-
},
|
|
2111
|
-
line: { height: "28px" }
|
|
2112
|
-
} },
|
|
2113
|
-
markdown: {
|
|
2114
|
-
base: {
|
|
2115
|
-
$: "var(--dsh-content-font-size, 14px) / calc(24px + var(--dsh-content-font-delta)) var(--dsw-font-family)",
|
|
2116
|
-
font: {
|
|
2117
|
-
family: "var(--dsw-font-family)",
|
|
2118
|
-
size: "var(--dsh-content-font-size, 14px)",
|
|
2119
|
-
style: "normal",
|
|
2120
|
-
weight: "400"
|
|
2121
|
-
},
|
|
2122
|
-
italic: {
|
|
2123
|
-
$: "italic var(--dsh-content-font-size, 14px) / calc(24px + var(--dsh-content-font-delta)) var(--dsw-font-family)",
|
|
2124
|
-
font: {
|
|
2125
|
-
family: "var(--dsw-font-family)",
|
|
2126
|
-
size: "var(--dsh-content-font-size, 14px)",
|
|
2127
|
-
style: "italic",
|
|
2128
|
-
weight: "400"
|
|
2129
|
-
},
|
|
2130
|
-
line: { height: "calc(24px + var(--dsh-content-font-delta))" }
|
|
2131
|
-
},
|
|
2132
|
-
line: { height: "calc(24px + var(--dsh-content-font-delta))" },
|
|
2133
|
-
strong: {
|
|
2134
|
-
$: "600 var(--dsh-content-font-size, 14px) / calc(24px + var(--dsh-content-font-delta)) var(--dsw-font-family)",
|
|
2135
|
-
font: {
|
|
2136
|
-
family: "var(--dsw-font-family)",
|
|
2137
|
-
size: "var(--dsh-content-font-size, 14px)",
|
|
2138
|
-
style: "normal",
|
|
2139
|
-
weight: "600"
|
|
2140
|
-
},
|
|
2141
|
-
italic: {
|
|
2142
|
-
$: "italic 600 var(--dsh-content-font-size, 14px) / calc(24px + var(--dsh-content-font-delta)) var(--dsw-font-family)",
|
|
2143
|
-
font: {
|
|
2144
|
-
family: "var(--dsw-font-family)",
|
|
2145
|
-
size: "var(--dsh-content-font-size, 14px)",
|
|
2146
|
-
style: "italic",
|
|
2147
|
-
weight: "600"
|
|
2148
|
-
},
|
|
2149
|
-
line: { height: "calc(24px + var(--dsh-content-font-delta))" }
|
|
2150
|
-
},
|
|
2151
|
-
line: { height: "calc(24px + var(--dsh-content-font-delta))" }
|
|
2152
|
-
}
|
|
2153
|
-
},
|
|
2154
|
-
code: {
|
|
2155
|
-
$: "12px/19px var(--ds-font-family-code)",
|
|
2156
|
-
block: {
|
|
2157
|
-
$: "11px/19px var(--ds-font-family-code)",
|
|
2158
|
-
font: {
|
|
2159
|
-
family: "var(--ds-font-family-code)",
|
|
2160
|
-
size: "11px",
|
|
2161
|
-
style: "normal",
|
|
2162
|
-
weight: "400"
|
|
2163
|
-
},
|
|
2164
|
-
line: { height: "19px" },
|
|
2165
|
-
small: {
|
|
2166
|
-
$: "11px/16px var(--ds-font-family-code)",
|
|
2167
|
-
font: {
|
|
2168
|
-
family: "var(--ds-font-family-code)",
|
|
2169
|
-
size: "11px",
|
|
2170
|
-
style: "normal",
|
|
2171
|
-
weight: "400"
|
|
2172
|
-
},
|
|
2173
|
-
line: { height: "16px" }
|
|
2174
|
-
}
|
|
2175
|
-
},
|
|
2176
|
-
font: {
|
|
2177
|
-
family: "var(--ds-font-family-code)",
|
|
2178
|
-
size: "12px",
|
|
2179
|
-
style: "normal",
|
|
2180
|
-
weight: "400"
|
|
2181
|
-
},
|
|
2182
|
-
line: { height: "19px" }
|
|
2183
|
-
},
|
|
2184
|
-
h1: {
|
|
2185
|
-
$: "700 calc(21px + var(--dsh-content-font-delta)) / calc(30px + var(--dsh-content-font-delta)) var(--dsw-font-family)",
|
|
2186
|
-
font: {
|
|
2187
|
-
family: "var(--dsw-font-family)",
|
|
2188
|
-
size: "calc(21px + var(--dsh-content-font-delta))",
|
|
2189
|
-
style: "normal",
|
|
2190
|
-
weight: "700"
|
|
2191
|
-
},
|
|
2192
|
-
line: { height: "calc(30px + var(--dsh-content-font-delta))" }
|
|
2193
|
-
},
|
|
2194
|
-
h2: {
|
|
2195
|
-
$: "700 calc(19px + var(--dsh-content-font-delta)) / calc(28px + var(--dsh-content-font-delta)) var(--dsw-font-family)",
|
|
2196
|
-
font: {
|
|
2197
|
-
family: "var(--dsw-font-family)",
|
|
2198
|
-
size: "calc(19px + var(--dsh-content-font-delta))",
|
|
2199
|
-
style: "normal",
|
|
2200
|
-
weight: "700"
|
|
2201
|
-
},
|
|
2202
|
-
line: { height: "calc(28px + var(--dsh-content-font-delta))" }
|
|
2203
|
-
},
|
|
2204
|
-
h3: {
|
|
2205
|
-
$: "700 calc(18px + var(--dsh-content-font-delta)) / calc(26px + var(--dsh-content-font-delta)) var(--dsw-font-family)",
|
|
2206
|
-
font: {
|
|
2207
|
-
family: "var(--dsw-font-family)",
|
|
2208
|
-
size: "calc(18px + var(--dsh-content-font-delta))",
|
|
2209
|
-
style: "normal",
|
|
2210
|
-
weight: "700"
|
|
2211
|
-
},
|
|
2212
|
-
line: { height: "calc(26px + var(--dsh-content-font-delta))" }
|
|
2213
|
-
},
|
|
2214
|
-
h4: {
|
|
2215
|
-
$: "600 var(--dsh-content-font-size, 14px) / calc(24px + var(--dsh-content-font-delta)) var(--dsw-font-family)",
|
|
2216
|
-
font: {
|
|
2217
|
-
family: "var(--dsw-font-family)",
|
|
2218
|
-
size: "var(--dsh-content-font-size, 14px)",
|
|
2219
|
-
style: "normal",
|
|
2220
|
-
weight: "600"
|
|
2221
|
-
},
|
|
2222
|
-
line: { height: "calc(24px + var(--dsh-content-font-delta))" }
|
|
2223
|
-
},
|
|
2224
|
-
small: {
|
|
2225
|
-
$: "12px/20px var(--dsw-font-family)",
|
|
2226
|
-
font: {
|
|
2227
|
-
family: "var(--dsw-font-family)",
|
|
2228
|
-
size: "12px",
|
|
2229
|
-
style: "normal",
|
|
2230
|
-
weight: "400"
|
|
2231
|
-
},
|
|
2232
|
-
italic: {
|
|
2233
|
-
$: "italic 12px/20px var(--dsw-font-family)",
|
|
2234
|
-
font: {
|
|
2235
|
-
family: "var(--dsw-font-family)",
|
|
2236
|
-
size: "12px",
|
|
2237
|
-
style: "italic",
|
|
2238
|
-
weight: "400"
|
|
2239
|
-
},
|
|
2240
|
-
line: { height: "20px" }
|
|
2241
|
-
},
|
|
2242
|
-
line: { height: "20px" },
|
|
2243
|
-
strong: {
|
|
2244
|
-
$: "600 12px/20px var(--dsw-font-family)",
|
|
2245
|
-
font: {
|
|
2246
|
-
family: "var(--dsw-font-family)",
|
|
2247
|
-
size: "12px",
|
|
2248
|
-
style: "normal",
|
|
2249
|
-
weight: "600"
|
|
2250
|
-
},
|
|
2251
|
-
italic: {
|
|
2252
|
-
$: "italic 600 12px/20px var(--dsw-font-family)",
|
|
2253
|
-
font: {
|
|
2254
|
-
family: "var(--dsw-font-family)",
|
|
2255
|
-
size: "12px",
|
|
2256
|
-
style: "italic",
|
|
2257
|
-
weight: "600"
|
|
2258
|
-
},
|
|
2259
|
-
line: { height: "20px" }
|
|
2260
|
-
},
|
|
2261
|
-
line: { height: "20px" }
|
|
2262
|
-
}
|
|
2263
|
-
},
|
|
2264
|
-
table: {
|
|
2265
|
-
$: "var(--dsh-content-font-size-secondary, 13px)/calc(22px + var(--dsh-content-font-delta-secondary, 0px)) var(--dsw-font-family)",
|
|
2266
|
-
font: {
|
|
2267
|
-
family: "var(--dsw-font-family)",
|
|
2268
|
-
size: "var(--dsh-content-font-size-secondary, 13px)",
|
|
2269
|
-
style: "normal",
|
|
2270
|
-
weight: "400"
|
|
2271
|
-
},
|
|
2272
|
-
head: {
|
|
2273
|
-
$: "500 var(--dsh-content-font-size-secondary, 13px)/calc(22px + var(--dsh-content-font-delta-secondary, 0px)) var(--dsw-font-family)",
|
|
2274
|
-
font: {
|
|
2275
|
-
family: "var(--dsw-font-family)",
|
|
2276
|
-
size: "var(--dsh-content-font-size-secondary, 13px)",
|
|
2277
|
-
style: "normal",
|
|
2278
|
-
weight: "500"
|
|
2279
|
-
},
|
|
2280
|
-
line: { height: "calc(22px + var(--dsh-content-font-delta-secondary, 0px))" }
|
|
2281
|
-
},
|
|
2282
|
-
line: { height: "calc(22px + var(--dsh-content-font-delta-secondary, 0px))" }
|
|
2283
|
-
}
|
|
2284
|
-
},
|
|
2285
|
-
s: {
|
|
2286
|
-
"14": {
|
|
2287
|
-
$: "14px/22px var(--dsw-font-family)",
|
|
2288
|
-
font: {
|
|
2289
|
-
family: "var(--dsw-font-family)",
|
|
2290
|
-
size: "14px",
|
|
2291
|
-
style: "normal",
|
|
2292
|
-
weight: "400"
|
|
2293
|
-
},
|
|
2294
|
-
line: { height: "22px" }
|
|
2295
|
-
},
|
|
2296
|
-
strong: { "14": {
|
|
2297
|
-
$: "500 14px/22px var(--dsw-font-family)",
|
|
2298
|
-
font: {
|
|
2299
|
-
family: "var(--dsw-font-family)",
|
|
2300
|
-
size: "14px",
|
|
2301
|
-
style: "normal",
|
|
2302
|
-
weight: "500"
|
|
2303
|
-
},
|
|
2304
|
-
line: { height: "22px" }
|
|
2305
|
-
} }
|
|
2306
|
-
},
|
|
2307
|
-
xl: { "24": {
|
|
2308
|
-
$: "600 24px/32px var(--dsw-font-family)",
|
|
2309
|
-
font: {
|
|
2310
|
-
family: "var(--dsw-font-family)",
|
|
2311
|
-
size: "24px",
|
|
2312
|
-
style: "normal",
|
|
2313
|
-
weight: "600"
|
|
2314
|
-
},
|
|
2315
|
-
line: { height: "32px" }
|
|
2316
|
-
} },
|
|
2317
|
-
xs: {
|
|
2318
|
-
"13": {
|
|
2319
|
-
$: "13px/20px var(--dsw-font-family)",
|
|
2320
|
-
font: {
|
|
2321
|
-
family: "var(--dsw-font-family)",
|
|
2322
|
-
size: "13px",
|
|
2323
|
-
style: "normal",
|
|
2324
|
-
weight: "400"
|
|
2325
|
-
},
|
|
2326
|
-
line: { height: "20px" }
|
|
2327
|
-
},
|
|
2328
|
-
strong: { "13": {
|
|
2329
|
-
$: "500 13px/20px var(--dsw-font-family)",
|
|
2330
|
-
font: {
|
|
2331
|
-
family: "var(--dsw-font-family)",
|
|
2332
|
-
size: "13px",
|
|
2333
|
-
style: "normal",
|
|
2334
|
-
weight: "500"
|
|
2335
|
-
},
|
|
2336
|
-
line: { height: "20px" }
|
|
2337
|
-
} }
|
|
2338
|
-
},
|
|
2339
|
-
xxs: {
|
|
2340
|
-
"12": {
|
|
2341
|
-
$: "12px/18px var(--dsw-font-family)",
|
|
2342
|
-
font: {
|
|
2343
|
-
family: "var(--dsw-font-family)",
|
|
2344
|
-
size: "12px",
|
|
2345
|
-
style: "normal",
|
|
2346
|
-
weight: "400"
|
|
2347
|
-
},
|
|
2348
|
-
line: { height: "18px" }
|
|
2349
|
-
},
|
|
2350
|
-
strong: { "12": {
|
|
2351
|
-
$: "500 12px/18px var(--dsw-font-family)",
|
|
2352
|
-
font: {
|
|
2353
|
-
family: "var(--dsw-font-family)",
|
|
2354
|
-
size: "12px",
|
|
2355
|
-
style: "normal",
|
|
2356
|
-
weight: "500"
|
|
2357
|
-
},
|
|
2358
|
-
line: { height: "18px" }
|
|
2359
|
-
} }
|
|
2360
|
-
},
|
|
2361
|
-
xxxs: {
|
|
2362
|
-
"11": {
|
|
2363
|
-
$: "11px/14px var(--dsw-font-family)",
|
|
2364
|
-
font: {
|
|
2365
|
-
family: "var(--dsw-font-family)",
|
|
2366
|
-
size: "11px",
|
|
2367
|
-
style: "normal",
|
|
2368
|
-
weight: "400"
|
|
2369
|
-
},
|
|
2370
|
-
line: { height: "14px" }
|
|
2371
|
-
},
|
|
2372
|
-
strong: { "11": {
|
|
2373
|
-
$: "500 11px/14px var(--dsw-font-family)",
|
|
2374
|
-
font: {
|
|
2375
|
-
family: "var(--dsw-font-family)",
|
|
2376
|
-
size: "11px",
|
|
2377
|
-
style: "normal",
|
|
2378
|
-
weight: "500"
|
|
2379
|
-
},
|
|
2380
|
-
line: { height: "14px" }
|
|
2381
|
-
} }
|
|
2382
|
-
}
|
|
2383
|
-
},
|
|
2384
|
-
gradient: { onboarding: {
|
|
2385
|
-
blue: { stops: "#3964fe 18.75%, #398efe 51.78%, #6dccff 86.252%, #3964fe" },
|
|
2386
|
-
cyan: { stops: "#0293b4 21.154%, #2dc8eb 50.954%, #aff0ff 85.326%, #0293b4" },
|
|
2387
|
-
violet: { stops: "#2a2fb6 33.102%, #8b76f6 50.954%, #c5c0ff 85.326%, #2a2fb6" }
|
|
2388
|
-
} },
|
|
2389
|
-
linear: {
|
|
2390
|
-
gradient: { think: "linear-gradient(180deg, #fff 20.19%, rgba(255, 255, 255, 0) 100%)" },
|
|
2391
|
-
think: { select: "linear-gradient(180deg, #f5f6f7 20.19%, rgba(245, 246, 247, 0) 100%)" }
|
|
2392
|
-
},
|
|
2393
|
-
mask: { blur: "none" },
|
|
2394
|
-
menu: {
|
|
2395
|
-
backdrop: { filter: "blur(40px) saturate(150%)" },
|
|
2396
|
-
surface: { fill: "rgba(248, 249, 250, 0.58)" }
|
|
2397
|
-
},
|
|
2398
|
-
radius: {
|
|
2399
|
-
lg: "16px",
|
|
2400
|
-
md: "12px",
|
|
2401
|
-
panel: "28px",
|
|
2402
|
-
sm: "8px",
|
|
2403
|
-
xl: "20px",
|
|
2404
|
-
xs: "4px"
|
|
2405
|
-
},
|
|
2406
|
-
shadow: {
|
|
2407
|
-
lv1: {
|
|
2408
|
-
$: "0 2px 4px 0 rgba(0, 0, 0, 0.05)",
|
|
2409
|
-
blur: "0 4px 12px 0 rgba(0, 0, 0, 0.02)"
|
|
2410
|
-
},
|
|
2411
|
-
lv2: "0 4px 12px 0 rgba(0, 0, 0, 0.02), 0 2px 8px 0 rgba(0, 0, 0, 0.04)",
|
|
2412
|
-
lv3: "0 0 1px 0 rgba(0, 0, 0, 0.2), 0 0 4px 0 rgba(0, 0, 0, 0.02), 0 12px 32px 0 rgba(0, 0, 0, 0.08)"
|
|
2413
|
-
},
|
|
2414
|
-
specific: {
|
|
2415
|
-
bubble: {
|
|
2416
|
-
$: "var(--dsw-static-deepseek-50)",
|
|
2417
|
-
highlight: "var(--dsw-static-deepseek-200)"
|
|
2418
|
-
},
|
|
2419
|
-
input: { major: "var(--dsw-static-neutral-bluish-00)" },
|
|
2420
|
-
login: { input: "var(--dsw-static-neutral-bluish-50)" },
|
|
2421
|
-
menu: "var(--dsw-menu-surface-fill)",
|
|
2422
|
-
selector: "var(--dsw-static-neutral-bluish-60)",
|
|
2423
|
-
sidebar: {
|
|
2424
|
-
fill: "var(--dsw-static-neutral-bluish-50)",
|
|
2425
|
-
nav: { item: {
|
|
2426
|
-
active: {
|
|
2427
|
-
$: "var(--dsw-static-neutral-bluish-100)",
|
|
2428
|
-
accent: "var(--dsw-static-deepseek-100)"
|
|
2429
|
-
},
|
|
2430
|
-
hover: "var(--dsw-static-neutral-bluish-75)"
|
|
2431
|
-
} }
|
|
2432
|
-
},
|
|
2433
|
-
tip: "var(--dsw-static-neutral-bluish-60)"
|
|
2434
|
-
},
|
|
2435
|
-
static: {
|
|
2436
|
-
amber: {
|
|
2437
|
-
"100": "rgb(254, 245, 231)",
|
|
2438
|
-
"400": "rgb(247, 173, 49)",
|
|
2439
|
-
"500": "rgb(245, 158, 11)",
|
|
2440
|
-
"600": "rgb(221, 134, 41)",
|
|
2441
|
-
"900": "rgb(39, 36, 31)"
|
|
2442
|
-
},
|
|
2443
|
-
blue: {
|
|
2444
|
-
"50": "rgb(239, 246, 255)",
|
|
2445
|
-
"75": "rgb(229, 240, 255)",
|
|
2446
|
-
"100": "rgb(219, 234, 254)",
|
|
2447
|
-
"300": "rgb(147, 197, 253)",
|
|
2448
|
-
"400": "rgb(96, 165, 250)",
|
|
2449
|
-
"450": "rgb(77, 147, 248)",
|
|
2450
|
-
"500": "rgb(59, 130, 246)",
|
|
2451
|
-
"600": "rgb(37, 99, 235)",
|
|
2452
|
-
"800": "rgb(30, 64, 175)",
|
|
2453
|
-
"900": "rgb(14, 48, 116)",
|
|
2454
|
-
"950": "rgb(23, 37, 84)",
|
|
2455
|
-
"50p": "rgb(234, 243, 255)"
|
|
2456
|
-
},
|
|
2457
|
-
deepseek: {
|
|
2458
|
-
"50": "rgb(237, 243, 254)",
|
|
2459
|
-
"100": "rgb(228, 237, 253)",
|
|
2460
|
-
"200": "rgb(211, 226, 255)",
|
|
2461
|
-
"300": "rgb(183, 200, 254)",
|
|
2462
|
-
"400": "rgb(122, 170, 255)",
|
|
2463
|
-
"450": "rgb(86, 134, 254)",
|
|
2464
|
-
"500": "rgb(65, 118, 230)",
|
|
2465
|
-
"600": "rgb(72, 104, 178)",
|
|
2466
|
-
"700": { delete: "rgb(47, 76, 143)" },
|
|
2467
|
-
"800": "rgb(52, 65, 91)",
|
|
2468
|
-
"900": "rgb(40, 49, 66)"
|
|
2469
|
-
},
|
|
2470
|
-
green: {
|
|
2471
|
-
"100": "rgb(230, 250, 237)",
|
|
2472
|
-
"400": "rgb(78, 209, 126)",
|
|
2473
|
-
"500": {
|
|
2474
|
-
$: "rgb(34, 197, 94)",
|
|
2475
|
-
a08: "rgb(34 197 94 / 8%)",
|
|
2476
|
-
a12: "rgb(34 197 94 / 12%)"
|
|
2477
|
-
},
|
|
2478
|
-
"900": "rgb(35, 60, 44)"
|
|
2479
|
-
},
|
|
2480
|
-
neutral: {
|
|
2481
|
-
"50": "rgb(250, 250, 250)",
|
|
2482
|
-
"100": "rgb(245, 245, 245)",
|
|
2483
|
-
"150": "rgb(237, 237, 237)",
|
|
2484
|
-
"200": "rgb(229, 229, 229)",
|
|
2485
|
-
"250": "rgb(220, 220, 220)",
|
|
2486
|
-
"300": "rgb(212, 212, 212)",
|
|
2487
|
-
"400": "rgb(162, 164, 166)",
|
|
2488
|
-
"500": "rgb(127, 130, 135)",
|
|
2489
|
-
"550": "rgb(101, 103, 107)",
|
|
2490
|
-
"600": "rgb(84, 85, 87)",
|
|
2491
|
-
"700": "rgb(60, 60, 61)",
|
|
2492
|
-
"800": "rgb(41, 41, 41)",
|
|
2493
|
-
"850": "rgb(33, 33, 35)",
|
|
2494
|
-
"900": "rgb(15, 15, 15)",
|
|
2495
|
-
"1000": "rgb(0, 0, 0)",
|
|
2496
|
-
"00": "rgb(255, 255, 255)",
|
|
2497
|
-
bluish: {
|
|
2498
|
-
"50": "rgb(249, 250, 251)",
|
|
2499
|
-
"60": "rgb(245, 246, 247)",
|
|
2500
|
-
"75": "rgb(241, 243, 245)",
|
|
2501
|
-
"100": "rgb(235, 238, 242)",
|
|
2502
|
-
"150": "rgb(233, 236, 242)",
|
|
2503
|
-
"200": "rgb(225, 229, 238)",
|
|
2504
|
-
"300": "rgb(207, 211, 214)",
|
|
2505
|
-
"400": "rgb(173, 178, 184)",
|
|
2506
|
-
"500": "rgb(151, 157, 166)",
|
|
2507
|
-
"600": "rgb(129, 133, 140)",
|
|
2508
|
-
"700": "rgb(97, 102, 107)",
|
|
2509
|
-
"750": "rgb(67, 69, 74)",
|
|
2510
|
-
"800": "rgb(53, 54, 56)",
|
|
2511
|
-
"850": "rgb(44, 44, 46)",
|
|
2512
|
-
"875": "rgb(35, 35, 36)",
|
|
2513
|
-
"900": "rgb(27, 27, 28)",
|
|
2514
|
-
"950": "rgb(21, 21, 23)",
|
|
2515
|
-
"1000": "rgb(15, 17, 21)",
|
|
2516
|
-
"00": "rgb(255, 255, 255)"
|
|
2517
|
-
}
|
|
2518
|
-
},
|
|
2519
|
-
red: {
|
|
2520
|
-
"50": "rgb(254, 242, 242)",
|
|
2521
|
-
"100": "rgb(254, 226, 226)",
|
|
2522
|
-
"400": {
|
|
2523
|
-
$: "rgb(242, 90, 90)",
|
|
2524
|
-
a12: "rgb(242 90 90 / 12%)"
|
|
2525
|
-
},
|
|
2526
|
-
"500": "rgb(239, 68, 68)",
|
|
2527
|
-
"600": {
|
|
2528
|
-
$: "rgb(236, 19, 19)",
|
|
2529
|
-
a08: "rgb(236 19 19 / 8%)"
|
|
2530
|
-
},
|
|
2531
|
-
"900": "rgb(87, 12, 12)"
|
|
2532
|
-
}
|
|
2533
|
-
}
|
|
2534
|
-
}, { prefix: "dsw" });
|
|
2535
|
-
//#endregion
|
|
2536
|
-
//#region ../../client/ui-primitives/src/client/schema-form/styles.ts
|
|
2537
|
-
const MONO = "ui-monospace, SFMono-Regular, \"SF Mono\", Menlo, Consolas, monospace";
|
|
2538
|
-
const ROW = "22px";
|
|
2539
|
-
const GAP = "6px";
|
|
2540
|
-
const ACTION = "20px";
|
|
2541
|
-
const ACTION_GAP = "4px";
|
|
2542
|
-
const FOLD = "14px";
|
|
2543
|
-
const NUMBER = "32px";
|
|
2544
|
-
const PAD = "8px";
|
|
2545
|
-
const HAIRLINE = dsw.elevation.stroke;
|
|
2546
|
-
const LINE = dsw.elevation.stroke.color;
|
|
2547
|
-
const EDGE = "2px";
|
|
2548
|
-
const ERROR_WASH = `color-mix(in srgb, ${String(dsw.alias.state.error.secondary)} 12%, transparent)`;
|
|
2549
|
-
const EditorRoot = styled("div")({
|
|
2550
|
-
display: "flex",
|
|
2551
|
-
flexDirection: "column",
|
|
2552
|
-
width: "100%",
|
|
2553
|
-
fontFamily: MONO,
|
|
2554
|
-
fontSize: "14px",
|
|
2555
|
-
lineHeight: ROW,
|
|
2556
|
-
color: dsw.alias.label.primary
|
|
2557
|
-
});
|
|
2558
|
-
const LineRow = styled("div")({
|
|
2559
|
-
display: "flex",
|
|
2560
|
-
alignItems: "flex-start",
|
|
2561
|
-
gap: GAP,
|
|
2562
|
-
minHeight: ROW,
|
|
2563
|
-
paddingRight: PAD,
|
|
2564
|
-
whiteSpace: "nowrap",
|
|
2565
|
-
"&:hover": { background: dsw.alias.bg.layer["2"] },
|
|
2566
|
-
"&[data-selected='true']": { background: dsw.alias.bg.layer["3"] },
|
|
2567
|
-
"&[data-dirty='true']": { boxShadow: `inset ${EDGE} 0 0 ${String(dsw.alias.brand.primary)}` },
|
|
2568
|
-
"&[data-overridden='true']": { boxShadow: `inset ${EDGE} 0 0 ${String(LINE)}` },
|
|
2569
|
-
"&[data-dirty='true'] [data-role='key']": { color: dsw.alias.brand.primary },
|
|
2570
|
-
"&[data-overridden='true'] [data-role='key']": { color: dsw.alias.brand.primary },
|
|
2571
|
-
"&[data-invalid='true']": {
|
|
2572
|
-
background: ERROR_WASH,
|
|
2573
|
-
boxShadow: `inset ${EDGE} 0 0 ${String(dsw.alias.state.error.primary)}`
|
|
2574
|
-
},
|
|
2575
|
-
"&[data-invalid='true'] [data-role='key']": { color: dsw.alias.state.error.primary },
|
|
2576
|
-
"&:hover [data-role='actions']": { opacity: 1 }
|
|
2577
|
-
});
|
|
2578
|
-
const LineBody = styled("div")({
|
|
2579
|
-
display: "flex",
|
|
2580
|
-
alignItems: "center",
|
|
2581
|
-
gap: GAP,
|
|
2582
|
-
flex: 1,
|
|
2583
|
-
minWidth: 0,
|
|
2584
|
-
minHeight: ROW
|
|
2585
|
-
});
|
|
2586
|
-
const LineNumber = styled("span")({
|
|
2587
|
-
flex: "none",
|
|
2588
|
-
width: NUMBER,
|
|
2589
|
-
lineHeight: ROW,
|
|
2590
|
-
textAlign: "right",
|
|
2591
|
-
color: dsw.alias.label.caption,
|
|
2592
|
-
userSelect: "none",
|
|
2593
|
-
cursor: "pointer"
|
|
2594
|
-
});
|
|
2595
|
-
const LineFold = styled("button")({
|
|
2596
|
-
display: "inline-flex",
|
|
2597
|
-
alignItems: "center",
|
|
2598
|
-
justifyContent: "center",
|
|
2599
|
-
flex: "none",
|
|
2600
|
-
width: FOLD,
|
|
2601
|
-
height: ROW,
|
|
2602
|
-
padding: 0,
|
|
2603
|
-
border: 0,
|
|
2604
|
-
background: "none",
|
|
2605
|
-
color: dsw.alias.label.caption,
|
|
2606
|
-
cursor: "pointer",
|
|
2607
|
-
"&:hover": { color: dsw.alias.label.secondary }
|
|
2608
|
-
});
|
|
2609
|
-
const LineFoldSpacer = styled("span")({
|
|
2610
|
-
flex: "none",
|
|
2611
|
-
width: FOLD
|
|
2612
|
-
});
|
|
2613
|
-
const LineKey = styled("span")({
|
|
2614
|
-
flex: "none",
|
|
2615
|
-
color: dsw.alias.label.primary,
|
|
2616
|
-
"&[data-index='true']": { color: dsw.alias.label.caption }
|
|
2617
|
-
});
|
|
2618
|
-
const LineToken = styled("span")({
|
|
2619
|
-
flex: "none",
|
|
2620
|
-
color: dsw.alias.label.caption
|
|
2621
|
-
});
|
|
2622
|
-
const LineValue = styled("span")({
|
|
2623
|
-
display: "block",
|
|
2624
|
-
minWidth: 0,
|
|
2625
|
-
overflow: "hidden",
|
|
2626
|
-
textOverflow: "ellipsis",
|
|
2627
|
-
cursor: "text",
|
|
2628
|
-
color: dsw.alias.state.business.primary,
|
|
2629
|
-
"&[data-tone='number']": { color: dsw.alias.state.warn.primary },
|
|
2630
|
-
"&[data-tone='boolean']": { color: dsw.alias.state.success.primary },
|
|
2631
|
-
"&[data-tone='empty']": { color: dsw.alias.label.caption }
|
|
2632
|
-
});
|
|
2633
|
-
const ValueSlot = styled("span")({
|
|
2634
|
-
display: "block",
|
|
2635
|
-
flex: "0 1 auto",
|
|
2636
|
-
minWidth: 0,
|
|
2637
|
-
overflow: "hidden"
|
|
2638
|
-
});
|
|
2639
|
-
const ValueTrigger = styled("button")({
|
|
2640
|
-
display: "inline-flex",
|
|
2641
|
-
alignItems: "center",
|
|
2642
|
-
gap: "2px",
|
|
2643
|
-
minWidth: 0,
|
|
2644
|
-
padding: 0,
|
|
2645
|
-
border: 0,
|
|
2646
|
-
background: "none",
|
|
2647
|
-
font: "inherit",
|
|
2648
|
-
textAlign: "left",
|
|
2649
|
-
cursor: "pointer",
|
|
2650
|
-
color: dsw.alias.label.caption,
|
|
2651
|
-
"&:disabled": { cursor: "default" },
|
|
2652
|
-
"&:focus-visible": { outline: "none" }
|
|
2653
|
-
});
|
|
2654
|
-
const CompactInput = styled("span")({
|
|
2655
|
-
display: "inline-flex",
|
|
2656
|
-
flex: "1 1 auto",
|
|
2657
|
-
minWidth: 0,
|
|
2658
|
-
"& > span": {
|
|
2659
|
-
width: "100%",
|
|
2660
|
-
height: ROW,
|
|
2661
|
-
padding: "0 6px",
|
|
2662
|
-
borderRadius: "4px"
|
|
2663
|
-
},
|
|
2664
|
-
"& input": {
|
|
2665
|
-
fontSize: "14px",
|
|
2666
|
-
lineHeight: ROW
|
|
2667
|
-
}
|
|
2668
|
-
});
|
|
2669
|
-
const CompactTextField = styled("span")({
|
|
2670
|
-
display: "inline-flex",
|
|
2671
|
-
flex: "1 1 auto",
|
|
2672
|
-
minWidth: 0,
|
|
2673
|
-
padding: "0 6px",
|
|
2674
|
-
borderRadius: "4px",
|
|
2675
|
-
background: dsw.alias.bg.layer["1"],
|
|
2676
|
-
border: 0,
|
|
2677
|
-
boxShadow: HAIRLINE,
|
|
2678
|
-
"&:focus-within": { "--dsw-elevation-stroke-color": dsw.alias.brand.primary },
|
|
2679
|
-
"& > textarea": {
|
|
2680
|
-
flex: 1,
|
|
2681
|
-
width: "100%",
|
|
2682
|
-
minHeight: ACTION,
|
|
2683
|
-
maxHeight: "240px",
|
|
2684
|
-
padding: 0,
|
|
2685
|
-
border: 0,
|
|
2686
|
-
outline: "none",
|
|
2687
|
-
background: "transparent",
|
|
2688
|
-
resize: "none",
|
|
2689
|
-
fieldSizing: "content",
|
|
2690
|
-
fontFamily: "inherit",
|
|
2691
|
-
fontSize: "14px",
|
|
2692
|
-
lineHeight: ROW,
|
|
2693
|
-
color: dsw.alias.label.primary
|
|
2694
|
-
}
|
|
2695
|
-
});
|
|
2696
|
-
const LineComment = styled("span")({
|
|
2697
|
-
flex: "1 1 auto",
|
|
2698
|
-
minWidth: 0,
|
|
2699
|
-
overflow: "hidden",
|
|
2700
|
-
textOverflow: "ellipsis",
|
|
2701
|
-
color: dsw.alias.label.tertiary,
|
|
2702
|
-
fontFamily: "inherit",
|
|
2703
|
-
fontSize: "12px"
|
|
2704
|
-
});
|
|
2705
|
-
const LineInvalid = styled("span")({
|
|
2706
|
-
flex: "0 1 auto",
|
|
2707
|
-
minWidth: 0,
|
|
2708
|
-
overflow: "hidden",
|
|
2709
|
-
textOverflow: "ellipsis",
|
|
2710
|
-
color: dsw.alias.state.error.primary,
|
|
2711
|
-
fontFamily: "inherit",
|
|
2712
|
-
fontSize: "12px"
|
|
2713
|
-
});
|
|
2714
|
-
const HoverActions = styled(styled("span")({
|
|
2715
|
-
display: "inline-flex",
|
|
2716
|
-
alignItems: "center",
|
|
2717
|
-
gap: ACTION_GAP,
|
|
2718
|
-
flex: "none",
|
|
2719
|
-
opacity: 0,
|
|
2720
|
-
"& > button": {
|
|
2721
|
-
display: "inline-flex",
|
|
2722
|
-
alignItems: "center",
|
|
2723
|
-
justifyContent: "center",
|
|
2724
|
-
width: ACTION,
|
|
2725
|
-
height: ACTION,
|
|
2726
|
-
padding: 0,
|
|
2727
|
-
border: 0,
|
|
2728
|
-
borderRadius: "4px",
|
|
2729
|
-
background: "none",
|
|
2730
|
-
color: dsw.alias.label.secondary,
|
|
2731
|
-
cursor: "pointer",
|
|
2732
|
-
"&:hover": {
|
|
2733
|
-
background: dsw.alias.bg.layer["3"],
|
|
2734
|
-
color: dsw.alias.label.primary
|
|
2735
|
-
},
|
|
2736
|
-
"&:disabled": {
|
|
2737
|
-
cursor: "not-allowed",
|
|
2738
|
-
color: dsw.alias.label.dimmed
|
|
2739
|
-
}
|
|
2740
|
-
}
|
|
2741
|
-
}))({ "&[data-editing='true']": {
|
|
2742
|
-
opacity: 1,
|
|
2743
|
-
gap: GAP,
|
|
2744
|
-
"& > button": {
|
|
2745
|
-
boxShadow: HAIRLINE,
|
|
2746
|
-
background: dsw.alias.bg.layer["1"],
|
|
2747
|
-
color: dsw.alias.label.primary,
|
|
2748
|
-
"&:first-of-type": { color: dsw.alias.state.success.primary }
|
|
2749
|
-
}
|
|
2750
|
-
} });
|
|
2751
|
-
const AddWrap = styled("span")({
|
|
2752
|
-
position: "relative",
|
|
2753
|
-
display: "inline-flex",
|
|
2754
|
-
alignItems: "center",
|
|
2755
|
-
gap: GAP,
|
|
2756
|
-
flex: "1 1 auto",
|
|
2757
|
-
minWidth: 0,
|
|
2758
|
-
marginLeft: GAP,
|
|
2759
|
-
"&[data-invalid='true'] input": { borderColor: dsw.alias.state.error.primary }
|
|
2760
|
-
});
|
|
2761
|
-
const Hint$1 = styled("p")({
|
|
2762
|
-
margin: 0,
|
|
2763
|
-
fontSize: "12px",
|
|
2764
|
-
lineHeight: 1.5,
|
|
2765
|
-
color: dsw.alias.label.tertiary
|
|
2766
|
-
});
|
|
2767
1605
|
//#endregion
|
|
2768
1606
|
//#region ../../client/ui-primitives/src/client/schema-form/TruncatedTooltip.tsx
|
|
2769
1607
|
function TruncatedTooltip({ label, children }) {
|
|
@@ -2821,7 +1659,8 @@ window.__ModuleLoader__.load({
|
|
|
2821
1659
|
owner,
|
|
2822
1660
|
options: owner.options
|
|
2823
1661
|
});
|
|
2824
|
-
if (owner.node.meta.secret) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
1662
|
+
if (owner.node.meta.secret) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1663
|
+
className: schema_form_module_css_default.lineValue,
|
|
2825
1664
|
"data-tone": "empty",
|
|
2826
1665
|
title: owner.hint,
|
|
2827
1666
|
children: owner.secretConfigured ? "••••••" : ""
|
|
@@ -2829,7 +1668,8 @@ window.__ModuleLoader__.load({
|
|
|
2829
1668
|
const text = tokenText(owner.value);
|
|
2830
1669
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TruncatedTooltip, {
|
|
2831
1670
|
label: text,
|
|
2832
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
1671
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1672
|
+
className: schema_form_module_css_default.lineValue,
|
|
2833
1673
|
"data-tone": owner.node.readOnly === null ? tokenTone(owner.value) : "empty",
|
|
2834
1674
|
children: text
|
|
2835
1675
|
})
|
|
@@ -2859,14 +1699,16 @@ window.__ModuleLoader__.load({
|
|
|
2859
1699
|
onClose: () => {
|
|
2860
1700
|
setOpen(false);
|
|
2861
1701
|
},
|
|
2862
|
-
anchor: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
1702
|
+
anchor: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
1703
|
+
className: schema_form_module_css_default.valueTrigger,
|
|
2863
1704
|
type: "button",
|
|
2864
1705
|
disabled: owner.disabled,
|
|
2865
1706
|
"aria-label": owner.label,
|
|
2866
1707
|
onClick: () => {
|
|
2867
1708
|
setOpen(true);
|
|
2868
1709
|
},
|
|
2869
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
1710
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1711
|
+
className: schema_form_module_css_default.lineValue,
|
|
2870
1712
|
"data-tone": current === void 0 ? tokenTone(owner.value) : tokenTone(current.value),
|
|
2871
1713
|
children: label
|
|
2872
1714
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronDownOutlineRegular, { size: 14 })]
|
|
@@ -2995,6 +1837,11 @@ window.__ModuleLoader__.load({
|
|
|
2995
1837
|
}
|
|
2996
1838
|
}
|
|
2997
1839
|
//#endregion
|
|
1840
|
+
//#region ../../client/ui-primitives/src/client/controls/classes.ts
|
|
1841
|
+
function classes(...names) {
|
|
1842
|
+
return names.filter((name) => typeof name === "string" && name !== "").join(" ");
|
|
1843
|
+
}
|
|
1844
|
+
//#endregion
|
|
2998
1845
|
//#region ../../client/ui-primitives/src/client/schema-form/Editor.tsx
|
|
2999
1846
|
function Editor(props) {
|
|
3000
1847
|
const { ns, state, face, t, resolveText, renderField } = props;
|
|
@@ -3010,9 +1857,10 @@ window.__ModuleLoader__.load({
|
|
|
3010
1857
|
t
|
|
3011
1858
|
]);
|
|
3012
1859
|
const disabled = !state.writable || !state.available;
|
|
3013
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
1860
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1861
|
+
className: schema_form_module_css_default.editorRoot,
|
|
3014
1862
|
"data-editor": "schema-form",
|
|
3015
|
-
children: lines.map((line, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Row, {
|
|
1863
|
+
children: lines.map((line, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Row$1, {
|
|
3016
1864
|
line,
|
|
3017
1865
|
n: index + 1,
|
|
3018
1866
|
ns,
|
|
@@ -3073,20 +1921,26 @@ window.__ModuleLoader__.load({
|
|
|
3073
1921
|
toggled
|
|
3074
1922
|
]);
|
|
3075
1923
|
}
|
|
3076
|
-
function Row({ line, n, ns, state, face, fold, t, resolveText, disabled, editing, selected, dismissed, onEdit, onAdded, onDismiss, onSelect, renderField }) {
|
|
1924
|
+
function Row$1({ line, n, ns, state, face, fold, t, resolveText, disabled, editing, selected, dismissed, onEdit, onAdded, onDismiss, onSelect, renderField }) {
|
|
3077
1925
|
const key = fieldKey(line.path);
|
|
3078
1926
|
const indent = { paddingLeft: `${String(line.depth * 14)}px` };
|
|
3079
|
-
const body = line.kind === "comment" ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
1927
|
+
const body = line.kind === "comment" ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1928
|
+
className: schema_form_module_css_default.lineFoldSpacer,
|
|
1929
|
+
"data-role": "fold"
|
|
1930
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TruncatedTooltip, {
|
|
3080
1931
|
label: line.text,
|
|
3081
|
-
children: line.invalid ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
1932
|
+
children: line.invalid ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1933
|
+
className: schema_form_module_css_default.lineInvalid,
|
|
3082
1934
|
"data-role": "comment",
|
|
3083
1935
|
children: `// ${line.text}`
|
|
3084
|
-
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
1936
|
+
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1937
|
+
className: schema_form_module_css_default.lineComment,
|
|
3085
1938
|
"data-role": "comment",
|
|
3086
1939
|
children: `// ${line.text}`
|
|
3087
1940
|
})
|
|
3088
1941
|
})] }) : line.kind === "open" ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
3089
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
1942
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
1943
|
+
className: schema_form_module_css_default.lineFold,
|
|
3090
1944
|
"data-role": "fold",
|
|
3091
1945
|
type: "button",
|
|
3092
1946
|
"aria-expanded": !line.collapsed,
|
|
@@ -3102,7 +1956,10 @@ window.__ModuleLoader__.load({
|
|
|
3102
1956
|
t,
|
|
3103
1957
|
disabled
|
|
3104
1958
|
}),
|
|
3105
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
1959
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1960
|
+
className: schema_form_module_css_default.lineToken,
|
|
1961
|
+
children: line.shape === "object" ? line.collapsed ? "{…}" : "{" : line.collapsed ? "[…]" : "["
|
|
1962
|
+
}),
|
|
3106
1963
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(VariantSelect, {
|
|
3107
1964
|
control: line.variants,
|
|
3108
1965
|
path: line.path,
|
|
@@ -3111,8 +1968,14 @@ window.__ModuleLoader__.load({
|
|
|
3111
1968
|
t
|
|
3112
1969
|
})
|
|
3113
1970
|
] }) : line.kind === "close" ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
3114
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
3115
|
-
|
|
1971
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1972
|
+
className: schema_form_module_css_default.lineFoldSpacer,
|
|
1973
|
+
"data-role": "fold"
|
|
1974
|
+
}),
|
|
1975
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1976
|
+
className: schema_form_module_css_default.lineToken,
|
|
1977
|
+
children: line.shape === "object" ? "}" : "]"
|
|
1978
|
+
}),
|
|
3116
1979
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(AddLine, {
|
|
3117
1980
|
line,
|
|
3118
1981
|
state,
|
|
@@ -3135,20 +1998,23 @@ window.__ModuleLoader__.load({
|
|
|
3135
1998
|
onDismiss,
|
|
3136
1999
|
renderField
|
|
3137
2000
|
});
|
|
3138
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
2001
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2002
|
+
className: schema_form_module_css_default.lineRow,
|
|
3139
2003
|
"data-line": line.kind,
|
|
3140
2004
|
"data-field-path": line.path.join("."),
|
|
3141
2005
|
"data-selected": selected === key ? "true" : void 0,
|
|
3142
2006
|
"data-dirty": line.kind === "field" && line.field.staged ? "true" : void 0,
|
|
3143
2007
|
"data-overridden": line.kind === "field" && line.field.overridden && !line.field.staged ? "true" : void 0,
|
|
3144
2008
|
"data-invalid": line.kind === "field" && (line.field.invalid !== void 0 || state.invalidAt.has(key)) ? "true" : void 0,
|
|
3145
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
2009
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2010
|
+
className: schema_form_module_css_default.lineNumber,
|
|
3146
2011
|
"data-role": "number",
|
|
3147
2012
|
onClick: () => {
|
|
3148
2013
|
onSelect(line.path);
|
|
3149
2014
|
},
|
|
3150
2015
|
children: n
|
|
3151
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
2016
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2017
|
+
className: schema_form_module_css_default.lineBody,
|
|
3152
2018
|
"data-role": "body",
|
|
3153
2019
|
style: indent,
|
|
3154
2020
|
children: body
|
|
@@ -3193,49 +2059,63 @@ window.__ModuleLoader__.load({
|
|
|
3193
2059
|
const text = line.field.text ?? valueText(line.field.value);
|
|
3194
2060
|
const multiline = isMultiline(line.field.value) || /[\r\n]/.test(text);
|
|
3195
2061
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
3196
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
3197
|
-
|
|
2062
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2063
|
+
className: schema_form_module_css_default.lineFoldSpacer,
|
|
2064
|
+
"data-role": "fold"
|
|
2065
|
+
}),
|
|
2066
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2067
|
+
className: schema_form_module_css_default.lineKey,
|
|
3198
2068
|
"data-role": "key",
|
|
3199
2069
|
"data-index": member?.index === void 0 ? void 0 : "true",
|
|
3200
2070
|
title: member?.key ?? line.node.key,
|
|
3201
2071
|
children: member?.key ?? line.node.key
|
|
3202
2072
|
}),
|
|
3203
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
2073
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2074
|
+
className: schema_form_module_css_default.lineToken,
|
|
2075
|
+
children: member?.index === void 0 ? ": " : " "
|
|
2076
|
+
}),
|
|
2077
|
+
isEditing ? multiline ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2078
|
+
className: schema_form_module_css_default.compactTextField,
|
|
2079
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("textarea", {
|
|
2080
|
+
autoFocus: !missing,
|
|
2081
|
+
rows: 1,
|
|
2082
|
+
"aria-label": owner.label,
|
|
2083
|
+
value: text,
|
|
2084
|
+
onChange: (event) => {
|
|
2085
|
+
owner.onEditText(event.target.value);
|
|
2086
|
+
},
|
|
2087
|
+
onKeyDown: (event) => {
|
|
2088
|
+
if (event.key === "Escape") {
|
|
2089
|
+
face.revert(line.path);
|
|
2090
|
+
onEdit(void 0);
|
|
2091
|
+
}
|
|
3216
2092
|
}
|
|
3217
|
-
}
|
|
3218
|
-
})
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
|
|
2093
|
+
})
|
|
2094
|
+
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2095
|
+
className: schema_form_module_css_default.compactInput,
|
|
2096
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Input, {
|
|
2097
|
+
autoFocus: !missing,
|
|
2098
|
+
type: "text",
|
|
2099
|
+
"aria-label": owner.label,
|
|
2100
|
+
placeholder: missing ? t("empty") : "",
|
|
2101
|
+
value: text,
|
|
2102
|
+
onBlur: () => {
|
|
2103
|
+
if (!missing) onEdit(void 0);
|
|
2104
|
+
},
|
|
2105
|
+
onChange: (event) => {
|
|
2106
|
+
owner.onEditText(event.target.value);
|
|
2107
|
+
},
|
|
2108
|
+
onKeyDown: (event) => {
|
|
2109
|
+
if (event.key === "Enter" && !missing) onEdit(void 0);
|
|
2110
|
+
if (event.key === "Escape") {
|
|
2111
|
+
face.revert(line.path);
|
|
2112
|
+
onEdit(void 0);
|
|
2113
|
+
}
|
|
3235
2114
|
}
|
|
3236
|
-
}
|
|
3237
|
-
})
|
|
3238
|
-
isEditing || line.variantsStandIn ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
2115
|
+
})
|
|
2116
|
+
}) : null,
|
|
2117
|
+
isEditing || line.variantsStandIn ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2118
|
+
className: schema_form_module_css_default.valueSlot,
|
|
3239
2119
|
"data-role": "value",
|
|
3240
2120
|
onClick: () => {
|
|
3241
2121
|
if (editable) onEdit(key);
|
|
@@ -3249,7 +2129,8 @@ window.__ModuleLoader__.load({
|
|
|
3249
2129
|
disabled,
|
|
3250
2130
|
t
|
|
3251
2131
|
}),
|
|
3252
|
-
isEditing ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
2132
|
+
isEditing ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
2133
|
+
className: classes(schema_form_module_css_default.lineActions, schema_form_module_css_default.hoverActions),
|
|
3253
2134
|
"data-role": "actions",
|
|
3254
2135
|
"data-editing": "true",
|
|
3255
2136
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
@@ -3272,7 +2153,8 @@ window.__ModuleLoader__.load({
|
|
|
3272
2153
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconCloseOutlineRegular, { size: 14 })
|
|
3273
2154
|
})]
|
|
3274
2155
|
}) : null,
|
|
3275
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
2156
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
2157
|
+
className: classes(schema_form_module_css_default.lineActions, schema_form_module_css_default.hoverActions),
|
|
3276
2158
|
"data-role": "actions",
|
|
3277
2159
|
children: [
|
|
3278
2160
|
line.field.staged && !disabled ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
@@ -3338,7 +2220,8 @@ window.__ModuleLoader__.load({
|
|
|
3338
2220
|
onClose: () => {
|
|
3339
2221
|
setOpen(false);
|
|
3340
2222
|
},
|
|
3341
|
-
anchor: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
2223
|
+
anchor: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
2224
|
+
className: schema_form_module_css_default.valueTrigger,
|
|
3342
2225
|
type: "button",
|
|
3343
2226
|
"data-role": "variant",
|
|
3344
2227
|
disabled,
|
|
@@ -3346,7 +2229,8 @@ window.__ModuleLoader__.load({
|
|
|
3346
2229
|
onClick: () => {
|
|
3347
2230
|
setOpen(true);
|
|
3348
2231
|
},
|
|
3349
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
2232
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2233
|
+
className: schema_form_module_css_default.lineValue,
|
|
3350
2234
|
"data-tone": "empty",
|
|
3351
2235
|
children: current?.label ?? ""
|
|
3352
2236
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronDownOutlineRegular, { size: 14 })]
|
|
@@ -3359,14 +2243,19 @@ window.__ModuleLoader__.load({
|
|
|
3359
2243
|
if (key === "") return null;
|
|
3360
2244
|
const indexed = member !== void 0 && member.index !== void 0;
|
|
3361
2245
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
3362
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
2246
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2247
|
+
className: schema_form_module_css_default.lineKey,
|
|
3363
2248
|
"data-role": "key",
|
|
3364
2249
|
"data-index": indexed ? "true" : void 0,
|
|
3365
2250
|
title: key,
|
|
3366
2251
|
children: key
|
|
3367
2252
|
}),
|
|
3368
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
3369
|
-
|
|
2253
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2254
|
+
className: schema_form_module_css_default.lineToken,
|
|
2255
|
+
children: indexed ? " " : ": "
|
|
2256
|
+
}),
|
|
2257
|
+
member === void 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2258
|
+
className: classes(schema_form_module_css_default.lineActions, schema_form_module_css_default.hoverActions),
|
|
3370
2259
|
"data-role": "actions",
|
|
3371
2260
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RemoveLineButton, {
|
|
3372
2261
|
member,
|
|
@@ -3429,7 +2318,8 @@ window.__ModuleLoader__.load({
|
|
|
3429
2318
|
setText("");
|
|
3430
2319
|
setOpen(false);
|
|
3431
2320
|
};
|
|
3432
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
2321
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
2322
|
+
className: schema_form_module_css_default.addWrap,
|
|
3433
2323
|
"data-add": spec.kind,
|
|
3434
2324
|
"data-invalid": invalid ? "true" : void 0,
|
|
3435
2325
|
children: [
|
|
@@ -3449,35 +2339,44 @@ window.__ModuleLoader__.load({
|
|
|
3449
2339
|
onClose: () => {
|
|
3450
2340
|
setOpen(false);
|
|
3451
2341
|
},
|
|
3452
|
-
anchor: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
2342
|
+
anchor: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2343
|
+
className: schema_form_module_css_default.compactInput,
|
|
2344
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Input, {
|
|
2345
|
+
value: text,
|
|
2346
|
+
placeholder: label,
|
|
2347
|
+
"aria-label": label,
|
|
2348
|
+
disabled,
|
|
2349
|
+
onFocus: () => {
|
|
2350
|
+
setOpen(true);
|
|
2351
|
+
},
|
|
2352
|
+
onChange: (event) => {
|
|
2353
|
+
setText(event.target.value);
|
|
2354
|
+
setInvalid(false);
|
|
2355
|
+
setOpen(true);
|
|
2356
|
+
},
|
|
2357
|
+
onKeyDown: (event) => {
|
|
2358
|
+
if (event.key === "Enter") {
|
|
2359
|
+
event.preventDefault();
|
|
2360
|
+
commit(matched.length === 1 && spec.kind === "prop" ? matched[0]?.key : void 0);
|
|
2361
|
+
}
|
|
2362
|
+
if (event.key === "Escape") {
|
|
2363
|
+
setText("");
|
|
2364
|
+
setOpen(false);
|
|
2365
|
+
}
|
|
3473
2366
|
}
|
|
3474
|
-
}
|
|
3475
|
-
})
|
|
2367
|
+
})
|
|
2368
|
+
})
|
|
3476
2369
|
}),
|
|
3477
|
-
invalid ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
2370
|
+
invalid ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2371
|
+
className: schema_form_module_css_default.lineInvalid,
|
|
2372
|
+
children: t("unknownProperty")
|
|
2373
|
+
}) : null,
|
|
3478
2374
|
!invalid && matched.length === 1 && matched[0]?.description !== void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TruncatedTooltip, {
|
|
3479
2375
|
label: resolveText(matched[0].description),
|
|
3480
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
2376
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2377
|
+
className: schema_form_module_css_default.lineComment,
|
|
2378
|
+
children: resolveText(matched[0].description)
|
|
2379
|
+
})
|
|
3481
2380
|
}) : null
|
|
3482
2381
|
]
|
|
3483
2382
|
});
|
|
@@ -3495,7 +2394,8 @@ window.__ModuleLoader__.load({
|
|
|
3495
2394
|
save: t("save"),
|
|
3496
2395
|
saving: t("saving")
|
|
3497
2396
|
};
|
|
3498
|
-
if (!state.configured) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
2397
|
+
if (!state.configured) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
2398
|
+
className: schema_form_module_css_default.hint,
|
|
3499
2399
|
role: "status",
|
|
3500
2400
|
children: t("noSchema")
|
|
3501
2401
|
});
|
|
@@ -3518,7 +2418,8 @@ window.__ModuleLoader__.load({
|
|
|
3518
2418
|
...owner,
|
|
3519
2419
|
onEditText: withParse(owner, t)
|
|
3520
2420
|
} }) })
|
|
3521
|
-
}), state.violation === void 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
2421
|
+
}), state.violation === void 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
2422
|
+
className: schema_form_module_css_default.hint,
|
|
3522
2423
|
role: "alert",
|
|
3523
2424
|
"data-violation": "true",
|
|
3524
2425
|
children: t("notSaved", { message: state.violation.message })
|
|
@@ -3532,7 +2433,30 @@ window.__ModuleLoader__.load({
|
|
|
3532
2433
|
}
|
|
3533
2434
|
//#endregion
|
|
3534
2435
|
//#region ../../client/ui-primitives/src/client/schema-form/index.ts
|
|
3535
|
-
|
|
2436
|
+
var schema_form_exports = /* @__PURE__ */ __exportAll({
|
|
2437
|
+
InlineValue: () => InlineValue,
|
|
2438
|
+
NS: () => NS$1,
|
|
2439
|
+
SchemaFieldDefault: () => SchemaFieldDefault,
|
|
2440
|
+
SchemaFormController: () => SchemaFormController,
|
|
2441
|
+
SchemaFormHints: () => SchemaFormHints,
|
|
2442
|
+
apply: () => apply$2,
|
|
2443
|
+
canRender: () => canRender,
|
|
2444
|
+
containerShape: () => containerShape,
|
|
2445
|
+
editorLines: () => editorLines,
|
|
2446
|
+
failureOf: () => failureOf,
|
|
2447
|
+
inject: () => inject$2,
|
|
2448
|
+
optionsFor: () => optionsFor,
|
|
2449
|
+
parseFor: () => parseFor,
|
|
2450
|
+
projectNode: () => projectNode,
|
|
2451
|
+
projectRoot: () => projectRoot,
|
|
2452
|
+
rowRegistrations: () => rowRegistrations,
|
|
2453
|
+
tokenText: () => tokenText,
|
|
2454
|
+
tokenTone: () => tokenTone,
|
|
2455
|
+
valueText: () => valueText,
|
|
2456
|
+
visibleFields: () => visibleFields,
|
|
2457
|
+
walkFields: () => walkFields
|
|
2458
|
+
});
|
|
2459
|
+
const NS$1 = "settings.schema-form";
|
|
3536
2460
|
const inject$2 = [
|
|
3537
2461
|
"slots",
|
|
3538
2462
|
"locale",
|
|
@@ -3548,7 +2472,7 @@ window.__ModuleLoader__.load({
|
|
|
3548
2472
|
});
|
|
3549
2473
|
}
|
|
3550
2474
|
function install(ctx) {
|
|
3551
|
-
ctx.effect(() => ctx.locale.register(NS$
|
|
2475
|
+
ctx.effect(() => ctx.locale.register(NS$1, {
|
|
3552
2476
|
zh,
|
|
3553
2477
|
en
|
|
3554
2478
|
}), "ui-schema-form: dictionaries");
|
|
@@ -3560,7 +2484,7 @@ window.__ModuleLoader__.load({
|
|
|
3560
2484
|
kind: "chain",
|
|
3561
2485
|
scope: "root"
|
|
3562
2486
|
} },
|
|
3563
|
-
locale: NS$
|
|
2487
|
+
locale: NS$1
|
|
3564
2488
|
}, SchemaForm), "ui-schema-form: form factory");
|
|
3565
2489
|
const rehydrate = (serialized) => ctx.settingsSchema.rehydrate(serialized);
|
|
3566
2490
|
const validate = (schema, value) => {
|
|
@@ -3584,7 +2508,7 @@ window.__ModuleLoader__.load({
|
|
|
3584
2508
|
describe,
|
|
3585
2509
|
rehydrate,
|
|
3586
2510
|
validate,
|
|
3587
|
-
t: ctx.locale.bind(NS$
|
|
2511
|
+
t: ctx.locale.bind(NS$1),
|
|
3588
2512
|
hints: {
|
|
3589
2513
|
keysFor: (path) => hints.keysFor(ns, path),
|
|
3590
2514
|
textFor: (path) => hints.textFor(ns, path),
|
|
@@ -3616,243 +2540,862 @@ window.__ModuleLoader__.load({
|
|
|
3616
2540
|
},
|
|
3617
2541
|
subscribeBundles: (listener) => ctx.remote.$on("plugin-manager/changed", listener),
|
|
3618
2542
|
entryFor,
|
|
3619
|
-
locale: NS$
|
|
2543
|
+
locale: NS$1,
|
|
3620
2544
|
release: (ns) => {
|
|
3621
2545
|
const entry = entries.get(ns);
|
|
3622
2546
|
entries.delete(ns);
|
|
3623
2547
|
entry?.controller.dispose();
|
|
3624
2548
|
}
|
|
3625
2549
|
});
|
|
3626
|
-
ctx.effect(() => {
|
|
3627
|
-
const offDescribe = ctx.configForms.describe().subscribe(() => {
|
|
3628
|
-
registration.sync();
|
|
3629
|
-
});
|
|
3630
|
-
const offHints = hints.subscribe(() => {
|
|
3631
|
-
for (const entry of entries.values()) entry.controller.refresh();
|
|
3632
|
-
});
|
|
3633
|
-
registration.sync();
|
|
3634
|
-
return () => {
|
|
3635
|
-
offDescribe();
|
|
3636
|
-
offHints();
|
|
3637
|
-
registration.dispose();
|
|
3638
|
-
for (const [ns, entry] of entries) {
|
|
3639
|
-
entries.delete(ns);
|
|
3640
|
-
entry.controller.dispose();
|
|
3641
|
-
}
|
|
3642
|
-
};
|
|
3643
|
-
}, "ui-schema-form: row registrations");
|
|
2550
|
+
ctx.effect(() => {
|
|
2551
|
+
const offDescribe = ctx.configForms.describe().subscribe(() => {
|
|
2552
|
+
registration.sync();
|
|
2553
|
+
});
|
|
2554
|
+
const offHints = hints.subscribe(() => {
|
|
2555
|
+
for (const entry of entries.values()) entry.controller.refresh();
|
|
2556
|
+
});
|
|
2557
|
+
registration.sync();
|
|
2558
|
+
return () => {
|
|
2559
|
+
offDescribe();
|
|
2560
|
+
offHints();
|
|
2561
|
+
registration.dispose();
|
|
2562
|
+
for (const [ns, entry] of entries) {
|
|
2563
|
+
entries.delete(ns);
|
|
2564
|
+
entry.controller.dispose();
|
|
2565
|
+
}
|
|
2566
|
+
};
|
|
2567
|
+
}, "ui-schema-form: row registrations");
|
|
2568
|
+
}
|
|
2569
|
+
//#endregion
|
|
2570
|
+
//#region ../../client/ui-primitives/src/client/markdown-labels.ts
|
|
2571
|
+
function markdownLabels(t) {
|
|
2572
|
+
return {
|
|
2573
|
+
code: {
|
|
2574
|
+
copyLabel: t("copy"),
|
|
2575
|
+
copiedLabel: t("copied")
|
|
2576
|
+
},
|
|
2577
|
+
footnotes: t("markdown.footnotes")
|
|
2578
|
+
};
|
|
2579
|
+
}
|
|
2580
|
+
//#endregion
|
|
2581
|
+
//#region \0dsh-css-modules:/Users/morlay/src/github.com/morlay/dsh-plugin/packages/client/ui-primitives/src/client/layout/layout.module.css.mjs
|
|
2582
|
+
const css$16 = ".e_G4ZW_stack{flex-direction:column;min-width:0;display:flex}.e_G4ZW_row{flex-direction:row;align-items:center;min-width:0;display:flex}.e_G4ZW_gap0{gap:0}.e_G4ZW_gap2{gap:2px}.e_G4ZW_gap4{gap:4px}.e_G4ZW_gap6{gap:6px}.e_G4ZW_gap8{gap:8px}.e_G4ZW_gap10{gap:10px}.e_G4ZW_gap12{gap:12px}.e_G4ZW_gap14{gap:14px}.e_G4ZW_gap16{gap:16px}.e_G4ZW_alignStart{align-items:flex-start}.e_G4ZW_alignCenter{align-items:center}.e_G4ZW_alignEnd{align-items:flex-end}.e_G4ZW_justifyBetween{justify-content:space-between}.e_G4ZW_justifyEnd{justify-content:flex-end}.e_G4ZW_justifyCenter{justify-content:center}.e_G4ZW_wrap{flex-wrap:wrap}.e_G4ZW_grow{flex:auto;min-width:0}.e_G4ZW_push{margin-left:auto}.e_G4ZW_fill{box-sizing:border-box;width:100%;height:100%;overflow:hidden}.e_G4ZW_scroll{flex:auto;min-height:0;overflow-y:auto}.e_G4ZW_plain{margin:0;padding:0;list-style:none}.e_G4ZW_padNone{padding:0}.e_G4ZW_padCard{padding:8px 12px}.e_G4ZW_padBody{padding:8px 0}.e_G4ZW_padPage{padding:24px 28px}.e_G4ZW_padRow{padding:10px 12px}.e_G4ZW_padBlocking{padding:32px 40px}.e_G4ZW_text{margin:0}.e_G4ZW_sizeXs{font-size:11px;line-height:1.5}.e_G4ZW_sizeSm{font-size:12px;line-height:18px}.e_G4ZW_sizeMd{font-size:13px;line-height:20px}.e_G4ZW_sizeBase{font-size:14px;line-height:24px}.e_G4ZW_sizeLg{font-size:16px;line-height:24px}.e_G4ZW_tonePrimary{color:var(--dsw-alias-label-primary)}.e_G4ZW_toneSecondary{color:var(--dsw-alias-label-secondary)}.e_G4ZW_toneTertiary{color:var(--dsw-alias-label-tertiary)}.e_G4ZW_toneDanger{color:var(--dsw-alias-label-error,var(--dsw-alias-label-primary))}.e_G4ZW_weightMedium{font-weight:500}.e_G4ZW_strong{font-weight:600}.e_G4ZW_mono{word-break:break-all;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,monospace}.e_G4ZW_truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.e_G4ZW_tabular{font-variant-numeric:tabular-nums}.e_G4ZW_boxed{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-base);border-radius:10px}.e_G4ZW_fixed{flex:none}.e_G4ZW_gapWide{gap:6px 20px}.e_G4ZW_narrow{min-width:0;max-width:min(calc(var(--dsh-chat-content-width,748px) * .702), 82%)}.e_G4ZW_wSearch{flex:none;width:360px;max-width:100%}";
|
|
2583
|
+
const tagId$16 = "@morlay/ui-conversation-message-actions/layout.module.css";
|
|
2584
|
+
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@morlay/ui-conversation-message-actions/layout.module.css\"]") === null) {
|
|
2585
|
+
const tag = document.createElement("style");
|
|
2586
|
+
tag.dataset.plugin = "@morlay/ui-conversation-message-actions";
|
|
2587
|
+
tag.dataset.pluginCss = tagId$16;
|
|
2588
|
+
tag.textContent = css$16;
|
|
2589
|
+
document.head.appendChild(tag);
|
|
2590
|
+
}
|
|
2591
|
+
var layout_module_css_default = {
|
|
2592
|
+
"sizeSm": "e_G4ZW_sizeSm",
|
|
2593
|
+
"gap0": "e_G4ZW_gap0",
|
|
2594
|
+
"justifyCenter": "e_G4ZW_justifyCenter",
|
|
2595
|
+
"truncate": "e_G4ZW_truncate",
|
|
2596
|
+
"justifyEnd": "e_G4ZW_justifyEnd",
|
|
2597
|
+
"toneSecondary": "e_G4ZW_toneSecondary",
|
|
2598
|
+
"gap16": "e_G4ZW_gap16",
|
|
2599
|
+
"gap6": "e_G4ZW_gap6",
|
|
2600
|
+
"fill": "e_G4ZW_fill",
|
|
2601
|
+
"gap4": "e_G4ZW_gap4",
|
|
2602
|
+
"sizeMd": "e_G4ZW_sizeMd",
|
|
2603
|
+
"toneDanger": "e_G4ZW_toneDanger",
|
|
2604
|
+
"gapWide": "e_G4ZW_gapWide",
|
|
2605
|
+
"alignCenter": "e_G4ZW_alignCenter",
|
|
2606
|
+
"wSearch": "e_G4ZW_wSearch",
|
|
2607
|
+
"gap12": "e_G4ZW_gap12",
|
|
2608
|
+
"gap2": "e_G4ZW_gap2",
|
|
2609
|
+
"strong": "e_G4ZW_strong",
|
|
2610
|
+
"row": "e_G4ZW_row",
|
|
2611
|
+
"scroll": "e_G4ZW_scroll",
|
|
2612
|
+
"boxed": "e_G4ZW_boxed",
|
|
2613
|
+
"gap14": "e_G4ZW_gap14",
|
|
2614
|
+
"wrap": "e_G4ZW_wrap",
|
|
2615
|
+
"padRow": "e_G4ZW_padRow",
|
|
2616
|
+
"sizeXs": "e_G4ZW_sizeXs",
|
|
2617
|
+
"sizeLg": "e_G4ZW_sizeLg",
|
|
2618
|
+
"fixed": "e_G4ZW_fixed",
|
|
2619
|
+
"alignEnd": "e_G4ZW_alignEnd",
|
|
2620
|
+
"padNone": "e_G4ZW_padNone",
|
|
2621
|
+
"padPage": "e_G4ZW_padPage",
|
|
2622
|
+
"padBody": "e_G4ZW_padBody",
|
|
2623
|
+
"alignStart": "e_G4ZW_alignStart",
|
|
2624
|
+
"gap8": "e_G4ZW_gap8",
|
|
2625
|
+
"gap10": "e_G4ZW_gap10",
|
|
2626
|
+
"stack": "e_G4ZW_stack",
|
|
2627
|
+
"plain": "e_G4ZW_plain",
|
|
2628
|
+
"push": "e_G4ZW_push",
|
|
2629
|
+
"padCard": "e_G4ZW_padCard",
|
|
2630
|
+
"text": "e_G4ZW_text",
|
|
2631
|
+
"grow": "e_G4ZW_grow",
|
|
2632
|
+
"sizeBase": "e_G4ZW_sizeBase",
|
|
2633
|
+
"tonePrimary": "e_G4ZW_tonePrimary",
|
|
2634
|
+
"padBlocking": "e_G4ZW_padBlocking",
|
|
2635
|
+
"toneTertiary": "e_G4ZW_toneTertiary",
|
|
2636
|
+
"weightMedium": "e_G4ZW_weightMedium",
|
|
2637
|
+
"mono": "e_G4ZW_mono",
|
|
2638
|
+
"justifyBetween": "e_G4ZW_justifyBetween",
|
|
2639
|
+
"tabular": "e_G4ZW_tabular",
|
|
2640
|
+
"narrow": "e_G4ZW_narrow"
|
|
2641
|
+
};
|
|
2642
|
+
//#endregion
|
|
2643
|
+
//#region ../../client/ui-primitives/src/client/layout/scales.ts
|
|
2644
|
+
function gapClass(css, gap) {
|
|
2645
|
+
if (gap === void 0) return void 0;
|
|
2646
|
+
return gap === "wide" ? css.gapWide : css[`gap${gap}`];
|
|
2647
|
+
}
|
|
2648
|
+
function alignClass(css, align) {
|
|
2649
|
+
if (align === void 0 || align === "stretch") return void 0;
|
|
2650
|
+
if (align === "start") return css.alignStart;
|
|
2651
|
+
return align === "center" ? css.alignCenter : css.alignEnd;
|
|
2652
|
+
}
|
|
2653
|
+
function justifyClass(css, justify) {
|
|
2654
|
+
if (justify === void 0) return void 0;
|
|
2655
|
+
if (justify === "between") return css.justifyBetween;
|
|
2656
|
+
if (justify === "end") return css.justifyEnd;
|
|
2657
|
+
return justify === "center" ? css.justifyCenter : void 0;
|
|
2658
|
+
}
|
|
2659
|
+
function padClass(css, pad) {
|
|
2660
|
+
if (pad === void 0 || pad === "none") return void 0;
|
|
2661
|
+
if (pad === "card") return css.padCard;
|
|
2662
|
+
if (pad === "body") return css.padBody;
|
|
2663
|
+
if (pad === "page") return css.padPage;
|
|
2664
|
+
return pad === "row" ? css.padRow : css.padBlocking;
|
|
2665
|
+
}
|
|
2666
|
+
function sizeClass(css, size) {
|
|
2667
|
+
if (size === void 0) return void 0;
|
|
2668
|
+
if (size === "xs") return css.sizeXs;
|
|
2669
|
+
if (size === "sm") return css.sizeSm;
|
|
2670
|
+
if (size === "md") return css.sizeMd;
|
|
2671
|
+
return size === "base" ? css.sizeBase : css.sizeLg;
|
|
2672
|
+
}
|
|
2673
|
+
function toneClass(css, tone) {
|
|
2674
|
+
if (tone === void 0) return void 0;
|
|
2675
|
+
if (tone === "primary") return css.tonePrimary;
|
|
2676
|
+
if (tone === "secondary") return css.toneSecondary;
|
|
2677
|
+
return tone === "tertiary" ? css.toneTertiary : css.toneDanger;
|
|
2678
|
+
}
|
|
2679
|
+
function weightClass(css, weight) {
|
|
2680
|
+
if (weight === void 0) return void 0;
|
|
2681
|
+
return weight === "medium" ? css.weightMedium : css.strong;
|
|
2682
|
+
}
|
|
2683
|
+
//#endregion
|
|
2684
|
+
//#region ../../client/ui-primitives/src/client/layout/Row.tsx
|
|
2685
|
+
const Row = (0, react.forwardRef)(function Row({ as: Element = "div", gap, align, justify, wrap = false, grow = false, boxed = false, fixed = false, narrow = false, push = false, plain = false, pad, className, children, ...rest }, ref) {
|
|
2686
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Element, {
|
|
2687
|
+
ref,
|
|
2688
|
+
className: classes(layout_module_css_default.row, gapClass(layout_module_css_default, gap), alignClass(layout_module_css_default, align), justifyClass(layout_module_css_default, justify), padClass(layout_module_css_default, pad), wrap ? layout_module_css_default.wrap : void 0, grow ? layout_module_css_default.grow : void 0, boxed ? layout_module_css_default.boxed : void 0, fixed ? layout_module_css_default.fixed : void 0, narrow ? layout_module_css_default.narrow : void 0, push ? layout_module_css_default.push : void 0, boxed ? layout_module_css_default.boxed : void 0, fixed ? layout_module_css_default.fixed : void 0, plain ? layout_module_css_default.plain : void 0, className),
|
|
2689
|
+
...rest,
|
|
2690
|
+
children
|
|
2691
|
+
});
|
|
2692
|
+
});
|
|
2693
|
+
//#endregion
|
|
2694
|
+
//#region ../../client/ui-primitives/src/client/layout/Stack.tsx
|
|
2695
|
+
const Stack = (0, react.forwardRef)(function Stack({ as: Element = "div", gap, align, pad, grow = false, boxed = false, fixed = false, narrow = false, fill = false, scroll = false, plain = false, className, children, ...rest }, ref) {
|
|
2696
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Element, {
|
|
2697
|
+
ref,
|
|
2698
|
+
className: classes(layout_module_css_default.stack, gapClass(layout_module_css_default, gap), alignClass(layout_module_css_default, align), padClass(layout_module_css_default, pad), grow ? layout_module_css_default.grow : void 0, boxed ? layout_module_css_default.boxed : void 0, fixed ? layout_module_css_default.fixed : void 0, narrow ? layout_module_css_default.narrow : void 0, fill ? layout_module_css_default.fill : void 0, scroll ? layout_module_css_default.scroll : void 0, plain ? layout_module_css_default.plain : void 0, className),
|
|
2699
|
+
...rest,
|
|
2700
|
+
children
|
|
2701
|
+
});
|
|
2702
|
+
});
|
|
2703
|
+
//#endregion
|
|
2704
|
+
//#region ../../client/ui-primitives/src/client/layout/Text.tsx
|
|
2705
|
+
function Text({ as: Element = "span", size, tone, weight, mono = false, truncate = false, tabular = false, className, children }) {
|
|
2706
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Element, {
|
|
2707
|
+
className: classes(layout_module_css_default.text, sizeClass(layout_module_css_default, size), toneClass(layout_module_css_default, tone), weightClass(layout_module_css_default, weight), mono ? layout_module_css_default.mono : void 0, truncate ? layout_module_css_default.truncate : void 0, tabular ? layout_module_css_default.tabular : void 0, className),
|
|
2708
|
+
children
|
|
2709
|
+
});
|
|
2710
|
+
}
|
|
2711
|
+
//#endregion
|
|
2712
|
+
//#region \0dsh-css-modules:/Users/morlay/src/github.com/morlay/dsh-plugin/packages/client/ui-primitives/src/client/settings-form/SettingsFieldRow.module.css.mjs
|
|
2713
|
+
const css$15 = "._72UBVa_row{flex-direction:column;display:flex}._72UBVa_row[data-divider=true]{border-top:.5px solid var(--dsw-alias-border-l2)}._72UBVa_body{flex-direction:column;gap:6px;padding:12px 0;display:flex}._72UBVa_inline{flex-direction:row;justify-content:space-between;align-items:center;gap:16px;padding:12px 0;display:flex}._72UBVa_text{flex-direction:column;gap:2px;min-width:0;display:flex}._72UBVa_label{color:var(--dsw-alias-label-primary);align-items:center;gap:8px;font-size:13px;font-weight:500;line-height:1.5;display:flex}._72UBVa_badge{corner-shape:round;color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-module-platform);border-radius:999px;align-items:center;padding:1px 8px;font-size:11px;font-weight:500;line-height:17px;display:inline-flex}._72UBVa_reset{font:inherit;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;padding:0;font-size:12px;line-height:1.5}._72UBVa_reset:hover:not(:disabled){color:var(--dsw-alias-label-primary)}._72UBVa_reset:disabled{cursor:default}._72UBVa_hint{color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px;line-height:1.5}._72UBVa_invalid{color:var(--dsw-alias-state-error-primary);margin:0;font-size:12px;line-height:1.5}";
|
|
2714
|
+
const tagId$15 = "@morlay/ui-conversation-message-actions/SettingsFieldRow.module.css";
|
|
2715
|
+
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@morlay/ui-conversation-message-actions/SettingsFieldRow.module.css\"]") === null) {
|
|
2716
|
+
const tag = document.createElement("style");
|
|
2717
|
+
tag.dataset.plugin = "@morlay/ui-conversation-message-actions";
|
|
2718
|
+
tag.dataset.pluginCss = tagId$15;
|
|
2719
|
+
tag.textContent = css$15;
|
|
2720
|
+
document.head.appendChild(tag);
|
|
2721
|
+
}
|
|
2722
|
+
var SettingsFieldRow_module_css_default = {
|
|
2723
|
+
"label": "_72UBVa_label",
|
|
2724
|
+
"text": "_72UBVa_text",
|
|
2725
|
+
"row": "_72UBVa_row",
|
|
2726
|
+
"body": "_72UBVa_body",
|
|
2727
|
+
"inline": "_72UBVa_inline",
|
|
2728
|
+
"badge": "_72UBVa_badge",
|
|
2729
|
+
"reset": "_72UBVa_reset",
|
|
2730
|
+
"invalid": "_72UBVa_invalid",
|
|
2731
|
+
"hint": "_72UBVa_hint"
|
|
2732
|
+
};
|
|
2733
|
+
//#endregion
|
|
2734
|
+
//#region ../../client/ui-primitives/src/client/settings-form/SettingsFieldRow.tsx
|
|
2735
|
+
function SettingsFieldRow({ label, hint, layout = "stack", divider = false, overriddenLabel, resetLabel, onReset, invalid, children, className, ...rest }) {
|
|
2736
|
+
const labelNode = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
2737
|
+
className: SettingsFieldRow_module_css_default.label,
|
|
2738
|
+
children: [label, overriddenLabel === void 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2739
|
+
className: SettingsFieldRow_module_css_default.badge,
|
|
2740
|
+
children: overriddenLabel
|
|
2741
|
+
}), resetLabel === void 0 || onReset === void 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
2742
|
+
type: "button",
|
|
2743
|
+
className: SettingsFieldRow_module_css_default.reset,
|
|
2744
|
+
onClick: () => {
|
|
2745
|
+
onReset();
|
|
2746
|
+
},
|
|
2747
|
+
children: resetLabel
|
|
2748
|
+
})] })]
|
|
2749
|
+
});
|
|
2750
|
+
const invalidNode = invalid === void 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
2751
|
+
className: SettingsFieldRow_module_css_default.invalid,
|
|
2752
|
+
role: "alert",
|
|
2753
|
+
children: invalid
|
|
2754
|
+
});
|
|
2755
|
+
if (layout === "inline") return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2756
|
+
className: classes(SettingsFieldRow_module_css_default.row, className),
|
|
2757
|
+
"data-role": "field-row",
|
|
2758
|
+
"data-divider": divider ? "true" : "false",
|
|
2759
|
+
...rest,
|
|
2760
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2761
|
+
className: SettingsFieldRow_module_css_default.inline,
|
|
2762
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2763
|
+
className: SettingsFieldRow_module_css_default.text,
|
|
2764
|
+
children: [labelNode, /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
2765
|
+
className: SettingsFieldRow_module_css_default.hint,
|
|
2766
|
+
children: hint
|
|
2767
|
+
})]
|
|
2768
|
+
}), children]
|
|
2769
|
+
}), invalidNode]
|
|
2770
|
+
});
|
|
2771
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2772
|
+
className: classes(SettingsFieldRow_module_css_default.row, className),
|
|
2773
|
+
"data-role": "field-row",
|
|
2774
|
+
"data-divider": divider ? "true" : "false",
|
|
2775
|
+
...rest,
|
|
2776
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2777
|
+
className: SettingsFieldRow_module_css_default.body,
|
|
2778
|
+
children: [
|
|
2779
|
+
labelNode,
|
|
2780
|
+
children,
|
|
2781
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
2782
|
+
className: SettingsFieldRow_module_css_default.hint,
|
|
2783
|
+
children: hint
|
|
2784
|
+
})
|
|
2785
|
+
]
|
|
2786
|
+
}), invalidNode]
|
|
2787
|
+
});
|
|
2788
|
+
}
|
|
2789
|
+
//#endregion
|
|
2790
|
+
//#region \0dsh-css-modules:/Users/morlay/src/github.com/morlay/dsh-plugin/packages/client/ui-primitives/src/client/controls/Bubble.module.css.mjs
|
|
2791
|
+
const css$14 = ".dtkLCG_bubble{background:var(--dsw-specific-bubble);border-radius:var(--dsw-radius-xl);max-width:100%;font-size:var(--dsh-content-font-size,14px);line-height:calc(22px + var(--dsh-content-font-delta,0px));color:var(--dsw-alias-label-primary);white-space:pre-wrap;word-break:break-word;padding:10px 16px}";
|
|
2792
|
+
const tagId$14 = "@morlay/ui-conversation-message-actions/Bubble.module.css";
|
|
2793
|
+
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@morlay/ui-conversation-message-actions/Bubble.module.css\"]") === null) {
|
|
2794
|
+
const tag = document.createElement("style");
|
|
2795
|
+
tag.dataset.plugin = "@morlay/ui-conversation-message-actions";
|
|
2796
|
+
tag.dataset.pluginCss = tagId$14;
|
|
2797
|
+
tag.textContent = css$14;
|
|
2798
|
+
document.head.appendChild(tag);
|
|
2799
|
+
}
|
|
2800
|
+
var Bubble_module_css_default = { "bubble": "dtkLCG_bubble" };
|
|
2801
|
+
//#endregion
|
|
2802
|
+
//#region ../../client/ui-primitives/src/client/controls/Bubble.tsx
|
|
2803
|
+
function Bubble({ className, children, ...rest }) {
|
|
2804
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2805
|
+
className: classes(Bubble_module_css_default.bubble, className),
|
|
2806
|
+
...rest,
|
|
2807
|
+
children
|
|
2808
|
+
});
|
|
2809
|
+
}
|
|
2810
|
+
//#endregion
|
|
2811
|
+
//#region \0dsh-css-modules:/Users/morlay/src/github.com/morlay/dsh-plugin/packages/client/ui-primitives/src/client/controls/Button.module.css.mjs
|
|
2812
|
+
const css$13 = ".WFViLq_label{white-space:nowrap}.WFViLq_danger{--dsw-alias-button-primary-fill:var(--dsw-alias-state-error-primary)}";
|
|
2813
|
+
const tagId$13 = "@morlay/ui-conversation-message-actions/Button.module.css";
|
|
2814
|
+
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@morlay/ui-conversation-message-actions/Button.module.css\"]") === null) {
|
|
2815
|
+
const tag = document.createElement("style");
|
|
2816
|
+
tag.dataset.plugin = "@morlay/ui-conversation-message-actions";
|
|
2817
|
+
tag.dataset.pluginCss = tagId$13;
|
|
2818
|
+
tag.textContent = css$13;
|
|
2819
|
+
document.head.appendChild(tag);
|
|
2820
|
+
}
|
|
2821
|
+
var Button_module_css_default = {
|
|
2822
|
+
"label": "WFViLq_label",
|
|
2823
|
+
"danger": "WFViLq_danger"
|
|
2824
|
+
};
|
|
2825
|
+
//#endregion
|
|
2826
|
+
//#region ../../client/ui-primitives/src/client/controls/Button.tsx
|
|
2827
|
+
const Button$1 = (0, react.forwardRef)(function Button({ className, tone, ...rest }, ref) {
|
|
2828
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
2829
|
+
ref,
|
|
2830
|
+
"data-role": "button",
|
|
2831
|
+
className: classes(className, Button_module_css_default.label, tone === "danger" ? Button_module_css_default.danger : void 0),
|
|
2832
|
+
...rest
|
|
2833
|
+
});
|
|
2834
|
+
});
|
|
2835
|
+
//#endregion
|
|
2836
|
+
//#region \0dsh-css-modules:/Users/morlay/src/github.com/morlay/dsh-plugin/packages/client/ui-primitives/src/client/controls/DisclosureRow.module.css.mjs
|
|
2837
|
+
const css$12 = ".MBWCEG_content{flex:auto;min-width:0}.MBWCEG_contentLayout{align-items:center;gap:8px;width:100%;min-width:0;display:flex}";
|
|
2838
|
+
const tagId$12 = "@morlay/ui-conversation-message-actions/DisclosureRow.module.css";
|
|
2839
|
+
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@morlay/ui-conversation-message-actions/DisclosureRow.module.css\"]") === null) {
|
|
2840
|
+
const tag = document.createElement("style");
|
|
2841
|
+
tag.dataset.plugin = "@morlay/ui-conversation-message-actions";
|
|
2842
|
+
tag.dataset.pluginCss = tagId$12;
|
|
2843
|
+
tag.textContent = css$12;
|
|
2844
|
+
document.head.appendChild(tag);
|
|
2845
|
+
}
|
|
2846
|
+
var DisclosureRow_module_css_default = {
|
|
2847
|
+
"contentLayout": "MBWCEG_contentLayout",
|
|
2848
|
+
"content": "MBWCEG_content"
|
|
2849
|
+
};
|
|
2850
|
+
//#endregion
|
|
2851
|
+
//#region ../../client/ui-primitives/src/client/controls/DisclosureRow.tsx
|
|
2852
|
+
function DisclosureRow(props) {
|
|
2853
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.DisclosureRow, {
|
|
2854
|
+
contentClassName: DisclosureRow_module_css_default.content,
|
|
2855
|
+
contentLayoutClassName: DisclosureRow_module_css_default.contentLayout,
|
|
2856
|
+
...props
|
|
2857
|
+
});
|
|
2858
|
+
}
|
|
2859
|
+
//#endregion
|
|
2860
|
+
//#region \0dsh-css-modules:/Users/morlay/src/github.com/morlay/dsh-plugin/packages/client/ui-primitives/src/client/controls/SearchInput.module.css.mjs
|
|
2861
|
+
const css$11 = ".KiR4MG_search{flex:none;width:360px;max-width:100%}.KiR4MG_full{flex:none;width:100%}";
|
|
2862
|
+
const tagId$11 = "@morlay/ui-conversation-message-actions/SearchInput.module.css";
|
|
2863
|
+
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@morlay/ui-conversation-message-actions/SearchInput.module.css\"]") === null) {
|
|
2864
|
+
const tag = document.createElement("style");
|
|
2865
|
+
tag.dataset.plugin = "@morlay/ui-conversation-message-actions";
|
|
2866
|
+
tag.dataset.pluginCss = tagId$11;
|
|
2867
|
+
tag.textContent = css$11;
|
|
2868
|
+
document.head.appendChild(tag);
|
|
2869
|
+
}
|
|
2870
|
+
var SearchInput_module_css_default = {
|
|
2871
|
+
"full": "KiR4MG_full",
|
|
2872
|
+
"search": "KiR4MG_search"
|
|
2873
|
+
};
|
|
2874
|
+
//#endregion
|
|
2875
|
+
//#region ../../client/ui-primitives/src/client/controls/SearchInput.tsx
|
|
2876
|
+
function SearchInput({ width = "search", className, ...rest }) {
|
|
2877
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Input, {
|
|
2878
|
+
className: classes(className, width === "search" ? SearchInput_module_css_default.search : SearchInput_module_css_default.full),
|
|
2879
|
+
...rest
|
|
2880
|
+
});
|
|
2881
|
+
}
|
|
2882
|
+
//#endregion
|
|
2883
|
+
//#region \0dsh-css-modules:/Users/morlay/src/github.com/morlay/dsh-plugin/packages/client/ui-primitives/src/client/controls/SeatButton.module.css.mjs
|
|
2884
|
+
const css$10 = ".HcNbhG_seat{border-radius:var(--dsw-radius-sm);min-width:0;max-width:min(100%,240px);min-height:28px;color:var(--dsw-alias-label-primary);white-space:nowrap;cursor:pointer;background:0 0;border:none;align-items:center;gap:4px;padding:0 8px;font-size:13px;font-weight:500;line-height:20px;display:inline-flex}.HcNbhG_seat:not(:disabled):hover,.HcNbhG_seat[aria-expanded=true],.HcNbhG_expanded{background:var(--dsw-alias-interactive-bg-hover)}.HcNbhG_seat:disabled{cursor:default;color:var(--dsw-alias-label-quaternary)}.HcNbhG_icon{color:var(--dsw-alias-label-primary);flex:none;align-items:center;display:inline-flex}.HcNbhG_label{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.HcNbhG_chevron{color:var(--dsw-alias-label-caption);flex:none;display:inline-flex}";
|
|
2885
|
+
const tagId$10 = "@morlay/ui-conversation-message-actions/SeatButton.module.css";
|
|
2886
|
+
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@morlay/ui-conversation-message-actions/SeatButton.module.css\"]") === null) {
|
|
2887
|
+
const tag = document.createElement("style");
|
|
2888
|
+
tag.dataset.plugin = "@morlay/ui-conversation-message-actions";
|
|
2889
|
+
tag.dataset.pluginCss = tagId$10;
|
|
2890
|
+
tag.textContent = css$10;
|
|
2891
|
+
document.head.appendChild(tag);
|
|
2892
|
+
}
|
|
2893
|
+
var SeatButton_module_css_default = {
|
|
2894
|
+
"chevron": "HcNbhG_chevron",
|
|
2895
|
+
"expanded": "HcNbhG_expanded",
|
|
2896
|
+
"label": "HcNbhG_label",
|
|
2897
|
+
"icon": "HcNbhG_icon",
|
|
2898
|
+
"seat": "HcNbhG_seat"
|
|
2899
|
+
};
|
|
2900
|
+
//#endregion
|
|
2901
|
+
//#region ../../client/ui-primitives/src/client/controls/SeatButton.tsx
|
|
2902
|
+
function SeatButton({ icon, label, expanded = false, chevron, type = "button", className, ...rest }) {
|
|
2903
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
2904
|
+
type,
|
|
2905
|
+
className: classes(SeatButton_module_css_default.seat, expanded ? SeatButton_module_css_default.expanded : void 0, className),
|
|
2906
|
+
...rest,
|
|
2907
|
+
children: [
|
|
2908
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2909
|
+
className: SeatButton_module_css_default.icon,
|
|
2910
|
+
children: icon
|
|
2911
|
+
}),
|
|
2912
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2913
|
+
className: SeatButton_module_css_default.label,
|
|
2914
|
+
children: label
|
|
2915
|
+
}),
|
|
2916
|
+
chevron === void 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2917
|
+
className: SeatButton_module_css_default.chevron,
|
|
2918
|
+
children: chevron
|
|
2919
|
+
})
|
|
2920
|
+
]
|
|
2921
|
+
});
|
|
2922
|
+
}
|
|
2923
|
+
//#endregion
|
|
2924
|
+
//#region \0dsh-css-modules:/Users/morlay/src/github.com/morlay/dsh-plugin/packages/client/ui-primitives/src/client/controls/Spinner.module.css.mjs
|
|
2925
|
+
const css$9 = ".HGVDmW_spinner{border:2px solid var(--dsw-alias-border-l2);border-top-color:var(--dsw-alias-label-primary);border-radius:50%;width:28px;height:28px;animation:.9s linear infinite HGVDmW_spin}@keyframes HGVDmW_spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}";
|
|
2926
|
+
const tagId$9 = "@morlay/ui-conversation-message-actions/Spinner.module.css";
|
|
2927
|
+
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@morlay/ui-conversation-message-actions/Spinner.module.css\"]") === null) {
|
|
2928
|
+
const tag = document.createElement("style");
|
|
2929
|
+
tag.dataset.plugin = "@morlay/ui-conversation-message-actions";
|
|
2930
|
+
tag.dataset.pluginCss = tagId$9;
|
|
2931
|
+
tag.textContent = css$9;
|
|
2932
|
+
document.head.appendChild(tag);
|
|
2933
|
+
}
|
|
2934
|
+
var Spinner_module_css_default = {
|
|
2935
|
+
"spinner": "HGVDmW_spinner",
|
|
2936
|
+
"spin": "HGVDmW_spin"
|
|
2937
|
+
};
|
|
2938
|
+
//#endregion
|
|
2939
|
+
//#region ../../client/ui-primitives/src/client/controls/Spinner.tsx
|
|
2940
|
+
function Spinner({ label }) {
|
|
2941
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2942
|
+
className: Spinner_module_css_default.spinner,
|
|
2943
|
+
role: "status",
|
|
2944
|
+
"aria-label": label
|
|
2945
|
+
});
|
|
2946
|
+
}
|
|
2947
|
+
//#endregion
|
|
2948
|
+
//#region \0dsh-css-modules:/Users/morlay/src/github.com/morlay/dsh-plugin/packages/client/ui-primitives/src/client/controls/Tabs.module.css.mjs
|
|
2949
|
+
const css$8 = ".GO-36q_tabs{z-index:1;flex:none;gap:36px;margin-top:10px;padding-left:8px;display:flex;position:relative}.GO-36q_tab{color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:none;padding:0 0 9px;font-size:13px;font-weight:500;line-height:16px;position:relative}.GO-36q_tab:after{content:\"\";background:0 0;border-radius:2px;height:2px;position:absolute;bottom:-1px;left:0;right:0}.GO-36q_tabActive{color:var(--dsw-alias-state-business-primary)}.GO-36q_tabActive:after{background:var(--dsw-alias-state-business-primary)}.GO-36q_tab:disabled{cursor:not-allowed;opacity:.4}";
|
|
2950
|
+
const tagId$8 = "@morlay/ui-conversation-message-actions/Tabs.module.css";
|
|
2951
|
+
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@morlay/ui-conversation-message-actions/Tabs.module.css\"]") === null) {
|
|
2952
|
+
const tag = document.createElement("style");
|
|
2953
|
+
tag.dataset.plugin = "@morlay/ui-conversation-message-actions";
|
|
2954
|
+
tag.dataset.pluginCss = tagId$8;
|
|
2955
|
+
tag.textContent = css$8;
|
|
2956
|
+
document.head.appendChild(tag);
|
|
2957
|
+
}
|
|
2958
|
+
var Tabs_module_css_default = {
|
|
2959
|
+
"tab": "GO-36q_tab",
|
|
2960
|
+
"tabActive": "GO-36q_tabActive",
|
|
2961
|
+
"tabs": "GO-36q_tabs"
|
|
2962
|
+
};
|
|
2963
|
+
//#endregion
|
|
2964
|
+
//#region ../../client/ui-primitives/src/client/controls/Tabs.tsx
|
|
2965
|
+
function Tabs({ label, items, value, onChange, role = "tablist", disabled = false }) {
|
|
2966
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2967
|
+
className: Tabs_module_css_default.tabs,
|
|
2968
|
+
role,
|
|
2969
|
+
"aria-label": label,
|
|
2970
|
+
children: items.map((item) => {
|
|
2971
|
+
const active = item.value === value;
|
|
2972
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
2973
|
+
type: "button",
|
|
2974
|
+
role: role === "tablist" ? "tab" : "radio",
|
|
2975
|
+
"data-tab": item.value,
|
|
2976
|
+
"aria-selected": role === "tablist" ? active : void 0,
|
|
2977
|
+
"aria-checked": role === "tablist" ? void 0 : active,
|
|
2978
|
+
disabled,
|
|
2979
|
+
className: classes(Tabs_module_css_default.tab, active ? Tabs_module_css_default.tabActive : void 0),
|
|
2980
|
+
onClick: () => {
|
|
2981
|
+
onChange(item.value);
|
|
2982
|
+
},
|
|
2983
|
+
children: item.label
|
|
2984
|
+
}, item.value);
|
|
2985
|
+
})
|
|
2986
|
+
});
|
|
3644
2987
|
}
|
|
3645
2988
|
//#endregion
|
|
3646
|
-
//#region
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
|
|
2989
|
+
//#region \0dsh-css-modules:/Users/morlay/src/github.com/morlay/dsh-plugin/packages/client/ui-primitives/src/client/controls/TimeLabel.module.css.mjs
|
|
2990
|
+
const css$7 = "._3IuWPG_label{color:var(--dsw-alias-label-tertiary);white-space:nowrap;opacity:0;padding:0;font-size:14px;line-height:24px;transition:opacity 80ms}[data-time-hover-root]:hover ._3IuWPG_label,[data-time-hover-root]:focus-within ._3IuWPG_label{opacity:1}";
|
|
2991
|
+
const tagId$7 = "@morlay/ui-conversation-message-actions/TimeLabel.module.css";
|
|
2992
|
+
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@morlay/ui-conversation-message-actions/TimeLabel.module.css\"]") === null) {
|
|
2993
|
+
const tag = document.createElement("style");
|
|
2994
|
+
tag.dataset.plugin = "@morlay/ui-conversation-message-actions";
|
|
2995
|
+
tag.dataset.pluginCss = tagId$7;
|
|
2996
|
+
tag.textContent = css$7;
|
|
2997
|
+
document.head.appendChild(tag);
|
|
2998
|
+
}
|
|
2999
|
+
var TimeLabel_module_css_default = { "label": "_3IuWPG_label" };
|
|
3000
|
+
//#endregion
|
|
3001
|
+
//#region ../../client/ui-primitives/src/client/controls/TimeLabel.tsx
|
|
3002
|
+
function TimeLabel({ className, children, ...rest }) {
|
|
3003
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3004
|
+
className: classes(TimeLabel_module_css_default.label, className),
|
|
3005
|
+
...rest,
|
|
3006
|
+
children
|
|
3007
|
+
});
|
|
3655
3008
|
}
|
|
3656
3009
|
//#endregion
|
|
3657
|
-
//#region
|
|
3658
|
-
const
|
|
3010
|
+
//#region \0dsh-css-modules:/Users/morlay/src/github.com/morlay/dsh-plugin/packages/client/ui-primitives/src/client/controls/VisuallyHidden.module.css.mjs
|
|
3011
|
+
const css$6 = ".YAvv4W_hidden{clip-path:inset(50%);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}";
|
|
3012
|
+
const tagId$6 = "@morlay/ui-conversation-message-actions/VisuallyHidden.module.css";
|
|
3013
|
+
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@morlay/ui-conversation-message-actions/VisuallyHidden.module.css\"]") === null) {
|
|
3014
|
+
const tag = document.createElement("style");
|
|
3015
|
+
tag.dataset.plugin = "@morlay/ui-conversation-message-actions";
|
|
3016
|
+
tag.dataset.pluginCss = tagId$6;
|
|
3017
|
+
tag.textContent = css$6;
|
|
3018
|
+
document.head.appendChild(tag);
|
|
3019
|
+
}
|
|
3020
|
+
var VisuallyHidden_module_css_default = { "hidden": "YAvv4W_hidden" };
|
|
3659
3021
|
//#endregion
|
|
3660
|
-
//#region ../../client/ui-primitives/src/client/
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
|
|
3673
|
-
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
|
|
3677
|
-
|
|
3678
|
-
|
|
3679
|
-
|
|
3680
|
-
|
|
3681
|
-
|
|
3682
|
-
|
|
3683
|
-
groupLabel: { flex: "0 1 auto" },
|
|
3684
|
-
labelGroup: {
|
|
3685
|
-
display: "flex",
|
|
3686
|
-
alignItems: "center",
|
|
3687
|
-
gap: "4px",
|
|
3688
|
-
flex: 1,
|
|
3689
|
-
minWidth: 0
|
|
3690
|
-
},
|
|
3691
|
-
helpButton: {
|
|
3692
|
-
display: "inline-flex",
|
|
3693
|
-
alignItems: "center",
|
|
3694
|
-
justifyContent: "center",
|
|
3695
|
-
flex: "none",
|
|
3696
|
-
width: "24px",
|
|
3697
|
-
height: "24px",
|
|
3698
|
-
padding: 0,
|
|
3699
|
-
border: 0,
|
|
3700
|
-
borderRadius: "6px",
|
|
3701
|
-
background: "none",
|
|
3702
|
-
color: dsw.alias.label.tertiary,
|
|
3703
|
-
cursor: "pointer",
|
|
3704
|
-
"&:hover": {
|
|
3705
|
-
background: helpButtonHoverBackground,
|
|
3706
|
-
color: dsw.alias.label.secondary
|
|
3707
|
-
},
|
|
3708
|
-
"&[aria-expanded='true']": {
|
|
3709
|
-
background: helpButtonHoverBackground,
|
|
3710
|
-
color: dsw.alias.label.secondary
|
|
3711
|
-
},
|
|
3712
|
-
"&:focus-visible": {
|
|
3713
|
-
outline: focusRing,
|
|
3714
|
-
outlineOffset: "1px"
|
|
3715
|
-
}
|
|
3716
|
-
},
|
|
3717
|
-
help: {
|
|
3718
|
-
padding: "10px 0 0",
|
|
3719
|
-
fontSize: "12px",
|
|
3720
|
-
lineHeight: 1.6,
|
|
3721
|
-
color: dsw.alias.label.secondary,
|
|
3722
|
-
"& > p": { margin: 0 },
|
|
3723
|
-
"& > p + p": { marginTop: "8px" }
|
|
3724
|
-
},
|
|
3725
|
-
badges: {
|
|
3726
|
-
display: "inline-flex",
|
|
3727
|
-
alignItems: "center",
|
|
3728
|
-
gap: "8px"
|
|
3729
|
-
},
|
|
3730
|
-
badge: {
|
|
3731
|
-
display: "inline-flex",
|
|
3732
|
-
alignItems: "center",
|
|
3733
|
-
borderRadius: "999px",
|
|
3734
|
-
cornerShape: "round",
|
|
3735
|
-
padding: "1px 8px",
|
|
3736
|
-
fontSize: "11px",
|
|
3737
|
-
lineHeight: "17px",
|
|
3738
|
-
fontWeight: 500,
|
|
3739
|
-
whiteSpace: "nowrap"
|
|
3740
|
-
},
|
|
3741
|
-
badgeNeutral: {
|
|
3742
|
-
background: dsw.alias.bg.module.platform,
|
|
3743
|
-
color: dsw.alias.label.secondary
|
|
3744
|
-
},
|
|
3745
|
-
badgeQuiet: { color: dsw.alias.label.tertiary },
|
|
3746
|
-
reset: {
|
|
3747
|
-
border: "none",
|
|
3748
|
-
background: "none",
|
|
3749
|
-
padding: 0,
|
|
3750
|
-
font: "inherit",
|
|
3751
|
-
fontSize: "12px",
|
|
3752
|
-
lineHeight: 1.5,
|
|
3753
|
-
color: dsw.alias.label.secondary,
|
|
3754
|
-
cursor: "pointer",
|
|
3755
|
-
"&:hover:not(:disabled)": { color: dsw.alias.label.primary },
|
|
3756
|
-
"&:disabled": { cursor: "default" }
|
|
3757
|
-
},
|
|
3758
|
-
input: {
|
|
3759
|
-
height: "34px",
|
|
3760
|
-
padding: "0 12px",
|
|
3761
|
-
border: `0.5px solid ${String(dsw.alias.border.l4)}`,
|
|
3762
|
-
borderRadius: "8px",
|
|
3763
|
-
background: dsw.alias.bg.layer["3"],
|
|
3764
|
-
font: "inherit",
|
|
3765
|
-
fontSize: "13px",
|
|
3766
|
-
lineHeight: 1.5,
|
|
3767
|
-
color: dsw.alias.label.primary,
|
|
3768
|
-
"&:focus-visible": {
|
|
3769
|
-
outline: "none",
|
|
3770
|
-
borderColor: dsw.alias.state.business.primary
|
|
3771
|
-
},
|
|
3772
|
-
"&:disabled": {
|
|
3773
|
-
color: dsw.alias.label.tertiary,
|
|
3774
|
-
cursor: "default"
|
|
3775
|
-
},
|
|
3776
|
-
"&[aria-invalid='true']": { borderColor: dsw.alias.state.error.primary }
|
|
3777
|
-
},
|
|
3778
|
-
invalid: {
|
|
3779
|
-
margin: 0,
|
|
3780
|
-
fontSize: "12px",
|
|
3781
|
-
lineHeight: 1.5,
|
|
3782
|
-
color: dsw.alias.state.error.primary
|
|
3783
|
-
},
|
|
3784
|
-
hint: {
|
|
3785
|
-
margin: 0,
|
|
3786
|
-
fontSize: "12px",
|
|
3787
|
-
lineHeight: 1.5,
|
|
3788
|
-
color: dsw.alias.label.tertiary
|
|
3789
|
-
}
|
|
3022
|
+
//#region ../../client/ui-primitives/src/client/controls/VisuallyHidden.tsx
|
|
3023
|
+
function VisuallyHidden({ children, ...rest }) {
|
|
3024
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3025
|
+
className: VisuallyHidden_module_css_default.hidden,
|
|
3026
|
+
...rest,
|
|
3027
|
+
children
|
|
3028
|
+
});
|
|
3029
|
+
}
|
|
3030
|
+
//#endregion
|
|
3031
|
+
//#region \0dsh-css-modules:/Users/morlay/src/github.com/morlay/dsh-plugin/packages/client/ui-primitives/src/client/controls/IconButton.module.css.mjs
|
|
3032
|
+
const css$5 = ".I3t6Ga_iconButton{box-sizing:border-box;width:28px;height:28px;color:var(--dsw-alias-label-secondary);border-radius:var(--dsw-radius-sm);cursor:pointer;background:0 0;border:none;flex:none;justify-content:center;align-items:center;padding:0;display:inline-flex}.I3t6Ga_iconButton:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}.I3t6Ga_iconButton:disabled{cursor:not-allowed;opacity:.4}.I3t6Ga_iconButton:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:-2px}.I3t6Ga_sm{width:20px;height:20px;padding:0}.I3t6Ga_circle{color:var(--dsw-alias-label-tertiary);border-radius:28px;padding:6px}.I3t6Ga_circle:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-secondary)}";
|
|
3033
|
+
const tagId$5 = "@morlay/ui-conversation-message-actions/IconButton.module.css";
|
|
3034
|
+
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@morlay/ui-conversation-message-actions/IconButton.module.css\"]") === null) {
|
|
3035
|
+
const tag = document.createElement("style");
|
|
3036
|
+
tag.dataset.plugin = "@morlay/ui-conversation-message-actions";
|
|
3037
|
+
tag.dataset.pluginCss = tagId$5;
|
|
3038
|
+
tag.textContent = css$5;
|
|
3039
|
+
document.head.appendChild(tag);
|
|
3040
|
+
}
|
|
3041
|
+
var IconButton_module_css_default = {
|
|
3042
|
+
"circle": "I3t6Ga_circle",
|
|
3043
|
+
"sm": "I3t6Ga_sm",
|
|
3044
|
+
"iconButton": "I3t6Ga_iconButton"
|
|
3790
3045
|
};
|
|
3791
|
-
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
const
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
|
-
|
|
3823
|
-
|
|
3824
|
-
|
|
3825
|
-
|
|
3826
|
-
|
|
3827
|
-
|
|
3828
|
-
|
|
3829
|
-
|
|
3830
|
-
|
|
3831
|
-
|
|
3832
|
-
|
|
3833
|
-
|
|
3834
|
-
|
|
3835
|
-
|
|
3836
|
-
|
|
3837
|
-
|
|
3838
|
-
|
|
3839
|
-
|
|
3840
|
-
|
|
3841
|
-
|
|
3842
|
-
|
|
3843
|
-
|
|
3844
|
-
|
|
3845
|
-
|
|
3846
|
-
|
|
3847
|
-
|
|
3848
|
-
|
|
3046
|
+
//#endregion
|
|
3047
|
+
//#region ../../client/ui-primitives/src/client/controls/IconButton.tsx
|
|
3048
|
+
function IconButton({ label, children, type = "button", shape = "square", size = "md", className, ...rest }) {
|
|
3049
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
3050
|
+
type,
|
|
3051
|
+
"data-role": "icon-button",
|
|
3052
|
+
"aria-label": label,
|
|
3053
|
+
className: classes(IconButton_module_css_default.iconButton, size === "sm" ? IconButton_module_css_default.sm : void 0, shape === "circle" ? IconButton_module_css_default.circle : void 0, className),
|
|
3054
|
+
...rest,
|
|
3055
|
+
children
|
|
3056
|
+
});
|
|
3057
|
+
}
|
|
3058
|
+
//#endregion
|
|
3059
|
+
//#region \0dsh-css-modules:/Users/morlay/src/github.com/morlay/dsh-plugin/packages/client/ui-primitives/src/client/controls/ModelRouteList.module.css.mjs
|
|
3060
|
+
const css$4 = "._2eBkWq_list{border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-lg);gap:6px;min-width:0;max-height:280px;margin:0;padding:10px;display:grid;overflow:auto}._2eBkWq_group{gap:6px;display:grid}._2eBkWq_group+._2eBkWq_group{border-top:.5px solid var(--dsw-alias-border-l3);margin-top:4px;padding-top:10px}._2eBkWq_provider{color:var(--dsw-alias-label-tertiary);padding:0 6px;font-size:11px;font-weight:500}._2eBkWq_item{border-radius:var(--dsw-radius-md);cursor:pointer;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:8px;min-width:0;padding:6px;display:grid}._2eBkWq_item:hover{background:var(--dsw-alias-bg-layer-4)}._2eBkWq_item:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:-2px}._2eBkWq_item[aria-disabled=true]{cursor:not-allowed;opacity:.4}._2eBkWq_picked{background:var(--dsw-alias-interactive-bg-hover)}._2eBkWq_text{min-width:0}._2eBkWq_name{text-overflow:ellipsis;white-space:nowrap;color:var(--dsw-alias-label-primary);font-size:13px;display:block;overflow:hidden}._2eBkWq_id{text-overflow:ellipsis;white-space:nowrap;color:var(--dsw-alias-label-tertiary);margin-top:2px;font-size:11px;display:block;overflow:hidden}._2eBkWq_notice{color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px;line-height:1.5}._2eBkWq_error{color:var(--dsw-alias-state-error-primary);margin:0;font-size:12px;line-height:1.5}";
|
|
3061
|
+
const tagId$4 = "@morlay/ui-conversation-message-actions/ModelRouteList.module.css";
|
|
3062
|
+
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@morlay/ui-conversation-message-actions/ModelRouteList.module.css\"]") === null) {
|
|
3063
|
+
const tag = document.createElement("style");
|
|
3064
|
+
tag.dataset.plugin = "@morlay/ui-conversation-message-actions";
|
|
3065
|
+
tag.dataset.pluginCss = tagId$4;
|
|
3066
|
+
tag.textContent = css$4;
|
|
3067
|
+
document.head.appendChild(tag);
|
|
3068
|
+
}
|
|
3069
|
+
var ModelRouteList_module_css_default = {
|
|
3070
|
+
"id": "_2eBkWq_id",
|
|
3071
|
+
"name": "_2eBkWq_name",
|
|
3072
|
+
"picked": "_2eBkWq_picked",
|
|
3073
|
+
"list": "_2eBkWq_list",
|
|
3074
|
+
"provider": "_2eBkWq_provider",
|
|
3075
|
+
"item": "_2eBkWq_item",
|
|
3076
|
+
"text": "_2eBkWq_text",
|
|
3077
|
+
"notice": "_2eBkWq_notice",
|
|
3078
|
+
"group": "_2eBkWq_group",
|
|
3079
|
+
"error": "_2eBkWq_error"
|
|
3080
|
+
};
|
|
3081
|
+
//#endregion
|
|
3082
|
+
//#region ../../client/ui-primitives/src/client/controls/ModelRouteList.tsx
|
|
3083
|
+
function ModelRouteList({ label, candidates, selectedKey, disabled = false, status, loadingLabel, errorLabel, emptyLabel, onSelect }) {
|
|
3084
|
+
if (status === "loading") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
3085
|
+
className: ModelRouteList_module_css_default.notice,
|
|
3086
|
+
role: "status",
|
|
3087
|
+
children: loadingLabel
|
|
3088
|
+
});
|
|
3089
|
+
if (status === "error") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
3090
|
+
className: ModelRouteList_module_css_default.error,
|
|
3091
|
+
role: "alert",
|
|
3092
|
+
children: errorLabel
|
|
3093
|
+
});
|
|
3094
|
+
if (candidates.length === 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
3095
|
+
className: ModelRouteList_module_css_default.notice,
|
|
3096
|
+
children: emptyLabel
|
|
3097
|
+
});
|
|
3098
|
+
const groups = /* @__PURE__ */ new Map();
|
|
3099
|
+
for (const candidate of candidates) {
|
|
3100
|
+
const group = groups.get(candidate.provider);
|
|
3101
|
+
if (group === void 0) groups.set(candidate.provider, {
|
|
3102
|
+
name: candidate.providerName,
|
|
3103
|
+
items: [candidate]
|
|
3104
|
+
});
|
|
3105
|
+
else group.items.push(candidate);
|
|
3106
|
+
}
|
|
3107
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3108
|
+
className: ModelRouteList_module_css_default.list,
|
|
3109
|
+
"data-role": "model-route-list",
|
|
3110
|
+
role: "radiogroup",
|
|
3111
|
+
"aria-label": label,
|
|
3112
|
+
"data-control": "model-routes",
|
|
3113
|
+
children: [...groups].map(([provider, group]) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3114
|
+
className: ModelRouteList_module_css_default.group,
|
|
3115
|
+
"data-route-group": provider,
|
|
3116
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3117
|
+
className: ModelRouteList_module_css_default.provider,
|
|
3118
|
+
children: group.name
|
|
3119
|
+
}), group.items.map((candidate) => {
|
|
3120
|
+
const picked = candidate.key === selectedKey;
|
|
3121
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3122
|
+
className: classes(ModelRouteList_module_css_default.item, picked ? ModelRouteList_module_css_default.picked : void 0),
|
|
3123
|
+
role: "radio",
|
|
3124
|
+
"aria-checked": picked,
|
|
3125
|
+
"aria-label": `${candidate.modelName} ${candidate.provider}/${candidate.model}`,
|
|
3126
|
+
"aria-disabled": disabled ? true : void 0,
|
|
3127
|
+
tabIndex: disabled ? -1 : 0,
|
|
3128
|
+
"data-route": candidate.key,
|
|
3129
|
+
onClick: () => {
|
|
3130
|
+
if (!disabled) onSelect(candidate);
|
|
3131
|
+
},
|
|
3132
|
+
onKeyDown: (event) => {
|
|
3133
|
+
if (event.key !== "Enter" && event.key !== " ") return;
|
|
3134
|
+
event.preventDefault();
|
|
3135
|
+
if (!disabled) onSelect(candidate);
|
|
3136
|
+
},
|
|
3137
|
+
children: [picked ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconCheckOutlineRegular, {}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { "aria-hidden": "true" }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
3138
|
+
className: ModelRouteList_module_css_default.text,
|
|
3139
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3140
|
+
className: ModelRouteList_module_css_default.name,
|
|
3141
|
+
children: candidate.modelName
|
|
3142
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3143
|
+
className: ModelRouteList_module_css_default.id,
|
|
3144
|
+
children: `${candidate.providerName} · ${candidate.provider}/${candidate.model}`
|
|
3145
|
+
})]
|
|
3146
|
+
})]
|
|
3147
|
+
}, candidate.key);
|
|
3148
|
+
})]
|
|
3149
|
+
}, provider))
|
|
3150
|
+
});
|
|
3151
|
+
}
|
|
3152
|
+
//#endregion
|
|
3153
|
+
//#region \0dsh-css-modules:/Users/morlay/src/github.com/morlay/dsh-plugin/packages/client/ui-primitives/src/client/controls/MultilineField.module.css.mjs
|
|
3154
|
+
const css$3 = "._stHfW_multiline{box-sizing:border-box;width:100%;min-height:64px;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-3);border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-md);resize:vertical;padding:6px 12px;font-family:inherit;font-size:13px;line-height:1.5}._stHfW_multiline:disabled{cursor:not-allowed;opacity:.4}._stHfW_multiline:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:-2px}";
|
|
3155
|
+
const tagId$3 = "@morlay/ui-conversation-message-actions/MultilineField.module.css";
|
|
3156
|
+
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@morlay/ui-conversation-message-actions/MultilineField.module.css\"]") === null) {
|
|
3157
|
+
const tag = document.createElement("style");
|
|
3158
|
+
tag.dataset.plugin = "@morlay/ui-conversation-message-actions";
|
|
3159
|
+
tag.dataset.pluginCss = tagId$3;
|
|
3160
|
+
tag.textContent = css$3;
|
|
3161
|
+
document.head.appendChild(tag);
|
|
3162
|
+
}
|
|
3163
|
+
var MultilineField_module_css_default = { "multiline": "_stHfW_multiline" };
|
|
3164
|
+
//#endregion
|
|
3165
|
+
//#region ../../client/ui-primitives/src/client/controls/MultilineField.tsx
|
|
3166
|
+
function MultilineField({ rows = 3, className, ...rest }) {
|
|
3167
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("textarea", {
|
|
3168
|
+
rows,
|
|
3169
|
+
"data-role": "multiline-field",
|
|
3170
|
+
className: classes(MultilineField_module_css_default.multiline, className),
|
|
3171
|
+
...rest
|
|
3172
|
+
});
|
|
3173
|
+
}
|
|
3174
|
+
//#endregion
|
|
3175
|
+
//#region \0dsh-css-modules:/Users/morlay/src/github.com/morlay/dsh-plugin/packages/client/ui-primitives/src/client/controls/SearchSelect.module.css.mjs
|
|
3176
|
+
const css$2 = ".BtUTmW_trigger{white-space:nowrap;height:32px}.BtUTmW_searchRow{border-bottom:.5px solid var(--dsw-alias-border-l2);align-items:center;padding:4px 8px 8px;display:flex}.BtUTmW_searchInput{width:100%;color:var(--dsw-alias-label-primary);background:0 0;border:none;outline:none;padding:2px 0;font-family:inherit;font-size:13px;line-height:1.5}.BtUTmW_empty{color:var(--dsw-alias-label-tertiary);margin:0;padding:8px;font-size:12px;line-height:1.5}";
|
|
3177
|
+
const tagId$2 = "@morlay/ui-conversation-message-actions/SearchSelect.module.css";
|
|
3178
|
+
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@morlay/ui-conversation-message-actions/SearchSelect.module.css\"]") === null) {
|
|
3179
|
+
const tag = document.createElement("style");
|
|
3180
|
+
tag.dataset.plugin = "@morlay/ui-conversation-message-actions";
|
|
3181
|
+
tag.dataset.pluginCss = tagId$2;
|
|
3182
|
+
tag.textContent = css$2;
|
|
3183
|
+
document.head.appendChild(tag);
|
|
3184
|
+
}
|
|
3185
|
+
var SearchSelect_module_css_default = {
|
|
3186
|
+
"searchRow": "BtUTmW_searchRow",
|
|
3187
|
+
"searchInput": "BtUTmW_searchInput",
|
|
3188
|
+
"empty": "BtUTmW_empty",
|
|
3189
|
+
"trigger": "BtUTmW_trigger"
|
|
3190
|
+
};
|
|
3191
|
+
//#endregion
|
|
3192
|
+
//#region ../../client/ui-primitives/src/client/controls/SearchSelect.tsx
|
|
3193
|
+
function SearchSelect({ label, value, emptyLabel, options, disabled = false, searchLabel, noMatchLabel, onSelect }) {
|
|
3194
|
+
const [open, setOpen] = (0, react.useState)(false);
|
|
3195
|
+
const [query, setQuery] = (0, react.useState)("");
|
|
3196
|
+
const searchRef = (0, react.useRef)(null);
|
|
3197
|
+
(0, react.useEffect)(() => {
|
|
3198
|
+
if (open) searchRef.current?.focus();
|
|
3199
|
+
}, [open]);
|
|
3200
|
+
const matches = (0, react.useMemo)(() => (0, _deepseek_ai_dsh_client_ui_primitives.rankByName)(options.map((option) => ({
|
|
3201
|
+
value: option.value,
|
|
3202
|
+
name: option.label ?? option.value,
|
|
3203
|
+
label: option.value
|
|
3204
|
+
})), query), [options, query]);
|
|
3205
|
+
const current = options.find((option) => option.value === value);
|
|
3206
|
+
const close = () => {
|
|
3207
|
+
setOpen(false);
|
|
3208
|
+
setQuery("");
|
|
3209
|
+
};
|
|
3210
|
+
const pick = (next) => {
|
|
3211
|
+
close();
|
|
3212
|
+
onSelect(next);
|
|
3213
|
+
};
|
|
3214
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_deepseek_ai_dsh_client_ui_primitives.Menu, {
|
|
3215
|
+
open,
|
|
3216
|
+
anchor: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
3217
|
+
variant: "outline",
|
|
3218
|
+
size: "sm",
|
|
3219
|
+
"data-role": "search-select",
|
|
3220
|
+
className: classes(SearchSelect_module_css_default.trigger),
|
|
3221
|
+
"data-action": "pick",
|
|
3222
|
+
disabled,
|
|
3223
|
+
"aria-haspopup": "menu",
|
|
3224
|
+
"aria-label": label,
|
|
3225
|
+
onClick: () => {
|
|
3226
|
+
if (open) close();
|
|
3227
|
+
else setOpen(true);
|
|
3228
|
+
},
|
|
3229
|
+
children: value === "" ? emptyLabel : current?.label ?? value
|
|
3230
|
+
}),
|
|
3231
|
+
selectedId: value,
|
|
3232
|
+
onSelect: pick,
|
|
3233
|
+
onClose: close,
|
|
3234
|
+
children: [
|
|
3235
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3236
|
+
className: SearchSelect_module_css_default.searchRow,
|
|
3237
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
3238
|
+
className: SearchSelect_module_css_default.searchInput,
|
|
3239
|
+
ref: searchRef,
|
|
3240
|
+
value: query,
|
|
3241
|
+
"aria-label": searchLabel,
|
|
3242
|
+
placeholder: searchLabel,
|
|
3243
|
+
onChange: (event) => {
|
|
3244
|
+
setQuery(event.currentTarget.value);
|
|
3245
|
+
}
|
|
3246
|
+
})
|
|
3247
|
+
}),
|
|
3248
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.MenuItemButton, {
|
|
3249
|
+
icon: value === "" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconCheckOutlineRegular, {}) : void 0,
|
|
3250
|
+
onSelect: () => {
|
|
3251
|
+
pick("");
|
|
3252
|
+
},
|
|
3253
|
+
children: emptyLabel
|
|
3254
|
+
}),
|
|
3255
|
+
matches.map((option) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.MenuItemButton, {
|
|
3256
|
+
icon: option.value === value ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconCheckOutlineRegular, {}) : void 0,
|
|
3257
|
+
onSelect: () => {
|
|
3258
|
+
pick(option.value);
|
|
3259
|
+
},
|
|
3260
|
+
children: option.name
|
|
3261
|
+
}, option.value)),
|
|
3262
|
+
matches.length === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
3263
|
+
className: SearchSelect_module_css_default.empty,
|
|
3264
|
+
children: noMatchLabel
|
|
3265
|
+
}) : null
|
|
3266
|
+
]
|
|
3267
|
+
});
|
|
3268
|
+
}
|
|
3269
|
+
//#endregion
|
|
3270
|
+
//#region ../../client/ui-primitives/src/client/controls/tags.ts
|
|
3271
|
+
function parseTagList(text) {
|
|
3272
|
+
const seen = /* @__PURE__ */ new Set();
|
|
3273
|
+
const names = [];
|
|
3274
|
+
for (const raw of text.split(/[,,;;\t\n\r]+/u)) {
|
|
3275
|
+
const name = raw.trim();
|
|
3276
|
+
if (name === "" || seen.has(name)) continue;
|
|
3277
|
+
seen.add(name);
|
|
3278
|
+
names.push(name);
|
|
3279
|
+
}
|
|
3280
|
+
return names;
|
|
3281
|
+
}
|
|
3282
|
+
function mergeTags(current, incoming) {
|
|
3283
|
+
const merged = [...current];
|
|
3284
|
+
for (const name of incoming) {
|
|
3285
|
+
if (name === "" || merged.includes(name)) continue;
|
|
3286
|
+
merged.push(name);
|
|
3849
3287
|
}
|
|
3288
|
+
return merged;
|
|
3289
|
+
}
|
|
3290
|
+
//#endregion
|
|
3291
|
+
//#region \0dsh-css-modules:/Users/morlay/src/github.com/morlay/dsh-plugin/packages/client/ui-primitives/src/client/controls/TagInput.module.css.mjs
|
|
3292
|
+
const css$1 = ".Is5kta_row{align-items:flex-start;gap:8px;width:100%;display:flex}.Is5kta_anchor{flex:auto;width:100%;min-width:0;display:flex}.Is5kta_box{box-sizing:border-box;background:var(--dsw-alias-bg-layer-3);border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-md);flex-flow:wrap;align-items:center;gap:4px 6px;width:100%;min-height:32px;padding:4px 8px;display:flex}.Is5kta_input{min-width:120px;color:var(--dsw-alias-label-primary);background:0 0;border:none;outline:none;flex:120px;padding:2px 0;font-family:inherit;font-size:13px;line-height:1.5}.Is5kta_chip{corner-shape:round;white-space:nowrap;color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-module-platform);border-radius:999px;align-items:center;gap:2px;padding:1px 4px 1px 8px;font-size:11px;font-weight:500;line-height:17px;display:inline-flex}.Is5kta_chipRemove{box-sizing:border-box;width:14px;height:14px;color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:none;border-radius:999px;flex:none;justify-content:center;align-items:center;padding:0;line-height:1;display:inline-flex}.Is5kta_chipRemove:hover:not(:disabled){color:var(--dsw-alias-label-primary);background:var(--dsw-alias-interactive-bg-hover)}.Is5kta_chipRemove:disabled{cursor:not-allowed;opacity:.4}.Is5kta_chipRemove:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:0}.Is5kta_empty{color:var(--dsw-alias-label-tertiary);margin:0;padding:8px;font-size:12px;line-height:1.5}";
|
|
3293
|
+
const tagId$1 = "@morlay/ui-conversation-message-actions/TagInput.module.css";
|
|
3294
|
+
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@morlay/ui-conversation-message-actions/TagInput.module.css\"]") === null) {
|
|
3295
|
+
const tag = document.createElement("style");
|
|
3296
|
+
tag.dataset.plugin = "@morlay/ui-conversation-message-actions";
|
|
3297
|
+
tag.dataset.pluginCss = tagId$1;
|
|
3298
|
+
tag.textContent = css$1;
|
|
3299
|
+
document.head.appendChild(tag);
|
|
3300
|
+
}
|
|
3301
|
+
var TagInput_module_css_default = {
|
|
3302
|
+
"empty": "Is5kta_empty",
|
|
3303
|
+
"chip": "Is5kta_chip",
|
|
3304
|
+
"box": "Is5kta_box",
|
|
3305
|
+
"input": "Is5kta_input",
|
|
3306
|
+
"chipRemove": "Is5kta_chipRemove",
|
|
3307
|
+
"anchor": "Is5kta_anchor",
|
|
3308
|
+
"row": "Is5kta_row"
|
|
3850
3309
|
};
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
3310
|
+
//#endregion
|
|
3311
|
+
//#region ../../client/ui-primitives/src/client/controls/TagInput.tsx
|
|
3312
|
+
function TagInput({ value, onChange, options, placeholder, label, disabled = false, noMatchLabel = "", removeLabel }) {
|
|
3313
|
+
const [draft, setDraft] = (0, react.useState)("");
|
|
3314
|
+
const [open, setOpen] = (0, react.useState)(false);
|
|
3315
|
+
const commit = (text) => {
|
|
3316
|
+
const names = parseTagList(text);
|
|
3317
|
+
if (names.length === 0) return;
|
|
3318
|
+
onChange(mergeTags(value, names));
|
|
3319
|
+
setDraft("");
|
|
3320
|
+
};
|
|
3321
|
+
const remaining = (0, react.useMemo)(() => (options ?? []).filter((option) => !value.includes(option.value)).map((option) => ({
|
|
3322
|
+
value: option.value,
|
|
3323
|
+
name: option.label ?? option.value,
|
|
3324
|
+
label: option.value
|
|
3325
|
+
})), [options, value]);
|
|
3326
|
+
const matches = (0, react.useMemo)(() => (0, _deepseek_ai_dsh_client_ui_primitives.rankByName)(remaining, draft), [remaining, draft]);
|
|
3327
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3328
|
+
className: TagInput_module_css_default.row,
|
|
3329
|
+
"data-role": "tag-input",
|
|
3330
|
+
"data-control": "tags",
|
|
3331
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_deepseek_ai_dsh_client_ui_primitives.Menu, {
|
|
3332
|
+
open: open && remaining.length > 0,
|
|
3333
|
+
className: TagInput_module_css_default.anchor,
|
|
3334
|
+
anchor: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3335
|
+
className: TagInput_module_css_default.box,
|
|
3336
|
+
children: [value.map((name) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
3337
|
+
className: TagInput_module_css_default.chip,
|
|
3338
|
+
"data-tag": name,
|
|
3339
|
+
children: [name, /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
3340
|
+
type: "button",
|
|
3341
|
+
className: TagInput_module_css_default.chipRemove,
|
|
3342
|
+
"data-action": "remove-tag",
|
|
3343
|
+
disabled,
|
|
3344
|
+
"aria-label": removeLabel(name),
|
|
3345
|
+
onClick: () => {
|
|
3346
|
+
onChange(value.filter((candidate) => candidate !== name));
|
|
3347
|
+
},
|
|
3348
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconCloseOutlineRegular, { size: 10 })
|
|
3349
|
+
})]
|
|
3350
|
+
}, name)), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
3351
|
+
className: TagInput_module_css_default.input,
|
|
3352
|
+
value: draft,
|
|
3353
|
+
placeholder: value.length === 0 ? placeholder : "",
|
|
3354
|
+
"aria-label": label,
|
|
3355
|
+
disabled,
|
|
3356
|
+
onFocus: () => {
|
|
3357
|
+
setOpen(true);
|
|
3358
|
+
},
|
|
3359
|
+
onBlur: () => {
|
|
3360
|
+
setOpen(false);
|
|
3361
|
+
},
|
|
3362
|
+
onChange: (event) => {
|
|
3363
|
+
setDraft(event.currentTarget.value);
|
|
3364
|
+
},
|
|
3365
|
+
onKeyDown: (event) => {
|
|
3366
|
+
if (event.key !== "Enter") return;
|
|
3367
|
+
event.preventDefault();
|
|
3368
|
+
commit(draft);
|
|
3369
|
+
},
|
|
3370
|
+
onPaste: (event) => {
|
|
3371
|
+
const text = event.clipboardData.getData("text");
|
|
3372
|
+
if (parseTagList(text).length < 2) return;
|
|
3373
|
+
event.preventDefault();
|
|
3374
|
+
commit(text);
|
|
3375
|
+
}
|
|
3376
|
+
})]
|
|
3377
|
+
}),
|
|
3378
|
+
onClose: () => {
|
|
3379
|
+
setOpen(false);
|
|
3380
|
+
},
|
|
3381
|
+
children: [matches.map((candidate) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3382
|
+
onMouseDown: (event) => {
|
|
3383
|
+
event.preventDefault();
|
|
3384
|
+
},
|
|
3385
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.MenuItemButton, {
|
|
3386
|
+
onSelect: () => {
|
|
3387
|
+
commit(candidate.value);
|
|
3388
|
+
},
|
|
3389
|
+
children: candidate.name
|
|
3390
|
+
})
|
|
3391
|
+
}, candidate.value)), matches.length === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
3392
|
+
className: TagInput_module_css_default.empty,
|
|
3393
|
+
"data-role": "tag-input-empty",
|
|
3394
|
+
children: noMatchLabel
|
|
3395
|
+
}) : null]
|
|
3396
|
+
})
|
|
3397
|
+
});
|
|
3398
|
+
}
|
|
3856
3399
|
//#endregion
|
|
3857
3400
|
//#region ../../../node_modules/.pnpm/mdast-util-to-string@4.0.0/node_modules/mdast-util-to-string/lib/index.js
|
|
3858
3401
|
/**
|
|
@@ -16321,6 +15864,7 @@ window.__ModuleLoader__.load({
|
|
|
16321
15864
|
const LINE_FRAGMENT = /^L(\d+)(?:C(\d+))?(?:-L(\d+))?$/u;
|
|
16322
15865
|
const SCHEME = /^([A-Za-z][A-Za-z0-9+.-]*):/u;
|
|
16323
15866
|
const BARE_PATH = /^([^:]+):(\d+)(?::(\d+))?$/u;
|
|
15867
|
+
const MENTION_WHITESPACE = /\s/u;
|
|
16324
15868
|
const URI_UNSAFE = /[%#()\s<>"`]/gu;
|
|
16325
15869
|
const PATH_PUNCTUATION = [
|
|
16326
15870
|
codes.slash,
|
|
@@ -16377,6 +15921,10 @@ window.__ModuleLoader__.load({
|
|
|
16377
15921
|
function isLocalReference(reference) {
|
|
16378
15922
|
return !EXTERNAL_PROTOCOLS.includes(reference.protocol);
|
|
16379
15923
|
}
|
|
15924
|
+
function formatReferenceMention(reference) {
|
|
15925
|
+
const path = reference.path ?? "";
|
|
15926
|
+
return MENTION_WHITESPACE.test(path) ? `@"${path}"` : `@${path}`;
|
|
15927
|
+
}
|
|
16380
15928
|
function findReferences(text) {
|
|
16381
15929
|
const spans = [];
|
|
16382
15930
|
if (text === "" || !TRIGGERS.some((trigger) => text.includes(trigger))) return spans;
|
|
@@ -16805,29 +16353,89 @@ window.__ModuleLoader__.load({
|
|
|
16805
16353
|
}
|
|
16806
16354
|
if (reference.protocol === "file") actions.openFile(path);
|
|
16807
16355
|
}
|
|
16808
|
-
|
|
16356
|
+
//#endregion
|
|
16357
|
+
//#region ../../client/ui-primitives/src/client/index.ts
|
|
16358
|
+
var client_exports = /* @__PURE__ */ __exportAll({
|
|
16359
|
+
Bubble: () => Bubble,
|
|
16360
|
+
Button: () => Button$1,
|
|
16361
|
+
DisclosureRow: () => DisclosureRow,
|
|
16362
|
+
IconButton: () => IconButton,
|
|
16363
|
+
ModelRouteList: () => ModelRouteList,
|
|
16364
|
+
MultilineField: () => MultilineField,
|
|
16365
|
+
ReferenceMarkdown: () => ReferenceMarkdown,
|
|
16366
|
+
Row: () => Row,
|
|
16367
|
+
SCHEMA_FORM_NS: () => NS$1,
|
|
16368
|
+
SchemaFormController: () => SchemaFormController,
|
|
16369
|
+
SchemaFormHints: () => SchemaFormHints,
|
|
16370
|
+
SearchInput: () => SearchInput,
|
|
16371
|
+
SearchSelect: () => SearchSelect,
|
|
16372
|
+
SeatButton: () => SeatButton,
|
|
16373
|
+
SettingsFieldRow: () => SettingsFieldRow,
|
|
16374
|
+
Spinner: () => Spinner,
|
|
16375
|
+
Stack: () => Stack,
|
|
16376
|
+
Tabs: () => Tabs,
|
|
16377
|
+
TagInput: () => TagInput,
|
|
16378
|
+
Text: () => Text,
|
|
16379
|
+
TimeLabel: () => TimeLabel,
|
|
16380
|
+
VisuallyHidden: () => VisuallyHidden,
|
|
16381
|
+
apply: () => apply$1,
|
|
16382
|
+
failureOf: () => failureOf,
|
|
16383
|
+
findReferences: () => findReferences,
|
|
16384
|
+
formatReference: () => formatReference,
|
|
16385
|
+
formatReferenceMention: () => formatReferenceMention,
|
|
16386
|
+
inject: () => inject$1,
|
|
16387
|
+
isLocalReference: () => isLocalReference,
|
|
16388
|
+
markdownLabels: () => markdownLabels,
|
|
16389
|
+
mergeTags: () => mergeTags,
|
|
16390
|
+
parseReference: () => parseReference,
|
|
16391
|
+
parseReferenceToken: () => parseReferenceToken,
|
|
16392
|
+
parseTagList: () => parseTagList,
|
|
16393
|
+
projectRoot: () => projectRoot,
|
|
16394
|
+
referenceMentions: () => referenceMentions,
|
|
16395
|
+
rowRegistrations: () => rowRegistrations,
|
|
16396
|
+
schemaForm: () => schema_form_exports,
|
|
16397
|
+
walkFields: () => walkFields
|
|
16398
|
+
});
|
|
16399
|
+
__reExport(client_exports, require("@deepseek-ai/dsh-client-ui-primitives"));
|
|
16400
|
+
const inject$1 = [...inject$2];
|
|
16809
16401
|
function apply$1(ctx) {
|
|
16810
16402
|
apply$2(ctx);
|
|
16811
16403
|
}
|
|
16812
16404
|
//#endregion
|
|
16813
|
-
//#region src/client/chat
|
|
16405
|
+
//#region ../../../vendor/deepseek-harness/packages/client/ui-chat/src/client/chat/message-chrome.ts
|
|
16814
16406
|
function pad2(n) {
|
|
16815
16407
|
return String(n).padStart(2, "0");
|
|
16816
16408
|
}
|
|
16409
|
+
/**
|
|
16410
|
+
* Local calendar-day epoch (ms at local midnight) for an instant.
|
|
16411
|
+
* @param ms - Unix epoch ms.
|
|
16412
|
+
* @returns Midnight of that local calendar day.
|
|
16413
|
+
*/
|
|
16817
16414
|
function startOfLocalDay(ms) {
|
|
16818
16415
|
const d = new Date(ms);
|
|
16819
16416
|
d.setHours(0, 0, 0, 0);
|
|
16820
16417
|
return d.getTime();
|
|
16821
16418
|
}
|
|
16419
|
+
/**
|
|
16420
|
+
* Delay until the next local midnight after `ms` (at least 1ms).
|
|
16421
|
+
* @param ms - Unix epoch ms.
|
|
16422
|
+
* @returns Milliseconds until the following local midnight.
|
|
16423
|
+
*/
|
|
16822
16424
|
function msUntilNextLocalMidnight(ms) {
|
|
16823
16425
|
const next = new Date(ms);
|
|
16824
16426
|
next.setHours(24, 0, 0, 0);
|
|
16825
16427
|
return Math.max(next.getTime() - ms, 1);
|
|
16826
16428
|
}
|
|
16827
|
-
|
|
16828
|
-
|
|
16829
|
-
|
|
16830
|
-
|
|
16429
|
+
/**
|
|
16430
|
+
* Compact local timestamp for message IconActions. Same calendar day →
|
|
16431
|
+
* `HH:mm`; earlier this year → the `clock.md` date template + clock; other
|
|
16432
|
+
* years → the `clock.ymd` template + clock. Pure: the date templates arrive
|
|
16433
|
+
* through the caller's locale seat.
|
|
16434
|
+
* @param time - Unix epoch ms from the source session event.
|
|
16435
|
+
* @param t - translate seat supplying the `clock.md` / `clock.ymd` templates.
|
|
16436
|
+
* @param now - Reference instant for the day/year cut (defaults to wall clock).
|
|
16437
|
+
* @returns Date-aware clock string (24-hour, zero-padded time).
|
|
16438
|
+
*/
|
|
16831
16439
|
function formatMessageClock(time, t, now = Date.now()) {
|
|
16832
16440
|
const d = new Date(time);
|
|
16833
16441
|
const n = new Date(now);
|
|
@@ -16841,7 +16449,11 @@ window.__ModuleLoader__.load({
|
|
|
16841
16449
|
return `${d.getFullYear() === n.getFullYear() ? t("clock.md", params) : t("clock.ymd", params)} ${clock}`;
|
|
16842
16450
|
}
|
|
16843
16451
|
//#endregion
|
|
16844
|
-
//#region src/client/chat
|
|
16452
|
+
//#region ../../../vendor/deepseek-harness/packages/client/ui-chat/src/client/chat/use-calendar-day.ts
|
|
16453
|
+
/**
|
|
16454
|
+
* Local calendar-day epoch that advances at each local midnight.
|
|
16455
|
+
* @returns Midnight ms for the current local day; updates after the boundary.
|
|
16456
|
+
*/
|
|
16845
16457
|
function useCalendarDay() {
|
|
16846
16458
|
const [day, setDay] = (0, react.useState)(() => startOfLocalDay(Date.now()));
|
|
16847
16459
|
(0, react.useEffect)(() => {
|
|
@@ -16859,74 +16471,32 @@ window.__ModuleLoader__.load({
|
|
|
16859
16471
|
return day;
|
|
16860
16472
|
}
|
|
16861
16473
|
//#endregion
|
|
16862
|
-
//#region src/client/chat
|
|
16863
|
-
const
|
|
16864
|
-
|
|
16865
|
-
|
|
16866
|
-
|
|
16867
|
-
|
|
16868
|
-
|
|
16869
|
-
|
|
16870
|
-
|
|
16871
|
-
|
|
16872
|
-
|
|
16873
|
-
|
|
16874
|
-
|
|
16875
|
-
|
|
16876
|
-
|
|
16877
|
-
|
|
16878
|
-
|
|
16879
|
-
fontSize: "14px",
|
|
16880
|
-
lineHeight: "24px",
|
|
16881
|
-
color: "var(--dsw-alias-label-tertiary)",
|
|
16882
|
-
whiteSpace: "nowrap",
|
|
16883
|
-
"&)": { "@media (hover: hover)": { opacity: "1" } }
|
|
16884
|
-
},
|
|
16885
|
-
runTimeDot: { margin: "0 10px" },
|
|
16886
|
-
action: {
|
|
16887
|
-
display: "inline-flex",
|
|
16888
|
-
alignItems: "center",
|
|
16889
|
-
justifyContent: "center",
|
|
16890
|
-
width: "28px",
|
|
16891
|
-
height: "28px",
|
|
16892
|
-
padding: "6px",
|
|
16893
|
-
border: "none",
|
|
16894
|
-
borderRadius: "28px",
|
|
16895
|
-
background: "transparent",
|
|
16896
|
-
color: "var(--dsw-alias-label-tertiary)",
|
|
16897
|
-
cursor: "pointer",
|
|
16898
|
-
"&:hover": {
|
|
16899
|
-
background: "var(--dsw-alias-interactive-bg-hover)",
|
|
16900
|
-
color: "var(--dsw-alias-label-secondary)"
|
|
16901
|
-
},
|
|
16902
|
-
"&[data-unavailable]": {
|
|
16903
|
-
cursor: "default",
|
|
16904
|
-
opacity: "0.4"
|
|
16905
|
-
},
|
|
16906
|
-
"&[data-unavailable]:hover": {
|
|
16907
|
-
background: "transparent",
|
|
16908
|
-
color: "var(--dsw-alias-label-tertiary)"
|
|
16909
|
-
}
|
|
16910
|
-
},
|
|
16911
|
-
visuallyHidden: {
|
|
16912
|
-
position: "absolute",
|
|
16913
|
-
width: "1px",
|
|
16914
|
-
height: "1px",
|
|
16915
|
-
overflow: "hidden",
|
|
16916
|
-
clip: "rect(0 0 0 0)",
|
|
16917
|
-
whiteSpace: "nowrap"
|
|
16918
|
-
}
|
|
16919
|
-
};
|
|
16920
|
-
const globals = {
|
|
16921
|
-
"[data-time-hover-root] [data-time-label]": {
|
|
16922
|
-
opacity: "0",
|
|
16923
|
-
transition: "opacity 80ms ease"
|
|
16924
|
-
},
|
|
16925
|
-
"[data-time-hover-root]:hover :is(.timeStart, .timeEnd),\n [data-time-hover-root]:focus-within :is(.timeStart, .timeEnd)": { opacity: "1" }
|
|
16474
|
+
//#region \0dsh-css-modules:/Users/morlay/src/github.com/morlay/dsh-plugin/vendor/deepseek-harness/packages/client/ui-chat/src/client/chat/MessageIconActions.module.css.mjs
|
|
16475
|
+
const css = "._4gcvcq_actions{height:calc(28px + var(--dsh-content-font-delta,0px));align-items:center;gap:8px;display:flex}._4gcvcq_timeStart{font-size:var(--dsh-content-font-size-secondary,13px);line-height:calc(24px + var(--dsh-content-font-delta,0px));color:var(--dsw-alias-label-tertiary);white-space:nowrap;padding-right:12px}._4gcvcq_timeEnd{font-size:calc(var(--dsh-content-font-size-secondary,13px) - 1px);line-height:calc(24px + var(--dsh-content-font-delta,0px));color:inherit;white-space:nowrap}._4gcvcq_endInfo{min-width:0;color:var(--dsw-alias-label-tertiary);align-items:center;gap:8px;margin-left:8px;display:inline-flex}@media (hover:hover){[data-actions-reveal=hover] ._4gcvcq_actions,:is([data-chat-flow-kind=user],[data-chat-flow-kind=steering]):has(~:is([data-chat-flow-kind=user],[data-chat-flow-kind=steering])) ._4gcvcq_actions{opacity:0;transition:opacity 80ms}[data-actions-reveal=hover]:hover ._4gcvcq_actions,[data-actions-reveal=hover]:focus-within ._4gcvcq_actions,:is([data-chat-flow-kind=user],[data-chat-flow-kind=steering]):has(~:is([data-chat-flow-kind=user],[data-chat-flow-kind=steering])):hover ._4gcvcq_actions,:is([data-chat-flow-kind=user],[data-chat-flow-kind=steering]):has(~:is([data-chat-flow-kind=user],[data-chat-flow-kind=steering])):focus-within ._4gcvcq_actions{opacity:1}}._4gcvcq_action{width:calc(28px + var(--dsh-content-font-delta,0px));height:calc(28px + var(--dsh-content-font-delta,0px));border-radius:var(--dsw-radius-sm);color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:none;justify-content:center;align-items:center;padding:6px;display:inline-flex}._4gcvcq_action svg{width:calc(15px + var(--dsh-content-font-delta,0px));height:calc(15px + var(--dsh-content-font-delta,0px))}._4gcvcq_actions[data-clock=end] ._4gcvcq_action svg{width:calc(17px + var(--dsh-content-font-delta,0px));height:calc(17px + var(--dsh-content-font-delta,0px))}._4gcvcq_action:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-secondary)}._4gcvcq_action[data-unavailable]{cursor:default;opacity:.4}._4gcvcq_action[data-unavailable]:hover{color:var(--dsw-alias-label-tertiary);background:0 0}._4gcvcq_visuallyHidden{clip:rect(0 0 0 0);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}";
|
|
16476
|
+
const tagId = "@morlay/ui-conversation-message-actions/MessageIconActions.module.css";
|
|
16477
|
+
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@morlay/ui-conversation-message-actions/MessageIconActions.module.css\"]") === null) {
|
|
16478
|
+
const tag = document.createElement("style");
|
|
16479
|
+
tag.dataset.plugin = "@morlay/ui-conversation-message-actions";
|
|
16480
|
+
tag.dataset.pluginCss = tagId;
|
|
16481
|
+
tag.textContent = css;
|
|
16482
|
+
document.head.appendChild(tag);
|
|
16483
|
+
}
|
|
16484
|
+
var MessageIconActions_module_css_default = {
|
|
16485
|
+
"endInfo": "_4gcvcq_endInfo",
|
|
16486
|
+
"visuallyHidden": "_4gcvcq_visuallyHidden",
|
|
16487
|
+
"timeEnd": "_4gcvcq_timeEnd",
|
|
16488
|
+
"action": "_4gcvcq_action",
|
|
16489
|
+
"actions": "_4gcvcq_actions",
|
|
16490
|
+
"timeStart": "_4gcvcq_timeStart"
|
|
16926
16491
|
};
|
|
16927
16492
|
//#endregion
|
|
16928
|
-
//#region src/client/chat
|
|
16929
|
-
|
|
16493
|
+
//#region ../../../vendor/deepseek-harness/packages/client/ui-chat/src/client/chat/MessageIconActions.tsx
|
|
16494
|
+
/**
|
|
16495
|
+
* Copy / branch (/ clock) IconActions row shared by user and assistant chrome.
|
|
16496
|
+
* @param props - Copy text, event time, clock side, branch callback, className.
|
|
16497
|
+
* @returns The actions row element.
|
|
16498
|
+
*/
|
|
16499
|
+
function MessageIconActions({ text, time, clock, onBranch, branchUnavailable = false, className, extraActions, usageAction, t }) {
|
|
16930
16500
|
const day = useCalendarDay();
|
|
16931
16501
|
const reasonId = (0, react.useId)();
|
|
16932
16502
|
const [copied, setCopied] = (0, react.useState)(false);
|
|
@@ -16954,14 +16524,12 @@ window.__ModuleLoader__.load({
|
|
|
16954
16524
|
});
|
|
16955
16525
|
}, [copied, text]);
|
|
16956
16526
|
const clockEl = time === void 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
16957
|
-
"
|
|
16958
|
-
...styling.props(clock === "start" ? styles$3.timeStart : styles$3.timeEnd),
|
|
16527
|
+
className: clock === "start" ? MessageIconActions_module_css_default.timeStart : MessageIconActions_module_css_default.timeEnd,
|
|
16959
16528
|
children: formatMessageClock(time, t, day)
|
|
16960
16529
|
});
|
|
16961
|
-
const actionsClass = styling.className(styles$3.actions);
|
|
16962
16530
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
16963
|
-
|
|
16964
|
-
|
|
16531
|
+
className: className === void 0 ? MessageIconActions_module_css_default.actions : `${MessageIconActions_module_css_default.actions} ${className}`,
|
|
16532
|
+
"data-clock": clock,
|
|
16965
16533
|
children: [
|
|
16966
16534
|
clock === "start" ? clockEl : null,
|
|
16967
16535
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tooltip, {
|
|
@@ -16969,41 +16537,19 @@ window.__ModuleLoader__.load({
|
|
|
16969
16537
|
side: "bottom",
|
|
16970
16538
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
16971
16539
|
type: "button",
|
|
16972
|
-
|
|
16540
|
+
className: MessageIconActions_module_css_default.action,
|
|
16973
16541
|
"aria-label": copied ? t("copied") : t("copy"),
|
|
16974
16542
|
onClick: onCopy,
|
|
16975
16543
|
children: copied ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconCheckOutlineRegular, {}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconCopyOutlineRegular, {})
|
|
16976
16544
|
})
|
|
16977
16545
|
}),
|
|
16978
16546
|
extraActions,
|
|
16979
|
-
onEdit !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tooltip, {
|
|
16980
|
-
label: "编辑",
|
|
16981
|
-
side: "bottom",
|
|
16982
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
16983
|
-
type: "button",
|
|
16984
|
-
...styling.props(styles$3.action),
|
|
16985
|
-
"aria-label": "编辑",
|
|
16986
|
-
onClick: onEdit,
|
|
16987
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconEditOutlineRegular, {})
|
|
16988
|
-
})
|
|
16989
|
-
}),
|
|
16990
|
-
onRetry !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tooltip, {
|
|
16991
|
-
label: "重试此回合",
|
|
16992
|
-
side: "bottom",
|
|
16993
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
16994
|
-
type: "button",
|
|
16995
|
-
...styling.props(styles$3.action),
|
|
16996
|
-
"aria-label": "重试此回合",
|
|
16997
|
-
onClick: onRetry,
|
|
16998
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconRefreshOutlineRegular, {})
|
|
16999
|
-
})
|
|
17000
|
-
}),
|
|
17001
16547
|
onBranch !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tooltip, {
|
|
17002
16548
|
label: branchUnavailable ? t("message.branchUnavailable") : t("message.branch"),
|
|
17003
16549
|
side: "bottom",
|
|
17004
16550
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
17005
16551
|
type: "button",
|
|
17006
|
-
|
|
16552
|
+
className: MessageIconActions_module_css_default.action,
|
|
17007
16553
|
"aria-label": t("message.branch"),
|
|
17008
16554
|
"aria-disabled": branchUnavailable || void 0,
|
|
17009
16555
|
"aria-describedby": branchUnavailable ? reasonId : void 0,
|
|
@@ -17014,219 +16560,17 @@ window.__ModuleLoader__.load({
|
|
|
17014
16560
|
}),
|
|
17015
16561
|
onBranch !== void 0 && branchUnavailable && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
17016
16562
|
id: reasonId,
|
|
17017
|
-
|
|
16563
|
+
className: MessageIconActions_module_css_default.visuallyHidden,
|
|
17018
16564
|
children: t("message.branchUnavailable")
|
|
17019
16565
|
}),
|
|
17020
|
-
clock === "end" ?
|
|
16566
|
+
clock === "end" ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
16567
|
+
className: MessageIconActions_module_css_default.endInfo,
|
|
16568
|
+
children: [usageAction, clockEl]
|
|
16569
|
+
}) : usageAction
|
|
17021
16570
|
]
|
|
17022
16571
|
});
|
|
17023
16572
|
}
|
|
17024
16573
|
//#endregion
|
|
17025
|
-
//#region src/client/chat-node/MessageItem.styles.ts
|
|
17026
|
-
const styles$2 = {
|
|
17027
|
-
userRow: {
|
|
17028
|
-
display: "flex",
|
|
17029
|
-
flexDirection: "column",
|
|
17030
|
-
alignItems: "flex-end",
|
|
17031
|
-
gap: "6px"
|
|
17032
|
-
},
|
|
17033
|
-
userStack: {
|
|
17034
|
-
display: "flex",
|
|
17035
|
-
flexDirection: "column",
|
|
17036
|
-
alignItems: "flex-end",
|
|
17037
|
-
gap: "8px",
|
|
17038
|
-
minWidth: "0",
|
|
17039
|
-
maxWidth: "min(525px, 82%)"
|
|
17040
|
-
},
|
|
17041
|
-
bubble: {
|
|
17042
|
-
maxWidth: "100%",
|
|
17043
|
-
background: "var(--dsw-specific-bubble)",
|
|
17044
|
-
borderRadius: "22px",
|
|
17045
|
-
padding: "10px 16px",
|
|
17046
|
-
fontSize: "16px",
|
|
17047
|
-
lineHeight: "24px",
|
|
17048
|
-
color: "var(--dsw-alias-label-primary)"
|
|
17049
|
-
},
|
|
17050
|
-
contextRow: { padding: "2px 0" },
|
|
17051
|
-
compactionRow: { padding: "2px 0" },
|
|
17052
|
-
compactionButton: {
|
|
17053
|
-
display: "flex",
|
|
17054
|
-
alignItems: "center",
|
|
17055
|
-
width: "100%",
|
|
17056
|
-
height: "24px",
|
|
17057
|
-
minWidth: "0",
|
|
17058
|
-
padding: "0",
|
|
17059
|
-
border: "none",
|
|
17060
|
-
borderRadius: "6px",
|
|
17061
|
-
background: "none",
|
|
17062
|
-
color: "inherit",
|
|
17063
|
-
font: "inherit",
|
|
17064
|
-
textAlign: "left",
|
|
17065
|
-
"&:not(:disabled)": { cursor: "pointer" },
|
|
17066
|
-
"&:not(:disabled):hover": { background: "var(--dsw-alias-interactive-bg-hover)" },
|
|
17067
|
-
"&:not(:disabled):hover .compactionContextIcon": { opacity: "0" },
|
|
17068
|
-
"&:not(:disabled):focus-visible .compactionContextIcon": { opacity: "0" },
|
|
17069
|
-
"&:not(:disabled):hover .compactionDisclosureIcon": { opacity: "1" },
|
|
17070
|
-
"&:not(:disabled):focus-visible .compactionDisclosureIcon": { opacity: "1" }
|
|
17071
|
-
},
|
|
17072
|
-
compactionLeading: {
|
|
17073
|
-
flex: "none",
|
|
17074
|
-
display: "inline-grid",
|
|
17075
|
-
placeItems: "center",
|
|
17076
|
-
width: "16px",
|
|
17077
|
-
height: "16px",
|
|
17078
|
-
marginRight: "6px",
|
|
17079
|
-
color: "var(--dsw-alias-label-secondary)"
|
|
17080
|
-
},
|
|
17081
|
-
compactionContextIcon: {
|
|
17082
|
-
display: "inline-flex",
|
|
17083
|
-
gridArea: "1 / 1",
|
|
17084
|
-
alignItems: "center",
|
|
17085
|
-
justifyContent: "center"
|
|
17086
|
-
},
|
|
17087
|
-
compactionDisclosureIcon: {
|
|
17088
|
-
display: "inline-flex",
|
|
17089
|
-
gridArea: "1 / 1",
|
|
17090
|
-
alignItems: "center",
|
|
17091
|
-
justifyContent: "center",
|
|
17092
|
-
opacity: "0"
|
|
17093
|
-
},
|
|
17094
|
-
compactionTitle: {
|
|
17095
|
-
flex: "none",
|
|
17096
|
-
fontSize: "14px",
|
|
17097
|
-
lineHeight: "24px",
|
|
17098
|
-
color: "var(--dsw-alias-label-primary-dimmed)"
|
|
17099
|
-
},
|
|
17100
|
-
compactionSep: {
|
|
17101
|
-
flex: "none",
|
|
17102
|
-
width: "2px",
|
|
17103
|
-
height: "2px",
|
|
17104
|
-
margin: "0 8px",
|
|
17105
|
-
borderRadius: "1px",
|
|
17106
|
-
background: "var(--dsw-alias-label-caption)"
|
|
17107
|
-
},
|
|
17108
|
-
compactionSummary: {
|
|
17109
|
-
flex: "1 1 auto",
|
|
17110
|
-
minWidth: "0",
|
|
17111
|
-
overflow: "hidden",
|
|
17112
|
-
color: "var(--dsw-alias-label-tertiary)",
|
|
17113
|
-
fontSize: "14px",
|
|
17114
|
-
lineHeight: "24px",
|
|
17115
|
-
textOverflow: "ellipsis",
|
|
17116
|
-
whiteSpace: "nowrap"
|
|
17117
|
-
},
|
|
17118
|
-
compactionBody: {
|
|
17119
|
-
padding: "4px 0 4px 22px",
|
|
17120
|
-
color: "var(--dsw-alias-label-tertiary)",
|
|
17121
|
-
fontSize: "14px",
|
|
17122
|
-
lineHeight: "24px"
|
|
17123
|
-
},
|
|
17124
|
-
retryRow: {
|
|
17125
|
-
color: "var(--dsw-alias-label-tertiary)",
|
|
17126
|
-
fontSize: "13px",
|
|
17127
|
-
lineHeight: "20px",
|
|
17128
|
-
"&[data-active] .retryText": {
|
|
17129
|
-
background: "linear-gradient(\n 90deg,\n var(--dsw-alias-label-tertiary) 0%,\n var(--dsw-alias-label-tertiary) 40%,\n var(--dsw-alias-label-secondary) 50%,\n var(--dsw-alias-label-tertiary) 60%,\n var(--dsw-alias-label-tertiary) 100%\n )",
|
|
17130
|
-
backgroundPosition: "100% 50%",
|
|
17131
|
-
backgroundSize: "200% 100%",
|
|
17132
|
-
backgroundClip: "text",
|
|
17133
|
-
color: "transparent",
|
|
17134
|
-
animation: "retry-shimmer 1.6s ease-in-out infinite",
|
|
17135
|
-
"@media (prefers-reduced-motion: reduce)": {
|
|
17136
|
-
background: "none",
|
|
17137
|
-
color: "inherit",
|
|
17138
|
-
animation: "none"
|
|
17139
|
-
}
|
|
17140
|
-
},
|
|
17141
|
-
"&[open] .retrySummary::after": { transform: "rotate(45deg)" }
|
|
17142
|
-
},
|
|
17143
|
-
retrySummary: {
|
|
17144
|
-
display: "inline-flex",
|
|
17145
|
-
alignItems: "center",
|
|
17146
|
-
width: "fit-content",
|
|
17147
|
-
padding: "2px 0",
|
|
17148
|
-
gap: "7px",
|
|
17149
|
-
borderRadius: "3px",
|
|
17150
|
-
color: "inherit",
|
|
17151
|
-
cursor: "pointer",
|
|
17152
|
-
listStyle: "none",
|
|
17153
|
-
userSelect: "none",
|
|
17154
|
-
"&::-webkit-details-marker": { display: "none" },
|
|
17155
|
-
"&::after": {
|
|
17156
|
-
width: "6px",
|
|
17157
|
-
height: "6px",
|
|
17158
|
-
borderRight: "1.5px solid currentcolor",
|
|
17159
|
-
borderBottom: "1.5px solid currentcolor",
|
|
17160
|
-
content: "\"\"",
|
|
17161
|
-
opacity: "0.8",
|
|
17162
|
-
transform: "rotate(-45deg)",
|
|
17163
|
-
transition: "transform 120ms ease"
|
|
17164
|
-
},
|
|
17165
|
-
"&:hover": { color: "var(--dsw-alias-label-secondary)" },
|
|
17166
|
-
"&:focus-visible": {
|
|
17167
|
-
outline: "1.5px solid var(--dsw-focus-ring-color, var(--dsw-alias-state-business-primary))",
|
|
17168
|
-
outlineOffset: "2px"
|
|
17169
|
-
}
|
|
17170
|
-
},
|
|
17171
|
-
retryText: { color: "inherit" },
|
|
17172
|
-
retryDetails: {
|
|
17173
|
-
display: "grid",
|
|
17174
|
-
gap: "2px",
|
|
17175
|
-
marginTop: "3px",
|
|
17176
|
-
paddingLeft: "14px",
|
|
17177
|
-
overflowWrap: "anywhere",
|
|
17178
|
-
fontSize: "12px",
|
|
17179
|
-
lineHeight: "18px"
|
|
17180
|
-
},
|
|
17181
|
-
retryDetailLabel: { color: "var(--dsw-alias-label-secondary)" },
|
|
17182
|
-
turnErrorRow: {
|
|
17183
|
-
display: "grid",
|
|
17184
|
-
gridTemplateColumns: "10px minmax(0, 1fr) auto",
|
|
17185
|
-
gap: "8px",
|
|
17186
|
-
alignItems: "start",
|
|
17187
|
-
padding: "2px 0",
|
|
17188
|
-
fontSize: "13px",
|
|
17189
|
-
lineHeight: "20px"
|
|
17190
|
-
},
|
|
17191
|
-
turnErrorDot: { marginTop: "5px" },
|
|
17192
|
-
turnErrorCopy: {
|
|
17193
|
-
minWidth: "0",
|
|
17194
|
-
overflowWrap: "anywhere"
|
|
17195
|
-
},
|
|
17196
|
-
turnErrorTitle: {
|
|
17197
|
-
marginRight: "6px",
|
|
17198
|
-
color: "var(--dsw-alias-state-error-primary)",
|
|
17199
|
-
fontWeight: "600"
|
|
17200
|
-
},
|
|
17201
|
-
turnErrorMessage: { color: "var(--dsw-alias-label-secondary)" },
|
|
17202
|
-
turnErrorCode: {
|
|
17203
|
-
color: "var(--dsw-alias-label-tertiary)",
|
|
17204
|
-
font: "var(--dsw-font-markdown-code-block-small)"
|
|
17205
|
-
},
|
|
17206
|
-
maxTokensTitle: {
|
|
17207
|
-
marginRight: "6px",
|
|
17208
|
-
color: "var(--dsw-alias-state-warn-primary)",
|
|
17209
|
-
fontWeight: "600"
|
|
17210
|
-
},
|
|
17211
|
-
refChip: {
|
|
17212
|
-
display: "inline-block",
|
|
17213
|
-
margin: "0 2px",
|
|
17214
|
-
padding: "0 8px",
|
|
17215
|
-
borderRadius: "6px",
|
|
17216
|
-
background: "rgba(97, 135, 216, 0.22)",
|
|
17217
|
-
color: "var(--dsw-alias-label-primary)",
|
|
17218
|
-
fontSize: "0.85em",
|
|
17219
|
-
lineHeight: "1.6",
|
|
17220
|
-
whiteSpace: "nowrap",
|
|
17221
|
-
verticalAlign: "baseline"
|
|
17222
|
-
},
|
|
17223
|
-
confirmActions: {
|
|
17224
|
-
display: "flex",
|
|
17225
|
-
justifyContent: "flex-end",
|
|
17226
|
-
gap: "8px"
|
|
17227
|
-
}
|
|
17228
|
-
};
|
|
17229
|
-
//#endregion
|
|
17230
16574
|
//#region src/client/chat-node/MessageItem.tsx
|
|
17231
16575
|
function contentParts(content) {
|
|
17232
16576
|
const texts = [];
|
|
@@ -17250,26 +16594,26 @@ window.__ModuleLoader__.load({
|
|
|
17250
16594
|
const truncated = (total) => t("json.truncated", { total });
|
|
17251
16595
|
const labels = (0, react.useMemo)(() => markdownLabels(t), [t]);
|
|
17252
16596
|
const showBubble = text !== "" || rest.length > 0;
|
|
17253
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
17254
|
-
|
|
16597
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Stack, {
|
|
16598
|
+
align: "end",
|
|
16599
|
+
gap: 6,
|
|
17255
16600
|
"data-time-hover-root": true,
|
|
17256
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
17257
|
-
|
|
16601
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Stack, {
|
|
16602
|
+
align: "end",
|
|
16603
|
+
gap: 8,
|
|
16604
|
+
narrow: true,
|
|
17258
16605
|
children: [renderMessageImages({
|
|
17259
16606
|
images,
|
|
17260
16607
|
align: "end"
|
|
17261
|
-
}), showBubble && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
17262
|
-
|
|
17263
|
-
|
|
17264
|
-
|
|
17265
|
-
|
|
17266
|
-
|
|
17267
|
-
|
|
17268
|
-
|
|
17269
|
-
|
|
17270
|
-
truncatedLabel: truncated
|
|
17271
|
-
}, i))]
|
|
17272
|
-
})]
|
|
16608
|
+
}), showBubble && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Bubble, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(ReferenceMarkdown, {
|
|
16609
|
+
text,
|
|
16610
|
+
labels,
|
|
16611
|
+
actions: references
|
|
16612
|
+
}), rest.map((block, i) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(client_exports.JsonBlock, {
|
|
16613
|
+
label: t("message.extraBlock"),
|
|
16614
|
+
payload: block,
|
|
16615
|
+
truncatedLabel: truncated
|
|
16616
|
+
}, i))] })]
|
|
17273
16617
|
}), actions?.(text)]
|
|
17274
16618
|
});
|
|
17275
16619
|
}
|
|
@@ -17298,19 +16642,20 @@ window.__ModuleLoader__.load({
|
|
|
17298
16642
|
setConfirmingRetry(true);
|
|
17299
16643
|
} : void 0;
|
|
17300
16644
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
17301
|
-
confirmingRecall !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
16645
|
+
confirmingRecall !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(client_exports.Modal, {
|
|
17302
16646
|
open: true,
|
|
17303
16647
|
onClose: () => setConfirmingRecall(null),
|
|
17304
16648
|
title: "编辑消息",
|
|
17305
16649
|
closeLabel: "关闭",
|
|
17306
16650
|
description: "将撤回该消息及其之后的对话内容到输入框,请修改后重新发送。",
|
|
17307
|
-
footer: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
17308
|
-
|
|
17309
|
-
|
|
16651
|
+
footer: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Row, {
|
|
16652
|
+
gap: 8,
|
|
16653
|
+
justify: "end",
|
|
16654
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button$1, {
|
|
17310
16655
|
variant: "outline",
|
|
17311
16656
|
onClick: () => setConfirmingRecall(null),
|
|
17312
16657
|
children: "取消"
|
|
17313
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
16658
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button$1, {
|
|
17314
16659
|
variant: "primary",
|
|
17315
16660
|
onClick: () => {
|
|
17316
16661
|
const target = confirmingRecall;
|
|
@@ -17321,19 +16666,20 @@ window.__ModuleLoader__.load({
|
|
|
17321
16666
|
})]
|
|
17322
16667
|
})
|
|
17323
16668
|
}),
|
|
17324
|
-
confirmingRetry && turn !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
16669
|
+
confirmingRetry && turn !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(client_exports.Modal, {
|
|
17325
16670
|
open: true,
|
|
17326
16671
|
onClose: () => setConfirmingRetry(false),
|
|
17327
16672
|
title: "重试回合",
|
|
17328
16673
|
closeLabel: "关闭",
|
|
17329
16674
|
description: `将重新生成第 ${turn} 轮的回复,并抛弃该回合之后的内容。`,
|
|
17330
|
-
footer: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
17331
|
-
|
|
17332
|
-
|
|
16675
|
+
footer: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Row, {
|
|
16676
|
+
gap: 8,
|
|
16677
|
+
justify: "end",
|
|
16678
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button$1, {
|
|
17333
16679
|
variant: "outline",
|
|
17334
16680
|
onClick: () => setConfirmingRetry(false),
|
|
17335
16681
|
children: "取消"
|
|
17336
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
16682
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button$1, {
|
|
17337
16683
|
variant: "primary",
|
|
17338
16684
|
onClick: () => {
|
|
17339
16685
|
setConfirmingRetry(false);
|
|
@@ -17356,500 +16702,35 @@ window.__ModuleLoader__.load({
|
|
|
17356
16702
|
time: data.time,
|
|
17357
16703
|
clock: "start",
|
|
17358
16704
|
t,
|
|
17359
|
-
onEdit,
|
|
17360
|
-
|
|
16705
|
+
extraActions: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [onEdit === void 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconButton, {
|
|
16706
|
+
shape: "circle",
|
|
16707
|
+
label: "编辑",
|
|
16708
|
+
onClick: onEdit,
|
|
16709
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(client_exports.IconEditOutlineRegular, {})
|
|
16710
|
+
}), onRetry === void 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconButton, {
|
|
16711
|
+
shape: "circle",
|
|
16712
|
+
label: "重试此回合",
|
|
16713
|
+
onClick: onRetry,
|
|
16714
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(client_exports.IconRefreshOutlineRegular, {})
|
|
16715
|
+
})] })
|
|
17361
16716
|
})
|
|
17362
16717
|
})
|
|
17363
16718
|
] });
|
|
17364
16719
|
});
|
|
17365
16720
|
//#endregion
|
|
17366
16721
|
//#region src/client/chat-node/register.ts
|
|
17367
|
-
const NS
|
|
16722
|
+
const NS = "conversation";
|
|
17368
16723
|
function registerChatNodeRenderers(ctx, controllerFor) {
|
|
17369
16724
|
const injectFace = (sessionId) => controllerFor(sessionId).face;
|
|
17370
16725
|
for (const key of ["user", "steering"]) ctx.slots.inject("conversation.chat.node", () => ctx.slots.register({
|
|
17371
16726
|
name: "conversation.chat.node",
|
|
17372
16727
|
key,
|
|
17373
|
-
locale: NS
|
|
16728
|
+
locale: NS,
|
|
17374
16729
|
priority: -1,
|
|
17375
16730
|
inject: injectFace
|
|
17376
16731
|
}, UserMessageNodeView));
|
|
17377
16732
|
}
|
|
17378
16733
|
//#endregion
|
|
17379
|
-
//#region src/client/composer-stats/turn-reading.ts
|
|
17380
|
-
function usageOutputTokens(usage) {
|
|
17381
|
-
if (typeof usage !== "object" || usage === null) return null;
|
|
17382
|
-
const value = usage.outputTokens;
|
|
17383
|
-
return typeof value === "number" && Number.isFinite(value) && value >= 0 ? value : null;
|
|
17384
|
-
}
|
|
17385
|
-
function assistantStepReading(node) {
|
|
17386
|
-
const timing = node.timing;
|
|
17387
|
-
return {
|
|
17388
|
-
ttftMs: timing !== void 0 && timing.stepStartTime !== null && timing.firstTokenTime !== null ? Math.max(0, timing.firstTokenTime - timing.stepStartTime) : null,
|
|
17389
|
-
decodeMs: timing !== void 0 && timing.firstTokenTime !== null ? Math.max(0, timing.completedTime - timing.firstTokenTime) : null,
|
|
17390
|
-
outputTokens: usageOutputTokens(node.usage)
|
|
17391
|
-
};
|
|
17392
|
-
}
|
|
17393
|
-
//#endregion
|
|
17394
|
-
//#region src/client/composer-stats/token-format.ts
|
|
17395
|
-
function formatTokens(value, t) {
|
|
17396
|
-
const scaled = (candidate) => candidate >= 100 ? String(Math.round(candidate)) : String(Math.round(candidate * 10) / 10);
|
|
17397
|
-
if (value < 1e3) return String(value);
|
|
17398
|
-
if (value < 1e6) return t("number.thousand", { value: scaled(value / 1e3) });
|
|
17399
|
-
return t("number.million", { value: scaled(value / 1e6) });
|
|
17400
|
-
}
|
|
17401
|
-
function formatExactTokens(value, t) {
|
|
17402
|
-
const digits = String(value);
|
|
17403
|
-
const groups = [];
|
|
17404
|
-
for (let end = digits.length; end > 0; end -= 3) groups.unshift(digits.slice(Math.max(0, end - 3), end));
|
|
17405
|
-
return groups.join(t("number.groupSeparator"));
|
|
17406
|
-
}
|
|
17407
|
-
function roundedPercentUnits(cacheReadTokens, denominator, decimalPlaces) {
|
|
17408
|
-
const scale = (decimalPlaces === 0 ? 1 : 10) * 100;
|
|
17409
|
-
const doubledScale = scale * 2;
|
|
17410
|
-
const denominatorQuotient = Math.floor(denominator / doubledScale);
|
|
17411
|
-
const denominatorRemainder = denominator % doubledScale;
|
|
17412
|
-
let lower = 0;
|
|
17413
|
-
let upper = scale;
|
|
17414
|
-
while (lower < upper) {
|
|
17415
|
-
const candidate = Math.floor((lower + upper + 1) / 2);
|
|
17416
|
-
const factor = candidate * 2 - 1;
|
|
17417
|
-
if (cacheReadTokens >= factor * denominatorQuotient + Math.ceil(factor * denominatorRemainder / doubledScale)) lower = candidate;
|
|
17418
|
-
else upper = candidate - 1;
|
|
17419
|
-
}
|
|
17420
|
-
return lower;
|
|
17421
|
-
}
|
|
17422
|
-
function displayPercentUnits(units, decimalPlaces) {
|
|
17423
|
-
if (decimalPlaces === 0) return String(units);
|
|
17424
|
-
const whole = Math.floor(units / 10);
|
|
17425
|
-
const tenths = units % 10;
|
|
17426
|
-
return tenths === 0 ? String(whole) : `${whole}.${tenths}`;
|
|
17427
|
-
}
|
|
17428
|
-
function formatCacheHitPercent(cacheReadTokens, promptTokens, decimalPlaces = 0) {
|
|
17429
|
-
if (promptTokens === 0) return null;
|
|
17430
|
-
const missedInputTokens = promptTokens - cacheReadTokens;
|
|
17431
|
-
if (missedInputTokens <= 0) return "100";
|
|
17432
|
-
const roundedUnits = roundedPercentUnits(cacheReadTokens, promptTokens, decimalPlaces);
|
|
17433
|
-
if (roundedUnits < (decimalPlaces === 0 ? 100 : 1e3)) return displayPercentUnits(roundedUnits, decimalPlaces);
|
|
17434
|
-
let distinguishingPlaces = 1;
|
|
17435
|
-
let scaledDoubleGap = missedInputTokens * 200;
|
|
17436
|
-
const denominatorTens = Math.floor(promptTokens / 10);
|
|
17437
|
-
while (scaledDoubleGap <= denominatorTens) {
|
|
17438
|
-
scaledDoubleGap *= 10;
|
|
17439
|
-
distinguishingPlaces += 1;
|
|
17440
|
-
}
|
|
17441
|
-
const denominatorOnes = promptTokens % 10;
|
|
17442
|
-
let roundedLoss = 5;
|
|
17443
|
-
for (let loss = 1; loss < 5; loss += 1) {
|
|
17444
|
-
const factor = loss * 2 + 1;
|
|
17445
|
-
const threshold = factor * denominatorTens + Math.floor(factor * denominatorOnes / 10);
|
|
17446
|
-
if (scaledDoubleGap <= threshold) {
|
|
17447
|
-
roundedLoss = loss;
|
|
17448
|
-
break;
|
|
17449
|
-
}
|
|
17450
|
-
}
|
|
17451
|
-
return `99.${"9".repeat(distinguishingPlaces - 1)}${10 - roundedLoss}`;
|
|
17452
|
-
}
|
|
17453
|
-
//#endregion
|
|
17454
|
-
//#region src/client/composer-stats/stat-dialog.ts
|
|
17455
|
-
const PANEL_MARGIN = 12;
|
|
17456
|
-
const PANEL_GAP = 8;
|
|
17457
|
-
const MEASURE_STYLE = {
|
|
17458
|
-
visibility: "hidden",
|
|
17459
|
-
left: 0,
|
|
17460
|
-
top: 0
|
|
17461
|
-
};
|
|
17462
|
-
function useStatDialog(controlled) {
|
|
17463
|
-
const [ownOpen, setOwnOpen] = (0, react.useState)(false);
|
|
17464
|
-
const open = controlled?.open ?? ownOpen;
|
|
17465
|
-
const setOpen = controlled?.setOpen ?? setOwnOpen;
|
|
17466
|
-
const rootRef = (0, react.useRef)(null);
|
|
17467
|
-
const panelRef = (0, react.useRef)(null);
|
|
17468
|
-
const pos = (0, _deepseek_ai_dsh_client_ui_primitives.useAnchoredPosition)({
|
|
17469
|
-
open,
|
|
17470
|
-
anchorRef: rootRef,
|
|
17471
|
-
panelRef,
|
|
17472
|
-
side: "top",
|
|
17473
|
-
gap: PANEL_GAP,
|
|
17474
|
-
margin: PANEL_MARGIN
|
|
17475
|
-
});
|
|
17476
|
-
(0, _deepseek_ai_dsh_client_ui_primitives.useDismissOnOutsidePointer)(rootRef, open, setOpen, panelRef);
|
|
17477
|
-
(0, react.useEffect)(() => {
|
|
17478
|
-
if (!open) return;
|
|
17479
|
-
const onKeyDown = (e) => {
|
|
17480
|
-
if (e.key === "Escape") setOpen(false);
|
|
17481
|
-
};
|
|
17482
|
-
document.addEventListener("keydown", onKeyDown);
|
|
17483
|
-
return () => {
|
|
17484
|
-
document.removeEventListener("keydown", onKeyDown);
|
|
17485
|
-
};
|
|
17486
|
-
}, [open, setOpen]);
|
|
17487
|
-
return {
|
|
17488
|
-
open,
|
|
17489
|
-
setOpen,
|
|
17490
|
-
rootRef,
|
|
17491
|
-
panelRef,
|
|
17492
|
-
pos
|
|
17493
|
-
};
|
|
17494
|
-
}
|
|
17495
|
-
//#endregion
|
|
17496
|
-
//#region src/client/composer-stats/StatsPills.styles.ts
|
|
17497
|
-
const styles$1 = {
|
|
17498
|
-
root: {
|
|
17499
|
-
display: "flex",
|
|
17500
|
-
justifyContent: "center",
|
|
17501
|
-
gap: "12px",
|
|
17502
|
-
minWidth: "0",
|
|
17503
|
-
maxWidth: "100%",
|
|
17504
|
-
boxSizing: "border-box",
|
|
17505
|
-
fontSize: "var(--dsh-content-font-size-secondary, 13px)",
|
|
17506
|
-
lineHeight: "calc(20px + var(--dsh-content-font-delta-secondary, 0px))"
|
|
17507
|
-
},
|
|
17508
|
-
anchor: {
|
|
17509
|
-
display: "inline-flex",
|
|
17510
|
-
minWidth: "0"
|
|
17511
|
-
},
|
|
17512
|
-
pill: {
|
|
17513
|
-
cursor: "pointer",
|
|
17514
|
-
"&:hover, &[aria-expanded='true']": {
|
|
17515
|
-
background: "var(--dsw-alias-interactive-bg-hover)",
|
|
17516
|
-
color: "var(--dsw-alias-label-secondary)"
|
|
17517
|
-
},
|
|
17518
|
-
display: "inline-flex",
|
|
17519
|
-
alignItems: "center",
|
|
17520
|
-
gap: "6px",
|
|
17521
|
-
boxSizing: "border-box",
|
|
17522
|
-
maxWidth: "100%",
|
|
17523
|
-
padding: "1px 8px",
|
|
17524
|
-
border: "none",
|
|
17525
|
-
borderRadius: "24px",
|
|
17526
|
-
background: "transparent",
|
|
17527
|
-
color: "var(--dsw-alias-label-tertiary)",
|
|
17528
|
-
font: "inherit",
|
|
17529
|
-
fontVariantNumeric: "tabular-nums",
|
|
17530
|
-
lineHeight: "inherit",
|
|
17531
|
-
whiteSpace: "nowrap",
|
|
17532
|
-
"& svg": {
|
|
17533
|
-
width: "14px",
|
|
17534
|
-
height: "14px",
|
|
17535
|
-
flex: "none"
|
|
17536
|
-
}
|
|
17537
|
-
},
|
|
17538
|
-
label: {
|
|
17539
|
-
minWidth: "0",
|
|
17540
|
-
overflow: "hidden",
|
|
17541
|
-
textOverflow: "ellipsis"
|
|
17542
|
-
},
|
|
17543
|
-
sep: {
|
|
17544
|
-
color: "var(--dsw-alias-separator-primary)",
|
|
17545
|
-
margin: "0 6px"
|
|
17546
|
-
}
|
|
17547
|
-
};
|
|
17548
|
-
//#endregion
|
|
17549
|
-
//#region src/client/composer-stats/stat-dialog.styles.ts
|
|
17550
|
-
const styles = {
|
|
17551
|
-
panel: {
|
|
17552
|
-
position: "fixed",
|
|
17553
|
-
zIndex: "1100",
|
|
17554
|
-
boxSizing: "border-box",
|
|
17555
|
-
width: "max-content",
|
|
17556
|
-
minWidth: "min(300px, calc(100vw - 24px))",
|
|
17557
|
-
maxWidth: "min(440px, calc(100vw - 24px))",
|
|
17558
|
-
padding: "16px",
|
|
17559
|
-
border: "0",
|
|
17560
|
-
borderRadius: "12px",
|
|
17561
|
-
background: "var(--dsw-specific-menu)",
|
|
17562
|
-
"--dsw-elevation-stroke-color": "var(--dsw-alias-border-l1)",
|
|
17563
|
-
boxShadow: "var(--dsw-elevation-prominent)",
|
|
17564
|
-
fontSize: "12px",
|
|
17565
|
-
lineHeight: "18px",
|
|
17566
|
-
color: "var(--dsw-alias-label-secondary)",
|
|
17567
|
-
cursor: "default"
|
|
17568
|
-
},
|
|
17569
|
-
title: {
|
|
17570
|
-
display: "flex",
|
|
17571
|
-
justifyContent: "space-between",
|
|
17572
|
-
gap: "16px",
|
|
17573
|
-
marginBottom: "8px",
|
|
17574
|
-
color: "var(--dsw-alias-label-primary)",
|
|
17575
|
-
fontWeight: "500"
|
|
17576
|
-
},
|
|
17577
|
-
titleRule: {
|
|
17578
|
-
marginBottom: "10px",
|
|
17579
|
-
borderTop: "0.5px solid var(--dsw-alias-border-l2)"
|
|
17580
|
-
},
|
|
17581
|
-
titleValue: { fontVariantNumeric: "tabular-nums" },
|
|
17582
|
-
titleLabel: {
|
|
17583
|
-
display: "inline-flex",
|
|
17584
|
-
alignItems: "center",
|
|
17585
|
-
gap: "6px",
|
|
17586
|
-
minWidth: "0",
|
|
17587
|
-
"& svg": {
|
|
17588
|
-
width: "14px",
|
|
17589
|
-
height: "14px",
|
|
17590
|
-
flex: "none"
|
|
17591
|
-
}
|
|
17592
|
-
},
|
|
17593
|
-
details: {
|
|
17594
|
-
display: "grid",
|
|
17595
|
-
gridTemplateColumns: "minmax(76px, auto) minmax(0, 1fr)",
|
|
17596
|
-
gap: "6px 16px",
|
|
17597
|
-
margin: "0",
|
|
17598
|
-
color: "var(--dsw-alias-label-tertiary)",
|
|
17599
|
-
"& dt": {
|
|
17600
|
-
minWidth: "0",
|
|
17601
|
-
margin: "0"
|
|
17602
|
-
},
|
|
17603
|
-
"& dd": {
|
|
17604
|
-
minWidth: "0",
|
|
17605
|
-
margin: "0",
|
|
17606
|
-
color: "var(--dsw-alias-label-secondary)",
|
|
17607
|
-
fontVariantNumeric: "tabular-nums",
|
|
17608
|
-
textAlign: "right"
|
|
17609
|
-
}
|
|
17610
|
-
},
|
|
17611
|
-
reasoning: {
|
|
17612
|
-
color: "var(--dsw-alias-label-tertiary)",
|
|
17613
|
-
whiteSpace: "nowrap"
|
|
17614
|
-
}
|
|
17615
|
-
};
|
|
17616
|
-
//#endregion
|
|
17617
|
-
//#region src/client/composer-stats/StatsPills.tsx
|
|
17618
|
-
function deriveStats(nodes) {
|
|
17619
|
-
const turns = /* @__PURE__ */ new Set();
|
|
17620
|
-
let steps = 0;
|
|
17621
|
-
let llmMs = 0;
|
|
17622
|
-
let toolMs = 0;
|
|
17623
|
-
let ttftMs = 0;
|
|
17624
|
-
let ttftSteps = 0;
|
|
17625
|
-
let decodeMs = 0;
|
|
17626
|
-
let decodeTokens = 0;
|
|
17627
|
-
for (const node of nodes) {
|
|
17628
|
-
if (node.kind === "tool-result") {
|
|
17629
|
-
if (node.callTime !== null) toolMs += Math.max(0, node.time - node.callTime);
|
|
17630
|
-
continue;
|
|
17631
|
-
}
|
|
17632
|
-
if (node.kind !== "assistant") continue;
|
|
17633
|
-
turns.add(node.turn);
|
|
17634
|
-
steps += 1;
|
|
17635
|
-
if (node.timing !== void 0 && node.timing.stepStartTime !== null) llmMs += Math.max(0, node.timing.completedTime - node.timing.stepStartTime);
|
|
17636
|
-
const reading = assistantStepReading(node);
|
|
17637
|
-
if (reading.ttftMs !== null) {
|
|
17638
|
-
ttftMs += reading.ttftMs;
|
|
17639
|
-
ttftSteps += 1;
|
|
17640
|
-
}
|
|
17641
|
-
if (reading.decodeMs !== null && reading.outputTokens !== null) {
|
|
17642
|
-
decodeMs += reading.decodeMs;
|
|
17643
|
-
decodeTokens += reading.outputTokens;
|
|
17644
|
-
}
|
|
17645
|
-
}
|
|
17646
|
-
return {
|
|
17647
|
-
turns: turns.size,
|
|
17648
|
-
steps,
|
|
17649
|
-
llmMs,
|
|
17650
|
-
toolMs,
|
|
17651
|
-
ttftMs,
|
|
17652
|
-
ttftSteps,
|
|
17653
|
-
decodeMs,
|
|
17654
|
-
decodeTokens
|
|
17655
|
-
};
|
|
17656
|
-
}
|
|
17657
|
-
function formatDuration(ms, t) {
|
|
17658
|
-
const s = ms / 1e3;
|
|
17659
|
-
if (s < 60) return t("duration.compactSeconds", { seconds: Math.round(s * 10) / 10 });
|
|
17660
|
-
const whole = Math.round(s);
|
|
17661
|
-
return t("duration.compactMinutes", {
|
|
17662
|
-
minutes: Math.floor(whole / 60),
|
|
17663
|
-
seconds: whole % 60
|
|
17664
|
-
});
|
|
17665
|
-
}
|
|
17666
|
-
function cacheHitPercent(usage) {
|
|
17667
|
-
const denominator = billedInputTokens(usage);
|
|
17668
|
-
return formatCacheHitPercent(usage.cacheReadTokens, denominator);
|
|
17669
|
-
}
|
|
17670
|
-
function billedInputTokens(usage) {
|
|
17671
|
-
return usage.uncachedInputTokens + usage.cacheReadTokens + usage.cacheWriteTokens;
|
|
17672
|
-
}
|
|
17673
|
-
function exactCount(value, t) {
|
|
17674
|
-
return t("message.turnUsage.count", { count: formatExactTokens(value, t) });
|
|
17675
|
-
}
|
|
17676
|
-
function TimePill({ stats, t, dialog }) {
|
|
17677
|
-
const { open, setOpen, rootRef, panelRef, pos } = useStatDialog(dialog);
|
|
17678
|
-
const counts = t("stats.counts", {
|
|
17679
|
-
turns: stats.turns,
|
|
17680
|
-
steps: stats.steps
|
|
17681
|
-
});
|
|
17682
|
-
const tps = stats.decodeMs > 0 ? t("message.tokensPerSecond", { tps: formatTokensPerSecond(stats.decodeTokens / (stats.decodeMs / 1e3)) }) : null;
|
|
17683
|
-
const label = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
17684
|
-
...styling.props(styles$1.label),
|
|
17685
|
-
children: [counts, tps !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
17686
|
-
...styling.props(styles$1.sep),
|
|
17687
|
-
"aria-hidden": true,
|
|
17688
|
-
children: "·"
|
|
17689
|
-
}), tps] })]
|
|
17690
|
-
});
|
|
17691
|
-
if (stats.llmMs <= 0 && stats.toolMs <= 0 && stats.ttftSteps <= 0 && stats.decodeMs <= 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
17692
|
-
...styling.props(styles$1.anchor),
|
|
17693
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
17694
|
-
...styling.props(styles$1.pill),
|
|
17695
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconGaugeOutlineRegular, {}), label]
|
|
17696
|
-
})
|
|
17697
|
-
});
|
|
17698
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
17699
|
-
ref: rootRef,
|
|
17700
|
-
...styling.props(styles$1.anchor),
|
|
17701
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
17702
|
-
type: "button",
|
|
17703
|
-
...styling.props(styles$1.pill),
|
|
17704
|
-
"aria-haspopup": "dialog",
|
|
17705
|
-
"aria-expanded": open,
|
|
17706
|
-
"aria-label": tps === null ? counts : `${counts} · ${tps}`,
|
|
17707
|
-
onClick: () => {
|
|
17708
|
-
setOpen(!open);
|
|
17709
|
-
},
|
|
17710
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconGaugeOutlineRegular, {}), label]
|
|
17711
|
-
}), open && (0, react_dom.createPortal)(/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
17712
|
-
ref: panelRef,
|
|
17713
|
-
...styling.props(styles.panel),
|
|
17714
|
-
role: "dialog",
|
|
17715
|
-
"aria-label": t("stats.dialog.title"),
|
|
17716
|
-
style: pos ?? MEASURE_STYLE,
|
|
17717
|
-
children: [
|
|
17718
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
17719
|
-
...styling.props(styles.title),
|
|
17720
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
17721
|
-
...styling.props(styles.titleLabel),
|
|
17722
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconGaugeOutlineRegular, {}), t("stats.dialog.title")]
|
|
17723
|
-
})
|
|
17724
|
-
}),
|
|
17725
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
17726
|
-
...styling.props(styles.titleRule),
|
|
17727
|
-
"aria-hidden": true
|
|
17728
|
-
}),
|
|
17729
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("dl", {
|
|
17730
|
-
...styling.props(styles.details),
|
|
17731
|
-
"data-session-stats-details": true,
|
|
17732
|
-
children: [
|
|
17733
|
-
stats.llmMs > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("dt", { children: t("stats.dialog.llmTime") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("dd", { children: formatDuration(stats.llmMs, t) })] }),
|
|
17734
|
-
stats.toolMs > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("dt", { children: t("stats.dialog.toolTime") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("dd", { children: formatDuration(stats.toolMs, t) })] }),
|
|
17735
|
-
stats.ttftSteps > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("dt", { children: t("stats.dialog.ttft") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("dd", { children: formatDuration(stats.ttftMs / stats.ttftSteps, t) })] }),
|
|
17736
|
-
stats.decodeMs > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("dt", { children: t("stats.dialog.speed") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("dd", { children: t("message.tokensPerSecond", { tps: formatTokensPerSecond(stats.decodeTokens / (stats.decodeMs / 1e3)) }) })] })
|
|
17737
|
-
]
|
|
17738
|
-
})
|
|
17739
|
-
]
|
|
17740
|
-
}), document.body)]
|
|
17741
|
-
});
|
|
17742
|
-
}
|
|
17743
|
-
function UsagePill({ usage, t, dialog }) {
|
|
17744
|
-
const { open, setOpen, rootRef, panelRef, pos } = useStatDialog(dialog);
|
|
17745
|
-
const total = billedInputTokens(usage) + usage.outputTokens;
|
|
17746
|
-
const totalText = t("message.turnUsage.count", { count: formatTokens(total, t) });
|
|
17747
|
-
const cacheHit = cacheHitPercent(usage);
|
|
17748
|
-
const cacheHitText = cacheHit !== null ? t("stats.cacheHit", { percent: cacheHit }) : null;
|
|
17749
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
17750
|
-
ref: rootRef,
|
|
17751
|
-
...styling.props(styles$1.anchor),
|
|
17752
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
17753
|
-
type: "button",
|
|
17754
|
-
...styling.props(styles$1.pill),
|
|
17755
|
-
"aria-haspopup": "dialog",
|
|
17756
|
-
"aria-expanded": open,
|
|
17757
|
-
"aria-label": cacheHitText === null ? totalText : `${totalText} · ${cacheHitText}`,
|
|
17758
|
-
onClick: () => {
|
|
17759
|
-
setOpen(!open);
|
|
17760
|
-
},
|
|
17761
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconDatabaseOutlineRegular, {}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
17762
|
-
...styling.props(styles$1.label),
|
|
17763
|
-
children: [totalText, cacheHitText !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
17764
|
-
...styling.props(styles$1.sep),
|
|
17765
|
-
"aria-hidden": true,
|
|
17766
|
-
children: "·"
|
|
17767
|
-
}), cacheHitText] })]
|
|
17768
|
-
})]
|
|
17769
|
-
}), open && (0, react_dom.createPortal)(/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
17770
|
-
ref: panelRef,
|
|
17771
|
-
...styling.props(styles.panel),
|
|
17772
|
-
role: "dialog",
|
|
17773
|
-
"aria-label": t("stats.dialog.usageTitle"),
|
|
17774
|
-
style: pos ?? MEASURE_STYLE,
|
|
17775
|
-
children: [
|
|
17776
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
17777
|
-
...styling.props(styles.title),
|
|
17778
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
17779
|
-
...styling.props(styles.titleLabel),
|
|
17780
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconDatabaseOutlineRegular, {}), t("stats.dialog.usageTitle")]
|
|
17781
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
17782
|
-
...styling.props(styles.titleValue),
|
|
17783
|
-
children: exactCount(total, t)
|
|
17784
|
-
})]
|
|
17785
|
-
}),
|
|
17786
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
17787
|
-
...styling.props(styles.titleRule),
|
|
17788
|
-
"aria-hidden": true
|
|
17789
|
-
}),
|
|
17790
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("dl", {
|
|
17791
|
-
...styling.props(styles.details),
|
|
17792
|
-
"data-session-stats-usage": true,
|
|
17793
|
-
children: [
|
|
17794
|
-
cacheHit !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("dt", { children: t("message.turnUsage.cacheHit") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("dd", { children: `${cacheHit}%` })] }),
|
|
17795
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("dt", { children: t("message.turnUsage.input") }),
|
|
17796
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("dd", { children: exactCount(usage.uncachedInputTokens, t) }),
|
|
17797
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("dt", { children: t("message.turnUsage.cacheRead") }),
|
|
17798
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("dd", { children: exactCount(usage.cacheReadTokens, t) }),
|
|
17799
|
-
usage.cacheWriteTokens !== 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("dt", { children: t("message.turnUsage.cacheWrite") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("dd", { children: exactCount(usage.cacheWriteTokens, t) })] }),
|
|
17800
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("dt", { children: t("message.turnUsage.output") }),
|
|
17801
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("dd", { children: exactCount(usage.outputTokens, t) })
|
|
17802
|
-
]
|
|
17803
|
-
})
|
|
17804
|
-
]
|
|
17805
|
-
}), document.body)]
|
|
17806
|
-
});
|
|
17807
|
-
}
|
|
17808
|
-
const StatsPills = (0, react.memo)(function StatsPills({ useChat, useProjection, t }) {
|
|
17809
|
-
const settledNodes = useChat((s) => s.legacy.nodes);
|
|
17810
|
-
const usage = useProjection("tokenUsage");
|
|
17811
|
-
const [openPill, setOpenPill] = (0, react.useState)(null);
|
|
17812
|
-
const projected = useProjection("sessionStats");
|
|
17813
|
-
const stats = (0, react.useMemo)(() => projected ?? deriveStats(settledNodes), [projected, settledNodes]);
|
|
17814
|
-
const hasTokens = usage !== void 0 && (billedInputTokens(usage) > 0 || usage.outputTokens > 0);
|
|
17815
|
-
if (stats.steps === 0 && !hasTokens) return null;
|
|
17816
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
17817
|
-
...styling.props(styles$1.root),
|
|
17818
|
-
"data-composer-stats": true,
|
|
17819
|
-
children: [stats.steps > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TimePill, {
|
|
17820
|
-
stats,
|
|
17821
|
-
t,
|
|
17822
|
-
dialog: {
|
|
17823
|
-
open: openPill === "time",
|
|
17824
|
-
setOpen: (open) => {
|
|
17825
|
-
setOpenPill(open ? "time" : null);
|
|
17826
|
-
}
|
|
17827
|
-
}
|
|
17828
|
-
}), hasTokens && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(UsagePill, {
|
|
17829
|
-
usage,
|
|
17830
|
-
t,
|
|
17831
|
-
dialog: {
|
|
17832
|
-
open: openPill === "usage",
|
|
17833
|
-
setOpen: (open) => {
|
|
17834
|
-
setOpenPill(open ? "usage" : null);
|
|
17835
|
-
}
|
|
17836
|
-
}
|
|
17837
|
-
})]
|
|
17838
|
-
});
|
|
17839
|
-
});
|
|
17840
|
-
//#endregion
|
|
17841
|
-
//#region src/client/composer-stats/register.ts
|
|
17842
|
-
const NS = "chat";
|
|
17843
|
-
function registerComposerStats(slots) {
|
|
17844
|
-
return slots.register({
|
|
17845
|
-
name: "conversation.composer.dock",
|
|
17846
|
-
id: "stats",
|
|
17847
|
-
order: 0,
|
|
17848
|
-
priority: -1,
|
|
17849
|
-
locale: NS
|
|
17850
|
-
}, StatsPills);
|
|
17851
|
-
}
|
|
17852
|
-
//#endregion
|
|
17853
16734
|
//#region src/client/index.ts
|
|
17854
16735
|
const inject = [
|
|
17855
16736
|
"slots",
|
|
@@ -17860,7 +16741,6 @@ window.__ModuleLoader__.load({
|
|
|
17860
16741
|
];
|
|
17861
16742
|
function apply(ctx) {
|
|
17862
16743
|
apply$1(ctx);
|
|
17863
|
-
styling.injectGlobals(globals);
|
|
17864
16744
|
const controllers = /* @__PURE__ */ new Map();
|
|
17865
16745
|
const controllerFor = (sessionId) => {
|
|
17866
16746
|
let controller = controllers.get(sessionId);
|
|
@@ -17871,7 +16751,6 @@ window.__ModuleLoader__.load({
|
|
|
17871
16751
|
return controller;
|
|
17872
16752
|
};
|
|
17873
16753
|
registerChatNodeRenderers(ctx, controllerFor);
|
|
17874
|
-
ctx.slots.inject("conversation.composer.dock", () => registerComposerStats(ctx.slots));
|
|
17875
16754
|
}
|
|
17876
16755
|
//#endregion
|
|
17877
16756
|
exports.apply = apply;
|