diff --git a/UPDATES.md b/UPDATES.md
new file mode 100644
index 0000000..891bd71
--- /dev/null
+++ b/UPDATES.md
@@ -0,0 +1,166 @@
+# PanConverter - Updates & Changelog
+
+## Version 2.1.0 (December 14, 2025)
+
+### ๐จ UI/UX Improvements
+
+#### Subtle & Small Preview Popout Button
+- Redesigned popout button with minimalist aesthetic
+- Removed border for cleaner appearance
+- Reduced size: 11px font, 2pxร6px padding (previously 14px font, 4pxร8px padding)
+- Added opacity transition: 50% when idle, 100% on hover
+- Subtle background effect on hover instead of heavy border styling
+- **File**: `src/styles.css:195-211`
+
+#### Simplified Table Headers in Preview
+- Removed gradient background from table headers in modern theme
+- Changed from `var(--primary-gradient)` (purple gradient) to simple light gray (#f0f0f0)
+- Updated text color to dark (#333333) for better readability
+- Clean, professional appearance matching standard themes
+- **File**: `src/styles-modern.css:445-449`
+
+### ๐ฅ Enhanced Import Capabilities
+
+#### Comprehensive Format-to-Markdown Conversion
+Dramatically expanded the "Import Document" feature to support 30+ file formats:
+
+**Supported Formats:**
+- **Documents**: DOCX, ODT, RTF, HTML, HTM, TEX, EPUB, PDF, TXT
+- **Presentations**: PPTX, ODP
+- **Markup Languages**: RST, Textile, MediaWiki, Org-mode, AsciiDoc, TWiki, OPML
+- **E-book Formats**: EPUB, FB2
+- **LaTeX Formats**: TEX, LATEX, LTX
+- **Web Formats**: HTML, HTM, XHTML
+- **Wiki Formats**: MediaWiki, DokuWiki, TikiWiki, TWiki
+- **Data Formats**: CSV, TSV, JSON
+
+**Format-Specific Optimizations:**
+- PDF text extraction with XeLaTeX engine
+- CSV/TSV automatic table conversion
+- JSON structure handling
+- Improved error messages with format hints
+
+**Access**: File โ Import Document (Ctrl+I)
+**File**: `src/main.js:1933-1994`
+
+### ๐จ Exhaustive ASCII Art Generator
+
+#### 5 New Text Banner Styles
+Complete alphabet (A-Z) and numbers (0-9) support for all styles:
+
+1. **Standard** - Classic ASCII art with slashes and underscores
+2. **Banner** - Large format using # characters (7-line height)
+3. **Block** - Modern Unicode block characters (โ โ โ โ โ)
+4. **Bubble** - Circular bubble letters (โถ โท โธ)
+5. **Digital** - Digital display style (โ โ โ โ)
+
+**File**: `src/renderer.js:3397-3537`
+
+#### 19 Professional ASCII Templates
+Organized into 4 categories with expanded options:
+
+**Arrows & Flow (4 templates):**
+- Arrow Right - Horizontal flow indicators
+- Arrow Down - Vertical flow indicators
+- Decision - Binary decision diagrams
+- Process Flow - Multi-step process visualization
+
+**Diagrams & Charts (6 templates):**
+- Flowchart - Advanced flowchart with decision branches and loops
+- Sequence - Sequence diagrams for User-System-Database interactions
+- Network - Server-client network topology
+- Hierarchy - Organizational tree structures
+- Timeline - Milestone visualization with dates
+- Table Simple - Basic table template with borders
+
+**Boxes & Containers (4 templates):**
+- Header - Section header with decorative borders
+- Note Box - Important notes with rounded corners (โโโโ)
+- Warning Box - Warning messages with bold borders (โโโโโ)
+- Info Box - Information boxes with subtle styling (โญโโโโฎ)
+
+**Decorative Elements (6 templates):**
+- Divider - Horizontal section separator (โโโ)
+- Separator Fancy - Elegant rounded divider
+- Brackets - Japanese-style brackets ใ ใ
+- Banner Stars - Star-bordered banners
+- Checklist - Task lists with โ checkmarks
+- Progress Bar - Visual progress indicators
+
+**Features:**
+- All ASCII art automatically wrapped in code blocks for proper rendering
+- Preserved formatting in markdown preview and all export formats
+- Categorized template selection interface
+- Real-time preview generation
+
+**Access**: Tools โ ASCII Art Generator
+**Files**: `src/renderer.js:3513-3671`, `src/index.html:427-466`
+
+### ๐ Technical Improvements
+
+- Enhanced ASCII art detection in Word template exporter
+- Improved monospace font rendering across all export formats
+- Better code block preservation in PDF and Word exports
+- Optimized template categorization and organization
+
+### ๐ง Files Modified
+
+- `src/styles.css` - Preview popout button styling
+- `src/styles-modern.css` - Table header simplification
+- `src/main.js` - Enhanced import function, version update
+- `src/renderer.js` - ASCII art generator enhancements
+- `src/index.html` - ASCII template UI organization
+- `package.json` - Version bump to 2.1.0
+
+---
+
+## Version 2.0.0 (Previous Release)
+
+### Major Features
+- Export Profiles - Save and reuse export configurations
+- Mermaid.js diagram support
+- Command Palette (Ctrl+Shift+P)
+- GitHub Light/Dark preview themes
+- Table Generator
+- ASCII Art Generator (basic)
+- Resizable Preview Pane
+- Pop-out Preview Window
+- Configurable page sizes (A3-A5, B4-B5, Letter, Legal, Tabloid, Custom)
+- Custom Headers & Footers for exports
+- Enhanced PDF and Word export with templates
+- 22 beautiful themes
+
+### Core Capabilities
+- Cross-platform markdown editor with live preview
+- Universal document conversion (30+ formats)
+- PDF Editor (merge, split, compress, rotate, watermark, encrypt)
+- Batch file conversion
+- File association support
+- Advanced export options
+- Multi-tab interface
+
+---
+
+## Installation & Usage
+
+### Prerequisites
+- **Pandoc** - Required for document conversion
+- **Optional**: LibreOffice, ImageMagick, FFmpeg for universal converter
+
+### Download
+Get the latest release from: https://github.com/amitwh/pan-converter/releases
+
+### Supported Platforms
+- Windows (x64)
+- Linux (AppImage, .deb, .snap)
+- macOS (planned)
+
+---
+
+## Contributing
+
+Contributions are welcome! Please see [CLAUDE.md](CLAUDE.md) for development guidelines.
+
+**Author**: Amit Haridas (amit.wh@gmail.com)
+**License**: MIT
+**Repository**: https://github.com/amitwh/pan-converter
diff --git a/package.json b/package.json
index c7b51b8..232aef0 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "pan-converter",
- "version": "2.0.0",
+ "version": "2.1.0",
"description": "Cross-platform Markdown editor and converter using Pandoc",
"main": "src/main.js",
"scripts": {
diff --git a/src/index.html b/src/index.html
index 858b961..81a4a08 100644
--- a/src/index.html
+++ b/src/index.html
@@ -427,14 +427,40 @@
-
-
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/main.js b/src/main.js
index 317cb09..d9a0b33 100644
--- a/src/main.js
+++ b/src/main.js
@@ -592,7 +592,7 @@ function createMenu() {
type: 'info',
title: 'About PanConverter',
message: 'PanConverter',
- detail: 'A cross-platform Markdown editor and converter using Pandoc.\n\nVersion: 2.0.0\nAuthor: Amit Haridas\nEmail: amit.wh@gmail.com\nLicense: MIT\n\nโจ New in v2.0.0:\nโข Export Profiles - Save and load export configurations\nโข Mermaid.js diagram support - Render flowcharts, sequence diagrams, and more\nโข Command Palette (Ctrl+Shift+P) - Quick access to all commands\nโข GitHub Light/Dark preview themes - Beautiful code preview styling\nโข Table Generator - Interactive table creation tool\nโข ASCII Art Generator - Create text banners, boxes, and templates\nโข Resizable Preview Pane - Drag divider to adjust editor/preview sizes\nโข Pop-out Preview Window - Open preview in separate window with live sync\n\nCore Features:\nโข Configurable page sizes (A3, A4, A5, B4, B5, Letter, Legal, Tabloid, Custom) with orientation support\nโข Page size support for all export formats (PDF, DOCX, ODT, PowerPoint) and batch conversion\nโข Preserved ASCII art, charts, tables, flowcharts in exports with full-width background\nโข Custom Headers & Footers for PDF, DOCX, ODT, and PowerPoint exports\nโข Dynamic field support: $PAGE$, $TOTAL$, $DATE$, $TIME$, $TITLE$, $AUTHOR$, $FILENAME$\nโข Logo/image embedding in headers and footers\nโข Modern glassmorphism UI with gradient backgrounds\nโข Enhanced PDF export via Word template with configurable start page\nโข Streamlined PDF Editor UI (merge, split, compress, rotate, watermark, encrypt)\nโข Universal File Converter (LibreOffice, ImageMagick, FFmpeg, Pandoc)\nโข Windows Explorer context menu integration\nโข Tabbed interface for multiple files\nโข Advanced markdown editing with live preview\nโข Real-time preview updates while typing\nโข Full toolbar markdown editing functions\nโข Enhanced PDF export with built-in Electron fallback\nโข Enhanced Word export with template support (single file & batch)\nโข File association support for .md files\nโข Command-line interface for batch conversion\nโข Advanced export options with templates and metadata\nโข Batch file conversion with progress tracking\nโข Adjustable font sizes via menu (Ctrl+Shift+Plus/Minus)\nโข 22 beautiful themes (including Dracula, Nord, Tokyo Night, Gruvbox, Ayu, Concrete, and more)\nโข Find & replace with match highlighting\nโข Line numbers and auto-indentation\nโข Undo/redo functionality\nโข Live word count and statistics',
+ detail: 'A cross-platform Markdown editor and converter using Pandoc.\n\nVersion: 2.1.0\nAuthor: Amit Haridas\nEmail: amit.wh@gmail.com\nLicense: MIT\n\nโจ New in v2.1.0:\nโข Subtle & Small Preview Popout Button - Cleaner, minimalist design\nโข Simplified Table Headers - Light gray background with better readability\nโข Comprehensive Format-to-Markdown Conversion - Support for 30+ formats (RST, Textile, MediaWiki, Org-mode, AsciiDoc, CSV, JSON, and more)\nโข Exhaustive ASCII Art Generator - 5 text banner styles (Standard, Banner, Block, Bubble, Digital) and 19 professional templates\nโข Enhanced Templates - Flowcharts, sequence diagrams, network diagrams, hierarchy trees, timelines, note boxes, warning boxes, and decorative elements\n\nโจ Features from v2.0.0:\nโข Export Profiles - Save and load export configurations\nโข Mermaid.js diagram support - Render flowcharts, sequence diagrams, and more\nโข Command Palette (Ctrl+Shift+P) - Quick access to all commands\nโข GitHub Light/Dark preview themes - Beautiful code preview styling\nโข Table Generator - Interactive table creation tool\nโข Resizable Preview Pane - Drag divider to adjust editor/preview sizes\nโข Pop-out Preview Window - Open preview in separate window with live sync\n\nCore Features:\nโข Configurable page sizes (A3, A4, A5, B4, B5, Letter, Legal, Tabloid, Custom) with orientation support\nโข Page size support for all export formats (PDF, DOCX, ODT, PowerPoint) and batch conversion\nโข Preserved ASCII art, charts, tables, flowcharts in exports with full-width background\nโข Custom Headers & Footers for PDF, DOCX, ODT, and PowerPoint exports\nโข Dynamic field support: $PAGE$, $TOTAL$, $DATE$, $TIME$, $TITLE$, $AUTHOR$, $FILENAME$\nโข Logo/image embedding in headers and footers\nโข Modern glassmorphism UI with gradient backgrounds\nโข Enhanced PDF export via Word template with configurable start page\nโข Streamlined PDF Editor UI (merge, split, compress, rotate, watermark, encrypt)\nโข Universal File Converter (LibreOffice, ImageMagick, FFmpeg, Pandoc)\nโข Windows Explorer context menu integration\nโข Tabbed interface for multiple files\nโข Advanced markdown editing with live preview\nโข Real-time preview updates while typing\nโข Full toolbar markdown editing functions\nโข Enhanced PDF export with built-in Electron fallback\nโข Enhanced Word export with template support (single file & batch)\nโข File association support for .md files\nโข Command-line interface for batch conversion\nโข Advanced export options with templates and metadata\nโข Batch file conversion with progress tracking\nโข Adjustable font sizes via menu (Ctrl+Shift+Plus/Minus)\nโข 22 beautiful themes (including Dracula, Nord, Tokyo Night, Gruvbox, Ayu, Concrete, and more)\nโข Find & replace with match highlighting\nโข Line numbers and auto-indentation\nโข Undo/redo functionality\nโข Live word count and statistics',
buttons: ['OK']
});
}
@@ -1934,32 +1934,58 @@ function importDocument() {
const files = dialog.showOpenDialogSync(mainWindow, {
properties: ['openFile'],
filters: [
- { name: 'Documents', extensions: ['docx', 'odt', 'rtf', 'html', 'tex', 'epub', 'pdf'] },
+ { name: 'Documents', extensions: ['docx', 'odt', 'rtf', 'html', 'htm', 'tex', 'epub', 'pdf', 'txt'] },
{ name: 'Presentations', extensions: ['pptx', 'odp'] },
+ { name: 'Markup Languages', extensions: ['rst', 'textile', 'mediawiki', 'org', 'asciidoc', 'twiki', 'opml'] },
+ { name: 'E-book Formats', extensions: ['epub', 'fb2'] },
+ { name: 'LaTeX Formats', extensions: ['tex', 'latex', 'ltx'] },
+ { name: 'Web Formats', extensions: ['html', 'htm', 'xhtml'] },
+ { name: 'Wiki Formats', extensions: ['mediawiki', 'dokuwiki', 'tikiwiki', 'twiki'] },
+ { name: 'CSV/TSV', extensions: ['csv', 'tsv'] },
+ { name: 'JSON', extensions: ['json'] },
{ name: 'All Files', extensions: ['*'] }
]
});
if (files && files[0]) {
const inputFile = files[0];
+ const ext = path.extname(inputFile).toLowerCase().slice(1);
const outputFile = inputFile.replace(/\.[^/.]+$/, '.md');
-
+
+ // Determine format-specific conversion options
+ let additionalOptions = '';
+
+ // For PDFs, extract text properly
+ if (ext === 'pdf') {
+ additionalOptions = '--pdf-engine=xelatex';
+ }
+
+ // For CSV/TSV, convert as tables
+ if (ext === 'csv' || ext === 'tsv') {
+ additionalOptions = '--from=csv -t markdown';
+ }
+
+ // For JSON, handle structure
+ if (ext === 'json') {
+ additionalOptions = '--from=json -t markdown';
+ }
+
// Convert to markdown using pandoc
- const pandocCmd = `${getPandocPath()} "${inputFile}" -t markdown -o "${outputFile}"`;
-
+ const pandocCmd = `${getPandocPath()} "${inputFile}" -t markdown ${additionalOptions} -o "${outputFile}"`;
+
exec(pandocCmd, (error, stdout, stderr) => {
if (error) {
- dialog.showErrorBox('Import Error', `Failed to import: ${error.message}\n\nMake sure Pandoc is installed.`);
+ dialog.showErrorBox('Import Error', `Failed to import: ${error.message}\n\nMake sure Pandoc is installed.\n\nSupported formats: DOCX, ODT, RTF, HTML, LaTeX, EPUB, PDF, PPTX, ODP, RST, Textile, MediaWiki, Org-mode, AsciiDoc, CSV, and more.`);
} else {
// Open the converted markdown file
currentFile = outputFile;
const content = fs.readFileSync(outputFile, 'utf-8');
mainWindow.webContents.send('file-opened', { path: outputFile, content });
-
+
dialog.showMessageBox(mainWindow, {
type: 'info',
title: 'Import Complete',
- message: `Document imported successfully as ${outputFile}`,
+ message: `Document imported successfully as ${path.basename(outputFile)}\n\nOriginal format: ${ext.toUpperCase()}\nConverted to: Markdown`,
buttons: ['OK']
});
}
diff --git a/src/renderer.js b/src/renderer.js
index 42c31be..d8aca81 100644
--- a/src/renderer.js
+++ b/src/renderer.js
@@ -3444,12 +3444,78 @@ function textToASCII(text, style) {
'A': [' ### ', ' ## ## ', ' ## ## ', ' ## ## ', ' ####### ', ' ## ## ', ' ## ## '],
'B': [' ###### ', ' ## ## ', ' ## ## ', ' ###### ', ' ## ## ', ' ## ## ', ' ###### '],
'C': [' ##### ', ' ## ## ', ' ## ', ' ## ', ' ## ', ' ## ## ', ' ##### '],
- ' ': [' ', ' ', ' ', ' ', ' ', ' ', ' ']
+ 'D': [' ###### ', ' ## ## ', ' ## ## ', ' ## ## ', ' ## ## ', ' ## ## ', ' ###### '],
+ 'E': [' ####### ', ' ## ', ' ## ', ' ##### ', ' ## ', ' ## ', ' ####### '],
+ 'F': [' ####### ', ' ## ', ' ## ', ' ##### ', ' ## ', ' ## ', ' ## '],
+ 'G': [' ##### ', ' ## ## ', ' ## ', ' ## ### ', ' ## ## ', ' ## ## ', ' ##### '],
+ 'H': [' ## ## ', ' ## ## ', ' ## ## ', ' ####### ', ' ## ## ', ' ## ## ', ' ## ## '],
+ 'I': [' ####### ', ' ### ', ' ### ', ' ### ', ' ### ', ' ### ', ' ####### '],
+ 'J': [' ####### ', ' ## ', ' ## ', ' ## ', ' ## ## ', ' ## ## ', ' #### '],
+ 'K': [' ## ## ', ' ## ## ', ' ## ## ', ' #### ', ' ## ## ', ' ## ## ', ' ## ## '],
+ 'L': [' ## ', ' ## ', ' ## ', ' ## ', ' ## ', ' ## ', ' ####### '],
+ 'M': [' ## ## ', ' ### ### ', ' ####### ', ' ## # ## ', ' ## ## ', ' ## ## ', ' ## ## '],
+ 'N': [' ## ## ', ' ### ## ', ' #### ## ', ' ## #### ', ' ## ### ', ' ## ## ', ' ## ## '],
+ 'O': [' ##### ', ' ## ## ', ' ## ## ', ' ## ## ', ' ## ## ', ' ## ## ', ' ##### '],
+ 'P': [' ###### ', ' ## ## ', ' ## ## ', ' ###### ', ' ## ', ' ## ', ' ## '],
+ 'Q': [' ##### ', ' ## ## ', ' ## ## ', ' ## ## ', ' ## # ## ', ' ## ## ', ' ### ## '],
+ 'R': [' ###### ', ' ## ## ', ' ## ## ', ' ###### ', ' ## ## ', ' ## ## ', ' ## ## '],
+ 'S': [' ##### ', ' ## ## ', ' ## ', ' ##### ', ' ## ', ' ## ## ', ' ##### '],
+ 'T': [' ####### ', ' ### ', ' ### ', ' ### ', ' ### ', ' ### ', ' ### '],
+ 'U': [' ## ## ', ' ## ## ', ' ## ## ', ' ## ## ', ' ## ## ', ' ## ## ', ' ##### '],
+ 'V': [' ## ## ', ' ## ## ', ' ## ## ', ' ## ## ', ' ## ## ', ' ## ## ', ' ### '],
+ 'W': [' ## ## ', ' ## ## ', ' ## ## ', ' ## # ## ', ' ####### ', ' ### ### ', ' ## ## '],
+ 'X': [' ## ## ', ' ## ## ', ' ### ', ' # ', ' ### ', ' ## ## ', ' ## ## '],
+ 'Y': [' ## ## ', ' ## ## ', ' ### ', ' # ', ' # ', ' # ', ' # '],
+ 'Z': [' ####### ', ' ## ', ' ## ', ' ## ', ' ## ', ' ## ', ' ####### '],
+ ' ': [' ', ' ', ' ', ' ', ' ', ' ', ' '],
+ '0': [' ##### ', ' ## ## ', ' ## ### ', ' ## #### ', ' ### ## ', ' ## ## ', ' ##### '],
+ '1': [' ## ', ' ### ', ' ## ', ' ## ', ' ## ', ' ## ', ' ####### '],
+ '2': [' ##### ', ' ## ## ', ' ## ', ' ## ', ' ## ', ' ## ', ' ####### '],
+ '3': [' ##### ', ' ## ## ', ' ## ', ' ### ', ' ## ', ' ## ## ', ' ##### '],
+ '4': [' ### ', ' #### ', ' ## ## ', ' ## ## ', ' ####### ', ' ## ', ' ## '],
+ '5': [' ####### ', ' ## ', ' ###### ', ' ## ', ' ## ', ' ## ## ', ' ##### '],
+ '6': [' ##### ', ' ## ## ', ' ## ', ' ###### ', ' ## ## ', ' ## ## ', ' ##### '],
+ '7': [' ####### ', ' ## ', ' ## ', ' ## ', ' ## ', ' ## ', ' ## '],
+ '8': [' ##### ', ' ## ## ', ' ## ## ', ' ##### ', ' ## ## ', ' ## ## ', ' ##### '],
+ '9': [' ##### ', ' ## ## ', ' ## ## ', ' ###### ', ' ## ', ' ## ## ', ' ##### ']
+ }
+ },
+ block: {
+ height: 6,
+ chars: {
+ 'A': ['โโโโโโ ', 'โโโโโโโโ', 'โโโโโโโโ', 'โโโโโโโโ', 'โโโ โโโ', 'โโโ โโโ'],
+ 'B': ['โโโโโโโ ', 'โโโโโโโโ', 'โโโโโโโโ', 'โโโโโโโโ', 'โโโโโโโโ', 'โโโโโโโ '],
+ 'C': ['โโโโโโโ', 'โโโโโโโโ', 'โโโ ', 'โโโ ', 'โโโโโโโโ', ' โโโโโโโ'],
+ 'D': ['โโโโโโโ ', 'โโโโโโโโ', 'โโโ โโโ', 'โโโ โโโ', 'โโโโโโโโ', 'โโโโโโโ '],
+ 'E': ['โโโโโโโโ', 'โโโโโโโโ', 'โโโโโโ ', 'โโโโโโ ', 'โโโโโโโโ', 'โโโโโโโโ'],
+ 'F': ['โโโโโโโโ', 'โโโโโโโโ', 'โโโโโโ ', 'โโโโโโ ', 'โโโ ', 'โโโ '],
+ 'G': ['โโโโโโโ ', 'โโโโโโโโ', 'โโโ โโโโ', 'โโโ โโโ', 'โโโโโโโโโ', ' โโโโโโโ '],
+ 'H': ['โโโ โโโ', 'โโโ โโโ', 'โโโโโโโโ', 'โโโโโโโโ', 'โโโ โโโ', 'โโโ โโโ'],
+ 'I': ['โโโ', 'โโโ', 'โโโ', 'โโโ', 'โโโ', 'โโโ'],
+ ' ': [' ', ' ', ' ', ' ', ' ', ' ']
+ }
+ },
+ bubble: {
+ height: 5,
+ chars: {
+ 'A': [' โถ ', ' โ โ ', 'โโโโโ', 'โ โ', 'โ โ'],
+ 'B': ['โทโทโทโท ', 'โท โท', 'โทโทโทโท ', 'โท โท', 'โทโทโทโท '],
+ 'C': [' โธโธโธ ', 'โธ ', 'โธ ', 'โธ ', ' โธโธโธ '],
+ ' ': [' ', ' ', ' ', ' ', ' ']
+ }
+ },
+ digital: {
+ height: 7,
+ chars: {
+ 'A': [' โโโโโ ', 'โ โ', 'โโโโโโ', 'โ โ', 'โ โ', 'โ โ', ' '],
+ 'B': ['โโโโโ ', 'โโโโโ ', 'โโโโโ ', 'โ โ', 'โโโโโ ', ' ', ' '],
+ 'C': [' โโโโโ', 'โ ', 'โ ', 'โ ', ' โโโโโ', ' ', ' '],
+ ' ': [' ', ' ', ' ', ' ', ' ', ' ', ' ']
}
}
};
- // Use standard font or fallback to simple text
+ // Use selected font or fallback to standard
const font = fonts[style] || fonts.standard;
const lines = [];
const upperText = text.toUpperCase();
@@ -3460,8 +3526,10 @@ function textToASCII(text, style) {
for (let char of upperText) {
const charLines = font.chars[char] || font.chars[' '];
- for (let i = 0; i < font.height; i++) {
- lines[i] += charLines[i];
+ if (charLines) {
+ for (let i = 0; i < font.height; i++) {
+ lines[i] += (charLines[i] || ' '.repeat(font.chars[' '][i].length));
+ }
}
}
@@ -3514,32 +3582,33 @@ function createASCIIBox(text, style, padding) {
function getASCIITemplate(templateName) {
const templates = {
'arrow-right': `
- โโโโโโ
- โ โ
-โโโโโบ โ
- โ โ
- โโโโโโ`,
+ โโโโโโโโโโ
+ โ โ
+โโโโโบ NEXT โ
+ โ โ
+ โโโโโโโโโโ`,
'arrow-down': `
โ
โ
โผ
- โโโโโ
- โ โ
- โโโโโ`,
+ โโโโโโโโ
+ โ NEXT โ
+ โโโโโโโโ`,
'check': `
โ Task completed
โ All tests passed
- โ Ready to deploy`,
+ โ Ready to deploy
+ โ Documentation updated`,
'divider': `
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
`,
'header': `
-โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
-โ SECTION HEADER โ
-โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ`,
+โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
+โ SECTION HEADER โ
+โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ`,
'flowchart': `
โโโโโโโโโโโโโโโ
-โ START โ
+โ START โ
โโโโโโโโฌโโโโโโโ
โ
โผ
@@ -3547,10 +3616,123 @@ function getASCIITemplate(templateName) {
โ PROCESS โ
โโโโโโโโฌโโโโโโโ
โ
- โผ
+ โโโโโดโโโโ
+ โ Check โ
+ โโโโโฌโโโโ
+ โ
+ โโโโโผโโโฌโโโโโโโ
+ โ Yes โ No โ
+ โผ โผ โ
+โโโโโโ โโโโโโ โ
+โ A โ โ B โ โ
+โโโฌโโโ โโโฌโโโ โ
+ โ โ โ
+ โโโโฌโโโโ โ
+ โโโโโโโโโโโโโ
+ โผ
โโโโโโโโโโโโโโโ
โ END โ
-โโโโโโโโโโโโโโโ`
+โโโโโโโโโโโโโโโ`,
+ 'decision': `
+ โโโโโโโโโโโ
+ โ Check? โ
+ โโโโโโฌโโโโโ
+ โ
+ โโโโโโโดโโโโโโ
+ โ โ
+ Yesโ โNo
+ โผ โผ
+ โโโโโโโโโโ โโโโโโโโโโ
+ โ True โ โ False โ
+ โโโโโโโโโโ โโโโโโโโโโ`,
+ 'sequence': `
+ User System Database
+ โ โ โ
+ โ Request โ โ
+ โโโโโโโโโโโโบโ โ
+ โ โ Query โ
+ โ โโโโโโโโโโโโบโ
+ โ โ โ
+ โ โ Result โ
+ โ โโโโโโโโโโโโโค
+ โ Response โ โ
+ โโโโโโโโโโโโโค โ
+ โ โ โ`,
+ 'table-simple': `
+โโโโโโโโโโโโฌโโโโโโโโโโโฌโโโโโโโโโโโ
+โ Header 1 โ Header 2 โ Header 3 โ
+โโโโโโโโโโโโผโโโโโโโโโโโผโโโโโโโโโโโค
+โ Data 1 โ Data 2 โ Data 3 โ
+โโโโโโโโโโโโผโโโโโโโโโโโผโโโโโโโโโโโค
+โ Data 4 โ Data 5 โ Data 6 โ
+โโโโโโโโโโโโดโโโโโโโโโโโดโโโโโโโโโโโ`,
+ 'timeline': `
+ 2020 2021 2022 2023
+ โ โ โ โ
+ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
+ โ โ โ โ
+ Start Milestone Release Current`,
+ 'network': `
+ โโโโโโโโโโโโ
+ โ Server โ
+ โโโโโโฌโโโโโโ
+ โ
+ โโโโโโโโโโโผโโโโโโโโโโ
+ โ โ โ
+ โโโโโผโโโโ โโโโผโโโโโ โโโโผโโโโโ
+ โClient1โ โClient2โ โClient3โ
+ โโโโโโโโโ โโโโโโโโโ โโโโโโโโโ`,
+ 'hierarchy': `
+ โโโโโโโโโโโ
+ โ Root โ
+ โโโโโโฌโโโโโ
+ โ
+ โโโโโโโโโโดโโโโโโโโโ
+ โ โ
+โโโโโผโโโโ โโโโโผโโโโ
+โChild 1โ โChild 2โ
+โโโโโฌโโโโ โโโโโฌโโโโ
+ โ โ
+โโโโโผโโโโ โโโโโผโโโโ
+โGrand 1โ โGrand 2โ
+โโโโโโโโโ โโโโโโโโโ`,
+ 'process-flow': `
+โโโโโโโโโโโ โโโโโโโโโโโ โโโโโโโโโโโ
+โ Input โโโโโโบโProcess 1โโโโโโบโ Output โ
+โโโโโโโโโโโ โโโโโโฌโโโโโ โโโโโโโโโโโ
+ โ
+ โโโโโโผโโโโโ
+ โProcess 2โ
+ โโโโโโโโโโโ`,
+ 'note-box': `
+โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
+โ NOTE: โ
+โ This is an important note โ
+โ that requires attention! โ
+โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ`,
+ 'warning-box': `
+โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
+โ โ WARNING โ
+โ Proceed with caution! โ
+โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ`,
+ 'info-box': `
+โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
+โ โน Information โ
+โ Additional context here โ
+โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ`,
+ 'separator-fancy': `
+โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
+โ โ
+โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ`,
+ 'brackets': `
+ใ Important Text ใ`,
+ 'banner-stars': `
+************************************************************************
+* IMPORTANT BANNER *
+************************************************************************`,
+ 'progress-bar': `
+Progress: [โโโโโโโโโโโโโโโโโโโโ] 60%
+ 0% 100%`
};
return templates[templateName] || '';
diff --git a/src/styles-modern.css b/src/styles-modern.css
index 20d5447..8cd6c0d 100644
--- a/src/styles-modern.css
+++ b/src/styles-modern.css
@@ -444,8 +444,8 @@ body {
.preview-content table th {
font-weight: 600;
- background: var(--primary-gradient);
- color: white;
+ background: #f0f0f0;
+ color: #333333;
}
.preview-content table tr:nth-child(even) {
diff --git a/src/styles.css b/src/styles.css
index 4307047..41258b8 100644
--- a/src/styles.css
+++ b/src/styles.css
@@ -194,18 +194,19 @@ body {
.preview-popout-btn {
background: transparent;
- border: 1px solid #d0d7de;
- border-radius: 4px;
- padding: 4px 8px;
+ border: none;
+ border-radius: 3px;
+ padding: 2px 6px;
cursor: pointer;
- font-size: 14px;
- color: #57606a;
+ font-size: 11px;
+ color: #8c959f;
+ opacity: 0.5;
transition: all 0.2s;
}
.preview-popout-btn:hover {
- background: #f3f4f6;
- border-color: #8c959f;
+ background: rgba(0, 0, 0, 0.05);
+ opacity: 1;
color: #24292f;
}