tianhao
|
1f718c4ef8
|
release: v0.5.0 — 覆盖率96.42%达标、lint零警告、覆盖率门禁、CI强化、发布自动化
- 覆盖率 96.42%(行):新增 59 测试共 385 个,覆盖 DOM 交互事件、对话框按钮交互、Intl/localStorage 异常路径、React 渲染生命周期
- 测试环境重构:SSR 分支用 defineProperty 真正覆盖 document/window;新增 tests/dom.test.ts、tests/setup.ts
- jest 覆盖率门禁 lines >= 95%;CI lint 改必过;新增 publish.yml(v* tag 自动发布到 Gitea registry)
- 修复:Toast.off 空数组残留、Toast.on 取消函数 this 绑定、action close:false 冒泡关闭、use() 重复注册钩子、i18n catch 引用错误
- 删除死代码 autoApplySystemTheme;lint 零警告(no-console 策略 + caughtErrorsIgnorePattern)
|
2026-08-08 15:02:51 +08:00 |
|
tianhao
|
bbff631f4f
|
release: v0.4.0 — React 适配器、loading链式id稳定、dragThreshold、RTL适配、dedupe插件
- React 适配器子包:@metona-team/metona-toast/react — useToast() hook + 声明式 <Toast /> 组件,组件卸载自动清理;react 为 optional peerDependency,主包保持零依赖
- loading 链式转换改原地 update:id 稳定不重建 DOM,转换后 duration 恢复默认自动关闭;update() 支持 duration 变更动态重启计时器
- _emit 幽灵实例修复:beforeShow 拦截后的 toast 不再注册进 _toasts
- dragThreshold 配置项(默认 120px,原硬编码);RTL 容器 dir 属性 + 进度条/side 条/色条镜像
- dedupe 预设插件:相同 type+message 自动去重,支持 uninstall
- jest 环境隔离测试独立成 tests/ssr.test.ts(resetModules 不再污染共享模块状态);新增 tests/setup.ts 补 TextEncoder
- 文档:README/docs.html 补 React 适配器、dedupe、dragThreshold;CHANGELOG 更新;328 测试全过
|
2026-08-08 14:45:19 +08:00 |
|
tianhao
|
2937ce5e2d
|
release: v0.3.0 — 自定义动画真实生效、max超限修复、钩子系统完整化、destroy全量清理
- 自定义动画:animations.register() 注册的动画动态注入 keyframes 真实生效(此前仅存 Map 实际 fallback slide)
- max 超限:通过实例注册表真正 close() 最早的 toast(此前仅删内存记录,DOM 残留)
- 钩子收敛:beforeClose/beforeUpdate 支持返回 false 拦截;接入 click/hover/dragStart/dragEnd/animationStart/animationEnd/progressStart/progressEnd/configChange/themeChange/localeChange/beforeInit/afterInit/beforeDestroy/afterDestroy;HOOK_NAMES 移除永不触发的声明
- destroy() 全量清理:hooks、实例注册表、全部 metona-toast-* 样式标签;动画注册表真正清空
- applyThemeVariables 重复注入修复;init() 支持插件对象并复活 _destroyed;AnimationConfig 类型放宽
- VERSION 统一到 constants.ts 唯一维护;删除失效 scripts;新增 .gitattributes 统一 LF
- docs.html 补 v0.2.1 新 API 文档;CHANGELOG 更新;测试 309 用例全过
|
2026-08-08 14:23:41 +08:00 |
|
thzxx
|
bc1128bd1f
|
release: v0.2.1 — bug修复、代码去重、功能增强、覆盖率88.57%
|
2026-07-25 13:01:59 +08:00 |
|
tianhao
|
9a6cd33d90
|
release: v0.2.0 — TypeScript 源码重构
CI / test (18.x) (push) Successful in 9m52s
CI / test (22.x) (push) Canceled after 0s
CI / test (24.x) (push) Canceled after 0s
CI / test (20.x) (push) Canceled after 2m49s
### Changed
- 全部源码从 JavaScript 迁移到 TypeScript (strict mode)
- core.js (1244行) 拆分为 toast.ts + api.ts + templates.ts
- 删除手动维护的 types/index.d.ts,类型从源码自动生成
- 构建工具链: Babel → ts-jest, 新增 @rollup/plugin-typescript
- 新增 rollup-plugin-dts 生成合并 .d.ts
### Added
- tsconfig.json (strict: true)
- src/types.ts 核心类型模块 (39 个导出类型)
- .eslintrc.json (@typescript-eslint)
- .gitea/workflows/ci.yml (Node 18/20/22/24 矩阵)
- CHANGELOG.md
### Aligned with metona-starter
- package.json: type:module, engines≥16, prepublishOnly
- rollup.config.js: dts plugin, port 3001
- jest.config.cjs, build.sh, serve.sh, .gitignore (.npmrc)
### Removed
- babel.config.js, types/ 目录, 所有 src/*.js
|
2026-07-25 11:22:07 +08:00 |
|
thzxx
|
ee2b685f64
|
docs: 更新 README.md 和 site/ 文档页
README.md:
- 特性列表: 80+ → 107 种图标类型,新增全局错误回调和暂停恢复说明
- 全局配置: 添加 onError 示例
- Toast 管理: 添加 getAll() 方法
- 回调: 新增 onError 全局错误回调示例
site/index.html:
- 新增「错误捕获」和「暂停恢复」特性卡片
- TypeScript 卡片更新为「零 phantom 方法」
site/docs.html:
- 回调表添加 onError 条目
site/demo.html:
- 新增 onError 错误捕获演示卡片(含 JS 实现)
|
2026-07-24 14:59:11 +08:00 |
|
thzxx
|
f7d74d152d
|
chore: v0.1.2 — 全面修复、优化与增强
修复:
- core.js: _resume 计时器 BUG (startedAt 被 _startTimer 覆盖导致暂停恢复失效)
- plugins.js: register 在 install 前展开导致 handler 实例丢失
- locales.js: zh-CN/en-US 大量重复 key 覆盖正确翻译值
- core.js: configure 改为原地更新避免 _config 引用断裂
优化:
- core.js: update() 类型变更时同步更新 DOM 类名和进度条颜色
- animations.js: getActiveCount 返回已注册动画数量
- themes.js: 移除 presetThemes 死代码和重复注册循环
- constants.js: THEMES.auto 从字符串改为规范化对象
- index.js: destroy 添加防重复调用保护
增强:
- core.js: 新增 onError 全局错误回调,钩子异常和定时器错误可被外部捕获
- styles.js: _resume 校准时间基准补偿注释
- 139 tests 全部通过
|
2026-07-24 14:42:47 +08:00 |
|
thzxx
|
eebd669b7f
|
chore: 版本号重置为 v0.1.1, 更新 site/ 文档页面移除 v2.0 标记
|
2026-07-24 14:19:53 +08:00 |
|
thzxx
|
b4ffaabedd
|
chore: v2.0.1 - 精简dead code + 版本升级
- utils.js: 950行→180行,移除30+未使用函数
- styles.js: 1800行→650行,移除未使用组件样式和重复规则
- animations.js: 850行→120行,移除Web Animations API dead code
- 全项目版本号升级到 2.0.1
- 测试同步清理,134/134通过
|
2026-07-23 13:18:24 +08:00 |
|
thzxx
|
440b3516a6
|
chore: 官网 Gitee 链接改为 Gitea
|
2026-07-23 12:48:51 +08:00 |
|
thzxx
|
c9704500be
|
chore: 更新仓库地址为实际远程地址 git.metona.cn
- package.json: repository/bugs/homepage 统一替换为 git.metona.cn/MetonaTeam/MetonaToast
- README.md: license badge 链接更新
- site/index.html & demo.html: 页脚和导航 Gitee 链接更新
- 同步构建产物 dist/ 变更
|
2026-07-23 12:45:30 +08:00 |
|
tianhao
|
b85756c7b9
|
fix: 自定义图标按钮改用函数调用,修复onclick引号转义问题
|
2026-06-16 15:35:56 +08:00 |
|
tianhao
|
81a6adc751
|
feat: demo.html添加107种预设图标全展示区块
|
2026-06-16 15:27:09 +08:00 |
|
tianhao
|
1b01bf4b48
|
feat: demo.html扩充到15个功能区块,覆盖项目全部功能
|
2026-06-16 15:23:46 +08:00 |
|
tianhao
|
ccd7306f57
|
feat: 生成favicon.ico并添加到所有页面
|
2026-06-16 15:00:08 +08:00 |
|
tianhao
|
f474b7251a
|
fix: demo页删除非规定的M别名,统一使用MeToast
|
2026-06-16 13:52:18 +08:00 |
|
tianhao
|
a4401c74d2
|
fix: demo页查看数量改用Toast代替alert
|
2026-06-16 13:51:06 +08:00 |
|
tianhao
|
de44c04c35
|
chore: 更新项目地址为gitee.com/thzxx/MetonaToast; author改为thzxx
|
2026-06-16 13:36:17 +08:00 |
|
tianhao
|
3ab10f89a4
|
refactor: examples/→site/ 官网+文档+演示三件套; 更新build.sh/rollup/serve.sh路径
|
2026-06-16 13:32:14 +08:00 |
|