@hy-bricks/editor 0.4.2 → 0.5.0
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/CHANGELOG.md +21 -10
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @hy-bricks/editor
|
|
2
2
|
|
|
3
|
+
## [0.5.0] - 2026-06-03
|
|
4
|
+
|
|
5
|
+
随 @hy-bricks fixed 组(canvas `free-split` 发版)同步升 0.5.0;`@hy-bricks/editor` **无功能改动**(其 `SplitNode` 是编辑器面板分屏,与 canvas free-split 无关)。
|
|
6
|
+
|
|
7
|
+
## 0.4.3
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- @hy-bricks/core@0.4.3
|
|
12
|
+
|
|
3
13
|
## [0.4.2] - 2026-05-28 · 跟随版本(无 editor 改动)
|
|
4
14
|
|
|
5
15
|
lock-step 版本号,本次 editor 包源代码无变更。
|
|
@@ -32,29 +42,29 @@ pnpm up @hy-bricks/editor@0.4.2
|
|
|
32
42
|
|
|
33
43
|
每个组件实例可读 3 个 SDK 注入 prop:
|
|
34
44
|
|
|
35
|
-
| Prop
|
|
36
|
-
|
|
37
|
-
| `this.hcInstanceId`
|
|
38
|
-
| `this.hcCanvasId`
|
|
39
|
-
| `this.hcComponentId` | 组件源 ID
|
|
45
|
+
| Prop | 含义 |
|
|
46
|
+
| -------------------- | ----------- |
|
|
47
|
+
| `this.hcInstanceId` | 实例 ID |
|
|
48
|
+
| `this.hcCanvasId` | 所属画布 ID |
|
|
49
|
+
| `this.hcComponentId` | 组件源 ID |
|
|
40
50
|
|
|
41
51
|
```js
|
|
42
52
|
// 组件源码 component.js
|
|
43
53
|
export default {
|
|
44
54
|
mounted() {
|
|
45
|
-
console.log(
|
|
55
|
+
console.log("我是谁", this.hcInstanceId, this.hcCanvasId);
|
|
46
56
|
|
|
47
57
|
// ✅ 立即订阅,不再要等
|
|
48
|
-
__HYPERCARD__.runtime.on(this.hcInstanceId,
|
|
58
|
+
__HYPERCARD__.runtime.on(this.hcInstanceId, "click", (payload) => {
|
|
49
59
|
// ...
|
|
50
|
-
})
|
|
60
|
+
});
|
|
51
61
|
|
|
52
62
|
// ✅ 立即拿到 handle
|
|
53
63
|
const handle = __HYPERCARD__.canvases
|
|
54
64
|
.get(this.hcCanvasId)
|
|
55
|
-
?.getInstance(this.hcInstanceId)
|
|
65
|
+
?.getInstance(this.hcInstanceId);
|
|
56
66
|
},
|
|
57
|
-
}
|
|
67
|
+
};
|
|
58
68
|
```
|
|
59
69
|
|
|
60
70
|
### ⚠ BREAKING — host 升级前 audit
|
|
@@ -84,6 +94,7 @@ grep -rn "instance:ready\|onInstanceLifecycle\|getInstanceReady" src/
|
|
|
84
94
|
```
|
|
85
95
|
|
|
86
96
|
每处看回调内是否访问 `vm.$el` / DOM。
|
|
97
|
+
|
|
87
98
|
- 没访问 → `npm install @hy-bricks/{core,canvas,editor,devtools}@^0.4.0` 透明升
|
|
88
99
|
- 访问了 → 改 `nextTick`
|
|
89
100
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hy-bricks/editor",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "HyperCard 嵌入式编辑器 — Monaco 三栏 + 拖 tab 分栏 + 实时预览 + shadcn-vue 风格 UI",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"hypercard",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"tailwindcss": "^3.4.0 || ^4.0.0",
|
|
44
44
|
"tailwindcss-animate": "^1.0.7",
|
|
45
45
|
"vue": "^3.5.0",
|
|
46
|
-
"@hy-bricks/core": "^0.
|
|
46
|
+
"@hy-bricks/core": "^0.5.0"
|
|
47
47
|
},
|
|
48
48
|
"peerDependenciesMeta": {
|
|
49
49
|
"tailwindcss": {
|