From a1d840c1514a2a75f6b2664ecb594039e1c42973 Mon Sep 17 00:00:00 2001 From: tjcouch-sil Date: Fri, 4 Oct 2024 12:54:29 -0500 Subject: [PATCH 1/6] Removed platform-scripture-editor and adjusted git scripts to prepare to pull template --- extensions/lib/git.util.ts | 2 +- .../platform-scripture-editor/.editorconfig | 16 - .../platform-scripture-editor/.eslintignore | 35 - .../platform-scripture-editor/.eslintrc.js | 163 -- .../src/platform-scripture-editor/.gitignore | 33 - .../platform-scripture-editor/.prettierignore | 35 - .../platform-scripture-editor/.prettierrc.js | 19 - .../.stylelintignore | 35 - .../platform-scripture-editor/.stylelintrc.js | 22 - .../.vscode/extensions.json | 9 - .../.vscode/launch.json | 72 - .../.vscode/settings.json | 57 - .../src/platform-scripture-editor/LICENSE | 21 - .../src/platform-scripture-editor/README.md | 85 - .../assets/images/icons/1-square.svg | 4 - .../assets/images/icons/2-square.svg | 4 - .../assets/images/icons/3-square.svg | 4 - .../assets/images/icons/4-square.svg | 4 - .../assets/images/icons/LICENSE.md | 5 - .../assets/images/icons/arrow-clockwise.svg | 1 - .../images/icons/arrow-counterclockwise.svg | 1 - .../assets/images/icons/ban.svg | 3 - .../assets/images/icons/bookmark.svg | 3 - .../assets/images/icons/chat-left-text.svg | 1 - .../assets/images/icons/chat-square-quote.svg | 1 - .../assets/images/icons/chevron-down.svg | 1 - .../assets/images/icons/code.svg | 1 - .../assets/images/icons/comments.svg | 1 - .../assets/images/icons/file-earmark.svg | 3 - .../assets/images/icons/justify.svg | 1 - .../assets/images/icons/link.svg | 1 - .../assets/images/icons/list-ol.svg | 1 - .../assets/images/icons/list-ul.svg | 1 - .../assets/images/icons/pencil-fill.svg | 1 - .../assets/images/icons/send.svg | 1 - .../assets/images/icons/text-center.svg | 1 - .../assets/images/icons/text-left.svg | 1 - .../assets/images/icons/text-paragraph.svg | 1 - .../assets/images/icons/text-right.svg | 1 - .../assets/images/icons/trash3.svg | 1 - .../assets/images/icons/type-bold.svg | 1 - .../assets/images/icons/type-h1.svg | 1 - .../assets/images/icons/type-h2.svg | 1 - .../assets/images/icons/type-h3.svg | 3 - .../assets/images/icons/type-italic.svg | 1 - .../images/icons/type-strikethrough.svg | 1 - .../assets/images/icons/type-underline.svg | 1 - .../contributions/localizedStrings.json | 25 - .../contributions/menus.json | 125 - .../contributions/projectSettings.json | 1 - .../contributions/settings.json | 1 - .../src/platform-scripture-editor/cspell.json | 3 - .../platform-scripture-editor/manifest.json | 14 - .../platform-scripture-editor/package.json | 88 - .../src/_commenting.scss | 560 ---- .../src/_editor-overrides.scss | 447 ---- .../src/_editor.scss | 858 ------ .../src/_usj-nodes.scss | 2316 ----------------- .../src/platform-scripture-editor/src/main.ts | 157 -- .../platform-scripture-editor.web-view.scss | 38 - .../platform-scripture-editor.web-view.tsx | 195 -- .../src/types/platform-scripture-editor.d.ts | 29 - .../src/webpack-env.d.ts | 157 -- .../platform-scripture-editor/tsconfig.json | 54 - .../tsconfig.lint.json | 4 - .../webpack.config.ts | 15 - .../web-view-resolve-webpack-plugin.ts | 116 - .../webpack/webpack.config.base.ts | 159 -- .../webpack/webpack.config.main.ts | 69 - .../webpack/webpack.config.web-view.ts | 24 - .../webpack/webpack.util.ts | 77 - 71 files changed, 1 insertion(+), 6192 deletions(-) delete mode 100644 extensions/src/platform-scripture-editor/.editorconfig delete mode 100644 extensions/src/platform-scripture-editor/.eslintignore delete mode 100644 extensions/src/platform-scripture-editor/.eslintrc.js delete mode 100644 extensions/src/platform-scripture-editor/.gitignore delete mode 100644 extensions/src/platform-scripture-editor/.prettierignore delete mode 100644 extensions/src/platform-scripture-editor/.prettierrc.js delete mode 100644 extensions/src/platform-scripture-editor/.stylelintignore delete mode 100644 extensions/src/platform-scripture-editor/.stylelintrc.js delete mode 100644 extensions/src/platform-scripture-editor/.vscode/extensions.json delete mode 100644 extensions/src/platform-scripture-editor/.vscode/launch.json delete mode 100644 extensions/src/platform-scripture-editor/.vscode/settings.json delete mode 100644 extensions/src/platform-scripture-editor/LICENSE delete mode 100644 extensions/src/platform-scripture-editor/README.md delete mode 100644 extensions/src/platform-scripture-editor/assets/images/icons/1-square.svg delete mode 100644 extensions/src/platform-scripture-editor/assets/images/icons/2-square.svg delete mode 100644 extensions/src/platform-scripture-editor/assets/images/icons/3-square.svg delete mode 100644 extensions/src/platform-scripture-editor/assets/images/icons/4-square.svg delete mode 100644 extensions/src/platform-scripture-editor/assets/images/icons/LICENSE.md delete mode 100644 extensions/src/platform-scripture-editor/assets/images/icons/arrow-clockwise.svg delete mode 100644 extensions/src/platform-scripture-editor/assets/images/icons/arrow-counterclockwise.svg delete mode 100644 extensions/src/platform-scripture-editor/assets/images/icons/ban.svg delete mode 100644 extensions/src/platform-scripture-editor/assets/images/icons/bookmark.svg delete mode 100644 extensions/src/platform-scripture-editor/assets/images/icons/chat-left-text.svg delete mode 100644 extensions/src/platform-scripture-editor/assets/images/icons/chat-square-quote.svg delete mode 100644 extensions/src/platform-scripture-editor/assets/images/icons/chevron-down.svg delete mode 100644 extensions/src/platform-scripture-editor/assets/images/icons/code.svg delete mode 100644 extensions/src/platform-scripture-editor/assets/images/icons/comments.svg delete mode 100644 extensions/src/platform-scripture-editor/assets/images/icons/file-earmark.svg delete mode 100644 extensions/src/platform-scripture-editor/assets/images/icons/justify.svg delete mode 100644 extensions/src/platform-scripture-editor/assets/images/icons/link.svg delete mode 100644 extensions/src/platform-scripture-editor/assets/images/icons/list-ol.svg delete mode 100644 extensions/src/platform-scripture-editor/assets/images/icons/list-ul.svg delete mode 100644 extensions/src/platform-scripture-editor/assets/images/icons/pencil-fill.svg delete mode 100644 extensions/src/platform-scripture-editor/assets/images/icons/send.svg delete mode 100644 extensions/src/platform-scripture-editor/assets/images/icons/text-center.svg delete mode 100644 extensions/src/platform-scripture-editor/assets/images/icons/text-left.svg delete mode 100644 extensions/src/platform-scripture-editor/assets/images/icons/text-paragraph.svg delete mode 100644 extensions/src/platform-scripture-editor/assets/images/icons/text-right.svg delete mode 100644 extensions/src/platform-scripture-editor/assets/images/icons/trash3.svg delete mode 100644 extensions/src/platform-scripture-editor/assets/images/icons/type-bold.svg delete mode 100644 extensions/src/platform-scripture-editor/assets/images/icons/type-h1.svg delete mode 100644 extensions/src/platform-scripture-editor/assets/images/icons/type-h2.svg delete mode 100644 extensions/src/platform-scripture-editor/assets/images/icons/type-h3.svg delete mode 100644 extensions/src/platform-scripture-editor/assets/images/icons/type-italic.svg delete mode 100644 extensions/src/platform-scripture-editor/assets/images/icons/type-strikethrough.svg delete mode 100644 extensions/src/platform-scripture-editor/assets/images/icons/type-underline.svg delete mode 100644 extensions/src/platform-scripture-editor/contributions/localizedStrings.json delete mode 100644 extensions/src/platform-scripture-editor/contributions/menus.json delete mode 100644 extensions/src/platform-scripture-editor/contributions/projectSettings.json delete mode 100644 extensions/src/platform-scripture-editor/contributions/settings.json delete mode 100644 extensions/src/platform-scripture-editor/cspell.json delete mode 100644 extensions/src/platform-scripture-editor/manifest.json delete mode 100644 extensions/src/platform-scripture-editor/package.json delete mode 100644 extensions/src/platform-scripture-editor/src/_commenting.scss delete mode 100644 extensions/src/platform-scripture-editor/src/_editor-overrides.scss delete mode 100644 extensions/src/platform-scripture-editor/src/_editor.scss delete mode 100644 extensions/src/platform-scripture-editor/src/_usj-nodes.scss delete mode 100644 extensions/src/platform-scripture-editor/src/main.ts delete mode 100644 extensions/src/platform-scripture-editor/src/platform-scripture-editor.web-view.scss delete mode 100644 extensions/src/platform-scripture-editor/src/platform-scripture-editor.web-view.tsx delete mode 100644 extensions/src/platform-scripture-editor/src/types/platform-scripture-editor.d.ts delete mode 100644 extensions/src/platform-scripture-editor/src/webpack-env.d.ts delete mode 100644 extensions/src/platform-scripture-editor/tsconfig.json delete mode 100644 extensions/src/platform-scripture-editor/tsconfig.lint.json delete mode 100644 extensions/src/platform-scripture-editor/webpack.config.ts delete mode 100644 extensions/src/platform-scripture-editor/webpack/web-view-resolve-webpack-plugin.ts delete mode 100644 extensions/src/platform-scripture-editor/webpack/webpack.config.base.ts delete mode 100644 extensions/src/platform-scripture-editor/webpack/webpack.config.main.ts delete mode 100644 extensions/src/platform-scripture-editor/webpack/webpack.config.web-view.ts delete mode 100644 extensions/src/platform-scripture-editor/webpack/webpack.util.ts diff --git a/extensions/lib/git.util.ts b/extensions/lib/git.util.ts index 116667ddfc..1961f79178 100644 --- a/extensions/lib/git.util.ts +++ b/extensions/lib/git.util.ts @@ -17,7 +17,7 @@ export const SINGLE_TEMPLATE_NAME = 'paranext-extension-template'; /** The url for the single extension template remote as used in the git scripts */ export const SINGLE_TEMPLATE_URL = 'https://github.com/paranext/paranext-extension-template'; /** The branch to use in pulling changes from `SINGLE_TEMPLATE_REMOTE_NAME` in the git scripts */ -export const SINGLE_TEMPLATE_BRANCH = 'main'; +export const SINGLE_TEMPLATE_BRANCH = '5680aa4cd42d57e7da98a0c356e21c8a6bcc741c'; // #region localization diff --git a/extensions/src/platform-scripture-editor/.editorconfig b/extensions/src/platform-scripture-editor/.editorconfig deleted file mode 100644 index f4575f84f2..0000000000 --- a/extensions/src/platform-scripture-editor/.editorconfig +++ /dev/null @@ -1,16 +0,0 @@ -root = true - -[*] -indent_style = space -indent_size = 2 -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true -max_line_length = 100 - -[*.md] -trim_trailing_whitespace = false - -[*.cs] -indent_size = 4 diff --git a/extensions/src/platform-scripture-editor/.eslintignore b/extensions/src/platform-scripture-editor/.eslintignore deleted file mode 100644 index bdb2e12c0b..0000000000 --- a/extensions/src/platform-scripture-editor/.eslintignore +++ /dev/null @@ -1,35 +0,0 @@ -# #region shared with https://github.com/paranext/paranext-multi-extension-template/blob/main/.eslintignore - -# Please keep this file in sync with .prettierignore and .stylelintignore - -# Logs -logs -*.log - -# Runtime data -pids -*.pid -*.seed - -# Dependency directory -# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git -node_modules - -# OSX -.DS_Store - -.idea -npm-debug.log.* -*.css.d.ts -*.sass.d.ts -*.scss.d.ts - -# Built files -dist -release -temp-build - -# generated files -package-lock.json - -# #endregion diff --git a/extensions/src/platform-scripture-editor/.eslintrc.js b/extensions/src/platform-scripture-editor/.eslintrc.js deleted file mode 100644 index 279bb37dcd..0000000000 --- a/extensions/src/platform-scripture-editor/.eslintrc.js +++ /dev/null @@ -1,163 +0,0 @@ -// #region shared with https://github.com/paranext/paranext-multi-extension-template/blob/main/.eslintrc.cjs - -module.exports = { - extends: [ - // https://github.com/electron-react-boilerplate/eslint-config-erb/blob/main/index.js - // airbnb rules are embedded in erb https://github.com/airbnb/javascript/tree/master/packages/eslint-config-airbnb - 'erb', - // Make sure this is last so it gets the chance to override other configs. - // See https://github.com/prettier/eslint-config-prettier and https://github.com/prettier/eslint-plugin-prettier - 'plugin:prettier/recommended', - ], - - rules: { - // Some rules in this following shared region are not applied since they are overridden in subsequent regions - // #region shared with https://github.com/paranext/paranext-core/blob/main/.eslintrc.js except certain overrides - - // #region ERB rules - - 'import/extensions': 'off', - // A temporary hack related to IDE not resolving correct package.json - 'import/no-extraneous-dependencies': 'off', - 'import/no-import-module-exports': 'off', - 'import/no-unresolved': 'error', - 'react/jsx-filename-extension': 'off', - 'react/react-in-jsx-scope': 'off', - - // #endregion - - // #region Platform.Bible rules - - // Rules in each section are generally in alphabetical order. However, several - // `@typescript-eslint` rules require disabling the equivalent ESLint rule. So in these cases - // each ESLint rule is turned off immediately above the corresponding `@typescript-eslint` rule. - 'import/no-anonymous-default-export': ['error', { allowCallExpression: false }], - '@typescript-eslint/explicit-member-accessibility': ['error', { accessibility: 'no-public' }], - 'lines-between-class-members': 'off', - '@typescript-eslint/lines-between-class-members': [ - 'error', - 'always', - { exceptAfterSingleLine: true, exceptAfterOverload: true }, - ], - '@typescript-eslint/member-ordering': 'error', - 'no-empty-function': 'off', - '@typescript-eslint/no-empty-function': [ - 'error', - { - allow: ['arrowFunctions', 'functions', 'methods'], - }, - ], - '@typescript-eslint/no-explicit-any': 'error', - 'no-redeclare': 'off', - '@typescript-eslint/no-redeclare': 'error', - 'no-restricted-imports': [ - 'error', - { - patterns: [ - { - group: ['shared/*', 'renderer/*', 'extension-host/*', 'node/*', 'client/*', 'main/*'], - message: `Importing from this path is not allowed. Try importing from @papi/core. Imports from paths like 'shared', 'renderer', 'node', 'client' and 'main' are not allowed to prevent unnecessary import break.`, - }, - ], - }, - ], - 'no-shadow': 'off', - '@typescript-eslint/no-shadow': 'error', - 'no-use-before-define': 'off', - '@typescript-eslint/no-use-before-define': [ - 'error', - { functions: false, allowNamedExports: true, typedefs: false, ignoreTypeReferences: true }, - ], - '@typescript-eslint/no-unnecessary-type-assertion': 'error', - 'no-unused-vars': 'off', - '@typescript-eslint/no-unused-vars': 'error', - 'no-useless-constructor': 'off', - '@typescript-eslint/no-useless-constructor': 'error', - 'comma-dangle': ['error', 'always-multiline'], - indent: 'off', - 'jsx-a11y/label-has-associated-control': [ - 'error', - { - assert: 'either', - }, - ], - // Should use our logger anytime you want logs that persist. Otherwise use console only in testing - 'no-console': 'warn', - 'no-null/no-null': 2, - 'no-plusplus': ['error', { allowForLoopAfterthoughts: true }], - 'no-type-assertion/no-type-assertion': 'error', - 'prettier/prettier': ['warn', { tabWidth: 2, trailingComma: 'all' }], - 'react/jsx-indent-props': ['warn', 2], - 'react/jsx-props-no-spreading': ['error', { custom: 'ignore' }], - 'react/require-default-props': 'off', - - // #endregion - - // #endregion - - // #region Overrides to rules from paranext-core - - 'import/no-unresolved': ['error', { ignore: ['@papi'] }], - - // #endregion - }, - globals: { - globalThis: 'readonly', - }, - overrides: [ - { - // Allow this file to have overrides to rules from paranext-core - files: ['.eslintrc.*js'], - rules: { - 'no-dupe-keys': 'off', - }, - }, - { - files: ['*.js'], - rules: { - strict: 'off', - }, - }, - { - // Don't require extensions to have a default export for "activate()" - files: ['*.ts'], - rules: { - 'import/prefer-default-export': 'off', - }, - }, - { - files: ['./lib/*', './webpack/*'], - rules: { - // These files are scripts not running in Platform.Bible, so they can't use the logger - 'no-console': 'off', - }, - }, - { - files: ['*.d.ts'], - rules: { - // Allow .d.ts files to self import so they can refer to their types in `papi-shared-types` - 'import/no-self-import': 'off', - }, - }, - ], - parserOptions: { - ecmaVersion: 2022, - sourceType: 'module', - project: './tsconfig.lint.json', - tsconfigRootDir: __dirname, - createDefaultProgram: true, - }, - plugins: ['@typescript-eslint', 'no-type-assertion', 'no-null'], - settings: { - 'import/resolver': { - typescript: { - alwaysTryTypes: true, - }, - }, - 'import/parsers': { - '@typescript-eslint/parser': ['.ts', '.tsx'], - }, - }, -}; - -// #endregion diff --git a/extensions/src/platform-scripture-editor/.gitignore b/extensions/src/platform-scripture-editor/.gitignore deleted file mode 100644 index cb00ea28d2..0000000000 --- a/extensions/src/platform-scripture-editor/.gitignore +++ /dev/null @@ -1,33 +0,0 @@ -# #region shared with https://github.com/paranext/paranext-multi-extension-template/blob/main/.gitignore - -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* -pnpm-debug.log* -lerna-debug.log* - -node_modules -dist -release -dist-ssr -*.local - -# formatting and linting -.eslintcache - -# Editor directories and files -.idea -.DS_Store -*.suo -*.ntvs* -*.njsproj -*.sln -*.sw? - -# Temporary intermediate build files -temp-build - -# #endregion diff --git a/extensions/src/platform-scripture-editor/.prettierignore b/extensions/src/platform-scripture-editor/.prettierignore deleted file mode 100644 index 69fb5a8ab5..0000000000 --- a/extensions/src/platform-scripture-editor/.prettierignore +++ /dev/null @@ -1,35 +0,0 @@ -# #region shared with https://github.com/paranext/paranext-multi-extension-template/blob/main/.prettierignore - -# Please keep this file in sync with .eslintignore and .stylelintignore - -# Logs -logs -*.log - -# Runtime data -pids -*.pid -*.seed - -# Dependency directory -# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git -node_modules - -# OSX -.DS_Store - -.idea -npm-debug.log.* -*.css.d.ts -*.sass.d.ts -*.scss.d.ts - -# Built files -dist -release -temp-build - -# generated files -package-lock.json - -# #endregion diff --git a/extensions/src/platform-scripture-editor/.prettierrc.js b/extensions/src/platform-scripture-editor/.prettierrc.js deleted file mode 100644 index 01e5ca241c..0000000000 --- a/extensions/src/platform-scripture-editor/.prettierrc.js +++ /dev/null @@ -1,19 +0,0 @@ -// #region shared with https://github.com/paranext/paranext-core/blob/main/.prettierrc.js and https://github.com/paranext/paranext-multi-extension-template/blob/main/.prettierrc.js - -module.exports = { - tabWidth: 2, - trailingComma: 'all', - endOfLine: 'lf', - singleQuote: true, - // prettier-plugin-jsdoc options - tsdoc: true, - plugins: ['prettier-plugin-jsdoc'], - overrides: [ - { - files: '*.json', - options: { parser: 'json' }, - }, - ], -}; - -// #endregion diff --git a/extensions/src/platform-scripture-editor/.stylelintignore b/extensions/src/platform-scripture-editor/.stylelintignore deleted file mode 100644 index 6d59d79515..0000000000 --- a/extensions/src/platform-scripture-editor/.stylelintignore +++ /dev/null @@ -1,35 +0,0 @@ -# #region shared with https://github.com/paranext/paranext-multi-extension-template/blob/main/.stylelintignore - -# Please keep this file in sync with .eslintignore and .prettierignore - -# Logs -logs -*.log - -# Runtime data -pids -*.pid -*.seed - -# Dependency directory -# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git -node_modules - -# OSX -.DS_Store - -.idea -npm-debug.log.* -*.css.d.ts -*.sass.d.ts -*.scss.d.ts - -# Built files -dist -release -temp-build - -# generated files -package-lock.json - -# #endregion diff --git a/extensions/src/platform-scripture-editor/.stylelintrc.js b/extensions/src/platform-scripture-editor/.stylelintrc.js deleted file mode 100644 index c6349f79ef..0000000000 --- a/extensions/src/platform-scripture-editor/.stylelintrc.js +++ /dev/null @@ -1,22 +0,0 @@ -// #region shared with https://github.com/paranext/paranext-core/blob/main/.stylelintrc.js and https://github.com/paranext/paranext-multi-extension-template/blob/main/.stylelintrc.cjs - -module.exports = { - extends: ['stylelint-config-recommended', 'stylelint-config-sass-guidelines'], - overrides: [ - { - files: ['**/*.scss'], - customSyntax: 'postcss-scss', - }, - ], - rules: { - 'color-named': null, - 'max-nesting-depth': 2, - 'no-descending-specificity': null, - 'selector-max-compound-selectors': 4, - 'selector-max-id': 1, - // only -webkit-mask-... rules are working, not the ones without -webkit - 'property-no-vendor-prefix': [true, { ignoreProperties: [/mask-.*/] }], - }, -}; - -// #endregion diff --git a/extensions/src/platform-scripture-editor/.vscode/extensions.json b/extensions/src/platform-scripture-editor/.vscode/extensions.json deleted file mode 100644 index 798b80874a..0000000000 --- a/extensions/src/platform-scripture-editor/.vscode/extensions.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "recommendations": [ - "dbaeumer.vscode-eslint", - "editorconfig.editorconfig", - "esbenp.prettier-vscode", - "streetsidesoftware.code-spell-checker", - "stylelint.vscode-stylelint" - ] -} diff --git a/extensions/src/platform-scripture-editor/.vscode/launch.json b/extensions/src/platform-scripture-editor/.vscode/launch.json deleted file mode 100644 index fb0f3a08c0..0000000000 --- a/extensions/src/platform-scripture-editor/.vscode/launch.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - "name": "Watch and Build Extension", - "type": "node", - "request": "launch", - "runtimeExecutable": "npm", - "skipFiles": ["/**"], - "runtimeArgs": ["run", "watch"] - }, - { - "name": "Build WebViews", - "type": "node", - "request": "launch", - "runtimeExecutable": "npm", - "skipFiles": ["/**"], - "runtimeArgs": ["run", "build:web-view"] - }, - { - "name": "Build Main", - "type": "node", - "request": "launch", - "runtimeExecutable": "npm", - "skipFiles": ["/**"], - "runtimeArgs": ["run", "build:main"] - }, - { - "name": "Build Extension", - "type": "node", - "request": "launch", - "runtimeExecutable": "npm", - "skipFiles": ["/**"], - "runtimeArgs": ["run", "build"] - }, - { - "name": "Debug Platform with Extension", - "type": "node", - "request": "launch", - "runtimeExecutable": "npm", - "runtimeArgs": ["run", "start"], - "skipFiles": ["/**"], - "env": { - "MAIN_ARGS": "--inspect=5858 --remote-debugging-port=9223", - "IN_VSCODE": "true" - }, - "presentation": { - "hidden": false, - "group": "", - "order": 1 - } - }, - { - "name": "Attach to Platform app", - "type": "node", - "request": "attach", - "port": 5858, - "timeout": 15000 - }, - { - "name": "Attach to Renderer", - "type": "chrome", - "request": "attach", - "port": 9223, - "webRoot": "${workspaceFolder}", - "timeout": 15000 - } - ] -} diff --git a/extensions/src/platform-scripture-editor/.vscode/settings.json b/extensions/src/platform-scripture-editor/.vscode/settings.json deleted file mode 100644 index cefc6be5ed..0000000000 --- a/extensions/src/platform-scripture-editor/.vscode/settings.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "editor.defaultFormatter": "esbenp.prettier-vscode", - "editor.formatOnSave": true, - "editor.rulers": [100], - "editor.wordWrapColumn": 100, - - "eslint.validate": ["javascript", "javascriptreact", "html", "typescriptreact"], - - "files.associations": { - ".eslintignore": "ignore", - ".prettierignore": "ignore", - ".stylelintignore": "ignore" - }, - "files.eol": "\n", - - "javascript.validate.enable": false, - "javascript.format.enable": false, - "typescript.format.enable": false, - - "search.exclude": { - ".git": true, - ".eslintcache": true, - "node_modules": true, - "npm-debug.log.*": true, - "package-lock.json": true, - "*.{css,sass,scss}.d.ts": true - }, - - "json.schemas": [ - { - "fileMatch": ["*tsconfig*.json"], - "url": "http://json.schemastore.org/tsconfig" - } - ], - - "todohighlight.keywords": [ - { - "text": "WARNING:", - "isWholeLine": true, - "color": "#FF0000", - "backgroundColor": "none", - "overviewRulerColor": "#FF000000" - }, - { - "text": "#region", - "color": "#6cf5ff", - "backgroundColor": "none", - "overviewRulerColor": "#6cf5ff60" - }, - { - "text": "#endregion", - "color": "#6cf5ff", - "backgroundColor": "none", - "overviewRulerColor": "#6cf5ff60" - } - ] -} diff --git a/extensions/src/platform-scripture-editor/LICENSE b/extensions/src/platform-scripture-editor/LICENSE deleted file mode 100644 index 851ff3e8d1..0000000000 --- a/extensions/src/platform-scripture-editor/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright © 2023-2024 SIL International - -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. diff --git a/extensions/src/platform-scripture-editor/README.md b/extensions/src/platform-scripture-editor/README.md deleted file mode 100644 index d092616a2c..0000000000 --- a/extensions/src/platform-scripture-editor/README.md +++ /dev/null @@ -1,85 +0,0 @@ -# platform-scripture-editor - -Editor extension for Platform.Bible, that can also be used in read-only mode - -## Summary - -The general file structure is as follows: - -- `package.json` contains information about this extension's npm package. It is required for Platform.Bible to use the extension properly. It is copied into the build folder -- `manifest.json` is the manifest file that defines the extension and important properties for Platform.Bible. It is copied into the build folder -- `src/` contains the source code for the extension - - `src/main.ts` is the main entry file for the extension - - `src/types/paranext-extension-template.d.ts` is this extension's types file that defines how other extensions can use this extension through the `papi`. It is copied into the build folder - - `*.web-view.tsx` files will be treated as React WebViews - - `*.web-view.html` files are a conventional way to provide HTML WebViews (no special functionality) -- `assets/` contains asset files the extension and its WebViews can retrieve using the `papi-extension:` protocol. It is copied into the build folder -- `contributions/` contains JSON files the platform uses to extend data structures for things like menus and settings. The JSON files are referenced from the manifest -- `public/` contains other static files that are copied into the build folder -- `dist/` is a generated folder containing the built extension files -- `release/` is a generated folder containing a zip of the built extension files - -## To install - -### Install dependencies: - -1. Follow the instructions to install [`paranext-core`](https://github.com/paranext/paranext-core#developer-install). -2. In this repo, run `npm install` to install local and published dependencies - -### Configure paths to `paranext-core` repo - -In order to interact with `paranext-core`, you must point `package.json` to your installed `paranext-core` repository: - -1. Follow the instructions to install [`paranext-core`](https://github.com/paranext/paranext-core#developer-install). We recommend you clone `paranext-core` in the same parent directory in which you cloned this repository so you do not have to reconfigure paths to `paranext-core`. -2. If you cloned `paranext-core` anywhere other than in the same parent directory in which you cloned this repository, update the paths to `paranext-core` in this repository's `package.json` to point to the correct `paranext-core` directory. - -## To run - -### Running Platform.Bible with this extension - -To run Platform.Bible with this extension: - -`npm start` - -Note: The built extension will be in the `dist` folder. In order for Platform.Bible to run this extension, you must provide the directory to this built extension to Platform.Bible via a command-line argument. This command-line argument is already provided in this `package.json`'s `start` script. If you want to start Platform.Bible and use this extension any other way, you must provide this command-line argument or put the `dist` folder into Platform.Bible's `extensions` folder. - -### Building this extension independently - -To watch extension files (in `src`) for changes: - -`npm run watch` - -To build the extension once: - -`npm run build` - -## To package for distribution - -To package this extension into a zip file for distribution: - -`npm run package` - -## To update this extension from the template - -This extension project is forked from [`paranext-extension-template`](https://github.com/paranext/paranext-extension-template), which is updated periodically and will sometimes receive updates that help with breaking changes on [`paranext-core`](https://github.com/paranext/paranext-core). We recommend you periodically update your extension by merging the latest template updates into your extension. - -To set up this extension to be updated from the template, run the following command once after cloning this repo: - -```bash -git remote add template https://github.com/paranext/paranext-extension-template -``` - -To update this extension from the template, make sure your repo has no working changes. Then run the following commands: - -```bash -git fetch template -git merge template/main --allow-unrelated-histories -``` - -For more information, read [the instructions on the wiki](https://github.com/paranext/paranext-extension-template/wiki/Merging-Template-Changes-into-Your-Extension). - -**Note:** The merge/squash commits created when updating this repo from the template are important; Git uses them to compare the files for future updates. If you edit this repo's Git history, please preserve these commits (do not squash them, for example) to avoid duplicated merge conflicts in the future. - -## Special features in this project - -This project has special features and specific configuration to make building an extension for Platform.Bible easier. See [Special features of `paranext-multi-extension-template`](https://github.com/paranext/paranext-multi-extension-template#special-features-of-the-template) for information on these special features. diff --git a/extensions/src/platform-scripture-editor/assets/images/icons/1-square.svg b/extensions/src/platform-scripture-editor/assets/images/icons/1-square.svg deleted file mode 100644 index 655862a048..0000000000 --- a/extensions/src/platform-scripture-editor/assets/images/icons/1-square.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/extensions/src/platform-scripture-editor/assets/images/icons/2-square.svg b/extensions/src/platform-scripture-editor/assets/images/icons/2-square.svg deleted file mode 100644 index 776e9f4af0..0000000000 --- a/extensions/src/platform-scripture-editor/assets/images/icons/2-square.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/extensions/src/platform-scripture-editor/assets/images/icons/3-square.svg b/extensions/src/platform-scripture-editor/assets/images/icons/3-square.svg deleted file mode 100644 index 6146ea0d9e..0000000000 --- a/extensions/src/platform-scripture-editor/assets/images/icons/3-square.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/extensions/src/platform-scripture-editor/assets/images/icons/4-square.svg b/extensions/src/platform-scripture-editor/assets/images/icons/4-square.svg deleted file mode 100644 index 6d6b9662ab..0000000000 --- a/extensions/src/platform-scripture-editor/assets/images/icons/4-square.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/extensions/src/platform-scripture-editor/assets/images/icons/LICENSE.md b/extensions/src/platform-scripture-editor/assets/images/icons/LICENSE.md deleted file mode 100644 index 5a61bf2cbb..0000000000 --- a/extensions/src/platform-scripture-editor/assets/images/icons/LICENSE.md +++ /dev/null @@ -1,5 +0,0 @@ -Bootstrap Icons -https://icons.getbootstrap.com - -Licensed under MIT license -https://github.com/twbs/icons/blob/main/LICENSE diff --git a/extensions/src/platform-scripture-editor/assets/images/icons/arrow-clockwise.svg b/extensions/src/platform-scripture-editor/assets/images/icons/arrow-clockwise.svg deleted file mode 100644 index 80b3ad066e..0000000000 --- a/extensions/src/platform-scripture-editor/assets/images/icons/arrow-clockwise.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/extensions/src/platform-scripture-editor/assets/images/icons/arrow-counterclockwise.svg b/extensions/src/platform-scripture-editor/assets/images/icons/arrow-counterclockwise.svg deleted file mode 100644 index 46d3581d8e..0000000000 --- a/extensions/src/platform-scripture-editor/assets/images/icons/arrow-counterclockwise.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/extensions/src/platform-scripture-editor/assets/images/icons/ban.svg b/extensions/src/platform-scripture-editor/assets/images/icons/ban.svg deleted file mode 100644 index 4582536d53..0000000000 --- a/extensions/src/platform-scripture-editor/assets/images/icons/ban.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/extensions/src/platform-scripture-editor/assets/images/icons/bookmark.svg b/extensions/src/platform-scripture-editor/assets/images/icons/bookmark.svg deleted file mode 100644 index 45cc0f944b..0000000000 --- a/extensions/src/platform-scripture-editor/assets/images/icons/bookmark.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/extensions/src/platform-scripture-editor/assets/images/icons/chat-left-text.svg b/extensions/src/platform-scripture-editor/assets/images/icons/chat-left-text.svg deleted file mode 100644 index 7c7acc2397..0000000000 --- a/extensions/src/platform-scripture-editor/assets/images/icons/chat-left-text.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/extensions/src/platform-scripture-editor/assets/images/icons/chat-square-quote.svg b/extensions/src/platform-scripture-editor/assets/images/icons/chat-square-quote.svg deleted file mode 100644 index 5501848a57..0000000000 --- a/extensions/src/platform-scripture-editor/assets/images/icons/chat-square-quote.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/extensions/src/platform-scripture-editor/assets/images/icons/chevron-down.svg b/extensions/src/platform-scripture-editor/assets/images/icons/chevron-down.svg deleted file mode 100644 index ef1a6ba3b7..0000000000 --- a/extensions/src/platform-scripture-editor/assets/images/icons/chevron-down.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/extensions/src/platform-scripture-editor/assets/images/icons/code.svg b/extensions/src/platform-scripture-editor/assets/images/icons/code.svg deleted file mode 100644 index c9070bf06e..0000000000 --- a/extensions/src/platform-scripture-editor/assets/images/icons/code.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/extensions/src/platform-scripture-editor/assets/images/icons/comments.svg b/extensions/src/platform-scripture-editor/assets/images/icons/comments.svg deleted file mode 100644 index 6a23ac5463..0000000000 --- a/extensions/src/platform-scripture-editor/assets/images/icons/comments.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/extensions/src/platform-scripture-editor/assets/images/icons/file-earmark.svg b/extensions/src/platform-scripture-editor/assets/images/icons/file-earmark.svg deleted file mode 100644 index 5e791d43ec..0000000000 --- a/extensions/src/platform-scripture-editor/assets/images/icons/file-earmark.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/extensions/src/platform-scripture-editor/assets/images/icons/justify.svg b/extensions/src/platform-scripture-editor/assets/images/icons/justify.svg deleted file mode 100644 index 6c5f8d0f7e..0000000000 --- a/extensions/src/platform-scripture-editor/assets/images/icons/justify.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/extensions/src/platform-scripture-editor/assets/images/icons/link.svg b/extensions/src/platform-scripture-editor/assets/images/icons/link.svg deleted file mode 100644 index bc38ff5d4b..0000000000 --- a/extensions/src/platform-scripture-editor/assets/images/icons/link.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/extensions/src/platform-scripture-editor/assets/images/icons/list-ol.svg b/extensions/src/platform-scripture-editor/assets/images/icons/list-ol.svg deleted file mode 100644 index ad288e8ea4..0000000000 --- a/extensions/src/platform-scripture-editor/assets/images/icons/list-ol.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/extensions/src/platform-scripture-editor/assets/images/icons/list-ul.svg b/extensions/src/platform-scripture-editor/assets/images/icons/list-ul.svg deleted file mode 100644 index 6d7aae75d7..0000000000 --- a/extensions/src/platform-scripture-editor/assets/images/icons/list-ul.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/extensions/src/platform-scripture-editor/assets/images/icons/pencil-fill.svg b/extensions/src/platform-scripture-editor/assets/images/icons/pencil-fill.svg deleted file mode 100644 index eb01fb2a41..0000000000 --- a/extensions/src/platform-scripture-editor/assets/images/icons/pencil-fill.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/extensions/src/platform-scripture-editor/assets/images/icons/send.svg b/extensions/src/platform-scripture-editor/assets/images/icons/send.svg deleted file mode 100644 index 04e9f29836..0000000000 --- a/extensions/src/platform-scripture-editor/assets/images/icons/send.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/extensions/src/platform-scripture-editor/assets/images/icons/text-center.svg b/extensions/src/platform-scripture-editor/assets/images/icons/text-center.svg deleted file mode 100644 index 97ced49e63..0000000000 --- a/extensions/src/platform-scripture-editor/assets/images/icons/text-center.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/extensions/src/platform-scripture-editor/assets/images/icons/text-left.svg b/extensions/src/platform-scripture-editor/assets/images/icons/text-left.svg deleted file mode 100644 index 5fe4cc4452..0000000000 --- a/extensions/src/platform-scripture-editor/assets/images/icons/text-left.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/extensions/src/platform-scripture-editor/assets/images/icons/text-paragraph.svg b/extensions/src/platform-scripture-editor/assets/images/icons/text-paragraph.svg deleted file mode 100644 index 1b943ab44e..0000000000 --- a/extensions/src/platform-scripture-editor/assets/images/icons/text-paragraph.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/extensions/src/platform-scripture-editor/assets/images/icons/text-right.svg b/extensions/src/platform-scripture-editor/assets/images/icons/text-right.svg deleted file mode 100644 index de984517f9..0000000000 --- a/extensions/src/platform-scripture-editor/assets/images/icons/text-right.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/extensions/src/platform-scripture-editor/assets/images/icons/trash3.svg b/extensions/src/platform-scripture-editor/assets/images/icons/trash3.svg deleted file mode 100644 index 5c38b387e6..0000000000 --- a/extensions/src/platform-scripture-editor/assets/images/icons/trash3.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/extensions/src/platform-scripture-editor/assets/images/icons/type-bold.svg b/extensions/src/platform-scripture-editor/assets/images/icons/type-bold.svg deleted file mode 100644 index ec0dc2ec0d..0000000000 --- a/extensions/src/platform-scripture-editor/assets/images/icons/type-bold.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/extensions/src/platform-scripture-editor/assets/images/icons/type-h1.svg b/extensions/src/platform-scripture-editor/assets/images/icons/type-h1.svg deleted file mode 100644 index 379da930d8..0000000000 --- a/extensions/src/platform-scripture-editor/assets/images/icons/type-h1.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/extensions/src/platform-scripture-editor/assets/images/icons/type-h2.svg b/extensions/src/platform-scripture-editor/assets/images/icons/type-h2.svg deleted file mode 100644 index e724a0be39..0000000000 --- a/extensions/src/platform-scripture-editor/assets/images/icons/type-h2.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/extensions/src/platform-scripture-editor/assets/images/icons/type-h3.svg b/extensions/src/platform-scripture-editor/assets/images/icons/type-h3.svg deleted file mode 100644 index 5ddf8149bf..0000000000 --- a/extensions/src/platform-scripture-editor/assets/images/icons/type-h3.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/extensions/src/platform-scripture-editor/assets/images/icons/type-italic.svg b/extensions/src/platform-scripture-editor/assets/images/icons/type-italic.svg deleted file mode 100644 index ac139f3cc9..0000000000 --- a/extensions/src/platform-scripture-editor/assets/images/icons/type-italic.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/extensions/src/platform-scripture-editor/assets/images/icons/type-strikethrough.svg b/extensions/src/platform-scripture-editor/assets/images/icons/type-strikethrough.svg deleted file mode 100644 index a0d7e17e2d..0000000000 --- a/extensions/src/platform-scripture-editor/assets/images/icons/type-strikethrough.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/extensions/src/platform-scripture-editor/assets/images/icons/type-underline.svg b/extensions/src/platform-scripture-editor/assets/images/icons/type-underline.svg deleted file mode 100644 index d5c7046ee3..0000000000 --- a/extensions/src/platform-scripture-editor/assets/images/icons/type-underline.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/extensions/src/platform-scripture-editor/contributions/localizedStrings.json b/extensions/src/platform-scripture-editor/contributions/localizedStrings.json deleted file mode 100644 index 9112c0f336..0000000000 --- a/extensions/src/platform-scripture-editor/contributions/localizedStrings.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "metadata": {}, - "localizedStrings": { - "en": { - "%mainMenu_openPlatformScriptureEditor%": "Open Scripture Editor", - "%mainMenu_openPlatformResourceViewer%": "Open Resource Viewer", - "%webView_platformScriptureEditor_options%": "Options", - "%webView_platformScriptureEditor_tools%": "Tools", - "%webView_platformScriptureEditor_info%": "Info", - "%webView_platformScriptureEditor_backgroundColor%": "Background Color", - "%webView_platformScriptureEditor_textColor%": "Text Color", - "%webView_platformScriptureEditor_thickBorders%": "Thick Borders", - "%webView_platformScriptureEditor_charactersInventory%": "Inventory: Characters...", - "%webView_platformScriptureEditor_repeatedWordsInventory%": "Inventory: Repeated Words...", - "%webView_platformScriptureEditor_configureChecks%": "Configure Checks...", - "%webView_platformScriptureEditor_showCheckResults%": "Show Check Results...", - "%webView_platformScriptureEditor_publisherInfo%": "Publisher Info", - "%webView_platformScriptureEditor_copyrightInfo%": "Copyright Info", - "%platformScriptureEditor_dialog_openResourceViewer_title%": "Open Resource Viewer", - "%platformScriptureEditor_dialog_openResourceViewer_prompt%": "Choose a resource to open:", - "%platformScriptureEditor_dialog_openScriptureEditor_title%": "Open Scripture Editor", - "%platformScriptureEditor_dialog_openScriptureEditor_prompt%": "Choose a project to open:" - } - } -} diff --git a/extensions/src/platform-scripture-editor/contributions/menus.json b/extensions/src/platform-scripture-editor/contributions/menus.json deleted file mode 100644 index 160c043670..0000000000 --- a/extensions/src/platform-scripture-editor/contributions/menus.json +++ /dev/null @@ -1,125 +0,0 @@ -{ - "mainMenu": { - "columns": {}, - "groups": {}, - "items": [ - { - "label": "%mainMenu_openPlatformScriptureEditor%", - "localizeNotes": "Application main menu > Project > Open Scripture Editor", - "group": "platform.projectResources", - "order": -100, - "command": "platformScriptureEditor.openScriptureEditor" - }, - { - "label": "%mainMenu_openPlatformResourceViewer%", - "localizeNotes": "Application main menu > Project > Open Resource Viewer", - "group": "platform.projectResources", - "order": -99, - "command": "platformScriptureEditor.openResourceViewer" - } - ] - }, - "webViewMenus": { - "platformScriptureEditor.react": { - "includeDefaults": true, - "topMenu": { - "columns": { - "platformScriptureEditor.options": { - "label": "%webView_platformScriptureEditor_options%", - "order": 3 - }, - "platformScriptureEditor.tools": { - "label": "%webView_platformScriptureEditor_tools%", - "order": 4 - }, - "platformScriptureEditor.info": { - "label": "%webView_platformScriptureEditor_info%", - "order": 5 - } - }, - "groups": { - "platformScriptureEditor.colors": { - "column": "platformScriptureEditor.options", - "order": 1 - }, - "platformScriptureEditor.layout": { - "column": "platformScriptureEditor.options", - "order": 2 - }, - "platformScriptureEditor.general": { - "column": "platformScriptureEditor.info", - "order": 2 - }, - "platformScriptureEditor.inventory": { - "column": "platformScriptureEditor.tools", - "order": 2 - }, - "platformScriptureEditor.checks": { - "column": "platformScriptureEditor.tools", - "order": 3 - } - }, - "items": [ - { - "label": "%webView_platformScriptureEditor_backgroundColor%", - "group": "platformScriptureEditor.colors", - "order": 2, - "command": "platformScriptureEditor.changeBackgroundColor" - }, - { - "label": "%webView_platformScriptureEditor_textColor%", - "group": "platformScriptureEditor.colors", - "order": 1, - "command": "platformScriptureEditor.changeTextColor" - }, - { - "label": "%webView_platformScriptureEditor_charactersInventory%", - "group": "platformScriptureEditor.inventory", - "order": 1, - "command": "platformScripture.openCharactersInventory" - }, - { - "label": "%webView_platformScriptureEditor_repeatedWordsInventory%", - "group": "platformScriptureEditor.inventory", - "order": 2, - "command": "platformScripture.openRepeatedWordsInventory" - }, - { - "label": "%webView_platformScriptureEditor_configureChecks%", - "group": "platformScriptureEditor.checks", - "order": 1, - "command": "platformScripture.openConfigureChecks" - }, - { - "label": "%webView_platformScriptureEditor_showCheckResults%", - "group": "platformScriptureEditor.checks", - "order": 2, - "command": "platformScripture.showCheckResults" - }, - { - "label": "%webView_platformScriptureEditor_thickBorders%", - "group": "platformScriptureEditor.layout", - "order": 1, - "command": "platformScriptureEditor.showThickBorders" - }, - { - "label": "%webView_platformScriptureEditor_publisherInfo%", - "group": "platformScriptureEditor.general", - "order": 1, - "command": "platformScriptureEditor.showPublisherInfo" - }, - { - "label": "%webView_platformScriptureEditor_copyrightInfo%", - "group": "platformScriptureEditor.general", - "order": 2, - "command": "platformScriptureEditor.showCopyrightInfo" - } - ] - }, - "contextMenu": { - "groups": {}, - "items": [] - } - } - } -} diff --git a/extensions/src/platform-scripture-editor/contributions/projectSettings.json b/extensions/src/platform-scripture-editor/contributions/projectSettings.json deleted file mode 100644 index fe51488c70..0000000000 --- a/extensions/src/platform-scripture-editor/contributions/projectSettings.json +++ /dev/null @@ -1 +0,0 @@ -[] diff --git a/extensions/src/platform-scripture-editor/contributions/settings.json b/extensions/src/platform-scripture-editor/contributions/settings.json deleted file mode 100644 index fe51488c70..0000000000 --- a/extensions/src/platform-scripture-editor/contributions/settings.json +++ /dev/null @@ -1 +0,0 @@ -[] diff --git a/extensions/src/platform-scripture-editor/cspell.json b/extensions/src/platform-scripture-editor/cspell.json deleted file mode 100644 index d78da5aafa..0000000000 --- a/extensions/src/platform-scripture-editor/cspell.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "import": "../../cspell.json" -} diff --git a/extensions/src/platform-scripture-editor/manifest.json b/extensions/src/platform-scripture-editor/manifest.json deleted file mode 100644 index d5672d7ed9..0000000000 --- a/extensions/src/platform-scripture-editor/manifest.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "platformScriptureEditor", - "version": "0.0.1", - "description": "Editor extension for Platform.Bible", - "author": "Paranext", - "license": "MIT", - "main": "src/main.ts", - "types": "src/types/platform-scripture-editor.d.ts", - "menus": "contributions/menus.json", - "settings": "contributions/settings.json", - "projectSettings": "contributions/projectSettings.json", - "localizedStrings": "contributions/localizedStrings.json", - "activationEvents": [] -} diff --git a/extensions/src/platform-scripture-editor/package.json b/extensions/src/platform-scripture-editor/package.json deleted file mode 100644 index 55597cf92a..0000000000 --- a/extensions/src/platform-scripture-editor/package.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "name": "platform-scripture-editor", - "version": "0.0.2", - "description": "Editor extension for Platform.Bible", - "main": "src/main.js", - "types": "src/types/platform-scripture-editor.d.ts", - "author": "Katherine Jensen", - "license": "MIT", - "scripts": { - "build:web-view": "webpack --config ./webpack/webpack.config.web-view.ts", - "build:main": "webpack --config ./webpack/webpack.config.main.ts", - "build": "webpack", - "watch": "npm run build -- --watch", - "build:production": "cross-env NODE_ENV=production TS_NODE_TRANSPILE_ONLY=false webpack", - "watch:production": "npm run build:production -- --watch", - "zip": "zip-build dist release --template '%NAME%_%VERSION%.%EXT%' --override", - "package": "npm run build:production && npm run zip", - "package:debug": "cross-env DEBUG_PROD=true npm run package", - "start:core": "cd ../../.. && npm run start", - "start": "npm run start:core", - "start:production": "echo unimplemented", - "lint": "npm run lint:scripts && npm run lint:styles", - "lint:scripts": "eslint --ext .cjs,.js,.jsx,.ts,.tsx --cache .", - "lint:styles": "stylelint **/*.{css,scss}", - "lint-fix": "npm run lint-fix:scripts && npm run lint:styles -- --fix", - "lint-fix:scripts": "prettier --write \"**/*.{ts,tsx,js,jsx,cjs}\" && npm run lint:scripts" - }, - "browserslist": [], - "peerDependencies": { - "react": ">=18.3.1", - "react-dom": ">=18.3.1" - }, - "dependencies": { - "@sillsdev/scripture": "^2.0.2", - "platform-bible-utils": "file:../../../lib/platform-bible-utils" - }, - "devDependencies": { - "@biblionexus-foundation/platform-editor": "^0.6.3", - "@biblionexus-foundation/scripture-utilities": "^0.0.4", - "@swc/core": "^1.7.26", - "@types/node": "^20.16.10", - "@types/react": "^18.3.11", - "@types/react-dom": "^18.3.0", - "@types/webpack": "^5.28.5", - "@typescript-eslint/eslint-plugin": "^6.21.0", - "@typescript-eslint/parser": "^6.21.0", - "concurrently": "^9.0.1", - "copy-webpack-plugin": "^12.0.2", - "cross-env": "^7.0.3", - "css-loader": "^6.11.0", - "escape-string-regexp": "^5.0.0", - "eslint": "^8.57.1", - "eslint-config-airbnb-base": "^15.0.0", - "eslint-config-erb": "^4.1.0", - "eslint-import-resolver-typescript": "^3.6.3", - "eslint-plugin-compat": "^4.2.0", - "eslint-plugin-import": "^2.30.0", - "eslint-plugin-jest": "^27.9.0", - "eslint-plugin-jsx-a11y": "^6.10.0", - "eslint-plugin-no-null": "^1.0.2", - "eslint-plugin-no-type-assertion": "^1.3.0", - "eslint-plugin-promise": "^6.6.0", - "eslint-plugin-react": "^7.37.1", - "eslint-plugin-react-hooks": "^4.6.2", - "glob": "^10.4.5", - "papi-dts": "file:../../../lib/papi-dts", - "platform-bible-react": "file:../../../lib/platform-bible-react", - "prettier": "^3.3.3", - "prettier-plugin-jsdoc": "^1.3.0", - "sass": "^1.78.0", - "sass-loader": "^14.2.1", - "stylelint": "^16.9.0", - "stylelint-config-recommended": "^14.0.1", - "stylelint-config-sass-guidelines": "^12.1.0", - "swc-loader": "^0.2.6", - "ts-node": "^10.9.2", - "tsconfig-paths": "^4.2.0", - "tsconfig-paths-webpack-plugin": "^4.1.0", - "typescript": "^5.4.5", - "webpack": "^5.95.0", - "webpack-cli": "^5.1.4", - "webpack-merge": "^6.0.1", - "zip-build": "^1.8.0" - }, - "volta": { - "extends": "../../package.json" - } -} diff --git a/extensions/src/platform-scripture-editor/src/_commenting.scss b/extensions/src/platform-scripture-editor/src/_commenting.scss deleted file mode 100644 index df9ebeb159..0000000000 --- a/extensions/src/platform-scripture-editor/src/_commenting.scss +++ /dev/null @@ -1,560 +0,0 @@ -/* stylelint-disable selector-class-pattern */ - -.Button__root { - padding-top: 10px; - padding-bottom: 10px; - padding-left: 15px; - padding-right: 15px; - border: 0; - background-color: #eee; - border-radius: 5px; - cursor: pointer; - font-size: 14px; -} - -.Button__root:hover { - background-color: #ddd; -} - -.Button__small { - padding-top: 5px; - padding-bottom: 5px; - padding-left: 10px; - padding-right: 10px; - font-size: 13px; -} - -.Button__disabled { - cursor: not-allowed; -} - -.Button__disabled:hover { - background-color: #eee; -} - -.ContentEditable__root { - border: 0; - font-size: 15px; - display: block; - position: relative; - outline: 0; - padding: 8px 28px 40px; - min-height: 150px; -} - -@media (max-width: 1025px) { - .ContentEditable__root { - padding-left: 8px; - padding-right: 8px; - } -} - -.Modal__overlay { - display: flex; - justify-content: center; - align-items: center; - position: fixed; - flex-direction: column; - top: 0; - bottom: 0; - left: 0; - right: 0; - background-color: rgba(40, 40, 40, 0.6); - flex-grow: 0; - flex-shrink: 1px; - z-index: 100; -} - -.Modal__modal { - padding: 20px; - min-height: 100px; - min-width: 300px; - display: flex; - flex-grow: 0; - background-color: #fff; - flex-direction: column; - position: relative; - box-shadow: 0 0 20px 0 #444; - border-radius: 10px; -} - -.Modal__title { - color: #444; - margin: 0; - padding-bottom: 10px; - border-bottom: 1px solid #ccc; -} - -.Modal__closeButton { - border: 0; - position: absolute; - right: 20px; - border-radius: 20px; - justify-content: center; - align-items: center; - display: flex; - width: 30px; - height: 30px; - text-align: center; - cursor: pointer; - background-color: #eee; -} - -.Modal__closeButton:hover { - background-color: #ddd; -} - -.Modal__content { - padding-top: 20px; -} - -.Placeholder__root { - font-size: 15px; - color: #999; - overflow: hidden; - position: absolute; - text-overflow: ellipsis; - top: 8px; - left: 28px; - right: 28px; - user-select: none; - white-space: nowrap; - display: inline-block; - pointer-events: none; -} - -@media (max-width: 1025px) { - .Placeholder__root { - left: 8px; - } -} - -.CommentEditorTheme__paragraph { - margin: 0; - position: 'relative'; -} - -.CommentPlugin_AddCommentBox { - display: block; - position: fixed; - border-radius: 20px; - background-color: white; - width: 40px; - height: 60px; - box-shadow: 0 0 3px rgba(0, 0, 0, 0.2); - z-index: 10; -} - -.CommentPlugin_AddCommentBox_button { - border-radius: 20px; - border: 0; - background: none; - width: 40px; - height: 60px; - position: absolute; - top: 0; - left: 0; - cursor: pointer; -} - -.CommentPlugin_AddCommentBox_button:hover { - background-color: #f6f6f6; -} - -/* stylelint-disable-next-line selector-no-qualifying-type */ -i.add-comment { - background-size: contain; - display: inline-block; - height: 20px; - width: 20px; - vertical-align: -10px; - background-image: url('/assets/images/icons/chat-left-text.svg'); -} - -.CommentPlugin_CommentInputBox { - display: block; - position: absolute; - width: 250px; - min-height: 80px; - background-color: #fff; - box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.1); - border-radius: 5px; - z-index: 24; - animation: show-input-box 0.4s ease; -} - -.CommentPlugin_CommentInputBox::before { - content: ''; - position: absolute; - width: 0; - height: 0; - margin-left: 0.5em; - right: -1em; - top: 0; - left: calc(50% + 0.25em); - box-sizing: border-box; - border: 0.5em solid black; - border-color: transparent transparent #fff #fff; - transform-origin: 0 0; - transform: rotate(135deg); - box-shadow: -3px 3px 3px 0 rgba(0, 0, 0, 0.05); -} - -@keyframes show-input-box { - 0% { - opacity: 0; - transform: translateY(50px); - } - - 100% { - opacity: 1; - transform: translateY(0); - } -} - -.CommentPlugin_CommentInputBox_Buttons { - display: flex; - flex-direction: row; - padding: 0 10px 10px; - gap: 10px; -} - -.CommentPlugin_CommentInputBox_Button { - flex: 1; -} - -.CommentPlugin_CommentInputBox_Button.primary { - background-color: rgb(66, 135, 245); - font-weight: bold; - color: #fff; -} - -.CommentPlugin_CommentInputBox_Button.primary:hover { - background-color: rgb(53, 114, 211); -} - -.CommentPlugin_CommentInputBox_Button[disabled] { - background-color: #eee; - opacity: 0.5; - cursor: not-allowed; - font-weight: normal; - color: #444; -} - -.CommentPlugin_CommentInputBox_Button[disabled]:hover { - opacity: 0.5; - background-color: #eee; -} - -.CommentPlugin_CommentInputBox_EditorContainer { - position: relative; - margin: 10px; - border-radius: 5px; -} - -.CommentPlugin_CommentInputBox_Editor { - position: relative; - border: 1px solid #ccc; - background-color: #fff; - border-radius: 5px; - font-size: 15px; - caret-color: rgb(5, 5, 5); - display: block; - padding: 9px 10px 10px 9px; - min-height: 80px; -} - -.CommentPlugin_CommentInputBox_Editor:focus { - outline: 1px solid rgb(66, 135, 245); -} - -.CommentPlugin_ShowCommentsButton { - padding-top: 6px; - padding-bottom: 7px; - padding-left: 13px; - padding-right: 13px; - background-color: inherit; - border-radius: 10px; -} - -/* stylelint-disable-next-line selector-no-qualifying-type */ -i.comments { - background-size: contain; - display: inline-block; - height: 20px; - width: 20px; - vertical-align: -10px; - background-image: url('/assets/images/icons/comments.svg'); - opacity: 0.5; - transition: opacity 0.2s linear; -} - -.CommentPlugin_ShowCommentsButton.Button__root:hover:not([disabled]) { - background-color: #eee; -} - -/* stylelint-disable-next-line selector-no-qualifying-type */ -.CommentPlugin_ShowCommentsButton:hover i.comments { - opacity: 1; -} - -.CommentPlugin_ShowCommentsButton.active { - background-color: #ccc; -} - -.CommentPlugin_CommentsPanel { - width: 300px; - height: 100%; - background-color: #fff; - border-top-left-radius: 10px; - box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); - animation: show-comments 0.2s ease; -} - -@keyframes show-comments { - 0% { - opacity: 0; - transform: translateX(300px); - } - - 100% { - opacity: 1; - transform: translateX(0); - } -} - -.CommentPlugin_CommentsPanel_Heading { - padding: 16px; - margin: 0; - line-height: 16px; - border-bottom: 1px solid #eee; - font-size: 20px; - display: block; - color: #444; - text-overflow: ellipsis; - overflow: hidden; -} - -.CommentPlugin_CommentsPanel_Editor { - position: relative; - border: 1px solid #ccc; - background-color: #fff; - border-radius: 5px; - font-size: 15px; - caret-color: rgb(5, 5, 5); - display: block; - padding: 9px 10px 10px 9px; - min-height: 20px; -} - -.CommentPlugin_CommentsPanel_Editor::before { - content: ''; - width: 30px; - height: 20px; - float: right; -} - -.CommentPlugin_CommentsPanel_SendButton { - position: absolute; - right: 10px; - top: 8px; - background: none; -} - -.CommentPlugin_CommentsPanel_SendButton:hover { - background: none; -} - -/* stylelint-disable-next-line selector-no-qualifying-type */ -i.send { - background-size: contain; - display: inline-block; - height: 20px; - width: 20px; - vertical-align: -10px; - background-image: url('/assets/images/icons/send.svg'); - opacity: 0.5; - transition: opacity 0.2s linear; -} - -/* stylelint-disable-next-line selector-no-qualifying-type */ -.CommentPlugin_CommentsPanel_SendButton:hover i.send { - opacity: 1; - filter: invert(45%) sepia(98%) saturate(2299%) hue-rotate(201deg) brightness(100%) contrast(92%); -} - -/* stylelint-disable-next-line selector-no-qualifying-type */ -.CommentPlugin_CommentsPanel_SendButton[disabled] i.send { - opacity: 0.3; -} - -/* stylelint-disable-next-line selector-no-qualifying-type */ -.CommentPlugin_CommentsPanel_SendButton:hover[disabled] i.send { - opacity: 0.3; - filter: none; -} - -.CommentPlugin_CommentsPanel_Empty { - color: #777; - font-size: 15px; - text-align: center; - top: calc(50% - 15px); - margin: 0; - padding: 0; - width: inherit; -} - -.CommentPlugin_CommentsPanel_List { - padding: 0; - list-style-type: none; - margin: 0; - width: inherit; - overflow-y: auto; - height: calc(100% - 45px); -} - -.CommentPlugin_CommentsPanel_List_Comment { - padding: 15px 0 15px 15px; - margin: 0; - font-size: 14px; - position: relative; - transition: all 0.2s linear; -} - -.CommentPlugin_CommentsPanel_List_Thread.active .CommentPlugin_CommentsPanel_List_Comment:hover { - background-color: inherit; -} - -.CommentPlugin_CommentsPanel_List_Comment p { - margin: 0; - color: #444; -} - -.CommentPlugin_CommentsPanel_List_Details { - color: #444; - padding-bottom: 5px; - vertical-align: top; -} - -.CommentPlugin_CommentsPanel_List_Comment_Author { - font-weight: bold; - padding-right: 5px; -} - -.CommentPlugin_CommentsPanel_List_Comment_Time { - color: #999; -} - -.CommentPlugin_CommentsPanel_List_Thread { - padding: 0; - margin: 0; - border-top: 1px solid #eee; - border-bottom: 1px solid #eee; - position: relative; - transition: all 0.2s linear; - border-left: 0 solid #eee; -} - -.CommentPlugin_CommentsPanel_List_Thread:first-child, -.CommentPlugin_CommentsPanel_List_Thread + .CommentPlugin_CommentsPanel_List_Thread { - /* stylelint-disable-next-line declaration-property-value-disallowed-list */ - border-top: none; -} - -.CommentPlugin_CommentsPanel_List_Thread.interactive { - cursor: pointer; -} - -.CommentPlugin_CommentsPanel_List_Thread.interactive:hover { - background-color: #fafafa; -} - -.CommentPlugin_CommentsPanel_List_Thread.active { - background-color: #fafafa; - border-left: 15px solid #eee; - cursor: inherit; -} - -.CommentPlugin_CommentsPanel_List_Thread_QuoteBox { - padding-top: 10px; - color: #ccc; - display: block; -} - -.CommentPlugin_CommentsPanel_List_Thread_Quote { - margin: 0 10px; -} - -.CommentPlugin_CommentsPanel_List_Thread_Quote span { - color: #222; - background-color: rgba(255, 212, 0, 0.4); - padding: 1px; - line-height: 1.4; - display: inline; - font-weight: bold; -} - -.CommentPlugin_CommentsPanel_List_Thread_Comments { - padding-left: 10px; - list-style-type: none; -} - -.CommentPlugin_CommentsPanel_List_Thread_Comments -.CommentPlugin_CommentsPanel_List_Comment:first-child { - /* stylelint-disable-next-line declaration-property-value-disallowed-list */ - border: none; - margin-left: 0; - padding-left: 5px; -} - -.CommentPlugin_CommentsPanel_List_Thread_Comments -.CommentPlugin_CommentsPanel_List_Comment:first-child.CommentPlugin_CommentsPanel_List_Comment:last-child { - padding-bottom: 5px; -} - -.CommentPlugin_CommentsPanel_List_Thread_Comments .CommentPlugin_CommentsPanel_List_Comment { - padding-left: 10px; - border-left: 5px solid #eee; - margin-left: 5px; -} - -.CommentPlugin_CommentsPanel_List_Thread_Editor { - position: relative; - padding-top: 1px; -} - -.CommentPlugin_CommentsPanel_List_DeleteButton { - position: absolute; - top: 10px; - right: 10px; - width: 30px; - height: 30px; - background-color: transparent; - opacity: 0; -} - -.CommentPlugin_CommentsPanel_DeletedComment, -.CommentPlugin_CommentsPanel_List_Comment:hover .CommentPlugin_CommentsPanel_List_DeleteButton, -.CommentPlugin_CommentsPanel_List_Thread_QuoteBox:hover -.CommentPlugin_CommentsPanel_List_DeleteButton { - opacity: 0.5; -} - -.CommentPlugin_CommentsPanel_List_DeleteButton:hover { - background-color: transparent; - opacity: 1; - filter: invert(45%) sepia(98%) saturate(2299%) hue-rotate(201deg) brightness(100%) contrast(92%); -} - -/* stylelint-disable-next-line selector-no-qualifying-type */ -.CommentPlugin_CommentsPanel_List_DeleteButton i.delete { - background-size: contain; - position: absolute; - left: 5px; - top: 5px; - height: 15px; - width: 15px; - vertical-align: -10px; - background-image: url('/assets/images/icons/trash3.svg'); - transition: opacity 0.2s linear; -} diff --git a/extensions/src/platform-scripture-editor/src/_editor-overrides.scss b/extensions/src/platform-scripture-editor/src/_editor-overrides.scss deleted file mode 100644 index df92d025a7..0000000000 --- a/extensions/src/platform-scripture-editor/src/_editor-overrides.scss +++ /dev/null @@ -1,447 +0,0 @@ -/* Platform.Bible image protocol overrides */ -/* stylelint-disable selector-no-qualifying-type */ -// this is required for many overwrites -/* stylelint-disable selector-class-pattern */ - -// Platform.Bible modifications - -.editor-container { - max-width: none; - color: hsl(var(--foreground)); - - // remove rounded top corners to look better in tabs - .toolbar { - border-bottom: 1px solid hsl(var(--border)); - border-top-left-radius: 0; - border-top-right-radius: 0; - - background-color: hsl(var(--background)); - color: hsl(var(--color)); - } -} - -// text selection -:focus ::selection { - color: hsl(var(--primary-foreground)); - background-color: hsl(var(--primary)); -} - -::selection { - color: hsl(var(--secondary-foreground)); - background-color: hsl(var(--secondary)); -} - -// focus ring -:focus-visible, -.CommentPlugin_CommentInputBox_Editor:focus { - outline: 2px solid transparent; - outline-offset: 2px; - --tw-ring-offset-width: 2px; - --tw-ring-color: hsl(var(--ring)); - --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) - var(--tw-ring-offset-color); - --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) - var(--tw-ring-color); - --tw-ring-offset-color: hsl(var(--background)); - box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); -} - -// buttons - -// icon button variant "ghost" -.Button__root, -button.toolbar-item { - color: hsl(var(--foreground)); - - i, - i.format { - opacity: unset; - } - - &:disabled i, - &:disabled i.format { - opacity: 0.5; - } -} - -// hover button, input button -.CommentPlugin_CommentsPanel_SendButton, -.CommentPlugin_CommentsPanel_List_DeleteButton { - color: hsl(var(--accent-foreground)); -} - -// text button variant "ghost" on popover -.Modal__closeButton { - color: hsl(var(--popover-foreground)); - background-color: hsl(var(--popover)); -} - -// toggle button -.CommentPlugin_ShowCommentsButton.active { - background-color: hsl(var(--accent)); -} - -// hover and active states -.toolbar-item:hover:not([disabled]), -.toolbar-item:active:not([disabled]), -.CommentPlugin_ShowCommentsButton.Button__root:hover:not([disabled]), -.CommentPlugin_AddCommentBox_button.Button__root:hover:not([disabled]), // needs to be overwritten -.CommentPlugin_AddCommentBox:hover:not([disabled]), // fills until the border -.CommentPlugin_CommentsPanel_SendButton:hover:not([disabled]), -.CommentPlugin_CommentsPanel_SendButton:active:not([disabled]), -.CommentPlugin_CommentsPanel_List_DeleteButton:hover:not([disabled]), -.CommentPlugin_CommentsPanel_List_DeleteButton:active:not([disabled]), -.Modal__closeButton:hover:not([disabled]) { - color: hsl(var(--accent-foreground)); - background-color: hsl(var(--accent)); -} - -.CommentPlugin_CommentsPanel_List_DeleteButton:hover, -.CommentPlugin_CommentsPanel_SendButton:hover i.send, -.CommentPlugin_CommentsPanel_DeletedComment, -.CommentPlugin_CommentsPanel_List_Comment:hover .CommentPlugin_CommentsPanel_List_DeleteButton, -.CommentPlugin_CommentsPanel_List_Thread_QuoteBox:hover -.CommentPlugin_CommentsPanel_List_DeleteButton { - filter: unset; - opacity: unset; -} - -// toolbar - -.toolbar .toolbar-item .text { - color: hsl(var(--foreground)); -} - -.toolbar .divider { - background-color: hsl(var(--border)); -} - -.dropdown { - background-color: hsl(var(--popover)); - - .item { - color: hsl(var(--popover-foreground)); - background-color: hsl(var(--popover)); - } - - .item:hover { - background-color: hsl(var(--accent)); - color: hsl(var(--accent-foreground)); - } - - .divider { - background-color: hsl(var(--muted)); - } -} - -// make the toolbar shrink and grow dynamically -// work around https://github.com/BiblioNexus-Foundation/scripture-editors/issues/126 -.toolbar-item.block-controls { - max-width: calc(100% - 140px); - - .icon.block-marker.nb { - min-width: 20px; - } - - .chevron-down { - min-width: 16px; - } -} - -.toolbar .toolbar-item .icon { - min-width: 20px; -} - -// _commenting.scss - -.CommentPlugin_CommentInputBox, -.Modal__modal { - background-color: hsl(var(--popover)); - color: hsl(var(--popover-foreground)); - - &::before { - background-color: hsl(var(--popover)); - border-color: transparent transparent hsl(var(--popover)) hsl(var(--popover)); - } - - .Button__root { - background-color: hsl(var(--secondary)); - color: hsl(var(--secondary-foreground)); - } - - .Button__root.primary { - background-color: hsl(var(--primary)); - color: hsl(var(--primary-foreground)); - } - - .Button__root:hover:not([disabled]) { - opacity: 0.8; - } -} - -.typeahead-popover, -.typeahead-popover li { - background-color: hsl(var(--popover)); - color: hsl(var(--popover-foreground)); -} - -.typeahead-popover ul li.selected, -.typeahead-popover li:hover { - background-color: hsl(var(--accent)); - color: hsl(var(--accent-foreground)); -} - -.CommentPlugin_CommentInputBox_Editor, -.CommentPlugin_CommentsPanel_Editor { - background-color: hsl(var(--popover)); - color: hsl(var(--popover-foreground)); - border-color: hsl(var(--border)); - caret-color: hsl(var(--foreground)); -} - -.CommentPlugin_CommentsPanel_Heading, -.CommentPlugin_CommentsPanel_List_Thread { - border-color: hsl(var(--border)); -} - -.CommentPlugin_ShowCommentsButton { - z-index: 10; - right: 26px; -} - -// work around https://github.com/BiblioNexus-Foundation/scripture-editors/issues/127 -.CommentPlugin_AddCommentBox { - left: unset !important; - right: 0 !important; - - background-color: hsl(var(--popover)); - color: hsl(var(--popover-foreground)); - border: 1px solid hsl(var(--border)); -} - -.CommentPlugin_AddCommentBox_button { - color: hsl(var(--popover-foreground)); - - &:hover { - background-color: hsl(var(--accent)); - color: hsl(var(--accent-foreground)); - } -} - -.CommentPlugin_CommentsPanel { - background-color: hsl(var(--popover)); - color: hsl(var(--popover-foreground)); -} - -.CommentPlugin_CommentsPanel_SendButton { - margin: 10px; - top: 0; - right: 0; -} - -// inside the editor - -.editor-inner { - background: hsl(var(--background)); -} - -.formatted-font .verse { - background-color: hsl(var(--secondary)); -} - -// icons - -button { - i, - i.chevron-down, - .icon { - -webkit-mask-size: contain; - -webkit-mask-position: center; - background-color: currentColor; - } -} - -i.add-comment { - // could be replaced with lucid icon message-square-text - -webkit-mask-image: url('papi-extension://platformScriptureEditor/assets/images/icons/chat-left-text.svg'); - background-image: none; -} - -i.comments { - // could be replaced with lucid icon messages-square - -webkit-mask-image: url('papi-extension://platformScriptureEditor/assets/images/icons/comments.svg'); - background-image: none; -} - -i.send { - // could be replaced with lucid icon send - -webkit-mask-image: url('papi-extension://platformScriptureEditor/assets/images/icons/send.svg'); - background-image: none; -} - -.CommentPlugin_CommentsPanel_List_DeleteButton i.delete { - // could be replaced with lucid icon trash-2 - -webkit-mask-image: url('papi-extension://platformScriptureEditor/assets/images/icons/trash3.svg'); - background-image: none; - // linting does not like a duplicate rule, therefore putting it in here. - // overwriting requires this exact selector (or a more specific one) - left: 8px; - top: 8px; -} - -// _editor.scss - -.link-editor div.link-edit { - -webkit-mask-image: url('papi-extension://platformScriptureEditor/assets/images/icons/pencil-fill.svg'); - background-image: none; -} - -i.undo { - // could be replaced with lucid icon rotate-ccw - -webkit-mask-image: url('papi-extension://platformScriptureEditor/assets/images/icons/arrow-counterclockwise.svg'); - background-image: none; -} - -i.redo { - // could be replaced with lucid icon rotate-cw - -webkit-mask-image: url('papi-extension://platformScriptureEditor/assets/images/icons/arrow-clockwise.svg'); - background-image: none; -} - -%paragraph { - // could be replaced with lucid icon text - -webkit-mask-image: url('papi-extension://platformScriptureEditor/assets/images/icons/text-paragraph.svg'); - background-image: none; -} - -%h-one { - // could be replaced with lucid icon heading-1 - -webkit-mask-image: url('papi-extension://platformScriptureEditor/assets/images/icons/type-h1.svg'); - background-image: none; -} - -%h-two { - // could be replaced with lucid icon heading-2 - -webkit-mask-image: url('papi-extension://platformScriptureEditor/assets/images/icons/type-h2.svg'); - background-image: none; -} - -%h-three { - -webkit-mask-image: url('papi-extension://platformScriptureEditor/assets/images/icons/type-h3.svg'); - background-image: none; -} - -%square-one { - -webkit-mask-image: url('papi-extension://platformScriptureEditor/assets/images/icons/1-square.svg'); - background-image: none; -} - -%square-two { - -webkit-mask-image: url('papi-extension://platformScriptureEditor/assets/images/icons/2-square.svg'); - background-image: none; -} - -%square-three { - -webkit-mask-image: url('papi-extension://platformScriptureEditor/assets/images/icons/3-square.svg'); - background-image: none; -} - -%square-four { - -webkit-mask-image: url('papi-extension://platformScriptureEditor/assets/images/icons/4-square.svg'); - background-image: none; -} - -%bookmark { - -webkit-mask-image: url('papi-extension://platformScriptureEditor/assets/images/icons/bookmark.svg'); - background-image: none; -} - -%file-earmark { - -webkit-mask-image: url('papi-extension://platformScriptureEditor/assets/images/icons/file-earmark.svg'); - background-image: none; -} - -.icon.bullet-list, -.icon.ul { - -webkit-mask-image: url('papi-extension://platformScriptureEditor/assets/images/icons/list-ul.svg'); - background-image: none; -} - -.icon.numbered-list, -.icon.ol { - -webkit-mask-image: url('papi-extension://platformScriptureEditor/assets/images/icons/list-ol.svg'); - background-image: none; -} - -%quote { - // could be replaced with lucid icon message-square-quote - -webkit-mask-image: url('papi-extension://platformScriptureEditor/assets/images/icons/chat-square-quote.svg'); - background-image: none; -} - -.icon.ban { - // could be replaced with lucid icon lucide-ban - -webkit-mask-image: url('papi-extension://platformScriptureEditor/assets/images/icons/ban.svg'); - background-image: none; -} - -.icon.code { - -webkit-mask-image: url('papi-extension://platformScriptureEditor/assets/images/icons/code.svg'); - background-image: none; -} - -i.bold { - -webkit-mask-image: url('papi-extension://platformScriptureEditor/assets/images/icons/type-bold.svg'); - background-image: none; -} - -i.italic { - -webkit-mask-image: url('papi-extension://platformScriptureEditor/assets/images/icons/type-italic.svg'); - background-image: none; -} - -i.underline { - -webkit-mask-image: url('papi-extension://platformScriptureEditor/assets/images/icons/type-underline.svg'); - background-image: none; -} - -i.strikethrough { - -webkit-mask-image: url('papi-extension://platformScriptureEditor/assets/images/icons/type-strikethrough.svg'); - background-image: none; -} - -i.code { - -webkit-mask-image: url('papi-extension://platformScriptureEditor/assets/images/icons/code.svg'); - background-image: none; -} - -i.link { - -webkit-mask-image: url('papi-extension://platformScriptureEditor/assets/images/icons/link.svg'); - background-image: none; -} - -i.left-align { - -webkit-mask-image: url('papi-extension://platformScriptureEditor/assets/images/icons/text-left.svg'); - background-image: none; -} - -i.center-align { - -webkit-mask-image: url('papi-extension://platformScriptureEditor/assets/images/icons/text-center.svg'); - background-image: none; -} - -i.right-align { - -webkit-mask-image: url('papi-extension://platformScriptureEditor/assets/images/icons/text-right.svg'); - background-image: none; -} - -i.justify-align { - -webkit-mask-image: url('papi-extension://platformScriptureEditor/assets/images/icons/justify.svg'); - background-image: none; -} - -i.chevron-down { - // could be replaced with lucid icon chevron-down - -webkit-mask-image: url('papi-extension://platformScriptureEditor/assets/images/icons/chevron-down.svg'); - background-image: none; -} diff --git a/extensions/src/platform-scripture-editor/src/_editor.scss b/extensions/src/platform-scripture-editor/src/_editor.scss deleted file mode 100644 index 86f2eb924a..0000000000 --- a/extensions/src/platform-scripture-editor/src/_editor.scss +++ /dev/null @@ -1,858 +0,0 @@ -/* stylelint-disable selector-no-qualifying-type */ - -/* Lexical */ - -.editor-container { - margin: 0 auto 20px; - border-radius: 2px; - max-width: 600px; - color: #000; - position: relative; - line-height: 20px; - font-weight: 400; - text-align: start; - border-top-left-radius: 10px; - border-top-right-radius: 10px; -} - -.editor-inner { - background: #fff; - position: relative; - display: flex; -} - -.editor-input { - min-height: 150px; - resize: none; - font-size: 15px; - position: relative; - tab-size: 1; - outline: 0; - padding: 15px 10px; - caret-color: #444; - flex: auto; -} - -.editor-input > p { - direction: inherit; - margin-top: 0; - margin-bottom: 0; - line-height: 1.5; -} - -.editor-placeholder { - color: #999; - overflow: hidden; - position: absolute; - text-overflow: ellipsis; - top: 15px; - font-size: 15px; - user-select: none; - display: inline-block; - pointer-events: none; - margin-block-start: 1em; - margin-inline-start: calc(10px + 2.5vw); - width: fill-available; -} - -.editor-text-bold { - font-weight: bold; -} - -.editor-text-italic { - font-style: italic; -} - -.editor-text-underline { - text-decoration: underline; -} - -.editor-text-strikethrough { - text-decoration: line-through; -} - -/* stylelint-disable-next-line selector-class-pattern */ -.editor-text-underlineStrikethrough { - text-decoration: underline line-through; -} - -.editor-text-code { - background-color: rgb(240, 242, 245); - padding: 1px 0.25rem; - font-family: Menlo, Consolas, Monaco, monospace; - font-size: 94%; -} - -.editor-link { - color: rgb(33, 111, 219); - text-decoration: none; -} - -.tree-view-output { - display: block; - background: #222; - color: #fff; - padding: 5px; - font-size: 12px; - white-space: pre-wrap; - margin: 1px auto 10px; - max-height: 250px; - position: relative; - border-bottom-left-radius: 10px; - border-bottom-right-radius: 10px; - overflow: auto; - line-height: 14px; -} - -/* stylelint-disable-next-line selector-class-pattern */ -.editor-tokenComment { - color: slategray; -} - -/* stylelint-disable-next-line selector-class-pattern */ -.editor-tokenPunctuation { - color: #999; -} - -/* stylelint-disable-next-line selector-class-pattern */ -.editor-tokenProperty { - color: #905; -} - -/* stylelint-disable-next-line selector-class-pattern */ -.editor-tokenSelector { - color: #690; -} - -/* stylelint-disable-next-line selector-class-pattern */ -.editor-tokenOperator { - color: #9a6e3a; -} - -/* stylelint-disable-next-line selector-class-pattern */ -.editor-tokenAttr { - color: #07a; -} - -/* stylelint-disable-next-line selector-class-pattern */ -.editor-tokenVariable { - color: #e90; -} - -/* stylelint-disable-next-line selector-class-pattern */ -.editor-tokenFunction { - color: #dd4a68; -} - -.editor-typed-mark-spelling { - background: inherit; - text-decoration: underline wavy red; -} - -.editor-typed-mark-grammar { - background: inherit; - text-decoration: underline wavy grey; -} - -.editor-typed-mark-other { - background: inherit; - text-decoration: underline wavy green; -} - -.editor-typed-mark-spelling.editor-typed-mark-grammar { - text-decoration-color: rgb(192, 64, 64); -} - -.editor-typed-mark-spelling.editor-typed-mark-grammar.editor-typed-mark-other { - text-decoration-color: rgb(128, 85, 43); -} - -.editor-typed-mark-comment { - background: rgba(255, 212, 0, 0.14); - border-bottom: 2px solid rgba(255, 212, 0, 0.3); - padding-bottom: 2px; -} - -.editor-typed-mark-comment.selected { - background: rgba(255, 212, 0, 0.5); - border-bottom: 2px solid rgba(255, 212, 0, 1); -} - -/* stylelint-disable-next-line selector-class-pattern */ -.editor-typed-markOverlap-comment { - background: rgba(255, 212, 0, 0.3); - border-bottom: 2px solid rgba(255, 212, 0, 0.7); -} - -/* stylelint-disable-next-line selector-class-pattern */ -.editor-typed-markOverlap-comment.selected { - background: rgba(255, 212, 0, 0.7); - border-bottom: 2px solid rgba(255, 212, 0, 0.7); -} - -.editor-paragraph { - margin: 0; - margin-bottom: 8px; - position: relative; -} - -.editor-paragraph:last-child { - margin-bottom: 0; -} - -pre::-webkit-scrollbar { - background: transparent; - width: 10px; -} - -pre::-webkit-scrollbar-thumb { - background: #999; -} - -.link-editor { - position: absolute; - z-index: 100; - top: -10000px; - left: -10000px; - margin-top: -6px; - max-width: 300px; - width: 100%; - opacity: 0; - background-color: #fff; - box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3); - border-radius: 8px; - transition: opacity 0.5s; -} - -.link-editor .link-input { - display: block; - width: calc(100% - 24px); - box-sizing: border-box; - margin: 8px 12px; - padding: 8px 12px; - border-radius: 15px; - background-color: #eee; - font-size: 15px; - color: rgb(5, 5, 5); - border: 0; - outline: 0; - position: relative; - font-family: inherit; -} - -.link-editor div.link-edit { - background-image: url('/assets/images/icons/pencil-fill.svg'); - background-size: 16px; - background-position: center; - background-repeat: no-repeat; - width: 35px; - vertical-align: -0.25em; - position: absolute; - top: 0; - bottom: 0; - cursor: pointer; -} - -.link-editor[dir='ltr'] div.link-edit { - right: 0; -} - -.link-editor[dir='rtl'] div.link-edit { - left: 0; -} - -.link-editor .link-input a { - color: rgb(33, 111, 219); - text-decoration: none; - display: block; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} - -.link-editor[dir='ltr'] .link-input a { - margin-right: 30px; -} - -.link-editor[dir='rtl'] .link-input a { - margin-left: 30px; -} - -.link-editor .link-input a:hover { - text-decoration: underline; -} - -.link-editor .button { - width: 20px; - height: 20px; - display: inline-block; - padding: 6px; - border-radius: 8px; - cursor: pointer; - margin: 0 2px; -} - -.link-editor .button.hovered { - width: 20px; - height: 20px; - display: inline-block; - background-color: #eee; -} - -.dropdown { - z-index: 100; - display: block; - position: fixed; - box-shadow: - 0 12px 28px 0 rgba(0, 0, 0, 0.2), - 0 2px 4px 0 rgba(0, 0, 0, 0.1), - inset 0 0 0 1px rgba(255, 255, 255, 0.5); - border-radius: 8px; - min-height: 40px; - background-color: #fff; -} - -.dropdown .item { - margin: 0 8px; - padding: 8px; - color: #050505; - cursor: pointer; - line-height: 16px; - font-size: 15px; - display: flex; - align-content: center; - flex-direction: row; - flex-shrink: 0; - justify-content: space-between; - background-color: #fff; - border-radius: 8px; - border: 0; - max-width: 250px; -} - -.dropdown .item.block-marker { - min-width: 420px; -} - -.dropdown .item.fontsize-item, -.dropdown .item.fontsize-item .text { - min-width: unset; -} - -.dropdown .item .active { - display: flex; - width: 20px; - height: 20px; - background-size: contain; -} - -.dropdown .item:first-child { - margin-top: 8px; -} - -.dropdown .item:last-child { - margin-bottom: 8px; -} - -.dropdown .item:hover { - background-color: #eee; -} - -.dropdown .item .text { - display: flex; - line-height: 20px; - flex-grow: 1; - min-width: 150px; - margin: 0; - text-indent: 0; -} - -.dropdown .item .icon { - display: flex; - width: 20px; - height: 20px; - user-select: none; - margin-right: 12px; - line-height: 16px; - background-size: contain; - background-position: center; - background-repeat: no-repeat; -} - -.dropdown .divider { - width: auto; - background-color: #eee; - margin: 4px 8px; - height: 1px; -} - -button.item.dropdown-item-active { - background-color: rgba(223, 232, 250, 0.3); -} - -button.item.dropdown-item-active i { - opacity: 1; -} - -i.undo { - background-image: url('/assets/images/icons/arrow-counterclockwise.svg'); -} - -i.redo { - background-image: url('/assets/images/icons/arrow-clockwise.svg'); -} - -%paragraph { - background-image: url('/assets/images/icons/text-paragraph.svg'); -} - -.icon.m, -.icon.nb, -.icon.p, -.icon.pi, -.icon.paragraph { - @extend %paragraph; -} - -%h-one { - background-image: url('/assets/images/icons/type-h1.svg'); -} - -.icon.ms, -.icon.ms1, -.icon.r, -.icon.s, -.icon.large-heading, -.icon.h1 { - @extend %h-one; -} - -%h-two { - background-image: url('/assets/images/icons/type-h2.svg'); -} - -.icon.ms2, -.icon.small-heading, -.icon.h2 { - @extend %h-two; -} - -%h-three { - background-image: url('/assets/images/icons/type-h3.svg'); -} - -.icon.ms3, -.icon.h3 { - @extend %h-three; -} - - -%square-one { - background-image: url('/assets/images/icons/1-square.svg'); -} - -.icon.mt, -.icon.mt1, -.icon.square-1 { - @extend %square-one; -} - -%square-two { - background-image: url('/assets/images/icons/2-square.svg'); -} - -.icon.mt2, -.icon.square-2 { - @extend %square-two; -} - -%square-three { - background-image: url('/assets/images/icons/3-square.svg'); -} - -.icon.mt3, -.icon.square-3 { - @extend %square-three; -} - -%square-four { - background-image: url('/assets/images/icons/4-square.svg'); -} - -.icon.mt4, -.icon.square-4 { - @extend %square-four; -} - -%bookmark { - background-image: url('/assets/images/icons/bookmark.svg'); -} - -.icon.cl, -.icon.bookmark { - @extend %bookmark; -} - -%file-earmark { - background-image: url('/assets/images/icons/file-earmark.svg'); -} - -.icon.ide, -.icon.h, -.icon.h1, -.icon.h2, -.icon.h3, -.icon.toc1, -.icon.toc2, -.icon.toc3, -.icon.file-earmark { - @extend %file-earmark; -} - -.icon.bullet-list, -.icon.ul { - background-image: url('/assets/images/icons/list-ul.svg'); -} - -.icon.numbered-list, -.icon.ol { - background-image: url('/assets/images/icons/list-ol.svg'); -} - -%quote { - background-image: url('/assets/images/icons/chat-square-quote.svg'); -} - -.icon.b, -.icon.q1, -.icon.q2, -.icon.quote { - @extend %quote; -} - -.icon.ban { - background-image: url('/assets/images/icons/ban.svg'); -} - -.icon.code { - background-image: url('/assets/images/icons/code.svg'); -} - -i.bold { - background-image: url('/assets/images/icons/type-bold.svg'); -} - -i.italic { - background-image: url('/assets/images/icons/type-italic.svg'); -} - -i.underline { - background-image: url('/assets/images/icons/type-underline.svg'); -} - -i.strikethrough { - background-image: url('/assets/images/icons/type-strikethrough.svg'); -} - -i.code { - background-image: url('/assets/images/icons/code.svg'); -} - -i.link { - background-image: url('/assets/images/icons/link.svg'); -} - -i.left-align { - background-image: url('/assets/images/icons/text-left.svg'); -} - -i.center-align { - background-image: url('/assets/images/icons/text-center.svg'); -} - -i.right-align { - background-image: url('/assets/images/icons/text-right.svg'); -} - -i.justify-align { - background-image: url('/assets/images/icons/justify.svg'); -} - -.actions i { - background-size: contain; - display: inline-block; - height: 15px; - width: 5px; - vertical-align: -0.25em; -} - -i.chevron-down { - background-color: transparent; - background-size: contain; - display: inline-block; - height: 8px; - width: 8px; - background-image: url('/assets/images/icons/chevron-down.svg'); -} - -.debug-timetravel-panel { - overflow: hidden; - padding: 0 0 10px; - margin: auto; - display: flex; -} - -.debug-timetravel-panel-slider { - padding: 0; - flex: 8; -} - -.debug-timetravel-panel-button { - padding: 0; - border: 0; - background: none; - flex: 1; - color: #fff; - font-size: 12px; -} - -.debug-timetravel-panel-button:hover { - text-decoration: underline; -} - -.debug-timetravel-button { - border: 0; - padding: 0; - font-size: 12px; - top: 10px; - right: 15px; - position: absolute; - background: none; - color: #fff; -} - -.debug-timetravel-button:hover { - text-decoration: underline; -} - -.toolbar { - display: flex; - margin-bottom: 1px; - background: #fff; - padding: 4px; - border-top-left-radius: 10px; - border-top-right-radius: 10px; - vertical-align: middle; - overflow: auto; - height: 36px; - position: sticky; - top: 0; - z-index: 2; -} - -button.toolbar-item { - border: 0; - display: flex; - background: none; - border-radius: 10px; - padding: 8px; - cursor: pointer; - vertical-align: middle; - flex-shrink: 0; - align-items: center; - justify-content: space-between; -} - -button.toolbar-item:disabled { - cursor: not-allowed; -} - -button.toolbar-item.spaced { - margin-right: 2px; -} - -button.toolbar-item i.format { - background-size: contain; - height: 18px; - width: 18px; - vertical-align: -0.25em; - display: flex; - opacity: 0.6; -} - -button.toolbar-item:disabled .icon, -button.toolbar-item:disabled .text, -button.toolbar-item:disabled i.format, -button.toolbar-item:disabled .chevron-down { - opacity: 0.2; -} - -button.toolbar-item.active { - background-color: rgba(223, 232, 250, 0.3); -} - -button.toolbar-item.active i { - opacity: 1; -} - -.toolbar-item:hover:not([disabled]) { - background-color: #eee; -} - -.toolbar-item.font-family .text { - display: block; - max-width: 40px; -} - -.toolbar .code-language { - width: 150px; -} - -.toolbar .toolbar-item .text { - line-height: 20px; - vertical-align: middle; - font-size: 14px; - color: #777; - text-overflow: ellipsis; - overflow: hidden; - width: 170px; - white-space: nowrap; - display: inline-block; - height: 20px; - text-align: start; - padding-right: 10px; -} - -.toolbar .toolbar-item .icon { - display: flex; - width: 20px; - height: 20px; - user-select: none; - margin-right: 8px; - line-height: 16px; - background-size: contain; -} - -.toolbar i.chevron-down, -.toolbar-item i.chevron-down { - margin-top: 3px; - width: 16px; - height: 16px; - display: flex; - user-select: none; -} - -.toolbar i.chevron-down.inside { - width: 16px; - height: 16px; - display: flex; - margin-left: -25px; - margin-top: 11px; - margin-right: 10px; - pointer-events: none; -} - -.toolbar .divider { - width: 1px; - background-color: #eee; - margin: 0 4px; -} - -/* ContextMenuPlugin */ - -.auto-embed-menu { - width: 150px; -} - -.typeahead-popover { - background: #fff; - box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3); - border-radius: 8px; -} - -.typeahead-popover ul { - padding: 0; - list-style: none; - margin: 0; - border-radius: 8px; - max-height: 200px; - overflow-y: scroll; - -ms-overflow-style: none; - scrollbar-width: none; -} - -.typeahead-popover ul::-webkit-scrollbar { - display: none; -} - -.typeahead-popover ul li { - margin: 0; - min-width: 180px; - font-size: 14px; - outline: none; - cursor: pointer; - border-radius: 8px; -} - -.typeahead-popover ul li.selected { - background: #eee; -} - -.typeahead-popover ul li.disabled { - opacity: 0.5; - cursor: not-allowed; -} - -.typeahead-popover li { - margin: 0 8px; - padding: 8px; - color: #050505; - cursor: pointer; - line-height: 16px; - font-size: 15px; - display: flex; - align-content: center; - flex-direction: row; - flex-shrink: 0; - background-color: #fff; - border-radius: 8px; - border: 0; -} - -.typeahead-popover li.active { - display: flex; - width: 20px; - height: 20px; - background-size: contain; -} - -.typeahead-popover li:first-child { - border-radius: 8px 8px 0 0; -} - -.typeahead-popover li:last-child { - border-radius: 0 0 8px 8px; -} - -.typeahead-popover li:hover { - background-color: #eee; -} - -.typeahead-popover li .text { - display: flex; - line-height: 20px; - flex-grow: 1; - min-width: 150px; -} - -.typeahead-popover li .icon { - display: flex; - width: 20px; - height: 20px; - user-select: none; - margin-right: 8px; - line-height: 16px; - background-size: contain; - background-repeat: no-repeat; - background-position: center; -} diff --git a/extensions/src/platform-scripture-editor/src/_usj-nodes.scss b/extensions/src/platform-scripture-editor/src/_usj-nodes.scss deleted file mode 100644 index a1b4d206d2..0000000000 --- a/extensions/src/platform-scripture-editor/src/_usj-nodes.scss +++ /dev/null @@ -1,2316 +0,0 @@ -/* stylelint-disable */ - -/* Sample styles for USJ Nodes */ - -.leadingFloat { - float: start; -} -.clearFloat { - clear: both; -} -.align_start { - text-align: start; -} -.align_center { - text-align: center; -} -.align_end { - text-align: end; -} -@font-face { - font-family: "Charis SIL"; - src: local("Charis SIL"), local("Charis SIL Bold"), local("Charis SIL Bold Italic"), - local("Charis SIL Italic"), url("file:///C:/Windows/Fonts/CharisSIL-B.ttf"); - font-weight: normal; -} -@font-face { - font-family: "Charis SIL"; - src: local("Charis SIL Bold"); - font-weight: bold; -} -@font-face { - font-family: "Charis SIL"; - src: local("Charis SIL Italic"); - font-style: italic; -} -@font-face { - font-family: "Charis SIL"; - src: local("Charis SIL Bold Italic"); - font-weight: bold; - font-style: italic; -} -.formatted-font .usfm { - font-family: "Charis SIL"; - font-size: 12pt; -} - -/* BookNode */ - -.formatted-font .usfm_id { - font-size: 100%; -} - -.book[data-code]::before { - content: attr(data-code) " "; -} - -/* ChapterNode, ImmutableChapterNode */ - -.formatted-font .usfm_c { - display: block; - font-weight: bold; - font-size: 150%; -} -.text-spacing .usfm_c { - margin-bottom: 4pt; - margin-top: 8pt; -} - -.formatted-font .usfm_ca { - color: #007306; - font-size: 133%; - font-style: italic; -} - -.formatted-font .usfm_cp { - font-weight: bold; - color: #003380; - font-size: 150%; -} -.text-spacing .usfm_cp { - margin-bottom: 4pt; - margin-top: 8pt; -} - -/* VerseNode, ImmutableVerseNode */ - -.formatted-font .usfm_v { - font-size: 100%; - vertical-align: text-top; - font-size: 66%; -} -.text-spacing .usfm_v { - white-space: nowrap; - unicode-bidi: embed; -} - -.formatted-font .usfm_va { - color: #007306; - font-size: 100%; - vertical-align: text-top; - font-size: 66%; -} - -.formatted-font .usfm_vp { - color: #003380; - font-size: 100%; - vertical-align: text-top; - font-size: 66%; -} - -/* ParaNode */ - -.formatted-font .usfm_usfm { - font-size: 100%; -} - -.formatted-font .usfm_ide { - font-size: 100%; -} - -.formatted-font .usfm_h { - font-size: 100%; -} - -/* check if deprecated */ -.formatted-font .usfm_h1 { - font-size: 100%; -} - -/* check if deprecated */ -.formatted-font .usfm_h2 { - font-size: 100%; -} - -/* check if deprecated */ -.formatted-font .usfm_h3 { - font-size: 100%; -} - -.formatted-font .usfm_toc1 { - font-weight: bold; - color: #004c00; - font-size: 100%; - font-style: italic; -} - -.formatted-font .usfm_toc2 { - color: #004c00; - font-size: 100%; - font-style: italic; -} - -.formatted-font .usfm_toc3 { - font-weight: bold; - color: #e05858; - font-size: 100%; - font-style: italic; -} - -.formatted-font .usfm_toca1 { - color: #8c8c8c; - font-size: 83%; - font-style: italic; -} - -.formatted-font .usfm_toca2 { - color: #8c8c8c; - font-size: 83%; - font-style: italic; -} - -.formatted-font .usfm_toca3 { - color: #8c8c8c; - font-size: 83%; - font-style: italic; -} - -.formatted-font .usfm_rem { - color: #003380; - font-size: 100%; -} - -.formatted-font .usfm_sts { - color: #003380; - font-size: 100%; -} - -/* check if deprecated */ -.formatted-font .usfm_restore { - color: #003380; - font-size: 100%; -} - -.formatted-font .usfm_imt { - font-weight: bold; - font-size: 116%; -} -.text-spacing .usfm_imt { - text-align: center; - margin-bottom: 4pt; - margin-top: 8pt; -} - -.formatted-font .usfm_imt1 { - font-weight: bold; - font-size: 116%; -} -.text-spacing .usfm_imt1 { - text-align: center; - margin-bottom: 4pt; - margin-top: 8pt; -} - -.formatted-font .usfm_imt2 { - font-size: 108%; - font-style: italic; -} -.text-spacing .usfm_imt2 { - text-align: center; - margin-bottom: 3pt; - margin-top: 6pt; -} - -.formatted-font .usfm_imt3 { - font-weight: bold; - font-size: 100%; -} -.text-spacing .usfm_imt3 { - text-align: center; - margin-bottom: 2pt; - margin-top: 2pt; -} - -.formatted-font .usfm_imt4 { - font-size: 100%; - font-style: italic; -} -.text-spacing .usfm_imt4 { - text-align: center; - margin-bottom: 2pt; - margin-top: 2pt; -} - -.formatted-font .usfm_imte { - font-weight: bold; - font-size: 166%; -} -.text-spacing .usfm_imte { - text-align: center; - margin-bottom: 4pt; - margin-top: 8pt; -} - -/* check if deprecated */ -.formatted-font .usfm_imte1 { - font-weight: bold; - font-size: 166%; -} -.text-spacing .usfm_imte1 { - text-align: center; - margin-bottom: 4pt; - margin-top: 8pt; -} - -/* check if deprecated */ -.formatted-font .usfm_imte2 { - font-size: 133%; - font-style: italic; -} -.text-spacing .usfm_imte2 { - text-align: center; - margin-bottom: 2pt; -} - -.formatted-font .usfm_is { - font-weight: bold; - font-size: 116%; -} -.text-spacing .usfm_is { - text-align: center; - margin-bottom: 4pt; - margin-top: 8pt; -} - -.formatted-font .usfm_is1 { - font-weight: bold; - font-size: 116%; -} -.text-spacing .usfm_is1 { - text-align: center; - margin-bottom: 4pt; - margin-top: 8pt; -} - -.formatted-font .usfm_is2 { - font-weight: bold; - font-size: 100%; -} -.text-spacing .usfm_is2 { - text-align: center; - margin-bottom: 4pt; - margin-top: 8pt; -} - -.formatted-font .usfm_iot { - font-weight: bold; - font-size: 100%; -} -.text-spacing .usfm_iot { - text-align: center; - margin-bottom: 4pt; - margin-top: 8pt; -} - -.formatted-font .usfm_io { - font-size: 100%; -} -.text-spacing[dir="ltr"] .usfm_io { - margin-left: 10vw; -} -.text-spacing[dir="rtl"] .usfm_io { - margin-right: 10vw; -} - -.formatted-font .usfm_io1 { - font-size: 100%; -} -.text-spacing[dir="ltr"] .usfm_io1 { - margin-left: 10vw; -} -.text-spacing[dir="rtl"] .usfm_io1 { - margin-right: 10vw; -} - -.formatted-font .usfm_io2 { - font-size: 100%; -} -.text-spacing[dir="ltr"] .usfm_io2 { - margin-left: 15vw; -} -.text-spacing[dir="rtl"] .usfm_io2 { - margin-right: 15vw; -} - -.formatted-font .usfm_io3 { - font-size: 100%; -} -.text-spacing[dir="ltr"] .usfm_io3 { - margin-left: 20vw; -} -.text-spacing[dir="rtl"] .usfm_io3 { - margin-right: 20vw; -} - -.formatted-font .usfm_io4 { - font-size: 100%; -} -.text-spacing[dir="ltr"] .usfm_io4 { - margin-left: 25vw; -} -.text-spacing[dir="rtl"] .usfm_io4 { - margin-right: 25vw; -} - -.formatted-font .usfm_ior { - font-size: 100%; -} - -.formatted-font .usfm_ip { - font-size: 100%; -} -.text-spacing .usfm_ip { - text-indent: 2.5vw; -} - -/* check if deprecated */ -.formatted-font .usfm_im { - font-size: 100%; -} - -.formatted-font .usfm_ipi { - font-size: 100%; -} -.text-spacing .usfm_ipi { - text-indent: 2.5vw; - margin-left: 5vw; - margin-right: 5vw; -} - -/* check if deprecated */ -.formatted-font .usfm_imi { - font-size: 100%; -} -.text-spacing .usfm_imi { - margin-left: 5vw; - margin-right: 5vw; -} - -.formatted-font .usfm_ili { - font-size: 100%; -} -.text-spacing .usfm_ili { - text-indent: -7.5vw; -} -.text-spacing[dir="ltr"] .usfm_ili { - margin-left: 10vw; -} -.text-spacing[dir="rtl"] .usfm_ili { - margin-right: 10vw; -} - -.formatted-font .usfm_ili1 { - font-size: 100%; -} -.text-spacing .usfm_ili1 { - text-indent: -7.5vw; -} -.text-spacing[dir="ltr"] .usfm_ili1 { - margin-left: 10vw; -} -.text-spacing[dir="rtl"] .usfm_ili1 { - margin-right: 10vw; -} - -.formatted-font .usfm_ili2 { - font-size: 100%; -} -.text-spacing .usfm_ili2 { - text-indent: -7.5vw; -} -.text-spacing[dir="ltr"] .usfm_ili2 { - margin-left: 15vw; -} -.text-spacing[dir="rtl"] .usfm_ili2 { - margin-right: 15vw; -} - -.formatted-font .usfm_ipq { - font-size: 100%; - font-style: italic; -} -.text-spacing .usfm_ipq { - text-indent: 2.5vw; - margin-left: 5vw; - margin-right: 5vw; -} - -.formatted-font .usfm_imq { - font-size: 100%; - font-style: italic; -} -.text-spacing .usfm_imq { - margin-left: 5vw; - margin-right: 5vw; -} - -.usfm_ipr { - text-align: end; -} -.formatted-font .usfm_ipr { - font-size: 100%; - font-style: italic; -} -.text-spacing .usfm_ipr { - margin-left: 5vw; - margin-right: 5vw; -} - -.formatted-font .usfm_ib { - font-size: 83%; -} - -/* check if deprecated */ -.formatted-font .usfm_iq { - font-size: 100%; - font-style: italic; -} -.text-spacing .usfm_iq { - text-indent: -15vw; -} -.text-spacing[dir="ltr"] .usfm_iq { - margin-left: 20vw; -} -.text-spacing[dir="rtl"] .usfm_iq { - margin-right: 20vw; -} - -/* check if deprecated */ -.formatted-font .usfm_iq1 { - font-size: 100%; - font-style: italic; -} -.text-spacing .usfm_iq1 { - text-indent: -15vw; -} -.text-spacing[dir="ltr"] .usfm_iq1 { - margin-left: 20vw; -} -.text-spacing[dir="rtl"] .usfm_iq1 { - margin-right: 20vw; -} - -/* check if deprecated */ -.formatted-font .usfm_iq2 { - font-size: 100%; - font-style: italic; -} -.text-spacing .usfm_iq2 { - text-indent: -10vw; -} -.text-spacing[dir="ltr"] .usfm_iq2 { - margin-left: 20vw; -} -.text-spacing[dir="rtl"] .usfm_iq2 { - margin-right: 20vw; -} - -/* check if deprecated */ -.formatted-font .usfm_iq3 { - font-size: 100%; - font-style: italic; -} -.text-spacing .usfm_iq3 { - text-indent: -5vw; -} -.text-spacing[dir="ltr"] .usfm_iq3 { - margin-left: 20vw; -} -.text-spacing[dir="rtl"] .usfm_iq3 { - margin-right: 20vw; -} - -.formatted-font .usfm_iex { - font-size: 100%; -} -.text-spacing .usfm_iex { - text-indent: 2.5vw; - margin-bottom: 4pt; - margin-top: 4pt; -} - -/* check if deprecated */ -.formatted-font .usfm_iqt { - font-size: 100%; - font-style: italic; -} - -.formatted-font .usfm_ie { - font-size: 83%; -} - -.formatted-font .usfm_cl { - font-weight: bold; - font-size: 150%; -} -.text-spacing .usfm_cl { - text-align: center; - margin-bottom: 4pt; - margin-top: 8pt; -} - -.formatted-font .usfm_cd { - font-size: 91%; -} -.text-spacing .usfm_cd { - margin-bottom: 4pt; - margin-top: 8pt; -} - -.formatted-font .usfm_p { - font-size: 100%; -} -.text-spacing .usfm_p { - text-indent: 2.5vw; -} - -.formatted-font .usfm_m { - font-size: 100%; -} - -.formatted-font .usfm_po { - font-size: 100%; -} -.text-spacing .usfm_po { - text-indent: 2.5vw; - margin-bottom: 4pt; - margin-top: 4pt; -} - -.usfm_pr { - text-align: end; -} -.formatted-font .usfm_pr { - font-size: 100%; -} - -.usfm_cls { - text-align: end; -} -.formatted-font .usfm_cls { - font-size: 100%; -} - -.formatted-font .usfm_pmo { - font-size: 100%; -} -.text-spacing .usfm_pmo { - margin-left: 5vw; - margin-right: 5vw; -} - -.formatted-font .usfm_pm { - font-size: 100%; -} -.text-spacing .usfm_pm { - text-indent: 2.5vw; - margin-left: 5vw; - margin-right: 5vw; -} - -.formatted-font .usfm_pmc { - font-size: 100%; -} -.text-spacing .usfm_pmc { - margin-left: 5vw; - margin-right: 5vw; -} - -.usfm_pmr { - text-align: end; -} -.formatted-font .usfm_pmr { - font-size: 100%; -} -.text-spacing .usfm_pmr { - margin-left: 5vw; - margin-right: 5vw; -} - -.formatted-font .usfm_pi { - font-size: 100%; -} -.text-spacing .usfm_pi { - text-indent: 2.5vw; - margin-left: 5vw; - margin-right: 5vw; -} - -.formatted-font .usfm_pi1 { - font-size: 100%; -} -.text-spacing .usfm_pi1 { - text-indent: 2.5vw; - margin-left: 5vw; - margin-right: 5vw; -} - -.formatted-font .usfm_pi2 { - font-size: 100%; -} -.text-spacing .usfm_pi2 { - text-indent: 2.5vw; -} -.text-spacing[dir="ltr"] .usfm_pi2 { - margin-left: 10vw; - margin-right: 5vw; -} -.text-spacing[dir="rtl"] .usfm_pi2 { - margin-left: 5vw; - margin-right: 10vw; -} - -.formatted-font .usfm_pi3 { - font-size: 100%; -} -.text-spacing .usfm_pi3 { - text-indent: 2.5vw; -} -.text-spacing[dir="ltr"] .usfm_pi3 { - margin-left: 15vw; - margin-right: 5vw; -} -.text-spacing[dir="rtl"] .usfm_pi3 { - margin-left: 5vw; - margin-right: 15vw; -} - -.formatted-font .usfm_pc { - font-size: 100%; -} -.text-spacing .usfm_pc { - text-align: center; -} - -.formatted-font .usfm_mi { - font-size: 100%; -} -.text-spacing .usfm_mi { - margin-left: 5vw; - margin-right: 5vw; -} - -/* check if deprecated */ -.formatted-font .usfm_nb { - font-size: 100%; -} - -.formatted-font .usfm_q { - font-size: 100%; -} -.text-spacing .usfm_q { - text-indent: -10vw; -} -.text-spacing[dir="ltr"] .usfm_q { - margin-left: 15vw; -} -.text-spacing[dir="rtl"] .usfm_q { - margin-right: 15vw; -} - -.formatted-font .usfm_q1 { - font-size: 100%; -} -.text-spacing .usfm_q1 { - text-indent: -10vw; -} -.text-spacing[dir="ltr"] .usfm_q1 { - margin-left: 15vw; -} -.text-spacing[dir="rtl"] .usfm_q1 { - margin-right: 15vw; -} - -.formatted-font .usfm_q2 { - font-size: 100%; -} -.text-spacing .usfm_q2 { - text-indent: -7.5vw; -} -.text-spacing[dir="ltr"] .usfm_q2 { - margin-left: 15vw; -} -.text-spacing[dir="rtl"] .usfm_q2 { - margin-right: 15vw; -} - -.formatted-font .usfm_q3 { - font-size: 100%; -} -.text-spacing .usfm_q3 { - text-indent: -5vw; -} -.text-spacing[dir="ltr"] .usfm_q3 { - margin-left: 15vw; -} -.text-spacing[dir="rtl"] .usfm_q3 { - margin-right: 15vw; -} - -.formatted-font .usfm_q4 { - font-size: 100%; -} -.text-spacing .usfm_q4 { - text-indent: -2.5vw; -} -.text-spacing[dir="ltr"] .usfm_q4 { - margin-left: 15vw; -} -.text-spacing[dir="rtl"] .usfm_q4 { - margin-right: 15vw; -} - -.formatted-font .usfm_qc { - font-size: 100%; -} -.text-spacing .usfm_qc { - text-align: center; -} - -.usfm_qr { - text-align: end; -} -.formatted-font .usfm_qr { - font-size: 100%; -} - -.formatted-font .usfm_qa { - font-size: 100%; - font-style: italic; -} - -.formatted-font .usfm_qm { - font-size: 100%; -} -.text-spacing .usfm_qm { - text-indent: -15vw; -} -.text-spacing[dir="ltr"] .usfm_qm { - margin-left: 20vw; -} -.text-spacing[dir="rtl"] .usfm_qm { - margin-right: 20vw; -} - -.formatted-font .usfm_qm1 { - font-size: 100%; -} -.text-spacing .usfm_qm1 { - text-indent: -15vw; -} -.text-spacing[dir="ltr"] .usfm_qm1 { - margin-left: 20vw; -} -.text-spacing[dir="rtl"] .usfm_qm1 { - margin-right: 20vw; -} - -.formatted-font .usfm_qm2 { - font-size: 100%; -} -.text-spacing .usfm_qm2 { - text-indent: -10vw; -} -.text-spacing[dir="ltr"] .usfm_qm2 { - margin-left: 20vw; -} -.text-spacing[dir="rtl"] .usfm_qm2 { - margin-right: 20vw; -} - -.formatted-font .usfm_qm3 { - font-size: 100%; -} -.text-spacing .usfm_qm3 { - text-indent: -5vw; -} -.text-spacing[dir="ltr"] .usfm_qm3 { - margin-left: 20vw; -} -.text-spacing[dir="rtl"] .usfm_qm3 { - margin-right: 20vw; -} - -.formatted-font .usfm_qd { - font-size: 100%; - font-style: italic; -} -.text-spacing[dir="ltr"] .usfm_qd { - margin-left: 5vw; -} -.text-spacing[dir="rtl"] .usfm_qd { - margin-right: 5vw; -} - -.formatted-font .usfm_b { - font-size: 83%; -} - -.formatted-font .usfm_mt { - font-weight: bold; - font-size: 166%; -} -.text-spacing .usfm_mt { - text-align: center; - margin-bottom: 4pt; - margin-top: 8pt; -} - -.formatted-font .usfm_mt1 { - font-weight: bold; - font-size: 166%; -} -.text-spacing .usfm_mt1 { - text-align: center; - margin-bottom: 4pt; - margin-top: 2pt; -} - -.formatted-font .usfm_mt2 { - font-size: 133%; - font-style: italic; -} -.text-spacing .usfm_mt2 { - text-align: center; - margin-bottom: 2pt; -} - -.formatted-font .usfm_mt3 { - font-weight: bold; - font-size: 133%; -} -.text-spacing .usfm_mt3 { - text-align: center; - margin-bottom: 2pt; - margin-top: 2pt; -} - -.formatted-font .usfm_mt4 { - font-size: 100%; -} -.text-spacing .usfm_mt4 { - text-align: center; - margin-bottom: 2pt; - margin-top: 2pt; -} - -.formatted-font .usfm_mte { - font-weight: bold; - font-size: 166%; -} -.text-spacing .usfm_mte { - text-align: center; - margin-bottom: 4pt; - margin-top: 8pt; -} - -.formatted-font .usfm_mte1 { - font-weight: bold; - font-size: 166%; -} -.text-spacing .usfm_mte1 { - text-align: center; - margin-bottom: 4pt; - margin-top: 8pt; -} - -.formatted-font .usfm_mte2 { - font-size: 133%; - font-style: italic; -} -.text-spacing .usfm_mte2 { - text-align: center; - margin-bottom: 2pt; -} - -.formatted-font .usfm_ms { - font-weight: bold; - font-size: 116%; -} -.text-spacing .usfm_ms { - text-align: center; - margin-bottom: 4pt; - margin-top: 16pt; -} - -.formatted-font .usfm_ms1 { - font-weight: bold; - font-size: 116%; -} -.text-spacing .usfm_ms1 { - text-align: center; - margin-bottom: 4pt; - margin-top: 16pt; -} - -.formatted-font .usfm_ms2 { - font-weight: bold; - font-size: 116%; -} -.text-spacing .usfm_ms2 { - text-align: center; - margin-bottom: 4pt; - margin-top: 16pt; -} - -.formatted-font .usfm_ms3 { - font-size: 116%; - font-style: italic; -} -.text-spacing .usfm_ms3 { - text-align: center; - margin-bottom: 4pt; - margin-top: 16pt; -} - -.formatted-font .usfm_mr { - font-size: 100%; - font-style: italic; -} -.text-spacing .usfm_mr { - text-align: center; - margin-bottom: 4pt; -} - -.formatted-font .usfm_s { - font-weight: bold; - font-size: 100%; -} -.text-spacing .usfm_s { - text-align: center; - margin-bottom: 4pt; - margin-top: 8pt; -} - -.formatted-font .usfm_s1 { - font-weight: bold; - font-size: 100%; -} -.text-spacing .usfm_s1 { - text-align: center; - margin-bottom: 4pt; - margin-top: 8pt; -} - -.formatted-font .usfm_s2 { - font-size: 100%; - font-style: italic; -} -.text-spacing .usfm_s2 { - text-align: center; - margin-bottom: 4pt; - margin-top: 8pt; -} - -.formatted-font .usfm_s3 { - font-size: 100%; - font-style: italic; -} -.text-spacing .usfm_s3 { - margin-bottom: 3pt; - margin-top: 6pt; -} - -.formatted-font .usfm_s4 { - font-size: 100%; - font-style: italic; -} -.text-spacing .usfm_s4 { - margin-bottom: 3pt; - margin-top: 6pt; -} - -.formatted-font .usfm_sr { - font-weight: bold; - font-size: 100%; -} -.text-spacing .usfm_sr { - text-align: center; - margin-bottom: 4pt; -} - -.formatted-font .usfm_r { - font-size: 100%; - font-style: italic; -} -.text-spacing .usfm_r { - text-align: center; - margin-bottom: 4pt; -} - -.formatted-font .usfm_sp { - font-size: 100%; - font-style: italic; -} -.text-spacing .usfm_sp { - margin-bottom: 4pt; - margin-top: 8pt; -} - -.formatted-font .usfm_d { - font-size: 100%; - font-style: italic; -} -.text-spacing .usfm_d { - text-align: center; - margin-bottom: 4pt; - margin-top: 4pt; -} - -.text-spacing .usfm_sd { - margin-bottom: 24pt; - margin-top: 24pt; -} - -.text-spacing .usfm_sd1 { - margin-bottom: 24pt; - margin-top: 24pt; -} - -.text-spacing .usfm_sd2 { - margin-bottom: 18pt; - margin-top: 18pt; -} - -.text-spacing .usfm_sd3 { - margin-bottom: 12pt; - margin-top: 12pt; -} - -.text-spacing .usfm_sd4 { - margin-bottom: 8pt; - margin-top: 8pt; -} - -.formatted-font .usfm_lh { - font-size: 100%; -} -.text-spacing .usfm_lh { - text-indent: 2.5vw; -} - -.formatted-font .usfm_li { - font-size: 100%; -} -.text-spacing .usfm_li { - text-indent: -7.5vw; -} -.text-spacing[dir="ltr"] .usfm_li { - margin-left: 10vw; -} -.text-spacing[dir="rtl"] .usfm_li { - margin-right: 10vw; -} - -.formatted-font .usfm_li1 { - font-size: 100%; -} -.text-spacing .usfm_li1 { - text-indent: -7.5vw; -} -.text-spacing[dir="ltr"] .usfm_li1 { - margin-left: 10vw; -} -.text-spacing[dir="rtl"] .usfm_li1 { - margin-right: 10vw; -} - -.formatted-font .usfm_li2 { - font-size: 100%; -} -.text-spacing .usfm_li2 { - text-indent: -7.5vw; -} -.text-spacing[dir="ltr"] .usfm_li2 { - margin-left: 15vw; -} -.text-spacing[dir="rtl"] .usfm_li2 { - margin-right: 15vw; -} - -.formatted-font .usfm_li3 { - font-size: 100%; -} -.text-spacing .usfm_li3 { - text-indent: -7.5vw; -} -.text-spacing[dir="ltr"] .usfm_li3 { - margin-left: 20vw; -} -.text-spacing[dir="rtl"] .usfm_li3 { - margin-right: 20vw; -} - -.formatted-font .usfm_li4 { - font-size: 100%; -} -.text-spacing .usfm_li4 { - text-indent: -7.5vw; -} -.text-spacing[dir="ltr"] .usfm_li4 { - margin-left: 25vw; -} -.text-spacing[dir="rtl"] .usfm_li4 { - margin-right: 25vw; -} - -.formatted-font .usfm_lf { - font-size: 100%; -} - -.formatted-font .usfm_lim { - font-size: 100%; -} -.text-spacing .usfm_lim { - text-indent: -7.5vw; -} -.text-spacing[dir="ltr"] .usfm_lim { - margin-left: 15vw; - margin-right: 5vw; -} -.text-spacing[dir="rtl"] .usfm_lim { - margin-left: 5vw; - margin-right: 15vw; -} - -.formatted-font .usfm_lim1 { - font-size: 100%; -} -.text-spacing .usfm_lim1 { - text-indent: -7.5vw; -} -.text-spacing[dir="ltr"] .usfm_lim1 { - margin-left: 15vw; - margin-right: 5vw; -} -.text-spacing[dir="rtl"] .usfm_lim1 { - margin-left: 5vw; - margin-right: 15vw; -} - -.formatted-font .usfm_lim2 { - font-size: 100%; -} -.text-spacing .usfm_lim2 { - text-indent: -7.5vw; -} -.text-spacing[dir="ltr"] .usfm_lim2 { - margin-left: 20vw; -} -.text-spacing[dir="rtl"] .usfm_lim2 { - margin-right: 20vw; -} - -.formatted-font .usfm_lim3 { - font-size: 100%; -} -.text-spacing .usfm_lim3 { - text-indent: -7.5vw; -} -.text-spacing[dir="ltr"] .usfm_lim3 { - margin-left: 25vw; -} -.text-spacing[dir="rtl"] .usfm_lim3 { - margin-right: 25vw; -} - -.formatted-font .usfm_lim4 { - font-size: 100%; -} -.text-spacing .usfm_lim4 { - text-indent: -7.5vw; -} -.text-spacing[dir="ltr"] .usfm_lim4 { - margin-left: 30vw; -} -.text-spacing[dir="rtl"] .usfm_lim4 { - margin-right: 30vw; -} - -.usfm_lit { - text-align: end; -} -.formatted-font .usfm_lit { - font-weight: bold; - font-size: 100%; -} - -.formatted-font .usfm_ph { - font-size: 100%; -} -.text-spacing .usfm_ph { - text-indent: -5vw; -} -.text-spacing[dir="ltr"] .usfm_ph { - margin-left: 10vw; -} -.text-spacing[dir="rtl"] .usfm_ph { - margin-right: 10vw; -} - -.formatted-font .usfm_ph1 { - font-size: 100%; -} -.text-spacing .usfm_ph1 { - text-indent: -5vw; -} -.text-spacing[dir="ltr"] .usfm_ph1 { - margin-left: 10vw; -} -.text-spacing[dir="rtl"] .usfm_ph1 { - margin-right: 10vw; -} - -.formatted-font .usfm_ph2 { - font-size: 100%; -} -.text-spacing .usfm_ph2 { - text-indent: -5vw; -} -.text-spacing[dir="ltr"] .usfm_ph2 { - margin-left: 15vw; -} -.text-spacing[dir="rtl"] .usfm_ph2 { - margin-right: 15vw; -} - -.formatted-font .usfm_ph3 { - font-size: 100%; -} -.text-spacing .usfm_ph3 { - text-indent: -5vw; -} -.text-spacing[dir="ltr"] .usfm_ph3 { - margin-left: 20vw; -} -.text-spacing[dir="rtl"] .usfm_ph3 { - margin-right: 20vw; -} - -/* CharNode */ - -.formatted-font .usfm_qs { - font-size: 100%; - font-style: italic; -} - -.formatted-font .usfm_qac { - font-size: 100%; - font-style: italic; -} - -.formatted-font .usfm_litl { - font-size: 100%; - font-style: italic; -} - -.formatted-font .usfm_lik { - font-size: 100%; - font-style: italic; -} - -.formatted-font .usfm_liv { - font-size: 100%; -} - -.formatted-font .usfm_liv1 { - font-size: 100%; -} - -.formatted-font .usfm_liv2 { - font-size: 100%; -} - -.formatted-font .usfm_liv3 { - font-size: 100%; -} - -.formatted-font .usfm_liv4 { - font-size: 100%; -} - -.formatted-font .usfm_liv5 { - font-size: 100%; -} - -.formatted-font .usfm_rq { - font-size: 83%; - font-style: italic; -} - -.formatted-font .usfm_qt { - font-weight: bold; - font-size: 100%; -} - -.formatted-font .usfm_nd { - font-size: 100%; - text-decoration: underline; -} - -.formatted-font .usfm_tl { - font-size: 100%; - font-style: italic; -} - -.formatted-font .usfm_dc { - font-style: italic; -} - -.formatted-font .usfm_bk { - font-size: 100%; - font-style: italic; -} - -.formatted-font .usfm_sig { - font-size: 100%; - font-style: italic; -} - -.formatted-font .usfm_pn { - font-weight: bold; - font-size: 100%; - text-decoration: underline; -} - -.formatted-font .usfm_png { - font-size: 100%; - text-decoration: underline; -} - -/* check if deprecated */ -.formatted-font .usfm_addpn { - font-weight: bold; - font-size: 100%; - font-style: italic; - text-decoration: underline; -} - -.formatted-font .usfm_wj { - color: #d43128; - font-size: 100%; -} - -.formatted-font .usfm_k { - font-weight: bold; - font-size: 100%; - font-style: italic; -} - -.formatted-font .usfm_sls { - font-size: 100%; - font-style: italic; -} - -.formatted-font .usfm_ord { - vertical-align: text-top; - font-size: 66%; -} - -.formatted-font .usfm_add { - font-weight: bold; - font-style: italic; -} - -.formatted-font .usfm_no { - font-size: 100%; -} - -.formatted-font .usfm_it { - font-size: 100%; - font-style: italic; -} - -.formatted-font .usfm_bd { - font-weight: bold; - font-size: 100%; -} - -.formatted-font .usfm_bdit { - font-weight: bold; - font-size: 100%; - font-style: italic; -} - -.formatted-font .usfm_em { - font-size: 100%; - font-style: italic; -} - -.formatted-font .usfm_sc { - font-size: 100%; - font-variant: small-caps; -} - -.formatted-font .usfm_sup { - vertical-align: text-top; - font-size: 66%; -} - -/* check if deprecated */ -.formatted-font .usfm_pb { - font-size: 100%; -} - -/* check if deprecated */ -.formatted-font .usfm_fig { - font-size: 100%; -} - -.formatted-font .usfm_jmp { - color: #003380; - text-decoration: underline; -} - -.formatted-font .usfm_pro { - font-size: 83%; -} - -.formatted-font .usfm_rb { - font-size: 100%; -} - -.formatted-font .usfm_w { - font-size: 100%; -} - -.formatted-font .usfm_wh { - font-size: 100%; -} - -.formatted-font .usfm_wg { - font-size: 100%; -} - -.formatted-font .usfm_wa { - font-size: 100%; -} - -/* check if deprecated */ -.formatted-font .usfm_ndx { - font-size: 100%; -} - -/* Footnote NoteNode */ - -.formatted-font .usfm_f { - font-size: 100%; -} - -.formatted-font .usfm_fe { - font-size: 100%; -} - -/* Footnote CharNode */ - -.formatted-font .usfm_fr { - font-weight: bold; - font-size: 100%; -} - -.formatted-font .usfm_ft { - font-size: 100%; -} - -.formatted-font .usfm_fk { - font-weight: bold; - font-size: 100%; - font-style: italic; -} - -.formatted-font .usfm_fq { - font-size: 100%; - font-style: italic; -} - -.formatted-font .usfm_fqa { - font-size: 100%; - font-style: italic; -} - -.formatted-font .usfm_fl { - font-weight: bold; - font-size: 100%; - font-style: italic; -} - -.formatted-font .usfm_fw { - font-size: 100%; -} - -.formatted-font .usfm_fp { - font-size: 100%; -} - -.formatted-font .usfm_fv { - vertical-align: text-top; - font-size: 66%; -} - -.formatted-font .usfm_fdc { - font-size: 100%; -} - -.formatted-font .usfm_fm { - vertical-align: text-top; - font-size: 66%; -} - -/* Cross-reference NoteNode */ - -.formatted-font .usfm_x { - font-size: 100%; -} - -/* Cross-reference CharNode */ - -.formatted-font .usfm_xo { - font-weight: bold; - font-size: 100%; -} - -.formatted-font .usfm_xop { - font-size: 100%; -} - -.formatted-font .usfm_xt { - font-size: 100%; - unicode-bidi: embed; -} - -.formatted-font .usfm_xta { - font-size: 100%; -} - -.formatted-font .usfm_xk { - font-size: 100%; - font-style: italic; -} - -.formatted-font .usfm_xq { - font-size: 100%; - font-style: italic; -} - -.formatted-font .usfm_xot { - font-size: 100%; -} - -.formatted-font .usfm_xnt { - font-size: 100%; -} - -.formatted-font .usfm_xdc { - font-size: 100%; -} - -/* periph */ - -.formatted-font .usfm_periph { - font-weight: bold; - color: #e87217; - font-size: 116%; -} -.text-spacing .usfm_periph { - margin-bottom: 4pt; - margin-top: 16pt; -} - -.formatted-font .usfm_p1 { - font-size: 100%; -} -.text-spacing .usfm_p1 { - text-indent: 2.5vw; -} - -.formatted-font .usfm_p2 { - font-size: 100%; -} -.text-spacing .usfm_p2 { - text-indent: 2.5vw; -} -.text-spacing[dir="ltr"] .usfm_p2 { - margin-left: 2.5vw; -} -.text-spacing[dir="rtl"] .usfm_p2 { - margin-right: 2.5vw; -} - -.formatted-font .usfm_k1 { - font-size: 100%; -} - -.formatted-font .usfm_k2 { - font-size: 100%; -} - -.formatted-font .usfm_xtSee { - color: #003380; - font-size: 100%; - font-style: italic; -} - -.formatted-font .usfm_xtSeeAlso { - color: #003380; - font-size: 100%; - font-style: italic; -} - -/* MilestoneNode */ - -.formatted-font .usfm_qt-s { - font-size: 100%; -} - -.formatted-font .usfm_qt-e { - font-size: 100%; -} - -.formatted-font .usfm_qt1-s { - font-size: 100%; -} - -.formatted-font .usfm_qt1-e { - font-size: 100%; -} - -.formatted-font .usfm_qt2-s { - font-size: 100%; -} - -.formatted-font .usfm_qt2-e { - font-size: 100%; -} - -.formatted-font .usfm_qt3-s { - font-size: 100%; -} - -.formatted-font .usfm_qt3-e { - font-size: 100%; -} - -.formatted-font .usfm_qt4-s { - font-size: 100%; -} - -.formatted-font .usfm_qt4-e { - font-size: 100%; -} - -.formatted-font .usfm_qt5-s { - font-size: 100%; -} - -.formatted-font .usfm_qt5-e { - font-size: 100%; -} - -.formatted-font .usfm_ts-s { - font-size: 100%; -} - -.formatted-font .usfm_ts-e { - font-size: 100%; -} - -/* table */ - -.formatted-font .usfm_tr { - font-size: 100%; -} -.text-spacing .usfm_tr { - text-indent: -5vw; -} -.text-spacing[dir="ltr"] .usfm_tr { - margin-left: 10vw; -} -.text-spacing[dir="rtl"] .usfm_tr { - margin-right: 10vw; -} - -.formatted-font .usfm_th1 { - font-size: 100%; - font-style: italic; -} - -.formatted-font .usfm_th2 { - font-size: 100%; - font-style: italic; -} - -.formatted-font .usfm_th3 { - font-size: 100%; - font-style: italic; -} - -.formatted-font .usfm_th4 { - font-size: 100%; - font-style: italic; -} - -.formatted-font .usfm_th5 { - font-size: 100%; - font-style: italic; -} - -.formatted-font .usfm_tc1 { - font-size: 100%; -} - -.formatted-font .usfm_tc2 { - font-size: 100%; -} - -.formatted-font .usfm_tc3 { - font-size: 100%; -} - -.formatted-font .usfm_tc4 { - font-size: 100%; -} - -.formatted-font .usfm_tc5 { - font-size: 100%; -} - -.formatted-font .usfm_thc1 { - font-size: 100%; - font-style: italic; -} -.text-spacing .usfm_thc1 { - text-align: center; -} - -.formatted-font .usfm_thc2 { - font-size: 100%; - font-style: italic; -} -.text-spacing .usfm_thc2 { - text-align: center; -} - -.formatted-font .usfm_thc3 { - font-size: 100%; - font-style: italic; -} -.text-spacing .usfm_thc3 { - text-align: center; -} - -.formatted-font .usfm_thc4 { - font-size: 100%; - font-style: italic; -} -.text-spacing .usfm_thc4 { - text-align: center; -} - -.formatted-font .usfm_thc5 { - font-size: 100%; - font-style: italic; -} -.text-spacing .usfm_thc5 { - text-align: center; -} - -.formatted-font .usfm_tcc1 { - font-size: 100%; -} -.text-spacing .usfm_tcc1 { - text-align: center; -} - -.formatted-font .usfm_tcc2 { - font-size: 100%; -} -.text-spacing .usfm_tcc2 { - text-align: center; -} - -.formatted-font .usfm_tcc3 { - font-size: 100%; -} -.text-spacing .usfm_tcc3 { - text-align: center; -} - -.formatted-font .usfm_tcc4 { - font-size: 100%; -} -.text-spacing .usfm_tcc4 { - text-align: center; -} - -.formatted-font .usfm_tcc5 { - font-size: 100%; -} -.text-spacing .usfm_tcc5 { - text-align: center; -} - -.formatted-font .usfm_thr1 { - font-size: 100%; - font-style: italic; -} -.text-spacing .usfm_thr1 { - text-align: end; -} - -.formatted-font .usfm_thr2 { - font-size: 100%; - font-style: italic; -} -.text-spacing .usfm_thr2 { - text-align: end; -} - -.formatted-font .usfm_thr3 { - font-size: 100%; - font-style: italic; -} -.text-spacing .usfm_thr3 { - text-align: end; -} - -.formatted-font .usfm_thr4 { - font-size: 100%; - font-style: italic; -} -.text-spacing .usfm_thr4 { - text-align: end; -} - -.formatted-font .usfm_thr5 { - font-size: 100%; - font-style: italic; -} -.text-spacing .usfm_thr5 { - text-align: end; -} - -.formatted-font .usfm_tcr1 { - font-size: 100%; -} -.text-spacing .usfm_tcr1 { - text-align: end; -} - -.formatted-font .usfm_tcr2 { - font-size: 100%; -} -.text-spacing .usfm_tcr2 { - text-align: end; -} - -.formatted-font .usfm_tcr3 { - font-size: 100%; -} -.text-spacing .usfm_tcr3 { - text-align: end; -} - -.formatted-font .usfm_tcr4 { - font-size: 100%; -} -.text-spacing .usfm_tcr4 { - text-align: end; -} - -.formatted-font .usfm_tcr5 { - font-size: 100%; -} -.text-spacing .usfm_tcr5 { - text-align: end; -} - -/* table/unknown */ - -.formatted-font .usfm_tr1 { - font-size: 100%; -} -.text-spacing .usfm_tr1 { - text-indent: -5vw; -} -.text-spacing[dir="ltr"] .usfm_tr1 { - margin-left: 10vw; -} -.text-spacing[dir="rtl"] .usfm_tr1 { - margin-right: 10vw; -} - -.formatted-font .usfm_tr2 { - font-size: 100%; -} -.text-spacing .usfm_tr2 { - text-indent: -5vw; -} -.text-spacing[dir="ltr"] .usfm_tr2 { - margin-left: 15vw; -} -.text-spacing[dir="rtl"] .usfm_tr2 { - margin-right: 15vw; -} - -.formatted-font .usfm_ps { - font-size: 100%; -} -.text-spacing .usfm_ps { - text-indent: 2.5vw; -} - -.formatted-font .usfm_psi { - font-size: 100%; -} -.text-spacing .usfm_psi { - text-indent: 2.5vw; - margin-left: 5vw; - margin-right: 5vw; -} - -.formatted-font .usfm_fs { - font-size: 100%; - font-style: italic; -} - -.formatted-font .usfm_wr { - font-size: 100%; - font-style: italic; -} - -.formatted-font .usfm_pub { - font-size: 83%; -} - -.formatted-font .usfm_toc { - font-size: 83%; -} - -.formatted-font .usfm_pref { - font-size: 83%; -} - -.formatted-font .usfm_intro { - font-size: 83%; -} - -.formatted-font .usfm_conc { - font-size: 83%; -} - -.formatted-font .usfm_glo { - font-size: 83%; -} - -.formatted-font .usfm_idx { - font-size: 83%; -} - -.formatted-font .usfm_maps { - font-size: 83%; -} - -.formatted-font .usfm_cov { - font-size: 83%; -} - -.formatted-font .usfm_spine { - font-size: 83%; -} - -.formatted-font .usfm_pubinfo { - color: #003380; - font-size: 100%; -} - -.formatted-font .usfm_zpa-xb { - font-size: 100%; -} - -.formatted-font .usfm_zpa-xc { - font-weight: bold; - font-size: 100%; -} - -.formatted-font .usfm_zpa-xv { - font-size: 100%; -} - -.formatted-font .usfm_zpa-d { - font-size: 100%; -} - -body { - background-color: rgba(252, 252, 252, 1); - color: rgba(25, 25, 25, 1); -} - -.marker { - unicode-bidi: isolate; -} -.formatted-font .marker { - color: rgba(140, 140, 140, 1); - font-size: 0.7em; -} - -.notetext { - unicode-bidi: embed; -} - -.attribute { - color: rgba(170, 170, 170, 1); -} - -.attribute:hover { - color: rgba(25, 25, 25, 1); -} - -.invalid { - color: rgba(204, 30, 20, 1); - font-weight: bold; -} - -/* NoteNode, ImmutableNoteCallerNode */ - -.immutable-note-caller > button, -/* Styles for Preview (and Ruby) views */ -.caller_preview, -.previewcallee { - color: rgba(18, 82, 179, 1); - font-weight: bold; - line-height: 1; - vertical-align: super; - font-size: 0.66em; -} - -.immutable-note-caller > button { - cursor: pointer; - text-decoration: none; - border: 0; - padding: 0; - background-color: inherit; -} - -.immutable-note-caller[data-caller="-"] { - display: none; -} - -.caller_big { - unicode-bidi: normal; - color: rgba(18, 82, 179, 1); - font-weight: bold; - text-indent: 0pt; - vertical-align: text-top; - font-size: 0.66em; -} - -.caller_small { - unicode-bidi: normal; - color: rgba(18, 82, 179, 1); - font-family: Times New Roman; - vertical-align: text-top; - text-indent: 0pt; - font-size: 0.66em; -} - -.caller_highlight { - background-color: #ffffb5; - border-top: solid 1px #0000ff; - border-bottom: solid 1px #0000ff; -} - -.opennote { - color: #7777ff; -} - -table { - border-collapse: collapse; -} - -td { - border: 1px solid #000000; - page-break-inside: avoid; - /* FB27281 adding padding based on font size*/ - padding-right: 0.28em; - padding-left: 0.28em; -} - -td.markercell { - border-style: none; -} - -rt { - cursor: pointer; -} - -/* Style statues */ -.status_unknown { - color: rgba(204, 30, 20, 1); - font-weight: bold; -} - -.status_invalid { - border-bottom: 1px solid rgba(204, 30, 20, 1); - color: rgba(204, 30, 20, 1); -} - -.caption { - text-align: center; - font-style: italic; - font-weight: bold; -} - -.figure { - text-align: center; -} - -.sidebar { - border: solid 1px rgba(18, 82, 179, 1); - margin-left: 10px; -} - -/* VerseNode, ImmutableVerseNode */ - -.formatted-font .verse { - background-color: rgba(222, 222, 222, 1); - vertical-align: super; - font-size: 0.66em; -} -.text-spacing .verse { - margin: 0px 2px 0px 2px; - padding: 0px 1px 0px 1px; - text-indent: 0in; - white-space: nowrap; -} - -.annot_comment_todo { - border-bottom: 1px dashed #888888; -} -.annot_comment_todo { - border-bottom: 1px dashed #888888; -} -span.unread img { - background-color: #ffff99; - position: relative; - bottom: -1px; /* negative of border-width to align baseline */ - border-width: 1px; - border-style: solid; - border-color: #808080; -} -span.read img { - background-color: transparent; - position: relative; - bottom: 0px; - border-width: 0px; - border-style: none; -} - -.annot_comment_todo { - border-bottom: 1px dashed #888888; -} - -.annot_comment_done { - border-bottom: 1px dashed #888888; -} - -.annot_greencursor { - background-color: rgba(152, 235, 157, 1); -} -.annot_goldcursor { - background-color: rgba(255, 255, 163, 1); -} -.annot_bluecursor { - background-color: rgba(204, 224, 255, 1); -} -.annot_greycursor { - background-color: rgba(222, 222, 222, 1); -} -.annot_violetcursor { - background-color: rgba(233, 212, 255, 1); -} - -.annot_spellingerror { - background-repeat: repeat-x; - background-position: left bottom; - padding-bottom: 0px; - vertical-align: text-top; -} - -.annot_spellingunknown { - background-repeat: repeat-x; - background-position: left bottom; - padding-bottom: 0px; - vertical-align: text-top; -} - -.found_term { - background-color: rgba(222, 222, 222, 1); - text-indent: 0; - margin-left: 0; - display: inline-block; - border-bottom-style: solid; - border-bottom-width: medium medium thick medium; - border-bottom-color: rgba(252, 252, 252, 1); - text-decoration: inherit; -} -.guessed_term { - background-color: rgba(255, 191, 143, 1); - text-indent: 0; - margin-left: 0; - display: inline-block; - border-bottom-style: solid; - border-bottom-width: medium medium thick medium; - border-bottom-color: rgba(252, 252, 252, 1); - text-decoration: inherit; -} -.found_term.unselected_term { - background-color: rgba(222, 222, 222, 0.6); - text-indent: 0; - margin-left: 0; - display: inline-block; - border-bottom-style: solid; - border-bottom-width: medium medium thick medium; - border-bottom-color: rgba(252, 252, 252, 1); - text-decoration: inherit; -} -.guessed_term.unselected_term { - background-color: rgba(255, 191, 143, 0.3); - text-indent: 0; - margin-left: 0; - display: inline-block; - border-bottom-style: solid; - border-bottom-width: medium medium thick medium; - border-bottom-color: rgba(252, 252, 252, 1); - text-decoration: inherit; -} -.selected_term { - border-style: none none solid none; - text-indent: 0; - margin-left: 0; - display: inline-block; - border-bottom-style: solid; - border-bottom-width: medium medium thick medium; - border-bottom-color: rgba(252, 252, 252, 1); - text-decoration: inherit; -} -.annot_reference_link { - border-bottom: 1px solid #93c4ff; -} -.annot_invalid_reference { - border-bottom: 1px solid #ff8080; -} -.annot_checkError { - border-top: 1px solid #ff0000; - border-bottom: 1px solid #ff0000; - background-color: rgba(255, 204, 204, 0.5); -} diff --git a/extensions/src/platform-scripture-editor/src/main.ts b/extensions/src/platform-scripture-editor/src/main.ts deleted file mode 100644 index 930e57450d..0000000000 --- a/extensions/src/platform-scripture-editor/src/main.ts +++ /dev/null @@ -1,157 +0,0 @@ -import papi, { logger } from '@papi/backend'; -import type { - ExecutionActivationContext, - GetWebViewOptions, - IWebViewProvider, - SavedWebViewDefinition, - WebViewDefinition, -} from '@papi/core'; -import platformScriptureEditorWebView from './platform-scripture-editor.web-view?inline'; -import platformScriptureEditorWebViewStyles from './platform-scripture-editor.web-view.scss?inline'; - -logger.info('Scripture Editor is importing!'); - -const scriptureEditorWebViewType = 'platformScriptureEditor.react'; - -interface PlatformScriptureEditorOptions extends GetWebViewOptions { - projectId: string | undefined; - isReadOnly: boolean; -} - -/** Temporary function to manually control `isReadOnly`. Registered as a command handler. */ -async function openPlatformScriptureEditor( - projectId: string | undefined, -): Promise { - // The second argument (isReadOnly) is hardcoded for now, but should be a parameter in the future - return open(projectId, false); -} - -/** Temporary function to manually control `isReadOnly`. Registered as a command handler. */ -async function openPlatformResourceViewer( - projectId: string | undefined, -): Promise { - // The second argument (isReadOnly) is hardcoded for now, but should be a parameter in the future - return open(projectId, true); -} - -/** Function to prompt for a project and open it in the editor */ -async function open( - projectId: string | undefined, - isReadOnly: boolean, -): Promise { - const projectForWebView = { projectId, isEditable: !isReadOnly }; - if (!projectForWebView.projectId) { - // Get a list of projects that are editable or not editable to show in the select project dialog - const projectMetadatas = await papi.projectLookup.getMetadataForAllProjects({ - includeProjectInterfaces: ['platformScripture.USJ_Chapter'], - }); - const projectsWithEditable = await Promise.all( - projectMetadatas.map(async (projectMetadata) => { - const pdp = await papi.projectDataProviders.get('platform.base', projectMetadata.id); - return { - projectId: projectMetadata.id, - isEditable: await pdp.getSetting('platform.isEditable'), - }; - }), - ); - - const projectIdsMatchingReadonly = projectsWithEditable - .filter(({ isEditable }) => isEditable !== isReadOnly) - .map(({ projectId: pId }) => pId); - - if (projectIdsMatchingReadonly.length > 0) { - projectForWebView.projectId = await papi.dialogs.selectProject({ - title: isReadOnly - ? '%platformScriptureEditor_dialog_openResourceViewer_title%' - : '%platformScriptureEditor_dialog_openScriptureEditor_title%', - prompt: isReadOnly - ? '%platformScriptureEditor_dialog_openResourceViewer_prompt%' - : '%platformScriptureEditor_dialog_openScriptureEditor_prompt%', - // Include projects whose editable matches readonly - includeProjectIds: projectIdsMatchingReadonly, - }); - } else { - logger.warn( - `Open ${isReadOnly ? 'Resource Viewer' : 'Scripture Editor'} did not find any projects with matching isEditable! Would show a prompt or something if there were a dialog available to do so`, - ); - } - } else { - // Get whether the provided project is editable - const pdp = await papi.projectDataProviders.get('platform.base', projectForWebView.projectId); - projectForWebView.isEditable = await pdp.getSetting('platform.isEditable'); - } - if (projectForWebView.projectId) { - const options: PlatformScriptureEditorOptions = { - projectId: projectForWebView.projectId, - isReadOnly: !projectForWebView.isEditable, - }; - // REVIEW: If an editor is already open for the selected project, we open another. - // This matches the current behavior in P9, though it might not be what we want long-term. - return papi.webViews.getWebView(scriptureEditorWebViewType, undefined, options); - } - return undefined; -} - -/** Simple web view provider that provides Resource web views when papi requests them */ -const scriptureEditorWebViewProvider: IWebViewProvider = { - async getWebView( - savedWebView: SavedWebViewDefinition, - getWebViewOptions: PlatformScriptureEditorOptions, - ): Promise { - if (savedWebView.webViewType !== scriptureEditorWebViewType) - throw new Error( - `${scriptureEditorWebViewType} provider received request to provide a ${savedWebView.webViewType} web view`, - ); - - // We know that the projectId (if present in the state) will be a string. - const projectId = getWebViewOptions.projectId || savedWebView.projectId || undefined; - const isReadOnly = getWebViewOptions.isReadOnly || savedWebView.state?.isReadOnly; - let title = ''; - if (projectId) { - const pdp = await papi.projectDataProviders.get('platform.base', projectId); - title = `${ - (await pdp.getSetting('platform.name')) ?? projectId - }${isReadOnly ? '' : ' (Editable)'}`; - } else title = isReadOnly ? 'Resource Viewer' : 'Scripture Editor'; - - return { - title, - ...savedWebView, - content: platformScriptureEditorWebView, - styles: platformScriptureEditorWebViewStyles, - state: { - ...savedWebView.state, - isReadOnly, - }, - projectId, - }; - }, -}; - -export async function activate(context: ExecutionActivationContext): Promise { - logger.info('Scripture editor is activating!'); - - const openPlatformScriptureEditorPromise = papi.commands.registerCommand( - 'platformScriptureEditor.openScriptureEditor', - openPlatformScriptureEditor, - ); - - const openPlatformResourceViewerPromise = papi.commands.registerCommand( - 'platformScriptureEditor.openResourceViewer', - openPlatformResourceViewer, - ); - - const scriptureEditorWebViewProviderPromise = papi.webViewProviders.register( - scriptureEditorWebViewType, - scriptureEditorWebViewProvider, - ); - - // Await the registration promises at the end so we don't hold everything else up - context.registrations.add( - await scriptureEditorWebViewProviderPromise, - await openPlatformScriptureEditorPromise, - await openPlatformResourceViewerPromise, - ); - - logger.info('Scripture editor is finished activating!'); -} diff --git a/extensions/src/platform-scripture-editor/src/platform-scripture-editor.web-view.scss b/extensions/src/platform-scripture-editor/src/platform-scripture-editor.web-view.scss deleted file mode 100644 index 9dc6541f8c..0000000000 --- a/extensions/src/platform-scripture-editor/src/platform-scripture-editor.web-view.scss +++ /dev/null @@ -1,38 +0,0 @@ -@import './usj-nodes'; -@import './commenting'; -@import './editor'; -@import './editor-overrides'; - -body { - background-color: hsl(var(--background)); - // remove margins added by the electron browser user-agent style sheet - margin: 0; -} - -// #region verse number highlight - -// Highlight keyframes thanks to chazsolo at https://stackoverflow.com/a/55835473 -@keyframes highlight { - from { - background-color: yellow; - } -} - -.editor-container .highlighted { - position: relative; -} - -.editor-container .highlighted::before { - content: ''; - position: absolute; - width: 25px; - height: 25px; - border-radius: 50%; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); - opacity: 0.8; - animation: highlight 2s; -} - -// #endregion diff --git a/extensions/src/platform-scripture-editor/src/platform-scripture-editor.web-view.tsx b/extensions/src/platform-scripture-editor/src/platform-scripture-editor.web-view.tsx deleted file mode 100644 index b89f546847..0000000000 --- a/extensions/src/platform-scripture-editor/src/platform-scripture-editor.web-view.tsx +++ /dev/null @@ -1,195 +0,0 @@ -import { - EditorOptions, - Editorial, - EditorRef, - Marginal, - MarginalRef, -} from '@biblionexus-foundation/platform-editor'; -import { Usj } from '@biblionexus-foundation/scripture-utilities'; -import { Canon, VerseRef } from '@sillsdev/scripture'; -import { JSX, useCallback, useEffect, useMemo, useRef } from 'react'; -import type { WebViewProps } from '@papi/core'; -import { logger } from '@papi/frontend'; -import { useProjectData, useProjectSetting } from '@papi/frontend/react'; -import { ScriptureReference, debounce } from 'platform-bible-utils'; -import { Button } from 'platform-bible-react'; - -/** The offset in pixels from the top of the window to scroll to show the verse number */ -const VERSE_NUMBER_SCROLL_OFFSET = 80; - -/** - * Time in ms to delay taking action to wait for the editor to load. Hope to be obsoleted by a way - * to listen for the editor to finish loading - */ -const EDITOR_LOAD_DELAY_TIME = 100; - -const usjDocumentDefault: Usj = { type: 'USJ', version: '0.2.1', content: [] }; - -/** - * Check deep equality of two values such that two equal objects or arrays created in two different - * iframes successfully test as equal - * - * @param a - * @param b - * @returns - */ -function deepEqualAcrossIframes(a: unknown, b: unknown) { - return JSON.stringify(a) === JSON.stringify(b); -} - -function scrollToScrRef(scrRef: ScriptureReference): HTMLElement | undefined { - const verseElement = - document.querySelector( - `.editor-container span[data-marker="v"][data-number="${scrRef.verseNum}"]`, - ) ?? undefined; - - // Scroll if we find the verse or we're at the start of the chapter - if (verseElement || scrRef.verseNum === 1) { - // If we're at the first verse, scroll to the top so we can see intro material - let scrollTop = 0; - if (verseElement && scrRef.verseNum > 1) - scrollTop = - verseElement.getBoundingClientRect().top + window.scrollY - VERSE_NUMBER_SCROLL_OFFSET; - - window.scrollTo({ - top: scrollTop, - behavior: 'smooth', - }); - } - return verseElement; -} - -globalThis.webViewComponent = function PlatformScriptureEditor({ - projectId, - useWebViewState, - useWebViewScrollGroupScrRef, -}: WebViewProps): JSX.Element { - const [isReadOnly] = useWebViewState('isReadOnly', true); - const Editor = isReadOnly ? Editorial : Marginal; - - // Using react's ref api which uses null, so we must use null - // eslint-disable-next-line no-null/no-null - const editorRef = useRef(null); - const [scrRef, setScrRefInternal] = useWebViewScrollGroupScrRef(); - - /** - * Scripture reference we set most recently. Used so we don't scroll on updates to scrRef that - * come from us - */ - const internallySetScrRefRef = useRef(undefined); - - const setScrRef = useCallback( - (newScrRef: ScriptureReference) => { - internallySetScrRefRef.current = newScrRef; - return setScrRefInternal(newScrRef); - }, - [setScrRefInternal], - ); - - /** - * Whether we have gotten the Scripture data for the very first time. Used to scroll to the - * current scrRef on startup - */ - const hasFirstRetrievedScripture = useRef(false); - - const [usj, setUsj] = useProjectData('platformScripture.USJ_Chapter', projectId).ChapterUSJ( - useMemo(() => new VerseRef(scrRef.bookNum, scrRef.chapterNum, scrRef.verseNum), [scrRef]), - usjDocumentDefault, - ); - - const debouncedSetUsj = useMemo(() => debounce((newUsj: Usj) => setUsj?.(newUsj), 300), [setUsj]); - - // Editor's current usj state - const editorUsj = useRef(usj); - - // TODO: remove debounce when issue #826 is done. - const onUsjChange = useCallback( - (newUsj: Usj) => { - editorUsj.current = newUsj; - debouncedSetUsj(newUsj); - }, - [debouncedSetUsj], - ); - - // Update the editor if a change comes in - useEffect(() => { - // Deep compare the old and current state of the usj to make sure we don't change the editor's - // state without a need. Note that it already does that internally using a different algorithm, - // but we need to compare in such a way that the same object across iframes works fine - if (usj && !deepEqualAcrossIframes(usj, editorUsj.current)) { - editorUsj.current = usj; - editorRef.current?.setUsj(usj); - } - }, [usj]); - - // On loading the first time, scroll the selected verse into view - useEffect(() => { - if (usj && !hasFirstRetrievedScripture.current) { - hasFirstRetrievedScripture.current = true; - // Wait before scrolling to make sure there is time for the editor to load - // TODO: hook into the editor and detect when it has loaded somehow - setTimeout(() => scrollToScrRef(scrRef), EDITOR_LOAD_DELAY_TIME); - } - }, [usj, scrRef]); - - // Scroll the selected verse into view - useEffect(() => { - // If we made this latest scrRef change, don't scroll - if ( - internallySetScrRefRef.current && - internallySetScrRefRef.current.bookNum === scrRef.bookNum && - internallySetScrRefRef.current.chapterNum === scrRef.chapterNum && - internallySetScrRefRef.current.verseNum === scrRef.verseNum - ) { - internallySetScrRefRef.current = undefined; - return () => {}; - } - - let highlightedVerseElement: HTMLElement | undefined; - - // Wait before scrolling to make sure there is time for the editor to load - // TODO: hook into the editor and detect when it has loaded somehow - const scrollTimeout = setTimeout(() => { - // Scroll to and add a highlight to the current verse element - highlightedVerseElement = scrollToScrRef(scrRef); - highlightedVerseElement?.classList.add('highlighted'); - - internallySetScrRefRef.current = undefined; - }, EDITOR_LOAD_DELAY_TIME); - - return () => { - // Cancel this timeout to scroll if it is running because the scrRef changed and we need to - // scroll somewhere else - clearTimeout(scrollTimeout); - - // Remove highlight from the current verse element - highlightedVerseElement?.classList.remove('highlighted'); - }; - }, [scrRef]); - - const [projectName] = useProjectSetting(projectId, 'platform.name', ''); - - const options = useMemo( - () => ({ - isReadonly: isReadOnly, - hasSpellCheck: false, - textDirection: projectName === 'OHEBGRK' && Canon.isBookOT(scrRef.bookNum) ? 'rtl' : 'ltr', - }), - [isReadOnly, projectName, scrRef], - ); - - return ( - <> - {/* Workaround to pull in platform-bible-react styles into the editor */} -