@hy-bricks/canvas 0.4.2 → 0.4.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.
Files changed (2) hide show
  1. package/CHANGELOG.md +18 -11
  2. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @hy-bricks/canvas
2
2
 
3
+ ## 0.4.3
4
+
5
+ ### Patch Changes
6
+
7
+ - @hy-bricks/core@0.4.3
8
+
3
9
  ## [0.4.2] - 2026-05-28 · devtools 强化(配套升级)
4
10
 
5
11
  跟 `@hy-bricks/devtools` 0.4.2 同步。canvas 本次给 runtime renderer 加诊断 handle 自动注册,
@@ -20,7 +26,7 @@
20
26
  - `registerRendererDiagnostics` / `unregisterRendererDiagnostics` /
21
27
  `getRendererDiagnostics` / `subscribeRendererDiagnostics`
22
28
  - `RendererDiagnosticsHandle` 接口:`getSchedulerStats / listRuntimeInstances /
23
- getInstanceTimings / getLayoutIssues`
29
+ getInstanceTimings / getLayoutIssues`
24
30
 
25
31
  详见 [根 CHANGELOG.md](../../CHANGELOG.md) §0.4.2。
26
32
 
@@ -49,29 +55,29 @@ pnpm up @hy-bricks/canvas@0.4.2
49
55
 
50
56
  每个组件实例可读 3 个 SDK 注入 prop:
51
57
 
52
- | Prop | 含义 |
53
- |---|---|
54
- | `this.hcInstanceId` | 实例 ID |
55
- | `this.hcCanvasId` | 所属画布 ID |
56
- | `this.hcComponentId` | 组件源 ID |
58
+ | Prop | 含义 |
59
+ | -------------------- | ----------- |
60
+ | `this.hcInstanceId` | 实例 ID |
61
+ | `this.hcCanvasId` | 所属画布 ID |
62
+ | `this.hcComponentId` | 组件源 ID |
57
63
 
58
64
  ```js
59
65
  // 组件源码 component.js
60
66
  export default {
61
67
  mounted() {
62
- console.log('我是谁', this.hcInstanceId, this.hcCanvasId)
68
+ console.log("我是谁", this.hcInstanceId, this.hcCanvasId);
63
69
 
64
70
  // ✅ 立即订阅,不再要等
65
- __HYPERCARD__.runtime.on(this.hcInstanceId, 'click', (payload) => {
71
+ __HYPERCARD__.runtime.on(this.hcInstanceId, "click", (payload) => {
66
72
  // ...
67
- })
73
+ });
68
74
 
69
75
  // ✅ 立即拿到 handle
70
76
  const handle = __HYPERCARD__.canvases
71
77
  .get(this.hcCanvasId)
72
- ?.getInstance(this.hcInstanceId)
78
+ ?.getInstance(this.hcInstanceId);
73
79
  },
74
- }
80
+ };
75
81
  ```
76
82
 
77
83
  ### ⚠ BREAKING — host 升级前 audit
@@ -101,6 +107,7 @@ grep -rn "instance:ready\|onInstanceLifecycle\|getInstanceReady" src/
101
107
  ```
102
108
 
103
109
  每处看回调内是否访问 `vm.$el` / DOM。
110
+
104
111
  - 没访问 → `npm install @hy-bricks/{core,canvas,editor,devtools}@^0.4.0` 透明升
105
112
  - 访问了 → 改 `nextTick`
106
113
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hy-bricks/canvas",
3
- "version": "0.4.2",
3
+ "version": "0.4.3",
4
4
  "description": "HyperCard 画布 — 多组件实例编排 / 自由布局 / 拖拽 / 连线 / 属性面板。受控组件,SDK 边界守住:不 fetch / 不知后端 / 不开 Drawer。",
5
5
  "keywords": [
6
6
  "hypercard",
@@ -34,7 +34,7 @@
34
34
  },
35
35
  "peerDependencies": {
36
36
  "vue": "^3.5.0",
37
- "@hy-bricks/core": "^0.4.2"
37
+ "@hy-bricks/core": "^0.4.3"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@vitejs/plugin-vue": "^5.2.1",