Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ test/thirdparty/jasmine-reporters
/src/thirdparty/bugsnag-performance.min.js.map
/src/thirdparty/no-minify/
/src/thirdparty/xterm
/src/thirdparty/cspell-dicts

# ignore files copied from node_modules to src/thirdparty
# https://github.com/phcode-dev/phoenix/issues/10
Expand Down
12 changes: 12 additions & 0 deletions docs/API-Reference/command/Commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,18 @@ Opens the terminal panel
## VIEW\_ENABLE\_AI
Toggles whether AI features are enabled

**Kind**: global variable
<a name="VIEW_TOGGLE_SPELL_CHECK"></a>

## VIEW\_TOGGLE\_SPELL\_CHECK
Toggles the spell checker

**Kind**: global variable
<a name="VIEW_TOGGLE_SPELLING_PANEL"></a>

## VIEW\_TOGGLE\_SPELLING\_PANEL
Toggles the spelling panel visibility

**Kind**: global variable
<a name="TOGGLE_LINE_NUMBERS"></a>

Expand Down
1 change: 1 addition & 0 deletions docs/API-Reference/features/TaskManager.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ like `showStopIcon`, `hideStopIcon`, etc.
| [options.onRetryClick] | <code>function</code> | | Callback function triggered when the retry button is clicked. |
| [options.onSelect] | <code>function</code> | | Callback function triggered when the task is selected from the dropdown. |
| [options.progressPercent] | <code>number</code> | | Initial progress percentage of the task. |
| [options.hideProgressBar] | <code>boolean</code> | | Hide progress for tasks waiting on a user action. |
| [options.noSpinnerNotification] | <code>boolean</code> | | If set to true, will not show the task spinners for this task. This can be used for silent background tasks where user attention is not needed. |

**Example**
Expand Down
3 changes: 2 additions & 1 deletion docs/API-Reference/utils/DragAndDrop.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ Returns true if the drag and drop items contains valid drop objects.
<a name="openDroppedFiles"></a>

## openDroppedFiles(paths) ⇒ <code>Promise</code>
Open dropped files
Open dropped files in order so the last file becomes active, regardless of load times.
Continue processing the remaining paths if an earlier file cannot be opened.

**Kind**: global function
**Returns**: <code>Promise</code> - Promise that is resolved if all files are opened, or rejected
Expand Down
1 change: 1 addition & 0 deletions gulpfile.js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,7 @@ const ALLOWED_EXTENSIONS_TO_CACHE = ["js", "html", "htm", "xml", "xhtml", "mjs",
"txt", "otf",
"json", "config",
"zip",
"gz", "trie",
"png", "svg", "jpg", "jpeg", "gif", "ico", "webp",
"mustache", "md", "markdown"];
const DISALLOWED_EXTENSIONS_TO_CACHE = ["map", "nuspec", "partial", "pre", "post",
Expand Down
90 changes: 90 additions & 0 deletions gulpfile.js/thirdparty-lib-copy.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,89 @@ function _getConfigJSON() {
return JSON.parse(fs.readFileSync(configPath, "utf8"));
}


// cspell dictionaries for the Phoenix Pro spell checker, copied to src/thirdparty/cspell-dicts/<id>/
const CSPELL_DICTIONARIES = {
"en_US": ["node_modules/@cspell/dict-en_us/en_US.trie.gz"],
"en_GB": ["node_modules/@cspell/dict-en-gb/en_GB.trie.gz"],
"software-terms": [
"node_modules/@cspell/dict-software-terms/dict/softwareTerms.txt.gz",
"node_modules/@cspell/dict-software-terms/dict/software-tools.txt",
"node_modules/@cspell/dict-software-terms/dict/networkingTerms.txt",
"node_modules/@cspell/dict-software-terms/dict/webServices.txt",
"node_modules/@cspell/dict-software-terms/dict/computing-acronyms.txt",
"node_modules/@cspell/dict-software-terms/dict/coding-compound-terms.txt"
],
"companies": ["node_modules/@cspell/dict-companies/dict/companies.txt"],
"fonts": ["node_modules/@cspell/dict-fonts/dict/fonts.txt"],
"filetypes": ["node_modules/@cspell/dict-filetypes/filetypes.txt.gz"],
"fullstack": ["node_modules/@cspell/dict-fullstack/dict/fullstack.txt"],
"lorem-ipsum": ["node_modules/@cspell/dict-lorem-ipsum/dict/lorem.txt"],
"html": ["node_modules/@cspell/dict-html/dict/html.txt.gz"],
"html-symbol-entities": ["node_modules/@cspell/dict-html-symbol-entities/dict/entities.txt.gz"],
"css": ["node_modules/@cspell/dict-css/dict/css.txt"],
"typescript": ["node_modules/@cspell/dict-typescript/dict/typescript.txt"],
"node": ["node_modules/@cspell/dict-node/dict/node.txt"],
"npm": ["node_modules/@cspell/dict-npm/dict/npm.txt"],
"git": ["node_modules/@cspell/dict-git/dict/git-terms.txt"],
"markdown": ["node_modules/@cspell/dict-markdown/markdown.txt.gz"],
"python": [
"node_modules/@cspell/dict-python/dict/python.txt",
"node_modules/@cspell/dict-python/dict/python-common.txt"
],
"java": ["node_modules/@cspell/dict-java/dict/java.trie"],
"php": ["node_modules/@cspell/dict-php/dict/php.txt"],
"cpp": [
"node_modules/@cspell/dict-cpp/dict/cpp.txt.gz",
"node_modules/@cspell/dict-cpp/dict/cpp-refined.txt.gz",
"node_modules/@cspell/dict-cpp/dict/cpp-legacy.txt.gz",
"node_modules/@cspell/dict-cpp/dict/cpp-compound-words.txt.gz"
],
"golang": ["node_modules/@cspell/dict-golang/dict/go.txt"],
"rust": [
"node_modules/@cspell/dict-rust/dict/rust.txt.gz",
"node_modules/@cspell/dict-rust/dict/crates.txt.gz"
],
"csharp": ["node_modules/@cspell/dict-csharp/dict/csharp.txt.gz"],
"shell": ["node_modules/@cspell/dict-shell/dict/shell-all-words.txt"],
"sql": ["node_modules/@cspell/dict-sql/sql.txt.gz"],
"docker": ["node_modules/@cspell/dict-docker/dict/docker-words.txt.gz"],
"ruby": [
"node_modules/@cspell/dict-ruby/dict/ruby.txt",
"node_modules/@cspell/dict-ruby/dict/gems.txt"
]
};

function _copyCSpellDictionaries() {
return new Promise((resolve) => {
const destRoot = "src/thirdparty/cspell-dicts";
const licenceChunks = [];
const seenPackages = new Set();
fs.rmSync(destRoot, { recursive: true, force: true });
for (const [id, files] of Object.entries(CSPELL_DICTIONARIES)) {
const destDir = path.join(destRoot, id);
fs.mkdirSync(destDir, { recursive: true });
for (const file of files) {
console.log(`Copying cspell dictionary ${file} to ${destDir}`);
fs.copyFileSync(file, path.join(destDir, path.basename(file)));
const packageDir = file.split("/").slice(0, 3).join("/");
if (seenPackages.has(packageDir)) {
continue;
}
seenPackages.add(packageDir);
const packageJSON = JSON.parse(fs.readFileSync(path.join(packageDir, "package.json"), "utf8"));
const licenceFile = ["LICENSE", "LICENSE.md", "COPYING"].map(name => path.join(packageDir, name))
.find(candidate => fs.existsSync(candidate));
const licenceText = licenceFile ? fs.readFileSync(licenceFile, "utf8") : "";
licenceChunks.push(`## ${packageJSON.name} ${packageJSON.version}\n\n${licenceText.trim()}\n`);
}
}
fs.writeFileSync("src/thirdparty/licences/cspell-dictionaries.markdown",
`# cspell dictionaries\n\n${licenceChunks.join("\n")}`);
resolve();
});
}

/**
* Add thirdparty libs copied to gitignore except the licence file.
*/
Expand Down Expand Up @@ -255,6 +338,13 @@ let copyThirdPartyLibs = series(
copyLicence.bind(copyLicence, 'node_modules/jasmine-reporters/LICENSE', 'jasmine-reporters'),
// lmdb
copyLicence.bind(copyLicence, 'node_modules/lmdb/LICENSE', 'lmdb'),
// cspell trie engine + fflate (gzip) used by the Phoenix Pro spell checker worker. ES modules, so no-minify.
renameFile.bind(renameFile, 'node_modules/cspell-trie-lib/dist/index.js', 'cspell-trie-lib.js',
'src/thirdparty/no-minify/cspell'),
copyLicence.bind(copyLicence, 'node_modules/cspell-trie-lib/LICENSE', 'cspell-trie-lib'),
renameFile.bind(renameFile, 'node_modules/fflate/esm/browser.js', 'fflate.js', 'src/thirdparty/no-minify/cspell'),
copyLicence.bind(copyLicence, 'node_modules/fflate/LICENSE', 'fflate'),
_copyCSpellDictionaries,
// xterm.js terminal emulator (@xterm/* scoped packages, v6)
copyFiles.bind(copyFiles, ['node_modules/@xterm/xterm/lib/xterm.js',
'node_modules/@xterm/xterm/lib/xterm.js.map'], 'src/thirdparty/xterm'),
Expand Down
Loading
Loading