Files
MetonaToast/package.json
T
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

91 lines
2.4 KiB
JSON

{
"name": "@metona-team/metona-toast",
"version": "0.3.0",
"description": "轻量、零依赖、精致美观的Toast通知库。TypeScript源码,开箱即用。",
"type": "module",
"main": "dist/metona-toast.cjs.js",
"module": "dist/metona-toast.esm.js",
"unpkg": "dist/metona-toast.min.js",
"jsdelivr": "dist/metona-toast.min.js",
"types": "dist/metona-toast.d.ts",
"exports": {
".": {
"import": "./dist/metona-toast.esm.js",
"require": "./dist/metona-toast.cjs.js",
"types": "./dist/metona-toast.d.ts"
}
},
"files": [
"dist/",
"src/",
"README.md",
"LICENSE"
],
"scripts": {
"build": "tsc --noEmit && rollup -c",
"dev": "rollup -c -w",
"test": "jest --coverage",
"test:watch": "jest --watch",
"lint": "eslint src/**/*.ts",
"lint:fix": "eslint src/**/*.ts --fix",
"format": "prettier --write src/**/*.ts tests/**/*.ts",
"typecheck": "tsc --noEmit",
"prepublishOnly": "npm run typecheck && npm run lint && npm test && npm run build",
"serve": "bash serve.sh"
},
"repository": {
"type": "git",
"url": "git+https://git.metona.cn/MetonaTeam/MetonaToast.git"
},
"keywords": [
"toast",
"notification",
"alert",
"message",
"snackbar",
"ui",
"component",
"lightweight",
"zero-dependency"
],
"author": "thzxx",
"license": "MIT",
"bugs": {
"url": "https://git.metona.cn/MetonaTeam/MetonaToast/issues"
},
"homepage": "https://git.metona.cn/MetonaTeam/MetonaToast#readme",
"devDependencies": {
"@babel/core": "^7.22.0",
"@babel/plugin-transform-modules-commonjs": "^7.22.0",
"@babel/preset-env": "^7.22.0",
"@babel/preset-typescript": "^7.22.0",
"@rollup/plugin-commonjs": "^25.0.0",
"@rollup/plugin-node-resolve": "^15.0.0",
"@rollup/plugin-terser": "^0.4.0",
"@rollup/plugin-typescript": "^11.1.6",
"@types/jest": "^29.5.0",
"@typescript-eslint/eslint-plugin": "^8.0.0",
"@typescript-eslint/parser": "^8.0.0",
"babel-jest": "^29.5.0",
"eslint": "^8.40.0",
"jest": "^29.5.0",
"jest-environment-jsdom": "^29.5.0",
"prettier": "^2.8.0",
"rollup": "^3.20.0",
"rollup-plugin-dts": "^5.3.0",
"rollup-plugin-livereload": "^2.0.5",
"rollup-plugin-serve": "^2.0.1",
"tslib": "^2.6.0",
"typescript": "^5.0.0"
},
"engines": {
"node": ">=16.0.0"
},
"browserslist": [
"> 1%",
"last 2 versions",
"not dead",
"not ie 11"
]
}