Skip to content

Commit

Permalink
docs: update README
Browse files Browse the repository at this point in the history
  • Loading branch information
Marinerer committed Dec 3, 2024
1 parent eb11471 commit f848be9
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 196 deletions.
50 changes: 47 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,68 @@
# Jotter

> Document some lightweight front-end libraries (wheel building). The main features is "simple, universal, no dependence".
> Developing some lightweight front-end libraries (build wheels). Mainly "simple, generic, no dependencies".
记录一些轻量级的前端库 (造轮子)。👉 主打 "简洁、通用、无依赖"。

全部来自工作中开发的源码,非常适合项目中实现一些简单功能。

## Packages
## 📦 Packages

| Package | Version | Description |
| ----------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| [@jotter/websocket](https://github.com/Marinerer/jotter/tree/main/libs/websocket) | [![version](https://img.shields.io/npm/v/@jotter/websocket?style=flat-square)](https://www.npmjs.com/package/@jotter/websocket) | Modern and useful WebSocket wrapper, with standard WebSocket API. |
| [@jotter/animator](https://github.com/Marinerer/jotter/tree/main/libs/Animator) | [![version](https://img.shields.io/npm/v/@jotter/animator?style=flat-square)](https://www.npmjs.com/package/@jotter/animator) | Animator is an animation playback controller. |
| [@jotter/drag](https://github.com/Marinerer/jotter/tree/main/libs/Drag) | [![version](https://img.shields.io/npm/v/@jotter/drag?style=flat-square)](https://www.npmjs.com/package/@jotter/animator) | Lightweight "drag-and-drop" library of draggable elements within a specified range. |
| [dom-event-emit](https://github.com/Marinerer/jotter/tree/main/libs/domEmit) | [![version](https://img.shields.io/npm/v/dom-event-emit?style=flat-square)](https://www.npmjs.com/package/dom-event-emit) | A type-safe, flexible DOM event emitter for browser environments. |
| [@jotter/emitter](https://github.com/Marinerer/jotter/tree/main/libs/emitter) | [![version](https://img.shields.io/npm/v/@jotter/emitter?style=flat-square)](https://www.npmjs.com/package/@jotter/emitter) | Simple and modern event emitter library. |
| [@jotter/websocket](https://github.com/Marinerer/jotter/tree/main/libs/websocket) | [![version](https://img.shields.io/npm/v/@jotter/websocket?style=flat-square)](https://www.npmjs.com/package/@jotter/websocket) | Modern and useful WebSocket wrapper, with standard WebSocket API. |
| [@jotter/dateformat](https://github.com/Marinerer/jotter/tree/main/libs/dateFormat) | [![version](https://img.shields.io/npm/v/@jotter/dateformat?style=flat-square)](https://www.npmjs.com/package/@jotter/dateformat) | A date/time formatting function. |
| [@jotter/from-now](https://github.com/Marinerer/jotter/tree/main/libs/fromNow) | [![version](https://img.shields.io/npm/v/@jotter/from-now?style=flat-square)](https://www.npmjs.com/package/@jotter/from-now) | A relative time formatting functions. |
| [@jotter/position](https://github.com/Marinerer/jotter/tree/main/libs/position) | [![version](https://img.shields.io/npm/v/@jotter/position?style=flat-square)](https://www.npmjs.com/package/@jotter/position) | Positioning a DOM element relative to another DOM element. |

### @jotter/websocket

📚 [Document](./libs/websocket/README.md)

> Modern and useful WebSocket API wrapper class with additional features such as auto-reconnect, message queuing and Keep-alive detection.
>
> 标准且实用的 WebSocket 包装器,具有标准 `WebSocket API`。支持心跳检测,异常消息处理和自动重连机制。
- ⏰ With Standard WebSocket API
- 🧬 Automatic Reconnection
- 💓 Keep-alive (Ping) Support
- 📮 Message Queuing
- 🌐 Flexible Configuration

### @jotter/animator

📚 [Document](./libs/Animator/README.md)

> A lightweight animation controller library for managing time-based animation progress.
>
> 一个轻量级的动画控制库,用于管理基于时间的动画进度。
- ⏯ Pause/Resume support
- 🔄 Loop animation support
- 🚥 Progress Control
- 🚌 Rate Control
- ⏱ Forward/Backward control
- 🎯 Custom Animation

### @jotter/drag

📚 [Document](./libs/Drag/README.md)

> A lightweight, flexible `drag-and-drop` library for making DOM elements draggable with mouse and touch support.
>
> 一个轻量级的拖拽库,允许你快速而轻松地使DOM元素在指定区域内拖动。
- 🎯 Directional constraints (horizontal/vertical/free)
- 📱 Mouse and touch support
- 🔒 Customizable drag boundaries
- 🎨 Position or transform-based movement
- 🎮 Custom drag handles
- 📦 Zero dependencies

## License

MIT
Expand Down
180 changes: 0 additions & 180 deletions build.md

This file was deleted.

2 changes: 1 addition & 1 deletion libs/Drag/README.zh_CN.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Draggable
# Drag

[![version](https://img.shields.io/npm/v/@jotter/drag?style=flat-square)](https://www.npmjs.com/package/@jotter/drag)
[![codecov](https://codecov.io/gh/Marinerer/jotter/graph/badge.svg?token=G7QXEHCEXW)](https://codecov.io/gh/Marinerer/jotter)
Expand Down
2 changes: 1 addition & 1 deletion libs/websocket/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ WebSocket connection protocol.
WebSocket connection options.

```typescript
interface WebSocketConnectOptions {
interface IOptions {
// Reconnection configuration
reconnect?:
| boolean
Expand Down
13 changes: 2 additions & 11 deletions libs/websocket/note.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,7 @@

- https://github.com/pladaria/reconnecting-websocket/
- https://github.com/joewalnes/reconnecting-websocket

- https://github.com/zimv/websocket-heartbeat-js
- https://github.com/jaywcjlove/websocket/
- https://github.com/appuri/robust-websocket/
- https://github.com/theturtle32/WebSocket-Node/



参考:
// https://github.com/pladaria/reconnecting-websocket/ ⭐️⭐️⭐️⭐️
// https://github.com/joewalnes/reconnecting-websocket ⭐️⭐️⭐️
// https://github.com/lukeed/sockette/ ⭐️⭐️⭐️
// https://github.com/appuri/robust-websocket/
// https://github.com/jaywcjlove/websocket/
// https://github.com/zimv/websocket-heartbeat-js

0 comments on commit f848be9

Please sign in to comment.