mirror of
https://github.com/elder-plinius/P4RS3LT0NGV3.git
synced 2026-06-07 23:43:58 +02:00
dc10a90851
- Implement tool registry system with individual tool modules - Reorganize transformers into categorized source modules - Remove emojiLibrary.js, consolidate into EmojiUtils and emojiData - Fix mobile close button and tooltip functionality - Add build system for transforms and emoji data - Migrate from Python backend to pure JavaScript - Add comprehensive documentation and testing - Improve code organization and maintainability - Ignore generated files (transforms-bundle.js, emojiData.js)
45 lines
2.2 KiB
JavaScript
45 lines
2.2 KiB
JavaScript
// wingdings transform
|
|
import BaseTransformer from '../BaseTransformer.js';
|
|
|
|
export default new BaseTransformer({
|
|
|
|
name: 'Wingdings',
|
|
priority: 100,
|
|
map: {
|
|
'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': '☏',
|
|
'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': '✜',
|
|
'.': '✠', ',': '✡', '?': '✢', '!': '✣', '@': '✤', '#': '✥', '$': '✦', '%': '✧',
|
|
'^': '✩', '&': '✪', '*': '✫', '(': '✬', ')': '✭', '-': '✮', '_': '✯', '=': '✰',
|
|
'+': '✱', '[': '✲', ']': '✳', '{': '✴', '}': '✵', '|': '✶', '\\': '✷', ';': '✸',
|
|
':': '✹', '"': '✺', '\'': '✻', '<': '✼', '>': '✽', '/': '✾', '~': '✿', '`': '❀'
|
|
},
|
|
func: function(text) {
|
|
return text.split('').map(char => this.map[char] || char).join('');
|
|
},
|
|
preview: function(text) {
|
|
if (!text) return '[wingdings]';
|
|
return this.func(text.slice(0, 10));
|
|
},
|
|
reverseMap: function() {
|
|
if (!this._reverseMap) {
|
|
this._reverseMap = {};
|
|
for (let key in this.map) {
|
|
this._reverseMap[this.map[key]] = key;
|
|
}
|
|
}
|
|
return this._reverseMap;
|
|
},
|
|
reverse: function(text) {
|
|
const revMap = this.reverseMap();
|
|
return text.split('').map(char => revMap[char] || char).join('');
|
|
}
|
|
|
|
}); |