dsh-plugin-core-demo 0.2.4 → 0.2.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.js +35 -6
- package/package.json +1 -1
package/dist/client.js
CHANGED
|
@@ -27,6 +27,7 @@ __export(index_exports, {
|
|
|
27
27
|
});
|
|
28
28
|
module.exports = __toCommonJS(index_exports);
|
|
29
29
|
var import_react31 = require("react");
|
|
30
|
+
var import_dsh_client_ui_primitives2 = require("@deepseek-ai/dsh-client-ui-primitives");
|
|
30
31
|
|
|
31
32
|
// dist/design/tokens-css.js
|
|
32
33
|
var TOKENS_CSS_TEMPLATE = `
|
|
@@ -1708,17 +1709,44 @@ function SectionHead(props) {
|
|
|
1708
1709
|
}, (0, import_react14.createElement)("span", { style: { display: "inline-flex", alignItems: "center", flex: "none", color: "var(--dshpc-fg-3)" } }, props.icon), (0, import_react14.createElement)("span", { style: { fontSize: "var(--dshpc-font-lg)", lineHeight: "var(--dshpc-line-lg)", fontWeight: 600, color: "var(--dshpc-fg)", flex: "none" } }, props.title), props.right === void 0 ? null : (0, import_react14.createElement)("div", { style: { marginLeft: "auto", display: "flex", alignItems: "center", gap: "var(--dshpc-space-2)", minWidth: 0 } }, props.right));
|
|
1709
1710
|
}
|
|
1710
1711
|
|
|
1712
|
+
// dist/ui/tooltip.js
|
|
1713
|
+
var renderer;
|
|
1714
|
+
function setTooltipRenderer(fn) {
|
|
1715
|
+
renderer = fn;
|
|
1716
|
+
}
|
|
1717
|
+
function getTooltipRenderer() {
|
|
1718
|
+
return renderer;
|
|
1719
|
+
}
|
|
1720
|
+
|
|
1711
1721
|
// dist/ui/FieldHint.js
|
|
1712
1722
|
var import_react15 = require("react");
|
|
1713
1723
|
function FieldHint(props) {
|
|
1714
1724
|
ensureControls();
|
|
1725
|
+
const { text, side, align, maxWidth, className, style } = props;
|
|
1726
|
+
const anchor = (0, import_react15.createElement)("span", {
|
|
1727
|
+
className: `dshpc-hint${className !== void 0 && className !== "" ? ` ${className}` : ""}`,
|
|
1728
|
+
style,
|
|
1729
|
+
tabIndex: 0,
|
|
1730
|
+
role: "note",
|
|
1731
|
+
"aria-label": text
|
|
1732
|
+
}, "?");
|
|
1733
|
+
const renderer2 = getTooltipRenderer();
|
|
1734
|
+
if (renderer2 !== void 0) {
|
|
1735
|
+
return renderer2({
|
|
1736
|
+
label: text,
|
|
1737
|
+
side: side ?? "top",
|
|
1738
|
+
...align !== void 0 ? { align } : {},
|
|
1739
|
+
...maxWidth !== void 0 ? { maxWidth } : {},
|
|
1740
|
+
children: anchor
|
|
1741
|
+
});
|
|
1742
|
+
}
|
|
1715
1743
|
return (0, import_react15.createElement)("span", {
|
|
1716
|
-
className: `dshpc-hint${
|
|
1717
|
-
style
|
|
1744
|
+
className: `dshpc-hint${className !== void 0 && className !== "" ? ` ${className}` : ""}`,
|
|
1745
|
+
style,
|
|
1718
1746
|
tabIndex: 0,
|
|
1719
1747
|
role: "note",
|
|
1720
|
-
"aria-label":
|
|
1721
|
-
}, "?", (0, import_react15.createElement)("span", { className: "dshpc-hint__bubble", role: "tooltip" },
|
|
1748
|
+
"aria-label": text
|
|
1749
|
+
}, "?", (0, import_react15.createElement)("span", { className: "dshpc-hint__bubble", role: "tooltip" }, text));
|
|
1722
1750
|
}
|
|
1723
1751
|
|
|
1724
1752
|
// dist/ui/LiveText.js
|
|
@@ -3531,8 +3559,8 @@ function DemoPage() {
|
|
|
3531
3559
|
fontFamily: "var(--dshpc-font-mono)"
|
|
3532
3560
|
}
|
|
3533
3561
|
},
|
|
3534
|
-
(0, import_react31.createElement)("div", null, `core v${"0.2.
|
|
3535
|
-
(0, import_react31.createElement)("div", null, `demo v${"0.2.
|
|
3562
|
+
(0, import_react31.createElement)("div", null, `core v${"0.2.5"}`),
|
|
3563
|
+
(0, import_react31.createElement)("div", null, `demo v${"0.2.5"}`),
|
|
3536
3564
|
(0, import_react31.createElement)(
|
|
3537
3565
|
"div",
|
|
3538
3566
|
{ title: "body[data-ds-dark-theme]" },
|
|
@@ -3591,6 +3619,7 @@ function apply(ctx) {
|
|
|
3591
3619
|
setStyleKit(kit);
|
|
3592
3620
|
ensureControls(kit);
|
|
3593
3621
|
kit.ensureStyles();
|
|
3622
|
+
setTooltipRenderer((props) => (0, import_react31.createElement)(import_dsh_client_ui_primitives2.Tooltip, props));
|
|
3594
3623
|
let jump = () => {
|
|
3595
3624
|
};
|
|
3596
3625
|
ctx.inject(["layout"], (sub) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-plugin-core-demo",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.5",
|
|
4
4
|
"description": "dsh-plugin-core 的组件预览插件:装进 DSH 宿主后,在真实宿主环境里预览控件与业务组件",
|
|
5
5
|
"keywords": ["deepseek", "harness", "dsh", "dsh-plugin", "dsh-plugin-core"],
|
|
6
6
|
"homepage": "https://github.com/cq-guojia/dsh-plugin-core/tree/main/packages/demo",
|