@dsh-workbench/module-hello 0.1.2 → 0.1.3
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/client.js +25 -4
- package/package.json +3 -3
package/client.js
CHANGED
|
@@ -32,6 +32,22 @@ window.__ModuleLoader__.load({
|
|
|
32
32
|
module.exports = __toCommonJS(client_exports);
|
|
33
33
|
var import_react = require("react");
|
|
34
34
|
var import_client = require("@dsh-workbench/core/client");
|
|
35
|
+
|
|
36
|
+
// src/messages.ts
|
|
37
|
+
var helloMessages = {
|
|
38
|
+
zh: {
|
|
39
|
+
"hello.cardTitle": "\u793A\u4F8B\u6A21\u5757",
|
|
40
|
+
"hello.heading": "hello, workbench",
|
|
41
|
+
"hello.body": "\u8FD9\u4E2A\u5361\u7247\u6765\u81EA\u4E00\u4E2A\u72EC\u7ACB\u7684 dsh \u63D2\u4EF6\u5305\uFF08S1b \u539F\u578B\uFF09\u3002"
|
|
42
|
+
},
|
|
43
|
+
en: {
|
|
44
|
+
"hello.cardTitle": "Sample module",
|
|
45
|
+
"hello.heading": "hello, workbench",
|
|
46
|
+
"hello.body": "This card comes from a standalone dsh plugin package (the S1b prototype)."
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
// src/client.tsx
|
|
35
51
|
var UNIT_ID = "hello";
|
|
36
52
|
var manifest = {
|
|
37
53
|
id: UNIT_ID,
|
|
@@ -42,11 +58,16 @@ window.__ModuleLoader__.load({
|
|
|
42
58
|
};
|
|
43
59
|
var helloClient = {
|
|
44
60
|
manifest,
|
|
45
|
-
|
|
61
|
+
messages: helloMessages,
|
|
62
|
+
card: (props) => (0, import_react.createElement)(
|
|
46
63
|
"section",
|
|
47
|
-
{ className: "wb-
|
|
48
|
-
(0, import_react.createElement)(
|
|
49
|
-
|
|
64
|
+
{ className: "wb-view" },
|
|
65
|
+
(0, import_react.createElement)(
|
|
66
|
+
"h2",
|
|
67
|
+
(0, import_react.createElement)(import_client.kit.components.IconBrandMark, { size: 16 }),
|
|
68
|
+
` ${props.t("hello.heading")}`
|
|
69
|
+
),
|
|
70
|
+
(0, import_react.createElement)("p", props.t("hello.body"))
|
|
50
71
|
)
|
|
51
72
|
};
|
|
52
73
|
var inject = ["workbenchUnits"];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dsh-workbench/module-hello",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "最小模块包(S1b 原型):只认外壳的 workbenchUnits 服务,不认识外壳源码。用来证明「装 → 挂载 → 卸 → 消失」这条链路。",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -50,8 +50,8 @@
|
|
|
50
50
|
"react": "^19.3.0",
|
|
51
51
|
"typescript": "5.9",
|
|
52
52
|
"vitest": "^5.0.2",
|
|
53
|
-
"@dsh-workbench/
|
|
54
|
-
"@dsh-workbench/
|
|
53
|
+
"@dsh-workbench/core": "0.1.3",
|
|
54
|
+
"@dsh-workbench/module-tools": "0.1.3"
|
|
55
55
|
},
|
|
56
56
|
"publishConfig": {
|
|
57
57
|
"access": "public"
|