diff --git a/src/index.html b/src/index.html
index a96a265..11b7448 100644
--- a/src/index.html
+++ b/src/index.html
@@ -914,224 +914,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
{
const exportModal = new ModalManager('#export-dialog');
const printPreviewModal = new ModalManager('#print-preview-overlay');
const tableModal = new ModalManager('#table-generator-dialog');
- const asciiModal = new ModalManager('#ascii-art-dialog');
const converterModal = new ModalManager('#universal-converter-dialog');
const batchModal = new ModalManager('#batch-dialog');
const pdfEditorModal = new ModalManager('#pdf-editor-dialog');
@@ -2199,7 +2198,6 @@ document.addEventListener('DOMContentLoaded', async () => {
exportModal,
printPreviewModal,
tableModal,
- asciiModal,
converterModal,
batchModal,
pdfEditorModal,
@@ -5965,803 +5963,6 @@ document.getElementById('table-cols').addEventListener('keypress', (e) => {
}
});
-// ============================================================================
-// ASCII ART GENERATOR
-// ============================================================================
-
-let currentASCIIMode = 'text';
-function showASCIIGenerator() {
- window.modals.asciiModal.open();
-
- // Initialize with text mode
- switchASCIIMode('text');
-
- // Generate initial preview
- setTimeout(() => {
- generateASCIIPreview();
- }, 100);
-}
-function hideASCIIGenerator() {
- window.modals.asciiModal.close();
-}
-function switchASCIIMode(mode) {
- currentASCIIMode = mode;
-
- // Update button states
- document.querySelectorAll('.ascii-mode-btn').forEach((btn) => {
- btn.classList.remove('active');
- });
-
- // Hide all mode sections
- document.querySelectorAll('.ascii-mode-section').forEach((section) => {
- section.classList.add('hidden');
- });
-
- // Show selected mode
- if (mode === 'text') {
- document.getElementById('ascii-mode-text').classList.add('active');
- document.getElementById('ascii-text-mode').classList.remove('hidden');
- } else if (mode === 'box') {
- document.getElementById('ascii-mode-box').classList.add('active');
- document.getElementById('ascii-box-mode').classList.remove('hidden');
- } else if (mode === 'templates') {
- document.getElementById('ascii-mode-templates').classList.add('active');
- document.getElementById('ascii-templates-mode').classList.remove('hidden');
- }
-
- // Generate preview
- generateASCIIPreview();
-}
-function generateASCIIPreview() {
- let result = '';
- if (currentASCIIMode === 'text') {
- const text = document.getElementById('ascii-text-input').value || 'Sample';
- const style = document.getElementById('ascii-font-style').value;
- result = textToASCII(text, style);
- } else if (currentASCIIMode === 'box') {
- const text = document.getElementById('ascii-box-text').value || 'Sample Text';
- const style = document.getElementById('ascii-box-style').value;
- const padding = parseInt(document.getElementById('ascii-box-padding').value) || 2;
- result = createASCIIBox(text, style, padding);
- } else if (currentASCIIMode === 'templates') {
- result = 'Select a template from the buttons above';
- }
- document.getElementById('ascii-preview').textContent = result;
-}
-
-// Simple ASCII art text generator
-function textToASCII(text, style) {
- const fonts = {
- standard: {
- height: 5,
- chars: {
- A: [' _ ', ' / \\ ', '/___\\', '| |', '| |'],
- B: ['____ ', '| \\', '|___/', '| \\', '|___/'],
- C: [' ___ ', '/ _/', '| \\', '| ', '\\___/'],
- D: ['____ ', '| \\', '| |', '| |', '|___/'],
- E: ['_____', '| ', '|___ ', '| ', '|____'],
- F: ['_____', '| ', '|___ ', '| ', '| '],
- G: [' ___ ', '/ _', '| ||', '| |', '\\___/'],
- H: ['| |', '| |', '|___|', '| |', '| |'],
- I: ['_____', ' | ', ' | ', ' | ', '_____'],
- J: ['_____', ' | ', ' | ', '| | ', '\\__/ '],
- K: ['| |', '| / ', '|_/ ', '| \\ ', '| \\ '],
- L: ['| ', '| ', '| ', '| ', '|____'],
- M: ['| |', '|\\ /|', '| V |', '| |', '| |'],
- N: ['| |', '|\\ |', '| \\ |', '| \\|', '| |'],
- O: [' ___ ', '/ \\', '| |', '| |', '\\___/'],
- P: ['____ ', '| \\', '|___/', '| ', '| '],
- Q: [' ___ ', '/ \\', '| |', '| |\\ ', '\\__\\|'],
- R: ['____ ', '| \\', '|___/', '| \\ ', '| \\ '],
- S: [' ___ ', '/ _/', '\\_ \\', ' \\ ', '\\___/'],
- T: ['_____', ' | ', ' | ', ' | ', ' | '],
- U: ['| |', '| |', '| |', '| |', '\\___/'],
- V: ['| |', '| |', '| |', ' \\ / ', ' V '],
- W: ['| |', '| |', '| W |', '|/ \\|', '| |'],
- X: ['| |', ' \\ / ', ' X ', ' / \\ ', '| |'],
- Y: ['| |', ' \\ / ', ' Y ', ' | ', ' | '],
- Z: ['_____', ' / ', ' / ', ' / ', '/___ '],
- ' ': [' ', ' ', ' ', ' ', ' '],
- 0: [' ___ ', '/ \\', '| | |', '| |', '\\___/'],
- 1: [' | ', ' || ', ' | ', ' | ', ' _|_ '],
- 2: [' ___ ', '\\ /', ' __/ ', '/ ', '\\____'],
- 3: [' ___ ', '\\ /', ' __/ ', ' / ', '\\___/'],
- 4: ['| |', '| |', '|___|', ' |', ' |'],
- 5: [' ___ ', '| ', '|___ ', ' / ', '\\___/'],
- 6: [' ___ ', '/ ', '|___ ', '| |', '\\___/'],
- 7: ['_____', ' / ', ' / ', ' / ', '/ '],
- 8: [' ___ ', '| |', ' ___ ', '| |', '\\___/'],
- 9: [' ___ ', '| |', '\\___|', ' |', '\\___/'],
- },
- },
- banner: {
- height: 7,
- chars: {
- 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 selected font or fallback to standard
- const font = fonts[style] || fonts.standard;
- const lines = [];
- const upperText = text.toUpperCase();
- for (let i = 0; i < font.height; i++) {
- lines[i] = '';
- }
- for (const char of upperText) {
- const charLines = font.chars[char] || font.chars[' '];
- if (charLines) {
- for (let i = 0; i < font.height; i++) {
- lines[i] += charLines[i] || ' '.repeat(font.chars[' '][i].length);
- }
- }
- }
- return lines.join('\n');
-}
-
-// Create ASCII box/frame
-function createASCIIBox(text, style, padding) {
- const styles = {
- single: {
- tl: 'โ',
- tr: 'โ',
- bl: 'โ',
- br: 'โ',
- h: 'โ',
- v: 'โ',
- },
- double: {
- tl: 'โ',
- tr: 'โ',
- bl: 'โ',
- br: 'โ',
- h: 'โ',
- v: 'โ',
- },
- rounded: {
- tl: 'โญ',
- tr: 'โฎ',
- bl: 'โฐ',
- br: 'โฏ',
- h: 'โ',
- v: 'โ',
- },
- bold: {
- tl: 'โ',
- tr: 'โ',
- bl: 'โ',
- br: 'โ',
- h: 'โ',
- v: 'โ',
- },
- ascii: {
- tl: '+',
- tr: '+',
- bl: '+',
- br: '+',
- h: '-',
- v: '|',
- },
- };
- const chars = styles[style] || styles.single;
- const lines = text.split('\n');
- const maxLength = Math.max(...lines.map((l) => l.length));
- const width = maxLength + padding * 2;
- let result = '';
-
- // Top border
- result += chars.tl + chars.h.repeat(width) + chars.tr + '\n';
-
- // Padding rows above
- for (let i = 0; i < padding - 1; i++) {
- result += chars.v + ' '.repeat(width) + chars.v + '\n';
- }
-
- // Content lines
- for (const line of lines) {
- const paddedLine = line.padEnd(maxLength, ' ');
- result += chars.v + ' '.repeat(padding) + paddedLine + ' '.repeat(padding) + chars.v + '\n';
- }
-
- // Padding rows below
- for (let i = 0; i < padding - 1; i++) {
- result += chars.v + ' '.repeat(width) + chars.v + '\n';
- }
-
- // Bottom border
- result += chars.bl + chars.h.repeat(width) + chars.br;
- return result;
-}
-
-// ASCII Art Templates
-function getASCIITemplate(templateName) {
- const templates = {
- 'arrow-right': `
- โโโโโโโโโโ
- โ โ
-โโโโโบ NEXT โ
- โ โ
- โโโโโโโโโโ`,
- 'arrow-down': `
- โ
- โ
- โผ
- โโโโโโโโ
- โ NEXT โ
- โโโโโโโโ`,
- check: `
- โ Task completed
- โ All tests passed
- โ Ready to deploy
- โ Documentation updated`,
- divider: `
-โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
-`,
- header: `
-โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
-โ SECTION HEADER โ
-โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ`,
- flowchart: `
-โโโโโโโโโโโโโโโ
-โ START โ
-โโโโโโโโฌโโโโโโโ
- โ
- โผ
-โโโโโโโโโโโโโโโ
-โ 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] || '';
-}
-function loadASCIITemplate(templateName) {
- const template = getASCIITemplate(templateName);
- document.getElementById('ascii-preview').textContent = template;
-}
-function insertASCIIArt() {
- const asciiArt = document.getElementById('ascii-preview').textContent;
- if (!asciiArt || asciiArt === 'Select a template from the buttons above') {
- notifyUser('Generate ASCII art first.', 'warning');
- return;
- }
-
- // Insert using CodeMirror
- if (!tabManager) {
- notifyUser('No active editor found.', 'warning');
- return;
- }
-
- // Insert in code block for proper rendering
- const codeBlock = '\n```\n' + asciiArt + '\n```\n';
- tabManager.insertAtCursor(codeBlock);
-
- // Trigger update
- if (tabManager) {
- tabManager.handleEditorInput(tabManager.activeTabId);
- }
-
- // Close dialog
- hideASCIIGenerator();
-}
-
-// ASCII Art Event Listeners
-document.getElementById('ascii-dialog-close').addEventListener('click', hideASCIIGenerator);
-document.getElementById('ascii-cancel').addEventListener('click', hideASCIIGenerator);
-document.getElementById('ascii-generate').addEventListener('click', generateASCIIPreview);
-document.getElementById('ascii-insert').addEventListener('click', insertASCIIArt);
-
-// Mode switching
-document.getElementById('ascii-mode-text').addEventListener('click', () => switchASCIIMode('text'));
-document.getElementById('ascii-mode-box').addEventListener('click', () => switchASCIIMode('box'));
-document
- .getElementById('ascii-mode-templates')
- .addEventListener('click', () => switchASCIIMode('templates'));
-
-// Auto-update preview for text mode
-document.getElementById('ascii-text-input').addEventListener('input', generateASCIIPreview);
-document.getElementById('ascii-font-style').addEventListener('change', generateASCIIPreview);
-
-// Auto-update preview for box mode
-document.getElementById('ascii-box-text').addEventListener('input', generateASCIIPreview);
-document.getElementById('ascii-box-style').addEventListener('change', generateASCIIPreview);
-document.getElementById('ascii-box-padding').addEventListener('input', generateASCIIPreview);
-
-// Template buttons
-document.querySelectorAll('.ascii-template-btn').forEach((btn) => {
- btn.addEventListener('click', function () {
- const template = this.getAttribute('data-template');
- loadASCIITemplate(template);
- });
-});
-
-// IPC listener for menu
-ipcRenderer.on('show-ascii-generator', () => {
- showASCIIGenerator();
-});
-
// ============================================================================
// PANE RESIZING
// ============================================================================
diff --git a/tests/preload-ascii.test.js b/tests/preload-ascii.test.js
index 0ad6e66..fc9af05 100644
--- a/tests/preload-ascii.test.js
+++ b/tests/preload-ascii.test.js
@@ -25,8 +25,7 @@ describe('preload.js ASCII channels', () => {
expect(preloadSrc).toContain(`'${channel}'`);
});
- // DEFERRED to T11 โ channels still in allow-list until T11 deletes them.
- test.skip.each(DEAD_CHANNELS)('removed %s from allow-list', (channel) => {
+ test.each(DEAD_CHANNELS)('removed %s from allow-list', (channel) => {
expect(preloadSrc).not.toContain(`'${channel}'`);
});
diff --git a/tests/preload.test.js b/tests/preload.test.js
index 91a4295..8917681 100644
--- a/tests/preload.test.js
+++ b/tests/preload.test.js
@@ -127,8 +127,6 @@ describe('Preload Security', () => {
'pdf-operation-complete',
'pdf-operation-error',
'pdf-operation-progress',
- 'show-ascii-generator-window',
- 'show-ascii-generator',
'show-table-generator-window',
'open-header-footer-dialog',
'insert-content',