@iyulab/chat-components 0.15.0 → 0.16.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.
Files changed (36) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/README.md +3 -0
  3. package/dist/_virtual/{_@oxc-project_runtime@0.151.0 → _@oxc-project_runtime@0.152.0}/helpers/esm/decorate.js +1 -1
  4. package/dist/_virtual/{_@oxc-project_runtime@0.151.0 → _@oxc-project_runtime@0.152.0}/helpers/esm/decorateMetadata.js +1 -1
  5. package/dist/components/blocks/UCodeBlock.js +2 -2
  6. package/dist/components/blocks/UElementBlock.js +2 -2
  7. package/dist/components/blocks/UFileBlock.js +2 -2
  8. package/dist/components/blocks/UFileBlock.styles.js +5 -5
  9. package/dist/components/blocks/UMarkedBlock.js +2 -2
  10. package/dist/components/blocks/URefBlock.js +2 -2
  11. package/dist/components/blocks/URefBlock.styles.js +2 -2
  12. package/dist/components/blocks/UTableBlock.js +2 -2
  13. package/dist/components/blocks/UTableBlock.styles.js +1 -1
  14. package/dist/components/blocks/UTextBlock.js +2 -2
  15. package/dist/components/message/UMessage.js +2 -2
  16. package/dist/components/prompt/UPrompt.js +2 -2
  17. package/dist/components/prompt/UPrompt.styles.js +8 -0
  18. package/dist/components/references/URefCard.js +4 -2
  19. package/dist/components/references/URefCard.styles.js +13 -1
  20. package/dist/components/references/URefCardGroup.js +2 -2
  21. package/dist/components/references/URefCardGroup.styles.js +1 -1
  22. package/dist/components/references/URefTag.js +4 -2
  23. package/dist/components/references/URefTag.styles.js +13 -1
  24. package/dist/components-extra/UChartBlock.js +2 -2
  25. package/dist/components-extra/UImagesBlock.js +2 -2
  26. package/dist/components-extra/UImagesBlock.styles.js +7 -7
  27. package/dist/components-extra/UMapBlock.js +4 -2
  28. package/dist/components-extra/UMapBlock.styles.js +12 -0
  29. package/dist/components-extra/UVideoBlock.d.ts +14 -0
  30. package/dist/components-extra/UVideoBlock.js +12 -3
  31. package/dist/components-extra/UVideoBlock.schema.js +38 -0
  32. package/dist/node_modules/katex/dist/katex.js +1 -1
  33. package/dist/utilities/messages.d.ts +1 -1
  34. package/dist/utilities/messages.js +4 -2
  35. package/package.json +1 -1
  36. package/skills/iyulab-chat-components/references/components/video-block.md +1 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,36 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.16.1] - 2026-10-03
4
+
5
+ ### Changed
6
+
7
+ - **Transitions follow the motion tokens, so reduced motion stops them.** Hover, expand and fade
8
+ transitions in the blocks, reference cards and image gallery took fixed durations and kept moving for
9
+ users who prefer reduced motion. They now read `--u-duration-*` from `@iyulab/components`, which drops
10
+ to zero under `prefers-reduced-motion: reduce`. Some speeds move to the nearest step of the scale.
11
+ - **`u-prompt[loading]`'s sweeping border holds still under reduced motion** — the coloured band stays,
12
+ so the busy state is still visible.
13
+
14
+ ## [0.16.0] - 2026-09-30
15
+
16
+ ### Added
17
+
18
+ - **`u-video-block` takes subtitle / caption tracks** — `tracks: VideoTrack[]`
19
+ (`{ src, kind?, srclang?, label?, default? }`, WebVTT) for a direct video file. The `<video>` is
20
+ drawn inside the shadow tree, so an app had no way to add a `<track>`. Also in the block schema, so
21
+ block JSON can carry them. YouTube and Vimeo keep their own player's captions.
22
+
23
+ ### Fixed
24
+
25
+ - **Links that open a new tab now say so to screen readers.** `u-ref-tag`, `u-ref-card` and the
26
+ `u-map-block` caption open in a new tab; their accessible name now ends with a localized
27
+ "(opens in a new tab)" (`opensInNewTab` in the message registry). The text is visually hidden —
28
+ the external-link icon already shows it on screen.
29
+
30
+ ### Documentation
31
+
32
+ - README: the Accessibility section links the KWCAG 2.2 table in `@iyulab/components`.
33
+
3
34
  ## [0.15.0] - 2026-09-30
4
35
 
5
36
  ### Changed
package/README.md CHANGED
@@ -121,6 +121,7 @@ conformance claim for the success criteria it does not list.
121
121
  |---|---|---|
122
122
  | SC 2.5.8 Target Size (Minimum) | Every pointer target inside the registered blocks (`.` and `./extra` entries) is at least 24×24 CSS px or meets the spacing exception (24px between centers), and is actually hit at that position | `tests/browser/target-size.browser.test.ts` (real Chromium) |
123
123
  | SC 2.1.1 Keyboard (pointer-cursor check) | Nothing a block renders shows a pointer cursor without being an interactive element — table sort headers, image thumbnails and previewable file cards are buttons | `tests/browser/target-size.browser.test.ts` · `tests/browser/table-block-sort-keyboard.browser.test.ts` |
124
+ | SC 3.2.5 Change on Request (new tabs) | Links that open a new tab — `u-ref-tag`, `u-ref-card`, the `u-map-block` caption — end their accessible name with a localized "(opens in a new tab)" | `tests/browser/new-tab-link-name.browser.test.ts` |
124
125
 
125
126
  `u-ref-tag` uses the SC's **inline exception** — it is a citation badge set inside a sentence, where
126
127
  growing it to 24px would push the line height. It is still measured and reported.
@@ -128,6 +129,8 @@ growing it to 24px would push the line height. It is still measured and reported
128
129
  Color contrast comes from the `@iyulab/components` tokens this package renders with — see that
129
130
  package's Accessibility section.
130
131
 
132
+ For **KWCAG 2.2** (the Korean web accessibility standard), the `@iyulab/components` README has a table of all 33 check items — which are guaranteed by a test across the sibling packages, which are shared with the app, and which do not apply: [KWCAG 2.2 대응표](https://github.com/iyulab/node-components#kwcag-22-대응표).
133
+
131
134
  ## Documentation
132
135
 
133
136
  | File | Description |
@@ -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,7 +1,7 @@
1
1
  import "../../utilities/icons.js";
2
2
  import { styles } from "./UCodeBlock.styles.js";
3
- import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.151.0/helpers/esm/decorateMetadata.js";
4
- import __decorate from "../../_virtual/_@oxc-project_runtime@0.151.0/helpers/esm/decorate.js";
3
+ import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.152.0/helpers/esm/decorateMetadata.js";
4
+ import __decorate from "../../_virtual/_@oxc-project_runtime@0.152.0/helpers/esm/decorate.js";
5
5
  import { html } from "lit";
6
6
  import { customElement, property } from "lit/decorators.js";
7
7
  import { unsafeHTML } from "lit/directives/unsafe-html.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 { UDataElement } from "../UDataElement.js";
4
4
  import { getElementBlockProperties } from "../../utilities/ElementRegistry.js";
5
5
  import { styles } from "./UElementBlock.styles.js";
@@ -1,6 +1,6 @@
1
1
  import "../../utilities/icons.js";
2
- import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.151.0/helpers/esm/decorateMetadata.js";
3
- import __decorate from "../../_virtual/_@oxc-project_runtime@0.151.0/helpers/esm/decorate.js";
2
+ import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.152.0/helpers/esm/decorateMetadata.js";
3
+ import __decorate from "../../_virtual/_@oxc-project_runtime@0.152.0/helpers/esm/decorate.js";
4
4
  import { messages } from "../../utilities/messages.js";
5
5
  import { styles } from "./UFileBlock.styles.js";
6
6
  import { html, nothing } from "lit";
@@ -19,7 +19,7 @@ var styles = css`
19
19
  border-radius: 8px;
20
20
  background-color: var(--u-neutral-50);
21
21
  overflow: visible;
22
- transition: background-color 0.12s ease, border-color 0.12s ease;
22
+ transition: background-color var(--u-duration-fast, 140ms) ease, border-color var(--u-duration-fast, 140ms) ease;
23
23
  }
24
24
  .card[previewable]:hover {
25
25
  background-color: var(--u-neutral-100);
@@ -60,7 +60,7 @@ var styles = css`
60
60
  font-size: 16px;
61
61
  border-radius: 6px;
62
62
  background-color: var(--u-neutral-200);
63
- transition: background 0.15s ease;
63
+ transition: background var(--u-duration-fast, 140ms) ease;
64
64
  overflow: hidden;
65
65
  }
66
66
  .thumbnail img,
@@ -123,7 +123,7 @@ var styles = css`
123
123
  color: var(--u-neutral-0);
124
124
  opacity: 0;
125
125
  pointer-events: none;
126
- transition: opacity 0.12s ease, background-color 0.12s ease;
126
+ transition: opacity var(--u-duration-fast, 140ms) ease, background-color var(--u-duration-fast, 140ms) ease;
127
127
  }
128
128
  .card:hover .remove-btn {
129
129
  opacity: 1;
@@ -143,7 +143,7 @@ var styles = css`
143
143
  flex-direction: column;
144
144
  background: rgba(0, 0, 0, 0.92);
145
145
  cursor: default;
146
- animation: preview-fadeIn 0.2s ease;
146
+ animation: preview-fadeIn var(--u-duration-normal, 220ms) ease;
147
147
  }
148
148
 
149
149
  .preview-header {
@@ -174,7 +174,7 @@ var styles = css`
174
174
  align-items: center;
175
175
  justify-content: center;
176
176
  cursor: pointer;
177
- transition: background 0.2s;
177
+ transition: background var(--u-duration-normal, 220ms);
178
178
  }
179
179
  .preview-close:hover { background: rgba(255, 255, 255, 0.18); }
180
180
  .preview-close:active { background: rgba(255, 255, 255, 0.28); }
@@ -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 "./UCodeBlock.js";
4
4
  import { escapeHtmlAttr, escapeHtmlHref, escapeHtmlText, stripZeroWidth } from "../../utilities/sanitizers.js";
5
5
  import { HtmlBuilder } from "../../utilities/HtmlBuilder.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 "../references/URefCard.js";
4
4
  import { styles } from "./URefBlock.styles.js";
5
5
  import { html } from "lit";
@@ -30,7 +30,7 @@ var styles = css`
30
30
  u-icon {
31
31
  color: inherit;
32
32
  font-size: 1em;
33
- transition: transform 0.2s ease-in-out;
33
+ transition: transform var(--u-duration-normal, 220ms) ease-in-out;
34
34
  }
35
35
  u-icon[collapsed] {
36
36
  transform: rotate(-90deg);
@@ -61,7 +61,7 @@ var styles = css`
61
61
  flex-direction: column;
62
62
  gap: 0.75em;
63
63
  margin-top: 0.75em;
64
- transition: all 0.3s ease-in-out;
64
+ transition: all var(--u-duration-slow, 320ms) ease-in-out;
65
65
  }
66
66
  .body[collapsed] {
67
67
  height: 0;
@@ -1,6 +1,6 @@
1
1
  import "../../utilities/icons.js";
2
- import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.151.0/helpers/esm/decorateMetadata.js";
3
- import __decorate from "../../_virtual/_@oxc-project_runtime@0.151.0/helpers/esm/decorate.js";
2
+ import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.152.0/helpers/esm/decorateMetadata.js";
3
+ import __decorate from "../../_virtual/_@oxc-project_runtime@0.152.0/helpers/esm/decorate.js";
4
4
  import { UDataElement } from "../UDataElement.js";
5
5
  import { messages } from "../../utilities/messages.js";
6
6
  import { styles } from "./UTableBlock.styles.js";
@@ -127,7 +127,7 @@ var styles = css`
127
127
  margin-left: 4px;
128
128
  font-size: 12px;
129
129
  opacity: 0.3;
130
- transition: opacity 0.15s;
130
+ transition: opacity var(--u-duration-fast, 140ms);
131
131
  }
132
132
 
133
133
  tbody tr {
@@ -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 "./UTextBlock.styles.js";
4
4
  import { html } from "lit";
5
5
  import { customElement, property, query } from "lit/decorators.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 "./UMessage.styles.js";
4
4
  import { html } from "lit";
5
5
  import { customElement, property } from "lit/decorators.js";
@@ -1,6 +1,6 @@
1
1
  import "../../utilities/icons.js";
2
- import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.151.0/helpers/esm/decorateMetadata.js";
3
- import __decorate from "../../_virtual/_@oxc-project_runtime@0.151.0/helpers/esm/decorate.js";
2
+ import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.152.0/helpers/esm/decorateMetadata.js";
3
+ import __decorate from "../../_virtual/_@oxc-project_runtime@0.152.0/helpers/esm/decorate.js";
4
4
  import { messages } from "../../utilities/messages.js";
5
5
  import "../blocks/UFileBlock.js";
6
6
  import { styles } from "./UPrompt.styles.js";
@@ -70,6 +70,14 @@ var styles = css`
70
70
  border-radius: 50%;
71
71
  }
72
72
 
73
+ /* 동작 줄이기 — 흐르는 테두리를 멈춘다. 색 띠는 그대로 남아 «응답 중» 은 계속 보인다(메시지의 점 로더와 같은 처리). */
74
+ @media (prefers-reduced-motion: reduce) {
75
+ :host([loading])::before {
76
+ animation: none;
77
+ background-position: 50% 0;
78
+ }
79
+ }
80
+
73
81
  @keyframes border-shimmer {
74
82
  0% { background-position: 100% 0; }
75
83
  100% { background-position: 0% 0; }
@@ -1,8 +1,9 @@
1
1
  import "../../utilities/icons.js";
2
- import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.151.0/helpers/esm/decorateMetadata.js";
3
- import __decorate from "../../_virtual/_@oxc-project_runtime@0.151.0/helpers/esm/decorate.js";
2
+ import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.152.0/helpers/esm/decorateMetadata.js";
3
+ import __decorate from "../../_virtual/_@oxc-project_runtime@0.152.0/helpers/esm/decorate.js";
4
4
  import { sanitizeHref } from "../../utilities/sanitizers.js";
5
5
  import { UDataElement } from "../UDataElement.js";
6
+ import { messages } from "../../utilities/messages.js";
6
7
  import { styles } from "./URefCard.styles.js";
7
8
  import { html, nothing } from "lit";
8
9
  import { customElement, property } from "lit/decorators.js";
@@ -64,6 +65,7 @@ var URefCard = class URefCard extends UDataElement {
64
65
  <div class="footer" ?hidden=${!this.tags || this.tags.length === 0}>
65
66
  ${this.tags?.map((tag) => html`<span class="tag">${tag}</span>`)}
66
67
  </div>
68
+ <span class="new-tab-hint">${messages.text("opensInNewTab")}</span>
67
69
  </a>
68
70
  `;
69
71
  }
@@ -16,7 +16,7 @@ var styles = css`
16
16
  padding: 6px;
17
17
  color: inherit;
18
18
  text-decoration: none;
19
- transition: all 0.2s ease;
19
+ transition: all var(--u-duration-normal, 220ms) ease;
20
20
  }
21
21
  a:hover {
22
22
  color: var(--u-txt-color-hover, #1565C0);
@@ -98,6 +98,18 @@ var styles = css`
98
98
  border-radius: 4px;
99
99
  white-space: nowrap;
100
100
  }
101
+ /* 새 창 알림 — 화면에는 없고 접근성 이름에만 붙는다(KWCAG 7.2.1). */
102
+ .new-tab-hint {
103
+ position: absolute;
104
+ width: 1px;
105
+ height: 1px;
106
+ margin: -1px;
107
+ padding: 0;
108
+ overflow: hidden;
109
+ clip-path: inset(50%);
110
+ white-space: nowrap;
111
+ border: 0;
112
+ }
101
113
  `;
102
114
  //#endregion
103
115
  export { styles };
@@ -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 { messages } from "../../utilities/messages.js";
4
4
  import { URefCard } from "./URefCard.js";
5
5
  import { styles } from "./URefCardGroup.styles.js";
@@ -61,7 +61,7 @@ var styles = css`
61
61
  flex-direction: row;
62
62
  width: 100%;
63
63
  will-change: transform;
64
- transition: transform 260ms ease;
64
+ transition: transform var(--u-duration-normal, 220ms) ease;
65
65
  }
66
66
 
67
67
  /* slot 안의 각 카드가 한 페이지(100%)를 차지하도록 */
@@ -1,7 +1,8 @@
1
1
  import "../../utilities/icons.js";
2
- import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.151.0/helpers/esm/decorateMetadata.js";
3
- import __decorate from "../../_virtual/_@oxc-project_runtime@0.151.0/helpers/esm/decorate.js";
2
+ import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.152.0/helpers/esm/decorateMetadata.js";
3
+ import __decorate from "../../_virtual/_@oxc-project_runtime@0.152.0/helpers/esm/decorate.js";
4
4
  import { sanitizeHref } from "../../utilities/sanitizers.js";
5
+ import { messages } from "../../utilities/messages.js";
5
6
  import { styles } from "./URefTag.styles.js";
6
7
  import { html } from "lit";
7
8
  import { customElement, property } from "lit/decorators.js";
@@ -19,6 +20,7 @@ var URefTag = class URefTag extends UElement {
19
20
  <a href="${ifDefined(this.href ? sanitizeHref(this.href) : void 0)}" target="_blank" rel="noopener noreferrer"
20
21
  @click=${this.handleAnchorClick}>
21
22
  <slot></slot>
23
+ <span class="new-tab-hint">${messages.text("opensInNewTab")}</span>
22
24
  </a>
23
25
 
24
26
  <u-icon lib="internal-chat" name="external-link"></u-icon>
@@ -12,7 +12,7 @@ var styles = css`
12
12
  border-radius: 9999px;
13
13
  background-color: var(--u-neutral-100);
14
14
  padding: 2px 6px;
15
- transition: background-color 0.2s ease-in-out;
15
+ transition: background-color var(--u-duration-normal, 220ms) ease-in-out;
16
16
  cursor: pointer;
17
17
  }
18
18
  :host(:hover) {
@@ -46,6 +46,18 @@ var styles = css`
46
46
  u-tooltip[visible] {
47
47
  opacity: 1;
48
48
  }
49
+ /* 새 창 알림 — 화면에는 없고 접근성 이름에만 붙는다(KWCAG 7.2.1). */
50
+ .new-tab-hint {
51
+ position: absolute;
52
+ width: 1px;
53
+ height: 1px;
54
+ margin: -1px;
55
+ padding: 0;
56
+ overflow: hidden;
57
+ clip-path: inset(50%);
58
+ white-space: nowrap;
59
+ border: 0;
60
+ }
49
61
  `;
50
62
  //#endregion
51
63
  export { styles };
@@ -1,6 +1,6 @@
1
1
  import "../utilities/icons.js";
2
- import __decorateMetadata from "../_virtual/_@oxc-project_runtime@0.151.0/helpers/esm/decorateMetadata.js";
3
- import __decorate from "../_virtual/_@oxc-project_runtime@0.151.0/helpers/esm/decorate.js";
2
+ import __decorateMetadata from "../_virtual/_@oxc-project_runtime@0.152.0/helpers/esm/decorateMetadata.js";
3
+ import __decorate from "../_virtual/_@oxc-project_runtime@0.152.0/helpers/esm/decorate.js";
4
4
  import { registerElementBlock } from "../utilities/ElementRegistry.js";
5
5
  import { messages } from "../utilities/messages.js";
6
6
  import { styles } from "./UChartBlock.styles.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 { registerElementBlock } from "../utilities/ElementRegistry.js";
4
4
  import { messages } from "../utilities/messages.js";
5
5
  import { resolveImageSource } from "../utilities/imageSources.js";
@@ -33,7 +33,7 @@ var styles = css`
33
33
  height: 100%;
34
34
  object-fit: cover;
35
35
  pointer-events: none;
36
- transition: transform 0.3s ease, filter 0.3s ease;
36
+ transition: transform var(--u-duration-slow, 320ms) ease, filter var(--u-duration-slow, 320ms) ease;
37
37
  }
38
38
  .slide:hover img {
39
39
  transform: scale(1.05);
@@ -75,7 +75,7 @@ var styles = css`
75
75
  display: flex;
76
76
  flex-direction: column;
77
77
  background: rgba(0, 0, 0, 0.92);
78
- animation: overlay-fadeIn 0.2s ease;
78
+ animation: overlay-fadeIn var(--u-duration-normal, 220ms) ease;
79
79
  }
80
80
 
81
81
  /* 상단 헤더: 카운터(중앙) + 닫기(우측) */
@@ -112,7 +112,7 @@ var styles = css`
112
112
  align-items: center;
113
113
  justify-content: center;
114
114
  cursor: pointer;
115
- transition: background 0.2s;
115
+ transition: background var(--u-duration-normal, 220ms);
116
116
  }
117
117
  .lb-close:hover {
118
118
  background: rgba(255, 255, 255, 0.18);
@@ -147,7 +147,7 @@ var styles = css`
147
147
  flex-direction: row;
148
148
  align-items: center;
149
149
  gap: 16px;
150
- transition: transform 0.45s cubic-bezier(0.25, 0.1, 0.25, 1);
150
+ transition: transform var(--u-duration-slow, 320ms) cubic-bezier(0.25, 0.1, 0.25, 1);
151
151
  will-change: transform;
152
152
  }
153
153
 
@@ -159,7 +159,7 @@ var styles = css`
159
159
  justify-content: center;
160
160
  opacity: 0.5;
161
161
  transform: scale(0.9);
162
- transition: opacity 0.4s ease, transform 0.4s ease;
162
+ transition: opacity var(--u-duration-slow, 320ms) ease, transform var(--u-duration-slow, 320ms) ease;
163
163
  }
164
164
  .lb-slide[active] {
165
165
  opacity: 1;
@@ -192,7 +192,7 @@ var styles = css`
192
192
  align-items: center;
193
193
  justify-content: center;
194
194
  cursor: pointer;
195
- transition: background 0.25s;
195
+ transition: background var(--u-duration-normal, 220ms);
196
196
  }
197
197
  .lb-nav.prev {
198
198
  left: 0;
@@ -218,7 +218,7 @@ var styles = css`
218
218
  padding: 12px;
219
219
  border-radius: 50%;
220
220
  background: rgba(255, 255, 255, 0.15);
221
- transition: background 0.2s, transform 0.15s;
221
+ transition: background var(--u-duration-normal, 220ms), transform var(--u-duration-fast, 140ms);
222
222
  }
223
223
  .lb-nav:hover u-icon {
224
224
  background: rgba(255, 255, 255, 0.3);
@@ -1,6 +1,7 @@
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 { registerElementBlock } from "../utilities/ElementRegistry.js";
4
+ import { messages } from "../utilities/messages.js";
4
5
  import { styles } from "./UMapBlock.styles.js";
5
6
  import schema from "./UMapBlock.schema.js";
6
7
  import { html, nothing } from "lit";
@@ -34,6 +35,7 @@ var UMapBlock = class UMapBlock extends UElement {
34
35
  >
35
36
  <strong>${this.label}</strong>
36
37
  <span>${this.description}</span>
38
+ <span class="new-tab-hint">${messages.text("opensInNewTab")}</span>
37
39
  </a>
38
40
  `;
39
41
  }
@@ -52,6 +52,18 @@ var styles = css`
52
52
  font-size: 0.7em;
53
53
  opacity: 0.8;
54
54
  }
55
+ /* 새 창 알림 — 화면에는 없고 접근성 이름에만 붙는다(KWCAG 7.2.1). */
56
+ .new-tab-hint {
57
+ position: absolute;
58
+ width: 1px;
59
+ height: 1px;
60
+ margin: -1px;
61
+ padding: 0;
62
+ overflow: hidden;
63
+ clip-path: inset(50%);
64
+ white-space: nowrap;
65
+ border: 0;
66
+ }
55
67
  `;
56
68
  //#endregion
57
69
  export { styles };
@@ -1,5 +1,14 @@
1
1
  import { nothing, PropertyValues } from 'lit';
2
2
  import { UElement } from '@iyulab/components/dist/components/UElement.js';
3
+ /** 자막·캡션 트랙(WebVTT) 하나. */
4
+ export interface VideoTrack {
5
+ src: string;
6
+ /** 기본 `subtitles` */
7
+ kind?: 'subtitles' | 'captions' | 'descriptions' | 'chapters' | 'metadata';
8
+ srclang?: string;
9
+ label?: string;
10
+ default?: boolean;
11
+ }
3
12
  /**
4
13
  * 비디오 플레이어 블록 컴포넌트
5
14
  */
@@ -11,6 +20,11 @@ export declare class UVideoBlock extends UElement {
11
20
  poster?: string;
12
21
  /** 비디오 비율 */
13
22
  ratio: '16:9' | '4:3' | '1:1';
23
+ /**
24
+ * 직접 파일 영상의 자막·캡션 트랙(WebVTT). 영상이 섀도 안에 그려지므로 앱이 `<track>` 을
25
+ * 넣을 수 없다 — 이 속성이 유일한 자리다. YouTube·Vimeo 는 그 플레이어가 자막을 다룬다.
26
+ */
27
+ tracks: VideoTrack[];
14
28
  protected updated(changedProperties: PropertyValues): void;
15
29
  render(): typeof nothing | import('lit-html').TemplateResult<1>;
16
30
  private isYouTube;
@@ -1,5 +1,6 @@
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
+ import { sanitizeHref } from "../utilities/sanitizers.js";
3
4
  import { registerElementBlock } from "../utilities/ElementRegistry.js";
4
5
  import { styles } from "./UVideoBlock.styles.js";
5
6
  import schema from "./UVideoBlock.schema.js";
@@ -13,6 +14,7 @@ var UVideoBlock = class UVideoBlock extends UElement {
13
14
  constructor(..._args) {
14
15
  super(..._args);
15
16
  this.ratio = "16:9";
17
+ this.tracks = [];
16
18
  }
17
19
  static {
18
20
  this.styles = [super.styles, styles];
@@ -55,7 +57,13 @@ var UVideoBlock = class UVideoBlock extends UElement {
55
57
  poster=${ifDefined(this.poster)}
56
58
  controls
57
59
  playsinline
58
- ></video>
60
+ >${this.tracks.filter((t) => t && typeof t.src === "string" && sanitizeHref(t.src) !== "#").map((t) => html`<track
61
+ src=${sanitizeHref(t.src)}
62
+ kind=${t.kind ?? "subtitles"}
63
+ srclang=${ifDefined(t.srclang)}
64
+ label=${ifDefined(t.label)}
65
+ ?default=${t.default === true}
66
+ />`)}</video>
59
67
  `;
60
68
  }
61
69
  isYouTube(url) {
@@ -79,6 +87,7 @@ var UVideoBlock = class UVideoBlock extends UElement {
79
87
  __decorate([property({ type: String }), __decorateMetadata("design:type", String)], UVideoBlock.prototype, "src", void 0);
80
88
  __decorate([property({ type: String }), __decorateMetadata("design:type", String)], UVideoBlock.prototype, "poster", void 0);
81
89
  __decorate([property({ type: String }), __decorateMetadata("design:type", String)], UVideoBlock.prototype, "ratio", void 0);
90
+ __decorate([property({ type: Array }), __decorateMetadata("design:type", Array)], UVideoBlock.prototype, "tracks", void 0);
82
91
  UVideoBlock = __decorate([customElement("u-video-block")], UVideoBlock);
83
92
  //#endregion
84
93
  export { UVideoBlock };
@@ -20,6 +20,44 @@ var schema = {
20
20
  ],
21
21
  default: "16:9",
22
22
  description: "Video aspect ratio"
23
+ },
24
+ tracks: {
25
+ type: "array",
26
+ items: {
27
+ type: "object",
28
+ properties: {
29
+ src: {
30
+ type: "string",
31
+ description: "WebVTT file URL"
32
+ },
33
+ kind: {
34
+ type: "string",
35
+ enum: [
36
+ "subtitles",
37
+ "captions",
38
+ "descriptions",
39
+ "chapters",
40
+ "metadata"
41
+ ],
42
+ default: "subtitles",
43
+ description: "Track kind"
44
+ },
45
+ srclang: {
46
+ type: "string",
47
+ description: "Language of the track text (BCP 47, e.g. ko)"
48
+ },
49
+ label: {
50
+ type: "string",
51
+ description: "Name shown in the player's track menu"
52
+ },
53
+ default: {
54
+ type: "boolean",
55
+ description: "Show this track by default"
56
+ }
57
+ },
58
+ required: ["src"]
59
+ },
60
+ description: "Subtitle / caption tracks for a direct video file (ignored for YouTube and Vimeo)"
23
61
  }
24
62
  },
25
63
  required: ["src"]
@@ -26276,7 +26276,7 @@ var renderToHTMLTree = function renderToHTMLTree(expression, options) {
26276
26276
  return renderError(error, expression, settings);
26277
26277
  }
26278
26278
  };
26279
- var version = "0.18.9";
26279
+ var version = "0.18.10";
26280
26280
  var __domTree = {
26281
26281
  Span,
26282
26282
  Anchor,
@@ -5,5 +5,5 @@
5
5
  * 이 리포가 채택한 표준이 *"영어 기본 **+ 레지스트리**"* 이기 때문이다 — 영어 리터럴만으로는
6
6
  * 한국어 앱이 그 문구를 되돌릴 방법이 없다. 다음 문자열은 여기로 온다.
7
7
  */
8
- export type ChatMessageKey = 'canvasUnavailable' | 'previousReference' | 'nextReference' | 'closePreview' | 'closeLightbox' | 'previousImage' | 'nextImage' | 'sendMessage' | 'stopGenerating' | 'fullScreen' | 'remove' | 'pngDownload' | 'jsonDownload' | 'search' | 'rowCount' | 'excelDownload' | 'csvDownload' | 'openImage' | 'previewFile' | 'imageBlocked' | 'imageBlockedNamed';
8
+ export type ChatMessageKey = 'canvasUnavailable' | 'previousReference' | 'nextReference' | 'closePreview' | 'closeLightbox' | 'previousImage' | 'nextImage' | 'sendMessage' | 'stopGenerating' | 'fullScreen' | 'remove' | 'pngDownload' | 'jsonDownload' | 'search' | 'rowCount' | 'excelDownload' | 'csvDownload' | 'openImage' | 'previewFile' | 'imageBlocked' | 'imageBlockedNamed' | 'opensInNewTab';
9
9
  export declare const messages: import('@iyulab/components/dist/utilities/Locale.js').LocaleNamespace<ChatMessageKey>;
@@ -22,7 +22,8 @@ messages.register("en", {
22
22
  openImage: "Open image {index}",
23
23
  previewFile: "Preview {name}",
24
24
  imageBlocked: "Image blocked",
25
- imageBlockedNamed: "Image blocked: {name}"
25
+ imageBlockedNamed: "Image blocked: {name}",
26
+ opensInNewTab: "(opens in a new tab)"
26
27
  });
27
28
  messages.register("ko", {
28
29
  canvasUnavailable: "Canvas 2D context를 가져올 수 없습니다.",
@@ -45,7 +46,8 @@ messages.register("ko", {
45
46
  openImage: "이미지 {index} 열기",
46
47
  previewFile: "{name} 미리보기",
47
48
  imageBlocked: "차단된 이미지",
48
- imageBlockedNamed: "차단된 이미지: {name}"
49
+ imageBlockedNamed: "차단된 이미지: {name}",
50
+ opensInNewTab: "(새 창에서 열림)"
49
51
  });
50
52
  //#endregion
51
53
  export { messages };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@iyulab/chat-components",
3
3
  "description": "llm chat components for building chat interfaces",
4
- "version": "0.15.0",
4
+ "version": "0.16.1",
5
5
  "author": "iyulab",
6
6
  "license": "MIT",
7
7
  "keywords": [
@@ -55,6 +55,7 @@ reason as the image block: vertical squeezing would break the aspect ratio. The
55
55
  | `src` | `string` | `undefined` | Video URL: YouTube, Vimeo, or direct file |
56
56
  | `poster` | `string` | `undefined` | Poster image URL for direct video files |
57
57
  | `ratio` | `'16:9'\|'4:3'\|'1:1'` | `'16:9'` | Aspect ratio |
58
+ | `tracks` | `VideoTrack[]` | `[]` | Subtitle / caption tracks (WebVTT) for a direct video file — `{ src, kind?, srclang?, label?, default? }`, `kind` defaults to `'subtitles'`. The video is inside the shadow tree, so this is the only way to add a `<track>`. Ignored for YouTube and Vimeo. Track files on another origin load only when that server allows CORS for the page |
58
59
 
59
60
  ## Supported Platforms
60
61