chore: ignore components in web-server public dir
This commit is contained in:
11
.gitignore
vendored
11
.gitignore
vendored
@@ -4,17 +4,6 @@
|
|||||||
.idea
|
.idea
|
||||||
node_modules
|
node_modules
|
||||||
|
|
||||||
packages/web-server/log/*
|
|
||||||
!packages/web-server/log/.gitkeep
|
|
||||||
packages/web-server/tmp
|
|
||||||
packages/web-server/config/cap.yml
|
|
||||||
packages/web-server/app/assets/templates/generated/
|
|
||||||
packages/web-server/public/assets
|
|
||||||
packages/web-server/public/robots.txt
|
|
||||||
packages/web-server/public/uploads/*
|
|
||||||
packages/!web-server/public/uploads/.keep
|
|
||||||
packages/web-server/vendor
|
|
||||||
|
|
||||||
packages/web/dist
|
packages/web/dist
|
||||||
|
|
||||||
.sass-cache
|
.sass-cache
|
||||||
|
|||||||
11
packages/web-server/.gitignore
vendored
Normal file
11
packages/web-server/.gitignore
vendored
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
log/*
|
||||||
|
!log/.gitkeep
|
||||||
|
tmp
|
||||||
|
config/cap.yml
|
||||||
|
app/assets/templates/generated/
|
||||||
|
public/assets
|
||||||
|
public/components
|
||||||
|
public/robots.txt
|
||||||
|
public/uploads/*
|
||||||
|
packages/!web-server/public/uploads/.keep
|
||||||
|
vendor
|
||||||
@@ -11,8 +11,8 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "bundle exec rails s -b 0.0.0.0",
|
"start": "bundle exec rails s -b 0.0.0.0",
|
||||||
"start:no-binding": "bundle exec rails s",
|
"start:no-binding": "bundle exec rails s",
|
||||||
"clean": "bundle exec rails assets:clobber",
|
"build:components": "cp -r ../../node_modules/@standardnotes/components/dist/. public/components/",
|
||||||
"build": "bundle install && cp -r ../../node_modules/@standardnotes/components/dist/. public/components/ && bundle exec rails assets:precompile"
|
"build": "bundle install && yarn build:components && bundle exec rails assets:precompile"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@standardnotes/components-meta": "^0.1.0",
|
"@standardnotes/components-meta": "^0.1.0",
|
||||||
|
|||||||
@@ -1,107 +0,0 @@
|
|||||||
{
|
|
||||||
"org.standardnotes.theme-midnight": {
|
|
||||||
"version": "1.2.8",
|
|
||||||
"base64": "df7838f1214a0efdc3d0d5302b04fb6f33384dd9431edcd2d1baabfe0808b681",
|
|
||||||
"binary": "511de23e2f0148fbf27523f550dea8aeb34d95690ff56607b6aec1c9af8df91b"
|
|
||||||
},
|
|
||||||
"org.standardnotes.theme-futura": {
|
|
||||||
"version": "1.2.9",
|
|
||||||
"base64": "44007ca0d84197140a8ecfdef08c0796187c97e8c8284ff2c394f2d37d4483d3",
|
|
||||||
"binary": "df8be9afe4ed6cd315e5c0b09aa11a61c769dcdf352bc1a3000a1cf0be285072"
|
|
||||||
},
|
|
||||||
"org.standardnotes.theme-solarized-dark": {
|
|
||||||
"version": "1.2.7",
|
|
||||||
"base64": "553b9b8717c237d91f20e287f035beb4cb5714c4e4d89fb2ec286d45b5d3457d",
|
|
||||||
"binary": "05d8edc7f4d686ed95bf6f2965cddf6256a674a9289d54fb6f3e6dae722f7a78"
|
|
||||||
},
|
|
||||||
"org.standardnotes.theme-autobiography": {
|
|
||||||
"version": "1.0.4",
|
|
||||||
"base64": "6bdd4fb649353d9b90990c579470cbb3ab69756b3e256f328ac195996726583f",
|
|
||||||
"binary": "32a8712b870c68726860b31cf2b2b7c62d80cb167fe5aa7ca7c76f89c39afca1"
|
|
||||||
},
|
|
||||||
"org.standardnotes.theme-focus": {
|
|
||||||
"version": "1.2.9",
|
|
||||||
"base64": "dcb86b825d13a0fdb0ce3a05a711158535334e8a04069056d96211ab80ca02b1",
|
|
||||||
"binary": "1516d80ab4a1c47f3b09b97463fa744b3d74478ca2f817c0735f47768ace68a1"
|
|
||||||
},
|
|
||||||
"org.standardnotes.theme-titanium": {
|
|
||||||
"version": "1.2.7",
|
|
||||||
"base64": "5ec4f59d09fae3f8bc62279eac15b6b7fcb00ba1324a7316bf5947ce543f7458",
|
|
||||||
"binary": "1cbe4b0944a0f614d031e0d869bf70c7aad369ee67a8c11e20962759fcb50c05"
|
|
||||||
},
|
|
||||||
"org.standardnotes.theme-dynamic": {
|
|
||||||
"version": "1.0.4",
|
|
||||||
"base64": "92038664655c6cb1d6b422b9546da1a98da58b0251394cf2a485aed9b1774c07",
|
|
||||||
"binary": "d05185aca67768f35227565dacce030fdff233563f119781baaf4e95f9198115"
|
|
||||||
},
|
|
||||||
"org.standardnotes.code-editor": {
|
|
||||||
"version": "1.3.12",
|
|
||||||
"base64": "79e1d65a478ef91626fbe0d6e1ead11106d1e7619d1bb54e7081987ab396c2ef",
|
|
||||||
"binary": "470ced1e16fbbc83c0e280971da388b1bbc6c90f2c489428fe86350bcc6baece"
|
|
||||||
},
|
|
||||||
"org.standardnotes.bold-editor": {
|
|
||||||
"version": "1.3.5",
|
|
||||||
"base64": "bcecfd1a6ee1909c9f484890cf58d6d52479f8d33c16e1d5d916d1a78a75b90f",
|
|
||||||
"binary": "84d6ca88665d4d6a1aeb456f8acce1a662bfe4550128aac1fb748abed974f236"
|
|
||||||
},
|
|
||||||
"org.standardnotes.plus-editor": {
|
|
||||||
"version": "1.6.1",
|
|
||||||
"base64": "741c77ab437b17e9e76755485b828a8530bfc0c713258e72374a6fced61a3aef",
|
|
||||||
"binary": "02da20d1969bc2cc9bc9e164bcd6f993183747c8d6c3edae814fa12789950544"
|
|
||||||
},
|
|
||||||
"org.standardnotes.simple-markdown-editor": {
|
|
||||||
"version": "1.4.2",
|
|
||||||
"base64": "765b52c459dddf8b7fbc70068526af51218d09ae5c1bca783ea0ecdc0cf5228b",
|
|
||||||
"binary": "bed9d0353a2b3ed721ea1f1ba3eba0f2452ffb730d436821148ee330ab5af651"
|
|
||||||
},
|
|
||||||
"org.standardnotes.advanced-markdown-editor": {
|
|
||||||
"version": "1.5.0",
|
|
||||||
"base64": "efec7575f3c6a9bbc5a7be555f6a1738af10c4d4144f146265e0a5e7ea49796d",
|
|
||||||
"binary": "b7c8874bb58be1d17103511f19325530f461e2b2cb3bbac87719525662907504"
|
|
||||||
},
|
|
||||||
"org.standardnotes.minimal-markdown-editor": {
|
|
||||||
"version": "1.3.9",
|
|
||||||
"base64": "cd84837e2591443fa5d331c069b2cf73d7bd1c493cda2d42695f7115e3850b30",
|
|
||||||
"binary": "cd3f7720c8d915d640291f06b4d23c2fc19071a38535aa3e3a89df8f96716ce7"
|
|
||||||
},
|
|
||||||
"org.standardnotes.fancy-markdown-editor": {
|
|
||||||
"version": "1.3.6",
|
|
||||||
"base64": "4601e4c4a1a5e0290fcfbd2d1f3389683d55237b751cc2953053a4ee7f997022",
|
|
||||||
"binary": "d8060e0eb8dc727339329be5e5150c077e2795ff2145521dc90a38717eea5d3c"
|
|
||||||
},
|
|
||||||
"org.standardnotes.simple-task-editor": {
|
|
||||||
"version": "1.3.10",
|
|
||||||
"base64": "dfcfa7373928a940b94f0779d1995698b9cae8ce770a2d7aa8ac6c0937b3a4e2",
|
|
||||||
"binary": "94e0153beb4c9e97d96ac7b9202b6f46c4cfd560075dda183258d5353e61e0a3"
|
|
||||||
},
|
|
||||||
"org.standardnotes.token-vault": {
|
|
||||||
"version": "2.0.10",
|
|
||||||
"base64": "65540f4e291ea5d00ecda1fc6a7c876ec33cdf41fabc4802eb675f92a4fcaea3",
|
|
||||||
"binary": "5db0caea04c8db86c8bdd99d973c7b9021a2cfaa5a9d7728c4a4775e22ae7c30"
|
|
||||||
},
|
|
||||||
"org.standardnotes.standard-sheets": {
|
|
||||||
"version": "1.4.4",
|
|
||||||
"base64": "9f583da4e61a6da1422a96ab4d1ba2835421e09d2de3c5efee2e8391431e045e",
|
|
||||||
"binary": "2464c763615910476edea2869418352b727f39847280d6f7745e07f19541f3e1"
|
|
||||||
},
|
|
||||||
"org.standardnotes.file-safe": {
|
|
||||||
"version": "2.0.10",
|
|
||||||
"base64": "e1d3ef7f1a4c0365a2b4037376813c4e46e8f54b61ecc3ed6a7346b27aa753ee",
|
|
||||||
"binary": "abfa7368ea3cabc9f6896d4070c899025b73378000bc67c3a607f88e048663a7"
|
|
||||||
},
|
|
||||||
"org.standardnotes.folders": {
|
|
||||||
"version": "1.3.8",
|
|
||||||
"base64": "e895b21645264f991cd212dbf3207731ecffab203f540f7145edad4601e6f6a2",
|
|
||||||
"binary": "88d4b9a6ff94b1f6cba884787e051cda3cd8073022984b63f7d3b13157aa6e2a"
|
|
||||||
},
|
|
||||||
"org.standardnotes.markdown-visual-editor": {
|
|
||||||
"version": "1.0.7",
|
|
||||||
"base64": "cc6cdd05685accb9bdbf34ea4faa2fd9324183b4d55312b60234b8e611cec71f",
|
|
||||||
"binary": "a7cf6e82a4ae7cc9e3c5c4efc24bcc69bd4ff17039123e9c0b883d1989f908c9"
|
|
||||||
},
|
|
||||||
"org.standardnotes.advanced-checklist": {
|
|
||||||
"version": "0.0.1",
|
|
||||||
"base64": "6fc4b14848e1692524448cfde7a06db543d5abbe3f7194fcd8c69c605ab08039",
|
|
||||||
"binary": "de1e23aa983a0f600d93e69dfd3d615d9ff608d88cd6f8ad0b15ffd04e0482bc"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
{
|
|
||||||
"files": {
|
|
||||||
"main.css": "./static/css/main.65d72c0e.css",
|
|
||||||
"main.js": "./static/js/main.4790c41f.js",
|
|
||||||
"index.html": "./index.html",
|
|
||||||
"main.65d72c0e.css.map": "./static/css/main.65d72c0e.css.map",
|
|
||||||
"main.4790c41f.js.map": "./static/js/main.4790c41f.js.map"
|
|
||||||
},
|
|
||||||
"entrypoints": [
|
|
||||||
"static/css/main.65d72c0e.css",
|
|
||||||
"static/js/main.4790c41f.js"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 3.8 KiB |
@@ -1 +0,0 @@
|
|||||||
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="./favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="A great way to manage short-term and long-term to-do's. You can mark tasks as completed, change their order, and edit the text naturally in place."/><link rel="apple-touch-icon" href="./logo192.png"/><link rel="manifest" href="./manifest.json"/><title>Task editor</title><script defer="defer" src="./static/js/main.4790c41f.js"></script><link href="./static/css/main.65d72c0e.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div class="sn-component" id="root"></div></body></html>
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 5.2 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 9.4 KiB |
@@ -1,25 +0,0 @@
|
|||||||
{
|
|
||||||
"short_name": "Task editor",
|
|
||||||
"name": "Task editor",
|
|
||||||
"icons": [
|
|
||||||
{
|
|
||||||
"src": "favicon.ico",
|
|
||||||
"sizes": "64x64 32x32 24x24 16x16",
|
|
||||||
"type": "image/x-icon"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"src": "logo192.png",
|
|
||||||
"type": "image/png",
|
|
||||||
"sizes": "192x192"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"src": "logo512.png",
|
|
||||||
"type": "image/png",
|
|
||||||
"sizes": "512x512"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"start_url": ".",
|
|
||||||
"display": "standalone",
|
|
||||||
"theme_color": "#000000",
|
|
||||||
"background_color": "#ffffff"
|
|
||||||
}
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "@standardnotes/task-editor",
|
|
||||||
"version": "1.4.0",
|
|
||||||
"description": "A great way to manage short-term and long-term to-do's. You can mark tasks as completed, change their order, and edit the text naturally in place.",
|
|
||||||
"keywords": [
|
|
||||||
"Standard Notes",
|
|
||||||
"Standard Notes Extensions"
|
|
||||||
],
|
|
||||||
"private": true,
|
|
||||||
"license": "AGPL-3.0-or-later",
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/standardnotes/task-editor.git"
|
|
||||||
},
|
|
||||||
"bugs": {
|
|
||||||
"url": "https://github.com/standardnotes/task-editor/issues"
|
|
||||||
},
|
|
||||||
"sn": {
|
|
||||||
"main": "index.html"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
# https://www.robotstxt.org/robotstxt.html
|
|
||||||
User-agent: *
|
|
||||||
Disallow:
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
{
|
|
||||||
"identifier": "org.standardnotes.task-editor-dev",
|
|
||||||
"name": "Task editor - Dev",
|
|
||||||
"content_type": "SN|Component",
|
|
||||||
"area": "editor-editor",
|
|
||||||
"version": "0.1.0",
|
|
||||||
"description": "A great way to manage short-term and long-term to-do's. You can mark tasks as completed, change their order, and edit the text naturally in place.",
|
|
||||||
"url": "http://localhost:3000/index.html",
|
|
||||||
"download_url": "",
|
|
||||||
"latest_url": "",
|
|
||||||
"marketing_url": "https://github.com/standardnotes/task-editor",
|
|
||||||
"thumbnail_url": ""
|
|
||||||
}
|
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,85 +0,0 @@
|
|||||||
/*
|
|
||||||
object-assign
|
|
||||||
(c) Sindre Sorhus
|
|
||||||
@license MIT
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*! @license DOMPurify 2.3.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.3.6/LICENSE */
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @license
|
|
||||||
* Lodash (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
|
|
||||||
* Build: `lodash include="includes,merge,filter,map,remove,find,omit,pull,cloneDeep,pick,uniq,sortedIndexBy,mergeWith"`
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @license
|
|
||||||
* Lodash <https://lodash.com/>
|
|
||||||
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
||||||
* Released under MIT license <https://lodash.com/license>
|
|
||||||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
||||||
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
||||||
*/
|
|
||||||
|
|
||||||
/** @license React v0.20.2
|
|
||||||
* scheduler.production.min.js
|
|
||||||
*
|
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/** @license React v16.13.1
|
|
||||||
* react-is.production.min.js
|
|
||||||
*
|
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/** @license React v17.0.2
|
|
||||||
* react-dom-server.browser.production.min.js
|
|
||||||
*
|
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/** @license React v17.0.2
|
|
||||||
* react-dom.production.min.js
|
|
||||||
*
|
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/** @license React v17.0.2
|
|
||||||
* react-is.production.min.js
|
|
||||||
*
|
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/** @license React v17.0.2
|
|
||||||
* react-jsx-runtime.production.min.js
|
|
||||||
*
|
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/** @license React v17.0.2
|
|
||||||
* react.production.min.js
|
|
||||||
*
|
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
File diff suppressed because one or more lines are too long
@@ -1,143 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "@standardnotes/advanced-checklist",
|
|
||||||
"version": "0.0.1",
|
|
||||||
"description": "A task editor with grouping functionality.",
|
|
||||||
"keywords": [
|
|
||||||
"Standard Notes",
|
|
||||||
"Standard Notes Extensions"
|
|
||||||
],
|
|
||||||
"publishConfig": {
|
|
||||||
"access": "public",
|
|
||||||
"registry": "https://registry.npmjs.org/"
|
|
||||||
},
|
|
||||||
"license": "AGPL-3.0-or-later",
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/standardnotes/advanced-checklist.git"
|
|
||||||
},
|
|
||||||
"bugs": {
|
|
||||||
"url": "https://github.com/standardnotes/advanced-checklist/issues"
|
|
||||||
},
|
|
||||||
"sn": {
|
|
||||||
"main": "build/index.html"
|
|
||||||
},
|
|
||||||
"homepage": ".",
|
|
||||||
"scripts": {
|
|
||||||
"analyze": "source-map-explorer 'build/static/js/*.js'",
|
|
||||||
"start": "react-scripts start",
|
|
||||||
"build": "react-scripts build",
|
|
||||||
"prepublishOnly": "npm run build",
|
|
||||||
"clean-deploy-cache": "rm -rf node_modules/.cache/gh-pages",
|
|
||||||
"predeploy": "yarn run pretty && yarn run build && yarn clean-deploy-cache",
|
|
||||||
"deploy-build": "yarn run predeploy && gh-pages -b build -d build",
|
|
||||||
"deploy-dev": "yarn run predeploy && gh-pages -b dev -d build",
|
|
||||||
"deploy-stable": "yarn run predeploy && gh-pages -b gh-pages -d build",
|
|
||||||
"test": "react-scripts test",
|
|
||||||
"test:coverage": "npm run test -- --coverage --watchAll",
|
|
||||||
"eject": "react-scripts eject",
|
|
||||||
"serve": "serve -s -p 3000 build",
|
|
||||||
"server-public": "http-server -p 3000 --cors",
|
|
||||||
"server-root": "http-server ./ -p 3000 --cors",
|
|
||||||
"server": "http-server ./build -p 3000 --cors",
|
|
||||||
"pretty": "prettier --write 'src/**/*.{html,css,scss,js,jsx,ts,tsx,json}' README.md",
|
|
||||||
"prepare": "husky install"
|
|
||||||
},
|
|
||||||
"eslintConfig": {
|
|
||||||
"extends": [
|
|
||||||
"react-app",
|
|
||||||
"react-app/jest"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"browserslist": {
|
|
||||||
"production": [
|
|
||||||
">0.2%",
|
|
||||||
"not dead",
|
|
||||||
"not op_mini all"
|
|
||||||
],
|
|
||||||
"development": [
|
|
||||||
"last 1 chrome version",
|
|
||||||
"last 1 firefox version",
|
|
||||||
"last 1 safari version"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"lint-staged": {
|
|
||||||
"README.md": [
|
|
||||||
"prettier --write"
|
|
||||||
],
|
|
||||||
"src/**/*.{js,jsx,ts,tsx,json,css,scss,md}": [
|
|
||||||
"prettier --write"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"jest": {
|
|
||||||
"collectCoverageFrom": [
|
|
||||||
"src/**/*.{js,jsx,ts,tsx}",
|
|
||||||
"!<rootDir>/node_modules/"
|
|
||||||
],
|
|
||||||
"coveragePathIgnorePatterns": [
|
|
||||||
"<rootDir>/src/mockData.ts",
|
|
||||||
"<rootDir>/src/app/hooks.ts",
|
|
||||||
"<rootDir>/src/app/store.ts",
|
|
||||||
"<rootDir>/src/app/listenerMiddleware.ts"
|
|
||||||
],
|
|
||||||
"coverageReporters": [
|
|
||||||
"text",
|
|
||||||
"html"
|
|
||||||
],
|
|
||||||
"coverageThreshold": {
|
|
||||||
"global": {
|
|
||||||
"branches": 90,
|
|
||||||
"functions": 100,
|
|
||||||
"lines": 100,
|
|
||||||
"statements": 100
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"transform": {
|
|
||||||
"^.+\\.(ts|tsx)$": "ts-jest"
|
|
||||||
},
|
|
||||||
"transformIgnorePatterns": [
|
|
||||||
"[/\\\\]node_modules[/\\\\].+\\.(js|jsx|ts|tsx)$",
|
|
||||||
"^.+\\.module\\.(css|sass|scss)$"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"@reach/alert-dialog": "^0.16.2",
|
|
||||||
"@reach/menu-button": "^0.16.2",
|
|
||||||
"@reach/visually-hidden": "^0.16.0",
|
|
||||||
"@reduxjs/toolkit": "^1.8.0",
|
|
||||||
"@standardnotes/editor-kit": "2.2.5",
|
|
||||||
"@standardnotes/stylekit": "5.23.0",
|
|
||||||
"@standardnotes/utils": "^1.6.2",
|
|
||||||
"@testing-library/dom": "^8.11.3",
|
|
||||||
"@testing-library/jest-dom": "^5.16.2",
|
|
||||||
"@testing-library/react": "^12.1.4",
|
|
||||||
"@testing-library/user-event": "^13.5.0",
|
|
||||||
"@types/jest": "^27.4.1",
|
|
||||||
"@types/lodash": "^4.14.179",
|
|
||||||
"@types/node": "^17.0.21",
|
|
||||||
"@types/react": "^17.0.40",
|
|
||||||
"@types/react-beautiful-dnd": "^13.1.2",
|
|
||||||
"@types/react-dom": "^17.0.13",
|
|
||||||
"@types/react-transition-group": "^4.4.4",
|
|
||||||
"@types/redux-mock-store": "^1.0.3",
|
|
||||||
"@types/styled-components": "^5.1.24",
|
|
||||||
"@types/uuid": "^8.3.4",
|
|
||||||
"gh-pages": "^3.2.3",
|
|
||||||
"husky": "^7.0.0",
|
|
||||||
"lint-staged": "^12.3.5",
|
|
||||||
"node-sass": "*",
|
|
||||||
"prettier": "^2.5.1",
|
|
||||||
"react": "^17.0.2",
|
|
||||||
"react-beautiful-dnd": "^13.1.0",
|
|
||||||
"react-dom": "^17.0.2",
|
|
||||||
"react-redux": "^7.2.8",
|
|
||||||
"react-scripts": "5.0.0",
|
|
||||||
"react-transition-group": "^4.4.2",
|
|
||||||
"redux": "^4.1.2",
|
|
||||||
"redux-mock-store": "^1.5.4",
|
|
||||||
"source-map-explorer": "^2.5.2",
|
|
||||||
"styled-components": "^5.3.5",
|
|
||||||
"ts-jest": "^27.1.4",
|
|
||||||
"typescript": "^4.6.2",
|
|
||||||
"uuid": "^8.3.2"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,278 +0,0 @@
|
|||||||
body, html {
|
|
||||||
font-family: sans-serif;
|
|
||||||
font-size: var(--sn-stylekit-base-font-size);
|
|
||||||
background-color: transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
* {
|
|
||||||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
.mobile .editor-toolbar, .mobile .editor-toolbar.fullscreen, .mac-web .editor-toolbar, .mac-web .editor-toolbar.fullscreen, .mac-desktop .editor-toolbar, .mac-desktop .editor-toolbar.fullscreen {
|
|
||||||
overflow-x: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.editor-toolbar.fullscreen, .CodeMirror-fullscreen {
|
|
||||||
position: absolute !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.CodeMirror {
|
|
||||||
border-left: 0;
|
|
||||||
border-right: 0;
|
|
||||||
border-bottom: 0;
|
|
||||||
background-color: transparent;
|
|
||||||
border: none;
|
|
||||||
font-size: var(--sn-stylekit-font-size-editor);
|
|
||||||
-webkit-overflow-scrolling: touch;
|
|
||||||
}
|
|
||||||
|
|
||||||
.editor-toolbar, .editor-toolbar.fullscreen {
|
|
||||||
background-color: var(--sn-stylekit-contrast-background-color);
|
|
||||||
border-bottom: 1px solid var(--sn-stylekit-border-color);
|
|
||||||
overflow: visible;
|
|
||||||
}
|
|
||||||
.editor-toolbar::before, .editor-toolbar::after, .editor-toolbar.fullscreen::before, .editor-toolbar.fullscreen::after {
|
|
||||||
background: none !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.editor-toolbar i.separator {
|
|
||||||
border-left-color: var(--sn-stylekit-contrast-border-color);
|
|
||||||
border-right-color: var(--sn-stylekit-contrast-background-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
.editor-toolbar button {
|
|
||||||
color: var(--sn-stylekit-info-color) !important;
|
|
||||||
outline: none;
|
|
||||||
border-radius: 0;
|
|
||||||
font-size: var(--sn-stylekit-base-font-size);
|
|
||||||
}
|
|
||||||
|
|
||||||
.editor-toolbar button.active, .editor-toolbar button:hover {
|
|
||||||
border-color: transparent;
|
|
||||||
background: var(--sn-stylekit-background-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
.editor-toolbar.disabled-for-preview button:not(.no-disable) {
|
|
||||||
background: inherit;
|
|
||||||
}
|
|
||||||
|
|
||||||
.editor-preview-active, .editor-preview-active-side {
|
|
||||||
background-color: var(--sn-stylekit-contrast-background-color);
|
|
||||||
border: 0;
|
|
||||||
border-left: 1px solid var(--sn-stylekit-border-color);
|
|
||||||
color: var(--sn-stylekit-contrast-foreground-color);
|
|
||||||
font-size: var(--sn-stylekit-font-size-editor);
|
|
||||||
padding: 10px 15px;
|
|
||||||
}
|
|
||||||
.editor-preview-active a, .editor-preview-active-side a {
|
|
||||||
color: var(--sn-stylekit-info-color);
|
|
||||||
}
|
|
||||||
.editor-preview-active img, .editor-preview-active-side img {
|
|
||||||
max-width: 100%;
|
|
||||||
}
|
|
||||||
.editor-preview-active pre, .editor-preview-active-side pre {
|
|
||||||
background: var(--sn-stylekit-background-color);
|
|
||||||
color: var(--sn-stylekit-foreground-color);
|
|
||||||
border: 1px solid var(--sn-stylekit-border-color);
|
|
||||||
padding: 20px;
|
|
||||||
border-radius: 3px;
|
|
||||||
overflow-x: auto;
|
|
||||||
}
|
|
||||||
.editor-preview-active table, .editor-preview-active-side table {
|
|
||||||
display: block;
|
|
||||||
margin-bottom: 12px;
|
|
||||||
width: 100%;
|
|
||||||
overflow: auto;
|
|
||||||
border-collapse: collapse;
|
|
||||||
border-spacing: 0px;
|
|
||||||
border-color: var(--sn-stylekit-border-color);
|
|
||||||
}
|
|
||||||
.editor-preview-active table th, .editor-preview-active table td, .editor-preview-active-side table th, .editor-preview-active-side table td {
|
|
||||||
padding: 6px 13px;
|
|
||||||
border: 1px solid var(--sn-stylekit-border-color);
|
|
||||||
}
|
|
||||||
.editor-preview-active table tr:nth-child(2n), .editor-preview-active-side table tr:nth-child(2n) {
|
|
||||||
background-color: var(--sn-stylekit-background-color);
|
|
||||||
}
|
|
||||||
.editor-preview-active p code, .editor-preview-active-side p code {
|
|
||||||
padding: 3px 6px;
|
|
||||||
background-color: var(--sn-stylekit-background-color);
|
|
||||||
color: var(--sn-stylekit-info-color);
|
|
||||||
border: 1px solid var(--sn-stylekit-border-color);
|
|
||||||
border-radius: 3px;
|
|
||||||
}
|
|
||||||
.editor-preview-active code, .editor-preview-active-side code {
|
|
||||||
font-family: var(--sn-stylekit-monospace-font);
|
|
||||||
}
|
|
||||||
.editor-preview-active blockquote, .editor-preview-active-side blockquote {
|
|
||||||
padding: 0 0.5rem;
|
|
||||||
margin-left: 0;
|
|
||||||
color: var(--sn-stylekit-neutral-color);
|
|
||||||
border-left: 0.3rem solid var(--sn-stylekit-background-color);
|
|
||||||
}
|
|
||||||
.editor-preview-active blockquote > :first-child, .editor-preview-active-side blockquote > :first-child {
|
|
||||||
margin-top: 0;
|
|
||||||
}
|
|
||||||
.editor-preview-active blockquote > :last-child, .editor-preview-active-side blockquote > :last-child {
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.editor-preview-active {
|
|
||||||
border: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.CodeMirror {
|
|
||||||
background-color: var(--sn-stylekit-editor-background-color) !important;
|
|
||||||
color: var(--sn-stylekit-editor-foreground-color) !important;
|
|
||||||
border: 0 !important;
|
|
||||||
}
|
|
||||||
.CodeMirror .CodeMirror-code .cm-comment {
|
|
||||||
background: var(--sn-stylekit-contrast-background-color);
|
|
||||||
color: var(--sn-stylekit-info-color);
|
|
||||||
font-family: Consolas, monaco, "Ubuntu Mono", courier, monospace !important;
|
|
||||||
font-size: 90%;
|
|
||||||
}
|
|
||||||
.CodeMirror .CodeMirror-code .cm-comment.CodeMirror-selectedtext {
|
|
||||||
color: var(--sn-stylekit-info-contrast-color) !important;
|
|
||||||
background: var(--sn-stylekit-info-color) !important;
|
|
||||||
}
|
|
||||||
.CodeMirror .cm-header {
|
|
||||||
color: var(--sn-stylekit-editor-foreground-color);
|
|
||||||
}
|
|
||||||
.CodeMirror .cm-header.CodeMirror-selectedtext {
|
|
||||||
color: var(--sn-stylekit-info-contrast-color) !important;
|
|
||||||
background: var(--sn-stylekit-info-color) !important;
|
|
||||||
}
|
|
||||||
.CodeMirror .cm-formatting-header, .CodeMirror .cm-formatting-strong, .CodeMirror .cm-formatting-em {
|
|
||||||
opacity: 0.2;
|
|
||||||
}
|
|
||||||
.CodeMirror .cm-link.cm-variable-2, .CodeMirror .cm-url.cm-variable-2 {
|
|
||||||
color: var(--sn-stylekit-info-color) !important;
|
|
||||||
}
|
|
||||||
.CodeMirror .cm-link.cm-variable-2.CodeMirror-selectedtext, .CodeMirror .cm-url.cm-variable-2.CodeMirror-selectedtext {
|
|
||||||
color: var(--sn-stylekit-info-contrast-color) !important;
|
|
||||||
background: var(--sn-stylekit-info-color) !important;
|
|
||||||
}
|
|
||||||
.CodeMirror .cm-formatting-list-ol {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
.CodeMirror .cm-link, .CodeMirror .cm-string {
|
|
||||||
color: var(--sn-stylekit-info-color) !important;
|
|
||||||
}
|
|
||||||
.CodeMirror .cm-link.CodeMirror-selectedtext, .CodeMirror .cm-string.CodeMirror-selectedtext {
|
|
||||||
color: var(--sn-stylekit-info-contrast-color) !important;
|
|
||||||
background: var(--sn-stylekit-info-color) !important;
|
|
||||||
}
|
|
||||||
.CodeMirror .CodeMirror-linenumber {
|
|
||||||
color: gray !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.CodeMirror-cursor {
|
|
||||||
border-color: var(--sn-stylekit-editor-foreground-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
.CodeMirror-selected {
|
|
||||||
background: var(--sn-stylekit-info-color) !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.CodeMirror-selectedtext {
|
|
||||||
color: var(--sn-stylekit-info-contrast-color);
|
|
||||||
background: var(--sn-stylekit-info-color) !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.CodeMirror-gutters {
|
|
||||||
background-color: var(--sn-stylekit-background-color) !important;
|
|
||||||
color: var(--sn-stylekit-editor-foreground-color) !important;
|
|
||||||
border-color: var(--sn-stylekit-border-color) !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media only screen and (max-width: 700px) {
|
|
||||||
.editor-toolbar a.no-mobile {
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/*
|
|
||||||
Highlight JS theming
|
|
||||||
*/
|
|
||||||
.hljs-comment,
|
|
||||||
.hljs-quote {
|
|
||||||
font-style: italic;
|
|
||||||
color: var(--sn-stylekit-neutral-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-keyword,
|
|
||||||
.hljs-selector-tag,
|
|
||||||
.hljs-subst {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-attribute {
|
|
||||||
color: var(--sn-stylekit-warning-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-number,
|
|
||||||
.hljs-literal {
|
|
||||||
color: var(--sn-stylekit-info-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-string,
|
|
||||||
.hljs-doctag,
|
|
||||||
.hljs-formula {
|
|
||||||
color: var(--sn-stylekit-success-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-title,
|
|
||||||
.hljs-section,
|
|
||||||
.hljs-selector-id {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-subst {
|
|
||||||
font-weight: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-class .hljs-title,
|
|
||||||
.hljs-type,
|
|
||||||
.hljs-name {
|
|
||||||
color: var(--sn-stylekit-danger-color);
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-tag {
|
|
||||||
color: var(--sn-stylekit-neutral-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-regexp {
|
|
||||||
color: var(--sn-stylekit-success-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-symbol,
|
|
||||||
.hljs-bullet,
|
|
||||||
.hljs-link {
|
|
||||||
color: var(--sn-stylekit-info-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-built_in,
|
|
||||||
.hljs-builtin-name {
|
|
||||||
text-decoration: underline;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-meta {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-deletion {
|
|
||||||
color: var(--sn-stylekit-danger-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-addition {
|
|
||||||
color: var(--sn-stylekit-success-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-emphasis {
|
|
||||||
font-style: italic;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-strong {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
@@ -1,157 +0,0 @@
|
|||||||
(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
document.addEventListener("DOMContentLoaded", function (event) {
|
|
||||||
var workingNote;
|
|
||||||
var componentManager = new ComponentManager(null, function () {
|
|
||||||
// on ready
|
|
||||||
document.body.classList.add(componentManager.platform);
|
|
||||||
document.body.classList.add(componentManager.environment);
|
|
||||||
});
|
|
||||||
var ignoreTextChange = false;
|
|
||||||
var initialLoad = true;
|
|
||||||
var lastValue, lastUUID, clientData;
|
|
||||||
componentManager.streamContextItem(function (note) {
|
|
||||||
if (note.uuid !== lastUUID) {
|
|
||||||
// Note changed, reset last values
|
|
||||||
lastValue = null;
|
|
||||||
initialLoad = true;
|
|
||||||
lastUUID = note.uuid;
|
|
||||||
clientData = note.clientData;
|
|
||||||
}
|
|
||||||
|
|
||||||
workingNote = note; // Only update UI on non-metadata updates.
|
|
||||||
|
|
||||||
if (note.isMetadataUpdate || !window.easymde) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (note.content.text !== lastValue) {
|
|
||||||
ignoreTextChange = true;
|
|
||||||
window.easymde.value(note.content.text);
|
|
||||||
ignoreTextChange = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (initialLoad) {
|
|
||||||
initialLoad = false;
|
|
||||||
window.easymde.codemirror.getDoc().clearHistory();
|
|
||||||
var mode = clientData && clientData.mode; // Set initial editor mode
|
|
||||||
|
|
||||||
if (mode === 'preview') {
|
|
||||||
if (!window.easymde.isPreviewActive()) {
|
|
||||||
window.easymde.togglePreview();
|
|
||||||
}
|
|
||||||
} else if (mode === 'split') {
|
|
||||||
if (!window.easymde.isSideBySideActive()) {
|
|
||||||
window.easymde.toggleSideBySide();
|
|
||||||
} // falback config
|
|
||||||
|
|
||||||
} else if (window.easymde.isPreviewActive()) {
|
|
||||||
window.easymde.togglePreview();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
window.easymde = new EasyMDE({
|
|
||||||
element: document.getElementById("editor"),
|
|
||||||
autoDownloadFontAwesome: false,
|
|
||||||
spellChecker: false,
|
|
||||||
status: false,
|
|
||||||
shortcuts: {
|
|
||||||
toggleSideBySide: "Cmd-Alt-P"
|
|
||||||
},
|
|
||||||
// Syntax highlighting is disabled until we figure out performance issue: https://github.com/sn-extensions/advanced-markdown-editor/pull/20#issuecomment-513811633
|
|
||||||
// renderingConfig: {
|
|
||||||
// codeSyntaxHighlighting: true
|
|
||||||
// },
|
|
||||||
toolbar: [{
|
|
||||||
className: "fa fa-eye",
|
|
||||||
"default": true,
|
|
||||||
name: "preview",
|
|
||||||
noDisable: true,
|
|
||||||
title: "Toggle Preview",
|
|
||||||
action: function action() {
|
|
||||||
window.easymde.togglePreview();
|
|
||||||
saveMetadata();
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
className: "fa fa-columns",
|
|
||||||
"default": true,
|
|
||||||
name: "side-by-side",
|
|
||||||
noDisable: true,
|
|
||||||
noMobile: true,
|
|
||||||
title: "Toggle Side by Side",
|
|
||||||
action: function action() {
|
|
||||||
window.easymde.toggleSideBySide();
|
|
||||||
saveMetadata();
|
|
||||||
}
|
|
||||||
}, "|", "heading", "bold", "italic", "strikethrough", "|", "quote", "code", "|", "unordered-list", "ordered-list", "|", "clean-block", "|", "link", "image", "|", "table"]
|
|
||||||
});
|
|
||||||
|
|
||||||
function saveMetadata() {
|
|
||||||
function getEditorMode() {
|
|
||||||
var editor = window.easymde;
|
|
||||||
|
|
||||||
if (editor) {
|
|
||||||
if (editor.isPreviewActive()) return 'preview';
|
|
||||||
if (editor.isSideBySideActive()) return 'split';
|
|
||||||
}
|
|
||||||
|
|
||||||
return 'edit';
|
|
||||||
}
|
|
||||||
|
|
||||||
var note = workingNote;
|
|
||||||
componentManager.saveItemWithPresave(note, function () {
|
|
||||||
note.clientData = {
|
|
||||||
mode: getEditorMode()
|
|
||||||
};
|
|
||||||
});
|
|
||||||
} // Some sort of issue on Mobile RN where this causes an exception (".className is not defined")
|
|
||||||
|
|
||||||
|
|
||||||
try {
|
|
||||||
window.easymde.toggleFullScreen();
|
|
||||||
} catch (e) {}
|
|
||||||
/*
|
|
||||||
Can be set to Infinity to make sure the whole document is always rendered, and thus the browser's text search works on it. This will have bad effects on performance of big documents.
|
|
||||||
Really bad performance on Safari. Unusable.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
window.easymde.codemirror.setOption("viewportMargin", 100);
|
|
||||||
window.easymde.codemirror.on("change", function () {
|
|
||||||
function strip(html) {
|
|
||||||
var tmp = document.implementation.createHTMLDocument("New").body;
|
|
||||||
tmp.innerHTML = html;
|
|
||||||
return tmp.textContent || tmp.innerText || "";
|
|
||||||
}
|
|
||||||
|
|
||||||
function truncateString(string) {
|
|
||||||
var limit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 90;
|
|
||||||
|
|
||||||
if (string.length <= limit) {
|
|
||||||
return string;
|
|
||||||
} else {
|
|
||||||
return string.substring(0, limit) + "...";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!ignoreTextChange) {
|
|
||||||
if (workingNote) {
|
|
||||||
// Be sure to capture this object as a variable, as this.note may be reassigned in `streamContextItem`, so by the time
|
|
||||||
// you modify it in the presave block, it may not be the same object anymore, so the presave values will not be applied to
|
|
||||||
// the right object, and it will save incorrectly.
|
|
||||||
var note = workingNote;
|
|
||||||
componentManager.saveItemWithPresave(note, function () {
|
|
||||||
lastValue = window.easymde.value();
|
|
||||||
var html = window.easymde.options.previewRender(window.easymde.value());
|
|
||||||
var strippedHtml = truncateString(strip(html));
|
|
||||||
note.content.preview_plain = strippedHtml;
|
|
||||||
note.content.preview_html = null;
|
|
||||||
note.content.text = lastValue;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
},{}]},{},[1]);
|
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
|||||||
/*! @license DOMPurify | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.2.2/LICENSE */
|
|
||||||
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because it is too large
Load Diff
|
Before Width: | Height: | Size: 434 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1 +0,0 @@
|
|||||||
<!doctype html><html><head><base target="_blank"><meta charset="UTF-8"><meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1"><script src="lib/component-relay.js"></script><script src="vendor/highlightjs/highlightjs.js"></script><link rel="stylesheet" media="all" href="vendor/easymd/easymde.css"><script src="vendor/easymd/easymd.js"></script><link rel="stylesheet" media="all" href="stylekit.css"><title>Markdown Pro</title><script defer="defer" src="dist.js"></script><link href="dist.css" rel="stylesheet"></head><body class="sn-component" id="sn-advanced-markdown-editor"><textarea dir="auto" id="editor" hidden></textarea></body></html>
|
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@@ -1,6 +0,0 @@
|
|||||||
/**
|
|
||||||
* easymde v2.16.1
|
|
||||||
* Copyright Jeroen Akkerman
|
|
||||||
* @link https://github.com/ionaru/easy-markdown-editor
|
|
||||||
* @license MIT
|
|
||||||
*/
|
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
|||||||
/*! highlight.js v9.16.2 | BSD3 License | git.io/hljslicense */
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "sn-advanced-markdown-editor",
|
|
||||||
"version": "1.5.0",
|
|
||||||
"description": "A Standard Notes derived editor that offers full support for Markdown editing.",
|
|
||||||
"main": "dist/dist.js",
|
|
||||||
"author": "Standard Notes <hello@standardnotes.com>",
|
|
||||||
"license": "AGPL-3.0",
|
|
||||||
"sn": {
|
|
||||||
"main": "dist/index.html"
|
|
||||||
},
|
|
||||||
"scripts": {
|
|
||||||
"test": "echo \"Error: no test specified\" && exit 1",
|
|
||||||
"start": "webpack serve --config webpack.dev.js --progress --hot",
|
|
||||||
"build": "webpack --config webpack.prod.js",
|
|
||||||
"lint": "eslint src --ext .js",
|
|
||||||
"lint:fix": "yarn lint --fix"
|
|
||||||
},
|
|
||||||
"dependencies": {},
|
|
||||||
"devDependencies": {
|
|
||||||
"@babel/cli": "^7.13.10",
|
|
||||||
"@babel/core": "^7.13.13",
|
|
||||||
"@babel/preset-env": "^7.13.12",
|
|
||||||
"@standardnotes/component-relay": "2.2.0",
|
|
||||||
"@standardnotes/eslint-config-extensions": "^1.0.2",
|
|
||||||
"copy-webpack-plugin": "^8.1.0",
|
|
||||||
"css-loader": "^5.2.0",
|
|
||||||
"dompurify": "^2.2.9",
|
|
||||||
"easymde": "2.16.1",
|
|
||||||
"eslint": "^7.23.0",
|
|
||||||
"file-loader": "^6.2.0",
|
|
||||||
"font-awesome": "^4.7.0",
|
|
||||||
"highlightjs": "^9.16.2",
|
|
||||||
"html-webpack-plugin": "^5.3.1",
|
|
||||||
"marked": "^2.0.7",
|
|
||||||
"mini-css-extract-plugin": "^1.4.0",
|
|
||||||
"sass": "^1.32.8",
|
|
||||||
"sass-loader": "^11.0.1",
|
|
||||||
"sn-stylekit": "3.0.1",
|
|
||||||
"webpack": "^5.28.0",
|
|
||||||
"webpack-cli": "^4.6.0",
|
|
||||||
"webpack-dev-server": "^3.11.2",
|
|
||||||
"webpack-merge": "^5.7.3"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,67 +0,0 @@
|
|||||||
/*
|
|
||||||
object-assign
|
|
||||||
(c) Sindre Sorhus
|
|
||||||
@license MIT
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*! @license DOMPurify | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.2.2/LICENSE */
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @license
|
|
||||||
* Lodash (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
|
|
||||||
* Build: `lodash include="includes,merge,filter,map,remove,find,omit,pull,cloneDeep,pick,uniq,sortedIndexBy,mergeWith"`
|
|
||||||
*/
|
|
||||||
|
|
||||||
/** @license React v0.19.1
|
|
||||||
* scheduler.production.min.js
|
|
||||||
*
|
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/** @license React v0.20.2
|
|
||||||
* scheduler.production.min.js
|
|
||||||
*
|
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/** @license React v16.13.1
|
|
||||||
* react-dom.production.min.js
|
|
||||||
*
|
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/** @license React v16.13.1
|
|
||||||
* react.production.min.js
|
|
||||||
*
|
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/** @license React v17.0.2
|
|
||||||
* react-dom.production.min.js
|
|
||||||
*
|
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/** @license React v17.0.2
|
|
||||||
* react.production.min.js
|
|
||||||
*
|
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
File diff suppressed because one or more lines are too long
@@ -1,5 +0,0 @@
|
|||||||
/**
|
|
||||||
* @license
|
|
||||||
* Lodash (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
|
|
||||||
* Build: `lodash include="includes,merge,filter,map,remove,find,omit,pull,cloneDeep,pick,uniq,sortedIndexBy,mergeWith"`
|
|
||||||
*/
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
<!doctype html><html><head><base target="_blank"><meta charset="UTF-8"><meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1"><link href="vendor.css" rel="stylesheet"><script src="vendor.js"></script><script src="filesafe-js/EncryptionWorker.js"></script><title>Bold Editor</title><script defer="defer" src="dist.min.js"></script><link href="dist.css" rel="stylesheet"></head><body></body></html>
|
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,45 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "sn-bold-editor",
|
|
||||||
"version": "1.3.5",
|
|
||||||
"main": "dist/dist.js",
|
|
||||||
"scripts": {
|
|
||||||
"test": "echo \"Error: no test specified\" && exit 1",
|
|
||||||
"lint": "eslint app/ --ext .js",
|
|
||||||
"lint:fix": "yarn lint --fix",
|
|
||||||
"build": "webpack --config webpack.prod.js",
|
|
||||||
"start": "webpack serve --config webpack.dev.js --progress --hot"
|
|
||||||
},
|
|
||||||
"sn": {
|
|
||||||
"main": "dist/index.html"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"@babel/core": "^7.13.14",
|
|
||||||
"@babel/eslint-parser": "^7.13.14",
|
|
||||||
"@babel/preset-env": "^7.13.12",
|
|
||||||
"@babel/preset-react": "^7.13.13",
|
|
||||||
"@standardnotes/editor-kit": "2.2.3",
|
|
||||||
"@standardnotes/eslint-config-extensions": "^1.0.3",
|
|
||||||
"babel-loader": "^8.2.2",
|
|
||||||
"copy-webpack-plugin": "^8.1.1",
|
|
||||||
"css-loader": "^5.2.0",
|
|
||||||
"dompurify": "^2.2.9",
|
|
||||||
"eslint": "^7.23.0",
|
|
||||||
"eslint-plugin-react": "^7.23.1",
|
|
||||||
"filesafe-embed": "1.0.13",
|
|
||||||
"filesafe-js": "1.0.5",
|
|
||||||
"html-webpack-plugin": "^5.3.1",
|
|
||||||
"mini-css-extract-plugin": "^1.4.0",
|
|
||||||
"node-sass": "*",
|
|
||||||
"react": "17.x",
|
|
||||||
"react-dom": "17.x",
|
|
||||||
"sass-loader": "^11.0.1",
|
|
||||||
"sn-stylekit": "3.0.1",
|
|
||||||
"style-loader": "~2.0.0",
|
|
||||||
"terser-webpack-plugin": "^5.1.1",
|
|
||||||
"webpack": "^5.30.0",
|
|
||||||
"webpack-cli": "^4.6.0",
|
|
||||||
"webpack-dev-server": "^3.11.2",
|
|
||||||
"webpack-merge": "^5.7.3",
|
|
||||||
"webpack-merge-and-include-globally": "^2.3.4"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because one or more lines are too long
@@ -1,3 +0,0 @@
|
|||||||
body,html{font-family:sans-serif;height:100%;margin:0;font-size:var(--sn-stylekit-base-font-size)}.wrapper{display:flex;flex-direction:column;position:relative;height:100%;overflow-x:hidden}.CodeMirror{background-color:var(--sn-stylekit-editor-background-color) !important;color:var(--sn-stylekit-editor-foreground-color) !important;border:0 !important;font-family:var(--sn-stylekit-monospace-font);-webkit-overflow-scrolling:touch;font-size:calc(var(--sn-stylekit-font-size-editor) - 0.1rem);flex:1 1 auto;width:100%;height:100%;resize:none}.CodeMirror .cm-header{color:var(--sn-stylekit-editor-foreground-color)}.CodeMirror .cm-formatting-header,.CodeMirror .cm-formatting-strong,.CodeMirror .cm-formatting-em{opacity:.2}.CodeMirror .cm-variable,.CodeMirror .cm-variable-1,.CodeMirror .cm-variable-2,.CodeMirror .cm-variable-3,.CodeMirror .cm-string-2{color:var(--sn-stylekit-info-color) !important}.CodeMirror .cm-variable.CodeMirror-selectedtext,.CodeMirror .cm-variable-1.CodeMirror-selectedtext,.CodeMirror .cm-variable-2.CodeMirror-selectedtext,.CodeMirror .cm-variable-3.CodeMirror-selectedtext,.CodeMirror .cm-string-2.CodeMirror-selectedtext{color:var(--sn-stylekit-info-contrast-color) !important;background:transparent}.CodeMirror .cm-qualifier,.CodeMirror .cm-meta{color:var(--sn-stylekit-neutral-color) !important}.CodeMirror .cm-error{color:var(--sn-stylekit-danger-color) !important}.CodeMirror .cm-def,.CodeMirror .cm-atom{color:var(--sn-stylekit-success-color)}.CodeMirror .CodeMirror-linenumber{color:var(--sn-stylekit-neutral-color) !important;opacity:.5}.CodeMirror-cursor{border-color:var(--sn-stylekit-info-color) !important}.CodeMirror-cursors{z-index:10 !important}.CodeMirror-selected{background:var(--sn-stylekit-info-color) !important}.CodeMirror-gutters{background-color:var(--sn-stylekit-background-color) !important;color:var(--sn-stylekit-editor-foreground-color) !important;border-color:var(--sn-stylekit-border-color) !important}.cm-header-1{font-size:150%}.cm-header-2{font-size:130%}.cm-header-3{font-size:120%}.cm-header-4{font-size:110%}.cm-header-5{font-size:100%}.cm-header-6{font-size:90%}.CodeMirror .cm-quote{color:var(--sn-stylekit-foreground-color);opacity:.6}.cm-fat-cursor .CodeMirror-line>span[role=presentation]{caret-color:transparent}
|
|
||||||
|
|
||||||
/*# sourceMappingURL=main.css.map*/
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
{"version":3,"sources":["webpack://sn-code-editor/./src/main.scss"],"names":[],"mappings":"AAAA,UACE,uBACA,YACA,SACA,4CAGF,SACE,aACA,sBACA,kBACA,YAGA,kBAGF,YACE,uEACA,4DACA,oBACA,8CACA,iCAGA,6DAEA,cACA,WACA,YACA,YAEA,uBACE,iDAIF,kGACE,WAGF,mIACE,+CAEA,2PACE,wDACA,uBAIJ,+CACE,kDAGF,sBACE,iDAOF,yCACE,uCAGF,mCACE,kDACA,WAIJ,mBACE,sDAGF,oBACE,sBAGF,qBACE,oDAGF,oBACE,gEACA,4DACA,wDAGF,4BACA,4BACA,4BACA,4BACA,4BACA,2BAEA,sBACE,0CACA,WAGF,wDACE,wB","file":"main.css","sourcesContent":["body, html {\n font-family: sans-serif;\n height: 100%;\n margin: 0;\n font-size: var(--sn-stylekit-base-font-size);\n}\n\n.wrapper {\n display: flex;\n flex-direction: column;\n position: relative;\n height: 100%;\n\n // Fixes unnecessary horizontal scrolling on Windows\n overflow-x: hidden;\n}\n\n.CodeMirror {\n background-color: var(--sn-stylekit-editor-background-color) !important;\n color: var(--sn-stylekit-editor-foreground-color) !important;\n border: 0 !important;\n font-family: var(--sn-stylekit-monospace-font);\n -webkit-overflow-scrolling: touch;\n\n // code doesn't look good at normal text size, better to be a bit smaller\n font-size: calc(var(--sn-stylekit-font-size-editor) - 0.1rem);\n\n flex: 1 1 auto;\n width: 100%;\n height: 100%;\n resize: none;\n\n .cm-header {\n color: var(--sn-stylekit-editor-foreground-color);\n }\n\n // Faded Markdown syntax\n .cm-formatting-header, .cm-formatting-strong, .cm-formatting-em {\n opacity: 0.2;\n }\n\n .cm-variable, .cm-variable-1, .cm-variable-2, .cm-variable-3, .cm-string-2 {\n color: var(--sn-stylekit-info-color) !important;\n\n &.CodeMirror-selectedtext {\n color: var(--sn-stylekit-info-contrast-color) !important;\n background: transparent;\n }\n }\n\n .cm-qualifier, .cm-meta {\n color: var(--sn-stylekit-neutral-color) !important;\n }\n\n .cm-error {\n color: var(--sn-stylekit-danger-color) !important;\n }\n\n .cm-property {\n\n }\n\n .cm-def, .cm-atom {\n color: var(--sn-stylekit-success-color);\n }\n\n .CodeMirror-linenumber {\n color: var(--sn-stylekit-neutral-color) !important;\n opacity: 0.5;\n }\n}\n\n.CodeMirror-cursor {\n border-color: var(--sn-stylekit-info-color) !important;\n}\n\n.CodeMirror-cursors {\n z-index: 10 !important; // In Markdown mode, cursor is hidden behind code blocks\n}\n\n.CodeMirror-selected {\n background: var(--sn-stylekit-info-color) !important;\n}\n\n.CodeMirror-gutters {\n background-color: var(--sn-stylekit-background-color) !important;\n color: var(--sn-stylekit-editor-foreground-color) !important;\n border-color: var(--sn-stylekit-border-color) !important;\n}\n\n.cm-header-1 { font-size: 150%; }\n.cm-header-2 { font-size: 130%; }\n.cm-header-3 { font-size: 120%; }\n.cm-header-4 { font-size: 110%; }\n.cm-header-5 { font-size: 100%; }\n.cm-header-6 { font-size: 90%; }\n\n.CodeMirror .cm-quote {\n color: var(--sn-stylekit-foreground-color);\n opacity: 0.6;\n}\n\n.cm-fat-cursor .CodeMirror-line > span[role=\"presentation\"] {\n caret-color: transparent;\n}\n"],"sourceRoot":""}
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
document.addEventListener("DOMContentLoaded",(function(){const e=CodeMirror.modeInfo.reduce((function(e,t){return e[t.mode]?e[t.mode].push(t):e[t.mode]=[t],e}),{}),t=CodeMirror.modeInfo.reduce((function(e,t){return e[t.name]={mode:t.mode,mime:t.mime},e}),{}),n=Object.keys(t);let o,i,a,d,m,c,r,s=!1,l=!0;function u(){if(i){let e=i;o.saveItemWithPresave(e,(()=>{d=c.getValue(),e.content.text=d,e.clientData=a,e.content.preview_plain=null,e.content.preview_html=null}))}}function f(o){if(!o)return;const i=function(n){const o=function(e){return e?{name:e.name,mode:e.mode,mime:e.mime}:null},i=/.+\.([^.]+)$/.exec(n),a=/\//.test(n);if(i)return o(CodeMirror.findModeByExtension(i[1]));if(a)return o(CodeMirror.findModeByMIME(a[1]));if(t[n])return{name:n,mode:t[n].mode,mime:t[n].mime};if(e[n]){const t=e[n][0];return{name:t.name,mode:t.mode,mime:t.mime}}return{name:n,mode:n,mime:n}}(o);i?(c.setOption("mode",i.mime),CodeMirror.autoLoadMode(c,i.mode),a&&(a.mode=i.name),document.getElementById("language-select").selectedIndex=n.indexOf(i.name)):console.error("Could not find a mode corresponding to "+o)}window.setKeyMap=function(e){c.setOption("keyMap",e),function(e){const t=document.getElementById("toggle-vim-mode-button"),n="vim"===e?"Disable":"Enable",o="vim"===e?"danger":"success";t.innerHTML=`${n} Vim mode`,t.classList.remove("danger"),t.classList.remove("success"),t.classList.add(o)}(e)},window.onLanguageSelect=function(){f(n[r.selectedIndex]),u()},window.setDefaultLanguage=function(){const e=n[r.selectedIndex];o.setComponentDataValueForKey("language",e);const t=document.getElementById("default-label"),i=t.innerHTML;t.innerHTML="Success",t.classList.add("success"),setTimeout((function(){t.classList.remove("success"),t.innerHTML=i}),750)},window.toggleVimMode=function(){let e;e="default"===(o.getComponentDataValueForKey("keyMap")??"default")?"vim":"default",window.setKeyMap(e),o.setComponentDataValueForKey("keyMap",e)},o=new ComponentRelay({targetWindow:window,onReady:()=>{const e=o.platform;e&&document.body.classList.add(e),function(){CodeMirror.commands.save=function(){u()},c=CodeMirror.fromTextArea(document.getElementById("code"),{extraKeys:{"Alt-F":"findPersistent"},lineNumbers:!0,styleSelectedText:!0,lineWrapping:!0,inputStyle:"mobile"===(o.environment??"web")?"textarea":"contenteditable"}),c.setSize("100%","100%"),function(){r=document.getElementById("language-select");for(let e=0;e<n.length;e++){const t=document.createElement("option");t.value=e,t.innerHTML=n[e],r.appendChild(t)}}(),c.on("change",(function(){s||u()}));c.on("cursorActivity",(function(e){"mobile"===o.environment&&(e=>{setTimeout((()=>e.scrollIntoView()),200)})(e)}));const e=o.getComponentDataValueForKey("keyMap")??"default";window.setKeyMap(e)}()}}),o.streamContextItem((e=>{!function(e){if(e.uuid!==m&&(d=null,l=!0,m=e.uuid),i=e,e.isMetadataUpdate)return;a=e.clientData;let t=a.mode;t||(t=o.getComponentDataValueForKey("language")??"JavaScript"),f(t),c&&(e.content.text!==d&&(s=!0,c.getDoc().setValue(i.content.text),s=!1),l&&(l=!1,c.getDoc().clearHistory()),c.setOption("spellcheck",i.content.spellcheck))}(e)}))}));
|
|
||||||
//# sourceMappingURL=main.js.map
|
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,62 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<base target="_blank">
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1">
|
|
||||||
<link rel="stylesheet" href="vendor/codemirror/lib/codemirror.css">
|
|
||||||
<link rel="stylesheet" href="dist/main.css">
|
|
||||||
<link rel="stylesheet" href="dist/stylekit.css">
|
|
||||||
<script src="vendor/codemirror/lib/codemirror.js"></script>
|
|
||||||
<!-- Required for gfm mode -->
|
|
||||||
<script src="vendor/codemirror/addon/mode/overlay.js"></script>
|
|
||||||
<script src="vendor/codemirror/addon/mode/simple.js"></script>
|
|
||||||
<script src="vendor/codemirror/addon/mode/loadmode.js"></script>
|
|
||||||
<script src="vendor/codemirror/mode/meta.js"></script>
|
|
||||||
<!-- Vim key bindings -->
|
|
||||||
<script src="vendor/codemirror/keymap/vim.js"></script>
|
|
||||||
<!-- Required for search -->
|
|
||||||
<script src="vendor/codemirror/addon/search/jump-to-line.js"></script>
|
|
||||||
<script src="vendor/codemirror/addon/search/match-highlighter.js"></script>
|
|
||||||
<script src="vendor/codemirror/addon/search/matchesonscrollbar.js"></script>
|
|
||||||
<script src="vendor/codemirror/addon/search/search.js"></script>
|
|
||||||
<script src="vendor/codemirror/addon/search/searchcursor.js"></script>
|
|
||||||
<script src="vendor/codemirror/addon/dialog/dialog.js"></script>
|
|
||||||
<script src="vendor/codemirror/addon/scroll/annotatescrollbar.js"></script>
|
|
||||||
<link rel="stylesheet" href="vendor/codemirror/addon/search/matchesonscrollbar.css" />
|
|
||||||
<link rel="stylesheet" href="vendor/codemirror/addon/dialog/dialog.css" />
|
|
||||||
<script src="dist/lib/component-relay.js"></script>
|
|
||||||
<!-- Required for styling selected text -->
|
|
||||||
<script src="vendor/codemirror/addon/selection/mark-selection.js"></script>
|
|
||||||
<script>
|
|
||||||
CodeMirror.modeURL = "vendor/codemirror/mode/%N/%N.js";
|
|
||||||
</script>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body class="sn-component">
|
|
||||||
<div class="wrapper">
|
|
||||||
<textarea id="code" name="code"></textarea>
|
|
||||||
<div>
|
|
||||||
<div class="sk-app-bar no-edges no-bottom-edge" style="width: inherit;">
|
|
||||||
<div class="left">
|
|
||||||
<div class="sk-app-bar-item no-pointer">
|
|
||||||
<span class="sk-p">Language:</span>
|
|
||||||
</div>
|
|
||||||
<div class="sk-app-bar-item no-pointer">
|
|
||||||
<select id="language-select" onchange="onLanguageSelect(event)"></select>
|
|
||||||
</div>
|
|
||||||
<div class="sk-app-bar-item">
|
|
||||||
<span id="default-label" class="sk-label" onclick="setDefaultLanguage(event)">Set as Default</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="center"></div>
|
|
||||||
<div class="right">
|
|
||||||
<div class="sk-app-bar-item no-pointer border"></div>
|
|
||||||
<div class="sk-app-bar-item">
|
|
||||||
<span id="toggle-vim-mode-button" class="sk-label" onclick="toggleVimMode()">Enable Vim mode</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<script src="dist/main.js"></script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "sn-code-editor",
|
|
||||||
"version": "1.3.12",
|
|
||||||
"description": "A code editor for Standard Notes",
|
|
||||||
"main": "dist/main.js",
|
|
||||||
"author": "Standard Notes <hello@standardnotes.org>",
|
|
||||||
"license": "AGPL-3.0",
|
|
||||||
"scripts": {
|
|
||||||
"test": "echo \"Error: no test specified\" && exit 1",
|
|
||||||
"start": "http-server . --cors -p8001 & webpack --progress --config webpack.dev.js",
|
|
||||||
"build": "webpack --config webpack.prod.js",
|
|
||||||
"lint": "eslint src --ext .js",
|
|
||||||
"lint:fix": "yarn lint --fix"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"@babel/cli": "^7.12.10",
|
|
||||||
"@babel/core": "^7.12.10",
|
|
||||||
"@babel/preset-env": "^7.12.11",
|
|
||||||
"@standardnotes/component-relay": "2.2.0",
|
|
||||||
"codemirror": "5.65.2",
|
|
||||||
"copy-webpack-plugin": "^7.0.0",
|
|
||||||
"css-loader": "^5.0.1",
|
|
||||||
"eslint": "^7.18.0",
|
|
||||||
"http-server": "^0.12.3",
|
|
||||||
"mini-css-extract-plugin": "^1.3.5",
|
|
||||||
"remove-files-webpack-plugin": "^1.4.4",
|
|
||||||
"sass": "^1.32.5",
|
|
||||||
"sass-loader": "^10.1.1",
|
|
||||||
"sn-stylekit": "^2.1.1",
|
|
||||||
"webpack": "^5.19.0",
|
|
||||||
"webpack-cli": "^4.4.0",
|
|
||||||
"webpack-merge": "^5.7.3"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";var n={},t=/[^\s\u00a0]/,i=e.Pos,l=e.cmpPos;function o(e){var n=e.search(t);return-1==n?0:n}function r(e,n){var t=e.getMode();return!1!==t.useInnerComments&&t.innerMode?e.getModeAt(n):t}e.commands.toggleComment=function(e){e.toggleComment()},e.defineExtension("toggleComment",(function(e){e||(e=n);for(var t=this,l=1/0,o=this.listSelections(),r=null,a=o.length-1;a>=0;a--){var m=o[a].from(),c=o[a].to();m.line>=l||(c.line>=l&&(c=i(l,0)),l=m.line,null==r?t.uncomment(m,c,e)?r="un":(t.lineComment(m,c,e),r="line"):"un"==r?t.uncomment(m,c,e):t.lineComment(m,c,e))}})),e.defineExtension("lineComment",(function(e,l,a){a||(a=n);var m=this,c=r(m,e),g=m.getLine(e.line);if(null!=g&&(f=e,s=g,!/\bstring\b/.test(m.getTokenTypeAt(i(f.line,0)))||/^[\'\"\`]/.test(s))){var f,s,d=a.lineComment||c.lineComment;if(d){var u=Math.min(0!=l.ch||l.line==e.line?l.line+1:l.line,m.lastLine()+1),h=null==a.padding?" ":a.padding,C=a.commentBlankLines||e.line==l.line;m.operation((function(){if(a.indent){for(var n=null,l=e.line;l<u;++l){var r=(c=m.getLine(l)).slice(0,o(c));(null==n||n.length>r.length)&&(n=r)}for(l=e.line;l<u;++l){var c=m.getLine(l),g=n.length;(C||t.test(c))&&(c.slice(0,g)!=n&&(g=o(c)),m.replaceRange(n+d+h,i(l,0),i(l,g)))}}else for(l=e.line;l<u;++l)(C||t.test(m.getLine(l)))&&m.replaceRange(d+h,i(l,0))}))}else(a.blockCommentStart||c.blockCommentStart)&&(a.fullLines=!0,m.blockComment(e,l,a))}})),e.defineExtension("blockComment",(function(e,o,a){a||(a=n);var m=this,c=r(m,e),g=a.blockCommentStart||c.blockCommentStart,f=a.blockCommentEnd||c.blockCommentEnd;if(g&&f){if(!/\bcomment\b/.test(m.getTokenTypeAt(i(e.line,0)))){var s=Math.min(o.line,m.lastLine());s!=e.line&&0==o.ch&&t.test(m.getLine(s))&&--s;var d=null==a.padding?" ":a.padding;e.line>s||m.operation((function(){if(0!=a.fullLines){var n=t.test(m.getLine(s));m.replaceRange(d+f,i(s)),m.replaceRange(g+d,i(e.line,0));var r=a.blockCommentLead||c.blockCommentLead;if(null!=r)for(var u=e.line+1;u<=s;++u)(u!=s||n)&&m.replaceRange(r+d,i(u,0))}else{var h=0==l(m.getCursor("to"),o),C=!m.somethingSelected();m.replaceRange(f,o),h&&m.setSelection(C?o:m.getCursor("from"),o),m.replaceRange(g,e)}}))}}else(a.lineComment||c.lineComment)&&0!=a.fullLines&&m.lineComment(e,o,a)})),e.defineExtension("uncomment",(function(e,l,o){o||(o=n);var a,m=this,c=r(m,e),g=Math.min(0!=l.ch||l.line==e.line?l.line:l.line-1,m.lastLine()),f=Math.min(e.line,g),s=o.lineComment||c.lineComment,d=[],u=null==o.padding?" ":o.padding;e:if(s){for(var h=f;h<=g;++h){var C=m.getLine(h),p=C.indexOf(s);if(p>-1&&!/comment/.test(m.getTokenTypeAt(i(h,p+1)))&&(p=-1),-1==p&&t.test(C))break e;if(p>-1&&t.test(C.slice(0,p)))break e;d.push(C)}if(m.operation((function(){for(var e=f;e<=g;++e){var n=d[e-f],t=n.indexOf(s),l=t+s.length;t<0||(n.slice(l,l+u.length)==u&&(l+=u.length),a=!0,m.replaceRange("",i(e,t),i(e,l)))}})),a)return!0}var v=o.blockCommentStart||c.blockCommentStart,b=o.blockCommentEnd||c.blockCommentEnd;if(!v||!b)return!1;var k=o.blockCommentLead||c.blockCommentLead,L=m.getLine(f),x=L.indexOf(v);if(-1==x)return!1;var R=g==f?L:m.getLine(g),O=R.indexOf(b,g==f?x+v.length:0),T=i(f,x+1),S=i(g,O+1);if(-1==O||!/comment/.test(m.getTokenTypeAt(T))||!/comment/.test(m.getTokenTypeAt(S))||m.getRange(T,S,"\n").indexOf(b)>-1)return!1;var y=L.lastIndexOf(v,e.ch),E=-1==y?-1:L.slice(0,e.ch).indexOf(b,y+v.length);if(-1!=y&&-1!=E&&E+b.length!=e.ch)return!1;E=R.indexOf(b,l.ch);var M=R.slice(l.ch).lastIndexOf(v,E-l.ch);return y=-1==E||-1==M?-1:l.ch+M,(-1==E||-1==y||y==l.ch)&&(m.operation((function(){m.replaceRange("",i(g,O-(u&&R.slice(O-u.length,O)==u?u.length:0)),i(g,O+b.length));var e=x+v.length;if(u&&L.slice(e,e+u.length)==u&&(e+=u.length),m.replaceRange("",i(f,x),i(f,e)),k)for(var n=f+1;n<=g;++n){var l=m.getLine(n),o=l.indexOf(k);if(-1!=o&&!t.test(l.slice(0,o))){var r=o+k.length;u&&l.slice(r,r+u.length)==u&&(r+=u.length),m.replaceRange("",i(n,o),i(n,r))}}})),!0)}))}));
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){var n=/\S/g,t=String.prototype.repeat||function(e){return Array(e+1).join(this)};function o(n){if(n.getOption("disableInput"))return e.Pass;for(var o,r=n.listSelections(),c=[],f=0;f<r.length;f++){var a=r[f].head;if(!/\bcomment\b/.test(n.getTokenTypeAt(a)))return e.Pass;var m=n.getModeAt(a);if(o){if(o!=m)return e.Pass}else o=m;var s,u,d=null,p=o.blockCommentStart,h=o.lineComment;if(p&&o.blockCommentContinue){var b=(s=n.getLine(a.line)).lastIndexOf(o.blockCommentEnd,a.ch-o.blockCommentEnd.length);if(-1!=b&&b==a.ch-o.blockCommentEnd.length||h&&(u=s.lastIndexOf(h,a.ch-1))>-1&&/\bcomment\b/.test(n.getTokenTypeAt({line:a.line,ch:u+1})));else if(a.ch>=p.length&&(u=s.lastIndexOf(p,a.ch-p.length))>-1&&u>b)if(i(0,s)>=u)d=s.slice(0,u);else{var g,C=n.options.tabSize;u=e.countColumn(s,u,C),d=n.options.indentWithTabs?t.call("\t",g=Math.floor(u/C))+t.call(" ",u-C*g):t.call(" ",u)}else(u=s.indexOf(o.blockCommentContinue))>-1&&u<=a.ch&&u<=i(0,s)&&(d=s.slice(0,u));null!=d&&(d+=o.blockCommentContinue)}if(null==d&&h&&l(n))if(null==s&&(s=n.getLine(a.line)),u=s.indexOf(h),a.ch||u){if(u>-1&&i(0,s)>=u){if(!(d=i(a.ch,s)>-1)){var v=n.getLine(a.line+1)||"",y=v.indexOf(h);d=y>-1&&i(0,v)>=y||null}d&&(d=s.slice(0,u)+h+s.slice(u+h.length).match(/^\s*/)[0])}}else d="";if(null==d)return e.Pass;c[f]="\n"+d}n.operation((function(){for(var e=r.length-1;e>=0;e--)n.replaceRange(c[e],r[e].from(),r[e].to(),"+insert")}))}function i(e,t){n.lastIndex=e;var o=n.exec(t);return o?o.index:-1}function l(e){var n=e.getOption("continueComments");return!n||"object"!=typeof n||!1!==n.continueLineComment}e.defineOption("continueComments",null,(function(n,t,i){if(i&&i!=e.Init&&n.removeKeyMap("continueComment"),t){var l="Enter";"string"==typeof t?l=t:"object"==typeof t&&t.key&&(l=t.key);var r={name:"continueComment"};r[l]=o,n.addKeyMap(r)}}))}));
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
.CodeMirror-dialog {
|
|
||||||
position: absolute;
|
|
||||||
left: 0; right: 0;
|
|
||||||
background: inherit;
|
|
||||||
z-index: 15;
|
|
||||||
padding: .1em .8em;
|
|
||||||
overflow: hidden;
|
|
||||||
color: inherit;
|
|
||||||
}
|
|
||||||
|
|
||||||
.CodeMirror-dialog-top {
|
|
||||||
border-bottom: 1px solid #eee;
|
|
||||||
top: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.CodeMirror-dialog-bottom {
|
|
||||||
border-top: 1px solid #eee;
|
|
||||||
bottom: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.CodeMirror-dialog input {
|
|
||||||
border: none;
|
|
||||||
outline: none;
|
|
||||||
background: transparent;
|
|
||||||
width: 20em;
|
|
||||||
color: inherit;
|
|
||||||
font-family: monospace;
|
|
||||||
}
|
|
||||||
|
|
||||||
.CodeMirror-dialog button {
|
|
||||||
font-size: 70%;
|
|
||||||
}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){function o(o,n,t){var i,r=o.getWrapperElement();return(i=r.appendChild(document.createElement("div"))).className=t?"CodeMirror-dialog CodeMirror-dialog-bottom":"CodeMirror-dialog CodeMirror-dialog-top","string"==typeof n?i.innerHTML=n:i.appendChild(n),e.addClass(r,"dialog-opened"),i}function n(e,o){e.state.currentNotificationClose&&e.state.currentNotificationClose(),e.state.currentNotificationClose=o}e.defineExtension("openDialog",(function(t,i,r){r||(r={}),n(this,null);var u=o(this,t,r.bottom),l=!1,a=this;function c(o){if("string"==typeof o)s.value=o;else{if(l)return;l=!0,e.rmClass(u.parentNode,"dialog-opened"),u.parentNode.removeChild(u),a.focus(),r.onClose&&r.onClose(u)}}var d,s=u.getElementsByTagName("input")[0];return s?(s.focus(),r.value&&(s.value=r.value,!1!==r.selectValueOnOpen&&s.select()),r.onInput&&e.on(s,"input",(function(e){r.onInput(e,s.value,c)})),r.onKeyUp&&e.on(s,"keyup",(function(e){r.onKeyUp(e,s.value,c)})),e.on(s,"keydown",(function(o){r&&r.onKeyDown&&r.onKeyDown(o,s.value,c)||((27==o.keyCode||!1!==r.closeOnEnter&&13==o.keyCode)&&(s.blur(),e.e_stop(o),c()),13==o.keyCode&&i(s.value,o))})),!1!==r.closeOnBlur&&e.on(u,"focusout",(function(e){null!==e.relatedTarget&&c()}))):(d=u.getElementsByTagName("button")[0])&&(e.on(d,"click",(function(){c(),a.focus()})),!1!==r.closeOnBlur&&e.on(d,"blur",c),d.focus()),c})),e.defineExtension("openConfirm",(function(t,i,r){n(this,null);var u=o(this,t,r&&r.bottom),l=u.getElementsByTagName("button"),a=!1,c=this,d=1;function s(){a||(a=!0,e.rmClass(u.parentNode,"dialog-opened"),u.parentNode.removeChild(u),c.focus())}l[0].focus();for(var f=0;f<l.length;++f){var p=l[f];!function(o){e.on(p,"click",(function(n){e.e_preventDefault(n),s(),o&&o(c)}))}(i[f]),e.on(p,"blur",(function(){--d,setTimeout((function(){d<=0&&s()}),200)})),e.on(p,"focus",(function(){++d}))}})),e.defineExtension("openNotification",(function(t,i){n(this,c);var r,u=o(this,t,i&&i.bottom),l=!1,a=i&&void 0!==i.duration?i.duration:5e3;function c(){l||(l=!0,clearTimeout(r),e.rmClass(u.parentNode,"dialog-opened"),u.parentNode.removeChild(u))}return e.on(u,"click",(function(o){e.e_preventDefault(o),c()})),a&&(r=setTimeout(c,a)),c}))}));
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";function t(t,o){clearTimeout(o.timeout),e.off(window,"mouseup",o.hurry),e.off(window,"keyup",o.hurry)}e.defineOption("autoRefresh",!1,(function(o,i){o.state.autoRefresh&&(t(0,o.state.autoRefresh),o.state.autoRefresh=null),i&&0==o.display.wrapper.offsetHeight&&function(o,i){function r(){o.display.wrapper.offsetHeight?(t(0,i),o.display.lastWrapHeight!=o.display.wrapper.clientHeight&&o.refresh()):i.timeout=setTimeout(r,i.delay)}i.timeout=setTimeout(r,i.delay),i.hurry=function(){clearTimeout(i.timeout),i.timeout=setTimeout(r,50)},e.on(window,"mouseup",i.hurry),e.on(window,"keyup",i.hurry)}(o,o.state.autoRefresh={delay:i.delay||250})}))}));
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
.CodeMirror-fullscreen {
|
|
||||||
position: fixed;
|
|
||||||
top: 0; left: 0; right: 0; bottom: 0;
|
|
||||||
height: auto;
|
|
||||||
z-index: 9;
|
|
||||||
}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.defineOption("fullScreen",!1,(function(t,o,r){r==e.Init&&(r=!1),!r!=!o&&(o?function(e){var t=e.getWrapperElement();e.state.fullScreenRestore={scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,width:t.style.width,height:t.style.height},t.style.width="",t.style.height="auto",t.className+=" CodeMirror-fullscreen",document.documentElement.style.overflow="hidden",e.refresh()}(t):function(e){var t=e.getWrapperElement();t.className=t.className.replace(/\s*CodeMirror-fullscreen\b/,""),document.documentElement.style.overflow="";var o=e.state.fullScreenRestore;t.style.width=o.width,t.style.height=o.height,window.scrollTo(o.scrollLeft,o.scrollTop),e.refresh()}(t))}))}));
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){function t(e,t,i,n){this.cm=e,this.node=t,this.options=i,this.height=n,this.cleared=!1}function i(e,t){for(var i=t.nextSibling;i;i=i.nextSibling)if(i==e.getWrapperElement())return!0;return!1}e.defineExtension("addPanel",(function(e,n){n=n||{},this.state.panels||function(e){var t=e.getWrapperElement(),i=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,n=parseInt(i.height),r=e.state.panels={setHeight:t.style.height,panels:[],wrapper:document.createElement("div")},o=e.hasFocus(),s=e.getScrollInfo();t.parentNode.insertBefore(r.wrapper,t),r.wrapper.appendChild(t),e.scrollTo(s.left,s.top),o&&e.focus(),e._setSize=e.setSize,null!=n&&(e.setSize=function(t,i){if(i||(i=r.wrapper.offsetHeight),r.setHeight=i,"number"!=typeof i){var o=/^(\d+\.?\d*)px$/.exec(i);o?i=Number(o[1]):(r.wrapper.style.height=i,i=r.wrapper.offsetHeight)}var s=i-r.panels.map((function(e){return e.node.getBoundingClientRect().height})).reduce((function(e,t){return e+t}),0);e._setSize(t,s),n=i})}(this);var r=this.state.panels,o=r.wrapper,s=this.getWrapperElement(),l=n.replace instanceof t&&!n.replace.cleared;n.after instanceof t&&!n.after.cleared?o.insertBefore(e,n.before.node.nextSibling):n.before instanceof t&&!n.before.cleared?o.insertBefore(e,n.before.node):l?(o.insertBefore(e,n.replace.node),n.replace.clear(!0)):"bottom"==n.position?o.appendChild(e):"before-bottom"==n.position?o.insertBefore(e,s.nextSibling):"after-top"==n.position?o.insertBefore(e,s):o.insertBefore(e,o.firstChild);var p=n&&n.height||e.offsetHeight,a=new t(this,e,n,p);return r.panels.push(a),this.setSize(),n.stable&&i(this,e)&&this.scrollTo(null,this.getScrollInfo().top+p),a})),t.prototype.clear=function(e){if(!this.cleared){this.cleared=!0;var t=this.cm.state.panels;t.panels.splice(t.panels.indexOf(this),1),this.cm.setSize(),this.options.stable&&i(this.cm,this.node)&&this.cm.scrollTo(null,this.cm.getScrollInfo().top-this.height),t.wrapper.removeChild(this.node),0!=t.panels.length||e||function(e){var t=e.state.panels;e.state.panels=null;var i=e.getWrapperElement(),n=e.hasFocus(),r=e.getScrollInfo();t.wrapper.parentNode.replaceChild(i,t.wrapper),e.scrollTo(r.left,r.top),n&&e.focus(),i.style.height=t.setHeight,e.setSize=e._setSize,e.setSize()}(this.cm)}},t.prototype.changed=function(){this.height=this.node.getBoundingClientRect().height,this.cm.setSize()}}));
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){function o(e){e.state.placeholder&&(e.state.placeholder.parentNode.removeChild(e.state.placeholder),e.state.placeholder=null)}function t(e){o(e);var t=e.state.placeholder=document.createElement("pre");t.style.cssText="height: 0; overflow: visible",t.style.direction=e.getOption("direction"),t.className="CodeMirror-placeholder CodeMirror-line-like";var r=e.getOption("placeholder");"string"==typeof r&&(r=document.createTextNode(r)),t.appendChild(r),e.display.lineSpace.insertBefore(t,e.display.lineSpace.firstChild)}function r(e){i(e)&&t(e)}function n(e){var r=e.getWrapperElement(),n=i(e);r.className=r.className.replace(" CodeMirror-empty","")+(n?" CodeMirror-empty":""),n?t(e):o(e)}function i(e){return 1===e.lineCount()&&""===e.getLine(0)}e.defineOption("placeholder","",(function(i,l,a){var c=a&&a!=e.Init;if(l&&!c)i.on("blur",r),i.on("change",n),i.on("swapDoc",n),e.on(i.getInputField(),"compositionupdate",i.state.placeholderCompose=function(){!function(e){setTimeout((function(){var r=!1;if(1==e.lineCount()){var n=e.getInputField();r="TEXTAREA"==n.nodeName?!e.getLine(0).length:!/[^\u200b]/.test(n.querySelector(".CodeMirror-line").textContent)}r?t(e):o(e)}),20)}(i)}),n(i);else if(!l&&c){i.off("blur",r),i.off("change",n),i.off("swapDoc",n),e.off(i.getInputField(),"compositionupdate",i.state.placeholderCompose),o(i);var p=i.getWrapperElement();p.className=p.className.replace(" CodeMirror-empty","")}l&&!i.hasFocus()&&r(i)}))}));
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";function r(r){r.state.rulerDiv.textContent="";var t=r.getOption("rulers"),l=r.defaultCharWidth(),i=r.charCoords(e.Pos(r.firstLine(),0),"div").left;r.state.rulerDiv.style.minHeight=r.display.scroller.offsetHeight+30+"px";for(var o=0;o<t.length;o++){var s=document.createElement("div");s.className="CodeMirror-ruler";var n,a=t[o];"number"==typeof a?n=a:(n=a.column,a.className&&(s.className+=" "+a.className),a.color&&(s.style.borderColor=a.color),a.lineStyle&&(s.style.borderLeftStyle=a.lineStyle),a.width&&(s.style.borderLeftWidth=a.width)),s.style.left=i+n*l+"px",r.state.rulerDiv.appendChild(s)}}e.defineOption("rulers",!1,(function(e,t){e.state.rulerDiv&&(e.state.rulerDiv.parentElement.removeChild(e.state.rulerDiv),e.state.rulerDiv=null,e.off("refresh",r)),t&&t.length&&(e.state.rulerDiv=e.display.lineSpace.parentElement.insertBefore(document.createElement("div"),e.display.lineSpace),e.state.rulerDiv.className="CodeMirror-rulers",r(e),e.on("refresh",r))}))}));
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){var n={pairs:"()[]{}''\"\"",closeBefore:")]}'\":;>",triples:"",explode:"[]{}"},t=e.Pos;function r(e,t){return"pairs"==t&&"string"==typeof e?e:"object"==typeof e&&null!=e[t]?e[t]:n[t]}e.defineOption("autoCloseBrackets",!1,(function(n,t,o){o&&o!=e.Init&&(n.removeKeyMap(i),n.state.closeBrackets=null),t&&(a(r(t,"pairs")),n.state.closeBrackets=t,n.addKeyMap(i))}));var i={Backspace:function(n){var i=s(n);if(!i||n.getOption("disableInput"))return e.Pass;for(var a=r(i,"pairs"),o=n.listSelections(),l=0;l<o.length;l++){if(!o[l].empty())return e.Pass;var f=c(n,o[l].head);if(!f||a.indexOf(f)%2!=0)return e.Pass}for(l=o.length-1;l>=0;l--){var h=o[l].head;n.replaceRange("",t(h.line,h.ch-1),t(h.line,h.ch+1),"+delete")}},Enter:function(n){var t=s(n),i=t&&r(t,"explode");if(!i||n.getOption("disableInput"))return e.Pass;for(var a=n.listSelections(),o=0;o<a.length;o++){if(!a[o].empty())return e.Pass;var f=c(n,a[o].head);if(!f||i.indexOf(f)%2!=0)return e.Pass}n.operation((function(){var e=n.lineSeparator()||"\n";n.replaceSelection(e+e,null),l(n,-1),a=n.listSelections();for(var t=0;t<a.length;t++){var r=a[t].head.line;n.indentLine(r,null,!0),n.indentLine(r+1,null,!0)}}))}};function a(e){for(var n=0;n<e.length;n++){var t=e.charAt(n),r="'"+t+"'";i[r]||(i[r]=o(t))}}function o(n){return function(i){return function(n,i){var a=s(n);if(!a||n.getOption("disableInput"))return e.Pass;var o=r(a,"pairs"),c=o.indexOf(i);if(-1==c)return e.Pass;for(var h,u=r(a,"closeBefore"),d=r(a,"triples"),p=o.charAt(c+1)==i,g=n.listSelections(),v=c%2==0,b=0;b<g.length;b++){var P,S=g[b],k=S.head,y=n.getRange(k,t(k.line,k.ch+1));if(v&&!S.empty())P="surround";else if(!p&&v||y!=i)if(p&&k.ch>1&&d.indexOf(i)>=0&&n.getRange(t(k.line,k.ch-2),k)==i+i){if(k.ch>2&&/\bstring/.test(n.getTokenTypeAt(t(k.line,k.ch-2))))return e.Pass;P="addFour"}else if(p){var O=0==k.ch?" ":n.getRange(t(k.line,k.ch-1),k);if(e.isWordChar(y)||O==i||e.isWordChar(O))return e.Pass;P="both"}else{if(!v||!(0===y.length||/\s/.test(y)||u.indexOf(y)>-1))return e.Pass;P="both"}else P=p&&f(n,k)?"both":d.indexOf(i)>=0&&n.getRange(k,t(k.line,k.ch+3))==i+i+i?"skipThree":"skip";if(h){if(h!=P)return e.Pass}else h=P}var m=c%2?o.charAt(c-1):i,x=c%2?i:o.charAt(c+1);n.operation((function(){if("skip"==h)l(n,1);else if("skipThree"==h)l(n,3);else if("surround"==h){for(var r=n.getSelections(),i=0;i<r.length;i++)r[i]=m+r[i]+x;for(n.replaceSelections(r,"around"),r=n.listSelections().slice(),i=0;i<r.length;i++)r[i]=(a=r[i],o=void 0,o=e.cmpPos(a.anchor,a.head)>0,{anchor:new t(a.anchor.line,a.anchor.ch+(o?-1:1)),head:new t(a.head.line,a.head.ch+(o?1:-1))});n.setSelections(r)}else"both"==h?(n.replaceSelection(m+x,null),n.triggerElectric(m+x),l(n,-1)):"addFour"==h&&(n.replaceSelection(m+m+m+m,"before"),l(n,1));var a,o}))}(i,n)}}function s(e){var n=e.state.closeBrackets;return!n||n.override?n:e.getModeAt(e.getCursor()).closeBrackets||n}function l(e,n){for(var t=[],r=e.listSelections(),i=0,a=0;a<r.length;a++){var o=r[a];o.head==e.getCursor()&&(i=a);var s=o.head.ch||n>0?{line:o.head.line,ch:o.head.ch+n}:{line:o.head.line-1};t.push({anchor:s,head:s})}e.setSelections(t,i)}function c(e,n){var r=e.getRange(t(n.line,n.ch-1),t(n.line,n.ch+1));return 2==r.length?r:null}function f(e,n){var r=e.getTokenAt(t(n.line,n.ch+1));return/\bstring/.test(r.type)&&r.start==n.ch&&(0==n.ch||!/\bstring/.test(e.getTokenTypeAt(n)))}a(n.pairs+"`")}));
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../fold/xml-fold")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../fold/xml-fold"],e):e(CodeMirror)}((function(e){e.defineOption("autoCloseTags",!1,(function(a,l,s){if(s!=e.Init&&s&&a.removeKeyMap("autoCloseTags"),l){var d={name:"autoCloseTags"};"object"==typeof l&&!1===l.whenClosing||(d["'/'"]=function(t){return function(t){return t.getOption("disableInput")?e.Pass:o(t,!0)}(t)}),"object"==typeof l&&!1===l.whenOpening||(d["'>'"]=function(o){return function(o){if(o.getOption("disableInput"))return e.Pass;for(var a=o.listSelections(),l=[],s=o.getOption("autoCloseTags"),d=0;d<a.length;d++){if(!a[d].empty())return e.Pass;var c=a[d].head,f=o.getTokenAt(c),g=e.innerMode(o.getMode(),f.state),u=g.state,m=g.mode.xmlCurrentTag&&g.mode.xmlCurrentTag(u),h=m&&m.name;if(!h)return e.Pass;var p="html"==g.mode.configuration,C="object"==typeof s&&s.dontCloseTags||p&&t,b="object"==typeof s&&s.indentTags||p&&n;f.end>c.ch&&(h=h.slice(0,h.length-f.end+c.ch));var v=h.toLowerCase();if(!h||"string"==f.type&&(f.end!=c.ch||!/[\"\']/.test(f.string.charAt(f.string.length-1))||1==f.string.length)||"tag"==f.type&&m.close||f.string.indexOf("/")==c.ch-f.start-1||C&&r(C,v)>-1||i(o,g.mode.xmlCurrentContext&&g.mode.xmlCurrentContext(u)||[],h,c,!0))return e.Pass;var y="object"==typeof s&&s.emptyTags;if(y&&r(y,h)>-1)l[d]={text:"/>",newPos:e.Pos(c.line,c.ch+2)};else{var x=b&&r(b,v)>-1;l[d]={indent:x,text:">"+(x?"\n\n":"")+"</"+h+">",newPos:x?e.Pos(c.line+1,0):e.Pos(c.line,c.ch+1)}}}var P="object"==typeof s&&s.dontIndentOnAutoClose;for(d=a.length-1;d>=0;d--){var T=l[d];o.replaceRange(T.text,a[d].head,a[d].anchor,"+insert");var j=o.listSelections().slice(0);j[d]={head:T.newPos,anchor:T.newPos},o.setSelections(j),!P&&T.indent&&(o.indentLine(T.newPos.line,null,!0),o.indentLine(T.newPos.line+1,null,!0))}}(o)}),a.addKeyMap(d)}}));var t=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],n=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function o(t,n){for(var o=t.listSelections(),r=[],a=n?"/":"</",l=t.getOption("autoCloseTags"),s="object"==typeof l&&l.dontIndentOnSlash,d=0;d<o.length;d++){if(!o[d].empty())return e.Pass;var c=o[d].head,f=t.getTokenAt(c),g=e.innerMode(t.getMode(),f.state),u=g.state;if(n&&("string"==f.type||"<"!=f.string.charAt(0)||f.start!=c.ch-1))return e.Pass;var m,h="xml"!=g.mode.name&&"htmlmixed"==t.getMode().name;if(h&&"javascript"==g.mode.name)m=a+"script";else if(h&&"css"==g.mode.name)m=a+"style";else{var p=g.mode.xmlCurrentContext&&g.mode.xmlCurrentContext(u),C=p.length?p[p.length-1]:"";if(!p||p.length&&i(t,p,C,c))return e.Pass;m=a+C}">"!=t.getLine(c.line).charAt(f.end)&&(m+=">"),r[d]=m}if(t.replaceSelections(r),o=t.listSelections(),!s)for(d=0;d<o.length;d++)(d==o.length-1||o[d].head.line<o[d+1].head.line)&&t.indentLine(o[d].head.line)}function r(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,o=e.length;n<o;++n)if(e[n]==t)return n;return-1}function i(t,n,o,r,i){if(!e.scanForClosingTag)return!1;var a=Math.min(t.lastLine()+1,r.line+500),l=e.scanForClosingTag(t,r,null,a);if(!l||l.tag!=o)return!1;for(var s=i?1:0,d=n.length-1;d>=0&&n[d]==o;d--)++s;for(r=l.to,d=1;d<s;d++){var c=e.scanForClosingTag(t,r,null,a);if(!c||c.tag!=o)return!1;r=c.to}return!0}e.commands.closeTag=function(e){return o(e)}}));
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";var n=/^(\s*)(>[> ]*|[*+-] \[[x ]\]\s|[*+-]\s|(\d+)([.)]))(\s*)/,t=/^(\s*)(>[> ]*|[*+-] \[[x ]\]|[*+-]|(\d+)[.)])(\s*)$/,i=/[*+-]\s/;function r(e,t){var i=t.line,r=0,o=0,l=n.exec(e.getLine(i)),s=l[1];do{var a=i+(r+=1),d=e.getLine(a),c=n.exec(d);if(c){var f=c[1],p=parseInt(l[3],10)+r-o,m=parseInt(c[3],10),u=m;if(s!==f||isNaN(m)){if(s.length>f.length)return;if(s.length<f.length&&1===r)return;o+=1}else p===m&&(u=m+1),p>m&&(u=p+1),e.replaceRange(d.replace(n,f+u+c[4]+c[5]),{line:a,ch:0},{line:a,ch:d.length})}}while(c)}e.commands.newlineAndIndentContinueMarkdownList=function(o){if(o.getOption("disableInput"))return e.Pass;for(var l=o.listSelections(),s=[],a=0;a<l.length;a++){var d=l[a].head,c=o.getStateAfter(d.line),f=e.innerMode(o.getMode(),c);if("markdown"!==f.mode.name&&"markdown"!==f.mode.helperType)return void o.execCommand("newlineAndIndent");var p=!1!==(c=f.state).list,m=0!==c.quote,u=o.getLine(d.line),h=n.exec(u),g=/^\s*$/.test(u.slice(0,d.ch));if(!l[a].empty()||!p&&!m||!h||g)return void o.execCommand("newlineAndIndent");if(t.test(u)){var v=m&&/>\s*$/.test(u),x=!/>\s*$/.test(u);(v||x)&&o.replaceRange("",{line:d.line,ch:0},{line:d.line,ch:d.ch+1}),s[a]="\n"}else{var w=h[1],I=h[5],b=!(i.test(h[2])||h[2].indexOf(">")>=0),y=b?parseInt(h[3],10)+1+h[4]:h[2].replace("x"," ");s[a]="\n"+w+y+I,b&&r(o,d)}}o.replaceSelections(s)}}));
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}((function(t){var e=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),n=t.Pos,r={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function i(t){return t&&t.bracketRegex||/[(){}[\]]/}function c(t,e,c){var o=t.getLineHandle(e.line),h=e.ch-1,l=c&&c.afterCursor;null==l&&(l=/(^| )cm-fat-cursor($| )/.test(t.getWrapperElement().className));var s=i(c),f=!l&&h>=0&&s.test(o.text.charAt(h))&&r[o.text.charAt(h)]||s.test(o.text.charAt(h+1))&&r[o.text.charAt(++h)];if(!f)return null;var u=">"==f.charAt(1)?1:-1;if(c&&c.strict&&u>0!=(h==e.ch))return null;var m=t.getTokenTypeAt(n(e.line,h+1)),g=a(t,n(e.line,h+(u>0?1:0)),u,m,c);return null==g?null:{from:n(e.line,h),to:g&&g.pos,match:g&&g.ch==f.charAt(0),forward:u>0}}function a(t,e,c,a,o){for(var h=o&&o.maxScanLineLength||1e4,l=o&&o.maxScanLines||1e3,s=[],f=i(o),u=c>0?Math.min(e.line+l,t.lastLine()+1):Math.max(t.firstLine()-1,e.line-l),m=e.line;m!=u;m+=c){var g=t.getLine(m);if(g){var d=c>0?0:g.length-1,k=c>0?g.length:-1;if(!(g.length>h))for(m==e.line&&(d=e.ch-(c<0?1:0));d!=k;d+=c){var p=g.charAt(d);if(f.test(p)&&(void 0===a||(t.getTokenTypeAt(n(m,d+1))||"")==(a||""))){var v=r[p];if(v&&">"==v.charAt(1)==c>0)s.push(p);else{if(!s.length)return{pos:n(m,d),ch:p};s.pop()}}}}}return m-c!=(c>0?t.lastLine():t.firstLine())&&null}function o(t,r,i){for(var a=t.state.matchBrackets.maxHighlightLineLength||1e3,o=i&&i.highlightNonMatching,h=[],l=t.listSelections(),s=0;s<l.length;s++){var f=l[s].empty()&&c(t,l[s].head,i);if(f&&(f.match||!1!==o)&&t.getLine(f.from.line).length<=a){var u=f.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";h.push(t.markText(f.from,n(f.from.line,f.from.ch+1),{className:u})),f.to&&t.getLine(f.to.line).length<=a&&h.push(t.markText(f.to,n(f.to.line,f.to.ch+1),{className:u}))}}if(h.length){e&&t.state.focused&&t.focus();var m=function(){t.operation((function(){for(var t=0;t<h.length;t++)h[t].clear()}))};if(!r)return m;setTimeout(m,800)}}function h(t){t.operation((function(){t.state.matchBrackets.currentlyHighlighted&&(t.state.matchBrackets.currentlyHighlighted(),t.state.matchBrackets.currentlyHighlighted=null),t.state.matchBrackets.currentlyHighlighted=o(t,!1,t.state.matchBrackets)}))}function l(t){t.state.matchBrackets&&t.state.matchBrackets.currentlyHighlighted&&(t.state.matchBrackets.currentlyHighlighted(),t.state.matchBrackets.currentlyHighlighted=null)}t.defineOption("matchBrackets",!1,(function(e,n,r){r&&r!=t.Init&&(e.off("cursorActivity",h),e.off("focus",h),e.off("blur",l),l(e)),n&&(e.state.matchBrackets="object"==typeof n?n:{},e.on("cursorActivity",h),e.on("focus",h),e.on("blur",l))})),t.defineExtension("matchBrackets",(function(){o(this,!0)})),t.defineExtension("findMatchingBracket",(function(t,e,n){return(n||"boolean"==typeof e)&&(n?(n.strict=e,e=n):e=e?{strict:!0}:null),c(this,t,e)})),t.defineExtension("scanForBracket",(function(t,e,n,r){return a(this,t,e,n,r)}))}));
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror"),require("../fold/xml-fold")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../fold/xml-fold"],t):t(CodeMirror)}((function(t){"use strict";function e(t){t.state.tagHit&&t.state.tagHit.clear(),t.state.tagOther&&t.state.tagOther.clear(),t.state.tagHit=t.state.tagOther=null}function a(a){a.state.failedTagMatch=!1,a.operation((function(){if(e(a),!a.somethingSelected()){var o=a.getCursor(),i=a.getViewport();i.from=Math.min(i.from,o.line),i.to=Math.max(o.line+1,i.to);var r=t.findMatchingTag(a,o,i);if(r){if(a.state.matchBothTags){var n="open"==r.at?r.open:r.close;n&&(a.state.tagHit=a.markText(n.from,n.to,{className:"CodeMirror-matchingtag"}))}var c="close"==r.at?r.open:r.close;c?a.state.tagOther=a.markText(c.from,c.to,{className:"CodeMirror-matchingtag"}):a.state.failedTagMatch=!0}}}))}function o(t){t.state.failedTagMatch&&a(t)}t.defineOption("matchTags",!1,(function(i,r,n){n&&n!=t.Init&&(i.off("cursorActivity",a),i.off("viewportChange",o),e(i)),r&&(i.state.matchBothTags="object"==typeof r&&r.bothTags,i.on("cursorActivity",a),i.on("viewportChange",o),a(i))})),t.commands.toMatchingTag=function(e){var a=t.findMatchingTag(e,e.getCursor());if(a){var o="close"==a.at?a.open:a.close;o&&e.extendSelection(o.to,o.from)}}}));
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){e.defineOption("showTrailingSpace",!1,(function(i,n,o){o==e.Init&&(o=!1),o&&!n?i.removeOverlay("trailingspace"):!o&&n&&i.addOverlay({token:function(e){for(var i=e.string.length,n=i;n&&/\s/.test(e.string.charAt(n-1));--n);return n>e.pos?(e.pos=n,null):(e.pos=i,"trailingspace")},name:"trailingspace"})}))}));
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";function r(r){return function(n,t){var i=t.line,o=n.getLine(i);function l(r){for(var l,f=t.ch,u=0;;){var s=f<=0?-1:o.lastIndexOf(r[0],f-1);if(-1!=s){if(1==u&&s<t.ch)break;if(l=n.getTokenTypeAt(e.Pos(i,s+1)),!/^(comment|string)/.test(l))return{ch:s+1,tokenType:l,pair:r};f=s-1}else{if(1==u)break;u=1,f=o.length}}}function f(r){var t,o,l=1,f=n.lastLine(),u=r.ch;e:for(var s=i;s<=f;++s)for(var a=n.getLine(s),c=s==i?u:0;;){var d=a.indexOf(r.pair[0],c),g=a.indexOf(r.pair[1],c);if(d<0&&(d=a.length),g<0&&(g=a.length),(c=Math.min(d,g))==a.length)break;if(n.getTokenTypeAt(e.Pos(s,c+1))==r.tokenType)if(c==d)++l;else if(!--l){t=s,o=c;break e}++c}return null==t||i==t?null:{from:e.Pos(i,u),to:e.Pos(t,o)}}for(var u=[],s=0;s<r.length;s++){var a=l(r[s]);a&&u.push(a)}for(u.sort((function(e,r){return e.ch-r.ch})),s=0;s<u.length;s++){var c=f(u[s]);if(c)return c}return null}}e.registerHelper("fold","brace",r([["{","}"],["[","]"]])),e.registerHelper("fold","brace-paren",r([["{","}"],["[","]"],["(",")"]])),e.registerHelper("fold","import",(function(r,n){function t(n){if(n<r.firstLine()||n>r.lastLine())return null;var t=r.getTokenAt(e.Pos(n,1));if(/\S/.test(t.string)||(t=r.getTokenAt(e.Pos(n,t.end+1))),"keyword"!=t.type||"import"!=t.string)return null;for(var i=n,o=Math.min(r.lastLine(),n+10);i<=o;++i){var l=r.getLine(i).indexOf(";");if(-1!=l)return{startCh:t.end,end:e.Pos(i,l)}}}var i,o=n.line,l=t(o);if(!l||t(o-1)||(i=t(o-2))&&i.end.line==o-1)return null;for(var f=l.end;;){var u=t(f.line+1);if(null==u)break;f=u.end}return{from:r.clipPos(e.Pos(o,l.startCh+1)),to:f}})),e.registerHelper("fold","include",(function(r,n){function t(n){if(n<r.firstLine()||n>r.lastLine())return null;var t=r.getTokenAt(e.Pos(n,1));return/\S/.test(t.string)||(t=r.getTokenAt(e.Pos(n,t.end+1))),"meta"==t.type&&"#include"==t.string.slice(0,8)?t.start+8:void 0}var i=n.line,o=t(i);if(null==o||null!=t(i-1))return null;for(var l=i;null!=t(l+1);)++l;return{from:e.Pos(i,o+1),to:r.clipPos(e.Pos(l))}}))}));
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.registerGlobalHelper("fold","comment",(function(e){return e.blockCommentStart&&e.blockCommentEnd}),(function(t,n){var o=t.getModeAt(n),r=o.blockCommentStart,i=o.blockCommentEnd;if(r&&i){for(var f,l=n.line,c=t.getLine(l),m=n.ch,a=0;;){var d=m<=0?-1:c.lastIndexOf(r,m-1);if(-1!=d){if(1==a&&d<n.ch)return;if(/comment/.test(t.getTokenTypeAt(e.Pos(l,d+1)))&&(0==d||c.slice(d-i.length,d)==i||!/comment/.test(t.getTokenTypeAt(e.Pos(l,d))))){f=d+r.length;break}m=d-1}else{if(1==a)return;a=1,m=c.length}}var s,u,b=1,g=t.lastLine();e:for(var h=l;h<=g;++h)for(var k=t.getLine(h),p=h==l?f:0;;){var v=k.indexOf(r,p),y=k.indexOf(i,p);if(v<0&&(v=k.length),y<0&&(y=k.length),(p=Math.min(v,y))==k.length)break;if(p==v)++b;else if(!--b){s=h,u=p;break e}++p}if(null!=s&&(l!=s||u!=f))return{from:e.Pos(l,f),to:e.Pos(s,u)}}}))}));
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
!function(n){"object"==typeof exports&&"object"==typeof module?n(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)}((function(n){"use strict";function o(o,e,t,i){if(t&&t.call){var f=t;t=null}else f=r(o,t,"rangeFinder");"number"==typeof e&&(e=n.Pos(e,0));var l=r(o,t,"minFoldSize");function d(n){var r=f(o,e);if(!r||r.to.line-r.from.line<l)return null;if("fold"===i)return r;for(var t=o.findMarksAt(r.from),d=0;d<t.length;++d)if(t[d].__isFold){if(!n)return null;r.cleared=!0,t[d].clear()}return r}var a=d(!0);if(r(o,t,"scanUp"))for(;!a&&e.line>o.firstLine();)e=n.Pos(e.line-1,0),a=d(!1);if(a&&!a.cleared&&"unfold"!==i){var u=function(n,o,e){var t=r(n,o,"widget");if("function"==typeof t&&(t=t(e.from,e.to)),"string"==typeof t){var i=document.createTextNode(t);(t=document.createElement("span")).appendChild(i),t.className="CodeMirror-foldmarker"}else t&&(t=t.cloneNode(!0));return t}(o,t,a);n.on(u,"mousedown",(function(o){c.clear(),n.e_preventDefault(o)}));var c=o.markText(a.from,a.to,{replacedWith:u,clearOnEnter:r(o,t,"clearOnEnter"),__isFold:!0});c.on("clear",(function(e,r){n.signal(o,"unfold",o,e,r)})),n.signal(o,"fold",o,a.from,a.to)}}n.newFoldFunction=function(n,e){return function(r,t){o(r,t,{rangeFinder:n,widget:e})}},n.defineExtension("foldCode",(function(n,e,r){o(this,n,e,r)})),n.defineExtension("isFolded",(function(n){for(var o=this.findMarksAt(n),e=0;e<o.length;++e)if(o[e].__isFold)return!0})),n.commands.toggleFold=function(n){n.foldCode(n.getCursor())},n.commands.fold=function(n){n.foldCode(n.getCursor(),null,"fold")},n.commands.unfold=function(n){n.foldCode(n.getCursor(),{scanUp:!1},"unfold")},n.commands.foldAll=function(o){o.operation((function(){for(var e=o.firstLine(),r=o.lastLine();e<=r;e++)o.foldCode(n.Pos(e,0),{scanUp:!1},"fold")}))},n.commands.unfoldAll=function(o){o.operation((function(){for(var e=o.firstLine(),r=o.lastLine();e<=r;e++)o.foldCode(n.Pos(e,0),{scanUp:!1},"unfold")}))},n.registerHelper("fold","combine",(function(){var n=Array.prototype.slice.call(arguments,0);return function(o,e){for(var r=0;r<n.length;++r){var t=n[r](o,e);if(t)return t}}})),n.registerHelper("fold","auto",(function(n,o){for(var e=n.getHelpers(o,"fold"),r=0;r<e.length;r++){var t=e[r](n,o);if(t)return t}}));var e={rangeFinder:n.fold.auto,widget:"↔",minFoldSize:0,scanUp:!1,clearOnEnter:!0};function r(n,o,r){if(o&&void 0!==o[r])return o[r];var t=n.options.foldOptions;return t&&void 0!==t[r]?t[r]:e[r]}n.defineOption("foldOptions",null),n.defineExtension("foldOption",(function(n,o){return r(this,n,o)}))}));
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
.CodeMirror-foldmarker {
|
|
||||||
color: blue;
|
|
||||||
text-shadow: #b9f 1px 1px 2px, #b9f -1px -1px 2px, #b9f 1px -1px 2px, #b9f -1px 1px 2px;
|
|
||||||
font-family: arial;
|
|
||||||
line-height: .3;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
.CodeMirror-foldgutter {
|
|
||||||
width: .7em;
|
|
||||||
}
|
|
||||||
.CodeMirror-foldgutter-open,
|
|
||||||
.CodeMirror-foldgutter-folded {
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
.CodeMirror-foldgutter-open:after {
|
|
||||||
content: "\25BE";
|
|
||||||
}
|
|
||||||
.CodeMirror-foldgutter-folded:after {
|
|
||||||
content: "\25B8";
|
|
||||||
}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror"),require("./foldcode")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","./foldcode"],t):t(CodeMirror)}((function(t){"use strict";t.defineOption("foldGutter",!1,(function(o,r,n){var i;n&&n!=t.Init&&(o.clearGutter(o.state.foldGutter.options.gutter),o.state.foldGutter=null,o.off("gutterClick",d),o.off("changes",u),o.off("viewportChange",l),o.off("fold",c),o.off("unfold",c),o.off("swapDoc",u)),r&&(o.state.foldGutter=new e((!0===(i=r)&&(i={}),null==i.gutter&&(i.gutter="CodeMirror-foldgutter"),null==i.indicatorOpen&&(i.indicatorOpen="CodeMirror-foldgutter-open"),null==i.indicatorFolded&&(i.indicatorFolded="CodeMirror-foldgutter-folded"),i)),a(o),o.on("gutterClick",d),o.on("changes",u),o.on("viewportChange",l),o.on("fold",c),o.on("unfold",c),o.on("swapDoc",u))}));var o=t.Pos;function e(t){this.options=t,this.from=this.to=0}function r(t,e){for(var r=t.findMarks(o(e,0),o(e+1,0)),n=0;n<r.length;++n)if(r[n].__isFold){var i=r[n].find(-1);if(i&&i.line===e)return r[n]}}function n(t){if("string"==typeof t){var o=document.createElement("div");return o.className=t+" CodeMirror-guttermarker-subtle",o}return t.cloneNode(!0)}function i(t,e,i){var a=t.state.foldGutter.options,d=e-1,u=t.foldOption(a,"minFoldSize"),l=t.foldOption(a,"rangeFinder"),c="string"==typeof a.indicatorFolded&&f(a.indicatorFolded),s="string"==typeof a.indicatorOpen&&f(a.indicatorOpen);t.eachLine(e,i,(function(e){++d;var i=null,f=e.gutterMarkers;if(f&&(f=f[a.gutter]),r(t,d)){if(c&&f&&c.test(f.className))return;i=n(a.indicatorFolded)}else{var p=o(d,0),m=l&&l(t,p);if(m&&m.to.line-m.from.line>=u){if(s&&f&&s.test(f.className))return;i=n(a.indicatorOpen)}}(i||f)&&t.setGutterMarker(e,a.gutter,i)}))}function f(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}function a(t){var o=t.getViewport(),e=t.state.foldGutter;e&&(t.operation((function(){i(t,o.from,o.to)})),e.from=o.from,e.to=o.to)}function d(t,e,n){var i=t.state.foldGutter;if(i){var f=i.options;if(n==f.gutter){var a=r(t,e);a?a.clear():t.foldCode(o(e,0),f)}}}function u(t){var o=t.state.foldGutter;if(o){var e=o.options;o.from=o.to=0,clearTimeout(o.changeUpdate),o.changeUpdate=setTimeout((function(){a(t)}),e.foldOnChangeTimeSpan||600)}}function l(t){var o=t.state.foldGutter;if(o){var e=o.options;clearTimeout(o.changeUpdate),o.changeUpdate=setTimeout((function(){var e=t.getViewport();o.from==o.to||e.from-o.to>20||o.from-e.to>20?a(t):t.operation((function(){e.from<o.from&&(i(t,e.from,o.from),o.from=e.from),e.to>o.to&&(i(t,o.to,e.to),o.to=e.to)}))}),e.updateViewportTimeSpan||400)}}function c(t,o){var e=t.state.foldGutter;if(e){var r=o.line;r>=e.from&&r<e.to&&i(t,r,r+1)}}}));
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";function n(n,t){var i=n.getLine(t),o=i.search(/\S/);return-1==o||/\bcomment\b/.test(n.getTokenTypeAt(e.Pos(t,o+1)))?-1:e.countColumn(i,null,n.getOption("tabSize"))}e.registerHelper("fold","indent",(function(t,i){var o=n(t,i.line);if(!(o<0)){for(var r=null,l=i.line+1,f=t.lastLine();l<=f;++l){var u=n(t,l);if(-1==u);else{if(!(u>o))break;r=l}}return r?{from:e.Pos(i.line,t.getLine(i.line).length),to:e.Pos(r,t.getLine(r).length)}:void 0}}))}));
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.registerHelper("fold","markdown",(function(n,t){function r(t){var r=n.getTokenTypeAt(e.Pos(t,0));return r&&/\bheader\b/.test(r)}function i(e,n,t){var i=n&&n.match(/^#+/);return i&&r(e)?i[0].length:(i=t&&t.match(/^[=\-]+\s*$/))&&r(e+1)?"="==t[0]?1:2:100}var o=n.getLine(t.line),f=n.getLine(t.line+1),l=i(t.line,o,f);if(100!==l){for(var c=n.lastLine(),u=t.line,d=n.getLine(u+2);u<c&&!(i(u+1,f,d)<=l);)++u,f=d,d=n.getLine(u+2);return{from:e.Pos(t.line,o.length),to:e.Pos(u,n.getLine(u).length)}}}))}));
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";var n=e.Pos;function t(e,n){return e.line-n.line||e.ch-n.ch}var i=new RegExp("<(/?)([A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*)","g");function r(e,n,t,i){this.line=n,this.ch=t,this.cm=e,this.text=e.getLine(n),this.min=i?Math.max(i.from,e.firstLine()):e.firstLine(),this.max=i?Math.min(i.to-1,e.lastLine()):e.lastLine()}function u(e,t){var i=e.cm.getTokenTypeAt(n(e.line,t));return i&&/\btag\b/.test(i)}function f(e){if(!(e.line>=e.max))return e.ch=0,e.text=e.cm.getLine(++e.line),!0}function o(e){if(!(e.line<=e.min))return e.text=e.cm.getLine(--e.line),e.ch=e.text.length,!0}function l(e){for(;;){var n=e.text.indexOf(">",e.ch);if(-1==n){if(f(e))continue;return}if(u(e,n+1)){var t=e.text.lastIndexOf("/",n),i=t>-1&&!/\S/.test(e.text.slice(t+1,n));return e.ch=n+1,i?"selfClose":"regular"}e.ch=n+1}}function c(e){for(;;){var n=e.ch?e.text.lastIndexOf("<",e.ch-1):-1;if(-1==n){if(o(e))continue;return}if(u(e,n+1)){i.lastIndex=n,e.ch=n;var t=i.exec(e.text);if(t&&t.index==n)return t}else e.ch=n}}function a(e){for(;;){i.lastIndex=e.ch;var n=i.exec(e.text);if(!n){if(f(e))continue;return}if(u(e,n.index+1))return e.ch=n.index+n[0].length,n;e.ch=n.index+1}}function s(e){for(;;){var n=e.ch?e.text.lastIndexOf(">",e.ch-1):-1;if(-1==n){if(o(e))continue;return}if(u(e,n+1)){var t=e.text.lastIndexOf("/",n),i=t>-1&&!/\S/.test(e.text.slice(t+1,n));return e.ch=n+1,i?"selfClose":"regular"}e.ch=n}}function h(e,t){for(var i=[];;){var r,u=a(e),f=e.line,o=e.ch-(u?u[0].length:0);if(!u||!(r=l(e)))return;if("selfClose"!=r)if(u[1]){for(var c=i.length-1;c>=0;--c)if(i[c]==u[2]){i.length=c;break}if(c<0&&(!t||t==u[2]))return{tag:u[2],from:n(f,o),to:n(e.line,e.ch)}}else i.push(u[2])}}function F(e,t){for(var i=[];;){var r=s(e);if(!r)return;if("selfClose"!=r){var u=e.line,f=e.ch,o=c(e);if(!o)return;if(o[1])i.push(o[2]);else{for(var l=i.length-1;l>=0;--l)if(i[l]==o[2]){i.length=l;break}if(l<0&&(!t||t==o[2]))return{tag:o[2],from:n(e.line,e.ch),to:n(u,f)}}}else c(e)}}e.registerHelper("fold","xml",(function(e,i){for(var u=new r(e,i.line,0);;){var f=a(u);if(!f||u.line!=i.line)return;var o=l(u);if(!o)return;if(!f[1]&&"selfClose"!=o){var c=n(u.line,u.ch),s=h(u,f[2]);return s&&t(s.from,c)>0?{from:c,to:s.from}:null}}})),e.findMatchingTag=function(e,i,u){var f=new r(e,i.line,i.ch,u);if(-1!=f.text.indexOf(">")||-1!=f.text.indexOf("<")){var o=l(f),a=o&&n(f.line,f.ch),s=o&&c(f);if(o&&s&&!(t(f,i)>0)){var x={from:n(f.line,f.ch),to:a,tag:s[2]};return"selfClose"==o?{open:x,close:null,at:"open"}:s[1]?{open:F(f,s[2]),close:x,at:"close"}:{open:x,close:h(f=new r(e,a.line,a.ch,u),s[2]),at:"open"}}}},e.findEnclosingTag=function(e,n,t,i){for(var u=new r(e,n.line,n.ch,t);;){var f=F(u,i);if(!f)break;var o=h(new r(e,n.line,n.ch,t),f.tag);if(o)return{open:f,close:o}}},e.scanForClosingTag=function(e,n,t,i){return h(new r(e,n.line,n.ch,i?{from:0,to:i}:null),t)}}));
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";var r=/[\w$]+/;e.registerHelper("hint","anyword",(function(t,o){for(var i=o&&o.word||r,n=o&&o.range||500,f=t.getCursor(),s=t.getLine(f.line),a=f.ch,c=a;c&&i.test(s.charAt(c-1));)--c;for(var l=c!=a&&s.slice(c,a),d=o&&o.list||[],u={},p=new RegExp(i.source,"g"),g=-1;g<=1;g+=2)for(var h=f.line,m=Math.min(Math.max(h+g*n,t.firstLine()),t.lastLine())+g;h!=m;h+=g)for(var y,b=t.getLine(h);y=p.exec(b);)h==f.line&&y[0]===l||l&&0!=y[0].lastIndexOf(l,0)||Object.prototype.hasOwnProperty.call(u,y[0])||(u[y[0]]=!0,d.push(y[0]));return{list:d,from:e.Pos(f.line,c),to:e.Pos(f.line,a)}}))}));
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../../mode/css/css")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../../mode/css/css"],e):e(CodeMirror)}((function(e){"use strict";var t={active:1,after:1,before:1,checked:1,default:1,disabled:1,empty:1,enabled:1,"first-child":1,"first-letter":1,"first-line":1,"first-of-type":1,focus:1,hover:1,"in-range":1,indeterminate:1,invalid:1,lang:1,"last-child":1,"last-of-type":1,link:1,not:1,"nth-child":1,"nth-last-child":1,"nth-last-of-type":1,"nth-of-type":1,"only-of-type":1,"only-child":1,optional:1,"out-of-range":1,placeholder:1,"read-only":1,"read-write":1,required:1,root:1,selection:1,target:1,valid:1,visited:1};e.registerHelper("hint","css",(function(r){var o=r.getCursor(),i=r.getTokenAt(o),s=e.innerMode(r.getMode(),i.state);if("css"==s.mode.name){if("keyword"==i.type&&0=="!important".indexOf(i.string))return{list:["!important"],from:e.Pos(o.line,i.start),to:e.Pos(o.line,i.end)};var n=i.start,a=o.ch,d=i.string.slice(0,a-n);/[^\w$_-]/.test(d)&&(d="",n=a=o.ch);var l=e.resolveMode("text/css"),c=[],f=s.state.state;return"pseudo"==f||"variable-3"==i.type?p(t):"block"==f||"maybeprop"==f?p(l.propertyKeywords):"prop"==f||"parens"==f||"at"==f||"params"==f?(p(l.valueKeywords),p(l.colorKeywords)):"media"!=f&&"media_parens"!=f||(p(l.mediaTypes),p(l.mediaFeatures)),c.length?{list:c,from:e.Pos(o.line,n),to:e.Pos(o.line,a)}:void 0}function p(e){for(var t in e)d&&0!=t.lastIndexOf(d,0)||c.push(t)}}))}));
|
|
||||||
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
|||||||
!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}((function(t){var e=t.Pos;function r(t,e){for(var r=0,n=t.length;r<n;++r)e(t[r])}function n(r,n,i,o){var s=r.getCursor(),a=i(r,s);if(!/\b(?:string|comment)\b/.test(a.type)){var l=t.innerMode(r.getMode(),a.state);if("json"!==l.mode.helperType){a.state=l.state,/^[\w$_]*$/.test(a.string)?a.end>s.ch&&(a.end=s.ch,a.string=a.string.slice(0,s.ch-a.start)):a={start:s.ch,end:s.ch,string:"",state:a.state,type:"."==a.string?"property":null};for(var f=a;"property"==f.type;){if("."!=(f=i(r,e(s.line,f.start))).string)return;if(f=i(r,e(s.line,f.start)),!p)var p=[];p.push(f)}return{list:c(a,p,n,o),from:e(s.line,a.start),to:e(s.line,a.end)}}}}function i(t,e){var r=t.getTokenAt(e);return e.ch==r.start+1&&"."==r.string.charAt(0)?(r.end=r.start,r.string=".",r.type="property"):/^\.[\w$_]*$/.test(r.string)&&(r.type="property",r.start++,r.string=r.string.replace(/\./,"")),r}t.registerHelper("hint","javascript",(function(t,e){return n(t,l,(function(t,e){return t.getTokenAt(e)}),e)})),t.registerHelper("hint","coffeescript",(function(t,e){return n(t,f,i,e)}));var o="charAt charCodeAt indexOf lastIndexOf substring substr slice trim trimLeft trimRight toUpperCase toLowerCase split concat match replace search".split(" "),s="length concat join splice push pop shift unshift slice reverse sort indexOf lastIndexOf every some filter forEach map reduce reduceRight ".split(" "),a="prototype apply call bind".split(" "),l="break case catch class const continue debugger default delete do else export extends false finally for function if in import instanceof new null return super switch this throw true try typeof var void while with yield".split(" "),f="and break catch class continue delete do else extends false finally for if in instanceof isnt new no not null of off on or return switch then throw true try typeof until void while with yes".split(" ");function c(t,e,n,i){var l=[],f=t.string,c=i&&i.globalScope||window;function p(t){0!=t.lastIndexOf(f,0)||function(t,e){if(!Array.prototype.indexOf){for(var r=t.length;r--;)if(t[r]===e)return!0;return!1}return-1!=t.indexOf(e)}(l,t)||l.push(t)}function u(t){"string"==typeof t?r(o,p):t instanceof Array?r(s,p):t instanceof Function&&r(a,p),function(t,e){if(Object.getOwnPropertyNames&&Object.getPrototypeOf)for(var r=t;r;r=Object.getPrototypeOf(r))Object.getOwnPropertyNames(r).forEach(e);else for(var n in t)e(n)}(t,p)}if(e&&e.length){var d,g=e.pop();for(g.type&&0===g.type.indexOf("variable")?(i&&i.additionalContext&&(d=i.additionalContext[g.string]),i&&!1===i.useGlobalScope||(d=d||c[g.string])):"string"==g.type?d="":"atom"==g.type?d=1:"function"==g.type&&(null==c.jQuery||"$"!=g.string&&"jQuery"!=g.string||"function"!=typeof c.jQuery?null!=c._&&"_"==g.string&&"function"==typeof c._&&(d=c._()):d=c.jQuery());null!=d&&e.length;)d=d[e.pop().string];null!=d&&u(d)}else{for(var y=t.state.localVars;y;y=y.next)p(y.name);for(var h=t.state.context;h;h=h.prev)for(y=h.vars;y;y=y.next)p(y.name);for(y=t.state.globalVars;y;y=y.next)p(y.name);if(i&&null!=i.additionalContext)for(var v in i.additionalContext)p(v);i&&!1===i.useGlobalScope||u(c),r(n,p)}return l}}));
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
.CodeMirror-hints {
|
|
||||||
position: absolute;
|
|
||||||
z-index: 10;
|
|
||||||
overflow: hidden;
|
|
||||||
list-style: none;
|
|
||||||
|
|
||||||
margin: 0;
|
|
||||||
padding: 2px;
|
|
||||||
|
|
||||||
-webkit-box-shadow: 2px 3px 5px rgba(0,0,0,.2);
|
|
||||||
-moz-box-shadow: 2px 3px 5px rgba(0,0,0,.2);
|
|
||||||
box-shadow: 2px 3px 5px rgba(0,0,0,.2);
|
|
||||||
border-radius: 3px;
|
|
||||||
border: 1px solid silver;
|
|
||||||
|
|
||||||
background: white;
|
|
||||||
font-size: 90%;
|
|
||||||
font-family: monospace;
|
|
||||||
|
|
||||||
max-height: 20em;
|
|
||||||
overflow-y: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.CodeMirror-hint {
|
|
||||||
margin: 0;
|
|
||||||
padding: 0 4px;
|
|
||||||
border-radius: 2px;
|
|
||||||
white-space: pre;
|
|
||||||
color: black;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
li.CodeMirror-hint-active {
|
|
||||||
background: #08f;
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
|||||||
!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror"),require("../../mode/sql/sql")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../../mode/sql/sql"],t):t(CodeMirror)}((function(t){"use strict";var e,r,n,o,i=t.Pos,s=t.cmpPos;function a(t){return"[object Array]"==Object.prototype.toString.call(t)}function u(t){return"string"==typeof t?t:t.text}function l(t,e){return a(e)&&(e={columns:e}),e.text||(e.text=t),e}function f(t){return e[t.toUpperCase()]}function c(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);return e}function p(t,e){var r=t.length,n=u(e).substr(0,r);return t.toUpperCase()===n.toUpperCase()}function d(t,e,r,n){if(a(r))for(var o=0;o<r.length;o++)p(e,r[o])&&t.push(n(r[o]));else for(var i in r)if(r.hasOwnProperty(i)){var s=r[i];p(e,s=s&&!0!==s?s.displayText?{text:s.text,displayText:s.displayText}:s.text:i)&&t.push(n(s))}}function g(t){"."==t.charAt(0)&&(t=t.substr(1));for(var e=t.split(o+o),r=0;r<e.length;r++)e[r]=e[r].replace(new RegExp(o,"g"),"");return e.join(o)}function h(t){for(var e=u(t).split("."),r=0;r<e.length;r++)e[r]=o+e[r].replace(new RegExp(o,"g"),o+o)+o;var n=e.join(".");return"string"==typeof t?n:((t=c(t)).text=n,t)}function v(t,e){for(var r=t.split(/\s+/),n=0;n<r.length;n++)r[n]&&e(r[n].replace(/[`,;]/g,""))}function x(t,e){for(var r=e.doc,n=r.getValue(),o=t.toUpperCase(),a="",u="",l=[],c={start:i(0,0),end:i(e.lastLine(),e.getLineHandle(e.lastLine()).length)},p=n.indexOf(";");-1!=p;)l.push(r.posFromIndex(p)),p=n.indexOf(";",p+1);l.unshift(i(0,0)),l.push(i(e.lastLine(),e.getLineHandle(e.lastLine()).text.length));for(var d=null,g=e.getCursor(),h=0;h<l.length;h++){if((null==d||s(g,d)>0)&&s(g,l[h])<=0){c={start:d,end:l[h]};break}d=l[h]}if(c.start){var x=r.getRange(c.start,c.end,!1);for(h=0;h<x.length&&(v(x[h],(function(t){var e=t.toUpperCase();e===o&&f(a)&&(u=a),"AS"!==e&&(a=t)})),!u);h++);}return u}t.registerHelper("hint","sql",(function(s,p){e=function(t){var e={};if(a(t))for(var r=t.length-1;r>=0;r--){var n=t[r];e[u(n).toUpperCase()]=l(u(n),n)}else if(t)for(var o in t)e[o.toUpperCase()]=l(o,t[o]);return e}(p&&p.tables);var v=p&&p.defaultTable,m=p&&p.disableKeywords;r=v&&f(v),n=function(e){var r=e.doc.modeOption;return"sql"===r&&(r="text/x-sql"),t.resolveMode(r).keywords}(s),o=function(e){var r=e.doc.modeOption;return"sql"===r&&(r="text/x-sql"),t.resolveMode(r).identifierQuote||"`"}(s),v&&!r&&(r=x(v,s)),(r=r||[]).columns&&(r=r.columns);var y,b,C,q=s.getCursor(),A=[],j=s.getTokenAt(q);if(j.end>q.ch&&(j.end=q.ch,j.string=j.string.slice(0,q.ch-j.start)),j.string.match(/^[.`"'\w@][\w$#]*$/g)?(C=j.string,y=j.start,b=j.end):(y=b=q.ch,C=""),"."==C.charAt(0)||C.charAt(0)==o)y=function(t,n,s,a){for(var u=!1,l=[],p=n.start,v=!0;v;)v="."==n.string.charAt(0),u=u||n.string.charAt(0)==o,p=n.start,l.unshift(g(n.string)),"."==(n=a.getTokenAt(i(t.line,n.start))).string&&(v=!0,n=a.getTokenAt(i(t.line,n.start)));var m=l.join(".");d(s,m,e,(function(t){return u?h(t):t})),d(s,m,r,(function(t){return u?h(t):t})),m=l.pop();var y=l.join("."),b=!1,C=y;if(!f(y)){var q=y;(y=x(y,a))!==q&&(b=!0)}var A=f(y);return A&&A.columns&&(A=A.columns),A&&d(s,m,A,(function(t){var e=y;return 1==b&&(e=C),"string"==typeof t?t=e+"."+t:(t=c(t)).text=e+"."+t.text,u?h(t):t})),p}(q,j,A,s);else{var w=function(t,e){return"object"==typeof t?t.className=e:t={text:t,className:e},t};d(A,C,r,(function(t){return w(t,"CodeMirror-hint-table CodeMirror-hint-default-table")})),d(A,C,e,(function(t){return w(t,"CodeMirror-hint-table")})),m||d(A,C,n,(function(t){return w(t.toUpperCase(),"CodeMirror-hint-keyword")}))}return{list:A,from:i(q.line,y),to:i(q.line,b)}}))}));
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}((function(t){"use strict";var e=t.Pos;function r(t,e,r){return r?t.indexOf(e)>=0:0==t.lastIndexOf(e,0)}t.registerHelper("hint","xml",(function(n,i){var s=i&&i.schemaInfo,a=i&&i.quoteChar||'"',o=i&&i.matchInMiddle;if(s){var l=n.getCursor(),f=n.getTokenAt(l);if(f.end>l.ch&&(f.end=l.ch,f.string=f.string.slice(0,l.ch-f.start)),(x=t.innerMode(n.getMode(),f.state)).mode.xmlCurrentTag){var g,c,h=[],u=!1,d=/\btag\b/.test(f.type)&&!/>$/.test(f.string),p=d&&/^\w/.test(f.string);if(p){var m=n.getLine(l.line).slice(Math.max(0,f.start-2),f.start),v=/<\/$/.test(m)?"close":/<$/.test(m)?"open":null;v&&(c=f.start-("close"==v?2:1))}else d&&"<"==f.string?v="open":d&&"</"==f.string&&(v="close");var y=x.mode.xmlCurrentTag(x.state);if(!d&&!y||v){p&&(g=f.string),u=v;var x,C=x.mode.xmlCurrentContext?x.mode.xmlCurrentContext(x.state):[],b=(x=C.length&&C[C.length-1])&&s[x],O=x?b&&b.children:s["!top"];if(O&&"close"!=v)for(var w=0;w<O.length;++w)g&&!r(O[w],g,o)||h.push("<"+O[w]);else if("close"!=v)for(var A in s)!s.hasOwnProperty(A)||"!top"==A||"!attrs"==A||g&&!r(A,g,o)||h.push("<"+A);x&&(!g||"close"==v&&r(x,g,o))&&h.push("</"+x+">")}else{var M=(b=y&&s[y.name])&&b.attrs,P=s["!attrs"];if(!M&&!P)return;if(M){if(P){var $={};for(var I in P)P.hasOwnProperty(I)&&($[I]=P[I]);for(var I in M)M.hasOwnProperty(I)&&($[I]=M[I]);M=$}}else M=P;if("string"==f.type||"="==f.string){var T,j=(m=n.getRange(e(l.line,Math.max(0,l.ch-60)),e(l.line,"string"==f.type?f.start:f.end))).match(/([^\s\u00a0=<>\"\']+)=$/);if(!j||!M.hasOwnProperty(j[1])||!(T=M[j[1]]))return;if("function"==typeof T&&(T=T.call(this,n)),"string"==f.type){g=f.string;var q=0;/['"]/.test(f.string.charAt(0))&&(a=f.string.charAt(0),g=f.string.slice(1),q++);var L=f.string.length;if(/['"]/.test(f.string.charAt(L-1))&&(a=f.string.charAt(L-1),g=f.string.substr(q,L-2)),q){var k=n.getLine(l.line);k.length>f.end&&k.charAt(f.end)==a&&f.end++}u=!0}var H=function(t){if(t)for(var e=0;e<t.length;++e)g&&!r(t[e],g,o)||h.push(a+t[e]+a);return z()};return T&&T.then?T.then(H):H(T)}for(var R in"attribute"==f.type&&(g=f.string,u=!0),M)!M.hasOwnProperty(R)||g&&!r(R,g,o)||h.push(R)}return z()}}function z(){return{list:h,from:u?e(l.line,null==c?f.start:c):l,to:u?e(l.line,f.end):l}}}))}));
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.registerHelper("lint","coffeescript",(function(o){var r,i,n=[];if(!window.coffeelint)return window.console&&window.console.error("Error: window.coffeelint not defined, CodeMirror CoffeeScript linting cannot run."),n;try{for(var t=coffeelint.lint(o),f=0;f<t.length;f++)r=t[f],void 0,i=r.lineNumber,n.push({from:e.Pos(i-1,0),to:e.Pos(i,0),severity:r.level,message:r.message})}catch(o){n.push({from:e.Pos(o.location.first_line,0),to:e.Pos(o.location.last_line,o.location.last_column),severity:"error",message:o.message})}return n}))}));
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.registerHelper("lint","css",(function(o,r){var n=[];if(!window.CSSLint)return window.console&&window.console.error("Error: window.CSSLint not defined, CodeMirror CSS linting cannot run."),n;for(var i=CSSLint.verify(o,r).messages,t=null,s=0;s<i.length;s++){var c=(t=i[s]).line-1,d=t.line-1,f=t.col-1,l=t.col;n.push({from:e.Pos(c,f),to:e.Pos(d,l),message:t.message,severity:t.type})}return n}))}));
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("htmlhint")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","htmlhint"],e):e(CodeMirror,window.HTMLHint)}((function(e,r){"use strict";var o={"tagname-lowercase":!0,"attr-lowercase":!0,"attr-value-double-quotes":!0,"doctype-first":!1,"tag-pair":!0,"spec-char-escape":!0,"id-unique":!0,"src-not-empty":!0,"attr-no-duplication":!0};e.registerHelper("lint","html",(function(t,i){var n=[];if(r&&!r.verify&&(r=void 0!==r.default?r.default:r.HTMLHint),r||(r=window.HTMLHint),!r)return window.console&&window.console.error("Error: HTMLHint not found, not defined on window, or not available through define/require, CodeMirror HTML linting cannot run."),n;for(var a=r.verify(t,i&&i.rules||o),l=0;l<a.length;l++){var d=a[l],u=d.line-1,c=d.line-1,s=d.col-1,f=d.col;n.push({from:e.Pos(u,s),to:e.Pos(c,f),message:d.message,severity:d.type})}return n}))}));
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.registerHelper("lint","javascript",(function(r,n){if(!window.JSHINT)return window.console&&window.console.error("Error: window.JSHINT not defined, CodeMirror JavaScript linting cannot run."),[];n.indent||(n.indent=1),JSHINT(r,n,n.globals);var o=JSHINT.data().errors,i=[];return o&&function(r,n){for(var o=0;o<r.length;o++){var i=r[o];if(i){if(i.line<=0){window.console&&window.console.warn("Cannot display JSHint error (invalid line "+i.line+")",i);continue}var t=i.character-1,a=t+1;if(i.evidence){var d=i.evidence.substring(t).search(/.\b/);d>-1&&(a+=d)}var c={message:i.reason,severity:i.code&&i.code.startsWith("W")?"warning":"error",from:e.Pos(i.line-1,t),to:e.Pos(i.line-1,a)};n.push(c)}}}(o,i),i}))}));
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
!function(o){"object"==typeof exports&&"object"==typeof module?o(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)}((function(o){"use strict";o.registerHelper("lint","json",(function(n){var r=[];if(!window.jsonlint)return window.console&&window.console.error("Error: window.jsonlint not defined, CodeMirror JSON linting cannot run."),r;var e=window.jsonlint.parser||window.jsonlint;e.parseError=function(n,e){var i=e.loc;r.push({from:o.Pos(i.first_line-1,i.first_column),to:o.Pos(i.last_line-1,i.last_column),message:n})};try{e.parse(n)}catch(o){}return r}))}));
|
|
||||||
@@ -1,79 +0,0 @@
|
|||||||
/* The lint marker gutter */
|
|
||||||
.CodeMirror-lint-markers {
|
|
||||||
width: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.CodeMirror-lint-tooltip {
|
|
||||||
background-color: #ffd;
|
|
||||||
border: 1px solid black;
|
|
||||||
border-radius: 4px 4px 4px 4px;
|
|
||||||
color: black;
|
|
||||||
font-family: monospace;
|
|
||||||
font-size: 10pt;
|
|
||||||
overflow: hidden;
|
|
||||||
padding: 2px 5px;
|
|
||||||
position: fixed;
|
|
||||||
white-space: pre;
|
|
||||||
white-space: pre-wrap;
|
|
||||||
z-index: 100;
|
|
||||||
max-width: 600px;
|
|
||||||
opacity: 0;
|
|
||||||
transition: opacity .4s;
|
|
||||||
-moz-transition: opacity .4s;
|
|
||||||
-webkit-transition: opacity .4s;
|
|
||||||
-o-transition: opacity .4s;
|
|
||||||
-ms-transition: opacity .4s;
|
|
||||||
}
|
|
||||||
|
|
||||||
.CodeMirror-lint-mark {
|
|
||||||
background-position: left bottom;
|
|
||||||
background-repeat: repeat-x;
|
|
||||||
}
|
|
||||||
|
|
||||||
.CodeMirror-lint-mark-warning {
|
|
||||||
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJFhQXEbhTg7YAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAMklEQVQI12NkgIIvJ3QXMjAwdDN+OaEbysDA4MPAwNDNwMCwiOHLCd1zX07o6kBVGQEAKBANtobskNMAAAAASUVORK5CYII=");
|
|
||||||
}
|
|
||||||
|
|
||||||
.CodeMirror-lint-mark-error {
|
|
||||||
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDw4cOCW1/KIAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAHElEQVQI12NggIL/DAz/GdA5/xkY/qPKMDAwAADLZwf5rvm+LQAAAABJRU5ErkJggg==");
|
|
||||||
}
|
|
||||||
|
|
||||||
.CodeMirror-lint-marker {
|
|
||||||
background-position: center center;
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
cursor: pointer;
|
|
||||||
display: inline-block;
|
|
||||||
height: 16px;
|
|
||||||
width: 16px;
|
|
||||||
vertical-align: middle;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
.CodeMirror-lint-message {
|
|
||||||
padding-left: 18px;
|
|
||||||
background-position: top left;
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
}
|
|
||||||
|
|
||||||
.CodeMirror-lint-marker-warning, .CodeMirror-lint-message-warning {
|
|
||||||
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAANlBMVEX/uwDvrwD/uwD/uwD/uwD/uwD/uwD/uwD/uwD6twD/uwAAAADurwD2tQD7uAD+ugAAAAD/uwDhmeTRAAAADHRSTlMJ8mN1EYcbmiixgACm7WbuAAAAVklEQVR42n3PUQqAIBBFUU1LLc3u/jdbOJoW1P08DA9Gba8+YWJ6gNJoNYIBzAA2chBth5kLmG9YUoG0NHAUwFXwO9LuBQL1giCQb8gC9Oro2vp5rncCIY8L8uEx5ZkAAAAASUVORK5CYII=");
|
|
||||||
}
|
|
||||||
|
|
||||||
.CodeMirror-lint-marker-error, .CodeMirror-lint-message-error {
|
|
||||||
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAHlBMVEW7AAC7AACxAAC7AAC7AAAAAAC4AAC5AAD///+7AAAUdclpAAAABnRSTlMXnORSiwCK0ZKSAAAATUlEQVR42mWPOQ7AQAgDuQLx/z8csYRmPRIFIwRGnosRrpamvkKi0FTIiMASR3hhKW+hAN6/tIWhu9PDWiTGNEkTtIOucA5Oyr9ckPgAWm0GPBog6v4AAAAASUVORK5CYII=");
|
|
||||||
}
|
|
||||||
|
|
||||||
.CodeMirror-lint-marker-multiple {
|
|
||||||
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAMAAADzjKfhAAAACVBMVEUAAAAAAAC/v7914kyHAAAAAXRSTlMAQObYZgAAACNJREFUeNo1ioEJAAAIwmz/H90iFFSGJgFMe3gaLZ0od+9/AQZ0ADosbYraAAAAAElFTkSuQmCC");
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
background-position: right bottom;
|
|
||||||
width: 100%; height: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.CodeMirror-lint-line-error {
|
|
||||||
background-color: rgba(183, 76, 81, 0.08);
|
|
||||||
}
|
|
||||||
|
|
||||||
.CodeMirror-lint-line-warning {
|
|
||||||
background-color: rgba(255, 211, 0, 0.1);
|
|
||||||
}
|
|
||||||
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
|||||||
!function(o){"object"==typeof exports&&"object"==typeof module?o(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)}((function(o){"use strict";o.registerHelper("lint","yaml",(function(e){var r=[];if(!window.jsyaml)return window.console&&window.console.error("Error: window.jsyaml not defined, CodeMirror YAML linting cannot run."),r;try{jsyaml.loadAll(e)}catch(e){var n=e.mark,i=n?o.Pos(n.line,n.column):o.Pos(0,0),t=i;r.push({from:i,to:t,message:e.message})}return r}))}));
|
|
||||||
@@ -1,119 +0,0 @@
|
|||||||
.CodeMirror-merge {
|
|
||||||
position: relative;
|
|
||||||
border: 1px solid #ddd;
|
|
||||||
white-space: pre;
|
|
||||||
}
|
|
||||||
|
|
||||||
.CodeMirror-merge, .CodeMirror-merge .CodeMirror {
|
|
||||||
height: 350px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.CodeMirror-merge-2pane .CodeMirror-merge-pane { width: 47%; }
|
|
||||||
.CodeMirror-merge-2pane .CodeMirror-merge-gap { width: 6%; }
|
|
||||||
.CodeMirror-merge-3pane .CodeMirror-merge-pane { width: 31%; }
|
|
||||||
.CodeMirror-merge-3pane .CodeMirror-merge-gap { width: 3.5%; }
|
|
||||||
|
|
||||||
.CodeMirror-merge-pane {
|
|
||||||
display: inline-block;
|
|
||||||
white-space: normal;
|
|
||||||
vertical-align: top;
|
|
||||||
}
|
|
||||||
.CodeMirror-merge-pane-rightmost {
|
|
||||||
position: absolute;
|
|
||||||
right: 0px;
|
|
||||||
z-index: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.CodeMirror-merge-gap {
|
|
||||||
z-index: 2;
|
|
||||||
display: inline-block;
|
|
||||||
height: 100%;
|
|
||||||
-moz-box-sizing: border-box;
|
|
||||||
box-sizing: border-box;
|
|
||||||
overflow: hidden;
|
|
||||||
border-left: 1px solid #ddd;
|
|
||||||
border-right: 1px solid #ddd;
|
|
||||||
position: relative;
|
|
||||||
background: #f8f8f8;
|
|
||||||
}
|
|
||||||
|
|
||||||
.CodeMirror-merge-scrolllock-wrap {
|
|
||||||
position: absolute;
|
|
||||||
bottom: 0; left: 50%;
|
|
||||||
}
|
|
||||||
.CodeMirror-merge-scrolllock {
|
|
||||||
position: relative;
|
|
||||||
left: -50%;
|
|
||||||
cursor: pointer;
|
|
||||||
color: #555;
|
|
||||||
line-height: 1;
|
|
||||||
}
|
|
||||||
.CodeMirror-merge-scrolllock:after {
|
|
||||||
content: "\21db\00a0\00a0\21da";
|
|
||||||
}
|
|
||||||
.CodeMirror-merge-scrolllock.CodeMirror-merge-scrolllock-enabled:after {
|
|
||||||
content: "\21db\21da";
|
|
||||||
}
|
|
||||||
|
|
||||||
.CodeMirror-merge-copybuttons-left, .CodeMirror-merge-copybuttons-right {
|
|
||||||
position: absolute;
|
|
||||||
left: 0; top: 0;
|
|
||||||
right: 0; bottom: 0;
|
|
||||||
line-height: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.CodeMirror-merge-copy {
|
|
||||||
position: absolute;
|
|
||||||
cursor: pointer;
|
|
||||||
color: #44c;
|
|
||||||
z-index: 3;
|
|
||||||
}
|
|
||||||
|
|
||||||
.CodeMirror-merge-copy-reverse {
|
|
||||||
position: absolute;
|
|
||||||
cursor: pointer;
|
|
||||||
color: #44c;
|
|
||||||
}
|
|
||||||
|
|
||||||
.CodeMirror-merge-copybuttons-left .CodeMirror-merge-copy { left: 2px; }
|
|
||||||
.CodeMirror-merge-copybuttons-right .CodeMirror-merge-copy { right: 2px; }
|
|
||||||
|
|
||||||
.CodeMirror-merge-r-inserted, .CodeMirror-merge-l-inserted {
|
|
||||||
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAACCAYAAACddGYaAAAAGUlEQVQI12MwuCXy3+CWyH8GBgYGJgYkAABZbAQ9ELXurwAAAABJRU5ErkJggg==);
|
|
||||||
background-position: bottom left;
|
|
||||||
background-repeat: repeat-x;
|
|
||||||
}
|
|
||||||
|
|
||||||
.CodeMirror-merge-r-deleted, .CodeMirror-merge-l-deleted {
|
|
||||||
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAACCAYAAACddGYaAAAAGUlEQVQI12M4Kyb2/6yY2H8GBgYGJgYkAABURgPz6Ks7wQAAAABJRU5ErkJggg==);
|
|
||||||
background-position: bottom left;
|
|
||||||
background-repeat: repeat-x;
|
|
||||||
}
|
|
||||||
|
|
||||||
.CodeMirror-merge-r-chunk { background: #ffffe0; }
|
|
||||||
.CodeMirror-merge-r-chunk-start { border-top: 1px solid #ee8; }
|
|
||||||
.CodeMirror-merge-r-chunk-end { border-bottom: 1px solid #ee8; }
|
|
||||||
.CodeMirror-merge-r-connect { fill: #ffffe0; stroke: #ee8; stroke-width: 1px; }
|
|
||||||
|
|
||||||
.CodeMirror-merge-l-chunk { background: #eef; }
|
|
||||||
.CodeMirror-merge-l-chunk-start { border-top: 1px solid #88e; }
|
|
||||||
.CodeMirror-merge-l-chunk-end { border-bottom: 1px solid #88e; }
|
|
||||||
.CodeMirror-merge-l-connect { fill: #eef; stroke: #88e; stroke-width: 1px; }
|
|
||||||
|
|
||||||
.CodeMirror-merge-l-chunk.CodeMirror-merge-r-chunk { background: #dfd; }
|
|
||||||
.CodeMirror-merge-l-chunk-start.CodeMirror-merge-r-chunk-start { border-top: 1px solid #4e4; }
|
|
||||||
.CodeMirror-merge-l-chunk-end.CodeMirror-merge-r-chunk-end { border-bottom: 1px solid #4e4; }
|
|
||||||
|
|
||||||
.CodeMirror-merge-collapsed-widget:before {
|
|
||||||
content: "(...)";
|
|
||||||
}
|
|
||||||
.CodeMirror-merge-collapsed-widget {
|
|
||||||
cursor: pointer;
|
|
||||||
color: #88b;
|
|
||||||
background: #eef;
|
|
||||||
border: 1px solid #ddf;
|
|
||||||
font-size: 90%;
|
|
||||||
padding: 0 3px;
|
|
||||||
border-radius: 4px;
|
|
||||||
}
|
|
||||||
.CodeMirror-merge-collapsed-line .CodeMirror-gutter-elt { display: none; }
|
|
||||||
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user