{"_id":"xshape","_rev":"33-ff4cc0bfc32e17043d18283012057d66","time":{"created":"2023-02-19T10:31:59.436Z","0.0.1":"2023-02-02T09:11:54.037Z","modified":"2023-08-16T07:53:28.350Z","0.0.2":"2023-02-04T14:36:46.095Z","0.0.6":"2023-02-04T14:51:26.920Z","0.0.7":"2023-02-06T08:21:23.244Z","0.0.8":"2023-02-06T08:52:16.626Z","0.0.9":"2023-02-06T09:03:38.655Z","0.0.10":"2023-02-06T09:16:02.647Z","0.0.11":"2023-02-07T06:41:09.724Z","0.0.12":"2023-02-07T06:46:09.001Z","0.0.13":"2023-02-07T06:54:28.052Z","0.0.14":"2023-02-07T07:04:21.592Z","0.0.15":"2023-02-07T07:11:14.106Z","0.0.16":"2023-02-07T07:17:55.337Z","0.1.0":"2023-02-07T07:40:11.909Z","0.1.1":"2023-02-07T08:58:29.912Z","0.1.2":"2023-02-07T09:09:29.403Z","0.1.3":"2023-02-07T09:21:36.742Z","0.1.9":"2023-02-07T09:59:07.800Z","0.1.10":"2023-02-07T10:04:27.488Z","0.1.11":"2023-02-07T10:09:56.870Z","0.1.12":"2023-02-07T10:16:44.574Z","0.1.13":"2023-02-07T10:23:44.483Z","0.1.14":"2023-02-07T10:31:14.226Z","0.1.17":"2023-02-07T10:58:49.211Z","0.1.18":"2023-02-07T11:01:31.292Z","0.1.19":"2023-02-07T11:09:01.194Z","0.1.22":"2023-02-08T03:48:36.861Z","0.0.3":"2023-02-19T10:31:59.595Z","0.0.4":"2023-02-20T04:56:20.126Z","0.0.5":"2023-08-16T07:53:28.195Z"},"name":"xshape","dist-tags":{"latest":"0.0.5"},"versions":{"0.0.3":{"name":"xshape","version":"0.0.3","type":"module","types":"dist/lib/main.d.ts","main":"./dist/xshape.umd.cjs","module":"./dist/xshape.js","exports":{".":{"import":"./dist/xshape.js","require":"./dist/xshape.umd.cjs"}},"scripts":{"dev":"vite","build":"tsc && vite build","build:prod":"tsc && vite build --mode prod","preview":"vite preview"},"dependencies":{"@xstate/react":"^3.0.1","dequal":"^2.0.3","konva":"^8.3.13","react":"^18.2.0","react-dom":"^18.2.0","react-konva":"^18.2.3","use-image":"^1.1.0","xstate":"^4.34.0"},"devDependencies":{"@babel/core":"^7.0.0-0","@babel/plugin-syntax-flow":"^7.14.5","@babel/plugin-transform-react-jsx":"^7.14.9","@types/node":"^18.11.18","@types/react":"^18.0.24","@types/react-dom":"^18.0.8","@vitejs/plugin-react":"^2.2.0","eslint":"^8.0.0","eslint-config-react-app":"^7.0.1","path":"^0.12.7","typescript":"^4.6.4","vite":"^3.2.3","vite-plugin-dts":"^1.7.2"},"peerDependencies":{"react":">=16"},"eslintConfig":{"extends":["react-app"]},"eslintIgnore":["node_modules","dist","*.d.ts"],"prettier":{"arrowParens":"always","bracketSpacing":true,"endOfLine":"auto","printWidth":110,"semi":true,"singleQuote":true,"tabWidth":2,"trailingComma":"all"},"repository":{"type":"git","url":"git+https://github.com/tony40508/xshape.git"},"keywords":["react","typescript","konvajs","xstate"],"author":{"name":"Wei Chen"},"license":"MIT","bugs":{"url":"https://github.com/tony40508/xshape/issues"},"homepage":"https://github.com/tony40508/xshape#readme","gitHead":"32ab5dee2c22f32269922f30f03fd324e9cca23c","description":"[![npm version](https://badge.fury.io/js/xshape.svg)](https://badge.fury.io/js/xshape.svg) [![npm download](https://img.shields.io/npm/dm/xshape.svg?style=flat-square)](https://www.npmjs.com/package/xshape)","_id":"xshape@0.0.3","_nodeVersion":"16.19.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-CehPAKQ0WTpl2hOUGrfySnY0YaXNerWpYpd3POfu5+/OHkmFwg3ptSYVHMdjdqyXhnlObIIhj4opTACxiIF5LQ==","shasum":"ef144516cb220c0b727da05a1ed85acba50f672c","tarball":"https://registry.npmjs.org/xshape/-/xshape-0.0.3.tgz","fileCount":3,"unpackedSize":4154,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEkm0A1KeEVu3DrtWwXIv5uSq6ynIjWPXrivSW0knm0EAiB2KOqp4xGDZ3D1AOICWsMrWCpekiXGgibN4VpJxNXQDA=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj8fqfACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpvQw//RseSw5kBOhWX01BPu1LpBDNyc9hJco/DvOzIouWk4yrr+6UY\r\nBL8qdpEWSOlAmcm7phMakprTlpqNaAnnfLopjZAcFGM74ATGDviVKT3c/fX7\r\npJQHmB8SIDlF+/AI9dnOhJ5WKhALQ+/Rf6JvkPCUOs/EyNrBk1dSHq7gC05b\r\nRLiCSefkHWvMdPpCchmnSrCzmEf8/6urrTIKngmnP6EGthFtLgkP+d5Y4g8+\r\n797Dky4tgaLWz5XGeEcAYKXi1mrmwBsICyXRfgaox/F/kJK5bgqjA6hrAU74\r\nkqppbro3OG8VFCef3aRmeG3yVg+2Q2Sx3A3+X0PY59PTWy86EbT7mfSjLVqt\r\nZZKX2WDUA8ZH/dhEfSUgDlJvh+EARtFFREIVBjOB8uZeZz6FKro4V3S2rL4F\r\naGd5cEohwY9OxayQzNXILO2ERxn1Jj4r7GKqEv2y1fKFw5DAFXntvHfVUyTp\r\niArkiRyAti6xuKTLdWiYXxHOtQilZDomKsVGGi+naU4xtbePAxThxKVvn38j\r\nDmMXU9gB82pIPw71zsYWWdaRx6yNVV4N4Np4DJgIome1kSW3Nt4Z3LsWPHIM\r\nv1Nd0JEnMEi6oamc7NhynHueYUpKb8VJ5U3YNCwFdQ8kq/Ev2CMc6meqbjVj\r\nH2Tt4w9EcWmVy94fSpj6sYB0GX8tS6K8N04=\r\n=SbxC\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"tony40508","email":"tony40508@gmail.com"},"directories":{},"maintainers":[{"name":"tony40508","email":"tony40508@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/xshape_0.0.3_1676802719437_0.17474359472864354"},"_hasShrinkwrap":false},"0.0.4":{"name":"xshape","version":"0.0.4","type":"module","types":"dist/lib/main.d.ts","main":"./dist/xshape.umd.cjs","module":"./dist/xshape.js","exports":{".":{"import":"./dist/xshape.js","require":"./dist/xshape.umd.cjs"}},"scripts":{"dev":"vite","build":"tsc && vite build","build:prod":"tsc && vite build --mode prod","preview":"vite preview"},"dependencies":{"@xstate/react":"^3.0.1","dequal":"^2.0.3","konva":"^8.3.13","react":"^18.2.0","react-dom":"^18.2.0","react-konva":"^18.2.3","use-image":"^1.1.0","xstate":"^4.34.0"},"devDependencies":{"@babel/core":"^7.0.0-0","@babel/plugin-syntax-flow":"^7.14.5","@babel/plugin-transform-react-jsx":"^7.14.9","@types/node":"^18.11.18","@types/react":"^18.0.24","@types/react-dom":"^18.0.8","@vitejs/plugin-react":"^2.2.0","eslint":"^8.0.0","eslint-config-react-app":"^7.0.1","path":"^0.12.7","typescript":"^4.6.4","vite":"^3.2.3","vite-plugin-dts":"^1.7.2"},"peerDependencies":{"react":">=16"},"eslintConfig":{"extends":["react-app"]},"eslintIgnore":["node_modules","dist","*.d.ts"],"prettier":{"arrowParens":"always","bracketSpacing":true,"endOfLine":"auto","printWidth":110,"semi":true,"singleQuote":true,"tabWidth":2,"trailingComma":"all"},"repository":{"type":"git","url":"git+https://github.com/tony40508/xshape.git"},"keywords":["react","typescript","konvajs","xstate"],"author":{"name":"Wei Chen"},"license":"MIT","bugs":{"url":"https://github.com/tony40508/xshape/issues"},"homepage":"https://github.com/tony40508/xshape#readme","gitHead":"494ced358d49abf5e0fa733e5c934bf1eb5c80c2","description":"[![npm version](https://badge.fury.io/js/xshape.svg)](https://badge.fury.io/js/xshape.svg) [![npm download](https://img.shields.io/npm/dm/xshape.svg?style=flat-square)](https://www.npmjs.com/package/xshape)","_id":"xshape@0.0.4","_nodeVersion":"16.19.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-ARAZGWIADPhaopmZmFTo356apgJSuEVGSqGYPoxiU1oVCAMDqsWxocsMp3/PImGgWXgDobDmyeHoFKbLQFDHaw==","shasum":"0260a32be2087c6e95578e8aff027f3e29f5c213","tarball":"https://registry.npmjs.org/xshape/-/xshape-0.0.4.tgz","fileCount":20,"unpackedSize":1439154,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAJSBP7dCtIIqstx35ESsk3jrJJvQBZLCKJNMFxNZ8uCAiAP6qtriMRilR5oenLRVOzrJ4+APtym+CzkhLe1u9ocSQ=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj8v10ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpfSA//fjJYXFMXVzxCtLOLRiyrXfc7jIf8YxtMEETHTbDR2kAZwubb\r\nzmb6HZ+rTQBPRC8Er+B+N0iL2Pvf/mHqXhaw4oLTnFBdmvys5nEEuAqcuBN7\r\nvVfrosE/Pm4rjyVGRJdRrjIIqLj2faeNYu3mu/r2ORtUdGVguSN7jf9XKeez\r\nyUHg5dM0zVfn6AUC6MjP+vuh/O+5SeuJlL1AH0coE3S8hjzUAho2V45PKInz\r\nPA8jvSp2z0Zhuya896f/UgC8cOYFoPst1cAzS9jNphBiCsBcQvDwbCrITCnp\r\nU2WEHhc7nknitaj0dAmUXaOslrgbsUwEBAC5GLuUU6n0Qv4XlJR0fQb0pZTH\r\nkEDctzM944EaaTmtTRVaHB25oCYci30HT+khVqi+miLs31NcuPVd4icSfgdy\r\nF0uYuMmqKHIr4Su+pLw4eZX8Ofu2DOs4b2BgsqUFR5O7i/ZBO7ijhdibNHM8\r\nxf2oewyxMcgQDQa9tRQb4ayCx7YGNGxkKXeKazJkJstS+pJFwZkdeCL94OoQ\r\n9efEp8C8YQ/GdZnpJKmDSY+utDDI3dD192PH4XJURKPAT0MvJMPSV1vcWvBm\r\nbO064GiQ3pdmGlt7qRdG7LT1P5rvFZT3xAXtjmUWB6yTUax8a7pDUbiJy5f2\r\n24MsAyYQUkPh22UVSLMIQ9m0RPDh18KoiQI=\r\n=EOug\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"tony40508","email":"tony40508@gmail.com"},"directories":{},"maintainers":[{"name":"tony40508","email":"tony40508@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/xshape_0.0.4_1676868979893_0.39014458400573626"},"_hasShrinkwrap":false},"0.0.5":{"name":"xshape","version":"0.0.5","type":"module","types":"dist/lib/main.d.ts","main":"./dist/xshape.umd.cjs","module":"./dist/xshape.js","exports":{".":{"import":"./dist/xshape.js","require":"./dist/xshape.umd.cjs"}},"scripts":{"dev":"vite","build":"tsc && vite build","build:prod":"tsc && vite build --mode prod","preview":"vite preview"},"dependencies":{"@xstate/react":"^3.0.1","dequal":"^2.0.3","konva":"^8.3.13","react":"^18.2.0","react-dom":"^18.2.0","react-konva":"^18.2.3","use-image":"^1.1.0","xshape":"latest","xstate":"^4.34.0"},"devDependencies":{"@babel/core":"^7.0.0-0","@babel/plugin-syntax-flow":"^7.14.5","@babel/plugin-transform-react-jsx":"^7.14.9","@types/node":"^18.11.18","@types/react":"^18.0.24","@types/react-dom":"^18.0.8","@vitejs/plugin-react":"^2.2.0","eslint":"^8.0.0","eslint-config-react-app":"^7.0.1","path":"^0.12.7","typescript":"^4.6.4","vite":"^3.2.3","vite-plugin-dts":"^1.7.2"},"peerDependencies":{"react":">=16"},"eslintConfig":{"extends":["react-app"]},"eslintIgnore":["node_modules","dist","*.d.ts"],"prettier":{"arrowParens":"always","bracketSpacing":true,"endOfLine":"auto","printWidth":110,"semi":true,"singleQuote":true,"tabWidth":2,"trailingComma":"all"},"repository":{"type":"git","url":"git+https://github.com/tony40508/xshape.git"},"keywords":["react","typescript","konvajs","xstate"],"author":{"name":"Wei Chen"},"license":"MIT","bugs":{"url":"https://github.com/tony40508/xshape/issues"},"homepage":"https://github.com/tony40508/xshape#readme","gitHead":"35033fbf77dd8a9fcc111528d2a22ae6964d278c","description":"[![npm version](https://badge.fury.io/js/xshape.svg)](https://badge.fury.io/js/xshape.svg) [![npm download](https://img.shields.io/npm/dm/xshape.svg?style=flat-square)](https://www.npmjs.com/package/xshape)","_id":"xshape@0.0.5","_nodeVersion":"16.20.1","_npmVersion":"8.19.4","dist":{"integrity":"sha512-6pCf46BEwOz2UpLcH1g1VwGZ2TnFGhVAoXz60JDVR1q3I6qqilKQXLXYAbm7EipTYUTU6TUo06lFzv2eglDKZA==","shasum":"d03422767d0024ff51bd20fff03bb382327a552b","tarball":"https://registry.npmjs.org/xshape/-/xshape-0.0.5.tgz","fileCount":20,"unpackedSize":1439251,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGj2+N+lLXMqqP7ePAtzYTNdy9ENMdjwUulZOBFEzx4OAiEAjMs4ATpJH4UaXfYQPll8bG/OhHoJG84Xm5TaPCzKfZ4="}]},"_npmUser":{"name":"tony40508","email":"tony40508@gmail.com"},"directories":{},"maintainers":[{"name":"tony40508","email":"tony40508@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/xshape_0.0.5_1692172407981_0.5319937995275978"},"_hasShrinkwrap":false}},"maintainers":[{"name":"tony40508","email":"tony40508@gmail.com"}],"description":"[![npm version](https://badge.fury.io/js/xshape.svg)](https://badge.fury.io/js/xshape.svg) [![npm download](https://img.shields.io/npm/dm/xshape.svg?style=flat-square)](https://www.npmjs.com/package/xshape)","homepage":"https://github.com/tony40508/xshape#readme","keywords":["react","typescript","konvajs","xstate"],"repository":{"type":"git","url":"git+https://github.com/tony40508/xshape.git"},"author":{"name":"Wei Chen"},"bugs":{"url":"https://github.com/tony40508/xshape/issues"},"license":"MIT","readme":"# xshape\n\n[![npm version](https://badge.fury.io/js/xshape.svg)](https://badge.fury.io/js/xshape.svg)\n[![npm download](https://img.shields.io/npm/dm/xshape.svg?style=flat-square)](https://www.npmjs.com/package/xshape)\n\n## Install\n\n[![NPM](https://nodei.co/npm/xshape.png)](https://nodei.co/npm/xshape/)\n\n```bash\nnpm install xshape\n```\n\n## Usage\n\n```js\nimport { useXShape, XShapeStage, URLImage, createRootMachine } from 'xshape';\n\n// url is optional\n// data format see: https://github.com/tony40508/xshape/blob/main/public/mockData.json\nconst rootMachine = createRootMachine('initial-shape-data-url');\n\nfunction App() {\n  const {\n    componentProps,\n    // other props see: https://github.com/tony40508/xshape/blob/main/src/App.tsx\n  } = useXShape(rootMachine);\n\n  return (\n    <XShapeStage\n      {...componentProps}\n      // enable to configure finish condition in limited options\n      // see: https://github.com/tony40508/xshape/blob/main/src/utils/types.d.ts\n      handleMouseDown={(e) => {\n        componentProps.handleMouseDown(e, 'ctrl+click');\n      }}\n    >\n      {/* URLImage is optional */}\n      <URLImage url=\"background-image-url\" />\n    </XShapeStage>\n  );\n}\n```\n\n## Run the example locally\n\n```bash\nnpm install\nnpm run dev\n```\n","readmeFilename":"README.md"}