GithubHelp home page GithubHelp logo

elondormancy / selection Goto Github PK

View Code? Open in Web Editor NEW

This project forked from simonwep/selection

0.0 1.0 0.0 4.72 MB

✨ Viselect - A simple and lightweight library to add a visual way of selecting elements, just like on your Desktop. Zero dependencies, super small. Support for major frameworks.

Home Page: https://simonwep.github.io/selection

License: MIT License

JavaScript 7.50% HTML 2.72% CSS 10.66% TypeScript 72.62% Vue 6.50%

selection's Introduction

Logo

Visual dom-selection library

License MIT No dependencies Support me version Buy me a coffee Build Status gzip size brotli size Vue support Preact support React support Svelte support Lit-Element support Lit-Element support

Version 3 is currently released under a beta, please check the release notes for changes. Feedback is highly appreciated. If you're looking for v2, you can find it here (depreacted).

Features 🤘

  • 🌟 Modern bundle
  • 🔩 Ultra tiny (<4kb)
  • 👌 Simple usage
  • ⚡ Highly optimized
  • ✔ Zero dependencies
  • 📱 Mobile / touch support
  • 🖱 Vertical and horizontal scroll support
  • 💪 Hardened (over 3 years old and used in many apps)
  • 🖼 Support for major frameworks (WIP)

Getting started

Check out the documentation for the package you want to use:

Check out recipes for commonly asked questions and how to solve them using the standart library! For information about events and more check out the vanilla readme!

Browser support

This library will always have the previous year as its target. For 2021 for example the target will be ES2020. It always provides both a UMD (.js) and .mjs version. If you want to support legacy browsers, please use the feature of your bundler to transpile dependencie. In case of webpack and babel (give vite a try, it's awesome) you'll have to install corresponding plugins such as babel-plugin-proposal-optional-chaining and include the dependency from node_modules which is normally entirely excluded from being processed.

I do this to provide maximum flexibility and give those who target ESNext a chance to make full use of how this library is bundled. Everything else is just a matter of configuration :)

Development

Use the following commands to work on this locally (we use lerna to manage this):

  • npm run dev - Spawns a dev-server for all packages. Every framework-dependend package is bundled with the vanilla version.
  • npm run build - Builds all packages in parallel.
  • npm run lint:fix - Lints and fixes all errors in all packages.

For the development servers vite is used. It's superb, you should give it a try. To bundle it we use rollup (which is btw also used by vite behind the scenes) to have full control over how the bundle looks like.

You want to contribute?

That's awesome! Check out the contribution guidelines to get started :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.