mirror of
https://github.com/nejimakibird/model-weave.git
synced 2026-07-22 06:51:24 +00:00
checkpoint before diagram rendering
This commit is contained in:
commit
c038489837
975 changed files with 655922 additions and 0 deletions
24
esbuild.config.mjs
Normal file
24
esbuild.config.mjs
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
import builtins from "builtin-modules";
|
||||
import esbuild from "esbuild";
|
||||
import process from "node:process";
|
||||
|
||||
const production = process.argv.includes("production");
|
||||
|
||||
const context = await esbuild.context({
|
||||
bundle: true,
|
||||
entryPoints: ["src/main.ts"],
|
||||
external: ["obsidian", "electron", "@codemirror/autocomplete", "@codemirror/collab", "@codemirror/commands", "@codemirror/language", "@codemirror/lint", "@codemirror/search", "@codemirror/state", "@codemirror/view", ...builtins],
|
||||
format: "cjs",
|
||||
logLevel: "info",
|
||||
outfile: "main.js",
|
||||
platform: "browser",
|
||||
sourcemap: production ? false : "inline",
|
||||
target: "es2020"
|
||||
});
|
||||
|
||||
if (production) {
|
||||
await context.rebuild();
|
||||
await context.dispose();
|
||||
} else {
|
||||
await context.watch();
|
||||
}
|
||||
10
manifest.json
Normal file
10
manifest.json
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"id": "modeling-tool-obsidian",
|
||||
"name": "Modeling Tool",
|
||||
"version": "0.1.0",
|
||||
"minAppVersion": "1.5.0",
|
||||
"description": "Foundation plugin for MDSpec v0.2-based modeling files.",
|
||||
"author": "",
|
||||
"authorUrl": "",
|
||||
"isDesktopOnly": false
|
||||
}
|
||||
16
node_modules/.bin/esbuild
generated
vendored
Normal file
16
node_modules/.bin/esbuild
generated
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*)
|
||||
if command -v cygpath > /dev/null 2>&1; then
|
||||
basedir=`cygpath -w "$basedir"`
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../esbuild/bin/esbuild" "$@"
|
||||
else
|
||||
exec node "$basedir/../esbuild/bin/esbuild" "$@"
|
||||
fi
|
||||
17
node_modules/.bin/esbuild.cmd
generated
vendored
Normal file
17
node_modules/.bin/esbuild.cmd
generated
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\esbuild\bin\esbuild" %*
|
||||
28
node_modules/.bin/esbuild.ps1
generated
vendored
Normal file
28
node_modules/.bin/esbuild.ps1
generated
vendored
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../esbuild/bin/esbuild" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../esbuild/bin/esbuild" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../esbuild/bin/esbuild" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../esbuild/bin/esbuild" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
||||
16
node_modules/.bin/tsc
generated
vendored
Normal file
16
node_modules/.bin/tsc
generated
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*)
|
||||
if command -v cygpath > /dev/null 2>&1; then
|
||||
basedir=`cygpath -w "$basedir"`
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../typescript/bin/tsc" "$@"
|
||||
else
|
||||
exec node "$basedir/../typescript/bin/tsc" "$@"
|
||||
fi
|
||||
17
node_modules/.bin/tsc.cmd
generated
vendored
Normal file
17
node_modules/.bin/tsc.cmd
generated
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\typescript\bin\tsc" %*
|
||||
28
node_modules/.bin/tsc.ps1
generated
vendored
Normal file
28
node_modules/.bin/tsc.ps1
generated
vendored
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../typescript/bin/tsc" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../typescript/bin/tsc" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../typescript/bin/tsc" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../typescript/bin/tsc" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
||||
16
node_modules/.bin/tsserver
generated
vendored
Normal file
16
node_modules/.bin/tsserver
generated
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*)
|
||||
if command -v cygpath > /dev/null 2>&1; then
|
||||
basedir=`cygpath -w "$basedir"`
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../typescript/bin/tsserver" "$@"
|
||||
else
|
||||
exec node "$basedir/../typescript/bin/tsserver" "$@"
|
||||
fi
|
||||
17
node_modules/.bin/tsserver.cmd
generated
vendored
Normal file
17
node_modules/.bin/tsserver.cmd
generated
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\typescript\bin\tsserver" %*
|
||||
28
node_modules/.bin/tsserver.ps1
generated
vendored
Normal file
28
node_modules/.bin/tsserver.ps1
generated
vendored
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../typescript/bin/tsserver" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../typescript/bin/tsserver" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../typescript/bin/tsserver" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../typescript/bin/tsserver" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
||||
227
node_modules/.package-lock.json
generated
vendored
Normal file
227
node_modules/.package-lock.json
generated
vendored
Normal file
|
|
@ -0,0 +1,227 @@
|
|||
{
|
||||
"name": "modeling-tool-obsidian",
|
||||
"version": "0.1.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"node_modules/@codemirror/state": {
|
||||
"version": "6.5.0",
|
||||
"resolved": "https://registry.npmjs.org/@codemirror/state/-/state-6.5.0.tgz",
|
||||
"integrity": "sha512-MwBHVK60IiIHDcoMet78lxt6iw5gJOGSbNbOIVBHWVXIH4/Nq1+GQgLLGgI1KlnN86WDXsPudVaqYHKBIx7Eyw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@marijn/find-cluster-break": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@codemirror/view": {
|
||||
"version": "6.38.6",
|
||||
"resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.38.6.tgz",
|
||||
"integrity": "sha512-qiS0z1bKs5WOvHIAC0Cybmv4AJSkAXgX5aD6Mqd2epSLlVJsQl8NG23jCVouIgkh4All/mrbdsf2UOLFnJw0tw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@codemirror/state": "^6.5.0",
|
||||
"crelt": "^1.0.6",
|
||||
"style-mod": "^4.1.0",
|
||||
"w3c-keyname": "^2.2.4"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/win32-x64": {
|
||||
"version": "0.25.12",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.12.tgz",
|
||||
"integrity": "sha512-alJC0uCZpTFrSL0CCDjcgleBXPnCrEAhTBILpeAp7M/OFgoqtAetfBzX0xM00MUsVVPpVjlPuMbREqnZCXaTnA==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"win32"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
}
|
||||
},
|
||||
"node_modules/@marijn/find-cluster-break": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@marijn/find-cluster-break/-/find-cluster-break-1.0.2.tgz",
|
||||
"integrity": "sha512-l0h88YhZFyKdXIFNfSWpyjStDjGHwZ/U7iobcK1cQQD8sejsONdQtTVU+1wVN1PBw40PiiHB1vA5S7VTfQiP9g==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/@types/codemirror": {
|
||||
"version": "5.60.8",
|
||||
"resolved": "https://registry.npmjs.org/@types/codemirror/-/codemirror-5.60.8.tgz",
|
||||
"integrity": "sha512-VjFgDF/eB+Aklcy15TtOTLQeMjTo07k7KAjql8OK5Dirr7a6sJY4T1uVBDuTVG9VEmn1uUsohOpYnVfgC6/jyw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/tern": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/estree": {
|
||||
"version": "1.0.8",
|
||||
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz",
|
||||
"integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "20.19.39",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.39.tgz",
|
||||
"integrity": "sha512-orrrD74MBUyK8jOAD/r0+lfa1I2MO6I+vAkmAWzMYbCcgrN4lCrmK52gRFQq/JRxfYPfonkr4b0jcY7Olqdqbw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"undici-types": "~6.21.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/tern": {
|
||||
"version": "0.23.9",
|
||||
"resolved": "https://registry.npmjs.org/@types/tern/-/tern-0.23.9.tgz",
|
||||
"integrity": "sha512-ypzHFE/wBzh+BlH6rrBgS5I/Z7RD21pGhZ2rltb/+ZrVM1awdZwjx7hE5XfuYgHWk9uvV5HLZN3SloevCAp3Bw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/estree": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/builtin-modules": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-4.0.0.tgz",
|
||||
"integrity": "sha512-p1n8zyCkt1BVrKNFymOHjcDSAl7oq/gUvfgULv2EblgpPVQlQr9yHnWjg9IJ2MhfwPqiYqMMrr01OY7yQoK2yA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=18.20"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/crelt": {
|
||||
"version": "1.0.6",
|
||||
"resolved": "https://registry.npmjs.org/crelt/-/crelt-1.0.6.tgz",
|
||||
"integrity": "sha512-VQ2MBenTq1fWZUH9DJNGti7kKv6EeAuYr3cLwxUWhIu1baTaXh4Ib5W2CqHVqib4/MqbYGJqiL3Zb8GJZr3l4g==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/esbuild": {
|
||||
"version": "0.25.12",
|
||||
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.12.tgz",
|
||||
"integrity": "sha512-bbPBYYrtZbkt6Os6FiTLCTFxvq4tt3JKall1vRwshA3fdVztsLAatFaZobhkBC8/BrPetoa0oksYoKXoG4ryJg==",
|
||||
"dev": true,
|
||||
"hasInstallScript": true,
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"esbuild": "bin/esbuild"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@esbuild/aix-ppc64": "0.25.12",
|
||||
"@esbuild/android-arm": "0.25.12",
|
||||
"@esbuild/android-arm64": "0.25.12",
|
||||
"@esbuild/android-x64": "0.25.12",
|
||||
"@esbuild/darwin-arm64": "0.25.12",
|
||||
"@esbuild/darwin-x64": "0.25.12",
|
||||
"@esbuild/freebsd-arm64": "0.25.12",
|
||||
"@esbuild/freebsd-x64": "0.25.12",
|
||||
"@esbuild/linux-arm": "0.25.12",
|
||||
"@esbuild/linux-arm64": "0.25.12",
|
||||
"@esbuild/linux-ia32": "0.25.12",
|
||||
"@esbuild/linux-loong64": "0.25.12",
|
||||
"@esbuild/linux-mips64el": "0.25.12",
|
||||
"@esbuild/linux-ppc64": "0.25.12",
|
||||
"@esbuild/linux-riscv64": "0.25.12",
|
||||
"@esbuild/linux-s390x": "0.25.12",
|
||||
"@esbuild/linux-x64": "0.25.12",
|
||||
"@esbuild/netbsd-arm64": "0.25.12",
|
||||
"@esbuild/netbsd-x64": "0.25.12",
|
||||
"@esbuild/openbsd-arm64": "0.25.12",
|
||||
"@esbuild/openbsd-x64": "0.25.12",
|
||||
"@esbuild/openharmony-arm64": "0.25.12",
|
||||
"@esbuild/sunos-x64": "0.25.12",
|
||||
"@esbuild/win32-arm64": "0.25.12",
|
||||
"@esbuild/win32-ia32": "0.25.12",
|
||||
"@esbuild/win32-x64": "0.25.12"
|
||||
}
|
||||
},
|
||||
"node_modules/moment": {
|
||||
"version": "2.29.4",
|
||||
"resolved": "https://registry.npmjs.org/moment/-/moment-2.29.4.tgz",
|
||||
"integrity": "sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/obsidian": {
|
||||
"version": "1.12.3",
|
||||
"resolved": "https://registry.npmjs.org/obsidian/-/obsidian-1.12.3.tgz",
|
||||
"integrity": "sha512-HxWqe763dOqzXjnNiHmAJTRERN8KILBSqxDSEqbeSr7W8R8Jxezzbca+nz1LiiqXnMpM8lV2jzAezw3CZ4xNUw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/codemirror": "5.60.8",
|
||||
"moment": "2.29.4"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@codemirror/state": "6.5.0",
|
||||
"@codemirror/view": "6.38.6"
|
||||
}
|
||||
},
|
||||
"node_modules/style-mod": {
|
||||
"version": "4.1.3",
|
||||
"resolved": "https://registry.npmjs.org/style-mod/-/style-mod-4.1.3.tgz",
|
||||
"integrity": "sha512-i/n8VsZydrugj3Iuzll8+x/00GH2vnYsk1eomD8QiRrSAeW6ItbCQDtfXCeJHd0iwiNagqjQkvpvREEPtW3IoQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/tslib": {
|
||||
"version": "2.8.1",
|
||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
|
||||
"integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",
|
||||
"dev": true,
|
||||
"license": "0BSD"
|
||||
},
|
||||
"node_modules/typescript": {
|
||||
"version": "5.9.3",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz",
|
||||
"integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"bin": {
|
||||
"tsc": "bin/tsc",
|
||||
"tsserver": "bin/tsserver"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.17"
|
||||
}
|
||||
},
|
||||
"node_modules/undici-types": {
|
||||
"version": "6.21.0",
|
||||
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz",
|
||||
"integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/w3c-keyname": {
|
||||
"version": "2.2.8",
|
||||
"resolved": "https://registry.npmjs.org/w3c-keyname/-/w3c-keyname-2.2.8.tgz",
|
||||
"integrity": "sha512-dpojBhNsCNN7T82Tm7k26A6G9ML3NkhDsnw9n/eoxSRlVBB4CEtIQ/KTCLI2Fwf3ataSXRhYFkQi3SlnFwPvPQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true
|
||||
}
|
||||
}
|
||||
}
|
||||
16
node_modules/@codemirror/state/.github/workflows/dispatch.yml
generated
vendored
Normal file
16
node_modules/@codemirror/state/.github/workflows/dispatch.yml
generated
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
name: Trigger CI
|
||||
on: push
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Dispatch to main repo
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Emit repository_dispatch
|
||||
uses: mvasigh/dispatch-action@main
|
||||
with:
|
||||
# You should create a personal access token and store it in your repository
|
||||
token: ${{ secrets.DISPATCH_AUTH }}
|
||||
repo: dev
|
||||
owner: codemirror
|
||||
event_type: push
|
||||
274
node_modules/@codemirror/state/CHANGELOG.md
generated
vendored
Normal file
274
node_modules/@codemirror/state/CHANGELOG.md
generated
vendored
Normal file
|
|
@ -0,0 +1,274 @@
|
|||
## 6.5.0 (2024-12-09)
|
||||
|
||||
### New features
|
||||
|
||||
`RangeSet.compare` now supports a `boundChange` callback that is called when there's a change in the way ranges are split.
|
||||
|
||||
## 6.4.1 (2024-02-19)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
Fix an issue that caused widgets at the end of a mark decoration to be rendered in their own separate mark DOM element.
|
||||
|
||||
## 6.4.0 (2023-12-28)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
When multiple ranges in a single range set overlap, put the smaller ones inside the bigger ones, so that overlapping decorations don't break up each other's elements when coming from the same source.
|
||||
|
||||
### New features
|
||||
|
||||
Selection and selection range `eq` methods now support an optional argument that makes them also compare by cursor associativity.
|
||||
|
||||
The `RangeSet.join` function can be used to join multiple range sets together.
|
||||
|
||||
## 6.3.3 (2023-12-06)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
Fix an issue where `Text.slice` and `Text.replace` could return objects with incorrect `length` when the given `from`/`to` values were out of range for the text.
|
||||
|
||||
## 6.3.2 (2023-11-27)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
Make sure transactions cannot add multiple selections when `allowMultipleSelections` is false.
|
||||
|
||||
Fix a bug that caused `Text.iterLines` to not return empty lines at the end of the iterated ranges.
|
||||
|
||||
## 6.3.1 (2023-10-18)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
Give the tag property on `FacetReader` the type of the output type parameter to force TypeScript to infer the proper type when converting from `Facet` to `FacetReader`.
|
||||
|
||||
## 6.3.0 (2023-10-12)
|
||||
|
||||
### New features
|
||||
|
||||
The new `FacetReader` type provides a way to export a read-only handle to a `Facet`.
|
||||
|
||||
## 6.2.1 (2023-05-23)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
Fix an issue that could cause `RangeSet.compare` to miss changes in the set of active ranges around a point range.
|
||||
|
||||
## 6.2.0 (2022-12-26)
|
||||
|
||||
### New features
|
||||
|
||||
`EditorSelection.range` now accepts an optional 4th argument to specify the bidi level of the range's head position.
|
||||
|
||||
## 6.1.4 (2022-11-15)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
Fix a bug that caused the `openStart` value passed to span iterators to be incorrect around widgets in some circumstances.
|
||||
|
||||
## 6.1.3 (2022-11-10)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
Avoid unnecessary calls to computed facet getters when a state is reconfigured but no dependencies of the computed facet change.
|
||||
|
||||
Fix an infinite loop in `RangeSet.eq` when the `to` parameter isn't given.
|
||||
|
||||
## 6.1.2 (2022-09-21)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
Fix an issue where, when multiple transaction extenders took effect, only the highest-precedence one was actually included in the transaction.
|
||||
|
||||
## 6.1.1 (2022-08-03)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
Fix a bug in range set span iteration that would cause decorations to be inappropriately split in some situations.
|
||||
|
||||
## 6.1.0 (2022-06-30)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
Refine change mapping to preserve insertions made by concurrent changes.
|
||||
|
||||
### New features
|
||||
|
||||
The `enables` option to `Facet.define` may now take a function, which will be called with the facet value to create the extensions.
|
||||
|
||||
## 6.0.1 (2022-06-17)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
Fix a problem that caused effects' `map` methods to be called with an incorrect change set when filtering changes.
|
||||
|
||||
## 6.0.0 (2022-06-08)
|
||||
|
||||
### Breaking changes
|
||||
|
||||
Update dependencies to 6.0.0
|
||||
|
||||
## 0.20.1 (2022-06-02)
|
||||
|
||||
### New features
|
||||
|
||||
`EditorView.phrase` now accepts additional arguments, which it will interpolate into the phrase in the place of `$` markers.
|
||||
|
||||
## 0.20.0 (2022-04-20)
|
||||
|
||||
### Breaking changes
|
||||
|
||||
The deprecated precedence names `fallback`, `extend`, and `override` were removed from the library.
|
||||
|
||||
### Bug fixes
|
||||
|
||||
Fix a bug where, if an extension value occurs multiple times, its lowest, rather than highest precedence is used.
|
||||
|
||||
Fix an issue where facets with computed inputs would unneccesarily have their outputs recreated on state reconfiguration.
|
||||
|
||||
Fix a bug in the order in which new values for state fields and facets were computed, which could cause dynamic facets to hold the wrong value in some situations.
|
||||
|
||||
### New features
|
||||
|
||||
The exports from @codemirror/rangeset now live in this package.
|
||||
|
||||
The exports from @codemirror/text now live in this package.
|
||||
|
||||
## 0.19.9 (2022-02-16)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
Mapping a non-empty selection range now always puts any newly inserted text on the sides of the range outside of the mapped version.
|
||||
|
||||
## 0.19.8 (2022-02-15)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
Fix a bug where facet values with computed inputs could incorrectly retain their old value on reconfiguration.
|
||||
|
||||
## 0.19.7 (2022-02-11)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
Avoid recomputing facets on state reconfiguration if that facet's inputs stayed precisely the same.
|
||||
|
||||
Selection ranges created with `EditorSelection.range` will now have an assoc pointing at their anchor, when non-empty.
|
||||
|
||||
## 0.19.6 (2021-11-19)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
Fix a bug that caused facet compare functions to be called with an invalid value in some situations.
|
||||
|
||||
Fix a bug that caused dynamic facet values to be incorrectly kept unchanged when reconfiguration changed one of their dependencies.
|
||||
|
||||
## 0.19.5 (2021-11-10)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
Fix a bug that would cause dynamic facet values influenced by a state reconfiguration to not properly recompute.
|
||||
|
||||
## 0.19.4 (2021-11-05)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
When reconfiguring a state, effects from the reconfiguring transaction can now be seen by newly added state fields.
|
||||
|
||||
## 0.19.3 (2021-11-03)
|
||||
|
||||
### New features
|
||||
|
||||
The precedence levels (under `Prec`) now have more generic names, because their 'meaningful' names were entirely inappropriate in many situations.
|
||||
|
||||
## 0.19.2 (2021-09-13)
|
||||
|
||||
### New features
|
||||
|
||||
The editor state now has a `readOnly` property with a matching facet to control its value.
|
||||
|
||||
## 0.19.1 (2021-08-15)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
Fix a bug where `wordAt` never returned a useful result.
|
||||
|
||||
## 0.19.0 (2021-08-11)
|
||||
|
||||
### Breaking changes
|
||||
|
||||
User event strings now work differently—the events emitted by the core packages follow a different system, and hierarchical event tags can be created by separating the words with dots.
|
||||
|
||||
### New features
|
||||
|
||||
`languageDataAt` now takes an optional `side` argument to specificy which side of the position you're interested in.
|
||||
|
||||
It is now possible to add a user event annotation with a direct `userEvent` property on a transaction spec.
|
||||
|
||||
Transactions now have an `isUserEvent` method that can be used to check if it is (a subtype of) some user event type.
|
||||
|
||||
## 0.18.7 (2021-05-04)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
Fix an issue where state fields might be initialized with a state that they aren't actually part of during reconfiguration.
|
||||
|
||||
## 0.18.6 (2021-04-12)
|
||||
|
||||
### New features
|
||||
|
||||
The new `EditorState.wordAt` method finds the word at a given position.
|
||||
|
||||
## 0.18.5 (2021-04-08)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
Fix an issue in the compiled output that would break the code when minified with terser.
|
||||
|
||||
## 0.18.4 (2021-04-06)
|
||||
|
||||
### New features
|
||||
|
||||
The new `Transaction.remote` annotation can be used to mark and recognize transactions created by other actors.
|
||||
|
||||
## 0.18.3 (2021-03-23)
|
||||
|
||||
### New features
|
||||
|
||||
The `ChangeDesc` class now has `toJSON` and `fromJSON` methods.
|
||||
|
||||
## 0.18.2 (2021-03-14)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
Fix unintended ES2020 output (the package contains ES6 code again).
|
||||
|
||||
## 0.18.1 (2021-03-10)
|
||||
|
||||
### New features
|
||||
|
||||
The new `Compartment.get` method can be used to get the content of a compartment in a given state.
|
||||
|
||||
## 0.18.0 (2021-03-03)
|
||||
|
||||
### Breaking changes
|
||||
|
||||
`tagExtension` and the `reconfigure` transaction spec property have been replaced with the concept of configuration compartments and reconfiguration effects (see `Compartment`, `StateEffect.reconfigure`, and `StateEffect.appendConfig`).
|
||||
|
||||
## 0.17.2 (2021-02-19)
|
||||
|
||||
### New features
|
||||
|
||||
`EditorSelection.map` and `SelectionRange.map` now take an optional second argument to indicate which direction to map to.
|
||||
|
||||
## 0.17.1 (2021-01-06)
|
||||
|
||||
### New features
|
||||
|
||||
The package now also exports a CommonJS module.
|
||||
|
||||
## 0.17.0 (2020-12-29)
|
||||
|
||||
### Breaking changes
|
||||
|
||||
First numbered release.
|
||||
|
||||
21
node_modules/@codemirror/state/LICENSE
generated
vendored
Normal file
21
node_modules/@codemirror/state/LICENSE
generated
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (C) 2018-2021 by Marijn Haverbeke <marijn@haverbeke.berlin> and others
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
18
node_modules/@codemirror/state/README.md
generated
vendored
Normal file
18
node_modules/@codemirror/state/README.md
generated
vendored
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
# @codemirror/state [](https://www.npmjs.org/package/@codemirror/state)
|
||||
|
||||
[ [**WEBSITE**](https://codemirror.net/) | [**DOCS**](https://codemirror.net/docs/ref/#state) | [**ISSUES**](https://github.com/codemirror/dev/issues) | [**FORUM**](https://discuss.codemirror.net/c/next/) | [**CHANGELOG**](https://github.com/codemirror/state/blob/main/CHANGELOG.md) ]
|
||||
|
||||
This package implements the editor state data structures for the
|
||||
[CodeMirror](https://codemirror.net/) code editor.
|
||||
|
||||
The [project page](https://codemirror.net/) has more information, a
|
||||
number of [examples](https://codemirror.net/examples/) and the
|
||||
[documentation](https://codemirror.net/docs/).
|
||||
|
||||
This code is released under an
|
||||
[MIT license](https://github.com/codemirror/state/tree/main/LICENSE).
|
||||
|
||||
We aim to be an inclusive, welcoming community. To make that explicit,
|
||||
we have a [code of
|
||||
conduct](http://contributor-covenant.org/version/1/1/0/) that applies
|
||||
to communication around the project.
|
||||
3906
node_modules/@codemirror/state/dist/index.cjs
generated
vendored
Normal file
3906
node_modules/@codemirror/state/dist/index.cjs
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
1700
node_modules/@codemirror/state/dist/index.d.cts
generated
vendored
Normal file
1700
node_modules/@codemirror/state/dist/index.d.cts
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
1700
node_modules/@codemirror/state/dist/index.d.ts
generated
vendored
Normal file
1700
node_modules/@codemirror/state/dist/index.d.ts
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
3876
node_modules/@codemirror/state/dist/index.js
generated
vendored
Normal file
3876
node_modules/@codemirror/state/dist/index.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
38
node_modules/@codemirror/state/package.json
generated
vendored
Normal file
38
node_modules/@codemirror/state/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
{
|
||||
"name": "@codemirror/state",
|
||||
"version": "6.5.0",
|
||||
"description": "Editor state data structures for the CodeMirror code editor",
|
||||
"scripts": {
|
||||
"test": "cm-runtests",
|
||||
"prepare": "cm-buildhelper src/index.ts"
|
||||
},
|
||||
"keywords": [
|
||||
"editor",
|
||||
"code"
|
||||
],
|
||||
"author": {
|
||||
"name": "Marijn Haverbeke",
|
||||
"email": "marijn@haverbeke.berlin",
|
||||
"url": "http://marijnhaverbeke.nl"
|
||||
},
|
||||
"type": "module",
|
||||
"main": "dist/index.cjs",
|
||||
"exports": {
|
||||
"import": "./dist/index.js",
|
||||
"require": "./dist/index.cjs"
|
||||
},
|
||||
"types": "dist/index.d.ts",
|
||||
"module": "dist/index.js",
|
||||
"sideEffects": false,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@marijn/find-cluster-break": "^1.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@codemirror/buildhelper": "^1.0.0"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/codemirror/state.git"
|
||||
}
|
||||
}
|
||||
16
node_modules/@codemirror/view/.github/workflows/dispatch.yml
generated
vendored
Normal file
16
node_modules/@codemirror/view/.github/workflows/dispatch.yml
generated
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
name: Trigger CI
|
||||
on: push
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Dispatch to main repo
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Emit repository_dispatch
|
||||
uses: mvasigh/dispatch-action@main
|
||||
with:
|
||||
# You should create a personal access token and store it in your repository
|
||||
token: ${{ secrets.DISPATCH_AUTH }}
|
||||
repo: dev
|
||||
owner: codemirror
|
||||
event_type: push
|
||||
2084
node_modules/@codemirror/view/CHANGELOG.md
generated
vendored
Normal file
2084
node_modules/@codemirror/view/CHANGELOG.md
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
21
node_modules/@codemirror/view/LICENSE
generated
vendored
Normal file
21
node_modules/@codemirror/view/LICENSE
generated
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (C) 2018-2021 by Marijn Haverbeke <marijn@haverbeke.berlin> and others
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
37
node_modules/@codemirror/view/README.md
generated
vendored
Normal file
37
node_modules/@codemirror/view/README.md
generated
vendored
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
# @codemirror/view [](https://www.npmjs.org/package/@codemirror/view)
|
||||
|
||||
[ [**WEBSITE**](https://codemirror.net/) | [**DOCS**](https://codemirror.net/docs/ref/#view) | [**ISSUES**](https://github.com/codemirror/dev/issues) | [**FORUM**](https://discuss.codemirror.net/c/next/) | [**CHANGELOG**](https://github.com/codemirror/view/blob/main/CHANGELOG.md) ]
|
||||
|
||||
This package implements the DOM view component for the
|
||||
[CodeMirror](https://codemirror.net/) code editor.
|
||||
|
||||
The [project page](https://codemirror.net/) has more information, a
|
||||
number of [examples](https://codemirror.net/examples/) and the
|
||||
[documentation](https://codemirror.net/docs/).
|
||||
|
||||
This code is released under an
|
||||
[MIT license](https://github.com/codemirror/view/tree/main/LICENSE).
|
||||
|
||||
We aim to be an inclusive, welcoming community. To make that explicit,
|
||||
we have a [code of
|
||||
conduct](http://contributor-covenant.org/version/1/1/0/) that applies
|
||||
to communication around the project.
|
||||
|
||||
## Usage
|
||||
|
||||
```javascript
|
||||
import {EditorView} from "@codemirror/view"
|
||||
import {basicSetup} from "codemirror"
|
||||
|
||||
const view = new EditorView({
|
||||
parent: document.querySelector("#some-node"),
|
||||
doc: "Content text",
|
||||
extensions: [basicSetup /* ... */]
|
||||
})
|
||||
```
|
||||
|
||||
Add additional extensions, such as a [language
|
||||
mode](https://codemirror.net/#languages), to configure the editor.
|
||||
Call
|
||||
[`view.dispatch`](https://codemirror.net/docs/ref/#view.EditorView.dispatch)
|
||||
to update the editor's state.
|
||||
11496
node_modules/@codemirror/view/dist/index.cjs
generated
vendored
Normal file
11496
node_modules/@codemirror/view/dist/index.cjs
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
2306
node_modules/@codemirror/view/dist/index.d.cts
generated
vendored
Normal file
2306
node_modules/@codemirror/view/dist/index.d.cts
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
2306
node_modules/@codemirror/view/dist/index.d.ts
generated
vendored
Normal file
2306
node_modules/@codemirror/view/dist/index.d.ts
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
11446
node_modules/@codemirror/view/dist/index.js
generated
vendored
Normal file
11446
node_modules/@codemirror/view/dist/index.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
41
node_modules/@codemirror/view/package.json
generated
vendored
Normal file
41
node_modules/@codemirror/view/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
"name": "@codemirror/view",
|
||||
"version": "6.38.6",
|
||||
"description": "DOM view component for the CodeMirror code editor",
|
||||
"scripts": {
|
||||
"test": "cm-runtests",
|
||||
"prepare": "cm-buildhelper src/index.ts"
|
||||
},
|
||||
"keywords": [
|
||||
"editor",
|
||||
"code"
|
||||
],
|
||||
"author": {
|
||||
"name": "Marijn Haverbeke",
|
||||
"email": "marijn@haverbeke.berlin",
|
||||
"url": "http://marijnhaverbeke.nl"
|
||||
},
|
||||
"type": "module",
|
||||
"main": "dist/index.cjs",
|
||||
"exports": {
|
||||
"import": "./dist/index.js",
|
||||
"require": "./dist/index.cjs"
|
||||
},
|
||||
"types": "dist/index.d.ts",
|
||||
"module": "dist/index.js",
|
||||
"sideEffects": false,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@codemirror/state": "^6.5.0",
|
||||
"crelt": "^1.0.6",
|
||||
"style-mod": "^4.1.0",
|
||||
"w3c-keyname": "^2.2.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@codemirror/buildhelper": "^1.0.0"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/codemirror/view.git"
|
||||
}
|
||||
}
|
||||
3
node_modules/@esbuild/win32-x64/README.md
generated
vendored
Normal file
3
node_modules/@esbuild/win32-x64/README.md
generated
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
# esbuild
|
||||
|
||||
This is the Windows 64-bit binary for esbuild, a JavaScript bundler and minifier. See https://github.com/evanw/esbuild for details.
|
||||
BIN
node_modules/@esbuild/win32-x64/esbuild.exe
generated
vendored
Normal file
BIN
node_modules/@esbuild/win32-x64/esbuild.exe
generated
vendored
Normal file
Binary file not shown.
20
node_modules/@esbuild/win32-x64/package.json
generated
vendored
Normal file
20
node_modules/@esbuild/win32-x64/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"name": "@esbuild/win32-x64",
|
||||
"version": "0.25.12",
|
||||
"description": "The Windows 64-bit binary for esbuild, a JavaScript bundler.",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/evanw/esbuild.git"
|
||||
},
|
||||
"license": "MIT",
|
||||
"preferUnplugged": true,
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
"os": [
|
||||
"win32"
|
||||
],
|
||||
"cpu": [
|
||||
"x64"
|
||||
]
|
||||
}
|
||||
21
node_modules/@marijn/find-cluster-break/LICENSE
generated
vendored
Normal file
21
node_modules/@marijn/find-cluster-break/LICENSE
generated
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (C) 2024 by Marijn Haverbeke <marijn@haverbeke.berlin>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
28
node_modules/@marijn/find-cluster-break/README.md
generated
vendored
Normal file
28
node_modules/@marijn/find-cluster-break/README.md
generated
vendored
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
# @marijn/find-cluster-break
|
||||
|
||||
Small JavaScript module for finding grapheme cluster breaks in
|
||||
strings, scanning from a given position.
|
||||
|
||||
```javascript
|
||||
import {findClusterBreak} from "@marijn/find-cluster-break"
|
||||
console.log(findClusterBreak("💪🏽🦋", 0))
|
||||
// → 4
|
||||
```
|
||||
|
||||
This code is open source, released under an MIT license.
|
||||
|
||||
## Documentation
|
||||
|
||||
**`findClusterBreak`**`(str: string, pos: number, forward = true, includeExtending = true): number`
|
||||
|
||||
Returns a next grapheme cluster break _after_ (not equal to) `pos`,
|
||||
if `forward` is true, or before otherwise. Returns `pos` itself if no
|
||||
further cluster break is available in the string. Moves across
|
||||
surrogate pairs, extending characters (when `includeExtending` is
|
||||
true, which is the default), characters joined with zero-width joiners,
|
||||
and flag emoji.
|
||||
|
||||
**`isExtendingChar`**`(code: number): boolean`
|
||||
|
||||
Query whether the given character has a `Grapheme_Cluster_Break` value
|
||||
of `Extend` in Unicode.
|
||||
85
node_modules/@marijn/find-cluster-break/dist/index.cjs
generated
vendored
Normal file
85
node_modules/@marijn/find-cluster-break/dist/index.cjs
generated
vendored
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
'use strict';
|
||||
|
||||
// These are filled with ranges (rangeFrom[i] up to but not including
|
||||
// rangeTo[i]) of code points that count as extending characters.
|
||||
let rangeFrom = [], rangeTo = []
|
||||
|
||||
;(() => {
|
||||
// Compressed representation of the Grapheme_Cluster_Break=Extend
|
||||
// information from
|
||||
// http://www.unicode.org/Public/16.0.0/ucd/auxiliary/GraphemeBreakProperty.txt.
|
||||
// Each pair of elements represents a range, as an offet from the
|
||||
// previous range and a length. Numbers are in base-36, with the empty
|
||||
// string being a shorthand for 1.
|
||||
let numbers = "lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(s => s ? parseInt(s, 36) : 1);
|
||||
for (let i = 0, n = 0; i < numbers.length; i++)
|
||||
(i % 2 ? rangeTo : rangeFrom).push(n = n + numbers[i]);
|
||||
})();
|
||||
|
||||
function isExtendingChar(code) {
|
||||
if (code < 768) return false
|
||||
for (let from = 0, to = rangeFrom.length;;) {
|
||||
let mid = (from + to) >> 1;
|
||||
if (code < rangeFrom[mid]) to = mid;
|
||||
else if (code >= rangeTo[mid]) from = mid + 1;
|
||||
else return true
|
||||
if (from == to) return false
|
||||
}
|
||||
}
|
||||
|
||||
function isRegionalIndicator(code) {
|
||||
return code >= 0x1F1E6 && code <= 0x1F1FF
|
||||
}
|
||||
|
||||
const ZWJ = 0x200d;
|
||||
|
||||
function findClusterBreak(str, pos, forward = true, includeExtending = true) {
|
||||
return (forward ? nextClusterBreak : prevClusterBreak)(str, pos, includeExtending)
|
||||
}
|
||||
|
||||
function nextClusterBreak(str, pos, includeExtending) {
|
||||
if (pos == str.length) return pos
|
||||
// If pos is in the middle of a surrogate pair, move to its start
|
||||
if (pos && surrogateLow(str.charCodeAt(pos)) && surrogateHigh(str.charCodeAt(pos - 1))) pos--;
|
||||
let prev = codePointAt(str, pos);
|
||||
pos += codePointSize(prev);
|
||||
while (pos < str.length) {
|
||||
let next = codePointAt(str, pos);
|
||||
if (prev == ZWJ || next == ZWJ || includeExtending && isExtendingChar(next)) {
|
||||
pos += codePointSize(next);
|
||||
prev = next;
|
||||
} else if (isRegionalIndicator(next)) {
|
||||
let countBefore = 0, i = pos - 2;
|
||||
while (i >= 0 && isRegionalIndicator(codePointAt(str, i))) { countBefore++; i -= 2; }
|
||||
if (countBefore % 2 == 0) break
|
||||
else pos += 2;
|
||||
} else {
|
||||
break
|
||||
}
|
||||
}
|
||||
return pos
|
||||
}
|
||||
|
||||
function prevClusterBreak(str, pos, includeExtending) {
|
||||
while (pos > 0) {
|
||||
let found = nextClusterBreak(str, pos - 2, includeExtending);
|
||||
if (found < pos) return found
|
||||
pos--;
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
function codePointAt(str, pos) {
|
||||
let code0 = str.charCodeAt(pos);
|
||||
if (!surrogateHigh(code0) || pos + 1 == str.length) return code0
|
||||
let code1 = str.charCodeAt(pos + 1);
|
||||
if (!surrogateLow(code1)) return code0
|
||||
return ((code0 - 0xd800) << 10) + (code1 - 0xdc00) + 0x10000
|
||||
}
|
||||
|
||||
function surrogateLow(ch) { return ch >= 0xDC00 && ch < 0xE000 }
|
||||
function surrogateHigh(ch) { return ch >= 0xD800 && ch < 0xDC00 }
|
||||
function codePointSize(code) { return code < 0x10000 ? 1 : 2 }
|
||||
|
||||
exports.findClusterBreak = findClusterBreak;
|
||||
exports.isExtendingChar = isExtendingChar;
|
||||
15
node_modules/@marijn/find-cluster-break/dist/index.d.cts
generated
vendored
Normal file
15
node_modules/@marijn/find-cluster-break/dist/index.d.cts
generated
vendored
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
/**
|
||||
Query whether the given character has a `Grapheme_Cluster_Break`
|
||||
value of `Extend` in Unicode.
|
||||
*/
|
||||
export declare function isExtendingChar(code: number): boolean
|
||||
|
||||
/**
|
||||
Returns a next grapheme cluster break _after_ (not equal to) `pos`,
|
||||
if `forward` is true, or before otherwise. Returns `pos` itself if no
|
||||
further cluster break is available in the string. Moves across
|
||||
surrogate pairs, extending characters (when `includeExtending` is
|
||||
true, which is the default), characters joined with zero-width joiners,
|
||||
and flag emoji.
|
||||
*/
|
||||
export declare function findClusterBreak(str: string, pos: number, forward?: boolean, includeExtending?: boolean): number
|
||||
35
node_modules/@marijn/find-cluster-break/package.json
generated
vendored
Normal file
35
node_modules/@marijn/find-cluster-break/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
"name": "@marijn/find-cluster-break",
|
||||
"version": "1.0.2",
|
||||
"type": "module",
|
||||
"description": "Find the position of grapheme cluster breaks in a string",
|
||||
"main": "src/index.js",
|
||||
"exports": {
|
||||
"import": "./src/index.js",
|
||||
"require": "./dist/index.cjs"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha test/*.js",
|
||||
"prepare": "rollup -c"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/marijnh/find-cluster-break.git"
|
||||
},
|
||||
"keywords": [
|
||||
"unicode",
|
||||
"grapheme",
|
||||
"cluster",
|
||||
"break"
|
||||
],
|
||||
"author": "Marijn Haverbeke <marijn@haverbeke.berlin>",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/marijnh/find-cluster-break/issues"
|
||||
},
|
||||
"homepage": "https://github.com/marijnh/find-cluster-break#readme",
|
||||
"devDependencies": {
|
||||
"mocha": "^10.7.3",
|
||||
"rollup": "^4.28.1"
|
||||
}
|
||||
}
|
||||
7
node_modules/@marijn/find-cluster-break/rollup.config.js
generated
vendored
Normal file
7
node_modules/@marijn/find-cluster-break/rollup.config.js
generated
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
export default {
|
||||
input: "src/index.js",
|
||||
output: {
|
||||
file: "dist/index.cjs",
|
||||
format: "cjs"
|
||||
}
|
||||
}
|
||||
15
node_modules/@marijn/find-cluster-break/src/index.d.ts
generated
vendored
Normal file
15
node_modules/@marijn/find-cluster-break/src/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
/**
|
||||
Query whether the given character has a `Grapheme_Cluster_Break`
|
||||
value of `Extend` in Unicode.
|
||||
*/
|
||||
export declare function isExtendingChar(code: number): boolean
|
||||
|
||||
/**
|
||||
Returns a next grapheme cluster break _after_ (not equal to) `pos`,
|
||||
if `forward` is true, or before otherwise. Returns `pos` itself if no
|
||||
further cluster break is available in the string. Moves across
|
||||
surrogate pairs, extending characters (when `includeExtending` is
|
||||
true, which is the default), characters joined with zero-width joiners,
|
||||
and flag emoji.
|
||||
*/
|
||||
export declare function findClusterBreak(str: string, pos: number, forward?: boolean, includeExtending?: boolean): number
|
||||
87
node_modules/@marijn/find-cluster-break/src/index.js
generated
vendored
Normal file
87
node_modules/@marijn/find-cluster-break/src/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,87 @@
|
|||
// These are filled with ranges (rangeFrom[i] up to but not including
|
||||
// rangeTo[i]) of code points that count as extending characters.
|
||||
let rangeFrom = [], rangeTo = []
|
||||
|
||||
;(() => {
|
||||
// Compressed representation of the Grapheme_Cluster_Break=Extend
|
||||
// information from
|
||||
// http://www.unicode.org/Public/16.0.0/ucd/auxiliary/GraphemeBreakProperty.txt.
|
||||
// Each pair of elements represents a range, as an offet from the
|
||||
// previous range and a length. Numbers are in base-36, with the empty
|
||||
// string being a shorthand for 1.
|
||||
let numbers = "lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(s => s ? parseInt(s, 36) : 1)
|
||||
for (let i = 0, n = 0; i < numbers.length; i++)
|
||||
(i % 2 ? rangeTo : rangeFrom).push(n = n + numbers[i])
|
||||
})()
|
||||
|
||||
export function isExtendingChar(code) {
|
||||
if (code < 768) return false
|
||||
for (let from = 0, to = rangeFrom.length;;) {
|
||||
let mid = (from + to) >> 1
|
||||
if (code < rangeFrom[mid]) to = mid
|
||||
else if (code >= rangeTo[mid]) from = mid + 1
|
||||
else return true
|
||||
if (from == to) return false
|
||||
}
|
||||
}
|
||||
|
||||
function isRegionalIndicator(code) {
|
||||
return code >= 0x1F1E6 && code <= 0x1F1FF
|
||||
}
|
||||
|
||||
function check(code) {
|
||||
for (let i = 0; i < rangeFrom.length; i++) {
|
||||
if (rangeTo[i] > code) return rangeFrom[i] <= code
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
const ZWJ = 0x200d
|
||||
|
||||
export function findClusterBreak(str, pos, forward = true, includeExtending = true) {
|
||||
return (forward ? nextClusterBreak : prevClusterBreak)(str, pos, includeExtending)
|
||||
}
|
||||
|
||||
function nextClusterBreak(str, pos, includeExtending) {
|
||||
if (pos == str.length) return pos
|
||||
// If pos is in the middle of a surrogate pair, move to its start
|
||||
if (pos && surrogateLow(str.charCodeAt(pos)) && surrogateHigh(str.charCodeAt(pos - 1))) pos--
|
||||
let prev = codePointAt(str, pos)
|
||||
pos += codePointSize(prev)
|
||||
while (pos < str.length) {
|
||||
let next = codePointAt(str, pos)
|
||||
if (prev == ZWJ || next == ZWJ || includeExtending && isExtendingChar(next)) {
|
||||
pos += codePointSize(next)
|
||||
prev = next
|
||||
} else if (isRegionalIndicator(next)) {
|
||||
let countBefore = 0, i = pos - 2
|
||||
while (i >= 0 && isRegionalIndicator(codePointAt(str, i))) { countBefore++; i -= 2 }
|
||||
if (countBefore % 2 == 0) break
|
||||
else pos += 2
|
||||
} else {
|
||||
break
|
||||
}
|
||||
}
|
||||
return pos
|
||||
}
|
||||
|
||||
function prevClusterBreak(str, pos, includeExtending) {
|
||||
while (pos > 0) {
|
||||
let found = nextClusterBreak(str, pos - 2, includeExtending)
|
||||
if (found < pos) return found
|
||||
pos--
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
function codePointAt(str, pos) {
|
||||
let code0 = str.charCodeAt(pos)
|
||||
if (!surrogateHigh(code0) || pos + 1 == str.length) return code0
|
||||
let code1 = str.charCodeAt(pos + 1)
|
||||
if (!surrogateLow(code1)) return code0
|
||||
return ((code0 - 0xd800) << 10) + (code1 - 0xdc00) + 0x10000
|
||||
}
|
||||
|
||||
function surrogateLow(ch) { return ch >= 0xDC00 && ch < 0xE000 }
|
||||
function surrogateHigh(ch) { return ch >= 0xD800 && ch < 0xDC00 }
|
||||
function codePointSize(code) { return code < 0x10000 ? 1 : 2 }
|
||||
30
node_modules/@marijn/find-cluster-break/test/test-cluster.js
generated
vendored
Normal file
30
node_modules/@marijn/find-cluster-break/test/test-cluster.js
generated
vendored
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
import {findClusterBreak} from "../src/index.js"
|
||||
|
||||
function assertEq(a, b) {
|
||||
if (a !== b) throw new Error(`${a} !== ${b}`)
|
||||
}
|
||||
|
||||
describe("findClusterBreak", () => {
|
||||
function test(spec) {
|
||||
it(spec, () => {
|
||||
let breaks = [], next
|
||||
while ((next = spec.indexOf("|")) > -1) {
|
||||
breaks.push(next)
|
||||
spec = spec.slice(0, next) + spec.slice(next + 1)
|
||||
}
|
||||
let found = []
|
||||
for (let i = 0;;) {
|
||||
let next = findClusterBreak(spec, i)
|
||||
if (next == spec.length) break
|
||||
found.push(i = next)
|
||||
}
|
||||
assertEq(found.join(","), breaks.join(","))
|
||||
})
|
||||
}
|
||||
|
||||
test("a|b|c|d")
|
||||
test("a|é̠|ő|x")
|
||||
test("😎|🙉")
|
||||
test("👨🎤|💪🏽|👩👩👧👦|❤")
|
||||
test("🇩🇪|🇫🇷|🇪🇸|x|🇮🇹")
|
||||
})
|
||||
21
node_modules/@types/codemirror/LICENSE
generated
vendored
Normal file
21
node_modules/@types/codemirror/LICENSE
generated
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE
|
||||
16
node_modules/@types/codemirror/README.md
generated
vendored
Normal file
16
node_modules/@types/codemirror/README.md
generated
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
# Installation
|
||||
> `npm install --save @types/codemirror`
|
||||
|
||||
# Summary
|
||||
This package contains type definitions for codemirror (https://github.com/codemirror/CodeMirror).
|
||||
|
||||
# Details
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/codemirror.
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Tue, 06 Jun 2023 01:03:06 GMT
|
||||
* Dependencies: [@types/tern](https://npmjs.com/package/@types/tern)
|
||||
* Global values: `CodeMirror`
|
||||
|
||||
# Credits
|
||||
These definitions were written by [mihailik](https://github.com/mihailik), [nrbernard](https://github.com/nrbernard), [Pr1st0n](https://github.com/Pr1st0n), [rileymiller](https://github.com/rileymiller), [toddself](https://github.com/toddself), [ysulyma](https://github.com/ysulyma), [azoson](https://github.com/azoson), [kylesferrazza](https://github.com/kylesferrazza), [fityocsaba96](https://github.com/fityocsaba96), [koddsson](https://github.com/koddsson), and [ficristo](https://github.com/ficristo).
|
||||
37
node_modules/@types/codemirror/addon/comment/comment.d.ts
generated
vendored
Normal file
37
node_modules/@types/codemirror/addon/comment/comment.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
import '../../';
|
||||
|
||||
declare module '../../' {
|
||||
interface Editor {
|
||||
/** Tries to uncomment the current selection, and if that fails, line-comments it. */
|
||||
toggleComment(options?: CommentOptions): void;
|
||||
/** Set the lines in the given range to be line comments. Will fall back to `blockComment` when no line comment style is defined for the mode. */
|
||||
lineComment(from: Position, to: Position, options?: CommentOptions): void;
|
||||
/** Wrap the code in the given range in a block comment. Will fall back to `lineComment` when no block comment style is defined for the mode. */
|
||||
blockComment(from: Position, to: Position, options?: CommentOptions): void;
|
||||
/** Try to uncomment the given range. Returns `true` if a comment range was found and removed, `false` otherwise. */
|
||||
uncomment(from: Position, to: Position, options?: CommentOptions): boolean;
|
||||
}
|
||||
|
||||
interface CommentOptions {
|
||||
/** Override the [comment string properties](https://codemirror.net/doc/manual.html#mode_comment) of the mode with custom comment strings. */
|
||||
blockCommentStart?: string | undefined;
|
||||
/** Override the [comment string properties](https://codemirror.net/doc/manual.html#mode_comment) of the mode with custom comment strings. */
|
||||
blockCommentEnd?: string | undefined;
|
||||
/** Override the [comment string properties](https://codemirror.net/doc/manual.html#mode_comment) of the mode with custom comment strings. */
|
||||
blockCommentLead?: string | undefined;
|
||||
/** Override the [comment string properties](https://codemirror.net/doc/manual.html#mode_comment) of the mode with custom comment strings. */
|
||||
lineComment?: string | undefined;
|
||||
/** A string that will be inserted after opening and leading markers, and before closing comment markers. Defaults to a single space. */
|
||||
padding?: string | null | undefined;
|
||||
/** Whether, when adding line comments, to also comment lines that contain only whitespace. */
|
||||
commentBlankLines?: boolean | undefined;
|
||||
/** When adding line comments and this is turned on, it will align the comment block to the current indentation of the first line of the block. */
|
||||
indent?: boolean | undefined;
|
||||
/** When block commenting, this controls whether the whole lines are indented, or only the precise range that is given. Defaults to `true`. */
|
||||
fullLines?: boolean | undefined;
|
||||
}
|
||||
|
||||
interface CommandActions {
|
||||
toggleComment(cm: Editor): void;
|
||||
}
|
||||
}
|
||||
12
node_modules/@types/codemirror/addon/comment/continuecomment.d.ts
generated
vendored
Normal file
12
node_modules/@types/codemirror/addon/comment/continuecomment.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
import '../../';
|
||||
|
||||
declare module '../../' {
|
||||
interface EditorConfiguration {
|
||||
/**
|
||||
* if true, the editor will make the next line continue a comment when
|
||||
* pressing the Enter key. If set to a string, it will continue comments
|
||||
* using a custom shortcut.
|
||||
*/
|
||||
continueComments?: boolean | string | { key: string, continueLineComment?: boolean | undefined } | undefined;
|
||||
}
|
||||
}
|
||||
35
node_modules/@types/codemirror/addon/dialog/dialog.d.ts
generated
vendored
Normal file
35
node_modules/@types/codemirror/addon/dialog/dialog.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
import '../../';
|
||||
|
||||
export type DialogCloseFunction = () => void;
|
||||
|
||||
export interface DialogOptions {
|
||||
bottom?: boolean | undefined;
|
||||
}
|
||||
|
||||
export interface OpenDialogOptions extends DialogOptions {
|
||||
/** If true, the dialog will be closed when the user presses enter in the input. Defaults to true. */
|
||||
closeOnEnter?: boolean | undefined;
|
||||
/** Determines whether the dialog is closed when it loses focus. Defaults to true. */
|
||||
closeOnBlur?: boolean | undefined;
|
||||
/** An event handler that will be called whenever keydown fires in the dialog's input. If the callback returns true, the dialog will not do any further processing of the event. */
|
||||
onKeyDown?(event: KeyboardEvent, value: string, close: DialogCloseFunction): boolean | undefined;
|
||||
/** An event handler that will be called whenever keyup fires in the dialog's input. If the callback returns true, the dialog will not do any further processing of the event. */
|
||||
onKeyUp?(event: KeyboardEvent, value: string, close: DialogCloseFunction): boolean | undefined;
|
||||
/** An event handler that will be called whenever input fires in the dialog's input. If the callback returns true, the dialog will not do any further processing of the event. */
|
||||
onInput?(event: KeyboardEvent, value: string, close: DialogCloseFunction): boolean | undefined;
|
||||
/** A callback that will be called after the dialog has been closed and removed from the DOM. */
|
||||
onClose?(instance: HTMLElement): void;
|
||||
}
|
||||
|
||||
export interface OpenNotificationOptions extends DialogOptions {
|
||||
duration?: number | undefined;
|
||||
}
|
||||
|
||||
declare module '../../' {
|
||||
interface Editor {
|
||||
/** Provides a very simple way to query users for text input. */
|
||||
openDialog(template: string | Node, callback: (value: string, e: Event) => void, options?: OpenDialogOptions): DialogCloseFunction;
|
||||
openNotification(template: string | Node, options?: OpenNotificationOptions): DialogCloseFunction;
|
||||
openConfirm(template: string | Node, callbacks: ReadonlyArray<(editor: Editor) => void>, options?: DialogOptions): DialogCloseFunction;
|
||||
}
|
||||
}
|
||||
9
node_modules/@types/codemirror/addon/display/autorefresh.d.ts
generated
vendored
Normal file
9
node_modules/@types/codemirror/addon/display/autorefresh.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
import '../../';
|
||||
|
||||
declare module '../../' {
|
||||
interface EditorConfiguration {
|
||||
// if true, it will be refreshed the first time the editor becomes visible.
|
||||
// you can pass delay (msec) time as polling duration
|
||||
autoRefresh?: boolean | { delay: number } | undefined;
|
||||
}
|
||||
}
|
||||
13
node_modules/@types/codemirror/addon/display/fullscreen.d.ts
generated
vendored
Normal file
13
node_modules/@types/codemirror/addon/display/fullscreen.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import '../../';
|
||||
|
||||
declare module '../../' {
|
||||
interface EditorConfiguration {
|
||||
/**
|
||||
* When set to true, will make the editor full-screen (as in, taking up the whole browser window).
|
||||
* Depends on fullscreen.css
|
||||
* @see {@link https://codemirror.net/doc/manual.html#addon_fullscreen}
|
||||
* @default false
|
||||
*/
|
||||
fullScreen?: boolean | undefined;
|
||||
}
|
||||
}
|
||||
41
node_modules/@types/codemirror/addon/display/panel.d.ts
generated
vendored
Normal file
41
node_modules/@types/codemirror/addon/display/panel.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
import '../../';
|
||||
|
||||
declare module '../../' {
|
||||
interface Panel {
|
||||
/** Removes the panel from the editor */
|
||||
clear(): void;
|
||||
/** Notifies panel that height of DOM node has changed */
|
||||
changed(height?: number): void;
|
||||
}
|
||||
|
||||
interface ShowPanelOptions {
|
||||
/**
|
||||
* Controls the position of the newly added panel. The following values are recognized:
|
||||
* `top` (default): Adds the panel at the very top.
|
||||
* `after-top`: Adds the panel at the bottom of the top panels.
|
||||
* `bottom`: Adds the panel at the very bottom.
|
||||
* `before-bottom`: Adds the panel at the top of the bottom panels.
|
||||
*/
|
||||
position?: 'top' | 'after-top' | 'bottom' | 'before-bottom' | undefined;
|
||||
/** The new panel will be added before the given panel. */
|
||||
before?: Panel | undefined;
|
||||
/** The new panel will be added after the given panel. */
|
||||
after?: Panel | undefined;
|
||||
/** The new panel will replace the given panel. */
|
||||
replace?: Panel | undefined;
|
||||
/** Whether to scroll the editor to keep the text's vertical position stable, when adding a panel above it. Defaults to false. */
|
||||
stable?: boolean | undefined;
|
||||
/** The initial height of the panel. Defaults to the offsetHeight of the node. */
|
||||
height?: number | undefined;
|
||||
}
|
||||
|
||||
interface Editor {
|
||||
/**
|
||||
* Places a DOM node above or below an editor and shrinks the editor to make room for the node.
|
||||
* When using the `after`, `before` or `replace` options, if the panel doesn't exists or has been removed, the value of the `position` option will be used as a fallback.
|
||||
* @param node the DOM node
|
||||
* @param options optional options object
|
||||
*/
|
||||
addPanel(node: HTMLElement, options?: ShowPanelOptions): Panel;
|
||||
}
|
||||
}
|
||||
11
node_modules/@types/codemirror/addon/display/placeholder.d.ts
generated
vendored
Normal file
11
node_modules/@types/codemirror/addon/display/placeholder.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
import '../../';
|
||||
|
||||
declare module '../../' {
|
||||
interface EditorConfiguration {
|
||||
/**
|
||||
* Adds a placeholder option that can be used to make content appear in the editor when it is empty and not focused.
|
||||
* It can hold either a string or a DOM node. Also gives the editor a CodeMirror-empty CSS class whenever it doesn't contain any text.
|
||||
*/
|
||||
placeholder?: string | Node | undefined;
|
||||
}
|
||||
}
|
||||
16
node_modules/@types/codemirror/addon/display/rulers.d.ts
generated
vendored
Normal file
16
node_modules/@types/codemirror/addon/display/rulers.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import '../../';
|
||||
|
||||
export interface Ruler {
|
||||
column: number;
|
||||
className?: string | undefined;
|
||||
color?: string | undefined;
|
||||
lineStyle?: string | undefined;
|
||||
width?: string | undefined;
|
||||
}
|
||||
|
||||
declare module '../../' {
|
||||
interface EditorConfiguration {
|
||||
/** show one or more vertical rulers in the editor. */
|
||||
rulers?: false | ReadonlyArray<number | Ruler> | undefined;
|
||||
}
|
||||
}
|
||||
40
node_modules/@types/codemirror/addon/edit/closebrackets.d.ts
generated
vendored
Normal file
40
node_modules/@types/codemirror/addon/edit/closebrackets.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
import '../../';
|
||||
|
||||
declare module '../../' {
|
||||
interface AutoCloseBrackets {
|
||||
/**
|
||||
* String containing pairs of matching characters.
|
||||
*/
|
||||
pairs?: string | undefined;
|
||||
|
||||
/**
|
||||
* If the next character is in the string, opening a bracket should be auto-closed.
|
||||
*/
|
||||
closeBefore?: string | undefined;
|
||||
|
||||
/**
|
||||
* String containing chars that could do a triple quote.
|
||||
*/
|
||||
triples?: string | undefined;
|
||||
|
||||
/**
|
||||
* explode should be a similar string that gives the pairs of characters that, when enter is pressed between them, should have the second character also moved to its own line.
|
||||
*/
|
||||
explode?: string | undefined;
|
||||
|
||||
/**
|
||||
* By default, if the active mode has a closeBrackets property, that overrides the configuration given in the option.
|
||||
* But you can add an override property with a truthy value to override mode-specific configuration.
|
||||
*/
|
||||
override?: boolean | undefined;
|
||||
}
|
||||
|
||||
interface EditorConfiguration {
|
||||
/**
|
||||
* Will auto-close brackets and quotes when typed.
|
||||
* By default, it'll auto-close ()[]{}''"", but you can pass it a string similar to that (containing pairs of matching characters),
|
||||
* or an object with pairs and optionally explode properties to customize it.
|
||||
*/
|
||||
autoCloseBrackets?: AutoCloseBrackets | boolean | string | undefined;
|
||||
}
|
||||
}
|
||||
44
node_modules/@types/codemirror/addon/edit/closetag.d.ts
generated
vendored
Normal file
44
node_modules/@types/codemirror/addon/edit/closetag.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
import '../../';
|
||||
|
||||
declare module '../../' {
|
||||
interface CommandActions {
|
||||
closeTag(cm: Editor): void;
|
||||
}
|
||||
|
||||
interface AutoCloseTags {
|
||||
/**
|
||||
* Whether to autoclose when the '/' of a closing tag is typed. (default true)
|
||||
*/
|
||||
whenClosing?: boolean | undefined;
|
||||
|
||||
/**
|
||||
* Whether to autoclose the tag when the final '>' of an opening tag is typed. (default true)
|
||||
*/
|
||||
whenOpening?: boolean | undefined;
|
||||
|
||||
/**
|
||||
* An array of tag names that should not be autoclosed. (default is empty tags for HTML, none for XML)
|
||||
*/
|
||||
dontCloseTags?: ReadonlyArray<string> | undefined;
|
||||
|
||||
/**
|
||||
* An array of tag names that should, when opened, cause a
|
||||
* blank line to be added inside the tag, and the blank line and
|
||||
* closing line to be indented. (default is block tags for HTML, none for XML)
|
||||
*/
|
||||
indentTags?: ReadonlyArray<string> | undefined;
|
||||
|
||||
/**
|
||||
* An array of XML tag names that should be autoclosed with '/>'. (default is none)
|
||||
*/
|
||||
emptyTags: ReadonlyArray<string>;
|
||||
}
|
||||
|
||||
interface EditorConfiguration {
|
||||
/**
|
||||
* Will auto-close XML tags when '>' or '/' is typed.
|
||||
* Depends on the fold/xml-fold.js addon.
|
||||
*/
|
||||
autoCloseTags?: AutoCloseTags | boolean | undefined;
|
||||
}
|
||||
}
|
||||
7
node_modules/@types/codemirror/addon/edit/continuelist.d.ts
generated
vendored
Normal file
7
node_modules/@types/codemirror/addon/edit/continuelist.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
import '../../';
|
||||
|
||||
declare module '../../' {
|
||||
interface CommandActions {
|
||||
newlineAndIndentContinueMarkdownList(cm: Editor): void | typeof Pass;
|
||||
}
|
||||
}
|
||||
35
node_modules/@types/codemirror/addon/edit/matchbrackets.d.ts
generated
vendored
Normal file
35
node_modules/@types/codemirror/addon/edit/matchbrackets.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
import '../../';
|
||||
|
||||
declare module '../../' {
|
||||
interface MatchBrackets {
|
||||
/**
|
||||
* Only use the character after the start position, never the one before it.
|
||||
*/
|
||||
afterCursor?: boolean | undefined;
|
||||
|
||||
/**
|
||||
* Causes only matches where both brackets are at the same side of the start position to be considered.
|
||||
*/
|
||||
strict?: boolean | undefined;
|
||||
|
||||
/**
|
||||
* Stop after scanning this amount of lines without a successful match. Defaults to 1000.
|
||||
*/
|
||||
maxScanLines?: number | undefined;
|
||||
|
||||
/**
|
||||
* Ignore lines longer than this. Defaults to 10000.
|
||||
*/
|
||||
maxScanLineLength?: number | undefined;
|
||||
|
||||
/**
|
||||
* Don't highlight a bracket in a line longer than this. Defaults to 1000.
|
||||
*/
|
||||
maxHighlightLineLength?: number | undefined;
|
||||
}
|
||||
|
||||
interface EditorConfiguration {
|
||||
// When set to true or an options object, causes matching brackets to be highlighted whenever the cursor is next to them.
|
||||
matchBrackets?: MatchBrackets | boolean | undefined;
|
||||
}
|
||||
}
|
||||
25
node_modules/@types/codemirror/addon/edit/matchtags.d.ts
generated
vendored
Normal file
25
node_modules/@types/codemirror/addon/edit/matchtags.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
import '../../';
|
||||
|
||||
declare module '../../' {
|
||||
interface CommandActions {
|
||||
/**
|
||||
* You can bind a key to in order to jump to the tag matching the one under the cursor.
|
||||
*/
|
||||
toMatchingTag(cm: Editor): void;
|
||||
}
|
||||
|
||||
interface MatchTags {
|
||||
/**
|
||||
* Highlight both matching tags.
|
||||
*/
|
||||
bothTags?: boolean | undefined;
|
||||
}
|
||||
|
||||
interface EditorConfiguration {
|
||||
/**
|
||||
* When enabled will cause the tags around the cursor to be highlighted (using the CodeMirror-matchingtag class).
|
||||
* Depends on the addon/fold/xml-fold.js addon.
|
||||
*/
|
||||
matchTags?: MatchTags | boolean | undefined;
|
||||
}
|
||||
}
|
||||
8
node_modules/@types/codemirror/addon/edit/trailingspace.d.ts
generated
vendored
Normal file
8
node_modules/@types/codemirror/addon/edit/trailingspace.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
import '../../';
|
||||
|
||||
declare module '../../' {
|
||||
interface EditorConfiguration {
|
||||
/** when enabled, adds the CSS class cm-trailingspace to stretches of whitespace at the end of lines. */
|
||||
showTrailingSpace?: boolean | undefined;
|
||||
}
|
||||
}
|
||||
9
node_modules/@types/codemirror/addon/fold/brace-fold.d.ts
generated
vendored
Normal file
9
node_modules/@types/codemirror/addon/fold/brace-fold.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
import './foldcode';
|
||||
|
||||
declare module './foldcode' {
|
||||
interface FoldHelpers {
|
||||
brace: FoldRangeFinder;
|
||||
import: FoldRangeFinder;
|
||||
include: FoldRangeFinder;
|
||||
}
|
||||
}
|
||||
7
node_modules/@types/codemirror/addon/fold/comment-fold.d.ts
generated
vendored
Normal file
7
node_modules/@types/codemirror/addon/fold/comment-fold.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
import './foldcode';
|
||||
|
||||
declare module './foldcode' {
|
||||
interface FoldHelpers {
|
||||
comment: FoldRangeFinder;
|
||||
}
|
||||
}
|
||||
77
node_modules/@types/codemirror/addon/fold/foldcode.d.ts
generated
vendored
Normal file
77
node_modules/@types/codemirror/addon/fold/foldcode.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
// See docs https://codemirror.net/doc/manual.html#addon_foldcode
|
||||
|
||||
import * as CodeMirror from '../../';
|
||||
|
||||
export type FoldRangeFinder = (cm: CodeMirror.Editor, pos: CodeMirror.Position) => CodeMirror.FoldRange | undefined;
|
||||
|
||||
export interface FoldHelpers {
|
||||
combine: (...finders: FoldRangeFinder[]) => FoldRangeFinder;
|
||||
auto: FoldRangeFinder;
|
||||
}
|
||||
|
||||
declare module '../../' {
|
||||
interface Editor {
|
||||
/**
|
||||
* Helps with code folding. Adds a foldCode method to editor instances, which will try to do a code fold starting at the given line,
|
||||
* or unfold the fold that is already present.
|
||||
* The method takes as first argument the position that should be folded (may be a line number or a Pos), and as second optional argument either a
|
||||
* range-finder function, or an options object.
|
||||
*/
|
||||
foldCode: (
|
||||
lineOrPos: number | Position,
|
||||
rangeFindeOrFoldOptions?: FoldRangeFinder | FoldOptions,
|
||||
force?: 'fold' | 'unfold',
|
||||
) => void;
|
||||
isFolded(pos: Position): boolean | undefined;
|
||||
foldOption<K extends keyof FoldOptions>(option: K): FoldOptions[K];
|
||||
}
|
||||
|
||||
interface EditorConfiguration {
|
||||
foldOptions?: FoldOptions | undefined;
|
||||
}
|
||||
|
||||
interface FoldOptions {
|
||||
/**
|
||||
* The function that is used to find foldable ranges. If this is not directly passed, it will default to CodeMirror.fold.auto,
|
||||
* which uses getHelpers with a "fold" type to find folding functions appropriate for the local mode.
|
||||
* There are files in the addon/fold/ directory providing CodeMirror.fold.brace, which finds blocks in brace languages (JavaScript, C, Java, etc),
|
||||
* CodeMirror.fold.indent, for languages where indentation determines block structure (Python, Haskell), and CodeMirror.fold.xml, for XML-style languages,
|
||||
* and CodeMirror.fold.comment, for folding comment blocks.
|
||||
*/
|
||||
rangeFinder?: FoldRangeFinder | undefined;
|
||||
|
||||
/**
|
||||
* The widget to show for folded ranges. Can be either a string, in which case it'll become a span with class CodeMirror-foldmarker, or a DOM node.
|
||||
* To dynamically generate the widget, this can be a function that returns a string or DOM node, which will then render as described.
|
||||
* The function will be invoked with parameters identifying the range to be folded.
|
||||
*/
|
||||
widget?: string | Element | ((from: Position, to: Position) => string | Element) | undefined;
|
||||
|
||||
/**
|
||||
* When true (default is false), the addon will try to find foldable ranges on the lines above the current one if there isn't an eligible one on the given line.
|
||||
*/
|
||||
scanUp?: boolean | undefined;
|
||||
|
||||
/**
|
||||
* The minimum amount of lines that a fold should span to be accepted. Defaults to 0, which also allows single-line folds.
|
||||
*/
|
||||
minFoldSize?: number | undefined;
|
||||
|
||||
clearOnEnter?: boolean | undefined;
|
||||
}
|
||||
|
||||
interface FoldRange {
|
||||
from: Position;
|
||||
to: Position;
|
||||
}
|
||||
|
||||
interface CommandActions {
|
||||
toggleFold(cm: Editor): void;
|
||||
fold(cm: Editor): void;
|
||||
unfold(cm: Editor): void;
|
||||
foldAll(cm: Editor): void;
|
||||
unfoldAll(cm: Editor): void;
|
||||
}
|
||||
|
||||
const fold: FoldHelpers;
|
||||
}
|
||||
40
node_modules/@types/codemirror/addon/fold/foldgutter.d.ts
generated
vendored
Normal file
40
node_modules/@types/codemirror/addon/fold/foldgutter.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
// See docs https://codemirror.net/doc/manual.html#addon_foldgutter
|
||||
|
||||
import '../../';
|
||||
|
||||
declare module '../../' {
|
||||
interface EditorConfiguration {
|
||||
/**
|
||||
* Provides an option foldGutter, which can be used to create a gutter with markers indicating the blocks that can be folded.
|
||||
*/
|
||||
foldGutter?: boolean | FoldGutterOptions | undefined;
|
||||
}
|
||||
|
||||
interface FoldRange {
|
||||
from: Position;
|
||||
to: Position;
|
||||
}
|
||||
|
||||
interface FoldGutterOptions {
|
||||
/**
|
||||
* The CSS class of the gutter. Defaults to "CodeMirror-foldgutter". You will have to style this yourself to give it a width (and possibly a background).
|
||||
*/
|
||||
gutter?: string | undefined;
|
||||
|
||||
/**
|
||||
* A CSS class or DOM element to be used as the marker for open, foldable blocks. Defaults to "CodeMirror-foldgutter-open".
|
||||
*/
|
||||
indicatorOpen?: string | Element | undefined;
|
||||
|
||||
/**
|
||||
* A CSS class or DOM element to be used as the marker for folded blocks. Defaults to "CodeMirror-foldgutter-folded".
|
||||
*/
|
||||
indicatorFolded?: string | Element | undefined;
|
||||
|
||||
/*
|
||||
* The range-finder function to use when determining whether something can be folded.
|
||||
* When not given, CodeMirror.fold.auto will be used as default.
|
||||
*/
|
||||
rangeFinder?: (cm: Editor, pos: Position) => FoldRange | undefined;
|
||||
}
|
||||
}
|
||||
7
node_modules/@types/codemirror/addon/fold/indent-fold.d.ts
generated
vendored
Normal file
7
node_modules/@types/codemirror/addon/fold/indent-fold.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
import './foldcode';
|
||||
|
||||
declare module './foldcode' {
|
||||
interface FoldHelpers {
|
||||
indent: FoldRangeFinder;
|
||||
}
|
||||
}
|
||||
7
node_modules/@types/codemirror/addon/fold/markdown-fold.d.ts
generated
vendored
Normal file
7
node_modules/@types/codemirror/addon/fold/markdown-fold.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
import './foldcode';
|
||||
|
||||
declare module './foldcode' {
|
||||
interface FoldHelpers {
|
||||
markdown: FoldRangeFinder;
|
||||
}
|
||||
}
|
||||
22
node_modules/@types/codemirror/addon/fold/xml-fold.d.ts
generated
vendored
Normal file
22
node_modules/@types/codemirror/addon/fold/xml-fold.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
import * as CodeMirror from '../../';
|
||||
import './foldcode';
|
||||
|
||||
export interface XmlTag {
|
||||
from: CodeMirror.Position;
|
||||
to: CodeMirror.Position;
|
||||
tag: string;
|
||||
}
|
||||
|
||||
declare module './foldcode' {
|
||||
interface FoldHelpers {
|
||||
xml: FoldRangeFinder;
|
||||
}
|
||||
}
|
||||
|
||||
declare module '../../' {
|
||||
function findMatchingTag(cm: Editor, pos: Position, range: Range): {open: XmlTag, close: XmlTag | null | undefined, at: 'open' | 'close'} | undefined;
|
||||
|
||||
function findEnclosingTag(cm: Editor, pos: Position, range: Range, tag: string): {open: XmlTag, close: XmlTag} | undefined;
|
||||
|
||||
function scanForClosingTag(cm: Editor, pos: Position, name: string, end?: Position): XmlTag | null | undefined;
|
||||
}
|
||||
12
node_modules/@types/codemirror/addon/hint/anyword-hint.d.ts
generated
vendored
Normal file
12
node_modules/@types/codemirror/addon/hint/anyword-hint.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
import './show-hint';
|
||||
|
||||
declare module '../../' {
|
||||
interface HintHelpers {
|
||||
anyword: HintFunction;
|
||||
}
|
||||
|
||||
interface ShowHintOptions {
|
||||
word?: RegExp | undefined;
|
||||
range?: number | undefined;
|
||||
}
|
||||
}
|
||||
7
node_modules/@types/codemirror/addon/hint/css-hint.d.ts
generated
vendored
Normal file
7
node_modules/@types/codemirror/addon/hint/css-hint.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
import './show-hint';
|
||||
|
||||
declare module '../../' {
|
||||
interface HintHelpers {
|
||||
css: HintFunction;
|
||||
}
|
||||
}
|
||||
9
node_modules/@types/codemirror/addon/hint/html-hint.d.ts
generated
vendored
Normal file
9
node_modules/@types/codemirror/addon/hint/html-hint.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
import './xml-hint';
|
||||
|
||||
declare module '../../' {
|
||||
interface HintHelpers {
|
||||
html: HintFunction;
|
||||
}
|
||||
|
||||
const htmlSchema: any;
|
||||
}
|
||||
8
node_modules/@types/codemirror/addon/hint/javascript-hint.d.ts
generated
vendored
Normal file
8
node_modules/@types/codemirror/addon/hint/javascript-hint.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
import './show-hint';
|
||||
|
||||
declare module '../../' {
|
||||
interface HintHelpers {
|
||||
javascript: HintFunction;
|
||||
coffeescript: HintFunction;
|
||||
}
|
||||
}
|
||||
114
node_modules/@types/codemirror/addon/hint/show-hint.d.ts
generated
vendored
Normal file
114
node_modules/@types/codemirror/addon/hint/show-hint.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,114 @@
|
|||
import '../../';
|
||||
|
||||
declare module '../../' {
|
||||
/**
|
||||
* Provides a framework for showing autocompletion hints. Defines editor.showHint, which takes an optional
|
||||
* options object, and pops up a widget that allows the user to select a completion. Finding hints is done with
|
||||
* a hinting functions (the hint option), which is a function that take an editor instance and options object,
|
||||
* and return a {list, from, to} object, where list is an array of strings or objects (the completions), and
|
||||
* from and to give the start and end of the token that is being completed as {line, ch} objects. An optional
|
||||
* selectedHint property (an integer) can be added to the completion object to control the initially selected hint.
|
||||
*/
|
||||
function showHint(cm: Editor, hinter?: HintFunction, options?: ShowHintOptions): void;
|
||||
|
||||
function on<T extends keyof CompletionEventMap>(hints: Hints, eventName: T, handler: CompletionEventMap[T]): void;
|
||||
function off<T extends keyof CompletionEventMap>(hints: Hints, eventName: T, handler: CompletionEventMap[T]): void;
|
||||
function signal<T extends keyof CompletionEventMap>(hints: Hints, eventName: T, ...args: Parameters<CompletionEventMap[T]>): void;
|
||||
|
||||
interface CompletionEventMap {
|
||||
shown: () => void;
|
||||
select: (completion: Hint | string, element: Element) => void;
|
||||
pick: (completion: Hint | string) => void;
|
||||
close: () => void;
|
||||
}
|
||||
|
||||
interface Hints {
|
||||
from: Position;
|
||||
to: Position;
|
||||
list: Array<Hint | string>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Interface used by showHint.js Codemirror add-on
|
||||
* When completions aren't simple strings, they should be objects with the following properties:
|
||||
*/
|
||||
interface Hint {
|
||||
text: string;
|
||||
className?: string | undefined;
|
||||
displayText?: string | undefined;
|
||||
from?: Position | undefined;
|
||||
/** Called if a completion is picked. If provided *you* are responsible for applying the completion */
|
||||
hint?: ((cm: Editor, data: Hints, cur: Hint) => void) | undefined;
|
||||
render?: ((element: HTMLLIElement, data: Hints, cur: Hint) => void) | undefined;
|
||||
to?: Position | undefined;
|
||||
}
|
||||
|
||||
interface EditorEventMap {
|
||||
startCompletion: (instance: Editor) => void;
|
||||
endCompletion: (instance: Editor) => void;
|
||||
}
|
||||
|
||||
interface Editor {
|
||||
showHint(options?: ShowHintOptions): void;
|
||||
closeHint(): void;
|
||||
}
|
||||
|
||||
interface CommandActions {
|
||||
/* An extension of the existing CodeMirror typings for the autocomplete command */
|
||||
autocomplete: typeof showHint;
|
||||
}
|
||||
|
||||
interface HintFunction {
|
||||
(cm: Editor, options: ShowHintOptions): Hints | null | undefined | PromiseLike<Hints | null | undefined>;
|
||||
}
|
||||
|
||||
interface AsyncHintFunction {
|
||||
(cm: Editor, callback: (hints: Hints | null | undefined) => void, options: ShowHintOptions): void;
|
||||
async: true;
|
||||
}
|
||||
|
||||
interface HintFunctionResolver {
|
||||
resolve(cm: Editor, post: Position): HintFunction | AsyncHintFunction;
|
||||
}
|
||||
|
||||
interface ShowHintOptions {
|
||||
completeSingle?: boolean | undefined;
|
||||
hint?: HintFunction | AsyncHintFunction | HintFunctionResolver | undefined;
|
||||
alignWithWord?: boolean | undefined;
|
||||
closeCharacters?: RegExp | undefined;
|
||||
closeOnPick?: boolean | undefined;
|
||||
closeOnUnfocus?: boolean | undefined;
|
||||
updateOnCursorActivity?: boolean | undefined;
|
||||
completeOnSingleClick?: boolean | undefined;
|
||||
container?: HTMLElement | null | undefined;
|
||||
customKeys?: { [key: string]: ((editor: Editor, handle: CompletionHandle) => void) | string } | null | undefined;
|
||||
extraKeys?: { [key: string]: ((editor: Editor, handle: CompletionHandle) => void) | string } | null | undefined;
|
||||
scrollMargin?: number | undefined;
|
||||
paddingForScrollbar?: boolean | undefined;
|
||||
moveOnOverlap?: boolean | undefined;
|
||||
words?: ReadonlyArray<string> | undefined; // used by fromList
|
||||
}
|
||||
|
||||
/** The Handle used to interact with the autocomplete dialog box. */
|
||||
interface CompletionHandle {
|
||||
moveFocus(n: number, avoidWrap: boolean): void;
|
||||
setFocus(n: number): void;
|
||||
menuSize(): number;
|
||||
length: number;
|
||||
close(): void;
|
||||
pick(): void;
|
||||
data: any;
|
||||
}
|
||||
|
||||
interface EditorConfiguration {
|
||||
showHint?: boolean | undefined;
|
||||
hintOptions?: ShowHintOptions | undefined;
|
||||
}
|
||||
|
||||
interface HintHelpers {
|
||||
auto: HintFunctionResolver;
|
||||
fromList: HintFunction;
|
||||
}
|
||||
|
||||
const hint: HintHelpers;
|
||||
}
|
||||
17
node_modules/@types/codemirror/addon/hint/sql-hint.d.ts
generated
vendored
Normal file
17
node_modules/@types/codemirror/addon/hint/sql-hint.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import './show-hint';
|
||||
|
||||
declare module '../../' {
|
||||
interface HintHelpers {
|
||||
sql: HintFunction;
|
||||
}
|
||||
|
||||
interface SqlHintTable {
|
||||
columns: string[];
|
||||
}
|
||||
|
||||
interface ShowHintOptions {
|
||||
tables?: ReadonlyArray<string | { text: string, columns: string[] }> | Record<string, string[] | { columns: string[] }> | undefined;
|
||||
defaultTable?: string | undefined;
|
||||
disableKeywords?: boolean | undefined;
|
||||
}
|
||||
}
|
||||
13
node_modules/@types/codemirror/addon/hint/xml-hint.d.ts
generated
vendored
Normal file
13
node_modules/@types/codemirror/addon/hint/xml-hint.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import './show-hint';
|
||||
|
||||
declare module '../../' {
|
||||
interface HintHelpers {
|
||||
xml: HintFunction;
|
||||
}
|
||||
|
||||
interface ShowHintOptions {
|
||||
schemaInfo?: any;
|
||||
quoteChar?: string | undefined;
|
||||
matchInMiddle?: boolean | undefined;
|
||||
}
|
||||
}
|
||||
7
node_modules/@types/codemirror/addon/lint/coffeescript-lint.d.ts
generated
vendored
Normal file
7
node_modules/@types/codemirror/addon/lint/coffeescript-lint.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
import { Linter } from './lint';
|
||||
|
||||
declare module '../../' {
|
||||
namespace lint {
|
||||
const coffeescript: Linter<{}>;
|
||||
}
|
||||
}
|
||||
7
node_modules/@types/codemirror/addon/lint/css-lint.d.ts
generated
vendored
Normal file
7
node_modules/@types/codemirror/addon/lint/css-lint.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
import { Linter } from './lint';
|
||||
|
||||
declare module '../../' {
|
||||
namespace lint {
|
||||
const css: Linter<any>;
|
||||
}
|
||||
}
|
||||
7
node_modules/@types/codemirror/addon/lint/html-lint.d.ts
generated
vendored
Normal file
7
node_modules/@types/codemirror/addon/lint/html-lint.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
import { Linter } from './lint';
|
||||
|
||||
declare module '../../' {
|
||||
namespace lint {
|
||||
const html: Linter<any>;
|
||||
}
|
||||
}
|
||||
7
node_modules/@types/codemirror/addon/lint/javascript-lint.d.ts
generated
vendored
Normal file
7
node_modules/@types/codemirror/addon/lint/javascript-lint.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
import { Linter } from './lint';
|
||||
|
||||
declare module '../../' {
|
||||
namespace lint {
|
||||
const javascript: Linter<any>;
|
||||
}
|
||||
}
|
||||
7
node_modules/@types/codemirror/addon/lint/json-lint.d.ts
generated
vendored
Normal file
7
node_modules/@types/codemirror/addon/lint/json-lint.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
import { Linter } from './lint';
|
||||
|
||||
declare module '../../' {
|
||||
namespace lint {
|
||||
const json: Linter<{}>;
|
||||
}
|
||||
}
|
||||
92
node_modules/@types/codemirror/addon/lint/lint.d.ts
generated
vendored
Normal file
92
node_modules/@types/codemirror/addon/lint/lint.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
import * as CodeMirror from '../../';
|
||||
|
||||
export interface BaseLintStateOptions<T> {
|
||||
/** debounce delay before linting onChange */
|
||||
delay?: number | undefined;
|
||||
|
||||
/** callback to modify an annotation before display */
|
||||
formatAnnotation?: ((annotation: Annotation) => Annotation) | undefined;
|
||||
|
||||
/** whether to lint onChange event */
|
||||
lintOnChange?: boolean | undefined;
|
||||
|
||||
selfContain?: boolean | undefined;
|
||||
|
||||
/** callback after linter completes */
|
||||
onUpdateLinting?(annotationsNotSorted: Annotation[], annotations: Annotation[], codeMirror: CodeMirror.Editor): void;
|
||||
|
||||
/**
|
||||
* Passing rules in `options` property prevents JSHint (and other linters) from complaining
|
||||
* about unrecognized rules like `onUpdateLinting`, `delay`, `lintOnChange`, etc.
|
||||
*/
|
||||
options?: T | undefined;
|
||||
|
||||
/** controls display of lint tooltips */
|
||||
tooltips?: boolean | 'gutter' | undefined;
|
||||
}
|
||||
|
||||
export interface SyncLintStateOptions<T> extends BaseLintStateOptions<T> {
|
||||
async?: false | undefined;
|
||||
getAnnotations?: Linter<T> | undefined;
|
||||
}
|
||||
|
||||
export interface AsyncLintStateOptions<T> extends BaseLintStateOptions<T> {
|
||||
/** specifies that the lint process runs asynchronously */
|
||||
async: true;
|
||||
getAnnotations?: AsyncLinter<T> | undefined;
|
||||
}
|
||||
|
||||
export type LintStateOptions<T> = SyncLintStateOptions<T> | AsyncLintStateOptions<T>;
|
||||
|
||||
/**
|
||||
* A function that return errors found during the linting process.
|
||||
*/
|
||||
export interface Linter<T> {
|
||||
(content: string, options: T, codeMirror: CodeMirror.Editor):
|
||||
| Annotation[]
|
||||
| PromiseLike<Annotation[]>;
|
||||
}
|
||||
|
||||
/**
|
||||
* A function that calls the updateLintingCallback with any errors found during the linting process.
|
||||
*/
|
||||
export interface AsyncLinter<T> {
|
||||
(
|
||||
content: string,
|
||||
updateLintingCallback: UpdateLintingCallback,
|
||||
options: T,
|
||||
codeMirror: CodeMirror.Editor,
|
||||
): void;
|
||||
}
|
||||
|
||||
/**
|
||||
* A function that, given an array of annotations, updates the CodeMirror linting GUI with those annotations
|
||||
*/
|
||||
export interface UpdateLintingCallback {
|
||||
(annotations: Annotation[]): void;
|
||||
(codeMirror: CodeMirror.Editor, annotations: Annotation[]): void;
|
||||
}
|
||||
|
||||
/**
|
||||
* An annotation contains a description of a lint error, detailing the location of the error within the code, the severity of the error,
|
||||
* and an explaination as to why the error was thrown.
|
||||
*/
|
||||
export interface Annotation {
|
||||
from: CodeMirror.Position;
|
||||
message?: string | undefined;
|
||||
severity?: string | undefined;
|
||||
to?: CodeMirror.Position | undefined;
|
||||
}
|
||||
|
||||
declare module '../../' {
|
||||
interface Editor {
|
||||
performLint: () => void;
|
||||
}
|
||||
|
||||
interface EditorConfiguration {
|
||||
/** Optional lint configuration to be used in conjunction with CodeMirror's linter addon. */
|
||||
lint?: boolean | LintStateOptions<any> | Linter<any> | undefined;
|
||||
}
|
||||
|
||||
namespace lint {}
|
||||
}
|
||||
7
node_modules/@types/codemirror/addon/lint/yaml-lint.d.ts
generated
vendored
Normal file
7
node_modules/@types/codemirror/addon/lint/yaml-lint.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
import { Linter } from './lint';
|
||||
|
||||
declare module '../../' {
|
||||
namespace lint {
|
||||
const yaml: Linter<{}>;
|
||||
}
|
||||
}
|
||||
130
node_modules/@types/codemirror/addon/merge/merge.d.ts
generated
vendored
Normal file
130
node_modules/@types/codemirror/addon/merge/merge.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,130 @@
|
|||
import * as CodeMirror from '../../';
|
||||
|
||||
/**
|
||||
* Tracks changes in chunks from original to new.
|
||||
*/
|
||||
export interface MergeViewDiffChunk {
|
||||
editFrom: number;
|
||||
editTo: number;
|
||||
origFrom: number;
|
||||
origTo: number;
|
||||
}
|
||||
|
||||
export interface DiffView {
|
||||
/**
|
||||
* Forces the view to reload.
|
||||
*/
|
||||
forceUpdate(): (mode: string) => void;
|
||||
|
||||
/**
|
||||
* Sets whether or not the merge view should show the differences between the editor views.
|
||||
*/
|
||||
setShowDifferences(showDifferences: boolean): void;
|
||||
}
|
||||
|
||||
export interface MergeView {
|
||||
/**
|
||||
* Returns the editor instance.
|
||||
*/
|
||||
editor(): CodeMirror.Editor;
|
||||
|
||||
/**
|
||||
* Left side of the merge view.
|
||||
*/
|
||||
left?: DiffView | undefined;
|
||||
leftChunks(): MergeViewDiffChunk[] | undefined;
|
||||
leftOriginal(): CodeMirror.Editor | undefined;
|
||||
|
||||
/**
|
||||
* Right side of the merge view.
|
||||
*/
|
||||
right?: DiffView | undefined;
|
||||
rightChunks(): MergeViewDiffChunk[] | undefined;
|
||||
rightOriginal(): CodeMirror.Editor | undefined;
|
||||
|
||||
/**
|
||||
* Sets whether or not the merge view should show the differences between the editor views.
|
||||
*/
|
||||
setShowDifferences(showDifferences: boolean): void;
|
||||
}
|
||||
|
||||
export interface MergeViewConstructor {
|
||||
new (element: HTMLElement, options?: MergeViewConfiguration): MergeView;
|
||||
(element: HTMLElement, options?: MergeViewConfiguration): MergeView;
|
||||
}
|
||||
|
||||
/**
|
||||
* Options available to MergeView.
|
||||
*/
|
||||
export interface MergeViewConfiguration extends CodeMirror.EditorConfiguration {
|
||||
/**
|
||||
* Determines whether the original editor allows editing. Defaults to false.
|
||||
*/
|
||||
allowEditingOriginals?: boolean | undefined;
|
||||
|
||||
/**
|
||||
* When true stretches of unchanged text will be collapsed. When a number is given, this indicates the amount
|
||||
* of lines to leave visible around such stretches (which defaults to 2). Defaults to false.
|
||||
*/
|
||||
collapseIdentical?: boolean | number | undefined;
|
||||
|
||||
/**
|
||||
* Sets the style used to connect changed chunks of code. By default, connectors are drawn. When this is set to "align",
|
||||
* the smaller chunk is padded to align with the bigger chunk instead.
|
||||
*/
|
||||
connect?: string | undefined;
|
||||
|
||||
/**
|
||||
* Callback for when stretches of unchanged text are collapsed.
|
||||
*/
|
||||
onCollapse?(mergeView: MergeView, line: number, size: number, mark: CodeMirror.TextMarker<CodeMirror.MarkerRange>): void;
|
||||
|
||||
/**
|
||||
* Provides original version of the document to be shown on the right of the editor.
|
||||
*/
|
||||
orig?: string | undefined;
|
||||
|
||||
/**
|
||||
* Provides original version of the document to be shown on the left of the editor.
|
||||
* To create a 2-way (as opposed to 3-way) merge view, provide only one of origLeft and origRight.
|
||||
*/
|
||||
origLeft?: string | undefined;
|
||||
|
||||
/**
|
||||
* Provides original version of document to be shown on the right of the editor.
|
||||
* To create a 2-way (as opposed to 3-way) merge view, provide only one of origLeft and origRight.
|
||||
*/
|
||||
origRight?: string | undefined;
|
||||
|
||||
/**
|
||||
* Determines whether buttons that allow the user to revert changes are shown. Defaults to true.
|
||||
*/
|
||||
revertButtons?: boolean | undefined;
|
||||
|
||||
revertChunk?: ((
|
||||
mv: MergeView,
|
||||
from: CodeMirror.Editor,
|
||||
fromStart: CodeMirror.Position,
|
||||
fromEnd: CodeMirror.Position,
|
||||
to: CodeMirror.Editor,
|
||||
toStart: CodeMirror.Position,
|
||||
toEnd: CodeMirror.Position
|
||||
) => void) | undefined;
|
||||
|
||||
/**
|
||||
* When true, changed pieces of text are highlighted. Defaults to true.
|
||||
*/
|
||||
showDifferences?: boolean | undefined;
|
||||
}
|
||||
|
||||
declare module '../../' {
|
||||
const MergeView: MergeViewConstructor;
|
||||
|
||||
interface CommandActions {
|
||||
/** Move cursor to the next diff */
|
||||
goNextDiff(cm: Editor): void;
|
||||
|
||||
/** Move cursor to the previous diff */
|
||||
goPrevDiff(cm: Editor): void;
|
||||
}
|
||||
}
|
||||
14
node_modules/@types/codemirror/addon/mode/loadMode.d.ts
generated
vendored
Normal file
14
node_modules/@types/codemirror/addon/mode/loadMode.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
import '../../';
|
||||
|
||||
export interface RequireModeOptions {
|
||||
path?(mode: string): string;
|
||||
loadMode?(file: string, callback: () => void): void;
|
||||
}
|
||||
|
||||
declare module '../../' {
|
||||
let modeURL: string;
|
||||
|
||||
function requireMode(mode: string | { name: string }, callback: () => void, options?: RequireModeOptions): void;
|
||||
|
||||
function autoLoadMode(instance: Editor, mode: string, options?: RequireModeOptions): void;
|
||||
}
|
||||
29
node_modules/@types/codemirror/addon/mode/multiplex.d.ts
generated
vendored
Normal file
29
node_modules/@types/codemirror/addon/mode/multiplex.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
import * as CodeMirror from '../../';
|
||||
|
||||
export interface MultiplexedInnerMode {
|
||||
open: string;
|
||||
close: string;
|
||||
mode: CodeMirror.Mode<any>;
|
||||
parseDelimiters?: boolean | undefined;
|
||||
delimStyle?: string | undefined;
|
||||
innerStyle?: string | undefined;
|
||||
}
|
||||
|
||||
declare module '../../' {
|
||||
/**
|
||||
* Mode combinator that can be used to easily 'multiplex' between several modes.
|
||||
* When given as first argument a mode object, and as other arguments any number of
|
||||
* {open, close, mode [, delimStyle, innerStyle, parseDelimiters]} objects, it will return a mode object that starts parsing
|
||||
* using the mode passed as first argument, but will switch to another mode as soon as it encounters a string that occurs in
|
||||
* one of the open fields of the passed objects. When in a sub-mode, it will go back to the top mode again when the close
|
||||
* string is encountered. Pass "\n" for open or close if you want to switch on a blank line.
|
||||
*
|
||||
* When delimStyle is specified, it will be the token style returned for the delimiter tokens (as well as [delimStyle]-open on
|
||||
* the opening token and [delimStyle]-close on the closing token).
|
||||
* When innerStyle is specified, it will be the token style added for each inner mode token.
|
||||
* When parseDelimiters is true, the content of the delimiters will also be passed to the inner mode. (And delimStyle is ignored.)
|
||||
*
|
||||
* The outer mode will not see the content between the delimiters.
|
||||
*/
|
||||
function multiplexingMode(outer: Mode<any>, ...others: MultiplexedInnerMode[]): Mode<any>;
|
||||
}
|
||||
9
node_modules/@types/codemirror/addon/mode/overlay.d.ts
generated
vendored
Normal file
9
node_modules/@types/codemirror/addon/mode/overlay.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
import '../../';
|
||||
|
||||
declare module '../../' {
|
||||
/**
|
||||
* Mode combinator that can be used to extend a mode with an 'overlay' — a secondary mode is run over the stream,
|
||||
* along with the base mode, and can color specific pieces of text without interfering with the base mode.
|
||||
*/
|
||||
function overlayMode(base: Mode<any>, overlay: Mode<any>, combine?: boolean): Mode<any>;
|
||||
}
|
||||
27
node_modules/@types/codemirror/addon/mode/simple.d.ts
generated
vendored
Normal file
27
node_modules/@types/codemirror/addon/mode/simple.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
import '../../';
|
||||
|
||||
declare module '../../' {
|
||||
// Based on https://codemirror.net/demo/simplemode.html
|
||||
interface Rule {
|
||||
regex?: string | RegExp | undefined;
|
||||
token?: string | string[] | null | undefined;
|
||||
sol?: boolean | undefined;
|
||||
next?: string | undefined;
|
||||
push?: string | undefined;
|
||||
pop?: boolean | undefined;
|
||||
mode?: {
|
||||
spec: string | ModeSpec<any>;
|
||||
end?: RegExp | undefined;
|
||||
persistent?: boolean | undefined;
|
||||
} | undefined;
|
||||
indent?: boolean | undefined;
|
||||
dedent?: boolean | undefined;
|
||||
dedentIfLineStart?: boolean | undefined;
|
||||
}
|
||||
|
||||
function defineSimpleMode<K extends string>(
|
||||
name: string,
|
||||
// eslint-disable-next-line no-unnecessary-generics
|
||||
mode: { [P in K]: P extends 'meta' ? Record<string, any> : Rule[] } & { start: Rule[] },
|
||||
): void;
|
||||
}
|
||||
12
node_modules/@types/codemirror/addon/runmode/colorize.d.ts
generated
vendored
Normal file
12
node_modules/@types/codemirror/addon/runmode/colorize.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
import '../../';
|
||||
|
||||
declare module '../../' {
|
||||
/**
|
||||
* Provides a convenient way to syntax-highlight code snippets in a webpage. Depends on the runmode addon (or its standalone variant).
|
||||
* Can be called with an array (or other array-ish collection) of DOM nodes that represent the code snippets. By default, it'll get all pre tags.
|
||||
* Will read the data-lang attribute of these nodes to figure out their language, and syntax-color their content using the relevant CodeMirror
|
||||
* mode (you'll have to load the scripts for the relevant modes yourself).
|
||||
* A second argument may be provided to give a default mode, used when no language attribute is found for a node.
|
||||
*/
|
||||
function colorize(collection?: ArrayLike<Element>, defaultMode?: string): void;
|
||||
}
|
||||
23
node_modules/@types/codemirror/addon/runmode/runmode.d.ts
generated
vendored
Normal file
23
node_modules/@types/codemirror/addon/runmode/runmode.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
import '../../';
|
||||
|
||||
declare module '../../' {
|
||||
/**
|
||||
* Runs a CodeMirror mode over text without opening an editor instance.
|
||||
*
|
||||
* @param text The document to run through the highlighter.
|
||||
* @param mode The mode to use (must be loaded as normal).
|
||||
* @param callback If this is a function, it will be called for each token with
|
||||
* five arguments, the token's text, the token's style class (may be null for unstyled tokens),
|
||||
* the number of row of the token, the column position of token and the state of mode.
|
||||
* If it is a DOM node, the tokens will be converted to span elements as in an editor,
|
||||
* and inserted into the node (through innerHTML).
|
||||
*/
|
||||
function runMode(
|
||||
text: string,
|
||||
mode: string | ModeSpec<unknown>,
|
||||
callback:
|
||||
| HTMLElement
|
||||
| ((text: string, style?: string | null, row?: number, column?: number, state?: any) => void),
|
||||
options?: { tabSize?: number | undefined; state?: any },
|
||||
): void;
|
||||
}
|
||||
26
node_modules/@types/codemirror/addon/scroll/annotatescrollbar.d.ts
generated
vendored
Normal file
26
node_modules/@types/codemirror/addon/scroll/annotatescrollbar.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
import * as CodeMirror from '../..';
|
||||
import './searchcursor';
|
||||
|
||||
export interface Annotation {
|
||||
clear(): void;
|
||||
/**
|
||||
* Updates the ranges to be highlighted. The array must be sorted.
|
||||
*/
|
||||
update(annotations: Array<{ from: CodeMirror.Position, to: CodeMirror.Position }>): void;
|
||||
}
|
||||
|
||||
export interface AnnotateScrollbarOptions {
|
||||
className: string;
|
||||
scrollButtonHeight?: number | undefined;
|
||||
listenForChanges?: boolean | undefined;
|
||||
}
|
||||
|
||||
declare module '../../' {
|
||||
interface Editor {
|
||||
annotateScrollbar(options: string | AnnotateScrollbarOptions): Annotation;
|
||||
}
|
||||
|
||||
interface EditorConfiguration {
|
||||
scrollButtonHeight?: number | undefined;
|
||||
}
|
||||
}
|
||||
10
node_modules/@types/codemirror/addon/scroll/scrollpastend.d.ts
generated
vendored
Normal file
10
node_modules/@types/codemirror/addon/scroll/scrollpastend.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
import '../../';
|
||||
|
||||
declare module '../../' {
|
||||
interface EditorConfiguration {
|
||||
/**
|
||||
* When the end of the file is reached it allows you to keep scrolling so that your last few lines of code are not stuck at the bottom of the editor.
|
||||
*/
|
||||
scrollPastEnd?: boolean | undefined;
|
||||
}
|
||||
}
|
||||
8
node_modules/@types/codemirror/addon/scroll/simplescrollbars.d.ts
generated
vendored
Normal file
8
node_modules/@types/codemirror/addon/scroll/simplescrollbars.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
import '../../';
|
||||
|
||||
declare module '../../' {
|
||||
interface ScrollbarModels {
|
||||
simple: ScrollbarModelConstructor;
|
||||
overlay: ScrollbarModelConstructor;
|
||||
}
|
||||
}
|
||||
14
node_modules/@types/codemirror/addon/search/jump-to-line.d.ts
generated
vendored
Normal file
14
node_modules/@types/codemirror/addon/search/jump-to-line.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
import '../..';
|
||||
import '../dialog/dialog';
|
||||
|
||||
declare module '../../' {
|
||||
interface CommandActions {
|
||||
jumpToLine(cm: Editor): void;
|
||||
}
|
||||
|
||||
interface EditorConfiguration {
|
||||
search?: {
|
||||
bottom: boolean;
|
||||
} | undefined;
|
||||
}
|
||||
}
|
||||
50
node_modules/@types/codemirror/addon/search/match-highlighter.d.ts
generated
vendored
Normal file
50
node_modules/@types/codemirror/addon/search/match-highlighter.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
// See docs https://codemirror.net/doc/manual.html#addon_match-highlighter
|
||||
|
||||
import '../../';
|
||||
|
||||
declare module '../../' {
|
||||
interface HighlightSelectionMatches {
|
||||
/**
|
||||
* Minimum amount of selected characters that triggers a highlight (default 2).
|
||||
*/
|
||||
minChars?: number | undefined;
|
||||
|
||||
/**
|
||||
* The style to be used to highlight the matches (default "matchhighlight", which will correspond to CSS class cm-matchhighlight).
|
||||
*/
|
||||
style?: string | undefined;
|
||||
|
||||
/**
|
||||
* Controls whether whitespace is trimmed from the selection.
|
||||
*/
|
||||
trim?: boolean | undefined;
|
||||
|
||||
/**
|
||||
* Can be set to true or to a regexp matching the characters that make up a word.
|
||||
*/
|
||||
showToken?: boolean | RegExp | undefined;
|
||||
|
||||
/**
|
||||
* Used to specify how much time to wait, in milliseconds, before highlighting the matches (default is 100).
|
||||
*/
|
||||
delay?: number | undefined;
|
||||
|
||||
/**
|
||||
* If wordsOnly is enabled, the matches will be highlighted only if the selected text is a word.
|
||||
*/
|
||||
wordsOnly?: boolean | undefined;
|
||||
|
||||
/**
|
||||
* If annotateScrollbar is enabled, the occurences will be highlighted on the scrollbar via the matchesonscrollbar addon.
|
||||
*/
|
||||
annotateScrollbar?: boolean | undefined;
|
||||
}
|
||||
|
||||
interface EditorConfiguration {
|
||||
/**
|
||||
* Adds a highlightSelectionMatches option that can be enabled to highlight all instances of a currently selected word.
|
||||
* When enabled, it causes the current word to be highlighted when nothing is selected (defaults to off).
|
||||
*/
|
||||
highlightSelectionMatches?: HighlightSelectionMatches | boolean | undefined;
|
||||
}
|
||||
}
|
||||
12
node_modules/@types/codemirror/addon/search/matchesonscrollbar.d.ts
generated
vendored
Normal file
12
node_modules/@types/codemirror/addon/search/matchesonscrollbar.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
import '../..';
|
||||
import './searchcursor';
|
||||
|
||||
export interface SearchAnnotation {
|
||||
clear(): void;
|
||||
}
|
||||
|
||||
declare module '../../' {
|
||||
interface Editor {
|
||||
showMatchesOnScrollbar(query: string | RegExp, caseFold?: boolean, className?: string): SearchAnnotation;
|
||||
}
|
||||
}
|
||||
23
node_modules/@types/codemirror/addon/search/search.d.ts
generated
vendored
Normal file
23
node_modules/@types/codemirror/addon/search/search.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
import '../../';
|
||||
import './searchcursor';
|
||||
import '../dialog/dialog';
|
||||
|
||||
declare module '../../' {
|
||||
interface CommandActions {
|
||||
find(cm: Editor): void;
|
||||
findPersistent(cm: Editor): void;
|
||||
findPersistentNext(cm: Editor): void;
|
||||
findPersistentPrev(cm: Editor): void;
|
||||
findNext(cm: Editor): void;
|
||||
findPrev(cm: Editor): void;
|
||||
clearSearch(cm: Editor): void;
|
||||
replace(cm: Editor): void;
|
||||
replaceAll(cm: Editor): void;
|
||||
}
|
||||
|
||||
interface EditorConfiguration {
|
||||
search?: {
|
||||
bottom: boolean;
|
||||
} | undefined;
|
||||
}
|
||||
}
|
||||
53
node_modules/@types/codemirror/addon/search/searchcursor.d.ts
generated
vendored
Normal file
53
node_modules/@types/codemirror/addon/search/searchcursor.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
import '../../';
|
||||
|
||||
declare module '../../' {
|
||||
interface DocOrEditor {
|
||||
/**
|
||||
* This method can be used to implement search/replace functionality.
|
||||
* `query`: This can be a regular * expression or a string (only strings will match across lines -
|
||||
* if they contain newlines).
|
||||
* `start`: This provides the starting position of the search. It can be a `{line, ch} object,
|
||||
* or can be left off to default to the start of the document
|
||||
* `caseFold`: This is only relevant when matching a string. IT will cause the search to be case-insenstive
|
||||
*/
|
||||
getSearchCursor(query: string | RegExp, start?: Position, caseFold?: boolean): SearchCursor;
|
||||
}
|
||||
|
||||
interface SearchCursor {
|
||||
/**
|
||||
* Searches forward or backward from the current position. The return value indicates whether a match was
|
||||
* found. If matching a regular expression, the return value will be the array returned by the match method, in case
|
||||
* you want to extract matched groups
|
||||
*/
|
||||
find(reverse: boolean): boolean | RegExpMatchArray;
|
||||
|
||||
/**
|
||||
* Searches forward from the current position. The return value indicates whether a match was
|
||||
* found. If matching a regular expression, the return value will be the array returned by the match method, in case
|
||||
* you want to extract matched groups
|
||||
*/
|
||||
findNext(): boolean | RegExpMatchArray;
|
||||
|
||||
/**
|
||||
* Searches backward from the current position. The return value indicates whether a match was
|
||||
* found. If matching a regular expression, the return value will be the array returned by the match method, in case
|
||||
* you want to extract matched groups
|
||||
*/
|
||||
findPrevious(): boolean | RegExpMatchArray;
|
||||
|
||||
/**
|
||||
* Only valid when the last call to find, findNext, or findPrevious did not return false. Returns {line, ch}
|
||||
* objects pointing the start of the match.
|
||||
*/
|
||||
from(): Position;
|
||||
|
||||
/**
|
||||
* Only valid when the last call to find, findNext, or findPrevious did not return false. Returns {line, ch}
|
||||
* objects pointing the end of the match.
|
||||
*/
|
||||
to(): Position;
|
||||
|
||||
/** Replaces the currently found match with the given text and adjusts the cursor position to reflect the deplacement. */
|
||||
replace(text: string, origin?: string): void;
|
||||
}
|
||||
}
|
||||
18
node_modules/@types/codemirror/addon/selection/active-line.d.ts
generated
vendored
Normal file
18
node_modules/@types/codemirror/addon/selection/active-line.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
import '../../';
|
||||
|
||||
declare module '../../' {
|
||||
interface StyleActiveLine {
|
||||
/**
|
||||
* Controls whether single-line selections, or just cursor selections, are styled. Defaults to false (only cursor selections).
|
||||
*/
|
||||
nonEmpty: boolean;
|
||||
}
|
||||
|
||||
interface EditorConfiguration {
|
||||
/**
|
||||
* When enabled gives the wrapper of the line that contains the cursor the class CodeMirror-activeline,
|
||||
* adds a background with the class CodeMirror-activeline-background, and adds the class CodeMirror-activeline-gutter to the line's gutter space is enabled.
|
||||
*/
|
||||
styleActiveLine?: StyleActiveLine | boolean | undefined;
|
||||
}
|
||||
}
|
||||
11
node_modules/@types/codemirror/addon/selection/mark-selection.d.ts
generated
vendored
Normal file
11
node_modules/@types/codemirror/addon/selection/mark-selection.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
import '../../';
|
||||
|
||||
declare module '../../' {
|
||||
interface EditorConfiguration {
|
||||
/**
|
||||
* Causes the selected text to be marked with the CSS class CodeMirror-selectedtext or a custom class when the styleSelectedText option is enabled.
|
||||
* Useful to change the colour of the selection (in addition to the background).
|
||||
*/
|
||||
styleSelectedText?: boolean | string | undefined;
|
||||
}
|
||||
}
|
||||
11
node_modules/@types/codemirror/addon/selection/selection-pointer.d.ts
generated
vendored
Normal file
11
node_modules/@types/codemirror/addon/selection/selection-pointer.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
import '../../';
|
||||
|
||||
declare module '../../' {
|
||||
interface EditorConfiguration {
|
||||
/**
|
||||
* Controls the mouse cursor appearance when hovering over the selection. It can be set to a string, like "pointer", or to true,
|
||||
* in which case the "default" (arrow) cursor will be used.
|
||||
*/
|
||||
selectionPointer?: boolean | string | undefined;
|
||||
}
|
||||
}
|
||||
105
node_modules/@types/codemirror/addon/tern/tern.d.ts
generated
vendored
Normal file
105
node_modules/@types/codemirror/addon/tern/tern.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,105 @@
|
|||
// See docs https://codemirror.net/doc/manual.html#addon_tern and https://codemirror.net/addon/tern/tern.js (comments in the beginning of the file)
|
||||
// Docs for tern itself might also be helpful: http://ternjs.net/doc/manual.html
|
||||
|
||||
import * as Tern from 'tern';
|
||||
import '../../';
|
||||
|
||||
declare module '../../' {
|
||||
class TernServer {
|
||||
constructor(options?: TernOptions);
|
||||
|
||||
readonly options: TernOptions;
|
||||
readonly docs: {
|
||||
readonly [key: string]: {
|
||||
doc: Doc;
|
||||
name: string;
|
||||
changed: {
|
||||
from: number;
|
||||
to: number;
|
||||
} | null;
|
||||
};
|
||||
};
|
||||
readonly server: Tern.Server;
|
||||
addDoc(
|
||||
name: string,
|
||||
doc: Doc,
|
||||
): { doc: Doc; name: string; changed: { from: number; to: number } | null };
|
||||
delDoc(id: string | Editor | Doc): void;
|
||||
hideDoc(id: string | Editor | Doc): void;
|
||||
complete(cm: Editor): void;
|
||||
showType(cm: Editor, pos?: Position, callback?: () => void): void;
|
||||
showDocs(cm: Editor, pos?: Position, callback?: () => void): void;
|
||||
updateArgHints(cm: Editor): void;
|
||||
jumpToDef(cm: Editor): void;
|
||||
jumpBack(cm: Editor): void;
|
||||
rename(cm: Editor): void;
|
||||
selectName(cm: Editor): void;
|
||||
request<Q extends Tern.Query>(
|
||||
cm: Doc,
|
||||
query: Q,
|
||||
callback: (error?: Error, data?: Tern.QueryResult<Q>) => void,
|
||||
pos?: Position,
|
||||
): void;
|
||||
request<Q extends Tern.Query['type']>(
|
||||
cm: Doc,
|
||||
query: Q,
|
||||
callback: (error?: Error, data?: Tern.QueryRegistry[Q]['result']) => void,
|
||||
pos?: Position,
|
||||
): void;
|
||||
destroy(): void;
|
||||
}
|
||||
|
||||
interface TernOptions {
|
||||
/** An object mapping plugin names to configuration options. */
|
||||
plugins?: Tern.ConstructorOptions['plugins'] | undefined;
|
||||
/** An array of JSON definition data structures. */
|
||||
defs?: Tern.Def[] | undefined;
|
||||
/**
|
||||
* Can be used to access files in
|
||||
* the project that haven't been loaded yet. Simply do callback(null) to
|
||||
* indicate that a file is not available.
|
||||
*/
|
||||
getFile?(name: string, callback: (docValue: string | null) => any): any;
|
||||
/**
|
||||
* This function will be applied
|
||||
* to documents before passing them on to Tern.
|
||||
*/
|
||||
fileFilter?(value: string, docName: string, doc: Doc): string;
|
||||
/** This function should, when providing a multi-file view, switch the view or focus to the named file. */
|
||||
switchToDoc?(name: string, doc: Doc): void;
|
||||
/** Can be used to override the way errors are displayed. */
|
||||
showError?(editor: Editor, message: Error | string): void;
|
||||
/**
|
||||
* Customize the content in tooltips for completions.
|
||||
* Is passed a single argument — the completion's data as returned by
|
||||
* Tern — and may return a string, DOM node, or null to indicate that
|
||||
* no tip should be shown. By default the docstring is shown.
|
||||
*/
|
||||
completionTip?(data: Tern.CompletionsQueryResult): string | HTMLElement | null;
|
||||
/** Like completionTip, but for the tooltips shown for type queries. */
|
||||
typeTip?(data: Tern.TypeQueryResult): string | HTMLElement | null;
|
||||
/** This function will be applied to the Tern responses before treating them */
|
||||
responseFilter?<Q extends Tern.Query>(
|
||||
doc: Doc,
|
||||
query: Q,
|
||||
request: Tern.Document,
|
||||
error: Error | undefined,
|
||||
data: Tern.QueryResult<Q> | undefined,
|
||||
): Tern.QueryResult<Q> | undefined;
|
||||
/**
|
||||
* Set to true to enable web worker mode. You'll probably
|
||||
* want to feature detect the actual value you use here, for example
|
||||
* !!window.Worker.
|
||||
*/
|
||||
useWorker?: boolean | undefined;
|
||||
/** The main script of the worker. Point this to wherever you are hosting worker.js from this directory. */
|
||||
workerScript?: string | undefined;
|
||||
/**
|
||||
* An array of paths pointing (relative to workerScript)
|
||||
* to the Acorn and Tern libraries and any Tern plugins you want to
|
||||
* load. Or, if you minified those into a single script and included
|
||||
* them in the workerScript, simply leave this undefined.
|
||||
*/
|
||||
workerDeps?: string[] | undefined;
|
||||
}
|
||||
}
|
||||
25
node_modules/@types/codemirror/addon/wrap/hardwrap.d.ts
generated
vendored
Normal file
25
node_modules/@types/codemirror/addon/wrap/hardwrap.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
import '../../';
|
||||
|
||||
export interface HardwrapOptions {
|
||||
column?: number | undefined;
|
||||
paragraphStart?: RegExp | undefined;
|
||||
paragraphEnd?: RegExp | undefined;
|
||||
wrapOn?: RegExp | undefined;
|
||||
killTrailingSpace?: boolean | undefined;
|
||||
forceBreak?: boolean | undefined;
|
||||
}
|
||||
|
||||
declare module '../../' {
|
||||
interface CommandActions {
|
||||
wrapLines(cm: Editor): void;
|
||||
}
|
||||
|
||||
interface Editor {
|
||||
/** Wraps the paragraph at the given position. If pos is not given, it defaults to the cursor position. */
|
||||
wrapParagraph(pos?: Position, options?: HardwrapOptions): void;
|
||||
/** Wraps the given range as one big paragraph. */
|
||||
wrapRange(from: Position, to: Position, options?: HardwrapOptions): void;
|
||||
/** Wraps the paragraphs in (and overlapping with) the given range individually. */
|
||||
wrapParagraphsInRange(from: Position, to: Position, options?: HardwrapOptions): void;
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue