This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [animejs](https://animejs.com) ([source](https://redirect.github.com/juliangarnier/anime)) | [`^3.2.2` -> `^4.0.0`](https://renovatebot.com/diffs/npm/animejs/3.2.2/4.0.0) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>juliangarnier/anime (animejs)</summary> ### [`v4.0.0`](https://redirect.github.com/juliangarnier/anime/releases/tag/4.0.0) [Compare Source](https://redirect.github.com/juliangarnier/anime/compare/v3.2.2...4.0.0) > **I'm still finalizing the release notes as there are MANY changes, but in the meantime, you can check out the brand new documentation [here](https://animejs.com/documentation).** The brand new Anime.js. ### API Breaking changes Every Anime.js feature is now exported as an ES Module. This is great for tree shaking, you don't have to ship the entire library anymore, only what you need. #### Animation The `anime(parameters)` function has been replaced with the `animate(targets, parameters)` module. The `targets` parameter has been replaced with a dedicated function parameter: `animate(targets, parameters)`. V3: ```javascript import anime from 'animejs'; const animation = anime({ targets: 'div', translateX: 100, }); ``` V4: ```javascript import { animate } from 'animejs'; const animation = animate('div', { translateX: 100, }); ``` #### Easings names The `ease` prefix has been removed: 'easeInOutQuad' -> 'inOutQuad'. #### Callbacks Callbacks have have been renamed like this: - `begin()` -> `onBegin()` - `update()` -> `onUpdate()` Here's all the change to the API ```diff - import anime from 'animejs'; + import { animate, createSpring, utils } from 'animejs'; - anime({ - targets: 'div', + animate('div', { translateX: 100, rotate: { - value: 360, + to: 360, - easing: 'spring(.7, 80, 10, .5)', + ease: createSpring({ mass: .7, damping: 80, stiffness: 10, velocity: .5}), }, - easing: 'easeinOutExpo', + ease: 'inOutExpo', - easing: () => t => Math.cos(t), + ease: t => Math.cos(t), - direction: 'reverse', + reversed: true, - direction: 'alternate', + alternate: true, - loop: 1, + loop: 0, - round: 100, + modifier: utils.round(2), - begin: () => {}, + onBegin: () => {}, - update: () => {}, + onUpdate: () => {}, - change: () => {}, + onRender: () => {}, - changeBegin: () => {}, - changeComplete: () => {}, - loopBegin: () => {}, - loopComplete: () => {}, + onLoop: () => {}, - complete: () => {}, + onComplete: () => {}, }); ``` #### Promises No more `.finished` property, promises are now handled directly with `animation.then()`: ```diff - import anime from 'animejs'; + import { animate, utils } from 'animejs'; - anime({ targets: target, prop: x }).finished.then(() => {}); + animate(target, { prop: x }).then(() => {}); ``` #### Values ##### To The object syntax `value` property has been renamed `to`: ```diff - translateX: { value: 100 } + translateX: { to: 100 } ``` #### Animation parameters ##### Default `easing` The new default easing is `'outQuad'` instead of `'easeOutElastic(1, .5)'`. ##### `composition` In V3 all animations coexist and overlaps with each other. This can cause animations with the same targets and animated properties to create weird results. V4 cancels a running tween if a new one is created on the same target with the same property. This behaviour can be confifugred using the new `composition` parameter. `composition: 'none'` // The old V3 behaviour, animations can overlaps `composition: 'replace'` // The new V4 default `composition: 'add'` // Creates additive animations by adding the values of the currently running animations with the new ones ##### `round` -> `modifier` The `round` parameter has been replaced with a more flexible parameters that allows you to define custom functions to transform the numerical value of an animation just before the rendering. ```diff - round: 100 + modifier: utils.round(2) ``` You can of course defines your own modifier functions like this: ```javascript const animation = animate('div', { translateX: '100rem', modifier: v => v % 10 // Note that the unit 'rem' will automatically be passed to the rendered value }); ``` #### Playback parameters ##### `direction` The `direction` parameter has been replaced with an `alternate` and `reversed` parameters V3: ```javascript const animation = anime({ targets: 'div', direction: 'reverse', // direction: 'alternate' It wasn't possible to combined reverse and alternate direction before }); ``` V4: ```javascript import { animate } from 'animejs'; const animation = animate('div', { translateX: 100, reversed: true, alternate: true, }); ``` #### Timelines: ```diff - import anime from 'animejs'; + import { createTimeline, stagger } from 'animejs'; - anime.timeline({ + createTimeline({ - duration: 500, - easing: 'easeInOutQuad', + defaults: { + duration: 500, + ease: 'inOutQuad', + } - loop: 2, + loop: 1, - }).add({ - targets: 'div', + }).add('div', { rotate: 90, }) - .add('.target:nth-child(1)', { opacity: 0, onComplete }, 0) - .add('.target:nth-child(2)', { opacity: 0, onComplete }, 100) - .add('.target:nth-child(3)', { opacity: 0, onComplete }, 200) - .add('.target:nth-child(4)', { opacity: 0, onComplete }, 300) + .add('.target', { opacity: 0, onComplete }, stagger(100)) ``` ##### Stagger ```diff - import anime from 'animejs'; + import { animate, stagger } from 'animejs'; - anime({ - targets: 'div', + animate('div', { - translateX: anime.stagger(100), + translateX: stagger(100), - delay: anime.stagger(100, { direction: 'reversed' }), + translateX: stagger(100, { reversed: true }), }); ``` #### SVG ```diff - import anime from 'animejs'; + import { animate, svg } from 'animejs'; - const path = anime.path('path'); + const { x, y, angle } = svg.createMotionPath('path'); - anime({ - targets: '#shape1', + animate('#shape1', { - points: '70 41 118.574 59.369 111.145 132.631 60.855 84.631 20.426 60.369', + points: svg.morphTo('#shape2'), - strokeDashoffset: [anime.setDashoffset, 0], + strokeDashoffset: svg.drawLine(), - translateX: path('x'), - translateY: path('y'), - rotate: path('angle'), + translateX: x, + translateY: y, + rotate: angle, }); ``` #### Utils ```diff - import anime from 'animejs'; + import { utils } from 'animejs'; - const value = anime.get('#target1', 'translateX'); + const value = utils.get('#target1', 'translateX'); - anime.set('#target1', { translateX: 100 }); + utils.set('#target1', { translateX: 100 }); - anime.remove('#target1'); + utils.remove('#target1'); - const rounded = anime.round(value); + const rounded = utils.round(value, 0); ``` #### Engine ```diff - import anime from 'animejs'; + import { engine } from 'animejs'; - anime.suspendWhenDocumentHidden = false; + engine.pauseWhenHidden = false; - anime.speed = .5; + engine.playbackRate = .5; ``` ### Improvements #### Performances Major performance boost and lower memory footprint. V4 has bee re-written from scratch by keeping performance in mind at every steps. #### Better tween composition The tween system has been refactored to improve animations behaviours when they overlaps. This fix lots of issues, especially when creating multiple animations with the same property on the same target. #### Additive animations You can also blend animations together with the new `composition: 'add'` parameter. #### Improved Timelines - Child animations can new be looped and reversed - Add supports for labels - Add supports for `.set()` in timeline - New position operators for more flexibility - Multi-target child animation can be positioned using the `stagger` function - Easier children defaults configuration - Greatly improved support for CSS transforms composition from one child animation to another ```javascript const tl = createTimeline({ playbackRate: .2, defaults: { duration: 500, easing: 'outQuad', } }); tl.add('START', 100) // Add a label a 100ms .set('.target', { opacity: 0 }) .add('.target', { translateY: 100, opacity: 1, onComplete: () => {}, }, stagger(100)) .add('.target', { scale: .75, }, 'START') .add('.target', { rotate: '1turn', }, '<<+=200') ``` #### Properties ##### CSS Variables You can now use CSS variables directly like any other property: ```javascript // Animate the values of the CSS variables '--radius' animate('#target', { '--radius': '20px' }); ``` ##### Animating *from* Animate *from* a value ```diff + translateX: { from: 50 } ``` ##### From -> To Even if the `[from, to]` shortcut is still valid in V4, you can now also write it like this: ```diff + translateX: { from: 50, to: 100 } ``` ##### Colors You can now animate hex colors with an alpha channel like '#F443' or '#FF444433'. #### Timers You can now create timers with the `createTimer` module. Timers can be use as replacement for `setTimeout`or `setInterval` but with all the playbacks parameters, callbacks and the `Promise` system provided by anime.js. ``` const interval = createTimer({ onLoop: () => { // do something every 500ms }, duration: 500, }); const timeout = createTimer({ onComplete: () => { // do something in 500ms }, duration: 500, }); const gameLogicLoop = createTimer({ frameRate: 30, onUpdate: gameSystems, }); const gameRenderLoop = createTimer({ frameRate: 60, onUpdate: gameRender, }); ``` #### Variable frame rate You can now change the frame rate to all animations or to a specific Timeline / Animation / Timer </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/toeverything/AFFiNE). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yMjcuMyIsInVwZGF0ZWRJblZlciI6IjM5LjIyNy4zIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5IiwibGFiZWxzIjpbImRlcGVuZGVuY2llcyJdfQ==-->
AFFiNE.Pro
Write, Draw and Plan All at Once
A privacy-focused, local-first, open-source, and ready-to-use alternative for Notion & Miro.
One hyper-fused platform for wildly creative minds.
Special thanks to Blaze for their support of this project. They provide high-performance Apple Silicon macOS and Linux (AMD64 & ARM64) runners for GitHub Actions, greatly reducing our automated build times.
Getting started & staying tuned with us.
Star us, and you will receive all release notifications from GitHub without any delay!
What is AFFiNE
AFFiNE is an open-source, all-in-one workspace and an operating system for all the building blocks that assemble your knowledge base and much more -- wiki, knowledge management, presentation and digital assets. It's a better alternative to Notion and Miro.
Features
A true canvas for blocks in any form. Docs and whiteboard are now fully merged.
- Many editor apps claim to be a canvas for productivity, but AFFiNE is one of the very few which allows you to put any building block on an edgeless canvas -- rich text, sticky notes, any embedded web pages, multi-view databases, linked pages, shapes and even slides. We have it all.
Multimodal AI partner ready to kick in any work
- Write up professional work report? Turn an outline into expressive and presentable slides? Summary an article into a well-structured mindmap? Sorting your job plan and backlog for tasks? Or... draw and code prototype apps and web pages directly all with one prompt? With you, AFFiNE AI pushes your creativity to the edge of your imagination,just like Canvas AI to generate mind map for brainstorming.
Local-first & Real-time collaborative
- We love the idea of local-first that you always own your data on your disk, in spite of the cloud. Furthermore, AFFiNE supports real-time sync and collaborations on web and cross-platform clients.
Self-host & Shape your own AFFiNE
- You have the freedom to manage, self-host, fork and build your own AFFiNE. Plugin community and third-party blocks are coming soon. More tractions on Blocksuite. Check there to learn how to self-host AFFiNE.
Acknowledgement
“We shape our tools and thereafter our tools shape us”. A lot of pioneers have inspired us along the way, e.g.:
- Quip & Notion with their great concept of “everything is a block”
- Trello with their Kanban
- Airtable & Miro with their no-code programmable datasheets
- Miro & Whimiscal with their edgeless visual whiteboard
- Remote & Capacities with their object-based tag system
There is a large overlap of their atomic “building blocks” between these apps. They are not open source, nor do they have a plugin system like Vscode for contributors to customize. We want to have something that contains all the features we love and also goes one step even further.
Thanks for checking us out, we appreciate your interest and sincerely hope that AFFiNE resonates with you! 🎵 Checking https://affine.pro/ for more details ions.
Contributing
| Bug Reports | Feature Requests | Questions/Discussions | AFFiNE Community |
|---|---|---|---|
| Create a bug report | Submit a feature request | Check GitHub Discussion | Vist the AFFiNE Community |
| Something isn't working as expected | An idea for a new feature, or improvements | Discuss and ask questions | A place to ask, learn and engage with others |
Calling all developers, testers, tech writers and more! Contributions of all types are more than welcome, you can read more in docs/types-of-contributions.md. If you are interested in contributing code, read our docs/CONTRIBUTING.md and feel free to check out our GitHub issues to get stuck in to show us what you’re made of.
Before you start contributing, please make sure you have read and accepted our Contributor License Agreement. To indicate your agreement, simply edit this file and submit a pull request.
For bug reports, feature requests and other suggestions you can also create a new issue and choose the most appropriate template for your feedback.
For translation and language support you can visit our i18n General Space.
Looking for other ways to contribute and wondering where to start? Check out the AFFiNE Ambassador program, we work closely with passionate community members and provide them with a wide range of support and resources.
If you have questions, you are welcome to contact us. One of the best places to get more info and learn more is in the AFFiNE Community where you can engage with other like-minded individuals.
Templates
AFFiNE now provides pre-built templates from our team. Following are the Top 10 most popular templates among AFFiNE users,if you want to contribute, you can contribute your own template so other people can use it too.
- vision board template
- one pager template
- sample lesson plan math template
- grr lesson plan template free
- free editable lesson plan template for pre k
- high note collection planners
- digital planner
- ADHD Planner
- Reading Log
- Cornell Notes Template
Blog
Welcome to the AFFiNE blog section! Here, you’ll find the latest insights, tips, and guides on how to maximize your experience with AFFiNE and AFFiNE AI, the leading Canvas AI tool for flexible note-taking and creative organization.
- vision board template
- ai homework helper
- vision board maker
- itinerary template
- one pager template
- cornell notes template
- swot chart template
- apps like luna task
- note taking ai from rough notes to mind map
- canvas ai
- one pager
- SOP Template
- Chore Chart
Ecosystem
| Name | ||
|---|---|---|
| @affine/component | AFFiNE Component Resources | |
| @toeverything/theme | AFFiNE theme |
Upstreams
We would also like to give thanks to open-source projects that make AFFiNE possible:
- Blocksuite - 💠 BlockSuite is the open-source collaborative editor project behind AFFiNE.
- OctoBase - 🐙 OctoBase is the open-source database behind AFFiNE, local-first, yet collaborative. A light-weight, scalable, data engine written in Rust.
- yjs - Fundamental support of CRDTs for our implementation on state management and data sync.
- electron - Build cross-platform desktop apps with JavaScript, HTML, and CSS.
- React - The library for web and native user interfaces.
- napi-rs - A framework for building compiled Node.js add-ons in Rust via Node-API.
- Jotai - Primitive and flexible state management for React.
- async-call-rpc - A lightweight JSON RPC client & server.
- Vite - Next generation frontend tooling.
- Other upstream dependencies.
Thanks a lot to the community for providing such powerful and simple libraries, so that we can focus more on the implementation of the product logic, and we hope that in the future our projects will also provide a more easy-to-use knowledge base for everyone.
Contributors
We would like to express our gratitude to all the individuals who have already contributed to AFFiNE! If you have any AFFiNE-related project, documentation, tool or template, please feel free to contribute it by submitting a pull request to our curated list on GitHub: awesome-affine.
Self-Host
Begin with Docker to deploy your own feature-rich, unrestricted version of AFFiNE. Our team is diligently updating to the latest version. For more information on how to self-host AFFiNE, please refer to our documentation.
Hiring
Some amazing companies, including AFFiNE, are looking for developers! Are you interested in joining AFFiNE or its partners? Check out our Discord channel for some of the latest jobs available.
Feature Request
For feature requests, please see community.affine.pro.
Building
Codespaces
From the GitHub repo main page, click the green "Code" button and select "Create codespace on master". This will open a new Codespace with the (supposedly auto-forked AFFiNE repo cloned, built, and ready to go.
Local
See BUILDING.md for instructions on how to build AFFiNE from source code.
Contributing
We welcome contributions from everyone. See docs/contributing/tutorial.md for details.
Thanks
Thanks to Chromatic for providing the visual testing platform that helps us review UI changes and catch visual regressions.
License
Editions
-
AFFiNE Community Edition (CE) is the current available version, it's free for self-host under the MIT license.
-
AFFiNE Enterprise Edition (EE) is yet to be published, it will have more advanced features and enterprise-oriented offerings, including but not exclusive to rebranding and SSO, advanced admin and audit, etc., you may refer to https://affine.pro/pricing for more information
See LICENSE for details.