Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

unizential/complx

Repository files navigation

Complexity

⚑ Supercharge your favourite AI Chat web apps

πŸ’– support the development
Paypal Ko-fi

Note

Originally a Perplexity AI extension, this repository has now been restructured into a suite of enhancements for multiple platforms and services.

🎨 NEW: Complete Artifact Rendering System

The Complexity extension now includes a comprehensive Artifact Rendering System that transforms it into a powerful creative coding and visualization platform. This system supports:

Supported Artifact Types:

  • ✨ p5.js Creative Coding - Generative art and interactive sketches
  • 🎲 Three.js 3D Graphics - 3D scenes with physics
  • πŸ“Š D3.js Data Visualization - Charts and data exploration
  • βš›οΈ React Components - Interactive UI components
  • 🌐 HTML Pages - Complete web applications
  • 🎨 SVG Graphics - Vector illustrations and animations
  • πŸ“‹ Mermaid Diagrams - Flowcharts and diagrams
  • πŸ’» Code Snippets - Syntax-highlighted code

Key Features:

  • πŸ” Auto-Detection - Automatically detects artifact type from content patterns
  • πŸ“ Template System - Pre-built templates for all artifact types
  • 🎯 Interactive Rendering - Live preview with real-time updates
  • πŸ“Š Performance Monitoring - Render time and memory usage tracking
  • πŸ›‘οΈ Secure Execution - Sandboxed environment for safe code execution
  • πŸ“¦ CDN Integration - Automatic library loading from trusted sources
  • πŸ’Ύ Download Support - Export artifacts as files
  • πŸ”„ Real-time Editing - Live code editing with instant preview

New Artifact System Files:

complexity/perplexity/extension/src/plugins/artifacts/
β”œβ”€β”€ engine/
β”‚ β”œβ”€β”€ ArtifactEngine.ts # Core artifact orchestrator
β”‚ β”œβ”€β”€ CDNManager.ts # External library management
β”‚ └── SecureSandbox.ts # Safe code execution environment
β”œβ”€β”€ renderers/
β”‚ β”œβ”€β”€ P5Renderer.ts # p5.js creative coding
β”‚ β”œβ”€β”€ ThreeRenderer.ts # Three.js 3D graphics
β”‚ β”œβ”€β”€ D3Renderer.ts # D3.js data visualization
β”‚ β”œβ”€β”€ ReactRenderer.ts # React component rendering
β”‚ β”œβ”€β”€ HTMLRenderer.ts # HTML page rendering
β”‚ β”œβ”€β”€ SVGRenderer.ts # SVG graphics rendering
β”‚ β”œβ”€β”€ MermaidRenderer.ts # Mermaid diagram rendering
β”‚ └── CodeRenderer.ts # Syntax highlighting
β”œβ”€β”€ components/
β”‚ β”œβ”€β”€ EnhancedArtifactCanvas.tsx # Full-featured artifact display
β”‚ └── ArtifactIntegration.tsx # Drop-in integration component
β”œβ”€β”€ store/ # State management
β”œβ”€β”€ _locales/ # Internationalization
└── artifacts-index.ts # Export index

Supported Platforms/Services

Perplexity AI

  • Provides a comprehensive set of added features and UI/UX improvements with excellent modularity and customization

  • NEW: Complete artifact rendering system for creative coding and visualization

  • Supports all available languages (22)

  • Runs flawlessly on Firefox Android

  • Available on:

  • Navigate to ./perplexity/extension/ for more information

πŸ“ Complete Project Structure

complexity/
β”œβ”€β”€ branding/ # Branding assets and logos
β”‚ β”œβ”€β”€ amo.svg
β”‚ β”œβ”€β”€ cws.svg
β”‚ β”œβ”€β”€ imgs/ # Screenshots and images
β”‚ β”œβ”€β”€ logo/ # Logo variations
β”‚ └── web-store/ # Web store assets
β”œβ”€β”€ packages/ # Shared packages
β”‚ β”œβ”€β”€ async-dep-manager/ # Async dependency management
β”‚ β”œβ”€β”€ cli-logger/ # CLI logging utilities
β”‚ β”œβ”€β”€ eslint-config/ # ESLint configuration
β”‚ β”œβ”€β”€ i18n/ # Internationalization
β”‚ └── typescript-config/ # TypeScript configuration
β”œβ”€β”€ perplexity/ # Perplexity AI extension
β”‚ └── extension/ # Main extension code
β”‚ β”œβ”€β”€ changelogs/ # Version changelogs
β”‚ β”œβ”€β”€ cli/ # Command line tools
β”‚ β”œβ”€β”€ docs/ # Documentation
β”‚ β”œβ”€β”€ e2e/ # End-to-end tests
β”‚ β”œβ”€β”€ eslint-config/ # Extension-specific ESLint config
β”‚ β”œβ”€β”€ public/ # Static assets
β”‚ β”œβ”€β”€ src/ # Source code
β”‚ β”‚ β”œβ”€β”€ _locales/ # Localization files
β”‚ β”‚ β”œβ”€β”€ assets/ # CSS and assets
β”‚ β”‚ β”œβ”€β”€ components/ # UI components
β”‚ β”‚ β”‚ β”œβ”€β”€ ui/ # Base UI components
β”‚ β”‚ β”‚ └── changelog/ # Changelog components
β”‚ β”‚ β”œβ”€β”€ data/ # Data management
β”‚ β”‚ β”‚ β”œβ”€β”€ dashboard/ # Dashboard data
β”‚ β”‚ β”‚ β”œβ”€β”€ plugin-registry/# Plugin registry
β”‚ β”‚ β”‚ └── query-client/ # Query client setup
β”‚ β”‚ β”œβ”€β”€ entrypoints/ # Extension entry points
β”‚ β”‚ β”‚ β”œβ”€β”€ background/ # Background scripts
β”‚ β”‚ β”‚ β”œβ”€β”€ content-scripts/# Content scripts
β”‚ β”‚ β”‚ └── options-page/ # Options page
β”‚ β”‚ β”œβ”€β”€ hooks/ # Custom React hooks
β”‚ β”‚ β”œβ”€β”€ plugins/ # Plugin system
β”‚ β”‚ β”‚ β”œβ”€β”€ _api/ # Plugin API
β”‚ β”‚ β”‚ β”œβ”€β”€ _core/ # Core plugins
β”‚ β”‚ β”‚ β”œβ”€β”€ artifacts/ # πŸ†• Artifact rendering system
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ engine/ # Artifact engine
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ renderers/ # Artifact renderers
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ components/ # Artifact components
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ store/ # State management
β”‚ β”‚ β”‚ β”‚ └── _locales/ # Localization
β”‚ β”‚ β”‚ β”œβ”€β”€ better-search-params/
β”‚ β”‚ β”‚ β”œβ”€β”€ better-sidebar/
β”‚ β”‚ β”‚ β”œβ”€β”€ block-analytic-events/
β”‚ β”‚ β”‚ β”œβ”€β”€ claude-code/ # Claude Code integration
β”‚ β”‚ β”‚ β”œβ”€β”€ cloudflare-timeout-auto-reload/
β”‚ β”‚ β”‚ β”œβ”€β”€ comet-isolated-zoom/
β”‚ β”‚ β”‚ β”œβ”€β”€ command-menu/
β”‚ β”‚ β”‚ β”œβ”€β”€ custom-thread-container-width/
β”‚ β”‚ β”‚ β”œβ”€β”€ drag-n-drop-file-to-upload-in-thread/
β”‚ β”‚ β”‚ β”œβ”€β”€ export-thread/
β”‚ β”‚ β”‚ β”œβ”€β”€ force-writing-mode/
β”‚ β”‚ β”‚ β”œβ”€β”€ hide-get-mobile-app-cta-btn/
β”‚ β”‚ β”‚ β”œβ”€β”€ home-custom-slogan/
β”‚ β”‚ β”‚ β”œβ”€β”€ image-gen-popover/
β”‚ β”‚ β”‚ β”œβ”€β”€ incognito-by-default/
β”‚ β”‚ β”‚ β”œβ”€β”€ language-model-selector/
β”‚ β”‚ β”‚ β”œβ”€β”€ prompt-history/
β”‚ β”‚ β”‚ β”œβ”€β”€ query-box-submit-on-ctrl-enter/
β”‚ β”‚ β”‚ β”œβ”€β”€ slash-command/
β”‚ β”‚ β”‚ β”œβ”€β”€ thread-better-code-blocks/
β”‚ β”‚ β”‚ β”œβ”€β”€ thread-better-message-copy-buttons/
β”‚ β”‚ β”‚ β”œβ”€β”€ thread-better-rewrite-dropdown/
β”‚ β”‚ β”‚ β”œβ”€β”€ thread-message-length/
β”‚ β”‚ β”‚ β”œβ”€β”€ thread-message-tts/
β”‚ β”‚ β”‚ β”œβ”€β”€ thread-raw-headings/
β”‚ β”‚ β”‚ β”œβ”€β”€ thread-toc/
β”‚ β”‚ β”‚ └── zen-mode/
β”‚ β”‚ β”œβ”€β”€ services/ # Service layer
β”‚ β”‚ β”‚ β”œβ”€β”€ cplx-api/ # API services
β”‚ β”‚ β”‚ β”œβ”€β”€ extension-permissions/
β”‚ β”‚ β”‚ β”œβ”€β”€ extension-settings/
β”‚ β”‚ β”‚ β”œβ”€β”€ i18n/ # Internationalization
β”‚ β”‚ β”‚ β”œβ”€β”€ indexed-db/ # Database services
β”‚ β”‚ β”‚ β”œβ”€β”€ instant-css/ # CSS injection
β”‚ β”‚ β”‚ β”œβ”€β”€ plugins-states/ # Plugin state management
β”‚ β”‚ β”‚ └── pplx-api/ # Perplexity API
β”‚ β”‚ β”œβ”€β”€ types/ # TypeScript type definitions
β”‚ β”‚ β”œβ”€β”€ utils/ # Utility functions
β”‚ β”‚ └── vite-plugins/ # Vite build plugins
β”‚ β”œβ”€β”€ tests/ # Test files
β”‚ β”œβ”€β”€ tsconfig.json # TypeScript configuration
β”‚ β”œβ”€β”€ vite.config.ts # Vite build configuration
β”‚ └── package.json # Extension dependencies
β”œβ”€β”€ pnpm-lock.yaml # Package lock file
β”œβ”€β”€ package.json # Root package configuration
└── README.md # This file

πŸš€ Getting Started

For Users:

  1. Install the extension from Chrome Web Store or Firefox Add-ons
  2. Enable the Artifacts plugin in the extension settings
  3. Start creating and rendering artifacts in Perplexity AI conversations

For Developers:

  1. Clone the repository: git clone https://github.com/your-repo/complexity.git
  2. Install dependencies: pnpm install
  3. Build the extension: pnpm build
  4. Load the extension in your browser's developer mode

Artifact System Usage:

// Import the artifact system
import { ArtifactIntegration, detectArtifactType, createArtifact } from '@/plugins/artifacts';
// Auto-detect artifact type
const type = detectArtifactType(content, language);
// Create an artifact
const artifact = createArtifact(content, type, {
 title: 'My Creative Sketch',
 canvasSize: { width: 600, height: 400 }
});
// Use the integration component
<ArtifactIntegration 
 content={content}
 language="javascript"
 onUpdate={handleUpdate}
/>

License

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

Contributors

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /