Note
Originally a Perplexity AI extension, this repository has now been restructured into a suite of enhancements for multiple platforms and services.
The Complexity extension now includes a comprehensive Artifact Rendering System that transforms it into a powerful creative coding and visualization platform. This system supports:
- β¨ 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
- π 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
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
-
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
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
- Install the extension from Chrome Web Store or Firefox Add-ons
- Enable the Artifacts plugin in the extension settings
- Start creating and rendering artifacts in Perplexity AI conversations
- Clone the repository:
git clone https://github.com/your-repo/complexity.git - Install dependencies:
pnpm install - Build the extension:
pnpm build - Load the extension in your browser's developer mode
// 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}
/>