# Text changelog
Read the complete [LICENSE](https://snowui.dev/LICENSE) for the installed version before use.
Reviewed against Chinese source SHA-256 `bad0bfa2217badddc400a36ba52597bf63bd5accfdc28603dce545456a16800d`. For version differences, check the installed package as well.
### v3.5.4 (2026-10-22)
- Single-line Tooltip Hug anchors stay vertically centered within an explicit singleLine host. Ordinary text flow and column layouts remain unchanged.
- Single-line truncation retains complete assistive text so button, link and native-label names do not shrink to the visible prefix. Text continues to own visual fitting, the ellipsis and full-text hints.
### v3.5.3 (2026-10-12)
- Incoming children now use a distinct internal name to avoid self-reference to Frame's identically named Snippet. This fixes recursion during package SSR for ordinary text such as category headings without changing public content or breakpoint props.
- 2026-09-21: Aligned the usage guide, source Prop table, and Site / AI reading entry. Documentation only; component behavior is unchanged.
### v3.5.2 (2026-08-15)
- Semantic `p / h1…h6` hosts explicitly enable `overflow-wrap: break-word`, protecting long words even without optional `snowui-base.css`; `tag="code"` still allows application-level code initialization.
### v3.5.1 (2026-08-06)
- Without `lines`, the truncation controller remains entirely dormant: it reads no text and creates no observation target. Enabling truncation dynamically still activates the existing protocol.
### v3.5.0 (2026-07-04)
- Added an opt-in built-in `more` Button for `lines=0`, styled after the ArrowLineDown button in example 6.
- The built-in more Button enables `backgroundBlur` with the same strength as the BarChart blurred overlay.
- Added `parts.Button`; an explicit `Button as="more"` can replace the built-in button.
- Without more, shared `.snowui-scroll-mask` and `useOverlayScrollbar` provide top/bottom fades and the same overlay scrollbar rules as Textarea. With more, Text stays in expand mode without a scrollbar.
### v3.4.0 (2026-06-23)
#### Fixes
- **TX-Fix.57** Changed `lines={1}` to shared boundary fitting plus an explicit inline ellipsis. This fixes missing ellipsis with automatic Tooltip and avoids splitting words, Han characters, emoji, or combining characters.
- **TX-Fix.58** Separated the line-clamp content layer from Tooltip for `lines={2|3}`, preventing text after the ellipsis from showing. Real truncation consistently displays Tooltip and pointer cursor. Multiline hosts return to block layout to remove inline-baseline bottom space. Restored the controller's initial `lines` to fix missing bottom fade when `lines={0}` is collapsed.
- **TX-Fix.60** `lines={2|3}` uses `text-box-trim: trim-end` and `text-box-edge: text` to trim half-leading below the last line. This removes the impression of larger bottom padding from asymmetric font ascent/descent while preserving descender space.
- **TX-Fix.61** Fixed `.snowui-text-inline-block` still overriding multiline hosts. The `lines={2|3}` root now uses block layout without inline-baseline bottom space. Collapse height is applied to the real multiline content layer to avoid a height feedback loop between root and content.
- **TX-Test.59** Example 4 now uses `tooltip="Full content…"` to avoid registering both a child Tooltip and Text's automatic Tooltip in the shared overlay; mouseleave closes it again.
- **TX-Fix.56** Added a local content-opacity bridge for ButtonGroup to Text's base opacity chain, so a disabled ButtonGroup applies `opacity: 0.2` only once at its shell.
- **Text-Docs.2026-05-25** Archived the historical changelog from the source header. New changes belong in this document's changelog; the source header retains only its role, current key architecture, and documentation path.
- **TX-Adjust.55** Internalized expansion through `Button as="more"`: the example no longer passes `Click.run` to change host height. A Button inside `Text lines={0}` with `as="more"` triggers the expansion animation and hides itself through Text context.
- **TX-Adjust.54** Added host-height animation when `Button as="more"` expands. Like Accordion content size motion, height transitions from current to full content. Collapsed state and more Button stay visible during animation; only afterward does Text switch to expanded and hide the button, preserving the animation starting point rather than letting the example set `height:auto` immediately.
- **TX-Adjust.53** `Button as="more"` now uses automatic layout Pin. It is still declared inside Text content, internally mapped to `pin-bottom-right`, and lifted to the root after Text mounts to avoid the content mask. It hides after expansion or when content is not truncated.
- **TX-Adjust.52** `lines=0` fade now reuses shared transparent-mask capability from `.snowui-scroll-mask` in `layout.css` rather than drawing a background-color gradient overlay through `::after`.
### v3.3.35 (2026-03-16)
#### Changes
- **TX-Adjust.51** Disabled Text's own default hover on request: `interactive` now defaults to `false`, and `snowui-text-hover-enabled` is attached only with explicit `interactive={true}`.
### v3.3.34 (2026-03-06)
#### Changes
- **TX-Adjust.50** Fixed missing easing on `lines=0/2/3` hover by extending the default `--snowui-text-collapse-transition` to a combined list of `max-height/min-height/height + margin/transform`, preventing inline truncation transitions from overriding hover.
### v3.3.33 (2026-03-06)
#### Changes
- **TX-Adjust.48** Reverted the policy of disabling hover while truncated. Text again follows only `interactive`, retaining hover motion across truncation and expansion states.
- **TX-Adjust.49** Removed `[data-truncated="true"]` exclusion from hover selectors so `lines=1` and expanded `lines=0` use consistent entry/exit transitions.
### v3.3.32 (2026-03-06)
#### Changes
- **TX-Adjust.47** Isolated hover in single-line truncated state by explicitly excluding `[data-truncated="true"]` from selectors, avoiding movement during asynchronous truncation measurement.
### v3.3.31 (2026-03-06)
#### Changes
- **TX-Adjust.45** Removed hover movement while truly truncated: Text attaches `snowui-text-hover-enabled` only when `interactive !== false && !isTruncated`.
- **TX-Adjust.46** Split truncation/expansion transition variables into `snowui-text-collapse-motion-enabled` so preserving collapse animation does not accidentally restore hover while truncated.
### v3.3.30 (2026-03-06)
#### Changes
- **TX-Adjust.42** Restored Text's own hover transition chain. `hover-enabled` again declares explicit `margin/transform` transitions so appearance does not fall back entirely to Frame's default motion.
- **TX-Adjust.43** Restored explicit transition variables in the truncation path: `--snowui-text-collapse-transition` now lists targeted `max-height/min-height/height` properties instead of `transition: all`.
- **TX-Adjust.44** Hover rules now exclude `.snowui-disabled` and `:disabled`, preventing additional hover movement when disabled.
### v3.3.29 (2026-02-25)
#### Changes
- **TX-Adjust.41** Removed the `:not(code)` patch from `Text.svelte` and `layout.css` on request, returning to the original typography strategy. Future base-style override issues should be solved at the style-layer architecture rather than by selector patches.
### v3.3.28 (2026-02-25)
#### Fixes
- **TX-Fix.40** Fixed `Text tag="code"` not being overridden by `snowui.css` code rules. Component default typography was limited to `:not(code)`, and Container baseline typography in `layout.css` excluded `code` to avoid overriding `@layer base` code styles.
### v3.3.27 (2026-02-25)
#### Fixes
- **TX-Fix.39** Historical approach: the component once forced code typography with `code.snowui-text`; v3.3.28 replaced it with natural override by `snowui.css`.
### v3.3.26 (2026-02-25)
#### Fixes
- **TX-Fix.37** Fixed inline truncation styles overriding hover transitions for `lines=2/3/0`. `text-collapse` transition became variable-driven through `--snowui-text-collapse-transition`, with Text injecting `all 1000ms ease-out` while hover-enabled.
#### Style refinements
- **TX-Doc.38** Completed Text style documentation covering hover-state styles, `Button as="more"` positioning, `lines=0` fade mask, `lines=2/3` truncation fallback, and selector mapping.
### v3.3.25 (2026-02-25)
#### Fixes
- **TX-Fix.35** Fixed hover still running with `interactive={false}` by restoring `interactive` as the hover switch, on by default and disabled by explicit `false`.
- **TX-Fix.36** Unified inconsistent hover transition durations across examples with `transition: all 1000ms ease-out` on the resting `.snowui-text-hover-enabled` class.
### v3.3.24 (2026-02-25)
#### Fixes
- **TX-Fix.34** Made hover perceptible in the basic centered-text example by adding `--snowui-text-hover-shift-x` while retaining margin hover rules.
### v3.3.23 (2026-02-25)
#### Changes
- **TX-Adjust.32** Simplified interaction policy: `interactive` remained for compatibility but no longer controlled Text hover; all Text applied transitions and margin changes on hover by default.
- **TX-Adjust.33** Removed forced pointer cursors inside Text. Ordinary hover, truncation, and tooltip states no longer inject `cursor:pointer`.
### v3.3.22 (2026-02-25)
#### Fixes
- **TX-Fix.31** Resolved `lines=0` host detection regressions between examples 6 and 9-4. Computed height in pixels is no longer treated alone as an explicit constraint; instead detect inline `height/max-height`, computed `max-height`, height utilities (`h-* / max-h-* / min-h-* / size-*`), and overflow constraints.
### v3.3.21 (2026-02-25)
#### Fixes
- **TX-Fix.30** Fixed a regression for a fixed-height outer container with `lines=0` (example 6). A constraint host must itself truly clip content, avoiding misclassification of an unclipped Text as the host and restoring truncated state and the `more` button.
### v3.3.20 (2026-02-25)
#### Fixes
- **TX-Fix.29** Fixed `lines=0` failing to truncate without an outer container when Text's own class sets height such as `h-*`. `findConstraintHost` now prioritizes computed height constraints on Text itself instead of selecting an outer scroll container.
### v3.3.19 (2026-02-25)
#### Fixes
- **TX-Fix.27** Fixed occasional missed truncation for `lines=2/3` with only Text's own constraints. Multiline mode now writes stable `max-height + overflow:hidden`; the previous `min-height` fallback alone could not guarantee visible clipping.
- **TX-Fix.28** Reverted incorrect forced fallback overrides: removed `width:auto/height:auto` for `truncate-container/collapsed` inside Text so user `w-*/h-*` constraints are not reversed and `lines=0` works.
### v3.3.18 (2026-02-25)
#### Fixes
- **TX-Fix.26** Removed global truncation rules in `layout.css` that forcibly changed Text width/height, and added a fallback in Text so `lines=3/0` truncates reliably with only its own width/height constraints.
### v3.3.17 (2026-02-25)
#### Fixes
- **TX-Fix.25** Fixed missed `lines=3/0` truncation when width and height were declared only on Text itself. Removed `width:100%` and collapsed `lines=0` global `height:100%` rules that overrode user constraints, giving Text's own dimensions priority.
### v3.3.16 (2026-02-25)
#### Fixes
- **TX-Fix.24** `lines=0` fade appears only when content is truly truncated and not expanded, preventing masks on untruncated text from disrupting button visibility or readability.
### v3.3.15 (2026-02-25)
#### Fixes
- **TX-Fix.23** Removed the built-in “+5 lines” expansion rule. `TextTruncation.handleExpand` returned to generic expansion; examples or applications can implement staged container growth through Frame events.
### v3.3.14 (2026-02-25)
#### Fixes
- **TX-Fix.22** Historical approach: the component once implemented staged growth for `lines=0` plus `Button as="more"`; v3.3.15 moved it to the example layer.
### v3.3.13 (2026-02-25)
#### Fixes
- **TX-Fix.21** Strengthened positioning of `Button as="more"` by explicitly placing `.snowui-text-expand-button` at Text's bottom-right, preventing Button base positioning from returning it to the text flow.
### v3.3.12 (2026-02-25)
#### Fixes
- **TX-Fix.19** Updated the newer contract: `more` is no longer a visibility switch; presence of `