Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.2.0 #4

Merged
merged 19 commits into from
Dec 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
4625de0
Update deploy-docs action and create a publish-npm action.
niklasramo Jul 10, 2023
592d9a3
Update docs.
niklasramo Jul 10, 2023
424b911
Allow Element or HTMLElement|SVGElement instead of just HTMLElement t…
niklasramo Jul 12, 2023
8f44726
Make getStyle util more strongly typed. More robust offset container …
niklasramo Jul 15, 2023
b2e2c37
Refactor build system to use tsup instead of rollup. Export CommonJS …
niklasramo Jul 20, 2023
d48b5b8
Update docs browser installation example.
niklasramo Jul 20, 2023
8c90fb1
Update version to 0.2.0.
niklasramo Jul 24, 2023
1f477df
Use snake-case for all filenames where possible.
niklasramo Jul 24, 2023
530d8fa
Move examples to docs. Remove unnecessary 'Space' key from KeyboardSe…
niklasramo Aug 12, 2023
38c3e0c
Reset direction on KeyboardMotionSensor end/cancel callbacks.
niklasramo Aug 12, 2023
66a9f2d
Refactor Draggable events + add examples to docs.
niklasramo Sep 17, 2023
dceacb1
Update deps + adjust docs styles.
niklasramo Oct 29, 2023
557b4fb
Update deps + add new getFrozenProps option to Draggable.
niklasramo Nov 22, 2023
f564971
Use mezr where possible + improved examples generation + improved typ…
niklasramo Dec 3, 2023
5f962ca
Add snap to grid example + adjust the API to handle the example grace…
niklasramo Dec 14, 2023
1dd20a2
Update deps.
niklasramo Dec 16, 2023
d2775fc
Refactor prettier.
niklasramo Dec 16, 2023
cbf63be
Add new workflows.
niklasramo Dec 16, 2023
712b30a
Update .prettierignore.
niklasramo Dec 16, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/ci-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: CI main
on:
push:
branches:
- 'main'
tags-ignore:
- '**'
workflow_dispatch:
jobs:
run-tests:
name: Run tests
uses: ./.github/workflows/run-tests.yml
secrets:
BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }}
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
13 changes: 13 additions & 0 deletions .github/workflows/ci-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: CI Pull Request
on:
pull_request:
branches:
- 'main'
workflow_dispatch:
jobs:
run-tests:
name: Run tests
uses: ./.github/workflows/run-tests.yml
secrets:
BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }}
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
Original file line number Diff line number Diff line change
@@ -1,25 +1,21 @@
name: Deploy

name: Deploy docs
on:
push:
branches:
- main

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
node-version: '18.x'
cache: npm
- run: npm ci

- name: Build
- name: Build docs
run: npm run docs-build

- name: Deploy
- name: Deploy docs
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Publish to npm
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
27 changes: 27 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Run tests
on:
workflow_call:
secrets:
BROWSERSTACK_USERNAME:
required: true
BROWSERSTACK_ACCESS_KEY:
required: true
jobs:
run-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use Node.js 18.x
uses: actions/setup-node@v4
with:
node-version: '18.x'
- name: Install dependencies
run: npm ci
- name: Check formatting
run: npm run format-check
- name: Tests
env:
BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }}
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
run: npm run test
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ docs/.vitepress/cache
docs/.vitepress/dist
*.log
*.env
*.DS_Store
*.DS_Store
.parcel-cache
13 changes: 13 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
**/*.log
**/*.map
**/*.svg
**/.env
**/.git
**/.gitignore
**/.parcel-cache
**/.prettierignore
**/cache
**/dist
**/docs/public/examples
**/node_modules
**/package-lock.json
14 changes: 7 additions & 7 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Copyright (c) 2022, Niklas Rämö
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.
Copyright (c) 2022, Niklas Rämö

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.
74 changes: 37 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
<h1 align="center">
<a id="dragdoll" href="#dragdoll" aria-hidden="true"><img src="https://niklasramo.github.io/dragdoll/dragdoll-logo.svg" alt="DragDoll" width="400" /></a>
</h1>
DragDoll is a modular and highly extensible drag & drop system written in TypeScript. It's originally based on [Muuri's](https://github.com/haltu/muuri) internal drag & drop system, but fully redesigned to be used as a general purpose drag & drop system.
📡 &nbsp; **Sweet Sensors**
A well documented and extendable Sensor system that normalizes any inputs into unified drag events.
🤏 &nbsp; **Dynamic Draggables**
A highly customizable and pluggable Draggable system with autoscrolling superpowers.
🧘 &nbsp; **Blissful DX**
Comes with strong types, smart defaults and prebaked solutions for common use cases.
🎁 &nbsp; **Tiny and Modular**
Weighs around 11kB gzipped all in all, but you can use only the bits and pieces you need.
🍦 &nbsp; **Vanilla Flavour**
No frameworks were abused while writing this library. It's all vanilla framework-free TS down to the core.
💝 &nbsp; **Free & Open Source**
100% MIT licensed, spread the love.
## Docs
https://niklasramo.github.io/dragdoll/docs/getting-started.html
## Copyright
Copyright © 2022, Niklas Rämö (inramo@gmail.com). Licensed under the MIT license.
<h1 align="center">
<a id="dragdoll" href="#dragdoll" aria-hidden="true"><img src="https://niklasramo.github.io/dragdoll/dragdoll-logo.svg" alt="DragDoll" width="400" /></a>
</h1>

DragDoll is a modular and highly extensible drag & drop system written in TypeScript. It's originally based on [Muuri's](https://github.com/haltu/muuri) internal drag & drop system, but fully redesigned to be used as a general purpose drag & drop system.

📡 &nbsp; **Sweet Sensors**

A well documented and extendable Sensor system that normalizes any inputs into unified drag events.

🤏 &nbsp; **Dynamic Draggables**

A highly customizable and pluggable Draggable system with autoscrolling superpowers.

🧘 &nbsp; **Blissful DX**

Comes with strong types, smart defaults and prebaked solutions for common use cases.

🎁 &nbsp; **Tiny and Modular**

Weighs around 11kB gzipped all in all, but you can use only the bits and pieces you need.

🍦 &nbsp; **Vanilla Flavour**

No frameworks were abused while writing this library. It's all vanilla framework-free TS down to the core.

💝 &nbsp; **Free & Open Source**

100% MIT licensed, spread the love.

## Docs

https://niklasramo.github.io/dragdoll/docs/getting-started.html

## Copyright

Copyright © 2022, Niklas Rämö (inramo@gmail.com). Licensed under the MIT license.
1 change: 1 addition & 0 deletions dist/dragdoll.cjs

Large diffs are not rendered by default.

Loading