{"versions":{"1.0.0":{"name":"fly-gesture-unlock","version":"1.0.0","description":"Fully functional and powerful web-based gesture unlocking library","author":{"name":"fufei","email":"2543736927@qq.com"},"type":"module","keywords":["gesture unlock"],"main":"./dist/fly-gesture-unlock.js","module":"./dist/fly-gesture-unlock.js","types":"./dist/index.d.ts","exports":{"import":"./dist/fly-gesture-unlock.js","types":"./dist/index.d.ts"},"scripts":{"ins":"npm install --registry https://registry.npmmirror.com/","dev":"vite --host --port 5174","build:lib":"vite build","build:demo":"vite build --config vite-demo.config.ts","docs:dev":"vitepress dev docs","docs:build":"vitepress build docs","docs:preview":"vitepress preview docs","release":"node scripts/release.js","push-remote":"node scripts/push-remote.js"},"homepage":"https://github.com/feiafei27/fly-gesture-unlock","repository":{"type":"git","url":"git+https://github.com/feiafei27/fly-gesture-unlock.git"},"license":"MIT","devDependencies":{"@element-plus/icons-vue":"^2.1.0","@types/node":"^20.8.6","@types/uuid":"^9.0.6","@vitejs/plugin-vue":"^4.4.0","element-plus":"2.4.4","enquirer":"^2.4.1","execa":"^8.0.1","picocolors":"^1.0.0","less":"^4.2.0","semver":"^7.6.0","typescript":"^5.1.3","uuid":"^9.0.1","vite":"^4.3.9","vite-plugin-dts":"^3.6.4","vitepress":"^1.0.0-rc.39","vue":"^3.3.4","vue-tsc":"^1.8.19","vue-router":"^4.3.0"},"_id":"fly-gesture-unlock@1.0.0","bugs":{"url":"https://github.com/feiafei27/fly-gesture-unlock/issues"},"_nodeVersion":"18.18.2","_npmVersion":"9.8.1","dist":{"integrity":"sha512-zU9RuHSRlcvIiiGotOXNv8Oj4XB7qifPHAdX9+P/jJNw6L8FmFy80VNB0pfHvgIw35r1coI5cS3TkQ8h+sMg7w==","shasum":"9eb4a8fba7c998da75d4bbd8bf5085795949b40b","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/fly-gesture-unlock/-/fly-gesture-unlock-1.0.0.tgz","fileCount":7,"unpackedSize":43302,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC6wd7ptthZ6DFE8I4JFqWjzmP9ktNFC37rzsdwUDbsrAIhAJqso/+EoeD1DY8hNTA59Bs4t4fAIwPX6KF1xrzhQojV"}],"size":12392},"_npmUser":{"name":"anonymous","email":"2543736927@qq.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"2543736927@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fly-gesture-unlock_1.0.0_1710253040882_0.757444426717919"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-03-12T14:17:21.067Z","publish_time":1710253041067,"_source_registry_name":"default","contributors":[]},"1.0.1":{"name":"fly-gesture-unlock","version":"1.0.1","description":"Fully functional and powerful web-based gesture unlocking library","author":{"name":"fufei","email":"2543736927@qq.com"},"type":"module","keywords":["gesture unlock"],"main":"./dist/fly-gesture-unlock.js","module":"./dist/fly-gesture-unlock.js","types":"./dist/index.d.ts","exports":{"import":"./dist/fly-gesture-unlock.js","types":"./dist/index.d.ts"},"scripts":{"ins":"npm install --registry https://registry.npmmirror.com/","dev":"vite --host --port 5174","build:lib":"vite build","build:demo":"vite build --config vite-demo.config.ts","docs:dev":"vitepress dev docs","docs:build":"vitepress build docs","docs:preview":"vitepress preview docs","release":"node scripts/release.js","push-remote":"node scripts/push-remote.js"},"homepage":"https://github.com/feiafei27/fly-gesture-unlock","repository":{"type":"git","url":"git+https://github.com/feiafei27/fly-gesture-unlock.git"},"license":"MIT","devDependencies":{"@element-plus/icons-vue":"^2.1.0","@types/node":"^20.8.6","@types/uuid":"^9.0.6","@vitejs/plugin-vue":"^4.4.0","element-plus":"2.4.4","enquirer":"^2.4.1","execa":"^8.0.1","picocolors":"^1.0.0","less":"^4.2.0","semver":"^7.6.0","typescript":"^5.1.3","uuid":"^9.0.1","vite":"^4.3.9","vite-plugin-dts":"^3.6.4","vitepress":"^1.0.0-rc.39","vue":"^3.3.4","vue-tsc":"^1.8.19","vue-router":"^4.3.0"},"_id":"fly-gesture-unlock@1.0.1","gitHead":"c9982bf4ede8329abbcfd878cae7d43d6d60beeb","bugs":{"url":"https://github.com/feiafei27/fly-gesture-unlock/issues"},"_nodeVersion":"18.18.2","_npmVersion":"9.8.1","dist":{"integrity":"sha512-ikGSwADcaPnL8hPboKhlTui1H525vWU923Id+3jbflcZwlKguYCuuvcbtLZbWetQzJ45WUlaKcx7EgfknUKZdA==","shasum":"85331daa7b2e2e2852412738e2013b42a9edca29","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/fly-gesture-unlock/-/fly-gesture-unlock-1.0.1.tgz","fileCount":7,"unpackedSize":43081,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFGBp28+E98Ik/JGaF7paUjXRub3YtIX+coNSdQTihqxAiEAmOYX0pYkyCmgjLEnKqYVDxrrBeYLRF9tFPp+J1fbiB4="}],"size":12393},"_npmUser":{"name":"anonymous","email":"2543736927@qq.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"2543736927@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fly-gesture-unlock_1.0.1_1710298132565_0.6982812966783298"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-03-13T02:48:52.728Z","publish_time":1710298132728,"_source_registry_name":"default","contributors":[]}},"dist-tags":{"latest":"1.0.1"},"name":"fly-gesture-unlock","time":{"created":"2024-03-12T20:19:24.437Z","modified":"2024-03-13T11:53:04.905Z","1.0.0":"2024-03-12T14:17:21.067Z","1.0.1":"2024-03-13T02:48:52.728Z"},"readme":"## ✨ Fly Gesture Unlock\r\n\r\nFully functional and powerful web-based gesture unlocking library, one stop solution for gesture unlocking related services\r\n\r\n## 🎉 All of my open source libraries\r\n> fly-barrage: Web based barrage library, recommended by Gitee.\r\n>\r\n> gitee: https://gitee.com/fei_fei27/fly-barrage;\r\n>\r\n> github: https://github.com/feiafei27/fly-barrage;\r\n\r\n> fly-gesture-unlock: Web based gesture unlocking library.\r\n>\r\n> gitee: https://gitee.com/fei_fei27/fly-gesture-unlock;\r\n>\r\n> github: https://github.com/feiafei27/fly-gesture-unlock;\r\n\r\n## 🎥 Rendering Effects\r\n\r\n![Rendering effects](./public/full-demo.jpg)\r\n\r\n## 📝 Official Website\r\n\r\n<https://fly-gesture-unlock.netlify.app/>\r\n\r\n## 🎄 Online Experience\r\n\r\n<https://fly-gesture-unlock-online.netlify.app/>\r\n\r\n## 📥 Install\r\n\r\n```bash\r\nnpm install fly-gesture-unlock\r\n```\r\n\r\n## 🌍 Usage\r\n```vue\r\n<!-- Taking Vue framework as an example, this library is not limited to specific frameworks. -->\r\n<template>\r\n  <div class=\"page-container\">\r\n    <div\r\n      id=\"container\"\r\n      ref=\"container\"\r\n      style=\"width: 300px; height: 300px;\"\r\n    />\r\n  </div>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\n  import GestureUnlockRenderer, { Anchor } from 'fly-gesture-unlock';\r\n  import { ref, onMounted } from 'vue';\r\n\r\n  // 定义额外状态\r\n  type ExtraStatus = never;\r\n\r\n  const container = ref();\r\n  const gestureUnlockRenderer = ref<GestureUnlockRenderer<ExtraStatus>>();\r\n\r\n  onMounted(() => {\r\n    // 借助提供的辅助函数生成锚点\r\n    const anchorDefines = GestureUnlockRenderer.AnchorMatrixFactory({\r\n      canvasSize: { width: container.value.clientWidth, height: container.value.clientHeight },\r\n      padding: 35,\r\n      matrix: { row: 3, column: 3 },\r\n      anchor: { anchorCircleRadius: 30, centerCircleRadius: 10 },\r\n    });\r\n\r\n    gestureUnlockRenderer.value = new GestureUnlockRenderer<ExtraStatus>({\r\n      container: container.value,\r\n      anchorDefines,\r\n\r\n      anchorStatusStyles: {\r\n        'not-selected': {\r\n          // 锚点圆的边框宽、边框颜色、填充颜色\r\n          anchorCircleBorderWidth: 1,\r\n          anchorCircleBorderColor: '#3ea1e5',\r\n        },\r\n        'selected': {\r\n          // 锚点圆的边框宽、边框颜色、填充颜色\r\n          anchorCircleBorderWidth: 1.5,\r\n          anchorCircleBorderColor: '#128ce8',\r\n          anchorCircleFillColor: '#ffffff',\r\n\r\n          // 中心圆的边框宽、边框颜色、填充颜色\r\n          centerCircleFillColor: '#128ce8'\r\n        },\r\n      },\r\n      lineStatusStyles: {\r\n        'normal': {\r\n          lineColor: '#128ce8',\r\n          lineWidth: 1,\r\n        },\r\n      },\r\n      events: {\r\n        'end': gestureEnd,\r\n      },\r\n    });\r\n  });\r\n\r\n  const gestureEnd = (selectedAnchors: Anchor<ExtraStatus>[]) => {\r\n    const anchorIds = selectedAnchors.map(anchor => anchor.id).join('');\r\n    console.log(anchorIds);\r\n  };\r\n</script>\r\n\r\n<style>\r\n  * {\r\n    padding: 0;\r\n    margin: 0;\r\n  }\r\n\r\n  .page-container {\r\n    height: 100vh;\r\n    display: flex;\r\n    align-items: center;\r\n    justify-content: center;\r\n    background-color: #446693;\r\n  }\r\n\r\n  #container {\r\n    background-color: #ffffff;\r\n  }\r\n</style>\r\n```\r\nFor complete usage, please clone the project directly, install the dependencies, and then execute npm run dev to view the complete usage\r\n\r\nTry to use a higher version of the node version, my local version is v18.19.0\r\n\r\n## 🌲 License\r\n[MIT License](LICENSE)","users":{}}