@iyulab/editor-components 0.5.2 → 0.6.1

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,22 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.6.1] - 2026-10-05
4
+
5
+ ### Fixed
6
+
7
+ - **`@iyulab/editor-components/react` resolves.** The build has always emitted the React wrappers to
8
+ `dist/react/` and the README documents the subpath, but `exports` did not list it, so the import
9
+ failed with `ERR_PACKAGE_PATH_NOT_EXPORTED`. `./react` and `./react/*` are now exported, as in
10
+ the sibling packages.
11
+
12
+ ## [0.6.0] - 2026-10-05
13
+
14
+ ### Added
15
+
16
+ - **The text editor's toolbar follows `--u-target-size`** (the host's minimum target size from
17
+ `@iyulab/components`). When it is set, toolbar buttons, pickers, picker options, colour swatches and the
18
+ link tooltip's actions are at least that size; icons and text keep their size. Unset, nothing changes.
19
+
3
20
  ## [0.5.2] - 2026-09-30
4
21
 
5
22
  ### Changed
@@ -256,21 +273,6 @@
256
273
  - README를 실제 구현에 맞게 재작성 — 잘못된 태그명(`<code-editor>`/`<rich-text-editor>` → `u-code-editor`/`u-text-editor`), 잘못된 prop(`noHeader` → `headless`), 존재하지 않는 `copy` 이벤트·`demo.html` 서술 제거, change 의미론·`/react` 서브패스 문서화.
257
274
  - 위 수정은 `@iyulab/components` 1.7.0의 "change = 사용자 상호작용 전용" 규약 정합 작업의 일환.
258
275
 
259
- ## [Unreleased]
260
-
261
- ### Fixed
262
-
263
- - 🔴**`sideEffects` omitted this package's own entry barrel, so bundlers dropped every element
264
- registration.** The barrel that `exports["."]` resolves to exists solely to register the custom
265
- elements, but it was not in the `sideEffects` allowlist. A consumer writing
266
- `import '@iyulab/editor-components'` — the form this package's own documentation recommends — had the module
267
- elided entirely in a production build. The failure is silent: the build succeeds with no warning,
268
- the tags remain in the DOM, and an unregistered custom element renders nothing.
269
-
270
- Registration modules were already listed correctly. That was not enough: a dropped barrel means
271
- they are never reached.
272
-
273
- Both the source-resolved and published-artifact forms of every affected entry point are now
274
- declared, so workspace consumers and installed consumers get the same guarantee.
276
+ ## [0.0.1] - 2026-05-16
275
277
 
276
278
  - Initial library version release
@@ -1,4 +1,4 @@
1
- //#region \0@oxc-project+runtime@0.151.0/helpers/esm/decorate.js
1
+ //#region \0@oxc-project+runtime@0.152.0/helpers/esm/decorate.js
2
2
  function __decorate(decorators, target, key, desc) {
3
3
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
4
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -1,4 +1,4 @@
1
- //#region \0@oxc-project+runtime@0.151.0/helpers/esm/decorateMetadata.js
1
+ //#region \0@oxc-project+runtime@0.152.0/helpers/esm/decorateMetadata.js
2
2
  function __decorateMetadata(k, v) {
3
3
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
4
4
  }
@@ -1,8 +1,8 @@
1
1
  import "./UCodeEditor.worker.js";
2
2
  import _virtual_monaco_structure_css_default from "../../_virtual/_virtual_monaco-structure-css.js";
3
3
  import { styles } from "./UCodeEditor.styles.js";
4
- import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.151.0/helpers/esm/decorateMetadata.js";
5
- import __decorate from "../../_virtual/_@oxc-project_runtime@0.151.0/helpers/esm/decorate.js";
4
+ import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.152.0/helpers/esm/decorateMetadata.js";
5
+ import __decorate from "../../_virtual/_@oxc-project_runtime@0.152.0/helpers/esm/decorate.js";
6
6
  import { html, unsafeCSS } from "lit";
7
7
  import { customElement, property } from "lit/decorators.js";
8
8
  import { createRef, ref } from "lit/directives/ref.js";
@@ -1,5 +1,5 @@
1
- import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.151.0/helpers/esm/decorateMetadata.js";
2
- import __decorate from "../../_virtual/_@oxc-project_runtime@0.151.0/helpers/esm/decorate.js";
1
+ import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.152.0/helpers/esm/decorateMetadata.js";
2
+ import __decorate from "../../_virtual/_@oxc-project_runtime@0.152.0/helpers/esm/decorate.js";
3
3
  import { styles } from "./UTextEditor.styles.js";
4
4
  import { html, unsafeCSS } from "lit";
5
5
  import { customElement, property } from "lit/decorators.js";
@@ -128,18 +128,52 @@ var styles = css`
128
128
  WCAG 2.2 SC 2.5.8 은 «누가 그렸는가» 를 묻지 않는다.
129
129
  ⑴ 색 견본 16×16(붙어 있어 간격 예외도 서지 않는다) → 24×24 · 한 줄 일곱 칸이라 목록 폭도 함께(7×(24+4)+10).
130
130
  ⑵ 링크 툴팁의 Edit·Remove 는 줄 높이가 26 인데 인라인이라 실제 높이가 19 였다 → inline-block 으로 26. */
131
+ /* 호스트 하한(--u-target-size)이 있으면 견본이 그 값 — 목록 폭은 같은 식(일곱 칸)을 따른다. 미설정이면 24 · 206. */
131
132
  .ql-snow .ql-color-picker .ql-picker-item {
132
- width: 24px;
133
- height: 24px;
133
+ width: max(24px, var(--u-target-size, 0px));
134
+ height: max(24px, var(--u-target-size, 0px));
134
135
  }
135
136
  .ql-snow .ql-color-picker .ql-picker-options {
136
- width: 206px;
137
+ width: calc(7 * (max(24px, var(--u-target-size, 0px)) + 4px) + 10px);
137
138
  }
138
139
  .ql-snow .ql-tooltip a.ql-action,
139
140
  .ql-snow .ql-tooltip a.ql-remove {
140
141
  display: inline-block;
141
142
  }
142
143
 
144
+ /* 호스트 하한(--u-target-size) — 미설정이면 아래 식은 전부 Quill 의 기본값(24·28·3px·5px …)으로 떨어진다.
145
+ 아이콘·글자 크기는 그대로 두고 상자만 키운다: 버튼의 그림은 높이 100% 라 상자를 키우면 함께 커지므로
146
+ 늘어난 만큼을 여백으로 받는다(그림 18×18 고정). */
147
+ .ql-snow.ql-toolbar button,
148
+ .ql-snow .ql-toolbar button {
149
+ height: max(24px, var(--u-target-size, 0px));
150
+ width: max(28px, var(--u-target-size, 0px));
151
+ padding: max(3px, calc((var(--u-target-size, 0px) - 18px) / 2)) max(5px, calc((var(--u-target-size, 0px) - 18px) / 2));
152
+ }
153
+ .ql-snow .ql-picker {
154
+ height: max(24px, var(--u-target-size, 0px));
155
+ }
156
+ .ql-snow .ql-picker-label::before {
157
+ line-height: calc(max(24px, var(--u-target-size, 0px)) - 2px);
158
+ }
159
+ .ql-snow .ql-color-picker,
160
+ .ql-snow .ql-icon-picker {
161
+ width: max(28px, var(--u-target-size, 0px));
162
+ }
163
+ /* 글자 항목은 한 줄(1lh)을 뺀 나머지를 위아래 여백으로 — 미설정이면 Quill 의 5px. (flex 로 가운데 맞추면 항목 자신의
164
+ 줄 높이가 빠져 작은 글자 항목이 24px 아래로 내려간다 — 기본 게이트가 잡았다.) */
165
+ .ql-snow .ql-picker:not(.ql-color-picker):not(.ql-icon-picker) .ql-picker-item {
166
+ padding-block: max(5px, calc((var(--u-target-size, 0px) - 1lh) / 2));
167
+ }
168
+ .ql-snow .ql-icon-picker .ql-picker-item {
169
+ width: max(24px, var(--u-target-size, 0px));
170
+ height: max(24px, var(--u-target-size, 0px));
171
+ padding: max(2px, calc((var(--u-target-size, 0px) - 20px) / 2)) max(4px, calc((var(--u-target-size, 0px) - 16px) / 2));
172
+ }
173
+ .ql-snow .ql-tooltip a {
174
+ line-height: max(26px, var(--u-target-size, 0px));
175
+ }
176
+
143
177
  .ql-toolbar .ql-stroke {
144
178
  stroke: var(--u-txt-color-weak, #616161);
145
179
  }
@@ -1,9 +1,11 @@
1
1
  import React from 'react';
2
2
  import { UCodeEditor as UCodeEditorElement } from '@iyulab/editor-components/dist/components/code-editor/UCodeEditor.js';
3
3
 
4
+ type UCodeEditorOwnProps = Omit<UCodeEditorElement, keyof HTMLElement>;
5
+
4
6
  export declare const UCodeEditor: React.ForwardRefExoticComponent<
5
- Omit<Partial<UCodeEditorElement>, keyof React.HTMLAttributes<UCodeEditorElement>>
6
- & Omit<React.HTMLAttributes<UCodeEditorElement>, 'onChange'>
7
+ Partial<Omit<UCodeEditorElement, Exclude<keyof React.HTMLAttributes<UCodeEditorElement>, keyof UCodeEditorOwnProps>>>
8
+ & Omit<React.HTMLAttributes<UCodeEditorElement>, keyof UCodeEditorOwnProps | 'onChange'>
7
9
  & React.RefAttributes<UCodeEditorElement>
8
10
  & {
9
11
  onChange?: (event: CustomEvent) => void;
@@ -1,9 +1,11 @@
1
1
  import React from 'react';
2
2
  import { UTextEditor as UTextEditorElement } from '@iyulab/editor-components/dist/components/text-editor/UTextEditor.js';
3
3
 
4
+ type UTextEditorOwnProps = Omit<UTextEditorElement, keyof HTMLElement>;
5
+
4
6
  export declare const UTextEditor: React.ForwardRefExoticComponent<
5
- Omit<Partial<UTextEditorElement>, keyof React.HTMLAttributes<UTextEditorElement>>
6
- & Omit<React.HTMLAttributes<UTextEditorElement>, 'onChange'>
7
+ Partial<Omit<UTextEditorElement, Exclude<keyof React.HTMLAttributes<UTextEditorElement>, keyof UTextEditorOwnProps>>>
8
+ & Omit<React.HTMLAttributes<UTextEditorElement>, keyof UTextEditorOwnProps | 'onChange'>
7
9
  & React.RefAttributes<UTextEditorElement>
8
10
  & {
9
11
  onChange?: (event: CustomEvent) => void;
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.5.2",
4
+ "version": "0.6.1",
5
5
  "keywords": [
6
6
  "iyulab",
7
7
  "web-components",
@@ -43,7 +43,9 @@
43
43
  "./dist/*": {
44
44
  "types": "./dist/*.d.ts",
45
45
  "import": "./dist/*"
46
- }
46
+ },
47
+ "./react": "./dist/react/index.js",
48
+ "./react/*": "./dist/react/*"
47
49
  },
48
50
  "scripts": {
49
51
  "preversion": "node -e \"if(require('fs').existsSync('../../scripts/preversion-check.mjs'))require('child_process').execFileSync('node',['../../scripts/preversion-check.mjs'],{stdio:'inherit'})\"",
@@ -4,7 +4,6 @@ description: Editor web components — a Monaco-based code editor and a Quill-ba
4
4
  license: MIT
5
5
  metadata:
6
6
  author: iyulab
7
- version: "0.3.3"
8
7
  ---
9
8
 
10
9
  # @iyulab/editor-components