@hy-bricks/editor 0.4.1 → 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 +34 -10
  2. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # @hy-bricks/editor
2
2
 
3
+ ## 0.4.3
4
+
5
+ ### Patch Changes
6
+
7
+ - @hy-bricks/core@0.4.3
8
+
9
+ ## [0.4.2] - 2026-05-28 · 跟随版本(无 editor 改动)
10
+
11
+ lock-step 版本号,本次 editor 包源代码无变更。
12
+ 从 0.4.0 / 0.4.1 升上来可跳过。
13
+
14
+ 详见 [根 CHANGELOG.md](../../CHANGELOG.md) §0.4.2。
15
+
16
+ ### 业务侧升级
17
+
18
+ ```bash
19
+ pnpm up @hy-bricks/editor@0.4.2
20
+ ```
21
+
22
+ 零代码改动。
23
+
24
+ ---
25
+
3
26
  ## [0.4.1] - 2026-05-27
4
27
 
5
28
  文档补完 — 0.4.0 的发版说明现在 npm 包页面可见。代码无变更。
@@ -15,29 +38,29 @@
15
38
 
16
39
  每个组件实例可读 3 个 SDK 注入 prop:
17
40
 
18
- | Prop | 含义 |
19
- |---|---|
20
- | `this.hcInstanceId` | 实例 ID |
21
- | `this.hcCanvasId` | 所属画布 ID |
22
- | `this.hcComponentId` | 组件源 ID |
41
+ | Prop | 含义 |
42
+ | -------------------- | ----------- |
43
+ | `this.hcInstanceId` | 实例 ID |
44
+ | `this.hcCanvasId` | 所属画布 ID |
45
+ | `this.hcComponentId` | 组件源 ID |
23
46
 
24
47
  ```js
25
48
  // 组件源码 component.js
26
49
  export default {
27
50
  mounted() {
28
- console.log('我是谁', this.hcInstanceId, this.hcCanvasId)
51
+ console.log("我是谁", this.hcInstanceId, this.hcCanvasId);
29
52
 
30
53
  // ✅ 立即订阅,不再要等
31
- __HYPERCARD__.runtime.on(this.hcInstanceId, 'click', (payload) => {
54
+ __HYPERCARD__.runtime.on(this.hcInstanceId, "click", (payload) => {
32
55
  // ...
33
- })
56
+ });
34
57
 
35
58
  // ✅ 立即拿到 handle
36
59
  const handle = __HYPERCARD__.canvases
37
60
  .get(this.hcCanvasId)
38
- ?.getInstance(this.hcInstanceId)
61
+ ?.getInstance(this.hcInstanceId);
39
62
  },
40
- }
63
+ };
41
64
  ```
42
65
 
43
66
  ### ⚠ BREAKING — host 升级前 audit
@@ -67,6 +90,7 @@ grep -rn "instance:ready\|onInstanceLifecycle\|getInstanceReady" src/
67
90
  ```
68
91
 
69
92
  每处看回调内是否访问 `vm.$el` / DOM。
93
+
70
94
  - 没访问 → `npm install @hy-bricks/{core,canvas,editor,devtools}@^0.4.0` 透明升
71
95
  - 访问了 → 改 `nextTick`
72
96
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hy-bricks/editor",
3
- "version": "0.4.1",
3
+ "version": "0.4.3",
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.4.1"
46
+ "@hy-bricks/core": "^0.4.3"
47
47
  },
48
48
  "peerDependenciesMeta": {
49
49
  "tailwindcss": {