@14ch/svelte-ui 0.0.46 → 0.0.48

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.
@@ -487,7 +487,9 @@
487
487
  const displayValue = $derived.by(() => {
488
488
  const normalizedValue = value ?? '';
489
489
  if (normalizedValue !== '') {
490
- return escapeHtml(normalizedValue);
490
+ const html = escapeHtml(normalizedValue);
491
+ // 末尾が改行のとき、pre-wrap では最終行の高さが確保されず textarea と1行分ずれるためダミー空白を足す
492
+ return normalizedValue.endsWith('\n') ? html + ' ' : html;
491
493
  }
492
494
  // 値が空のとき: placeholder があればその幅・高さを確保して表示、なければ inline 時のみ  
493
495
  return placeholder ? escapeHtml(placeholder) : inline ? ' ' : '';
@@ -702,6 +704,8 @@
702
704
  overflow-y: auto;
703
705
  overflow-x: hidden;
704
706
  max-height: 100%;
707
+ /* textarea の UA デフォルト(overflow-wrap: break-word)に合わせ、長い連続文字列の折り返し位置を一致させる */
708
+ overflow-wrap: break-word;
705
709
 
706
710
  &::before {
707
711
  content: '';
@@ -882,6 +886,7 @@
882
886
  padding-top: inherit;
883
887
  padding-bottom: inherit;
884
888
  padding-left: inherit;
889
+ padding-right: inherit;
885
890
  }
886
891
 
887
892
  .textarea__wrapper,
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@14ch/svelte-ui",
3
3
  "description": "Modern Svelte UI components library with TypeScript support",
4
4
  "private": false,
5
- "version": "0.0.46",
5
+ "version": "0.0.48",
6
6
  "type": "module",
7
7
  "keywords": [
8
8
  "svelte",