Gathering detailed insights and metrics for croact-ruler
Gathering detailed insights and metrics for croact-ruler
Gathering detailed insights and metrics for croact-ruler
Gathering detailed insights and metrics for croact-ruler
npm install croact-ruler
75.3
Supply Chain
66.5
Quality
75.5
Maintenance
100
Vulnerability
100
License
0.20.0 Release (2023-06-03)
Published on 02 Jun 2023
0.19.0 Release (2023-06-02)
Published on 01 Jun 2023
0.18.6 Release (2023-05-16)
Published on 15 May 2023
0.18.5 Release (2023-05-16)
Published on 15 May 2023
0.18.3 Release (2023-04-11)
Published on 11 Apr 2023
0.18.2 Release (2023-04-11)
Published on 10 Apr 2023
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
334 Stars
136 Commits
39 Forks
7 Watching
2 Branches
4 Contributors
Updated on 26 Nov 2024
TypeScript (66.59%)
JavaScript (14.8%)
Svelte (6.9%)
CSS (4.77%)
HTML (4.39%)
Vue (2.56%)
Cumulative downloads
Total Downloads
Last day
43.4%
152
Compared to previous day
Last week
29.8%
928
Compared to previous week
Last month
29.6%
3,307
Compared to previous month
Last year
222.5%
29,762
Compared to previous year
A Ruler component that can draw grids and scroll infinitely.
Demo / API / Guides / Main Project
1$ npm i @scena/ruler
1<script src="//daybrush.com/ruler/release/latest/dist/ruler.min.js"></script>
1import Ruler from "@scena/ruler"; 2 3const ruler = new Ruler(document.body, { 4 type: "horizontal", 5}); 6 7 8window.addEventListener("resize", () => { 9 ruler.resize(); 10}); 11 12export interface RulerInterface { 13 scroll(scrollPos: number): any; 14 resize(): any; 15} 16export interface RulerProps { 17 type?: "horizontal" | "vertical"; 18 width?: number; 19 height?: number; 20 unit?: number; 21 zoom?: number; 22 direction?: "start" | "end"; 23 style?: IObject<any>; 24 backgroundColor?: string; 25 lineColor?: string; 26 textColor?: string; 27 textFormat?: (scale: number) => string; 28}
The default unit is px, and a line is drawn every 50px. If you want to use a different unit instead of the px unit, use it like this:
The ruler
repo is managed as a monorepo with yarn
.
1yarn config set registry https://registry.npmjs.org/
Please give a ⭐️ if this project helped you!
If you have any questions or requests or want to contribute to ruler
or other packages, please write the issue or give me a Pull Request freely.
If you find a bug, please report to us opening a new Issue on GitHub.
This project is MIT licensed.
MIT License
Copyright (c) 2019 Daybrush
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
83 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More