react-screenshots 0.5.1 → 0.5.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/style.css CHANGED
@@ -1 +1 @@
1
- @font-face{font-family:screenshots-icon;src:url(data:font/woff2;base64,d09GMgABAAAAAAZYAAsAAAAADKgAAAYKAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHFQGYACDfAqKLIhJATYCJAMwCxoABCAFhUcHgQAb6QrILjGFawcSSCzDZuiIqeA+75Tu1r4heP5fp96nLxkkOwhUmIBwakdUSggj8dSRyDmdmP3/v2e9YsjsOCtlpI68YLtQmt4kZXqSN+LXCmO2C/Fv90v4tUEmt3UrwUwiDCzhRBNKIS+VhIsbwuYpUwbcwRfO/tJ+v6reiDo8hHD/+7ZDTbM3TUTr9w71RhJrhE6IEQ3Y1a4XkvASBDApIh15W/6CFchzGo0tKBgl3FoBs6dM03M0cr5nooeECq4UR9wrdWQNBmhLtTvAavXv5Q0l4gwahoK7T68JeTp02cdnKdtvg3qKvAYBR2uAASggr2bZMim8cAwKvTEPBaZfoZIK0usI+Cz/f/CJbKn35WDiRkPHQOHCasE/nhPEAcceeG5ossAnYhJM8GlJcINPEW6pg1ClAQLSASKedCIdF2yw5C3dSEcgTRBppAUEjjpdEQUiHCTrQDPhAoaRL2jEorpr/QUVkzRNSepUlpwcEID3D4sjwt1DpnpsO4o0e8vw1tFOQoGbT9p6iXL30WON9mrXrRsQ9gbXgGWbZNK5ydUeecktcPmVx2xq2UZo2hoD01uX+a9oHpWpTYeC6zX7QKDarVI12wHVbshETJ4QzRYLAsXyMQU9ThxwwX6sOUg3k23dOo643Xa3Hx9vQ0sbcX/gffrTcHSE4Noa10LLmF0mD/rfY5wbUSC7PwAiskYaj2311zU30Nsu1OlDy9KzHYuW2anTl5aDbJw9U/c0Zno7+sz03HqkYcLNq0vh2+wyw1veaKtmyzFnZq5LfkMAZNpuYhvBQUtAXIYgyruGDrrwCtdlF7sD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AAMAAQQJAAsAJgHDQ3JlYXRlZCBieSBpY29uZm9udHNjcmVlbnNob3RzLWljb25SZWd1bGFyc2NyZWVuc2hvdHMtaWNvbnNjcmVlbnNob3RzLWljb25WZXJzaW9uIDEuMHNjcmVlbnNob3RzLWljb25HZW5lcmF0ZWQgYnkgc3ZnMnR0ZiBmcm9tIEZvbnRlbGxvIHByb2plY3QuaHR0cDovL2ZvbnRlbGxvLmNvbQBDAHIAZQBhAHQAZQBkACAAYgB5ACAAaQBjAG8AbgBmAG8AbgB0AHMAYwByAGUAZQBuAHMAaABvAHQAcwAtAGkAYwBvAG4AUgBlAGcAdQBsAGEAcgBzAGMAcgBlAGUAbgBzAGgAbwB0AHMALQBpAGMAbwBuAHMAYwByAGUAZQBuAHMAaABvAHQAcwAtAGkAYwBvAG4AVgBlAHIAcwBpAG8AbgAgADEALgAwAHMAYwByAGUAZQBuAHMAaABvAHQAcwAtAGkAYwBvAG4ARwBlAG4AZQByAGEAdABlAGQAIABiAHkAIABzAHYAZwAyAHQAdABmACAAZgByAG8AbQAgAEYAbwBuAHQAZQBsAGwAbwAgAHAAcgBvAGoAZQBjAHQALgBoAHQAdABwADoALwAvAGYAbwBuAHQAZQBsAGwAbwAuAGMAbwBtAAACAAAAAAAAAAoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwBAgEDAQQBBQEGAQcBCAEJAQoBCwEMAQ0ABWFycm93BHNhdmUGbW9zYWljBHJlZG8EdW5kbwdlbGxpcHNlCXJlY3RhbmdsZQR0ZXh0BmNhbmNlbAJvawVicnVzaAAA) format("truetype")}[class^=icon-],[class*=" icon-"]{font-family:screenshots-icon!important;font-style:normal;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-ok:before{content:"\e001"}.icon-cancel:before{content:"\e002"}.icon-save:before{content:"\e003"}.icon-redo:before{content:"\e004"}.icon-undo:before{content:"\e005"}.icon-mosaic:before{content:"\e006"}.icon-text:before{content:"\e007"}.icon-brush:before{content:"\e008"}.icon-arrow:before{content:"\e009"}.icon-ellipse:before{content:"\e00a"}.icon-rectangle:before{content:"\e00b"}.screenshots{position:relative;transform:translateZ(0);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,apple color emoji,segoe ui emoji,Segoe UI Symbol,noto color emoji}.screenshots,.screenshots *{box-sizing:border-box;user-select:none}.screenshots-magnifier{position:absolute;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,apple color emoji,segoe ui emoji,Segoe UI Symbol,noto color emoji;left:0;top:0;width:100px;box-shadow:0 0 8px #000;z-index:9}.screenshots-magnifier,.screenshots-magnifier *{box-sizing:border-box;user-select:none}.screenshots-magnifier-body{position:relative;background-color:#fff}.screenshots-magnifier-body:before{content:"";background-color:#0a72a1;position:absolute;top:50%;left:0;width:100%;height:2px;z-index:1}.screenshots-magnifier-body:after{content:"";background-color:#0a72a1;position:absolute;top:0;left:50%;width:2px;height:100%;z-index:1}.screenshots-magnifier-body-canvas{display:block;width:100px;height:80px}.screenshots-magnifier-footer{height:40px;color:#fff;font-size:11px;background-color:#5f5e5e;padding:4px;white-space:nowrap;overflow:hidden;text-align:center}.screenshots-magnifier-footer-item{height:18px;line-height:18px}.screenshots-background{width:100%;height:100%;position:relative}.screenshots-background-image{width:100%;height:100%;display:block;border:none;outline:none;image-rendering:-webkit-optimize-contrast;image-rendering:crisp-edges;-webkit-font-smooting:antialiased}.screenshots-background-mask{width:100%;height:100%;position:absolute;top:0;right:0;bottom:0;left:0;background-color:#ffffff1a}.screenshots-canvas{position:absolute}.screenshots-canvas-body{width:100%;height:100%;position:absolute;top:0;right:0;bottom:0;left:0;overflow:hidden}.screenshots-canvas-border-top{position:absolute;left:0;top:0;width:100%;height:2px;transform:translateY(-50%);background-color:#39f;pointer-events:none}.screenshots-canvas-border-right{position:absolute;left:100%;top:0;width:2px;height:100%;transform:translate(-50%);background-color:#39f;pointer-events:none}.screenshots-canvas-border-bottom{position:absolute;left:0;top:100%;width:100%;height:2px;transform:translateY(-50%);background-color:#39f;pointer-events:none}.screenshots-canvas-border-left{position:absolute;left:0;top:0;width:2px;height:100%;transform:translate(-50%);background-color:#39f;pointer-events:none}.screenshots-canvas-point-top{width:8px;height:8px;position:absolute;left:50%;top:0;background-color:#39f;border-radius:50%;transform:translate(-50%,-50%);cursor:ns-resize}.screenshots-canvas-point-top-right{width:8px;height:8px;position:absolute;left:100%;top:0;background-color:#39f;border-radius:50%;transform:translate(-50%,-50%);cursor:nesw-resize}.screenshots-canvas-point-right{width:8px;height:8px;position:absolute;left:100%;top:50%;background-color:#39f;border-radius:50%;transform:translate(-50%,-50%);cursor:ew-resize}.screenshots-canvas-point-right-bottom{width:8px;height:8px;position:absolute;left:100%;top:100%;background-color:#39f;border-radius:50%;transform:translate(-50%,-50%);cursor:nwse-resize}.screenshots-canvas-point-bottom{width:8px;height:8px;position:absolute;left:50%;top:100%;background-color:#39f;border-radius:50%;transform:translate(-50%,-50%);cursor:ns-resize}.screenshots-canvas-point-bottom-left{width:8px;height:8px;position:absolute;left:0;top:100%;background-color:#39f;border-radius:50%;transform:translate(-50%,-50%);cursor:nesw-resize}.screenshots-canvas-point-left{width:8px;height:8px;position:absolute;left:0;top:50%;background-color:#39f;border-radius:50%;transform:translate(-50%,-50%);cursor:ew-resize}.screenshots-canvas-point-left-top{width:8px;height:8px;position:absolute;left:0;top:0;background-color:#39f;border-radius:50%;transform:translate(-50%,-50%);cursor:nwse-resize}.screenshots-option{position:absolute;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,apple color emoji,segoe ui emoji,Segoe UI Symbol,noto color emoji}.screenshots-option,.screenshots-option *{box-sizing:border-box;user-select:none}.screenshots-option-container{height:34px;padding:3px;border-radius:2px;border:1px solid #ddd;background-color:#fff}.screenshots-option-arrow{position:absolute;border:6px solid transparent}.screenshots-option[data-placement=top]{transform:translate(-50%,-11px)}.screenshots-option[data-placement=top] .screenshots-option-arrow{transform:translate(-50%,-1px);border-top-color:#fff;top:100%;left:50%}.screenshots-option[data-placement=bottom]{transform:translate(-50%,11px)}.screenshots-option[data-placement=bottom] .screenshots-option-arrow{transform:translate(-50%,1px);border-bottom-color:#fff;bottom:100%;left:50%}.screenshots-button{width:26px;height:26px;line-height:26px;color:#555;font-size:18px;text-align:center;margin:0 3px;vertical-align:middle;cursor:pointer}.screenshots-button-checked,.screenshots-button:hover{background-color:#eee;outline:1px solid #777}.screenshots-button-disabled{color:#ccc;cursor:not-allowed}.screenshots-button-disabled:hover{background-color:#fff;outline:none}.screenshots-size{height:24px;display:flex;align-items:center}.screenshots-size-item{width:24px;height:24px;position:relative;margin:0 3px;cursor:pointer}.screenshots-size-pointer{background-color:#555;border-radius:50%;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.screenshots-size-active>.screenshots-size-pointer{background-color:#39f}.screenshots-color{height:24px;display:flex;align-items:center}.screenshots-color-item{border:1px solid #777;width:24px;height:24px;cursor:pointer;position:relative;margin:0 3px}.screenshots-color-item:before{content:"";display:none;position:absolute;right:0;bottom:0;width:10px;height:10px;background-color:#333}.screenshots-color-item:after{content:"";display:none;width:8px;height:4px;position:absolute;right:5px;bottom:5px;border-bottom:2px solid #fff;border-left:2px solid #fff;transform:translate(5px,2px) rotate(-45deg) scale(.8)}.screenshots-color-active:before,.screenshots-color-active:after{display:block}.screenshots-sizecolor{height:24px;display:flex;align-items:center}.screenshots-textarea{box-sizing:border-box;position:absolute;margin:0;padding:0;background-color:transparent;border:2px solid #39f;resize:none;outline:none;white-space:nowrap;word-break:break-all;overflow:hidden;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,apple color emoji,segoe ui emoji,Segoe UI Symbol,noto color emoji;text-align:left}.screenshots-operations{position:absolute}.screenshots-operations-buttons{display:flex;align-items:center;padding:3px;border-radius:2px;border:1px solid #ddd;background-color:#fff;overflow:hidden}.screenshots-operations-divider{background-color:#ddd;width:1px;height:26px;margin:0 3px}
1
+ @font-face{font-family:screenshots-icon;src:url(data:font/woff2;base64,d09GMgABAAAAAAZYAAsAAAAADKgAAAYKAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHFQGYACDfAqKLIhJATYCJAMwCxoABCAFhUcHgQAb6QrILjGFawcSSCzDZuiIqeA+75Tu1r4heP5fp96nLxkkOwhUmIBwakdUSggj8dSRyDmdmP3/v2e9YsjsOCtlpI68YLtQmt4kZXqSN+LXCmO2C/Fv90v4tUEmt3UrwUwiDCzhRBNKIS+VhIsbwuYpUwbcwRfO/tJ+v6reiDo8hHD/+7ZDTbM3TUTr9w71RhJrhE6IEQ3Y1a4XkvASBDApIh15W/6CFchzGo0tKBgl3FoBs6dM03M0cr5nooeECq4UR9wrdWQNBmhLtTvAavXv5Q0l4gwahoK7T68JeTp02cdnKdtvg3qKvAYBR2uAASggr2bZMim8cAwKvTEPBaZfoZIK0usI+Cz/f/CJbKn35WDiRkPHQOHCasE/nhPEAcceeG5ossAnYhJM8GlJcINPEW6pg1ClAQLSASKedCIdF2yw5C3dSEcgTRBppAUEjjpdEQUiHCTrQDPhAoaRL2jEorpr/QUVkzRNSepUlpwcEID3D4sjwt1DpnpsO4o0e8vw1tFOQoGbT9p6iXL30WON9mrXrRsQ9gbXgGWbZNK5ydUeecktcPmVx2xq2UZo2hoD01uX+a9oHpWpTYeC6zX7QKDarVI12wHVbshETJ4QzRYLAsXyMQU9ThxwwX6sOUg3k23dOo643Xa3Hx9vQ0sbcX/gffrTcHSE4Noa10LLmF0mD/rfY5wbUSC7PwAiskYaj2311zU30Nsu1OlDy9KzHYuW2anTl5aDbJw9U/c0Zno7+sz03HqkYcLNq0vh2+wyw1veaKtmyzFnZq5LfkMAZNpuYhvBQUtAXIYgyruGDrrwCtdlF7sDoOVUSBtz12b/4bDxqPao7rzxrPGw5oNuyzNPVZ7K5PvbY7tiNC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ob3RzLWljb25SZWd1bGFyc2NyZWVuc2hvdHMtaWNvbnNjcmVlbnNob3RzLWljb25WZXJzaW9uIDEuMHNjcmVlbnNob3RzLWljb25HZW5lcmF0ZWQgYnkgc3ZnMnR0ZiBmcm9tIEZvbnRlbGxvIHByb2plY3QuaHR0cDovL2ZvbnRlbGxvLmNvbQBDAHIAZQBhAHQAZQBkACAAYgB5ACAAaQBjAG8AbgBmAG8AbgB0AHMAYwByAGUAZQBuAHMAaABvAHQAcwAtAGkAYwBvAG4AUgBlAGcAdQBsAGEAcgBzAGMAcgBlAGUAbgBzAGgAbwB0AHMALQBpAGMAbwBuAHMAYwByAGUAZQBuAHMAaABvAHQAcwAtAGkAYwBvAG4AVgBlAHIAcwBpAG8AbgAgADEALgAwAHMAYwByAGUAZQBuAHMAaABvAHQAcwAtAGkAYwBvAG4ARwBlAG4AZQByAGEAdABlAGQAIABiAHkAIABzAHYAZwAyAHQAdABmACAAZgByAG8AbQAgAEYAbwBuAHQAZQBsAGwAbwAgAHAAcgBvAGoAZQBjAHQALgBoAHQAdABwADoALwAvAGYAbwBuAHQAZQBsAGwAbwAuAGMAbwBtAAACAAAAAAAAAAoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwBAgEDAQQBBQEGAQcBCAEJAQoBCwEMAQ0ABWFycm93BHNhdmUGbW9zYWljBHJlZG8EdW5kbwdlbGxpcHNlCXJlY3RhbmdsZQR0ZXh0BmNhbmNlbAJvawVicnVzaAAA) format("truetype")}[class^=icon-],[class*=" icon-"]{font-family:screenshots-icon!important;font-style:normal;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-ok:before{content:"\e001"}.icon-cancel:before{content:"\e002"}.icon-save:before{content:"\e003"}.icon-redo:before{content:"\e004"}.icon-undo:before{content:"\e005"}.icon-mosaic:before{content:"\e006"}.icon-text:before{content:"\e007"}.icon-brush:before{content:"\e008"}.icon-arrow:before{content:"\e009"}.icon-ellipse:before{content:"\e00a"}.icon-rectangle:before{content:"\e00b"}.screenshots{position:relative;transform:translateZ(0);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,apple color emoji,segoe ui emoji,Segoe UI Symbol,noto color emoji}.screenshots,.screenshots *{box-sizing:border-box;user-select:none}.screenshots-magnifier{position:absolute;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,apple color emoji,segoe ui emoji,Segoe UI Symbol,noto color emoji;left:0;top:0;width:100px;box-shadow:0 0 8px #000;z-index:9}.screenshots-magnifier,.screenshots-magnifier *{box-sizing:border-box;user-select:none}.screenshots-magnifier-body{position:relative;background-color:#fff}.screenshots-magnifier-body:before{content:"";background-color:#0a72a1;position:absolute;top:50%;left:0;width:100%;height:2px;z-index:1}.screenshots-magnifier-body:after{content:"";background-color:#0a72a1;position:absolute;top:0;left:50%;width:2px;height:100%;z-index:1}.screenshots-magnifier-body-canvas{display:block;width:100px;height:80px}.screenshots-magnifier-footer{height:40px;color:#fff;font-size:11px;background-color:#5f5e5e;padding:4px;white-space:nowrap;overflow:hidden;text-align:center}.screenshots-magnifier-footer-item{height:18px;line-height:18px}.screenshots-background{width:100%;height:100%;position:relative}.screenshots-background-image{width:100%;height:100%;display:block;border:none;outline:none;image-rendering:-webkit-optimize-contrast;image-rendering:crisp-edges;-webkit-font-smooting:antialiased}.screenshots-background-mask{width:100%;height:100%;position:absolute;top:0;right:0;bottom:0;left:0;background-color:#0000004d}.screenshots-canvas{position:absolute;left:0;top:0}.screenshots-canvas-body,.screenshots-canvas-mask{width:100%;height:100%;position:absolute;top:0;right:0;bottom:0;left:0;overflow:hidden}.screenshots-canvas-image{width:100%;height:100%;display:block;border:none;outline:none;image-rendering:-webkit-optimize-contrast;image-rendering:crisp-edges;-webkit-font-smooting:antialiased}.screenshots-canvas-panel{position:absolute;left:0;top:0;right:0;bottom:0;width:100%;height:100%}.screenshots-canvas-border-top{position:absolute;left:0;top:0;width:100%;height:2px;transform:translateY(-50%);background-color:#39f;pointer-events:none}.screenshots-canvas-border-right{position:absolute;left:100%;top:0;width:2px;height:100%;transform:translate(-50%);background-color:#39f;pointer-events:none}.screenshots-canvas-border-bottom{position:absolute;left:0;top:100%;width:100%;height:2px;transform:translateY(-50%);background-color:#39f;pointer-events:none}.screenshots-canvas-border-left{position:absolute;left:0;top:0;width:2px;height:100%;transform:translate(-50%);background-color:#39f;pointer-events:none}.screenshots-canvas-point-top{width:8px;height:8px;position:absolute;left:50%;top:0;background-color:#39f;border-radius:50%;transform:translate(-50%,-50%);cursor:ns-resize}.screenshots-canvas-point-top-right{width:8px;height:8px;position:absolute;left:100%;top:0;background-color:#39f;border-radius:50%;transform:translate(-50%,-50%);cursor:nesw-resize}.screenshots-canvas-point-right{width:8px;height:8px;position:absolute;left:100%;top:50%;background-color:#39f;border-radius:50%;transform:translate(-50%,-50%);cursor:ew-resize}.screenshots-canvas-point-right-bottom{width:8px;height:8px;position:absolute;left:100%;top:100%;background-color:#39f;border-radius:50%;transform:translate(-50%,-50%);cursor:nwse-resize}.screenshots-canvas-point-bottom{width:8px;height:8px;position:absolute;left:50%;top:100%;background-color:#39f;border-radius:50%;transform:translate(-50%,-50%);cursor:ns-resize}.screenshots-canvas-point-bottom-left{width:8px;height:8px;position:absolute;left:0;top:100%;background-color:#39f;border-radius:50%;transform:translate(-50%,-50%);cursor:nesw-resize}.screenshots-canvas-point-left{width:8px;height:8px;position:absolute;left:0;top:50%;background-color:#39f;border-radius:50%;transform:translate(-50%,-50%);cursor:ew-resize}.screenshots-canvas-point-left-top{width:8px;height:8px;position:absolute;left:0;top:0;background-color:#39f;border-radius:50%;transform:translate(-50%,-50%);cursor:nwse-resize}.screenshots-option{position:absolute;left:0;top:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,apple color emoji,segoe ui emoji,Segoe UI Symbol,noto color emoji}.screenshots-option,.screenshots-option *{box-sizing:border-box;user-select:none}.screenshots-option-container{height:34px;padding:3px;border-radius:2px;border:1px solid #ddd;background-color:#fff}.screenshots-option-arrow{position:absolute;border:6px solid transparent}.screenshots-option[data-placement=top]{transform:translate(-50%,-11px)}.screenshots-option[data-placement=top] .screenshots-option-arrow{transform:translate(-50%,-1px);border-top-color:#fff;top:100%;left:50%}.screenshots-option[data-placement=bottom]{transform:translate(-50%,11px)}.screenshots-option[data-placement=bottom] .screenshots-option-arrow{transform:translate(-50%,1px);border-bottom-color:#fff;bottom:100%;left:50%}.screenshots-button{width:26px;height:26px;line-height:26px;color:#333;font-size:18px;text-align:center;margin:0 3px;vertical-align:middle;cursor:pointer}.screenshots-button-checked,.screenshots-button:hover{background-color:#eee;outline:1px solid #777}.screenshots-button-disabled{color:#bbb;cursor:not-allowed}.screenshots-button-disabled:hover{background-color:#fff;outline:none}.screenshots-size{height:24px;display:flex;align-items:center}.screenshots-size-item{width:24px;height:24px;position:relative;margin:0 3px;cursor:pointer}.screenshots-size-pointer{background-color:#555;border-radius:50%;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.screenshots-size-active>.screenshots-size-pointer{background-color:#39f}.screenshots-color{height:24px;display:flex;align-items:center}.screenshots-color-item{border:1px solid #777;width:24px;height:24px;cursor:pointer;position:relative;margin:0 3px}.screenshots-color-item:before{content:"";display:none;position:absolute;right:0;bottom:0;width:10px;height:10px;background-color:#333}.screenshots-color-item:after{content:"";display:none;width:8px;height:4px;position:absolute;right:5px;bottom:5px;border-bottom:2px solid #fff;border-left:2px solid #fff;transform:translate(5px,2px) rotate(-45deg) scale(.8)}.screenshots-color-active:before,.screenshots-color-active:after{display:block}.screenshots-sizecolor{height:24px;display:flex;align-items:center}.screenshots-textarea{box-sizing:border-box;position:absolute;left:0;top:0;margin:0;padding:0;background-color:transparent;border:2px solid #39f;resize:none;outline:none;white-space:nowrap;word-break:break-all;overflow:hidden;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,apple color emoji,segoe ui emoji,Segoe UI Symbol,noto color emoji;text-align:left}.screenshots-operations{position:absolute;left:0;top:0}.screenshots-operations-buttons{display:flex;align-items:center;padding:3px;border-radius:2px;border:1px solid #ddd;background-color:#fff;overflow:hidden}.screenshots-operations-divider{background-color:#ddd;width:1px;height:26px;margin:0 3px}
@@ -1,3 +1,4 @@
1
- import { ReactElement } from 'react';
1
+ import React from 'react';
2
2
  import './index.less';
3
- export default function ScreenshotsBackground(): ReactElement | null;
3
+ declare const _default: React.NamedExoticComponent<object>;
4
+ export default _default;
@@ -1,4 +1,4 @@
1
- import { ReactElement, ReactNode } from 'react';
1
+ import React, { ReactNode } from 'react';
2
2
  import './index.less';
3
3
  export interface ScreenshotsButtonProps {
4
4
  title: string;
@@ -8,4 +8,5 @@ export interface ScreenshotsButtonProps {
8
8
  option?: ReactNode;
9
9
  onClick?: (e: PointerEvent) => unknown;
10
10
  }
11
- export default function ScreenshotsButton({ title, icon, checked, disabled, option, onClick }: ScreenshotsButtonProps): ReactElement;
11
+ declare const _default: React.NamedExoticComponent<ScreenshotsButtonProps>;
12
+ export default _default;
@@ -11,5 +11,5 @@ export declare enum ResizePoints {
11
11
  ResizeLeftTop = "left-top",
12
12
  Move = "move"
13
13
  }
14
- declare const _default: React.ForwardRefExoticComponent<React.RefAttributes<CanvasRenderingContext2D>>;
14
+ declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<React.RefAttributes<CanvasRenderingContext2D>>>;
15
15
  export default _default;
@@ -1,7 +1,8 @@
1
- import { ReactElement } from 'react';
1
+ import React from 'react';
2
2
  import './index.less';
3
3
  export interface ColorProps {
4
4
  value: string;
5
5
  onChange: (value: string) => void;
6
6
  }
7
- export default function ScreenshotsColor({ value, onChange }: ColorProps): ReactElement;
7
+ declare const _default: React.NamedExoticComponent<ColorProps>;
8
+ export default _default;
@@ -1,7 +1,8 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import './index.less';
3
3
  export interface ScreenshotsMagnifierProps {
4
4
  x: number;
5
5
  y: number;
6
6
  }
7
- export default function ScreenshotsMagnifier({ x, y }: ScreenshotsMagnifierProps): JSX.Element;
7
+ declare const _default: React.NamedExoticComponent<ScreenshotsMagnifierProps>;
8
+ export default _default;
@@ -1,5 +1,6 @@
1
- import React, { ReactElement } from 'react';
2
- import './index.less';
1
+ import React from 'react';
3
2
  import { Bounds } from '../types';
3
+ import './index.less';
4
4
  export declare const ScreenshotsOperationsCtx: React.Context<Bounds | null>;
5
- export default function ScreenshotsOperations(): ReactElement | null;
5
+ declare const _default: React.NamedExoticComponent<object>;
6
+ export default _default;
@@ -1,4 +1,4 @@
1
- import { ReactElement, ReactNode } from 'react';
1
+ import React, { ReactElement, ReactNode } from 'react';
2
2
  import { Point } from '../types';
3
3
  import './index.less';
4
4
  export interface ScreenshotsOptionProps {
@@ -11,4 +11,5 @@ export declare enum Placement {
11
11
  Bottom = "bottom",
12
12
  Top = "top"
13
13
  }
14
- export default function ScreenshotsOption({ open, content, children }: ScreenshotsOptionProps): ReactElement;
14
+ declare const _default: React.NamedExoticComponent<ScreenshotsOptionProps>;
15
+ export default _default;
@@ -1,7 +1,8 @@
1
- import { ReactElement } from 'react';
1
+ import React from 'react';
2
2
  import './index.less';
3
3
  export interface SizeProps {
4
4
  value: number;
5
5
  onChange: (value: number) => void;
6
6
  }
7
- export default function ScreenshotsSize({ value, onChange }: SizeProps): ReactElement;
7
+ declare const _default: React.NamedExoticComponent<SizeProps>;
8
+ export default _default;
@@ -1,4 +1,4 @@
1
- import { ReactElement } from 'react';
1
+ import React from 'react';
2
2
  import './index.less';
3
3
  export interface SizeColorProps {
4
4
  size: number;
@@ -6,4 +6,5 @@ export interface SizeColorProps {
6
6
  onSizeChange: (value: number) => void;
7
7
  onColorChange: (value: string) => void;
8
8
  }
9
- export default function ScreenshotsSizeColor({ size, color, onSizeChange, onColorChange }: SizeColorProps): ReactElement;
9
+ declare const _default: React.NamedExoticComponent<SizeColorProps>;
10
+ export default _default;
@@ -1,4 +1,4 @@
1
- import { ReactElement, FocusEvent } from 'react';
1
+ import React, { FocusEvent } from 'react';
2
2
  import './index.less';
3
3
  export interface TextInputProps {
4
4
  x: number;
@@ -11,4 +11,5 @@ export interface TextInputProps {
11
11
  onChange: (value: string) => unknown;
12
12
  onBlur: (e: FocusEvent<HTMLTextAreaElement>) => unknown;
13
13
  }
14
- export default function ScreenshotsTextarea({ x, y, maxWidth, maxHeight, size, color, value, onChange, onBlur }: TextInputProps): ReactElement;
14
+ declare const _default: React.NamedExoticComponent<TextInputProps>;
15
+ export default _default;
@@ -0,0 +1,10 @@
1
+ import { Bounds, History } from './types';
2
+ interface ComposeImageOpts {
3
+ image: HTMLImageElement;
4
+ width: number;
5
+ height: number;
6
+ history: History;
7
+ bounds: Bounds;
8
+ }
9
+ export default function composeImage({ image, width, height, history, bounds }: ComposeImageOpts): Promise<Blob>;
10
+ export {};
@@ -1,3 +1,3 @@
1
1
  export { Bounds } from './types';
2
2
  export { Lang } from './zh_CN';
3
- export { default, ScreenshotsProps } from './Screenshots';
3
+ export { default, ScreenshotsProps } from './';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-screenshots",
3
- "version": "0.5.1",
3
+ "version": "0.5.8",
4
4
  "description": "a screenshot cropper tool by react",
5
5
  "main": "./lib/react-screenshots.cjs.js",
6
6
  "module": "./lib/react-screenshots.es.js",
@@ -48,15 +48,15 @@
48
48
  "@typescript-eslint/eslint-plugin": "^5.10.0",
49
49
  "@typescript-eslint/parser": "^5.10.0",
50
50
  "@vitejs/plugin-react": "^1.1.4",
51
- "eslint": "^8.7.0",
51
+ "eslint": "^8.20.0",
52
52
  "eslint-config-standard": "^16.0.3",
53
- "eslint-config-standard-jsx": "^10.0.0",
53
+ "eslint-config-standard-jsx": "^11.0.0",
54
54
  "eslint-config-standard-react": "^11.0.1",
55
- "eslint-plugin-import": "^2.25.4",
55
+ "eslint-plugin-import": "^2.26.0",
56
56
  "eslint-plugin-node": "^11.1.0",
57
57
  "eslint-plugin-promise": "^6.0.0",
58
- "eslint-plugin-react": "^7.28.0",
59
- "eslint-plugin-react-hooks": "^4.3.0",
58
+ "eslint-plugin-react": "^7.30.1",
59
+ "eslint-plugin-react-hooks": "^4.6.0",
60
60
  "less": "^4.1.2",
61
61
  "react": "^17.0.2",
62
62
  "react-dom": "^17.0.2",
@@ -64,5 +64,5 @@
64
64
  "typescript": "^4.5.5",
65
65
  "vite": "^2.7.13"
66
66
  },
67
- "gitHead": "4d2ba1b764ec2adda764ebb579e4351e7684ef1e"
67
+ "gitHead": "c7d28bc138ea6dc42bb27bd3fe8c8306f5069100"
68
68
  }
@@ -1,14 +0,0 @@
1
- var qe=Object.defineProperty,Je=Object.defineProperties;var Qe=Object.getOwnPropertyDescriptors;var he=Object.getOwnPropertySymbols;var ze=Object.prototype.hasOwnProperty,Ee=Object.prototype.propertyIsEnumerable;var je=(e,t,r)=>t in e?qe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,T=(e,t)=>{for(var r in t||(t={}))ze.call(t,r)&&je(e,r,t[r]);if(he)for(var r of he(t))Ee.call(t,r)&&je(e,r,t[r]);return e},pe=(e,t)=>Je(e,Qe(t));var Be=(e,t)=>{var r={};for(var o in e)ze.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&he)for(var o of he(e))t.indexOf(o)<0&&Ee.call(e,o)&&(r[o]=e[o]);return r};import{R as Me,r as c,j as b,a as Ve,b as Ke}from"./vendor.e3c417b2.js";const Ze=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))o(i);new MutationObserver(i=>{for(const n of i)if(n.type==="childList")for(const s of n.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&o(s)}).observe(document,{childList:!0,subtree:!0});function r(i){const n={};return i.integrity&&(n.integrity=i.integrity),i.referrerpolicy&&(n.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?n.credentials="include":i.crossorigin==="anonymous"?n.credentials="omit":n.credentials="same-origin",n}function o(i){if(i.ep)return;i.ep=!0;const n=r(i);fetch(i.href,n)}};Ze();function et(e,{width:t,height:r}){return new Promise((o,i)=>{if(!e.complete)return i(new Error("image is not fully loaded"));const n=document.createElement("canvas"),s=t*window.devicePixelRatio,a=r*window.devicePixelRatio;n.width=s,n.height=a;const m=n.getContext("2d");if(!m)return i(new Error("convert image to blob fail"));m.imageSmoothingEnabled=!0,m.imageSmoothingQuality="low",m.drawImage(e,0,0,e.naturalWidth,e.naturalHeight,0,0,s,a),n.toBlob(u=>{if(!u)return i(new Error("canvas toBlob fail"));o(u)},"image/png")})}const _e={magnifier_position_label:"\u5750\u6807",operation_ok_title:"\u786E\u5B9A",operation_cancel_title:"\u53D6\u6D88",operation_save_title:"\u4FDD\u5B58",operation_redo_title:"\u91CD\u505A",operation_undo_title:"\u64A4\u9500",operation_mosaic_title:"\u9A6C\u8D5B\u514B",operation_text_title:"\u6587\u672C",operation_brush_title:"\u753B\u7B14",operation_arrow_title:"\u7BAD\u5934",operation_ellipse_title:"\u692D\u5706",operation_rectangle_title:"\u77E9\u5F62"};var ve=Me.createContext({store:{url:void 0,image:null,width:0,height:0,lang:_e,emiterRef:{current:{}},canvasContextRef:{current:null},history:{index:-1,stack:[]},bounds:null,cursor:"move",operation:void 0},dispatcher:{call:void 0,setHistory:void 0,setBounds:void 0,setCursor:void 0,setOperation:void 0}});function oe(){const{dispatcher:e}=c.exports.useContext(ve);return e}function $(){const{store:e}=c.exports.useContext(ve);return e}function U(){const{bounds:e}=$(),{setBounds:t}=oe(),r=c.exports.useCallback(i=>{t==null||t(i)},[t]),o=c.exports.useCallback(()=>{t==null||t(null)},[t]);return[e,{set:r,reset:o}]}function L(){const{lang:e}=$();return e}var J="/Users/nashaofu/Documents/GitHub/screenshots/packages/react-screenshots/src/Screenshots/ScreenshotsMagnifier/index.tsx";const Q=100,K=80;function tt({x:e,y:t}){const{width:r,height:o,image:i}=$(),n=L(),[s,a]=c.exports.useState(null),m=c.exports.useRef(null),u=c.exports.useRef(null),p=c.exports.useRef(null),[l,f]=c.exports.useState("000000");return c.exports.useLayoutEffect(()=>{if(!m.current)return;const h=m.current.getBoundingClientRect();let x=e+20,v=t+20;x+h.width>r&&(x=e-h.width-20),v+h.height>o&&(v=t-h.height-20),x<0&&(x=0),v<0&&(v=0),a({x,y:v})},[r,o,e,t]),c.exports.useEffect(()=>{if(!i||!u.current){p.current=null;return}if(p.current||(p.current=u.current.getContext("2d")),!p.current)return;const h=p.current;h.clearRect(0,0,Q,K);const x=i.naturalWidth/r,v=i.naturalHeight/o;h.drawImage(i,e*x-Q/2,t*v-K/2,Q,K,0,0,Q,K);const{data:y}=h.getImageData(Math.floor(Q/2),Math.floor(K/2),1,1),k=Array.from(y.slice(0,3)).map(w=>w>=16?w.toString(16):`0${w.toString(16)}`).join("").toUpperCase();f(k)},[r,o,i,e,t]),b.exports.jsxDEV("div",{ref:m,className:"screenshots-magnifier",style:{transform:`translate(${s==null?void 0:s.x}px, ${s==null?void 0:s.y}px)`},children:[b.exports.jsxDEV("div",{className:"screenshots-magnifier-body",children:b.exports.jsxDEV("canvas",{ref:u,className:"screenshots-magnifier-body-canvas",width:Q,height:K},void 0,!1,{fileName:J,lineNumber:97,columnNumber:9},this)},void 0,!1,{fileName:J,lineNumber:96,columnNumber:7},this),b.exports.jsxDEV("div",{className:"screenshots-magnifier-footer",children:[b.exports.jsxDEV("div",{className:"screenshots-magnifier-footer-item",children:[n.magnifier_position_label,": (",e,",",t,")"]},void 0,!0,{fileName:J,lineNumber:105,columnNumber:9},this),b.exports.jsxDEV("div",{className:"screenshots-magnifier-footer-item",children:["RGB: #",l]},void 0,!0,{fileName:J,lineNumber:108,columnNumber:9},this)]},void 0,!0,{fileName:J,lineNumber:104,columnNumber:7},this)]},void 0,!0,{fileName:J,lineNumber:89,columnNumber:5},this)}function st({x:e,y:t},{x:r,y:o},i,n){return e>r&&([e,r]=[r,e]),t>o&&([t,o]=[o,t]),e<0&&(e=0),r>i&&(r=i),t<0&&(t=0),o>n&&(o=n),{x:e,y:t,width:r-e,height:o-t}}var me="/Users/nashaofu/Documents/GitHub/screenshots/packages/react-screenshots/src/Screenshots/ScreenshotsBackground/index.tsx";function nt(){const{url:e,image:t,width:r,height:o}=$(),[i,n]=U(),s=c.exports.useRef(null),a=c.exports.useRef(null),m=c.exports.useRef(!1),[u,p]=c.exports.useState(null),l=c.exports.useCallback((h,x)=>{if(!s.current)return;const{x:v,y}=s.current.getBoundingClientRect();n.set(st({x:h.x-v,y:h.y-y},{x:x.x-v,y:x.y-y},r,o))},[r,o,n]),f=c.exports.useCallback(h=>{a.current||i||h.button!==0||(a.current={x:h.clientX,y:h.clientY},m.current=!1)},[i]);return c.exports.useEffect(()=>{const h=v=>{if(s.current){const y=s.current.getBoundingClientRect();v.clientX<y.left||v.clientY<y.top||v.clientX>y.right||v.clientY>y.bottom?p(null):p({x:v.clientX-y.x,y:v.clientY-y.y})}!a.current||(l(a.current,{x:v.clientX,y:v.clientY}),m.current=!0)},x=v=>{!a.current||(m.current&&l(a.current,{x:v.clientX,y:v.clientY}),a.current=null,m.current=!1)};return window.addEventListener("mousemove",h),window.addEventListener("mouseup",x),()=>{window.removeEventListener("mousemove",h),window.removeEventListener("mouseup",x)}},[l]),c.exports.useLayoutEffect(()=>{(!t||i)&&p(null)},[t,i]),!e||!t?null:b.exports.jsxDEV("div",{ref:s,className:"screenshots-background",onMouseDown:f,children:[b.exports.jsxDEV("img",{className:"screenshots-background-image",src:e},void 0,!1,{fileName:me,lineNumber:121,columnNumber:7},this),b.exports.jsxDEV("div",{className:"screenshots-background-mask"},void 0,!1,{fileName:me,lineNumber:122,columnNumber:7},this),u&&!i&&b.exports.jsxDEV(tt,{x:u==null?void 0:u.x,y:u==null?void 0:u.y},void 0,!1,{fileName:me,lineNumber:123,columnNumber:31},this)]},void 0,!0,{fileName:me,lineNumber:120,columnNumber:5},this)}function A(){const{cursor:e}=$(),{setCursor:t}=oe(),r=c.exports.useCallback(i=>{t==null||t(i)},[t]),o=c.exports.useCallback(()=>{t==null||t("move")},[t]);return[e,{set:r,reset:o}]}function Z(){const{emiterRef:e}=$(),t=c.exports.useCallback((n,s)=>{const a=e.current;Array.isArray(a[n])?a[n].push(s):a[n]=[s]},[e]),r=c.exports.useCallback((n,s)=>{const a=e.current;if(Array.isArray(a[n])){const m=a[n].findIndex(u=>u===s);m!==-1&&a[n].splice(m,1)}},[e]),o=c.exports.useCallback((n,...s)=>{const a=e.current;Array.isArray(a[n])&&a[n].forEach(m=>m(...s))},[e]),i=c.exports.useCallback(()=>{e.current={}},[e]);return{on:t,off:r,emit:o,reset:i}}var j;(function(e){e[e.Edit=0]="Edit",e[e.Source=1]="Source"})(j||(j={}));function H(){const{history:e}=$(),{setHistory:t}=oe(),r=c.exports.useCallback(p=>{const{index:l,stack:f}=e;f.forEach(h=>{h.type===j.Source&&(h.isSelected=!1)}),p.type===j.Source?p.isSelected=!0:p.type===j.Edit&&(p.source.isSelected=!0),f.splice(l+1),f.push(p),t==null||t({index:f.length-1,stack:f})},[e,t]),o=c.exports.useCallback(()=>{const{stack:p}=e;p.pop(),t==null||t({index:p.length-1,stack:p})},[e,t]),i=c.exports.useCallback(()=>{const{index:p,stack:l}=e,f=l[p];f&&(f.type===j.Source?f.isSelected=!1:f.type===j.Edit&&f.source.editHistory.pop()),t==null||t({index:p<=0?-1:p-1,stack:l})},[e,t]),n=c.exports.useCallback(()=>{const{index:p,stack:l}=e,f=l[p+1];f&&(f.type===j.Source?f.isSelected=!1:f.type===j.Edit&&f.source.editHistory.push(f)),t==null||t({index:p>=l.length-1?l.length-1:p+1,stack:l})},[e,t]),s=c.exports.useCallback(p=>{t==null||t(T({},p))},[t]),a=c.exports.useCallback(p=>{e.stack.forEach(l=>{l.type===j.Source&&(l===p?l.isSelected=!0:l.isSelected=!1)}),t==null||t(T({},e))},[e,t]),m=c.exports.useCallback(()=>{e.stack.forEach(p=>{p.type===j.Source&&(p.isSelected=!1)}),t==null||t(T({},e))},[e,t]),u=c.exports.useCallback(()=>{t==null||t({index:-1,stack:[]})},[t]);return[{index:e.index,stack:e.stack,top:e.stack.slice(e.index,e.index+1)[0]},{push:r,pop:o,undo:i,redo:n,set:s,select:a,clearSelect:m,reset:u}]}function G(){const{operation:e}=$(),{setOperation:t}=oe(),r=c.exports.useCallback(i=>{t==null||t(i)},[t]),o=c.exports.useCallback(()=>{t==null||t(void 0)},[t]);return[e,{set:r,reset:o}]}function rt({x:e,y:t},{x:r,y:o},i,n,s,a){return e>r&&([e,r]=[r,e]),t>o&&([t,o]=[o,t]),e<0&&(e=0,a==="move"&&(r=i.width)),r>n&&(r=n,a==="move"&&(e=r-i.width)),t<0&&(t=0,a==="move"&&(o=i.height)),o>s&&(o=s,a==="move"&&(t=o-i.height)),{x:e,y:t,width:Math.max(r-e,1),height:Math.max(o-t,1)}}function ot(e,t,r,o){const i=e.clientX-r.x,n=e.clientY-r.y;let s=o.x,a=o.y,m=o.x+o.width,u=o.y+o.height;switch(t){case"top":a+=n;break;case"top-right":m+=i,a+=n;break;case"right":m+=i;break;case"right-bottom":m+=i,u+=n;break;case"bottom":u+=n;break;case"bottom-left":s+=i,u+=n;break;case"left":s+=i;break;case"left-top":s+=i,a+=n;break;case"move":s+=i,a+=n,m+=i,u+=n;break}return[{x:s,y:a},{x:m,y:u}]}function it(e,t,r,o){if(!t)return!1;const i=document.createElement("canvas");i.width=e.width,i.height=e.height;const n=i.getContext("2d");if(!n)return!1;const{left:s,top:a}=t.getBoundingClientRect(),m=o.clientX-s,u=o.clientY-a;return[...r.stack.slice(0,r.index+1)].reverse().find(l=>{var f;return l.type!==j.Source?!1:(n.clearRect(0,0,e.width,e.height),(f=l.isHit)==null?void 0:f.call(l,n,l,{x:m,y:u}))})}var ie="/Users/nashaofu/Documents/GitHub/screenshots/packages/react-screenshots/src/Screenshots/ScreenshotsCanvas/index.tsx";const ct=["top","right","bottom","left"];var Y;(function(e){e.ResizeTop="top",e.ResizetopRight="top-right",e.ResizeRight="right",e.ResizeRightBottom="right-bottom",e.ResizeBottom="bottom",e.ResizeBottomLeft="bottom-left",e.ResizeLeft="left",e.ResizeLeftTop="left-top",e.Move="move"})(Y||(Y={}));const at=[Y.ResizeTop,Y.ResizetopRight,Y.ResizeRight,Y.ResizeRightBottom,Y.ResizeBottom,Y.ResizeBottomLeft,Y.ResizeLeft,Y.ResizeLeftTop];var ut=c.exports.forwardRef(function(t,r){const{image:o,width:i,height:n}=$(),s=Z(),[a]=H(),[m]=A(),[u,p]=U(),[l]=G(),f=c.exports.useRef(),h=c.exports.useRef(null),x=c.exports.useRef(null),v=c.exports.useRef(null),y=c.exports.useRef(null),k=c.exports.useCallback(()=>{if(!o||!u||!y.current)return;const d=o.naturalWidth/i,g=o.naturalHeight/n,N=y.current;N.imageSmoothingEnabled=!0,N.imageSmoothingQuality="low",N.setTransform(window.devicePixelRatio,0,0,window.devicePixelRatio,0,0),N.clearRect(0,0,u.width,u.height),N.drawImage(o,u.x*d,u.y*g,u.width*d,u.height*g,0,0,u.width,u.height),a.stack.slice(0,a.index+1).forEach(C=>{C.type===j.Source&&C.draw(N,C)})},[o,i,n,u,y,a]),w=c.exports.useCallback((d,g)=>{if(!(d.button!==0||!u))if(!l)f.current=g,h.current={x:d.clientX,y:d.clientY},x.current={x:u.x,y:u.y,width:u.width,height:u.height};else{const N=it(u,v.current,a,d.nativeEvent);N?s.emit("drawselect",N,d.nativeEvent):s.emit("mousedown",d.nativeEvent)}},[u,l,s,a]),z=c.exports.useCallback(d=>{if(!f.current||!h.current||!x.current||!u)return;const g=ot(d,f.current,h.current,x.current);p.set(rt(g[0],g[1],u,i,n,f.current))},[i,n,u,p]);return c.exports.useLayoutEffect(()=>{if(!o||!u||!v.current){y.current=null;return}y.current||(y.current=v.current.getContext("2d")),k()},[o,u,k]),c.exports.useEffect(()=>{const d=N=>{if(l)s.emit("mousemove",N);else{if(!f.current||!h.current||!x.current)return;z(N)}},g=N=>{if(l)s.emit("mouseup",N);else{if(!f.current||!h.current||!x.current)return;z(N),f.current=void 0,h.current=null,x.current=null}};return window.addEventListener("mousemove",d),window.addEventListener("mouseup",g),()=>{window.removeEventListener("mousemove",d),window.removeEventListener("mouseup",g)}},[z,l,s]),c.exports.useImperativeHandle(r,()=>y.current),u?b.exports.jsxDEV("div",{className:"screenshots-canvas",style:{left:u.x,top:u.y,width:u.width,height:u.height},children:[b.exports.jsxDEV("canvas",{ref:v,width:u.width*window.devicePixelRatio,height:u.height*window.devicePixelRatio,style:{width:u.width,height:u.height}},void 0,!1,{fileName:ie,lineNumber:199,columnNumber:7},this),b.exports.jsxDEV("div",{className:"screenshots-canvas-body",style:{cursor:m},onMouseDown:d=>w(d,"move")},void 0,!1,{fileName:ie,lineNumber:208,columnNumber:7},this),ct.map(d=>b.exports.jsxDEV("div",{className:`screenshots-canvas-border-${d}`},d,!1,{fileName:ie,lineNumber:216,columnNumber:16},this)),at.map(d=>b.exports.jsxDEV("div",{className:`screenshots-canvas-point-${d}`,onMouseDown:g=>w(g,d)},d,!1,{fileName:ie,lineNumber:220,columnNumber:11},this))]},void 0,!0,{fileName:ie,lineNumber:190,columnNumber:5},this):null});function ye(){const e=oe();return c.exports.useCallback((r,...o)=>{var i;(i=e.call)==null||i.call(e,r,...o)},[e])}function W(){const{canvasContextRef:e}=$();return e}function Ne(){const e=Z(),[,t]=U(),[,r]=A(),[,o]=H(),[,i]=G();return c.exports.useCallback(()=>{e.reset(),o.reset(),t.reset(),r.reset(),i.reset()},[e,o,t,r,i])}var Ce="/Users/nashaofu/Documents/GitHub/screenshots/packages/react-screenshots/src/Screenshots/ScreenshotsOption/index.tsx",q;(function(e){e.Bottom="bottom",e.Top="top"})(q||(q={}));function lt({open:e,content:t,children:r}){const o=c.exports.useRef(null),i=c.exports.useRef(null),n=c.exports.useRef(null),s=c.exports.useContext(We),[a,m]=c.exports.useState(q.Bottom),[u,p]=c.exports.useState(null),[l,f]=c.exports.useState(0),h=()=>(i.current||(i.current=document.createElement("div")),i.current);return c.exports.useEffect(()=>{const x=h();return e&&document.body.appendChild(x),()=>{x.remove()}},[e]),c.exports.useEffect(()=>{if(!e||!s||!o.current||!n.current)return;const x=o.current.getBoundingClientRect(),v=n.current.getBoundingClientRect();let y=a,k=x.left+x.width/2,w=x.top+x.height,z=l;if(k+v.width/2>s.x+s.width){const d=k;k=s.x+s.width-v.width/2,z=d-k}if(k<s.x+v.width/2){const d=k;k=s.x+v.width/2,z=d-k}w>window.innerHeight-v.height&&(y===q.Bottom&&(y=q.Top),w=x.top-v.height),w<0&&(y===q.Top&&(y=q.Bottom),w=x.top+x.height),y!==a&&m(y),((u==null?void 0:u.x)!==k||u.y!==w)&&p({x:k,y:w}),z!==l&&f(z)}),b.exports.jsxDEV(b.exports.Fragment,{children:[c.exports.cloneElement(r,{ref:o}),e&&t&&Ve.exports.createPortal(b.exports.jsxDEV("div",{ref:n,className:"screenshots-option",style:{visibility:u?"visible":"hidden",left:u==null?void 0:u.x,top:u==null?void 0:u.y},"data-placement":a,children:[b.exports.jsxDEV("div",{className:"screenshots-option-container",children:t},void 0,!1,{fileName:Ce,lineNumber:121,columnNumber:13},this),b.exports.jsxDEV("div",{className:"screenshots-option-arrow",style:{marginLeft:l}},void 0,!1,{fileName:Ce,lineNumber:122,columnNumber:13},this)]},void 0,!0,{fileName:Ce,lineNumber:111,columnNumber:11},this),h())]},void 0,!0)}var we="/Users/nashaofu/Documents/GitHub/screenshots/packages/react-screenshots/src/Screenshots/ScreenshotsButton/index.tsx";function P({title:e,icon:t,checked:r,disabled:o,option:i,onClick:n}){const s=["screenshots-button"],a=c.exports.useCallback(m=>{o||!n||n(m)},[o,n]);return r&&s.push("screenshots-button-checked"),o&&s.push("screenshots-button-disabled"),b.exports.jsxDEV(lt,{open:r,content:i,children:b.exports.jsxDEV("div",{className:s.join(" "),title:e,onClick:a,children:b.exports.jsxDEV("span",{className:t},void 0,!1,{fileName:we,lineNumber:44,columnNumber:9},this)},void 0,!1,{fileName:we,lineNumber:43,columnNumber:7},this)},void 0,!1,{fileName:we,lineNumber:42,columnNumber:5},this)}var ft="/Users/nashaofu/Documents/GitHub/screenshots/packages/react-screenshots/src/Screenshots/operations/Ok/index.tsx";function ht(){const e=L(),t=W(),[,r]=H(),o=ye(),[i]=U(),n=Ne(),s=c.exports.useCallback(()=>{r.clearSelect(),setTimeout(()=>{!t.current||t.current.canvas.toBlob(a=>{o("onOk",a,i),n()},"image/png")})},[t,r,o,i,n]);return b.exports.jsxDEV(P,{title:e.operation_ok_title,icon:"icon-ok",onClick:s},void 0,!1,{fileName:ft,lineNumber:31,columnNumber:10},this)}var pt="/Users/nashaofu/Documents/GitHub/screenshots/packages/react-screenshots/src/Screenshots/operations/Cancel/index.tsx";function mt(){const e=ye(),t=Ne(),r=L(),o=c.exports.useCallback(()=>{e("onCancel"),t()},[e,t]);return b.exports.jsxDEV(P,{title:r.operation_cancel_title,icon:"icon-cancel",onClick:o},void 0,!1,{fileName:pt,lineNumber:17,columnNumber:10},this)}var dt="/Users/nashaofu/Documents/GitHub/screenshots/packages/react-screenshots/src/Screenshots/operations/Save/index.tsx";function xt(){const e=L(),t=W(),[,r]=H(),[o]=U(),i=ye(),n=Ne(),s=c.exports.useCallback(()=>{r.clearSelect(),setTimeout(()=>{!t.current||t.current.canvas.toBlob(a=>{i("onSave",a,o),n()},"image/png")})},[t,r,o,i,n]);return b.exports.jsxDEV(P,{title:e.operation_save_title,icon:"icon-save",onClick:s},void 0,!1,{fileName:dt,lineNumber:31,columnNumber:10},this)}var gt="/Users/nashaofu/Documents/GitHub/screenshots/packages/react-screenshots/src/Screenshots/operations/Redo/index.tsx";function bt(){const e=L(),[t,r]=H(),o=c.exports.useCallback(()=>{r.redo()},[r]);return b.exports.jsxDEV(P,{title:e.operation_redo_title,icon:"icon-redo",disabled:!t.stack.length||t.stack.length-1===t.index,onClick:o},void 0,!1,{fileName:gt,lineNumber:15,columnNumber:5},this)}var vt="/Users/nashaofu/Documents/GitHub/screenshots/packages/react-screenshots/src/Screenshots/operations/Undo/index.tsx";function yt(){const e=L(),[t,r]=H(),o=c.exports.useCallback(()=>{r.undo()},[r]);return b.exports.jsxDEV(P,{title:e.operation_undo_title,icon:"icon-undo",disabled:t.index===-1,onClick:o},void 0,!1,{fileName:vt,lineNumber:15,columnNumber:5},this)}var Re="/Users/nashaofu/Documents/GitHub/screenshots/packages/react-screenshots/src/Screenshots/ScreenshotsSize/index.tsx";function $e({value:e,onChange:t}){const r=[3,6,9];return b.exports.jsxDEV("div",{className:"screenshots-size",children:r.map(o=>{const i=["screenshots-size-item"];return o===e&&i.push("screenshots-size-active"),b.exports.jsxDEV("div",{className:i.join(" "),onClick:()=>t&&t(o),children:b.exports.jsxDEV("div",{className:"screenshots-size-pointer",style:{width:o*1.8,height:o*1.8}},void 0,!1,{fileName:Re,lineNumber:22,columnNumber:13},this)},o,!1,{fileName:Re,lineNumber:21,columnNumber:11},this)})},void 0,!1,{fileName:Re,lineNumber:12,columnNumber:5},this)}function ee(e){const t=Z();c.exports.useEffect(()=>(t.on("mousedown",e),()=>{t.off("mousedown",e)}),[e,t])}function te(e){const t=Z();c.exports.useEffect(()=>(t.on("mousemove",e),()=>{t.off("mousemove",e)}),[e,t])}function se(e){const t=Z();c.exports.useEffect(()=>(t.on("mouseup",e),()=>{t.off("mouseup",e)}),[e,t])}var Le="/Users/nashaofu/Documents/GitHub/screenshots/packages/react-screenshots/src/Screenshots/operations/Mosaic/index.tsx";function de(e,t,r){if(!r)return[0,0,0,0];const{data:o,width:i}=r,n=t*i*4+e*4;return Array.from(o.slice(n,n+4))}function Nt(e,t){const{tiles:r,size:o}=t.data;r.forEach(i=>{const n=Math.round(i.color[0]),s=Math.round(i.color[1]),a=Math.round(i.color[2]),m=i.color[3]/255;e.fillStyle=`rgba(${n}, ${s}, ${a}, ${m})`,e.fillRect(i.x-o/2,i.y-o/2,o,o)})}function Ct(){const e=L(),{image:t,width:r,height:o}=$(),[i,n]=G(),s=W(),[a,m]=H(),[u]=U(),[,p]=A(),[l,f]=c.exports.useState(3),h=c.exports.useRef(null),x=c.exports.useRef(null),v=i==="Mosaic",y=c.exports.useCallback(()=>{n.set("Mosaic"),p.set("crosshair")},[n,p]),k=c.exports.useCallback(()=>{v||(y(),m.clearSelect())},[v,y,m]),w=c.exports.useCallback(g=>{if(!v||x.current||!h.current||!s.current)return;const N=s.current.canvas.getBoundingClientRect(),C=g.clientX-N.x,S=g.clientY-N.y,E=l*2;x.current={name:"Mosaic",type:j.Source,data:{size:E,tiles:[{x:C,y:S,color:de(C,S,h.current)}]},editHistory:[],draw:Nt}},[v,l,s]),z=c.exports.useCallback(g=>{if(!v||!x.current||!s.current||!h.current)return;const N=s.current.canvas.getBoundingClientRect(),C=g.clientX-N.x,S=g.clientY-N.y,E=x.current.data.size,D=x.current.data.tiles;let R=D[D.length-1];if(!R)D.push({x:C,y:S,color:de(C,S,h.current)});else{const O=R.x-C,B=R.y-S;let _=Math.sqrt(O**2+B**2);const ge=-B/_,be=-O/_;for(;_>E;){const ne=Math.floor(R.x+E*be),re=Math.floor(R.y+E*ge);R={x:ne,y:re,color:de(ne,re,h.current)},D.push(R),_-=E}_>E/2&&D.push({x:C,y:S,color:de(C,S,h.current)})}a.top!==x.current?m.push(x.current):m.set(a)},[v,s,a,m]),d=c.exports.useCallback(()=>{!v||(x.current=null)},[v]);return ee(w),te(z),se(d),c.exports.useEffect(()=>{if(!u||!t||!v)return;const g=document.createElement("canvas"),N=g.getContext("2d");if(!N)return;g.width=u.width,g.height=u.height;const C=t.naturalWidth/r,S=t.naturalHeight/o;N.drawImage(t,u.x*C,u.y*S,u.width*C,u.height*S,0,0,u.width,u.height),h.current=N.getImageData(0,0,u.width,u.height)},[r,o,u,t,v]),b.exports.jsxDEV(P,{title:e.operation_mosaic_title,icon:"icon-mosaic",checked:v,onClick:k,option:b.exports.jsxDEV($e,{value:l,onChange:f},void 0,!1,{fileName:Le,lineNumber:220,columnNumber:15},this)},void 0,!1,{fileName:Le,lineNumber:215,columnNumber:5},this)}var He="/Users/nashaofu/Documents/GitHub/screenshots/packages/react-screenshots/src/Screenshots/ScreenshotsColor/index.tsx";function wt({value:e,onChange:t}){const r=["#ee5126","#fceb4d","#90e746","#51c0fa","#7a7a7a","#ffffff"];return b.exports.jsxDEV("div",{className:"screenshots-color",children:r.map(o=>{const i=["screenshots-color-item"];return o===e&&i.push("screenshots-color-active"),b.exports.jsxDEV("div",{className:i.join(" "),style:{backgroundColor:o},onClick:()=>t&&t(o)},o,!1,{fileName:He,lineNumber:19,columnNumber:11},this)})},void 0,!1,{fileName:He,lineNumber:12,columnNumber:5},this)}var Se="/Users/nashaofu/Documents/GitHub/screenshots/packages/react-screenshots/src/Screenshots/ScreenshotsSizeColor/index.tsx";function ce({size:e,color:t,onSizeChange:r,onColorChange:o}){return b.exports.jsxDEV("div",{className:"screenshots-sizecolor",children:[b.exports.jsxDEV($e,{value:e,onChange:r},void 0,!1,{fileName:Se,lineNumber:16,columnNumber:7},this),b.exports.jsxDEV(wt,{value:t,onChange:o},void 0,!1,{fileName:Se,lineNumber:17,columnNumber:7},this)]},void 0,!0,{fileName:Se,lineNumber:15,columnNumber:5},this)}const Rt=`
2
- min-width: 0 !important;
3
- width: 0 !important;
4
- min-height: 0 !important;
5
- height:0 !important;
6
- visibility: hidden !important;
7
- overflow: hidden !important;
8
- position: absolute !important;
9
- z-index: -1000 !important;
10
- top:0 !important;
11
- right:0 !important;
12
- `,St=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","text-indent","padding-left","padding-right","border-width","box-sizing","white-space","word-break"];let I;function kt(e){const t=window.getComputedStyle(e),r=t.getPropertyValue("box-sizing")||t.getPropertyValue("-moz-box-sizing")||t.getPropertyValue("-webkit-box-sizing"),o=parseFloat(t.getPropertyValue("padding-bottom"))+parseFloat(t.getPropertyValue("padding-top")),i=parseFloat(t.getPropertyValue("border-bottom-width"))+parseFloat(t.getPropertyValue("border-top-width"));return{sizingStyle:St.map(s=>`${s}:${t.getPropertyValue(s)}`).join(";"),paddingSize:o,borderSize:i,boxSizing:r}}function Dt(e,t,r,o){I||(I=document.createElement("textarea"),I.setAttribute("tab-index","-1"),document.body.appendChild(I));const{paddingSize:i,borderSize:n,boxSizing:s,sizingStyle:a}=kt(e);I.setAttribute("style",`${a};${Rt};max-width:${r}px;max-height:${o}px`),I.value=t||" ";let m=I.scrollWidth,u=I.scrollHeight;return s==="border-box"?(m+=n,u+=n):s==="content-box"&&(m-=i,u-=i),{width:Math.min(m,r),height:Math.min(u,o)}}var zt="/Users/nashaofu/Documents/GitHub/screenshots/packages/react-screenshots/src/Screenshots/ScreenshotsTextarea/index.tsx";function Et({x:e,y:t,maxWidth:r,maxHeight:o,size:i,color:n,value:s,onChange:a,onBlur:m}){const u=c.exports.useRef(null),p=c.exports.useRef(null),[l,f]=c.exports.useState(0),[h,x]=c.exports.useState(0),v=()=>(u.current||(u.current=document.createElement("div")),u.current);return c.exports.useLayoutEffect(()=>(u.current&&(document.body.appendChild(u.current),requestAnimationFrame(()=>{var y;(y=p.current)==null||y.focus()})),()=>{var y;(y=u.current)==null||y.remove()}),[]),c.exports.useLayoutEffect(()=>{if(!p.current)return;const{width:y,height:k}=Dt(p.current,s,r,o);f(y),x(k)},[s,r,o]),Ve.exports.createPortal(b.exports.jsxDEV("textarea",{ref:p,className:"screenshots-textarea",style:{left:e,top:t,color:n,width:l,height:h,maxWidth:r,maxHeight:o,fontSize:i,lineHeight:`${i}px`},value:s,onChange:y=>a&&a(y.target.value),onBlur:y=>m&&m(y)},void 0,!1,{fileName:zt,lineNumber:65,columnNumber:5},this),v())}function ae(e){const t=Z();c.exports.useEffect(()=>(t.on("drawselect",e),()=>{t.off("drawselect",e)}),[e,t])}var ke="/Users/nashaofu/Documents/GitHub/screenshots/packages/react-screenshots/src/Screenshots/operations/Text/index.tsx";const De={3:18,6:32,9:46};function jt(e,t){const{size:r,color:o,fontFamily:i,x:n,y:s,text:a}=t.data;e.fillStyle=o,e.textAlign="left",e.textBaseline="top",e.font=`${r}px ${i}`;const m=t.editHistory.reduce((u,{data:p})=>({x:u.x+p.x2-p.x1,y:u.y+p.y2-p.y1}),{x:0,y:0});a.split(`
13
- `).forEach((u,p)=>{e.fillText(u,n+m.x,s+m.y+p*r)})}function Bt(e,t,r){e.textAlign="left",e.textBaseline="top",e.font=`${t.data.size}px ${t.data.fontFamily}`;let o=0,i=0;t.data.text.split(`
14
- `).forEach(l=>{const f=e.measureText(l);o<f.width&&(o=f.width),i+=t.data.size});const{x:n,y:s}=t.editHistory.reduce((l,{data:f})=>({x:l.x+f.x2-f.x1,y:l.y+f.y2-f.y1}),{x:0,y:0}),a=t.data.x+n,m=t.data.y+s,u=a+o,p=m+i;return r.x>=a&&r.x<=u&&r.y>=m&&r.y<=p}function Mt(){const e=L(),[t,r]=H(),[o]=U(),[i,n]=G(),[,s]=A(),a=W(),[m,u]=c.exports.useState(3),[p,l]=c.exports.useState("#ee5126"),f=c.exports.useRef(null),h=c.exports.useRef(null),[x,v]=c.exports.useState(null),[y,k]=c.exports.useState(""),w=i==="Text",z=c.exports.useCallback(()=>{n.set("Text"),s.set("default")},[n,s]),d=c.exports.useCallback(()=>{w||(z(),r.clearSelect())},[w,z,r]),g=c.exports.useCallback(B=>{f.current&&(f.current.data.size=De[B]),u(B)},[]),N=c.exports.useCallback(B=>{f.current&&(f.current.data.color=B),l(B)},[]),C=c.exports.useCallback(B=>{k(B),w&&f.current&&(f.current.data.text=B)},[w]),S=c.exports.useCallback(()=>{f.current&&f.current.data.text&&r.push(f.current),f.current=null,k(""),v(null)},[r]),E=c.exports.useCallback((B,_)=>{B.name==="Text"&&(z(),h.current={type:j.Edit,data:{x1:_.clientX,y1:_.clientY,x2:_.clientX,y2:_.clientY},source:B},r.select(B))},[z,r]),D=c.exports.useCallback(B=>{if(!w||!a.current||f.current||!o)return;const{left:_,top:ge}=a.current.canvas.getBoundingClientRect(),be=window.getComputedStyle(a.current.canvas).fontFamily,ne=B.clientX-_,re=B.clientY-ge;f.current={name:"Text",type:j.Source,data:{size:De[m],color:p,fontFamily:be,x:ne,y:re,text:""},editHistory:[],draw:jt,isHit:Bt},v({x:B.clientX,y:B.clientY,maxWidth:o.width-ne,maxHeight:o.height-re})},[w,m,p,o,a]),R=c.exports.useCallback(B=>{!w||h.current&&(h.current.data.x2=B.clientX,h.current.data.y2=B.clientY,t.top!==h.current?(h.current.source.editHistory.push(h.current),r.push(h.current)):r.set(t))},[w,t,r]),O=c.exports.useCallback(()=>{!w||(h.current=null)},[w]);return ae(E),ee(D),te(R),se(O),b.exports.jsxDEV(b.exports.Fragment,{children:[b.exports.jsxDEV(P,{title:e.operation_text_title,icon:"icon-text",checked:w,onClick:d,option:b.exports.jsxDEV(ce,{size:m,color:p,onSizeChange:g,onColorChange:N},void 0,!1,{fileName:ke,lineNumber:261,columnNumber:11},this)},void 0,!1,{fileName:ke,lineNumber:255,columnNumber:7},this),w&&x&&b.exports.jsxDEV(Et,{x:x.x,y:x.y,maxWidth:x.maxWidth,maxHeight:x.maxHeight,size:De[m],color:p,value:y,onChange:C,onBlur:S},void 0,!1,{fileName:ke,lineNumber:265,columnNumber:9},this)]},void 0,!0)}const Pe=4;function M(e,t,r){e.lineWidth=1,e.strokeStyle="#000000",e.fillStyle="#ffffff",e.beginPath(),e.arc(t,r,Pe,0,2*Math.PI),e.fill(),e.stroke()}function xe(e,t,r){t.draw(e,t);const{data:o}=e.getImageData(r.x,r.y,1,1);return o.some(i=>i!==0)}function V(e,t,r){if(!e)return!1;const{left:o,top:i}=e.getBoundingClientRect(),n=t.clientX-o,s=t.clientY-i;return(r.x-n)**2+(r.y-s)**2<Pe**2}function Vt(e,t){const{size:r,color:o,points:i}=t.data;e.lineCap="round",e.lineJoin="round",e.lineWidth=r,e.strokeStyle=o;const n=t.editHistory.reduce((s,{data:a})=>({x:s.x+a.x2-a.x1,y:s.y+a.y2-a.y1}),{x:0,y:0});e.beginPath(),i.forEach((s,a)=>{a===0?e.moveTo(s.x+n.x,s.y+n.y):e.lineTo(s.x+n.x,s.y+n.y)}),e.stroke(),t.isSelected&&(e.lineWidth=1,e.strokeStyle="#000000",e.beginPath(),i.forEach((s,a)=>{a===0?e.moveTo(s.x+n.x,s.y+n.y):e.lineTo(s.x+n.x,s.y+n.y)}),e.stroke())}var Xe="/Users/nashaofu/Documents/GitHub/screenshots/packages/react-screenshots/src/Screenshots/operations/Brush/index.tsx";function _t(){const e=L(),[,t]=A(),[r,o]=G(),i=W(),[n,s]=H(),[a,m]=c.exports.useState(3),[u,p]=c.exports.useState("#ee5126"),l=c.exports.useRef(null),f=c.exports.useRef(null),h=r==="Brush",x=c.exports.useCallback(()=>{o.set("Brush"),t.set("default")},[o,t]),v=c.exports.useCallback(()=>{h||(x(),s.clearSelect())},[h,x,s]),y=c.exports.useCallback((d,g)=>{d.name==="Brush"&&(x(),f.current={type:j.Edit,data:{x1:g.clientX,y1:g.clientY,x2:g.clientX,y2:g.clientY},source:d},s.select(d))},[x,s]),k=c.exports.useCallback(d=>{if(!h||l.current||!i.current)return;const{left:g,top:N}=i.current.canvas.getBoundingClientRect();l.current={name:"Brush",type:j.Source,data:{size:a,color:u,points:[{x:d.clientX-g,y:d.clientY-N}]},editHistory:[],draw:Vt,isHit:xe}},[h,i,a,u]),w=c.exports.useCallback(d=>{if(!(!h||!i.current)){if(f.current)f.current.data.x2=d.clientX,f.current.data.y2=d.clientY,n.top!==f.current?(f.current.source.editHistory.push(f.current),s.push(f.current)):s.set(n);else if(l.current){const{left:g,top:N}=i.current.canvas.getBoundingClientRect();l.current.data.points.push({x:d.clientX-g,y:d.clientY-N}),n.top!==l.current?s.push(l.current):s.set(n)}}},[h,n,i,s]),z=c.exports.useCallback(()=>{!h||(l.current&&s.clearSelect(),l.current=null,f.current=null)},[h,s]);return ae(y),ee(k),te(w),se(z),b.exports.jsxDEV(P,{title:e.operation_brush_title,icon:"icon-brush",checked:h,onClick:v,option:b.exports.jsxDEV(ce,{size:a,color:u,onSizeChange:m,onColorChange:p},void 0,!1,{fileName:Xe,lineNumber:166,columnNumber:15},this)},void 0,!1,{fileName:Xe,lineNumber:161,columnNumber:5},this)}function Fe(e){let{x1:t,y1:r,x2:o,y2:i}=e.data;return e.editHistory.forEach(({data:n})=>{const s=n.x2-n.x1,a=n.y2-n.y1;n.type===ue.Move?(t+=s,r+=a,o+=s,i+=a):n.type===ue.MoveStart?(t+=s,r+=a):n.type===ue.MoveEnd&&(o+=s,i+=a)}),pe(T({},e.data),{x1:t,x2:o,y1:r,y2:i})}function $t(e,t){const{size:r,color:o,x1:i,x2:n,y1:s,y2:a}=Fe(t);e.lineCap="round",e.lineJoin="bevel",e.lineWidth=r,e.strokeStyle=o;const m=n-i,u=a-s,p=r*3,l=Math.atan2(u,m);e.beginPath(),e.moveTo(i,s),e.lineTo(n,a),e.lineTo(n-p*Math.cos(l-Math.PI/6),a-p*Math.sin(l-Math.PI/6)),e.moveTo(n,a),e.lineTo(n-p*Math.cos(l+Math.PI/6),a-p*Math.sin(l+Math.PI/6)),e.stroke(),t.isSelected&&(M(e,i,s),M(e,n,a))}var Ye="/Users/nashaofu/Documents/GitHub/screenshots/packages/react-screenshots/src/Screenshots/operations/Arrow/index.tsx",ue;(function(e){e[e.Move=0]="Move",e[e.MoveStart=1]="MoveStart",e[e.MoveEnd=2]="MoveEnd"})(ue||(ue={}));function Lt(){const e=L(),[,t]=A(),[r,o]=G(),[i,n]=H(),s=W(),[a,m]=c.exports.useState(3),[u,p]=c.exports.useState("#ee5126"),l=c.exports.useRef(null),f=c.exports.useRef(null),h=r==="Arrow",x=c.exports.useCallback(()=>{o.set("Arrow"),t.set("default")},[o,t]),v=c.exports.useCallback(()=>{h||(x(),n.clearSelect())},[h,x,n]),y=c.exports.useCallback((d,g)=>{if(d.name!=="Arrow"||!s.current)return;const N=d;x();const{x1:C,y1:S,x2:E,y2:D}=Fe(N);let R=0;V(s.current.canvas,g,{x:C,y:S})?R=1:V(s.current.canvas,g,{x:E,y:D})&&(R=2),f.current={type:j.Edit,data:{type:R,x1:g.clientX,y1:g.clientY,x2:g.clientX,y2:g.clientY},source:N},n.select(d)},[s,x,n]),k=c.exports.useCallback(d=>{if(!h||l.current||!s.current)return;const{left:g,top:N}=s.current.canvas.getBoundingClientRect();l.current={name:"Arrow",type:j.Source,data:{size:a,color:u,x1:d.clientX-g,y1:d.clientY-N,x2:d.clientX-g,y2:d.clientY-N},editHistory:[],draw:$t,isHit:xe}},[h,u,a,s]),w=c.exports.useCallback(d=>{if(!(!h||!s.current)){if(f.current)f.current.data.x2=d.clientX,f.current.data.y2=d.clientY,i.top!==f.current?(f.current.source.editHistory.push(f.current),n.push(f.current)):n.set(i);else if(l.current){const{left:g,top:N}=s.current.canvas.getBoundingClientRect();l.current.data.x2=d.clientX-g,l.current.data.y2=d.clientY-N,i.top!==l.current?n.push(l.current):n.set(i)}}},[h,i,s,n]),z=c.exports.useCallback(()=>{!h||(l.current&&n.clearSelect(),l.current=null,f.current=null)},[h,n]);return ae(y),ee(k),te(w),se(z),b.exports.jsxDEV(P,{title:e.operation_arrow_title,icon:"icon-arrow",checked:h,onClick:v,option:b.exports.jsxDEV(ce,{size:a,color:u,onSizeChange:m,onColorChange:p},void 0,!1,{fileName:Ye,lineNumber:190,columnNumber:15},this)},void 0,!1,{fileName:Ye,lineNumber:185,columnNumber:5},this)}function Te(e){let{x1:t,y1:r,x2:o,y2:i}=e.data;return e.editHistory.forEach(({data:n})=>{const s=n.x2-n.x1,a=n.y2-n.y1;n.type===X.Move?(t+=s,r+=a,o+=s,i+=a):n.type===X.ResizeTop?r+=a:n.type===X.ResizeRightTop?(o+=s,r+=a):n.type===X.ResizeRight?o+=s:n.type===X.ResizeRightBottom?(o+=s,i+=a):n.type===X.ResizeBottom?i+=a:n.type===X.ResizeLeftBottom?(t+=s,i+=a):n.type===X.ResizeLeft?t+=s:n.type===X.ResizeLeftTop&&(t+=s,r+=a)}),pe(T({},e.data),{x1:t,x2:o,y1:r,y2:i})}function Ht(e,t){const{size:r,color:o,x1:i,y1:n,x2:s,y2:a}=Te(t);e.lineCap="butt",e.lineJoin="miter",e.lineWidth=r,e.strokeStyle=o;const m=(i+s)/2,u=(n+a)/2,p=Math.abs(s-i)/2,l=Math.abs(a-n)/2,f=.5522848,h=p*f,x=l*f;e.beginPath(),e.moveTo(m-p,u),e.bezierCurveTo(m-p,u-x,m-h,u-l,m,u-l),e.bezierCurveTo(m+h,u-l,m+p,u-x,m+p,u),e.bezierCurveTo(m+p,u+x,m+h,u+l,m,u+l),e.bezierCurveTo(m-h,u+l,m-p,u+x,m-p,u),e.closePath(),e.stroke(),t.isSelected&&(e.lineWidth=1,e.strokeStyle="#000000",e.fillStyle="#ffffff",e.beginPath(),e.moveTo(i,n),e.lineTo(s,n),e.lineTo(s,a),e.lineTo(i,a),e.closePath(),e.stroke(),M(e,(i+s)/2,n),M(e,s,n),M(e,s,(n+a)/2),M(e,s,a),M(e,(i+s)/2,a),M(e,i,a),M(e,i,(n+a)/2),M(e,i,n))}var Ue="/Users/nashaofu/Documents/GitHub/screenshots/packages/react-screenshots/src/Screenshots/operations/Ellipse/index.tsx",X;(function(e){e[e.Move=0]="Move",e[e.ResizeTop=1]="ResizeTop",e[e.ResizeRightTop=2]="ResizeRightTop",e[e.ResizeRight=3]="ResizeRight",e[e.ResizeRightBottom=4]="ResizeRightBottom",e[e.ResizeBottom=5]="ResizeBottom",e[e.ResizeLeftBottom=6]="ResizeLeftBottom",e[e.ResizeLeft=7]="ResizeLeft",e[e.ResizeLeftTop=8]="ResizeLeftTop"})(X||(X={}));function Pt(){const e=L(),[t,r]=H(),[o,i]=G(),[,n]=A(),s=W(),[a,m]=c.exports.useState(3),[u,p]=c.exports.useState("#ee5126"),l=c.exports.useRef(null),f=c.exports.useRef(null),h=o==="Ellipse",x=c.exports.useCallback(()=>{i.set("Ellipse"),n.set("crosshair")},[i,n]),v=c.exports.useCallback(()=>{h||(x(),r.clearSelect())},[h,x,r]),y=c.exports.useCallback((d,g)=>{if(d.name!=="Ellipse"||!s.current)return;const N=d;x();const{x1:C,y1:S,x2:E,y2:D}=Te(N);let R=0;V(s.current.canvas,g,{x:(C+E)/2,y:S})?R=1:V(s.current.canvas,g,{x:E,y:S})?R=2:V(s.current.canvas,g,{x:E,y:(S+D)/2})?R=3:V(s.current.canvas,g,{x:E,y:D})?R=4:V(s.current.canvas,g,{x:(C+E)/2,y:D})?R=5:V(s.current.canvas,g,{x:C,y:D})?R=6:V(s.current.canvas,g,{x:C,y:(S+D)/2})?R=7:V(s.current.canvas,g,{x:C,y:S})&&(R=8),f.current={type:j.Edit,data:{type:R,x1:g.clientX,y1:g.clientY,x2:g.clientX,y2:g.clientY},source:N},r.select(d)},[s,x,r]),k=c.exports.useCallback(d=>{if(!h||!s.current||l.current)return;const{left:g,top:N}=s.current.canvas.getBoundingClientRect(),C=d.clientX-g,S=d.clientY-N;l.current={name:"Ellipse",type:j.Source,data:{size:a,color:u,x1:C,y1:S,x2:C,y2:S},editHistory:[],draw:Ht,isHit:xe}},[h,a,u,s]),w=c.exports.useCallback(d=>{if(!(!h||!s.current)){if(f.current)f.current.data.x2=d.clientX,f.current.data.y2=d.clientY,t.top!==f.current?(f.current.source.editHistory.push(f.current),r.push(f.current)):r.set(t);else if(l.current){const{left:g,top:N}=s.current.canvas.getBoundingClientRect();l.current.data.x2=d.clientX-g,l.current.data.y2=d.clientY-N,t.top!==l.current?r.push(l.current):r.set(t)}}},[h,s,t,r]),z=c.exports.useCallback(()=>{!h||(l.current&&r.clearSelect(),l.current=null,f.current=null)},[h,r]);return ae(y),ee(k),te(w),se(z),b.exports.jsxDEV(P,{title:e.operation_ellipse_title,icon:"icon-ellipse",checked:h,onClick:v,option:b.exports.jsxDEV(ce,{size:a,color:u,onSizeChange:m,onColorChange:p},void 0,!1,{fileName:Ue,lineNumber:242,columnNumber:15},this)},void 0,!1,{fileName:Ue,lineNumber:237,columnNumber:5},this)}function Ae(e){let{x1:t,y1:r,x2:o,y2:i}=e.data;return e.editHistory.forEach(({data:n})=>{const s=n.x2-n.x1,a=n.y2-n.y1;n.type===F.Move?(t+=s,r+=a,o+=s,i+=a):n.type===F.ResizeTop?r+=a:n.type===F.ResizeRightTop?(o+=s,r+=a):n.type===F.ResizeRight?o+=s:n.type===F.ResizeRightBottom?(o+=s,i+=a):n.type===F.ResizeBottom?i+=a:n.type===F.ResizeLeftBottom?(t+=s,i+=a):n.type===F.ResizeLeft?t+=s:n.type===F.ResizeLeftTop&&(t+=s,r+=a)}),pe(T({},e.data),{x1:t,x2:o,y1:r,y2:i})}function Xt(e,t){const{size:r,color:o,x1:i,y1:n,x2:s,y2:a}=Ae(t);e.lineCap="butt",e.lineJoin="miter",e.lineWidth=r,e.strokeStyle=o,e.beginPath(),e.moveTo(i,n),e.lineTo(s,n),e.lineTo(s,a),e.lineTo(i,a),e.closePath(),e.stroke(),t.isSelected&&(e.lineWidth=1,e.strokeStyle="#000000",e.fillStyle="#ffffff",M(e,(i+s)/2,n),M(e,s,n),M(e,s,(n+a)/2),M(e,s,a),M(e,(i+s)/2,a),M(e,i,a),M(e,i,(n+a)/2),M(e,i,n))}var Ge="/Users/nashaofu/Documents/GitHub/screenshots/packages/react-screenshots/src/Screenshots/operations/Rectangle/index.tsx",F;(function(e){e[e.Move=0]="Move",e[e.ResizeTop=1]="ResizeTop",e[e.ResizeRightTop=2]="ResizeRightTop",e[e.ResizeRight=3]="ResizeRight",e[e.ResizeRightBottom=4]="ResizeRightBottom",e[e.ResizeBottom=5]="ResizeBottom",e[e.ResizeLeftBottom=6]="ResizeLeftBottom",e[e.ResizeLeft=7]="ResizeLeft",e[e.ResizeLeftTop=8]="ResizeLeftTop"})(F||(F={}));function Ft(){const e=L(),[t,r]=H(),[o,i]=G(),[,n]=A(),s=W(),[a,m]=c.exports.useState(3),[u,p]=c.exports.useState("#ee5126"),l=c.exports.useRef(null),f=c.exports.useRef(null),h=o==="Rectangle",x=c.exports.useCallback(()=>{i.set("Rectangle"),n.set("crosshair")},[i,n]),v=c.exports.useCallback(()=>{h||(x(),r.clearSelect())},[h,x,r]),y=c.exports.useCallback((d,g)=>{if(d.name!=="Rectangle"||!s.current)return;const N=d;x();const{x1:C,y1:S,x2:E,y2:D}=Ae(N);let R=0;V(s.current.canvas,g,{x:(C+E)/2,y:S})?R=1:V(s.current.canvas,g,{x:E,y:S})?R=2:V(s.current.canvas,g,{x:E,y:(S+D)/2})?R=3:V(s.current.canvas,g,{x:E,y:D})?R=4:V(s.current.canvas,g,{x:(C+E)/2,y:D})?R=5:V(s.current.canvas,g,{x:C,y:D})?R=6:V(s.current.canvas,g,{x:C,y:(S+D)/2})?R=7:V(s.current.canvas,g,{x:C,y:S})&&(R=8),f.current={type:j.Edit,data:{type:R,x1:g.clientX,y1:g.clientY,x2:g.clientX,y2:g.clientY},source:d},r.select(d)},[s,x,r]),k=c.exports.useCallback(d=>{if(!h||!s.current||l.current)return;const{left:g,top:N}=s.current.canvas.getBoundingClientRect(),C=d.clientX-g,S=d.clientY-N;l.current={name:"Rectangle",type:j.Source,data:{size:a,color:u,x1:C,y1:S,x2:C,y2:S},editHistory:[],draw:Xt,isHit:xe}},[h,a,u,s]),w=c.exports.useCallback(d=>{if(!(!h||!s.current)){if(f.current)f.current.data.x2=d.clientX,f.current.data.y2=d.clientY,t.top!==f.current?(f.current.source.editHistory.push(f.current),r.push(f.current)):r.set(t);else if(l.current){const{left:g,top:N}=s.current.canvas.getBoundingClientRect(),C=l.current.data;C.x2=d.clientX-g,C.y2=d.clientY-N,t.top!==l.current?r.push(l.current):r.set(t)}}},[h,s,t,r]),z=c.exports.useCallback(()=>{!h||(l.current&&r.clearSelect(),l.current=null,f.current=null)},[h,r]);return ae(y),ee(k),te(w),se(z),b.exports.jsxDEV(P,{title:e.operation_rectangle_title,icon:"icon-rectangle",checked:h,onClick:v,option:b.exports.jsxDEV(ce,{size:a,color:u,onSizeChange:m,onColorChange:p},void 0,!1,{fileName:Ge,lineNumber:242,columnNumber:15},this)},void 0,!1,{fileName:Ge,lineNumber:237,columnNumber:5},this)}var Yt=[Ft,Pt,Lt,_t,Mt,Ct,"|",yt,bt,"|",xt,mt,ht];var le="/Users/nashaofu/Documents/GitHub/screenshots/packages/react-screenshots/src/Screenshots/ScreenshotsOperations/index.tsx";const We=Me.createContext(null);function Tt(){const{width:e,height:t}=$(),[r]=U(),[o,i]=c.exports.useState(null),[n,s]=c.exports.useState(null),a=c.exports.useRef(null),m=c.exports.useCallback(p=>{p.stopPropagation()},[]),u=c.exports.useCallback(p=>{p.preventDefault(),p.stopPropagation()},[]);return c.exports.useEffect(()=>{if(!r||!a.current)return;const p=a.current.getBoundingClientRect();let l=r.x+r.width-p.width,f=r.y+r.height+10;l<0&&(l=0),l>e-p.width&&(l=e-p.width),f>t-p.height&&(f=t-p.height-10),((n==null?void 0:n.x)!==l||n.y!==f)&&s({x:l,y:f}),((o==null?void 0:o.x)!==p.x||o.y!==p.y||o.width!==p.width||o.height!==p.height)&&i({x:p.x,y:p.y,width:p.width,height:p.height})}),r?b.exports.jsxDEV(We.Provider,{value:o,children:b.exports.jsxDEV("div",{ref:a,className:"screenshots-operations",style:{visibility:n?"visible":"hidden",left:n==null?void 0:n.x,top:n==null?void 0:n.y},onDoubleClick:m,onContextMenu:u,children:b.exports.jsxDEV("div",{className:"screenshots-operations-buttons",children:Yt.map((p,l)=>p==="|"?b.exports.jsxDEV("div",{className:"screenshots-operations-divider"},l,!1,{fileName:le,lineNumber:91,columnNumber:22},this):b.exports.jsxDEV(p,{},l,!1,{fileName:le,lineNumber:93,columnNumber:22},this))},void 0,!1,{fileName:le,lineNumber:88,columnNumber:9},this)},void 0,!1,{fileName:le,lineNumber:77,columnNumber:7},this)},void 0,!1,{fileName:le,lineNumber:76,columnNumber:5},this):null}function Ut(e){const[t,r]=c.exports.useState(null);return c.exports.useEffect(()=>{if(r(null),e==null)return;const o=document.createElement("img"),i=()=>r(o),n=()=>r(null);return o.addEventListener("load",i),o.addEventListener("error",n),o.src=e,()=>{o.removeEventListener("load",i),o.removeEventListener("error",n)}},[e]),t}var fe="/Users/nashaofu/Documents/GitHub/screenshots/packages/react-screenshots/src/Screenshots/index.tsx";function At(s){var a=s,{url:e,width:t,height:r,lang:o,className:i}=a,n=Be(a,["url","width","height","lang","className"]);const m=Ut(e),u=c.exports.useRef(null),p=c.exports.useRef({}),[l,f]=c.exports.useState({index:-1,stack:[]}),[h,x]=c.exports.useState(null),[v,y]=c.exports.useState("move"),[k,w]=c.exports.useState(void 0),z={url:e,width:t,height:r,image:m,lang:T(T({},_e),o),emiterRef:p,canvasContextRef:u,history:l,bounds:h,cursor:v,operation:k},d=c.exports.useCallback((D,...R)=>{const O=n[D];typeof O=="function"&&O(...R)},[n]),g={call:d,setHistory:f,setBounds:x,setCursor:y,setOperation:w},N=["screenshots"];i&&N.push(i);const C=()=>{p.current={},f({index:-1,stack:[]}),x(null),y("move"),w(void 0)},S=c.exports.useCallback(async D=>{if(!(D.button!==0||!m))if(h&&u.current)u.current.canvas.toBlob(R=>{d("onOk",R,h),C()},"image/png");else{const R=await et(m,{width:t,height:r});d("onOk",R,{x:0,y:0,width:t,height:r}),C()}},[m,h,t,r,d]),E=c.exports.useCallback(D=>{D.button===2&&(D.preventDefault(),d("onCancel"),C())},[d]);return c.exports.useLayoutEffect(()=>{C()},[e]),b.exports.jsxDEV(ve.Provider,{value:{store:z,dispatcher:g},children:b.exports.jsxDEV("div",{className:N.join(" "),style:{width:t,height:r},onDoubleClick:S,onContextMenu:E,children:[b.exports.jsxDEV(nt,{},void 0,!1,{fileName:fe,lineNumber:135,columnNumber:9},this),b.exports.jsxDEV(ut,{ref:u},void 0,!1,{fileName:fe,lineNumber:136,columnNumber:9},this),b.exports.jsxDEV(Tt,{},void 0,!1,{fileName:fe,lineNumber:137,columnNumber:9},this)]},void 0,!0,{fileName:fe,lineNumber:129,columnNumber:7},this)},void 0,!1,{fileName:fe,lineNumber:128,columnNumber:5},this)}var Ie="/Users/nashaofu/Documents/GitHub/screenshots/packages/react-screenshots/src/electron/app.tsx";function Gt(){const[e,t]=c.exports.useState(void 0),[r,o]=c.exports.useState(window.innerWidth),[i,n]=c.exports.useState(window.innerHeight),[s,a]=c.exports.useState(void 0),[m,u]=c.exports.useState(void 0),p=c.exports.useCallback(async(h,x)=>{!s||!h||window.screenshots.save(await h.arrayBuffer(),{bounds:x,display:s})},[s]),l=c.exports.useCallback(()=>{window.screenshots.cancel()},[]),f=c.exports.useCallback(async(h,x)=>{!s||!h||window.screenshots.ok(await h.arrayBuffer(),{bounds:x,display:s})},[s]);return c.exports.useEffect(()=>{const h=y=>{u(y)},x=(y,k)=>{a(y),t(k)},v=()=>{t(void 0),a(void 0),requestAnimationFrame(()=>window.screenshots.reset())};return window.screenshots.on("setLang",h),window.screenshots.on("capture",x),window.screenshots.on("reset",v),window.screenshots.ready(),()=>{window.screenshots.off("capture",x),window.screenshots.off("setLang",h),window.screenshots.off("reset",v)}},[]),c.exports.useEffect(()=>{const h=()=>{o(window.innerWidth),n(window.innerHeight)};return window.addEventListener("resize",h),()=>{window.removeEventListener("resize",h)}},[l]),b.exports.jsxDEV("div",{className:"body",children:b.exports.jsxDEV(At,{url:e,width:r,height:i,lang:m,onSave:p,onCancel:l,onOk:f},void 0,!1,{fileName:Ie,lineNumber:89,columnNumber:7},this)},void 0,!1,{fileName:Ie,lineNumber:88,columnNumber:5},this)}var Oe="/Users/nashaofu/Documents/GitHub/screenshots/packages/react-screenshots/src/electron/index.tsx";Ke.render(b.exports.jsxDEV(c.exports.StrictMode,{children:b.exports.jsxDEV(Gt,{},void 0,!1,{fileName:Oe,lineNumber:7,columnNumber:5},globalThis)},void 0,!1,{fileName:Oe,lineNumber:6,columnNumber:3},globalThis),document.getElementById("app"));
@@ -1,13 +0,0 @@
1
- import { ReactElement } from 'react';
2
- import { Lang } from '../zh_CN';
3
- import '../icons/iconfont.less';
4
- import './screenshots.less';
5
- export interface ScreenshotsProps {
6
- url?: string;
7
- width: number;
8
- height: number;
9
- lang?: Partial<Lang>;
10
- className?: string;
11
- [key: string]: unknown;
12
- }
13
- export default function Screenshots({ url, width, height, lang, className, ...props }: ScreenshotsProps): ReactElement;
@@ -1,5 +0,0 @@
1
- export interface TargetSize {
2
- width: number;
3
- height: number;
4
- }
5
- export default function imageToBlob(image: HTMLImageElement, { width, height }: TargetSize): Promise<Blob>;