Skip to content

netless-io/window-manager-extend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

22 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

window-manager-extend

A collection of extension plugins for @netless/window-manager to enhance whiteboard functionality.

Packages

A powerful paste and drag-and-drop extension plugin that supports file conversion and insertion into whiteboard applications.

Features:

  • ๐Ÿ“‹ Paste text, images, and files directly from clipboard
  • ๐Ÿ–ฑ๏ธ Drag and drop files from computer to whiteboard
  • ๐Ÿ”„ Convert various file types (PDF, PPT, DOC, images, videos) to whiteboard-compatible formats
  • ๐ŸŽจ Built-in uploading progress UI with customizable language support
  • โš™๏ธ Flexible configuration options for file filtering and conversion logic
  • ๐Ÿ›ก๏ธ XSS protection for pasted text content
  • ๐Ÿ“ฑ Multi-language support (English, Chinese)

Supported File Types:

  • Images: .jpg, .jpeg, .png, .webp
  • Videos: .mp4, .mpeg
  • Documents: .ppt, .pptx, .doc, .pdf

AI chat extension based on OpenRouter API, with multimodal input, streaming responses, screenshots, and mind map export.

Features:

  • ๐Ÿค– AI chat with multiple models and auto-fetched free model list
  • ๐Ÿ–ผ๏ธ Multimodal input (text + images)
  • ๐Ÿ“ธ Manual screenshot, auto screenshot, and snapshot; send screenshots directly to AI
  • ๐Ÿ’ฌ Streaming responses with optional reasoning and final output separation
  • ๐Ÿ“ Markdown rendering and code highlighting
  • ๐Ÿ—บ๏ธ Export Markdown to mind map and add to whiteboard
  • ๐Ÿ’พ IndexedDB-persisted chat history and multi-session management
  • ๐Ÿท๏ธ Multi-tab sessions
  • ๐ŸŒ English and Chinese UI

Extension for customizing the main view background: image, color, and opacity.

Features:

  • ๐Ÿ–ผ๏ธ Custom background image (URL, size, crossOrigin)
  • ๐ŸŽจ Background color
  • ๐Ÿ”ฒ Background opacity (0โ€“1)
  • ๐Ÿ“ข loadError event when background image fails to load

Maths kit extension providing math tools and annotations on the main view and app views.

Features:

  • ๐Ÿ“ Math tools and annotations
  • ๐ŸŽจ Light/dark theme
  • ๐Ÿ“ฑ Bind to main view and app views
  • ๐Ÿ”’ Read-only mode
  • ๐Ÿ”„ State and camera sync across clients
  • โšก Create, update, and remove math tools dynamically

Custom draggable scrollbars for the main view to navigate large content areas.

Features:

  • ๐ŸŽฏ Auto horizontal/vertical scrollbars when content overflows viewport
  • ๐Ÿ–ฑ๏ธ Drag scrollbars to navigate the whiteboard
  • ๐Ÿ“ Scrollbar size adapts to zoom and content size
  • ๐Ÿ”’ Hide in read-only mode
  • โš™๏ธ Configurable origin size and read-only state

Mouse wheel extension for scrolling the main view and apps (Presentation, DocsViewer, Slide).

Features:

  • ๐Ÿ–ฑ๏ธ Mouse wheel scrolling on main view and inside apps
  • ๐Ÿ“ฑ Supports Presentation, DocsViewer, Slide
  • ๐Ÿ”’ Read-only mode
  • ๐Ÿ“ Configurable scroll bounds
  • โšก Custom interrupter to control when whiteboard scroll is blocked

Quick Start

Installation

Install only the plugins you need:

# Paste extension
pnpm add @netless/window-manager-paste-extend

# AI chat extension
pnpm add @netless/window-manager-ai-extend

# Background extension
pnpm add @netless/window-manager-background-extend

# Maths kit extension
pnpm add @netless/window-manager-maths-kit-extend

# Scrollbar extension
pnpm add @netless/window-manager-scrollbar-extend

# Wheel extension
pnpm add @netless/window-manager-wheel-extend

You can use npm install or yarn add instead of pnpm add. See each packageโ€™s README (e.g. packages/ai/README.md) for detailed usage.

Basic Usage

import { ExtendPastePlugin } from '@netless/window-manager-paste-extend';

const pastePlugin = new ExtendPastePlugin({
  language: 'en',
  useDrop: true,
  convertFile: async (file) => {
    // Your file conversion logic
    // Return PasteFileResult or null
  }
});

// Register with window manager
windowManager.useExtendPlugin(pastePlugin);

Development

Prerequisites

  • Node.js 16+
  • pnpm 8+

Setup

# Clone the repository
git clone https://github.com/netless-io/window-manager-extend.git
cd window-manager-extend

# Install dependencies
pnpm install

# Start development
pnpm dev

Project Structure

window-manager-extend/
โ”œโ”€โ”€ packages/
โ”‚   โ”œโ”€โ”€ paste/                 # Paste extension @netless/window-manager-paste-extend
โ”‚   โ”œโ”€โ”€ ai/                    # AI chat extension @netless/window-manager-ai-extend
โ”‚   โ”œโ”€โ”€ background/            # Background extension @netless/window-manager-background-extend
โ”‚   โ”œโ”€โ”€ maths-kit/             # Maths kit extension @netless/window-manager-maths-kit-extend
โ”‚   โ”œโ”€โ”€ scrollbar/             # Scrollbar extension @netless/window-manager-scrollbar-extend
โ”‚   โ””โ”€โ”€ wheel/                 # Wheel extension @netless/window-manager-wheel-extend
โ”œโ”€โ”€ example/                  # Example application
โ”œโ”€โ”€ service/                  # Backend services
โ””โ”€โ”€ dev/                      # Development tools

Available Scripts

  • pnpm dev - Start development mode for all packages
  • pnpm lint - Run ESLint on all packages
  • pnpm lint:fix - Fix ESLint issues automatically
  • pnpm clear - Clean build outputs

Examples

Check out the example directory for complete integration examples with:

  • Fastboard integration
  • Window Manager integration
  • File upload and conversion
  • Plugin registration

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

MIT

Related Projects

About

window-manager-extend

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors