@iyulab/editor-components 0.2.2 → 0.3.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 CHANGED
@@ -1,5 +1,18 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.3.0] - 2026-08-05
4
+
5
+ ### Fixed
6
+
7
+ - 🔴**The `change` event never crossed the shadow boundary.** It was dispatched without
8
+ `bubbles` or `composed`, so a listener attached by the consumer was never called — with
9
+ no error to indicate why. Anyone who worked around this by reaching into the shadow root
10
+ can now drop that workaround.
11
+
12
+ ```ts
13
+ editor.addEventListener('change', e => save(e.detail.value));
14
+ ```
15
+
3
16
  ## [0.2.2] - 2026-08-02
4
17
 
5
18
  ### Fixed
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2025 Iyulab, Inc.
3
+ Copyright (c) 2025 iyulab
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -80,11 +80,15 @@ var UTextEditor = class UTextEditor extends UElement {
80
80
  if (source !== "user") return;
81
81
  const html = quill.root.innerHTML;
82
82
  this.value = html;
83
- this.dispatchEvent(new CustomEvent("change", { detail: {
84
- html,
85
- text: quill.getText(),
86
- delta: quill.getContents()
87
- } }));
83
+ this.dispatchEvent(new CustomEvent("change", {
84
+ detail: {
85
+ html,
86
+ text: quill.getText(),
87
+ delta: quill.getContents()
88
+ },
89
+ bubbles: true,
90
+ composed: true
91
+ }));
88
92
  });
89
93
  this.updateEditorHeight();
90
94
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@iyulab/editor-components",
3
3
  "description": "various editor components by iyulab",
4
- "version": "0.2.2",
4
+ "version": "0.3.0",
5
5
  "keywords": [
6
6
  "iyulab",
7
7
  "web-components",
@@ -25,6 +25,13 @@
25
25
  ],
26
26
  "type": "module",
27
27
  "types": "./dist/index.d.ts",
28
+ "engines": {
29
+ "node": ">=20"
30
+ },
31
+ "sideEffects": [
32
+ "./src/components/*/U*.ts",
33
+ "./dist/components/*/U*.js"
34
+ ],
28
35
  "exports": {
29
36
  ".": {
30
37
  "types": "./dist/index.d.ts",
@@ -41,7 +48,8 @@
41
48
  "test:watch": "vitest",
42
49
  "lint": "eslint src/",
43
50
  "lint:fix": "eslint src/ --fix",
44
- "build": "eslint && vite build"
51
+ "build": "npm run typecheck && eslint && vite build",
52
+ "typecheck": "tsc --noEmit"
45
53
  },
46
54
  "dependencies": {
47
55
  "@iyulab/components": "^1.15.0",