diff --git a/bad/.editorconfig b/bad/.editorconfig deleted file mode 100644 index 007463b..0000000 --- a/bad/.editorconfig +++ /dev/null @@ -1,12 +0,0 @@ -root = true - -[*] -indent_size = 2 -indent_style = space -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -[*.md] -trim_trailing_whitespace = false diff --git a/bad/.eslintignore b/bad/.eslintignore deleted file mode 100644 index de4d1f0..0000000 --- a/bad/.eslintignore +++ /dev/null @@ -1,2 +0,0 @@ -dist -node_modules diff --git a/bad/.eslintrc b/bad/.eslintrc deleted file mode 100644 index 9e17846..0000000 --- a/bad/.eslintrc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "root": true, - "extends": ["@nuxt/eslint-config"] -} diff --git a/bad/.gitignore b/bad/.gitignore deleted file mode 100644 index e6d4c90..0000000 --- a/bad/.gitignore +++ /dev/null @@ -1,56 +0,0 @@ -# Dependencies -node_modules - -# Logs -*.log* - -# Temp directories -.temp -.tmp -.cache - -# Yarn -**/.yarn/cache -**/.yarn/*state* - -# Generated dirs -dist - -# Nuxt -.nuxt -.output -.vercel_build_output -.build-* -.env -.netlify - -# Env -.env - -# Testing -reports -coverage -*.lcov -.nyc_output - -# VSCode -.vscode/* -!.vscode/settings.json -!.vscode/tasks.json -!.vscode/launch.json -!.vscode/extensions.json -!.vscode/*.code-snippets - -# Intellij idea -*.iml -.idea - -# OSX -.DS_Store -.AppleDouble -.LSOverride -.AppleDB -.AppleDesktop -Network Trash Folder -Temporary Items -.apdisk diff --git a/bad/.npmrc b/bad/.npmrc deleted file mode 100644 index cf04042..0000000 --- a/bad/.npmrc +++ /dev/null @@ -1,2 +0,0 @@ -shamefully-hoist=true -strict-peer-dependencies=false diff --git a/bad/.nuxtrc b/bad/.nuxtrc deleted file mode 100644 index f033419..0000000 --- a/bad/.nuxtrc +++ /dev/null @@ -1,2 +0,0 @@ -imports.autoImport=false -typescript.includeWorkspace=true diff --git a/bad/package.json b/bad/package.json deleted file mode 100644 index 96f15c0..0000000 --- a/bad/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "name": "dragon-editor", - "version": "2.0.0", - "description": "DragonEditor is Javascript WYSIWYG editor.", - "private": false, - "type": "module", - "exports": { - ".": { - "types": "./dist/types.d.ts", - "import": "./dist/module.mjs", - "require": "./dist/module.cjs" - } - }, - "main": "./dist/module.cjs", - "types": "./dist/types.d.ts", - "files": [ - "dist" - ], - "dependencies": { - "@nuxt/kit": "^3.5.0" - }, - "devDependencies": { - "@types/node": "^18", - "@nuxt/eslint-config": "^0.1.1", - "@nuxt/module-builder": "^0.3.1", - "@nuxt/schema": "^3.5.0", - "@nuxt/test-utils": "^3.5.0", - "changelogen": "^0.5.3", - "eslint": "^8.40.0", - "nuxt": "^3.5.0", - "vitest": "^0.31.0" - }, - "scripts": { - "prepack": "nuxt-module-build", - "dev": "nuxi dev playground", - "dev:build": "nuxi build playground", - "dev:prepare": "nuxt-module-build --stub && nuxi prepare playground", - "release": "npm run lint && npm run test && npm run prepack && changelogen --release && npm publish && git push --follow-tags", - "lint": "eslint .", - "test": "vitest run", - "test:watch": "vitest watch" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/lovefields/dragonEditor.git" - }, - "keywords": [ - "editor", - "wysiwyg-editor", - "korean", - "language" - ], - "author": "Lovefields (https://dico.me)", - "license": "MIT", - "bugs": { - "url": "https://github.com/lovefields/dragonEditor/issues" - }, - "homepage": "https://github.com/lovefields/dragonEditor#readme" -} diff --git a/bad/playground/app.vue b/bad/playground/app.vue deleted file mode 100644 index 58db5ce..0000000 --- a/bad/playground/app.vue +++ /dev/null @@ -1,8 +0,0 @@ - - - diff --git a/bad/playground/nuxt.config.ts b/bad/playground/nuxt.config.ts deleted file mode 100644 index 0c23be1..0000000 --- a/bad/playground/nuxt.config.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default defineNuxtConfig({ - modules: ['../src/module'], -}) diff --git a/bad/playground/package.json b/bad/playground/package.json deleted file mode 100644 index c5d5485..0000000 --- a/bad/playground/package.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "private": true, - "name": "my-module-playground" -} diff --git a/bad/src/module.ts b/bad/src/module.ts deleted file mode 100644 index 44e499a..0000000 --- a/bad/src/module.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { defineNuxtModule, addComponent, createResolver } from '@nuxt/kit' - -// Module options TypeScript interface definition -export interface ModuleOptions { } - -export default defineNuxtModule({ - meta: { - name: 'DragonEditor', - }, - setup(options, nuxt) { - const resolver = createResolver(import.meta.url) - - // Do not add the extension since the `.ts` will be transpiled to `.mjs` after `npm run prepack` - addComponent({ - name: 'DragonEditor', - filePath: resolver.resolve('runtime/components/DragonEditor.vue') - }) - - addComponent({ - name: 'DragonEditorViewer', - filePath: resolver.resolve('runtime/components/DragonEditorViewer.vue') - }) - } -}) diff --git a/bad/src/runtime/components/DragonEditor.vue b/bad/src/runtime/components/DragonEditor.vue deleted file mode 100644 index 41a40c8..0000000 --- a/bad/src/runtime/components/DragonEditor.vue +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/bad/src/runtime/components/DragonEditorViewer.vue b/bad/src/runtime/components/DragonEditorViewer.vue deleted file mode 100644 index 41a40c8..0000000 --- a/bad/src/runtime/components/DragonEditorViewer.vue +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/bad/test/basic.test.js b/bad/test/basic.test.js deleted file mode 100644 index 66bc02c..0000000 --- a/bad/test/basic.test.js +++ /dev/null @@ -1,65 +0,0 @@ -"use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -Object.defineProperty(exports, "__esModule", { value: true }); -var vitest_1 = require("vitest"); -var node_url_1 = require("node:url"); -var test_utils_1 = require("@nuxt/test-utils"); -(0, vitest_1.describe)('ssr', function () { return __awaiter(void 0, void 0, void 0, function () { - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, (0, test_utils_1.setup)({ - rootDir: (0, node_url_1.fileURLToPath)(new URL('./fixtures/basic', import.meta.url)), - })]; - case 1: - _a.sent(); - (0, vitest_1.it)('renders the index page', function () { return __awaiter(void 0, void 0, void 0, function () { - var html; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, (0, test_utils_1.$fetch)('/')]; - case 1: - html = _a.sent(); - (0, vitest_1.expect)(html).toContain('
basic
'); - return [2 /*return*/]; - } - }); - }); }); - return [2 /*return*/]; - } - }); -}); }); diff --git a/bad/test/basic.test.ts b/bad/test/basic.test.ts deleted file mode 100644 index c4735db..0000000 --- a/bad/test/basic.test.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { describe, it, expect } from 'vitest' -import { fileURLToPath } from 'node:url' -import { setup, $fetch } from '@nuxt/test-utils' - -describe('ssr', async () => { - await setup({ - rootDir: fileURLToPath(new URL('./fixtures/basic', import.meta.url)), - }) - - it('renders the index page', async () => { - // Get response to a server-rendered page with `$fetch`. - const html = await $fetch('/') - expect(html).toContain('
basic
') - }) -}) diff --git a/bad/test/fixtures/basic/app.vue b/bad/test/fixtures/basic/app.vue deleted file mode 100644 index 29a9c81..0000000 --- a/bad/test/fixtures/basic/app.vue +++ /dev/null @@ -1,6 +0,0 @@ - - - diff --git a/bad/test/fixtures/basic/nuxt.config.js b/bad/test/fixtures/basic/nuxt.config.js deleted file mode 100644 index 72be10e..0000000 --- a/bad/test/fixtures/basic/nuxt.config.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var module_1 = require("../../../src/module"); -exports.default = defineNuxtConfig({ - modules: [ - module_1.default - ] -}); diff --git a/bad/test/fixtures/basic/nuxt.config.ts b/bad/test/fixtures/basic/nuxt.config.ts deleted file mode 100644 index 1bc2f7c..0000000 --- a/bad/test/fixtures/basic/nuxt.config.ts +++ /dev/null @@ -1,7 +0,0 @@ -import MyModule from '../../../src/module' - -export default defineNuxtConfig({ - modules: [ - MyModule - ] -}) diff --git a/bad/test/fixtures/basic/package.json b/bad/test/fixtures/basic/package.json deleted file mode 100644 index decd433..0000000 --- a/bad/test/fixtures/basic/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "private": true, - "name": "basic", - "type": "module" -} diff --git a/bad/tsconfig.json b/bad/tsconfig.json deleted file mode 100644 index 9dd826f..0000000 --- a/bad/tsconfig.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "./playground/.nuxt/tsconfig.json" -} diff --git a/old/examples/assets/css/base.css b/old/examples/assets/css/base.css deleted file mode 100644 index ddabb83..0000000 --- a/old/examples/assets/css/base.css +++ /dev/null @@ -1,19 +0,0 @@ -body,h1,h2,h3,h4,h5,h6,p,blockquote,pre,dl,dd,ol,ul,fieldset,legend,figure,menu{margin:0;padding:0;border:0} -table,th,td{border-spacing:0;border-collapse:collapse} -ol,ul,li{list-style:none} -h1,h2,h3,h4,h5,h6{font-size:1em;font-weight:normal} -body,input,textarea,keygen,select,button{font:normal 12px/1.2 'Open Sans','Noto Sans',sans-serif} -input,textarea,select,button{margin:0;padding:0;border-radius:0;color:#333;outline:0;vertical-align:middle;-webkit-appearance:none} -a:link,a:visited,a:hover,a:active{text-decoration:none} -a,button,input[type='submit'],input[type='button'],input[type='reset']{border:0;background:transparent;cursor:pointer;-webkit-appearance:none} -img{border:0;vertical-align:top} - -.wrap{padding-top:100px} -.editor-dragon, -.editor-dragon-viewer{max-width:800px;margin:0 auto;font-size:14px} - -.copyright{position:fixed;bottom:5px;right:10px;text-align:right} - -@media all and (max-width: 800px) { - .wrap{padding-top:0} -} \ No newline at end of file diff --git a/old/examples/editor01.html b/old/examples/editor01.html deleted file mode 100644 index 9cf5ba4..0000000 --- a/old/examples/editor01.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - Dragon Editor - - - - - - - - \ No newline at end of file diff --git a/old/examples/editor02.html b/old/examples/editor02.html deleted file mode 100644 index 288b2dd..0000000 --- a/old/examples/editor02.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - Dragon Editor - - - - - - - - \ No newline at end of file diff --git a/old/examples/index.html b/old/examples/index.html deleted file mode 100644 index 814d70b..0000000 --- a/old/examples/index.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - Dragon Editor Demo - - - - - \ No newline at end of file diff --git a/old/examples/viewer.html b/old/examples/viewer.html deleted file mode 100644 index c3b2317..0000000 --- a/old/examples/viewer.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - - - - - - - - Dragon Editor - viewer - - -
-
- -
- - - - diff --git a/old/lib/module.js b/old/lib/module.js deleted file mode 100644 index e69de29..0000000 diff --git a/old/package-lock.json b/old/package-lock.json deleted file mode 100644 index b5f4f9e..0000000 --- a/old/package-lock.json +++ /dev/null @@ -1,2291 +0,0 @@ -{ - "name": "dragon-editor", - "version": "2.0.0", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "dragon-editor", - "version": "2.0.0", - "license": "MPL 2.0", - "dependencies": { - "tslint": "^6.1.3", - "typescript": "^5.0.4" - }, - "devDependencies": { - "css-loader": "^6.5.1", - "mini-css-extract-plugin": "^2.4.4", - "sass": "^1.43.4", - "sass-loader": "^12.3.0", - "terser-webpack-plugin": "^5.2.5", - "webpack": "^5.64.0", - "webpack-cli": "^4.9.1", - "webpack-fix-style-only-entries": "^0.6.1" - } - }, - "node_modules/@babel/code-frame": { - "version": "7.21.4", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.21.4.tgz", - "integrity": "sha512-LYvhNKfwWSPpocw8GI7gpK2nq3HSDuEPC/uSYaALSJu9xjsalaaYFOq0Pwt5KmVqwEbZlDu81aLXwBOmD/Fv9g==", - "dependencies": { - "@babel/highlight": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.19.1", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz", - "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/highlight": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", - "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", - "dependencies": { - "@babel/helper-validator-identifier": "^7.18.6", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@discoveryjs/json-ext": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", - "integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==", - "dev": true, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", - "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", - "dev": true, - "dependencies": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", - "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", - "dev": true, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/set-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", - "dev": true, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/source-map": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.3.tgz", - "integrity": "sha512-b+fsZXeLYi9fEULmfBrhxn4IrPlINf8fiNarzTof004v3lFdntdwa9PF7vFJqm3mg7s+ScJMxXaE3Acp1irZcg==", - "dev": true, - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.0", - "@jridgewell/trace-mapping": "^0.3.9" - } - }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.14", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", - "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", - "dev": true - }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.18", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz", - "integrity": "sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==", - "dev": true, - "dependencies": { - "@jridgewell/resolve-uri": "3.1.0", - "@jridgewell/sourcemap-codec": "1.4.14" - } - }, - "node_modules/@types/eslint": { - "version": "8.37.0", - "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.37.0.tgz", - "integrity": "sha512-Piet7dG2JBuDIfohBngQ3rCt7MgO9xCO4xIMKxBThCq5PNRB91IjlJ10eJVwfoNtvTErmxLzwBZ7rHZtbOMmFQ==", - "dev": true, - "dependencies": { - "@types/estree": "*", - "@types/json-schema": "*" - } - }, - "node_modules/@types/eslint-scope": { - "version": "3.7.4", - "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.4.tgz", - "integrity": "sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA==", - "dev": true, - "dependencies": { - "@types/eslint": "*", - "@types/estree": "*" - } - }, - "node_modules/@types/estree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.1.tgz", - "integrity": "sha512-LG4opVs2ANWZ1TJoKc937iMmNstM/d0ae1vNbnBvBhqCSezgVUOzcLCqbI5elV8Vy6WKwKjaqR+zO9VKirBBCA==", - "dev": true - }, - "node_modules/@types/json-schema": { - "version": "7.0.11", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", - "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", - "dev": true - }, - "node_modules/@types/node": { - "version": "20.2.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.2.1.tgz", - "integrity": "sha512-DqJociPbZP1lbZ5SQPk4oag6W7AyaGMO6gSfRwq3PWl4PXTwJpRQJhDq4W0kzrg3w6tJ1SwlvGZ5uKFHY13LIg==", - "dev": true - }, - "node_modules/@webassemblyjs/ast": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.6.tgz", - "integrity": "sha512-IN1xI7PwOvLPgjcf180gC1bqn3q/QaOCwYUahIOhbYUu8KA/3tw2RT/T0Gidi1l7Hhj5D/INhJxiICObqpMu4Q==", - "dev": true, - "dependencies": { - "@webassemblyjs/helper-numbers": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6" - } - }, - "node_modules/@webassemblyjs/floating-point-hex-parser": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz", - "integrity": "sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==", - "dev": true - }, - "node_modules/@webassemblyjs/helper-api-error": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz", - "integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==", - "dev": true - }, - "node_modules/@webassemblyjs/helper-buffer": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.6.tgz", - "integrity": "sha512-z3nFzdcp1mb8nEOFFk8DrYLpHvhKC3grJD2ardfKOzmbmJvEf/tPIqCY+sNcwZIY8ZD7IkB2l7/pqhUhqm7hLA==", - "dev": true - }, - "node_modules/@webassemblyjs/helper-numbers": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz", - "integrity": "sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==", - "dev": true, - "dependencies": { - "@webassemblyjs/floating-point-hex-parser": "1.11.6", - "@webassemblyjs/helper-api-error": "1.11.6", - "@xtuc/long": "4.2.2" - } - }, - "node_modules/@webassemblyjs/helper-wasm-bytecode": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz", - "integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==", - "dev": true - }, - "node_modules/@webassemblyjs/helper-wasm-section": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.6.tgz", - "integrity": "sha512-LPpZbSOwTpEC2cgn4hTydySy1Ke+XEu+ETXuoyvuyezHO3Kjdu90KK95Sh9xTbmjrCsUwvWwCOQQNta37VrS9g==", - "dev": true, - "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-buffer": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/wasm-gen": "1.11.6" - } - }, - "node_modules/@webassemblyjs/ieee754": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz", - "integrity": "sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==", - "dev": true, - "dependencies": { - "@xtuc/ieee754": "^1.2.0" - } - }, - "node_modules/@webassemblyjs/leb128": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.6.tgz", - "integrity": "sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==", - "dev": true, - "dependencies": { - "@xtuc/long": "4.2.2" - } - }, - "node_modules/@webassemblyjs/utf8": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.6.tgz", - "integrity": "sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==", - "dev": true - }, - "node_modules/@webassemblyjs/wasm-edit": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.6.tgz", - "integrity": "sha512-Ybn2I6fnfIGuCR+Faaz7YcvtBKxvoLV3Lebn1tM4o/IAJzmi9AWYIPWpyBfU8cC+JxAO57bk4+zdsTjJR+VTOw==", - "dev": true, - "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-buffer": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/helper-wasm-section": "1.11.6", - "@webassemblyjs/wasm-gen": "1.11.6", - "@webassemblyjs/wasm-opt": "1.11.6", - "@webassemblyjs/wasm-parser": "1.11.6", - "@webassemblyjs/wast-printer": "1.11.6" - } - }, - "node_modules/@webassemblyjs/wasm-gen": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.6.tgz", - "integrity": "sha512-3XOqkZP/y6B4F0PBAXvI1/bky7GryoogUtfwExeP/v7Nzwo1QLcq5oQmpKlftZLbT+ERUOAZVQjuNVak6UXjPA==", - "dev": true, - "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/ieee754": "1.11.6", - "@webassemblyjs/leb128": "1.11.6", - "@webassemblyjs/utf8": "1.11.6" - } - }, - "node_modules/@webassemblyjs/wasm-opt": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.6.tgz", - "integrity": "sha512-cOrKuLRE7PCe6AsOVl7WasYf3wbSo4CeOk6PkrjS7g57MFfVUF9u6ysQBBODX0LdgSvQqRiGz3CXvIDKcPNy4g==", - "dev": true, - "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-buffer": "1.11.6", - "@webassemblyjs/wasm-gen": "1.11.6", - "@webassemblyjs/wasm-parser": "1.11.6" - } - }, - "node_modules/@webassemblyjs/wasm-parser": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.6.tgz", - "integrity": "sha512-6ZwPeGzMJM3Dqp3hCsLgESxBGtT/OeCvCZ4TA1JUPYgmhAx38tTPR9JaKy0S5H3evQpO/h2uWs2j6Yc/fjkpTQ==", - "dev": true, - "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-api-error": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/ieee754": "1.11.6", - "@webassemblyjs/leb128": "1.11.6", - "@webassemblyjs/utf8": "1.11.6" - } - }, - "node_modules/@webassemblyjs/wast-printer": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.6.tgz", - "integrity": "sha512-JM7AhRcE+yW2GWYaKeHL5vt4xqee5N2WcezptmgyhNS+ScggqcT1OtXykhAb13Sn5Yas0j2uv9tHgrjwvzAP4A==", - "dev": true, - "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@xtuc/long": "4.2.2" - } - }, - "node_modules/@webpack-cli/configtest": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-1.2.0.tgz", - "integrity": "sha512-4FB8Tj6xyVkyqjj1OaTqCjXYULB9FMkqQ8yGrZjRDrYh0nOE+7Lhs45WioWQQMV+ceFlE368Ukhe6xdvJM9Egg==", - "dev": true, - "peerDependencies": { - "webpack": "4.x.x || 5.x.x", - "webpack-cli": "4.x.x" - } - }, - "node_modules/@webpack-cli/info": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-1.5.0.tgz", - "integrity": "sha512-e8tSXZpw2hPl2uMJY6fsMswaok5FdlGNRTktvFk2sD8RjH0hE2+XistawJx1vmKteh4NmGmNUrp+Tb2w+udPcQ==", - "dev": true, - "dependencies": { - "envinfo": "^7.7.3" - }, - "peerDependencies": { - "webpack-cli": "4.x.x" - } - }, - "node_modules/@webpack-cli/serve": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-1.7.0.tgz", - "integrity": "sha512-oxnCNGj88fL+xzV+dacXs44HcDwf1ovs3AuEzvP7mqXw7fQntqIhQ1BRmynh4qEKQSSSRSWVyXRjmTbZIX9V2Q==", - "dev": true, - "peerDependencies": { - "webpack-cli": "4.x.x" - }, - "peerDependenciesMeta": { - "webpack-dev-server": { - "optional": true - } - } - }, - "node_modules/@xtuc/ieee754": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", - "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", - "dev": true - }, - "node_modules/@xtuc/long": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", - "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", - "dev": true - }, - "node_modules/acorn": { - "version": "8.8.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", - "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-import-assertions": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz", - "integrity": "sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==", - "dev": true, - "peerDependencies": { - "acorn": "^8" - } - }, - "node_modules/ajv": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", - "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/ajv-formats": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz", - "integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==", - "dev": true, - "dependencies": { - "ajv": "^8.0.0" - }, - "peerDependencies": { - "ajv": "^8.0.0" - }, - "peerDependenciesMeta": { - "ajv": { - "optional": true - } - } - }, - "node_modules/ajv-keywords": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", - "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.3" - }, - "peerDependencies": { - "ajv": "^8.8.2" - } - }, - "node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "dev": true, - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" - }, - "node_modules/binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/browserslist": { - "version": "4.21.5", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.5.tgz", - "integrity": "sha512-tUkiguQGW7S3IhB7N+c2MV/HZPSCPAAiYBZXLsBhFB/PCy6ZKKsZrmBayHV9fdGV/ARIfJ14NkxKzRDjvp7L6w==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - } - ], - "dependencies": { - "caniuse-lite": "^1.0.30001449", - "electron-to-chromium": "^1.4.284", - "node-releases": "^2.0.8", - "update-browserslist-db": "^1.0.10" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - } - }, - "node_modules/buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true - }, - "node_modules/builtin-modules": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", - "integrity": "sha512-wxXCdllwGhI2kCC0MnvTGYTMvnVZTvqgypkiTI8Pa5tcz2i6VqsqwYGgqwXji+4RgCzms6EajE4IxiUH6HH8nQ==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/caniuse-lite": { - "version": "1.0.30001488", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001488.tgz", - "integrity": "sha512-NORIQuuL4xGpIy6iCCQGN4iFjlBXtfKWIenlUuyZJumLRIindLb7wXM+GO8erEhb7vXfcnf4BAg2PrSDN5TNLQ==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ] - }, - "node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/chalk/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "engines": { - "node": ">=4" - } - }, - "node_modules/chalk/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], - "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" - }, - "engines": { - "node": ">= 8.10.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "node_modules/chrome-trace-event": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", - "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", - "dev": true, - "engines": { - "node": ">=6.0" - } - }, - "node_modules/clone-deep": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", - "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", - "dev": true, - "dependencies": { - "is-plain-object": "^2.0.4", - "kind-of": "^6.0.2", - "shallow-clone": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" - }, - "node_modules/colorette": { - "version": "2.0.20", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", - "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", - "dev": true - }, - "node_modules/commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" - }, - "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/css-loader": { - "version": "6.7.4", - "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-6.7.4.tgz", - "integrity": "sha512-0Y5uHtK5BswfaGJ+jrO+4pPg1msFBc0pwPIE1VqfpmVn6YbDfYfXMj8rfd7nt+4goAhJueO+H/I40VWJfcP1mQ==", - "dev": true, - "dependencies": { - "icss-utils": "^5.1.0", - "postcss": "^8.4.21", - "postcss-modules-extract-imports": "^3.0.0", - "postcss-modules-local-by-default": "^4.0.1", - "postcss-modules-scope": "^3.0.0", - "postcss-modules-values": "^4.0.0", - "postcss-value-parser": "^4.2.0", - "semver": "^7.3.8" - }, - "engines": { - "node": ">= 12.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "^5.0.0" - } - }, - "node_modules/cssesc": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", - "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", - "dev": true, - "bin": { - "cssesc": "bin/cssesc" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "engines": { - "node": ">=0.3.1" - } - }, - "node_modules/electron-to-chromium": { - "version": "1.4.401", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.401.tgz", - "integrity": "sha512-AswqHsYyEbfSn0x87n31Na/xttUqEAg7NUjpiyxC20MaWKLyadOYHMzyLdF78N1iw+FK8/2KHLpZxRdyRILgtA==", - "dev": true - }, - "node_modules/enhanced-resolve": { - "version": "5.14.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.14.0.tgz", - "integrity": "sha512-+DCows0XNwLDcUhbFJPdlQEVnT2zXlCv7hPxemTz86/O+B/hCQ+mb7ydkPKiflpVraqLPCAfu7lDy+hBXueojw==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.2.4", - "tapable": "^2.2.0" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/envinfo": { - "version": "7.8.1", - "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.8.1.tgz", - "integrity": "sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw==", - "dev": true, - "bin": { - "envinfo": "dist/cli.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/es-module-lexer": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.2.1.tgz", - "integrity": "sha512-9978wrXM50Y4rTMmW5kXIC09ZdXQZqkE4mxhwkd8VbzsGkXGPgV4zWuqQJgCEzYngdo2dYDa0l8xhX4fkSwJSg==", - "dev": true - }, - "node_modules/escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dev": true, - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/esrecurse/node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/events": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", - "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", - "dev": true, - "engines": { - "node": ">=0.8.x" - } - }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true - }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true - }, - "node_modules/fastest-levenshtein": { - "version": "1.0.16", - "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz", - "integrity": "sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==", - "dev": true, - "engines": { - "node": ">= 4.9.1" - } - }, - "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" - }, - "node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" - }, - "node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/glob-to-regexp": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", - "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", - "dev": true - }, - "node_modules/graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true - }, - "node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dependencies": { - "function-bind": "^1.1.1" - }, - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/icss-utils": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz", - "integrity": "sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==", - "dev": true, - "engines": { - "node": "^10 || ^12 || >= 14" - }, - "peerDependencies": { - "postcss": "^8.1.0" - } - }, - "node_modules/immutable": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.0.tgz", - "integrity": "sha512-0AOCmOip+xgJwEVTQj1EfiDDOkPmuyllDuTuEX+DDXUgapLAsBIfkg3sxCYyCEA8mQqZrrxPUGjcOQ2JS3WLkg==", - "dev": true - }, - "node_modules/import-local": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", - "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", - "dev": true, - "dependencies": { - "pkg-dir": "^4.2.0", - "resolve-cwd": "^3.0.0" - }, - "bin": { - "import-local-fixture": "fixtures/cli.js" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "node_modules/interpret": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-2.2.0.tgz", - "integrity": "sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==", - "dev": true, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-core-module": { - "version": "2.12.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.1.tgz", - "integrity": "sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg==", - "dependencies": { - "has": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "dependencies": { - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true - }, - "node_modules/isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/jest-worker": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", - "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", - "dev": true, - "dependencies": { - "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" - }, - "engines": { - "node": ">= 10.13.0" - } - }, - "node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" - }, - "node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/json-parse-even-better-errors": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true - }, - "node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true - }, - "node_modules/kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/klona": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/klona/-/klona-2.0.6.tgz", - "integrity": "sha512-dhG34DXATL5hSxJbIexCft8FChFXtmskoZYnoPWjXQuebWYCNkVeV3KkGegCK9CP1oswI/vQibS2GY7Em/sJJA==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/loader-runner": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", - "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", - "dev": true, - "engines": { - "node": ">=6.11.5" - } - }, - "node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true - }, - "node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "dev": true, - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mini-css-extract-plugin": { - "version": "2.7.6", - "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-2.7.6.tgz", - "integrity": "sha512-Qk7HcgaPkGG6eD77mLvZS1nmxlao3j+9PkrT9Uc7HAE1id3F41+DdBRYRYkbyfNRGzm8/YWtzhw7nVPmwhqTQw==", - "dev": true, - "dependencies": { - "schema-utils": "^4.0.0" - }, - "engines": { - "node": ">= 12.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "^5.0.0" - } - }, - "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/minimist": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", - "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/mkdirp": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", - "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", - "dependencies": { - "minimist": "^1.2.6" - }, - "bin": { - "mkdirp": "bin/cmd.js" - } - }, - "node_modules/nanoid": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", - "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "node_modules/neo-async": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", - "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", - "dev": true - }, - "node_modules/node-releases": { - "version": "2.0.10", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.10.tgz", - "integrity": "sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w==", - "dev": true - }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" - }, - "node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", - "dev": true - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "dev": true, - "dependencies": { - "find-up": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/postcss": { - "version": "8.4.23", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.23.tgz", - "integrity": "sha512-bQ3qMcpF6A/YjR55xtoTr0jGOlnPOKAIMdOWiv0EIT6HVPEaJiJB4NLljSbiHoC2RX7DN5Uvjtpbg1NPdwv1oA==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/postcss" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "dependencies": { - "nanoid": "^3.3.6", - "picocolors": "^1.0.0", - "source-map-js": "^1.0.2" - }, - "engines": { - "node": "^10 || ^12 || >=14" - } - }, - "node_modules/postcss-modules-extract-imports": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz", - "integrity": "sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw==", - "dev": true, - "engines": { - "node": "^10 || ^12 || >= 14" - }, - "peerDependencies": { - "postcss": "^8.1.0" - } - }, - "node_modules/postcss-modules-local-by-default": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.1.tgz", - "integrity": "sha512-Zr/dB+IlXaEqdoslLHhhqecwj73vc3rDmOpsBNBEVk7P2aqAlz+Ijy0fFbU5Ie9PtreDOIgGa9MsLWakVGl+fA==", - "dev": true, - "dependencies": { - "icss-utils": "^5.0.0", - "postcss-selector-parser": "^6.0.2", - "postcss-value-parser": "^4.1.0" - }, - "engines": { - "node": "^10 || ^12 || >= 14" - }, - "peerDependencies": { - "postcss": "^8.1.0" - } - }, - "node_modules/postcss-modules-scope": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.0.0.tgz", - "integrity": "sha512-hncihwFA2yPath8oZ15PZqvWGkWf+XUfQgUGamS4LqoP1anQLOsOJw0vr7J7IwLpoY9fatA2qiGUGmuZL0Iqlg==", - "dev": true, - "dependencies": { - "postcss-selector-parser": "^6.0.4" - }, - "engines": { - "node": "^10 || ^12 || >= 14" - }, - "peerDependencies": { - "postcss": "^8.1.0" - } - }, - "node_modules/postcss-modules-values": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-4.0.0.tgz", - "integrity": "sha512-RDxHkAiEGI78gS2ofyvCsu7iycRv7oqw5xMWn9iMoR0N/7mf9D50ecQqUo5BZ9Zh2vH4bCUR/ktCqbB9m8vJjQ==", - "dev": true, - "dependencies": { - "icss-utils": "^5.0.0" - }, - "engines": { - "node": "^10 || ^12 || >= 14" - }, - "peerDependencies": { - "postcss": "^8.1.0" - } - }, - "node_modules/postcss-selector-parser": { - "version": "6.0.13", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.13.tgz", - "integrity": "sha512-EaV1Gl4mUEV4ddhDnv/xtj7sxwrwxdetHdWUGnT4VJQf+4d05v6lHYZr8N573k5Z0BViss7BDhfWtKS3+sfAqQ==", - "dev": true, - "dependencies": { - "cssesc": "^3.0.0", - "util-deprecate": "^1.0.2" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/postcss-value-parser": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", - "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", - "dev": true - }, - "node_modules/punycode": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", - "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, - "dependencies": { - "safe-buffer": "^5.1.0" - } - }, - "node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "node_modules/rechoir": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.7.1.tgz", - "integrity": "sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg==", - "dev": true, - "dependencies": { - "resolve": "^1.9.0" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/resolve": { - "version": "1.22.2", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz", - "integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==", - "dependencies": { - "is-core-module": "^2.11.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/resolve-cwd": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", - "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", - "dev": true, - "dependencies": { - "resolve-from": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/sass": { - "version": "1.62.1", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.62.1.tgz", - "integrity": "sha512-NHpxIzN29MXvWiuswfc1W3I0N8SXBd8UR26WntmDlRYf0bSADnwnOjsyMZ3lMezSlArD33Vs3YFhp7dWvL770A==", - "dev": true, - "dependencies": { - "chokidar": ">=3.0.0 <4.0.0", - "immutable": "^4.0.0", - "source-map-js": ">=0.6.2 <2.0.0" - }, - "bin": { - "sass": "sass.js" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/sass-loader": { - "version": "12.6.0", - "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-12.6.0.tgz", - "integrity": "sha512-oLTaH0YCtX4cfnJZxKSLAyglED0naiYfNG1iXfU5w1LNZ+ukoA5DtyDIN5zmKVZwYNJP4KRc5Y3hkWga+7tYfA==", - "dev": true, - "dependencies": { - "klona": "^2.0.4", - "neo-async": "^2.6.2" - }, - "engines": { - "node": ">= 12.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "fibers": ">= 3.1.0", - "node-sass": "^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0", - "sass": "^1.3.0", - "sass-embedded": "*", - "webpack": "^5.0.0" - }, - "peerDependenciesMeta": { - "fibers": { - "optional": true - }, - "node-sass": { - "optional": true - }, - "sass": { - "optional": true - }, - "sass-embedded": { - "optional": true - } - } - }, - "node_modules/schema-utils": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.0.1.tgz", - "integrity": "sha512-lELhBAAly9NowEsX0yZBlw9ahZG+sK/1RJ21EpzdYHKEs13Vku3LJ+MIPhh4sMs0oCCeufZQEQbMekiA4vuVIQ==", - "dev": true, - "dependencies": { - "@types/json-schema": "^7.0.9", - "ajv": "^8.9.0", - "ajv-formats": "^2.1.1", - "ajv-keywords": "^5.1.0" - }, - "engines": { - "node": ">= 12.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - } - }, - "node_modules/semver": { - "version": "7.5.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.1.tgz", - "integrity": "sha512-Wvss5ivl8TMRZXXESstBA4uR5iXgEN/VC5/sOcuXdVLzcdkz4HWetIoRfG5gb5X+ij/G9rw9YoGn3QoQ8OCSpw==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/serialize-javascript": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.1.tgz", - "integrity": "sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w==", - "dev": true, - "dependencies": { - "randombytes": "^2.1.0" - } - }, - "node_modules/shallow-clone": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", - "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", - "dev": true, - "dependencies": { - "kind-of": "^6.0.2" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map-js": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", - "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map-support": { - "version": "0.5.21", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", - "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", - "dev": true, - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==" - }, - "node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/tapable": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", - "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/terser": { - "version": "5.17.4", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.17.4.tgz", - "integrity": "sha512-jcEKZw6UPrgugz/0Tuk/PVyLAPfMBJf5clnGueo45wTweoV8yh7Q7PEkhkJ5uuUbC7zAxEcG3tqNr1bstkQ8nw==", - "dev": true, - "dependencies": { - "@jridgewell/source-map": "^0.3.2", - "acorn": "^8.5.0", - "commander": "^2.20.0", - "source-map-support": "~0.5.20" - }, - "bin": { - "terser": "bin/terser" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/terser-webpack-plugin": { - "version": "5.3.9", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.9.tgz", - "integrity": "sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA==", - "dev": true, - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.17", - "jest-worker": "^27.4.5", - "schema-utils": "^3.1.1", - "serialize-javascript": "^6.0.1", - "terser": "^5.16.8" - }, - "engines": { - "node": ">= 10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "^5.1.0" - }, - "peerDependenciesMeta": { - "@swc/core": { - "optional": true - }, - "esbuild": { - "optional": true - }, - "uglify-js": { - "optional": true - } - } - }, - "node_modules/terser-webpack-plugin/node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/terser-webpack-plugin/node_modules/ajv-keywords": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", - "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "dev": true, - "peerDependencies": { - "ajv": "^6.9.1" - } - }, - "node_modules/terser-webpack-plugin/node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "node_modules/terser-webpack-plugin/node_modules/schema-utils": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.2.tgz", - "integrity": "sha512-pvjEHOgWc9OWA/f/DE3ohBWTD6EleVLf7iFUkoSwAxttdBhB9QUebQgxER2kWueOvRJXPHNnyrvvh9eZINB8Eg==", - "dev": true, - "dependencies": { - "@types/json-schema": "^7.0.8", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" - }, - "engines": { - "node": ">= 10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - } - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" - }, - "node_modules/tslint": { - "version": "6.1.3", - "resolved": "https://registry.npmjs.org/tslint/-/tslint-6.1.3.tgz", - "integrity": "sha512-IbR4nkT96EQOvKE2PW/djGz8iGNeJ4rF2mBfiYaR/nvUWYKJhLwimoJKgjIFEIDibBtOevj7BqCRL4oHeWWUCg==", - "deprecated": "TSLint has been deprecated in favor of ESLint. Please see https://github.com/palantir/tslint/issues/4534 for more information.", - "dependencies": { - "@babel/code-frame": "^7.0.0", - "builtin-modules": "^1.1.1", - "chalk": "^2.3.0", - "commander": "^2.12.1", - "diff": "^4.0.1", - "glob": "^7.1.1", - "js-yaml": "^3.13.1", - "minimatch": "^3.0.4", - "mkdirp": "^0.5.3", - "resolve": "^1.3.2", - "semver": "^5.3.0", - "tslib": "^1.13.0", - "tsutils": "^2.29.0" - }, - "bin": { - "tslint": "bin/tslint" - }, - "engines": { - "node": ">=4.8.0" - }, - "peerDependencies": { - "typescript": ">=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >=3.0.0-dev || >= 3.1.0-dev || >= 3.2.0-dev || >= 4.0.0-dev" - } - }, - "node_modules/tslint/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/tsutils": { - "version": "2.29.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", - "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", - "dependencies": { - "tslib": "^1.8.1" - }, - "peerDependencies": { - "typescript": ">=2.1.0 || >=2.1.0-dev || >=2.2.0-dev || >=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >= 3.0.0-dev || >= 3.1.0-dev" - } - }, - "node_modules/typescript": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.0.4.tgz", - "integrity": "sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=12.20" - } - }, - "node_modules/update-browserslist-db": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz", - "integrity": "sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "dependencies": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" - }, - "bin": { - "update-browserslist-db": "cli.js" - }, - "peerDependencies": { - "browserslist": ">= 4.21.0" - } - }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "dependencies": { - "punycode": "^2.1.0" - } - }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "dev": true - }, - "node_modules/watchpack": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", - "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==", - "dev": true, - "dependencies": { - "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.1.2" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/webpack": { - "version": "5.83.1", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.83.1.tgz", - "integrity": "sha512-TNsG9jDScbNuB+Lb/3+vYolPplCS3bbEaJf+Bj0Gw4DhP3ioAflBb1flcRt9zsWITyvOhM96wMQNRWlSX52DgA==", - "dev": true, - "dependencies": { - "@types/eslint-scope": "^3.7.3", - "@types/estree": "^1.0.0", - "@webassemblyjs/ast": "^1.11.5", - "@webassemblyjs/wasm-edit": "^1.11.5", - "@webassemblyjs/wasm-parser": "^1.11.5", - "acorn": "^8.7.1", - "acorn-import-assertions": "^1.7.6", - "browserslist": "^4.14.5", - "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.14.0", - "es-module-lexer": "^1.2.1", - "eslint-scope": "5.1.1", - "events": "^3.2.0", - "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.2.9", - "json-parse-even-better-errors": "^2.3.1", - "loader-runner": "^4.2.0", - "mime-types": "^2.1.27", - "neo-async": "^2.6.2", - "schema-utils": "^3.1.2", - "tapable": "^2.1.1", - "terser-webpack-plugin": "^5.3.7", - "watchpack": "^2.4.0", - "webpack-sources": "^3.2.3" - }, - "bin": { - "webpack": "bin/webpack.js" - }, - "engines": { - "node": ">=10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependenciesMeta": { - "webpack-cli": { - "optional": true - } - } - }, - "node_modules/webpack-cli": { - "version": "4.10.0", - "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-4.10.0.tgz", - "integrity": "sha512-NLhDfH/h4O6UOy+0LSso42xvYypClINuMNBVVzX4vX98TmTaTUxwRbXdhucbFMd2qLaCTcLq/PdYrvi8onw90w==", - "dev": true, - "dependencies": { - "@discoveryjs/json-ext": "^0.5.0", - "@webpack-cli/configtest": "^1.2.0", - "@webpack-cli/info": "^1.5.0", - "@webpack-cli/serve": "^1.7.0", - "colorette": "^2.0.14", - "commander": "^7.0.0", - "cross-spawn": "^7.0.3", - "fastest-levenshtein": "^1.0.12", - "import-local": "^3.0.2", - "interpret": "^2.2.0", - "rechoir": "^0.7.0", - "webpack-merge": "^5.7.3" - }, - "bin": { - "webpack-cli": "bin/cli.js" - }, - "engines": { - "node": ">=10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "4.x.x || 5.x.x" - }, - "peerDependenciesMeta": { - "@webpack-cli/generators": { - "optional": true - }, - "@webpack-cli/migrate": { - "optional": true - }, - "webpack-bundle-analyzer": { - "optional": true - }, - "webpack-dev-server": { - "optional": true - } - } - }, - "node_modules/webpack-cli/node_modules/commander": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", - "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", - "dev": true, - "engines": { - "node": ">= 10" - } - }, - "node_modules/webpack-fix-style-only-entries": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/webpack-fix-style-only-entries/-/webpack-fix-style-only-entries-0.6.1.tgz", - "integrity": "sha512-wyIhoxS3DD3Fr9JA8hQPA+ZmaWnqPxx12Nv166wcsI/0fbReqyEtiIk2llOFYIg57WVS3XX5cZJxw2ji70R0sA==", - "dev": true - }, - "node_modules/webpack-merge": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.8.0.tgz", - "integrity": "sha512-/SaI7xY0831XwP6kzuwhKWVKDP9t1QY1h65lAFLbZqMPIuYcD9QAW4u9STIbU9kaJbPBB/geU/gLr1wDjOhQ+Q==", - "dev": true, - "dependencies": { - "clone-deep": "^4.0.1", - "wildcard": "^2.0.0" - }, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/webpack-sources": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", - "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", - "dev": true, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/webpack/node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/webpack/node_modules/ajv-keywords": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", - "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "dev": true, - "peerDependencies": { - "ajv": "^6.9.1" - } - }, - "node_modules/webpack/node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "node_modules/webpack/node_modules/schema-utils": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.2.tgz", - "integrity": "sha512-pvjEHOgWc9OWA/f/DE3ohBWTD6EleVLf7iFUkoSwAxttdBhB9QUebQgxER2kWueOvRJXPHNnyrvvh9eZINB8Eg==", - "dev": true, - "dependencies": { - "@types/json-schema": "^7.0.8", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" - }, - "engines": { - "node": ">= 10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - } - }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/wildcard": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.1.tgz", - "integrity": "sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ==", - "dev": true - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" - }, - "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - } - } -} diff --git a/old/resources/css/include/_global.scss b/old/resources/css/include/_global.scss deleted file mode 100644 index 603fd4f..0000000 --- a/old/resources/css/include/_global.scss +++ /dev/null @@ -1,9 +0,0 @@ -.editor-clearfix::after { - display: block; - content: ""; - clear: both; -} - -.editor-icon-pack { - display: none; -} \ No newline at end of file diff --git a/old/resources/css/include/_mixin.scss b/old/resources/css/include/_mixin.scss deleted file mode 100644 index 7d7714e..0000000 --- a/old/resources/css/include/_mixin.scss +++ /dev/null @@ -1,7 +0,0 @@ -@mixin ellipsis { - display: block; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - -o-text-overflow: ellipsis; -} diff --git a/old/resources/css/include/_variables.scss b/old/resources/css/include/_variables.scss deleted file mode 100644 index 0a0e25f..0000000 --- a/old/resources/css/include/_variables.scss +++ /dev/null @@ -1,3 +0,0 @@ -$color-list: #fff, #efefef, #ccc, #999, #777, #555, #333, #e6b8af, #dd7e6b, #cc4125, #980000, #a61c00, #85200c, #5b0f00, #f4cccc, #ea9999, #e06666, #ff0000, #cc0000, #990000, #660000, #fce5cd, #f9cb9c, #f6b36b, #ff9900, #e69138, #b45f06, #783f04, #fff2cc, #ffe599, #ffd966, #ffff00, #f1c232, #bf9000, #7f6000, #d9ead3, #b6d7a8, #93c47d, #00ff00, #6aa84f, #38761d, #274e13, #d0e0e3, #a2c4c9, #76a5af, #00ffff, #45818e, #134f5c, #0c343d, #c9daf8, #a4c2f4, #6d9eeb, #4a87e8, #3c78d8, #1156cc, #1c4587, - #cfe2f3, #9fc5e8, #6fa8dc, #0000ff, #3d85c6, #0b5394, #073763, #d9d2e9, #b4a7d6, #8e7cc3, #9900ff, #674ea7, #351c75, #20124d, #ead1dc, #d5a6bd, #c27ba0, #ff00ff, #a64d79, #741b47, #4c1130; -$font-size-list: 0.75, 0.9, 1, 1.15, 1.25, 1.5, 1.75, 1.9, 2, 2.15, 2.25; diff --git a/old/resources/css/index.scss b/old/resources/css/index.scss deleted file mode 100644 index 997b7a4..0000000 --- a/old/resources/css/index.scss +++ /dev/null @@ -1,17 +0,0 @@ -@import "include/variables"; -@import "include/global"; -@import "include/mixin"; - -@import "module/scroll"; -@import "module/item"; - -@import "layout/menu"; -@import "layout/pop"; -@import "layout/container"; - -@media all and (max-width: 800px) { - @include mobile-item; - @include mobile-menu; - @include mobile-pop; - @include mobile-container; -} diff --git a/old/resources/css/layout/_container.scss b/old/resources/css/layout/_container.scss deleted file mode 100644 index 988a3e3..0000000 --- a/old/resources/css/layout/_container.scss +++ /dev/null @@ -1,151 +0,0 @@ -.editor-dragon { - position: relative; - margin-bottom: 50px; - - &[data-layout="container"] { - height: 600px; - padding: 100px 0 50px; - border: 1px solid #ccc; - border-radius: 2px; - - .editor-content { - height: 100%; - overflow-y: auto; - } - - .editor-menu-block { - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 38px; - transform: none; - border-bottom: 1px solid #ccc; - - .editor-btn { - float: left; - margin: 5px; - } - } - - .editor-pop-option { - position: absolute; - top: 39px; - left: 0; - width: 100%; - border: 0; - border-bottom: 1px solid #ccc; - opacity: 1; - visibility: visible; - - .editor-btn-area.--noline { - border-right: 1px solid #ccc; - } - } - - .editor-menu-bottom { - position: absolute; - } - } - - *::after, - *::before { - font: inherit; - } -} - -.editor-content { - max-width: 700px; - min-height: 300px; - margin: 0 auto; - font-size: inherit; - line-height: 1.7; - word-break: break-word; - transition: max-width 0.3s ease; - - &.--mobile { - max-width: 320px; - font-size: inherit; - - @include mobile-item; - } - - a { - cursor: text; - } - - *[contenteditable="true"] code { - padding: 2px 5px; - margin: 0 5px; - background: #f1f1f1; - color: #c52e2e; - border-radius: 2px; - font-family: Inconsolata, sans-serif; - } - - @each $size in $font-size-list { - *[data-fontsize="#{'' + $size}"] { - font-size: #{$size + "em"}; - } - } - - @each $color in $color-list { - *[data-color="#{'' + $color}"] { - color: $color; - } - } - - @for $i from 1 through 3 { - *[data-depth="#{'' + $i}"] { - margin-left: (20px * $i); - } - } - - *[data-align="left"] { - text-align: left; - } - - *[data-align="center"] { - text-align: center; - } - - *[data-align="right"] { - text-align: right; - } - - *[data-bold="true"] { - font-weight: bold; - } - - *[data-italic="true"] { - font-style: italic; - } - - *[data-underline="true"] { - text-decoration: underline; - } - - *[data-strikethrough="true"] { - text-decoration: line-through; - } -} - -.editor-uploader { - display: none; -} - -@mixin mobile-container { - .editor-dragon { - position: relative; - - &[data-layout="container"] { - .editor-pop-option { - position: absolute; - } - } - } - - .editor-content { - padding: 100px 20px 50px; - } -} diff --git a/old/resources/css/layout/_menu.scss b/old/resources/css/layout/_menu.scss deleted file mode 100644 index f577429..0000000 --- a/old/resources/css/layout/_menu.scss +++ /dev/null @@ -1,101 +0,0 @@ -.editor-menu-block { - position: fixed; - top: 100px; - right: 50%; - width: 26px; - transform: translateX(calc(370px + 100%)); - z-index: 10; - - .editor-btn { - display: block; - width: 26px; - height: 26px; - margin-bottom: 5px; - color: transparent; - font-size: 0; - - &:hover .path { - fill: #333; - } - - .path { - fill: #999; - } - } -} - -.editor-menu-bottom { - position: fixed; - bottom: 10px; - left: 50%; - font-size: 0; - transform: translateX(-50%); - z-index: 10; - - .editor-btn { - display: inline-block; - width: 26px; - margin: 0 5px; - color: transparent; - font-size: 0; - - &:hover .path { - fill: #333; - } - - .path { - fill: #999; - } - } -} - -.editor-switch-device { - &.--act { - .editor-pc { - display: none; - } - - .editor-mobile { - display: block; - } - } - - .editor-mobile { - display: none; - } -} - -@mixin mobile-menu { - .editor-menu-block { - position: absolute; - top: 0; - left: 0; - right: auto; - width: 100%; - height: 40px; - overflow-x: auto; - overflow-y: visible; - transform: none; - - .editor-scroll-col { - height: 100%; - - @for $i from 10 through 16 { - &[data-count="#{$i}"] { - width: 35px * $i; - } - } - } - - .editor-btn { - float: left; - margin: 0 5px 0 0; - } - } - - .editor-menu-bottom { - .editor-switch-device { - display: none; - } - } -} diff --git a/old/resources/css/layout/_pop.scss b/old/resources/css/layout/_pop.scss deleted file mode 100644 index 4f0257d..0000000 --- a/old/resources/css/layout/_pop.scss +++ /dev/null @@ -1,617 +0,0 @@ -.editor-pop-lang { - position: absolute; - bottom: 100%; - left: 50%; - width: 100px; - background: #fff; - border: 1px solid #ccc; - border-radius: 2px; - font-size: 0; - opacity: 0; - visibility: hidden; - transform: translate(-50%, 0); - transition: all 0.3s ease; - - &.--act { - opacity: 1; - visibility: visible; - transform: translate(-50%, -10px); - } - - @for $i from 3 through 10 { - &[data-length="#{$i}"] { - width: (50px * $i); - } - } - - .editor-btn-lang { - width: 50px; - height: 30px; - color: #333; - border-right: 1px solid #e8e9ea; - text-align: center; - line-height: 30px; - box-sizing: border-box; - - &:last-child { - border-right: 0; - } - - &.--act { - color: #3f80e9; - font-weight: bold; - } - } -} - -.editor-list-pop { - position: absolute; - width: 240px; - height: 200px; - background: #fff; - border: 1px solid #ccc; - border-radius: 2px; - overflow: hidden; - z-index: 10; - opacity: 0; - visibility: hidden; - transform: translateY(10px); - transition: all 0.3s ease; - - &.--act { - opacity: 1; - visibility: visible; - transform: translateY(0); - } -} - -.editor-pop-emoticon { - position: fixed; - height: auto; - - .editor-scroll { - height: 200px; - } - - .editor-btn-area { - font-size: 0; - border-bottom: 1px solid #ccc; - - .editor-emoticon-tap { - display: inline-block; - width: 30px; - height: 30px; - padding: 5px; - box-sizing: border-box; - - img, - svg { - width: 100%; - height: 100%; - } - } - } - - .editor-list-emoticon { - width: 240px; - padding: 5px; - box-sizing: border-box; - overflow: hidden; - - .editor-emoticon { - float: left; - width: 56px; - height: 56px; - padding: 5px; - box-sizing: border-box; - - .img, - svg { - width: 100%; - } - } - } -} - -.editor-pop-folder { - bottom: 100%; - right: 100%; - padding-bottom: 30px; - margin-right: -30px; - - .editor-add-media { - position: absolute; - left: 0; - bottom: 0; - width: 100%; - height: 30px; - color: transparent; - font-size: 0; - border-top: 1px solid #ccc; - - &::before, - &::after { - display: block; - content: ""; - position: absolute; - top: 50%; - left: 50%; - width: 14px; - height: 2px; - margin: -1px 0 0 -7px; - background: #ccc; - } - - &::after { - transform: rotate(90deg); - } - } -} - -.editor-list-media { - width: 100%; - padding: 5px; - box-sizing: border-box; - overflow: hidden; - - .editor-media { - position: relative; - float: left; - width: 115px; - padding: 5px; - box-sizing: border-box; - - .eidtor-img-area { - position: relative; - width: 100%; - height: 70px; - overflow: hidden; - } - - .editor-img { - position: absolute; - top: 0; - left: 50%; - height: 100%; - transform: translateX(-50%); - } - - .editor-name { - color: #999; - font-size: 12px; - text-align: center; - outline: 0; - @include ellipsis; - - &[contenteditable="true"] { - text-overflow: unset; - } - } - - .editor-btn-del { - position: absolute; - top: 5px; - right: 5px; - width: 20px; - height: 20px; - background: rgba(0, 0, 0, 0.5); - color: transparent; - font-size: 0; - - .path { - fill: #fff; - } - } - } -} - -.editor-pop-linkbox { - position: fixed; - width: 220px; - height: 32px; - padding: 5px 10px; - background: #fff; - border: 1px solid #ccc; - border-radius: 2px; - box-sizing: border-box; - opacity: 0; - visibility: hidden; - transform: translateY(10px); - transition: all 0.3s ease; - z-index: 20; - - &.--act { - opacity: 1; - visibility: visible; - transform: translateY(0); - } - - &.--wrong { - border-color: #ff0000; - } - - &[data-type="new"] { - .--del { - display: none; - } - } - - &[data-type="del"] { - .--new { - display: none; - } - } - - .editor-input { - float: left; - width: 176px; - height: 100%; - background: transparent; - border: 0; - border-bottom: 1px solid #ccc; - - &::placeholder { - color: #ddd; - } - } - - .editor-link { - float: left; - width: 176px; - height: 20px; - color: #3f80e9; - line-height: 20px; - @include ellipsis; - } - - .editor-btn { - float: right; - width: 12px; - margin-top: 4px; - - &.--ing { - position: relative; - height: 12px; - animation: loding 2s infinite ease; - - &::before { - display: block; - content: ""; - position: absolute; - top: 0; - left: 0; - width: 4px; - height: 4px; - background: #333; - border-radius: 50%; - z-index: 10; - } - - &::after { - display: block; - content: ""; - position: absolute; - bottom: 0; - right: 0; - width: 4px; - height: 4px; - background: #333; - border-radius: 50%; - z-index: 10; - } - - .editor-icon { - display: none; - } - } - } -} - -@keyframes loding { - 0% { - transform: rotate(0); - } - - 25% { - transform: rotate(90deg); - } - - 50% { - transform: rotate(180deg); - } - - 75% { - transform: rotate(270deg); - } - - 100% { - transform: rotate(360deg); - } -} - -.editor-pop-option { - position: fixed; - height: 38px; - background: #fff; - border: 1px solid #ccc; - border-radius: 2px; - font-size: 0; - opacity: 0; - visibility: hidden; - transition: all 0.3s ease; - z-index: 100; - - &.--act { - opacity: 1; - visibility: visible; - } - - .editor-col { - display: none; - position: relative; - float: left; - vertical-align: top; - - &.--act { - display: block; - } - } - - .editor-select { - position: relative; - height: 38px; - padding-right: 27px; - border-right: 1px solid #ccc; - text-align: left; - line-height: 38px; - box-sizing: border-box; - - .editor-text { - display: block; - padding-left: 17px; - } - - .editor-icon { - position: absolute; - top: 13px; - right: 10px; - width: 12px; - vertical-align: middle; - } - } - - .editor-list-fontsize { - position: absolute; - top: 100%; - left: -1px; - width: 58px; - height: 200px; - background: #fff; - border: 1px solid #ccc; - opacity: 0; - visibility: hidden; - transform: translateY(-10px); - transition: all 0.3s ease; - - &.--act { - opacity: 1; - visibility: visible; - transform: translateY(0); - } - - .editor-scroll-content { - overflow-x: hidden; - } - - .editor-btn { - width: 54px; - padding: 5px 0; - - &:first-child { - padding-top: 10px; - } - - &:last-child { - padding-bottom: 10px; - } - } - } - - .editor-list-colsize { - position: absolute; - top: 100%; - left: -1px; - width: 78px; - height: 200px; - background: #fff; - border: 1px solid #ccc; - opacity: 0; - visibility: hidden; - transform: translateY(-10px); - transition: all 0.3s ease; - - &.--act { - opacity: 1; - visibility: visible; - transform: translateY(0); - } - - .editor-scroll-content { - overflow-x: hidden; - } - - .editor-btn { - width: 74px; - padding: 5px 0; - - &:first-child { - padding-top: 10px; - } - - &:last-child { - padding-bottom: 10px; - } - } - } - - .editor-color { - position: relative; - width: 34px; - height: 38px; - background: #fff; - border-right: 1px solid #ccc; - - &::before { - display: block; - content: ""; - position: absolute; - top: 50%; - left: 50%; - width: 14px; - height: 14px; - background: #333; - border-radius: 50%; - box-sizing: border-box; - transform: translate(-50%, -50%); - } - - @each $color in $color-list { - &[data-value="#{'' + $color}"]::before { - background-color: $color; - } - } - - &[data-value="#fff"]::before { - border: 1px solid #ccc; - } - } - - .editor-list-color { - position: absolute; - top: 100%; - left: -1px; - width: 160px; - padding: 15px 10px 15px 15px; - background: #fff; - border: 1px solid #ccc; - font-size: 0; - box-sizing: border-box; - opacity: 0; - visibility: hidden; - transform: translateY(-10px); - transition: all 0.3s ease; - - &.--act { - opacity: 1; - visibility: visible; - transform: translateY(0); - } - - .editor-btn { - display: inline-block; - width: 14px; - height: 14px; - margin: 0 5px 5px 0; - color: transparent; - border-radius: 50%; - font-size: 0; - - @each $color in $color-list { - &[data-value="#{'' + $color}"] { - background-color: $color; - } - } - - &[data-value="#fff"] { - border: 1px solid #ccc; - } - } - } - - .editor-btn-area { - padding: 0 5px; - border-right: 1px solid #ccc; - line-height: 38px; - - &.--noline { - border-right: 0; - } - - .editor-btn { - margin: 0 5px; - color: transparent; - font-size: 0; - - &.--act .path { - fill: #3f80e9; - } - } - - .editor-icon { - width: 18px; - } - - .path { - fill: #333; - - &.--red { - fill: #ff6a6a; - } - } - } - - .editor-list-select { - position: absolute; - top: 100%; - left: -1px; - width: 80px; - padding: 5px 20px; - background: #fff; - border: 1px solid #ccc; - opacity: 0; - visibility: hidden; - transform: translateY(-10px); - transition: all 0.3s ease; - - &.--act { - opacity: 1; - visibility: visible; - transform: translateY(0); - } - - .editor-btn { - display: block; - width: 100%; - padding: 5px 0; - color: #333; - font-size: 12px; - text-align: left; - } - } -} - -@mixin mobile-pop { - .editor-pop-folder { - right: 50%; - margin-right: -120px; - } - - .editor-pop-option { - position: absolute; - top: 40px; - left: 0; - width: 100%; - border-width: 1px 0; - border-radius: 0; - - .editor-scroll-wrap { - width: 100%; - overflow-x: auto; - overflow-y: hidden; - } - - .editor-col { - position: static; - } - } -} diff --git a/old/resources/css/module/_item.scss b/old/resources/css/module/_item.scss deleted file mode 100644 index 8940ecf..0000000 --- a/old/resources/css/module/_item.scss +++ /dev/null @@ -1,810 +0,0 @@ -.editor-item { - margin-bottom: 10px; - outline: 0; - font-size: inherit; - line-height: 1.7; - - .editor-edit { - position: absolute; - top: 5px; - right: 5px; - padding: 10px; - background: #000; - color: #fff; - border: 1px solid #fff; - border-radius: 2px; - z-index: 30; - } - - &[data-type="text"] { - &:empty { - min-height: 1.7em; - - &::after { - display: inline; - content: "Add text"; - color: #ccc; - cursor: text; - } - } - } - - &[data-type="image"] { - font-size: 0; - - .editor-size { - display: inline-block; - position: relative; - width: 100%; - } - - @for $i from 1 through 14 { - .editor-size[data-width="#{50 * $i}"] { - max-width: 50px * $i; - } - } - - .editor-caption { - padding: 5px; - color: #999; - font-size: 12px; - outline: 0; - - &:empty { - &::after { - display: inline; - content: "Add caption"; - color: #ccc; - font-size: 12px; - cursor: text; - } - } - } - - .editor-img { - width: 100%; - } - - .editor-btn-resize { - position: absolute; - top: 50%; - width: 5px; - height: 30%; - background: rgba(0, 0, 0, 0.5); - color: transparent; - border: 1px solid #fff; - border-radius: 10px; - font-size: 0; - transform: translateY(-50%); - cursor: col-resize; - box-sizing: border-box; - z-index: 10; - - &.--left { - left: 5px; - } - - &.--right { - right: 5px; - } - } - } - - &[data-type="emoticon"] { - font-size: 0; - text-align: center; - - .img, - svg { - display: inline-block; - width: 150px; - vertical-align: top; - } - } - - &[data-type="ul"] { - li { - position: relative; - padding-left: 15px; - margin-bottom: 5px; - line-height: 1.7; - outline: 0; - - &::before { - position: absolute; - content: ""; - top: 11px; - left: 0; - width: 5px; - height: 5px; - background: #333; - border-radius: 50%; - } - - &:last-child { - border-bottom: 0; - } - - &:empty { - min-height: 1.7em; - - &::after { - display: inline; - content: "Add text"; - color: #ccc; - cursor: text; - } - } - } - } - - &[data-type="ol"] { - padding-left: 20px; - list-style-type: decimal; - - &[data-style="upper-alpha"] { - list-style-type: upper-alpha; - } - - &[data-style="lower-alpha"] { - list-style-type: lower-alpha; - } - - &[data-style="upper-roman"] { - padding-left: 40px; - list-style-type: upper-roman; - } - - &[data-style="lower-roman"] { - padding-left: 40px; - list-style-type: lower-roman; - } - - li { - margin-bottom: 5px; - outline: 0; - line-height: 1.7; - list-style-type: inherit; - - &:last-child { - border-bottom: 0; - } - - &:empty { - min-height: 1.7em; - - &::after { - display: inline; - content: "Add text"; - color: #ccc; - cursor: text; - } - } - } - } - - &[data-type="quote"] { - text-align: center; - - p { - outline: 0; - } - - .editor-text { - font-weight: bold; - - &:empty { - &::before { - display: inline; - content: "“Quote”"; - color: #ccc; - cursor: text; - } - - &::after { - display: none; - } - } - - &::before { - display: inline; - content: "“"; - } - - &::after { - display: inline; - content: "”"; - } - } - - .editor-author { - color: #666; - font-size: 12px; - - &:empty { - &::before { - display: inline; - content: "- Author -"; - font-size: 12px; - color: #ccc; - cursor: text; - } - - &::after { - display: none; - } - } - - &::before { - display: inline; - content: "- "; - } - - &::after { - display: inline; - content: " -"; - } - } - } - - &[data-type="table"] { - position: relative; - width: 100%; - - .editor-scroll { - width: 100%; - overflow-x: auto; - } - - .editor-table { - width: 100%; - border-collapse: separate; - table-layout: fixed; - - @for $i from 1 through 14 { - col[data-size="#{50 * $i}"] { - width: 50px * $i; - } - } - - caption { - outline: 0; - - &:empty::before { - display: inline; - content: "Table name"; - color: #ccc; - } - } - - tr { - &:first-child { - th, - td { - border-top-width: 1px; - } - - th:first-child, - td:first-child { - border-top-left-radius: 2px; - overflow: hidden; - } - - th:last-child, - td:last-child { - border-top-right-radius: 2px; - overflow: hidden; - } - } - - &:last-child { - th:first-child, - td:first-child { - border-bottom-left-radius: 2px; - overflow: hidden; - } - - th:last-child, - td:last-child { - border-bottom-right-radius: 2px; - overflow: hidden; - } - } - - th, - td { - height: 1.7em; - padding: 5px; - border: 0px solid #ccc; - border-right-width: 1px; - border-bottom-width: 1px; - word-break: break-word; - white-space: pre-wrap; - outline: 0; - - &:first-child { - border-left-width: 1px; - } - } - - th { - background: #f1f1f1; - } - } - } - } - - &[data-type="codeblock"] { - border-radius: 2px; - - &::before { - display: block; - content: attr(data-lang); - padding: 0 10px; - color: #7b7b7b; - font-size: 10px; - text-align: right; - } - - code { - display: block; - padding: 5px 10px 10px; - font-family: Inconsolata, sans-serif; - outline: 0; - overflow-x: auto; - - &:empty::after { - display: inline; - content: "Write Code"; - color: #ccc; - } - } - - /* codeblock theme */ - &[data-theme="default"] { - background: #f0f0f0; - color: #444; - - &::before { - color: #c1c1c1; - } - - .hljs-subst { - color: #444; - } - - .hljs-comment { - color: #888; - } - - .hljs-keyword, - .hljs-attribute, - .hljs-selector-tag, - .hljs-meta-keyword, - .hljs-doctag, - .hljs-name { - font-weight: bold; - } - - .hljs-type, - .hljs-string, - .hljs-number, - .hljs-selector-id, - .hljs-selector-class, - .hljs-quote, - .hljs-template-tag, - .hljs-deletion { - color: #880000; - } - - .hljs-title, - .hljs-section { - color: #880000; - font-weight: bold; - } - - .hljs-regexp, - .hljs-symbol, - .hljs-variable, - .hljs-template-variable, - .hljs-link, - .hljs-selector-attr, - .hljs-selector-pseudo { - color: #bc6060; - } - - .hljs-literal { - color: #78a960; - } - - .hljs-built_in, - .hljs-bullet, - .hljs-code, - .hljs-addition { - color: #397300; - } - - .hljs-meta { - color: #1f7199; - } - - .hljs-meta-string { - color: #4d99bf; - } - - .hljs-emphasis { - font-style: italic; - } - - .hljs-strong { - font-weight: bold; - } - } - - &[data-theme="vs2015"] { - background: #1e1e1e; - color: #dcdcdc; - - .hljs-keyword, - .hljs-literal, - .hljs-symbol, - .hljs-name { - color: #569cd6; - } - - .hljs-link { - color: #569cd6; - text-decoration: underline; - } - - .hljs-built_in, - .hljs-type { - color: #4ec9b0; - } - - .hljs-number, - .hljs-class { - color: #b8d7a3; - } - - .hljs-string, - .hljs-meta-string { - color: #d69d85; - } - - .hljs-regexp, - .hljs-template-tag { - color: #9a5334; - } - - .hljs-subst, - .hljs-function, - .hljs-title, - .hljs-params, - .hljs-formula { - color: #dcdcdc; - } - - .hljs-comment, - .hljs-quote { - color: #57a64a; - font-style: italic; - } - - .hljs-doctag { - color: #608b4e; - } - - .hljs-meta, - .hljs-meta-keyword, - .hljs-tag { - color: #9b9b9b; - } - - .hljs-variable, - .hljs-template-variable { - color: #bd63c5; - } - - .hljs-attr, - .hljs-attribute, - .hljs-builtin-name { - color: #9cdcfe; - } - - .hljs-section { - color: gold; - } - - .hljs-emphasis { - font-style: italic; - } - - .hljs-strong { - font-weight: bold; - } - - .hljs-bullet, - .hljs-selector-tag, - .hljs-selector-id, - .hljs-selector-class, - .hljs-selector-attr, - .hljs-selector-pseudo { - color: #d7ba7d; - } - - .hljs-addition { - display: inline-block; - width: 100%; - background-color: #144212; - } - - .hljs-deletion { - display: inline-block; - width: 100%; - background-color: #600; - } - } - - &[data-theme="androidstudio"] { - background: #282b2e; - color: #a9b7c6; - - .hljs-number, - .hljs-literal, - .hljs-symbol, - .hljs-bullet { - color: #6897bb; - } - - .hljs-keyword, - .hljs-selector-tag, - .hljs-deletion { - color: #cc7832; - } - - .hljs-variable, - .hljs-template-variable, - .hljs-link { - color: #629755; - } - - .hljs-comment, - .hljs-quote { - color: #808080; - } - - .hljs-meta { - color: #bbb529; - } - - .hljs-string, - .hljs-attribute, - .hljs-addition { - color: #6a8759; - } - - .hljs-section, - .hljs-title, - .hljs-type { - color: #ffc66d; - } - - .hljs-name, - .hljs-selector-id, - .hljs-selector-class { - color: #e8bf6a; - } - - .hljs-emphasis { - font-style: italic; - } - - .hljs-strong { - font-weight: bold; - } - } - - &[data-theme="monokai"] { - background: #272822; - color: #ddd; - - .hljs-tag, - .hljs-keyword, - .hljs-selector-tag, - .hljs-literal, - .hljs-strong, - .hljs-name { - color: #f92672; - } - - .hljs-code { - color: #66d9ef; - } - - .hljs-class .hljs-title { - color: white; - } - - .hljs-attribute, - .hljs-symbol, - .hljs-regexp, - .hljs-link { - color: #bf79db; - } - - .hljs-string, - .hljs-bullet, - .hljs-subst, - .hljs-title, - .hljs-section, - .hljs-emphasis, - .hljs-type, - .hljs-built_in, - .hljs-builtin-name, - .hljs-selector-attr, - .hljs-selector-pseudo, - .hljs-addition, - .hljs-variable, - .hljs-template-tag, - .hljs-template-variable { - color: #a6e22e; - } - - .hljs-comment, - .hljs-quote, - .hljs-deletion, - .hljs-meta { - color: #75715e; - } - - .hljs-keyword, - .hljs-selector-tag, - .hljs-literal, - .hljs-doctag, - .hljs-title, - .hljs-section, - .hljs-type, - .hljs-selector-id { - font-weight: bold; - } - } - } - - &[data-type="youtube"] { - position: relative; - width: 100%; - height: 0; - padding-bottom: 56.25%; - z-index: 10; - - .editor-iframe { - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - border: 0; - } - } - - &[data-type="codepen"] { - position: relative; - - &.--act::before { - display: block; - content: ""; - position: absolute; - top: 0; - left: 0; - right: 0; - bottom: 0; - z-index: 20; - } - - .editor-iframe { - display: block; - position: relative; - width: 100%; - border: 0; - z-index: 10; - } - - .editor-btn-resize { - position: absolute; - left: 50%; - bottom: 10px; - width: 100px; - height: 6px; - background: rgba(0, 0, 0, 0.5); - color: transparent; - border: 1px solid #fff; - border-radius: 10px; - font-size: 0; - transform: translateX(-50%); - cursor: row-resize; - box-sizing: border-box; - z-index: 30; - } - } - - &[data-type="linkbox"] { - text-align: center; - - .editor-linkbox { - display: inline-block; - width: 300px; - background: #fff; - color: #333; - border: 1px solid #ccc; - border-radius: 2px; - overflow: hidden; - } - - .editor-linkbox-img { - position: relative; - width: 100%; - height: 0; - padding-bottom: 50%; - border-bottom: 1px solid #ccc; - overflow: hidden; - - .editor-img { - position: absolute; - top: 50%; - left: 0; - width: 100%; - transform: translateY(-50%); - } - } - - .editor-linkbox-text { - padding: 10px; - font-size: 14px; - text-align: left; - - .editor-title { - @include ellipsis; - } - - .editor-description { - color: #999; - @include ellipsis; - } - - .editor-domain { - color: #3f80e9; - font-size: 12px; - text-align: right; - } - } - } -} - -@mixin mobile-item { - .editor-item { - &[data-type="linkbox"] { - .editor-linkbox { - width: 100%; - font-size: 0; - } - - .editor-linkbox-img { - display: inline-block; - width: 100px; - height: 100px; - padding-bottom: 0; - border-bottom: 0; - border-right: 1px solid #ccc; - vertical-align: middle; - } - - .editor-linkbox-text { - display: inline-block; - width: calc(100% - 101px); - box-sizing: border-box; - vertical-align: middle; - } - } - } -} diff --git a/old/resources/css/module/_scroll.scss b/old/resources/css/module/_scroll.scss deleted file mode 100644 index fd6edc3..0000000 --- a/old/resources/css/module/_scroll.scss +++ /dev/null @@ -1,26 +0,0 @@ -.editor-scroll { - position: relative; - overflow: hidden; - - .editor-scroll-content { - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - padding-right: 30px; - overflow-y: auto; - box-sizing: content-box; - } - - .scroll-bar { - position: absolute; - top: 4px; - right: 3px; - width: 4px; - background: #d2d4d7; - border-radius: 4px; - cursor: default; - transition: transform 0.3s ease; - } -} diff --git a/old/resources/css/viewer.scss b/old/resources/css/viewer.scss deleted file mode 100644 index 01fe199..0000000 --- a/old/resources/css/viewer.scss +++ /dev/null @@ -1,782 +0,0 @@ -@import "include/variables"; -@import "include/mixin"; - -.editor-clearfix::after { - display: block; - content: ""; - clear: both; -} - -.editor-dragon-viewer { - .editor-item:not([data-type="codeblock"]) code { - padding: 2px 5px; - margin: 0 5px; - background: #f1f1f1; - color: #c52e2e; - border-radius: 2px; - font-family: Inconsolata, sans-serif; - } - - @each $size in $font-size-list { - *[data-fontsize="#{'' + $size}"] { - font-size: #{$size + "em"}; - } - } - - @each $color in $color-list { - *[data-color="#{'' + $color}"] { - color: $color; - } - } - - @for $i from 1 through 3 { - *[data-depth="#{'' + $i}"] { - margin-left: (20px * $i); - } - } - - *[data-align="left"] { - text-align: left; - } - - *[data-align="center"] { - text-align: center; - } - - *[data-align="right"] { - text-align: right; - } - - *[data-bold="true"] { - font-weight: bold; - } - - *[data-italic="true"] { - font-style: italic; - } - - *[data-underline="true"] { - text-decoration: underline; - } - - *[data-strikethrough="true"] { - text-decoration: line-through; - } -} - -.editor-item { - margin-bottom: 10px; - font-size: inherit; - line-height: 1.7; - outline: 0; - - .editor-edit { - position: absolute; - top: 5px; - right: 5px; - padding: 10px; - background: #000; - color: #fff; - border: 1px solid #fff; - border-radius: 2px; - z-index: 30; - } - - &[data-type="text"] { - &:empty { - min-height: 1.7em; - } - } - - &[data-type="image"] { - font-size: 0; - - .editor-size { - display: inline-block; - position: relative; - width: 100%; - } - - @for $i from 1 through 14 { - .editor-size[data-width="#{50 * $i}"] { - max-width: 50px * $i; - } - } - - .editor-caption { - padding: 5px; - color: #999; - font-size: 12px; - outline: 0; - } - - .editor-img { - width: 100%; - } - } - - &[data-type="emoticon"] { - font-size: 0; - text-align: center; - - .img, - svg { - display: inline-block; - width: 150px; - vertical-align: top; - } - } - - &[data-type="ul"] { - li { - position: relative; - padding-left: 15px; - margin-bottom: 5px; - font-size: inherit; - outline: 0; - - &::before { - position: absolute; - content: ""; - top: 11px; - left: 0; - width: 5px; - height: 5px; - background: #333; - border-radius: 50%; - } - - &:last-child { - border-bottom: 0; - } - - &:empty { - min-height: 1.7em; - } - } - } - - &[data-type="ol"] { - padding-left: 20px; - list-style-type: decimal; - - &[data-style="upper-alpha"] { - list-style-type: upper-alpha; - } - - &[data-style="lower-alpha"] { - list-style-type: lower-alpha; - } - - &[data-style="upper-roman"] { - padding-left: 40px; - list-style-type: upper-roman; - } - - &[data-style="lower-roman"] { - padding-left: 40px; - list-style-type: lower-roman; - } - - li { - margin-bottom: 5px; - font-size: inherit; - outline: 0; - list-style-type: inherit; - - &:last-child { - border-bottom: 0; - } - - &:empty { - min-height: 1.7em; - } - } - } - - &[data-type="quote"] { - text-align: center; - - p { - outline: 0; - } - - .editor-text { - font-weight: bold; - - &:empty { - &::before { - display: inline; - content: "“”"; - color: #ccc; - cursor: text; - } - - &::after { - display: none; - } - } - - &::before { - display: inline; - content: "“"; - } - - &::after { - display: inline; - content: "”"; - } - } - - .editor-author { - color: #666; - font-size: 12px; - - &:empty { - &::before { - display: inline; - content: "- -"; - color: #ccc; - cursor: text; - } - - &::after { - display: none; - } - } - - &::before { - display: inline; - content: "- "; - } - - &::after { - display: inline; - content: " -"; - } - } - } - - &[data-type="table"] { - position: relative; - width: 100%; - - .editor-scroll { - width: 100%; - overflow-x: auto; - } - - .editor-table { - width: 100%; - border-collapse: separate; - table-layout: fixed; - - @for $i from 1 through 14 { - col[data-size="#{50 * $i}"] { - width: 50px * $i; - } - } - - caption { - outline: 0; - } - - tr { - &:first-child { - th, - td { - border-top-width: 1px; - } - - th:first-child, - td:first-child { - border-top-left-radius: 2px; - overflow: hidden; - } - - th:last-child, - td:last-child { - border-top-right-radius: 2px; - overflow: hidden; - } - } - - &:last-child { - th:first-child, - td:first-child { - border-bottom-left-radius: 2px; - overflow: hidden; - } - - th:last-child, - td:last-child { - border-bottom-right-radius: 2px; - overflow: hidden; - } - } - - th, - td { - height: 1.7em; - padding: 5px; - border: 0px solid #ccc; - border-right-width: 1px; - border-bottom-width: 1px; - word-break: break-word; - white-space: pre-wrap; - outline: 0; - - &:first-child { - border-left-width: 1px; - } - } - - th { - background: #f1f1f1; - } - } - } - } - - &[data-type="codeblock"] { - border-radius: 2px; - - &::before { - display: block; - content: attr(data-lang); - padding: 0 10px; - color: #7b7b7b; - font-size: 10px; - text-align: right; - } - - code { - display: block; - padding: 5px 10px 10px; - font-family: Inconsolata, sans-serif; - word-wrap: break-word; - word-break: keep-all; - white-space: pre-wrap; - outline: 0; - } - - /* codeblock theme */ - &[data-theme="default"] { - background: #f0f0f0; - color: #444; - - &::before { - color: #c1c1c1; - } - - .hljs-subst { - color: #444; - } - - .hljs-comment { - color: #888; - } - - .hljs-keyword, - .hljs-attribute, - .hljs-selector-tag, - .hljs-meta-keyword, - .hljs-doctag, - .hljs-name { - font-weight: bold; - } - - .hljs-type, - .hljs-string, - .hljs-number, - .hljs-selector-id, - .hljs-selector-class, - .hljs-quote, - .hljs-template-tag, - .hljs-deletion { - color: #880000; - } - - .hljs-title, - .hljs-section { - color: #880000; - font-weight: bold; - } - - .hljs-regexp, - .hljs-symbol, - .hljs-variable, - .hljs-template-variable, - .hljs-link, - .hljs-selector-attr, - .hljs-selector-pseudo { - color: #bc6060; - } - - .hljs-literal { - color: #78a960; - } - - .hljs-built_in, - .hljs-bullet, - .hljs-code, - .hljs-addition { - color: #397300; - } - - .hljs-meta { - color: #1f7199; - } - - .hljs-meta-string { - color: #4d99bf; - } - - .hljs-emphasis { - font-style: italic; - } - - .hljs-strong { - font-weight: bold; - } - } - - &[data-theme="vs2015"] { - background: #1e1e1e; - color: #dcdcdc; - - .hljs-keyword, - .hljs-literal, - .hljs-symbol, - .hljs-name { - color: #569cd6; - } - - .hljs-link { - color: #569cd6; - text-decoration: underline; - } - - .hljs-built_in, - .hljs-type { - color: #4ec9b0; - } - - .hljs-number, - .hljs-class { - color: #b8d7a3; - } - - .hljs-string, - .hljs-meta-string { - color: #d69d85; - } - - .hljs-regexp, - .hljs-template-tag { - color: #9a5334; - } - - .hljs-subst, - .hljs-function, - .hljs-title, - .hljs-params, - .hljs-formula { - color: #dcdcdc; - } - - .hljs-comment, - .hljs-quote { - color: #57a64a; - font-style: italic; - } - - .hljs-doctag { - color: #608b4e; - } - - .hljs-meta, - .hljs-meta-keyword, - .hljs-tag { - color: #9b9b9b; - } - - .hljs-variable, - .hljs-template-variable { - color: #bd63c5; - } - - .hljs-attr, - .hljs-attribute, - .hljs-builtin-name { - color: #9cdcfe; - } - - .hljs-section { - color: gold; - } - - .hljs-emphasis { - font-style: italic; - } - - .hljs-strong { - font-weight: bold; - } - - .hljs-bullet, - .hljs-selector-tag, - .hljs-selector-id, - .hljs-selector-class, - .hljs-selector-attr, - .hljs-selector-pseudo { - color: #d7ba7d; - } - - .hljs-addition { - display: inline-block; - width: 100%; - background-color: #144212; - } - - .hljs-deletion { - display: inline-block; - width: 100%; - background-color: #600; - } - } - - &[data-theme="androidstudio"] { - background: #282b2e; - color: #a9b7c6; - - .hljs-number, - .hljs-literal, - .hljs-symbol, - .hljs-bullet { - color: #6897bb; - } - - .hljs-keyword, - .hljs-selector-tag, - .hljs-deletion { - color: #cc7832; - } - - .hljs-variable, - .hljs-template-variable, - .hljs-link { - color: #629755; - } - - .hljs-comment, - .hljs-quote { - color: #808080; - } - - .hljs-meta { - color: #bbb529; - } - - .hljs-string, - .hljs-attribute, - .hljs-addition { - color: #6a8759; - } - - .hljs-section, - .hljs-title, - .hljs-type { - color: #ffc66d; - } - - .hljs-name, - .hljs-selector-id, - .hljs-selector-class { - color: #e8bf6a; - } - - .hljs-emphasis { - font-style: italic; - } - - .hljs-strong { - font-weight: bold; - } - } - - &[data-theme="monokai"] { - background: #272822; - color: #ddd; - - .hljs-tag, - .hljs-keyword, - .hljs-selector-tag, - .hljs-literal, - .hljs-strong, - .hljs-name { - color: #f92672; - } - - .hljs-code { - color: #66d9ef; - } - - .hljs-class .hljs-title { - color: white; - } - - .hljs-attribute, - .hljs-symbol, - .hljs-regexp, - .hljs-link { - color: #bf79db; - } - - .hljs-string, - .hljs-bullet, - .hljs-subst, - .hljs-title, - .hljs-section, - .hljs-emphasis, - .hljs-type, - .hljs-built_in, - .hljs-builtin-name, - .hljs-selector-attr, - .hljs-selector-pseudo, - .hljs-addition, - .hljs-variable, - .hljs-template-tag, - .hljs-template-variable { - color: #a6e22e; - } - - .hljs-comment, - .hljs-quote, - .hljs-deletion, - .hljs-meta { - color: #75715e; - } - - .hljs-keyword, - .hljs-selector-tag, - .hljs-literal, - .hljs-doctag, - .hljs-title, - .hljs-section, - .hljs-type, - .hljs-selector-id { - font-weight: bold; - } - } - } - - &[data-type="youtube"] { - position: relative; - width: 100%; - height: 0; - padding-bottom: 56.25%; - z-index: 10; - - .editor-iframe { - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - border: 0; - } - } - - &[data-type="codepen"] { - position: relative; - - .editor-iframe { - display: block; - position: relative; - width: 100%; - border: 0; - z-index: 10; - } - } - - &[data-type="linkbox"] { - text-align: center; - - .editor-linkbox { - display: inline-block; - width: 300px; - background: #fff; - color: #333; - border: 1px solid #ccc; - border-radius: 2px; - overflow: hidden; - } - - .editor-linkbox-img { - position: relative; - width: 100%; - height: 0; - padding-bottom: 50%; - border-bottom: 1px solid #ccc; - overflow: hidden; - - .editor-img { - position: absolute; - top: 50%; - left: 0; - width: 100%; - transform: translateY(-50%); - } - } - - .editor-linkbox-text { - padding: 10px; - font-size: 14px; - text-align: left; - - .editor-title { - @include ellipsis; - } - - .editor-description { - color: #999; - @include ellipsis; - } - - .editor-domain { - color: #3f80e9; - font-size: 12px; - text-align: right; - } - } - } -} - -@media all and (max-width: 800px) { - .editor-item { - &[data-type="linkbox"] { - .editor-linkbox { - width: 100%; - font-size: 0; - } - - .editor-linkbox-img { - display: inline-block; - width: 100px; - height: 100px; - padding-bottom: 0; - border-bottom: 0; - border-right: 1px solid #ccc; - vertical-align: middle; - } - - .editor-linkbox-text { - display: inline-block; - width: calc(100% - 101px); - box-sizing: border-box; - vertical-align: middle; - } - } - } -} diff --git a/old/resources/dataSample.json b/old/resources/dataSample.json deleted file mode 100644 index 3290bba..0000000 --- a/old/resources/dataSample.json +++ /dev/null @@ -1,261 +0,0 @@ -{ - "en": [ - { - "type": "text", - "option": { - "color": "", - "fontSize": "", - "align": "", - "bold": "", - "italic": "", - "underline": "", - "strikethrough": "", - "wordblock": "" - }, - "textContent": "" - }, - { - "type": "image", - "option": { - "color": "", - "fontSize": "", - "align": "", - "bold": "", - "italic": "", - "underline": "", - "strikethrough": "", - "wordblock": "" - }, - "hasWebp": false, - "itemWidth": "700", - "width": "640", - "height": "427", - "alt": "cat", - "src": "https://sample.com/imageName", - "defaultFormat": "jpg", - "caption": { - "option": { - "color": "", - "fontSize": "", - "align": "", - "bold": "", - "italic": "", - "underline": "", - "strikethrough": "", - "wordblock": "" - }, - "textContent": "cat" - } - }, - { - "type": "ul", - "child": [ - { - "option": { - "color": "", - "fontSize": "", - "align": "", - "bold": "", - "italic": "", - "underline": "", - "strikethrough": "", - "wordblock": "" - }, - "textContent": "" - } - ] - }, - { - "type": "ol", - "style": "number", - "child": [ - { - "option": { - "color": "", - "fontSize": "", - "align": "", - "bold": "", - "italic": "", - "underline": "", - "strikethrough": "", - "wordblock": "" - }, - "textContent": "" - } - ] - }, - { - "type": "quote", - "style": "default", - "text": "", - "author": "" - }, - { - "type": "table", - "caption": { - "option": { - "color": "", - "fontSize": "", - "align": "", - "bold": "", - "italic": "", - "underline": "", - "strikethrough": "", - "wordblock": "" - }, - "textContent": "" - }, - "colgroup": ["100", "100", "100", "100"], - "body": [ - [ - { - "tag": "th", - "option": { - "color": "", - "fontSize": "", - "align": "", - "bold": "", - "italic": "", - "underline": "", - "strikethrough": "", - "wordblock": "" - }, - "textContent": "" - }, - { - "tag": "th", - "option": { - "color": "", - "fontSize": "", - "align": "", - "bold": "", - "italic": "", - "underline": "", - "strikethrough": "", - "wordblock": "" - }, - "textContent": "" - }, - { - "tag": "th", - "option": { - "color": "", - "fontSize": "", - "align": "", - "bold": "", - "italic": "", - "underline": "", - "strikethrough": "", - "wordblock": "" - }, - "textContent": "" - }, - { - "tag": "th", - "option": { - "color": "", - "fontSize": "", - "align": "", - "bold": "", - "italic": "", - "underline": "", - "strikethrough": "", - "wordblock": "" - }, - "textContent": "" - } - ], - [ - { - "tag": "td", - "option": { - "color": "", - "fontSize": "", - "align": "", - "bold": "", - "italic": "", - "underline": "", - "strikethrough": "", - "wordblock": "" - }, - "textContent": "" - }, - { - "tag": "td", - "option": { - "color": "", - "fontSize": "", - "align": "", - "bold": "", - "italic": "", - "underline": "", - "strikethrough": "", - "wordblock": "" - }, - "textContent": "" - }, - { - "tag": "td", - "option": { - "color": "", - "fontSize": "", - "align": "", - "bold": "", - "italic": "", - "underline": "", - "strikethrough": "", - "wordblock": "" - }, - "textContent": "" - }, - { - "tag": "td", - "option": { - "color": "", - "fontSize": "", - "align": "", - "bold": "", - "italic": "", - "underline": "", - "strikethrough": "", - "wordblock": "" - }, - "textContent": "" - } - ] - ] - }, - { - "type": "linkbox", - "url": "https://dico.me", - "imgSrc": "https://dico.me/img/dico.png", - "title": "정보처리기사 2020 필기 1,2회 61~80번 문제 - Dico", - "description": "정보처리기사 필기 1,2회 61~80", - "domain": "dico.me" - }, - { - "type": "emoticon", - "code": "" - }, - { - "type": "youtube", - "code": "HRMpdT09WY0" - }, - { - "type": "codepen", - "nickname": "lovefield", - "code": "NdGVMG", - "height": "300" - }, - { - "type": "codeblock", - "theme": "monokai", - "lang": "html", - "code": { - "class": ["html", "editor-code", "djs-code", "hljs", "xml"], - "textContent": "<!doctype html>\n<html lang=\"ko\">" - } - } - ], - "ko": [] -} diff --git a/old/resources/js/index.js b/old/resources/js/index.js deleted file mode 100644 index 6bea0c1..0000000 --- a/old/resources/js/index.js +++ /dev/null @@ -1,67 +0,0 @@ -const { typeCheckThrow } = require("./module/default"); -const { storage } = require("./module/condition"); -const { makeView, setEmoticonLayout, setMediaList, getContentData, addBlockToContent } = require("./module/layout"); -const { refreshScroll } = require("./module/scroll"); -const { setEvent, setEmoticonBtnEvent } = require("./module/event"); -const { jsonToHtml } = require("./module/convertor"); - -module.exports = class { - constructor(options = {}, _0 = typeCheckThrow(options, "object")) { - global.condition = new storage(options); - condition.wrap.dataset["layout"] = condition.layout; - - makeView(); - condition.setElement(options); - setEvent(); - - return this; - } - - setEmoticon(data, _0 = typeCheckThrow(data, "object")) { - if (condition.useEmoticon == false) { - console.warn(`DRAGON EDITOR - If you want using Emoticon? set "useEmoticion" first.`); - return; - } - - condition.emoticonData = data; - setEmoticonLayout(); - setEmoticonBtnEvent(); - refreshScroll(); - } - - setMedia(data, _0 = typeCheckThrow(data, "array")) { - if (condition.mediaURL == "") { - console.warn(`DRAGON EDITOR - If you want using Media? set "uploadURL" first.`); - return; - } - - setMediaList(data); - refreshScroll(); - } - - setContentData(data, _0 = typeCheckThrow(data, "object")) { - let object = {}; - - for (const [key, value] of Object.entries(data)) { - if (condition.langCategory.indexOf(key) > -1) { - object[key] = value; - } - } - - condition.contentData = object; - condition.areaContent.innerHTML = jsonToHtml(object[condition.lang]); - } - - getContentData() { - condition.contentData[condition.lang] = getContentData(); - return condition.contentData; - } - - addItem(html, _0 = typeCheckThrow(html, "string")) { - addBlockToContent(`
${html}
`); - } - - getStatus() { - return condition; - } -}; diff --git a/old/resources/js/module/clipboard.js b/old/resources/js/module/clipboard.js deleted file mode 100644 index c49a20b..0000000 --- a/old/resources/js/module/clipboard.js +++ /dev/null @@ -1,80 +0,0 @@ -const { typeCheckThrow } = require("./default"); -const { findParentByClass } = require("./selector"); -const { setCursor } = require("./cursor"); -const { fileUpload } = require("./file"); -const { setSelection } = require("./selection"); - -export function contentPasteEvent(e, _0 = typeCheckThrow(e, "event")) { - e.preventDefault(); - - let selection = window.getSelection(); - let $item = findParentByClass(e.target, "djs-item"); - let type = $item.dataset["type"]; - let data = getDataAndKind(e.clipboardData || window.clipboardData); - - if (data.type == "text") { - let textNode; - - if (type != "codeblock") { - data = data.value.replaceAll("\n", "").replaceAll(/ +/g, " "); - } else { - data = data.value; - } - - textNode = document.createTextNode(data); - selection.deleteFromDocument(); - selection.getRangeAt(0).insertNode(textNode); - setCursor(textNode, textNode.length); - - condition.activeItem = $item; - condition.baseNode = textNode; - } else { - if (condition.mediaURL !== "") { - let $form = condition.uploadForm; - let formData = new FormData($form); - - formData.append("type", $form.dataset["type"]); - formData.append("file", data.value); - formData.append("articleIdx", condition.articleIdx); - formData.append("articleTempIdx", condition.articleTempIdx); - - fileUpload(formData); - } else { - console.warn(`DRAGON EDITOR - If you want upload image? set "uploadURL" first.`); - return; - } - } -} - -function getDataAndKind(data, _0 = typeCheckThrow(data, "datatransfer")) { - if (data === false) { - return undefined; - } - - let items = data.items; - - if (items === undefined) { - return undefined; - } - - let count = items.length; - let type, clipboardData; - for (let i = 0; i < count; i += 1) { - if (items[i].type.indexOf("image") === 0) { - type = "image"; - clipboardData = items[i].getAsFile(); - break; - } - - type = "text"; - } - - if (type === "text") { - clipboardData = data.getData("text"); - } - - return { - type: type, - value: clipboardData, - }; -} diff --git a/old/resources/js/module/condition.js b/old/resources/js/module/condition.js deleted file mode 100644 index 77c071a..0000000 --- a/old/resources/js/module/condition.js +++ /dev/null @@ -1,369 +0,0 @@ -const { typeCheckThrow, typeCheckBoolean } = require("./default"); -const { getElement, checkElement } = require("./selector"); -const { message } = require("./message"); - -export class storage { - constructor(options) { - this.wrap = getElement(".editor-dragon", false); - - if (this.wrap == null) { - throw `DRAGON EDITOR - You must be set element has "editor-dragon" class.`; - } - - this.setMessage(options.message); - this.setStatus(options); - } - - setMessage(data = {}, _0 = typeCheckThrow(data, "object")) { - let check = ["apiNotWorking", "wrongItemStructure", "missingSelect", "noContentData"]; - - for (const [key, value] of Object.entries(data)) { - if (check.indexOf(key) > -1) { - message[key] = value; - } else { - console.warn(message.wrongKey("message", key)); - } - } - } - - setStatus(options) { - this.defaultContentData = [{ option: { align: "", bold: "", color: "", fontSize: "", italic: "", strikethrough: "", underline: "", wordblock: "" }, textContent: "", type: "text" }]; - this.popOptionToClose = true; - this.log = []; - this.linkBoxData = {}; - this.langCategory = ["en", "ko"]; - this.windowWidth = window.innerWidth; - this.windowHeight = window.innerHeight; - this.enterCount = 0; - this.activeItem = this.wrap; - this.activeElement = this.wrap; - this.focusNode; - this.baseNode; - this.focusOffset; - this.baseOffset; - this.regList = { - srcURL: new RegExp("(.*)\\.(jpg|png|gif|webp|bmp|jpeg)", "i"), - defaultURL: new RegExp("https?:\\/\\/(\\w*:\\w*@)?[-\\w.]+(:\\d+)?(\\/([\\w\\/_.]*(\\?\\S+)?)?)?", "i"), - youtubeURL: new RegExp("(https:\\/\\/)?(www\\.)?youtu(be)?\\.(be|com)?", "i"), - youtubeCode: new RegExp("((https:\\/\\/)?(www\\.)?youtu(be)?\\.(be|com)\\/(embed\\/|watch\\?v=)?)([^=\\/& :]*)(.*)", "i"), - codepenURL: new RegExp("codepen.io", "g"), - codepenCode: new RegExp("(https:\\/\\/codepen\\.io\\/)(\\w*)\\/(pen|embed)\\/([A-Za-z]*)(.*)", "i"), - }; - this.articleIdx = typeCheckBoolean(options.articleIdx, "number") ? options.articleIdx : 0; - this.articleTempIdx = typeCheckBoolean(options.articleTempIdx, "number") ? options.articleTempIdx : 0; - this.csrfData = typeCheckBoolean(options.csrfData, "object") ? options.csrfData : { name: "", value: "" }; - this.csrfHeader = typeCheckBoolean(options.csrfHeader, "object") ? options.csrfHeader : {}; - this.mode = typeCheckBoolean(options.mode, "string") ? options.mode : "editor"; - this.layout = typeCheckBoolean(options.layout, "string") ? options.layout : "full"; - this.useDefaultIcon = typeCheckBoolean(options.useDefaultIcon, "boolean") ? options.useDefaultIcon : true; - this.multiLang = typeCheckBoolean(options.multiLang, "boolean") ? options.multiLang : true; - this.defaultColor = typeCheckBoolean(options.defaultColor, "string") ? options.defaultColor : "#333"; - this.defaultFontSize = typeCheckBoolean(options.defaultFontSize, "number") ? options.defaultFontSize : 14; - this.changePoint = typeCheckBoolean(options.changePoint, "number") ? options.changePoint : 800; - this.maxImageWidth = typeCheckBoolean(options.maxImageWidth, "number") ? options.maxImageWidth : 700; - this.maxCodepenHeight = typeCheckBoolean(options.maxCodepenHeight, "number") ? options.maxCodepenHeight : 1000; - this.useWebp = typeCheckBoolean(options.useWebp, "boolean") ? options.useWebp : true; - this.useEmoticon = typeCheckBoolean(options.useEmoticon, "boolean") ? options.useEmoticon : false; - this.emoticonData = typeCheckBoolean(options.emoticonData, "object") ? options.emoticonData : {}; - this.codepenTheme = typeCheckBoolean(options.codepenTheme, "string") ? options.codepenTheme : "dark"; - this.blockName = typeCheckBoolean(options.blockName, "object") ? options.blockName : {}; - this.removeMenu = typeCheckBoolean(options.removeMenu, "array") ? options.removeMenu : []; - this.frontSize = typeCheckBoolean(options.frontSize, "array") ? options.frontSize : [0.75, 0.9, 1, 1.15, 1.25, 1.5, 1.75, 1.9, 2, 2.15, 2.25]; - this.codeTheme = typeCheckBoolean(options.codeTheme, "array") ? options.codeTheme : ["default", "vs2015", "androidstudio", "monokai"]; - this.codeLang = typeCheckBoolean(options.codeLang, "array") ? options.codeLang : ["text", "css", "html", "xml", "json", "java", "javascript", "markdown", "objective-c", "php", "python", "sql", "shell", "kotlin", "swift", "yml", "dockerfile", "Nginx conf"]; - this.colorList = typeCheckBoolean(options.colorList, "array") - ? options.colorList - : [ - "#fff", - "#efefef", - "#ccc", - "#999", - "#777", - "#555", - "#333", - "#e6b8af", - "#dd7e6b", - "#cc4125", - "#980000", - "#a61c00", - "#85200c", - "#5b0f00", - "#f4cccc", - "#ea9999", - "#e06666", - "#ff0000", - "#cc0000", - "#990000", - "#660000", - "#fce5cd", - "#f9cb9c", - "#f6b36b", - "#ff9900", - "#e69138", - "#b45f06", - "#783f04", - "#fff2cc", - "#ffe599", - "#ffd966", - "#ffff00", - "#f1c232", - "#bf9000", - "#7f6000", - "#d9ead3", - "#b6d7a8", - "#93c47d", - "#00ff00", - "#6aa84f", - "#38761d", - "#274e13", - "#d0e0e3", - "#a2c4c9", - "#76a5af", - "#00ffff", - "#45818e", - "#134f5c", - "#0c343d", - "#c9daf8", - "#a4c2f4", - "#6d9eeb", - "#4a87e8", - "#3c78d8", - "#1156cc", - "#1c4587", - "#cfe2f3", - "#9fc5e8", - "#6fa8dc", - "#0000ff", - "#3d85c6", - "#0b5394", - "#073763", - "#d9d2e9", - "#b4a7d6", - "#8e7cc3", - "#9900ff", - "#674ea7", - "#351c75", - "#20124d", - "#ead1dc", - "#d5a6bd", - "#c27ba0", - "#ff00ff", - "#a64d79", - "#741b47", - "#4c1130", - ]; - this.addMenu = typeCheckBoolean(options.addMenu, "object") ? options.addMenu : {}; - this.addLang = typeCheckBoolean(options.addLang, "array") ? options.addLang : []; - this.triggerLangChange = typeCheckBoolean(options.triggerLangChange, "function") ? options.triggerLangChange : () => {}; - this.multiUpload = typeCheckBoolean(options.multiUpload, "boolean") ? options.multiUpload : false; - this.defaultLinkBoxImage = typeCheckBoolean(options.defaultLinkBoxImage, "string") ? options.defaultLinkBoxImage : "https://via.placeholder.com/600x300.png"; - this.linkBoxApi = typeCheckBoolean(options.linkBoxApi, "string") ? options.linkBoxApi : ""; - - this.mediaURL = this.setURL(options.mediaURL, "mediaURL"); - this.setLang(options.lang); - this.setContentData(); - this.setBlockMenu(); - this.addLanguage(); - } - - setURL(url = "", type) { - if (url == "") { - return ""; - } - - if (typeCheckBoolean(url, "string") == true) { - if (this.regList["defaultURL"].test(url) == true || url.substr(0, 1) == "/") { - return url; - } else { - console.warn(message.wrongURL(type, url)); - return ""; - } - } else { - console.warn(message.wrongURL(type, url)); - return ""; - } - } - - setLang(lang) { - if (typeCheckBoolean(lang, "undefined") == true) { - this.lang = this.langCategory[0]; - } else { - if (typeCheckBoolean(lang, "string") == true) { - let index = this.langCategory.indexOf(lang); - if (index > -1) { - this.lang = this.langCategory[index]; - } else { - this.langCategory.unshift(lang); - this.lang = this.langCategory[0]; - } - } else { - console.warn(message.wrongValue("lang")); - this.lang = this.langCategory[0]; - } - } - } - - setContentData() { - let data = {}; - - this.langCategory.forEach((lang) => { - data[lang] = []; - }); - - this.contentData = data; - } - - setBlockMenu() { - let defaultMenu = { - textBlock: { - text: "Text", - icon: "#icon-text-block", - type: "block", - }, - imageBlock: { - text: "Image", - icon: "#icon-image-block", - type: "file", - }, - ulBlock: { - text: "Unnumbered list", - icon: "#icon-ul-block", - type: "block", - }, - olBlock: { - text: "Numbered list", - icon: "#icon-ol-block", - type: "block", - }, - quotaionBlock: { - text: "Quotaion", - icon: "#icon-quotaion-block", - type: "block", - }, - tableBlock: { - text: "Table", - icon: "#icon-table-block", - type: "block", - }, - linkboxBlock: { - text: "Link box", - icon: "#icon-linkbox-block", - type: "pop", - }, - emoticonBlock: { - text: "Emoticon", - icon: "#icon-emoticon-block", - type: "pop", - }, - youtubeBlock: { - text: "Youtube", - icon: "#icon-youtube-block", - type: "pop", - }, - codepenBlock: { - text: "Codepen", - icon: "#icon-codepen-block", - type: "pop", - }, - codeBlock: { - text: "Code", - icon: "#icon-code-block", - type: "block", - }, - }; - - for (const [key, value] of Object.entries(this.blockName)) { - if (typeCheckBoolean(value, "string") == true) { - defaultMenu[key].text = value; - } - } - delete this.blockName; - - if (this.mediaURL == "") { - delete defaultMenu.imageBlock; - } - - if (this.useEmoticon == false) { - delete defaultMenu.emoticonBlock; - } - - this.removeMenu.forEach((item) => { - delete defaultMenu[item]; - }); - delete this.removeMenu; - - for (const [key, value] of Object.entries(this.addMenu)) { - defaultMenu[key] = { - type: "custom", - text: value.text, - icon: value.icon, - fn: value.fn, - }; - } - delete this.addMenu; - - this.defaultMenu = defaultMenu; - } - - addLanguage() { - let list = []; - - this.addLang.forEach((lang) => { - if (typeCheckBoolean(lang, "string")) { - if (lang.length == 2) { - list.push(lang); - } - } - }); - - this.langCategory = [...new Set(this.langCategory.concat(list))]; - delete this.addLang; - } - - setElement(data) { - this.scrollArea = getElement(".djs-scroll"); - this.btnToggleTarget = getElement(".djs-toggle-target"); - this.btnAddBlock = getElement(".djs-add-block"); - this.areaContent = getElement(".djs-content", false); - this.popEmoticon = getElement(".djs-emoticon-pop", false); - this.popFolder = getElement(".djs-folder-pop", false); - this.popLinkbox = getElement(".djs-linkbox-pop", false); - this.btnLinkbox = getElement(".djs-linkbox-pop .djs-btn", false); - this.listEmoticon = getElement(".djs-list-emoticon", false); - this.listMedia = getElement(".djs-list-media", false); - this.popOption = getElement(".djs-option-pop", false); - this.btnSwitchDevice = checkElement(data.btnSwitchDevice, ".djs-switch-device", false); - if (condition.multiLang == true) { - this.btnChangeLang = checkElement(data.btnChangeLang, ".djs-change-lang"); - } - // this.btnTextStyle = getElement(".djs-text-style"); - - this.btnEmoticonTapArea = getElement(".djs-emoticon-pop .djs-btn-area", false); - this.btnFontSize = getElement(".djs-change-fontsize"); - this.btnColSize = getElement(".djs-change-colsize"); - this.btnColor = getElement(".djs-change-color"); - this.btnAlign = getElement(".djs-change-align"); - this.btnToggleBold = getElement(".djs-toggle-bold", false); - this.btnToggleItalic = getElement(".djs-toggle-italic", false); - this.btnToggleUnderline = getElement(".djs-toggle-underline", false); - this.btnToggleStrikethrough = getElement(".djs-toggle-strikethrough", false); - this.btnCellControl = getElement(".djs-cell-control"); - - this.btnListType = getElement(".djs-set-list-type"); - this.btnTableHeader = getElement(".djs-table-header", false); - this.btnTableBody = getElement(".djs-table-body", false); - this.btnThemeSet = getElement(".djs-set-theme"); - this.btnLangSet = getElement(".djs-set-lang"); - this.btnItemMobeUp = getElement(".djs-move-up", false); - this.btnItemMobeDown = getElement(".djs-move-down", false); - this.btnWordBlock = getElement(".djs-word-block", false); - this.btnWordLink = getElement(".djs-open-linkbox", false); - this.btnItemDelete = getElement(".djs-delete-block", false); - this.btnAddMedia = getElement(".djs-add-media", false); - - if (condition.mediaURL !== "") { - this.uploadForm = getElement(".djs-uploader", false); - this.uploadInput = getElement(".djs-uploader .djs-file", false); - } - } -} diff --git a/old/resources/js/module/convertor.js b/old/resources/js/module/convertor.js deleted file mode 100644 index 975d37d..0000000 --- a/old/resources/js/module/convertor.js +++ /dev/null @@ -1,370 +0,0 @@ -const { typeCheckThrow } = require("./default"); -const { getTextNodeStyle } = require("./textNode"); -const { getChild } = require("./selector"); - -export function jsonToHtml(json) { - let html = ""; - let option = ""; - - json.forEach(function (item) { - switch (item.type) { - case "text": - for (const [key, value] of Object.entries(item.option)) { - if (value != "") { - option += ` data-${key}="${value}"`; - } - } - - html += `

${item.textContent}

`; - option = ""; - break; - case "image": - for (const [key, value] of Object.entries(item.option)) { - if (value != "") { - option += ` data-${key}="${value}"`; - } - } - - html += `
`; - html += `
`; - - option = ""; - - if (condition.useWebp == true) { - html += ``; - if (item.hasWebp == true) { - html += ``; - } - html += `${item.alt}`; - } else { - html += `${item.alt}`; - } - - for (const [key, value] of Object.entries(item.caption.option)) { - if (value != "") { - option += ` data-${key}="${value}"`; - } - } - - html += ``; - html += `
`; - html += `

${item.caption.textContent}

`; - html += `
`; - option = ""; - break; - case "ul": - let $ulChild = ""; - - item.child.forEach(($child) => { - for (const [key, value] of Object.entries($child.option)) { - if (value != "") { - option += ` data-${key}="${value}"`; - } - } - - $ulChild += `
  • ${$child.textContent}
  • `; - option = ""; - }); - - html += ``; - break; - case "ol": - let $olChild = ""; - - item.child.forEach(($child) => { - for (const [key, value] of Object.entries($child.option)) { - if (value != "") { - option += ` data-${key}="${value}"`; - } - } - - $olChild += `
  • ${$child.textContent}
  • `; - option = ""; - }); - - html += `
      ${$olChild}
    `; - break; - case "quote": - html += `

    ${item.text}

    ${item.author}

    `; - break; - case "table": - let rowNum = 0; - - for (const [key, value] of Object.entries(item.caption.option)) { - if (value != "") { - option += ` data-${key}="${value}"`; - } - } - - html += ` -
    -
    - - - `; - - option = ""; - - item.colgroup.forEach(function (col) { - html += ``; - }); - - html += ""; - - item.body.forEach(function (tr) { - let cellNum = 0; - - html += ""; - - tr.forEach(function (cell) { - for (const [key, value] of Object.entries(cell.option)) { - if (value != "") { - option += ` data-${key}="${value}"`; - } - } - - html += `<${cell.tag} contenteditable="true" data-x="${cellNum}" data-y="${rowNum}"${option}>${cell.textContent}`; - cellNum += 1; - option = ""; - }); - - html += ""; - rowNum += 1; - }); - html += "
    ${item.caption.textContent}
    "; - break; - case "linkbox": - html += ` - - `; - break; - case "emoticon": - if (item.data.type == "image") { - html += `
    ${item.data.caption}
    `; - } else if (item.data.type == "svg") { - html += `
    ${item.data.code}
    `; - } - - break; - - case "youtube": - html += ` -
    - - -
    - `; - break; - case "codepen": - html += ` -
    - - - -
    - `; - break; - case "codeblock": - html += `
    ${item.code.textContent}
    `; - break; - default: - html += `
    ${item.other}
    `; - } - }); - - return html; -} - -export function htmlToJson($nodeList, _0 = typeCheckThrow($nodeList, "nodelist")) { - let arr = []; - - $nodeList.forEach(($item) => { - let type = $item.dataset["type"]; - - switch (type) { - case "text": - arr.push({ - type: "text", - option: getTextNodeStyle($item), - textContent: $item.innerHTML, - }); - break; - case "image": - let hasWebp = $item.dataset["webp"] == "true" ? true : false; - let $img = getChild($item, ".djs-img", false); - let link = $img.getAttribute("src"); - let $imgCaption = getChild($item, ".djs-caption", false); - - arr.push({ - type: "image", - option: getTextNodeStyle($item), - hasWebp: hasWebp, - itemWidth: getChild($item, ".djs-size", false).dataset["width"], - width: $img.getAttribute("width"), - height: $img.dataset["height"], - alt: $img.getAttribute("alt"), - src: link.replace(condition.regList.srcURL, "$1"), - defaultFormat: link.replace(condition.regList.srcURL, "$2"), - caption: { - option: getTextNodeStyle($imgCaption), - textContent: $imgCaption.textContent, - }, - }); - break; - case "ul": - let ulChildList = []; - let $ulChilds = getChild($item, `*[contenteditable="true"]`); - - $ulChilds.forEach(($child) => { - ulChildList.push({ - option: getTextNodeStyle($child), - textContent: $child.innerHTML, - }); - }); - - arr.push({ - type: "ul", - child: ulChildList, - }); - break; - case "ol": - let olChildList = []; - let $olChilds = getChild($item, `*[contenteditable="true"]`); - - $olChilds.forEach(($child) => { - olChildList.push({ - option: getTextNodeStyle($child), - textContent: $child.innerHTML, - }); - }); - - arr.push({ - type: "ol", - style: $item.dataset["style"], - child: olChildList, - }); - break; - case "quote": - arr.push({ - type: "quote", - style: $item.dataset["style"], - text: getChild($item, ".djs-text", false).textContent, - author: getChild($item, ".djs-author", false).textContent, - }); - break; - case "table": - let tableCol = []; - let tableBody = []; - let $colList = getChild($item, "col"); - let $trList = getChild($item, "tbody tr"); - let $tableCaption = getChild($item, ".djs-caption", false); - - $colList.forEach(($col) => { - tableCol.push($col.dataset["size"]); - }); - - $trList.forEach(($tr) => { - let childArr = []; - let $child = getChild($tr, `*[contenteditable="true"]`); - - $child.forEach(($node) => { - childArr.push({ - tag: $node.tagName.toLowerCase(), - option: getTextNodeStyle($node), - textContent: $node.innerHTML, - }); - }); - - tableBody.push(childArr); - }); - - arr.push({ - type: "table", - caption: { - option: getTextNodeStyle($tableCaption), - textContent: $tableCaption.textContent, - }, - colgroup: tableCol, - body: tableBody, - }); - break; - case "linkbox": - arr.push({ - type: "linkbox", - url: getChild($item, ".djs-linkbox", false).getAttribute("href"), - imgSrc: getChild($item, ".djs-img", false).getAttribute("src"), - title: getChild($item, ".djs-title", false).textContent, - description: getChild($item, ".djs-description", false).textContent, - domain: getChild($item, ".djs-domain", false).textContent, - }); - break; - case "emoticon": - let $child = $item.children[0]; - let childTag = $child.tagName; - let emoticonData = {}; - - if (childTag == "IMG") { - emoticonData.type = "image"; - emoticonData.src = $child.src; - emoticonData.caption = $child.alt; - emoticonData.width = parseInt($child.dataset["width"]); - emoticonData.height = parseInt($child.dataset["height"]); - } else if (childTag == "svg") { - emoticonData.type = "svg"; - emoticonData.code = $child.outerHTML; - } - - arr.push({ - type: "emoticon", - data: emoticonData, - }); - break; - case "youtube": - arr.push({ - type: "youtube", - code: $item.dataset["code"], - }); - break; - case "codepen": - arr.push({ - type: "codepen", - nickname: getChild($item, ".djs-iframe", false).dataset["nickname"], - code: getChild($item, ".djs-iframe", false).dataset["code"], - height: getChild($item, ".djs-iframe", false).getAttribute("height"), - }); - break; - case "codeblock": - let $code = getChild($item, ".djs-code", false); - - arr.push({ - type: "codeblock", - theme: $item.dataset["theme"], - lang: $item.dataset["lang"], - code: { - class: [...$code.classList], - textContent: $code.innerHTML, - }, - }); - break; - default: - arr.push({ - type: type, - other: $item.innerHTML, - }); - } - }); - - return arr; -} diff --git a/old/resources/js/module/cursor.js b/old/resources/js/module/cursor.js deleted file mode 100644 index 50f1591..0000000 --- a/old/resources/js/module/cursor.js +++ /dev/null @@ -1,22 +0,0 @@ -const { typeCheckThrow } = require("./default"); -const { setSelection } = require("./selection"); - -export function setCursor($node, position, _0 = typeCheckThrow($node, "node"), _1 = typeCheckThrow(position, "number")) { - let select = window.getSelection(); - let range = document.createRange(); - - range.setStart($node, position); - range.collapse(true); - select.removeAllRanges(); - select.addRange(range); - - setSelection(); -} - -export function isTextSelect() { - if (condition.focusNode == condition.baseNode && condition.focusOffset == condition.baseOffset) { - return false; - } else { - return true; - } -} diff --git a/old/resources/js/module/default.js b/old/resources/js/module/default.js deleted file mode 100644 index 94c81e4..0000000 --- a/old/resources/js/module/default.js +++ /dev/null @@ -1,196 +0,0 @@ -const { message } = require("./message"); - -export function typeCheckThrow(target, type) { - if (type !== "*") { - if (typeof type === "string") { - let typeofValue = typeof target; - let typeArr = type.split(","); - let instanseName; - - if (typeofValue !== "object") { - instanseName = typeofValue; - } else { - if (target.addEventListener !== undefined) { - instanseName = "node"; - } else { - if (target instanceof Event) { - instanseName = "event"; - } else { - instanseName = target.constructor.name.toLowerCase(); - } - } - } - - if (typeArr.indexOf(instanseName) == -1) { - throw `DRAGON EDITOR - invalid type ${target} : ${typeArr.join(",")}`; - } - } else { - throw `DRAGON EDITOR - type augment is must be String : ${type}`; - } - } - - return target; -} - -export function typeCheckBoolean(target, type) { - let status = true; - - if (type !== "*") { - if (typeof type === "string") { - let typeofValue = typeof target; - let typeArr = type.split(","); - let instanseName; - - if (typeofValue !== "object") { - instanseName = typeofValue; - } else { - if (target.addEventListener !== undefined) { - instanseName = "node"; - } else { - if (target instanceof Event) { - instanseName = "event"; - } else { - instanseName = target.constructor.name.toLowerCase(); - } - } - } - - if (typeArr.indexOf(instanseName) == -1) { - status = false; - } - } else { - status = false; - } - } - - return status; -} - -export function eventBinding($node, type, fn, useCapture = false, _0 = typeCheckThrow($node, "*"), _1 = typeCheckThrow(type, "string"), _2 = typeCheckThrow(fn, "function"), _3 = typeCheckThrow(useCapture, "boolean")) { - let typeList = type.split(","); - - if ($node.forEach != undefined) { - $node.forEach(($item) => { - typeList.forEach((eventName) => { - $item.addEventListener(eventName, fn, true); - }); - }); - } else if ($node.addEventListener != undefined) { - typeList.forEach((eventName) => { - $node.addEventListener(eventName, fn, true); - }); - } -} - -export function removeEvent($node, type, fn, _0 = typeCheckThrow($node, "object"), _1 = typeCheckThrow(type, "string"), _2 = typeCheckThrow(fn, "function")) { - let typeList = type.split(","); - - if ($node.forEach != undefined) { - $node.forEach(($item) => { - typeList.forEach((eventName) => { - $item.removeEventListener(eventName, fn, true); - }); - }); - } else { - typeList.forEach((eventName) => { - $node.removeEventListener(eventName, fn, true); - }); - } -} - -export function classControl($node, action, className, _0 = typeCheckThrow($node, "*"), _1 = typeCheckThrow(action, "string"), _2 = typeCheckThrow(className, "string")) { - if ($node.forEach != undefined) { - $node.forEach(($item) => { - if (action == "add") { - $item.classList.add(className); - } else if (action == "remove") { - $item.classList.remove(className); - } else if (action == "toggle") { - $item.classList.toggle(className); - } - }); - } else if ($node.addEventListener != undefined) { - if (action == "add") { - $node.classList.add(className); - } else if (action == "remove") { - $node.classList.remove(className); - } else if (action == "toggle") { - $node.classList.toggle(className); - } - } -} - -export function hasClass($node, className, _0 = typeCheckThrow($node, "node"), _1 = typeCheckThrow(className, "string")) { - let value = false; - let nameList = className.split("."); - - nameList.some((name) => { - if (name !== "") { - if ($node.classList.contains(name)) { - value = true; - } else { - value = false; - } - - return value == false; - } - }); - - return value; -} - -export function fetchURL(url, option = {}, type = "form", _0 = typeCheckThrow(url, "string"), _1 = typeCheckThrow(option, "object"), _2 = typeCheckThrow(type, "string")) { - let formData = new FormData(); - let csrfHeader = Object.entries(condition.csrfHeader); - - if (type == "json") { - for (let key in option.body) { - formData.append(key, option.body[key]); - } - - option.body = formData; - } - - if (csrfHeader.length > 0) { - option.headers = new Headers(condition.csrfHeader); - } - - return fetch(url, option) - .then((res) => { - if (res.ok == false) { - throw new Error(message.serverNotWorking); - } - - return res.json(); - }) - .catch((error) => { - return { - respon: false, - error: error, - }; - }); -} - -export function upperFirstChar(text, _0 = typeCheckThrow(text, "string")) { - return text.charAt(0).toUpperCase() + text.slice(1); -} - -export function isMobile() { - if (condition.windowWidth < condition.changePoint) { - return true; - } else { - return false; - } -} - -export function hasValueArrToArr(baseArr, inputArr, _0 = typeCheckThrow(baseArr, "array"), _1 = typeCheckThrow(inputArr, "array")) { - let boolean = false; - - inputArr.forEach((item) => { - if (baseArr.indexOf(item) > -1) { - boolean = true; - } - }); - - return boolean; -} diff --git a/old/resources/js/module/event.js b/old/resources/js/module/event.js deleted file mode 100644 index 0bdddc0..0000000 --- a/old/resources/js/module/event.js +++ /dev/null @@ -1,810 +0,0 @@ -const { typeCheckThrow, eventBinding, classControl, hasClass, fetchURL, isMobile } = require("./default"); -const { getElement, findParentByClass, getChild, findContenteditable } = require("./selector"); -const { setScroll, getScrollInfo } = require("./scroll"); -const { getDefaultBlockHTML, getYoutubeBlock, getCodepenBlock, getLinkboxBlock, setEmoticonList, getEmoticonBlockHTML, addBlockToContent, getImageBlockHTML, getContentData } = require("./layout"); -const { itemClickEvent, itemKeyboardEvent, itemStructureValidation, itemMove } = require("./item"); -const { openFile, fileUpload, mediaNameUpdate } = require("./file"); -const { openPop, closeOptionPop, openOptionPop, openLinkPop } = require("./pop"); -const { contentPasteEvent } = require("./clipboard"); -const { jsonToHtml } = require("./convertor"); -const { textNodeStyleing } = require("./textNode"); -const { changeTableCell, tableCellControl, setTableColSize } = require("./table"); -const { message } = require("./message"); - -export function setEvent() { - setGlobalEvent(); - setMenuEvent(); - setScroll(); - setContentEvent(); - setOptionEvent(); -} - -function setGlobalEvent() { - // window size update & option pop close - let resizeFn; - eventBinding(window, "resize", function () { - clearTimeout(resizeFn); - resizeFn = setTimeout(() => { - condition.windowWidth = window.innerWidth; - condition.windowHeight = window.innerHeight; - condition.popOption.removeAttribute("style"); - classControl(condition.popOption, "remove", "--act"); - }, 250); - }); - - // modal - eventBinding(document, "mousedown", function (e) { - let $target = e.target; - let $list = getElement(".djs-trigger.--act"); - let checkTrigger = findParentByClass($target, "djs-trigger") == null ? false : true; - let checkBtn = findParentByClass($target, "djs-btn-ignore") == null ? false : true; - - if (checkBtn == false && checkTrigger == false) { - if ($list.length > 0) { - classControl($list, "remove", "--act"); - } - } - - closeOptionPop(e.target); - }); - - // toggle target event - eventBinding(condition.btnToggleTarget, "click", function (e) { - let targetName = this.dataset["target"]; - let $target = getElement(targetName, false); - let $itemList = getElement(".djs-trigger.--act"); - let hasScroll = hasClass($target, ".djs-scroll"); - - $itemList.forEach(($item) => { - if ($item !== $target) { - classControl($item, "remove", "--act"); - - if (hasScroll == true) { - let scrollContent = $target.querySelector(".djs-scroll-content"); - scrollContent.scrollTo(0, 0); - } - } - }); - - classControl($target, "toggle", "--act"); - }); -} - -function setMenuEvent() { - if (condition.mediaURL !== "") { - eventBinding(condition.uploadInput, "change", function () { - let $form = condition.uploadForm; - let formData = new FormData($form); - - formData.append("type", $form.dataset["type"]); - formData.append("articleIdx", condition.articleIdx); - formData.append("articleTempIdx", condition.articleTempIdx); - - fileUpload(formData); - }); - - eventBinding(condition.btnAddMedia, "click", function () { - condition.uploadForm.dataset["type"] = "default"; - condition.uploadInput.removeAttribute("accept"); - condition.uploadInput.click(); - }); - - // media event - eventBinding(condition.listMedia, "click", async function (e) { - let $editableNode = getChild(this, `*[contenteditable="true"]`); - let $item = findParentByClass(e.target, "djs-media"); - let type = ""; - let idx = ""; - let data; - - if ($editableNode.length > 0) { - $editableNode.forEach((node) => { - mediaNameUpdate(node); - }); - } - - if ($item != null) { - let $area = getChild($item, ".djs-add-media", false); - data = { - src: $area.dataset["src"], - alt: $area.dataset["alt"], - hasWebp: $area.dataset["webp"], - defaultFormat: $area.dataset["defaultFormat"], - webp: $area.dataset["webp"], - width: parseInt($area.dataset["width"]), - height: parseInt($area.dataset["height"]), - }; - - type = $item.dataset["type"]; - idx = $item.dataset["idx"]; - } - - if (type == "image") { - switch (true) { - case findParentByClass(e.target, "djs-add-media") !== null: - let setWidth = 700; - let block; - - if (isMobile() == true) { - setWidth = 300; - } else { - if (data.width < data.height) { - setWidth = 400; - } - } - block = getImageBlockHTML(data, setWidth); - - addBlockToContent(block); - break; - case findParentByClass(e.target, "djs-del-media") !== null: - let url = condition.mediaURL; - let lastStrIsSlat = url.substr(url.length - 1, url.length) == "/" ? true : false; - - if (lastStrIsSlat == false) { - url += "/"; - } - - let request = await fetchURL(`${url}${idx}`, { - method: "DELETE", - }); - - if (request.response == true) { - let $blockList = getChild(condition.areaContent, `img[src="${data.src}.${data.defaultFormat}"]`); - - $blockList.forEach(($img) => { - let $block = findParentByClass($img, "djs-item"); - $block.remove(); - }); - $item.remove(); - condition.activeItem = condition.wrap; - } else { - alert(request.error.message); - } - break; - case findParentByClass(e.target, "djs-name") !== null: - let $textEl = findParentByClass(e.target, "djs-name"); - $textEl.setAttribute("contenteditable", "true"); - $textEl.focus(); - $textEl.dataset["preText"] = $textEl.textContent; - break; - } - } - }); - - eventBinding(condition.listMedia, "keydown", function (e) { - let isTextField = findParentByClass(e.target, "djs-name") !== null ? true : false; - - if (e.code == "Enter" && isTextField == true) { - e.preventDefault(); - mediaNameUpdate(e.target); - } - }); - } - - if (condition.multiLang == true) { - // change language event - eventBinding(condition.btnChangeLang, "click", function () { - let lang = this.dataset["value"]; - let data = getContentData(); - let html; - - classControl(condition.btnChangeLang, "remove", "--act"); - classControl(this, "add", "--act"); - - condition.contentData[condition.lang] = data; - - if (condition.contentData[lang] == undefined) { - condition.contentData[lang] = []; - } - - if (condition.contentData[lang].length == 0) { - let duplicate = confirm(message.noContentData(lang)); - - if (duplicate == true) { - condition.contentData[lang] = data; - } else { - condition.contentData[lang] = condition.defaultContentData; - } - } - - html = jsonToHtml(condition.contentData[lang]); - - condition.activeItem = condition.wrap; - condition.activeElement = condition.wrap; - condition.areaContent.innerHTML = html; - condition.triggerLangChange(condition.lang, lang); - condition.lang = lang; - }); - } - - // device switch event - eventBinding(condition.btnSwitchDevice, "click", function () { - classControl(condition.areaContent, "toggle", "--mobile"); - classControl(this, "toggle", "--act"); - }); - - // add block(item) event - eventBinding(condition.btnAddBlock, "click", function () { - let type = this.dataset["type"]; - let value = this.dataset["value"]; - - if (type == "block") { - let block = getDefaultBlockHTML(value); - - addBlockToContent(block); - openOptionPop(); - } else if (type == "pop") { - openPop(value, this); - } else if (type == "file") { - openFile(value); - } else if (type == "custom") { - condition.defaultMenu[value].fn(); - } - }); - - // add link(linkbox, youtube, codepen, link) event - eventBinding(condition.btnLinkbox, "click", async function () { - let $input = getChild(condition.popLinkbox, ".djs-input", false); - let value = $input.value; - let type = this.dataset["value"]; - let boolean = false; - let html; - - if (type == "linkbox") { - let data = {}; - - if (condition.regList["defaultURL"].test(value)) { - classControl(this, "add", "--ing"); - - if (condition.linkBoxApi === "") { - let request = await fetchURL(`https://api.allorigins.win/get?url=${value}`); - - if (request.response !== false) { - let text = request.contents; - let regTitleCheck = new RegExp('property=\\"og:title\\"', "g"); - let regTitle01 = new RegExp('([^])*\\([^"]*)<\\/title>([^]*)', "g"); - let regTitle02 = new RegExp('([^]*)\\<meta property=\\"og:title\\" content=\\"([^"]*)(?=\\")"([^]*)', "g"); - let regImgCheck = new RegExp('property=\\"og:image\\"', "g"); - let regImg01 = new RegExp('([^])*\\<meta name=\\"image\\" content=\\"([^"]*)"\\>([^]*)', "g"); - let regImg02 = new RegExp('([^])*\\<meta property=\\"og:image\\" content=\\"([^"]*)(?=\\")([^]*)', "g"); - let regDecripCheck = new RegExp('property=\\"og:description\\"', "g"); - let regDecrip01 = new RegExp('([^])*\\<meta name=\\"description\\" content=\\"([^"]*)(?=\\")([^]*)', "g"); - let regDecrip02 = new RegExp('([^])*\\<meta property=\\"og:description\\" content=\\"([^"]*)(?=\\")([^]*)', "g"); - - if (regTitleCheck.test(text) == true) { - data.title = text.replace(regTitle02, "$2"); - } else { - data.title = text.replace(regTitle01, "$2"); - } - - if (regImgCheck.test(text) == true) { - data.img = text.replace(regImg02, "$2"); - } else { - let img = text.replace(regImg01, "$2"); - if (img.length > 500) { - data.img = ""; - } else { - data.img = img; - } - } - - if (regDecripCheck.test(text) == true) { - data.description = text.replace(regDecrip02, "$2"); - } else { - let description = text.replace(regDecrip01, "$2"); - if (description.length > 500) { - data.description = ""; - } else { - data.description = description; - } - } - - if (value.indexOf("://") > -1) { - data.domain = value.split("/")[2]; - } else { - data.domain = value.split("/")[0]; - } - - data.domain = data.domain.split(":")[0]; - - data.url = value; - - html = getLinkboxBlock(data); - boolean = true; - } else { - console.error(request.error); - alert(message.apiNotWorking); - } - } else { - let request = await fetchURL(condition.linkBoxApi, { - method: "POST", - body: { - url: value, - }, - }); - - if (request.response == true) { - request.data.url = value; - html = getLinkboxBlock(request.data); - boolean = true; - } else { - alert(request.error.message); - } - } - - classControl(this, "remove", "--ing"); - } - } else if (type == "youtube") { - if (condition.regList["youtubeURL"].test(value)) { - let code = value.replace(condition.regList["youtubeCode"], "$7"); - - html = getYoutubeBlock(code); - boolean = true; - } - } else if (type == "codepen") { - if (condition.regList["codepenURL"].test(value)) { - let nickname = value.replace(condition.regList["codepenCode"], "$2"); - let code = value.replace(condition.regList["codepenCode"], "$4"); - - html = getCodepenBlock(nickname, code); - boolean = true; - } - } else if (type == "word") { - let $tag = condition.baseNode.parentNode; - - $tag.insertAdjacentHTML("afterend", `<span>${$tag.textContent}</span>`); - $tag.remove(); - - itemStructureValidation(); - classControl(condition.popLinkbox, "remove", "--act"); - } else if (type == "link") { - if (condition.regList["defaultURL"].test(value)) { - textNodeStyleing("link", value); - boolean = true; - } - } - - if (boolean == true) { - if (type != "link") { - addBlockToContent(html); - } - $input.value = ""; - classControl(condition.popLinkbox, "remove", "--act"); - } else { - if (type != "word") { - classControl(condition.popLinkbox, "add", "--wrong"); - $input.focus(); - setTimeout(() => { - classControl(condition.popLinkbox, "remove", "--wrong"); - }, 1000); - } - } - }); - - eventBinding(getChild(condition.popLinkbox, ".djs-input", false), "keydown", function (e) { - if (e.code == "Enter") { - let event = document.createEvent("HTMLEvents"); - event.initEvent("click", true, false); - condition.btnLinkbox.dispatchEvent(event); - } - }); -} - -export function bindingScrollEvent($wrap, _0 = typeCheckThrow($wrap, "node")) { - let $content = getChild($wrap, ".djs-scroll-content", false); - let $bar = getChild($wrap, ".djs-scroll-bar", false); - let value = getScrollInfo($wrap); - let status = { - activity: false, - mouseY: 0, - scrollY: 0, - }; - - eventBinding($content, "scroll", function () { - let scrollTop = this.scrollTop; - let scrollPercent = Math.floor((100 / value.maxScrollTop) * scrollTop); - let barTop = Math.floor((scrollPercent / 100) * value.maxBarTop); - - $bar.style.transform = `translateY(${barTop}px)`; - }); - - eventBinding($wrap, "mousemove", function (e) { - if (status.activity == true) { - let value = -(status.mouseY - e.clientY); - let contentScroll = status.scrollY + value * 2; - - $content.scrollTo(0, contentScroll); - } - }); - - eventBinding($bar, "mousedown", function (e) { - status.activity = true; - status.mouseY = e.clientY; - status.scrollY = $content.scrollTop; - }); - - eventBinding($wrap, "mouseup", function () { - status.activity = false; - }); -} - -export function setEmoticonBtnEvent() { - let event = document.createEvent("HTMLEvents"); - event.initEvent("click", true, false); - condition.btnEmoticonTap = getChild(condition.popEmoticon, ".djs-emoticon-tap"); - - eventBinding(condition.btnEmoticonTap, "click", function () { - let key = this.dataset["key"]; - let list = condition.emoticonData[key].list; - - setEmoticonList(key, list); - }); - - condition.btnEmoticonTap[0].dispatchEvent(event); - - eventBinding(condition.listEmoticon, "click", function (e) { - let $target = e.target; - let $btn = findParentByClass($target, "djs-add-emoticon"); - - if ($btn !== null) { - let key = $btn.dataset["key"]; - let idx = parseInt($btn.dataset["idx"]); - let block = getEmoticonBlockHTML(key, idx); - - addBlockToContent(block); - } - }); -} - -function setContentEvent() { - let status = { - resize: false, - client: { - x: 0, - y: 0, - }, - type: "", - item: "", - position: "", - }; - - eventBinding(condition.areaContent, "paste", function (e) { - contentPasteEvent(e); - }); - - eventBinding(condition.areaContent, "mousedown,touchstart", function (e) { - let $target = e.target; - let hasClass = $target.classList.contains("djs-resize"); - - if (hasClass == true) { - if (isMobile() == true) { - status.client.x = Math.floor(e.touches[0].clientX); - status.client.y = Math.floor(e.touches[0].clientY); - } else { - status.client.x = e.clientX; - status.client.y = e.clientY; - } - - status.resize = true; - status.item = findParentByClass($target, "djs-item"); - status.type = status.item.dataset["type"]; - status.position = $target.dataset["position"]; - - if (status.type == "image") { - status.target = getChild(status.item, ".djs-size", false); - status.defaultValue = parseInt(status.target.dataset["width"]); - } else if (status.type == "codepen") { - status.target = getChild(status.item, ".djs-iframe", false); - status.defaultValue = parseInt(status.target.height); - classControl(status.item, "add", "--act"); - } - } - }); - - eventBinding(condition.areaContent, "mousemove,touchmove", function (e) { - if (status.resize == true) { - let clientX, clientY; - - if (isMobile() == true) { - clientX = Math.floor(e.touches[0].clientX); - clientY = Math.floor(e.touches[0].clientY); - } else { - clientX = e.clientX; - clientY = e.clientY; - } - - if (status.type == "image") { - let diff; - - if (status.position == "left") { - diff = clientX - status.client.x; - } else if (status.position == "right") { - diff = status.client.x - clientX; - } - - let multiple = Math.floor(diff / 50); - let count = 50 * multiple; - let width = status.defaultValue - count; - - if (width > condition.maxImageWidth) { - width = condition.maxImageWidth; - } else if (width < 50) { - width = 50; - } - - status.target.dataset["width"] = width; - } else if (status.type == "codepen") { - let diff = status.client.y - clientY; - let multiple = Math.floor(diff / 50); - let count = 50 * multiple; - let height = status.defaultValue - count; - - if (height < 300) { - height = 300; - } else if (height > condition.maxCodepenHeight) { - height = condition.maxCodepenHeight; - } - - status.target.height = height; - } - } - }); - - eventBinding(condition.areaContent, "mouseup,touchend", function (e) { - status.resize = false; - - if (status.type == "codepen") { - classControl(status.item, "remove", "--act"); - } - - itemClickEvent(e); - }); - - // 키보드 이벤트 - eventBinding(condition.areaContent, "keydown", function (e) { - itemKeyboardEvent(e); - }); - - // let contentKeyupFn; - eventBinding(condition.areaContent, "keyup", function (e) { - itemClickEvent(e); - // clearTimeout(contentKeyupFn); - // contentKeyupFn = setTimeout(() => { - // codeBlockHighlight(e); - // }, 250); - }); -} - -function setOptionEvent() { - // font size event - eventBinding(condition.btnFontSize, "click", function () { - let $btn = getElement(".djs-fontsize", false); - let value = this.dataset["value"]; - let text = this.textContent; - let event = document.createEvent("HTMLEvents"); - event.initEvent("click", true, false); - - textNodeStyleing("fontsize", value); - getChild($btn, ".djs-text", false).textContent = text; - $btn.dispatchEvent(event); - }); - - // table col size - eventBinding(condition.btnColSize, "click", function () { - let $btn = getElement(".djs-colsize", false); - let value = this.dataset["value"]; - let text = this.textContent; - let event = document.createEvent("HTMLEvents"); - event.initEvent("click", true, false); - - setTableColSize(value); - getChild($btn, ".djs-text", false).textContent = text; - $btn.dispatchEvent(event); - }); - - // color event - eventBinding(condition.btnColor, "click", function () { - let $btn = getElement(".djs-color", false); - let value = this.dataset["value"]; - let event = document.createEvent("HTMLEvents"); - event.initEvent("click", true, false); - - textNodeStyleing("color", value); - $btn.dataset["value"] = value; - $btn.dispatchEvent(event); - }); - - // align event - eventBinding(condition.btnAlign, "click", function () { - let $target = findContenteditable(condition.baseNode); - let value = this.dataset["value"]; - let isAct = this.classList.contains("--act"); - - if ($target == null) { - $target = findParentByClass(condition.baseNode, "djs-item"); - } - - if (isAct == true) { - $target.removeAttribute("data-align"); - classControl(this, "remove", "--act"); - } else { - $target.dataset["align"] = value; - classControl(condition.btnAlign, "remove", "--act"); - classControl(this, "add", "--act"); - } - }); - - // bold event - eventBinding(condition.btnToggleBold, "click", function () { - let isAct = this.classList.contains("--act"); - - textNodeStyleing("bold", !isAct); - }); - - // italic event - eventBinding(condition.btnToggleItalic, "click", function () { - let isAct = this.classList.contains("--act"); - - textNodeStyleing("italic", !isAct); - }); - - // underline event - eventBinding(condition.btnToggleUnderline, "click", function () { - let isAct = this.classList.contains("--act"); - - textNodeStyleing("underline", !isAct); - }); - - // strikethrough event - eventBinding(condition.btnToggleStrikethrough, "click", function () { - let isAct = this.classList.contains("--act"); - - textNodeStyleing("strikethrough", !isAct); - }); - - // word block event - eventBinding(condition.btnWordBlock, "click", function () { - let isAct = this.classList.contains("--act"); - - textNodeStyleing("wordblock", !isAct); - - classControl(this, "toggle", "--act"); - }); - - // list style event - eventBinding(condition.btnListType, "click", function () { - let $item = findParentByClass(condition.baseNode, "djs-item"); - let value = this.dataset["value"]; - - $item.dataset["style"] = value; - }); - - // table change event - eventBinding(condition.btnTableHeader, "click", function () { - changeTableCell("th"); - }); - - eventBinding(condition.btnTableBody, "click", function () { - changeTableCell("td"); - }); - - // 표 컨트롤 이벤트 - eventBinding(condition.btnCellControl, "click", function () { - let type = this.dataset["type"]; - let action = this.dataset["action"]; - let $cell = findContenteditable(condition.baseNode); - let x = $cell.dataset["x"]; - let y = $cell.dataset["y"]; - - tableCellControl(type, action, x, y); - }); - - // code theme event - eventBinding(condition.btnThemeSet, "click", function () { - let $item = findParentByClass(condition.baseNode, "djs-item"); - let value = this.dataset["value"]; - let $btn = getElement(".djs-code-theme", false); - let event = document.createEvent("HTMLEvents"); - event.initEvent("click", true, false); - - $item.dataset["theme"] = value; - $btn.dispatchEvent(event); - }); - - // code lang event - eventBinding(condition.btnLangSet, "click", function () { - let $item = findParentByClass(condition.baseNode, "djs-item"); - let $editableItem = findContenteditable(condition.baseNode); - let value = this.dataset["value"]; - let $btn = getElement(".djs-code-lang", false); - let text = getElement(".djs-code-lang .djs-text", false); - let event = document.createEvent("HTMLEvents"); - event.initEvent("click", true, false); - - if (value == "text") { - value = "nohighlight"; - } - - $item.dataset["lang"] = value; - $editableItem.classList = `${value} editor-code djs-code`; - $editableItem.textContent = $editableItem.textContent; - hljs.highlightBlock($editableItem); - - if (value == "nohighlight") { - text.textContent = "text"; - $item.dataset["lang"] = "text"; - } else { - text.textContent = value; - } - - $btn.dispatchEvent(event); - $editableItem.focus(); - condition.baseNode = $editableItem; - }); - - // move item event - eventBinding(condition.btnItemMobeUp, "click", function () { - itemMove("up"); - }); - - eventBinding(condition.btnItemMobeDown, "click", function () { - itemMove("down"); - }); - - // open word link pop - eventBinding(condition.btnWordLink, "click", function () { - let isAct = this.classList.contains("--act"); - let $node, nodeOffset; - let offset = {}; - - if (condition.baseNode.constructor.name == "Text") { - $node = condition.baseNode.parentNode; - } else { - $node = condition.baseNode; - } - nodeOffset = $node.getBoundingClientRect(); - - offset.top = nodeOffset.top - 37; - offset.right = nodeOffset.right + 230; - offset.width = nodeOffset.width; - - classControl(condition.popOption, "remove", "--act"); - if (isAct == true) { - openLinkPop("word", offset); - } else { - openLinkPop("link", offset); - } - }); - - // item delete event - eventBinding(condition.btnItemDelete, "click", function () { - let $item = findParentByClass(condition.baseNode, "djs-item"); - let itemCount = condition.areaContent.childElementCount; - $item.remove(); - condition.activeItem = condition.wrap; - - classControl(condition.popOption, "remove", "--act"); - if (itemCount == 1) { - condition.areaContent.insertAdjacentHTML("beforeend", getDefaultBlockHTML("textBlock")); - } - }); -} - -// function textDecorationEvent($btn, type, tagName, _0 = typeCheckThrow($btn, "node"), _1 = typeCheckThrow(type, "string"), _2 = typeCheckThrow(tagName, "string")) { -// let isAct = $btn.classList.contains("--act"); -// let $editable = findContenteditable(condition.baseNode); - -// if ($editable.textContent != "") { -// if (isTextSelect() == true) { -// if (isAct == true) { -// removeNodeEffect(type, tagName); -// } else { -// nodeEffect(type); -// } -// } else { -// textStylingNode(type, tagName, isAct); -// } - -// classControl($btn, "toggle", "--act"); -// } -// } diff --git a/old/resources/js/module/file.js b/old/resources/js/module/file.js deleted file mode 100644 index 1fa9f63..0000000 --- a/old/resources/js/module/file.js +++ /dev/null @@ -1,87 +0,0 @@ -const { typeCheckThrow, fetchURL, isMobile } = require("./default"); -const { setMediaList, getImageBlockHTML, addBlockToContent } = require("./layout"); -const { findParentByClass, getChild } = require("./selector"); - -export function openFile(type, _0 = typeCheckThrow(type, "string")) { - switch (type) { - case "imageBlock": - condition.uploadForm.dataset["type"] = "image"; - condition.uploadInput.setAttribute("accept", "image/*"); - break; - default: - condition.uploadForm.dataset["type"] = "default"; - condition.uploadInput.removeAttribute("accept"); - } - - condition.uploadInput.click(); -} - -export async function fileUpload(data, _0 = typeCheckThrow(data, "formdata")) { - let request = await fetchURL(condition.mediaURL, { - method: "POST", - body: data, - }); - - if (request.response == true) { - setMediaList(request.list); - - request.list.forEach((item) => { - if (item.type == "image") { - let setWidth = 700; - let block; - - if (isMobile() == true) { - setWidth = 300; - } else { - if (item.width < item.height) { - setWidth = 400; - } - } - - block = getImageBlockHTML(item, setWidth); - - addBlockToContent(block); - }else{ - - } - }); - - condition.uploadInput.value = ""; - } else { - alert(request.error.message); - } -} - -export async function mediaNameUpdate($node, _0 = typeCheckThrow($node, "node")) { - let $field = findParentByClass($node, "djs-name"); - let $item = findParentByClass($node, "djs-media"); - let text = $field.textContent; - let preText = $field.dataset["preText"]; - let idx = $item.dataset["idx"]; - - $field.scrollTo(0, 0); - $field.removeAttribute("contenteditable"); - $field.removeAttribute("data-pre-text"); - - let request = await fetchURL( - condition.mediaURL, - { - method: "PUT", - body: { - imageName: text, - fileIdx: idx, - }, - }, - "json", - ); - - if (request.response == true) { - let $childs = getChild(condition.areaContent, `img[alt="${preText}"]`); - - $childs.forEach(($child) => { - $child.setAttribute("alt", text); - }); - } else { - alert(request.error.message); - } -} diff --git a/old/resources/js/module/item.js b/old/resources/js/module/item.js deleted file mode 100644 index beee272..0000000 --- a/old/resources/js/module/item.js +++ /dev/null @@ -1,199 +0,0 @@ -const { typeCheckThrow, classControl } = require("./default"); -const { openOptionPop } = require("./pop"); -const { contentEnterKeyEvent, contentTabKeyEvent, contentBackspaceKeyEvent, blockHotKey } = require("./keyboard"); -const { isTextSelect } = require("./cursor"); -const { findParentByClass, findContenteditable, getChild, getElement } = require("./selector"); -const { hasBaseNode, setSelection } = require("./selection"); -const { getTextBlockHTML } = require("./layout"); -const { message } = require("./message"); - -export function itemClickEvent(e, _0 = typeCheckThrow(e, "event")) { - let $target = e.target; - let $item = findParentByClass($target, "djs-item"); - let $editableItem = findContenteditable($target); - - if ($item !== null || $editableItem !== null) { - let $selectedItem = getElement(".--djs-selected"); - - if ($selectedItem.length > 0) { - classControl($selectedItem, "remove", "--djs-selected"); - } - classControl($item, "add", "--djs-selected"); - - condition.activeItem = $item; - condition.activeElement = $editableItem; - condition.baseNode = $target; - - openOptionPop(); - } -} - -export function getItemType($item, $editableItem) { - let typeArr = ["all"]; - let itemType = $item.dataset["type"]; - - if ($editableItem !== null) { - if (hasBaseNode() == true) { - let $node; - - setSelection(); - - if (condition.baseNode.constructor.name == "Text") { - $node = condition.baseNode.parentNode; - } else { - $node = condition.baseNode; - } - - switch ($editableItem.constructor.name) { - case "HTMLLIElement": - typeArr.push("li"); - break; - - case "HTMLTableCellElement": - if ($editableItem.tagName == "TD") { - typeArr.push("td"); - } else if ($editableItem.tagName == "TH") { - typeArr.push("th"); - } - break; - } - - classControl(condition.btnWordLink, "remove", "--act"); - classControl(condition.btnWordBlock, "remove", "--act"); - - switch ($node.tagName) { - case "A": - typeArr.push("link"); - classControl(condition.btnWordLink, "add", "--act"); - break; - case "CODE": - if (itemType != "codeblock") { - typeArr.push("wordblock"); - classControl(condition.btnWordBlock, "add", "--act"); - } - break; - } - - if (isTextSelect() == true) { - let nodeName = condition.baseNode.constructor.name; - - if (itemType != "codeblock") { - if ((nodeName = "HTMLAnchorElement")) { - typeArr.push("link"); - } - - typeArr.push("word"); - } - } - } - } - - typeArr.push(itemType); - - return typeArr; -} - -// content area keyboard event -export function itemKeyboardEvent(e, _0 = typeCheckThrow(e, "event")) { - let $item = findParentByClass(e.target, "djs-item"); - let $editableItem = findContenteditable(e.target); - let code = e.keyCode; - - setSelection(); - - switch (code) { - case 13: - contentEnterKeyEvent($item, $editableItem, e.shiftKey, e); - break; - case 9: - contentTabKeyEvent($item, $editableItem, e.shiftKey, e); - break; - case 8: - contentBackspaceKeyEvent($item, $editableItem, e); - break; - default: - blockHotKey(e); - } -} - -export function itemMove(type, _0 = typeCheckThrow(type, "string")) { - let $item = findParentByClass(condition.baseNode, "djs-item"); - let $target, html; - - if ($item != null) { - if (type == "up") { - $target = $item.previousElementSibling; - } else if (type == "down") { - $target = $item.nextElementSibling; - } - - if ($target != null) { - html = $target.outerHTML; - - if (type == "up") { - $item.insertAdjacentHTML("afterend", html); - } else if (type == "down") { - $item.insertAdjacentHTML("beforebegin", html); - } - - $target.remove(); - } - - openOptionPop(); - $item.focus(); - } else { - alert(message.missingSelect); - } -} - -// 에디터 내부 구조 교정 -export function itemStructureValidation() { - let wrongTagList = ["font", "center", "div"]; - let $itemList = getChild(condition.areaContent, `[contenteditable="true"]`); - - $itemList.forEach(($item) => { - let itemType = findParentByClass($item, "djs-item").dataset["type"]; - let $nodeList = $item.childNodes; - - if (itemType != "codeblock") { - $nodeList.forEach(($node) => { - let isTag = $node.constructor.name == "Text" ? false : true; - - if (isTag == true) { - let $childNode = $node.childNodes; - let tagName = $node.tagName.toLowerCase(); - let hasData = Object.keys($node.dataset) == 0 ? false : true; - let hasText = $node.textContent == "" ? false : true; - - $node.removeAttribute("style"); - - if (hasText == false) { - if (tagName != "br") { - $node.remove(); - } - } else { - if (hasData == false) { - if (wrongTagList.indexOf(tagName) > -1) { - $node.outerHTML = $node.textContent; - } else if (tagName == "span") { - $node.outerHTML = $node.textContent; - } - } else { - $childNode.forEach(($child) => { - let type = $child.constructor.name; - - if (type != "Text") { - $child.outerHTML = $child.innerText; - } - }); - } - } - } - }); - } - }); - - if ($itemList.length == 0) { - condition.areaContent.insertAdjacentHTML("beforeend", getTextBlockHTML()); - } -} diff --git a/old/resources/js/module/keyboard.js b/old/resources/js/module/keyboard.js deleted file mode 100644 index 4f3a34b..0000000 --- a/old/resources/js/module/keyboard.js +++ /dev/null @@ -1,404 +0,0 @@ -const { typeCheckThrow, classControl } = require("./default"); -const { isTextSelect, setCursor } = require("./cursor"); -const { getChild, findContenteditable } = require("./selector"); -const { getTextBlockHTML, getListChildHTML, addBlockToContent } = require("./layout"); - -export function contentEnterKeyEvent($item, $editableItem, shiftKey, e, _0 = typeCheckThrow($item, "node"), _1 = typeCheckThrow($editableItem, "node"), _2 = typeCheckThrow(shiftKey, "boolean")) { - if (shiftKey == false && condition.enterCount == 0) { - e.preventDefault(); - - let type = $item.dataset["type"]; - - condition.enterCount += 1; - - if (isTextSelect() == true) { - // to-do : select enter - } else { - let childNodes = $editableItem.childNodes; - let childNodesCount = childNodes.length; - - setCursor(condition.baseNode, condition.baseOffset); - - setTimeout(() => { - if (type == "text") { - if (childNodesCount > 0) { - let lastChildNode = childNodes[childNodesCount - 1]; - let lastChildNodeText = lastChildNode.textContent.length; - - if (condition.baseNode == lastChildNode && condition.baseOffset == lastChildNodeText) { - $item.insertAdjacentHTML("afterend", getTextBlockHTML()); - setCursor($item.nextElementSibling, 0); - } else if (condition.baseNode == childNodes[0] && condition.baseOffset == 0) { - $item.insertAdjacentHTML("beforebegin", getTextBlockHTML()); - } else { - let value = splitEditableNodeByNoSelect(childNodes, childNodesCount); - - $item.childNodes[value.childNumber].textContent = value.beforeText; - $item.insertAdjacentHTML("afterend", getTextBlockHTML(value.afterHTML)); - $item.nextElementSibling.childNodes[0].textContent = value.afterText; - setCursor($item.nextElementSibling.childNodes[0], 0); - } - } else { - $item.insertAdjacentHTML("afterend", getTextBlockHTML()); - setCursor($item.nextElementSibling, 0); - } - } else if (type == "ol" || type == "ul") { - if (childNodesCount > 0) { - let lastChildNode = childNodes[childNodesCount - 1]; - let lastChildNodeText = lastChildNode.textContent.length; - - if (condition.baseNode == lastChildNode && condition.baseOffset == lastChildNodeText) { - $editableItem.insertAdjacentHTML("afterend", getListChildHTML()); - setCursor($editableItem.nextElementSibling, 0); - } else if (condition.baseNode == findContenteditable(childNodes[0]) && condition.baseOffset == 0) { - $editableItem.insertAdjacentHTML("beforebegin", getListChildHTML()); - } else { - let value = splitEditableNodeByNoSelect(childNodes, childNodesCount); - - $editableItem.innerHTML = value.beforeHTML; - $editableItem.childNodes[value.childNumber].textContent = value.beforeText; - $editableItem.insertAdjacentHTML("afterend", getListChildHTML(value.afterHTML)); - $editableItem.nextElementSibling.childNodes[0].textContent = value.afterText; - setCursor($editableItem.nextElementSibling.childNodes[0], 0); - } - } else { - let $liList = getChild($item, `[contenteditable="true"]`); - let liCount = $liList.length; - - if (liCount > 1) { - let isLastChild = false; - - $liList.forEach(($row, index) => { - if ($row == $editableItem && index == liCount - 1) { - isLastChild = true; - } - }); - - if (isLastChild == true) { - $editableItem.remove(); - addBlockToContent(getTextBlockHTML()); - } else { - $editableItem.insertAdjacentHTML("afterend", getListChildHTML()); - setCursor($editableItem.nextElementSibling, 0); - } - } else { - $editableItem.insertAdjacentHTML("afterend", getListChildHTML()); - setCursor($editableItem.nextElementSibling, 0); - } - } - } else if (type == "table") { - let editableItemName = $editableItem.constructor.name; - - if (editableItemName == "HTMLTableCaptionElement") { - let $target = getChild($item, `*[data-x="0"][data-y="0"]`, false); - let hasChildNode = $target.childNodes.length > 0 ? true : false; - - if (hasChildNode == true) { - setCursor($target.childNodes[0], 0); - } else { - setCursor($target, 0); - } - } else { - let x = parseInt($editableItem.dataset["x"]); - let y = parseInt($editableItem.dataset["y"]) + 1; - let $target = getChild($item, `*[data-x="${x}"][data-y="${y}"]`, false); - - if ($target != null) { - let hasChildNode = $target.childNodes.length > 0 ? true : false; - - if (hasChildNode == true) { - setCursor($target.childNodes[0], 0); - } else { - setCursor($target, 0); - } - } else { - $item.insertAdjacentHTML("afterend", getTextBlockHTML()); - setCursor($item.nextElementSibling, 0); - } - } - } else { - $item.insertAdjacentHTML("afterend", getTextBlockHTML()); - setCursor($item.nextElementSibling, 0); - } - }, 50); - } - - setTimeout(() => { - condition.enterCount = 0; - }, 150); - } else if (condition.enterCount != 0) { - e.preventDefault(); - } -} - -export function contentTabKeyEvent($item, $editableItem, shiftKey, e, _0 = typeCheckThrow($item, "node"), _1 = typeCheckThrow($editableItem, "node"), _2 = typeCheckThrow(shiftKey, "boolean")) { - e.preventDefault(); - setCursor(condition.baseNode, condition.baseOffset); - - setTimeout(() => { - let type = $item.dataset["type"]; - let depth = parseInt($editableItem.dataset["depth"] == undefined ? 0 : $editableItem.dataset["depth"]); - - if (shiftKey == true) { - if (depth > 0) { - depth -= 1; - } - } else { - if (depth < 3) { - depth += 1; - } - } - - if (type == "text" || type == "ol" || type == "ul") { - if (depth == 0) { - $editableItem.removeAttribute("data-depth"); - } else { - $editableItem.dataset["depth"] = depth; - } - } else if (type == "table") { - let editableItemName = $editableItem.constructor.name; - - if (editableItemName == "HTMLTableCellElement") { - let x = parseInt($editableItem.dataset["x"]); - let y = parseInt($editableItem.dataset["y"]); - - if (shiftKey == true) { - x -= 1; - } else { - x += 1; - } - - let $target = getChild($item, `*[data-x="${x}"][data-y="${y}"]`, false); - - if ($target != null) { - let hasChildNode = $target.childNodes.length > 0 ? true : false; - - if (hasChildNode == true) { - setCursor($target.childNodes[0], 0); - } else { - setCursor($target, 0); - } - } - } - } - }, 150); -} - -export function contentBackspaceKeyEvent($item, $editableItem, e, _0 = typeCheckThrow($item, "node"), _1 = typeCheckThrow($editableItem, "node")) { - let type = $item.dataset["type"]; - let itemCount = condition.areaContent.childElementCount; - let hasPrevEl = $item.previousElementSibling == null ? false : true; - let hasText = $editableItem.textContent.length > 0 ? true : false; - let $preEl = $item.previousElementSibling; - - if (isTextSelect() == true) { - // to-do : select backspace - } else { - if (condition.baseOffset == 0) { - e.preventDefault(); - - if (hasPrevEl == true) { - let preElType = $preEl.dataset["type"]; - let preElHasText = $preEl.textContent.length > 0 ? true : false; - let position = preElHasText == true ? 1 : 0; - - if (type == "text") { - if (hasText == true) { - if (preElType == "text") { - if (preElHasText == true) { - let $preChilds = $preEl.childNodes; - let preChildCount = $preChilds.length; - let text = $preEl.innerHTML + $item.innerHTML; - position = $preChilds[preChildCount - 1].textContent.length; - - $preEl.innerHTML = text; - $item.remove(); - setCursor($preEl.childNodes[preChildCount - 1], position); - } else { - $preEl.remove(); - } - } else { - $preEl.remove(); - } - } else { - $item.remove(); - - if (preElType == "text") { - let $preElChild = $preEl.childNodes; - let preElChildLength = $preElChild.length; - let $target; - - if (preElChildLength > 0) { - // 이전 아이템에 자식이 있을경우 - $target = $preElChild[preElChildLength - 1]; - position = $target.length; - } else { - $target = $preEl; - position = 0; - } - - setCursor($target, position); - } else { - let $preEditableChild = getChild($preEl, `*[contenteditable="true"]`); - let count = $preEditableChild.length; - let preEditableHasText = $preEditableChild[count - 1].textContent.length > 0 ? true : false; - - position = preEditableHasText == true ? 1 : 0; - - setCursor($preEditableChild[count - 1], position); - } - } - } else if (type == "ol" || type == "ul") { - let text = $editableItem.innerHTML; - let childCount = getChild($item, `*[contenteditable="true"]`).length; - let $preEditable = $editableItem.previousElementSibling; - let hasPreEditable = $preEditable == null ? false : true; - - if (childCount > 1) { - // 리스트가 여러개일 경우 - if (hasPreEditable == true) { - // 이전 에디팅 요소가 있을경우 - let $preChilds = $preEditable.childNodes; - let preChildCount = $preChilds.length; - let $target; - - if (hasText == false) { - if (preChildCount > 0) { - $target = $preChilds[preChildCount - 1]; - position = $target.length; - } else { - $target = $preEditable; - position = 0; - } - } else { - if (preChildCount > 0) { - let html = $preEditable.innerHTML + text; - position = $preChilds[preChildCount - 1].textContent.length; - $preEditable.innerHTML = html; - $target = $preEditable.childNodes[preChildCount - 1]; - } else { - $preEditable.innerHTML = text; - $target = $preEditable; - position = 0; - } - } - - $editableItem.remove(); - setCursor($target, position); - condition.activeItem = $preEditable; - condition.baseNode = $target; - } else { - $item.insertAdjacentHTML("beforebegin", getTextBlockHTML(text)); - setCursor($item.previousElementSibling, 0); - $item.remove(); - } - } else { - $item.insertAdjacentHTML("afterend", getTextBlockHTML(text)); - setCursor($item.nextElementSibling, 0); - $item.remove(); - } - } - } else { - if (hasText == false) { - $item.remove(); - classControl(condition.popOption, "remove", "--act"); - condition.activeItem = condition.wrap; - - if (itemCount == 1) { - condition.areaContent.insertAdjacentHTML("beforeend", getTextBlockHTML()); - } - } - } - } - } -} - -// 브라우저 단축키 내부 로직으로 변경 -export function blockHotKey(e) { - let $target = null; - let isCtrlKey = e.ctrlKey || e.metaKey; - let event = document.createEvent("HTMLEvents"); - event.initEvent("click", true, false); - - if (isCtrlKey == true) { - switch (e.keyCode) { - case 73: - e.preventDefault(); - $target = condition.btnToggleItalic; - break; - case 66: - e.preventDefault(); - $target = condition.btnToggleBold; - break; - } - - if ($target !== null) { - $target.dispatchEvent(event); - } - } -} - -function splitEditableNodeByNoSelect(childNodes, childNodesCount, _0 = typeCheckThrow(childNodes, "nodelist"), _1 = typeCheckThrow(childNodesCount, "number")) { - let childNumber = -1; - let beforeHTML = ""; - let afterHTML = ""; - let $targetChild, targetChldText, targetChldConstructorName; - - for (let i = 0; i < childNodesCount; i += 1) { - if (childNodes[i] == condition.baseNode) { - childNumber = i; - break; - } - } - - if (childNumber < 0) { - for (let j = 0; j < childNodesCount; j += 1) { - if (childNodes[j] == condition.baseNode.parentNode) { - childNumber = j; - break; - } - } - } - - $targetChild = childNodes[childNumber]; - targetChldConstructorName = $targetChild.constructor.name; - targetChldText = $targetChild.textContent; - - if (targetChldConstructorName == "Text") { - afterHTML += $targetChild.textContent; - } else { - afterHTML += $targetChild.outerHTML; - } - - for (let k = 0; k < childNodesCount; k += 1) { - let constructorName = childNodes[k].constructor.name; - - if (k > childNumber) { - if (constructorName == "Text") { - afterHTML += childNodes[k].textContent; - } else { - afterHTML += childNodes[k].outerHTML; - } - } else if (k < childNumber) { - if (constructorName == "Text") { - beforeHTML += childNodes[k].textContent; - } else { - beforeHTML += childNodes[k].outerHTML; - } - } - } - - if (targetChldConstructorName == "Text") { - beforeHTML += $targetChild.textContent; - } else { - beforeHTML += $targetChild.outerHTML; - } - - return { - beforeHTML: beforeHTML, - afterHTML: afterHTML, - beforeText: targetChldText.substring(0, condition.baseOffset), - afterText: targetChldText.substring(condition.baseOffset, targetChldText.length), - childNumber: childNumber, - }; -} diff --git a/old/resources/js/module/layout.js b/old/resources/js/module/layout.js deleted file mode 100644 index 421cf66..0000000 --- a/old/resources/js/module/layout.js +++ /dev/null @@ -1,797 +0,0 @@ -const { typeCheckThrow, upperFirstChar, classControl } = require("./default"); -const { getElement, getActiveElement, getChild } = require("./selector"); -const { setCursor } = require("./cursor"); -const { htmlToJson } = require("./convertor"); - -export function makeView() { - let view = `${makeContentArea()}<div class="editor-menu-block">${makeBlockMenu(condition.defaultMenu)}</div><div class="editor-menu-bottom">${makeBottomMenu()}`; - - if (condition.multiLang == true) { - view += makeLanguagePop(); - } - - if (condition.mediaURL !== "") { - view += `${makeFolderPop()}`; - document.body.insertAdjacentHTML("beforeend", makeUploadForm()); - } - - view += `</div>`; - - view += makeLinkboxPop(); - view += makeOptionPop(); - - if (condition.useEmoticon == true) { - view += makeEmoticonPop(); - } - - if(condition.useDefaultIcon == true){ - document.body.insertAdjacentHTML("afterbegin", defautlIcon()); - } - - condition.wrap.insertAdjacentHTML("beforeend", view); -} - -function defautlIcon(){ - return ` - <svg class="editor-icon-pack"> - <defs> - <g id="icon-text-block"> - <path fill-rule="evenodd" clip-rule="evenodd" d="M19 13H45C48.3137 13 51 15.6863 51 19V45C51 48.3137 48.3137 51 45 51H19C15.6863 51 13 48.3137 13 45V19C13 15.6863 15.6863 13 19 13ZM9 19C9 13.4772 13.4772 9 19 9H45C50.5228 9 55 13.4772 55 19V45C55 50.5228 50.5228 55 45 55H19C13.4772 55 9 50.5228 9 45V19ZM20.8571 19C19.8315 19 19 19.8315 19 20.8571C19 20.8806 19.0004 20.904 19.0013 20.9272C19.0004 20.9514 19 20.9756 19 21V22.5714C19 23.676 19.8954 24.5714 21 24.5714C22.0565 24.5714 22.9217 23.7522 22.995 22.7143H30V41.2857H28.8571C27.8315 41.2857 27 42.1172 27 43.1429C27 44.1685 27.8315 45 28.8571 45H32H35.1429C36.1685 45 37 44.1685 37 43.1429C37 42.1172 36.1685 41.2857 35.1429 41.2857H34V22.7143H41.005C41.0783 23.7522 41.9435 24.5714 43 24.5714C44.1046 24.5714 45 23.676 45 22.5714V21C45 20.9756 44.9996 20.9514 44.9987 20.9272C44.9996 20.904 45 20.8806 45 20.8571C45 19.8315 44.1685 19 43.1429 19H43H32H21H20.8571Z"></path> - </g> - - <g id="icon-image-block"> - <path fill-rule="evenodd" clip-rule="evenodd" d="M45 13H19C15.6863 13 13 15.6863 13 19V45C13 45.2946 13.0212 45.5843 13.0623 45.8676L22.5157 36.4142C24.7774 34.1525 28.3955 34.0739 30.7515 36.1784L36.5157 30.4142C38.8588 28.0711 42.6578 28.0711 45.0009 30.4142L51 36.4133V19C51 15.6863 48.3137 13 45 13ZM19 51C17.4694 51 16.0727 50.4269 15.0127 49.4835C15.156 49.3993 15.2912 49.2956 15.4142 49.1725L25.3441 39.2426C26.1251 38.4616 27.3915 38.4616 28.1725 39.2426L33.1967 44.2669C33.9778 45.0479 35.2441 45.0479 36.0252 44.2669C36.8062 43.4858 36.8062 42.2195 36.0252 41.4385L33.5867 39L39.3441 33.2426C40.1251 32.4616 41.3915 32.4616 42.1725 33.2426L51 42.0701V45C51 48.3137 48.3137 51 45 51H19ZM19 9C13.4772 9 9 13.4772 9 19V45C9 50.5228 13.4772 55 19 55H45C50.5228 55 55 50.5228 55 45V19C55 13.4772 50.5228 9 45 9H19ZM27 24C27 25.6569 25.6569 27 24 27C22.3431 27 21 25.6569 21 24C21 22.3431 22.3431 21 24 21C25.6569 21 27 22.3431 27 24ZM31 24C31 27.866 27.866 31 24 31C20.134 31 17 27.866 17 24C17 20.134 20.134 17 24 17C27.866 17 31 20.134 31 24Z"></path> - </g> - - <g id="icon-ul-block"> - <path d="M11 19C12.1046 19 13 18.1046 13 17C13 15.8954 12.1046 15 11 15C9.89543 15 9 15.8954 9 17C9 18.1046 9.89543 19 11 19ZM23 15C21.8954 15 21 15.8954 21 17C21 18.1046 21.8954 19 23 19H53C54.1046 19 55 18.1046 55 17C55 15.8954 54.1046 15 53 15H23ZM23 30C21.8954 30 21 30.8954 21 32C21 33.1046 21.8954 34 23 34H53C54.1046 34 55 33.1046 55 32C55 30.8954 54.1046 30 53 30H23ZM21 47C21 45.8954 21.8954 45 23 45H53C54.1046 45 55 45.8954 55 47C55 48.1046 54.1046 49 53 49H23C21.8954 49 21 48.1046 21 47ZM13 32C13 33.1046 12.1046 34 11 34C9.89543 34 9 33.1046 9 32C9 30.8954 9.89543 30 11 30C12.1046 30 13 30.8954 13 32ZM11 49C12.1046 49 13 48.1046 13 47C13 45.8954 12.1046 45 11 45C9.89543 45 9 45.8954 9 47C9 48.1046 9.89543 49 11 49Z"></path> - </g> - - <g id="icon-ol-block"> - <path d="M9 11.75C9 10.7835 9.76747 10 10.7143 10H13.2857C14.2325 10 15 10.7835 15 11.75V21.25C15 22.2165 14.2325 23 13.2857 23C12.3389 23 11.5714 22.2165 11.5714 21.25V13.5H10.7143C9.76747 13.5 9 12.7165 9 11.75ZM27 15C25.8954 15 25 15.8954 25 17C25 18.1046 25.8954 19 27 19H53C54.1046 19 55 18.1046 55 17C55 15.8954 54.1046 15 53 15H27ZM25 32C25 30.8954 25.8954 30 27 30H53C54.1046 30 55 30.8954 55 32C55 33.1046 54.1046 34 53 34H27C25.8954 34 25 33.1046 25 32ZM27 45C25.8954 45 25 45.8954 25 47C25 48.1046 25.8954 49 27 49H53C54.1046 49 55 48.1046 55 47C55 45.8954 54.1046 45 53 45H27ZM12.3846 44.2308C12.3846 43.7635 12.7635 43.3846 13.2308 43.3846C13.6981 43.3846 14.0769 43.7635 14.0769 44.2308C14.0769 44.6981 13.6981 45.0769 13.2308 45.0769C12.2961 45.0769 11.5385 45.8346 11.5385 46.7692C11.5385 47.7039 12.2961 48.4615 13.2308 48.4615C13.6981 48.4615 14.0769 48.8404 14.0769 49.3077C14.0769 49.775 13.6981 50.1538 13.2308 50.1538C12.7635 50.1538 12.3846 49.775 12.3846 49.3077C12.3846 48.3731 11.6269 47.6154 10.6923 47.6154C9.75767 47.6154 9 48.3731 9 49.3077C9 51.6443 10.8942 53.5385 13.2308 53.5385C15.5674 53.5385 17.4615 51.6443 17.4615 49.3077C17.4615 48.3553 17.1468 47.4763 16.6157 46.7692C17.1468 46.0621 17.4615 45.1832 17.4615 44.2308C17.4615 41.8942 15.5674 40 13.2308 40C10.8942 40 9 41.8942 9 44.2308C9 45.1654 9.75767 45.9231 10.6923 45.9231C11.6269 45.9231 12.3846 45.1654 12.3846 44.2308ZM13.5 28.5C13.0029 28.5 12.6 28.8918 12.6 29.375C12.6 30.3415 11.7941 31.125 10.8 31.125C9.80589 31.125 9 30.3415 9 29.375C9 26.9588 11.0147 25 13.5 25C15.9853 25 18 26.9588 18 29.375C18 29.9731 17.7566 30.5282 17.595 30.8603C17.4017 31.2573 17.1464 31.681 16.8741 32.0963C16.8175 32.1825 16.7653 32.2623 16.7163 32.3373C16.2911 32.9875 16.1104 33.2638 15.5 34.0473C15.3789 34.2028 15.0308 34.639 14.74 35.0033C14.5689 35.2177 14.4177 35.4072 14.3443 35.5H17.2C18.1941 35.5 19 36.2835 19 37.25C19 38.2165 18.1941 39 17.2 39H10.8C9.80585 39 9 38.2165 9 37.25C9 36.8843 9.11809 36.6048 9.14918 36.5312L9.15027 36.5286C9.19963 36.4117 9.25386 36.3129 9.29246 36.2463C9.37132 36.1102 9.46475 35.9726 9.54962 35.8528C9.72388 35.6068 9.95766 35.3025 10.2124 34.9778C10.4469 34.6787 10.6916 34.3714 10.949 34.0482L10.9497 34.0473C11.2967 33.6116 11.6665 33.1471 12.0651 32.6355C12.7344 31.7764 13.373 30.9246 13.8384 30.2148C14.0724 29.8581 14.2389 29.5727 14.341 29.3631C14.363 29.3178 14.3794 29.2814 14.3914 29.2532C14.3304 28.8276 13.9545 28.5 13.5 28.5Z"></path> - </g> - - <g id="icon-quotaion-block"> - <path d="M11 13C9.89543 13 9 13.7397 9 14.6522V49.3478C9 50.2603 9.89543 51 11 51C12.1046 51 13 50.2603 13 49.3478V14.6522C13 13.7397 12.1046 13 11 13ZM23.2667 15C22.0148 15 21 15.8954 21 17C21 18.1046 22.0148 19 23.2667 19H52.7333C53.9852 19 55 18.1046 55 17C55 15.8954 53.9852 15 52.7333 15H23.2667ZM21 47C21 45.8954 22.0148 45 23.2667 45H52.7333C53.9852 45 55 45.8954 55 47C55 48.1046 53.9852 49 52.7333 49H23.2667C22.0148 49 21 48.1046 21 47ZM23.2667 30C22.0148 30 21 30.8954 21 32C21 33.1046 22.0148 34 23.2667 34H52.7333C53.9852 34 55 33.1046 55 32C55 30.8954 53.9852 30 52.7333 30H23.2667Z"></path> - </g> - - <g id="icon-table-block"> - <path fill-rule="evenodd" clip-rule="evenodd" d="M45 13H19C15.6863 13 13 15.6863 13 19V21H51V19C51 15.6863 48.3137 13 45 13ZM13 36V25H22V36H13ZM26 36V25H38V36H26ZM38 40H26V51H38V40ZM42 51H45C48.3137 51 51 48.3137 51 45V40H42V51ZM42 36V25H51V36H42ZM13 40H22V51H19C15.6863 51 13 48.3137 13 45V40ZM19 9C13.4772 9 9 13.4771 9 19V45C9 50.5229 13.4772 55 19 55H45C50.5228 55 55 50.5229 55 45V19C55 13.4771 50.5228 9 45 9H19Z"></path> - </g> - - <g id="icon-linkbox-block"> - <path fill-rule="evenodd" clip-rule="evenodd" d="M19 13H45C48.3137 13 51 15.6863 51 19V45C51 48.3137 48.3137 51 45 51H19C15.6863 51 13 48.3137 13 45V19C13 15.6863 15.6863 13 19 13ZM9 19C9 13.4772 13.4772 9 19 9H45C50.5228 9 55 13.4772 55 19V45C55 50.5228 50.5228 55 45 55H19C13.4772 55 9 50.5228 9 45V19ZM18 20C19.1046 20 20 19.1046 20 18C20 16.8954 19.1046 16 18 16C16.8954 16 16 16.8954 16 18C16 19.1046 16.8954 20 18 20ZM26 18C26 19.1046 25.1046 20 24 20C22.8954 20 22 19.1046 22 18C22 16.8954 22.8954 16 24 16C25.1046 16 26 16.8954 26 18ZM30 20C31.1046 20 32 19.1046 32 18C32 16.8954 31.1046 16 30 16C28.8954 16 28 16.8954 28 18C28 19.1046 28.8954 20 30 20ZM23.161 38.7988C21.9894 39.9704 21.9894 41.8699 23.161 43.0415C24.3326 44.2131 26.2321 44.2131 27.4036 43.0415L32.3534 38.0917C32.7439 37.7012 32.7439 37.068 32.3534 36.6775C31.5723 35.8965 31.5723 34.6301 32.3534 33.8491C33.1344 33.068 34.4008 33.0681 35.1818 33.8491C37.1344 35.8017 37.1344 38.9675 35.1818 40.9202L30.2321 45.8699C27.4984 48.6036 23.0662 48.6036 20.3326 45.8699C17.5989 43.1362 17.5989 38.7041 20.3326 35.9704L24.2699 32.0331C25.0509 31.2521 26.3172 31.2521 27.0983 32.0331C27.8793 32.8142 27.8793 34.0805 27.0983 34.8615L23.161 38.7988ZM36.5964 23.9497C37.7679 22.7782 39.6674 22.7782 40.839 23.9497C42.0106 25.1213 42.0106 27.0208 40.839 28.1924L36.9017 32.1297C36.1207 32.9107 36.1207 34.177 36.9017 34.9581C37.6828 35.7391 38.9491 35.7391 39.7301 34.9581L43.6674 31.0208C46.4011 28.2871 46.4011 23.855 43.6674 21.1213C40.9338 18.3876 36.5016 18.3876 33.7679 21.1213L28.8182 26.071C26.8656 28.0237 26.8656 31.1895 28.8182 33.1421C29.5992 33.9232 30.8656 33.9232 31.6466 33.1421C32.4277 32.3611 32.4277 31.0947 31.6466 30.3137C31.2561 29.9232 31.2561 29.29 31.6466 28.8995L36.5964 23.9497Z"></path> - </g> - - <g id="icon-emoticon-block"> - <path fill-rule="evenodd" clip-rule="evenodd" d="M51 32C51 42.4934 42.4934 51 32 51C21.5066 51 13 42.4934 13 32C13 21.5066 21.5066 13 32 13C42.4934 13 51 21.5066 51 32ZM55 32C55 44.7025 44.7025 55 32 55C19.2975 55 9 44.7025 9 32C9 19.2975 19.2975 9 32 9C44.7025 9 55 19.2975 55 32ZM26 36C26 34.8954 25.1046 34 24 34C22.8954 34 22 34.8954 22 36C22 41.2131 26.7364 45 32 45C37.2636 45 42 41.2131 42 36C42 34.8954 41.1046 34 40 34C38.8954 34 38 34.8954 38 36C38 38.5189 35.5729 41 32 41C28.4271 41 26 38.5189 26 36ZM26 26C26 27.1046 25.1046 28 24 28C22.8954 28 22 27.1046 22 26C22 24.8954 22.8954 24 24 24C25.1046 24 26 24.8954 26 26ZM40 28C41.1046 28 42 27.1046 42 26C42 24.8954 41.1046 24 40 24C38.8954 24 38 24.8954 38 26C38 27.1046 38.8954 28 40 28Z"></path> - </g> - - <g id="icon-youtube-block"> - <path fill-rule="evenodd" clip-rule="evenodd" d="M19 19H45C48.3137 19 51 22.6863 51 26V38C51 41.3137 48.3137 45 45 45H19C15.6863 45 13 41.3137 13 38V26C13 22.6863 15.6863 19 19 19ZM9 26C9 20.4772 13.4772 15 19 15H45C50.5228 15 55 20.4772 55 26V38C55 43.5228 50.5228 49 45 49H19C13.4772 49 9 43.5228 9 38V26ZM37 33.7321C38.3333 32.9623 38.3333 31.0378 37 30.268L31 26.8039C29.6667 26.0341 28 26.9963 28 28.5359V35.4641C28 37.0037 29.6667 37.966 31 37.1962L37 33.7321Z"></path> - </g> - - <g id="icon-codepen-block"> - <path d="M31.9998 54.9993C31.547 54.9993 31.123 54.8555 30.7708 54.6184L10.0133 40.8399C9.78329 40.6962 9.58204 40.5021 9.40954 40.2721C9.38797 40.2362 9.35922 40.2002 9.33766 40.1643C9.10047 39.7977 8.99266 39.3737 8.99985 38.964V25.013C8.99266 24.6034 9.10766 24.1865 9.34485 23.8127C9.35922 23.784 9.38079 23.7624 9.39516 23.7337C9.56766 23.4893 9.7761 23.2952 10.0133 23.1443L30.7708 9.35867C31.468 8.87711 32.5317 8.87711 33.2289 9.35867L53.9864 23.1371C54.2236 23.288 54.432 23.4893 54.6045 23.7265C54.6189 23.7552 54.6405 23.7768 54.6549 23.8055C54.892 24.1793 54.9998 24.5962 54.9998 25.0059V38.964C55.007 39.3737 54.892 39.7905 54.662 40.1643C54.6405 40.2002 54.6117 40.2362 54.5902 40.2721C54.4249 40.5021 54.2164 40.689 53.9936 40.8399L33.2289 54.6184C32.8767 54.8555 32.4527 54.9993 31.9998 54.9993ZM34.1777 39.9774V48.7677L48.9049 38.9927L42.3355 34.5724L34.1777 39.9774ZM15.0948 38.9855L29.822 48.7605V39.9774L21.6642 34.5652L15.0948 38.9855ZM25.5742 31.9274L31.9998 36.1896L38.4255 31.9274L31.9998 27.6077L25.5742 31.9274ZM46.2598 31.9562L50.6442 34.9102V29.0452L46.2598 31.9562ZM13.3555 29.038V34.903L17.7398 31.949L13.3555 29.038ZM34.1777 23.8199L42.3498 29.3184L48.8905 24.9771L34.1777 15.2165V23.8199ZM15.1164 24.9843L21.657 29.3255L29.8292 23.8271V15.2165L15.1164 24.9843Z"></path> - </g> - - <g id="icon-code-block"> - <path d="M35.2981 20C34.5175 20 33.8188 20.4842 33.5447 21.2151L25.9492 41.4698C25.4901 42.6941 26.3951 44 27.7026 44C28.4832 44 29.182 43.5158 29.4561 42.7849L37.0516 22.5302C37.5107 21.3059 36.6056 20 35.2981 20ZM11.013 35.0376C8.34071 33.499 8.34073 29.643 11.013 28.1045L18.8813 23.5745C19.8385 23.0234 21.0613 23.3526 21.6124 24.3098C22.1635 25.2671 21.8343 26.4899 20.8771 27.041L13.0088 31.571L20.8771 36.1011C21.8343 36.6522 22.1635 37.875 21.6124 38.8322C21.0613 39.7895 19.8385 40.1187 18.8813 39.5676L11.013 35.0376ZM53.1299 35.0376C55.8022 33.499 55.8022 29.643 53.1299 28.1045L45.2616 23.5745C44.3044 23.0234 43.0816 23.3526 42.5305 24.3098C41.9794 25.2671 42.3086 26.4899 43.2658 27.041L51.1341 31.571L43.2658 36.1011C42.3086 36.6522 41.9794 37.875 42.5305 38.8322C43.0816 39.7895 44.3044 40.1187 45.2616 39.5676L53.1299 35.0376Z"></path> - </g> - - <g id="icon-arrow-bottom"> - <path d="M10.7472 18.9708C8.41355 21.415 8.41818 25.2485 10.7577 27.6871L27.093 44.7144C27.1826 44.8216 27.2764 44.9266 27.3743 45.0292C28.6361 46.3507 30.3291 47.0078 32.0197 46.9999C33.6972 46.9975 35.3737 46.3404 36.6257 45.0291C36.7233 44.9269 36.8167 44.8222 36.9062 44.7154L53.2423 27.6872C55.5818 25.2486 55.5864 21.4151 53.2528 18.9709C50.7481 16.3475 46.5437 16.3425 44.0326 18.9599L32 31.5022L19.9674 18.9598C17.4563 16.3424 13.2519 16.3474 10.7472 18.9708Z"></path> - </g> - - <g id="icon-delete-link"> - <path d="M13.2497 13.0226C11.032 15.2442 11.032 18.8461 13.2497 21.0677L24.0457 31.8826L13.0153 42.9323C10.7976 45.1539 10.7976 48.7558 13.0153 50.9774C15.2331 53.199 18.8287 53.199 21.0464 50.9774L32.0768 39.9278L42.9532 50.8233C45.1709 53.0449 48.7666 53.0449 50.9843 50.8233C53.202 48.6017 53.202 44.9997 50.9843 42.7781L40.1078 31.8826L50.7499 21.2219C52.9677 19.0003 52.9677 15.3983 50.7499 13.1767C48.5322 10.9551 44.9366 10.9551 42.7189 13.1767L32.0768 23.8375L21.2808 13.0226C19.063 10.801 15.4674 10.801 13.2497 13.0226Z"></path> - </g> - - <g id="icon-btn-accept"> - <path d="M51.3456 17.6735C49.1181 15.4422 45.5066 15.4422 43.2792 17.6735L26.0616 34.9213L20.741 29.5914C18.5126 27.3591 14.8997 27.3591 12.6713 29.5914C10.4429 31.8236 10.4429 35.4429 12.6713 37.6752L21.9937 47.0139C24.222 49.2462 27.835 49.2462 30.0633 47.0139C30.1078 46.9693 30.1514 46.9243 30.194 46.8787C30.3822 46.7324 30.5633 46.5728 30.736 46.3997L51.3456 25.7541C53.573 23.5227 53.573 19.9049 51.3456 17.6735Z"></path> - </g> - - <g id="icon-align-left"> - <path d="M11 9C9.89543 9 9 9.89543 9 11C9 12.1046 9.89543 13 11 13H23C24.1046 13 25 12.1046 25 11C25 9.89543 24.1046 9 23 9H11ZM11 51C9.89543 51 9 51.8954 9 53C9 54.1046 9.89543 55 11 55H53C54.1046 55 55 54.1046 55 53C55 51.8954 54.1046 51 53 51H11ZM9 39C9 37.8954 9.89543 37 11 37H37C38.1046 37 39 37.8954 39 39C39 40.1046 38.1046 41 37 41H11C9.89543 41 9 40.1046 9 39ZM11 23C9.89543 23 9 23.8954 9 25C9 26.1046 9.89543 27 11 27H53C54.1046 27 55 26.1046 55 25C55 23.8954 54.1046 23 53 23H11Z"></path> - </g> - - <g id="icon-align-right"> - <path d="M41 9C39.8954 9 39 9.89543 39 11C39 12.1046 39.8954 13 41 13H53C54.1046 13 55 12.1046 55 11C55 9.89543 54.1046 9 53 9H41ZM11 51C9.89543 51 9 51.8954 9 53C9 54.1046 9.89543 55 11 55H53C54.1046 55 55 54.1046 55 53C55 51.8954 54.1046 51 53 51H11ZM25 39C25 37.8954 25.8954 37 27 37H53C54.1046 37 55 37.8954 55 39C55 40.1046 54.1046 41 53 41H27C25.8954 41 25 40.1046 25 39ZM11 23C9.89543 23 9 23.8954 9 25C9 26.1046 9.89543 27 11 27H53C54.1046 27 55 26.1046 55 25C55 23.8954 54.1046 23 53 23H11Z"></path> - </g> - - <g id="icon-align-center"> - <path d="M26 9C24.8954 9 24 9.89543 24 11C24 12.1046 24.8954 13 26 13H38C39.1046 13 40 12.1046 40 11C40 9.89543 39.1046 9 38 9H26ZM11 51C9.89543 51 9 51.8954 9 53C9 54.1046 9.89543 55 11 55H53C54.1046 55 55 54.1046 55 53C55 51.8954 54.1046 51 53 51H11ZM17 39C17 37.8954 17.8954 37 19 37H45C46.1046 37 47 37.8954 47 39C47 40.1046 46.1046 41 45 41H19C17.8954 41 17 40.1046 17 39ZM11 23C9.89543 23 9 23.8954 9 25C9 26.1046 9.89543 27 11 27H53C54.1046 27 55 26.1046 55 25C55 23.8954 54.1046 23 53 23H11Z"></path> - </g> - - <g id="icon-bold"> - <path d="M15 50C15 52.7614 17.2386 55 20 55H32.9922C44.0389 55 49 49.3673 49 41.8571C49 35.1933 45.4069 31.9731 39.714 30.9461C39.6526 30.935 39.607 30.8816 39.607 30.8192C39.607 30.7636 39.6438 30.714 39.6966 30.6965C44.9893 28.9442 47.1479 25.5349 47.1479 20.6006C47.1479 13.1574 42.3191 9 32 9H20C17.2386 9 15 11.2386 15 14V50ZM29.3268 48.2274C26.5654 48.2274 24.3268 45.9888 24.3268 43.2274V39.3469C24.3268 36.5855 26.5654 34.3469 29.3268 34.3469H31.0078C36.3658 34.3469 39.3424 36.3586 39.3424 41.1195C39.3424 45.9475 36.4981 48.2274 31.3385 48.2274H29.3268ZM29.3268 28.4461C26.5654 28.4461 24.3268 26.2075 24.3268 23.4461V20.7055C24.3268 17.9441 26.5654 15.7055 29.3268 15.7055H30.4125C35.3074 15.7055 37.821 17.3149 37.821 22.0087C37.821 26.8367 34.5798 28.4461 30.1479 28.4461H29.3268Z"></path> - </g> - - <g id="icon-italic"> - <path d="M25 11C25 9.89543 25.8954 9 27 9H34H40H46C47.1046 9 48 9.89543 48 11C48 12.1046 47.1046 13 46 13H39.0435L29.9565 51H36C37.1046 51 38 51.8954 38 53C38 54.1046 37.1046 55 36 55H29H23H17C15.8954 55 15 54.1046 15 53C15 51.8954 15.8954 51 17 51H23.9565L33.0435 13H27C25.8954 13 25 12.1046 25 11Z"></path> - </g> - - <g id="icon-underline"> - <path d="M21 13C21 11.8954 20.1046 11 19 11C17.8954 11 17 11.8954 17 13V28C17 36.2843 23.7157 43 32 43C40.2843 43 47 36.2843 47 28V13C47 11.8954 46.1046 11 45 11C43.8954 11 43 11.8954 43 13V28C43 34.0751 38.0751 39 32 39C25.9249 39 21 34.0751 21 28V13ZM13 49C11.8954 49 11 49.8954 11 51C11 52.1046 11.8954 53 13 53H51C52.1046 53 53 52.1046 53 51C53 49.8954 52.1046 49 51 49H13Z"></path> - </g> - - <g id="icon-strikethrough"> - <path d="M49 42.0827C49 46.213 47.3861 49.3985 44.1583 51.6391C40.9305 53.8797 36.4003 55 30.5676 55C25.2609 55 20.9589 54.3116 17.6613 52.9349C16.6952 52.5315 16.1274 51.5533 16.1274 50.5064C16.1274 48.407 18.3376 47.0078 20.3303 47.6687C21.2971 47.9893 22.2887 48.2735 23.305 48.5211C25.8816 49.142 28.3591 49.4525 30.7375 49.4525C34.4183 49.4525 37.2497 48.8991 39.2317 47.7923C41.2136 46.6585 42.2046 44.9442 42.2046 42.6496C42.2046 40.9219 41.4118 39.4507 39.8263 38.2359C38.9729 37.5555 37.669 36.8102 35.9145 36H47.1393C48.3798 37.7105 49 39.7381 49 42.0827ZM32.2534 28H19.0141C18.3351 27.3458 17.7693 26.6544 17.3166 25.9261C16.4389 24.4683 16 22.7271 16 20.7025C16 17.0851 17.5431 14.2371 20.6293 12.1585C23.7156 10.0528 27.9485 9 33.3282 9C37.3092 9 41.2187 9.61323 45.0567 10.8397C46.6953 11.3633 47.4248 13.2208 46.708 14.7845C46.04 16.2418 44.353 16.9113 42.8299 16.4114C39.2086 15.2228 35.8715 14.6285 32.8185 14.6285C29.4775 14.6285 26.9575 15.1279 25.2587 16.1268C23.5598 17.1256 22.7104 18.5023 22.7104 20.257C22.7104 21.4448 23.0219 22.4572 23.6448 23.294C24.296 24.1309 25.3295 24.9272 26.7452 25.6831C27.8244 26.2593 29.6605 27.0316 32.2534 28ZM11 30C9.89543 30 9 30.8954 9 32C9 33.1046 9.89543 34 11 34H53C54.1046 34 55 33.1046 55 32C55 30.8954 54.1046 30 53 30H11Z"></path> - </g> - - <g id="icon-table-header"> - <path fill-rule="evenodd" clip-rule="evenodd" d="M13 13H51V23H13V13ZM9 13C9 10.791 10.7909 9 13 9H51C53.2091 9 55 10.791 55 13V23V27H51H13H9V23V13ZM9 30C9 28.8964 9.89392 28.0015 10.9972 28H11.0028C12.1061 28.0015 13 28.8964 13 30V32C13 33.1046 12.1046 34 11 34C9.89543 34 9 33.1046 9 32V30ZM51 30C51 28.8954 51.8954 28 53 28C54.1046 28 55 28.8954 55 30V32C55 33.1046 54.1046 34 53 34C51.8954 34 51 33.1046 51 32V30ZM11 37C12.1046 37 13 37.8954 13 39V41C13 42.1046 12.1046 43 11 43C9.89543 43 9 42.1046 9 41V39C9 37.8954 9.89543 37 11 37ZM53 37C54.1046 37 55 37.8954 55 39V41C55 42.1046 54.1046 43 53 43C51.8954 43 51 42.1046 51 41V39C51 37.8954 51.8954 37 53 37ZM11 46C12.1046 46 13 46.8954 13 48V49C13 49.1208 13.0105 49.2376 13.0302 49.3498C13.2208 50.4379 12.4933 51.4744 11.4053 51.665C10.3173 51.8556 9.28075 51.1281 9.09016 50.0401C9.03074 49.7009 9 49.3532 9 49V48C9 46.8954 9.89543 46 11 46ZM53 46C54.1046 46 55 46.8954 55 48V49C55 49.3532 54.9693 49.7009 54.9098 50.0401C54.7192 51.1281 53.6827 51.8556 52.5947 51.665C51.5067 51.4744 50.7792 50.4379 50.9698 49.3499C50.9895 49.2376 51 49.1208 51 49V48C51 46.8954 51.8954 46 53 46ZM12.335 52.5947C12.5256 51.5067 13.5621 50.7792 14.6501 50.9698C14.7624 50.9895 14.8792 51 15 51H15.9444C17.049 51 17.9444 51.8954 17.9444 53C17.9444 54.1046 17.049 55 15.9444 55H15C14.6468 55 14.2991 54.9693 13.9599 54.9098C12.8719 54.7192 12.1444 53.6827 12.335 52.5947ZM51.665 52.5947C51.8555 53.6827 51.1281 54.7192 50.0401 54.9098C49.7009 54.9693 49.3532 55 49 55H48.0556C46.951 55 46.0556 54.1046 46.0556 53C46.0556 51.8954 46.951 51 48.0556 51H49C49.1208 51 49.2376 50.9895 49.3498 50.9698C50.4379 50.7792 51.4744 51.5067 51.665 52.5947ZM20.5556 53C20.5556 51.8954 21.451 51 22.5556 51H24.4444C25.549 51 26.4444 51.8954 26.4444 53C26.4444 54.1046 25.549 55 24.4444 55H22.5556C21.451 55 20.5556 54.1046 20.5556 53ZM29.0556 53C29.0556 51.8954 29.951 51 31.0556 51H32.9444C34.049 51 34.9444 51.8954 34.9444 53C34.9444 54.1046 34.049 55 32.9444 55H31.0556C29.951 55 29.0556 54.1046 29.0556 53ZM37.5556 53C37.5556 51.8954 38.451 51 39.5556 51H41.4444C42.549 51 43.4444 51.8954 43.4444 53C43.4444 54.1046 42.549 55 41.4444 55H39.5556C38.451 55 37.5556 54.1046 37.5556 53Z"></path> - </g> - - <g id="icon-table-body"> - <path fill-rule="evenodd" clip-rule="evenodd" d="M15 13C14.8914 13 14.7862 13.0085 14.6846 13.0244C13.5934 13.1959 12.5698 12.4504 12.3983 11.3592C12.2268 10.268 12.9724 9.24442 14.0636 9.07294C14.3698 9.02481 14.6827 9 15 9H16.1333C17.2379 9 18.1333 9.89543 18.1333 11C18.1333 12.1046 17.2379 13 16.1333 13H15ZM23.2 11C23.2 9.89543 24.0954 9 25.2 9H27.4667C28.5712 9 29.4667 9.89543 29.4667 11C29.4667 12.1046 28.5712 13 27.4667 13H25.2C24.0954 13 23.2 12.1046 23.2 11ZM34.5333 11C34.5333 9.89543 35.4288 9 36.5333 9H38.8C39.9046 9 40.8 9.89543 40.8 11C40.8 12.1046 39.9046 13 38.8 13H36.5333C35.4288 13 34.5333 12.1046 34.5333 11ZM45.8667 11C45.8667 9.89543 46.7621 9 47.8667 9H49C49.3173 9 49.6302 9.02481 49.9364 9.07294C51.0276 9.24442 51.7732 10.268 51.6017 11.3592C51.4302 12.4504 50.4066 13.1959 49.3154 13.0244C49.2138 13.0085 49.1086 13 49 13H47.8667C46.7621 13 45.8667 12.1046 45.8667 11ZM11.3592 12.3983C12.4504 12.5698 13.1959 13.5934 13.0244 14.6846C13.0085 14.7862 13 14.8914 13 15V16.1333C13 17.2379 12.1046 18.1333 11 18.1333C9.89543 18.1333 9 17.2379 9 16.1333V15C9 14.6827 9.02481 14.3698 9.07294 14.0636C9.24442 12.9724 10.268 12.2268 11.3592 12.3983ZM52.6408 12.3983C53.732 12.2268 54.7556 12.9724 54.9271 14.0636C54.9752 14.3698 55 14.6827 55 15V16.1333C55 17.2379 54.1046 18.1333 53 18.1333C51.8954 18.1333 51 17.2379 51 16.1333V15C51 14.8914 50.9915 14.7862 50.9756 14.6846C50.8041 13.5934 51.5496 12.5698 52.6408 12.3983ZM9 27V23H13H51H55V27L55 51C55 53.2091 53.2091 55 51 55H13C10.7909 55 9 53.2091 9 51V27ZM51 27V51H13L13 27H51Z"></path> - </g> - - <g id="icon-link"> - <path d="M21 20H28C29.1046 20 30 20.8954 30 22C30 23.1046 29.1046 24 28 24H21C16.5817 24 13 27.5817 13 32C13 36.4183 16.5817 40 21 40H28C29.1046 40 30 40.8955 30 42C30 43.1045 29.1046 44 28 44H21C14.3726 44 9 38.6274 9 32C9 25.3726 14.3726 20 21 20ZM51 32C51 36.4183 47.4183 40 43 40H36C34.8964 40 34.0015 40.8939 34 41.9972V42L34 42.0028C34.0015 43.1061 34.8964 44 36 44H43C49.6274 44 55 38.6274 55 32C55 25.3726 49.6274 20 43 20H36C34.8954 20 34 20.8955 34 22C34 23.1045 34.8954 24 36 24H43C47.4183 24 51 27.5817 51 32ZM24.5 30C23.3954 30 22.5 30.8954 22.5 32C22.5 33.1046 23.3954 34 24.5 34H39.5C40.6046 34 41.5 33.1046 41.5 32C41.5 30.8954 40.6046 30 39.5 30H24.5Z"></path> - </g> - - <g id="icon-theme"> - <path fill-rule="evenodd" clip-rule="evenodd" d="M23 13H13V23H23V13ZM23 27H13V36H23V27ZM13 51L13 40H23V51H18.5H13ZM13 55H18.5H23H51C53.2091 55 55 53.2091 55 51V41C55 38.7909 53.2091 37 51 37H39.9827L50.4263 26.5563C51.9884 24.9943 51.9884 22.4616 50.4263 20.8995L43.3553 13.8284C41.7932 12.2663 39.2605 12.2663 37.6984 13.8284L27 24.5269V13C27 10.7909 25.2091 9 23 9H13C10.7909 9 9 10.7909 9 13V51C9 53.2091 10.7909 55 13 55ZM27 30.1837V44.3258L47.5979 23.7279L40.5269 16.6569L27 30.1837ZM27 49.9827V51H51V41H35.9827L27 49.9827Z"></path> - </g> - - <g id="icon-word-block"> - <path fill-rule="evenodd" clip-rule="evenodd" d="M19 13H45C48.3137 13 51 15.6863 51 19V45C51 48.3137 48.3137 51 45 51H19C15.6863 51 13 48.3137 13 45V19C13 15.6863 15.6863 13 19 13ZM9 19C9 13.4772 13.4772 9 19 9H45C50.5228 9 55 13.4772 55 19V45C55 50.5228 50.5228 55 45 55H19C13.4772 55 9 50.5228 9 45V19ZM43.8342 28.665C43.0642 27.6159 42.0196 27.0914 40.7005 27.0914C40.0232 27.0914 39.4171 27.2234 38.8824 27.4873C38.3547 27.7513 37.8877 28.181 37.4813 28.7766H37.3316C37.4314 27.7343 37.4813 27 37.4813 26.5736V23H33.2995V38.797H36.5615L37.2246 37.6701H37.4813C37.8449 38.0491 38.1622 38.3198 38.4332 38.4822C38.7112 38.6447 39.025 38.7699 39.3743 38.8579C39.7237 38.9526 40.123 39 40.5722 39C41.9626 39 43.0463 38.4721 43.8235 37.4162C44.6078 36.3536 45 34.8883 45 33.0203C45 31.1658 44.6114 29.714 43.8342 28.665ZM37.8877 30.7868C38.1586 30.401 38.5865 30.2081 39.1711 30.2081C40.2193 30.2081 40.7433 31.132 40.7433 32.9797C40.7433 33.9069 40.6114 34.6108 40.3476 35.0914C40.0838 35.5651 39.7059 35.802 39.2139 35.802C38.6007 35.802 38.1586 35.599 37.8877 35.1929C37.6168 34.78 37.4813 34.1032 37.4813 33.1624V32.6041C37.4813 31.7783 37.6168 31.1726 37.8877 30.7868ZM26.754 37.2741L27.5561 38.797H30.4545V31.2538C30.4545 29.9408 30.0267 28.9188 29.1711 28.1878C28.3226 27.4569 27.1212 27.0914 25.5668 27.0914C23.4135 27.0914 21.631 27.4365 20.2193 28.1269L21.4278 30.7462C22.7897 30.1777 23.9127 29.8934 24.7968 29.8934C25.7807 29.8934 26.2727 30.3672 26.2727 31.3147V31.4772L24.2513 31.5381C22.5472 31.6125 21.246 31.9509 20.3476 32.5533C19.4492 33.1489 19 34.0592 19 35.2843C19 36.4619 19.328 37.3756 19.984 38.0254C20.6399 38.6751 21.5383 39 22.6791 39C23.6061 39 24.3619 38.8782 24.9465 38.6345C25.5312 38.3909 26.1052 37.9374 26.6684 37.2741H26.754ZM25.7487 35.7411C25.3922 36.0457 24.9608 36.198 24.4545 36.198C23.6631 36.198 23.2674 35.846 23.2674 35.1421C23.2674 34.2284 23.9554 33.7479 25.3316 33.7005L26.2941 33.6599V34.5533C26.2941 35.0406 26.1123 35.4365 25.7487 35.7411Z"></path> - </g> - - <g id="icon-arrow-down"> - <path d="M32 9C30.8954 9 30 9.89543 30 11V48.0208L18.4142 36.435C17.6332 35.654 16.3668 35.654 15.5858 36.435C14.8047 37.2161 14.8047 38.4824 15.5858 39.2635L30.6611 54.3388C31.4422 55.1199 32.7086 55.1199 33.4896 54.3388L48.5649 39.2635C49.346 38.4824 49.346 37.2161 48.5649 36.435C47.7839 35.654 46.5176 35.654 45.7365 36.435L34 48.1716V11C34 9.89543 33.1046 9 32 9Z"></path> - </g> - - <g id="icon-arrow-up"> - <path d="M45.7366 27.4896C46.5176 28.2706 47.7839 28.2706 48.565 27.4896C49.346 26.7085 49.346 25.4422 48.565 24.6612L33.4896 9.58579C32.7085 8.80473 31.4422 8.80474 30.6612 9.58579L15.5858 24.6612C14.8047 25.4422 14.8047 26.7085 15.5858 27.4896C16.3668 28.2706 17.6332 28.2706 18.4142 27.4896L30 15.9038V53C30 54.1046 30.8954 55 32 55C33.1045 55 34 54.1046 34 53V15.753L45.7366 27.4896Z"></path> - </g> - - <g id="icon-delete-block"> - <path fill-rule="evenodd" clip-rule="evenodd" d="M32 51C42.4934 51 51 42.4934 51 32C51 21.5066 42.4934 13 32 13C21.5066 13 13 21.5066 13 32C13 42.4934 21.5066 51 32 51ZM32 55C44.7026 55 55 44.7026 55 32C55 19.2974 44.7026 9 32 9C19.2974 9 9 19.2974 9 32C9 44.7026 19.2974 55 32 55ZM21.4142 42.6274C20.6332 41.8462 20.6332 40.5801 21.4142 39.7988L29.1715 32.0415L21.5858 24.4558C20.8047 23.6748 20.8047 22.4084 21.5858 21.6274C22.3668 20.8462 23.6332 20.8462 24.4142 21.6274L31.9999 29.2131L39.799 21.4141C40.58 20.6331 41.8464 20.6331 42.6274 21.4141C43.4084 22.1953 43.4084 23.4614 42.6274 24.2427L34.8284 32.0417L42.799 40.0122C43.58 40.7932 43.58 42.0596 42.799 42.8406C42.0179 43.6216 40.7516 43.6216 39.9706 42.8406L32.0001 34.8701L24.2426 42.6274C23.4616 43.4084 22.1953 43.4084 21.4142 42.6274Z"></path> - </g> - - <g id="icon-pc"> - <path d="M50 16H14C13.4477 16 13 16.4477 13 17V37C13 37.5523 13.4477 38 14 38H32H50C50.5523 38 51 37.5523 51 37V17C51 16.4477 50.5523 16 50 16ZM50 42H34V51H40C41.1046 51 42 51.8954 42 53C42 54.1046 41.1046 55 40 55H32H24C22.8954 55 22 54.1046 22 53C22 51.8954 22.8954 51 24 51H30V42H14C11.2386 42 9 39.7614 9 37V17C9 14.2386 11.2386 12 14 12H50C52.7614 12 55 14.2386 55 17V37C55 39.7614 52.7614 42 50 42Z"></path> - </g> - - <g id="icon-mobile"> - <path fill-rule="evenodd" clip-rule="evenodd" d="M22 13H42C42.5523 13 43 13.4477 43 14V50C43 50.5523 42.5523 51 42 51H22C21.4477 51 21 50.5523 21 50V14C21 13.4477 21.4477 13 22 13ZM17 14C17 11.2386 19.2386 9 22 9H42C44.7614 9 47 11.2386 47 14V50C47 52.7614 44.7614 55 42 55H22C19.2386 55 17 52.7614 17 50V14ZM32 49C33.1046 49 34 48.1046 34 47C34 45.8954 33.1046 45 32 45C30.8954 45 30 45.8954 30 47C30 48.1046 30.8954 49 32 49Z"></path> - </g> - - <g id="icon-folder"> - <path d="M32.8 25C30.8976 25 29.2584 23.6601 28.8799 21.7957C28.3243 19.0587 25.8981 17 23 17H19C15.6863 17 13 19.6863 13 23V30C13 30.102 13.0025 30.2031 13.0074 30.3033C13.0139 30.4343 13.0139 30.5657 13.0074 30.6967C13.0025 30.7969 13 30.898 13 31V41C13 44.3137 15.6863 47 19 47H45C48.3137 47 51 44.3137 51 41V31C51 27.6863 48.3137 25 45 25H32.8ZM9 23C9 17.4772 13.4772 13 19 13H23C27.8379 13 31.8734 16.4355 32.8 21H45C50.5228 21 55 25.4772 55 31V41C55 46.5228 50.5228 51 45 51H19C13.4772 51 9 46.5228 9 41V31C9 30.8323 9.00413 30.6656 9.01228 30.5C9.00413 30.3344 9 30.1677 9 30V23Z"></path> - </g> - - <g id="icon-lang"> - <path fill-rule="evenodd" clip-rule="evenodd" d="M36.1761 54.6218C34.8219 54.8702 33.4261 55 32 55C30.5739 55 29.1781 54.8702 27.8239 54.6218C26.1459 54.314 24.5316 53.8241 23.0023 53.1734C16.9854 50.6133 12.2829 45.5634 10.1884 39.3172C9.70152 37.8653 9.35556 36.3487 9.16675 34.7838C9.05666 33.8712 9 32.9422 9 32C9 31.0578 9.05666 30.1288 9.16675 29.2162C9.35556 27.6513 9.70152 26.1347 10.1884 24.6828C12.2829 18.4366 16.9854 13.3867 23.0023 10.8266C24.5316 10.1759 26.1459 9.68598 27.8239 9.3782C29.1781 9.12979 30.5739 9 32 9C33.4261 9 34.8219 9.12979 36.1761 9.3782C37.8541 9.68598 39.4684 10.1759 40.9977 10.8266C47.0146 13.3867 51.7171 18.4366 53.8116 24.6828C54.2985 26.1347 54.6444 27.6513 54.8332 29.2162C54.9433 30.1288 55 31.0578 55 32C55 32.9422 54.9433 33.8712 54.8332 34.7838C54.6444 36.3487 54.2985 37.8653 53.8116 39.3172C51.7171 45.5634 47.0146 50.6133 40.9977 53.1734C39.4684 53.8241 37.8541 54.314 36.1761 54.6218ZM26.2489 50.114C28.0631 50.6895 29.9953 51 32 51C34.0047 51 35.9369 50.6895 37.7511 50.114C38.4497 47.6337 39.0156 44.8095 39.405 41.7309C37.0282 41.9069 34.5489 42 32 42C29.4511 42 26.9718 41.9069 24.595 41.7309C24.9844 44.8095 25.5503 47.6337 26.2489 50.114ZM32 38C34.7118 38 37.3262 37.8905 39.8015 37.6879C39.9313 35.8544 40 33.9532 40 32C40 30.0468 39.9313 28.1456 39.8015 26.3121C37.3262 26.1095 34.7118 26 32 26C29.2882 26 26.6738 26.1095 24.1985 26.3121C24.0687 28.1456 24 30.0468 24 32C24 33.9532 24.0687 35.8544 24.1985 37.6879C26.6738 37.8905 29.2882 38 32 38ZM42.418 47.8917C42.8593 45.8389 43.2177 43.6432 43.4811 41.3371C45.4229 41.1038 47.2735 40.813 49.0116 40.4714C47.5055 43.4899 45.2197 46.0513 42.418 47.8917ZM43.8386 37.2609C46.2811 36.941 48.5413 36.5273 50.5698 36.0392C50.8516 34.7375 51 33.3861 51 32C51 30.6139 50.8516 29.2625 50.5698 27.9608C48.5413 27.4727 46.2811 27.059 43.8386 26.7391C43.9448 28.4507 44 30.2082 44 32C44 33.7918 43.9448 35.5493 43.8386 37.2609ZM42.418 16.1083C45.2197 17.9487 47.5055 20.5101 49.0116 23.5286C47.2735 23.187 45.4229 22.8962 43.4811 22.6629C43.2177 20.3568 42.8593 18.1611 42.418 16.1083ZM37.7511 13.886C38.4497 16.3663 39.0156 19.1905 39.405 22.2691C37.0282 22.0931 34.5489 22 32 22C29.4511 22 26.9718 22.0931 24.595 22.2691C24.9844 19.1905 25.5503 16.3663 26.2489 13.886C28.0631 13.3105 29.9953 13 32 13C34.0047 13 35.9369 13.3105 37.7511 13.886ZM21.582 16.1083C21.1407 18.1611 20.7823 20.3568 20.5189 22.6629C18.5771 22.8962 16.7265 23.187 14.9884 23.5286C16.4945 20.5101 18.7803 17.9487 21.582 16.1083ZM13 32C13 33.3861 13.1484 34.7375 13.4302 36.0392C15.4587 36.5273 17.7189 36.941 20.1614 37.2609C20.0552 35.5493 20 33.7918 20 32C20 30.2082 20.0552 28.4507 20.1614 26.7391C17.7189 27.059 15.4587 27.4727 13.4302 27.9608C13.1484 29.2625 13 30.6139 13 32ZM21.582 47.8917C18.7803 46.0513 16.4945 43.4899 14.9884 40.4714C16.7265 40.813 18.5771 41.1038 20.5189 41.3371C20.7823 43.6432 21.1407 45.8389 21.582 47.8917Z"></path> - </g> - - <g id="icon-add-col"> - <path fill-rule="evenodd" clip-rule="evenodd" d="M13 23L13 13L22 13V23H13ZM13 27V37H22L22 27H13ZM22 41H13L13 51H22V41ZM13 55C10.7909 55 9 53.2091 9 51L9 13C9 10.7909 10.7909 9 13 9L22 9C24.2091 9 26 10.7909 26 13L26 51C26 53.2091 24.2091 55 22 55H13ZM45 42C43.8954 42 43 41.1046 43 40V34H37C35.8954 34 35 33.1046 35 32C35 30.8954 35.8954 30 37 30H43V24C43 22.8954 43.8954 22 45 22C46.1046 22 47 22.8954 47 24V30H53C54.1046 30 55 30.8954 55 32C55 33.1046 54.1046 34 53 34H47V40C47 41.1046 46.1046 42 45 42Z"></path> - </g> - - <g id="icon-del-col"> - <path fill-rule="evenodd" clip-rule="evenodd" d="M13 13L13 23H22V13L13 13ZM13 37V27H22L22 37H13ZM13 41H22V51H13L13 41ZM9 51C9 53.2091 10.7909 55 13 55H22C24.2091 55 26 53.2091 26 51L26 13C26 10.7909 24.2091 9 22 9L13 9C10.7909 9 9 10.7909 9 13L9 51ZM37 30C35.8954 30 35 30.8954 35 32C35 33.1046 35.8954 34 37 34H53C54.1046 34 55 33.1046 55 32C55 30.8954 54.1046 30 53 30H37Z"></path> - </g> - - <g id="icon-add-row"> - <path fill-rule="evenodd" clip-rule="evenodd" d="M41 13H51V22H41V13ZM37 13H27V22H37V13ZM23 22V13H13L13 22H23ZM9 13C9 10.7909 10.7909 9 13 9H51C53.2091 9 55 10.7909 55 13V22C55 24.2091 53.2091 26 51 26H13C10.7909 26 9 24.2091 9 22V13ZM22 45C22 43.8954 22.8954 43 24 43H30V37C30 35.8954 30.8954 35 32 35C33.1046 35 34 35.8954 34 37V43H40C41.1046 43 42 43.8954 42 45C42 46.1046 41.1046 47 40 47H34V53C34 54.1046 33.1046 55 32 55C30.8954 55 30 54.1046 30 53V47H24C22.8954 47 22 46.1046 22 45Z"></path> - </g> - - <g id="icon-del-row"> - <path fill-rule="evenodd" clip-rule="evenodd" d="M51 13H41V22H51V13ZM27 13H37V22H27V13ZM23 13V22H13L13 13H23ZM13 9C10.7909 9 9 10.7909 9 13V22C9 24.2091 10.7909 26 13 26H51C53.2091 26 55 24.2091 55 22V13C55 10.7909 53.2091 9 51 9H13ZM24 43C22.8954 43 22 43.8954 22 45C22 46.1046 22.8954 47 24 47H40C41.1046 47 42 46.1046 42 45C42 43.8954 41.1046 43 40 43H24Z"></path> - </g> - </defs> - </svg> -`; -} - -function makeContentArea() { - return `<div class="editor-content djs-content"><p class="editor-item djs-item" contenteditable="true" data-type="text"></p></div>`; -} - -function makeBlockMenu(data) { - let arr = Object.entries(data); - let html = `<div class="editor-scroll-col editor-clearfix" data-count="${arr.length}">`; - - for (const [key, value] of arr) { - if (value.type === "block") { - html += `<button type="button" class="editor-btn djs-add-block" title="${value.text}" data-value="${key}" data-type="${value.type}"><svg viewbox="0 0 64 64" class="editor-icon"><use class="path" xlink:href="${value.icon}" href="${value.icon}"></use></svg>${value.text}</button>`; - } else if (value.type === "pop") { - html += `<button type="button" class="editor-btn djs-add-block djs-btn-ignore" title="${value.text}" data-value="${key}" data-type="${value.type}"><svg viewbox="0 0 64 64" class="editor-icon"><use class="path" xlink:href="${value.icon}" href="${value.icon}"></use></svg>${value.text}</button>`; - } else if (value.type === "file") { - html += `<button type="button" class="editor-btn djs-add-block" title="${value.text}" data-value="${key}" data-type="${value.type}"><svg viewbox="0 0 64 64" class="editor-icon"><use class="path" xlink:href="${value.icon}" href="${value.icon}"></use></svg>${value.text}</button>`; - } else { - html += `<button type="button" class="editor-btn djs-add-block" title="${value.text}" data-value="${key}" data-type="custom"><svg viewbox="0 0 64 64" class="editor-icon"><use class="path" xlink:href="${value.icon}" href="${value.icon}"></use></svg>${value.text}</button>`; - } - } - - html += `</div>`; - - return html; -} - -function makeBottomMenu() { - let html = ``; - - if (condition.mediaURL !== "") { - html += `<button type="button" class="editor-btn djs-toggle-target djs-btn-ignore" data-target=".editor-pop-folder"><svg viewbox="0 0 64 64" class="editor-icon"><use class="path" xlink:href="#icon-folder" href="#icon-folder"></use></svg>Media</button>`; - } - - if (condition.multiLang == true) { - html += `<button type="button" class="editor-btn djs-toggle-target djs-btn-ignore" data-target=".editor-pop-lang"><svg viewbox="0 0 64 64" class="editor-icon"><use class="path" xlink:href="#icon-lang" href="#icon-lang"></use></svg>Change language</button>`; - } - - html += `<button type="button" class="editor-btn editor-switch-device djs-switch-device"><svg class="editor-icon" viewbox="0 0 64 64"><use class="path editor-pc" xlink:href="#icon-pc" href="#icon-pc"></use><use class="path editor-mobile" xlink:href="#icon_mobile" href="#icon-mobile"></use></svg>Change view</button>`; - - return html; -} - -function makeLanguagePop() { - let html = `<div class="editor-pop-lang djs-trigger" data-length="${condition.langCategory.length}">`; - - condition.langCategory.forEach((lang) => { - if (lang == condition.lang) { - html += `<button type="button" class="editor-btn-lang djs-change-lang --act" data-value="${lang}">${lang.toUpperCase()}</button>`; - } else { - html += `<button type="button" class="editor-btn-lang djs-change-lang" data-value="${lang}">${lang.toUpperCase()}</button>`; - } - }); - - html += `</div>`; - - return html; -} - -function makeEmoticonPop() { - return ` - <div class="editor-list-pop editor-pop-emoticon djs-emoticon-pop djs-trigger"> - <div class="editor-btn-area djs-btn-area"> - </div> - - <div class="editor-scroll djs-scroll"> - <div class="editor-scroll-content djs-scroll-content"> - <div class="editor-list-emoticon djs-list-emoticon editor-clearfix"></div> - </div> - </div> - </div> - `; -} - -export function setEmoticonLayout() { - let html = ""; - - for (let [key, value] of Object.entries(condition.emoticonData)) { - html += `<button class="editor-emoticon-tap djs-emoticon-tap" data-key="${key}">${value.icon}</button>`; - } - - condition.btnEmoticonTapArea.insertAdjacentHTML("beforeend", html); -} - -export function setEmoticonList(key, data) { - let html = ""; - - data.forEach((row, index) => { - if (row.type == "image") { - html += `<button type="button" class="editor-emoticon djs-add-emoticon" data-key="${key}" data-idx="${index}"><img src="${row.src}" alt="${row.caption}" class="img"></button>`; - } else if (row.type == "svg") { - html += `<button type="button" class="editor-emoticon djs-add-emoticon" data-key="${key}" data-idx="${index}">${row.code}</button>`; - } - }); - - condition.listEmoticon.innerHTML = html; -} - -function makeFolderPop() { - return ` - <div class="editor-list-pop editor-pop-folder editor-scroll djs-folder-pop djs-trigger djs-scroll"> - <div class="editor-scroll-content djs-scroll-content"> - <ul class="editor-list-media djs-list-media editor-clearfix"></ul> - </div> - <button type="button" class="editor-add-media djs-add-media">Add Media</button> - </div> - `; -} - -function makeLinkboxPop() { - return ` - <div class="editor-pop-linkbox djs-linkbox-pop editor-clearfix djs-trigger" data-type="new"> - <input type="url" class="editor-input djs-input --new" placeholder="https://dico.me"> - <a href="" class="editor-link --del djs-link"></a> - <button type="button" class="editor-btn djs-btn" data-value=""> - <svg viewBox="0 0 64 64" class="editor-icon"><use class="path --del" xlink:href="#icon-delete-link" href="#icon-delete-link"></use><use class="path --new" xlink:href="#icon-btn-accept" href="#icon-btn-accept"></use></svg> - </button> - </div> - `; -} - -function makeUploadForm() { - let html = `<form enctype="multipart/form-data" method="post" class="editor-uploader djs-uploader">`; - - if (condition.csrfData.value != "") { - html += `<input type="hidden" name="${condition.csrfData.name}" value="${condition.csrfData.value}">`; - } - - if (condition.multiUpload == true) { - html += `<input type="file" name="file" multiple class="djs-file">`; - } else { - html += `<input type="file" name="file" class="djs-file">`; - } - - html += `</form>`; - - return html; -} - -export function scrollButtonHTML() { - return `<button type="button" class="scroll-bar djs-scroll-bar" style="transform:translateY(0)"></button>`; -} - -export function getDefaultBlockHTML(type, _0 = typeCheckThrow(type, "string")) { - let html; - - switch (type) { - case "textBlock": - html = getTextBlockHTML(); - break; - case "ulBlock": - html = getUlBlockHTML(); - break; - case "olBlock": - html = getOlBlockHTML(); - break; - case "quotaionBlock": - html = getQuotaionBlock(); - break; - case "tableBlock": - html = getTableBlock(); - break; - case "codeBlock": - html = getCodeBlock(); - break; - default: - html = ""; - } - - return html; -} - -export function getTextBlockHTML(content = "", _0 = typeCheckThrow(content, "string")) { - return `<p class="editor-item djs-item --djs-selected" contenteditable="true" data-type="text">${content}</p>`; -} - -export function getImageBlockHTML(attr, width = 700, _0 = typeCheckThrow(attr, "object"), _1 = typeCheckThrow(width, "number")) { - let html = `<div class="editor-item djs-item --djs-selected" data-type="image" data-webp="${attr.hasWebp}"><div class="editor-size djs-size" data-width="${width}">`; - - if (condition.useWebp == true) { - html += `<picture>`; - - if (attr.hasWebp == true) { - html += `<source srcset="${attr.src}.webp" type="image/webp">`; - } - - html += `<img src="${attr.src}.${attr.defaultFormat}" width="${attr.width}" alt="${attr.alt}" data-height="${attr.height}" class="editor-img djs-img" draggable="false">`; - html += `</picture>`; - } else { - html += `<img src="${attr.src}.${attr.defaultFormat}" width="${attr.width}" alt="${attr.alt}" data-height="${attr.height}" class="editor-img djs-img" draggable="false">`; - } - - html += `<button type="button" class="editor-btn-resize --left djs-resize" data-value="width" data-position="left">resize</button>`; - html += `<button type="button" class="editor-btn-resize --right djs-resize" data-value="width" data-position="right">resize</button>`; - html += `</div><p class="editor-caption djs-caption" contenteditable="true" data-type="caption">${attr.alt}</p></div>`; - - return html; -} - -export function getEmoticonBlockHTML(key, idx, _0 = typeCheckThrow(key, "string"), _1 = typeCheckThrow(idx, "number")) { - let data = condition.emoticonData[key].list[idx]; - let html = `<div class="editor-item djs-item --djs-selected" data-type="emoticon">`; - - if (data.type == "image") { - html += `<img src="${data.src}" alt="${data.caption}" data-width="${data.width}" data-height="${data.height}">`; - } else if (data.type == "svg") { - html += data.code; - } - - html += `</div>`; - - return html; -} - -function getUlBlockHTML(child = [""], _0 = typeCheckThrow(child, "array")) { - let html = `<ul class="editor-item djs-item --djs-selected" data-type="ul">`; - - child.forEach((row) => { - html += `<li contenteditable="true">${row}</li>`; - }); - - html += `</ul>`; - - return html; -} - -function getOlBlockHTML(child = [""], _0 = typeCheckThrow(child, "array")) { - let html = `<ol class="editor-item djs-item --djs-selected" data-style="number" data-type="ol">`; - - child.forEach((row) => { - html += `<li contenteditable="true">${row}</li>`; - }); - - html += `</ol>`; - - return html; -} - -export function getListChildHTML(content = "", _0 = typeCheckThrow(content, "string")) { - return `<li contenteditable="true">${content}</li>`; -} - -function getQuotaionBlock() { - return `<blockquote class="editor-item djs-item --djs-selected" data-type="quote" data-style="default"><p class="editor-text djs-text" contenteditable="true"></p><p class="editor-author djs-author" contenteditable="true"></p></blockquote>`; -} - -function getTableBlock() { - return ` - <div class="editor-item djs-item --djs-selected" data-type="table"> - <div class="editor-scroll"> - <table class="editor-table"> - <caption class="djs-caption" contenteditable="true"></caption> - <colgroup> - <col data-size="100"> - <col data-size="100"> - <col data-size="100"> - <col data-size="100"> - </colgroup> - <tbody> - <tr> - <th contenteditable="true" data-x="0" data-y="0"></th> - <th contenteditable="true" data-x="1" data-y="0"></th> - <th contenteditable="true" data-x="2" data-y="0"></th> - <th contenteditable="true" data-x="3" data-y="0"></th> - </tr> - <tr> - <td contenteditable="true" data-x="0" data-y="1"></td> - <td contenteditable="true" data-x="1" data-y="1"></td> - <td contenteditable="true" data-x="2" data-y="1"></td> - <td contenteditable="true" data-x="3" data-y="1"></td> - </tr> - </tbody> - </table> - </div> - </div> - `; -} - -function getCodeBlock() { - return `<pre class="editor-item djs-item --djs-selected" data-type="codeblock" data-theme="default" data-lang="text"><code class="nohighlight editor-code djs-code" contenteditable="true"></code></pre>`; -} - -export function getYoutubeBlock(code, _0 = typeCheckThrow(code, "string")) { - return ` - <div class="editor-item djs-item --djs-selected" data-type="youtube" data-code="${code}"> - <iframe src="https://www.youtube.com/embed/${code}" allow="accelerometer; encrypted-media; gyroscope; picture-in-picture" allowfullscreen class="editor-iframe djs-iframe"></iframe> - <button type="button" class="editor-edit">edit</button> - </div> - `; -} - -export function getCodepenBlock(nickname, code, height = 300, _0 = typeCheckThrow(nickname, "string"), _1 = typeCheckThrow(code, "string"), _2 = typeCheckThrow(height, "number")) { - return ` - <div class="editor-item djs-item --djs-selected" data-type="codepen"> - <iframe height="${height}" title="" src="https://codepen.io/${nickname}/embed/${code}?height=${height}&theme-id=${condition.codepenTheme}&default-tab=result" allowfullscreen class="editor-iframe djs-iframe" data-code="${code}" data-nickname="${nickname}"></iframe> - <button type="button" class="editor-btn-resize djs-resize" data-value="height">Resize height</button> - <button type="button" class="editor-edit">edit</button> - </div> - `; -} - -export function getLinkboxBlock(data, _0 = typeCheckThrow(data, "object")) { - return ` - <div class="editor-item djs-item --djs-selected" data-type="linkbox"> - <a href="${data.url}" target="_blank" rel="nofollow" class="editor-linkbox editor-clearfix djs-linkbox" draggable="false"> - <div class="editor-linkbox-img"> - <img src="${data.img}" alt="preview image" class="editor-img djs-img" draggable="false"> - </div> - - <div class="editor-linkbox-text"> - <p class="editor-title djs-title">${data.title}</p> - <p class="editor-description djs-description">${data.description}</p> - <p class="editor-domain djs-domain">${data.domain}</p> - </div> - </a> - </div> - `; -} - -function makeOptionPop() { - let active = "--act"; - - if (condition.layout == "container") { - active = ""; - } - - let html = ` - <div class="editor-pop-option djs-option-pop"> - <div class="editor-scroll-wrap"> - <div class="editor-clearfix djs-scroll-depth">`; - - html += ` - <div class="editor-col --act" data-group="text,li,table,codeblock,word"> - <button type="button" class="editor-select djs-fontsize djs-toggle-target djs-btn-ignore" data-target=".editor-list-fontsize"> - <span class="editor-text djs-text">${condition.defaultFontSize}</span> - - <svg class="editor-icon" viewbox="0 0 64 64"><use class="path" xlink:href="#icon-arrow-bottom" href="#icon-arrow-bottom"></use></svg> - </button> - - <div class="editor-list-fontsize editor-scroll djs-scroll djs-trigger"> - <div class="editor-scroll-content djs-scroll-content"> - `; - - condition.frontSize.forEach((size) => { - let text = Math.floor(condition.defaultFontSize * size); - - html += `<button type="button" class="editor-btn djs-change-fontsize" data-value="${size}">${text}</button>`; - }); - - html += ` - </div> - </div> - </div> - `; - - html += ` - <div class="editor-col --act" data-group="text,li,table,word"> - <button type="button" class="editor-color djs-color djs-toggle-target djs-btn-ignore" data-target=".editor-list-color" data-value="#333"></button> - <div class="editor-list-color djs-trigger"> - `; - - condition.colorList.forEach((color) => { - html += `<button type="button" class="editor-btn djs-change-color" data-value="${color}">${color}</button>`; - }); - - html += ` - </div> - </div> - `; - - html += ` - <div class="editor-col editor-btn-area --act" data-group="text,li,table,image,sticker"> - <button type="button" class="editor-btn djs-change-align" data-value="left"> - <svg viewBox="0 0 64 64" class="editor-icon"><use class="path" xlink:href="#icon-align-left" href="#icon-align-left"></use></svg>align left - </button> - - <button type="button" class="editor-btn djs-change-align" data-value="center"> - <svg viewBox="0 0 64 64" class="editor-icon"><use class="path" xlink:href="#icon-align-center" href="#icon-align-center"></use></svg> - - align center - </button> - - <button type="button" class="editor-btn djs-change-align" data-value="right"> - <svg viewBox="0 0 64 64" class="editor-icon"><use class="path" xlink:href="#icon-align-right" href="#icon-align-right"></use></svg>align right - </button> - </div> - - <div class="editor-col editor-btn-area --act" data-group="text,li,table,word,link"> - <button type="button" class="editor-btn djs-toggle-bold"> - <svg viewBox="0 0 64 64" class="editor-icon"><use class="path" xlink:href="#icon-bold" href="#icon-bold"></use></svg>bold - </button> - - <button type="button" class="editor-btn djs-toggle-italic"> - <svg viewBox="0 0 64 64" class="editor-icon"><use class="path" xlink:href="#icon-italic" href="#icon-italic"></use></svg>italic - </button> - - <button type="button" class="editor-btn djs-toggle-underline"> - <svg viewBox="0 0 64 64" class="editor-icon"><use class="path" xlink:href="#icon-underline" href="#icon-underline"></use></svg>underline - </button> - - <button type="button" class="editor-btn djs-toggle-strikethrough"> - <svg viewBox="0 0 64 64" class="editor-icon"><use class="path" xlink:href="#icon-strikethrough" href="#icon-strikethrough"></use></svg>strikethrough - </button> - </div> - - `; - - html += ` - <div class="editor-col --act" data-group="td,th"> - <button type="button" class="editor-select djs-colsize djs-toggle-target djs-btn-ignore" data-target=".editor-list-colsize"> - <span class="editor-text djs-text">100px</span> - <svg class="editor-icon" viewbox="0 0 64 64"><use class="path" xlink:href="#icon-arrow-bottom" href="#icon-arrow-bottom"></use></svg> - </button> - - <div class="editor-list-colsize editor-scroll djs-scroll djs-trigger"> - <div class="editor-scroll-content djs-scroll-content"> - `; - - for (let i = 1; i < 15; i += 1) { - let size = Math.floor(50 * i); - - html += `<button type="button" class="editor-btn djs-change-colsize" data-value="${size}">${size}px</button>`; - } - - html += ` - </div> - </div> - </div> - `; - - html += `<div class="editor-col editor-btn-area ${active}" data-group="td,th"> - <button type="button" class="editor-btn djs-cell-control" data-type="row" data-action="add"> - <svg viewBox="0 0 64 64" class="editor-icon"><use class="path" xlink:href="#icon-add-row" href="#icon-add-row"></use></svg>add row - </button> - - <button type="button" class="editor-btn djs-cell-control" data-type="row" data-action="delete"> - <svg viewBox="0 0 64 64" class="editor-icon"><use class="path" xlink:href="#icon-del-row" href="#icon-del-row"></use></svg>del row - </button> - - <button type="button" class="editor-btn djs-cell-control" data-type="col" data-action="add"> - <svg viewBox="0 0 64 64" class="editor-icon"><use class="path" xlink:href="#icon-add-col" href="#icon-add-col"></use></svg>add col - </button> - - <button type="button" class="editor-btn djs-cell-control" data-type="col" data-action="delete"> - <svg viewBox="0 0 64 64" class="editor-icon"><use class="path" xlink:href="#icon-del-col" href="#icon-del-col"></use></svg>del col - </button> - </div> - - <div class="editor-col editor-btn-area ${active}" data-group="td"> - <button type="button" class="editor-btn djs-table-header"> - <svg viewBox="0 0 64 64" class="editor-icon"><use class="path" xlink:href="#icon-table-header" href="#icon-table-header"></use></svg>change to table header - </button> - </div> - - <div class="editor-col editor-btn-area ${active}" data-group="th"> - <button type="button" class="editor-btn djs-table-body"> - <svg viewBox="0 0 64 64" class="editor-icon"><use class="path" xlink:href="#icon-table-body" href="#icon-table-body"></use></svg>change to table body - </button> - </div> - - <div class="editor-col editor-btn-area ${active}" data-group="word,link"> - <button type="button" class="editor-btn djs-open-linkbox"> - <svg viewBox="0 0 64 64" class="editor-icon"><use class="path" xlink:href="#icon-link" href="#icon-link"></use></svg>open linkbox pop - </button> - </div> - - <div class="editor-col editor-btn-area ${active}" data-group="codeblock"> - <button type="button" class="editor-btn djs-code-theme djs-toggle-target djs-btn-ignore" data-target=".editor-list-theme"> - <svg viewBox="0 0 64 64" class="editor-icon"><use class="path" xlink:href="#icon-theme" href="#icon-theme"></use></svg>open theme pop - </button> - - <div class="editor-list-select editor-list-theme djs-trigger"> - `; - - condition.codeTheme.forEach((theme) => { - html += `<button type="button" class="editor-btn djs-set-theme" data-value="${theme}">${upperFirstChar(theme)}</button>`; - }); - - html += ` - </div> - </div> - `; - - html += ` - <div class="editor-col ${active}" data-group="codeblock"> - <button type="button" class="editor-select djs-code-lang djs-toggle-target djs-btn-ignore" data-target=".editor-list-lang"> - <span class="editor-text djs-text">Text</span> - <svg class="editor-icon" viewbox="0 0 64 64"><use class="path" xlink:href="#icon-arrow-bottom" href="#icon-arrow-bottom"></use></svg> - </button> - - <div class="editor-list-select editor-list-lang djs-trigger"> - `; - - condition.codeLang.forEach((lang) => { - html += `<button type="button" class="editor-btn djs-set-lang" data-value="${lang}">${upperFirstChar(lang)}</button>`; - }); - - html += ` - </div> - </div> - `; - - html += ` - <div class="editor-col ${active}" data-group="ol"> - <button type="button" class="editor-select djs-list-style djs-toggle-target djs-btn-ignore" data-target=".editor-list-type"> - <span class="editor-text djs-text">Numbered - 1</span> - <svg class="editor-icon" viewbox="0 0 64 64"><use class="path" xlink:href="#icon-arrow-bottom" href="#icon-arrow-bottom"></use></svg> - </button> - - <div class="editor-list-select editor-list-type djs-trigger"> - <button type="button" class="editor-btn djs-set-list-type" data-value="number">Numbered - 1</button> - <button type="button" class="editor-btn djs-set-list-type" data-value="upper-roman">Upper-roman - I</button> - <button type="button" class="editor-btn djs-set-list-type" data-value="lower-roman">Lower-roman - i</button> - <button type="button" class="editor-btn djs-set-list-type" data-value="upper-alpha">Upper-alpha - A</button> - <button type="button" class="editor-btn djs-set-list-type" data-value="lower-alpha">Lower-alpha - a</button> - </div> - </div> - `; - - html += ` - <div class="editor-col editor-btn-area ${active}" data-group="all"> - <button type="button" class="editor-btn djs-move-up"> - <svg viewBox="0 0 64 64" class="editor-icon"><use class="path" xlink:href="#icon-arrow-up" href="#icon-arrow-up"></use></svg>move up block - </button> - </div> - `; - - html += ` - <div class="editor-col editor-btn-area ${active}" data-group="all"> - <button type="button" class="editor-btn djs-move-down"> - <svg viewBox="0 0 64 64" class="editor-icon"><use class="path" xlink:href="#icon-arrow-down" href="#icon-arrow-down"></use></svg>move down block - </button> - </div> - `; - - html += ` - <div class="editor-col editor-btn-area ${active}" data-group="word,wordblock"> - <button type="button" class="editor-btn djs-word-block"> - <svg viewBox="0 0 64 64" class="editor-icon"><use class="path" xlink:href="#icon-word-block" href="#icon-word-block"></use></svg>make word block - </button> - </div> - `; - - html += ` - <div class="editor-col editor-btn-area --noline ${active}" data-group="all"> - <button type="button" class="editor-btn djs-delete-block"> - <svg viewBox="0 0 64 64" class="editor-icon"><use class="path --red" xlink:href="#icon-delete-block" href="#icon-delete-block"></use></svg>delete block - </button> - </div> - </div> -</div> -</div>`; - - return html; -} - -export function setMediaList(data) { - let html = ""; - - data.forEach((row) => { - if (row.type == "image") { - html += ` - <li class="editor-media djs-media" data-type="image" data-idx="${row.fileIdx}"> - <div class="eidtor-img-area djs-add-media" data-src="${row.src}" data-alt="${row.alt}" data-default-format="${row.defaultFormat}" data-webp="${row.hasWebp}" data-width="${row.width}" data-height="${row.height}"> - <img src="${`${row.src}.${row.defaultFormat}`}" class="editor-img"> - </div> - - <p class="editor-name djs-name">${row.alt}</p> - <button type="button" class="editor-btn-del djs-del-media" data-idx="${row.fileIdx}"><svg viewBox="0 0 64 64" class="editor-icon"><use class="path" xlink:href="#icon-delete-block" href="#icon-delete-block"></use></svg>delete media</button> - </li> - `; - } - }); - - condition.listMedia.insertAdjacentHTML("beforeend", html); -} - -export function addBlockToContent(block, _0 = typeCheckThrow(block, "string")) { - let $target = getActiveElement(); - let $selectedItem = getElement(".--djs-selected"); - let $newItem; - - $target.insertAdjacentHTML("afterend", block); - - $newItem = $target.nextElementSibling; - - if ($newItem.contentEditable == "true") { - condition.activeElement = $newItem; - setCursor($newItem, 0); - } else { - let $child = getChild($newItem, "*[contenteditable]", false); - - if ($child != null) { - condition.activeElement = $child; - setCursor($child, 0); - } - } - - if ($selectedItem.length > 0) { - classControl($selectedItem, "remove", "--djs-selected"); - } - - condition.activeItem = $newItem; -} - -export function getContentData() { - let $itemList = getChild(condition.areaContent, ".djs-item"); - - return htmlToJson($itemList); -} diff --git a/old/resources/js/module/message.js b/old/resources/js/module/message.js deleted file mode 100644 index 2feabbf..0000000 --- a/old/resources/js/module/message.js +++ /dev/null @@ -1,10 +0,0 @@ -export const message = { - wrongValue: (valueName) => `DRAGON EDITOR - Wrong type value in "${valueName}".`, - wrongURL: (name, url) => `DRAGON EDITOR - Wrong URL value { ${name} : "${url}" }`, - wrongKey: (name, key) => `DRAGON EDITOR - Wrong key set "${name}" : { "${key}" : ... }`, - apiNotWorking: "API server is not responding.", - serverNotWorking: "Server is not responding.", - wrongItemStructure: "This block structure is broken, But we fixed it. Try again please.", - missingSelect: "Missing block. Please select block.", - noContentData: (lang) => `Language "${lang}" is didn't have content. Did you want duplicate to content?`, -}; diff --git a/old/resources/js/module/option.js b/old/resources/js/module/option.js deleted file mode 100644 index 0fd92e7..0000000 --- a/old/resources/js/module/option.js +++ /dev/null @@ -1,9 +0,0 @@ -const { typeCheckThrow } = require("./default"); - -export function setTextItemOption($node, option, _0 = typeCheckThrow($node, "node"), _1 = typeCheckThrow(option, "object")) { - for (const [key, value] of Object.entries(option)) { - if (value != "") { - $node.dataset[key] = value; - } - } -} diff --git a/old/resources/js/module/pop.js b/old/resources/js/module/pop.js deleted file mode 100644 index 0a71e0d..0000000 --- a/old/resources/js/module/pop.js +++ /dev/null @@ -1,266 +0,0 @@ -const { typeCheckThrow, classControl, isMobile, hasValueArrToArr } = require("./default"); -const { getElement, getChild, findParentByClass, findContenteditable } = require("./selector"); -const { getItemType, itemStructureValidation } = require("./item"); -const { getTextNodeStyle } = require("./textNode"); - -export function openPop(type, $node, _0 = typeCheckThrow(type, "string"), _1 = typeCheckThrow($node, "node")) { - let offset = $node.getBoundingClientRect(); - - switch (type) { - case "linkboxBlock": - openLinkPop("linkbox", offset); - break; - case "emoticonBlock": - openEmoticonPop(offset); - break; - case "youtubeBlock": - openLinkPop("youtube", offset); - break; - case "codepenBlock": - openLinkPop("codepen", offset); - break; - } -} - -function openEmoticonPop(offset, _0 = typeCheckThrow(offset, "domrect,object")) { - let popOffset = condition.popEmoticon.getBoundingClientRect(); - let right = condition.windowWidth - offset.right + (offset.width + 10); - let top = offset.top; - - if (isMobile() == true) { - let maxRight = condition.windowWidth - popOffset.width; - - top = offset.top + offset.height; - - if (right > maxRight) { - right = maxRight; - } - } - - condition.popEmoticon.style.top = `${top}px`; - condition.popEmoticon.style.right = `${right}px`; - closePopIgnore(condition.popEmoticon); - classControl(condition.popEmoticon, "toggle", "--act"); -} - -export function openLinkPop(type, offset = {}, _0 = typeCheckThrow(type, "string"), _1 = typeCheckThrow(offset, "domrect,object")) { - let popOffset = condition.popLinkbox.getBoundingClientRect(); - let $input = getChild(condition.popLinkbox, ".djs-input", false); - let $btn = getChild(condition.popLinkbox, ".djs-btn", false); - let $aTag = getChild(condition.popLinkbox, ".djs-link", false); - let right = condition.windowWidth - offset.right + (offset.width + 10); - let top = offset.top; - - if (isMobile() == true) { - let maxRight = condition.windowWidth - popOffset.width; - - top = offset.top + offset.height; - - if (right > maxRight) { - right = maxRight; - } - } - - if (type == "word") { - let $link = condition.baseNode.parentNode; - - $aTag.textContent = $link.href; - $aTag.href = $link.href; - $aTag.target = "_blank"; - $btn.dataset["value"] = type; - condition.popLinkbox.dataset["type"] = "del"; - $btn.dataset["type"] = type; - classControl(condition.popLinkbox, "add", "--act"); - } else { - $btn.dataset["value"] = type; - $input.value = ""; - condition.popLinkbox.style.top = `${top}px`; - condition.popLinkbox.style.right = `${right}px`; - closePopIgnore(condition.popLinkbox); - classControl(condition.popLinkbox, "add", "--act"); - setTimeout(() => { - $input.focus(); - }, 250); - } -} - -function closePopIgnore(node, _0 = typeCheckThrow(node, "node")) { - let $popList = getElement(".djs-trigger.--act"); - - if ($popList.length > 0) { - $popList.forEach(($pop) => { - if ($pop !== node) { - classControl($pop, "remove", "--act"); - } - }); - } -} - -export function closeOptionPop($target, _0 = typeCheckThrow($target, "node")) { - let isOptionPop = findParentByClass($target, "djs-option-pop") !== null ? true : false; - let isItem = findParentByClass($target, "djs-item") !== null ? true : false; - let $btn = findParentByClass($target, "djs-add-block"); - let isBtn = false; - - if ($btn != null) { - let type = $btn.dataset["type"]; - - if (type == "block") { - isBtn = true; - } - } - - if (isOptionPop == false && isItem == false && isBtn == false) { - classControl(condition.popOption, "remove", "--act"); - } -} - -export function openOptionPop() { - let $target = condition.activeElement == null ? condition.activeItem : condition.activeElement; - $target = $target.constructor.name == "HTMLTableCellElement" || $target.tagName == "CODE" ? condition.activeItem : $target; - let offset = $target.getBoundingClientRect(); - let type = getItemType(condition.activeItem, condition.activeElement); - let $colList = getChild(condition.popOption, ".editor-col"); - let popOffset = condition.popOption.getBoundingClientRect(); - - if (isMobile() !== true && condition.layout != "container") { - condition.popOption.style.top = `${offset.top - popOffset.height - 10}px`; - condition.popOption.style.left = `${offset.left}px`; - } - - $colList.forEach(($col) => { - let group = $col.dataset["group"].split(","); - - if (hasValueArrToArr(group, type) == true) { - classControl($col, "add", "--act"); - } else { - classControl($col, "remove", "--act"); - } - }); - - setOptionPopValue(); - classControl(condition.popOption, "add", "--act"); - if (isMobile() == true) { - let $scroll = getChild(condition.popOption, ".djs-scroll-depth", false); - let $childs = getChild(condition.popOption, ".--act"); - let width = 0; - - $childs.forEach(($child) => { - let childOffset = $child.getBoundingClientRect(); - - width += childOffset.width; - }); - - $scroll.style.width = `${Math.ceil(width)}px`; - } - itemStructureValidation(); -} - -export function setOptionPopValue() { - let $item = findParentByClass(condition.baseNode, "djs-item"); - - if ($item != null) { - let itemType = $item.dataset["type"]; - let $editableItem = findContenteditable(condition.baseNode); - let textStyle = getTextNodeStyle(condition.baseNode); - let fontSizeText = getElement(".djs-fontsize .djs-text", false); - let btnColor = getElement(".djs-color", false); - let btnListStyleText = getElement(".djs-list-style .djs-text", false); - let btnCodeLangText = getElement(".djs-code-lang .djs-text", false); - let btnColSizeText = getElement(".djs-colsize .djs-text", false); - - if ($editableItem == null) { - $editableItem = $item; - } - - let editableStyle = getTextNodeStyle($editableItem); - - if (textStyle.fontsize != "") { - fontSizeText.textContent = Math.floor(textStyle.fontsize * condition.defaultFontSize); - } else { - fontSizeText.textContent = condition.defaultFontSize; - } - - if (textStyle.color != "") { - btnColor.dataset["value"] = textStyle.color; - } else { - btnColor.dataset["value"] = condition.defaultColor; - } - - if (editableStyle.align != "") { - condition.btnAlign.forEach(($btn) => { - let value = $btn.dataset["value"]; - - if (value == editableStyle.align) { - classControl($btn, "add", "--act"); - } else { - classControl($btn, "remove", "--act"); - } - }); - } else { - classControl(condition.btnAlign, "remove", "--act"); - } - - if (textStyle.bold != "") { - classControl(condition.btnToggleBold, "add", "--act"); - } else { - classControl(condition.btnToggleBold, "remove", "--act"); - } - - if (textStyle.italic != "") { - classControl(condition.btnToggleItalic, "add", "--act"); - } else { - classControl(condition.btnToggleItalic, "remove", "--act"); - } - - if (textStyle.underline != "") { - classControl(condition.btnToggleUnderline, "add", "--act"); - } else { - classControl(condition.btnToggleUnderline, "remove", "--act"); - } - - if (textStyle.strikethrough != "") { - classControl(condition.btnToggleStrikethrough, "add", "--act"); - } else { - classControl(condition.btnToggleStrikethrough, "remove", "--act"); - } - - if (itemType == "ol") { - let text; - - condition.btnListType.forEach(($btn) => { - let value = $btn.dataset["value"]; - - if (value == $item.dataset["style"]) { - text = $btn.textContent; - } - }); - - btnListStyleText.textContent = text; - } - - if (itemType == "codeblock") { - let lang = $item.dataset["lang"]; - - btnCodeLangText.textContent = lang; - } - - if (itemType == "table") { - if ($editableItem.tagName !== "CAPTION") { - let x = parseInt($editableItem.dataset["x"]); - - if (isNaN(x) == false) { - let col = getChild($item, "col")[x]; - - btnColSizeText.textContent = `${col.dataset["size"]}px`; - } - } - } - - if (textStyle.wordblock != "") { - classControl(condition.btnWordBlock, "add", "--act"); - } else { - classControl(condition.btnWordBlock, "remove", "--act"); - } - } -} diff --git a/old/resources/js/module/scroll.js b/old/resources/js/module/scroll.js deleted file mode 100644 index ac77739..0000000 --- a/old/resources/js/module/scroll.js +++ /dev/null @@ -1,60 +0,0 @@ -const { typeCheckThrow } = require("./default"); -const { getChild } = require("./selector"); -const { scrollButtonHTML } = require("./layout"); -const { bindingScrollEvent } = require("./event"); - -export function setScroll() { - condition.scrollArea.forEach((node) => { - node.insertAdjacentHTML("beforeend", scrollButtonHTML()); - setScrollHeight(node); - bindingScrollEvent(node); - }); -} - -function setScrollHeight($wrap, _0 = typeCheckThrow($wrap, "node")) { - let $bar = getChild($wrap, ".djs-scroll-bar", false); - let value = getScrollInfo($wrap); - - $bar.style.height = `${value.scrollHeight}px`; -} - -export function refreshScroll() { - condition.scrollArea.forEach((node) => { - setScrollHeight(node); - bindingScrollEvent(node); - }); -} - -export function getScrollInfo($wrap, _0 = typeCheckThrow($wrap, "node")) { - let $content = getChild($wrap, ".djs-scroll-content", false); - let wrapOffset = $wrap.getBoundingClientRect(); - let contentOffset = $content.getBoundingClientRect(); - let contentChild = getChild($wrap, ".djs-scroll-content > *"); - let maxHeight = wrapOffset.height - 10; - let contentHeight = 0; - let percent, height, maxScrollTop, maxBarTop; - - contentChild.forEach((node) => { - contentHeight += node.getBoundingClientRect().height; - }); - - if (contentHeight < maxHeight) { - contentHeight = maxHeight; - } - - percent = (100 / contentHeight) * maxHeight; - height = Math.floor((percent / 100) * maxHeight); - maxScrollTop = contentHeight - contentOffset.height; - maxBarTop = contentOffset.height - 8 - height; - - if (height == maxHeight) { - height = 0; - } - - return { - scrollHeight: height, - contentHeight: contentHeight, - maxScrollTop: maxScrollTop, - maxBarTop: maxBarTop, - }; -} diff --git a/old/resources/js/module/selection.js b/old/resources/js/module/selection.js deleted file mode 100644 index e38a229..0000000 --- a/old/resources/js/module/selection.js +++ /dev/null @@ -1,14 +0,0 @@ -export function setSelection() { - let selection = window.getSelection(); - - condition.focusNode = selection.focusNode; - condition.focusOffset = selection.focusOffset; - condition.baseNode = selection.baseNode == undefined ? selection.anchorNode : selection.baseNode; - condition.baseOffset = selection.baseOffset == undefined ? selection.anchorOffset : selection.baseOffset; -} - -export function hasBaseNode() { - let selection = window.getSelection(); - - return selection.baseNode != null || selection.anchorNode != null; -} diff --git a/old/resources/js/module/selector.js b/old/resources/js/module/selector.js deleted file mode 100644 index 5fc912e..0000000 --- a/old/resources/js/module/selector.js +++ /dev/null @@ -1,88 +0,0 @@ -const { typeCheckThrow } = require("./default"); - -export function getElement(className, multiple = true, _0 = typeCheckThrow(className, "string"), _1 = typeCheckThrow(multiple, "boolean")) { - if (multiple == true) { - return document.querySelectorAll(className); - } else { - return document.querySelector(className); - } -} - -export function getChild(parent, className, multiple = true, _0 = typeCheckThrow(parent, "node"), _1 = typeCheckThrow(className, "string"), _2 = typeCheckThrow(multiple, "boolean")) { - if (multiple == true) { - return parent.querySelectorAll(className); - } else { - return parent.querySelector(className); - } -} - -function isDocumentHasElement(className, _0 = typeCheckThrow(className, "string")) { - let $node = document.querySelector(className); - return $node === null ? false : true; -} - -export function checkElement(className = "", defaultName, multiple = true, _0 = typeCheckThrow(className, "string"), _1 = typeCheckThrow(defaultName, "string"), _2 = typeCheckThrow(multiple, "boolean")) { - let $dumy = className == "" ? false : isDocumentHasElement(className); - - return $dumy == false ? getElement(defaultName, multiple) : getElement(className, multiple); -} - -export function findParentByClass($node, className, _0 = typeCheckThrow($node, "node"), _1 = typeCheckThrow(className, "string")) { - if ($node.constructor.name !== "HTMLBodyElement" && $node.constructor.name !== "HTMLHtmlElement") { - if ($node.constructor.name == "Text") { - $node = $node.parentNode; - } - - let check = $node.classList.contains(className); - - if (check === true) { - return $node; - } else { - if ($node.parentElement == null) { - return null; - } else { - return findParentByClass($node.parentElement, className); - } - } - } else { - return null; - } -} - -export function getActiveElement() { - let childCount = condition.areaContent.childElementCount; - let childList = getElement(".djs-content > *"); - - if (condition.activeItem == undefined) { - return childList[childCount - 1]; - } else { - if (condition.activeItem.classList.contains("djs-item") == true) { - return condition.activeItem; - } else { - return childList[childCount - 1]; - } - } -} - -export function findContenteditable($node, _0 = typeCheckThrow($node, "*")) { - let constructorName = $node.constructor.name; - let $target; - - if (constructorName !== "HTMLBodyElement") { - if (constructorName === "Text") { - $target = $node.parentElement; - } else { - $target = $node; - } - - let hasAttr = $target.getAttribute("contenteditable"); - - if (hasAttr == "true") { - return $target; - } else { - return findContenteditable($target.parentElement); - } - } else { - return null; - } -} diff --git a/old/resources/js/module/table.js b/old/resources/js/module/table.js deleted file mode 100644 index 93950a7..0000000 --- a/old/resources/js/module/table.js +++ /dev/null @@ -1,114 +0,0 @@ -const { typeCheckThrow } = require("./default"); -const { openOptionPop } = require("./pop"); -const { setCursor } = require("./cursor"); -const { findParentByClass, findContenteditable, getChild } = require("./selector"); - -export function changeTableCell(type, _0 = typeCheckThrow(type, "string")) { - let $editableItem = findContenteditable(condition.baseNode); - let html = $editableItem.innerHTML; - - $editableItem.insertAdjacentHTML("afterend", `<${type} contenteditable="true">${html}</${type}>`); - setCursor($editableItem.nextElementSibling, 0); - condition.activeElement = $editableItem.nextElementSibling; - $editableItem.remove(); - openOptionPop(); -} - -export function tableCellControl(type, action, x, y, _0 = typeCheckThrow(type, "string"), _1 = typeCheckThrow(action, "string"), _2 = typeCheckThrow(x, "string"), _3 = typeCheckThrow(y, "string")) { - let $item = findParentByClass(condition.baseNode, "djs-item"); - let colCount = getChild($item, "col"); - let $trList = getChild($item, "tr"); - let $targetCell; - x = parseInt(x); - y = parseInt(y); - - if (type == "row") { - if ($trList.length == 1 && action == "delete") { - return; - } - - let html = ""; - - html += "<tr>"; - colCount.forEach((col, index) => { - html += `<td contenteditable="true" data-x="${index}" data-y="${y + 1}"></td>`; - }); - html += "</tr>"; - - $trList.forEach(($tr, index) => { - if (index == y) { - if (action == "add") { - $tr.insertAdjacentHTML("afterend", html); - } else { - $tr.remove(); - } - } else if (index > y) { - let $cellList = getChild($tr, `*[data-x]`); - - $cellList.forEach(($cell) => { - let cellY = parseInt($cell.dataset["y"]); - - if (action == "add") { - $cell.dataset["y"] = cellY + 1; - } else { - $cell.dataset["y"] = cellY - 1; - } - }); - } - }); - - if (action == "add") { - $targetCell = getChild($item, `td[data-x="${x}"][data-y="${y + 1}"]`, false); - } else { - $targetCell = getChild($item, `*[data-x="${x}"][data-y="${y - 1}"]`, false); - } - } else if (type == "col") { - if (colCount.length == 1 && action == "delete") { - return; - } - - $trList.forEach(($tr) => { - let $cellList = getChild($tr, `*[data-x]`); - - $cellList.forEach(($cell, index) => { - let cellX = parseInt($cell.dataset["x"]); - let cellY = parseInt($cell.dataset["y"]); - - if (action == "add") { - if (index == x) { - $cell.insertAdjacentHTML("afterend", `<td contenteditable="true" data-x="${x + 1}" data-y="${cellY}"></td>`); - } else if (index > x) { - $cell.dataset["x"] = cellX + 1; - } - } else { - if (index == x) { - $cell.remove(); - } else if (index > x) { - $cell.dataset["x"] = cellX - 1; - } - } - }); - }); - - if (action == "add") { - colCount[x].insertAdjacentHTML("afterend", `<col data-size="100">`); - $targetCell = getChild($item, `*[data-x="${x + 1}"][data-y="${y}"]`, false); - } else { - colCount[x].remove(); - $targetCell = getChild($item, `*[data-x="${x - 1}"][data-y="${y}"]`, false); - } - } - - if ($targetCell !== null) { - setCursor($targetCell, 0); - } -} - -export function setTableColSize(value, _0 = typeCheckThrow(value, "string")) { - let $item = findParentByClass(condition.baseNode, "djs-item"); - let cell = findContenteditable(condition.baseNode); - let x = parseInt(cell.dataset["x"]); - let col = getChild($item, "col")[x]; - - col.dataset["size"] = value; -} diff --git a/old/resources/js/module/textNode.js b/old/resources/js/module/textNode.js deleted file mode 100644 index 497f9ed..0000000 --- a/old/resources/js/module/textNode.js +++ /dev/null @@ -1,502 +0,0 @@ -const { typeCheckThrow } = require("./default"); -const { findParentByClass, findContenteditable } = require("./selector"); -const { itemStructureValidation } = require("./item"); -const { setOptionPopValue } = require("./pop"); -const { setCursor } = require("./cursor"); - -export function getTextNodeStyle($node, _0 = typeCheckThrow($node, "*")) { - let $item = findParentByClass($node, "djs-item"); - let itemType = $item.dataset["type"]; - let attr = { - color: "", - fontsize: "", - align: "", - bold: "", - italic: "", - underline: "", - strikethrough: "", - wordblock: "", - depth: "", - }; - - if ($node.constructor.name == "Text") { - $node = $node.parentNode; - } - - if ($node.dataset != undefined) { - for (const [key] of Object.entries(attr)) { - attr[key] = $node.dataset[key] == undefined ? "" : $node.dataset[key]; - } - } - - switch ($node.tagName) { - case "B": - attr.bold = "true"; - break; - case "I": - attr.italic = "true"; - break; - case "U": - attr.underline = "true"; - break; - case "DEL": - attr.strikethrough = "true"; - break; - case "CODE": - if (itemType != "codeblock") { - attr.wordblock = "true"; - } - break; - } - - return attr; -} - -// 텍스트 스타일 컨트롤 -export function textNodeStyleing(type, value, _0 = typeCheckThrow(type, "string"), _1 = typeCheckThrow(value, "*")) { - const $editableElement = findContenteditable(condition.baseNode); - let isDifferentNode = false; - let isSelection = false; - let constructorName = condition.baseNode.constructor.name; - let $target; - - if (constructorName == "Text") { - $target = condition.baseNode.parentNode; - } else { - $target = condition.baseNode; - } - - if (condition.baseNode !== condition.focusNode) { - isDifferentNode = true; - } - - if (condition.baseOffset !== condition.focusOffset) { - isSelection = true; - } - - if ($target == $editableElement) { - if (isDifferentNode == false) { - if (isSelection == false) { - styleControlByEditableElement($target, type, value); - } else { - styleControlByWrapping($target, type, value); - } - } else { - styleControlByMerge(type, value); - } - } else { - if (isDifferentNode == false) { - if (isSelection == false) { - styleControlByStyleNode($target, type, value); - } else { - styleControlByInnerStyleNode($target, type, value); - } - } else { - styleControlByMerge(type, value); - } - } - - setOptionPopValue(); -} - -// 에디터블 아이템 스타일 -function styleControlByEditableElement($target, type, value) { - let isRemove = false; - - if (type == "fontsize" && value == "1") { - isRemove = true; - } else if (type == "color" && condition.defaultColor == value) { - isRemove = true; - } else if (value == false) { - isRemove = true; - } - - if (isRemove == false) { - $target.dataset[type] = value; - } else { - delete $target.dataset[type]; - } -} - -// 텍스트 스타일 랩핑 -function styleControlByWrapping($target, type, value) { - let childCount = $target.childNodes.length; - let text = condition.baseNode.textContent; - - soltOffset(); - - if (childCount == 1) { - if (text.length == condition.focusOffset && condition.baseOffset == 0) { - styleControlByEditableElement($target, type, value); - } else { - let firstText = text.substring(0, condition.baseOffset); - let middleText = text.substring(condition.baseOffset, condition.focusOffset); - let lastText = text.substring(condition.focusOffset, text.length); - let wrppingText = getWrappingNode(type, middleText, value); - - $target.innerHTML = `${firstText}${wrppingText}${lastText}`; - - if (condition.baseOffset == 0) { - condition.baseNode = $target.childNodes[0]; - setCursor($target.childNodes[0], 1); - } else { - condition.baseNode = $target.childNodes[1]; - setCursor($target.childNodes[1], 1); - } - } - } else if (childCount > 1) { - let firstText = text.substring(0, condition.baseOffset); - let middleText = text.substring(condition.baseOffset, condition.focusOffset); - let lastText = text.substring(condition.focusOffset, text.length); - let wrppingText = getWrappingNode(type, middleText, value); - let childNodes = $target.childNodes; - let html = ""; - let childIdx; - - for (let i = 0; i < childCount; i += 1) { - if (childNodes[i] == condition.baseNode) { - childIdx = i; - break; - } - } - - for (let i = 0; i < childCount; i += 1) { - if (childIdx == i) { - html += `${firstText}${wrppingText}${lastText}`; - } else { - if (childNodes[i].constructor.name == "Text") { - html += childNodes[i].textContent; - } else { - html += childNodes[i].outerHTML; - } - } - } - - $target.innerHTML = html; - - if (condition.baseOffset == 0) { - condition.baseNode = $target.childNodes[childIdx]; - setCursor($target.childNodes[childIdx], 1); - } else { - condition.baseNode = $target.childNodes[childIdx + 1]; - setCursor($target.childNodes[childIdx + 1], 1); - } - } -} - -// 스타일 노드 컨트롤 -function styleControlByStyleNode($target, type, value) { - const $editableElement = findContenteditable($target); - let styleValue = getTextNodeStyle($target); - let typeTag = getTagNameByType(type); - let tagName = $target.tagName; - let dataCount = $target.attributes.length; - let text = $target.textContent; - - if (value == false) { - if (dataCount == 0) { - $target.insertAdjacentText("afterend", text); - $target.remove(); - $editableElement.innerHTML = $editableElement.innerHTML; - setCursor($editableElement, 1); - } else { - if (tagName == typeTag) { - $target.insertAdjacentHTML("afterend", `<span>${text}</span>`); - styleValue[type] = ""; - - for (let [key, value] of Object.entries(styleValue)) { - if (value !== "") { - $target.nextElementSibling.dataset[key] = value; - } - } - - setCursor($target.nextElementSibling, 1); - $target.remove(); - } else { - delete $target.dataset[type]; - $editableElement.focus(); - } - } - } else { - if (type == "fontsize" && value == "1") { - delete $target.dataset[type]; - $editableElement.focus(); - } else if (type == "color" && condition.defaultColor == value) { - delete $target.dataset[type]; - $editableElement.focus(); - } else { - $target.dataset[type] = value; - $target.focus(); - } - } - - itemStructureValidation(); -} - -// 스타일 노드 내부 스타일 부여 (분리) -function styleControlByInnerStyleNode($target, type, value) { - const $editableElement = findContenteditable($target); - let styleValue = getTextNodeStyle($target); - let typeTag = getTagNameByType(type); - let tagName = $target.tagName; - let dataCount = $target.attributes.length; - let text = $target.textContent; - let childIdx; - - soltOffset(); - - $editableElement.childNodes.forEach((child, index) => { - if (child == $target) { - childIdx = index; - } - }); - - if (condition.baseOffset == 0 && condition.focusOffset == text.length) { - styleControlByStyleNode($target, type, value); - } else { - let firstText = text.substring(0, condition.baseOffset); - let middleText = text.substring(condition.baseOffset, condition.focusOffset); - let lastText = text.substring(condition.focusOffset, text.length); - let tag = tagName.toLowerCase(); - - if (value == false) { - if (dataCount == 0) { - firstText = getWrappingNode(type, firstText, value); - lastText = getWrappingNode(type, lastText, value); - - $target.insertAdjacentHTML("afterend", `${firstText}${middleText}${lastText}`); - $target.remove(); - setCursor($editableElement.childNodes[childIdx + 1], $editableElement.childNodes[childIdx + 1].textContent.length); - } else { - let option = ""; - let html = ""; - styleValue[type] = ""; - - for (let [key, value] of Object.entries(styleValue)) { - if (value !== "") { - option += ` data-${key}="${value}"`; - } - } - - if (tagName == typeTag) { - html += `<${tag}${option}>${firstText}</${tag}><span${option}>${middleText}</span><${tag}${option}>${lastText}</${tag}>`; - } else { - html += `<${tag}${option}>${firstText}</${tag}><${tag}${option}>${middleText}</${tag}><${tag}${option}>${lastText}</${tag}>`; - } - - $target.insertAdjacentHTML("afterend", html); - $target.remove(); - setCursor($editableElement.childNodes[childIdx + 1], 1); - } - } else { - if (dataCount == 0) { - $target.insertAdjacentHTML("afterend", `<${tag}>${firstText}</${tag}><${tag}>${middleText}</${tag}><${tag}>${lastText}</${tag}>`); - $target.remove(); - $editableElement.childNodes[childIdx + 1].dataset[type] = value; - setCursor($editableElement.childNodes[childIdx + 1], 1); - } else { - let preOption = ""; - let nextOption = ""; - let html = ""; - - for (let [key, value] of Object.entries(styleValue)) { - if (value !== "") { - preOption += ` data-${key}="${value}"`; - } - } - - styleValue[type] = value; - - for (let [key, value] of Object.entries(styleValue)) { - if (value !== "") { - nextOption += ` data-${key}="${value}"`; - } - } - - html += `<${tag}${preOption}>${firstText}</${tag}><${tag}${nextOption}>${middleText}</${tag}><${tag}${preOption}>${lastText}</${tag}>`; - $target.insertAdjacentHTML("afterend", html); - $target.remove(); - setCursor($editableElement.childNodes[childIdx + 1], 1); - } - } - } -} - -// 서로 다른 노드 상태에서 스타일 부여 (합병) -function styleControlByMerge(type, value) { - const $editableElement = findContenteditable(condition.baseNode); - let baseIdx, focusIdx; - let baseNode = condition.baseNode; - let focusNode = condition.focusNode; - let baseText; - let focusText; - let text = ""; - let junk = []; - - if (baseNode.parentNode !== $editableElement) { - baseNode = baseNode.parentNode; - } - - if (focusNode.parentNode !== $editableElement) { - focusNode = focusNode.parentNode; - } - - $editableElement.childNodes.forEach((child, index) => { - if (child == baseNode) { - baseIdx = index; - } else if (focusNode == child) { - focusIdx = index; - } - }); - - if (baseIdx > focusIdx) { - let node01 = baseNode; - let node02 = focusNode; - let idx01 = baseIdx; - let idx02 = focusIdx; - let offset01 = condition.baseOffset; - let offset02 = condition.focusOffset; - - baseNode = node02; - focusNode = node01; - baseIdx = idx02; - focusIdx = idx01; - condition.baseOffset = offset02; - condition.focusOffset = offset01; - } - - baseText = baseNode.textContent; - focusText = focusNode.textContent; - - text += baseText.substring(condition.baseOffset, baseText.length); - $editableElement.childNodes.forEach((child, index) => { - if (index > baseIdx && index < focusIdx) { - junk.push(child); - text += child.textContent; - } - }); - text += focusText.substring(0, condition.focusOffset); - - if (focusNode.constructor.name !== "Text") { - junk.forEach((item) => { - item.remove(); - }); - - baseNode.textContent = baseText.substring(0, condition.baseOffset); - focusNode.textContent = focusText.substring(condition.focusOffset, focusText.length); - } - - if (baseNode.constructor.name == "Text") { - if (focusNode.constructor.name == "Text") { - let html = ""; - - $editableElement.childNodes.forEach((child, index) => { - if (index < baseIdx) { - if (child.constructor.name == "Text") { - html += child.textContent; - } else { - html += child.outerHTML; - } - } else if (index == baseIdx) { - html += baseText.substring(0, condition.baseOffset); - html += getWrappingNode(type, text, value); - } else if (index == focusIdx) { - html += focusText.substring(condition.focusOffset, focusText.length); - } else if (index > focusIdx) { - if (child.constructor.name == "Text") { - html += child.textContent; - } else { - html += child.outerHTML; - } - } - }); - - junk.forEach((item) => { - item.remove(); - }); - - $editableElement.innerHTML = html; - setCursor($editableElement.childNodes[baseIdx + 1], 1); - } else { - focusNode.insertAdjacentHTML("beforebegin", getWrappingNode(type, text, value)); - setCursor(baseNode.nextElementSibling, 1); - } - } else { - if (focusNode.constructor.name == "Text") { - baseNode.textContent = baseText.substring(0, condition.baseOffset); - baseNode.insertAdjacentHTML("afterend", getWrappingNode(type, text, value)); - focusNode.textContent = focusText.substring(condition.focusOffset, focusText.length); - setCursor(baseNode.nextElementSibling, 1); - } else { - baseNode.insertAdjacentHTML("afterend", getWrappingNode(type, text, value)); - setCursor(baseNode.nextElementSibling, 1); - } - } -} - -function getTagNameByType(type) { - let name; - - switch (type) { - case "bold": - name = "B"; - break; - case "italic": - name = "I"; - break; - case "underline": - name = "U"; - break; - case "strikethrough": - name = "DEL"; - break; - case "wordblock": - name = "CODE"; - break; - } - - return name; -} - -function soltOffset() { - if (condition.baseOffset > condition.focusOffset) { - let baseOffset = condition.baseOffset; - let focusOffset = condition.focusOffset; - - condition.baseOffset = focusOffset; - condition.focusOffset = baseOffset; - } -} - -function getWrappingNode(type, text, value, _0 = typeCheckThrow(type, "string"), _1 = typeCheckThrow(text, "string"), _2 = typeCheckThrow(value, "*")) { - let html; - - switch (type) { - case "fontSize": - html = `<span data-font-size="${value}">${text}</span>`; - break; - case "color": - html = `<span data-color="${value}">${text}</span>`; - break; - case "bold": - html = `<b>${text}</b>`; - break; - case "italic": - html = `<i>${text}</i>`; - break; - case "underline": - html = `<u>${text}</u>`; - break; - case "strikethrough": - html = `<del>${text}</del>`; - break; - case "wordblock": - html = `<code>${text}</code>`; - break; - case "link": - html = `<a href="${value}" rel="nofollow">${text}</a>`; - break; - } - - return html; -} diff --git a/old/src/converter/index.js b/old/src/converter/index.js deleted file mode 100644 index fa1678b..0000000 --- a/old/src/converter/index.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.test = void 0; -exports.test = "123"; diff --git a/old/src/converter/index.ts b/old/src/converter/index.ts deleted file mode 100644 index 8a952fe..0000000 --- a/old/src/converter/index.ts +++ /dev/null @@ -1 +0,0 @@ -export const test = "123"; \ No newline at end of file diff --git a/old/src/index.js b/old/src/index.js deleted file mode 100644 index 1204366..0000000 --- a/old/src/index.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var converter_1 = require("./converter"); -console.log(converter_1.test); -var DragonEditor = { - component: function () { - return "VUE compoenet return"; - }, - binding: function (areaClassName) { - console.log(areaClassName); - }, - getText: function (name) { - return "Hello ".concat(converter_1.test || 'world'); - } -}; -exports.default = DragonEditor; diff --git a/old/src/index.ts b/old/src/index.ts deleted file mode 100644 index 63ebd3d..0000000 --- a/old/src/index.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { test } from "./converter"; - -console.log(test); - - -const DragonEditor = { - component: () => { - return "VUE compoenet return"; - }, - binding: (areaClassName: string) => { - console.log(areaClassName); - }, - getText: (name: string) => { - return `Hello ${test || 'world'}`; - } -} - -export default DragonEditor; \ No newline at end of file diff --git a/old/test/index.js b/old/test/index.js deleted file mode 100644 index e681495..0000000 --- a/old/test/index.js +++ /dev/null @@ -1,4 +0,0 @@ -import DragonEditor from "../dist/index.js"; - -console.log(DragonEditor); -// console.log(DragonEditor.getText()); diff --git a/old/tsconfig.json b/old/tsconfig.json deleted file mode 100644 index e1d61fe..0000000 --- a/old/tsconfig.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "compilerOptions": { - "target": "es2016", - "module": "commonjs", - "esModuleInterop": true, - "forceConsistentCasingInFileNames": true, - "strict": true, - "skipLibCheck": true, - "outDir": "dist", - "sourceMap": true - } -} diff --git a/old/tslint.json b/old/tslint.json deleted file mode 100644 index 8985cb4..0000000 --- a/old/tslint.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "defaultSeverity": "error", - "extends": ["tslint:recommended"], - "jsRules": {}, - "rules": { - "quotemark": "double" - }, - "rulesDirectory": [] -} diff --git a/old/webpack.config.js b/old/webpack.config.js deleted file mode 100644 index 09cc448..0000000 --- a/old/webpack.config.js +++ /dev/null @@ -1,140 +0,0 @@ -const webpack = require("webpack"); -const MiniCssExtractPlugin = require("mini-css-extract-plugin"); -const FixStyleOnlyEntriesPlugin = require("webpack-fix-style-only-entries"); -const TerserPlugin = require("terser-webpack-plugin"); -const path = require("path"); -const commonPath = path.resolve(__dirname, "resources"); -const name = "dragonEditor"; -const webpackMode = "production"; // ['development', 'production'] -const viewerName = "dragonEditorViewer"; -const PACKAGE = require("../package.json"); -const bannerText = `${name} ${PACKAGE.version}\n${PACKAGE.description}\nAuthor : ${PACKAGE.author} (https://github.com/lovefields)\nLicense : ${PACKAGE.license}`; - -let options = [ - { - type: "js", - name: name, - output: "dist", - file: [`${commonPath}/js/index.js`], - }, - { - type: "css", - name: name, - output: "dist", - file: [`${commonPath}/css/index.scss`], - }, - { - type: "css", - name: viewerName, - output: "dist", - file: [`${commonPath}/css/viewer.scss`], - }, -]; - -function getConfig(type, file, name) { - let config; - - if (type == "js") { - config = { - target: "web", - plugins: [ - new webpack.BannerPlugin({ - banner: bannerText, - }), - ], - resolve: { - extensions: [".js"], - }, - }; - } else { - config = { - resolve: { - extensions: [".css", ".scss"], - }, - module: { - rules: [ - { - test: /\.scss$/i, - use: [ - MiniCssExtractPlugin.loader, - { - loader: "css-loader", - options: { - url: false, - }, - }, - "sass-loader", - ], - }, - ], - }, - plugins: [ - new FixStyleOnlyEntriesPlugin(), - new MiniCssExtractPlugin({ - filename: `${name}.css`, - }), - new webpack.BannerPlugin({ - banner: bannerText, - }), - ], - }; - } - - return Object.assign({}, config, { - mode: webpackMode, - entry: { - common: file, - }, - optimization: { - minimize: true, - minimizer: [ - new TerserPlugin({ - extractComments: false, - }), - ], - }, - watch: true, - watchOptions: { - poll: 500, - }, - }); -} - -function getModuleList() { - let arr = []; - - options.forEach((item) => { - let config = getConfig(item.type, item.file, item.name); - let folder; - - if (item.type == "js") { - folder = "dist"; - } else { - folder = "dist/css"; - } - - if (item.type == "js") { - arr.push( - Object.assign({}, config, { - output: { - filename: `js/${item.name}.js`, - path: path.resolve(__dirname, folder), - library: "DragonEditor", - libraryTarget: "umd", - }, - }), - ); - } else { - arr.push( - Object.assign({}, config, { - output: { - path: path.resolve(__dirname, folder), - }, - }), - ); - } - }); - return arr; -} - -module.exports = getModuleList(); diff --git a/package.json b/package.json index 1c5483e..33cccdd 100644 --- a/package.json +++ b/package.json @@ -1,58 +1,58 @@ { - "name": "dragon-editor", - "version": "2.0.0-beta.1", - "description": "WYSIWYG editor on Nuxt.js", - "repository": { - "type": "git", - "url": "git+https://github.com/lovefields/dragonEditor.git" - }, - "license": "MIT", - "type": "module", - "exports": { - ".": { - "types": "./dist/types.d.ts", - "import": "./dist/module.mjs", - "require": "./dist/module.cjs" - } - }, - "main": "./dist/module.cjs", - "types": "./dist/types.d.ts", - "files": [ - "dist" - ], - "scripts": { - "prepack": "nuxt-module-build", - "dev": "nuxi dev playground", - "dev:build": "nuxi build playground", - "dev:prepare": "nuxt-module-build --stub && nuxi prepare playground", - "release": "npm run lint && npm run test && npm run prepack && changelogen --release && npm publish && git push --follow-tags", - "lint": "eslint .", - "test": "vitest run", - "test:watch": "vitest watch" - }, - "dependencies": { - "@nuxt/kit": "^3.5.0" - }, - "devDependencies": { - "@nuxt/eslint-config": "^0.1.1", - "@nuxt/module-builder": "^0.3.1", - "@nuxt/schema": "^3.5.0", - "@nuxt/test-utils": "^3.5.0", - "@types/node": "^18", - "changelogen": "^0.5.3", - "eslint": "^8.40.0", - "nuxt": "^3.5.0", - "vitest": "^0.31.0" - }, - "keywords": [ - "editor", - "wysiwyg-editor", - "korean", - "language" - ], - "author": "Lovefields <lovefield@dico.me> (https://dico.me)", - "bugs": { - "url": "https://github.com/lovefields/dragonEditor/issues" - }, - "homepage": "https://github.com/lovefields/dragonEditor#readme" -} + "name": "dragon-editor", + "version": "2.0.0", + "description": "WYSIWYG editor on Nuxt.js", + "repository": { + "type": "git", + "url": "git+https://github.com/lovefields/dragonEditor.git" + }, + "license": "MIT", + "type": "module", + "exports": { + ".": { + "types": "./dist/types.d.ts", + "import": "./dist/module.mjs", + "require": "./dist/module.cjs" + } + }, + "main": "./dist/module.cjs", + "types": "./dist/types.d.ts", + "files": [ + "dist" + ], + "scripts": { + "prepack": "nuxt-module-build", + "dev": "nuxi dev playground", + "dev:build": "nuxi build playground", + "dev:prepare": "nuxt-module-build --stub && nuxi prepare playground", + "release": "npm run lint && npm run test && npm run prepack && changelogen --release && npm publish && git push --follow-tags", + "lint": "eslint .", + "test": "vitest run", + "test:watch": "vitest watch" + }, + "dependencies": { + "@nuxt/kit": "^3.5.0" + }, + "devDependencies": { + "@nuxt/eslint-config": "^0.1.1", + "@nuxt/module-builder": "^0.3.1", + "@nuxt/schema": "^3.5.0", + "@nuxt/test-utils": "^3.5.0", + "@types/node": "^18", + "changelogen": "^0.5.3", + "eslint": "^8.40.0", + "nuxt": "^3.5.0", + "vitest": "^0.31.0" + }, + "keywords": [ + "editor", + "wysiwyg-editor", + "korean", + "language" + ], + "author": "Lovefields <lovefield@dico.me> (https://dico.me)", + "bugs": { + "url": "https://github.com/lovefields/dragonEditor/issues" + }, + "homepage": "https://github.com/lovefields/dragonEditor#readme" +} \ No newline at end of file diff --git a/src/core/components/SvgIcon.vue b/src/core/components/SvgIcon.vue index 17dd58a..7afcb3d 100644 --- a/src/core/components/SvgIcon.vue +++ b/src/core/components/SvgIcon.vue @@ -1,6 +1,6 @@ <template> <svg class="dragon-icon" viewBox="0 0 64 64"> - <component :is="iconComponent"/> + <component :is="iconComponent" /> </svg> </template> @@ -18,54 +18,54 @@ import DecorationBold from "./icon/DecorationBold.vue"; import DecorationItalic from "./icon/DecorationItalic.vue"; import DecorationUnderline from "./icon/DecorationUnderline.vue"; import DecorationStrikethrough from "./icon/DecorationStrikethrough.vue"; -import Link from "./icon/Link.vue"; +import LinkPath from "./icon/LinkPath.vue"; import CodeBlock from "./icon/CodeBlock.vue"; const props = defineProps<{ kind: string }>(); -let iconComponent; +let iconComponent: any; switch (props.kind) { - case "textBlock" : + case "textBlock": iconComponent = TextBlock; break; - case "imageBlock" : + case "imageBlock": iconComponent = ImageBlock; break; - case "ulBlock" : + case "ulBlock": iconComponent = UlBlock; break; - case "olBlock" : + case "olBlock": iconComponent = OlBlock; break; - case "quotationBlock" : + case "quotationBlock": iconComponent = QuotationBlock; break; - case "tableBlock" : + case "tableBlock": iconComponent = TableBlock; break; - case "alignLeft" : + case "alignLeft": iconComponent = AlignLeft; break; - case "alignCenter" : + case "alignCenter": iconComponent = AlignCenter; break; - case "alignRight" : + case "alignRight": iconComponent = AlignRight; break; - case "decorationBold" : + case "decorationBold": iconComponent = DecorationBold; break; - case "decorationItalic" : + case "decorationItalic": iconComponent = DecorationItalic; break; - case "decorationUnderline" : + case "decorationUnderline": iconComponent = DecorationUnderline; break; - case "decorationStrikethrough" : + case "decorationStrikethrough": iconComponent = DecorationStrikethrough; break; case "link": - iconComponent = Link; + iconComponent = LinkPath; break; case "codeBlock": iconComponent = CodeBlock; diff --git a/src/core/components/icon/Link.vue b/src/core/components/icon/LinkPath.vue similarity index 100% rename from src/core/components/icon/Link.vue rename to src/core/components/icon/LinkPath.vue diff --git a/src/module.ts b/src/module.ts index b824620..c668c85 100644 --- a/src/module.ts +++ b/src/module.ts @@ -1,4 +1,4 @@ -import {defineNuxtModule, addComponentsDir, createResolver} from "@nuxt/kit" +import { defineNuxtModule, addComponentsDir, createResolver, addComponent } from "@nuxt/kit" export default defineNuxtModule({ meta: { @@ -7,6 +7,10 @@ export default defineNuxtModule({ setup(options, nuxt) { const resolver = createResolver(import.meta.url) - addComponentsDir(resolver.resolve("./shared/components")); + // addComponentsDir(resolver.resolve("./shared/components")); + addComponent({ + name: 'DragonEditorComment', + filePath: resolver.resolve('./runtime/components/DragonEditorComment') + }); } }) diff --git a/src/shared/components/DragonEditorViewer.vue b/src/shared/components/DragonEditorViewer.vue index 41a40c8..0614335 100644 --- a/src/shared/components/DragonEditorViewer.vue +++ b/src/shared/components/DragonEditorViewer.vue @@ -1 +1,3 @@ -<template></template> \ No newline at end of file +<template> + <div class="editor-viewer"></div> +</template> \ No newline at end of file