[1.2.2] - 2026-01-08
✨ New Features
- Svelte Framework Support
- Native Component: First-class support for Svelte! Import via standard path:
import { Ticker } from '@tombcato/smart-ticker/svelte'. - Demo Project: Added
examples/svelte-demo, providing a complete integration reference. - Official Site Upgrade: The official demo now fully supports real-time preview and generation of Svelte code.
- Native Component: First-class support for Svelte! Import via standard path:
- Core Functionality Upgrade (Core)
- Intl Support: Added
numberFormatprop forvalue(number type), leveragingIntl.NumberFormatfor internationalized formatting. autoScale: Automatically scales content to fit container (requires parent container with defined dimensions).fadingEdge: Added top/bottom fading edge effects.disableAnimation: Option to disable animation entirely (disabledprop). Useful for static displays.- Easing Enhancements: Added more built-in easing options (e.g.,
easeOutBack) and optimized type support for custom easing functions ((t: number) => number). - Prefix/Suffix Refinement: Improved
prefixandsuffixprops to ensure static text stays stable during layout changes and is excluded from column scrolling logic. - A11y & Reduced Motion: automatically respects system
prefers-reduced-motionpreferences with ARIA support. animateOnMount: Control initial render animation (defaultfalse).onAnimationEnd/@animation-end: Callback when animation completes.
- Intl Support: Added
- Vue Component Sync
- Prop Alignment: Synced
prefix,suffix,autoScale,fadingEdge, andnumberFormatprops to the Vue version. - Intl Support: Optimized reactive logic for
:number-formatto support real-time updates for international formatting.
- Prop Alignment: Synced
- Official Site Overhaul — UI adjustments, more control options in Demo, real-time React/Vue code preview, 100% bilingual (EN/ZH) support, and one-click StackBlitz export.
- Character Presets — Replaced
TickerUtilswithPresetsconstants (NUMBER,ALPHABET,CURRENCY) for easier configuration.
✨ 新功能
-
Svelte 框架支持
- 原生组件: 正式支持 Svelte!可通过标准方式引入:
import { Ticker } from '@tombcato/smart-ticker/svelte'。 - 示例工程: 新增
examples/svelte-demo,提供完整的集成参考。 - 官网升级: 官方演示现已全面支持 Svelte 代码的实时预览与生成。
- 原生组件: 正式支持 Svelte!可通过标准方式引入:
-
核心功能升级 (Core)
- Intl 支持:
value传数字时,支持numberFormat属性,配合Intl.NumberFormat使用, 支持国际化格式化。 autoScale自动大小缩放适配容器,注意需要父控件给定宽高。fadingEdge上下边缘模糊效果。disableAnimation禁用动画(disabled属性)。直接显示最终值,适合无需动画的场景。- 缓动函数增强:增加了更多的内置缓动选项(如 easeOutBack),并优化了自定义 Easing 函数 (
(t: number) => number) 的类型支持。 - 前后缀完善: 完善了
prefix/suffix属性,确保静态文本不参与列滚动逻辑,且在布局切换时保持稳定。 - 无障碍优化 (A11y): ARIA + Screen Reader 支持。自动检测系统
prefers-reduced-motion设置,尊重用户减弱动画的偏好。 animateOnMount— 控制首次加载是否播放动画(默认false)。onAnimationEnd/@animation-end— 动画结束回调。
- Intl 支持:
-
Vue 组件同步
- 属性对齐:为 Vue 版本同步增加了 prefix、suffix、autoScale、fadingEdge 和 numberFormat等 Props。
- Intl 支持:优化了 :number-format 属性的响应式逻辑,使其能配合国际化格式实时更新。
-
官网改造升级 — UI调整,Demo增加更多控制选项,支持 React/Vue 代码实时预览,100% 适配中英双语切换,集成 StackBlitz 一键导出在线运行。
-
预设字符集 — 提供
Presets常量 (NUMBER,ALPHABET,CURRENCY) 替换旧的通过工具类生成方式。