eslint refactor review
This commit is contained in:
parent
424179d96b
commit
f7e7849069
|
@ -13,6 +13,7 @@
|
|||
"@fortawesome/free-solid-svg-icons": "^5.15.3",
|
||||
"@fortawesome/vue-fontawesome": "^2.0.2",
|
||||
"lz-string": "^1.4.4",
|
||||
"tailwindcss": "^2.2.7",
|
||||
"vue": "^2.6.11",
|
||||
"vue-clipboard2": "^0.3.1",
|
||||
"vue-draggable-resizable": "^2.3.0",
|
||||
|
@ -41,7 +42,7 @@
|
|||
"node": true
|
||||
},
|
||||
"extends": [
|
||||
"plugin:vue/strongly-recommended",
|
||||
"plugin:vue/essential",
|
||||
"@vue/airbnb"
|
||||
],
|
||||
"parserOptions": {
|
||||
|
|
|
@ -4,7 +4,10 @@
|
|||
<EditAscii />
|
||||
<PasteAscii />
|
||||
|
||||
<context-menu :display="showContextMenu" ref="menu">
|
||||
<context-menu
|
||||
:display="showContextMenu"
|
||||
ref="menu"
|
||||
>
|
||||
<ul>
|
||||
<li
|
||||
@click="$store.commit('openModal', 'new-ascii')"
|
||||
|
@ -13,8 +16,18 @@
|
|||
>
|
||||
New ASCII
|
||||
</li>
|
||||
<li @click="clearCache()" class="ml-1">Clear and Refresh</li>
|
||||
<li @click="startImport('mirc')" class="ml-1">Import mIRC</li>
|
||||
<li
|
||||
@click="clearCache()"
|
||||
class="ml-1"
|
||||
>
|
||||
Clear and Refresh
|
||||
</li>
|
||||
<li
|
||||
@click="startImport('mirc')"
|
||||
class="ml-1"
|
||||
>
|
||||
Import mIRC
|
||||
</li>
|
||||
<li
|
||||
@click="exportMirc('file')"
|
||||
class="ml-1"
|
||||
|
@ -22,7 +35,10 @@
|
|||
>
|
||||
Export mIRC to File
|
||||
</li>
|
||||
<li class="ml-1" @click="$store.commit('openModal', 'paste-modal')">
|
||||
<li
|
||||
class="ml-1"
|
||||
@click="$store.commit('openModal', 'paste-modal')"
|
||||
>
|
||||
Import mIRC from Clipboard
|
||||
</li>
|
||||
<li
|
||||
|
@ -39,7 +55,12 @@
|
|||
>
|
||||
Save Asciibird State
|
||||
</li>
|
||||
<li @click="startImport('asb')" class="ml-1">Load Asciibird State</li>
|
||||
<li
|
||||
@click="startImport('asb')"
|
||||
class="ml-1"
|
||||
>
|
||||
Load Asciibird State
|
||||
</li>
|
||||
<li
|
||||
@click="$store.commit('openModal', 'edit-ascii')"
|
||||
class="ml-1"
|
||||
|
@ -54,19 +75,19 @@
|
|||
@mouseup.right="openContextMenu"
|
||||
@contextmenu.prevent
|
||||
style="width: 100%; height: 100%; position: absolute; z-index: -1"
|
||||
></span>
|
||||
/>
|
||||
|
||||
<input
|
||||
type="file"
|
||||
style="display: none"
|
||||
ref="asciiInput"
|
||||
@change="onImport()"
|
||||
/>
|
||||
>
|
||||
|
||||
<template v-if="asciibirdMeta.length">
|
||||
<t-button
|
||||
v-for="(value, key) in asciibirdMeta"
|
||||
v-bind:key="key"
|
||||
:key="key"
|
||||
class="ml-1"
|
||||
@click="changeTab(key, value)"
|
||||
:disabled="false"
|
||||
|
@ -74,7 +95,10 @@
|
|||
{{ value.title }}
|
||||
</t-button>
|
||||
|
||||
<Toolbar :canvas-x="canvasX" :canvas-y="canvasY" />
|
||||
<Toolbar
|
||||
:canvas-x="canvasX"
|
||||
:canvas-y="canvasY"
|
||||
/>
|
||||
<DebugPanel
|
||||
:canvas-x="canvasX"
|
||||
:canvas-y="canvasY"
|
||||
|
@ -89,7 +113,9 @@
|
|||
</template>
|
||||
<template v-else>
|
||||
<div style="left: 35%; top: 15%; position: absolute; z-index: -2">
|
||||
<h1 style="font-size: 72px; text-align: center">ASCIIBIRD</h1>
|
||||
<h1 style="font-size: 72px; text-align: center">
|
||||
ASCIIBIRD
|
||||
</h1>
|
||||
<h1 style="font-size: 13px; text-align: center">
|
||||
Right click to start
|
||||
</h1>
|
||||
|
@ -99,30 +125,30 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import Toolbar from "./components/Toolbar.vue";
|
||||
import DebugPanel from "./components/DebugPanel.vue";
|
||||
import Editor from "./views/Editor.vue";
|
||||
import LZString from 'lz-string';
|
||||
import Toolbar from './components/Toolbar.vue';
|
||||
import DebugPanel from './components/DebugPanel.vue';
|
||||
import Editor from './views/Editor.vue';
|
||||
|
||||
import CharPicker from "./components/parts/CharPicker.vue";
|
||||
import ColourPicker from "./components/parts/ColourPicker.vue";
|
||||
import ContextMenu from "./components/parts/ContextMenu.vue";
|
||||
import CharPicker from './components/parts/CharPicker.vue';
|
||||
import ColourPicker from './components/parts/ColourPicker.vue';
|
||||
import ContextMenu from './components/parts/ContextMenu.vue';
|
||||
|
||||
import NewAscii from "./components/modals/NewAscii.vue";
|
||||
import EditAscii from "./components/modals/EditAscii.vue";
|
||||
import PasteAscii from "./components/modals/PasteAscii.vue";
|
||||
import LZString from "lz-string";
|
||||
import NewAscii from './components/modals/NewAscii.vue';
|
||||
import EditAscii from './components/modals/EditAscii.vue';
|
||||
import PasteAscii from './components/modals/PasteAscii.vue';
|
||||
|
||||
import { parseMircAscii, toolbarIcons } from "./ascii.js";
|
||||
import { parseMircAscii, toolbarIcons } from './ascii';
|
||||
|
||||
export default {
|
||||
async created() {
|
||||
// Load from irc watch if present in the URL bar
|
||||
const asciiUrlCdn = new URL(location.href).searchParams.get("ascii");
|
||||
const asciiUrlCdn = new URL(location.href).searchParams.get('ascii');
|
||||
if (asciiUrlCdn) {
|
||||
const res = await fetch(`https://ascii.jewbird.live/${asciiUrlCdn}`, {
|
||||
method: "GET",
|
||||
method: 'GET',
|
||||
headers: {
|
||||
Accept: "text/plain",
|
||||
Accept: 'text/plain',
|
||||
},
|
||||
});
|
||||
|
||||
|
@ -130,12 +156,12 @@ export default {
|
|||
this.mircAsciiImport(asciiData, asciiUrlCdn);
|
||||
}
|
||||
|
||||
const asciiUrl = new URL(location.href).searchParams.get("ircwatch");
|
||||
const asciiUrl = new URL(location.href).searchParams.get('ircwatch');
|
||||
if (asciiUrl) {
|
||||
const res = await fetch(`https://irc.watch/ascii/txt/${asciiUrl}`, {
|
||||
method: "GET",
|
||||
method: 'GET',
|
||||
headers: {
|
||||
Accept: "text/plain",
|
||||
Accept: 'text/plain',
|
||||
},
|
||||
});
|
||||
|
||||
|
@ -143,17 +169,17 @@ export default {
|
|||
this.mircAsciiImport(asciiData, asciiUrl);
|
||||
}
|
||||
|
||||
const haxAscii = new URL(location.href).searchParams.get("haxAscii");
|
||||
const haxAscii = new URL(location.href).searchParams.get('haxAscii');
|
||||
if (haxAscii) {
|
||||
const res = await fetch(`https://art.h4x.life/${haxAscii}`, {
|
||||
method: "GET",
|
||||
method: 'GET',
|
||||
headers: {
|
||||
Accept: "text/plain",
|
||||
Accept: 'text/plain',
|
||||
},
|
||||
});
|
||||
|
||||
// Considers paths
|
||||
const asciiName = haxAscii.split("/").pop();
|
||||
const asciiName = haxAscii.split('/').pop();
|
||||
const asciiData = await res.text();
|
||||
this.mircAsciiImport(asciiData, asciiName);
|
||||
}
|
||||
|
@ -169,7 +195,7 @@ export default {
|
|||
EditAscii,
|
||||
PasteAscii,
|
||||
},
|
||||
name: "Dashboard",
|
||||
name: 'Dashboard',
|
||||
data: () => ({
|
||||
showNewAsciiModal: false,
|
||||
currentTab: 1,
|
||||
|
@ -186,8 +212,8 @@ export default {
|
|||
},
|
||||
icon() {
|
||||
return [
|
||||
this.currentTool.fa ?? "fas",
|
||||
this.currentTool.icon ?? "mouse-pointer",
|
||||
this.currentTool.fa ?? 'fas',
|
||||
this.currentTool.icon ?? 'mouse-pointer',
|
||||
];
|
||||
},
|
||||
options() {
|
||||
|
@ -235,21 +261,22 @@ export default {
|
|||
const filename = files[0].name;
|
||||
const fileReader = new FileReader();
|
||||
|
||||
const _importType = this.importType;
|
||||
fileReader.addEventListener("load", () => {
|
||||
switch (_importType) {
|
||||
case "asb":
|
||||
const fileType = this.importType;
|
||||
fileReader.addEventListener('load', () => {
|
||||
switch (fileType) {
|
||||
case 'asb':
|
||||
this.importAsciibirdState(fileReader.result, filename);
|
||||
break;
|
||||
|
||||
case "mirc":
|
||||
default:
|
||||
case 'mirc':
|
||||
this.mircAsciiImport(fileReader.result, filename);
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
// This will fire the file reader 'load' event
|
||||
const asciiImport = fileReader.readAsText(files[0]);
|
||||
fileReader.readAsText(files[0]);
|
||||
},
|
||||
startImport(type) {
|
||||
// For ANSI we'll need to add back in the
|
||||
|
@ -262,17 +289,17 @@ export default {
|
|||
parseMircAscii(contents, filename);
|
||||
},
|
||||
importAsciibirdState(fileContents) {
|
||||
let contents = JSON.parse(
|
||||
LZString.decompressFromEncodedURIComponent(fileContents)
|
||||
const contents = JSON.parse(
|
||||
LZString.decompressFromEncodedURIComponent(fileContents),
|
||||
);
|
||||
this.$store.commit("changeState", { ...contents });
|
||||
this.$store.commit('changeState', { ...contents });
|
||||
},
|
||||
exportAsciibirdState() {
|
||||
let output;
|
||||
|
||||
try {
|
||||
output = LZString.compressToEncodedURIComponent(
|
||||
JSON.stringify(this.$store.getters.state)
|
||||
JSON.stringify(this.$store.getters.state),
|
||||
);
|
||||
|
||||
// Default timestamp for filename
|
||||
|
@ -287,7 +314,7 @@ export default {
|
|||
this.downloadToFile(
|
||||
output,
|
||||
`asciibird-${y}-${m}-${d}-${h}-${mi}-${s}.asb`,
|
||||
"application/gzip"
|
||||
'application/gzip',
|
||||
);
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
|
@ -295,7 +322,7 @@ export default {
|
|||
},
|
||||
exportMirc(type) {
|
||||
const { currentAscii } = this.$store.getters;
|
||||
let blocks = this.$store.getters.currentAsciiBlocks;
|
||||
const blocks = this.$store.getters.currentAsciiBlocks;
|
||||
const output = [];
|
||||
let curBlock = null;
|
||||
let prevBlock = { bg: -1, fg: -1 };
|
||||
|
@ -316,17 +343,17 @@ export default {
|
|||
// we'll put a colour codes and continue as normal
|
||||
if (curBlock.bg !== prevBlock.bg || curBlock.fg !== prevBlock.fg) {
|
||||
curBlock = { ...blocks[y][x] };
|
||||
const zeroPad = (num, places) => String(num).padStart(places, "0");
|
||||
const zeroPad = (num, places) => String(num).padStart(places, '0');
|
||||
output.push(
|
||||
`\u0003${zeroPad(
|
||||
curBlock.fg ?? this.options.defaultFg,
|
||||
2
|
||||
)},${zeroPad(curBlock.bg ?? this.options.defaultBg, 2)}`
|
||||
2,
|
||||
)},${zeroPad(curBlock.bg ?? this.options.defaultBg, 2)}`,
|
||||
);
|
||||
}
|
||||
|
||||
// null .chars will end up as space
|
||||
output.push(curBlock.char ?? " ");
|
||||
output.push(curBlock.char ?? ' ');
|
||||
prevBlock = blocks[y][x];
|
||||
}
|
||||
|
||||
|
@ -336,40 +363,39 @@ export default {
|
|||
|
||||
// New line except for the very last line
|
||||
if (y < blocks.length - 1) {
|
||||
output.push("\n");
|
||||
output.push('\n');
|
||||
}
|
||||
}
|
||||
|
||||
// Download to a txt file
|
||||
// Check if txt already exists and append it
|
||||
const filename =
|
||||
currentAscii.title.slice(currentAscii.title.length - 3) === "txt"
|
||||
? currentAscii.title
|
||||
: `${currentAscii.title}.txt`;
|
||||
const filename = currentAscii.title.slice(currentAscii.title.length - 3) === 'txt'
|
||||
? currentAscii.title
|
||||
: `${currentAscii.title}.txt`;
|
||||
|
||||
switch (type) {
|
||||
case "clipboard":
|
||||
this.$copyText(output.join("")).then(
|
||||
function (e) {
|
||||
alert("Copied");
|
||||
case 'clipboard':
|
||||
this.$copyText(output.join('')).then(
|
||||
(e) => {
|
||||
alert('Copied');
|
||||
console.log(e);
|
||||
},
|
||||
function (e) {
|
||||
alert("Can not copy");
|
||||
(e) => {
|
||||
alert('Can not copy');
|
||||
console.log(e);
|
||||
}
|
||||
},
|
||||
);
|
||||
break;
|
||||
|
||||
default:
|
||||
case "file":
|
||||
this.downloadToFile(output.join(""), filename, "text/plain");
|
||||
case 'file':
|
||||
this.downloadToFile(output.join(''), filename, 'text/plain');
|
||||
break;
|
||||
}
|
||||
},
|
||||
downloadToFile(content, filename, contentType) {
|
||||
const downloadToFile = (content, filename, contentType) => {
|
||||
const a = document.createElement("a");
|
||||
const downloadFile = (content, filename, contentType) => {
|
||||
const a = document.createElement('a');
|
||||
const file = new Blob([content], { type: contentType });
|
||||
|
||||
a.href = URL.createObjectURL(file);
|
||||
|
@ -379,16 +405,16 @@ export default {
|
|||
URL.revokeObjectURL(a.href);
|
||||
};
|
||||
|
||||
return downloadToFile(content, filename, contentType);
|
||||
return downloadFile(content, filename, contentType);
|
||||
},
|
||||
changeTab(key, value) {
|
||||
changeTab(key) {
|
||||
// Update the tab index in vuex store
|
||||
this.currentTab = key;
|
||||
this.$store.commit("changeTab", key);
|
||||
this.$store.commit('changeTab', key);
|
||||
},
|
||||
clearCache() {
|
||||
localStorage.clear();
|
||||
window.location.href = "/";
|
||||
window.location.href = '/';
|
||||
},
|
||||
captureMouse(event) {
|
||||
this.dashboardX = event.pageX;
|
||||
|
|
619
src/ascii.js
619
src/ascii.js
|
@ -1,268 +1,5 @@
|
|||
import LZString from "lz-string";
|
||||
import store from "./store";
|
||||
|
||||
export const parseMircAscii = (content, title) => {
|
||||
const MIRC_MAX_COLOURS = mircColours99.length;
|
||||
|
||||
// The current state of the Colours
|
||||
let curBlock = {
|
||||
fg: null,
|
||||
bg: null,
|
||||
char: null,
|
||||
};
|
||||
|
||||
let contents = content
|
||||
let filename = title
|
||||
|
||||
// set asciiImport as the entire file contents as a string
|
||||
const asciiImport = contents
|
||||
.split("\u0003\u0003")
|
||||
.join("\u0003")
|
||||
.split("\u000F").join("")
|
||||
.split("\u0003\n").join("\n")
|
||||
.split("\u0002\u0003").join("\u0003");
|
||||
|
||||
// This will end up in the asciibirdMeta
|
||||
const finalAscii = {
|
||||
width: false, // defined in: switch (curChar) case "\n":
|
||||
height: asciiImport.split("\n").length,
|
||||
title: filename,
|
||||
key: store.getters.nextTabValue,
|
||||
blockWidth: 8 * store.getters.blockSizeMultiplier,
|
||||
blockHeight: 13 * store.getters.blockSizeMultiplier,
|
||||
blocks: create2DArray(asciiImport.split("\n").length),
|
||||
history: [],
|
||||
redo: [],
|
||||
x: 8 * 35, // the dragable ascii canvas x
|
||||
y: 13 * 2, // the dragable ascii canvas y
|
||||
};
|
||||
|
||||
// Turn the entire ascii string into an array
|
||||
let asciiStringArray = asciiImport.split("");
|
||||
let linesArray = asciiImport.split("\n");
|
||||
|
||||
// The proper X and Y value of the block inside the ASCII
|
||||
let asciiX = 0;
|
||||
let asciiY = 0;
|
||||
|
||||
// used to determine colours
|
||||
let colourChar1 = null;
|
||||
let colourChar2 = null;
|
||||
let parsedColour = null;
|
||||
|
||||
// This variable just counts the amount of colour and char codes to minus
|
||||
// to get the real width
|
||||
let widthOfColCodes = 0;
|
||||
|
||||
// Better for colourful asciis
|
||||
let maxWidthLoop = 0;
|
||||
|
||||
// Used before the loop, better for plain text
|
||||
let maxWidthFound = 0;
|
||||
|
||||
for (let i = 0; i < linesArray.length; i++) {
|
||||
if (linesArray[i].length > maxWidthFound) {
|
||||
maxWidthFound = linesArray[i].length;
|
||||
}
|
||||
}
|
||||
|
||||
while (asciiStringArray.length) {
|
||||
const curChar = asciiStringArray[0];
|
||||
|
||||
// Defining a small finite state machine
|
||||
// to detect the colour code
|
||||
switch (curChar) {
|
||||
case "\n":
|
||||
// Reset the colours here on a new line
|
||||
curBlock = emptyBlock;
|
||||
|
||||
if (linesArray[asciiY] && linesArray[asciiY].length > maxWidthLoop) {
|
||||
maxWidthLoop = linesArray[asciiY].length;
|
||||
}
|
||||
|
||||
// the Y value of the ascii
|
||||
asciiY++;
|
||||
|
||||
// Calculate widths mirc asciis vs plain text
|
||||
if (!finalAscii.width && widthOfColCodes > 0) {
|
||||
finalAscii.width =
|
||||
maxWidthLoop - widthOfColCodes; // minus \n for the proper width
|
||||
}
|
||||
|
||||
|
||||
if (!finalAscii.width && widthOfColCodes === 0) {
|
||||
// Plain text
|
||||
finalAscii.width =
|
||||
maxWidthFound; // minus \n for the proper width
|
||||
}
|
||||
|
||||
// Resets the X value
|
||||
asciiX = 0;
|
||||
|
||||
asciiStringArray.shift();
|
||||
widthOfColCodes = 0;
|
||||
break;
|
||||
|
||||
case "\u0003":
|
||||
// Remove the colour char
|
||||
asciiStringArray.shift();
|
||||
widthOfColCodes++;
|
||||
|
||||
// Attempt to work out bg
|
||||
colourChar1 = `${asciiStringArray[0]}`;
|
||||
colourChar2 = `${asciiStringArray[1]}`;
|
||||
parsedColour = parseInt(`${colourChar1}${colourChar2}`);
|
||||
|
||||
// Work out the 01, 02 double digit codes
|
||||
if (parseInt(colourChar1) === 0 && parseInt(colourChar2) >= 0) {
|
||||
asciiStringArray.shift();
|
||||
}
|
||||
|
||||
if (isNaN(parsedColour)) {
|
||||
curBlock.bg = parseInt(colourChar1);
|
||||
widthOfColCodes += 1;
|
||||
asciiStringArray.shift();
|
||||
} else if (parsedColour <= MIRC_MAX_COLOURS && parsedColour >= 0) {
|
||||
curBlock.fg = parseInt(parsedColour);
|
||||
widthOfColCodes += parsedColour.toString().length;
|
||||
|
||||
asciiStringArray = asciiStringArray.slice(
|
||||
parsedColour.toString().length,
|
||||
asciiStringArray.length
|
||||
);
|
||||
}
|
||||
|
||||
// No background colour
|
||||
if (asciiStringArray[0] !== ",") {
|
||||
break;
|
||||
} else {
|
||||
// Remove , from array
|
||||
widthOfColCodes += 1;
|
||||
asciiStringArray.shift();
|
||||
}
|
||||
|
||||
// Attempt to work out bg
|
||||
colourChar1 = `${asciiStringArray[0]}`;
|
||||
colourChar2 = `${asciiStringArray[1]}`;
|
||||
parsedColour = parseInt(`${colourChar1}${colourChar2}`);
|
||||
|
||||
if (
|
||||
!isNaN(colourChar1) &&
|
||||
!isNaN(colourChar2) &&
|
||||
parseInt(colourChar2) > parseInt(colourChar1) &&
|
||||
!isNaN(parsedColour) &&
|
||||
parseInt(parsedColour) < 10
|
||||
) {
|
||||
parsedColour = parseInt(colourChar2);
|
||||
widthOfColCodes += 1;
|
||||
asciiStringArray.shift();
|
||||
}
|
||||
|
||||
if (
|
||||
parseInt(colourChar2) === parseInt(colourChar1) &&
|
||||
parseInt(parsedColour) < 10
|
||||
) {
|
||||
parsedColour = parseInt(colourChar1);
|
||||
asciiStringArray.shift();
|
||||
asciiStringArray.shift();
|
||||
widthOfColCodes += 2;
|
||||
|
||||
curBlock.bg = parseInt(colourChar1);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
if (isNaN(parsedColour)) {
|
||||
curBlock.bg = parseInt(colourChar1);
|
||||
widthOfColCodes += 1;
|
||||
asciiStringArray.shift();
|
||||
} else if (parsedColour <= MIRC_MAX_COLOURS && parsedColour >= 0) {
|
||||
curBlock.bg = parseInt(parsedColour);
|
||||
widthOfColCodes += parsedColour.toString().length;
|
||||
|
||||
asciiStringArray = asciiStringArray.slice(
|
||||
parsedColour.toString().length,
|
||||
asciiStringArray.length
|
||||
);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
curBlock.char = curChar;
|
||||
asciiStringArray.shift();
|
||||
asciiX++;
|
||||
|
||||
finalAscii.blocks[asciiY][asciiX - 1] = {
|
||||
...curBlock
|
||||
};
|
||||
break;
|
||||
} // End Switch
|
||||
} // End loop charPos
|
||||
|
||||
// Store the ASCII
|
||||
finalAscii.blocks = LZString.compressToUTF16(
|
||||
JSON.stringify(finalAscii.blocks)
|
||||
);
|
||||
|
||||
// We need to also store in the first undo history the original state
|
||||
finalAscii.history.push(finalAscii.blocks);
|
||||
|
||||
store.commit("newAsciibirdMeta", finalAscii);
|
||||
|
||||
// Update the browsers title to the ASCII filename
|
||||
document.title = `asciibird - ${store.getters.currentAscii.title}`;
|
||||
|
||||
return true;
|
||||
};
|
||||
|
||||
export const create2DArray = (rows) => {
|
||||
const arr = [];
|
||||
|
||||
for (let i = 0; i < rows; i++) {
|
||||
arr[i] = [];
|
||||
}
|
||||
|
||||
return arr;
|
||||
}
|
||||
|
||||
export const emptyBlock = {
|
||||
bg: null,
|
||||
fg: null,
|
||||
char: null,
|
||||
};
|
||||
|
||||
export const createNewAscii = (forms) => {
|
||||
let newAscii = {
|
||||
title: forms.createAscii.title,
|
||||
key: store.getters.asciibirdMeta.length,
|
||||
width: forms.createAscii.width,
|
||||
height: forms.createAscii.height,
|
||||
blockWidth: 8 * store.getters.blockSizeMultiplier,
|
||||
blockHeight: 13 * store.getters.blockSizeMultiplier,
|
||||
history: [],
|
||||
redo: [],
|
||||
x: 247, // the dragable ascii canvas x
|
||||
y: 24, // the dragable ascii canvas y
|
||||
blocks: create2DArray(forms.createAscii.height),
|
||||
};
|
||||
|
||||
// Push all the default ASCII blocks
|
||||
for (let x = 0; x < newAscii.width; x++) {
|
||||
for (let y = 0; y < newAscii.height; y++) {
|
||||
newAscii.blocks[y].push(emptyBlock);
|
||||
}
|
||||
}
|
||||
|
||||
newAscii.blocks = LZString.compressToUTF16(JSON.stringify(newAscii.blocks))
|
||||
newAscii.history.push(newAscii.blocks)
|
||||
store.commit("newAsciibirdMeta", newAscii);
|
||||
store.commit('openModal', 'new-ascii');
|
||||
|
||||
return true;
|
||||
}
|
||||
import LZString from 'lz-string';
|
||||
import store from './store';
|
||||
|
||||
// 0 => 'white',
|
||||
// 1 => 'black',
|
||||
|
@ -378,9 +115,273 @@ export const mircColours99 = [
|
|||
'rgb(129,129,129)',
|
||||
'rgb(159,159,159)',
|
||||
'rgb(188,188,188)',
|
||||
'rgb(226,226,226)'
|
||||
'rgb(226,226,226)',
|
||||
];
|
||||
|
||||
export const emptyBlock = {
|
||||
bg: null,
|
||||
fg: null,
|
||||
char: null,
|
||||
};
|
||||
|
||||
export const create2DArray = (rows) => {
|
||||
const arr = [];
|
||||
|
||||
for (let i = 0; i < rows; i++) {
|
||||
arr[i] = [];
|
||||
}
|
||||
|
||||
return arr;
|
||||
};
|
||||
|
||||
export const parseMircAscii = (content, title) => {
|
||||
const MIRC_MAX_COLOURS = mircColours99.length;
|
||||
|
||||
// The current state of the Colours
|
||||
let curBlock = {
|
||||
...emptyBlock,
|
||||
};
|
||||
|
||||
const contents = content;
|
||||
const filename = title;
|
||||
|
||||
// set asciiImport as the entire file contents as a string
|
||||
const asciiImport = contents
|
||||
.split('\u0003\u0003')
|
||||
.join('\u0003')
|
||||
.split('\u000F').join('')
|
||||
.split('\u0003\n')
|
||||
.join('\n')
|
||||
.split('\u0002\u0003')
|
||||
.join('\u0003');
|
||||
|
||||
// This will end up in the asciibirdMeta
|
||||
const finalAscii = {
|
||||
width: false, // defined in: switch (curChar) case "\n":
|
||||
height: asciiImport.split('\n').length,
|
||||
title: filename,
|
||||
key: store.getters.nextTabValue,
|
||||
blockWidth: 8 * store.getters.blockSizeMultiplier,
|
||||
blockHeight: 13 * store.getters.blockSizeMultiplier,
|
||||
blocks: create2DArray(asciiImport.split('\n').length),
|
||||
history: [],
|
||||
redo: [],
|
||||
x: 8 * 35, // the dragable ascii canvas x
|
||||
y: 13 * 2, // the dragable ascii canvas y
|
||||
};
|
||||
|
||||
// Turn the entire ascii string into an array
|
||||
let asciiStringArray = asciiImport.split('');
|
||||
const linesArray = asciiImport.split('\n');
|
||||
|
||||
// The proper X and Y value of the block inside the ASCII
|
||||
let asciiX = 0;
|
||||
let asciiY = 0;
|
||||
|
||||
// used to determine colours
|
||||
let colourChar1 = null;
|
||||
let colourChar2 = null;
|
||||
let parsedColour = null;
|
||||
|
||||
// This variable just counts the amount of colour and char codes to minus
|
||||
// to get the real width
|
||||
let widthOfColCodes = 0;
|
||||
|
||||
// Better for colourful asciis
|
||||
let maxWidthLoop = 0;
|
||||
|
||||
// Used before the loop, better for plain text
|
||||
let maxWidthFound = 0;
|
||||
|
||||
for (let i = 0; i < linesArray.length; i++) {
|
||||
if (linesArray[i].length > maxWidthFound) {
|
||||
maxWidthFound = linesArray[i].length;
|
||||
}
|
||||
}
|
||||
|
||||
while (asciiStringArray.length) {
|
||||
const curChar = asciiStringArray[0];
|
||||
|
||||
// Defining a small finite state machine
|
||||
// to detect the colour code
|
||||
switch (curChar) {
|
||||
case '\n':
|
||||
// Reset the colours here on a new line
|
||||
curBlock = {
|
||||
...emptyBlock,
|
||||
};
|
||||
|
||||
if (linesArray[asciiY] && linesArray[asciiY].length > maxWidthLoop) {
|
||||
maxWidthLoop = linesArray[asciiY].length;
|
||||
}
|
||||
|
||||
// the Y value of the ascii
|
||||
asciiY++;
|
||||
|
||||
// Calculate widths mirc asciis vs plain text
|
||||
if (!finalAscii.width && widthOfColCodes > 0) {
|
||||
finalAscii.width = maxWidthLoop - widthOfColCodes; // minus \n for the proper width
|
||||
}
|
||||
|
||||
if (!finalAscii.width && widthOfColCodes === 0) {
|
||||
// Plain text
|
||||
finalAscii.width = maxWidthFound; // minus \n for the proper width
|
||||
}
|
||||
|
||||
// Resets the X value
|
||||
asciiX = 0;
|
||||
|
||||
asciiStringArray.shift();
|
||||
widthOfColCodes = 0;
|
||||
break;
|
||||
|
||||
case '\u0003':
|
||||
// Remove the colour char
|
||||
asciiStringArray.shift();
|
||||
widthOfColCodes++;
|
||||
|
||||
// Attempt to work out bg
|
||||
colourChar1 = `${asciiStringArray[0]}`;
|
||||
colourChar2 = `${asciiStringArray[1]}`;
|
||||
parsedColour = parseInt(`${colourChar1}${colourChar2}`);
|
||||
|
||||
// Work out the 01, 02 double digit codes
|
||||
if (parseInt(colourChar1) === 0 && parseInt(colourChar2) >= 0) {
|
||||
asciiStringArray.shift();
|
||||
}
|
||||
|
||||
if (Number.isNaN(parsedColour)) {
|
||||
curBlock.bg = parseInt(colourChar1);
|
||||
widthOfColCodes += 1;
|
||||
asciiStringArray.shift();
|
||||
} else if (parsedColour <= MIRC_MAX_COLOURS && parsedColour >= 0) {
|
||||
curBlock.fg = parseInt(parsedColour);
|
||||
widthOfColCodes += parsedColour.toString().length;
|
||||
|
||||
asciiStringArray = asciiStringArray.slice(
|
||||
parsedColour.toString().length,
|
||||
asciiStringArray.length,
|
||||
);
|
||||
}
|
||||
|
||||
// No background colour
|
||||
if (asciiStringArray[0] !== ',') {
|
||||
break;
|
||||
} else {
|
||||
// Remove , from array
|
||||
widthOfColCodes += 1;
|
||||
asciiStringArray.shift();
|
||||
}
|
||||
|
||||
// Attempt to work out bg
|
||||
colourChar1 = `${asciiStringArray[0]}`;
|
||||
colourChar2 = `${asciiStringArray[1]}`;
|
||||
parsedColour = parseInt(`${colourChar1}${colourChar2}`);
|
||||
|
||||
if (
|
||||
!Number.isNaN(colourChar1)
|
||||
&& !Number.isNaN(colourChar2)
|
||||
&& parseInt(colourChar2) > parseInt(colourChar1)
|
||||
&& !Number.isNaN(parsedColour)
|
||||
&& parseInt(parsedColour) < 10
|
||||
) {
|
||||
parsedColour = parseInt(colourChar2);
|
||||
widthOfColCodes += 1;
|
||||
asciiStringArray.shift();
|
||||
}
|
||||
|
||||
if (
|
||||
parseInt(colourChar2) === parseInt(colourChar1)
|
||||
&& parseInt(parsedColour) < 10
|
||||
) {
|
||||
parsedColour = parseInt(colourChar1);
|
||||
asciiStringArray.shift();
|
||||
asciiStringArray.shift();
|
||||
widthOfColCodes += 2;
|
||||
|
||||
curBlock.bg = parseInt(colourChar1);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
if (Number.isNaN(parsedColour)) {
|
||||
curBlock.bg = parseInt(colourChar1);
|
||||
widthOfColCodes += 1;
|
||||
asciiStringArray.shift();
|
||||
} else if (parsedColour <= MIRC_MAX_COLOURS && parsedColour >= 0) {
|
||||
curBlock.bg = parseInt(parsedColour);
|
||||
widthOfColCodes += parsedColour.toString().length;
|
||||
|
||||
asciiStringArray = asciiStringArray.slice(
|
||||
parsedColour.toString().length,
|
||||
asciiStringArray.length,
|
||||
);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
curBlock.char = curChar;
|
||||
asciiStringArray.shift();
|
||||
asciiX++;
|
||||
|
||||
finalAscii.blocks[asciiY][asciiX - 1] = {
|
||||
...curBlock,
|
||||
};
|
||||
break;
|
||||
} // End Switch
|
||||
} // End loop charPos
|
||||
|
||||
// Store the ASCII
|
||||
finalAscii.blocks = LZString.compressToUTF16(
|
||||
JSON.stringify(finalAscii.blocks),
|
||||
);
|
||||
|
||||
// We need to also store in the first undo history the original state
|
||||
finalAscii.history.push(finalAscii.blocks);
|
||||
|
||||
store.commit('newAsciibirdMeta', finalAscii);
|
||||
|
||||
// Update the browsers title to the ASCII filename
|
||||
document.title = `asciibird - ${store.getters.currentAscii.title}`;
|
||||
|
||||
return true;
|
||||
};
|
||||
|
||||
export const createNewAscii = (forms) => {
|
||||
const newAscii = {
|
||||
title: forms.createAscii.title,
|
||||
key: store.getters.asciibirdMeta.length,
|
||||
width: forms.createAscii.width,
|
||||
height: forms.createAscii.height,
|
||||
blockWidth: 8 * store.getters.blockSizeMultiplier,
|
||||
blockHeight: 13 * store.getters.blockSizeMultiplier,
|
||||
history: [],
|
||||
redo: [],
|
||||
x: 247, // the dragable ascii canvas x
|
||||
y: 24, // the dragable ascii canvas y
|
||||
blocks: create2DArray(forms.createAscii.height),
|
||||
};
|
||||
|
||||
// Push all the default ASCII blocks
|
||||
for (let x = 0; x < newAscii.width; x++) {
|
||||
for (let y = 0; y < newAscii.height; y++) {
|
||||
newAscii.blocks[y].push({
|
||||
...emptyBlock,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
newAscii.blocks = LZString.compressToUTF16(JSON.stringify(newAscii.blocks));
|
||||
newAscii.history.push(newAscii.blocks);
|
||||
store.commit('newAsciibirdMeta', newAscii);
|
||||
store.commit('openModal', 'new-ascii');
|
||||
|
||||
return true;
|
||||
};
|
||||
|
||||
// Chars that end up in the toolbar
|
||||
export const charCodes = [' ', '!', '"', '#', '$', '%', '&', '\'', '(', ')', '*', '+', ',', '-',
|
||||
'.', '/',
|
||||
|
@ -395,52 +396,52 @@ export const charCodes = [' ', '!', '"', '#', '$', '%', '&', '\'', '(', ')', '*'
|
|||
'┴', '┬', '├', '─', '┼', 'ã', 'Ã', '╚', '╔', '╩', '╦', '╠', '═', '╬', '¤', 'ð', 'Ð', 'Ê',
|
||||
'Ë', 'È', 'ı', 'Í', 'Î', 'Ï', '┘', '┌', '█', '▄', '¦', 'Ì', '▀', 'Ó', 'ß', 'Ô', 'Ò', 'õ',
|
||||
'Õ', 'µ', 'þ', 'Þ', 'Ú', 'Û', 'Ù', 'ý', 'Ý', '¯', '´', '≡', '±', '‗', '¾', '¶', '§', '÷',
|
||||
'¸', '°', '¨', '·', '¹', '³', '²'
|
||||
'¸', '°', '¨', '·', '¹', '³', '²',
|
||||
];
|
||||
|
||||
// Toolbar icons
|
||||
export const toolbarIcons = [{
|
||||
name: 'default',
|
||||
icon: 'mouse-pointer',
|
||||
fa: 'fas',
|
||||
svgPath: 'assets/mouse-pointer-solid.svg',
|
||||
},
|
||||
{
|
||||
name: 'select',
|
||||
icon: 'square',
|
||||
fa: 'far',
|
||||
svgPath: 'assets/square-regular.svg',
|
||||
},
|
||||
{
|
||||
name: 'text',
|
||||
icon: 'font',
|
||||
fa: 'fas',
|
||||
svgPath: 'assets/font-solid.svg',
|
||||
},
|
||||
{
|
||||
name: 'fill',
|
||||
icon: 'fill-drip',
|
||||
fa: 'fas',
|
||||
svgPath: 'assets/fill-drip-solid.svg',
|
||||
},
|
||||
{
|
||||
name: 'brush',
|
||||
icon: 'paint-brush',
|
||||
fa: 'fas',
|
||||
svgPath: 'assets/paint-brush-solid.svg',
|
||||
},
|
||||
{
|
||||
name: 'dropper',
|
||||
icon: 'eye-dropper',
|
||||
fa: 'fas',
|
||||
svgPath: 'assets/eye-dropper-solid.svg',
|
||||
},
|
||||
{
|
||||
name: 'eraser',
|
||||
icon: 'eraser',
|
||||
fa: 'fas',
|
||||
svgPath: 'assets/eraser-solid.svg',
|
||||
},
|
||||
name: 'default',
|
||||
icon: 'mouse-pointer',
|
||||
fa: 'fas',
|
||||
svgPath: 'assets/mouse-pointer-solid.svg',
|
||||
},
|
||||
{
|
||||
name: 'select',
|
||||
icon: 'square',
|
||||
fa: 'far',
|
||||
svgPath: 'assets/square-regular.svg',
|
||||
},
|
||||
{
|
||||
name: 'text',
|
||||
icon: 'font',
|
||||
fa: 'fas',
|
||||
svgPath: 'assets/font-solid.svg',
|
||||
},
|
||||
{
|
||||
name: 'fill',
|
||||
icon: 'fill-drip',
|
||||
fa: 'fas',
|
||||
svgPath: 'assets/fill-drip-solid.svg',
|
||||
},
|
||||
{
|
||||
name: 'brush',
|
||||
icon: 'paint-brush',
|
||||
fa: 'fas',
|
||||
svgPath: 'assets/paint-brush-solid.svg',
|
||||
},
|
||||
{
|
||||
name: 'dropper',
|
||||
icon: 'eye-dropper',
|
||||
fa: 'fas',
|
||||
svgPath: 'assets/eye-dropper-solid.svg',
|
||||
},
|
||||
{
|
||||
name: 'eraser',
|
||||
icon: 'eraser',
|
||||
fa: 'fas',
|
||||
svgPath: 'assets/eraser-solid.svg',
|
||||
},
|
||||
];
|
||||
|
||||
export default createNewAscii
|
||||
export default createNewAscii;
|
||||
|
|
|
@ -6,8 +6,9 @@
|
|||
class="border-gray-200 p-1"
|
||||
id="currentColourFg"
|
||||
@click="$store.commit('changeIsUpdatingFg', true)"
|
||||
>FG</t-button
|
||||
>
|
||||
FG
|
||||
</t-button>
|
||||
|
||||
<t-button
|
||||
type="button"
|
||||
|
@ -15,8 +16,9 @@
|
|||
class="border-gray-200 p-1"
|
||||
id="currentColourBg"
|
||||
@click="$store.commit('changeIsUpdatingBg', true)"
|
||||
>BG</t-button
|
||||
>
|
||||
BG
|
||||
</t-button>
|
||||
|
||||
<t-button
|
||||
type="button"
|
||||
|
@ -33,16 +35,17 @@
|
|||
class="border-gray-200 p-1 w-8 h-8"
|
||||
id="currentChar"
|
||||
@click="$store.commit('changeIsUpdatingChar', true)"
|
||||
>{{ toolbarState.selectedChar }}</t-button
|
||||
>
|
||||
{{ toolbarState.selectedChar }}
|
||||
</t-button>
|
||||
</t-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mircColours99 } from "../ascii.js";
|
||||
import { mircColours99 } from '../ascii';
|
||||
|
||||
export default {
|
||||
name: "Colours",
|
||||
name: 'Colours',
|
||||
data: () => ({}),
|
||||
computed: {
|
||||
mircColours() {
|
||||
|
@ -60,11 +63,11 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
swapColours() {
|
||||
let bg = this.currentBg;
|
||||
let fg = this.currentFg;
|
||||
const bg = this.currentBg;
|
||||
const fg = this.currentFg;
|
||||
|
||||
this.$store.commit("changeColourFg", bg);
|
||||
this.$store.commit("changeColourBg", fg);
|
||||
this.$store.commit('changeColourFg', bg);
|
||||
this.$store.commit('changeColourBg', fg);
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
@ -13,39 +13,61 @@
|
|||
:x="debugPanelState.x"
|
||||
:y="debugPanelState.y"
|
||||
>
|
||||
|
||||
<t-card style="height: 100%;">
|
||||
<span class="ml-5" v-html="`Tool: ${getToolName}`"></span> <br>
|
||||
<span class="ml-5" v-html="`FgColour: ${currentFg}`"></span> <br>
|
||||
<span class="ml-5" v-html="`BgColor: ${currentBg}`"></span> <br>
|
||||
<span class="ml-5" v-html="`Char: ${currentChar}`"></span> <br>
|
||||
<t-card style="height: 100%;">
|
||||
<span
|
||||
class="ml-5"
|
||||
v-html="`Tool: ${getToolName}`"
|
||||
/> <br>
|
||||
<span
|
||||
class="ml-5"
|
||||
v-html="`FgColour: ${currentFg}`"
|
||||
/> <br>
|
||||
<span
|
||||
class="ml-5"
|
||||
v-html="`BgColor: ${currentBg}`"
|
||||
/> <br>
|
||||
<span
|
||||
class="ml-5"
|
||||
v-html="`Char: ${currentChar}`"
|
||||
/> <br>
|
||||
|
||||
<span class="ml-5" v-html="`canvasX: ${canvasX}`"></span> <br>
|
||||
<span class="ml-5" v-html="`canvasY: ${canvasY}`"></span> <br>
|
||||
<span
|
||||
class="ml-5"
|
||||
v-html="`canvasX: ${canvasX}`"
|
||||
/> <br>
|
||||
<span
|
||||
class="ml-5"
|
||||
v-html="`canvasY: ${canvasY}`"
|
||||
/> <br>
|
||||
|
||||
<span class="ml-5" v-html="`mirrorX: ${mirrorX}`"></span> <br>
|
||||
<span class="ml-5" v-html="`mirrorY: ${mirrorY}`"></span> <br>
|
||||
<span
|
||||
class="ml-5"
|
||||
v-html="`mirrorX: ${mirrorX}`"
|
||||
/> <br>
|
||||
<span
|
||||
class="ml-5"
|
||||
v-html="`mirrorY: ${mirrorY}`"
|
||||
/> <br>
|
||||
|
||||
<span class="ml-5"> Size: {{ asciiStats.sizeCompressed }} ({{ asciiStats.sizeUncompressed }} / {{ asciiStats.sizePercentage }}%) </span> <br>
|
||||
<span class="ml-5"> Size: {{ asciiStats.sizeCompressed }} ({{ asciiStats.sizeUncompressed }} / {{ asciiStats.sizePercentage }}%) </span> <br>
|
||||
|
||||
<span class="ml-5"> State Size: {{ asciiStats.stateSize }}</span> <br>
|
||||
</t-card>
|
||||
|
||||
<span class="ml-5"> State Size: {{ asciiStats.stateSize }}</span> <br>
|
||||
</t-card>
|
||||
</vue-draggable-resizable>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { toolbarIcons, mircColours99 } from "../ascii.js"
|
||||
import { toolbarIcons, mircColours99 } from '../ascii';
|
||||
|
||||
export default {
|
||||
created() {
|
||||
this.panel.x = this.debugPanelState.x
|
||||
this.panel.y = this.debugPanelState.y
|
||||
this.panel.w = this.debugPanelState.w
|
||||
this.panel.h = this.debugPanelState.h
|
||||
this.panel.x = this.debugPanelState.x;
|
||||
this.panel.y = this.debugPanelState.y;
|
||||
this.panel.w = this.debugPanelState.w;
|
||||
this.panel.h = this.debugPanelState.h;
|
||||
},
|
||||
name: "DebugPanel",
|
||||
props: ["canvasX", "canvasY"],
|
||||
name: 'DebugPanel',
|
||||
props: ['canvasX', 'canvasY'],
|
||||
data: () => ({
|
||||
panel: {
|
||||
w: 0,
|
||||
|
@ -58,28 +80,28 @@ export default {
|
|||
}),
|
||||
computed: {
|
||||
getToolName() {
|
||||
return toolbarIcons[this.$store.getters.currentTool] ? toolbarIcons[this.$store.getters.currentTool].name : 'none'
|
||||
return toolbarIcons[this.$store.getters.currentTool] ? toolbarIcons[this.$store.getters.currentTool].name : 'none';
|
||||
},
|
||||
debugPanelState() {
|
||||
return this.$store.getters.debugPanel
|
||||
return this.$store.getters.debugPanel;
|
||||
},
|
||||
currentAscii() {
|
||||
return this.$store.getters.currentAscii;
|
||||
},
|
||||
currentAsciiBlocks() {
|
||||
return this.$store.getters.currentAsciiBlocks
|
||||
return this.$store.getters.currentAsciiBlocks;
|
||||
},
|
||||
asciiStats() {
|
||||
let compressed = (this.currentAscii.blocks.length / 1024).toFixed(2);
|
||||
let uncompressed = ( JSON.stringify(this.currentAsciiBlocks).length / 1024).toFixed(2)
|
||||
const compressed = (this.currentAscii.blocks.length / 1024).toFixed(2);
|
||||
const uncompressed = (JSON.stringify(this.currentAsciiBlocks).length / 1024).toFixed(2);
|
||||
|
||||
let stateSize = ( JSON.stringify(this.state).length / 1024).toFixed(2);
|
||||
return {
|
||||
sizeCompressed: compressed + 'kb',
|
||||
sizeUncompressed: uncompressed + 'kb',
|
||||
stateSize: stateSize + 'kb',
|
||||
sizePercentage: (100 - (uncompressed / compressed)).toFixed(2),
|
||||
}
|
||||
const stateSize = (JSON.stringify(this.state).length / 1024).toFixed(2);
|
||||
return {
|
||||
sizeCompressed: `${compressed}kb`,
|
||||
sizeUncompressed: `${uncompressed}kb`,
|
||||
stateSize: `${stateSize}kb`,
|
||||
sizePercentage: (100 - (uncompressed / compressed)).toFixed(2),
|
||||
};
|
||||
},
|
||||
currentTool() {
|
||||
return toolbarIcons[
|
||||
|
@ -108,17 +130,17 @@ export default {
|
|||
return this.$store.getters.getChar;
|
||||
},
|
||||
isTextEditing() {
|
||||
return this.currentTool.name === "text"
|
||||
return this.currentTool.name === 'text';
|
||||
},
|
||||
isSelecting() {
|
||||
return this.currentTool.name === "select"
|
||||
return this.currentTool.name === 'select';
|
||||
},
|
||||
isSelected() {
|
||||
return (
|
||||
this.selecting.startX &&
|
||||
this.selecting.startY &&
|
||||
this.selecting.endX &&
|
||||
this.selecting.endY
|
||||
this.selecting.startX
|
||||
&& this.selecting.startY
|
||||
&& this.selecting.endX
|
||||
&& this.selecting.endY
|
||||
);
|
||||
},
|
||||
brushBlocks() {
|
||||
|
@ -141,7 +163,7 @@ export default {
|
|||
},
|
||||
state() {
|
||||
return this.$store.getters.state;
|
||||
}
|
||||
},
|
||||
},
|
||||
watch: {},
|
||||
methods: {
|
||||
|
@ -151,13 +173,13 @@ export default {
|
|||
this.panel.w = w;
|
||||
this.panel.h = h;
|
||||
|
||||
this.$store.commit("changeDebugPanelState", this.panel)
|
||||
this.$store.commit('changeDebugPanelState', this.panel);
|
||||
},
|
||||
onDragStop(x, y) {
|
||||
this.panel.x = x;
|
||||
this.panel.y = y;
|
||||
|
||||
this.$store.commit("changeDebugPanelState", this.panel)
|
||||
this.$store.commit('changeDebugPanelState', this.panel);
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
<span class="text-sm">Text</span>
|
||||
</label>
|
||||
|
||||
<hr />
|
||||
<hr>
|
||||
|
||||
<label class="flex ml-1">
|
||||
<t-checkbox
|
||||
|
@ -59,7 +59,7 @@
|
|||
<span class="text-sm">Mirror Y</span>
|
||||
</label>
|
||||
|
||||
<hr />
|
||||
<hr>
|
||||
|
||||
<Colours />
|
||||
|
||||
|
@ -77,7 +77,7 @@
|
|||
<font-awesome-icon :icon="[value.fa, value.icon]" />
|
||||
</t-button>
|
||||
|
||||
<hr />
|
||||
<hr>
|
||||
|
||||
<BrushPreview />
|
||||
</t-card>
|
||||
|
@ -86,9 +86,9 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import Colours from "./Colours.vue";
|
||||
import BrushPreview from "./parts/BrushPreview.vue";
|
||||
import { toolbarIcons } from "../ascii.js";
|
||||
import Colours from './Colours.vue';
|
||||
import BrushPreview from './parts/BrushPreview.vue';
|
||||
import { toolbarIcons } from '../ascii';
|
||||
|
||||
export default {
|
||||
created() {
|
||||
|
@ -100,7 +100,7 @@ export default {
|
|||
this.mirror.x = this.toolbarState.mirrorX;
|
||||
this.mirror.y = this.toolbarState.mirrorY;
|
||||
},
|
||||
name: "Toolbar",
|
||||
name: 'Toolbar',
|
||||
components: { Colours, BrushPreview },
|
||||
|
||||
data: () => ({
|
||||
|
@ -150,7 +150,7 @@ export default {
|
|||
watch: {},
|
||||
methods: {
|
||||
updateMirror() {
|
||||
this.$store.commit("updateMirror", this.mirror);
|
||||
this.$store.commit('updateMirror', this.mirror);
|
||||
},
|
||||
onResize(x, y, w, h) {
|
||||
this.toolbar.x = x;
|
||||
|
@ -158,9 +158,9 @@ export default {
|
|||
this.toolbar.w = w;
|
||||
this.toolbar.h = h;
|
||||
|
||||
this.$store.commit("changeToolBarState", {
|
||||
x: x,
|
||||
y: y,
|
||||
this.$store.commit('changeToolBarState', {
|
||||
x,
|
||||
y,
|
||||
w: this.toolbar.w,
|
||||
h: this.toolbar.h,
|
||||
});
|
||||
|
@ -169,9 +169,9 @@ export default {
|
|||
this.toolbar.x = x;
|
||||
this.toolbar.y = y;
|
||||
|
||||
this.$store.commit("changeToolBarState", {
|
||||
x: x,
|
||||
y: y,
|
||||
this.$store.commit('changeToolBarState', {
|
||||
x,
|
||||
y,
|
||||
w: this.toolbar.w,
|
||||
h: this.toolbar.h,
|
||||
});
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
<t-modal
|
||||
name="edit-ascii-modal"
|
||||
:header="currentAsciiEditingTitle"
|
||||
:clickToClose="false"
|
||||
:escToClose="true"
|
||||
:click-to-close="false"
|
||||
:esc-to-close="true"
|
||||
>
|
||||
Width
|
||||
<t-input
|
||||
|
@ -31,15 +31,20 @@
|
|||
|
||||
<hr class="mt-5 mb-5">
|
||||
|
||||
|
||||
|
||||
<template v-slot:footer>
|
||||
<div
|
||||
class="flex justify-between"
|
||||
@click="$modal.hide('edit-ascii-modal')"
|
||||
>
|
||||
<t-button type="button"> Cancel </t-button>
|
||||
<t-button type="button" @click="updateAscii()">Update</t-button>
|
||||
<t-button type="button">
|
||||
Cancel
|
||||
</t-button>
|
||||
<t-button
|
||||
type="button"
|
||||
@click="updateAscii()"
|
||||
>
|
||||
Update
|
||||
</t-button>
|
||||
</div>
|
||||
</template>
|
||||
</t-modal>
|
||||
|
@ -47,16 +52,16 @@
|
|||
|
||||
<script>
|
||||
export default {
|
||||
name: "EditAsciiModal",
|
||||
name: 'EditAsciiModal',
|
||||
created() {
|
||||
this.forms.editAscii = this.currentAscii
|
||||
this.forms.editAscii = this.currentAscii;
|
||||
},
|
||||
data: () => ({
|
||||
forms: {
|
||||
editAscii: {
|
||||
width: 80,
|
||||
height: 30,
|
||||
title: "ascii",
|
||||
title: 'ascii',
|
||||
},
|
||||
},
|
||||
}),
|
||||
|
@ -68,29 +73,27 @@ export default {
|
|||
return this.$store.getters.currentAscii;
|
||||
},
|
||||
currentAsciiEditingTitle() {
|
||||
return `Editing ASCII ${this.currentAscii.title}`;
|
||||
return `Editing ASCII ${this.currentAscii.title}`;
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
showEditAsciiModal(val, old) {
|
||||
if (val !== old) {
|
||||
this.showEditModal();
|
||||
}
|
||||
if (val !== old) {
|
||||
this.showEditModal();
|
||||
}
|
||||
|
||||
// this.showEditModal();
|
||||
// this.showEditModal();
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
showEditModal() {
|
||||
// this.forms.editAscii.title = `Editing ASCII ${this.currentAscii.title}`;
|
||||
this.forms.editAscii = this.currentAscii
|
||||
this.$modal.show("edit-ascii-modal");
|
||||
this.forms.editAscii = this.currentAscii;
|
||||
this.$modal.show('edit-ascii-modal');
|
||||
},
|
||||
updateAscii() {
|
||||
|
||||
this.$store.commit("updateAscii", this.forms.editAscii);
|
||||
this.$modal.hide("edit-ascii-modal");
|
||||
return
|
||||
this.$store.commit('updateAscii', this.forms.editAscii);
|
||||
this.$modal.hide('edit-ascii-modal');
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
<t-modal
|
||||
name="create-ascii-modal"
|
||||
header="Create new ASCII"
|
||||
:clickToClose="false"
|
||||
:escToClose="true"
|
||||
:click-to-close="false"
|
||||
:esc-to-close="true"
|
||||
@before-closed="closeNewASCII"
|
||||
>
|
||||
Width
|
||||
|
@ -35,25 +35,32 @@
|
|||
class="flex justify-between"
|
||||
@click="$modal.hide('create-ascii-modal')"
|
||||
>
|
||||
<t-button type="button"> Cancel </t-button>
|
||||
<t-button type="button" @click="initiateNewAscii()"> Ok </t-button>
|
||||
<t-button type="button">
|
||||
Cancel
|
||||
</t-button>
|
||||
<t-button
|
||||
type="button"
|
||||
@click="initiateNewAscii()"
|
||||
>
|
||||
Ok
|
||||
</t-button>
|
||||
</div>
|
||||
</template>
|
||||
</t-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import createNewASCII from "./../../ascii.js"
|
||||
import createNewASCII from '../../ascii';
|
||||
|
||||
export default {
|
||||
name: "NewAsciiModal",
|
||||
name: 'NewAsciiModal',
|
||||
created() {},
|
||||
data: () => ({
|
||||
forms: {
|
||||
createAscii: {
|
||||
width: 80,
|
||||
height: 30,
|
||||
title: "ascii",
|
||||
title: 'ascii',
|
||||
},
|
||||
},
|
||||
}),
|
||||
|
@ -63,23 +70,23 @@ export default {
|
|||
},
|
||||
},
|
||||
watch: {
|
||||
showNewAsciiModal(val, old) {
|
||||
this.createClick()
|
||||
showNewAsciiModal() {
|
||||
this.createClick();
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
createClick() {
|
||||
this.forms.createAscii.title = `New ASCII ${this.$store.getters.asciibirdMeta.length+1}`;
|
||||
this.$modal.show("create-ascii-modal");
|
||||
this.forms.createAscii.title = `New ASCII ${this.$store.getters.asciibirdMeta.length + 1}`;
|
||||
this.$modal.show('create-ascii-modal');
|
||||
},
|
||||
initiateNewAscii() {
|
||||
createNewASCII(this.forms);
|
||||
this.$modal.hide("create-ascii-modal");
|
||||
this.$modal.hide('create-ascii-modal');
|
||||
},
|
||||
closeNewASCII({ params, cancel }) {
|
||||
closeNewASCII() {
|
||||
this.forms.createAscii.width = 80;
|
||||
this.forms.createAscii.height = 30;
|
||||
this.forms.createAscii.title = "New ASCII";
|
||||
this.forms.createAscii.title = 'New ASCII';
|
||||
},
|
||||
|
||||
},
|
||||
|
|
|
@ -2,25 +2,37 @@
|
|||
<t-modal
|
||||
name="paste-ascii-modal"
|
||||
header="Import from Clipboard"
|
||||
:clickToClose="false"
|
||||
:escToClose="true"
|
||||
:click-to-close="false"
|
||||
:esc-to-close="true"
|
||||
>
|
||||
Title
|
||||
<t-input type="text" name="title" v-model="title" max="128" />
|
||||
<t-input
|
||||
type="text"
|
||||
name="title"
|
||||
v-model="title"
|
||||
max="128"
|
||||
/>
|
||||
|
||||
<t-textarea v-model="pasteContent" name="paste-ascii" rows="10" />
|
||||
<t-textarea
|
||||
v-model="pasteContent"
|
||||
name="paste-ascii"
|
||||
rows="10"
|
||||
/>
|
||||
|
||||
<template v-slot:footer>
|
||||
<div
|
||||
class="flex justify-between"
|
||||
>
|
||||
<t-button type="button"> Cancel </t-button>
|
||||
<t-button type="button">
|
||||
Cancel
|
||||
</t-button>
|
||||
<t-button
|
||||
type="button"
|
||||
@click="importPasteAscii()"
|
||||
:disabled="checkPasteContent"
|
||||
>Import Clipboard</t-button
|
||||
>
|
||||
Import Clipboard
|
||||
</t-button>
|
||||
</div>
|
||||
</template>
|
||||
</t-modal>
|
||||
|
@ -28,21 +40,21 @@
|
|||
|
||||
<script>
|
||||
//
|
||||
import { parseMircAscii } from "../../ascii.js";
|
||||
import { parseMircAscii } from '../../ascii';
|
||||
|
||||
export default {
|
||||
name: "PasteAsciiModal",
|
||||
name: 'PasteAsciiModal',
|
||||
created() {},
|
||||
data: () => ({
|
||||
pasteContent: "",
|
||||
title: "clipboard.txt",
|
||||
pasteContent: '',
|
||||
title: 'clipboard.txt',
|
||||
}),
|
||||
computed: {
|
||||
showPasteModal() {
|
||||
return this.$store.getters.modalState.pasteModal;
|
||||
},
|
||||
checkPasteContent() {
|
||||
return !this.pasteContent.length ? true : false;
|
||||
return !this.pasteContent.length;
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
|
@ -54,13 +66,13 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
pasteModal() {
|
||||
this.$modal.show("paste-ascii-modal")
|
||||
this.$modal.show('paste-ascii-modal');
|
||||
},
|
||||
importPasteAscii() {
|
||||
parseMircAscii(this.pasteContent, this.title);
|
||||
this.pasteContent = "";
|
||||
this.title = "clipboard.txt";
|
||||
this.$modal.hide("paste-ascii-modal");
|
||||
parseMircAscii(this.pasteContent, this.title);
|
||||
this.pasteContent = '';
|
||||
this.title = 'clipboard.txt';
|
||||
this.$modal.hide('paste-ascii-modal');
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
@ -57,17 +57,17 @@
|
|||
class="brushcanvas"
|
||||
:width="brushSizeWidthPreview + 1 * currentAscii.blockWidth"
|
||||
:height="brushSizeHeightPreview + 1 * currentAscii.blockHeight"
|
||||
></canvas>
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { emptyBlock, mircColours99 } from "./../../ascii.js";
|
||||
import { emptyBlock, mircColours99 } from '../../ascii';
|
||||
|
||||
export default {
|
||||
name: "BrushPreview",
|
||||
name: 'BrushPreview',
|
||||
mounted() {
|
||||
this.ctx = this.$refs.brushcanvas.getContext("2d");
|
||||
this.ctx = this.$refs.brushcanvas.getContext('2d');
|
||||
this.delayRedrawCanvas();
|
||||
this.brushSizeWidth = this.brushSizeWidthPreview;
|
||||
this.brushSizeHeight = this.brushSizeHeightPreview;
|
||||
|
@ -79,7 +79,7 @@ export default {
|
|||
blocks: [],
|
||||
brushSizeHeight: 1,
|
||||
brushSizeWidth: 1,
|
||||
brushSizeType: "square",
|
||||
brushSizeType: 'square',
|
||||
}),
|
||||
computed: {
|
||||
currentAscii() {
|
||||
|
@ -147,7 +147,7 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
updateBrushSize() {
|
||||
this.$store.commit("updateBrushSize", {
|
||||
this.$store.commit('updateBrushSize', {
|
||||
brushSizeHeight: this.brushSizeHeight,
|
||||
brushSizeWidth: this.brushSizeWidth,
|
||||
brushSizeType: this.brushSizeType,
|
||||
|
@ -159,8 +159,8 @@ export default {
|
|||
drawPreview() {
|
||||
this.ctx.clearRect(0, 0, 10000, 10000);
|
||||
|
||||
let brushHeight = this.brushSizeHeightPreview;
|
||||
let brushWidth = this.brushSizeWidthPreview;
|
||||
const brushHeight = this.brushSizeHeightPreview;
|
||||
const brushWidth = this.brushSizeWidthPreview;
|
||||
|
||||
this.blocks = [];
|
||||
|
||||
|
@ -170,22 +170,20 @@ export default {
|
|||
const BLOCK_HEIGHT = this.currentAscii.blockHeight;
|
||||
|
||||
// hack font for ascii shout outs 2 beenz
|
||||
this.ctx.font = "13px Hack";
|
||||
this.ctx.font = '13px Hack';
|
||||
|
||||
let y = 0;
|
||||
let x = 0;
|
||||
|
||||
let targetY = 0;
|
||||
let targetX = 0;
|
||||
|
||||
let block = {
|
||||
const block = {
|
||||
fg: this.currentFg,
|
||||
bg: this.currentBg,
|
||||
char: this.getChar,
|
||||
};
|
||||
|
||||
let middleY = Math.floor(brushHeight / 2);
|
||||
let middleX = Math.floor(brushWidth / 2);
|
||||
const middleY = Math.floor(brushHeight / 2);
|
||||
const middleX = Math.floor(brushWidth / 2);
|
||||
let yModifier = 0;
|
||||
|
||||
// Recreate 2d array for preview
|
||||
|
@ -193,7 +191,7 @@ export default {
|
|||
this.blocks[y] = [];
|
||||
for (x = 0; x < brushWidth; x++) {
|
||||
switch (this.brushSizeTypePreview) {
|
||||
case "cross":
|
||||
case 'cross':
|
||||
// If we are 1x1 force fill 1 block, to avoid an empty 1x1
|
||||
if (x === 0 && y === 0) {
|
||||
this.blocks[y][x] = { ...block };
|
||||
|
@ -209,7 +207,7 @@ export default {
|
|||
targetX = x;
|
||||
|
||||
if (y % 2 === 0) {
|
||||
targetX = targetX - 1;
|
||||
targetX -= 1;
|
||||
}
|
||||
|
||||
if (this.blocks[y] && this.blocks[y][targetX]) {
|
||||
|
@ -223,11 +221,11 @@ export default {
|
|||
break;
|
||||
|
||||
// default:
|
||||
case "square":
|
||||
case 'square':
|
||||
this.blocks[y][x] = { ...block };
|
||||
break;
|
||||
|
||||
case "circle":
|
||||
case 'circle':
|
||||
if (middleY >= y) {
|
||||
// Top half
|
||||
yModifier = y;
|
||||
|
@ -257,7 +255,7 @@ export default {
|
|||
for (y = 0; y < this.blocks.length; y++) {
|
||||
for (x = 0; x < this.blocks[0].length; x++) {
|
||||
if (this.blocks[y] && this.blocks[y][x]) {
|
||||
let curBlock = this.blocks[y][x];
|
||||
const curBlock = this.blocks[y][x];
|
||||
|
||||
if (curBlock.bg && this.isTargettingBg) {
|
||||
this.ctx.fillStyle = this.mircColours[curBlock.bg];
|
||||
|
@ -266,7 +264,7 @@ export default {
|
|||
x * BLOCK_WIDTH,
|
||||
y * BLOCK_HEIGHT,
|
||||
BLOCK_WIDTH,
|
||||
BLOCK_HEIGHT
|
||||
BLOCK_HEIGHT,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -279,7 +277,7 @@ export default {
|
|||
this.ctx.fillText(
|
||||
curBlock.char,
|
||||
x * BLOCK_WIDTH - 1,
|
||||
y * BLOCK_HEIGHT + BLOCK_HEIGHT - 3
|
||||
y * BLOCK_HEIGHT + BLOCK_HEIGHT - 3,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -287,7 +285,7 @@ export default {
|
|||
|
||||
this.ctx.stroke();
|
||||
|
||||
this.$store.commit("brushBlocks", this.blocks);
|
||||
this.$store.commit('brushBlocks', this.blocks);
|
||||
}
|
||||
},
|
||||
delayRedrawCanvas() {
|
||||
|
|
|
@ -1,27 +1,29 @@
|
|||
<template>
|
||||
<vue-draggable-resizable
|
||||
style="z-index: 5;"
|
||||
:x="100"
|
||||
:y="100"
|
||||
:w="1000"
|
||||
>
|
||||
<vue-draggable-resizable
|
||||
style="z-index: 5;"
|
||||
:x="100"
|
||||
:y="100"
|
||||
:w="1000"
|
||||
>
|
||||
<t-button
|
||||
type="button"
|
||||
v-for="(char, keyChar) in charCodes"
|
||||
:key="keyChar"
|
||||
class="border-gray-200 p-2 min-h-0"
|
||||
@click="onCharChange(char)"
|
||||
>{{ (char === " ") ? 'space' : char }}</t-button>
|
||||
</vue-draggable-resizable>
|
||||
>
|
||||
{{ (char === " ") ? 'space' : char }}
|
||||
</t-button>
|
||||
</vue-draggable-resizable>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { charCodes } from "../../ascii.js"
|
||||
import { charCodes } from '../../ascii';
|
||||
|
||||
export default {
|
||||
name: "CharPicker",
|
||||
async created() {},
|
||||
props: ["canvasX", "canvasY"],
|
||||
name: 'CharPicker',
|
||||
created() {},
|
||||
props: ['canvasX', 'canvasY'],
|
||||
computed: {
|
||||
charCodes() {
|
||||
return charCodes;
|
||||
|
@ -29,7 +31,7 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
onCharChange(char) {
|
||||
this.$store.commit("changeChar", char);
|
||||
this.$store.commit('changeChar', char);
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
@ -7,29 +7,36 @@
|
|||
:h="278"
|
||||
>
|
||||
<t-card>
|
||||
<t-button type="button" class="border-gray-200 p-1" @click="close()"
|
||||
>X</t-button
|
||||
><br />
|
||||
<t-button
|
||||
type="button"
|
||||
class="border-gray-200 p-1"
|
||||
@click="close()"
|
||||
>
|
||||
X
|
||||
</t-button><br>
|
||||
|
||||
<span v-for="(value, keyColours) in mircColours" :key="keyColours">
|
||||
<hr v-if="keyColours === 16" />
|
||||
<span
|
||||
v-for="(value, keyColours) in mircColours"
|
||||
:key="keyColours"
|
||||
>
|
||||
<hr v-if="keyColours === 16">
|
||||
|
||||
<t-button
|
||||
type="button"
|
||||
:style="`background-color: ${mircColours[keyColours]} !important;`"
|
||||
class="border-gray-200 p-3"
|
||||
@click="onColourChange(keyColours)"
|
||||
></t-button>
|
||||
/>
|
||||
</span>
|
||||
</t-card>
|
||||
</vue-draggable-resizable>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mircColours99 } from "./../../ascii.js";
|
||||
import { mircColours99 } from '../../ascii';
|
||||
|
||||
export default {
|
||||
name: "ColourPicker",
|
||||
name: 'ColourPicker',
|
||||
created() {},
|
||||
computed: {
|
||||
mircColours() {
|
||||
|
@ -41,16 +48,16 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
close() {
|
||||
this.$store.commit("changeIsUpdatingFg", false);
|
||||
this.$store.commit("changeIsUpdatingBg", false);
|
||||
this.$store.commit('changeIsUpdatingFg', false);
|
||||
this.$store.commit('changeIsUpdatingBg', false);
|
||||
},
|
||||
onColourChange(colour) {
|
||||
if (this.toolbarState.isChoosingFg) {
|
||||
this.$store.commit("changeColourFg", colour);
|
||||
this.$store.commit('changeColourFg', colour);
|
||||
}
|
||||
|
||||
if (this.toolbarState.isChoosingBg) {
|
||||
this.$store.commit("changeColourBg", colour);
|
||||
this.$store.commit('changeColourBg', colour);
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
|
@ -8,14 +8,14 @@
|
|||
@blur="close"
|
||||
@contextmenu.prevent
|
||||
>
|
||||
<slot></slot>
|
||||
<slot />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import Vue from "vue";
|
||||
import Vue from 'vue';
|
||||
|
||||
export default {
|
||||
name: "ContextMenu",
|
||||
name: 'ContextMenu',
|
||||
props: {
|
||||
display: Boolean, // prop detect if we should show context menu
|
||||
},
|
||||
|
@ -30,8 +30,8 @@ export default {
|
|||
// get position of context menu
|
||||
style() {
|
||||
return {
|
||||
top: this.top + "px",
|
||||
left: this.left + "px",
|
||||
top: `${this.top}px`,
|
||||
left: `${this.left}px`,
|
||||
};
|
||||
},
|
||||
},
|
||||
|
@ -63,4 +63,4 @@ export default {
|
|||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
|
36
src/main.js
36
src/main.js
|
@ -1,7 +1,7 @@
|
|||
import Vue from 'vue';
|
||||
import VueTailwind from 'vue-tailwind';
|
||||
import VueDraggableResizable from 'vue-draggable-resizable';
|
||||
import VueClipboard from 'vue-clipboard2'
|
||||
import VueClipboard from 'vue-clipboard2';
|
||||
|
||||
import {
|
||||
TInput,
|
||||
|
@ -25,14 +25,12 @@ import {
|
|||
// TToggle,
|
||||
// TDialog,
|
||||
} from 'vue-tailwind/dist/components';
|
||||
import Dashboard from './Dashboard.vue';
|
||||
import store from './store';
|
||||
|
||||
// optionally import default styles
|
||||
import 'vue-draggable-resizable/dist/VueDraggableResizable.css';
|
||||
import {
|
||||
library
|
||||
} from '@fortawesome/fontawesome-svg-core'
|
||||
library,
|
||||
} from '@fortawesome/fontawesome-svg-core';
|
||||
import {
|
||||
faMousePointer,
|
||||
faFont,
|
||||
|
@ -40,17 +38,19 @@ import {
|
|||
faPaintBrush,
|
||||
faEyeDropper,
|
||||
faEraser,
|
||||
faSync
|
||||
} from '@fortawesome/free-solid-svg-icons'
|
||||
faSync,
|
||||
} from '@fortawesome/free-solid-svg-icons';
|
||||
import {
|
||||
faSquare
|
||||
} from '@fortawesome/free-regular-svg-icons'
|
||||
faSquare,
|
||||
} from '@fortawesome/free-regular-svg-icons';
|
||||
import {
|
||||
FontAwesomeIcon
|
||||
} from '@fortawesome/vue-fontawesome'
|
||||
FontAwesomeIcon,
|
||||
} from '@fortawesome/vue-fontawesome';
|
||||
import store from './store';
|
||||
import Dashboard from './Dashboard.vue';
|
||||
|
||||
library.add(faMousePointer, faSquare, faFont, faFillDrip, faPaintBrush, faEyeDropper, faEraser,
|
||||
faSync)
|
||||
faSync);
|
||||
|
||||
Vue.config.productionTip = false;
|
||||
|
||||
|
@ -161,9 +161,9 @@ const settings = {
|
|||
// labelChecked: '',
|
||||
// inputWrapperChecked: '',
|
||||
// wrapperChecked: '',
|
||||
}
|
||||
},
|
||||
// Variants and fixed classes in the same `object` format ...
|
||||
}
|
||||
},
|
||||
},
|
||||
't-radio': {
|
||||
component: TRadio,
|
||||
|
@ -177,16 +177,16 @@ const settings = {
|
|||
// labelChecked: '',
|
||||
// inputWrapperChecked: '',
|
||||
// wrapperChecked: '',
|
||||
}
|
||||
},
|
||||
// Variants and fixed classes in the same `object` format ...
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
Vue.use(VueTailwind, settings);
|
||||
Vue.component('font-awesome-icon', FontAwesomeIcon)
|
||||
Vue.component('font-awesome-icon', FontAwesomeIcon);
|
||||
Vue.component('vue-draggable-resizable', VueDraggableResizable);
|
||||
Vue.use(VueClipboard)
|
||||
Vue.use(VueClipboard);
|
||||
|
||||
new Vue({
|
||||
store,
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
import Vue from 'vue';
|
||||
import Vuex, {
|
||||
Store
|
||||
} from 'vuex';
|
||||
import Vuex from 'vuex';
|
||||
import VuexPersistence from 'vuex-persist';
|
||||
import LZString from 'lz-string';
|
||||
|
||||
|
@ -16,7 +14,7 @@ export default new Vuex.Store({
|
|||
modalState: {
|
||||
newAscii: false,
|
||||
editAscii: false,
|
||||
pasteModal: false
|
||||
pasteModal: false,
|
||||
},
|
||||
// The various options of ASCIIBIRD will eventually
|
||||
// end up in its own modal I guess
|
||||
|
@ -131,7 +129,7 @@ export default new Vuex.Store({
|
|||
},
|
||||
newAsciibirdMeta(state, payload) {
|
||||
state.asciibirdMeta.push(payload);
|
||||
state.tab = state.asciibirdMeta.length - 1
|
||||
state.tab = state.asciibirdMeta.length - 1;
|
||||
},
|
||||
updateToolBarState(state, payload) {
|
||||
state.toolbarState = payload;
|
||||
|
@ -142,26 +140,26 @@ export default new Vuex.Store({
|
|||
},
|
||||
updateAsciiBlocks(state, payload, skipUndo = false) {
|
||||
if (!skipUndo) {
|
||||
state.asciibirdMeta[state.tab].history.push(state.asciibirdMeta[state.tab].blocks)
|
||||
state.asciibirdMeta[state.tab].history.push(state.asciibirdMeta[state.tab].blocks);
|
||||
}
|
||||
|
||||
state.asciibirdMeta[state.tab].blocks = LZString.compressToUTF16(JSON.stringify(payload));
|
||||
state.asciibirdMeta[state.tab].redo = [];
|
||||
},
|
||||
updateAscii(state, payload) {
|
||||
state.asciibirdMeta[state.tab] = payload
|
||||
state.asciibirdMeta[state.tab] = payload;
|
||||
},
|
||||
undoBlocks(state) {
|
||||
if (state.asciibirdMeta[state.tab].history.length > 1) {
|
||||
state.asciibirdMeta[state.tab].redo.push(state.asciibirdMeta[state.tab].blocks)
|
||||
state.asciibirdMeta[state.tab].blocks = state.asciibirdMeta[state.tab].history.pop()
|
||||
state.asciibirdMeta[state.tab].redo.push(state.asciibirdMeta[state.tab].blocks);
|
||||
state.asciibirdMeta[state.tab].blocks = state.asciibirdMeta[state.tab].history.pop();
|
||||
}
|
||||
},
|
||||
redoBlocks(state) {
|
||||
if (state.asciibirdMeta[state.tab].redo.length) {
|
||||
let next = state.asciibirdMeta[state.tab].redo.pop();
|
||||
state.asciibirdMeta[state.tab].blocks = next
|
||||
state.asciibirdMeta[state.tab].history.push(next)
|
||||
const next = state.asciibirdMeta[state.tab].redo.pop();
|
||||
state.asciibirdMeta[state.tab].blocks = next;
|
||||
state.asciibirdMeta[state.tab].history.push(next);
|
||||
}
|
||||
},
|
||||
updateBrushSize(state, payload) {
|
||||
|
@ -178,19 +176,18 @@ export default new Vuex.Store({
|
|||
openModal(state, type) {
|
||||
switch (type) {
|
||||
case 'new-ascii':
|
||||
state.modalState.newAscii = !state.modalState.newAscii
|
||||
state.modalState.newAscii = !state.modalState.newAscii;
|
||||
break;
|
||||
|
||||
case 'edit-ascii':
|
||||
state.modalState.editAscii = !state.modalState.editAscii
|
||||
state.modalState.editAscii = !state.modalState.editAscii;
|
||||
break;
|
||||
|
||||
case 'paste-modal':
|
||||
state.modalState.pasteModal = !state.modalState.pasteModal
|
||||
state.modalState.pasteModal = !state.modalState.pasteModal;
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
getters: {
|
||||
state: (state) => state,
|
||||
|
@ -206,23 +203,17 @@ export default new Vuex.Store({
|
|||
currentBg: (state) => state.toolbarState.currentColourBg,
|
||||
getChar: (state) => state.toolbarState.selectedChar,
|
||||
currentTab: (state) => state.tab,
|
||||
currentAscii: state => state.asciibirdMeta[state.tab] ?? false,
|
||||
currentAsciiBlocks: state => {
|
||||
return JSON.parse(LZString.decompressFromUTF16(state.asciibirdMeta[state.tab]
|
||||
.blocks)) || []
|
||||
},
|
||||
currentAscii: (state) => state.asciibirdMeta[state.tab] ?? false,
|
||||
currentAsciiBlocks: (state) => JSON.parse(LZString.decompressFromUTF16(state.asciibirdMeta[state.tab]
|
||||
.blocks)) || [],
|
||||
asciibirdMeta: (state) => state.asciibirdMeta,
|
||||
nextTabValue: (state) => state.asciibirdMeta.length,
|
||||
brushSizeHeight: (state) => state.toolbarState.brushSizeHeight,
|
||||
brushSizeWidth: (state) => state.toolbarState.brushSizeWidth,
|
||||
brushSizeType: (state) => state.toolbarState.brushSizeType,
|
||||
blockSizeMultiplier: (state) => state.blockSizeMultiplier,
|
||||
brushBlocks: state => {
|
||||
return JSON.parse(LZString.decompressFromUTF16(state.brushBlocks)) || []
|
||||
},
|
||||
selectBlocks: state => {
|
||||
return JSON.parse(LZString.decompressFromUTF16(state.selectBlocks)) || []
|
||||
},
|
||||
brushBlocks: (state) => JSON.parse(LZString.decompressFromUTF16(state.brushBlocks)) || [],
|
||||
selectBlocks: (state) => JSON.parse(LZString.decompressFromUTF16(state.selectBlocks)) || [],
|
||||
},
|
||||
actions: {},
|
||||
modules: {},
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
@mousemove="canvasMouseMove"
|
||||
@mousedown="canvasMouseDown"
|
||||
@mouseup="canvasMouseUp"
|
||||
></canvas>
|
||||
/>
|
||||
|
||||
<canvas
|
||||
ref="canvas"
|
||||
|
@ -36,7 +36,7 @@
|
|||
@mousemove="canvasMouseMove"
|
||||
@mousedown="canvasMouseDown"
|
||||
@mouseup="canvasMouseUp"
|
||||
></canvas>
|
||||
/>
|
||||
</vue-draggable-resizable>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -63,69 +63,66 @@ body {
|
|||
</style>
|
||||
|
||||
<script>
|
||||
import { emptyBlock, toolbarIcons, mircColours99 } from "./../ascii.js";
|
||||
import { emptyBlock, toolbarIcons, mircColours99 } from '../ascii';
|
||||
|
||||
export default {
|
||||
name: "Editor",
|
||||
name: 'Editor',
|
||||
mounted() {
|
||||
if (this.currentAsciiBlocks) {
|
||||
this.ctx = this.$refs.canvas.getContext("2d");
|
||||
this.toolCtx = this.$refs.canvastools.getContext("2d");
|
||||
this.ctx = this.$refs.canvas.getContext('2d');
|
||||
this.toolCtx = this.$refs.canvastools.getContext('2d');
|
||||
|
||||
this.canvas.width =
|
||||
this.currentAscii.width * this.currentAscii.blockWidth;
|
||||
this.canvas.height =
|
||||
this.currentAscii.height * this.currentAscii.blockHeight;
|
||||
this.canvas.width = this.currentAscii.width * this.currentAscii.blockWidth;
|
||||
this.canvas.height = this.currentAscii.height * this.currentAscii.blockHeight;
|
||||
|
||||
this.delayRedrawCanvas();
|
||||
this.$store.commit("changeTool", 0);
|
||||
this.$store.commit('changeTool', 0);
|
||||
|
||||
const _this = this;
|
||||
this._keyListener = function (e) {
|
||||
const thisIs = this;
|
||||
this.keyListener = function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
if (this.isTextEditing) {
|
||||
_this.canvasKeyDown(e.key);
|
||||
thisIs.canvasKeyDown(e.key);
|
||||
return;
|
||||
}
|
||||
|
||||
let ctrlKey = e.ctrlKey || e.metaKey;
|
||||
const ctrlKey = e.ctrlKey || e.metaKey;
|
||||
|
||||
// Ctrl Z here
|
||||
// skg - thanks for mac key suggestion, bro
|
||||
if (e.key === "z" && ctrlKey) {
|
||||
if (e.key === 'z' && ctrlKey) {
|
||||
this.undo();
|
||||
}
|
||||
|
||||
// Ctrl Y here
|
||||
if (e.key === "y" && ctrlKey) {
|
||||
if (e.key === 'y' && ctrlKey) {
|
||||
// Fk it works :\
|
||||
this.redo();
|
||||
}
|
||||
|
||||
// Ctrl C - copy blocks
|
||||
if (e.key === "c" && ctrlKey) {
|
||||
|
||||
if (e.key === 'c' && ctrlKey) {
|
||||
if (this.selectedBlocks.length) {
|
||||
this.$store.commit("selectBlocks", this.selectedBlocks);
|
||||
this.$store.commit('selectBlocks', this.selectedBlocks);
|
||||
this.selectedBlocks = [];
|
||||
}
|
||||
}
|
||||
|
||||
// Ctrl V - paste blocks
|
||||
if (e.key === "v" && ctrlKey) {
|
||||
if (e.key === 'v' && ctrlKey) {
|
||||
if (this.haveSelectBlocks) {
|
||||
this.$store.commit("brushBlocks", this.selectBlocks);
|
||||
this.$store.commit("changeTool", 4);
|
||||
this.$store.commit('brushBlocks', this.selectBlocks);
|
||||
this.$store.commit('changeTool', 4);
|
||||
}
|
||||
}
|
||||
|
||||
if (e.key === "d" && ctrlKey) {
|
||||
this.$store.commit("toggleDebugPanel", !this.debugPanelState.visible);
|
||||
if (e.key === 'd' && ctrlKey) {
|
||||
this.$store.commit('toggleDebugPanel', !this.debugPanelState.visible);
|
||||
}
|
||||
};
|
||||
|
||||
document.addEventListener("keydown", this._keyListener.bind(this));
|
||||
document.addEventListener('keydown', this.keyListener.bind(this));
|
||||
}
|
||||
},
|
||||
data: () => ({
|
||||
|
@ -163,9 +160,6 @@ export default {
|
|||
currentTool() {
|
||||
return toolbarIcons[this.$store.getters.currentTool];
|
||||
},
|
||||
mircColours() {
|
||||
return this.$store.getters.mircColours;
|
||||
},
|
||||
canFg() {
|
||||
return this.$store.getters.isTargettingFg;
|
||||
},
|
||||
|
@ -185,17 +179,17 @@ export default {
|
|||
return this.$store.getters.getChar;
|
||||
},
|
||||
isTextEditing() {
|
||||
return this.currentTool.name === "text";
|
||||
return this.currentTool.name === 'text';
|
||||
},
|
||||
isSelecting() {
|
||||
return this.currentTool.name === "select";
|
||||
return this.currentTool.name === 'select';
|
||||
},
|
||||
isSelected() {
|
||||
return (
|
||||
this.selecting.startX &&
|
||||
this.selecting.startY &&
|
||||
this.selecting.endX &&
|
||||
this.selecting.endY
|
||||
this.selecting.startX
|
||||
&& this.selecting.startY
|
||||
&& this.selecting.endX
|
||||
&& this.selecting.endY
|
||||
);
|
||||
},
|
||||
brushBlocks() {
|
||||
|
@ -219,9 +213,6 @@ export default {
|
|||
debugPanelState() {
|
||||
return this.$store.getters.debugPanel;
|
||||
},
|
||||
brushBlocks() {
|
||||
return this.$store.getters.brushBlocks;
|
||||
},
|
||||
selectBlocks() {
|
||||
return this.$store.getters.selectBlocks;
|
||||
},
|
||||
|
@ -229,11 +220,11 @@ export default {
|
|||
return this.$store.getters.options;
|
||||
},
|
||||
haveSelectBlocks() {
|
||||
return this.selectBlocks.length ? true : false;
|
||||
return !!this.selectBlocks.length;
|
||||
},
|
||||
mircColours() {
|
||||
return mircColours99;
|
||||
}
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
currentAscii(val, old) {
|
||||
|
@ -242,13 +233,11 @@ export default {
|
|||
100,
|
||||
100,
|
||||
this.currentAscii.width * this.currentAscii.blockWidth,
|
||||
this.currentAscii.height * this.currentAscii.blockHeight
|
||||
this.currentAscii.height * this.currentAscii.blockHeight,
|
||||
);
|
||||
|
||||
this.canvas.width =
|
||||
this.currentAscii.width * this.currentAscii.blockWidth;
|
||||
this.canvas.height =
|
||||
this.currentAscii.height * this.currentAscii.blockHeight;
|
||||
this.canvas.width = this.currentAscii.width * this.currentAscii.blockWidth;
|
||||
this.canvas.height = this.currentAscii.height * this.currentAscii.blockHeight;
|
||||
|
||||
this.delayRedrawCanvas();
|
||||
|
||||
|
@ -257,7 +246,7 @@ export default {
|
|||
},
|
||||
currentTool() {
|
||||
switch (this.currentTool.name) {
|
||||
case "default":
|
||||
case 'default':
|
||||
// Reset default values for tools
|
||||
this.textEditing = {
|
||||
startX: null,
|
||||
|
@ -283,11 +272,11 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
undo() {
|
||||
this.$store.commit("undoBlocks");
|
||||
this.$store.commit('undoBlocks');
|
||||
this.delayRedrawCanvas();
|
||||
},
|
||||
redo() {
|
||||
this.$store.commit("redoBlocks");
|
||||
this.$store.commit('redoBlocks');
|
||||
this.delayRedrawCanvas();
|
||||
},
|
||||
redrawSelect() {
|
||||
|
@ -299,7 +288,7 @@ export default {
|
|||
this.selecting.startX,
|
||||
this.selecting.startY,
|
||||
this.selecting.endX - this.selecting.startX,
|
||||
this.selecting.endY - this.selecting.startY
|
||||
this.selecting.endY - this.selecting.startY,
|
||||
);
|
||||
|
||||
this.toolCtx.stroke();
|
||||
|
@ -324,7 +313,7 @@ export default {
|
|||
let curBlock = {};
|
||||
|
||||
// hack font for ascii shout outs 2 beenz
|
||||
this.ctx.font = "13px Hack";
|
||||
this.ctx.font = '13px Hack';
|
||||
|
||||
for (y = 0; y < this.currentAscii.height + 1; y++) {
|
||||
canvasY = BLOCK_HEIGHT * y;
|
||||
|
@ -345,13 +334,13 @@ export default {
|
|||
if (curBlock.fg !== null) {
|
||||
this.ctx.fillStyle = this.mircColours[curBlock.fg];
|
||||
} else {
|
||||
this.ctx.fillStyle = "#000000";
|
||||
this.ctx.fillStyle = '#000000';
|
||||
}
|
||||
|
||||
this.ctx.fillText(
|
||||
curBlock.char,
|
||||
canvasX + 0.5,
|
||||
canvasY + BLOCK_HEIGHT - 3
|
||||
canvasY + BLOCK_HEIGHT - 3,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -368,7 +357,7 @@ export default {
|
|||
const oldHeight = blocks.length;
|
||||
|
||||
const canvasBlockHeight = Math.floor(
|
||||
height / this.currentAscii.blockHeight
|
||||
height / this.currentAscii.blockHeight,
|
||||
);
|
||||
const canvasBlockWidth = Math.floor(width / this.currentAscii.blockWidth);
|
||||
|
||||
|
@ -401,34 +390,33 @@ export default {
|
|||
this.canvas.width = width;
|
||||
this.canvas.height = height;
|
||||
|
||||
this.$store.commit("changeAsciiWidthHeight", {
|
||||
this.$store.commit('changeAsciiWidthHeight', {
|
||||
width: canvasBlockWidth,
|
||||
height: canvasBlockHeight,
|
||||
});
|
||||
|
||||
this.$store.commit("updateAsciiBlocks", blocks);
|
||||
this.$store.commit('updateAsciiBlocks', blocks);
|
||||
// Restructure blocks code here
|
||||
this.delayRedrawCanvas();
|
||||
},
|
||||
onCavasDragStop(x, y) {
|
||||
// Update left and top in panel
|
||||
this.$store.commit("changeAsciiCanvasState", { x, y });
|
||||
this.$store.commit('changeAsciiCanvasState', { x, y });
|
||||
},
|
||||
canvasKeyDown(char) {
|
||||
if (this.isTextEditing) {
|
||||
if (
|
||||
this.currentAsciiBlocks[this.textEditing.startY] &&
|
||||
this.currentAsciiBlocks[this.textEditing.startY][
|
||||
this.currentAsciiBlocks[this.textEditing.startY]
|
||||
&& this.currentAsciiBlocks[this.textEditing.startY][
|
||||
this.textEditing.startX
|
||||
]
|
||||
) {
|
||||
var targetBlock =
|
||||
this.currentAsciiBlocks[this.textEditing.startY][
|
||||
this.textEditing.startX
|
||||
];
|
||||
let targetBlock = this.currentAsciiBlocks[this.textEditing.startY][
|
||||
this.textEditing.startX
|
||||
];
|
||||
|
||||
switch (char) {
|
||||
case "Backspace":
|
||||
case 'Backspace':
|
||||
if (
|
||||
this.currentAsciiBlocks[this.textEditing.startY][
|
||||
this.textEditing.startX - 1
|
||||
|
@ -448,10 +436,9 @@ export default {
|
|||
targetBlock.char = char;
|
||||
|
||||
if (this.mirrorX) {
|
||||
targetBlock =
|
||||
this.currentAsciiBlocks[this.textEditing.startY][
|
||||
this.currentAscii.width - this.textEditing.startX
|
||||
];
|
||||
targetBlock = this.currentAsciiBlocks[this.textEditing.startY][
|
||||
this.currentAscii.width - this.textEditing.startX
|
||||
];
|
||||
|
||||
if (this.canFg) {
|
||||
targetBlock.fg = this.currentFg;
|
||||
|
@ -461,10 +448,9 @@ export default {
|
|||
}
|
||||
|
||||
if (this.mirrorY) {
|
||||
targetBlock =
|
||||
this.currentAsciiBlocks[
|
||||
this.currentAscii.height - this.textEditing.startY
|
||||
][this.textEditing.startX];
|
||||
targetBlock = this.currentAsciiBlocks[
|
||||
this.currentAscii.height - this.textEditing.startY
|
||||
][this.textEditing.startX];
|
||||
|
||||
if (this.canFg) {
|
||||
targetBlock.fg = this.currentFg;
|
||||
|
@ -474,10 +460,9 @@ export default {
|
|||
}
|
||||
|
||||
if (this.mirrorY && this.mirrorX) {
|
||||
targetBlock =
|
||||
this.currentAsciiBlocks[
|
||||
this.currentAscii.height - this.textEditing.startY
|
||||
][this.currentAscii.width - this.textEditing.startX];
|
||||
targetBlock = this.currentAsciiBlocks[
|
||||
this.currentAscii.height - this.textEditing.startY
|
||||
][this.currentAscii.width - this.textEditing.startX];
|
||||
|
||||
if (this.canFg) {
|
||||
targetBlock.fg = this.currentFg;
|
||||
|
@ -507,41 +492,41 @@ export default {
|
|||
this.drawTextIndicator();
|
||||
}
|
||||
this.delayRedrawCanvas();
|
||||
this.$store.commit("updateAsciiBlocks", this.currentAsciiBlocks);
|
||||
this.$store.commit('updateAsciiBlocks', this.currentAsciiBlocks);
|
||||
}
|
||||
},
|
||||
// Mouse Up, Down and Move
|
||||
canvasMouseUp() {
|
||||
if (this.currentTool.name === "default") return;
|
||||
if (this.currentTool.name === 'default') return;
|
||||
|
||||
switch (this.currentTool.name) {
|
||||
case "brush":
|
||||
case 'brush':
|
||||
this.canTool = false;
|
||||
|
||||
this.$store.commit("updateAsciiBlocks", this.currentAsciiBlocks);
|
||||
this.$store.commit('updateAsciiBlocks', this.currentAsciiBlocks);
|
||||
|
||||
break;
|
||||
|
||||
case "eraser":
|
||||
case 'eraser':
|
||||
this.canTool = false;
|
||||
|
||||
this.$store.commit("updateAsciiBlocks", this.currentAsciiBlocks);
|
||||
this.$store.commit('updateAsciiBlocks', this.currentAsciiBlocks);
|
||||
break;
|
||||
|
||||
case "fill":
|
||||
case 'fill':
|
||||
this.canTool = false;
|
||||
|
||||
this.$store.commit("updateAsciiBlocks", this.currentAsciiBlocks);
|
||||
this.$store.commit('updateAsciiBlocks', this.currentAsciiBlocks);
|
||||
break;
|
||||
|
||||
case "select":
|
||||
case 'select':
|
||||
this.selecting.canSelect = false;
|
||||
this.clearToolCanvas();
|
||||
this.processSelect();
|
||||
this.redrawSelect();
|
||||
break;
|
||||
|
||||
case "text":
|
||||
case 'text':
|
||||
this.textEditing.startX = this.x;
|
||||
this.textEditing.startY = this.y;
|
||||
break;
|
||||
|
@ -550,61 +535,61 @@ export default {
|
|||
this.delayRedrawCanvas();
|
||||
},
|
||||
canvasMouseDown() {
|
||||
if (this.currentTool.name === "default") return;
|
||||
if (this.currentTool.name === 'default') return;
|
||||
|
||||
this.toolCtx.clearRect(0, 0, 10000, 10000);
|
||||
|
||||
if (
|
||||
this.currentAsciiBlocks[this.y] &&
|
||||
this.currentAsciiBlocks[this.y][this.x] &&
|
||||
this.currentTool
|
||||
this.currentAsciiBlocks[this.y]
|
||||
&& this.currentAsciiBlocks[this.y][this.x]
|
||||
&& this.currentTool
|
||||
) {
|
||||
const targetBlock = this.currentAsciiBlocks[this.y][this.x];
|
||||
|
||||
switch (this.currentTool.name) {
|
||||
case "default":
|
||||
case 'default':
|
||||
break;
|
||||
|
||||
case "select":
|
||||
case 'select':
|
||||
this.selecting.startX = this.canvasX;
|
||||
this.selecting.startY = this.canvasY;
|
||||
this.selecting.canSelect = true;
|
||||
break;
|
||||
|
||||
case "fill":
|
||||
case 'fill':
|
||||
this.fill();
|
||||
break;
|
||||
|
||||
case "brush":
|
||||
case 'brush':
|
||||
this.canTool = true;
|
||||
this.drawBrush();
|
||||
break;
|
||||
|
||||
case "eraser":
|
||||
case 'eraser':
|
||||
this.canTool = true;
|
||||
this.eraser();
|
||||
break;
|
||||
|
||||
case "dropper":
|
||||
case 'dropper':
|
||||
if (this.canFg) {
|
||||
this.$store.commit("changeColourFg", targetBlock.fg);
|
||||
this.$store.commit('changeColourFg', targetBlock.fg);
|
||||
}
|
||||
|
||||
if (this.canBg) {
|
||||
this.$store.commit("changeColourBg", targetBlock.bg);
|
||||
this.$store.commit('changeColourBg', targetBlock.bg);
|
||||
}
|
||||
|
||||
if (this.canText) {
|
||||
this.$store.commit("changeChar", targetBlock.char);
|
||||
this.$store.commit('changeChar', targetBlock.char);
|
||||
}
|
||||
|
||||
this.$store.commit("changeTool", 0);
|
||||
this.$store.commit('changeTool', 0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
canvasMouseMove(e) {
|
||||
if (this.currentTool.name === "default") return;
|
||||
if (this.currentTool.name === 'default') return;
|
||||
|
||||
if (e.offsetX >= 0) {
|
||||
this.x = e.offsetX;
|
||||
|
@ -617,29 +602,29 @@ export default {
|
|||
this.x = Math.floor(this.x / this.currentAscii.blockWidth);
|
||||
this.y = Math.floor(this.y / this.currentAscii.blockHeight);
|
||||
|
||||
this.$emit("coordsupdate", { x: this.x, y: this.y });
|
||||
this.$emit('coordsupdate', { x: this.x, y: this.y });
|
||||
|
||||
if (
|
||||
this.currentAsciiBlocks[this.y] &&
|
||||
this.currentAsciiBlocks[this.y][this.x]
|
||||
this.currentAsciiBlocks[this.y]
|
||||
&& this.currentAsciiBlocks[this.y][this.x]
|
||||
) {
|
||||
switch (this.currentTool.name) {
|
||||
case "brush":
|
||||
case 'brush':
|
||||
if (this.isMouseOnCanvas) {
|
||||
this.drawBrush();
|
||||
}
|
||||
break;
|
||||
|
||||
case "eraser":
|
||||
case 'eraser':
|
||||
if (this.isMouseOnCanvas) {
|
||||
this.drawBrush(true);
|
||||
}
|
||||
this.eraser();
|
||||
break;
|
||||
|
||||
case "select":
|
||||
case 'select':
|
||||
// this.drawIndicator();
|
||||
|
||||
|
||||
if (this.selecting.canSelect) {
|
||||
this.selecting.endX = this.canvasX;
|
||||
this.selecting.endY = this.canvasY;
|
||||
|
@ -653,15 +638,15 @@ export default {
|
|||
|
||||
break;
|
||||
|
||||
case "text":
|
||||
case 'text':
|
||||
this.drawIndicator();
|
||||
break;
|
||||
|
||||
case "dropper":
|
||||
case 'dropper':
|
||||
this.drawIndicator();
|
||||
break;
|
||||
|
||||
case "fill":
|
||||
case 'fill':
|
||||
this.drawIndicator();
|
||||
break;
|
||||
}
|
||||
|
@ -698,9 +683,9 @@ export default {
|
|||
|
||||
for (y = 0; y < this.currentAscii.height; y++) {
|
||||
if (
|
||||
y >=
|
||||
Math.floor(this.selecting.startY / this.currentAscii.blockHeight) &&
|
||||
y <= Math.floor(this.selecting.endY / this.currentAscii.blockHeight)
|
||||
y
|
||||
>= Math.floor(this.selecting.startY / this.currentAscii.blockHeight)
|
||||
&& y <= Math.floor(this.selecting.endY / this.currentAscii.blockHeight)
|
||||
) {
|
||||
if (!this.selectedBlocks[y]) {
|
||||
this.selectedBlocks[y] = [];
|
||||
|
@ -708,12 +693,12 @@ export default {
|
|||
|
||||
for (x = 0; x < this.currentAscii.width; x++) {
|
||||
if (
|
||||
x >=
|
||||
Math.floor(
|
||||
this.selecting.startX / this.currentAscii.blockWidth
|
||||
) &&
|
||||
x <=
|
||||
Math.floor(this.selecting.endX / this.currentAscii.blockWidth)
|
||||
x
|
||||
>= Math.floor(
|
||||
this.selecting.startX / this.currentAscii.blockWidth,
|
||||
)
|
||||
&& x
|
||||
<= Math.floor(this.selecting.endX / this.currentAscii.blockWidth)
|
||||
) {
|
||||
if (this.currentAsciiBlocks[y] && this.currentAsciiBlocks[y][x]) {
|
||||
curBlock = { ...this.currentAsciiBlocks[y][x] };
|
||||
|
@ -730,7 +715,7 @@ export default {
|
|||
drawIndicator() {
|
||||
this.clearToolCanvas();
|
||||
|
||||
let targetBlock = this.currentAsciiBlocks[this.y][this.x];
|
||||
const targetBlock = this.currentAsciiBlocks[this.y][this.x];
|
||||
|
||||
let indicatorColour = targetBlock.bg === 0 ? 1 : 0;
|
||||
|
||||
|
@ -746,7 +731,7 @@ export default {
|
|||
this.x * BLOCK_WIDTH,
|
||||
this.y * BLOCK_HEIGHT,
|
||||
BLOCK_WIDTH,
|
||||
BLOCK_HEIGHT
|
||||
BLOCK_HEIGHT,
|
||||
);
|
||||
|
||||
if (this.isTextEditing) {
|
||||
|
@ -755,7 +740,7 @@ export default {
|
|||
(this.currentAscii.width - this.x) * BLOCK_WIDTH,
|
||||
this.y * BLOCK_HEIGHT,
|
||||
BLOCK_WIDTH,
|
||||
BLOCK_HEIGHT
|
||||
BLOCK_HEIGHT,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -764,7 +749,7 @@ export default {
|
|||
this.x * BLOCK_WIDTH,
|
||||
(this.currentAscii.height - this.y) * BLOCK_HEIGHT,
|
||||
BLOCK_WIDTH,
|
||||
BLOCK_HEIGHT
|
||||
BLOCK_HEIGHT,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -773,7 +758,7 @@ export default {
|
|||
(this.currentAscii.width - this.x) * BLOCK_WIDTH,
|
||||
(this.currentAscii.height - this.y) * BLOCK_HEIGHT,
|
||||
BLOCK_WIDTH,
|
||||
BLOCK_HEIGHT
|
||||
BLOCK_HEIGHT,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -783,10 +768,9 @@ export default {
|
|||
drawTextIndicator() {
|
||||
this.clearToolCanvas();
|
||||
|
||||
let targetBlock =
|
||||
this.currentAsciiBlocks[this.textEditing.startY][
|
||||
this.textEditing.startX
|
||||
];
|
||||
const targetBlock = this.currentAsciiBlocks[this.textEditing.startY][
|
||||
this.textEditing.startX
|
||||
];
|
||||
|
||||
let indicatorColour = targetBlock.bg === 0 ? 1 : 0;
|
||||
|
||||
|
@ -802,7 +786,7 @@ export default {
|
|||
this.textEditing.startX * BLOCK_WIDTH,
|
||||
this.textEditing.startY * BLOCK_HEIGHT,
|
||||
BLOCK_WIDTH,
|
||||
BLOCK_HEIGHT
|
||||
BLOCK_HEIGHT,
|
||||
);
|
||||
|
||||
if (this.mirrorX) {
|
||||
|
@ -810,7 +794,7 @@ export default {
|
|||
(this.currentAscii.width - this.textEditing.startX) * BLOCK_WIDTH,
|
||||
this.textEditing.startY * BLOCK_HEIGHT,
|
||||
BLOCK_WIDTH,
|
||||
BLOCK_HEIGHT
|
||||
BLOCK_HEIGHT,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -819,7 +803,7 @@ export default {
|
|||
this.textEditing.startX * BLOCK_WIDTH,
|
||||
(this.currentAscii.height - this.textEditing.startY) * BLOCK_HEIGHT,
|
||||
BLOCK_WIDTH,
|
||||
BLOCK_HEIGHT
|
||||
BLOCK_HEIGHT,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -828,7 +812,7 @@ export default {
|
|||
(this.currentAscii.width - this.textEditing.startX) * BLOCK_WIDTH,
|
||||
(this.currentAscii.height - this.textEditing.startY) * BLOCK_HEIGHT,
|
||||
BLOCK_WIDTH,
|
||||
BLOCK_HEIGHT
|
||||
BLOCK_HEIGHT,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -848,8 +832,8 @@ export default {
|
|||
let brushDiffX = 0;
|
||||
let xLength = 0;
|
||||
|
||||
let asciiWidth = this.currentAscii.width;
|
||||
let asciiHeight = this.currentAscii.height;
|
||||
const asciiWidth = this.currentAscii.width;
|
||||
const asciiHeight = this.currentAscii.height;
|
||||
|
||||
// If the first row isn't selected then we cannot get the width
|
||||
// with the 0 index
|
||||
|
@ -862,7 +846,7 @@ export default {
|
|||
}
|
||||
|
||||
// We always have a Y array
|
||||
let brushDiffY = Math.floor(this.brushBlocks.length / 2) * BLOCK_HEIGHT;
|
||||
const brushDiffY = Math.floor(this.brushBlocks.length / 2) * BLOCK_HEIGHT;
|
||||
|
||||
for (let y = 0; y < this.brushBlocks.length; y++) {
|
||||
if (!this.brushBlocks[y]) {
|
||||
|
@ -874,32 +858,31 @@ export default {
|
|||
continue;
|
||||
}
|
||||
|
||||
let brushBlock = this.brushBlocks[y][x];
|
||||
const brushBlock = this.brushBlocks[y][x];
|
||||
|
||||
let brushX = this.x * BLOCK_WIDTH + x * BLOCK_WIDTH - brushDiffX;
|
||||
let brushY = this.y * BLOCK_HEIGHT + y * BLOCK_HEIGHT - brushDiffY;
|
||||
const brushX = this.x * BLOCK_WIDTH + x * BLOCK_WIDTH - brushDiffX;
|
||||
const brushY = this.y * BLOCK_HEIGHT + y * BLOCK_HEIGHT - brushDiffY;
|
||||
|
||||
let arrayY = brushY / BLOCK_HEIGHT;
|
||||
let arrayX = brushX / BLOCK_WIDTH;
|
||||
const arrayY = brushY / BLOCK_HEIGHT;
|
||||
const arrayX = brushX / BLOCK_WIDTH;
|
||||
|
||||
if (
|
||||
this.currentAsciiBlocks[arrayY] &&
|
||||
this.currentAsciiBlocks[arrayY][arrayX]
|
||||
this.currentAsciiBlocks[arrayY]
|
||||
&& this.currentAsciiBlocks[arrayY][arrayX]
|
||||
) {
|
||||
targetBlock = this.currentAsciiBlocks[arrayY][arrayX];
|
||||
|
||||
if (!plain) {
|
||||
if (this.canBg) {
|
||||
this.toolCtx.fillStyle =
|
||||
brushBlock.bg !== null
|
||||
? this.mircColours[brushBlock.bg]
|
||||
: "#FFFFFF";
|
||||
this.toolCtx.fillStyle = brushBlock.bg !== null
|
||||
? this.mircColours[brushBlock.bg]
|
||||
: '#FFFFFF';
|
||||
|
||||
this.toolCtx.fillRect(
|
||||
brushX,
|
||||
brushY,
|
||||
BLOCK_WIDTH,
|
||||
BLOCK_HEIGHT
|
||||
BLOCK_HEIGHT,
|
||||
);
|
||||
|
||||
if (this.mirrorX) {
|
||||
|
@ -907,7 +890,7 @@ export default {
|
|||
(asciiWidth - arrayX) * BLOCK_WIDTH,
|
||||
brushY,
|
||||
BLOCK_WIDTH,
|
||||
BLOCK_HEIGHT
|
||||
BLOCK_HEIGHT,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -916,7 +899,7 @@ export default {
|
|||
brushX,
|
||||
(asciiHeight - arrayY) * BLOCK_HEIGHT,
|
||||
BLOCK_WIDTH,
|
||||
BLOCK_HEIGHT
|
||||
BLOCK_HEIGHT,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -925,7 +908,7 @@ export default {
|
|||
(asciiWidth - arrayX) * BLOCK_WIDTH,
|
||||
(asciiHeight - arrayY) * BLOCK_HEIGHT,
|
||||
BLOCK_WIDTH,
|
||||
BLOCK_HEIGHT
|
||||
BLOCK_HEIGHT,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -935,17 +918,15 @@ export default {
|
|||
: brushBlock.bg;
|
||||
|
||||
if (this.mirrorX) {
|
||||
this.currentAsciiBlocks[arrayY][asciiWidth - arrayX].bg =
|
||||
!this.haveSelectBlocks
|
||||
? this.currentBg
|
||||
: brushBlock.bg;
|
||||
this.currentAsciiBlocks[arrayY][asciiWidth - arrayX].bg = !this.haveSelectBlocks
|
||||
? this.currentBg
|
||||
: brushBlock.bg;
|
||||
}
|
||||
|
||||
if (this.mirrorY) {
|
||||
this.currentAsciiBlocks[asciiHeight - arrayY][arrayX].bg =
|
||||
!this.haveSelectBlocks
|
||||
? this.currentBg
|
||||
: brushBlock.bg;
|
||||
this.currentAsciiBlocks[asciiHeight - arrayY][arrayX].bg = !this.haveSelectBlocks
|
||||
? this.currentBg
|
||||
: brushBlock.bg;
|
||||
}
|
||||
|
||||
if (this.mirrorY && this.mirrorX) {
|
||||
|
@ -959,10 +940,9 @@ export default {
|
|||
}
|
||||
|
||||
if (this.canFg) {
|
||||
this.toolCtx.fillStyle =
|
||||
brushBlock.fg !== null
|
||||
? this.mircColours[brushBlock.fg]
|
||||
: "#000000";
|
||||
this.toolCtx.fillStyle = brushBlock.fg !== null
|
||||
? this.mircColours[brushBlock.fg]
|
||||
: '#000000';
|
||||
|
||||
if (this.canTool && brushBlock.fg !== null) {
|
||||
targetBlock.fg = !this.haveSelectBlocks
|
||||
|
@ -970,17 +950,15 @@ export default {
|
|||
: brushBlock.fg;
|
||||
|
||||
if (this.mirrorX) {
|
||||
this.currentAsciiBlocks[arrayY][asciiWidth - arrayX].fg =
|
||||
!this.haveSelectBlocks
|
||||
? this.currentFg
|
||||
: brushBlock.fg;
|
||||
this.currentAsciiBlocks[arrayY][asciiWidth - arrayX].fg = !this.haveSelectBlocks
|
||||
? this.currentFg
|
||||
: brushBlock.fg;
|
||||
}
|
||||
|
||||
if (this.mirrorY) {
|
||||
this.currentAsciiBlocks[asciiHeight - arrayY][arrayX].fg =
|
||||
!this.haveSelectBlocks
|
||||
? this.currentFg
|
||||
: brushBlock.fg;
|
||||
this.currentAsciiBlocks[asciiHeight - arrayY][arrayX].fg = !this.haveSelectBlocks
|
||||
? this.currentFg
|
||||
: brushBlock.fg;
|
||||
}
|
||||
|
||||
if (this.mirrorY && this.mirrorX) {
|
||||
|
@ -999,14 +977,14 @@ export default {
|
|||
this.toolCtx.fillText(
|
||||
brushBlock.char,
|
||||
brushX - 1,
|
||||
brushY + BLOCK_HEIGHT - 2
|
||||
brushY + BLOCK_HEIGHT - 2,
|
||||
);
|
||||
|
||||
if (this.mirrorX) {
|
||||
this.toolCtx.fillText(
|
||||
brushBlock.char,
|
||||
(asciiWidth - arrayX) * BLOCK_WIDTH,
|
||||
brushY + BLOCK_HEIGHT - 2
|
||||
brushY + BLOCK_HEIGHT - 2,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -1014,14 +992,14 @@ export default {
|
|||
this.toolCtx.fillText(
|
||||
brushBlock.char,
|
||||
brushX - 1,
|
||||
(asciiHeight - arrayY) * BLOCK_HEIGHT + 10
|
||||
(asciiHeight - arrayY) * BLOCK_HEIGHT + 10,
|
||||
);
|
||||
}
|
||||
if (this.mirrorY && this.mirrorX) {
|
||||
this.toolCtx.fillText(
|
||||
brushBlock.char,
|
||||
(asciiWidth - arrayX) * BLOCK_WIDTH,
|
||||
(asciiHeight - arrayY) * BLOCK_HEIGHT + 10
|
||||
(asciiHeight - arrayY) * BLOCK_HEIGHT + 10,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -1031,17 +1009,15 @@ export default {
|
|||
: brushBlock.char;
|
||||
|
||||
if (this.mirrorX) {
|
||||
this.currentAsciiBlocks[arrayY][asciiWidth - arrayX].char =
|
||||
!this.haveSelectBlocks
|
||||
? this.currentChar
|
||||
: brushBlock.char;
|
||||
this.currentAsciiBlocks[arrayY][asciiWidth - arrayX].char = !this.haveSelectBlocks
|
||||
? this.currentChar
|
||||
: brushBlock.char;
|
||||
}
|
||||
|
||||
if (this.mirrorY) {
|
||||
this.currentAsciiBlocks[asciiHeight - arrayY][arrayX].char =
|
||||
!this.haveSelectBlocks
|
||||
? this.currentChar
|
||||
: brushBlock.char;
|
||||
this.currentAsciiBlocks[asciiHeight - arrayY][arrayX].char = !this.haveSelectBlocks
|
||||
? this.currentChar
|
||||
: brushBlock.char;
|
||||
}
|
||||
|
||||
if (this.mirrorY && this.mirrorX) {
|
||||
|
@ -1069,7 +1045,7 @@ export default {
|
|||
(asciiWidth - arrayX) * BLOCK_WIDTH,
|
||||
brushY,
|
||||
BLOCK_WIDTH,
|
||||
BLOCK_HEIGHT
|
||||
BLOCK_HEIGHT,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -1078,7 +1054,7 @@ export default {
|
|||
brushX,
|
||||
(asciiHeight - arrayY) * BLOCK_HEIGHT,
|
||||
BLOCK_WIDTH,
|
||||
BLOCK_HEIGHT
|
||||
BLOCK_HEIGHT,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -1087,7 +1063,7 @@ export default {
|
|||
(asciiWidth - arrayX) * BLOCK_WIDTH,
|
||||
(asciiHeight - arrayY) * BLOCK_HEIGHT,
|
||||
BLOCK_WIDTH,
|
||||
BLOCK_HEIGHT
|
||||
BLOCK_HEIGHT,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -1104,21 +1080,20 @@ export default {
|
|||
|
||||
let targetBlock = this.currentAsciiBlocks[this.y][this.x];
|
||||
|
||||
let brushDiffX =
|
||||
Math.floor(this.brushBlocks[0].length / 2) * BLOCK_WIDTH;
|
||||
let brushDiffY = Math.floor(this.brushBlocks.length / 2) * BLOCK_HEIGHT;
|
||||
const brushDiffX = Math.floor(this.brushBlocks[0].length / 2) * BLOCK_WIDTH;
|
||||
const brushDiffY = Math.floor(this.brushBlocks.length / 2) * BLOCK_HEIGHT;
|
||||
|
||||
for (let y = 0; y < this.brushBlocks.length; y++) {
|
||||
for (let x = 0; x < this.brushBlocks[0].length; x++) {
|
||||
let brushX = this.x * BLOCK_WIDTH + x * BLOCK_WIDTH - brushDiffX;
|
||||
let brushY = this.y * BLOCK_HEIGHT + y * BLOCK_HEIGHT - brushDiffY;
|
||||
const brushX = this.x * BLOCK_WIDTH + x * BLOCK_WIDTH - brushDiffX;
|
||||
const brushY = this.y * BLOCK_HEIGHT + y * BLOCK_HEIGHT - brushDiffY;
|
||||
|
||||
let arrayY = brushY / BLOCK_HEIGHT;
|
||||
let arrayX = brushX / BLOCK_WIDTH;
|
||||
const arrayY = brushY / BLOCK_HEIGHT;
|
||||
const arrayX = brushX / BLOCK_WIDTH;
|
||||
|
||||
if (
|
||||
this.currentAsciiBlocks[arrayY] &&
|
||||
this.currentAsciiBlocks[arrayY][arrayX]
|
||||
this.currentAsciiBlocks[arrayY]
|
||||
&& this.currentAsciiBlocks[arrayY][arrayX]
|
||||
) {
|
||||
targetBlock = this.currentAsciiBlocks[arrayY][arrayX];
|
||||
|
||||
|
@ -1137,15 +1112,14 @@ export default {
|
|||
|
||||
if (this.mirrorX) {
|
||||
if (
|
||||
this.currentAsciiBlocks[arrayY] &&
|
||||
this.currentAsciiBlocks[arrayY][
|
||||
this.currentAsciiBlocks[arrayY]
|
||||
&& this.currentAsciiBlocks[arrayY][
|
||||
this.currentAscii.width - arrayX
|
||||
]
|
||||
) {
|
||||
targetBlock =
|
||||
this.currentAsciiBlocks[arrayY][
|
||||
this.currentAscii.width - arrayX
|
||||
];
|
||||
targetBlock = this.currentAsciiBlocks[arrayY][
|
||||
this.currentAscii.width - arrayX
|
||||
];
|
||||
|
||||
if (this.canFg) {
|
||||
targetBlock.fg = null;
|
||||
|
@ -1163,15 +1137,14 @@ export default {
|
|||
|
||||
if (this.mirrorY) {
|
||||
if (
|
||||
this.currentAsciiBlocks[this.currentAscii.height - arrayY] &&
|
||||
this.currentAsciiBlocks[this.currentAscii.height - arrayY][
|
||||
this.currentAsciiBlocks[this.currentAscii.height - arrayY]
|
||||
&& this.currentAsciiBlocks[this.currentAscii.height - arrayY][
|
||||
arrayX
|
||||
]
|
||||
) {
|
||||
targetBlock =
|
||||
this.currentAsciiBlocks[this.currentAscii.height - arrayY][
|
||||
arrayX
|
||||
];
|
||||
targetBlock = this.currentAsciiBlocks[this.currentAscii.height - arrayY][
|
||||
arrayX
|
||||
];
|
||||
|
||||
if (this.canFg) {
|
||||
targetBlock.fg = null;
|
||||
|
@ -1189,15 +1162,14 @@ export default {
|
|||
|
||||
if (this.mirrorY && this.mirrorX) {
|
||||
if (
|
||||
this.currentAsciiBlocks[this.currentAscii.height - arrayY] &&
|
||||
this.currentAsciiBlocks[this.currentAscii.height - arrayY][
|
||||
this.currentAsciiBlocks[this.currentAscii.height - arrayY]
|
||||
&& this.currentAsciiBlocks[this.currentAscii.height - arrayY][
|
||||
this.currentAscii.width - arrayX
|
||||
]
|
||||
) {
|
||||
targetBlock =
|
||||
this.currentAsciiBlocks[this.currentAscii.height - arrayY][
|
||||
this.currentAscii.width - arrayX
|
||||
];
|
||||
targetBlock = this.currentAsciiBlocks[this.currentAscii.height - arrayY][
|
||||
this.currentAscii.width - arrayX
|
||||
];
|
||||
|
||||
if (this.canFg) {
|
||||
targetBlock.fg = null;
|
||||
|
|
334
yarn.lock
334
yarn.lock
|
@ -1087,6 +1087,11 @@
|
|||
resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz#e486d0d97396d79beedd0a6e33f4534ff6b4973e"
|
||||
integrity sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA==
|
||||
|
||||
"@types/parse-json@^4.0.0":
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0"
|
||||
integrity sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==
|
||||
|
||||
"@types/q@^1.5.1":
|
||||
version "1.5.4"
|
||||
resolved "https://registry.yarnpkg.com/@types/q/-/q-1.5.4.tgz#15925414e0ad2cd765bfef58842f7e26a7accb24"
|
||||
|
@ -1757,6 +1762,14 @@ anymatch@~3.1.1:
|
|||
normalize-path "^3.0.0"
|
||||
picomatch "^2.0.4"
|
||||
|
||||
anymatch@~3.1.2:
|
||||
version "3.1.2"
|
||||
resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716"
|
||||
integrity sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==
|
||||
dependencies:
|
||||
normalize-path "^3.0.0"
|
||||
picomatch "^2.0.4"
|
||||
|
||||
aproba@^1.1.1:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a"
|
||||
|
@ -1767,6 +1780,11 @@ arch@^2.1.1:
|
|||
resolved "https://registry.yarnpkg.com/arch/-/arch-2.2.0.tgz#1bc47818f305764f23ab3306b0bfc086c5a29d11"
|
||||
integrity sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ==
|
||||
|
||||
arg@^5.0.0:
|
||||
version "5.0.0"
|
||||
resolved "https://registry.yarnpkg.com/arg/-/arg-5.0.0.tgz#a20e2bb5710e82950a516b3f933fee5ed478be90"
|
||||
integrity sha512-4P8Zm2H+BRS+c/xX1LrHw0qKpEhdlZjLCgWy+d78T9vqa2Z2SiD2wMrYuWIAFy5IZUD7nnNXroRttz+0RzlrzQ==
|
||||
|
||||
argparse@^1.0.7:
|
||||
version "1.0.10"
|
||||
resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911"
|
||||
|
@ -2432,6 +2450,14 @@ chalk@^4.0.0, chalk@^4.1.0:
|
|||
ansi-styles "^4.1.0"
|
||||
supports-color "^7.1.0"
|
||||
|
||||
chalk@^4.1.1:
|
||||
version "4.1.2"
|
||||
resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01"
|
||||
integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==
|
||||
dependencies:
|
||||
ansi-styles "^4.1.0"
|
||||
supports-color "^7.1.0"
|
||||
|
||||
chardet@^0.7.0:
|
||||
version "0.7.0"
|
||||
resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e"
|
||||
|
@ -2476,6 +2502,21 @@ chokidar@^2.1.8:
|
|||
optionalDependencies:
|
||||
fsevents "^1.2.7"
|
||||
|
||||
chokidar@^3.5.2:
|
||||
version "3.5.2"
|
||||
resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.2.tgz#dba3976fcadb016f66fd365021d91600d01c1e75"
|
||||
integrity sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==
|
||||
dependencies:
|
||||
anymatch "~3.1.2"
|
||||
braces "~3.0.2"
|
||||
glob-parent "~5.1.2"
|
||||
is-binary-path "~2.1.0"
|
||||
is-glob "~4.0.1"
|
||||
normalize-path "~3.0.0"
|
||||
readdirp "~3.6.0"
|
||||
optionalDependencies:
|
||||
fsevents "~2.3.2"
|
||||
|
||||
chownr@^1.1.1, chownr@^1.1.2:
|
||||
version "1.1.4"
|
||||
resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b"
|
||||
|
@ -2639,7 +2680,7 @@ collection-visit@^1.0.0:
|
|||
map-visit "^1.0.0"
|
||||
object-visit "^1.0.0"
|
||||
|
||||
color-convert@^1.9.0, color-convert@^1.9.1:
|
||||
color-convert@^1.9.0, color-convert@^1.9.1, color-convert@^1.9.3:
|
||||
version "1.9.3"
|
||||
resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8"
|
||||
integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==
|
||||
|
@ -2671,6 +2712,14 @@ color-string@^1.5.4:
|
|||
color-name "^1.0.0"
|
||||
simple-swizzle "^0.2.2"
|
||||
|
||||
color-string@^1.6.0:
|
||||
version "1.6.0"
|
||||
resolved "https://registry.yarnpkg.com/color-string/-/color-string-1.6.0.tgz#c3915f61fe267672cb7e1e064c9d692219f6c312"
|
||||
integrity sha512-c/hGS+kRWJutUBEngKKmk4iH3sD59MBkoxVapS/0wgpCz2u7XsNloxknyvBhzwEs1IbV36D9PwqLPJ2DTu3vMA==
|
||||
dependencies:
|
||||
color-name "^1.0.0"
|
||||
simple-swizzle "^0.2.2"
|
||||
|
||||
color@^3.0.0, color@^3.1.3:
|
||||
version "3.1.3"
|
||||
resolved "https://registry.yarnpkg.com/color/-/color-3.1.3.tgz#ca67fb4e7b97d611dcde39eceed422067d91596e"
|
||||
|
@ -2679,11 +2728,24 @@ color@^3.0.0, color@^3.1.3:
|
|||
color-convert "^1.9.1"
|
||||
color-string "^1.5.4"
|
||||
|
||||
color@^3.2.0:
|
||||
version "3.2.1"
|
||||
resolved "https://registry.yarnpkg.com/color/-/color-3.2.1.tgz#3544dc198caf4490c3ecc9a790b54fe9ff45e164"
|
||||
integrity sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA==
|
||||
dependencies:
|
||||
color-convert "^1.9.3"
|
||||
color-string "^1.6.0"
|
||||
|
||||
colorette@^1.2.1:
|
||||
version "1.2.1"
|
||||
resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.2.1.tgz#4d0b921325c14faf92633086a536db6e89564b1b"
|
||||
integrity sha512-puCDz0CzydiSYOrnXpz/PKd69zRrribezjtE9yd4zvytoRc8+RY/KJPvtPFKZS3E3wP6neGyMe0vOTlHO5L3Pw==
|
||||
|
||||
colorette@^1.2.2:
|
||||
version "1.2.2"
|
||||
resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.2.2.tgz#cbcc79d5e99caea2dbf10eb3a26fd8b3e6acfa94"
|
||||
integrity sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w==
|
||||
|
||||
combined-stream@^1.0.6, combined-stream@~1.0.6:
|
||||
version "1.0.8"
|
||||
resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f"
|
||||
|
@ -2880,6 +2942,17 @@ cosmiconfig@^5.0.0, cosmiconfig@^5.2.1:
|
|||
js-yaml "^3.13.1"
|
||||
parse-json "^4.0.0"
|
||||
|
||||
cosmiconfig@^7.0.0:
|
||||
version "7.0.0"
|
||||
resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-7.0.0.tgz#ef9b44d773959cae63ddecd122de23853b60f8d3"
|
||||
integrity sha512-pondGvTuVYDk++upghXJabWzL6Kxu6f26ljFw64Swq9v6sQPUL3EUlVDV56diOjpCayKihL6hVe8exIACU4XcA==
|
||||
dependencies:
|
||||
"@types/parse-json" "^4.0.0"
|
||||
import-fresh "^3.2.1"
|
||||
parse-json "^5.0.0"
|
||||
path-type "^4.0.0"
|
||||
yaml "^1.10.0"
|
||||
|
||||
create-ecdh@^4.0.0:
|
||||
version "4.0.4"
|
||||
resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.4.tgz#d6e7f4bffa66736085a0762fd3a632684dabcc4e"
|
||||
|
@ -3340,6 +3413,11 @@ didyoumean@^1.2.1:
|
|||
resolved "https://registry.yarnpkg.com/didyoumean/-/didyoumean-1.2.1.tgz#e92edfdada6537d484d73c0172fd1eba0c4976ff"
|
||||
integrity sha1-6S7f2tplN9SE1zwBcv0eugxJdv8=
|
||||
|
||||
didyoumean@^1.2.2:
|
||||
version "1.2.2"
|
||||
resolved "https://registry.yarnpkg.com/didyoumean/-/didyoumean-1.2.2.tgz#989346ffe9e839b4555ecf5666edea0d3e8ad037"
|
||||
integrity sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==
|
||||
|
||||
diffie-hellman@^5.0.0:
|
||||
version "5.0.3"
|
||||
resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875"
|
||||
|
@ -3363,6 +3441,11 @@ dir-glob@^3.0.1:
|
|||
dependencies:
|
||||
path-type "^4.0.0"
|
||||
|
||||
dlv@^1.1.3:
|
||||
version "1.1.3"
|
||||
resolved "https://registry.yarnpkg.com/dlv/-/dlv-1.1.3.tgz#5c198a8a11453596e751494d49874bc7732f2e79"
|
||||
integrity sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==
|
||||
|
||||
dns-equal@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/dns-equal/-/dns-equal-1.0.0.tgz#b39e7f1da6eb0a75ba9c17324b34753c47e0654d"
|
||||
|
@ -4086,6 +4169,17 @@ fast-glob@^3.0.3:
|
|||
micromatch "^4.0.2"
|
||||
picomatch "^2.2.1"
|
||||
|
||||
fast-glob@^3.2.7:
|
||||
version "3.2.7"
|
||||
resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.7.tgz#fd6cb7a2d7e9aa7a7846111e85a196d6b2f766a1"
|
||||
integrity sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q==
|
||||
dependencies:
|
||||
"@nodelib/fs.stat" "^2.0.2"
|
||||
"@nodelib/fs.walk" "^1.2.3"
|
||||
glob-parent "^5.1.2"
|
||||
merge2 "^1.3.0"
|
||||
micromatch "^4.0.4"
|
||||
|
||||
fast-json-stable-stringify@^2.0.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633"
|
||||
|
@ -4337,6 +4431,15 @@ from2@^2.1.0:
|
|||
inherits "^2.0.1"
|
||||
readable-stream "^2.0.0"
|
||||
|
||||
fs-extra@^10.0.0:
|
||||
version "10.0.0"
|
||||
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-10.0.0.tgz#9ff61b655dde53fb34a82df84bb214ce802e17c1"
|
||||
integrity sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ==
|
||||
dependencies:
|
||||
graceful-fs "^4.2.0"
|
||||
jsonfile "^6.0.1"
|
||||
universalify "^2.0.0"
|
||||
|
||||
fs-extra@^7.0.1:
|
||||
version "7.0.1"
|
||||
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9"
|
||||
|
@ -4391,6 +4494,11 @@ fsevents@~2.1.2:
|
|||
resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.3.tgz#fb738703ae8d2f9fe900c33836ddebee8b97f23e"
|
||||
integrity sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==
|
||||
|
||||
fsevents@~2.3.2:
|
||||
version "2.3.2"
|
||||
resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a"
|
||||
integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==
|
||||
|
||||
function-bind@^1.1.1:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d"
|
||||
|
@ -4471,6 +4579,20 @@ glob-parent@^5.0.0, glob-parent@^5.1.0, glob-parent@~5.1.0:
|
|||
dependencies:
|
||||
is-glob "^4.0.1"
|
||||
|
||||
glob-parent@^5.1.2, glob-parent@~5.1.2:
|
||||
version "5.1.2"
|
||||
resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4"
|
||||
integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==
|
||||
dependencies:
|
||||
is-glob "^4.0.1"
|
||||
|
||||
glob-parent@^6.0.0:
|
||||
version "6.0.1"
|
||||
resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.1.tgz#42054f685eb6a44e7a7d189a96efa40a54971aa7"
|
||||
integrity sha512-kEVjS71mQazDBHKcsq4E9u/vUzaLcw1A8EtUeydawvIWQCJM0qQ08G1H7/XTjFUulla6XQiDOG6MXSaG0HDKog==
|
||||
dependencies:
|
||||
is-glob "^4.0.1"
|
||||
|
||||
glob-to-regexp@^0.3.0:
|
||||
version "0.3.0"
|
||||
resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab"
|
||||
|
@ -4914,6 +5036,13 @@ import-cwd@^2.0.0:
|
|||
dependencies:
|
||||
import-from "^2.1.0"
|
||||
|
||||
import-cwd@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/import-cwd/-/import-cwd-3.0.0.tgz#20845547718015126ea9b3676b7592fb8bd4cf92"
|
||||
integrity sha512-4pnzH16plW+hgvRECbDWpQl3cqtvSofHWh44met7ESfZ8UZOWWddm8hEyDTqREJ9RbYHY8gi8DqmaelApoOGMg==
|
||||
dependencies:
|
||||
import-from "^3.0.0"
|
||||
|
||||
import-fresh@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-2.0.0.tgz#d81355c15612d386c61f9ddd3922d4304822a546"
|
||||
|
@ -4930,6 +5059,14 @@ import-fresh@^3.0.0:
|
|||
parent-module "^1.0.0"
|
||||
resolve-from "^4.0.0"
|
||||
|
||||
import-fresh@^3.2.1:
|
||||
version "3.3.0"
|
||||
resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b"
|
||||
integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==
|
||||
dependencies:
|
||||
parent-module "^1.0.0"
|
||||
resolve-from "^4.0.0"
|
||||
|
||||
import-from@^2.1.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/import-from/-/import-from-2.1.0.tgz#335db7f2a7affd53aaa471d4b8021dee36b7f3b1"
|
||||
|
@ -4937,6 +5074,13 @@ import-from@^2.1.0:
|
|||
dependencies:
|
||||
resolve-from "^3.0.0"
|
||||
|
||||
import-from@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/import-from/-/import-from-3.0.0.tgz#055cfec38cd5a27d8057ca51376d7d3bf0891966"
|
||||
integrity sha512-CiuXOFFSzkU5x/CR0+z7T91Iht4CXgfCxVOFRhh2Zyhg5wOpWvvDLQUsWl+gcN+QscYBjez8hDCt85O7RLDttQ==
|
||||
dependencies:
|
||||
resolve-from "^5.0.0"
|
||||
|
||||
import-local@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/import-local/-/import-local-2.0.0.tgz#55070be38a5993cf18ef6db7e961f5bee5c5a09d"
|
||||
|
@ -5131,6 +5275,13 @@ is-core-module@^2.1.0:
|
|||
dependencies:
|
||||
has "^1.0.3"
|
||||
|
||||
is-core-module@^2.2.0:
|
||||
version "2.5.0"
|
||||
resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.5.0.tgz#f754843617c70bfd29b7bd87327400cda5c18491"
|
||||
integrity sha512-TXCMSDsEHMEEZ6eCA8rwRDbLu55MRGmrctljsBX/2v1d9/GzqHOxW5c5oPSgrUt2vBFXebu9rGqckXGPWOlYpg==
|
||||
dependencies:
|
||||
has "^1.0.3"
|
||||
|
||||
is-data-descriptor@^0.1.4:
|
||||
version "0.1.4"
|
||||
resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56"
|
||||
|
@ -5581,6 +5732,11 @@ levn@^0.3.0, levn@~0.3.0:
|
|||
prelude-ls "~1.1.2"
|
||||
type-check "~0.3.2"
|
||||
|
||||
lilconfig@^2.0.3:
|
||||
version "2.0.3"
|
||||
resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-2.0.3.tgz#68f3005e921dafbd2a2afb48379986aa6d2579fd"
|
||||
integrity sha512-EHKqr/+ZvdKCifpNrJCKxBTgk5XupZA3y/aCPY9mxfgBzmgh93Mt/WqjjQ38oMxXuvDokaKiM3lAgvSH2sjtHg==
|
||||
|
||||
lines-and-columns@^1.1.6:
|
||||
version "1.1.6"
|
||||
resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00"
|
||||
|
@ -5789,6 +5945,11 @@ lodash.toarray@^4.4.0:
|
|||
resolved "https://registry.yarnpkg.com/lodash.toarray/-/lodash.toarray-4.4.0.tgz#24c4bfcd6b2fba38bfd0594db1179d8e9b656561"
|
||||
integrity sha1-JMS/zWsvuji/0FlNsRedjptlZWE=
|
||||
|
||||
lodash.topath@^4.5.2:
|
||||
version "4.5.2"
|
||||
resolved "https://registry.yarnpkg.com/lodash.topath/-/lodash.topath-4.5.2.tgz#3616351f3bba61994a0931989660bd03254fd009"
|
||||
integrity sha1-NhY1Hzu6YZlKCTGYlmC9AyVP0Ak=
|
||||
|
||||
lodash.transform@^4.6.0:
|
||||
version "4.6.0"
|
||||
resolved "https://registry.yarnpkg.com/lodash.transform/-/lodash.transform-4.6.0.tgz#12306422f63324aed8483d3f38332b5f670547a0"
|
||||
|
@ -5804,6 +5965,11 @@ lodash@^4.17.11, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17
|
|||
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52"
|
||||
integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==
|
||||
|
||||
lodash@^4.17.21:
|
||||
version "4.17.21"
|
||||
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
|
||||
integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==
|
||||
|
||||
log-symbols@^1.0.2:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-1.0.2.tgz#376ff7b58ea3086a0f09facc74617eca501e1a18"
|
||||
|
@ -5990,6 +6156,14 @@ micromatch@^4.0.2:
|
|||
braces "^3.0.1"
|
||||
picomatch "^2.0.5"
|
||||
|
||||
micromatch@^4.0.4:
|
||||
version "4.0.4"
|
||||
resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.4.tgz#896d519dfe9db25fce94ceb7a500919bf881ebf9"
|
||||
integrity sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==
|
||||
dependencies:
|
||||
braces "^3.0.1"
|
||||
picomatch "^2.2.3"
|
||||
|
||||
miller-rabin@^4.0.0:
|
||||
version "4.0.1"
|
||||
resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d"
|
||||
|
@ -6131,6 +6305,11 @@ modern-normalize@^1.0.0:
|
|||
resolved "https://registry.yarnpkg.com/modern-normalize/-/modern-normalize-1.0.0.tgz#539d84a1e141338b01b346f3e27396d0ed17601e"
|
||||
integrity sha512-1lM+BMLGuDfsdwf3rsgBSrxJwAZHFIrQ8YR61xIqdHo0uNKI9M52wNpHSrliZATJp51On6JD0AfRxd4YGSU0lw==
|
||||
|
||||
modern-normalize@^1.1.0:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/modern-normalize/-/modern-normalize-1.1.0.tgz#da8e80140d9221426bd4f725c6e11283d34f90b7"
|
||||
integrity sha512-2lMlY1Yc1+CUy0gw4H95uNN7vjbpoED7NNRSBHE25nWfLBdmMzFCsPshlzbxHz+gYMcBEUN8V4pU16prcdPSgA==
|
||||
|
||||
move-concurrently@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/move-concurrently/-/move-concurrently-1.0.1.tgz#be2c005fda32e0b29af1f05d7c4b33214c701f92"
|
||||
|
@ -6200,6 +6379,11 @@ nanoid@^3.1.20:
|
|||
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.20.tgz#badc263c6b1dcf14b71efaa85f6ab4c1d6cfc788"
|
||||
integrity sha512-a1cQNyczgKbLX9jwbS/+d7W8fX/RfgYR7lVWwWOGIPNgK2m0MWvrGF6/m4kk6U3QcFMnZf3RIhL0v2Jgh/0Uxw==
|
||||
|
||||
nanoid@^3.1.23:
|
||||
version "3.1.23"
|
||||
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.23.tgz#f744086ce7c2bc47ee0a8472574d5c78e4183a81"
|
||||
integrity sha512-FiB0kzdP0FFVGDKlRLEQ1BgDzU87dy5NnzjeW9YZNt+/c3+q82EQDUwniSAUxp/F0gFNI1ZhKU1FqYsMuqZVnw==
|
||||
|
||||
nanomatch@^1.2.9:
|
||||
version "1.2.13"
|
||||
resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119"
|
||||
|
@ -6413,6 +6597,11 @@ object-hash@^2.0.3:
|
|||
resolved "https://registry.yarnpkg.com/object-hash/-/object-hash-2.0.3.tgz#d12db044e03cd2ca3d77c0570d87225b02e1e6ea"
|
||||
integrity sha512-JPKn0GMu+Fa3zt3Bmr66JhokJU5BaNBIh4ZeTlaCBzrBsOeXzwcKKAK1tbLiPKgvwmPXsDvvLHoWh5Bm7ofIYg==
|
||||
|
||||
object-hash@^2.2.0:
|
||||
version "2.2.0"
|
||||
resolved "https://registry.yarnpkg.com/object-hash/-/object-hash-2.2.0.tgz#5ad518581eefc443bd763472b8ff2e9c2c0d54a5"
|
||||
integrity sha512-gScRMn0bS5fH+IuwyIFgnh9zBdo4DV+6GhygmWM9HyNJSgS0hScp1f5vjtm7oIIOiT9trXrShAkLFSc2IqKNgw==
|
||||
|
||||
object-inspect@^1.8.0:
|
||||
version "1.9.0"
|
||||
resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.9.0.tgz#c90521d74e1127b67266ded3394ad6116986533a"
|
||||
|
@ -6844,6 +7033,11 @@ picomatch@^2.0.4, picomatch@^2.0.5, picomatch@^2.2.1:
|
|||
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad"
|
||||
integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==
|
||||
|
||||
picomatch@^2.2.3:
|
||||
version "2.3.0"
|
||||
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.0.tgz#f1f061de8f6a4bf022892e2d128234fb98302972"
|
||||
integrity sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==
|
||||
|
||||
pify@^2.0.0:
|
||||
version "2.3.0"
|
||||
resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c"
|
||||
|
@ -7001,6 +7195,14 @@ postcss-js@^2:
|
|||
camelcase-css "^2.0.1"
|
||||
postcss "^7.0.18"
|
||||
|
||||
postcss-js@^3.0.3:
|
||||
version "3.0.3"
|
||||
resolved "https://registry.yarnpkg.com/postcss-js/-/postcss-js-3.0.3.tgz#2f0bd370a2e8599d45439f6970403b5873abda33"
|
||||
integrity sha512-gWnoWQXKFw65Hk/mi2+WTQTHdPD5UJdDXZmX073EY/B3BWnYjO4F4t0VneTCnCGQ5E5GsCdMkzPaTXwl3r5dJw==
|
||||
dependencies:
|
||||
camelcase-css "^2.0.1"
|
||||
postcss "^8.1.6"
|
||||
|
||||
postcss-load-config@^2.0.0:
|
||||
version "2.1.2"
|
||||
resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-2.1.2.tgz#c5ea504f2c4aef33c7359a34de3573772ad7502a"
|
||||
|
@ -7009,6 +7211,15 @@ postcss-load-config@^2.0.0:
|
|||
cosmiconfig "^5.0.0"
|
||||
import-cwd "^2.0.0"
|
||||
|
||||
postcss-load-config@^3.1.0:
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-3.1.0.tgz#d39c47091c4aec37f50272373a6a648ef5e97829"
|
||||
integrity sha512-ipM8Ds01ZUophjDTQYSVP70slFSYg3T0/zyfII5vzhN6V57YSxMgG5syXuwi5VtS8wSf3iL30v0uBdoIVx4Q0g==
|
||||
dependencies:
|
||||
import-cwd "^3.0.0"
|
||||
lilconfig "^2.0.3"
|
||||
yaml "^1.10.2"
|
||||
|
||||
postcss-loader@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/postcss-loader/-/postcss-loader-3.0.0.tgz#6b97943e47c72d845fa9e03f273773d4e8dd6c2d"
|
||||
|
@ -7114,6 +7325,13 @@ postcss-modules-values@^3.0.0:
|
|||
icss-utils "^4.0.0"
|
||||
postcss "^7.0.6"
|
||||
|
||||
postcss-nested@5.0.5:
|
||||
version "5.0.5"
|
||||
resolved "https://registry.yarnpkg.com/postcss-nested/-/postcss-nested-5.0.5.tgz#f0a107d33a9fab11d7637205f5321e27223e3603"
|
||||
integrity sha512-GSRXYz5bccobpTzLQZXOnSOfKl6TwVr5CyAQJUPub4nuRJSOECK5AqurxVgmtxP48p0Kc/ndY/YyS1yqldX0Ew==
|
||||
dependencies:
|
||||
postcss-selector-parser "^6.0.4"
|
||||
|
||||
postcss-nested@^4:
|
||||
version "4.2.3"
|
||||
resolved "https://registry.yarnpkg.com/postcss-nested/-/postcss-nested-4.2.3.tgz#c6f255b0a720549776d220d00c4b70cd244136f6"
|
||||
|
@ -7251,6 +7469,14 @@ postcss-selector-parser@^6.0.0, postcss-selector-parser@^6.0.2, postcss-selector
|
|||
uniq "^1.0.1"
|
||||
util-deprecate "^1.0.2"
|
||||
|
||||
postcss-selector-parser@^6.0.6:
|
||||
version "6.0.6"
|
||||
resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.6.tgz#2c5bba8174ac2f6981ab631a42ab0ee54af332ea"
|
||||
integrity sha512-9LXrvaaX3+mcv5xkg5kFwqSzSH1JIObIx51PrndZwlmznwXRfxMddDvo9gve3gVR8ZTKgoFDdWkbRFmEhT4PMg==
|
||||
dependencies:
|
||||
cssesc "^3.0.0"
|
||||
util-deprecate "^1.0.2"
|
||||
|
||||
postcss-svgo@^4.0.2:
|
||||
version "4.0.2"
|
||||
resolved "https://registry.yarnpkg.com/postcss-svgo/-/postcss-svgo-4.0.2.tgz#17b997bc711b333bab143aaed3b8d3d6e3d38258"
|
||||
|
@ -7298,6 +7524,15 @@ postcss@^7, postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.14, postcss@^7.0.18, po
|
|||
source-map "^0.6.1"
|
||||
supports-color "^6.1.0"
|
||||
|
||||
postcss@^8.1.6:
|
||||
version "8.3.6"
|
||||
resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.3.6.tgz#2730dd76a97969f37f53b9a6096197be311cc4ea"
|
||||
integrity sha512-wG1cc/JhRgdqB6WHEuyLTedf3KIRuD0hG6ldkFEZNCjRxiC+3i6kkWUUbiJQayP28iwG35cEmAbe98585BYV0A==
|
||||
dependencies:
|
||||
colorette "^1.2.2"
|
||||
nanoid "^3.1.23"
|
||||
source-map-js "^0.6.2"
|
||||
|
||||
postcss@^8.2.1:
|
||||
version "8.2.1"
|
||||
resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.2.1.tgz#eabc5557c4558059b9d9e5b15bce7ffa9089c2a8"
|
||||
|
@ -7440,6 +7675,16 @@ purgecss@^3.1.3:
|
|||
postcss "^8.2.1"
|
||||
postcss-selector-parser "^6.0.2"
|
||||
|
||||
purgecss@^4.0.3:
|
||||
version "4.0.3"
|
||||
resolved "https://registry.yarnpkg.com/purgecss/-/purgecss-4.0.3.tgz#8147b429f9c09db719e05d64908ea8b672913742"
|
||||
integrity sha512-PYOIn5ibRIP34PBU9zohUcCI09c7drPJJtTDAc0Q6QlRz2/CHQ8ywGLdE7ZhxU2VTqB7p5wkvj5Qcm05Rz3Jmw==
|
||||
dependencies:
|
||||
commander "^6.0.0"
|
||||
glob "^7.0.0"
|
||||
postcss "^8.2.1"
|
||||
postcss-selector-parser "^6.0.2"
|
||||
|
||||
q@^1.1.2:
|
||||
version "1.5.1"
|
||||
resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7"
|
||||
|
@ -7478,6 +7723,11 @@ querystringify@^2.1.1:
|
|||
resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.2.0.tgz#3345941b4153cb9d082d8eee4cda2016a9aef7f6"
|
||||
integrity sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==
|
||||
|
||||
quick-lru@^5.1.1:
|
||||
version "5.1.1"
|
||||
resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-5.1.1.tgz#366493e6b3e42a3a6885e2e99d18f80fb7a8c932"
|
||||
integrity sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==
|
||||
|
||||
randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5, randombytes@^2.1.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a"
|
||||
|
@ -7573,6 +7823,13 @@ readdirp@~3.5.0:
|
|||
dependencies:
|
||||
picomatch "^2.2.1"
|
||||
|
||||
readdirp@~3.6.0:
|
||||
version "3.6.0"
|
||||
resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7"
|
||||
integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==
|
||||
dependencies:
|
||||
picomatch "^2.2.1"
|
||||
|
||||
reduce-css-calc@^2.1.6:
|
||||
version "2.1.7"
|
||||
resolved "https://registry.yarnpkg.com/reduce-css-calc/-/reduce-css-calc-2.1.7.tgz#1ace2e02c286d78abcd01fd92bfe8097ab0602c2"
|
||||
|
@ -7581,6 +7838,14 @@ reduce-css-calc@^2.1.6:
|
|||
css-unit-converter "^1.1.1"
|
||||
postcss-value-parser "^3.3.0"
|
||||
|
||||
reduce-css-calc@^2.1.8:
|
||||
version "2.1.8"
|
||||
resolved "https://registry.yarnpkg.com/reduce-css-calc/-/reduce-css-calc-2.1.8.tgz#7ef8761a28d614980dc0c982f772c93f7a99de03"
|
||||
integrity sha512-8liAVezDmUcH+tdzoEGrhfbGcP7nOV4NkGE3a74+qqvE7nt9i4sKLGBuZNOnpI4WiGksiNPklZxva80061QiPg==
|
||||
dependencies:
|
||||
css-unit-converter "^1.1.1"
|
||||
postcss-value-parser "^3.3.0"
|
||||
|
||||
regenerate-unicode-properties@^8.2.0:
|
||||
version "8.2.0"
|
||||
resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-8.2.0.tgz#e5de7111d655e7ba60c057dbe9ff37c87e65cdec"
|
||||
|
@ -7739,6 +8004,11 @@ resolve-from@^4.0.0:
|
|||
resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6"
|
||||
integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==
|
||||
|
||||
resolve-from@^5.0.0:
|
||||
version "5.0.0"
|
||||
resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69"
|
||||
integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==
|
||||
|
||||
resolve-url@^0.2.1:
|
||||
version "0.2.1"
|
||||
resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a"
|
||||
|
@ -7752,6 +8022,14 @@ resolve@^1.10.0, resolve@^1.12.0, resolve@^1.13.1, resolve@^1.17.0, resolve@^1.1
|
|||
is-core-module "^2.1.0"
|
||||
path-parse "^1.0.6"
|
||||
|
||||
resolve@^1.20.0:
|
||||
version "1.20.0"
|
||||
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.20.0.tgz#629a013fb3f70755d6f0b7935cc1c2c5378b1975"
|
||||
integrity sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==
|
||||
dependencies:
|
||||
is-core-module "^2.2.0"
|
||||
path-parse "^1.0.6"
|
||||
|
||||
restore-cursor@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf"
|
||||
|
@ -8173,6 +8451,11 @@ source-list-map@^2.0.0:
|
|||
resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.1.tgz#3993bd873bfc48479cca9ea3a547835c7c154b34"
|
||||
integrity sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==
|
||||
|
||||
source-map-js@^0.6.2:
|
||||
version "0.6.2"
|
||||
resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-0.6.2.tgz#0bb5de631b41cfbda6cfba8bd05a80efdfd2385e"
|
||||
integrity sha512-/3GptzWzu0+0MBQFrDKzw/DvvMTUORvgY6k6jd/VS6iCR4RDTKWH6v6WPwQoUO8667uQEf9Oe38DxAYWY5F/Ug==
|
||||
|
||||
source-map-resolve@^0.5.0:
|
||||
version "0.5.3"
|
||||
resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.3.tgz#190866bece7553e1f8f267a2ee82c606b5509a1a"
|
||||
|
@ -8569,6 +8852,43 @@ table@^5.2.3:
|
|||
slice-ansi "^2.1.0"
|
||||
string-width "^3.0.0"
|
||||
|
||||
tailwindcss@^2.2.7:
|
||||
version "2.2.7"
|
||||
resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-2.2.7.tgz#795d07a14ef46c2dc4a1610f7f906f697daaf731"
|
||||
integrity sha512-jv35rugP5j8PpzbXnsria7ZAry7Evh0KtQ4MZqNd+PhF+oIKPwJTVwe/rmfRx9cZw3W7iPZyzBmeoAoNwfJ1yg==
|
||||
dependencies:
|
||||
arg "^5.0.0"
|
||||
bytes "^3.0.0"
|
||||
chalk "^4.1.1"
|
||||
chokidar "^3.5.2"
|
||||
color "^3.2.0"
|
||||
cosmiconfig "^7.0.0"
|
||||
detective "^5.2.0"
|
||||
didyoumean "^1.2.2"
|
||||
dlv "^1.1.3"
|
||||
fast-glob "^3.2.7"
|
||||
fs-extra "^10.0.0"
|
||||
glob-parent "^6.0.0"
|
||||
html-tags "^3.1.0"
|
||||
is-glob "^4.0.1"
|
||||
lodash "^4.17.21"
|
||||
lodash.topath "^4.5.2"
|
||||
modern-normalize "^1.1.0"
|
||||
node-emoji "^1.8.1"
|
||||
normalize-path "^3.0.0"
|
||||
object-hash "^2.2.0"
|
||||
postcss-js "^3.0.3"
|
||||
postcss-load-config "^3.1.0"
|
||||
postcss-nested "5.0.5"
|
||||
postcss-selector-parser "^6.0.6"
|
||||
postcss-value-parser "^4.1.0"
|
||||
pretty-hrtime "^1.0.3"
|
||||
purgecss "^4.0.3"
|
||||
quick-lru "^5.1.1"
|
||||
reduce-css-calc "^2.1.8"
|
||||
resolve "^1.20.0"
|
||||
tmp "^0.2.1"
|
||||
|
||||
"tailwindcss@npm:@tailwindcss/postcss7-compat":
|
||||
version "2.0.2"
|
||||
resolved "https://registry.yarnpkg.com/@tailwindcss/postcss7-compat/-/postcss7-compat-2.0.2.tgz#49cb21703dfb4447620fceab5cef3285cff8c69d"
|
||||
|
@ -8716,6 +9036,13 @@ tmp@^0.0.33:
|
|||
dependencies:
|
||||
os-tmpdir "~1.0.2"
|
||||
|
||||
tmp@^0.2.1:
|
||||
version "0.2.1"
|
||||
resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.2.1.tgz#8457fc3037dcf4719c251367a1af6500ee1ccf14"
|
||||
integrity sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==
|
||||
dependencies:
|
||||
rimraf "^3.0.0"
|
||||
|
||||
to-arraybuffer@^1.0.0:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43"
|
||||
|
@ -9483,6 +9810,11 @@ yallist@^4.0.0:
|
|||
resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72"
|
||||
integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==
|
||||
|
||||
yaml@^1.10.0, yaml@^1.10.2:
|
||||
version "1.10.2"
|
||||
resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b"
|
||||
integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==
|
||||
|
||||
yargs-parser@^13.1.2:
|
||||
version "13.1.2"
|
||||
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.2.tgz#130f09702ebaeef2650d54ce6e3e5706f7a4fb38"
|
||||
|
|
Loading…
Reference in New Issue